Mauricio Fernandez

URL rewriting with WEBrick


~12 years ago by Mauricio Fernandez on Eigenclass.
WEBrick isn't as fashionable as it once was, but it's still invaluable for development and testing. I recently needed it to handle rewrite rules, and google...

call_stack 0.1.0: making ruby-breakpoint/Rails' breakpointer work with Ruby 1.8.5


over 12 years ago by Mauricio Fernandez on Eigenclass.
Ruby 1.8.5 has been out for a couple weeks and broke Binding.of_caller and Rail's breakpointer. I'd promised I'd provide a workaround, and I finally wrapped...

Using introspection to get method arguments and other info


over 12 years ago by Mauricio Fernandez on Eigenclass.
I just wrote a small script that uses introspection to tell you the methods defined in a file plus their argument names and default values. It's a quick...

"Inspecting a live Ruby process", easier if you cheat.


over 12 years ago by Mauricio Fernandez on Eigenclass.
Are you still adding printf/puts calls and restarting your app to figure what went wrong? Sometimes, the problem is hard to reproduce, or you only discover...

Ruby internals: a self-study guide to the sources


over 12 years ago by Mauricio Fernandez on Eigenclass.
I want to read Ruby's sources, which order is best? I've been answering to that question a few times a year, sometimes on ruby-talk, and as of late responding...

Bounded space memoization, another new twist


almost 12 years ago by Mauricio Fernandez on Eigenclass.
Everybody knows memoization by now; there's the old Hash trick and a "memoize" module in RAA. But as old as it is, you can always add a new twist. Like...

Ruby rewrites my CSS, eigenclass.org repainted (think of the children and their eyes)


~12 years ago by Mauricio Fernandez on Eigenclass.
_why has repainted eigenclass.org, and made me realize that eigenclass' design can be tiring to the eye if you've not set your monitor to fairly low brightness...

Doing some n-gram analysis over Ruby's docs


~12 years ago by Mauricio Fernandez on Eigenclass.
The first attempts to optimize my pure-Ruby, 200LoC full-text search engine based on suffix arrays (which evolved into the in-progress FTSearch) led me...

Running your tests automatically with autotest wmii, emacs and ratpoison


~12 years ago by Mauricio Fernandez on Eigenclass.
Seeing the bar turn green is great for the morale; this is one of the several benefits of writing tests (even if you don't go fully TDD). Running testsmanually...

Ruby's branching plan, a pic worth more than a ML thread (now with mput's explanation)


~12 years ago by Mauricio Fernandez on Eigenclass.
I have translated mput's explanation (see below) Great, mput (URABE Shyouhei) just saved a slice of everybody's time by releasing this: (lower, left-hand...