← Back to team overview

kicad-developers team mailing list archive

Re: Kicad + V8/NodeJS/Swig [split from kicad ideas mail]


Hehe, that can be another option, yeah!,

   I've worked with lua before, tuned the garbage collector to work in
deeply embedded devices (under 32kB of RAM) and
wrapped some libs by hand:

   I think Javascript is incredibly more versatile, widely adopted, and
easy to program (also has already a couple of debuggers that can connect to
the V8 lib and debug set by step very easily).

   But, in the other hand the wx wrappers, I/O libraries, and default
support in swig, could finally make it a better candidate. It seems like a
cleaner path, may be less versatile, but cleaner at least. May be we should
walk our first path this way.

   What do you think Dick?

2012/2/24 Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>

> On 02/24/2012 08:54 AM, Miguel Angel Ajo Pelayo wrote:
>> Ok, I changed the topic of this thread, to match the discussion, which is
>> about making Kicad fully scriptable in Javascript.
>> For speed reasons, and wide adoption, it seems that V8 must be our
>> preferred engine.
> Hi Miguel,
> Did you consider using Lua as an alternative to JS? I've seen lots of
> applications scripted in Lua, but not too many using JS, A****m Designer
> being a notable example. There are a few reasons to adopt it:
> - It's extremely small: JIT VM is ~400 kB DLL/DSO with zero external
> dependencies,
> - provides integrated I/O libraries - there's no need for additional
> frameworks in the middle, like NodeJS,
> - beats every other VMed/interpreted language at execution speed. At
> certain benchmarks, it outperforms V8 by an order of magnitude,
> - works out-of-the box with SWIG and other wrapper generators,
> - integrates nicely with wxWidgets (http://wxlua.sourceforge.net/**),
> facilitating easy GUI development for scripts.
> I'm not claiming that Lua should be the only scripting language available
> in Kicad, but it's certainly got some advantages over the rest :)
> Regards,
> Tom


Miguel Angel Ajo Pelayo
+34 636 52 25 69
skype: ajoajoajo

Follow ups