Compiler in ruby bottom up



Articles tagged 'compiler-in-Ruby-bottom-up'

2015-07-26
Writing a (Ruby) compiler in Ruby bottom up - step 45

Send

One of the great "joys" of trying to compile Ruby is the level of dynamism. Especially when trying to make the compiler as static as possible.

2015-03-17
Writing a (Ruby) compiler in Ruby bottom up - step 44

Further misadventures on the way to self-hosting

In which we continue the circuitous approach towards parsing s-expressions.

2015-02-02
Writing a (Ruby) compiler in Ruby bottom up - step 43

Eigenclasses

Eigenclasses, or meta-classes in Ruby are effectively regular classes that gets "injected" into the inheritance chain, but hidden...

2014-12-07
Writing a (Ruby) compiler in Ruby bottom up - step 42

Re-opening class definitions

The main reason for handling re-opening of class-definitions at this stage, is for a simple reason:

We're going to attack eigenclasses soon, and being able to handle class re-opening makes that a lot simpler in addition to being needed in and of itself too.

Part of the reason ...

2014-11-12
Writing a (Ruby) compiler in Ruby bottom up - step 41

Messy further steps towards self-hosting

This part is going to be a hodge-podge of changes, as I walk through a good chunk of changes needed to prepare to compile the tokenization code in tokenizer.rb, and improves what we can handle from scanner.rb.

I'm going to start by briefly talking about this ...

2014-11-05
Writing a (Ruby) compiler in Ruby bottom up - step 40

Untangling Expect

Next up in my attempt to self-host parts of the parser, is Scanner#expect. This was no fun, and this part again recounts a long string of attempts at addressing relatively small annoying issues that will seem disjoint and probably confusing, but possibly useful in showing some of the debugging ...

2014-09-30
Writing a (Ruby) compiler in Ruby bottom up - step 39

To be or not to be nil

One of the big elephants sauntering around the room for a long time has been the issue of how to handle the specifics of how Ruby handles nil, true and false. To a lesser extent this issue also affects numbers, but it is those ...

2014-09-28
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 ...

2014-07-19
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 ...