What have I been up to (summer 2011)

2011-10-08 19:58:51 PST

Tags: , , , ,

Well, aside from being pretty busy with work, I spent some more time playing with OpenGL and Lisp. I took my demo test of a spinning diamond up to the beginnings of a space flight sim. Now we have a ship that has a thruster that applies forward thrust, there is the beginnings of physics. The next logical step would be to add turning, but I wanted to do it with physics, which meant writing torque code and that’s about where I got side tracked and have stopped for the moment. Not super interesting yet, but not bad for someone who has never done 3D programming before. The code is at https://github.com/dballard/flight-sim.



View on YouTube
Video recorded with Record My Desktop

I then got distracted by the idea of a checkers AI by a few articles I read in August. I decided to dust off my Ruby and give that a go but it didn’t get too far before I realized that I was going to have to get side tracked from search in to aggressive pruning and heuristics. I was satisfied with the project even though it doesn’t really play because at it renewed me Ruby which had been shelved since some time last year and reminded me that search of this kind is bloody hard. The code is at https://github.com/dballard/checkers. It can simulate a full game to any depth if you have the time. If you have less than days or years per turn, it’s pretty much no good.

Now I’m getting further distracted by a few ideas in different directions yet again and I’m starting the Stanford AI class and Machine Learning class that they are offering online for free on monday. That should keep me pretty much tied up until years end and I’m looking forward to it all!

Also thanks to my Kobo Touch eReader I’ve been reading a ton, which is nice. I may have to give up my pace of a book every week or two for the next month or two to keep up with the new classes, we shall see.

links for 2010-12-30

2010-12-30 00:10:46 PST

Tags: , ,

links for 2009-08-17

2009-08-17 00:02:56 PST

Tags: , , ,

Ruby 1.9 and mysql-ruby on Gentoo

2009-02-17 23:36:59 PST

Tags: , , , ,

So I like Ruby the language but my two biggest problems are 1) it’s slow, and 2) since it’s a less popular language, it has less bindings.

Anyways, this came to head today. Problem 1 is pretty much solved with Ruby 1.9, which is now not slow, so yeah! However, not all the not large collection of bindings ruby has have been ported to 1.9, and if they have they haven’t necessarily made it into package managers yet.

So far I’m writing off Ubuntu for the moment (it’s ruby and ruby-mysql are out of date), maybe 9.10 will have the latest packages, or maybe I’ll get back to it and compile them all :(, but it’s not too important since the project I’m working on will run on my Gentoo server anyway so that’s where it’s most important to get everything working. So!

To get Ruby 1.9.1 on Gentoo, you need to use the Ruby Overlay, so install layman, and make sure your copy of subversion is compiled with either webdav_neon or webdav_serf so that it can get subversion repositories over http. Then install the ruby overlay

#layman -a ruby

From there you need to unmask dev-lang/ruby in /etc/portage/package.unmask and then you can install it. It will also install the eselect module for configuring ruby 1.8 and ruby 1.9 on your system. Once it’s installed, select Ruby 1.9

# eselect ruby --list
Available Ruby profiles:
  [1]   ruby18 *
  [2]   ruby19 (with Rubygems)
# eselect ruby --set 2
Successfully switched to profile:
  ruby19

Yeah! However I needed mysql support under ruby, which comes from the mysql-ruby package (when online, this is not to be confused with the ruby-mysql package, from the same website, but different and not what you want :/ ).

Sadly, the portage version of mysql-ruby is an old 2.7.something and the overlay version is 2.8, but the only thing that works with ruby 1.9 is 2.8.1. So we need to set that up. Make a copy of the ebuild and edit it in the overlay

# cd /usr/portage/local/layman/ruby/dev-ruby/mysql-ruby
# cp mysql-ruby-2.8.ebuild mysql-ruby-2.8.1.ebuild 

// Edit the new ebuild in your preferred editor and comment out
// line 28 that looks like
//  epatch "${FILESDIR}/${P}-test.patch"
// we don't need the patch anymore

# ebuild mysql-ruby-2.8.1.ebuild digest

And now you have an ebuild for the latest version of mysql-ruby which works with ruby 1.9 so go ahead and install it. Hopefully shortly the ebuild will make the overlay. It’s all just a matter of time really. This is just a transition period hack.

Valid XHTML 1.0!
Valid CSS!
Mindstab.net is proudly powered by WordPress
Entries (RSS) and Comments (RSS).
20 queries. 0.451 seconds.