More articles tagged 'ruby'

2009-02-20
Writing a compiler in Ruby bottom up - step 17

The code as at the end of this part can be found here

I won't promise to keep up the posting frequency I've kept over the last week or so, but here's a tiny little part showing the next step. This time we're getting rid of "let". Well, sort of. I won't ...

2009-02-19
Sliding Stats: Rack Middleware to keep an eye on your traffic

Sliding Stats is a small little piece of code I'm working on to plug into any Rack enabled Ruby web app (and practically any Ruby web-framework can work with Rack these days) to give me glimpse of what's going on without having to tail referrer logs etc.
It doesn't do ...

2009-02-17
Writing a compiler in Ruby bottom up - step 16

From now on I'm not going to cover every little change - too much of it is repetitive, but I'll keep posting parts of this series to cover major changes. If you want to keep track of the changes "blow by blow",  Read more

2009-02-14
Writing a compiler in Ruby bottom up - step 15

Starting on the parser

The time has come. All the previous parts to this series were mostly written a long time ago, but went through various cleanups. I originally said I had 20 lines up, but as I went through them many were consolidated into larger ones. This is the first ...

2009-02-12
Writing a compiler in Ruby bottom up - step 14

Supporting variable length arguments

The C way handles variable length arguments is to let the caller push as much as they'd like onto the stack. It's then up to the callee to make sure they don't access too much, and there's really no way for the C function to know how ...

2009-02-03
Simple charts in Ruby using SVG::Graph

One thing that comes up time and time again when I mess around with a system, is quickly looking at frequencies of various things - for example disk usage by sub-directory, or referrer entries in my Apache access log.  Like this:http://librsvg.sourceforge.net/

# cat /var/log/httpd/access_log | cut -d' ' -f11 | grep ...

2009-02-01
Just added a github repository for my compiler series

If you're following my compiler series you can now find a github repository here. For now I've just added the code published so far, but when I reach the end of the already written material I'll start making more fine grained commits.
Fork away :)

...

2009-01-31
Creating Graphviz graphs from Ruby arrays

As part of my compiler project I wanted a way to visualize the programs, and since the syntax tree (so far at least) is represented with plain Ruby arrays I decided to throw together a script to use Graphviz to generate some graphs. I've written about using Graphviz ...

2009-01-25
Writing a compiler in Ruby bottom up - step 13

It's been a few months, and apart from my side step into parser land I haven't had much time to keep posting this series, in part because of work, and part because of repeated illness that after being poked and prodded and x-rayed and being subjected to ultrasound (no, I'm not ...