2009-11-30

LHC explained

So, the LHC is on the news again. If you have missed it last year, don't miss it this time:

Large Hadron Rap


Labels: , ,

2009-11-29

Getting the old open tab behavior back into Firefox 3.6

Set browser.tabs.insertRelatedAfterCurrent to false.

Labels:

2009-11-08

99 Bottles of Beer in Factor

99 Bottles of Beer in Factor.

A naïve implementation from someone who is just beginning to (re)learn the language and doesn't want to (nor can) show off the flashy features, like so many other examples of 99 Bottles of Beer.

USING: combinators io kernel make math math.parser sequences ;
IN: 99bottles

: bottles ( n -- str )
{
{ 0 [ "no more bottles" ] }
{ 1 [ "1 bottle" ] }
[ number>string " bottles" append ]
} case ;

: verse-0 ( n -- )
drop
"No more bottles of beer on the wall, no more bottles of beer.
Go to the store and buy some more, 99 bottles of beer on the wall."
print ;

: verse-n ( n -- )
[ dup bottles % " of beer on the wall, " % dup bottles %
" of beer.\nTake one down and pass it around, " %
1 - bottles % " of beer on the wall.\n" % ] "" make
print ;

: verse ( n -- )
dup 0 number= [ verse-0 ] [ verse-n ] if ;

: 99bottles ( -- )
100 reverse [ verse ] each ;

MAIN: 99bottles

Labels:

2009-08-28

Flash Gordon and NoSQL

No matter if they say that MongoDB got its name from "humongous", for me it's the planet Mongo from Flash Gordon.

Labels: ,

2009-08-27

Other blogging software, again

It was time again to change the blogging software. Sorry if the newsfeed is showing old messages as new.

Labels:

2009-06-06

Nice Anti Register Globals Code

Found in Textpattern:

if (@ini_get('register_globals'))
foreach ( $_REQUEST as $name => $value )
unset($$name);

Labels: ,

2009-05-28

Benchmarks are merciless


A number 1/4 for A vs. B means that B is 4 times slower than A.

The Computer Language Benchmarks Game is more a community benchmark than a programming language benchmark. You get some ballpark figures that confirm what you already know beforehand: C++ is faster than Ruby :-)

But it's still depressing to see that a current implementation of JavaScript is faster than Python.

Labels: , , ,