This is a scam. Take a look at the toc to see how many pages are devoted to the interpreter, the VM and so on. It is impossible to learn how to write a complete interpreter or compiler, (leave alone VMs etc) in such a small "book".
The blurb says
"Become the next Guido Van Rossum, Matz, Larry Wall or Rasmus Lerdorf by creating your own revolutionary programming language in a few days"
yeah right! :-D.
If anyone is really interested in learning to build an interpreter or compiler, here is a book list to work through in order.
(1) SICP (do all the exercises in Chapter 4 and Chapter 5). There is an incredible amount of learning there. Once you've done this, you can write a basic interpreter/compiler for languages with s-expression syntax. [The semantics can be anything you imagine]
(2) Essentials of Programming Languages. This will teach you how many language features work (lazy evaluation, object systems, static type systems ..)
(3) Lisp in Small Pieces - how to implement byte code compilers, macro systems, compilation to C, lots of good stuff here.
(4) A book on lexing and parsing so you can give your language any syntax you want. I prefer Modern Compiler Design by Gries. If you understand the first three chapters you can write your own lex/yacc equivalents. (the book has a lot more to it than these chapters, but it is the best I've seen on lexing/parsing).
(5) Now take a look at the source of your favorite language. ((Lua and the lcc compiler (it even has a book explaining its design) in particular, are very educational).
(6) If you are REALLY serious about optimization, Steve Muchnick's book, Advanced Compiler Design and Implementation.
I have all these books and have derived an incredible amount of learning and joy from them.
yes it is a bit of work, but it is fascinating journey. Enjoy.
EDIT: If you want to go deep into type systems (say you want to grok Haskell's type system from first principles, (or add OCAML like modules to your language, say) Benjamin Pierce's Types and Programming Languages - You are in good shape to work through this after you've finished EOPL
The source to Lua is quite good, though not commented heavily. There's a roadmap by Mike Pall at http://www.reddit.com/comments/63hth/ask_reddit_which_oss_co... , and some other notes on the Lua users's wiki at http://lua-users.org/wiki/LuaSource . Lua has been kept small for embedding, and its designers are adamant about portability, so the code is very clean. (It's also one of my favorite languages.)
Also, _Modern Compiler Implementation in ML_ by Andrew Appel (http://www.cs.princeton.edu/~appel/modern/ml/) is quite good. It uses SML, but is pretty understandable if you're familiar with OCaml or (perhaps) Haskell. I found it vastly more readable than the Dragon Book.
Your advice is good, but you're being a snob. The complexity of a simple compiler is not that high. My language (http://plausible.org/nasal) has a core of about 3-4000 lines of C, well under the size of the Unix kernel explained (very well) by Lions in his classic book.
Sure, language design is a deep field, with lots of subtlety and complexity. And people spend years studying it. That doesn't mean that every language requires a huge tome of background to implement.
That is great advice if you are building an enterprise ready language, have no job and a year to devote to reading and digesting all that literature. This isn't an ivory tower book, it's how to bootstrap your own language quickly using open source tools (which is surprisingly simple once you know how, but very complicated if you don't know where to start).
I love when people create small books, video tutorials about complex subjects. They are an introductory peek at what is cool about a complex subject. Then you have the opportunity to learn more about the parts the interested you, rather than buying "Modern Compiler Design" and realizing you have no interest in writing your own lexer or parser.
Not to say the books/sites you recommend aren't great, they are just overkill.
It is basically a really high level overview of a whole bunch of stuff from EE/CS, from logic gates through VM design through compilers (and sort of OSes, but not really). Each chapter is a project and build on each other (but you can actually do them in any order).
It isn't as in depth as many of these other books, but might be an easier first book.
I think it's fairly in jest. Marc-Andé Cournoyer is a pretty smart guy. I'd say that this is most likely a nice light overview. That being said, I haven't read it, but I have looked at his code on GitHub.
Hey, I'm the author of the book. I agree the marketing site is not perfect, I'm still looking at ways to improve it, sorry if if it sounds like a scam.
Any tips on improving the copywriting or anything are greatly appreciated!
I think most of us on HN realize it's gonna take more than a few days and a few pages of reading to truly understand what it takes to create a programming language, not to mention becoming the next Guido or Matz. The table of contents looks more like it's an introduction to the concepts with the added bonus of having working code by the time you're done reading. Don't get me wrong - I think the concept and content look great. It's just that you're telling me I'm going to be Larry Wall by Friday and I know that's not true. The message undercuts the content IMO.
My other gripe is with the price. $40 seems high for a 44-page document. I'd buy it if the price was lower.
BTW - thanks for Thin! Because I know your name and work the content came off as sarcasm to me at first, but I could definitely see how someone without this prior knowledge might think it's a scam. Best of luck with this book; it does truly look cool.
The copywriting is a little over the top, but my suggestion is for the book itself.
I'd like to see more details. Your sample chapter on Lexers, for example, would be much stronger if you went into more details (maybe 3-4 pages) on how a scanner identifies a token, how it knows when it has reached the end of a word, how it recognizes and handles whitespace, why it's important to keep track of indentation and newlines, what is the difference between keywords and other identifiers, etc. Maybe also give a written explanation describing what each section of your lexer for Awesome is doing.
Please consider this as constructive criticism: I think the book is a good idea, but I also think it needs more meat. I don't know how easy it is to revise it at this time, but I think you'd have better luck if you added more details.
I, for one, enjoyed the humor of the parodying of get rich quick sites. If need be you could put a disclaimer, for those that don't detect the humor in the hyperbole, that the book is a playful introduction rather than a comprehensive tome.
$39.99 for a 44 paged PDF? On Amazon.com I can buy a hardcopy version of Compilers: Principles, Techniques, and Tools (2nd Edition) for $86.29 and its got (according to amazon) 1000 pages.
I feel the copywriting of the site is a little over the top. The subject matter is interesting enough that most geeks should want to have a look.
Is this a sign of the times? (See also: http://perl6.org). Sure there's nothing wrong with dressing tech up and making it look fun, but at some point it becomes a turn-off, which is a shame. 2600 et al did not need fancy fonts and bright colors to appeal to hackers.
Seems like the "book" (44 pages in PDF) is a walkthrough to using compiler building tools and the like. Not a bad idea.
A lot of what surrounds it sounds way too much like a mix of spam and infomercial for my taste. Then again, I am most likely not the intended audience. I must say it makes me smile seeing this marketed as a "cool thing" tough.
I agree that learning how to create a programming language is a valuable lesson in and of itself -- I may even buy the book to see what it's like -- but claiming that you can create a "revolutionary" programming language within a few days conveys the wrong message.
Creating programming languages is not difficult but designing good programming languages is.
I am designing a (hopefully) revolutionary programming language. (At least, revolutionary in its target domain; a general purpose DSL, if you will).
To do this, I am not reading a 44 page PDF to tell me everything I need to know, instead I'm reading thousands of pages of material(1), I've been prototyping code, talking to people and reading a lot of Lambda the Ultimate discussions. You just can't learn all the fundamental concepts, all the theory and the practical details (language and implementation/compiler/vm) from 44 pages...
1: Some of the stuff I've been reading especially for this:
Concepts, Techniques and Models of Computer Programming - 930 pages of fundamental programming language theory.
Structure and Interpretation of Computer Programs - 657 pages of Scheme goodness.
Advanced Topics in Dataflow Computing and Multithreading - 460 pages of research.
Countless SIGPLAN papers.
God knows how many web pages and random PDF's.
And thats just the theory, I've yet to get reading the actual COMPILER books. Near the top of my list is the dragon book - another 1000 pages.
Creating a new programming language is trivial. I just invented one called "awesomepython". It's just like python, except that the keyword "and" is replaced by "awesomeand", "if" is replaced with "awesomeif", and so forth. The compiler is one line of awk.
Creating a language that's actually good for something is a very different sort of challenge...
The tone seems tongue-in-cheek to me. The page is a humorous parody of get rich quick sites. The product itself is real and, if it gives somebody a quick way to get up and running exploring the basics of language, it's likely worth the $40.
I think its great that we've reached a point in technology that we have people (rather than teams or large companies) creating languages that people can use.
However, if you are looking at books to learn HOW to create a new language you likely haven't answered a more important question: WHY.
[+] [-] plinkplonk|16 years ago|reply
The blurb says
"Become the next Guido Van Rossum, Matz, Larry Wall or Rasmus Lerdorf by creating your own revolutionary programming language in a few days"
yeah right! :-D.
If anyone is really interested in learning to build an interpreter or compiler, here is a book list to work through in order.
(1) SICP (do all the exercises in Chapter 4 and Chapter 5). There is an incredible amount of learning there. Once you've done this, you can write a basic interpreter/compiler for languages with s-expression syntax. [The semantics can be anything you imagine]
(2) Essentials of Programming Languages. This will teach you how many language features work (lazy evaluation, object systems, static type systems ..)
(3) Lisp in Small Pieces - how to implement byte code compilers, macro systems, compilation to C, lots of good stuff here.
(4) A book on lexing and parsing so you can give your language any syntax you want. I prefer Modern Compiler Design by Gries. If you understand the first three chapters you can write your own lex/yacc equivalents. (the book has a lot more to it than these chapters, but it is the best I've seen on lexing/parsing).
(5) Now take a look at the source of your favorite language. ((Lua and the lcc compiler (it even has a book explaining its design) in particular, are very educational).
(6) If you are REALLY serious about optimization, Steve Muchnick's book, Advanced Compiler Design and Implementation.
I have all these books and have derived an incredible amount of learning and joy from them.
yes it is a bit of work, but it is fascinating journey. Enjoy.
EDIT: If you want to go deep into type systems (say you want to grok Haskell's type system from first principles, (or add OCAML like modules to your language, say) Benjamin Pierce's Types and Programming Languages - You are in good shape to work through this after you've finished EOPL
[+] [-] silentbicycle|16 years ago|reply
Also, _Modern Compiler Implementation in ML_ by Andrew Appel (http://www.cs.princeton.edu/~appel/modern/ml/) is quite good. It uses SML, but is pretty understandable if you're familiar with OCaml or (perhaps) Haskell. I found it vastly more readable than the Dragon Book.
[+] [-] ajross|16 years ago|reply
Sure, language design is a deep field, with lots of subtlety and complexity. And people spend years studying it. That doesn't mean that every language requires a huge tome of background to implement.
[+] [-] probablycorey|16 years ago|reply
I love when people create small books, video tutorials about complex subjects. They are an introductory peek at what is cool about a complex subject. Then you have the opportunity to learn more about the parts the interested you, rather than buying "Modern Compiler Design" and realizing you have no interest in writing your own lexer or parser.
Not to say the books/sites you recommend aren't great, they are just overkill.
[+] [-] cadr|16 years ago|reply
It is basically a really high level overview of a whole bunch of stuff from EE/CS, from logic gates through VM design through compilers (and sort of OSes, but not really). Each chapter is a project and build on each other (but you can actually do them in any order).
It isn't as in depth as many of these other books, but might be an easier first book.
[+] [-] dkersten|16 years ago|reply
[+] [-] netghost|16 years ago|reply
[+] [-] swombat|16 years ago|reply
[+] [-] macournoyer|16 years ago|reply
Any tips on improving the copywriting or anything are greatly appreciated!
[+] [-] tjstankus|16 years ago|reply
My other gripe is with the price. $40 seems high for a 44-page document. I'd buy it if the price was lower.
BTW - thanks for Thin! Because I know your name and work the content came off as sarcasm to me at first, but I could definitely see how someone without this prior knowledge might think it's a scam. Best of luck with this book; it does truly look cool.
[+] [-] aardvark|16 years ago|reply
I'd like to see more details. Your sample chapter on Lexers, for example, would be much stronger if you went into more details (maybe 3-4 pages) on how a scanner identifies a token, how it knows when it has reached the end of a word, how it recognizes and handles whitespace, why it's important to keep track of indentation and newlines, what is the difference between keywords and other identifiers, etc. Maybe also give a written explanation describing what each section of your lexer for Awesome is doing.
Please consider this as constructive criticism: I think the book is a good idea, but I also think it needs more meat. I don't know how easy it is to revise it at this time, but I think you'd have better luck if you added more details.
[+] [-] mcantelon|16 years ago|reply
[+] [-] dkersten|16 years ago|reply
[+] [-] petercooper|16 years ago|reply
[+] [-] oscardelben|16 years ago|reply
[+] [-] huhtenberg|16 years ago|reply
[+] [-] keyist|16 years ago|reply
Is this a sign of the times? (See also: http://perl6.org). Sure there's nothing wrong with dressing tech up and making it look fun, but at some point it becomes a turn-off, which is a shame. 2600 et al did not need fancy fonts and bright colors to appeal to hackers.
tl;dr - get off my lawn!
[+] [-] igrekel|16 years ago|reply
A lot of what surrounds it sounds way too much like a mix of spam and infomercial for my taste. Then again, I am most likely not the intended audience. I must say it makes me smile seeing this marketed as a "cool thing" tough.
[+] [-] donaq|16 years ago|reply
[+] [-] silentbicycle|16 years ago|reply
[+] [-] baxter|16 years ago|reply
Creating programming languages is not difficult but designing good programming languages is.
[+] [-] dkersten|16 years ago|reply
To do this, I am not reading a 44 page PDF to tell me everything I need to know, instead I'm reading thousands of pages of material(1), I've been prototyping code, talking to people and reading a lot of Lambda the Ultimate discussions. You just can't learn all the fundamental concepts, all the theory and the practical details (language and implementation/compiler/vm) from 44 pages...
1: Some of the stuff I've been reading especially for this: Concepts, Techniques and Models of Computer Programming - 930 pages of fundamental programming language theory. Structure and Interpretation of Computer Programs - 657 pages of Scheme goodness. Advanced Topics in Dataflow Computing and Multithreading - 460 pages of research. Countless SIGPLAN papers. God knows how many web pages and random PDF's.
And thats just the theory, I've yet to get reading the actual COMPILER books. Near the top of my list is the dragon book - another 1000 pages.
[+] [-] hughprime|16 years ago|reply
Creating a language that's actually good for something is a very different sort of challenge...
[+] [-] igorgue|16 years ago|reply
But I mean, if it is a walkthrough then for people interested in the JVM it could be useful.
[+] [-] oscardelben|16 years ago|reply
Edit: it looks like a good website but I'm still skeptical.
[+] [-] mcantelon|16 years ago|reply
[+] [-] Mongoose|16 years ago|reply
[+] [-] igorgue|16 years ago|reply
[+] [-] rygorr|16 years ago|reply
However, if you are looking at books to learn HOW to create a new language you likely haven't answered a more important question: WHY.
[+] [-] igrekel|16 years ago|reply
[+] [-] rubymaverick|16 years ago|reply
http://steve-yegge.blogspot.com/2007/06/rich-programmer-food...
[+] [-] mquander|16 years ago|reply
[+] [-] petercooper|16 years ago|reply
Impress your employer and peers with a résumé that says: I created my own programming language.
That's why ;-)
[+] [-] igorgue|16 years ago|reply
[+] [-] teeja|16 years ago|reply
That way you at least get something useful out of the exercise.
(Ducks)