About

N.Léveillé (b. 1977, France) programs real-time audiovisual and business software, manages projects, coaches programmers, plays and composes electronic music, and occasionally writes about his experiences.

Read more...

nicolas @ uucidl

Habitat, l'étagère indisponible

June 24, 2010 by nicolas, tagged stories and french

L’autre jour je voulait acheter une étagère. Chromée, bien brillante, sur roulettes, longue¹. Je vais a Habitat-Montparnasse, accoste un vendeur qui me dirige vers son bureau, et là on me déclare que je ne peux point l’obtenir.

  • n’en avez vous plus en stock?
  • si, mais suite aux travaux nous n’avons plus accès a notre entrepot.

Alors moi, pas une pas deux, car j’avais la ferme intention d’avoir mon étagère le jour même (c’était le samedi suivant mes vacances et j’étais dans de bonnes dispositions) je leur dit qu’il n’est pas la peine de la reserver, quitte le magasin et me dirige vers la bouche de métro la plus proche pour aller a Habitat boulevard des Capucines.

Là-bas je trouve l’étagère tant recherchée. La vendeuse m’interpelle lors de mon passage dans le magasin, puis me dirige fatalament vers le bureau approprié. Le vendeur en face me dit oui oui pas de probleme attendez nous allons la monter ici, télephonant a son collègue en sous sol.

Ce collègue lui répond alors, dans un dialogue de sourd qu’il n’en voit aucune en stock, alors que le vendeur, en haut, en voit bien une sur son ordinateur.

Bilan, Ikea, ils sont pas mal quand même :)

¹ A noter que je me suis fait interpeler par un vendeur la première fois que je l’ai repérée, quand j’ai commis le grave crime de sortir mon appareil photo pour la capter pour plus tard.

post-LSV notes, Frank Bolero and Knos

April 26, 2010 by nicolas, tagged live visuals, music and tpolm, filed under works

Frank Bolero and Knos, LSV 7010-04-25

The TPOLM Lazy Sunday Video was an absolute blast, with lots of nice live performances and visual works.

Esem’ music for instance felt satisfying on so many levels. Machinedrum’s was full of vigor. Sense’s and Frank Bolero’s were full of romanticism.

Magic happened amongst the technical difficulties in the visual department. I was particularly curious about Nebogeo’s live coding with his programming language, fluxus. Magic also happened with the video signal manipulation devices that Jdigittl had built for the occasion.

2010-04-26, 2010-05-02: the lazy sunday radio (audio only, so) actually kept playing for a week, each TPOLM DJ handing the station over to the next one in a different time zone. The sunday never really ended.

I participated in the form of visuals for the swedish musician Frank Bolero:

It was an honor and a great pleasure to do visuals on such a moody soundtrack.

You will soon be able to get all of these performances at http://lsr.tpolm.org

During the afterparty, I also did a 2h long live visuals improvisation on a dj set by alkama:

Continue reading...

Upcoming event: Lazy Sunday Video (7010-04-25)

April 24, 2010 by nicolas, tagged live visuals, music and tpolm

This sunday 25/04 I’ll be doing the visuals for the first Lazy Sunday Video in 3 years.

You are all invited to listen to the mixes, which will last a great deal of the day. Some quite exceptional live music and visuals is to be played there.

Visually, there’ll be everything from analog synths to live coding to demo-style visuals and live photoshop.

Line up, details and streams at:

http://lsr.tpolm.org/?p=296
http://tpolm.com/

Audio/Video streaming will be done courtesy of http://ustream.tv

Image

motivation-hacking (activity tracking)

February 14, 2010 by nicolas, tagged motivation and activity, filed under projects

An experiment in motivation-hacking

In the spirit of:

http://lifehacker.com/281626/jerry-sein … ity-secret

One night I was in the club where Seinfeld was working, and before he went on stage, I saw my chance. I had to ask Seinfeld if he had any tips for a young comic. (…)

He said the way to be a better comic was to create better jokes and the way to create better jokes was to write every day. (…)

He told me to get a big wall calendar that has a whole year on one page and hang it on a prominent wall. The next step was to get a big red magic marker.

He said for each day that I do my task of writing, I get to put a big red X over that day. "After a few days you’ll have a chain. Just keep at it and the chain will grow longer every day. You’ll like seeing that chain, especially when you get a few weeks under your belt. Your only job next is to not break the chain."

"Don’t break the chain," he said again for emphasis.

And so this daily tracking page was born. It shows the overall activity of our code trees. Each day a commit has been performed, the day will be darkened. As the number of updated files grows, so does the darkness of each square.

Do something every day and you will progress. Do it for a long time and you will become an expert.

Sean Barret's Judy vs Hashtable Performance Comparison

October 4, 2009 by nicolas, tagged programming

http://uucidl.com/git/?p=hashperf.git;a=summary

$ git clone http://uucidl.com/git/hashperf.git

Requirements: GNU Make; cc; gnuplot.

Introduction

A couple of years ago, I stumbled upon the programming works of Sean Barrett. Both he and Molly Rocket partner Casey Muratori exhibit a refreshingly pragmatic approach to programming, a will to fight the useless complexity that too often plagues our field. Checking out their forums is also well recommended¹.

You might have read before about Judy, an associative array implementation by Doug Baskins, with peculiar performance claims.

Sean Barrett submitted Judy to his inquisitive eye, and produced an enlightening article "A Performance Comparison of Judy to Hash Tables"

A very interesting aspect of the comparison is that performance alone is not the sole focus: the article contrasts the Judy’s 200k lines of code with the 200 lines of code of a simple hash table implementation.

¹ As well as checking out Sean Barrett’s excellent pure C libraries: stb_truetype, stb_image, stb_vorbis and stb.

So what about it?

Well I just took a couple of hours to convert Sean Barrett’s original windows based test suite to POSIX platforms.

Just do:

$ git clone http://uucidl.com/git/hashperf.git

A Makefile (for GNU Make) to build the program, launch the (lengthy) tests and create the graphs, that’s about it.

To reproduce Sean Barrett’s results, just type:

$ make tests
$ make plot

Adding new implementations to the tests

You can easily add new implementations to the test suite by opening aatest.c:

Add your datastructure’s API to the top of the file:

// add your new datastructure code here

void *stlhashCreate(int size);
void stlhashFree(void* hash);
uint32 *stlhashFind(void *hash, uint32 key);
uint32 *stlhashInsert(void *hash, uint32 key);
int stlhashDelete(void *hash, uint32 key);
int stlhashCount(void *hash);

(...)

void reset(void)
{
    (...)
    if (stlhash != NULL)
	stlhashFree(stlhash);
    stlhash = stlhashCreate(1);
    (...)

Describe (AArray) the new hashtable to the test suite:

AArray stlhash_desc = { "stlhash", stlInsert, stlDelete, stlGet, stlCount, stlMem };

Add it to the command line:

int main(int argc, char **argv)
{
    (...)
    if (!stricmp("judy", argv[i])) a = &judy_desc;
    else if (!stricmp("hash", argv[i])) a = &hash_desc;
    else if (!stricmp("bhash", argv[i])) a = &bhash_desc;
    else if (!stricmp("stlhash", argv[i])) a = &stlhash_desc;
    (...)
}

You also have to produce the datasets in the Makefile

First add a new testing function, and add it to "both". Don’t forget to change both the parameter and the name of the output file.

## testing functions

stlhash=./$(TEST) stlhash $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9) > $(OUTPUT)/stlhash$(1)$(2)$(3)$(4)$(5)$(6)$(7)$(8)$(9).txt
bhash=./$(TEST) bhash $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9) > $(OUTPUT)/bhash$(1)$(2)$(3)$(4)$(5)$(6)$(7)$(8)$(9).txt
(...)
both=\
    $(call judy,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),$(9)) ; \
    $(call hash,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),$(9)) ; \
    $(call stlhash,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),$(9)) ; \
    $(call bhash,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),$(9))

Plotting the results: then you have to also manually add the new datastructure to the plotting scripts: buildraw.gp, proberaw.gp