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'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'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!
Interesting, in the CLJS space we recently got two new libraries in this space:<p><a href="https://github.com/squint-cljs/squint">https://github.com/squint-cljs/squint</a> Which is a thin layer on top of JS<p><a href="https://github.com/squint-cljs/cherry">https://github.com/squint-cljs/cherry</a> Which is closer to CLJS semantics and data structures but compiles to .mjs files without any advanced optimizations etc.
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://github.com/anko/eslisp/blob/master/doc/comparison-to-other-js-lisps.markdown">https://github.com/anko/eslisp/blob/master/doc/comparison-to...</a>
I'm enjoying reading your transpiler[0], especially how well you use generator functions. Currently I'm building a similar language in a more opinionated object-oriented style, yet I still find yours inspiring.<p>0. <a href="https://github.com/daaku/dak/blob/main/packages/transpiler/src/transpiler.mjs">https://github.com/daaku/dak/blob/main/packages/transpiler/s...</a>
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/elm style applications with a hiccup-like syntax. The code ended up looking like<p><pre><code> (h 'div { class: 'main }
(h 'div {} ....
</code></pre>
Where h is the raw function for hyperapp, not a macro.<p>I'd intended to develop my own mini-lisp with the same syntax, but got sidetracked by other projects. Maybe someday I'll get back to it. (Currently, I'm deep in the weeds trying to learn how to write a dependent typed language that compiles to javascript.)<p>[0]: <a href="https://github.com/sctb/lumen">https://github.com/sctb/lumen</a>
[1]: <a href="https://github.com/jorgebucaran/hyperapp">https://github.com/jorgebucaran/hyperapp</a>
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.
Really reminds me of Parenscript[0], which is a subset of Common Lisp that transpiles to JS with no runtime. It'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://parenscript.common-lisp.dev/" rel="nofollow">https://parenscript.common-lisp.dev/</a>