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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Stem, a stack-based language with metaprogramming and a C FLI

105 点作者 GalaxyNova超过 1 年前

9 条评论

spindle超过 1 年前
Some other stack languages (not all of these concatenative languages use a single stack but most of them do):<p><a href="https:&#x2F;&#x2F;concatenative.org&#x2F;wiki&#x2F;view&#x2F;Concatenative%20language" rel="nofollow">https:&#x2F;&#x2F;concatenative.org&#x2F;wiki&#x2F;view&#x2F;Concatenative%20language</a>
transfire超过 1 年前
A similar language that’s been worked on for a while now is [Min](<a href="https:&#x2F;&#x2F;min-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;min-lang.org&#x2F;</a>). Interestingly it is written in Nim.<p>I was interested in the C interface part but it never got there. :(
评论 #39153524 未加载
评论 #39152870 未加载
评论 #39152816 未加载
ret2pop超过 1 年前
really cool project! (I am definitely not the person who made this)
评论 #39151386 未加载
评论 #39176549 未加载
James_K超过 1 年前
I&#x27;ve never really understood stack based languages. Getting rid of variables only seems make things harder, and you always inevitably need some kind of control flow that isn&#x27;t stack based (for instance the pair &quot;[&quot; and &quot;]&quot;). In this case, I suppose the advantage is that the stack is shared with C so it&#x27;s easier to interact over FFI.<p>From what I&#x27;ve seen of other forths, I much prefer how this one does things. Using quoting as a sort of lambda is much nicer and more consistent than the weird compilation semantics you see in stuff like GForth.
评论 #39155954 未加载
评论 #39157357 未加载
评论 #39161087 未加载
ColonelPhantom超过 1 年前
Are there any practical and somewhat popular stack-based&#x2F;concatenative languages? &#x27;Popular&#x27; here doesn&#x27;t need to mean that popular, something on a similar usage level to some Lisp dialects, or functional languages like Haskell.
评论 #39160797 未加载
travisgriggs超过 1 年前
I think it’s cute&#x2F;ironic that the first word the document introduces you to is “.” Which in normal English is something we used to separate runs of words.
评论 #39155900 未加载
评论 #39156870 未加载
msla超过 1 年前
What&#x27;s the difference between an FLI and an FFI?
评论 #39152501 未加载
评论 #39155387 未加载
评论 #39160602 未加载
brezelgoring超过 1 年前
I have no comments on the project itself, which I’m sure is very nice. If you’re taking suggestions, the mobile web view unfortunately captures 75% of the viewport on the side menu, it’d be nice if it were collapsible or flexible.<p>Keep on keeping on!
评论 #39152036 未加载
评论 #39151642 未加载
FwarkALark超过 1 年前
Is there a language which is not stack-based? I imagine &quot;concatenative&quot; would be mildly more precise of a description.<p>Coroutines (which often carry their own stacks) can sort-of dodge stacks—effectively utilizing a sort of bespoke linear typing to avoid this—but I don&#x27;t know of a language which doesn&#x27;t have c-like, stack-based procedures or subroutines, which places arguments on the stack and registers and operates mostly with respect to that stack and foreign API calls.<p>A stack is certainly the most intuitive data-structure with which to implement a lambda calculus.<p>Really, what Forth and descendent languages seem to emphasize is a sort of a data-oriented execution rather than a symbol-oriented execution—C very much encourages you to name types, function signatures, etc, and the result if you don&#x27;t is extremely difficult to parse and interpret manually, even if you can implement forth as a subset of C.<p>Forth emphasizes reasoning about the stack directly as data, seemingly forgoing any assistance outside of syntax. Arguably it forgoes the utility of syntax, too.
评论 #39152832 未加载
评论 #39158698 未加载
评论 #39153835 未加载
评论 #39157599 未加载
评论 #39152795 未加载
评论 #39152938 未加载