Page 1 of 1
Comment and Space Remover
Posted: Sun Jul 01, 2012 4:16 am
by chanceleachman
Hi!
I've been working on this a little bit. It removes comments and spaces from your lua files to make them smaller when you want to distribute them.
This is just a graphical front-end to make things more simple. It's programmed with C# in Visual Studio.
Here are the download links for the app.
Installer:
http://adf.ly/AEnAx
Zip File:
http://adf.ly/AEnmq
Script used to shorten files (Not made by me)
Here:
http://luasrcdiet.luaforge.net/
Here is the source code
http://adf.ly/AEo1s
Re: Comment and Space Remover
Posted: Sun Jul 01, 2012 8:59 am
by Roland_Yonaba
A code minifier...
Though there's no chance I'll use this (as I don't see what point could occur with Lua source files size IMHO)..
I'll say : good work!
Re: Comment and Space Remover
Posted: Sun Jul 01, 2012 7:13 pm
by chanceleachman
Okay. I thought it would be useful to some people when they turn their .love into an .exe or other file. Just to make the file smaller (Faster download). I understand that the file size difference can sometimes be almost insignificant compared to download speeds people have now. At least it might work for people that want to sell their games commercially. It would make their code harder to understand and modify. Honesty, I was really bored when I made this, this summer.
Re: Comment and Space Remover
Posted: Fri Jul 06, 2012 10:10 pm
by klembot
It's a little tricky to set up if you don't have make installed (e.g. on Windows), but
Squish is worth looking at too.
Re: Comment and Space Remover
Posted: Sat Jul 07, 2012 12:17 am
by Inny
I say this is a bad idea, and for three reasons:
1. We can already obfuscate code, via the luac compiler. If you want to commercially distribute your game (or make it otherwise closed source), you should go that route instead. Minifying your code is a false sense of security, as it can easily be unminified should anyone want to write that code.
2. Plain text is compressed really well by the zip algorithms. The difference may be negligible in terms of filesize. Your time is better spent converting uncompressed wave files into oggs.
3. For games that aren't commercially distributed, it encourages a lack of trust in the community. We were all newbies once, and still newbies on some facets of our experience. One of the ways we learned was through reading and understanding other's code. The community should remain friendly and when someone else learns from or uses your code, it should be considered flattery rather than theft. Our
Libraries have such inviting names for a reason
Re: Comment and Space Remover
Posted: Sun Jul 08, 2012 7:15 am
by chanceleachman
Thanks for your guys' opinions.
I understand and respect them.
Honestly, I mostly did this just to help myself learn more C#. I'm 15 years old and summer vacation can get a little slow.
Before I read this, I actually updated the program to convert .love files to exe files. If your at all curious take at look at it here. I also updated the GUI.
Zip:
http://bit.ly/LyGwih
Source Code:
http://bit.ly/PyRo0Z
Thanks again guys. By the way, I do understand helping new comers out. That is the main reason why I made sure to include my source code.
Re: Comment and Space Remover
Posted: Sun Jul 08, 2012 9:16 am
by Robin
It's nothing against you, by the way.
Every so often someone comes along who thinks that they're in some unspecified danger, which for some reason will be avoided if they hide the source.
Re: Comment and Space Remover
Posted: Sun Jul 08, 2012 7:20 pm
by chanceleachman
Ya, I understand.
Re: Comment and Space Remover
Posted: Sun Jul 08, 2012 10:44 pm
by Inny
Lemme apologize if it seemed like I was launching some particular personal attack. Considering that you provided the source for your tools, you clearly understand the value of source code sharing. I was more trying to address anyone lurking.