Live data from Hacker News

Beautiful Racket

beautifulracket.com

1–10 of 55 posts

Re: Beautiful Racket

#3
> If a datum sounds like a syn­tax object, that’s no coin­ci­dence — a syn­tax object is just a datum with some extra infor­ma­tion attached. The #' pre­fix nota­tion we used for a syn­tax object now con­nects log­i­cally: we can think of the # as rep­re­sent­ing the extra info that gets attached to the datum

This is not clear, can someone explain please?

Re: Beautiful Racket

#4
This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background).

But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't very hard, and there are multiple guides online on how to do this using Luajit, or Libjit, PyPy, or LLVM, etc.

What I want more than anything is a guide written on the same level on how to build a toy statically-typed language, with algebraic data types. And even better, some basic discussion on how to learn about implementing advanced techniques like refinement, or linear, or dependent types (I realize these are extremely complex topics).

Every discussion I find on these topics is in dense academic papers. I'm slowly making headway, but it's a slog.

The only good resource I've found so far (and it's an excellent one) is Andrej Bauer's Programming Languages Zoo. But as far as I know, it's all (very helpful and instructive) source code, with no accompanying tutorials.

Is there no very simple introduction on writing a simple ML, with type checking? Any recommended resources?

It's possible that Butterick intends to cover these topics in later chapters, in which case I can't wait to read the book.

Re: Beautiful Racket

#5

> If a datum sounds like a syn­tax object, that’s no coin­ci­dence — a syn­tax object is just a datum with some extra infor­ma­tion attached. The #' pre­fix nota­tion we used for a syn­tax object now con­nects log­i­cally: we can think of the # as rep­re­sent­ing the extra info that gets attached to the datum This is not clear, can someone explain please?

Not sure which part isn't clear.

First, syntax objects are data, but with extra information, such as binding information, source location, etc.

Second, the #' form (written out it's called `syntax`) is similar to the ' form (written out as `quote`). But the first one includes the extra information to make a syntax object. Also, it has an extra character, which the chapter points out can be seen as going along with the extra information.

Re: Beautiful Racket

#6
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

Are you looking for general references on implementing type checkers and ML-like languages? Or how to implement those as languages in Racket specifically?

Re: Beautiful Racket

#7
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

Not the tutorial form you probably want but I've had this bookmarked, it may be interesting:

http://www.cse.chalmers.se/edu/year/2015/course/DAT150/ http://www.cse.chalmers.se/edu/year/2015/course/DAT150/lectu...

Re: Beautiful Racket

#8
post #5

> If a datum sounds like a syn­tax object, that’s no coin­ci­dence — a syn­tax object is just a datum with some extra infor­ma­tion attached. The #' pre­fix nota­tion we used for a syn­tax object now con­nects log­i­cally: we can think of the # as rep­re­sent­ing the extra info that gets attached to the datum This is not clear, can someone explain please?

Not sure which part isn't clear. First, syntax objects are data, but with extra information, such as binding information, source location, etc. Second, the #' form (written out it's called `syntax`) is similar to the ' form (written out as `quote`). But the first one includes the extra information to make a syntax object. Also, it has an extra character, which the chapter points out can be seen as going along with th…

Got it, thanks!

Re: Beautiful Racket

#9
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

There was a great textbook by Sam Kamin around 1990 (http://loome.cs.uiuc.edu/kamin/pubs.html). I think that might help.

Re: Beautiful Racket

#10
post #6
post #4

This looks like a very well-written, easy introduction to making simple, dynamic programming languages (not surprising given the author's writing background). But everyone writes about how to build these kinds of basic Forths, or Lisps, or reverse polish notation calculators. To be honest, once you've learned the basic technique, writing a toy dynamic language interpreter is pretty easy. Even adding a toy JIT isn't v…

Are you looking for general references on implementing type checkers and ML-like languages? Or how to implement those as languages in Racket specifically?

Either or any would be great, particularly if they're online and not books (although I'd buy a good book that covered those topics in depth).

Particularly an approachable intro to Hindley-Milner and building a toy/mini-ML, and type checking in general. All the better if it's in Racket, or some ML.

Actually, do you know of any examples of ML-type languages, or any statically-typed languages, that are written in Racket, aside from Typed Racket itself? Is looking at the Typed Racket code instructive? (I should just take a look)

Post reply on HN