We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › General Questions: a) Lua b) Zip
Page Index Toggle Pages: 1
General Questions: a) Lua b) Zip (Read 2076 times)
General Questions: a) Lua b) Zip
Apr 2nd, 2010, 9:13am
 
Hi there.  New to Processing with two questions (not sure which forum they applied to so trying this one):

a) is there any Processing/Lua integration?; and

b) Processing has a library to read zip file content, would there be one for creating zip files?

Thank you for any advice or guidance.  Cheers.
Re: General Questions: a) Lua b) Zip
Reply #1 - Apr 2nd, 2010, 9:39am
 
a) I am afraid there is no Processing Lua implementation so far.. but it sounds like interesting project to be done.

b) There is already library for reading zip files, it is made by Seltar: http://libraries.seltar.org/unzipit/
it is hopefully compatible with last version of Processing.

Best,
kof
Re: General Questions: a) Lua b) Zip
Reply #2 - Apr 2nd, 2010, 9:47am
 
Hi Kof. Thank you for the reply.

The question about the zip is for zip file creation not reading.  I have an algorithm that has to dynamically compress individual files and concatenations of files.  I have to be able to control the block size of the compressor too.

Cheers
Re: General Questions: a) Lua b) Zip
Reply #3 - Apr 2nd, 2010, 11:06am
 
Hi silicaroach,

If you wish to have more control over zip, native java can do this trough "java.util.zip"  package ..reading following link should help you to get it work:
http://java.sun.com/developer/technicalArticles/Programming/compression/

good luck,
kof
Re: General Questions: a) Lua b) Zip
Reply #4 - Apr 2nd, 2010, 12:07pm
 
Good questions!
I know at least three different implementations of Lua in Java (thus, usable in Processing).
One LuaJava just use JNI to bind to Lua library: very faithful but less portable, harder to use in applets, etc.
Another (Kahlua) recreated Lua in Java, leveraging the native garbage collector, low tech enough to be used in mobiles (MIDP).
A third one, Jill is also pure Java, managed by Nokia, so working on mobiles too.
There is also Lua4J...

You might have guessed, I am a long time fan of Lua, reading its mailing list for years... For the curious, I recommend to take a look at Lua, it is an elegant language, easy to learn yet powerful, small and fast: it is well suited to script an application. I wrote numerous Lua scripts for my favorite editor, SciTE.
Re: General Questions: a) Lua b) Zip
Reply #5 - Apr 6th, 2010, 6:56pm
 
Can processing make a command line call?  For example, from within a Matlab program I can make a command line call to bzip2.exe .  That allows me to set block size and various other parameters and execute zip/unzip without actually using a Matlab zip library.  Much faster.  

I haven't finished "reading in" to Processing so if the answer is in the documentation somewhere just say so and I'll find it eventually.  

Thanks for all the replies.  Cheers
Re: General Questions: a) Lua b) Zip
Reply #6 - Apr 7th, 2010, 5:24am
 
silicaroach wrote on Apr 6th, 2010, 6:56pm:
Can processing make a command line call

Yes, that's open() (a not-so-intuitive name...).
Page Index Toggle Pages: 1