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…

  • 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…

  • ghc llvm

    I read this thesis on an LLVM backend for GHC, primarily because I was curious to learn more about GHC internals. The thesis serves well as an…

  • 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.