Archive for the ‘Personal’ Category

The Moon

May 29, 2010 in Personal | Comments (1)

Tags:

Every now and then I find some­thing that blows my mind at how awe­some the Inter­net is. The first mind-​​blowing exper­i­ence for me was more than 15 years ago, when I dis­covered the Future Crew’s home BBS in Hel­sinki, Met­ro­poli, was online, and I wouldn’t have to wait months to get the latest demos out of Fin­land anymore.

Today it was find­ing 360º pan­or­a­mas of the moon. Check it out right now. I’ve always wondered what it would be like to stand on a for­eign world. And yes, I’ve seen the movie Moon, but it didn’t quite do it for me. These pan­or­a­mas were really amaz­ing for me, though, prob­ably the closest I’ll ever get to stand­ing on the moon myself.

The Apollo 17 pan­or­ama is prob­ably my favour­ite due to the geo­graphy of the area, the boulders and “moun­tains”. The Apollo 12 pan­or­ama is nice just to appre­ci­ate how ghetto the lander was and how incred­ible it is that NASA was able to pull the mis­sions off so well given the tech­no­logy of the time.


Yay open source

May 22, 2010 in Personal | Comments (1)

Tags:

Today’s xkcd is so val­id­at­ing. I first stumbled across the GNU mani­festo prob­ably in 1996, when I was in high school. I wanted to teach myself C and a good way to do that was to use the DJGPP com­piler, which led me to GNU. I didn’t really think much of it at the time except that these “Free Soft­ware Found­a­tion” people took soft­ware way too ser­i­ously, but I was happy to have a free com­piler to play with.

(more…)


Itanium tutorial

May 12, 2010 in Personal | Comments (0)

Tags: , ,

I’ll make a research-​​oriented entry before long; I prom­ise. I’m start­ing to get towards writ­ing up some of the cool stuff in my thesis.

I’ve star­ted writ­ing an Itanium tutorial. That doc­u­ment will magic­ally update every now and then as I write more. On the one hand it’s slightly embar­rass­ing how much I’ve writ­ten — it’s almost half as much as I’ve writ­ten for my thesis so far — but it’s an entirely dif­fer­ent kind of writ­ing. There’s really no rigour at all to it. I don’t have to worry about prov­ing things or cit­ing things; I’ve never proofread any of it. I just write whatever pops into my head, which makes it very quick and easy. Primar­ily it’s for my bene­fit, so I don’t for­get any­thing and so that it forces me to fig­ure things out more con­cretely than I would otherwise.

(more…)


Itanium in possession!

May 3, 2010 in Personal,Research | Comments (0)

Tags: ,

This is a follow-​​up to this post. Mark was mag­nan­im­ously amaz­ing and bought an Itanium machine for “the lab”. It’s cur­rently sit­ting in my apart­ment. I’ll make another post tomor­row, I expect, where I actu­ally get to play with it prop­erly, but I thought at the very least I’d make a post about the head­aches of actu­ally get­ting it working.

Go through the pic­tures and read the run­ning com­ment­ary because I’m not going to repeat the pic­tures here.

Sadly the machine is noisy and relatedly prob­ably quite a power sucker. It’s in the corner of the liv­ing room, not far from where Jasna’s office is so I’m not going to be able to leave it on very often, I don’t think. The noise would prob­ably drive Jasna crazy.

I should say I still haven’t got a chance to really sit down and play with it — namely play with the assem­bler — like I planned because HP-​​UX needs so much more set­ting up. I’m going to have to install pretty well the entire GNU user­land because HP’s user­land is abso­lute garbage.


Lost cat flyer Pages template

April 26, 2010 in Personal | Comments (0)


Don’t worry: I haven’t actu­ally lost my cat. A year ago I did tem­por­ar­ily — for about a day. I made up a flyer and was going to get it prin­ted in the morn­ing, but thank­fully she came back dur­ing the night.

I just stumbled upon this flyer and thought maybe it could be some use to someone. A quick Google search shows there isn’t much out there for lost pet flyer tem­plates spe­cific to iWork’s Pages applic­a­tion. Maybe this tem­plate could save someone a few minutes of work; who knows.

I’ve provided a PDF pre­view of the tem­plate, as well. The flyer was designed to have very little inform­a­tion — only the import­ant inform­a­tion — and to be highly vis­ible. I think it should work well in black and white, though I haven’t tried it. I’m not a graphic artist and I can’t claim it’s good, but in my opin­ion it’s at least not terrible.

Without fur­ther ado, here is the lost cat flyer tem­plate spe­cific for iWork Pages.


The future

April 13, 2010 in Personal | Comments (0)

Tags: ,

I’ve prob­ably talked before about my ser­i­ous man-​​crush on Gisle Martens Meyer. Mostly I just really like his music. Fol­low­ing his blog there’s a lot I can identify with, too. He’s one of the few musi­cians to do his best to give an expli­cit “fuck you and thanks for dying” to the music industry at every oppor­tun­ity. He’s embraced the new real­ity of music dis­tri­bu­tion with open arms. Plus he seems very gung-​​ho about the robot future in con­trast to all those losers who throw around words like “apocalypse”.

The first sen­tence of one of his most recent blog posts just hit me like a brick:

The reason I like the future is because you can change it.

That sums up a lot about me and why I get so frus­trated with friends my age — or usu­ally quite a bit younger! — who are already start­ing to slip into the con­ser­vat­ive “things which are new suck” men­tal­ity. It might take me a bit of extra effort to “get” some of the new changes to the world: Twit­ter is a good example. It would be easy for me to stick to how things were and shake my cane and say “in my day, we wrote blog posts with more than 140 char­ac­ters!” but I think in the end it’s worth it.

I’m pretty psyched about the future and I want to be a part of it and, I guess most import­antly, I want to change it.


Itanium

April 6, 2010 in Personal,Research | Comments (5)

Tags: , ,

Yes, I’m a com­puter archi­tec­ture nerd. I expect this won’t sur­prise anyone.

The recent story on Microsoft end­ing sup­port for Itanium (side note: this is hardly news. No one ran Win­dows on Itanium in the first place) rekindled my love affair with the Itanium archi­tec­ture. Every six to twelve months I become infatu­ated with it all over again.

My infatu­ation usu­ally dies down when I real­ize the Itanium is out of reach for mere mor­tals. Some­times I day dream about when I’ve acci­dent­ally stumbled into money and I’m able to afford one. It’s hard to find a new Itanium server for under $30k and play­ing around with the online con­fig­ur­at­ors it’s not hard to run your­self into the half a mil­lion dol­lar range.

Today’s dif­fer­ent, though: today I decided to check out Ebay. Used Itanium serv­ers are actu­ally very cheap. Here’s one for $340. It’s only about 6 or 7 years out-​​of-​​date, too. Being out-​​of-​​date with Itanium isn’t such a big deal since they were never in-​​date to begin with. The pro­spect that I might be able to buy myself one as a gradu­ation present — when I have time to play with it — is exciting.

I won’t bore you with the details of Itanium and why it failed in its prom­ise to be the next big saviour, the one com­puter archi­tec­ture to bind them all. I was actu­ally going to write about why I love the Itanium so much, but before I knew it I’d writ­ten six para­graphs about how beau­ti­ful the archi­tec­ture is and real­ized no one but me would ever care to read it. Suf­fice it to say it’s the nicest archi­tec­ture I’ve ever seen, from the per­spect­ive of someone who truly enjoys writ­ing assembly code, the per­fect bal­ance between expos­ing the archi­tec­ture and hid­ing away the mundane details that some­time plagued RISC archi­tec­tures. Whenever someone fool­ishly asks me about Itanium — don’t worry, I’m usu­ally able to restrain myself — I describe it as “everything SPARC should have been”, SPARC being one of the more eleg­ant RISC archi­tec­tures to date.

For my pur­poses it doesn’t mat­ter if Itanium is prac­tical or pop­u­lar or well-​​fabricated or none of the above since it’s just for my own enjoy­ment. One of the biggest prob­lems is that no one’s man­aged to write a suit­able com­piler for it. That suits me just fine since I’d rather be writ­ing assembly code by hand or writ­ing my own com­piler for it. I’m actu­ally half con­vinced that if any­one actu­ally is going to write a bril­liant com­piler for Itanium, one that intel­li­gently takes advant­age of all its spec­u­lat­ive loads and rotat­ing register win­dows and sim­ilar toys that I like to drool over, it’s going to be a com­piler that has a ser­i­ous leg up in static ana­lysis, maybe for a lan­guage that’s been ser­i­ously restric­ted, for which my research would be appropriate.

Well I’m not so arrog­ant as to think that I can write a com­piler for Itanium where so some of the world’s top back-​​end developers have failed before. Even if fail­ure is nigh guar­an­teed, it would be a really fun chal­lenge, and it’s always more fun when the chal­lenge is inher­ent in the beauty of what you’re work­ing with. I think I may have to ser­i­ously put aside a few hun­dred dol­lars for after gradu­ation so I have this to play with.


NHL ’94 follow-​​up

March 26, 2010 in Personal | Comments (0)

Tags:

This is an addendum to this post where I was try­ing to make NHL ’94 more challenging.

I’ve all but given up on try­ing to give the com­puter an extra use­ful player in shootout mode. Giv­ing the com­puter an extra player who stands and does noth­ing is trivial. Unfor­tu­nately, the “AI” for shootout mode is — maybe not sur­pris­ingly — hard-​​coded — it doesn’t even take into con­sid­er­a­tion the pos­i­tion of the goalie — and rewrit­ing the AI in 65C816 assembly is bey­ond the scope of my free time. This is easy to show by watch­ing the dif­fer­ing beha­viour between when the com­puter gets a break­away (in reg­u­lar mode) com­pared to how it behaves in shootout mode.

So I play in reg­u­lar mode with a 3-​​man han­di­cap. E.g., we play 5-​​on-​​2. If you watched the first video from my last post, you’ll notice that han­di­cap­ping your­self makes the game beep con­stantly. It’s very very irrit­at­ing. Fix­ing this is actu­ally not com­pletely trivial. For those that are impa­tient, here are the memory addresses I’m using:

Address Descrip­tion Example value
7E17A6 Num­ber of play­ers for the home team 3
7E18BA Good ques­tion! See below 12
7E1864 Num­ber of seconds left in the penalty 40

Using the val­ues above will stop the incess­ant beeping.

I haven’t had time to fully explore the implic­a­tions of 7E18BA. Just from obser­va­tion, it seems that that the 7E1860 – 7E18C0 range is an array of player state and 7E18BA is an off­set into that array which per­tains to the pen­alty. By set­ting 7E18BA to 0x12, it seems, you indic­ate which ele­ment of the array from which to draw penalty-​​time-​​remaining inform­a­tion. I only use the value of 0x12 and the asso­ci­ated address 7E1864 because those are what came up for me dur­ing debug­ging (Mike Gart­ner, if you’re curi­ous). I haven’t found any rhyme or reason to the num­ber 0x12 yet, but I don’t really care too much at this point.

As a side note, someone really needs to come up with a bet­ter tool for “RAM cheat­ing”. For those unfa­mil­iar, the gen­eral pro­ced­ure for this style of black-​​box debug­ging — usu­ally used for cheat­ing, though in my case I guess it’s anti-​​cheating — is to snap­shot RAM at vari­ous stages of play. You then com­pare the RAM images accord­ing to what state you’re look­ing for. E.g., if you want to know where the num­bers of play­ers on the ice is stored in RAM, you snap­shot when you have 6 play­ers on the ice a few times and again when you have 5 play­ers on the ice and look for the num­bers “6” and “5” to con­sist­ently appear in RAM.

If you have a hacker men­tal­ity, this way of doing things can be pro­duct­ive, but it’s pretty crude. Gen­er­ally the tools avail­able don’t allow you to com­pare bit-​​values, only byte-​​values, and com­par­ison oper­at­ors are pretty lim­ited. After half-​​heartedly try­ing to fol­low along with Jasna’s AI assign­ments, I’d be sur­prised if this prob­lem hasn’t been solved gen­er­ally and prop­erly in the AI aca­demic com­munity. Oh well.


Grocery store checkouts

March 22, 2010 in Personal | Comments (4)

Tags: ,

For the past year or so, I’ve been tim­ing how long it takes for me to go through the check­outs at our gro­cery store to see which is faster.

The meth­od­o­logy is quite simple. Once I’ve got all my gro­cer­ies, I go to the same spot near the check­outs. To avoid bias­ing myself, I check my cell phone to determ­ine whether to go through the self check­outs or the nor­mal check­outs. Because my cell phone lacks a ran­dom num­ber gen­er­ator, I check the last digit of the time: an even digit means I go through the nor­mal check­out and an odd digit means I go through self check­out. I then start the stop­watch and time how long it takes for me to go through the check­out and leave the store.

I’ve got 31 data points and have finally decided that if one type of check­out is faster than the other, the dif­fer­ence is small enough to not really mat­ter. Here’s the scat­ter­plot:

A sample size of 31 is unim­press­ive, to be sure, but it’s large enough that I can finally rest easy know­ing it would be a waste of time to col­lect more data. Try­ing to get out of the gro­cery store in the fast­est way pos­sible seems to have more import­ant factors, such as the num­ber of jerks ahead of you in line.

As a side note on how that scat­ter­plot is presen­ted, it prob­ably would have made a lot more sense to meas­ure the time taken as a func­tion of how many items I bought, rather than the cash value of the items I bought. I’m far too lazy to count things, though.

So, from now on I’ll be decid­ing on self check­out versus nor­mal check­out based on how social I’m feel­ing. I sus­pect that means I’ll be using the self check­out a lot.


NHL ’94

March 14, 2010 in Personal | Comments (4)

Tags:

As any­one born around 1980 would know, gam­ing reached abso­lute per­fec­tion with the release of NHL ’94. It’s great if you want a 10-​​minute diver­sion and I’ve been play­ing a few minutes of here and there for the past few months.

There’s one ser­i­ous prob­lem with NHL ’94, how­ever: the AI is abso­lutely ter­rible. Play­ing in single-​​player mode is way too easy. Play­ing as the worst team (either Flor­ida Pan­thers or Ott­awa Sen­at­ors) against the best team (All Stars East) I can win 5 – 0 without much effort.

In shootout mode the AI is even worse. If you put the goalie on auto­matic mode (the com­puter con­trols your goalie) then the oppos­ing team does alright, but it’s no fun. If you put the goalie on manual mode (you con­trol your goalie) I’m not con­vinced it’s actu­ally phys­ic­ally pos­sible for the com­puter to score on you.

I had the bril­liant idea that maybe the game would be more fun if the human player were han­di­capped. Maybe shootout mode would be more fun if the com­puter had 2 play­ers instead of just 1? I have my doubts, but it got me thinking.

So one idea was to dis­as­semble NHL ’94, add in some 2-​​on-​​1 shootout code and reas­semble it. For­tu­nately there are people out there who take hack­ing the Super Nin­tendo more ser­i­ously than any sane per­son should, so there are some tools avail­able. Learn­ing 65C816 assembly code, dis­as­sembling the game and then tra­cing through and debug­ging soun­ded like the sort of thing that one does after they’ve fin­ished writ­ing their thesis, so I filed that under “plan B”.

Plan A became to track down where cer­tain deli­cious global vari­ables, such as the num­ber of play­ers on the ice, were being stored in memory and modify them as the game was being played. After about 20 minutes of toy­ing around, I got some­thing to work.

Here’s me in reg­u­lar hockey mode, but with only 1 skater instead of 5:

The con­stant beep­ing (sorry) is due to NHL ’94 fool­ishly think­ing that since I’m down 4 men, the other team is on a power play which is end­ing soon, in 0 seconds to be exact. Note the game mis­takenly gives credit for the goal to Zhit­nik and Hrudey of the LA Kings instead of Schneider and Roy of the Montreal Canadiens. Weird.

Here’s me in shootout mode:

Unfor­tu­nately I acci­dent­ally gave myself an extra player instead of the com­puter, but it still demon­strates that my idea won’t work without a lot more fid­dling. The extra player just stands there doing noth­ing. Sigh.