|
Advertisement
|
Forum posts by Eigen Class:Posted in All Buzz Forum, Sep 8, 2006, 5:27 PM
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 hack, but it works surprisingly well. Here are some examples: $ ruby -rmethod_args -rcsv -e1 CSV::Cell#initialize (data = "", is_null = false) CSV::Cell#data () CSV.open (path, mode, fs = nil,...
Posted in All Buzz Forum, Sep 7, 2006, 3:02 PM
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 it up. I've just released call_stack: backtrace data and 1.8.5-safe breakpoint/Binding.of_caller, which provides an alternative Binding.of_caller implementation and some additional...
Posted in All Buzz Forum, Aug 25, 2006, 1:02 PM
matz just released Ruby 1.8.5. It took a bit longer than originally planned but we can hope it will have been worth it :) I have written a summary of the changes in 1.8.5 similar to the one I maintain for Ruby 1.9; the page is editable and corrections/additions are welcome. Read more...
Posted in All Buzz Forum, Aug 22, 2006, 8:48 PM
You might have heard of Florian Gro��' Binding.of_caller before. More probably, you might have used his breakpoint library (yes, the one included in Rails, which can be used with script/breakpointer). If you read ruby-core a few months ago, you'll know that it only worked thanks to a bug which is being fixed in Ruby 1.8.5. Which means that...
Posted in All Buzz Forum, Aug 22, 2006, 12:48 PM
New stuff added to the ruby-wmii community page (yes, this is a wiki, *hint*) and yet another nail in WIMP's (Windows, Icons, Menus and Pointing) coffin... Nathan Howell emailed me that his ruby-wmii plugins are ready for more exposure. I've been using his ssh magic since he showed it to me about one month ago, and Nathan is to be thanked for...
Posted in All Buzz Forum, Aug 19, 2006, 4:18 AM
I ran into a tricky bug today. I was working on an extension that uses an event_hook and needed quite some time to figure this out: require 'binding_n' def e l = eval("local_variables", binding) puts "The array: #{l.inspect}" l.map do |str| puts "PROCESSING #{str.inspect}" [str, eval(str, binding)] end end Kernel.install_binding_n_hook e...
Posted in All Buzz Forum, Aug 14, 2006, 11:50 AM
I just released ruby-wmii 0.3.1. If you didn't know it, it's a Ruby script plus associated plugins to control the wmii window manager. The most important (and heaviest) change in 0.3.1 is the inclusion of the bookmark manager I wrote about earlier. It can import and sync your bookmarks against del.icio.us, is keypress by keypress the most...
Posted in All Buzz Forum, Aug 12, 2006, 11:50 PM
You might have realized that eigenclass.org has been changing subtly as of late. In addition to the cosmetic modifications, I've upgraded to hiki 0.8.6 and rewritten my hiki hacks as self-contained plugins. The last one I've been working on allows you to enable modifications to a set of nodes without opening up all of the wiki: creation of new...
Posted in All Buzz Forum, Aug 7, 2006, 11:47 AM
Computational archeolinguistics are new new rave. I've been working in a couple archeological sites of major interest, which, albeit well known, still have lots of new ground to be explored. Latest findings This is the first (?) public Ruby release dating from Dec 21 1995. If you can read Japanese, you can have a look at the original release...
Posted in All Buzz Forum, Aug 6, 2006, 3:47 PM
Implementing inline comment previews is trickier than it seems, as trivial as the involved AJAX is. I took a look at a couple familiar blogs and saw that getting it right is relatively difficult. Everybody's beloved redhanded (powered by hobix) can't swallow non-ASCII text: Typo seems to do the Right Thing, but I found at least one browser...
Posted in All Buzz Forum, Aug 4, 2006, 11:48 AM
rcov 0.7.0 can aggregate code coverage and defsite/callsite data collected in successive runs. This is useful when you want to obtain a global coverage rate but your tests are split into several parts, for instance units, functionals and integration, as happens in Rails. Here's how you'd define coverage tasks for unit, functional and...
Posted in All Buzz Forum, Jul 25, 2006, 10:08 PM
In 1967, during excavation for the construction of a new shopping center in Monroeville, Pennsylvania, workers uncovered a vault containing a cache of ancient scrolls. (...) Based on a translation of these documents, we now know that the society, the Cult of the Bound Variable, was devoted to the careful study of computation, over two millennia...
Posted in All Buzz Forum, Jul 20, 2006, 3:06 PM
Here's a trick to modify local variables in the caller scope without using Binding.of_caller. It's not as general, but much faster when it applies (when you're using a "literal" block): def foo(a, &block) raise "Want a block" unless block_given? eval("lambda{|x| whatever = x}", block).call(1) yield a + 1 end whatever = nil a = foo(1){|x| 2...
Posted in All Buzz Forum, Jul 15, 2006, 6:34 PM
I cleanup up my semi-automagic test generator and xmp filter for Ruby, and added some code to make it win32-friendly*1. If you missed it the first times I wrote about it: xmpfilter.rb is basically a source code filter than generate assertions for your tests, and annotate the code to show intermediate results. This picture illustrates the...
Posted in All Buzz Forum, Jul 12, 2006, 12:34 PM
The Rubima editors got some insider information about Ruby's long-term release schedule. As for the events expected in the medium-term, I've detected lots of visits coming from this article in Rubyist Magazine (rubima) which expands on previous RubyKaigi news. Ruby releases beyond 2007 Read more...
|