10

Only scratched the surface trying to write a C compiler in Ruby.

Comments
  • 6
    %rip
  • 0
    Oh did it backend to nasm ?

    Possibly ruby was the wrong choice
    And that’s a pretty involved project

    I once thought of a translator
  • 3
    @YouAllSuck The C code compiles to x86 assembly.

    I wanted to do it in a high level language and recently tried my hands on Ruby.
  • 6
    this is the kind of stuff that interests me not building dashboards with bootstrap and material ui🙄.

    do you happen to know the learning path to take? or do I make a rant?
  • 0
    @ilechuks73 The first thing you need to do is really understand what a compiler is, what goes into building them and stuff, some theory etc

    The second thing you need to do is dive straight into this book: http://craftinginterpreters.com
    That's what I did years ago.

    You'll figure out the rest.
  • 0
    Not saying don't, but have you heard about crystal-lang?
  • 0
  • 0
    Seems interesting, keep us updated yeh?
  • 2
    @Ranchonyx sure.
    I added proper support for primitive types and added pointers. Need energy to carry on. :D
  • 0
    @mirimmad yes but ruby os awful :P
  • 1
    @YouAllSuck I like it, tbh. But, haven't really used it much.
  • 5
    @YouAllSuck You suck 😉
  • 0
    @mirimmad I didn't want to discourage you from continuing your efforts, but also wanted to tell you about crystal-lang.

    It's a language that's based on Ruby syntax but compiles to c.
  • 0
    @sariel that is completely different from what he was doing !

    don't divert him from his efforts !
    we need more people who are able to write compilers and other lower level skills for when we begin killing you cylon baby touchers en masse and need to keeo you out of our computer systems so you can't track and integrate the way you do everywhere else with everything else ! fucking machine !
  • 1
    @mirimmad let the glorious revolution begin ! may the machines perish before the mighty onslaught of our perfect code and specialized arson and shooty shooty devices ! BAHAHAH
  • 0
    I WILL NOT RUN A MAZE OF STUPID NUMERICAL CRAP LIKE A BRAINLESS RAT SEARCHING FOR CHEESE YOU FUCKS !
  • 0
    @ilechuks73

    This is a series I started watching. This guy seems to really understand the process as he has done it quite a few times.

    https://youtube.com/playlist/...

    I am sure there are others out there.
  • 1
    @sariel I knew that it existed.
    Just checked it out. It looks just like ruby.

    Maybe I'll use it next time. 👍
  • 0
    @Demolishun I'm more of a book guy.
  • 0
    @mirimmad Did you find the dragon book? If you search you can find an old copy. I heard the new copy is not as good. I found a PDF.
  • 0
    some explanation this time
    zimmerman tried to fill my head with bs that they think computers are people, or future people. and installing a suse vm represented some cruel action to them.

    its just them pushing off responsibility for their own cruel stupidity on someone else as usual, may they all burn in hell.

    haha
  • 0
    @Demolishun first major chuck of dragon book is devoted to parsing. I don't recommend it to beginners.
  • 1
    @mirimmad check out Engineering a Compiler by Cooper and Torczon
  • 0
    @RememberMe Great book. I prefer it over dragon book.
  • 2
    @mirimmad Dragon Book is overrated, true, but the later chapters are gold. EoC is consistently great. For more stuff than that I read papers or plumb through LLVM's source code, if you know which pass you want it's a pretty nice experience.

    For eg. If you're interested in functional language compilers check out Simon Peyton Jones' papers on the subject (eg. On the spineless tagless G-machine), they're freely available as PDFs on some microsoft site (probably because microsoft research)
  • 0
    @RememberMe SJP's book is a great read. But, I've only leafed through it [a year ago].

    Its probably going to be my next project.
Add Comment