More articles tagged 'ruby'

Unholy: Converting Ruby 1.9 bytecode to Python bytecode

_why is at it again...

I can't quite agree with myself if this is seriously demented or tremendously cool... (Yes, it's mostly only an idea, with only the barest hint of doing anything "useful", but anyway..)


Writing a compiler in Ruby bottom up - step 6

Since we established last time that I'm going to blatantly steal stuff from Lisp, Scheme and friends (as well as from all over the place - I feel no need to be original with this project... Not until we're much further along, anyway), now is the right time to start introducing ...

Customizing the Ruby syntax highlighter for x86 assembler

I wrote about syntax hightlighting in Ruby earlier. The Ruby Syntax library supports Ruby, YAML and XML out of the box. But it's also pretty easy to extend to handle other languages.

Since I've been writing my compiler in Ruby series and including a lot of x86 assembler, I ...

Writing a compiler in Ruby bottom up - step 5

Last time I promised to post these more frequently, and blatantly failed to find the time... In return, I've taken the time to combine what would have been parts 5, 6 and 7, that by themselves would've been annoyingly short. Here goes:

Handle number literals

So far our program have only ...

Writing a compiler in Ruby bottom up - step 4

Sorry for the long delay since the last part, I've simply been too caught up in other stuff. As the list from last time indicated, this part will cover defining functions and adding support for building a simple "runtime library".

Defining functions

A programming language without either functions or methods isn't ...

Mini reviews of 19 Ruby template engines

I've seen lots of template systems in Ruby, but haven't been really been happy with any of them. Over the last few months or so I've kept notes of the ones I looked at. This is the list I came up with, and some comments on each. But first a disclaimer:


- Why am I forced to optimize when choosing my language?

Martin C. Martin wrote a great post on performance and dynamic languages. I particularly loved this quote:

Premature optimization is the root of all evil. Why am I forced to optimize when I am choosing my language, before writing a single line of code?

The post and comments ...

Strawman for a new parser generator

I have very strong opinions when it comes to parser generators. Most parsers I've written have ended up being hand written or have used some half-assed parser generators I've written myself, because I've yet to find a parser generator I like. I've found many I like aspects of, but they invariably ...

Writing a compiler in Ruby bottom up - step 3

Chaining expressions with "do"

So far, the second version from last time can execute one single expression, and that's it. Not very useful. So I need to add a way to chain expressions like in the body of a function.