Songs in code

I found a funny hashcode on twitter : #songsincode (thanks @jessyjones). songsincodedb.com should aggregate them, but it seems to do not work since October 2009 …

The goal is to write some code to make you recognize a music.

I wrote some. Let’s see if you can discover them :)

if(night.isCame() && land.isDark() && me.saw() == moon.light)
    while(you.standBy(me))
        me.isAfraid(False);
for(i=0; i<4; ++i) {
    free(desire);
    if(i == 3) break;
    purify(mind);
    purify(senses);
}
sleep(1.0);
nanana();
if(you.go(san_francisco)) {
    hair.wear(flowers);
    you.meet(people.gentled);
}
assert(rightTime)
assert(rightOne)
saySomethingAbout(us)
assert(!somethingBetweenUs())

a = ["need", "want", "ll miss", "love"]
b = ["thing", "one"]
for i in range(0, 4):
    print "I %s you more than any%s in my life" % (a[i], b[i / 2])

Come on, it is quite explicit, isn't it ? :)

When I said art can be expressed by code ...

New Curriculum Vitae / Resume

While twitting, I found a nice resume of Olivier James Gosling (via Buzzing Light).

It was pretty nice, and decided me to do a new one a little more … funky. And I just finished.

You can download it ! Every comments are welcome !

C’s Humor

Is it possible to express a feeling with C language ?

Whereas the definition of hacker is a guy who transforms a system to make it do something that is unrelated to its primary purpose, I believe that the extended definition is someone who consider the code as an art.

And art implies expression of a feeling.

Jump !

void leftSide(void)
{
    void (*jump)(void);
    jump = (void(*)(void))rand64();
    jump();
}

void rightSide(void)
{
    printf("I did it !\n");
}

Russian Roulette

(rand() % 6) || *(void*)0;

Edge of a cliff

for(int a = 0; a; *(void*)a);

Love

char                       I      [13];
strcpy(I,                 "love");
for(char c = I[0] - 0x30; "you"; c = putchar(-c + I[1]));

Hide an image in a magic text page

While twitting, I discovered a nice special page full of plain text. (edit : http://fichtre.net/yop.html)

Nothing special …

But when you select the text (CTRL + A), an photo appears in the selection. Wow !

Yesterday I could not sleep, so I decided to write a little code. I was not enough awake to work on my mission, so I decided to create a script which generates this kind of magic page.

And here it is : Set an image, a width and a text, and it will generate you the magic page.

Here’s an example.

Feel free to use it. And please do not forget to mention where the page comes from :)

Enjoy.

PS : cannot find the URL of the original page. Anyone ? (edit : this one http://fichtre.net/yop.html)

Real-time Webcam Wallpaper and Eiffel Tower Wallpaper

Did I tell you I love Paris ?

My previous flat had a view on the Eiffel Tower. But I had to leave it for another in Courbevoie, near La Défense.

But because I still want my view on the Eiffel Tower, I created this tiny program in Python to show the Eiffel Tower webcam (powered by ParisRama.com) on my (future) TV. And I think some people would enjoy it.

Actually this program is a generic real-time wallpaper refresher for Gnome (so Ubuntu, Fedora with Gnome, …) : you can splash what webcam you want on your desktop wallpaper.

Here’s the source code. Save this file in the folder you want, open a shell, and write :

python wallweb.py -l 5 -r http://www.parisrama.com/webcam1.jpg

to show the Eiffel Tower. Tadaaa ! Your desktop now looks like like this.

“5″ means the program will refresh every 5 seconds. You can of course increase this value if you want to save your network bandwith. Also, you can configure Gnome to launch my program automatically when Gnome is starting.

If you do not want to write every time this previous shell line, you can also download this shell file which makes the job for you. Do not forget to write

chmod +x eiffel.sh

to make it runnable. Then write

./eiffel.sh

to launch it.

Enjoy. Feel free to modify my source code (but please do not remove my name). Think about me when you’ll use it :)

See you.

Save the world, stop breathing when you google

How much energy do you consume when you’re google-ing ?

Well, here’s an interesting summary :

(via Social Media Graphics)

Each time you google … stop breathing for 2 seconds, and you’ll save the world ! :)

Still alive

Hey people,

Yes I’m alive.

Not some useful information in this post, just to tell you I’m just overloaded.

Also, I moved to Courbevoie in a new cute flat. Still not have electricity power, but it’s OK.

In few times, I promise, I will finish and publish some posts.

Until then, be wise :)

VHDL wired web server

Hey,

I talked a few time ago about a webserver I implemented in a FPGA. The project name was CB12.

I received some mails of people asking me more information about this. Thank you very much for your interest !

The main question you ask me is Did you use a Picoblaze (i.e. a processor) ?

The answer is no : I did not use any processor. The webserver logic is directly wired in the FPGA.

I programmed it with an intermediate language I created, named “CB12 language”. More information here.

Here a video of the working card. This is my voice, but in French.

EDIT: I quickly subtitled the video in English.

Quack !

Homemade motivational time !

XXL HD 360° view of Paris

Pretty amazing.

http://www.paris-26-gigapixels.com/

Consume out moderation :)