7 ms·
Create Your Own Programming Language (Book)
- oscardelben 17y agoBecame the next Guido Van Russom, Matz... with just reading a book? Seriously? Edit: it looks like a good website but I'm still skeptical.
- mcantelon 17y agoThe 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.
- rygorr 17y agoI 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.
- mquander 17y agoWhat do you mean, why? How many reasons do you need to write code that does something cool?
- rygorr 17y agoWriting something cool is one thing. writing a language is another. What I'm saying is if you are using an ebook to create your language (on the jvm no less) I expect there are several other languages that people have spent YEARS on that I bet would solve most of the issues you could ever have if you learned them a bit better * The JVM is awesome. But there are lots of "hosted languages" already on that platform that likely will suit most peoples' needs.
- docmach 17y agoHow writing a compiler not cool? Just because someone uses a book and targets the JVM, which is a great target platform for a lot several reasons, doesn't mean they aren't doing it just because it's fun.
- dkersten 17y agoBut why pay $40 for fun when you can do it with free information on the net? If you're doing it for fun, then that information is more than adequate. If, however, you're doing it because you want a real language that people should/would use, then a 44 page PDF is not nearly enough, regardless of how good and densely packed it is. For a real (as opposed to a toy) language, you require theory on language design, on compilers, on programming paradigms, on syntax, on computation models and so much more.
- probablycorey 17y agoWhy are you writing this argument? It has been made on the Internet multiple times, and others spent more time writing their argument and explained your point better.
- igrekel 17y agoActually, lone people developing languages is not that a rare occurrence. It probably dates back to the beginnings of programming languages.
- igorgue 17y agofor fun!
- rubymaverick 17y agoStevey answered the WHY question a long time ago: http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html http://steve-yegge.blogspot.com/2007/06/rich-programmer-food...
- petercooper 17y agoYou obviously didn't read the site: Impress your employer and peers with a résumé that says: I created my own programming language. That's why ;-)
- igrekel 17y agoSeems 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.
- igorgue 17y agoThe Dragon Book!
- baxter 17y agoI 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.
- igorgue 17y agoyeah the marketing is too traditional!, but hey it didn't mention "become the next programming rockstar" :-) But I mean, if it is a walkthrough then for people interested in the JVM it could be useful.
- andreyf 17y agoI'm buying it because I found clear, comprehensive literature explaining the fundamentals of the JVM severely lacking (suggestions welcome, however!).
- stefano 17y agoYou can start by playing with the ASM library. It's a java library to parse, generate and analyze JVM bytecode. Here's the official guide: http://download.forge.objectweb.org/asm/asm-guide.pdf http://download.forge.objectweb.org/asm/asm-guide.pdf While learning how to use ASM you will also learn about the instruction set of the JVM. It also includes a disassembler that, given a .class file, outputs the java code necessary to generate that class using ASM.
- andreyf 17y agoWow, thanks! You'd be amazed how long I spent looking for the advice which probably took you a couple of minutes to type. That's an interesting observation, touching on the education discussion - that the bottleneck in advancing individual learning/human knowledge questions is still that of finding someone who knows the answer. Universities provide one solution by creating a "critical mass" of smart people nearby that you can go to for advice. And although maybe my academic network is lacking, I couldn't quite get the same quality of advice reaching out personally as what you gave. StackOverflow and news.YC help [1], but didn't quite give me the solution I was looking for either (until now). If I was convinced I could consistently good advice from a service, I'd pay well for it - upwards of a thousand dollars a year, I'd imagine. 1. http://news.ycombinator.com/item?id=451655 http://news.ycombinator.com/item?id=451655
- donaq 17y agoHmm. Are you sure this is not some tongue-in-cheek prank?
- silentbicycle 17y agoYeah, it kind of reads like ParrotSecrets.com for hackers.
- keyist 17y agoI 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 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!
- dkersten 17y ago$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.
- oscardelben 17y agoIt will go up to $49.99 after 500 copies will be sold (ok, another marketing tool I guess)
- aardvark 17y agoYeah, as if he's going to sell 500 copies at $39.99.
- petercooper 17y agoI have a few reams of paper (about 2000 sheets) you can buy for $40 if you want. That's even better value than the book you suggest.
- yangyang 17y agoDepends on your definition of value. Aho Sethi Ullman will teach you rather more about compilation of programming languages than 2000 sheets of paper ;-)
- huhtenberg 17y agoI bet it weighs more too :)
- plinkplonk 17y agoThis 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
- dkersten 17y agoDon't forget Peter van Roys excellent Concepts, Techniques and Models of Computer Programming
- plinkplonk 17y ago"Don't forget Peter van Roys Concepts, Techniques and Models of Computer Programming" yes I have this too. But I haven't worked through it so I didn't want to reccomend it blindly. Many talented hackers(e.g Peter Norvig) say good things about this book so I am sure it is great. The language it uses (Oz) is a bit flaky wrt syntax but VERY powerful. Another recent lovely book, though a bit on the formal side is Gifford and Turbak'S Design Concepts In programming languages. (Another 1000 + pages !! - the road to compiler gurudom has many 1000 page books to work through!).I am working though this and I am enjoying it thoroughly. I hope to finish it by the end of this year.
- macournoyer 17y agoHey, 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!
- tjstankus 17y agoI 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.
- macournoyer 17y agoThanks for the comments, you're right, I'll definitely change the copy on the site.
- aardvark 17y agoThe 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.
- Mongoose 17y agoI ctrl+w'd at "your own freaking awesome programming language."
- teeja 17y agoWhy not write a book that lets you create your own programming languge in javascript ?? That way you at least get something useful out of the exercise. (Ducks)