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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The Pre-Scheme Restoration

201 点作者 nickmain11 个月前

16 条评论

JonChesterfield11 个月前
Fantastic news! This is a really interesting place in the design space and has come so close to being lost to history.<p>I believe the idea is essentially to write C semantics in scheme notation. Variables get marked with &#x27;u32&#x27; or similar instead of being implicit sum types of anything the language can represent, memory allocation is explicit instead of garbage collected. In itself that essentially means writing C syntax trees in prefix notation, which is probably an acquired taste.<p>However scheme also comes with the compile time macro layer and that lot runs just fine in pre-scheme, garbage collected and all, because it&#x27;s burned off before runtime anyway. Specifically, it&#x27;s wholly macro-expanded before compilation to C (or similar), which is the obvious lowering to use for execution.<p>Also scheme has tooling, so if you&#x27;re careful, the type annotated Cish syntax trees execute correctly as scheme, so you can debug the thing there, unit test it from scheme and so forth.<p>I <i>really</i> like it as a path to writing lisp runtimes in something that isn&#x27;t C since an alarming fraction of them turn out to have a C runtime library at the bottom of the stack. Also for writing other things that I tend to write in C, where it&#x27;s really the semantics I want and the syntax getting in the way.
评论 #40763129 未加载
评论 #40769682 未加载
评论 #40764840 未加载
paroneayea11 个月前
Pre-Scheme is an <i>incredible</i> piece of history, largely forgotten and lost to time outside of a very small group that knew about it. Live hackable at the REPL, and yet with static type inference (Hindley-Milner!), compiles to C, no GC? It&#x27;s something I&#x27;ve always wanted, and it <i>existed</i>, but it felt like one of those lost pieces of technology that was at risk of fading into the dustbin of history.<p>But no more! It&#x27;s so exciting that Andrew Whatson has begun reviving the project with such great enthusiasm and making it so that Pre-Scheme can run on top of a variety of Schemes. And it&#x27;s wonderful that NLnet has recognized how important this effort is. I think Pre-Scheme could play an interesting role alongside Zed and Rust, and indeed I know that Andrew plans to incorporate many of the newer ideas explored in those languages on top of Pre-Scheme eventually.<p>Go Pre-Scheme revival... I&#x27;m cheering it on, and can&#x27;t wait to use this stuff myself!
voidhorse11 个月前
<a href="https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp">https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp</a> is a recent attempt to create a similar language, but with a Rust-inspired borrow checker. though it looks like prescheme would end up being less dependent on C ultimately, this is another option in the space.
评论 #40764184 未加载
评论 #40750135 未加载
davexunit11 个月前
I am so excited for a Lispy systems language. Existing languages just don&#x27;t do it for me, though I think Zig is the closest to being what I&#x27;m into. So much good stuff in Scheme48. Glad the good ideas are being revived.
评论 #40750144 未加载
评论 #40768487 未加载
giraffe_lady11 个月前
Scheme with HM type system sounds fun. I&#x27;ve used ocaml a fair bit and I really find that the sweet spot for effectiveness of types vs arguing with the compiler. Racket and common lisp both have optional type systems but neither ever really clicked with me.
评论 #40749339 未加载
评论 #40765328 未加载
dang11 个月前
Related:<p><i>Pre-scheme: A Scheme dialect for systems programming (1997) [pdf]</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29725313">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=29725313</a> - Dec 2021 (12 comments)<p>(surprised there hasn&#x27;t been more)
roleks11 个月前
few days I&#x27;ve spent a few hours with prescheme, but was stopped in the end because there where gcc errors. I&#x27;ve felt a little guilty to have have spent some quite some time, but not have achieved anything. But thats the thing with Prescheme, so fascinating I could not resist. I mean look at its history, at all the cool and unique features. Anyway, very cool to read this news, I&#x27;m also a little relieved not to have burnt all this hours into nothings. Very glad to see the story continues.
ethagnawl11 个月前
&gt; On another front, the Guix project is a major force bringing new users to Scheme, providing <i>an unparalleled foundation</i> for free and reproducible computing.<p>The Nix&#x2F;OS folks might take exception. I&#x27;m guessing this is tongue-in-cheek but it belies the tone of the rest of the post.<p>In all seriousness, though, this is exciting from a modern, end-user&#x27;s vantage point and fascinating from an historical perspective.
评论 #40749425 未加载
troad11 个月前
This is very cool. I&#x27;ve added it to my RSS reader, can&#x27;t wait to see what comes of it.<p>Genuine question: would there be any advantages in targeting LLVM IR, rather than transpiling to C? With C being notoriously implementation dependent (down to things like the sizes of integer types), it seems like a messy target for something intended to be a sane systems language.
评论 #40765863 未加载
trealira11 个月前
According to the article: thanks to a grant from the NLnet foundation under the NGI Zero Core program, Pre-Scheme can continue to be developed. It&#x27;s supposed to be a C alternative. Currently, it compiles to C, has a Hindley Milner type system, macros, and it can run in a Scheme REPL. And they have a roadmap of features now.<p>This is pretty cool, and it&#x27;s generous of them to grant them funding, but (and I&#x27;m not trying to be rude) I wonder why they chose to give a grant for Pre-Scheme specifically. This seems only loosely related to the goals of the NGI Zero Core program (linked in the article):<p>&quot;The next generation internet initiative envisions the information age will be an era that brings out the best in all of us. We want to enable human potential, mobility and creativity at the largest possible scale – while dealing responsibly with our natural resources. In order to preserve and expand the European way of life, the programme helps shape a value-centric, human and inclusive Internet for all.&quot;<p>...<p>&quot;We want a more resilient, trustworthy and open internet. We want to empower end-users. Given the speed at which the &#x27;twin transition&#x27; is taking place, we need a greener internet and more sustainable services sooner rather than later. Neither will happen at global scale without protocol evolution, which — as the case of three decades of IPv6 introduction demonstrates — is extremely challenging. NGI0 Core is designed to push beyond the status quo and create a virtuous cycle of innovation through free and open source software, libre hardware and open standards. If we want everyone to use and benefit from the internet to its full potential without holding back, the internet must be built on strong and transparent technologies that allow for permissionless innovation and are equally accessible to all.&quot;
评论 #40738086 未加载
评论 #40795632 未加载
Y_Y11 个月前
NLNet is doing god&#x27;s work funding really cool projects that would have a very hard time justifying their existence to some mainstream donors.<p>I dream of some day soon running Emacs&#x2F;Guix&#x2F;Hurd on an open RISC-V chip and not having it be some flossy novelty but a genuine spiritual successor to Genera and the Lisp Machines.
a2code11 个月前
Tail-call optimization is very important when writing Scheme programs. By removing those, you loose the power of recursion.<p>Also when it comes to macros, does that include `syntax-rules` or `syntax-case` style macros, where the latter are much more powerful?<p>While an embedded Scheme-like language is incredibly useful, at some point I feel as if you would simply have to include these features, and to that end it would just be Scheme reinvented.
dg_meme11 个月前
Please don&#x27;t write &quot;thanks to a generous grant from the NLnet foundation under the NGI Zero Core program&quot;. The most of money comes from the European Commission through the Horizon Europe &#x2F; NGI funding schemes. NLNet is mainly the operator of the call.
评论 #40749263 未加载
tmtvl11 个月前
See also (kinda, maybe) c-mera: <a href="https:&#x2F;&#x2F;github.com&#x2F;kiselgra&#x2F;c-mera">https:&#x2F;&#x2F;github.com&#x2F;kiselgra&#x2F;c-mera</a>
hayley-patton11 个月前
The hell of the systems language is the systems, not that it has infix syntax.
评论 #40764346 未加载
评论 #40763594 未加载
评论 #40763185 未加载
评论 #40749212 未加载
pjc5011 个月前
A Hindley-Milner typed language with rigorous semantics for targeting native platforms? Amazing! Pity about the syntax.