lua-users home
lua-l archive

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


On 11/05/2011 14.46, steve donovan wrote:
On Wed, May 11, 2011 at 2:19 PM, Lorenzo Donati
<lorenzodonatibz@interfree.it>  wrote:
Well, I don't think sleeping a process for a given amount of time, or
detecting the title of the Windows of a running process or accessing
Window's registry can be defined "demanding". There are things that Lua
simply can't do without a C extension.

Very true. By 'direct' I meant LuaJIT-style FFI, as opposed to a
little extension for wrapping some common calls. I've used Alien for
that sometimes; there have been a couple of attempts to do WinAPI
bindings but no-one seems to agree on what 'everyone needs'. There's a
lot of functions in that API !  POSIX is a model of simplicity in
comparison. Although I'd say that a binding to the top one hundred
useful functions would go most of the way for console tools: window
and process management, enumerating resources, etc.


I heartily agree!
Funny that no smart programmer on this list has ever had such an itch to do any such binding. I wonder whether Lua is used so much on Windows. Or maybe everyone is happy with throwing in a couple of API calls specific for his/her project and be done with it.

Maybe lua-l could be used to do a survey of which are the "top 100 WinAPI functions" for Windows Lua programmers. Maybe then someone could start working on such a binding with a clear goal.

As for POSIX, I know it very little (I have almost no programming experience on *NIX systems at system level). I read something lately and I was considering trying UWIN + luaposix to see if I can work with POSIX with Lua on Windows. But I have not an extreme urge to do so, especially because I cannot judge if it is too much work for too little gain. Judging only on version number (5.something) luaposix seems very mature and stable. BTW does someone actually use this combination? I would appreciate some comments before committing to a time-wasting exercise.

Small GUI applications? Well, one of the things that can be done when
LuaJIT gets callbacks is the ability to run native Windows GUI
applications. It will be small and insanely fast compared to the big
packages, at the cost of portability. But I suppose we no longer care
about lean and mean that much anymore - unless in the embedded game,
of course.

The other way to get small self-contained GUI applications is to use
the browser as the UI, i.e. use a dinky little local webserver.

steve d.




Thanks for your interesting POVs and hints.

Cheers!
-- Lorenzo