

Create Your Own Programming Language - shawndumas
http://createyourproglang.com?hn=1

======
velik_m
It looks interesting, but there is something about the copy that puts me off.
Maybe it's the way it focuses on what it's not, i don't know it feels kind of
scamy, like one of those shopping channel ads.

~~~
agotterer
I had the exact same feeling. Couldn't put my finger on it at first. The book
itself interests me, but something about the copy made it seem "too good to be
true" and as you said a bit scamy and off-putting.

------
suyash
Seems very scamy..the price is not even listed on the home age, just the buy
button. Neither the author has justified his credibility in the matter.

~~~
Alterlife
Additionally, the proxy server I'm behind (at work, oh no :-( ) is showing me
a "malicious downloads" warning.

It's very likely a scam.

------
lolproglang
The book has tons of code listings that make up the majority of the pages.

It used to be 53 pages, but is now somewhere over 100 pages, according the new
updated site. The original's code listings are in Ruby; I can't help but
wonder if he just redid them in Java to make the book longer. Seriously. And
no, I'm not picking on Java.

Here's the old version:

[https://anonfiles.com/file/e98ca909d4e62fb0d6f59f67bf0bfaf6](https://anonfiles.com/file/e98ca909d4e62fb0d6f59f67bf0bfaf6)

------
ioddly
The book is made by the creator of tinyrb
([https://github.com/macournoyer/tinyrb](https://github.com/macournoyer/tinyrb)).
I've never read it, so I don't know whether it's any good, but I'm sure it's
not a scam.

Implementing a programming language is a pretty difficult but rewarding task.
It's become a lot easier these days now that there are giant runtimes you can
target (JVM, CLR and so on). I would encourage anyone who is interested to
give it a shot, and to find a good book or course to do so. (That book from
Brown dmunoz posted looks excellent) And once you've done that, try writing
your own runtime too (garbage collector/virtual machine or native compiler).
It will teach you a lot about the tools you use every day.

------
why-el
This pops up from time to time on Hacker News. I got the book and went through
it, but couldn't go beyond the basics and found myself in a state of limbo. I
would love to hear from other people about their experience with the book and
whether they continued beyond what this book has to offer.

------
bionsuba
I purchased this about a year ago, so I will give any potential buyers a fair
warning, if you don't know ruby, this book is very hard to follow. All of the
examples are in ruby and no pseudo code is provided.

~~~
yolesaber
I was really stoked to buy this since I've always toyed with the idea of
creating my own language but this is disheartening to hear.

Do you have any recommendations for books in a similar vein?

~~~
jvoorhis
If you have the stomach for it, find a used copy of the "dragon book" [1]. I
have the red one.

LLVM is a modern "compiler infrastructure" project. It's textual intermediate
language is relatively easy to write. If you can write a program that accepts
user input, and generates LLVM IR, then you've got a compiler of sorts.

[1]
[http://en.m.wikipedia.org/wiki/Dragon_Book](http://en.m.wikipedia.org/wiki/Dragon_Book)

~~~
derefr
Those aren't "books in a similar vein", those are the things that this book is
(as far as I can tell) aimed to disrupt.

It's like this thing is selling an ATM, and the parent comment is asking
"well, I live in Nicaragua, is there an ATM there?" and your answer is "there
is an ATM in Nicaragua, it is called a bank."

The Dragon Book is the reason more people _don 't_ write compilers. It's old
and thorough and formal and really feels like you were handed an "Installing
Your Model HJ-3660PF Nuclear Hydraulic Reactor" manual, more than an
approachable guide. This isn't necessarily a bad thing, if you're forced
through it for a class--you'll learn more, and what you learn will have a more
stable foundation--but it's a shame for people who are just _curious_ , and
would learn something from a friendlier presentation where the more formal
approach would lose them.

Writing a compiler is pretty fundamental to being able to form an
understanding of platform semantics as separate from language syntax. It's
something everyone _can_ do--but it's treated so formally that it feels like
one of those weird advanced-level things only to be attempted after you've
learned everything else, like creating your own magic spells in D&D. If it
felt more like some "Create Potion"-level magic, maybe more people would have
tried it, and figured out that there's really no magic going on at all. :)

~~~
jvoorhis
I actually skipped the course, but grabbed my used copy from the old Powell's
Tech before it closed, as well as the O'Reilly Flex and Bison book. It felt
like I had the nuclear reactor manual! I also got really into writing
interpreters, mainly in Ruby, after reading probably too many ICFP papers on
the subject (and even shipped one to solve an ad targeting problem.)

I always try to dive headlong into literature for concepts like this, knowing
I won't understand everything right away. Implementing the concepts with my
tools of choice has always been a great way to prove my understanding, and
push myself.

------
dmunoz
I have no idea if this book being offered in this posting is good or not.
Echoing some of the comments in this thread, here are some alternative
resources.

The following book [0] popped up on reddit [1] the other day. I'm not sure how
it compares, but it looks like a decent option. Surely better than the
suggestion in this thread to "get the dragon book" which I feel is too obtuse
of a recommendation.

My favourite free resource in this area is Programming Languages: Application
and Interpretation [2], which has video lectures [3] from the online offering
last year. Udacity also has a programming languages course in the vein of
building a web browser.

There were also two interesting videos from PyCon USA 2013, All-Singing All-
Dancing Python Bytecode [4], and So you want to write an interpreter? [5].

Some of the above are not precisely for creating your own programming
languages, but they are great resource in the general area.

[0]
[http://nathansuniversity.com/step.html](http://nathansuniversity.com/step.html)

[1]
[http://www.reddit.com/r/programming/comments/1jnd95/pl101_cr...](http://www.reddit.com/r/programming/comments/1jnd95/pl101_create_your_own_programming_language/)

[2]
[http://cs.brown.edu/courses/cs173/2012/book/](http://cs.brown.edu/courses/cs173/2012/book/)

[3]
[http://cs.brown.edu/courses/cs173/2012/Videos/](http://cs.brown.edu/courses/cs173/2012/Videos/)

[4] [http://pyvideo.org/video/1777/all-singing-all-dancing-
python...](http://pyvideo.org/video/1777/all-singing-all-dancing-python-
bytecode)

[5] [http://pyvideo.org/video/1694/so-you-want-to-write-an-
interp...](http://pyvideo.org/video/1694/so-you-want-to-write-an-interpreter)

------
pinchyfingers
I would turn to the Racket community first to learn about creating programming
languages, they kind of have a thing for it.

Here's a start:

[http://queue.acm.org/detail.cfm?id=2068896](http://queue.acm.org/detail.cfm?id=2068896)

~~~
takikawa
I would also look at PLAI (Programming Languages: Application and
Interpretation):
[http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04...](http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/)

It's an excellent free undergraduate-level PL textbook that covers a lot of
ground and is informed by both research and practice. There's a 2nd edition
linked from there as well.

------
frozenport
Did Matz, creator of the Ruby language actually read the book or just voice
interest in reading it :-)

------
cLeEOGPw
Another page with "few simple tricks to create programming language". Looks
really fake, regardless of it being real or not.

Putting bad marketing aside, are there currently areas which would require
another programming language, that would provide something current languages
do not provide, or make it so much better that the change would be rational?

~~~
lysa
No need to be so aggressive, but to answer your question:

    
    
         1. Yes, there are probably a lot of areas that need new
            programming languages or improvements of the current  
            programming languages, everything is quite far from 
            "perfect" at the moment (and it will probably always
            be). There's still a huge amount of research going
            in this direction.
         2. Learning. Should you ever be stopped from learning
            something new by the fact that something similar 
            already exists? Probably not. This is just business 
            thinking utter bullshit.
         3. This "resource" was the starting point before few
            quite young popular programming languages. I haven't
            read it myself but it must be something good to learn
            from it judging by the outcome. Show some respect.

------
marpalmin
If you want a very well written book (donationware) by an expert in the area
on how to create your own language go to
[http://dslbook.org/](http://dslbook.org/)

~~~
radicalbyte
Seconded. Nice chap on twitter, too.

I'd also recommend any of Terrence Parr's books on ANTLR.

------
jvoorhis
If I've got the story straight, this was the inspiration for Coffeescript. If
you have the itch, but don't have forty dollars, you should check out the LLVM
kaleidoscope tutorial [1] or read the LLVM manual and then check out my Ruby-
LLVM project [2].

[1] [http://llvm.org/docs/tutorial/](http://llvm.org/docs/tutorial/) [2]
[https://github.com/ruby-llvm/ruby-llvm](https://github.com/ruby-llvm/ruby-
llvm)

------
mattjaynes
I haven't read this book of Marc's, but his Owning Rails course is excellent.
It's definitely not for beginners, but is great if you're at least
intermediate in Rails.

In the course he walks you through how to make a simple clone of the Rails
framework. Once you've done that, digging into the Rails source isn't so
intimidating.

[http://owningrails.com/](http://owningrails.com/)

------
dchichkov
To anyone who haven't red "The Definitive ANTLR reference" by Terrence Par. I
can highly recommend it. It is beautiful.

[http://www.antlr.org/wiki/display/ANTLR4/ANTLR+4+Documentati...](http://www.antlr.org/wiki/display/ANTLR4/ANTLR+4+Documentation)

------
Pro_bity
I thinks a better question would be is not how to, but should you. See -
Bjarne Stroustrup: Why I Created C++
([http://www.youtube.com/watch?v=JBjjnqG0BP8](http://www.youtube.com/watch?v=JBjjnqG0BP8))

------
jawerty
It's not a scam. I read through the book, it's very interesting. It does
actually show a side of javascript I never thought of before.

------
bencollier49
Wow, that's a hard sell. Quite impressed by the sheer intensity of it.

------
emersonrsantos
This is a scam. The best way to create a new programming language is using
Forth.

~~~
swartzrock
So your recommendation is to... go forth and create a new programming
language?

~~~
asiekierka
No, that would be too BASIC. It should be well designed first.

~~~
Pitarou
You need a clear Scheme.

(And seriously, folks, the GNU people used to tout their Scheme interpreter,
Guile, as a target for compilers.)

