30
lxmcf
6y

Turns out writing interpreters is just a gateway drug and all I want to do now is build a compiler and custom language runtime...

Comments
  • 0
    Excatly.
  • 2
    Welcome to the dark side of programming. Would you care to try some of this here LLVM?
  • 0
    Soo like inventing a language.. Then
    Or..
  • 2
    @rant1ng I wrote one.
  • 0
    @mirimmad really.. Can I see it
  • 2
    @rant1ng on my GitHub. GitHub/mirimmad
  • 2
  • 1
    @rant1ng getting a basic interpreter up and running is pretty easy, and a ton of fun, especially if you know a functional programming language. Try making a simple Lisp/Scheme interpreter, or an interpreter for an assembly language.

    Also now that I think about it, it's funny how both of the above example are so close to two of the great mathematical foundations of computation - lambda calculus and Turing machines.

    You can try out another foundational concept, combinator calculus, by building an interpreter for an SKI combinator system.
  • 1
    In the context of writing interpreters I always recommend https://craftinginterpreters.com and https://interpreterbook.com .
  • 1
    Wrote some basic assembly compiler to my machine code. Then wrote basic nodejs make build system...what's next...
  • 1
    @bootleg-dev They are the best. Back in January, I was short of money but was eager to lay hands on Interpreter book. I contacted Thorsten, he sent me a free copy (digital).
  • 1
    @mirimmad Yes, also there is now a sequel, the compiler book: https://compilerbook.com/

    I already got it but I hadn't had the time to start reading it yet.
  • 2
    @bootleg-dev if you've digital version, can you mail it to me?
  • 1
    @rant1ng preferably build a compiler for a already known language but then build a compiler and runtime for my own language
  • 2
    @RememberMe nah I want to build one from the ground up haha, I like torturing myself
  • 1
    @lxmcf its actually a dream/goal of mine

    I slot it into one of those things I'll do in a number of years from now, and even then, a maybe, it's a huge task, obviously

    it would be a programming language with 0 learning curve for "normal" people to interact with their iot shit

    I know, I know *ducks under eggs thrown* ..... I know

    but 20 years from now, I bet someone will do that, or sooner

    *ducks away from boot thrown*

    I know, shutup!
  • 1
    @lxmcf go for it man

    plan it out, dedicate the resources, see the dream, and do it :)

    must be a reason you want to? or just for the fun of it?
  • 1
    @rant1ng because I can really, I can't seem to finish projects so why not build something that could help others finish there own projects, help others be better than me tbh
  • 0
    @lxmcf and that is how it should be when you're starting off, yes.
    Have a look at it after you're done building a few though, lol.
  • 1
    @RememberMe ah fair point, still only in the pre-production stage of an interpreter so still a long ways off
  • 0
    @rant1ng wouldn't you say that Python already does that? I mean, being easy to learn was literally a design goal and its effect can been seen in its massive popularity outside mainstream dev.

    Also, there's only so much that you can do to simplify a language, if you simplify too much it can actually end up being much more complicated to do anything but very basic stuff. There is a baseline level of complexity that just has to be there.
  • 0
    @lxmcf

    don't start something you won't finish

    finish something you think you'll never finish

    you'll get good at making sure you don't waste your time in the future

    trust me, even if the project goes nowhere, it pays off in experience points for the next thing you do
  • 0
    @rant1ng Oh i know i can finish all of my projects but I just loose interest or start over complicating things, was building a simple CLI game and wanted to make it easy to build more content so ended up building an extensive modding system that just took over all my time and led into other projects...

    My ego is like a disease when it comes to my projects.
Add Comment