[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-zile] Nested buffers
From: |
Gary V. Vaughan |
Subject: |
Re: [Bug-zile] Nested buffers |
Date: |
Tue, 4 Feb 2014 10:10:24 +1300 |
Hi Reuben,
On Feb 4, 2014, at 3:23 AM, Reuben Thomas <address@hidden> wrote:
> Also note that Lisp's (unnumbered) lists (also available in JSON, of course)
> are a more natural match to real "lists" than Lua's tables in array mode;
> doing real linked lists in Lua is both ugly and inefficient. (Possibly worth
> thinking about a tiny C module to do it properly?)
While I digest and consider the rest of these two recent posts, I thought I'd
jump in on just this wee bit here right away...
A couple of things I'm working on already have some bearing on this:
1. my sexpr project on github, is a proper lisp interpreter, aiming towards
becoming a lisp->Lua compiler. I'm close to the point where I'll be timing Riki
Lake's tuple implementation (on the Splay Ropes page of the lua wiki) and use
of 2 Alien buffers for car and cdr of a cons cell (cell 42 would have it's car
in cars[42] and cdr in cdrs[42]), to speed up lisp cons operations. I expect to
replace the toy lisp engine in zmacs with sexpr soon enough too.
2. my larch project on GitHub (we discussed previously in the context of
bundling Lua applications) has plans to add source mapping, so that error
messages refer to the original files rather than the sumo bundled up source,
but more importantly in this context, that opens the door to moving the very
optimized luasrcdiet code I wrote when I was fiddling with lua build tools - so
one can ship a shell script that has extremely compacted lua interpreter
sources, C modules and Lua modules all bundled into one file, which, when
executed, extracts and compiles itself into a custom Lua with C and Lua modules
preloaded. Eventually zmacs could ship like that, as a platform independent
self compiling single file, with C code for cons lists and other optimisations.
Cheers,
--
Gary V. Vaughan (gary AT vaughan DOT pe)
Re: [Bug-zile] Nested buffers, Gary V. Vaughan, 2014/02/05