Mail Archives: geda-user/2015/02/07/17:19:55
On Saturday 07 February 2015 02.16:05 you wrote:
> I know. However, I think Lua's stack is designed to push/pop argument and
> return values of functions. What we want to do, is put the whole layout on
> the stack. Arguments and return values are few byte of data. The whole
> layout can be 10 megabytes.
I used lua in an embedded project to configure, controll (start different
threads, among others for CAN-comunication and relay controll) and deliver
scriptable webpages (similar to php). I found the language easy to learn yet
effective and expressive. I would welcome config files in lua.
I think to use a scriptable config system isn't a problem security wise. In
lua, you have the core and then add modules and funktions (like eg. an hex-
parser or a filesystem abstraction). The core itself has no posibility to break
out of the defined set of commands you add.
IMHO, lua would be more expressive, easier to learn and simply more powerfull
than "cryptic looking" scheme code. I also think personally, the usage of
scheme inhibits people to change the gEDA tools to their needs, as it looks
complicated (it certainly does to me).
I think it would be awesome to script the layout, but there is the problem of
storing it back in the file. What if you use a loop to generate a couple of
resistors in the file, parse it in gschem and the serialise it back? But on the
other hand, to use snippets of code to define the resistor (a function with an
argument of a table with x,y,refdes,footprint,etc and a list of commands to
render the symbol) and reuse it would be nice. It certainly would simplicate
the syntax of the layout file, as it would also contain a list of commands to
"render" the page. Then it would be possible to add multi page schematics to
one file, as a page is simply a list.
--
mit freundlichem Gruss
Christian Riggenbach
- Raw text -