DEV Community

Cover image for I'm building a programming language

I'm building a programming language

Syed Faraaz Ahmad on December 14, 2020

A lot of people that talk about building their own programming language, have a lot of lofty goals for them. They want them to have this feature, t...
Collapse
 
jcubic profile image
Jakub T. Jankiewicz

My LIPS language project was also something simple at first (that's from where its name came from), it started as Codepen demo, after making it working, I wanted something more, so now my aim is to make it fully working R7RS Scheme, with mine extensions on top.

I hope your project will be usable (I would like to play with it), good luck on making it working. Don't forget to share the link if you will have something working.

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Wow! LIPS is so cool!! I didn't know you could put lisp in a browser like that. Thanks for sharing! And yeah i will sharing more articles as I progress with my project

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

I have a working example here now: github.com/faraazahmad/tisp

Collapse
 
610yesnolovely profile image
Harvey Thompson

Lisp is an excellent choice for learning about building programming languages. LLVM is another excellent choice for doing a lot of the tricky backend stuff for free so you can concentrate on other things. Lisp also is much easier to follow the lower path in that diagram. Welcome to the land of designing and building programming languages!

One challenge for you with your Lisp - how few data types and functions in the Lisp language you're building can you get away with and still have something useful? Technically speaking I think the answer is one (see lambda calculus), but practically I think somewhere in the range 10 to 15. Another one is how small can you make the first program? I think somewhere around 100 to 200 lines?

A gem of a book, not well know, that you may be interested in:

amazon.ca/Programming-Languages-Sa...

Although this discusses how to build interpreters, it was the book that inspired me to get into this field as a hobby/side-project ... well... a long time ago.

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

This is amazing! Thanks a bunch!

Collapse
 
davidedelpapa profile image
Davide Del Papa • Edited

Hi! Maybe as reference you could take a look at this good article by Ben Lovy and the C book it refers to.

dev.to/deciduously/rust-your-own-l...

I remember reading this when it came out, and thinking "maybe i could give it a shot"... But then I never found occasion. Take a look and see if it might help you!

Keep us updated if you want to share with us where this journey takes you to!

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad • Edited

That's amazing! I didn't know that existed. I'll definitely be stealing some ideas from there haha.

I'm working on the next article and I'll post it very soon

Collapse
 
braydentw profile image
Brayden W ⚡️

It might be too early, but any name ideas ;)

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

I'm thinking Typed Lisp, aka Tisp

Collapse
 
braydentw profile image
Brayden W ⚡️

Cool!

Collapse
 
hilariocunha profile image
Hilário Cunha

Hi.
I'm more or less on the same journey, of learning more about programming languages construction.
Started implementing some mini-languages to implement parts of code used in some clients projects.
Now i am exploring language-oriented programming using language workbenches (en.wikipedia.org/wiki/Language_wor...).
I'm starting with mps of jetbrains (jetbrains.com/mps/).
Depending on your goals can be a path worth exploring.

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Wow that's really interesting! Thanks for sharing. Also, all the best!!

Collapse
 
tvinko profile image
Tomaž Vinko

nice, would like to play around with your language

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad • Edited

I have a working example here now: github.com/faraazahmad/tisp

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Hopefully I can get a working demo up and running soon

Collapse
 
seanolad profile image
Sean

nice dude 😎

Collapse
 
faraazahmad profile image
Syed Faraaz Ahmad

Thanks!!