More Articles  

Writing a (Ruby) compiler in Ruby bottom up - step 38

I've been lazy again. Just today I realized that not only has it been two months since last post, but I still have one more post queued than I thought. I hope to clean up the next post in 2-3 weeks time, and another one in the following 2-3 weeks. I've ...

Writing a (Ruby) compiler in Ruby bottom up - step 37

(I will be at the Brighton Ruby Conference on Monday July 20th if you're attending and follow my series or just want to talk about Ruby in general, I'm happy to have a chat)

Default arguments

First order of business today is to get rid of this abomination from last ...

Writing a (Ruby) compiler in Ruby bottom up - step 36

Scanning for problems

Where we left off last time, we'd just barely scratched the surface of what it will take to self-host the Scanner.

This time we'll keep digging into that. I will skip or gloss over fixes to some bugs etc., and focus mostly on the bits that are filling ...

Writing a (Ruby) compiler in Ruby bottom up - step 35

Towards Self Hosting

As mentioned last time, this time around, I've first landed a number of changes that will make the parser able to parse the entire compiler (whether or not it parses it correctly or not remains to be seen, and is outside the scope).

You can find these ...

Writing a (Ruby) compiler in Ruby bottom up - step 34

Putting Self In A Register

Where we left off, we had a simple but tolerable register allocator. But as it happens, for now at least the code will not often get all that huge benefits from it, for the simple reason that a huge amount of a typical Ruby application consists ...

The Oberon-07 language report is 17 pages

Niklaus Wirth turned 80 this year, and when stumbling on this link on HackerNews, I was reminded that I have had some notes sitting around in my drafts for a long time.

The Oberon-07 language report

You can find the PDF here

It starts with an Albert Einstein ...

Writing a (Ruby) compiler in Ruby bottom up - step 33

It took me two months to push this out, but I promise it doesn't mean I'm about to stop publishing these again anytime soon. I intend to shorten my "lead time" further again, so I'm hoping to publish the next one in 2-3 weeks time.

Register Allocation

We saw in some ...

Writing a (Ruby) compiler in Ruby bottom up - step 32

Testing And Debugging Code Generation

Unit testing code generation poses some particular challenges because so many things can go wrong, and they can go wrong in all kinds of horrible ways that makes them extremely nasty to track down,

Writing a (Ruby) compiler in Ruby bottom up - step 31

I promised to get a second part out in December somewhere, and it seems like I only barely made it. I'm still hoping to push two out in January, but that's contingent on actually getting time to finish the next one too. But there'll be at least one in January, sometimes ...