Moved to https://pavi2410.me/blog/my-experience-in-building-my-own-programming-languages-for-fun-and-profit
REPLisp: Another New Language!?
Pavitra Golchha ・ Nov 25 '18 ・ 1 min read
Repl.it's PL JAM
We believe we need fresh ideas in programming! We're sponsoring a team with the most creative ideas and prototype to build their dream language.
During the mid-late of August this year, @replit organised a programming language jam/hackathon, which gave me a brilliant opportunity to fulfil my dream of creating my own programming language from absolute scratch and is not a Lisp dialect 😅.
FateLang FloLang - Our Jam Submission
As part of the jam, we (Matthew, Lukas, and I) began working on creating a language collaboratively using repl.it & Discord despite the day and night difference in our timezones. They are excellent in what they do and have a great knowledge of programming. This made it easier for me to collaborate and share my ideas with them. They are also very creative - they have created a Discord bot which runs our REPL, developed the FloShell for our lang's website, and most importantly, came up with the name of the lang (the toughest part 😅).
So, coming to the language part, the language we created is called 'FloLang' (formerly, FateLang). It is an interpreted language written in pure JS. The language is inspired by mostly JS, Python and Koltin. We took the concise syntax of Kotlin and the dynamic typing of JS and merged them into our lang. We use PegJS parser to parse the syntax using PEG (Parsing Expression Grammar) syntax (Yeah! a language to define a language!). We used to write the parser by hand but that proved to be tedious and error-prone. Further, we plan to switch to using Ohm.
FloLang was made with simplicity in mind. We didn’t want it to be overly complicated like other languages. We tried to add unique touches to it, one of which is "whitespace manipulators". It is an extension to strings which allows FloLang programmers to add n number of whitespaces easily. It is useful in managing long spaces, indenting texts and IDK :D
set socialDistancing = "hello\s(10)world"
This snippet will create a string in which "hello" and "world" are separated by 10 spaces, like so:
You can even try our lang right here:
Learn more about FloLang in the replit's lang jam submission post
To encourage anyone who is curious about making their own programming language, I am leaving links to some of the resources which I gathered during my journey (not exhaustive).
Top comments (1)