Hacker News new | ask | show | jobs
by shriramkmurthi 4109 days ago
This is a criticism of Lisp-based DSLs but not of Racket-based DSLs. Racket actively enables you to impose different, non-parenthetical surface syntaxes on the DSL. It is not a "this sort of works if you arrange it carefully _and nobody screws anything up_" thing like in Ruby, it really is an explicit language definition.

The easiest way to understand this in action is to read about Danny Yoo's Brainfuck embedding in Racket: https://www.hashcollision.org/brainfudge/

1 comments

I really liked the following article, which creates a text adventure language in Racket that looks like this:

  ===PLACES===
  ---desert---
  "You're  in a desert."
   [cactus, key]
  north    start
  south    desert
http://queue.acm.org/detail.cfm?id=2068896
Scribble is another great example. It's amazing in its own right, and by being embedded into Racket, gets all the Racket benefits: for instance, separate compilation! (Thirty years and waiting, LaTeX.)