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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

A Lisp based programming language I'm creating

24 点作者 rogcg大约 13 年前

8 条评论

fusiongyro大约 13 年前
I'm looking at Prog1.px et. al. If you format your Lisp code this way, the Lisp community is not likely to take your project very seriously.
评论 #3849077 未加载
评论 #3849517 未加载
jimmy2times大约 13 年前
I also toyed with my own Lisp[1] a few weeks ago, after being inspired by Peter Norvig's Lispy[2]. It's an interpreter though, and written in C++. I mixed together features from different languages (eager/lazy evaluation, call-by-value/reference, macros). It was very instructive and a lot of fun!<p>[1] <a href="https://github.com/apresta/lime" rel="nofollow">https://github.com/apresta/lime</a><p>[2] <a href="http://norvig.com/lispy.html" rel="nofollow">http://norvig.com/lispy.html</a>
krollew大约 13 年前
Well. This language seems to be senseless. It looks like all those parenthesis are there to make language look like Lisp. Well, I'd grade Lispness of this code as totaly non-Lisp like. Far more interesting would be atempt to create C-looking functional language that could look like that:<p><pre><code> define( fact, ( n ), function( cond( ( n = 0 || n = 1, 1 ) ( n &#62; 1, n * fact(n-1) ) ) ) print( fact( 5 ) ) </code></pre> I think I'd try to program in language like that. Lisp way of thinking, but parenthesis are bit more helpful and there are "normaly" used operators which makes language bit more readable. Your project looks like another purely academic example. I think purely academic examples sucks because don't teach people to do what is actualy needed.<p>I didn't read your code carefully, but "endles" elsif chains looks terrible and I think there shouldn't be stuff like that in tutorial project. Moreover I believe java isn't good tool for that purpouse( another nobody seems to teach ). I'd use flex and bison or perl if you realy want to implement lexical analisis yourself..
评论 #3866721 未加载
评论 #3852320 未加载
evincarofautumn大约 13 年前
Could be better, could be worse. The implementation definitely needs a bit of love, yet I think this project could turn out to be rather useful. I guess I see it not as a low-level Lisp, but as a Lispy high-level assembly. Applying Lisp macros to assembly generation seems like a pretty natural thing, similar to Forth in a way. Instead of trying to make high-level stuff efficient, just make low-level stuff easy.
gliese1337大约 13 年前
Neat! I just started playing around with the implementation of another Lisp-inspired language I've been thinking about for a while now (<a href="https://github.com/gliese1337/vernal-lang" rel="nofollow">https://github.com/gliese1337/vernal-lang</a>); I suspect this could turn out to be a really useful reference for implementing the compiler (not to mention inspiring me to steal features).
juliangamble大约 13 年前
Just pointing out that this is pretty much the dead centre of the Hacker News interest group - if you join the dots.<p>This is all about the combination of<p>(a) the 0x10c compiler writing <a href="http://0x10c.com/" rel="nofollow">http://0x10c.com/</a> (assembler project), (had many hacker news posts) and<p>(b) Abdulaziz Ghuloum's An Incremental Approach to Compiler Construction <a href="http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf" rel="nofollow">http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf</a> (which has had about two separate Hacker News posts):
kruhft大约 13 年前
This is similar to something that I've been working on called sxc (S-Expression C). I'm not sure what language he's writing it in, but without a powerful macro language that can manipulate the s-expressions/lists the lisp syntax is just cosmetic.
rogcg大约 13 年前
IMO, I believe that for a good programming language to exist, the power is on its grammar. Of course we can choose the wisest syntaxes, and the best technologies to build it, but the kernel of the language is on its grammar.<p>That's my opinion.