RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  

vidarh — 21 posts

I've just posted part 31 of my series on writing a ruby compiler in Ruby - it covers basic String output and string interpolation. Also I believe I forgot to announce part 30 which removed the last tiny bit of C support code
Here is part 29 of my series on writing a Ruby compiler. Almost there in wrapping up the removal of the last vestiges of C. This time it covers putting the (very basic, primitive) start of a Fixnum implementation to use.
Part 28 of my article series on writing a Ruby compiler in Ruby is out - this part deals with turning number constants into Fixnum objects.
I love Graphviz, and thanks to inspiration from a PHP project I've written some Ruby code to make it easy to inline Graphviz graphs, with a Rack middleware to intercept requests for image versions of the graphs and render them.
I've just posted part 27 of my Ruby compiler series. This time I start removing the last little bit of C (a tiny runtime library providing stuff that's better as built in primitives).
Took me about two years, but this part is about adding debug info that gdb can use, and I have a bunch of additional posts written.
Some thoughts about problems and possible solutions for compiling Ruby - as it turns out Ruby has quite a few features that, while making it very pleasant to use makes compiling it efficiently a pretty big challenge.
To get inspiration for the work on my compiler series, I spent quite some time going through MRI to get a better idea of exactly how it all hands together. The result is a post on the Ruby Object Model. It doesn't contain much new stuff if you already understand the inheritance structure of Ruby completely, but if things like meta classes confuse you, and you wonder about implementation details, you might find it useful.
Sliding stats is a small Rack Middleware component that provides you with a couple of graphs and a table to give you a quick overview of what's going on with traffic to your web apps right now - it keeps a "sliding window" over the last N (configurable) number of requests.
Extending the parser to start supporting some (basic and superficial so far) Ruby-like syntax.
This time it's finally time to start adding a parser, starting with a simple s-expression style parser.
The 14th part of my series. This part is about handling variable length functions
I wanted a hack to visualize programs from my compiler project using Graphviz. The script will turn arbitrary arrays containing other arrays or objects that respond to #to_s and turn it into a tree structure.
This part on writing a compiler in Ruby deals with adding support for local variables.
A step by step walk through of a simple operator precedence parser in Ruby.
I just posted part 12 of my series on writing a compiler in Ruby - this part is about adding basic support for arrays.
I've finally posted part 11 in my series on writing a compiler in Ruby. This part deals with splitting out most of the x86 specific code generation into a separate class to make the main compiler code more portable and maintainable.
In the 10th part of my series on writing a compiler in Ruby I use the language to bootstrap a simple "parser" (and I use the term VERY loosely) for test purposes that will take a Lisp-like syntax and turn it into a tree of Ruby arrays to compile.
The 9th part in my series on writing a compiler in Ruby bottom up is out. This part covers implementing while loops.
Part 8 of my series on writing a compiler in Ruby is out this part covers assignment, and some small C runtime support and comparisons
TraceViz: A Ruby script that creates a graph from multiple traceroute's to (optionally) multiple target sites, and then generates a diagram from the result using GraphViz.