What's the motivation for this language? It seems like Javascript with destructuring assignment, named function parameters, and a few miner quirks (like sentinal)
Lemon – An embeddable, lightweight programming language in ANSI C
61–70 of 71 posts
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#62What's the motivation for this language? It seems like Javascript with destructuring assignment, named function parameters, and a few miner quirks (like sentinal)
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#63Earlier quoted context omitted.
GNU style. https://en.m.wikipedia.org/wiki/GNU_coding_standards
GNU style is mostly about the funny and ugly indentation of braces. Return type on separate line is shared by many other coding styles.
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#64Earlier quoted context omitted.
I guess you're referring to this[1]. I'd actually call that usage svelte. The macro is undefined not far after it's use in the file, and makes the section it's in far more readable. [1] https://github.com/lemon-lang/lemon/blob/9a0b3dbc854532b31f7...
Why does it have the do-while(0)?
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#65Earlier quoted context omitted.
> So I guess this is all at a very early stage of development. That should be the top link
Submitters here have developed a truly odd habit of posting a github link when a project has a site with actual documentation. And then, we get random, angry posters (visible elsewhere on this page) who don't notice the link to the actual site at the top of the github page.
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#66Earlier quoted context omitted.
> Why would anybody use a programming language with zero documentation for anything? Why would you write documentation if your language implementation is still rapidly evolving?
You should write the documentation first . Otherwise what are you writing?
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#67What problem does it solve?
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, 82…
$ 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.
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#68Earlier quoted context omitted.
> Why would anybody use a programming language with zero documentation for anything? Why would you write documentation if your language implementation is still rapidly evolving?
You should write the documentation first . Otherwise what are you writing?
Re: Lemon – An embeddable, lightweight programming language in ANSI C
#69Re: Lemon – An embeddable, lightweight programming language in ANSI C
#70Earlier quoted context omitted.
I'm a language geek and none of the above is what I want to see when I read about a new language. What I want to know is, what does this language offer that no other language does? What platform it runs on or whatnot is trivial boring detail that I might want to know afterwards if the language offers something interesting to try out.
>What platform it runs on or whatnot is trivial boring detail Not caring about actual usage mechanics / acting like they are trivial details makes me question a lot about your perspective.
Language Y has some really innovative features that no other languages are currently doing. There is currently no reference implementation.
Which of these is the more interesting one to a language geek? The former might be more interesting to a "platform A" geek. Or someone who uses platform A in production.
The perspective is being interested in language design rather than "the next big thing". A language that doesn't change the way you think about programming is not worth learning, because you're only re-learning what you already know. In fact, learning such language is trivial and all you really need is a grammar reference from which you can deduce the rest. If it runs on platform A which you're familiar with, you can take advantage of platform A's libraries and become productive in X in no time.