Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Just finished SICP with Racket

Name: Anonymous 2011-01-24 14:42

And I'm not convinced about anything other than that Racket is slow as shit in a funnel. Explain this satori thing to me.

Name: Doctor Racket !RACKET/.HY 2011-01-26 14:09

>>68
From the source he posted some time ago (http://dis.4chan.org/read/prog/1293351605/27,28), it was CL.
I have no problems with him implementing a DSL, it's fun and a good exercise, every Lisper has made at least a simple DSL in his career.
I envy his DSL, it seems to have done a really good work with it and should be proud of it, but he shouldn't post his code written in it and say ``I wrote x in Lisp'', when it's clearly a DSL.
What makes him appear like a stupid is his stubborness on the fact that that's just Lisp, plain Lisp, giving reasons like ``it has lists and sexps''. Of course, a DSL have to give a way to communicate with the underlining language/system, that's the purpose of its existence, the fact that his language can communicate with the underlining CL implementations only strengthens the motivations to call it a DSL.

He should just post the complete implementation and then saying ``I wrote x in my Lisp DSL''.

Name: Doctor Racket !RACKET/.HY 2011-01-26 15:33

>>70,71
The difference between a Lisp macro and a DSL is, IMHO, that a Lisp macro has its syntax and all, but it's still under the domain of the Lisp reader (with the exception of a reader macro, whose purpose is to extend the reader instead of the language), whether a DSL needs its own parser.

The loop macro is a perfect example of the extensibility of Lisp, but it's just a macro, its parser parses a list of symbols with car and cdr and generates code, it can't have something like f(x, y, z), it would be parsed as 'f '(x ,y ,z) and would also be a syntax error, because , has already a special meaning for the reader.

In a macro, you can't know if after the foo symbol there was a space, a newline or a tab, because your macro is just a piece of Lisp code that runs at compilation/expansion time.

His DSL seems to not respect the reader, a piece of code could be written without any space (http://dis.4chan.org/read/prog/1293689458/1), and I doubt he would just take a big symbol, transform it to string, do the parsing and fight with the reader at every parser iteration. As seen in http://dis.4chan.org/read/prog/1293689458/37, he calls a repl function (macro?) and passes his code as string. He does all the parsing and calls the Lisp reader when necessary.

A nice work indeed, but it can't be called ``Lisp'', parsing a string at compile time and generating code can also be done with D mixins/templates, something like loop still can't be done in other languages.
But this is just a speculation, we don't really know how the DSL and its parser works, it could be anything.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List