
Make Your Own Programming Language (2015) - rspivak
http://blog.ppelgren.se/2015-01-03/DIY-Make-Your-Own-Programming-language/
======
marianoguerra
in case you are interested I made a step by step repo creating a programming
language for the erlang vm here:

[https://github.com/marianoguerra/otl/commits/master](https://github.com/marianoguerra/otl/commits/master)

follow each commit in reverse order to get the step by step creation.

it was part of 2 talks I gave but I think you can follow it just by reading
the commits.

here are the slides: [http://marianoguerra.org/talks/elixir-karlsruhe-
meetup/](http://marianoguerra.org/talks/elixir-karlsruhe-meetup/)

------
cothalesr
Here's a relevant book in the works that everyone should keep their eye on.
[http://beautifulracket.com/](http://beautifulracket.com/)

It'll be interesting to compare how "making your own language" is achieved in
both guides. Although, the racket situation may be super different, the basic
steps seem to be similar.

------
sndean
This reminded me of something that helped me learn C a while ago:

[http://www.buildyourownlisp.com/contents](http://www.buildyourownlisp.com/contents)

Seems like even attempting to make your own language will teach you a lot.

------
throwaway2016a
I find it interesting there is no mention of Backus-Naur Form (BNF) in here.
It's the formal language to describe the syntax of programming languages.

Nor of there a mention of Flex/Bison or Lex/Yacc. I know those tools aren't
cool... being decades old and all. But they are very battle hardened and make
development much faster.

I don't know the background of the author or if they have a computer science
degree. And I am most definitely not one to do something one way just because
that is the way it has always been done. But articles like this seem to fly in
the face of decades of computer science advancement. As a fun project where
you learn a lot, great, I just hope someone doesn't try to use this to make
anything that isn't a toy language.

------
jasonjei
This brings back so many memories from my compilers class back in school.
Lexers to generate tokens, tokens to parsed from grammar, then translated to
intermediate code... And those pesky ASTs...

------
dkarapetyan
Really funny how the inspiration is python and haskell but there are 0
features from haskell.

~~~
Pirate-of-SV
Type declarations are similar to Haskell's. Haskell is also whitespace
dependent.

~~~
dkarapetyan
That's not what makes Haskell what it is. It's not the type declaration syntax
or the white space awareness. In fact those things are so superficial that
they might as well not be mentioned.

~~~
lgas
While this is true, the post lists 9 specific examples of features directly
below that quote, of which 5 are found in haskell. He never said he tried to
capture the essence of Haskell, simply that features in his language were
inspired (in part) by Haskell.

