Sun 2010-10-31 ( bl En )

You may have noticed that my blog has been down for the last week. We have moved to another server, and I am updating to the latest Camping version, which sadly broke some of the old API.

Expect quirks and 500s for the next days until I’m finished with the port.

Oh, and by the way: I’m in New Zealand! Follow @murphy_nz to find out a lot more about that (with photos!).

Update: It’s fixed, and runs on Passenger now!

Thu 2010-09-02 ( En pr )

When you include this in your ~/.bash_login file:

# Show current git branch or SVN subfolder in prompt.
      GREEN="\[\033[0;32m\]"
LIGHT_GREEN="\[\033[1;32m\]"
       GRAY="\[\033[1;30m\]"
 LIGHT_BLUE="\[\033[1;34m\]"
 LIGHT_GRAY="\[\033[0;37m\]"
  COLOR_OFF="\[\e[0m\]"
function prompt_func() {
  branch_pattern="\* ([^$IFS]*)"
  PS1="$LIGHT_GRAY`date +%H:%M:%S`$COLOR_OFF $LIGHT_GREEN\w$COLOR_OFF"
  if [[ -d "./.git" && "$(git branch --no-color 2> /dev/null)" =~ $branch_pattern ]]; then
    branch="${BASH_REMATCH[1]}"
    PS1+=":$LIGHT_BLUE$branch$COLOR_OFF"
  elif [[ -d "./.svn" ]]; then
    path_pattern="URL: ([^$IFS]*).*Repository Root: ([^$IFS]*).*Revision: ([0-9]*)"
    if [[ "$(svn info 2> /dev/null)" =~ ${path_pattern} ]]; then
      branch=`/usr/bin/ruby -e 'print ARGV[0][ARGV[1].size + 1..-1] || "/"' ${BASH_REMATCH[1]} ${BASH_REMATCH[2]}`
      revision="${BASH_REMATCH[3]}"
      PS1+=":$LIGHT_BLUE$branch$GRAY@$revision$COLOR_OFF"
    fi
  fi
  PS1+=" "
}
PROMPT_COMMAND=prompt_func

…it should show you, depending on what kind of folder you’re in, the current git or svn branch:

~ cd ruby/coderay
~/ruby/coderay:trunk@644 cd ../coderay-0.9
~/ruby/coderay-0.9:branches/0.9@641 cd ~/studies/ikiwiki/
~/studies/ikiwiki:master 

It is quite fast, but needs Ruby (any idea for a bash-only version?)

Update: Fixed a few things.
Update 2: Cleanup, SVN revison number.

Tue 2010-08-10 ( En pr bl )

Yes. I’m sorry. I’m busy with:

  • starting a new job at sofatutor
  • friends
  • Shadowrun
  • reading/writing on Twitter
  • preparing for my New Zealand trip from late October till New Year
  • watching JAG, season 5 (in English)

Because of this, I could not find the time yet to write about

  • rbJL’s Zucker gem
  • the latest updates to the Schatten project
  • CodeRay 1.0
  • my new iMac
  • my love for m&m‘s
  • what I like/hate about Twitter

You can follow me on @murphy_karasu (manchmal schreibe ich dort auch Deutsch), and/or you can have a completely unrelated “motivational” poster:

Sat 2010-07-10 ( En pr )

I’m sure I’m not the first one to find this, but here’s a working example for a i18n version of Integer#ordinalize.

Setup

First, you need to define <locale>.rb files in you lib/locales folder for each language. Here are examples for English, German, and French:

# lib/locales/en.rb
{
  :en => {
    :ordinal => proc { |number| number.ordinalize }
  }
}

This is using the built-in ordinalize extension, which does the English job.

# lib/locales/de.rb
{
  :de => {
    :ordinal => proc { |number| "#{number}." }
  }
}

German ordinalization is really easy.

# lib/locales/fr.rb
{
  :fr => {
    :ordinal => proc { |number| "#{number}#{number == 1 ? 'er/re' : 'e'}" }
  }
}

You’ll have to find out how to apply the correct genus all by yourself if you don’t like the self-service-slash :P

More languages can be added, but it gets really complicated for Spanish or Finnish.

Usage

After you restart your server (also in development mode!), I18n.t('ordinal') will return a Proc object. You can use it in your view like this:

<%= I18n.t('ordinal')[count] + ' ' + I18n.t("article") %>

Notice the use of [] for the object returned by the I18n.t call: It’s calling the Proc, passing the number argument, which is then ordinalized according to the current locale. You could also use .call(count), or even .(count) in Ruby 1.9, but I prefer the brackets.

Wed 2010-07-07 ( En De pi fu )

source

Edit: Ich glaube, das war eine Zitronenpresse. Mist.

Tue 2010-06-29 ( fu pi )
Sun 2010-06-27 ( De fu )

Vuvuzela die Du bläst zum Himmel
Getrötet werde Dein Vuuuu
Dein Angriff komme
Dein Tor geschehe

Wie im Strafraum als auch im Mittelfeld
Unseren täglich Lärm gib uns heute
Und vergib uns unsre Fouls
Wie auch wir vergeben unseren Schiedsrichtern

Und führe uns nicht in die Verlängerung
Sondern erlöse uns vom Abseits
Denn Wir sind die Besten und die Gruppensieger und im Halbfinale
In Süd Afrika
World Cup

Fri 2010-06-25 ( En fu ap ra )

Wed 2010-06-23 ( En ap )

Apple didn’t manage to provide real photos of the iPhone 4’s new display’s quality on their website. 960×640 pixels sure sounds a lot (almost iPad resolution), but I wasn’t convinced, because those digital demos look nothing like a real display.

Thankfully, Engadget has now provided this great comparison photo:

That’s the icon for the Maps app, of course, on iPhone 3GS and 4. Its actual size on the display is 9mm (0.354in), or the width of a typical paperclip, or the height of those arrow keys on a modern Apple keyboard, or the distance between strings on a 6-string guitar, or half the width of my middle finger. It’s really small.

If you have an iPhone or iPod touch (any generation), look at that icon. Can you see the white line between the red and blue parts of the road sign? That’s almost 2 pixels high on an iPhone 4. See the number “280”? The lines are a little more than 2 pixels thick there. See the pin’s head? That’s about 20 pixels in diameter now. The vertical road is about 15 pixels wide.

Sun 2010-06-20 ( De ra )

Ziemlich nichtsagende Statistiken, zumindest kann man anhand der Grafiken nicht erkennen, woher die Entwicklungen kommen. Durch Gurtpflicht mehr Autounfälle? Wohl kaum. Mehr Verkehrsunfälle durch Rentner? Natürlich, es gibt ja auch mehr Rentner!

Infografiken, die komplexe Zusammenhänge einfach darstellen, sollten nicht ganz so offensichtlich unlogisch sein.

Tue 2010-06-15 ( De ra )

Sowas kommt bei uns über die Mailinglisten der Uni an alle Informatik-Studis:

Hallo liebe Studenten,

in der Beschreibung zur Anmeldung zu der Windows Phone 7 Veranstaltung im Microsoft Office ist ein kleiner Fehler unterlaufen.

Der Anmeldelink führt zu einer Fehlerseite. Der richtige Link ist der folgende:

http://www.stnc.de/Events/Register/3084

und hier nochmals die Beschreibung zu dem Event:

http://www.stnc.de/events/2010/05/25/3084-Student-Partners-Usergroup-zu-Windows-Phone-7.aspx

Entschuldigung dafür nochmals!

Grüße
[Name entfernt]
Microsoft Junior Student Partner
Humboldt Universität zu Berlin

Zum Kotzen.

Sat 2010-06-12 ( En fu )

Very cool music video from Mr Scruff:

Actually a remix of Kirsty Almeida’s Spider.

He draws and animates those videos himself, I read. Is this done with Adobe® Flash®?

Available from Ninja Tune on 12" only. Thanks for releasing it officially on YouTube, too!

Tue 2010-06-08 ( En ap )

Apple claims:

It works like this: As you browse the web, Safari detects if you’re on a web page with an article.

Something like Reader might actually turn Safari into my main browser – depending on how well it works.

So, how does this magical “detection”-thingy work? It works on sites like heise, SPIEGEL, or The Wall Street Journal. But it doesn’t work on TUAW or on my blog. Does Safari 5 have a list of well-known mainstream media news sites? Is this what Steve Jobs meant when he said:

I don’t want to see us descend into a nation of bloggers.

I mostly read blog articles nowadays, and Safari Reader is pretty useless to me for now.

Update: Funny thing, it works on Daring Fireball. Maybe this is because John Gruber is considered mainstream now ;)

Update: ars technica claims (Safari Reader enabled):

Safari 5 contains heuristics that will detect if a webpage contains an article and it will present a “Reader button” in the Smart Address field.

Well, how nice for your site. Which heuristics? I couldn’t find any hints in the Safari Dev Center.

Update: It gets funnier :-) With the last update, this article just became a Safari Reader heuristic winner. So it’s about content length?

Update: It looks like it. Yay :-D

Wed 2010-06-02 ( De ra )

No way.

Die machtgeile, verfassungsfeindliche CDU-Politikerin, inzwischen Arbeits-, früher Familienministerin wird wissen, dass das Amt des Bundespräsidenten eine Sackgasse ist. Danach kommt nichts mehr. Und sie ist auf gutem Wege, wichtigeres zu werden: Außenministerin einer neuen Koalition mit schwächerer FDP oder SPD, oder gar Angies Nachfolgerin.

Im übrigen ist mir nicht klar, wie die FDP zulassen kann, dass eine Ministerin mit derart bürgerrechts-feindlichem Profil hier ernsthaft in Erwägung gezogen wird. Ob die Ministerin Themen von SPD und Grünen besetzt, kann der Koalition herzlich egal sein, denn sie hat eine komfortable Mehrheit in der Bundesversammlung.

Und überhaupt, wer wird denn dann Arbeitsminister? Roland Koch?

Mon 2010-05-17 ( De fu pi )

Die folgenden Bilder sind offensichtlich Collagen:

Vampir-Pinguin ohne Reflektion!

Was Science nicht davon abhielt, das erste davon zu drucken. Ein Bild sagt ja bekanntlich mehr als tausend Worte.

Wahrscheinlich kommt demnächst noch ein Tiger auf die Scholle.

Wed 2010-05-05 ( En ra )

Commercial advertising: I hate ads. I hate them. Lipstick commercials, infomercials, placards, Greenpeace booths, Spam. I hate them from the bottom of my heart. They are distracting, stupid, ugly brainwashers, lies and propaganda which reduce my ability to consume information or do work through any media. They are the reason I stopped listening to FM radio. They are turning my mailbox (the real one and the virtual ones) into a wastepaper bin. They make me angry. Like cigarette smoke.

The main reason I switched from TV, magazines, and radio to the computer is, apart from interactivity, that you can actually live pretty ad-free in there. I rarely see ads on my MacBook (mostly MSNBC ones that I simply mute). I installed anti-ad plugins on every browser I use (except one, see below). I uninstall every application that tries to ad me.

Tue 2010-05-04 ( En pr )

Licenser:

(defn <3 [love & loves]
  (loop [l (str "I love " love) loves loves]
    (let [[love & loves] loves]
      (if (nil? love)
        (str l ".")
        (if (empty? loves)
          (str l " and " love ".")
          (recur (str l ", " love) loves))))))
(<3 "cookies" "cake" "chocolat") ;; =>  "I love cookies, cake and chocolat." 

murphy:

I = Object.new
def I.<(three, *args)
  puts "I love " + args[0..-2].join(', ') + ' and ' + args.last + '.'
end
I.<3, 'test', 'foo'
#~> I love test and foo.

I like the Clojure one better, even without syntax highlighting :)

Update: Licenser complained, so here’s an improved version:

Tue 2010-05-04 ( En pr fu )

Here’s the ultimate reason why Ruby is better than Python:

Jus ried o clean my keyboard, and now he key is suck. I can no longer run my Pyhon programs, bu I can sill run Ruby scrips. A definiive improvemen.

A gem from Fredrik Lundh, 2003.

Fri 2010-04-23 ( En De pi )


Nature 2.0 // Dux in a row

See more of her art on her website (sadly, it uses FRAMEs).

Fri 2010-04-23 ( En ap )

Well, Gizmodo spoiled a lot of secrets about the next iPhone in the last week. But I think this won’t hurt Apple, or Gizmodo, or anyone. It’s already internet history.

An interesting side of this is that this might be the first time that we actually see new Apple hardware from inside before we see how it looks to the average user. Apple always focuses on user experience, and never flaunts with tech specs without connecting them to real-world benefits. This is especially true about the iPhone; they don’t even mention the CPU’s speed or the size of the RAM anywhere on their side. Apple doesn’t provide specs for the iPad’s A4 – they just state that it’s fast and efficient. This time, Gizmodo has stripped down their next child before we saw her face. It’s tech porn. I prefer Apple’s reality distortion field.

Fri 2010-04-16 ( En po )

As Howard Fineman said on Tuesday in Countdown about Barack Obama’s Nuclear Security Summit:

And I think [Obama] also wants to show that in the 21st century, security is about links. It‘s a different paradigm from the Cold War. It‘s almost like the Internet in which you prosper, you profit by the links you make to the other people on the net. He‘s trying to do that in terms of diplomacy globally.

More and more world leaders really get globalization. We share enemies and threads. We are sitting in the same boat. We need to paddle together, and the US wants to be the cox.

Fri 2010-04-16 ( En )

I didn’t know where the strange name “Wizengamot” in the Harry Potter books came from (the Supreme Court of the Wizarding world). Now I found out about the Witenagemot: It was a ring of advisors to the Anglo-Saxon kings of the 7th – 11th century.

Interestingly, J.R.R. Tolkien’s term Entmood is also related to the terminology. Thing is another, earlier type of such political institutions and meetings.

Wed 2010-04-14 ( En ap )

I don’t know yet.

According to the first Geekbench results, the Intel i7-620M at 2.66/3.33 GHz in latest flagship MBPs is about 30% faster than the previous Core 2 Duo T9900 at 3.06 GHz. Compared to my early 2008 MacBook (which has a T8300), that’s a 70% speedup. That’s huge, but it’s just a synthetic benchmark. Still, it’s clear that the new MacBooks are speedy, and the new CPUs are not the only reason.

Cupertino finally dumped the crappy NVIDIA chipset in favor of Intel’s integrated graphics. It was a bad deal for MacBook Pros all along: While the MacBook really benefits from a more powerful GPU, especially when some applications use OpenCL, the Pros already have a good graphics chip built-in! All Apple achieved in the late 2008 update was to nullify the speedup that updating to DDR3 would have meant.

Today, Apple corrected their mistake. The i5 and i7 chips seem to be the fastest that Intel makes for the 35W class. I’ll be visiting a Mac shop in the next days to try out some my-world benchmarks. Hopefully, I can get what I have been searching for over a year now: More Speed™.

Update: Geekbench has confirmed my results.

Mon 2010-04-12 ( En ap )

A very minor point in the list of new APIs was this one:

Interesting. They didn’t have this feature before? Apple seems to realize that every weapon they give to developers, even if it’s just an optimized API for something you could also implement on your own, is another selling point against Android. Because Google can’t optimize that deeply: Android is polymorph, and hardware-level fine tuning is a lot of work. Or money, that is. Windows 7 and the other systems will have to fight the same uphill battle.

Having really fast text pattern matching on a mobile device is a feature in itself. Keep in mind that even the iPad is still an order of magnitude behind on raw processing power compared to current laptops. Everything can become a bottleneck in the iPhone OS world.

By the way: CodeRay for iPhone OS, anyone? :D Regular expressions are the core of every good syntax highlighter.

Sat 2010-04-03 ( En )

A short story by James Thurber, read by Countdown anchor Keith Olberman.

I’ll be hiding in the middle of nowhere (Rädel, Brandenburg, Germany) for the next 8 days with my Boy Scout Patrol “Berglöwe” (Mountain Lion) on an Easter camp. No computers, no internet, no electricity. Just cooking over the campfire, sleeping in black tents and singing to guitars.

Happy Easter holidays to you all!

Fri 2010-04-02 ( En pr )

Revision 534 of my syntax highlighting library updates the HTML output to HTML5 and CSS 3, which means IE users will need to install a browser to see CodeRay highlighted code.

Yes, I’m radical. Feels so good.

(By the way: Microsoft can choose to support CodeRay again if they wish :)

Mon 2010-03-29 ( En ap )

(See also my initial thoughts.)

I wondered why the latest Apple devices, including MacBooks (especially the Air), iPhones, and now the iPad all have rounded backs/bottoms. Well, the answer is very simple: Remember the last time you had problems picking up change from a counter? It would be nearly impossible to pick up a 700 gram (1.5 pounds) metal slate lying flat on a table without being able to put a fingertip under it:

It’s so simple that you don’t notice. Like some kind of industrial design typography. Sure, it doesn’t look nice from the back – but who cares? The only important part is the front.

Sat 2010-03-27 ( De fu ra )

Das ist ja nun das Albernste überhaupt:

Wachs aus Teelichtern zu verbrennen erzeugt CO2. Das Bild ist ungefähr so, als würde man für die Abrüstung Leute erschießen.

Atmen erzeugt übrigends auch CO2. Wenn die Öko-Romantiker auf dem Foto also mal bitte für eine Weile die Luft anhalten könnten…so ungefähr 10 Minuten lang. Danke.

Thu 2010-03-25 ( En fu pi )

Fri 2010-03-19 ( De pr )

Man sollte allerdings bedenken, dass manche Männer sich als Frauen ausgeben und umgekehrt. Aber im Allgemeinen beantwortet das die Frage, wo die Frauen abgeblieben sind – zumindest frage ich mich das oft, wenn ich mich durch die Tech-Blogosphäre bewege.

Soziale Netzwerke sind offenbar nichts anderes als die weibliche Seite des Internets. Männer haben es lange Zeit nur dafür benutzt, Informationen auszutauschen (oder Pornos). Kommunikation über das Web (Twitter, Facebook, Gästebücher auf MySpace, das Gebrabbel auf StudiVZ usw.) ist aber heute mindestens so grundlegend wie Information (Wikipedia, Blogs, News, Google).

Es war auch überfällig :) Mails sind nämlich Mist, da sie aus der Gedankenwelt technischer Beschränkungen (nur Text, international eindeutige E-Mail-Adressen, die viel zu lang sind) und Bürometaphern (interne Post, Empfänger/Absender, Blindkopie, Briefform) stammen.

Die Idee mit dem IE8-Frauenbrowser hingegen ist peinlich. Frauen brauchen keine voreingestellten Favoriten, sondern einen schnellen, zuverlässigen Browser und moderne Webstandards – genau wie alle anderen auch.

Thu 2010-03-18 ( De fu )

Sun 2010-03-14 ( En pr )

I have written a little TextMate command (download) that allows you to count Lines of Code of the current file:

Here, this command is being used to verify that blokk stays at 318 LoC.

It needs CodeRay 0.9.1 or later.

Fri 2010-03-12 ( En )

My homepage was about:blank for over a year now. I was sick of slow-loading start pages, and I just don’t have any site I really frequent so much that I want to look at it every time I open a new browser window.

But today, TPUTH became my Home Page in Firefox. It’s a metablog about “tech and design”.

What got me? The whole digital yellow-press newspaper style combined with Socialist party medals of geek gods, a Cyrillic-looking title that you can’t pronounce (try it!)…it’s just cute, and funny, and stylish. It has daily funny pictures, and only features ironic headlines that link straight into the blogosphere.

Thu 2010-03-11 ( En pi )

Ever needed a or a ?

Here’s a nice generator by the French team Country and Kath. It produces animated GIFs for a style and background color you select. You can download them, and they are Public Domain (at least that’s how I understand totally free for use).

I know I’m contradicting myself here:

Seriously, drop animated GIFs. They stink.

AJAX loading indicators may be the only valid excuse for using an animated GIF. And maybe writing a blog post about them.

Tue 2010-03-09 ( De fu )

Ich finde, ein Artikel über den Vollpfosten wäre eine sinnvolle Ergänzung zur deutschen Wikipedia gewesen. Stattdessen gab es zehn Löschungen in den letzten Jahren, mit scheinheiligen Begründungen:

  • 02:20, 2. Nov. 2006 Xocolatl (Diskussion | Beiträge) hat „Vollpfosten“ gelöscht ‎ (Inhalt war: ‘umgangssprachliche Bezeichnung für einen deutlich unterbemittelten Menschen’ (einziger Bearbeiter: ‘Benutzer:84.141.221.180’)
  • 16:11, 28. Apr. 2007 Felix Stember (Diskussion | Beiträge) hat „Vollpfosten“ nach „Benutzer:Mycroft Holmes“ verschoben und dabei eine Weiterleitung überschrieben
  • 15:41, 29. Jun. 2008 Tafkas (Diskussion | Beiträge) hat „Vollpfosten“ gelöscht ‎ (Unsinn)
  • 14:58, 17. Okt. 2008 Maclemo (Diskussion | Beiträge) hat „Vollpfosten“ gelöscht ‎ (Kein enzyklopädischer Inhalt)
  • usw.

Die Konkurrenz Stupidedia bietet hingegen ausführliche Informationen.

Sun 2010-03-07 ( En pr ap )

In January, I wrote about my thoughts on the iPad:

Somehow, I’d like to code on that thing! TextMate 2 for iPad?

Some weeks later, I realized that this might have been a stupid idea. Isn’t the iPad a media viewer, with editing capabilities for visual things like presentations at most?

On third thought…

Well, now Matt Gemmell writes about iPad Application Design. The first line that got me was:

Look like a viewer, and behave like an editor.

Wow, what a statement :) Isn’t that what TextMate is all about?

Wed 2010-02-24 ( En pr )

If something has more than, say, 5 parameters, it should be divided into components that have less.

Less is more. Hierarchies, if sensibly applied, can manage complexity.

Think LEGO.

Mon 2010-02-22 ( En pr )

1 puts, p, print

2 require

3 raise, throw, warn

4 new

5 to_s, to_i, to_f, to_sym

6 private, protected

7 class

Sun 2010-02-07 ( En bl )

Why did I name my blog “(almost) murphy.de”? Two reasons:

  • My internet nickname is murphy, and I’m German. However, murphy.de was taken. I thought I could use that as an idea for the name.
  • I’m an incomplete being. There’s a great Blues Brothers song called Almost (original by Downchild) which gave me the idea. I think “almost” is a nice word, too.

So, this is my explanation :) What about your blog’s name?

Sat 2010-02-06 ( En fu pi )

Thu 2010-02-04 ( En po )

Here’s a good article about the recent discussion about finally allowing gays (and lesbians) to serve openly in the US military. I hope Obama and the Admirals get this through.

And what about you, Turkey? Serbia? Greece? Singapore, Malaysia, Myanmar? North and South Korea? Sri Lanka, India, Pakistan? Western Asia (except Israel)? Venezuela, Chile? Cuba? And, for god’s sake: Jamaica.

Thu 2010-02-04 ( En fu pi )

Or, the original version:

Tue 2010-02-02 ( En pr )

They do. As do Germans, Spaniards, Californians, Czechs, Polish, Indians, and propably some Japanese. I think that’s cool :)

Sun 2010-01-31 ( En pi ra )

This has got to be one of the ugliest logo images of a professional project ever:

But it’s used on their official website! This is embarrassing for “The Industry’s Foundation for High Performance Graphics”, as they call themselves. Seriously, drop animated GIFs. They stink.

Website Copyright 1997 – 2010 Khronos Group. A-ha. How about updating it to today’s web standards? At least make it valid!

I hope they make a WebGL website in the future ;)

Thu 2010-01-28 ( En ap )

Well, my prediction was wrong. After all these years, rumors have become reality: The iPad exists.

So, here are my thoughts about it:

  • The name is silly.
  • The lack of multitasking (they would have mentioned it if it was allowed) is definitely a problem. I don’t mind this limitation on the iPhone, but I can’t see anybody doing office work without being able to switch to email, browser, calendar, and messaging applications. I’m sure Apple knows that, and has come up with some solution.
    • Maybe apps really save their state always, and are starting up so quick that it doesn’t really matter if an app is running or not, the springboard just mimics an Exposé.
  • The A4 is running at 1GHz and has a graphics chip built in. I think this is interesting; Apple may become CPU/GPU-independent in the future. A4 in the 4th-gen iPhone?
  • Nobody seems to know about the RAM. But I guess it’s not fast enough for tasks like video editing or compiling.
  • Somehow, I’d like to code on that thing! TextMate 2 for iPad?
  • The user interface seems strange to me…a crossover of the iPhone OS full-screen, one-app-at-a-time interface on a traditional Mac OS X desktop?
  • Why in the world did they put in a compass and a microphone?
  • The keyboard is “almost to scale” – what’s that supposed to mean? How am I to type on this thing? Do I always need a chair? (They really needed that armchair for the presentation.)
  • Price: $499 is cool, but why is it so much more expensive with 3G or more storage? But I guess 64GB would be enough for almost every task, for now.
  • GPS seems to be limited to the 3G model.
  • No camera…so, I take a camera with me and…how to get the photos on the iPad?
  • No ports. No USB, no micro display, no nothing. I want to be able to plug in USB sticks! They didn’t even put in one of those SD card slots that recently popped up in MacBooks and iMacs. The answer to this is Accessories. Some of those cost extra; I don’t know if the SD/USB dongles are included.
  • Apparently the 3G model uses Micro SIM. That may be a problem, even if it’s unlocked.
  • 10 hours battery are nice, but expected.

All in all, it seems I would still need a laptop to perform day-to-day tasks. In its current form, the iPad is no replacement for a MacBook, not even the Air. It will be compared to the Kindle and other tablets, and the price will surely be a major con.

But as Mel Martin says, I’m sure Apple improves it over the next years.

Mon 2010-01-25 ( De pi fu )

20cm Eis sind bereits zuviel für deutsche Eisbrecher.

Sowas brauchen wir:

Sun 2010-01-24 ( De pi ra )

Am Dienstag hatte ich mich bereits darüber aufgeregt, dass Mikronesien offiziellen Protest gegen den Ausbau eines Kohlekraftwerks in Tschechien einlegt, angeblich aus Angst, nasse Füße zu kriegen.

Vergessen wir mal, was man mit Deichen alles machen kann. Ein virtueller Besuch der pazifischen Inselngruppe hat mich überrascht: Die bewohnten Inseln der Föderierten Staaten von Mikronesien haben hunderte Meter hohe Berge!

Chuuk

Die kleineren Inseln sind unbewohnt; Anstiege des Meeresspiegels (falls sich der Anstieg der letzten Jahrzehnte fortsetzt) hätten allenfalls einen Effekt auf sehr flache Atollinseln. Die Schicksale einzelner Bewohner, deren Häuser tatsächlich in letzter Zeit überflutet wurden, sind nicht übertragbar auf die gesamte Bevölkerung.

Die Insel Pohnpei, Sitz des Präsidenten, ist eine Berglandschaft:

Thu 2010-01-21 ( De pi )

Ich war schon etwas überrascht, als ich am Flughafen Schönefeld (das ist der kleine im Osten von Berlin) im Zeitungsladen diese hübschen Groschenhefte sah:

Diesmal im Heft: selbstklebendes Lippenbärtchen!

Zwischen Mangas, Schnulzromanen, Marvel und Star Trek – Panzer aus dem 2. Weltkrieg?

Eine oberflächliche Recherche per Handy bestätigte meine Befürchtung: ein Neonazi-Magazin, das die Verbrechen der Wehrmacht zu Heldentaten verklärt. Kostet nur 2 Euro. Fluggäste aus Russland können sich hier gleich wohl fühlen: Es gibt noch Deutsche, die sich an die alten Zeiten erinnern!

Ich musste mich zurückhalten, das Zeug nicht einfach in den nächsten Mülleimer zu werfen. Ob das auch in Tegel verkauft wird?

Uncyclopedia hat jedenfalls auch einen sehr schönen Artikel zum Landser, den ich mir auf der Rückfahrt durchlesen konnte. Auch lesenswert: die Feldküche TFK 250.

Wed 2010-01-20 ( En pr )

Ruby 1.8.6

…defines the following constants:

Tue 2010-01-19 ( De ra pi )

…und erwirkt eine offizielle Aufforderung an Tschechien, den Ausbau eines Kohlekraftwerks zu überdenken. Mikronesiens Präsident hat “Angst davor, wegen des klimabedingten Anstiegs des Meeresspiegels in den Fluten zu versinken”. Die komplizierte Kette von Kohlendioxid-Ausstoß und Kohlendioxid in der Atmosphäre, über Treibhauseffekt, Wolken, Niederschläge, globales und lokales Klima, bis zur Wassertemperatur und der Höhe des Meeresspiegels ist wissenschaftlich noch längst nicht komplett verstanden, aber “Greenpeace hat Mikronesien natürlich mit Informationen versorgt”.

Super! US-amerikanische NGOs missbrauchen kleine Inselstaaten für ihre politischen Zwecke. So wie die Armee das früher gemacht hat.

Übrigends:

Es wird angenommen, dass der Anstieg des Meeresspiegels in den nächsten 100 Jahren keine oder nur eine geringe Bedrohung für die Riffe darstellt, da gesunde Riffe wahrscheinlich zu einem vertikalen Wachstum von bis zu 10 mm pro Jahr in der Lage sind.

Vielleicht sollte Tschechien (und der Rest der Welt) mithelfen, die Riffe gesund zu halten und Deiche zu bauen, und allen wäre geholfen. Mikronesien ist nämlich wunderschön:

Mon 2010-01-18 ( De ra )

Microsoft kann nicht einmal ein Download-Programm richtig machen: Es ist nicht in der Lage, einen Download nach Unterbrechung fortzuführen (leider erwischte mich der tägliche Netsplit.)

Dann probiere ich Windows 7 eben nicht aus.

Mon 2010-01-18 ( En pr pi )

Two weeks ago, I demonstrated how to draw text on a WebGL texture. Eric Shepherd is even rendering video [warning: with sound]. Today, I’m rendering web content – that’s to say, a HTML page.

Again, I’m using the canvas 2d context to draw the content before using its data for the texture. The example is also based on Giles’ WebGL Lesson 7.

Mozilla’s Firefox has a unique feature called drawWindow. It’s not secure and thus you have to ask the user for explicit permission. So, it’s not ready for general usage, but it’s a nice demonstration.

Note: Before the example works, you have to enable the signed.applets.codebase_principal_support option in about:config. Disable it afterwards!

I also use an IFrame. So, this is about as evil as it gets.

Firefox only; you'll be asked for permission.
You need a WebGL-enabled Firefox to see this.

Here’s the code:

Sat 2010-01-16 ( De fu pi )

Fri 2010-01-15 ( De fu )
D       A          h    fis
Schöner wäre diese Erde –
     G     D      G   A
ohne Pferde  ohne Pferde
D         A               h     fis
Soll euch doch der Teufel holen
        G     D         G   A
All ihr Stuten  und ihr Fohlen
D       A                h       fis
Von der Schnauze bis zum Schwanz
G     D G                 A
Pferde  ich veracht’ euch ganz

(Text: Robert Gernhardt, Melodie: Johann Pachelbel)

Thu 2010-01-14 ( En ap pi )

The world expects a “tablet/slate/unicorn/whatever”…as James Higgs puts it.

My prediction, and I go out on a limb with this, is:

There is no f*cking tablet!

Update: Oh wait, now they’re even dismissing a non-existing product!

Apropos…why not posting some more images of unicorns :)

Tue 2010-01-12 ( En pr )

Kirk Haines just stated:

If superior execution time is only achieved by offloading extra work
to an idle core, then that really isn’t a gain.

Agreed. Just because we have multiple cores now, that doesn’t mean we have to spawn threads for everything. In my opinion, achieving great single thread performance with good algorithms and clever optimization is still the best way of programming fast applications.

Tue 2010-01-12 ( De fu )

π × Daumen – wieviel ist Daumen?

Die Antwort auf alle Fragen ist bekanntlich 42. Also:

π × Daumen = 42   |⋅ 1/π

Daumen = 42/π ≈ 13,37

Das ist eindeutig ein hundertstel 1337.


Yeah!

Sun 2010-01-10 ( De fu )

Großstadt Uppsala und die Universität Upssala.

Fri 2010-01-08 ( En pr pi )

I compiled a pie graph of times needed for CodeRay scanner tests. More test data for a language means more time to run the tests.

As you can see, I have a lot of tests for Ruby (60,000 lines of code) and C (70,000), and less for Delphi (11,000). The combined “other” languages are C++, the CodeRay debug format, diff, ERB and Nitro HTML templates, Scheme, and XML.

I used the excellent Gruff graph library.

Here’s the code:

Thu 2010-01-07 ( En pr pi )

WebGL has no text rendering functions. But it’s pretty easy to create a texture with text using canvas 2D context:

Looks best in Safari. Firefox has some strange issues with the font rendering.
You need a WebGL-enabled browser to see this.

The interesting code:

Thu 2010-01-07 ( En pr )

When cp -r takes a lot of time, I want to have an estimate how long it will take. My first approach was based on checking the size of the copied data repeatedly with du -sh.

This is obviously now very clean. Marco (a fellow student) told me that cp reacts to the SIGINFO signal by printing the progress to stdout. The manpage says:

If cp receives a SIGINFO (see the status argument for stty(1)) signal, the current input and output file and the percentage complete will be written to the standard output.

This is what the output looks like:

$ cp3 large.file large.file.copy 
large.file -> large.file.copy  42%
large.file -> large.file.copy  88%

Here’s the code:

Wed 2010-01-06 ( En pr )

I’m trying out a new scanner/encoder concept for CodeRay that would (hopefully) make highlighting even faster while improving the code at the same time.

Basically, it’s about bypassing the Tokens representation altogether.

The tests can be seen at Odd-eyed code.

Here are my results so far:

Tue 2010-01-05 ( En pr )
(1..100).select { |n| p n if ('1' * n) !~ /^1?$|^(11+?)\1+$/ }

Basically, the /^(11+?)\1+$/ part checks if the 1-string can be factorized. See Avinash Meetoo.

Mon 2010-01-04 ( En pr )

I use TextMate for everything that is text. Programming, organizing, shell-foo, writing for studies, protocolling, writing songs or guitar tabs, looking at patches and code, organizing, learning. And I have given up some great editors for it – Delphi, RDE, VIM, Weaverslave…actually, I switched to Mac in 2006 because of this software.

Sun 2010-01-03 ( En pr )

I just found out that I am [one of] the 129th most busy Rails Contributor[s], for my work on 7 patches back in 2006 and 2007.

Actually, I’m even #97 because 3 tickets for murphy where counted separately. Yay! I’m one of the top 100 Rails contributers. Now that’s something to brag about :D [Update: Xavier Noria added the alias. Great!]

Funny: Ezra Zygmuntowicz, Ola Bini, Sam Ruby, _why (the lucky stiff) and Zed Shaw come in last with only 1 commit. Even JEG2 has only worked on 3 tickets.

Also funny: There are currently exactly 1337 contributors listed!

Sat 2010-01-02 ( De ap )

Knut und ich haben in der Nacht vom 1. zum 2. Januar eine kleine Install-Party veranstaltet, das heißt, wir haben uns Zeit genommen, gemeinsam einige Software zu installieren. Erfahrungsgemäß dauert das länger, und man ist froh, wenn man entstehende Probleme gemeinsam lösen kann.

Thema: Snow Leopard, also Mac OS X 10.6, auf unseren beiden MacBooks (Rico und Triella) zu installieren. Beide arbeiteten bisher mit Leopard (10.5). Eine Probeinstallation auf meinem iMac lief reibungslos.

Sat 2010-01-02 ( En pr )

devtail.com, a new site about developers’ lifes and works by Ian Stewart, is using my CodeRay syntax highlighter :) Nice.

Quote from his mail to me:

*Such* a great gem!