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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Self-hosted stack-based programming language

86 点作者 Drahflow将近 10 年前

8 条评论

AlexDanger将近 10 年前
I'm always impressed with people who invent things like this. Well done. It inspires me to push my own skills, particularly when things get complacent at work.
jdmichal将近 10 年前
I find the differing syntax between function and variable storage to be interesting. Is there any particular reason these aren&#x27;t unified? Assuming anything in brackets is a first-class &quot;function&quot; object, something like this should be possible:<p><pre><code> 2 &#x2F;two define { two add } &#x2F;addTwo define</code></pre>
评论 #9796783 未加载
评论 #9795930 未加载
Drahflow将近 10 年前
The README claims easy Domain-specific-language creation. Here is a concrete example how code which utilizes these features looks like: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;Drahflow&#x2F;c463717d5c72e114ac63" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;Drahflow&#x2F;c463717d5c72e114ac63</a>
评论 #9795695 未加载
r4pha将近 10 年前
I also started toying around with a stack-based language [0]. It&#x27;s surprisingly fun!<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;rbaron&#x2F;stacky" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rbaron&#x2F;stacky</a>
jerf将近 10 年前
&quot;Just because I&#x27;m not following the true path, doesn&#x27;t mean I can&#x27;t get it to work.&quot;<p>I have to ask: Is that basically self-targeted snark about how you&#x27;re not doing this with Lisp?<p>I hope so, because I got a good belly laugh out of that interpretation.
评论 #9796771 未加载
CamTin将近 10 年前
This is great, and I&#x27;ll definitely be playing with this tomorrow.<p>I also can&#x27;t seem to stop myself going off half-cocked and writing language interpreters[1][2] and virtual machines[3]. It&#x27;s really quite addictive, and gives you a &quot;I really made something&quot; feeling that a new backup script or CRUD app doesn&#x27;t quite provide.<p>I too actually started off writing a stack&#x2F;RPN-style language for the exact reason that I didn&#x27;t want to do a proper parser, but then realized that, for properly recursive structures like in Joy[4], it really makes it easier to just write a parser. And it turns out that a recursive descent parser really isn&#x27;t that difficult, conceptually, once you spend the brain-time to work one out yourself[5]. Like most things programmatic, it&#x27;s tough to wrap your mind around until you&#x27;ve done it once, then it&#x27;s just a matter a typing and bugfixing.<p>Along with the aforementioned Joy (which is a stunningly elegant language), some other languages I find inspiring are rhoScript (<a href="http:&#x2F;&#x2F;www.rhoscript.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.rhoscript.com&#x2F;</a>), Pico Lisp (<a href="http:&#x2F;&#x2F;picolisp.com&#x2F;wiki&#x2F;?home" rel="nofollow">http:&#x2F;&#x2F;picolisp.com&#x2F;wiki&#x2F;?home</a>), and the very clever WadC editor (<a href="http:&#x2F;&#x2F;strlen.com&#x2F;wadc-editor" rel="nofollow">http:&#x2F;&#x2F;strlen.com&#x2F;wadc-editor</a>), which implements a DSL and interactive environment for describing Doom levels in code, rather than by dragging vertices in a purely graphical editor (This isn&#x27;t as crazy as it sounds if you&#x27;re unfamiliar with the limitations of Doom levels, since they are constrained to certain types of simplified geometry that lend themselves well to this).<p>In short, keep it up! I&#x27;ve never had to use any of these skills in my day-to-day work (I&#x27;m not even a professional developer, though I&#x27;d like to be.) but it&#x27;s still a heck of a lot of fun to play around with.<p>[1] <a href="http:&#x2F;&#x2F;billipede.net&#x2F;2014&#x2F;03&#x2F;30&#x2F;reverse-polish-cowgirl.html" rel="nofollow">http:&#x2F;&#x2F;billipede.net&#x2F;2014&#x2F;03&#x2F;30&#x2F;reverse-polish-cowgirl.html</a> [2] <a href="http:&#x2F;&#x2F;billipede.net&#x2F;2015&#x2F;05&#x2F;09&#x2F;dawn.html" rel="nofollow">http:&#x2F;&#x2F;billipede.net&#x2F;2015&#x2F;05&#x2F;09&#x2F;dawn.html</a> [3] <a href="http:&#x2F;&#x2F;billipede.net&#x2F;2014&#x2F;06&#x2F;05&#x2F;bedrock.html" rel="nofollow">http:&#x2F;&#x2F;billipede.net&#x2F;2014&#x2F;06&#x2F;05&#x2F;bedrock.html</a> [4] <a href="http:&#x2F;&#x2F;www.latrobe.edu.au&#x2F;humanities&#x2F;research&#x2F;research-projects&#x2F;past-projects&#x2F;joy-programming-language" rel="nofollow">http:&#x2F;&#x2F;www.latrobe.edu.au&#x2F;humanities&#x2F;research&#x2F;research-proje...</a> [5] <a href="http:&#x2F;&#x2F;billipede.net&#x2F;2015&#x2F;02&#x2F;14&#x2F;lets-write-a-parser.html" rel="nofollow">http:&#x2F;&#x2F;billipede.net&#x2F;2015&#x2F;02&#x2F;14&#x2F;lets-write-a-parser.html</a>
mud_dauber将近 10 年前
Any chance that this is inspired by Forth?
评论 #9795624 未加载
jetpm将近 10 年前
Can I do this with strings as well?<p>&quot;tsch&quot; ==pa<p>pa dump<p># &quot;tsch&quot;
评论 #9808380 未加载