Hacker News new | past | comments | ask | show | jobs | submit login

Does Racket support non-Lisp-like syntax for DSLs written in it? I've been hearing really great things about how it has the best macro system on earth, but Haskell has spoiled me to the extent that I'm a bit lazy (no pun intended at all) to look at things outside of that broad area (so Idris, PureScript, etc.) nowadays, but Racket seems to be interesting enough that (to continue the pun) I can afford a bit of IO for it.

Most of my interest stems from this excellent project in Racket that's shaping up to be quite something:

https://github.com/lexi-lambda/hackett

It uses the "type systems as macros" paper's approach to create a Haskell-like language in Racket.

(btw, I think you meant e.g., not i.e.)




>Does Racket support non-Lisp-like syntax for DSLs written in it?

Yes! You can override the reader so that it parses anything, and there are modules for writing grammers[1][2]. Still, it is usually much easier to just use the built in s-expression parser, and if you're writing a lot of lisp, you probably don't mind s-expressions anyways :)

Hackett has interested me too, I hope that progress can continue to be made, it would be a nice alternative to Typed Racket (which is great, but very complex).

I'm working with the author of the "Type Systems as Macros" paper right now, we're working on implementing a linear language (along the lines of Rust) using Racket's macro facilities and the turnstile[3] package. Being able to embed arbitrary type systems in Racket really shows the insane power of the macro system.

[1] http://docs.racket-lang.org/parser-tools/LALR_1__Parsers.htm...

[2] http://docs.racket-lang.org/ragg/

[3] https://github.com/stchang/macrotypes




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: