|
Advertisement
|
Forum posts by Eigen Class:Posted in All Buzz Forum, Jul 10, 2006, 12:34 PM
After reading this thread on ruby-talk, I reviewed my instance_exec implementation and found it totally unacceptable. I used #undef_method instead of #remove_method, what a fool I was! I'll first show why it can be a problem and then explain the causes; the problem is quite general, affecting a number of meta-hacks. Take this script that just...
Posted in All Buzz Forum, Jul 9, 2006, 2:35 PM
You've probably read somewhere that Symbols are never GC'ed in Ruby. And if you've seen this you'll also know that a Symbol takes at least around 60 bytes. But did you keep that in mind the last time you were doing some meta-programming? Very often, you need to come up with a unique name, and write things like name = "__prefix_#{rand(1000000)}"...
Posted in All Buzz Forum, Jul 8, 2006, 9:56 PM
Barely sub-second latencies? Poor searching capabilities and on top of that you have to wait several RTTs and use the mouse?! I never managed to force myself to use del.icio.us. Actually, I didn't really use any bookmark manager; those from the several browsers I run all suck. I just remembered pieces of URLs... But this one I'm liking so far:...
Posted in All Buzz Forum, Jul 4, 2006, 1:30 PM
For those who like scripting their window manager, the most notable change in ruby-wmii 0.3.0 is the new configuration system which preserves your settings across upgrades and allows for extensibility via plugins. Implemented as explained in an earlier posting where I showed the basics of a plugin framework for Ruby apps, the new plugin...
Posted in All Buzz Forum, Jul 2, 2006, 8:33 PM
One of the first things people often ask for when coming to Ruby is a ++ operator. The standard answer to that has always been that such a thing makes no sense in Ruby, since you don't want 1++ to turn literal ones into twos*1. But one thing one doesn't hear that often is that preincrement/predecrement operators can be simulated pretty...
Posted in All Buzz Forum, Jun 30, 2006, 10:35 AM
I remember spending some time implementing a plugin framework in C++ some ~10 years ago. Things have changed greatly since, and when I had to do the same in Ruby some days ago for my Ruby script for the wmii window manager it took me but a few minutes. Goals This is yet another task that becomes so easy in Ruby it seems to fade out, so to say,...
Posted in All Buzz Forum, Jun 21, 2006, 12:19 PM
It seems I'm not the only Rubyist who likes the wmii window manager, so I decided to release my wmiirc configuration in Ruby formally. It's cleaner than the original one, and I've added lots of good stuff: view/tag namespaces, new view switching mechanisms, new actions, improved handling of numeric tags (a superset of _why's bindings, can be...
Posted in All Buzz Forum, Jun 14, 2006, 8:39 PM
With xmas still way too far in time, O-bon (middle of August, for the western part of Japan and the media at least, I read) is the chosen holiday for Ruby's 1.8.5 release. Some milestones (ruby-dev:28711): 1.8.5 preview 1 in around one week time (~ Jun. 20th) 1.8.5 preview 2 around Jul. 12th 1.8.5 preview 3 around Aug. 1st 1.8.5 release ~Aug...
Posted in All Buzz Forum, Jun 14, 2006, 3:16 PM
The AST ruby creates when parsing your code doesn't contain that much information regarding its format. In particular, it only stores one line number per node. Why care? It turns out that this is what Ruby needs to generate meaningful backtrace info and report events to the trace_func and/or event_hook*1. When you have chained method calls with...
Posted in All Buzz Forum, Jun 12, 2006, 11:28 AM
Cross-referenced code coverage reports, which were recently introduced, have been expanded to indicate where methods are called from and which methods were called for each line of code. In addition to that, cross-referenced report generation is now over 4 times faster for applications with deep call stacks (such as Rails apps). As usual, here's...
Posted in All Buzz Forum, Jun 11, 2006, 1:32 PM
At last, enough commit activity on HEAD to justify an update to my summary of changes in Ruby 1.9. It looked as if almost nothing had happened in the last three months (Akira's work on the non-blocking IO stuff and little more) and then came matz's gigantic patch with a load of Ruby2 features... Syntax Those who don't understand the meaning of...
Posted in All Buzz Forum, Jun 6, 2006, 5:58 PM
Proposals for extending Kernel#caller come up regularly on ruby-core and ruby-talk. Indeed, the information it returns in textual form isn't as utile and easy to use as it could be, forcing one to parse it: def foo; bar end def bar; puts caller; end foo kernel_caller.rb:1:in `foo' kernel_caller.rb:3 I decided to implement a Kernel#caller...
Posted in All Buzz Forum, May 30, 2006, 11:56 AM
Yet another release of the rcov code coverage tool for Ruby. The one big feature introduced in this release is the ability to generate cross-referenced reports showing where methods are called from. This should prove useful when you're trying to optimize your program, or even when just trying to understand what is going on. As anticipated in...
Posted in All Buzz Forum, May 29, 2006, 2:15 PM
It's been over one week since the release of wmii-3, the dynamic window manager thats boasts Wimp (Windows, Icons, Menus and Pointing device) is dead! It took me one day to grow accustomed to the new tag-based workspaces, and a couple to stabilize my setup. wmii ships with a few shell scripts that control the behavior of the WM: key bindings,...
Posted in All Buzz Forum, May 27, 2006, 6:15 PM
http://eigenclass.org/static/rcov-sample-report-crossref/ Read more...
|