Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Tommy Pettersson <ptp <at> lysator.liu.se>
Subject: Re: please critique my first script
Newsgroups: gmane.comp.lang.lua.general
Date: Saturday 21st February 2009 15:30:22 UTC (over 8 years ago)
On Wed, Feb 18, 2009 at 04:57:27PM -0800, Florin Andrei wrote:
> Newbie here, I needed a pretext to learn Lua, so I made a script which 
> takes a bunch of image files and sorts them neatly into folders based on 
> the EXIF timestamp of each file.
[...]
> Please see the script attached to this message and comment on any
mistakes, 
> idiosyncrasies, faux pas, etc.

It's always a joy to code in Lua. The only thing better than to
write code when learning a new language is to read code. So I
rewrote your script, not to make it better but to make it
different, to show other ways in which Lua can work, and
hopefully give some new ideas.

Tables are central in Lua, and a powerful way to handle data, so
you better learn everything there is to know about them. :-)
I've simplified (in my opinion) your script a lot by just using
tables in a different way.

Regards,
Tommy

-- 
Tommy Pettersson 
 
CD: 3ms