Live data from Hacker News

Sugar – a typed lispy language targeting webasm/wat

ph1lter.bitbucket.io

11–20 of 28 posts

Re: Sugar – a typed lispy language targeting webasm/wat

#11
post #3

TIL that there's a format called wat, which means "WebAssembly text format" and it can be converted to wasm (and back to wat). This format uses S-expressions like lisp, and it's got a stack machine like forth. [1] [2] I'm a bit surprised something so mainstream ended up being a lispy forth. [1] https://ph1lter.bitbucket.io/blog/2020-12-03-webasm-forth-wi... [2] https://developer.mozilla.org/en-US/docs/WebAssembly/Und…

In case you're not aware, I believe that web assembly is a stack based language.

You may be interested to read this, which talks about a proposal to add additional stack instructions: https://github.com/WebAssembly/design/issues/1381

Re: Sugar – a typed lispy language targeting webasm/wat

#14

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? Or will you recommend learning sugar after learning some other lisp?

Not OP, I've only written a tiny bit of lisp, but this looks pretty similar.

I'd probably suggest SICP: https://mitpress.mit.edu/sites/default/files/sicp/index.html if you want a "lisp intro"

Re: Sugar – a typed lispy language targeting webasm/wat

#15
I really like the power and flexibility of Lisps, but I am so much more productive with good(!) statical typesystems.

Looking at both typed racket and now sugar, it doesn't look really good to me. I think I would rather decide to go straight for Haskell/Scala/... or Lisp/Clojure. Maybe it's not really possible to combine both in a good way _yet_, or maybe it's not possible in general. I hope for the former.

Re: Sugar – a typed lispy language targeting webasm/wat

#16

I really like the power and flexibility of Lisps, but I am so much more productive with good(!) statical typesystems. Looking at both typed racket and now sugar, it doesn't look really good to me. I think I would rather decide to go straight for Haskell/Scala/... or Lisp/Clojure. Maybe it's not really possible to combine both in a good way _yet_, or maybe it's not possible in general. I hope for the former.

You should check out Carp[1]. The language is still young but it might scratch that itch.

[1] https://github.com/carp-lang/Carp

Re: Sugar – a typed lispy language targeting webasm/wat

#17

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? Or will you recommend learning sugar after learning some other lisp?

If you already know how to program, I'd recommend to just install SBCL and start a project with https://lispcookbook.github.io/cl-cookbook/ as a companion.

Forget about the perfect editor setup, idiomatic code and all that fuzz about becoming enlightened. (Common) Lisp is first and foremost a productive, pragmatic language to get things done, so just start hacking.

Re: Sugar – a typed lispy language targeting webasm/wat

#19
post #14

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? Or will you recommend learning sugar after learning some other lisp?

Not OP, I've only written a tiny bit of lisp, but this looks pretty similar. I'd probably suggest SICP: https://mitpress.mit.edu/sites/default/files/sicp/index.html if you want a "lisp intro"

That book can get really dense really quickly. It DOES appeal to certain types of learners though. So since, you can find the HTML version for free, check it out. I personally suggest "The Little Schemer". It literally starts with Atoms and works its way out. It uses Scheme, which Racket is based on. I highly recommend it.

Re: Sugar – a typed lispy language targeting webasm/wat

#20

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? Or will you recommend learning sugar after learning some other lisp?

If you already know how to program, I'd recommend to just install SBCL and start a project with https://lispcookbook.github.io/cl-cookbook/ as a companion. Forget about the perfect editor setup, idiomatic code and all that fuzz about becoming enlightened. (Common) Lisp is first and foremost a productive, pragmatic language to get things done, so just start hacking.

I am particularly looking to learn a LISP style language. Scheme and Racket caught my interest, given its concise, expressive syntax. Is it advisable to start with Common Lisp first, or go with Scheme/Racket? Thanks for the tip btw.
Post reply on HN