Evan Martin (evan) wrote in evan_tech,
Evan Martin

ruby sqlite3 = :(

To better support this offline project, I rewrote LogJam's journal export in Ruby. (It's gotta be like 10% of the length of the original code, mostly due to blocks and the GC.)

Unfortunately, libsqlite3-ruby 1.1.0, the latest available, is buggy. A deterministic program dies with a variety of errors when ran multiple times in a row:
/usr/lib/ruby/1.8/sqlite3/driver/native/driver.rb:169:in `sqlite3_step': undefined method `call' for 21:Fixnum (NoMethodError)

/usr/lib/ruby/1.8/sqlite3/driver/native/driver.rb:169:in `sqlite3_step': undefined method `call' for true:TrueClass (NoMethodError)

/usr/lib/ruby/1.8/sqlite3/driver/native/driver.rb:169: [BUG] Segmentation fault
ruby 1.8.4 (2005-12-16) [i486-linux]

Looks like a memory bug. The probably either forgot to register something with the GC or just used something uninitialized. In any case, I need to figure out what approach will be the least painful.

(Update: using DBI's sqlite3 wrapper fixed it, for some reason or another...)
Tags: livejournal, project, ruby

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • google ime

    Japanophiles might be interested to learn that Google released a Japanese IME. IME is the sort of NLP problem that Google is nearly uniquely…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.