Poulsbo + Xorg 1.7 = (Hope you like downgrading)

May 11th, 2010

If you happen to use Gentoo on a Notebook, you may already know this. If not..

At the time of this writing, If you have a Poulsbo video card (another craptastic Intel invention) do _not_ upgrade to xorg-server 1.7. Stay on 1.6.5-r1 or whatever you have. If you upgrade, xorg will just refuse to work for you, and downgrading is kind of a pain.

If you have upgraded already, then here’s what to do:

http://bugs.gentoo.org/show_bug.cgi?id=290679#c4

After doing this, you’ll need to also mask >xorg-server-1.6.5-r1, then re-install the old xorg-server, and finally re-emerge everything you have installed from the category x11-drivers.

Have fun!

Work and martial arts

May 10th, 2010

Funny how, when I’m busy, I stop updating this blog, isn’t it.

I’m learning a good amount on HTTP, Perl (specifically CGI) and working on using TDD with Ruby/Rails: it’s a mindset.

Regarding martial arts, sensei helped me figure out that my punches are all wrong, and the issue has been traced to lower back muscles. Thankfully, I’ve got tons of subway time now, so I can practice standing. For those of you who don’t study martial arts… That last sentence is not a joke.

On an unrelated note: I always enjoy the fact that ‘martial arts’ is commonly mistyped as ‘marital arts’. I knew the two were similar (*grin*), but some sentences are downright hilarious.

New position at Cyrus

April 22nd, 2010

On Monday, April 26th, I am starting a new job at Cyrus Innovation. It may well be fair that I am starting a new career – it’s a hop, skip and jump for me. I’m switching from Systems Administration / Tech Support / Hell desk (not a typo, sadly) to Development / Programming.

I am very much looking forward to it. It means a hobby/job switch: I will now do sysadmin stuff as a hobby, and programming as a full-time job. We’ll see how it works out :)

I remember looking up to the early programmers in awe – they were wizards, and their skill probably couldn’t be equaled, reached, or even, likely, attempted. Then came Ruby. There will always be master hackers – but with Ruby, and its community, it seems that everything is easily at hand. People care about making code elegant and accessible. Things which would take lines and lines of codes in other languages are usually between one and four lines. It’s powerful. And it’s not difficult. The most arcane and powerful elements of the language are … Accessible. The code doesn’t get in the way of the mental gymnastics.

I’m sure I’ll be using other languages – it’s a good way to grow, after all – and I look forward to it. Finally: a place where I can, and will, always be learning.

Ruby callbacks (hooks)

March 31st, 2010

Hooks are a fascinating bit of Ruby magic. They are methods you can define with actions to run when something happens. You can put triggers in your code.

This blog post explains them very well; and for more information, get “Metaprogramming Ruby”, which is a great book – not only about the callbacks, but about a host of information.

Nidan test

March 19th, 2010

On February 28th, 2010, I took the test to become a second-degree black belt.

Here is a summary of what I had to do, besides the calisthenics:

  • All my empty-hand forms, opposite side. There are eight of them. This meant that if the first step was with the left foot, I had to do it with the right foot. I suppose you could also call that ‘mirror’. The names are : seisan, seiuchin, naihanchi, wonsu, chinto, kusanku, sunsu, and sanchin. I admit we did not do sanchin opposite side, but that’s not too surprising. It’s not a complex form, but there’s nothing to be gained from being able to do it regular and opposite side.
  • My first weapon form, opposite side. This is a bo (long staff) form. The name is tokumine no kun.
  • My third weapon form. This is a bo form. The name is urashi bo (sometimes called urashi no kun).
  • My fourth weapon form. This is a sai form. the name is chatan yara no sai.
  • The fifth weapon form. Note that I said “The” and not “My” … Because I hadn’t learned it. I was told to stay with the group and keep up. I did. That is my proud moment. :) It is a tonfa form. The name is hamahia no tonfa.
  • Self-defense, including bunkai (analysis) from the various empty-hand forms.
  • Knife defenses
  • Sparring. This was actually rather fun, about thirty people in line and we (everyone testing for nidan) fought them one after another.

It was tough, but it was mostly a mind exercise. I must admit not remembering any thoughts or feelings during the test; I heard the instructions and executed them, and waited for the next instructions.

I passed.

Phew.

Alright, let’s work towards the next steps.

Github’s customer service: bad review

March 12th, 2010

I will readily admit that I don’t know all that much about Github or Git for that matter. I use them, they’re handy, and that’s where it stops. I read about a git feature called “smart HTTP”, which would allow to communicate both ways with git (push and pull) with HTTP or HTTPS. So, I asked Github about it – it would be nice for them to have this feature, because I currently can’t push to Github from work. Here’s how the exchange went.
(this first message is from memory, as I used the web interface, so I don’t have a copy of it)
Me:
Hi, I just read about this: http://progit.org/2010/03/04/smart-http.html and I would like to know when Github plans on implementing this, because it would be very useful.
_______
From: Tekkub (Support staff)
Subject: [Contact] Upgrading git to support smart HTTP ?

You do know that Scott (the guy who wrote Pro Git) works for us, right? We’re well
aware of smart http…
_______
I tried to make light of the condescending tone and sent the following reply:
Me:
Nope.. Had no idea.
So when will it be implemented? ;)
_______
From: Tekkub (Support staff)
Subject: [Contact] Upgrading git to support smart HTTP ?

It will be implemented when it is…
_______

That’s when I just gave up. I don’t know if whoever handles the messages is paid or not, but I’m pretty sure Github pays its employees by now. I’m using a free account, so they wouldn’t lose anything by me leaving them, and they do provide a great service.
Am I just being picky when I expect the support staff to be polite? I say this as someone who has worked as support staff for over three years: no. The support staff SHOULD, nay, MUST be polite. I don’t care how flat your company hierarchy is, I don’t care how young or forward-thinking the company is, and I especially don’t care if your target audience is Asperger’s syndrome-suffering programmers who laugh at Star Trek jokes and read slash fiction. You’re the support, you’re polite. Especially over a medium like text, where you can’t easily place a slap on the shoulder, a grin and a wink.

This has left a bad taste in my mouth.

Teaching kusanku to sankyu

March 11th, 2010

Last night, after some kicking drills and sparring, sensei entrusted the adult class to me and told us to work on kusanku. The ‘adult class’ yesterday consisted of three sankyu.
I looked at the clock, rubbed my hands together and said “Alright everyone, we have twenty-five minutes’ worth of kusanku. Let me know if you have questions or doubts.”
When we had finished walking through it, I looked at the clock. I’d spent twenty minutes on the form, and they all looked happy. I don’t think I really stood still for more than a few seconds at a time during those twenty minutes.
It reminded me of the first time I led the adult class, and I spent twenty-five minutes on seisan kata. I distinctly remember that it did not go quite as smoothly. It is usually hard to convince ranks under shodan that seisan is a very important, subtle kata, full of knowledge to be examined ;-) It’s a realization they must come to by themselves.

My favorite moment of those twenty minutes (besides the part where they all had a big smile, at the end), was one of the signature kusanku moves (koza dachi, right hand shuto to the throat, left hand behind your head like in seiuchin). I knelt by each one, adjusted the position of their rear foot with my hands, then stood up and watched their faces light up as the lesson sank in – in the proper stance, the legs and hips are looser, and thus the hips can turn more and still be more comfortable!

I _like_ teaching.

Gentoo on a Dell Inspiron Mini 10

March 1st, 2010

There are a few gotchas:
1) If you have a SSD drive, you need to modprobe pata_sch to see it.
2) when using GRUB, install it on whatever drive the hard drive is, even if it’s /dev/sdc — and let your FSTAB use /dev/sda. Chances are that /dev/sda is your liveUSB.
3) In the kernel, in the I2C options, don’t let it pick automatically – instead, select the algorithm options in the menu that appears (I don’t know it off-hand, will edit this post later to add the important information). This will allow you to install the kernel driver for the poulsbo card (kmod-psb, I believe).

For the rest, so far, it seems that the howto on the Gentoo wiki is good. I installed e17 very painlessly.

Wireless was a bit trickier.
I needed to use gentoo-sources-2.6.33, which at the time of this writing was masked as ~x86. A big advantage though is that it has support for the Atom processor (and the proper driver for the broadcom card!).
Enable the “B43″ driver in the kernel.
Then, follow the instructions given here:

git clone http://git.bu3sch.de/git/b43-tools.git
cd b43-tools/fwcutter
make
cd ..

Use version 4.174.64.19 of Broadcom’s proprietary driver. (The tarball is mislabeled as “4.178.10.4″, but it is actually 4.174.64.19.)
Download and extract the firmware from this driver tarball (Gentoo’s installation directory for this is /lib/firmware):

export FIRMWARE_INSTALL_DIR=”/lib/firmware”
wget http://downloads.openwrt.org/sources/broadcom-wl-4.178.10.4.tar.bz2
tar xjf broadcom-wl-4.178.10.4.tar.bz2
cd broadcom-wl-4.178.10.4/linux
sudo ../../fwcutter/b43-fwcutter -w “$FIRMWARE_INSTALL_DIR” wl_apsta.o

At the time of this writing, although the b43-firmware is available and promises to give us what we need, the b43-fwcutter tool is only at version 12, and not 13, so it can’t be used. This is why we need to use git to download the latest version and correctly build the firmware by hand.

Country alert levels #funny

January 20th, 2010

Let’s break the monotony with something funny:

The English are feeling the pinch in relation to recent terrorist threats? and have raised their security level from “Miffed” to “Peeved.” Soon, ?though, security levels may be raised yet again to “Irritated” or even “A? Bit Cross.” The English have not been “A Bit Cross” since the blitz in 1940 ?when tea supplies all but ran out.

Terrorists have been re-categorized from ?”Tiresome” to a “Bloody Nuisance.” The last time the British issued a? “Bloody Nuisance” warning level was in 1588 when threatened by the Spanish Armada.??

The Scots raised their threat level from “Pissed Off” to “Let’s get the? Bastards” They don’t have any other levels. This is the reason they have? been used on the front line of the British army for the last 300 years.

??The French government announced yesterday that it has raised its terror ?alert level from “Run” to “Hide”. The only two higher levels in France are? “Collaborate” and “Surrender.” The rise was precipitated by a recent fire?that destroyed France’s white flag factory, effectively paralyzing the ?country’s military capability.

It’s not only the French who are on a? heightened level of alert.
Italy has increased the alert level from “Shout ?loudly and excitedly” to “Elaborate Military Posturing.” Two more levels ?remain: “Ineffective Combat Operations” and “Change Sides.”?

?The Germans also increased their alert state from “Disdainful Arrogance” to?”Dress in Uniform and Sing Marching Songs.” They also have two higher? levels: “Invade a Neighbour” and “Lose”.?

?Belgians, on the other hand, are all on holiday as usual, and the only ?threat they are worried about is NATO pulling out of Brussels.

??The Spanish are all excited to see their new submarines ready to deploy. ?These beautifully designed subs have glass bottoms so the new Spanish navy ?can get a really good look at the old Spanish navy.??

Americans meanwhile and as usual are carrying out pre-emptive strikes, on?all of their allies, just in case.?

?And in the southern hemisphere…

??New Zealand has also raised its security levels – from “baaa” to “BAAAA!”. ?Due to continuing defense cutbacks (the airforce being a squadron of spotty ?teenagers flying paper aeroplanes and the navy some toy boats in the Prime?Minister’s bath), New Zealand only has one more level of escalation, which? is “I hope Australia will come and rescue us”.??

Australia , meanwhile, has raised its security level from “No worries” to?”She’ll be right, mate”. Three more escalation levels remain: “Crikey!’, “I ?think we’ll need to cancel the barbie this weekend” and “The barbie is? cancelled”. So far no situation has ever warranted use of the final? escalation level.

New gem: ListBrowser

January 15th, 2010

~~~~ ListBrowser README ~~~~

I was working on a parser for a very specific tree structure, and was frustrated that there wasn’t a simple way to parse it in irb. “What??”, I thought. “I have to use my brain?! God forbid!”. So I set to using my brain a little more to create this tool. It’s not much, but maybe it’ll make someone’s life a little easier.

Install: (set up gemcutter)
gem install ListBrowser

It can be used in irb, and really should be used there – when you call it on a tree structure, you’ll get a menu with a list of choices on how you want to go through whatever structure you gave it.

In my particular, special case, I would do something like this:

require ‘sgf_parser’ # For my tree structure require ‘list_browser’ # For this.

tree = SgfParser::Tree.new :filename => “kogo.sgf”

ListBrowser.new tree.root, ‘parent’, ‘children’, ‘properties’

# And follow the menu!

In my particular case, I would not need to enter those strings, as they
just happen to be the names I chose for my tree structure, but they should
serve as a good enough example!