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.

Show HN: Dak – a Lisp-like language that transpiles to JavaScript

94 pointsby daakusabout 2 years ago
Hi HN, author here. Happy to answer any questions.<p>I had an itch to make a lisp like language that was a thin layer on top JavaScript. Something that could leverage the thriving ecosystem that exists around JavaScript. It&#x27;s brittle, hot off the oven.<p>Besides being a fan of parenthesis, I think macros fill in a gap that the JavaScript ecosystem today fills in with one-off compilers, bundler plugins and such. Macros can&#x27;t do everything, but for example I think they have the potential to enable things like JSX, Solid and Svelte style libraries.<p>Take the tour to get a feel for what it can do and play with the live code in your browser!

9 comments

orestisabout 2 years ago
Interesting, in the CLJS space we recently got two new libraries in this space:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;squint-cljs&#x2F;squint">https:&#x2F;&#x2F;github.com&#x2F;squint-cljs&#x2F;squint</a> Which is a thin layer on top of JS<p><a href="https:&#x2F;&#x2F;github.com&#x2F;squint-cljs&#x2F;cherry">https:&#x2F;&#x2F;github.com&#x2F;squint-cljs&#x2F;cherry</a> Which is closer to CLJS semantics and data structures but compiles to .mjs files without any advanced optimizations etc.
评论 #34978787 未加载
hackrnusrabout 2 years ago
Looks interesting. I hope to start using an s-expression based version of javascript after I get more familiar with the latter.<p>Maybe you also want to consider comparing Dak to other attempts in this direction in order to help generate more interest in your work:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;anko&#x2F;eslisp&#x2F;blob&#x2F;master&#x2F;doc&#x2F;comparison-to-other-js-lisps.markdown">https:&#x2F;&#x2F;github.com&#x2F;anko&#x2F;eslisp&#x2F;blob&#x2F;master&#x2F;doc&#x2F;comparison-to...</a>
评论 #34965144 未加载
rileyphoneabout 2 years ago
I&#x27;m enjoying reading your transpiler[0], especially how well you use generator functions. Currently I&#x27;m building a similar language in a more opinionated object-oriented style, yet I still find yours inspiring.<p>0. <a href="https:&#x2F;&#x2F;github.com&#x2F;daaku&#x2F;dak&#x2F;blob&#x2F;main&#x2F;packages&#x2F;transpiler&#x2F;src&#x2F;transpiler.mjs">https:&#x2F;&#x2F;github.com&#x2F;daaku&#x2F;dak&#x2F;blob&#x2F;main&#x2F;packages&#x2F;transpiler&#x2F;s...</a>
评论 #34978800 未加载
dunhamabout 2 years ago
Nice work. A few years ago, I made something similar out of lumen[0] by tweaking the reader to support clojure style literals. I used hyperapp[1] as a lightweight library for react&#x2F;elm style applications with a hiccup-like syntax. The code ended up looking like<p><pre><code> (h &#x27;div { class: &#x27;main } (h &#x27;div {} .... </code></pre> Where h is the raw function for hyperapp, not a macro.<p>I&#x27;d intended to develop my own mini-lisp with the same syntax, but got sidetracked by other projects. Maybe someday I&#x27;ll get back to it. (Currently, I&#x27;m deep in the weeds trying to learn how to write a dependent typed language that compiles to javascript.)<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;sctb&#x2F;lumen">https:&#x2F;&#x2F;github.com&#x2F;sctb&#x2F;lumen</a> [1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;jorgebucaran&#x2F;hyperapp">https:&#x2F;&#x2F;github.com&#x2F;jorgebucaran&#x2F;hyperapp</a>
评论 #34978832 未加载
inglorabout 2 years ago
Maybe dumb question since I only have experience with a few lisps (Common Lisp, clojure and scheme) but why is this “lisp like” and not a “proper” lisp?<p>It looks like a lisp for me with its “code is data” (homoiconic) bit and s expressions.
评论 #34975938 未加载
daliwaliabout 2 years ago
Really reminds me of Parenscript[0], which is a subset of Common Lisp that transpiles to JS with no runtime. It&#x27;s basically a thin skin around JS and it feels more like writing JS with a Lisp syntax.<p>What I feel is missing from Parenscript is runtime macro-expansion, hard to do without using JS to build the AST.<p>[0] <a href="https:&#x2F;&#x2F;parenscript.common-lisp.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;parenscript.common-lisp.dev&#x2F;</a>
评论 #34982133 未加载
cellularmitosisabout 2 years ago
Neat. So in a single sentence, you could say &quot;As Janet is to Clojure, Dak is to ClojureScript&quot;.
fuzzythinkerabout 2 years ago
Hmm, name is a bit too close to another language - darklang
评论 #34978137 未加载
phist_mcgeeabout 2 years ago
In Australian slang, to da(c)k someone is to pull their pants down to humiliate them.