What I did
Work on my atlas_plugin branch:
- Set up a framework to build, test, package, and install multiple gems (with C extensions) from the nmatrix repository. This ended up being a lot more complicated than described in the reference below, and deserves a blog post of its own, now available here.
- Removed all external dependencies (CBLAS, CLAPACK) from the core nmatrix gem
- Created a new gem nmatrix-atlas which should eventually implement all the
stuff removed from the core gem. For the time being it just implements one
clapack_getri) as a test, until the design is fully worked out.
- Inventoried BLAS and LAPACK functions in nmatrix
What I learned
Definitely missing a lot of stuff from this list, since I wasn't really keeping track
- Some stuff about gemspecs and Gemfiles, but I think I forgot it already
- In BLAS, a negative stride means access elements in reverse order, starting from the end
- Ways of passing arguments to rake. What was appropriate for me was using
rake whatever arg1=val1, which sets an environment variable
arg1, but you can also pass arguments to specific tasks.
Gem::PackageTask: It turns out that the nmatrix Rakefile has two parallel methods for building and packaging gems.
Gem::PackageTaskadds the package, and repackage tasks (which are the ones listed in the nmatrix docs), while
Bundler::GemHelper.install_tasksadds build, install, and release tasks (which are a secret?). They do basically the same thing, but don't talk to each other. Oh, and also the latter doesn't work with multiple gems. I removed
Bundler::GemHelper.install_tasksand added a custom install task.
- Best practices for rspec
- Multiple gems from same repository
- RSpec shared examples
- Nice reference on Ruby C extensions, unfortunately spread across multiple blog posts with no nice table of contents of anything
- Another reference on Ruby C extensions
- Unfortunately I didn't keep track of the stuff I read about bundler and rubygems