lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 10/05/2008 16:09, Jim White wrote:
My second mistake in this whole thing was posting this thread. I have to admit I am surprised at the level of knowledge each response has had. Most where way over my head. Not in a bad way, just way over my head. This shows me that there must be a lot of good in this when a person has attained a level of knowledge well beyond mine.

That's not a mistake. If you use the right tone, you will find people in this list are knowledgeable, friendly and helpful. And a bit sensitive on proper etiquette in a mailing list... ;)

I believe I have a decent level in programming, yet I see several threads way over my head here. Sometime I try to follow them, sometime I just skip. :P

But since I read this mailing list, I have learned LOT of stuff, from functional programming to PEG. Some stuff seems alien at first, but reading more, googling and such makes one familiar with the concepts.

I will revisit Lua from time to time to see if I can make any sense of it. Some day I will. Until then thank you all fort he advice.

Good idea. It is useful to know Python, but Lua is a very nice language too.

> I do how ever stand behind my comment that quality is lacking.

That's not what thousands of users think...
The official distribution comes out "naked", and the semi-official one (LuaBinaries) only avoids the compilation step, so is quite dry.

> This language is being represented as an "easier" one to use and learn.

It is. At least easy to learn. But it follows the Unix logic (command line prompt, rely on your own choice of editor) instead of the Windows logic (standalone IDE making everything).

No installation. What for? To unzip files where to tell it do go and to set up some registry keys to ease the use? And add a startup menu and an uninstall entry? Personally, whenever I have the choice, I choose the no-install download option, I hate to download a 2MB exe file which just unzips 200KB of binary...

Now, somebody can make a nice IDE with debugger and all (there might be already, actually), but it won't be official.

I attach to this message a .reg file to set up a file association for Lua: you have to edit it to point to the place where you unzipped the distribution, and to change the path to your favorite text editor (and perhaps change the parameter, eg. for printing).
Not super user-friendly, but handy.

Instead of typing

Lua5.1.exe ScriptName.lua param1 param2<Enter>

at the command line level to start a script, you just type

ScriptName.lua param1 param2<Enter>

Another trick: in the Environment Variables dialog (System Properties > Advanced tab), add the path of the Lua folder to the PATH variable, and ;.LUA to the PATHEXT variable. The later allows you type

ScriptName param1 param2<Enter>

(no extension), ie. Lua scripts will be similar to .exe or .bat or .cmd files.

Indeed, an install file can take care of all this, but it isn't so much hassle to do that (as long as you know the tricks, of course!), and Lua is very usable without all this, actually (eg. if you have the lua.exe in the same folder as your scripts).

> All help files tend to expect you to have a knowledge of
> your needs.

What you call help files are reference. Quite dry, often relying on a knowledge of C. Roberto's books are much easier for the beginner. And there are others. And some resources on Internet too.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --
ÿþWindows Registry Editor Version 5.00



[HKEY_CLASSES_ROOT\.lua]

@="luafile"

"PerceivedType"="text"



; Keep this if you want the Search function of Windows

; to look inside Lua scripts when searching a string inside the files.

[HKEY_CLASSES_ROOT\.lua\PersistentHandler]

@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"



; Keep this if you want a "Lua: program" item to appear in the Windows Explorer context menu > New... menu item.

; If you keep this section, put a Template.lua file in %WinDir%\ShellNew

[HKEY_CLASSES_ROOT\.lua\ShellNew]

"FileName"="Template.lua"



[HKEY_CLASSES_ROOT\luafile]

@="Lua : program"

"AlwaysShowExt"=""



[HKEY_CLASSES_ROOT\luafile\DefaultIcon]

@="C:\\PrgCmdLine\\lua5.1.exe,-1"



[HKEY_CLASSES_ROOT\luafile\shell\open]

@="Run script"



[HKEY_CLASSES_ROOT\luafile\shell\open\command]

@="\"C:\\PrgCmdLine\\lua5.1.exe\" \"%1\" %*"



[HKEY_CLASSES_ROOT\luafile\shell\edit]

@="Edit script"



[HKEY_CLASSES_ROOT\luafile\shell\edit\command]

@="\"C:\\Program Files\\_Text\\SciTE\\SciTE.exe\" \"%L\""



[HKEY_CLASSES_ROOT\luafile\shell\print]

@="Print script"



[HKEY_CLASSES_ROOT\luafile\shell\print\command]

@="\"C:\\Program Files\\_Text\\SciTE\\SciTE.exe\" /p \"%L\""



;-- Compile the script

[HKEY_CLASSES_ROOT\luafile\shell\Compile]

@="Compile script"



[HKEY_CLASSES_ROOT\luafile\shell\Compile\Command]

@="\"C:\\PrgCmdLine\\luac5.1.exe\" \"%1\""



; DropHandler, allowing to drag'n'drop a file on a script which takes its path as parameter

; It is the same handler as batfile... (.exe drop target)

[HKEY_CLASSES_ROOT\luafile\shellex\DropHandler]

@="{86C86720-42A0-1069-A2E8-08002B30309D}"