sindro.me

feeling bold on the internet

about

When you install the developer beta of Windows 7, after the usual 3 reboots cycle, you are greeted with the following image:

The Betta Siamese Fighting Fish

It is the Siamese fighting fish, a beautiful tropical fish, but with an interesting characteristic: it is extremely aggressive. It is popular belief that two males fight themselves even in the wild, but that’s not quite true. This belief descends from the behaviour of the fish into an aquarium, where the victor continuously attacking the loser, eventually causing the loser’s death.

Now, think about the software ecosystem as an aquarium. And think about Microsoft into this aquarium. The latest release of Microsoft OS has an aggressive fish as its default skin, and it is alone in this aquarium. And there’s no place for anyone else: they’ll fight whoever adversary, even if it’s from the same species.

What’s uncertain is .. they’ll succeed, or not? :). We’ll see!

au lab pwnz

The right session shows a document open on an aggregate audio device between soundflower (2ch) and a Creative SBLive with 6 channels: the flower receives sound input from iTunes and routes it to the card channels, using all the 6 speakers.

Effects have been added to improve the audio experience (details here: http://www.rottenbrains.com/?p=232). The right session also uses AUNetSend to stream audio onto the left session, connected to the built-in speakers of the macbook.

Result: stereo audio being played on eight channels. Audio Units are a really powerful instrument, well coded and well working.

[tks nextie for telling me about AUNetSend and AUNetReceive]

UPDATE 19-12-2008

au lab pwnz again

Improving: there is no need to use NetSend and NetReceive to play on 8 speakers: an aggregate device composed of Soundflower 2ch, the USB 6ch SBlive and the Built-in output is enough!

Also, note the new bus: it’s required because the AUMatrixReverb effect added to the center channel to improve the audio stereophony actually takes two channels, so it overlaps with the following one (the LFE). But applying the effect to a bus does not exhibit this side effect.

Result: excellent 7.1

Exactly the words that run around my mind these days:

http://www.readwriteweb.com/archives/the_end_of_online_anonymity.php

When we reach the point where online anonymity has ended, instead of getting to be who we really are, the fact that we’ve become so aware of the fact that we’re always being recorded, photographed, tracked, and traced, will have actually created a slightly altered personality instead. Like reality TV show contestants, the act of being observed will change our behavior. Our personal brand image will become our public identity and therefore our identity.

I’d think these describe exactly the “facebook effect”.

What do you think?

If you’re wondering why the CCacheServer daemon, that caches in memory Kerberos tickets obtained via kinit(1) is NOT starting .. that’s because of a strange bug regarding the LimitLoadToSessionType specified into the agent .plist, located into /System/Library/LaunchAgents/edu.mit.kerberos.CCacheServer.plist on OSX 10.5 systems.

You simply have to comment out these two lines:

<key>LimitLoadToSessionType</key>
<string>Background</string>

And either

launchctl load /System/Library/LaunchAgents/edu.mit.kerberos.CCacheServer.plist

or reboot your system ;).

CCacheServer will then be instantiated when you do a kinit:

$ kinit
Please enter the password for vjt@DOMAIN.LOCAL:

$ klist
Kerberos 5 ticket cache: 'API:Initial default ccache'
Default principal: vjt@DOMAIN.LOCAL

Valid Starting     Expires            Service Principal
11/12/08 20:59:35  11/13/08 06:59:14  krbtgt/DOMAIN.LOCAL@DOMAIN.LOCAL
    renew until 11/19/08 20:59:35

The bug is strange because the LimitLoadToSessionType key actually should instruct launchd to automatically start up the daemon and run it once for every logged in user, when kinit asks its services. But, if the key is set in the .plist, a launchctl load on it fails with “nothing found to load”. Weird!

If you use github-provided lighthouse integration, from the “Admin” pages of your git repository, you may have stumbled upon on a glitch: every changeset on lighthouse appears as done by the lighthouse user that configured the integration on github.

This happens because lighthouse uses the API token to link changeset authors to LH users, and that’s not good when you’re not alone committing :-).

A simple solution is to use a post-commit hook, as described here, but that’s not satisfactory because it means that every time you issue git commit on your console, the commit message will go public, and if you --amend or reset --soft the index you’ll have to browse to lighthouse and delete the changeset.

A much smarter solution is to push all changed revs when pushing them to github: I modified the original post-commit hook and installed it alongside the git command in $(dirname which git)/git-lh.

This gives me a new git lh command that fetches the current HEAD revision from github using refs/heads/master and POSTs every changeset between that rev and the current tip in the working tree to lighthouse.

So, if you issue git lh before issuing git push, every change you’re pushing to github will go to lighthouse, too.

UPDATE: A simple bash script like:

#!/bin/bash
git lh && git push

saved as git-lh-push saves you from typing two commands when you want to push :).

Have fun!

References:

the git-lh script on github

The mayonnaise jar and two glasses of wine

“Quando ti sembra di avere troppe cose da gestire nella vita, quando 24 ore in un giorno non sono abbastanza, ricordati del vaso della Maionese e dei due bicchieri di vino…”

Un professore stava davanti alla sua classe di filosofia e aveva davanti alcuni oggetti.

Quando la classe incominciò a zittirsi, prese un grande barattolo di maionese vuoto e lo iniziò a riempire di palline da golf. Chiese poi agli studenti se il barattolo fosse pieno e costoro risposero che lo fosse.

Il professore allora prese un barattolo di ghiaia e la rovesciò nel barattolo di maionese. Lo scosse leggermente e i sassolini si posizionarono negli spazi vuoti, tra le palline da golf. Chiese di nuovo agli studenti se il barattolo fosse pieno e questi concordarono che lo fosse.

Il professore prese allora una scatola di sabbia e la rovesciò, aggiungendola nel barattolo; ovviamente la sabbia si sparse ovunque all’interno. Chiese ancora una voltase il barattolo fosse pieno e gli studenti risposero con un unanime “Sì!”.

Il professore estrasse quindi due bicchieri di vino da sotto la cattedra e aggiunse il loro intero contenuto nel barattolo, andando così effettivamente a riempire gli spazi vuoti nella sabbia. Gli studenti risero.

“Ora”, disse il professore non appena la risata si fu placata, “voglio che consideriate questo barattolo come la vostra Vita. Le palle da golf sono le cose importanti: la vostra famiglia, i vostri bambini, la vostra salute, i vostri amici e le vostre Passioni; le cose per cui, se anche tutto il resto andasse perduto e solo queste rimanessero, la vostra vita continuerebbe ad essere piena. I sassolini sono le altre cose che hanno importanza, come il vostro lavoro, la casa, la macchina… La sabbia è tutto il resto: le piccole cose.

The best blog post I've ever wrote

- 1 min read
javascript, klingon, javascript, javascript, IE, IE, IE, sucks, optimize, optimize,
user experience, web2.0, harnessing collective intelligence, love, hate, sex, ruby,
rails, rails, rails, admin, REST, javascript, javascript, IE IE IE SUCKS, premature
optimization, assets, google API, love, love, hate, hate, air, trips, hide, toggle,
show, ryan, twenty-three times the pain, javascript, IE, ruby, rails, CSS, spacing,
position:absolute, love, love, love, love, too much, too much, too much.

number 42.

A friend of mine told me that on techie blogs there is a new meme going on: show off the most used commands, starting from shell history:

history | \
awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | \
sort -rn | head -15

I’ve got 20 times the default bash history size (10k lines), so it’ll yield interesting results. I also use the history timestamp feature, so I’ve added a little sed to the code in order to strip timestamps out.

Let’s see:

vjt@voyager:~/code*$* history | 
 sed 's#^[ 0-9\[\/\:]*\]\([^ ]*\).*#\1#' |  
 awk '{a[$1]++}END{for(i in a){print a[i] " " i}}' | 
 sort -rn | head -15
928 l
577 ssh
389 ping
381 cd
300 dig
259 telnet
153 sudo
126 ifconfig
125 whois
113 ps
96 svn
91 cat
73 fg
68 vi
61 ..

Yeah, I do a LOT of ls, l is actually ls -alFGs (I’m on Darwin). This list exposes my recent habits, because I’m coding less and managing more (no gcc, no irb, lots of dig & whois). svn is still there, of course ;). ssh means that these results should be aggregated with other histories coming from the other boxes I log on to.. but that’s a topic for another post ;).

Which are your results?

Post them here! :D

UPDATE 2008-06-03

As my recent habits are more coding than writing docs, I re-ran the history analysis.. and these are the new results:

1796 l
981 svn
705 ssh
693 cd
666 ping
402 vi
356 ifconfig
352 telnet
321 dig
315 sudo
283 fg
240 grep
188 ..
183 cat
157 ps

UPDATE 2009-02-20

5427 l
4379 git
3128 svn
2812 vi
2105 cd
1408 ping
1392 fg
1328 ssh
935 ifconfig
893 grep
890 sudo
733 rake
653 cat
554 ..
535 ruby

UPDATE 2009-05-24

7374 l
5041 git
3265 vi
3131 svn
2753 cd
1881 ssh
1763 ping
1618 fg
1101 sudo
1100 ifconfig
977 grep
867 cat
767 rake
721 telnet
671 ..

UPDATE 2010-06-01

20517 git
7794 l
1906 cd
1631 rg
1518 vi
1108 rake
1041 cat
1010 ruby
790 sudo
754 fg
676 make
670 script/console
626 rm
496 ping
474 ..

UPDATE 2012-07-23

3367 l
2685 ssh
1289 cd
1013 curl
976 git
857 sudo
815 ping
526 telnet
521 ps
497 cat
472 port
422 fg
400 vi
274 rm
259 dig