Make a New Programming Language

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • kal

    A powerful, easy-to-use, and easy-to-read programming language for the future.

    I spent time on a compile-to-JS language and found it very rewarding: https://github.com/rzimmerman/kal

    This was before async/generators were added to JS and callback hell was quite real. I wanted to shape it in the way I’d learned to program in Visual Basic. Very human readable. The result is no longer useful, but it was a fun goal to have the compiler compile itself.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • Rattle

    I made a little toy compiler for a university project many years back, and I agree with the article - it's quite a nice way to get hands on with syntax and helps you think a bit more deeply about what is actually happening.

    https://github.com/Podginator/Rattle/tree/master

    It used JavaCC, which I found to be a pretty simple way to get up and running.

    I also worked a job that used yacc to create their own DSL for a piece of software. Same thing, really. Easy enough to get up and running, and messing around with.

  • unfuck

    :black_flag: An optimizing Brainfuck to Javascript compiler (by graypegg)

    I think maybe a good middle ground is write an interpreter for an already spec'd esoteric language like brainfuck. [0]

    It's really fun. Brainfuck specifically is great because there's a lot to optimize with only 6 total operations. (An example, multiplication has to be done as repeated addition in a loop, make a multiply AST node! [1]) and you could knock out a (BF => AST => Anything you want) compiler in an afternoon!

    Bonus, there's a lot of really impressive brainfuck scripts out there. Nothing compares to seeing your compiler take in some non-sense ascii, and spit out an application that draws the mandlebrot fractal.

    [0] https://esolangs.org/wiki/Brainfuck

    [1] https://github.com/graypegg/unfuck/blob/master/src/optimiser...

  • concise-encoding

    The secure data format for a modern world

    I haven't made a programming language (and never will), but I did build a BNF-inspired metalanguage for describing text and binary formats to scratch the itch of trying to describe a binary data format I was developing:

    The metalanguage: https://dogma-lang.org/

    It's even got a syntax highlighter: https://marketplace.visualstudio.com/items?itemName=ksteneru...

    The binary format I wanted to describe: https://github.com/kstenerud/concise-encoding/blob/master/cb...

  • yisim

    I'm pretty happy with "json scripting" for an implementation[0] of card game[1] with relatively low rules complexity. For a time it could evaluate arithmetic expressions, but I got rid of it because it was a bit unwieldy. The main pain point is that it's slow.

    [0]: https://github.com/sharpobject/yisim/blob/master/swogi.json

    [1]: https://store.steampowered.com/app/1948800/Yi_Xian_The_Culti...

  • mal

    mal - Make a Lisp

    This is why the Lisp syntax is a great candidate for an exercise in making your own language. For example, Make a Lisp. https://github.com/kanaka/mal

    It's simple to lex and parse into an abstract syntax tree, so you can get on with exploring more interesting aspects of programming beyond the mere syntax. (Not to say that there aren't interesting aspects of grammar and innovative syntax, but those can probably be explored later on as macros.)

  • shuntingYard

    A javascript calculator implementing the Shunting Yard algorithm

    Long time ago I was stuck at the airport and I end up writing a interpreter in Python. I stop the project at arithmetic, so, basically a fancy calculator. After that I saw a really interesting video about Shunting Yard algorithm, so I gave that a got as well [1]. At some point, I want to try to write a programming language, I know a little bit about assembly but it is most theory; haven't done much programming using it (only basic stuff, back in college) but I find it fascinating.

    1 - https://github.com/victorqribeiro/shuntingYard

  • foth

    Tutorial-style FORTH implementation written in golang

    And here's my tutorial FORTH, based upon a thread from hacker news:

    https://github.com/skx/foth

    Forth is always appealing, whether literally, or in puns.

  • crumb

    The Crumb Programming Language

    I built Crumb (https://github.com/liam-ilan/crumb) a year ago, before starting university. It completely changed the way I conceptualized programming as a whole. You start feeling deja-vu every time you open a new language, and the "ah-ha!" feeling you get when you see something in another language you had to think about when implementing your own is super rewarding.

    A year later (this summer) I used Crumb to land my first job at a pretty cool startup! The payoff was way more than I could have ever expected.

  • sharpl

    a custom Lisp

    Highly recommended; and I do mean new. Because having an opinion is good, and validating it is even better. I find it to be mostly educational, humbling and fulfilling; but occasionally VERY frustrating because there's just no end of things to fix and improve.

    https://github.com/codr7/sharpl

  • ClojureCLR

    A port of Clojure to the CLR, part of the Clojure project

  • Bitgrid_C

    A BitGrid emulator, written from scratch in C,

    Making a whole new software/hardware ecosystem is what happens if you keep going... behold... the BitGrid.

    Turing Complete, Actually performant, and possibly crazy enough to work

    [1] https://esolangs.org/wiki/Bitgrid

    [2] https://github.com/mikewarot/Bitgrid

    And my latest attempt at things, because Pascal isn't popular enough, includes C and a Web emulator

    [3] https://github.com/mikewarot/Bitgrid_C

  • goforth

    A fully compiled and forth-like language including a small virtual machine.

    I also came across FORTH through hacker news. I ended up developing a compiler that can translate FORTH into C.

    For the interested reader:

    https://github.com/loscoala/goforth

    It was a great experience and I can only recommend trying to develop a programming language yourself.

  • jank

    A Clojure dialect hosted on LLVM with native C++ interop

    Transducers, in Clojure, are implemented in Clojure, rather than in Java. In jank, the Clojure source for transducers is exactly the same. For example: https://github.com/jank-lang/jank/blob/a14f4d7c7e8097d5ab588...

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?