Friday, March 27, 2009

The day of the cross ?

You can download Celestia and see what happened on that day for yourself with this handy little celestia script I wrote this evening. Just save the script to your desktop, launch celestia, and click File, Open Script, and select the file you downloaded.


Wednesday, March 25, 2009

Hebruby ...

Ok, on the very first day that I was keen to try Hebruby
... today ... 2009-3-25 ... it's broken.
$ cat foo.rb
require 'rubygems'
require 'hebruby'

# the 24th
@day =, 3, 24)
@hb =
puts @day.to_s + " = " + @hb.heb_date

# the 26th
@day =, 3, 26)
@hb =
puts @day.to_s + " = " + @hb.heb_date

# the 25th ???
@day =, 3, 25)
@hb =
puts @day.to_s + " = " + @hb.heb_date
Seems simple enough, right? I mean Hebruby is in the current list of gems today, and it's not like we change the calendaring system everyday.
# gem list Hebruby --details --remote

Hebruby (1.2.1)
Author: Ron Evans

Hebruby is a Ruby library to convert julian dates to hebrew dates,
and vice-versa.
You cant make this stuff up.
$ ruby foo.rb
2009-03-24 = כ"ז באדר התשס"ט
2009-03-26 = א' בניסן התשס"ט
/usr/lib/ruby/gems/1.8/gems/Hebruby-1.2.1/lib/hebruby.rb:101:in `heb_date': undefined method `+' for nil:NilClass (NoMethodError)
from foo.rb:17
I guess there is no word in Hebrew for "coincidence"?

Sunday, March 22, 2009

Direct3D9 is not available without opengl ... EVE Online ... and other games

I was using fedora 9 and attempting to install EVE Online, and was unable to get past the splash screen after an otherwise successful install using wine-1.1.17. I was getting the following errors:
$ wine eve.exe
err:ole:CoGetClassObject class {9a5ea990-3034-4d6f-9128-01f3c61022bc} not
err:ole:CoGetClassObject no class object
{9a5ea990-3034-4d6f-9128-01f3c61022bc} could be created for context 0x1
fixme:heap:HeapSetInformation 0x8d0000 0 0x33fc70 4
err:d3d:WineD3D_CreateFakeGLContext Can't find a suitable iPixelFormat
err:d3d:InitAdapters Failed to get a gl context for default adapter
err:d3d:WineDirect3DCreate Direct3D9 is not available without opengl
This was kind of confusing because opengl was working just fine with my nVidia drivers on the machine as follows:
$ glxinfo | grep direct
direct rendering: Yes
Well, here are the basic commands and steps i used to correct the problem and start playing EVE Online:
1. rm -rf ~/.wine
2. remove the following packages that do NOT work for EVE Online
3. installed the following packages so that wine would work better. Obviously not all of those packages are necessary to get wine to compile, but that's what the following step's page suggested we install in order to get a clean wine compile on 64bit fedora 9.
4. recompiled wine-1.1.17 with this procedure
5. wine winecfg (and set the audio to the ALSA that it defaulted to).
6. sh winetricks corefonts
7. wine EVE_Premium_Setup_84609_m.exe (installing EVE)
And now everything is working as you can see from the screenshot of me undocking from a station above (click to enlarge :-).

The main things I was apparently missing were the following packages before installing wine:
kmod-nvidia-beta.x86_64 180.11.02-1.fc9.2 installed
xorg-x11-drv-nvidia-beta-libs.i386 180.11.02-2.fc9 installed
xorg-x11-drv-nvidia-beta.x86_64 180.11.02-2.fc9 installed
I was using these which did NOT work:
kmod-nvidia.x86_64 173.14.15-1.fc9.11 installed
xorg-x11-drv-nvidia-libs.x86_64 173.14.15-2.fc9 installed
xorg-x11-drv-nvidia.x86_64 173.14.15-2.fc9 installed
So basically, use version 180 of the nvidia drivers, instead of the more common 173. Here is some more info about what I'm running here:
# uname -r
# lspci | grep nV
01:00.0 VGA controller: nVidia Corporation GeForce 8500 GT (rev a1)
# wine --version
Hope that helps someone.

UPDATE: the next patch installed just fine using the command:
wine evepremiumpatch84609-85476_m.exe
UPDATE: the next patch also installed just fine using the command:
wine evepremiumpatch85476-86756_m.exe
UPDATE: the next patch also installed fine using the command:
$ wine evepremiumpatch86756-88737_m.exe
UPDATE: the next patch also installed fine using the command:
$ wine evepremiumpatch88737-88974_m.exe
UPDATE: the next patch also installed fine as follows:
$ wine evepremiumpatch88974-89883_m.exe
fixme:shell:SHAutoComplete SHAutoComplete stub
fixme:exec:SHELL_execute flags ignored: 0x00000180
fixme:advapi:CheckTokenMembership ((nil) 0x13b920 0x33fb44) stub!
fixme:reg:GetNativeSystemInfo (0x33fb38) using GetSystemInfo()
fixme:mscoree:GetCORVersion (0x33f730, 600, 0x33f71c): semi-stub!
err:setupapi:do_file_copyW Unsupported style(s) 0x144

Friday, March 20, 2009

Wednesday, March 18, 2009

grep using octal patterns and avoid grep: Invalid back reference

Have you ever had a line in a file like this?
This line is fine
This line has  nasty character in it
This line is fine
And then after you read the man page for grep you may have tried this to grep these characters and gotten an error:
$ grep '\240' foo
grep: Invalid back reference
Well, try this instead:
$ grep $'\240' foo
This line has   nasty character in it
Hope that helps.

P.S. Here is a way to use octal dump (od) to figure out the octal value of the nasty character you are trying to match ... in this case it's the "240":
$ grep nasty foo | od -c
0000000 T h i s l i n e h a s 240 n
0000020 a s t y c h a r a c t e r i
0000040 n i t . \n

Saturday, March 14, 2009

A Mighty Fortress is our God.

It's not in one of the proper languages like number seven is here ... a worthy attempt at praise, I must say, but this has always been my favorite rendition of this classic.

It's amazing how much power can come from only five voices praising the Lord.

Friday, March 13, 2009

Here is a div or picture slider

Here is a snapshot of a jquery slider I just did for a special olympics site.
(Click to see the demo)
I have not tested it in internet exploder yet. It can slide pictures, or in this case divs containing pictures. You may find something hidden there ... let us know if you do :-)


UPDATE: The code has been improved now. It only requires nested divs, instead of an unordered list. It also now only requires jquery itself. Hope that helps.

If you make any improvements, just email me and let me know.

Thursday, March 12, 2009

Climbing trees, feeding birds, and smiling

(Click to enlarge)

Praise the Lord.

Friday, March 06, 2009

Men are Four

The father of a good friend of ours made her memorize this ...

1. He who knows not, but thinks he knows, he is a fool - shun him.

2. He who knows not and knows he knows not, he is a child - guide him.

3. He who knows and knows not he knows, he is asleep - awaken him.

4. He who knows and knows he knows, he is wise - follow him.

She recalled this after listening to musings of Ed Burns on the writing of his book, Secrets of the Rockstar Programmers. She noted the similarity to the five orders of ignorance, described in the book.