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.

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.

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>

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.

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!

…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?)

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!

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:

a store i just passed by announces they sell organic mattresses

when you have this amount of hair in your legs… one of the most hairy question of your day probably is “should i apply soap or shampoo?”

butterfly, and jellyfish.

seems we run out of animal names and now we are combining food and other animal’s names. so biologists, for when you discover a new species of animals, here are some propositions:

flowerfrog and milkbear

why are so many different ways to write Stephanie? and i’m talking of the american rendition of the name only. double n? f? ph? y in the end? you must be bullshiting me.

It’s being a while since last time I had time for making a mathematical image. I still don’t have the time nor I am able to make it. But I did found a few minutes to spare and took and old mathiamge (#4o in fact) and doodled on top of it, mainly with the geometry, the lighting and the colors. As usual, this runs/moves in realtime, and as usual too, the maths/code are available for few here:

It loved getting distracted and letting mind and let it wander freely and randomly for a few minutes. It feelt really, really good. I enjoyed a lot.

this morning i saw a pregnant woman. in San Francisco!

it’s amazing to see life making it through the most hostile of the environments.

ok americans, idk wtf is going on w/ u and acronyms. lol.

why do women’s bike have a different frame shape than men’s?

I think size matters. However, unlike in real life, when programming the smaller the better. Generally. Also, the less branches the better, at least when programming for parallel systems. And also, the more compact and regular, the prettier (but this is my personal opinion only).

Related to this, in the last 6 months I have pointed out / proposed this same optimization to at least five different people. Basically, it seems most people make this same “mistake” over and over again, which is to write this horrifying thing

vec3 color = vec3(0.0);

if (theta < 1.0) {
color.r = 1.0;
color.g = theta;
else if (theta < 2.0) {
color.r = 2.0 - theta;
color.g = 1.0;
else if (theta < 3.0) {
color.g = 1.0;
color.b = theta - 2.0;
else if (theta < 4.0) {
color.g = 4.0 - theta;
color.b = 1.0;
else if (theta < 5.0) {
color.r = theta - 4.0;
color.b = 1.0;
else {
color.r = 1.0;
color.b = 6.0 - theta;
return color;

instead of this equivalent line:

vec3 color = clamp( abs(mod(theta+vec3(0.,4.,2.),6.)-3.)-1., 0., 1. );