DEV Community

I was bored, so I built a programming language

Syed Faraaz Ahmad on March 24, 2021

One fine evening in the first lockdown of 2020, there I was, sitting idly, not knowing what to do. Calmly freaking out. You see, I really needed...
Collapse
 
whobeu profile image
Robert G. Schaffrath

I remember learning compiler and language theory back in the 80's using the Aho and Ullman "Dragon Book". Languages were still very much a "black art" back then with institutional memory on the development of FORTRAN still around (which was an amazing feat in and of itself as there was no formal understanding of the design of computer languages when FORTRAN was created).

Collapse
 
perty profile image
Per Lundholm

I could have written that. :) The Dragon book and Fortran - yes.

And of course I had to write a LISP interpreter.

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Yeah that is still the gold standard imo. I've Used that in college as well. I think LLVM has been a massive game changer in enabling normies like me to create small toy language for themselves.

Collapse
 
drazendotlic profile image
Drazen Dotlic

Kudos πŸ‘! I'm working on something similar myself and have seen and overcome many of the same challenges. Making a language is very rewarding IMO.
All this said, I have to give you extra πŸ‘ for the movie quote (feeling, not understanding); it somehow fits the narrative perfectly πŸ˜‰
The final BoJack scene is just perfect πŸ’ͺ

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

I'm glad you like it! I let this post marinate in the drafts for a while making small changes until it felt cohesive and entertaining enough to post. Looking forward to your post!

Collapse
 
drazendotlic profile image
Drazen Dotlic

I'm not looking to write a post, am far more ambitious for "just" a post πŸ˜‰
The plan is to create several video courses on how to build a language... we'll see how that goes 😁

Thread Thread
 
faraazahmad profile image
Syed Faraaz Ahmad

Awesome! If you need any ideas, @bellmar has an ongoing podcast series on making a programming language of her own at dev.to/mwapl

Thread Thread
 
drazendotlic profile image
Drazen Dotlic

I may not be looking for ideas, but a fellow language engineer’s work is practically always interesting. Thanks for the link!

Collapse
 
dhorse1 profile image
David G. Horsman

My background includes code conversion utilities. Thus you see source code strings and literals embedded in source code. The parser in particular.
This can be both hard to read and potentially cause bugs were it examining itself in a self-referential manner.
I would use llvm now, this was done in the mid-80's.

Collapse
 
dhorse1 profile image
David G. Horsman

Re that whole I should have mentioned how glad I am you are in software and not nuclear physics. ;-) Boredom often drives creativity.

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Would be interesting to read source code of parsers from back then

Collapse
 
dhorse1 profile image
David G. Horsman

I'm back. lol. What was really interested was the release distribution software. It worked with source code converted for various platform variants. PICK Databasic.

Thread Thread
 
dhorse1 profile image
David G. Horsman

Early use of modem required that remote updates were tiny in size. Like GitHub only the changes were distributed, applied and compiled locally. 1980's was when it started.
I created early (line) fault tolerant communications software to transmit the updates.

Collapse
 
nikolab profile image
Nikola Betica

Man, how bored were you? :D JK, great article πŸ‘

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Really really bored! :D
thanks though!

Collapse
 
karandpr profile image
Karan Gandhi

Nice writeup !

Collapse
 
egilhuber profile image
erica (she/her)

Very cool seeing the whole process laid out like this!

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Thanks! I was trying to make a series of posts on it but i realised that would feel more like a tutorial and there's already a lot of them around. So I put it all in one post and tried to make it interesting, hopefully it's not boring

Collapse
 
vaibhavkhulbe profile image
Vaibhav Khulbe

Wonderful! I liked how you came up with an idea and executed it.

I will be featuring your article in my newsletter. :')

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Awesome! I'm glad I can provide good content

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Thank you!

Collapse
 
pandademic profile image
Pandademic

Nice job!