Comment and Space Remover

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
chanceleachman
Prole
Posts: 4
Joined: Sun Jul 01, 2012 2:26 am

Comment and Space Remover

Post 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
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Comment and Space Remover

Post by Roland_Yonaba »

A code minifier... :awesome:
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!
chanceleachman
Prole
Posts: 4
Joined: Sun Jul 01, 2012 2:26 am

Re: Comment and Space Remover

Post 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.
User avatar
klembot
Prole
Posts: 30
Joined: Tue Apr 24, 2012 12:41 am

Re: Comment and Space Remover

Post 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.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Comment and Space Remover

Post 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 :P
chanceleachman
Prole
Posts: 4
Joined: Sun Jul 01, 2012 2:26 am

Re: Comment and Space Remover

Post by chanceleachman »

Thanks for your guys' opinions. :D

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. :D

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. :)
Last edited by chanceleachman on Sun Jul 08, 2012 11:39 pm, edited 1 time in total.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Comment and Space Remover

Post 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.
Help us help you: attach a .love.
chanceleachman
Prole
Posts: 4
Joined: Sun Jul 01, 2012 2:26 am

Re: Comment and Space Remover

Post by chanceleachman »

Ya, I understand.
User avatar
Inny
Party member
Posts: 652
Joined: Fri Jan 30, 2009 3:41 am
Location: New York

Re: Comment and Space Remover

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests