TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lemon – An embeddable, lightweight programming language in ANSI C

94 pointsby zhichengover 7 years ago

21 comments

wbhartover 7 years ago
The documentation [1] appears to come from a very ordered mind. There&#x27;s something very appealing about simplicity.<p>I see more similarity with Python than either Java or C, except for the braces and semicolons.<p>The description says that everything is an object, even types, though there&#x27;s no way to specify types in the function prototypes so far, it seems. (Whilst that is what you would expect from a dynamically typed language, it can still be useful for optional type checking, or for later optimisation (AOT or Jit), or to make it easier to efficiently add methods for existing &quot;types&quot;.)<p>Actually, what I can&#x27;t quite see from the documentation is how one calls methods, whether it is necessary to put methods inside the classes, whether they dispatch only on the first argument or an implicit &quot;this&quot;, and how inheritance is handled.<p>So I guess this is all at a very early stage of development.<p>[1] <a href="http:&#x2F;&#x2F;www.lemon-lang.org&#x2F;documentation" rel="nofollow">http:&#x2F;&#x2F;www.lemon-lang.org&#x2F;documentation</a>
评论 #15550977 未加载
robotresearcherover 7 years ago
How about this link instead, since the GitHub page has no info about the language?<p><a href="http:&#x2F;&#x2F;www.lemon-lang.org" rel="nofollow">http:&#x2F;&#x2F;www.lemon-lang.org</a>
评论 #15551791 未加载
geraldcombsover 7 years ago
Not to be confused with SQLite&#x27;s Lemon parser generator:<p><a href="https:&#x2F;&#x2F;www.sqlite.org&#x2F;src&#x2F;doc&#x2F;trunk&#x2F;doc&#x2F;lemon.html" rel="nofollow">https:&#x2F;&#x2F;www.sqlite.org&#x2F;src&#x2F;doc&#x2F;trunk&#x2F;doc&#x2F;lemon.html</a>
bpicoloover 7 years ago
Why is the `var` keyword required in function arguments if it&#x27;s dynamically typed and there&#x27;s no other possible option?
评论 #15553136 未加载
评论 #15550738 未加载
ateesdalejrover 7 years ago
Nice seed for random number generation used here: <a href="https:&#x2F;&#x2F;github.com&#x2F;lemon-lang&#x2F;lemon&#x2F;blob&#x2F;9a0b3dbc854532b31f731a15f57365972d0cac73&#x2F;src&#x2F;lemon.c#L274" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lemon-lang&#x2F;lemon&#x2F;blob&#x2F;9a0b3dbc854532b31f7...</a> I&#x27;m not sure because I haven&#x27;t read very far yet but I wonder if the lemon standard lib allows lemon code to change the seed?
jonathanstrangeover 7 years ago
Went to the doc directory and got this:<p><i>TODO: Add Doc</i><p>Could developers please stop doing that? These &#x27;agile development&#x27; and &#x27;release early and often&#x27; mantras have really gone overboard.<p>Why would anybody use a programming language with zero documentation for anything? Are we supposed to guess the language and its features from a single five-line hello world program?
评论 #15549086 未加载
评论 #15549062 未加载
评论 #15551324 未加载
评论 #15549425 未加载
评论 #15550558 未加载
评论 #15551621 未加载
keithnzover 7 years ago
seems a bit similar to lua? So little information it&#x27;s hard to know what interesting things the language provides
4lch3m1stover 7 years ago
Not too much documentation nor examples there, right? However, the two test files and the documentation website immediately made me think about Python and Nim at the first glance. I might give it a try as an embeddable language, it looks promising.
nurettinover 7 years ago
Interesting optimizations:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;lemon-lang&#x2F;lemon&#x2F;blob&#x2F;master&#x2F;src&#x2F;peephole.c" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;lemon-lang&#x2F;lemon&#x2F;blob&#x2F;master&#x2F;src&#x2F;peephole...</a>
cestithover 7 years ago
&gt; TODO: Add Doc<p>It&#x27;s not a programming language if there&#x27;s no documentation. It&#x27;s just a compiler implementation for a dialect of something amorphous and ethereal.<p>That said, I kind of like the examples on <a href="http:&#x2F;&#x2F;www.lemon-lang.org&#x2F;documentation" rel="nofollow">http:&#x2F;&#x2F;www.lemon-lang.org&#x2F;documentation</a> and I wish the author(s) well in fleshing this out.
nodefourtytwoover 7 years ago
What problem does it solve?
评论 #15549438 未加载
评论 #15552485 未加载
评论 #15549188 未加载
billytetrudover 7 years ago
What&#x27;s the motivation for this language? It seems like Javascript with destructuring assignment, named function parameters, and a few miner quirks (like sentinal)
评论 #15553737 未加载
评论 #15553948 未加载
maxpertover 7 years ago
Interesting mixture of C&#x2F;C++, Python (__init__) and Javaish. Has no package manager (atleast I can’t see one).<p>Would like to see how it compares against Lua in performance.
sesteelover 7 years ago
Looks like Python with curly braces. I assume the developer is also a python dev based on the comments in his code.
评论 #15551521 未加载
评论 #15551431 未加载
shortstuffsushiover 7 years ago
I&#x27;m seeing in the source that the author prefers<p>type<p>methodName(args...)<p>Is this a common C-ism? I&#x27;m not familiar with this code style.
评论 #15550236 未加载
评论 #15550263 未加载
评论 #15550286 未加载
krylonover 7 years ago
The source code is very pleasant to read - both in terms of layout and variable names.
ateesdalejrover 7 years ago
Looks like the documentation website is down right now.
jlebrechover 7 years ago
i&#x27;d like to see an embedded language designed to not have OO, and for the host system&#x2F;language to handle the objects. I guess Lua 5.2 kinda fulfills that.
评论 #15549717 未加载
singularity2001over 7 years ago
What a lemon
rubyfanover 7 years ago
Looks like a mashup of Ruby, JavaScript and tiny bit of Python.
评论 #15549029 未加载
otabdeveloper1over 7 years ago
&quot;Lemon – An embeddable, lightweight programming language in ANSI C that lacks documentation.&quot;<p>Uh, thanks for posting this strange link, I guess.