News for hackers. Stuff that matters.
Re:Lemon – An embeddable, lightweight programming language i... by gvb on Wednesday October 25, 2017 @08:24AM (#15549438)
My guess is a lighter weight (than Lua, Python, JS) embed-able language. A quick build creates a .so that is bigger than lua as reported below, but that is a naive and probably invalid comparison metric.

    make DEBUG=0 STATIC=0 USE_MALLOC=0 MODULE_OS=1 MODULE_SOCKET=1

    ls -lh liblemon.so
    -rwxrwxr-x 1 guest guest 271K Oct 25 08:21 liblemon.so

"Lua - Smaller footprint than Python. e.g. Look at the size of python22.dll, 824kb. A basic Lua engine, including parser/compiler/interpreter, but excluding standard libraries, weighs in at under 100kb."

Ref: http://lua-users.org/wiki/LuaVersusPython

Re:Lemon – An embeddable, lightweight programming language i... by wahern on Wednesday October 25, 2017 @10:15PM (#15555857)
Except liblemon is larger than liblua.

  $ ls -lh /usr/lib/x86_64-linux-gnu/liblua5.3.so.0.0.0
  -rw-r--r-- 1 root root 219K Apr 13  2016 /usr/lib/x86_64-linux-gnu/liblua5.3.so.0.0.0
And that's with Lua having many more bindings--basically, all of ANSI C, including math and stdio interfaces. Lemon only seems to bind a dozen or so POSIX routines--see os.c and socket.c.

There are other things that make it less suited for embedding than Lua. For example, Lua very carefully avoids touching any global process state. But one the very first things lemon_create() does it call srandom().

Those particular things, at least, could be easily remedied. Another reason why Lua is great for embedding is because of it's very carefully designed C API. With just a cursory look I can't tell how well Lemon compares on that score.