Monthly Archives: June 2014

can’t be

i don’t believe people who look at their watch for no more than one or two seconds, and they do know what time it is!

and then they even go “sure, i got time”.

. i . so . don’t . believe . you .

you know who you are

When you have to acknowledge gratitude to a bunch of people but you are too lazy to list them all… or when you fear forgetting about somebody… or even more often when you think not everybody that will want to be listed should actually be in that list…

…then, feel free to end your communication with a “you know who you are”

It’s perfectly responsibility-free, politically correct, and annoyingly impersonal. It works wonderfully in the modern world

the data speaks

i have only missed 3 out of the 28 planes i have taken in the last 10 months.

it’s a mere 11% miss rate…

the problem is that there had never been a traffic jam or anything making me miss my plane – it was always me being happily oblivious to the fact that my plane was at that time.

and no matter how i look to it or what excuses i give to myself… the data seems to clearly draw a conclusion. yes, i must be some sort of retard.

eventually and literally

Somebody was complaining the other day that according to the dictionary, “literally” now also means “figuratively”. It seems that the misuse of the word as a hyperbole by over-excited people have made it in practice, ironically, mean the opposite of what it actually means.

I noted to him that, then, he should know that the word “eventually” is probably being “”””misused””” by English speakers too, probably something he didn’t know. Cause, it is my impression that “eventually” must have changed its meaning in the recent history of the English language, to what it means today: “finally”.

The thing is, most other languages keep the “”true””” meaning of “eventually”: “by chance” or “incidentally’ – something that happened as an rare/individual EVENT. Hence, “eventually”. But I guess English speakers one day decided to make it mean just the opposite.

So, the same way he was literally unaware of the misuse of eventually, future generations will eventually be unaware of the misuse of literally.

please simplify me (again…)

Yet another example of code simplification that people don’t seem to want to do. It must be the 5th ot 6th time I ask people to do this change when programming a point-to-line distance computation: please, replace this ugly

float sdLine( vec2 a, vec2 b, vec2 p )
    vec2 ba = b - a;
    vec2 pa = p - a;
    float dist = (ba.x*pa.y - ba.y*pa.x) / distance(a, b);
    if( dot(a-b,p-b) < 0.0 ) 
        return distance(b, p);
    if( dot(b-a,p-a) < 0.0 ) 
        return distance(a, p);
    return abs(dist);

by the much more beautiful:

float sdLine( vec2 a, vec2 b, vec2 p )
    vec2 pa = p - a;
    vec2 ba = b - a;
    float h = clamp( dot(pa,ba)/dot(ba,ba), 0.0, 1.0 );
    return length( pa - ba*h );

Do it for the karma or something.

San Franweird

One of the things I love from this city is its generalized weirdness. One doesn’t need to look too far or too hard to find it.

It’s a random Tuesday night, and I’m in my walk home after a long day of work. It’s late, but warm, so I decide to walk my bike and enjoy observing the city. A city that has already switched to its darkest face: that of neon lights, sirens, dark human silhouettes, unintelligible distant voices, party-hungry lost people, 24 hours liquor stores, and also, partially lit strange fashion store windows.

In fact, I hadn’t plan it at all, but after noticing I just passed a couple of weird store windows, I decide to take my camera out and capture some the ones I still might have to pass till I arrive to my place. And indeed, San Francisco delivers a few wonderfully creepy and fantastically weird store windows. The lighting design and the layer of window reflection of glowing elements of the city night makes them look amazing to my eyes (no photoshop required)

(click image to enlarge>

how to pronounce “data caching”

Imagine there’s a bunch of totally american, native English speaker nerds talking about data caching. How many different ways will they pronounce “data caching”?


Because of cache pronounced as “cash’, and cache pronounced as “cage”. And then, because of data pronounced as “data”, and data pronounced as “deita”.

Yeah. I also don’t know.

things you learn

This cable car I’m riding dates back to 1873, when this city had 31 cable car lines operated by different companies. Apparently, this one and the other cars in the three currently operating lines are all original unmodified cars from those times.

And these are things you learn when you decide to take it easy and commute to work in a cable car. Despite it’s not raining. Why not!

i have noticed…

…that the most judgmental and less forgiving people that i’ve met tend to be those same ones that go to church every Sunday.


This is a very, very, VERY primitive example of making mathematical music, but I quickly sketched it to showcase the fact that, indeed, one can use mathematics to make sound and perhaps music.

I defined a simple mathematical instrument and then sequenced some copies of it at different frequencies based on the timing of the a real song (from Pirates of the Caribbean). The result is some mathematical music. The nerds might have a double orgasm by knowing this music was computed totally in parallel in the Graphics Processort Unit (GPU). The image below is just a quick sketch (15 minutes work) to accompany the music. Go clock this link to listen to it and to see the code/maths behing it!


Idea – open a restaurant and call it “Any”.

That way there will not longer be endless discussions with friends on which restaurant we should go to.


you know when you receive an email and you can totally tell they copy and pasted most of it….? because halfway the email suddenly everything changes to a different font size…?

c’mon people, i know pretending is no good, but at least format your emails! (or is it that they don’t see it’s a different font?)

sound sampling and product of squares

I was in the train going to work today, asking myself why would one choose 44100 Hz as a sampling rate for commercial music (CDs, MP3, audio streaming, etc).

Surely it had to be around 40 KHz to satisfy Nyquist–Shannon sampling theorem, but why exactly 44100 and not, say, 65536 or perhaps 49152 or some other power-of-two or digitally-friendly number?

Naturally my first guess was it had something to do with divisibility by some other communication frequency and standardized buffer sizes and data transfer rates. So I proceeded to mentally factor the number into its primer factors see if I could find something familiar. Indeed the number was divisible by both the American and European electric power frequencies, 50 and 60 Hz. That might explain perhaps the divisibility by 2²·3·5². But then I continued factorizing the reminder mentally just to realized that full factorization of 44100 was 2²·3²·5²·7²

What a surprise, 44100 is the product of the first four primer numbers squared!

most simple mathematical image ever

The so called “batman equation” made some fuzz some years ago because it showed people that one can draw shapes with maths. Surely enough the general public (and oftentimes the specialized as well) don’t know or understand that drawing with maths is not limited to simple shapes, and that it can bring you as far as drawing with brushes can. In fact, every now and then I receive some naive email from a fan pointing me to the “batman equation” without realizing that all the landscapes, characters or pianos I ever drew and posted online are an equation – a huge equation crafted during days of mathematical sculpting and shaping and colorization. These images are complex and rich in texture and make the “batman equation” look like what it is – a simple toy. But it is that extreme simplicity that makes that mathematical image rightfully popular among the general public.

As a reply to one such eamil, the other day I spent twenty minutes building my own “batman equation” with, unlike the one he linked to, has color, texture and some volume to it as part of the equation itself, and sent it back to him.

As usual, the realtime version (cause my batman logo actually moves) and free public code are available here: