Live data from Hacker News

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

daklang.com

1–10 of 24 posts

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

#1
Hi HN, author here. Happy to answer any questions.

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.

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.

Take the tour to get a feel for what it can do and play with the live code in your browser!

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

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

#3
Looks interesting. I hope to start using an s-expression based version of javascript after I get more familiar with the latter.

Maybe you also want to consider comparing Dak to other attempts in this direction in order to help generate more interest in your work:

https://github.com/anko/eslisp/blob/master/doc/comparison-to...

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

#4

Looks interesting. I hope to start using an s-expression based version of javascript after I get more familiar with the latter. Maybe you also want to consider comparing Dak to other attempts in this direction in order to help generate more interest in your work: https://github.com/anko/eslisp/blob/master/doc/comparison-to...

Thanks for the feedback. I'll add some notes comparing it with other attempts like you suggested.

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

#5
Interesting, in the CLJS space we recently got two new libraries in this space:

https://github.com/squint-cljs/squint Which is a thin layer on top of JS

https://github.com/squint-cljs/cherry Which is closer to CLJS semantics and data structures but compiles to .mjs files without any advanced optimizations etc.

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

#6
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?

It looks like a lisp for me with its “code is data” (homoiconic) bit and s expressions.

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

#7
post #6

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? It looks like a lisp for me with its “code is data” (homoiconic) bit and s expressions.

Describing stuff as Lisp-like is a good way to sidestep arguments about "proper" Lisp.

What even is a proper Lisp? http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptab...

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

#8
post #6

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? It looks like a lisp for me with its “code is data” (homoiconic) bit and s expressions.

Describing stuff as Lisp-like is a good way to sidestep arguments about "proper" Lisp. What even is a proper Lisp? http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptab...

Huh it's orthogonal but basically Clojure is an attempt to answer all those four problems, right? Bypassing the which LISP problem by canonical implementation on top of host VMs (of which there are JVM, CLR, JS, Dart and BEAM), bypassing the spec, bypassing the whole object-oriented problem by impure functional approach, and having a BDFL on the top.

Anyway, back to the main point, thank you for the article. I'll try to play around with Dak later today and see if I can use it to do something fun. Play is better to learn something after all.

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

#9
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

    (h 'div { class: 'main }
       (h 'div {} ....
Where h is the raw function for hyperapp, not a macro.

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.)

[0]: https://github.com/sctb/lumen [1]: https://github.com/jorgebucaran/hyperapp

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

#10
post #6

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? It looks like a lisp for me with its “code is data” (homoiconic) bit and s expressions.

Describing stuff as Lisp-like is a good way to sidestep arguments about "proper" Lisp. What even is a proper Lisp? http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptab...

I've enjoyed defending the claim that Perl5 is a Lisp, just instead of being a Lisp-1 or Lisp-2 it's a Lisp-5ish.
Post reply on HN