TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Sugar – a typed lispy language targeting webasm/wat

84 pointsby marksmillibendover 4 years ago

9 comments

foucover 4 years ago
TIL that there&#x27;s a format called wat, which means &quot;WebAssembly text format&quot; and it can be converted to wasm (and back to wat).<p>This format uses S-expressions like lisp, and it&#x27;s got a stack machine like forth. [1] [2]<p>I&#x27;m a bit surprised something so mainstream ended up being a lispy forth.<p>[1] <a href="https:&#x2F;&#x2F;ph1lter.bitbucket.io&#x2F;blog&#x2F;2020-12-03-webasm-forth-with-lisp-syntax.html" rel="nofollow">https:&#x2F;&#x2F;ph1lter.bitbucket.io&#x2F;blog&#x2F;2020-12-03-webasm-forth-wi...</a> [2] <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;WebAssembly&#x2F;Understanding_the_text_format" rel="nofollow">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;WebAssembly&#x2F;Underst...</a>
评论 #25330678 未加载
评论 #25330077 未加载
marksmillibendover 4 years ago
Sugar - a typed lispy language targeting webasm&#x2F;wat.<p>Compiler is incomplete but I have written some reasonably complex programs.<p>Interesting to read for the, very short, compiler.
robin-aover 4 years ago
I know WebAssembly language (WASM), as the thing Dfinity (<a href="https:&#x2F;&#x2F;sdk.dfinity.org&#x2F;docs&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;sdk.dfinity.org&#x2F;docs&#x2F;index.html</a>) uses. They have a nice language called Motoko (<a href="https:&#x2F;&#x2F;sdk.dfinity.org&#x2F;docs&#x2F;language-guide&#x2F;motoko.html" rel="nofollow">https:&#x2F;&#x2F;sdk.dfinity.org&#x2F;docs&#x2F;language-guide&#x2F;motoko.html</a>) I was playing with. But I like the idea of this kind of Lispy Forth.
valenterryover 4 years ago
I really like the power and flexibility of Lisps, but I am so much more productive with good(!) statical typesystems.<p>Looking at both typed racket and now sugar, it doesn&#x27;t look really good to me. I think I would rather decide to go straight for Haskell&#x2F;Scala&#x2F;... or Lisp&#x2F;Clojure. Maybe it&#x27;s not really possible to combine both in a good way _yet_, or maybe it&#x27;s not possible in general. I hope for the former.
评论 #25331459 未加载
galfarragemover 4 years ago
When I read about a new typed Lisp I always hope to see a Lisp with Haskell-like type annotations. Is this easily feasible? That would be real <i>sugar</i>.
评论 #25330594 未加载
评论 #25330636 未加载
评论 #25333936 未加载
评论 #25331107 未加载
chriszhangover 4 years ago
Will you say it is ok for a complete new person to lisp to learn sugar? Example is someone who has never learnt lisp in life?<p>Or will you recommend learning sugar after learning some other lisp?
评论 #25334995 未加载
评论 #25335178 未加载
评论 #25331633 未加载
评论 #25331134 未加载
camgunzover 4 years ago
Super interesting; bookmarked! Looking forward to more updates :)
评论 #25330505 未加载
Chris2048over 4 years ago
Any relations to sweetjs.org - &quot;Hygienic Macros for JavaScript&quot;?
tpoacherover 4 years ago
... WAT?