Category Archives: Ruby

End Of Iteration 2013w48

Previous Post 
Next Post

Talk about Implementing Ruby

I gave a talk at RubyConf Argentina 2013, about implementing Ruby. Slides source at:

To be viewed online at:

It mentioned my work on RubySharp

my Ruby interpreter written in C#. Now, it can access native types and objects, requiring .rb modules or native .dlls.

My Apps

I updated the repo of my dynamic apps application (Node.js)

I should add MongoDB as first persistence implementation.


I published 0.0.3 version:

The new feature: a “peek” function, to look at the next token, without removing it.

I added the new feature to grammar (my Ruby interpreter in JavaScript).

Other works:

– Update SimpleYaml to support real numbers

– Test refactor of CobolScript

– Update ClojScript to Visual Studio 2010

And I was working on two non-public projects.

This new week will be dedicated to some JavaScript projects and ideas, and to give a one-day course of Node.js

Keep tuned!

Angel “Java” Lopez

TDD Rocks! (6) Playing with Ruby

Previous Post
Previous Post with Ruby

I’m still learning Ruby. To practice the language, I’m writing a Tokenizer using my TDD (Test-Driven Development) workflow.

A new video at

I did two redesigns:

– To provide the text to tokenize in the tokenizer constructor

– Rename getTokens methods to a more "rubyist” name get_tokens

After those redesigns, I dived into a big implementation refactor. Maybe, I had to avoid that work, or split it in more manageable pieces. At the end, I survived, and the tokenizer implementation is started to emerge. You can check another of my implementations, in JavaScript/NodeJs:

The Ruby version is at:

Keep tuned!

Angel “Java” Lopez

End Of Iteration 2013w47

Previous Post
Next Post

Implementing Ruby

My main outcome is my work on implementing Ruby, using C#:

I implemented:

– Access to native types and objects
– Modules
– Classes
– Nested modules and classes
– Require of Ruby programs
– Require of native dlls
– Singleton class
– Examples (console, win forms, http)

I will present this work this week, at RubyConf Argentina 2013

Implementing Ruby in JavaScript

I started a new implementation, this time in JavaScript

It is still work in progress. I’m using SimpleGrammar for the parser/lexer, but I should review this path. Ruby syntax has some quirks to tackle.

Other works:

– Refactor of CobolScript:
– Work on three non-public projects

Keep tuned!

Angel “Java” Lopez

Ruby: Links, News And Resources (6)

Previous Post
Next Post

defunkt / resque
Resque is a Redis-backed Ruby library for creating background jobs, placing them on multiple queues, and processing them later.

bvandenbos / resque-scheduler
A light-weight job scheduling system built on top of resque

Understanding Rack

The Ruby Toolbox

Fiasco is a thin and modular layer on top of Rack inspired by Flask, Jinja2 and Cuba.

List of Ruby Web Frameworks

Cuba is a microframework for web applications.

An introduction to RSpec – Part I

Getting Started with RSpec – Looking for tutorials

Programming for the Web with Ruby

Ruby Guide

bbatsov / ruby-style-guide
A community-driven Ruby coding style guide

Programming Ruby, The Pragmatic Programmer’s Guide

Writing an API Wrapper in Ruby with TDD

Ruby is the New Smalltalk

Why I love Ruby (Part 1)

Lisp in 32 lines of Ruby

.NET to Ruby: Learning How to Write Tests, Part I

NET to Ruby: Learning How to Write Tests, Part II

A lightning talk by Gary Bernhardt from CodeMash 2012

luciolang / lucio
Lucio is a Lisp-like language running on Ruby

Languages, Verbosity, and Java

Infografía: Comparativa entre PHP, Ruby y Python

RSpec 2.8: The Popular Ruby BDD Tool Goes Supersonic

Slido: markdown to html5 slideshow

Monads in Ruby, Part 1: Introduction

My Links

Keep tuned!

Angel “Java” Lopez

End Of Iteration 2013w45

Previous Post
Next Post

I’m exhausted, after my Node.js Knockout participation, last week end.

Node Knockout

It is my main deliverable for past week. I wrote a web application, in two days, from scratch, using Node.js and Express. Video with demo:

It’s running online at:

Now, the repo is private, but I will clone it to my public GitHub account. You can see the votes at:

TDD and JavaScript

I gave a talk at local JavaScript meetup

Code at:

Slides at:

Other works

Minor updates at

Updated require algorithm at

Keep tuned!

Angel “Java” Lopez

TDD Rocks! (1) Playing with Ruby

Next Post
Next Post with Ruby

Past July, I recorded a Google hangout, about on of my favorite topic: TDD (Test-Driven Development).

My first one:

TDD Rocks (1) Playing with Ruby

Well, I’m using Anglish, that is, Angel’s English ;-).

The idea is to show my TDD workflow, step by step, and in this video I’m using Ruby (I’m learning Ruby). In the second video I added more tests, like recognize numbers, words and symbols. I will apply internal refactoring, and a better implementation. I already applied that workflow in my public projects in Ruby:

My Lisp interpreter in Ruby, with access to gems

Code generation, like AjGenesis in .NET, but now using Ruby

In this video, I’m adding the minimal code to past the test. I don’t separate the class under development from the tests: they are in the same files. You can check project status:

I will publish posts with more Google hangouts, with TDD using JavaScript, C#, and more Ruby.

Keep Tuned!

Angel “Java” Lopez

RubySharp, Implementing Ruby In C# (2)

Previous Post
Next Post

I’m working on my Ruby implementation as interpreter written in C#

Today I would like to show that I have implemented many expressions that can be evaluated:

I have implemented commands, too. Initially they were separated:

But now, expressions and commands implement the same interface, to compy with Ruby moto “every is a value”

Evaluate method receives a Context:

I should review if I want or not that Context object has reference to self and other fields. But I wrote all with TDD, so, I could refactor it at any moment.

A code sample, NameExpression .Evaluate method:

public object Evaluate(Context context)
    var result = context.GetValue(;

    if (result is IFunction)
        return ((IFunction)result).Apply(null, emptyvalues);

    return result;

Notice that I had to take into account the case: the name argument refers to a function. In Ruby, you can call a function simply using the name, the parenthesis are not mandatory.

Next steps: internal refactor, more commands and expressions.

Keep tuned!

Angel “Java” Lopez