Monday, December 17, 2007

Den moderna människans (mitt) förfall

Jag ligger i skrivandets stund i vår (min och Saras) säng och försöker somna (Sara sover). Ett av de störande momenten som hittils hindrat mig är ett surrande ljud utifrån. Tankarna far precis som de vill, så jag kom att fundera kring möjligheten att det skulle vara någon form av allmänfarlig olycka som låg bakom ljudet, även om det inte lät som ett larm, inte ens ett avlägset sådant. Ifall det nu skulle uppstå en situation i vilken allmänheten skulle varnas, via vilka kanaler skulle det då nå mig?
  1. Vi har ingen hemtelefon. Hemtelefoner är en onödig utgift för den moderna människan, merparten av all telefonkommunikation går via mobiltelefonin. Därför skulle vi inte nås av telefonlarmsystemet. Jag har för mig att det ska finnas ett sådant, som ska betyda "slå på radion eller TVn för information om säkerhetsåtgärder". Vilket leder oss till punkt 2.
  2. Vi har ingen TV. TV är slöseri med tid som kan användas till mycket bättre saker, och det visas aldrig något bra när man tittar ändå. Vill man koppla av och se något bra ser man en film, och datorn har en DVD-spelare. Ergo: ingen TV. Därför skulle vi inte nås av varningsinformationen som går ut via TV heller.
De enda kanalen som återstår är larmsirenerna. Och jag kan inte minnas sisst jag hörde dem testas. Jag skulle kunna tänka mig att samhället räknat med att de ska kunna nå varje medborgare genom TV-nätet eller telefonnätet. Radiotjänst är alltid lika förvånade när man talar om för dem att man inte har någon TV. Och vad jag har förstått är de inte så hårda som de påstrår med att se till att man betalar sin avgift även om man har en TV, just på grund av att systemet förutsätter att alla kan nås via den informationskanalen, och ifall Radiotjänst inte har makten att ta TVn från den som inte betalar sin TV-licens, så har de ju inte heller någon direkt makt att driva in avgiften.

Bara några tankar som verkade tillräckligt bra i brist på bättre sömn.

Thursday, June 21, 2007

Jython - Summer of Code, finally getting started

Disclaimer: Even though this is an announcement of the fact that I am getting started on my SoC project, I have to admit that there might be some rants about courses at my university and ScaMPI.

As most of my friends already know, this summer I am doing a Google Summer of Code project. The project I applied for, and have been assigned to work on, is the Jython project. My part in Jython will be back end compiler work, i.e. bytecode generation. I have a great mentor, Jim Baker, and that makes me quite sure that I will be able to accomplish something during this project.
My original plan was to be able to start working on this project a week and a half ago, but that didn't turn out as I wanted it to. A week and a half ago I had my final exam, in cryptology (I actually managed to get quite good scores on that exam), and I had thought that I would be free from my studies after that. I had never expected that the final lab assignment in my programming of parallel computers course would take as much time as it did. I thought I would have completed that assignment before my exams. I was wrong. Before focusing on my exams I knew that the code segfaulted in a call to MPI_Sendrecv, that was quite easy to find out using some trace printouts. But figuring out why was a whole other story. It turns out that the MPI library on our super computer (ScaMPI) didn't adhere to the MPI standards. In order to get the rapid development cycles I am used to, instead of having to wait for CPU time to run the application, i installed OpenMPI on my MacBook (hey, it has multiple cores, it can do parallel computing), and manged to get everything working fine there, but it still segfaulted with ScaMPI. In the end it turns out ScaMPI doesn't support the MPI_STATUS_IGNORE parameter, a limitation that I haven't been able to find in any of the documentation I have been looking at. That took me about a week to track down. This experience has made me even more thankful to Open Source, since trying to use a parallel debugger (that was a pain to start due to license enforcement algorithms) on assembly code that you really don't know what it was compiled from is NOT a pleasant experience.
Anyhow, back to the main topic, my Jython SoC project. For those of you who might want to follow the progress of my work I will try to publish posts here about the project quite regularly (I am aiming at once a week). If you are interested in my project notes and source code for the stuff I am playing around with in the scope of this project, these will be hosted on my personal server and available at https://projects.thobe.org/jython/. The final code and documentation will be hosted at the Jython repository over at SourceForge and the official Jython wiki respectively.
Well then. I think that was all I wanted to announce in this post. Wish me happy hacking. Even though I suppose that tomorrow wont be as productive as I would want it to be, it is the Swedish midsummers holiday tomorrow, an occasion Swedes (ab)use to get really drunk. I am going to be the designated driver for my girlfriend and her family during the day, and then my girlfriend and I are going to have our own party at the evening. Well, I am sure that all of my hacking after that will be of the happy kind.

Saturday, April 21, 2007

The day my MacBook died

I've been forced to realize that personal computers, or at least operating systems for them aren't built for heavy multitasking. None of them.
I am a heavy mulitasker, I use some 20 applications simultaneously, and have even more running in the background. This is almost always a guaranteed way to make your computer crash. Back when I was using windows, some 10 years ago, it used to crash for that reason. Linux has frequently crashed for that reason with me at the keyboard. I have even tried later windows versions, such as XP, they also crash for that reason.
Today my Mac OS X crashed as well. It has crashed before, not as much as Linux (could be thanks to more hardware power though), and definitely not as much as windows, but it has crashed. But those times it has been in a controlled way. I have noticed that my applications froze and restarted them, or shut down a few of the onces in the background. Once or twice it's been really bad an I had to reboot, since the same application kept crashing over and over. Today was different.
First the screen froze, while I was watching a move, responding to some e-mails, downloading a few torrents and checking some references online. I tried the standard force-quit-application-tricks, but nothing helped. Tried force-rebooting, nothing. So I turned off the power. Here comes the worst part. When I booted up, Mac OS X refused to start. All I got was a unix shell. Since I've never seen a Mac behave like that before I had no idea that this was Single User Mode (I would have known that it was su-mode if it had been Linux, since I knew Linux has a su-mode). No error messages, nothing. Tried rebooting, same thing. Tried halting and restarting, same thing. Tried booting from the Setup CD, failed and back to su-mode. I started up my other computer (Good ol' Linux, where I know how stuff works) and tried searching for help online, in Apple support and the Mac OS X forums,. I tried searching for stuff like "mac os x start gui", "mac os x starts with command line interface" in different variations. Nothing. So I called phone support. No help there either, apparently you need to pay (an awful lot of money) if you want phone support.
So, back to searching for info online. I had noticed that most error descriptions about the startup process had described what the screen looked like. "Blue screen", "flashing question mark", "gray screen" et.c. so I tried searching for "mac os x black screen with white text". Yatzi, I found a page telling me that this was su-mode, and how one started the computer in su-mode. The next step was trying to start my Mac in su-mode and see if that would have the reverse effect not that I knew that it started in su-mode per default. That didn't work, however I noticed that I received much more startup information when I told it to start in su-mode than when the startup failed and entered su-mode. So I tried verbose mode, and hoped to get more info on what went wrong in the startup. Bingo, while trying to start all of the sudden the system said "/etc/hostconfig: no such file or directory" and then failed into su-mode.
From here things were pretty straight forward. I verified that the file was missing (It was) and called up a friend who also has a MacBook and had him e-mail his /etc/hostconfig to me. Then I remounted the file system (in su-mode it is mounted read only per default), created the file and entered the content from the file he sent me via the keyboard. Sara helped me here, typing from one screen onto another is boring and error prone.
This time when I rebooted it finally worked! What I cannot understand however is how the file could disappear in the first place. I wasn't doing any configurations of startup services when it crashed. I guess that the reason for the failure will remain a mystery, I'm just happy that my computer works again. Hopefully this information will be useful for someone else with the same problem, if Google indexes this blog entry so that s/he finds it.

Tuesday, February 20, 2007

Crashing lectures

One interesting thing to do on a university is to attend lectures. Random lectures. Lectures that are not part of any courses that you take, but that might be interesting. Many courses contain interesting lectures, even though the course might not be interesting enough to take. Today I crashed a lecture about IP Routing, in a course about computer networks (or some subtopic of that) togheter with a friend (who takes that course).
The hard part about crashing lectures is finding the interesting lectures to crash. Haveing a friend who takes the course that happens to have an interesting lecture helps a lot in this process.

This entry was written while crashing a lecture.

Monday, February 12, 2007

Where are the women my age?

Did I grow old?



Disclaimer: Not that I am looking for women, I live togheter with a woman I am happy to live with. This is just a fact that I observed and wanted to rant about.


I have finally started working out again, I've gone back to swimming, once a week, with my good friend Kalms, starting next week we might increse our dose of this sweet drug to twice a week.


Since I don't check up every reader of this web log I cannot know how much you know about me. I used to be an elite swimmer, ranked among the top 100 on 200m butterfly in Sweden for a few years. I had practice 9 times per week back then. Then four years ago I moved away to Linköping to study. Since my life had been quite fucked up for a while then I stoped swimming and gave up other parts of my life at the same time to create a new life.


However, back then one of the things that used to be amusing to occupy my mind and eyes with while paddling back and forth in the pool was looking at bodies. Good looking bodies prefably. Female such. And good looking swim suits. The shape of the human body facinates me (Perhaps I'll ammuse you with rants about that some other time).


Back then I noticed bodies of what I thought was all various ages. There were little girls (not very interesting to look at), girls in their upper teens (the pleasent kind, my age back then), and older women (not very intersting either).


The other day, when we were swimming, I noticed that the age distribution had changed, Now there were only little girls and old women. Nothing to look at that is. Then, since my mind wasn't occupied by anything else byt my own thought it dawned upon me that the age distribution hadn't changed. It was only me who had gotten older. I had never noticed that there never were any women aged 20-30, since I was never interesed in that age group before. But looking back at things, this is an age group that has never been represented, neither female, nor male (except for me that is...). Why is that? Why aren't there any women (or men) aged 20-30 in the swimming pool?


Where are all the women my age?