[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [CGILua] State persistent table
- From: Javier Guerra <javier@...>
- Date: Sat, 11 Dec 2004 08:19:30 -0500
On Monday 06 December 2004 5:36 am, Tomas wrote:
> We are proposing the creation of a persistent table, associated with each
> Lua state of the launchers. This table is created in the original launcher
> environment and heird by the VEnv mechanism. To allow the access to the
> table a simple get/set API is provided. The code follows:
>
> module (arg and arg[1] or "stable")
> local persistent_table = {}
> function get (i) return persistent_table[i] end
> function set (i, v) persistent_table[i] = v end
i had thought about something like this, and certainly covers most of the
needs. maybe another implementation for oldCGI (using hard disk or something
else) would be nice, but that's another issue.
my main wish still missing would be the 'function URLs'. That way, it would
be easy to treat some URLs as RPCs.
ultimately, i'd like to do something like tica:tk (www.ticatk.com), but less
heavyweight. for that it would be great to have a runtime that fully
persists across http requests.
imagine writing code like this:
win = window.new (x,y,w,h)
in = field.new (win)
ok = butt.new (win, function (event) win.hide() end)
while win.isvisible() do
ev= window.getevent ()
end
instring = in.getstring ()
win.destroy()
and having the user interface remotely visible using just any javascript
compatible browser. it's certainly possible using coroutines and a full
cross-request persistence.
unfortunately, i have just started another short-deadline project, so i'm back
to php...
--
Javier
Attachment:
pgpBWL2_M0JG2.pgp
Description: PGP signature