TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lemon – An embeddable, lightweight programming language in ANSI C

94 点作者 zhicheng超过 7 年前

21 条评论

wbhart超过 7 年前
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 未加载
robotresearcher超过 7 年前
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 未加载
geraldcombs超过 7 年前
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>
bpicolo超过 7 年前
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 未加载
ateesdalejr超过 7 年前
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?
jonathanstrange超过 7 年前
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 未加载
keithnz超过 7 年前
seems a bit similar to lua? So little information it&#x27;s hard to know what interesting things the language provides
4lch3m1st超过 7 年前
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.
nurettin超过 7 年前
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>
cestith超过 7 年前
&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.
nodefourtytwo超过 7 年前
What problem does it solve?
评论 #15549438 未加载
评论 #15552485 未加载
评论 #15549188 未加载
billytetrud超过 7 年前
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 未加载
maxpert超过 7 年前
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.
sesteel超过 7 年前
Looks like Python with curly braces. I assume the developer is also a python dev based on the comments in his code.
评论 #15551521 未加载
评论 #15551431 未加载
shortstuffsushi超过 7 年前
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 未加载
krylon超过 7 年前
The source code is very pleasant to read - both in terms of layout and variable names.
ateesdalejr超过 7 年前
Looks like the documentation website is down right now.
jlebrech超过 7 年前
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 未加载
singularity2001超过 7 年前
What a lemon
rubyfan超过 7 年前
Looks like a mashup of Ruby, JavaScript and tiny bit of Python.
评论 #15549029 未加载
otabdeveloper1超过 7 年前
&quot;Lemon – An embeddable, lightweight programming language in ANSI C that lacks documentation.&quot;<p>Uh, thanks for posting this strange link, I guess.