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. );

people in the train that read a book and listen to music in their headphones at the same time – i don’t believe you

I don’t know why people got so shocked to learn that Pluto is not a planet – I always knew it is a dog.

where exactly does one sign up to become a roller coaster designer/engineer?

i complain a lot. but i am a very happy man, don’t get me wrong.

i wake up every morning with a smile in my face. well, technically i am grumpy when i wake up, no smiles really, but it’s only for a couple of seconds, then i smile. after that i take my shower, i take my breakfast. i take it easy, i take my time. and sometimes, i take a nap too.

however, especially for a happy man, complaining can be fun and good. i actually think one critical comment a day is a healthy exercise to keep yourself in shape.

now, see post below

this morning i was in the train when i noticed an ad for a university (as you know, here students pay to attend university meaning they are customers), that used a language i have been disliking lately. the message and selling point of the ad was that students coming out of this university “love building products”.

now, “building products” is part of that common terminology used in the Silicon Valley area, that actually means nothing (to me, that is). in fact, i am pretty sick of hearing people talk abstract, generic, and free of any actual compromise with being concrete or precise. and not only the smoke sellers in the networking events do use this language – on the contrary, everybody, including the makers themselves, have adopted this weird meaningless language, where things like “designing strategies”, “building products” and “implementing solutions” are said.

i’m tired of meeting people who want to talk to me for minutes and all i hear are abstract words that mean nothing. at all. really.

or maybe i am too simple.

but in either case, i wonder, what the fuck has happened with the good old language of specific and precise words and terms? is there any economy left based on tangible goods? get companies built anymore with precise goals and problems to tackle? is there anybody left over here who actually makes better shoes, frames beautiful digital paintings, films movies, cooks tasty food, drives cabs, delivers goods faster or fucking programs banking software?

please, people, use concrete words to describe what you do, the beautiful words we all agreed on that together make language, and stop using your “designing strategies”, “building products” and “implementing solutions”. those make me want to throw up (or puke or vomit, see?, there are words, you pick one).

those nights when you cannot tell which day of the week it is, nor you care about asking it to yourself, when you are reading or writing or doing maths or your favorite thing, and the city sleeps in silence and darkness outside, when in your room all you can hear is the silence left in the negative space of the soft piano music in the background, and all you can see is the darkness left in the negative space a candle and some dim xmas lights… those nights of relaxed introversion, suspended in the vacuum of reality and time, those nights are especial

when sharing porn these days with a friend or partner one simply has to pass a web link in an email or chat client, and then copy and paste it in a browser. aseptic, boring.

in the old days one had to carry a magazine around more or less hidden, keep it for a while and finally give warning about sticky pages and such before delivering to the next friend. dangerous, exciting.

with the new technologies something romantic has definitely been lost about porn sharing…

i think that writing “with” as “w/” and “without” as “w/o” is the ultimate expression of the laziness. come on, write the damn letters. i’m not a native English speaker, but isn’t this some sort of offense to the beautiful language of Shakespeare?

I pass by a small boulangerie. It’s at the corner of three* crossing streets, in this silent neighborhood. I can hear the voice of a man talking aloud, so I decide to get in see what’s happening.

He’s talking to the store lady about somebody who’s not there, while she nods to everything he says. I stay in line after the man waiting for my turn, although I’m not interested in any of the croissants, eclairs, cupcakes or biscuits they have there really… I’m there just to enjoy the conversation. At some point she takes her turn and starts telling her little story about this missing person to him, while this time he agrees to everything she says. They are both pretty excited about whoever they are talking about. In fact, when she finishes her story and it seems it’s all over and he initiates his exit with a gesture, he actually comes back and says something that triggers a whole second part of the conversation. In the meanwhile, I’m there pretending I’m looking around while in reality I’m trying to grasp anything of what they are saying. Unfortunately they speak really fast and there’s little I get, but I am enjoying their vibe and heated talking anyway.

In the end the man does leave for real, and the woman finally looks at me. Je suis désolé…, she says. Oh ça va. Je voulais un baguette, s’il vous plaît. She hands me the baguette, which is 85 cents of a euro, and I leave the bakery. I don’t need the bread, but I have enjoyed the scene very much, which was the point.

And now I guess I have to sit in some bench and eat this baguette while I look at people walk in the neighborhood. It sounds like a plan to me.

* new born cities are arranged as a grid of perpendicular and parallel streets, but these ancient cities are more like a maze or spider net of randomly arranged streets, often creating intersections of three and four and even five streets.

i’m in my bed, i fell asleep a few minutes ago. suddenly the sounds of an incoming text message wakes me up. it comes from a friend who lives far away. she can’t sleep, she’s worried about some stuff that is not going for her the way she wished. i reply, and after a few messages back and forth, in the intimate silence of the night, miles and miles apart in our own bedrooms, we start listening to some music we both like. and for a moment it almost feels like we were sitting next to each other.

we finally agree on falling asleep again. and while i do, my last bits of consciousness play around with the realization that instantaneous communications allows for these little moments of friendship and connection, which is an incredible miracle.

One of the (many) difficulties I have with spoken English is that I’m not used to duration/length of the words to be a component in the pronunciation. In Spanish usually words are pretty orthogonal to each other phonetically (no two words sound the same or even similar), and in the rare cases of two words sounding potentially the same then syllabic strength disambiguates the words (a mechanims that English doesn’t use). We do of course use length to flavor words with drama or comedy, just like any other language, but length has never a semantic function.

And so, it took me a while to understand the spoken difference between beach and bitch. And only recently I have learned to not order “orange jews” during brunch.

I met Paula while coming back home last Saturday night.

She was sitting in the floor, protected behind some wood panels that the restaurant in that corner uses to create a private space when they open in the mornings. I didn’t see her at first, I was slowly walking and thinking of my things and only her soft voice made me realize I wasn’t alone. Do you have five dollars to spare, she asked.

I looked at her and I saw an old asian woman camping there with all she had, which was really nothing but a backpack and a snow hat. Her face was full of wrinkles and dirt, but I could clearly see her tiny eyes reflecting the dim lights around us. And despite her appearance, I for some reason felt I could hug that woman. Some people have that effect on me, I cannot explain it. In anyway, perhaps because of that I approached her and looked in my wallet for five dollars, which I didn’t find. I decided to give her twenty instead. I can tell she clearly didn’t expect it because she kept thanking me repeatedly, until I interrupted her and asked how are you doing?. There was some silence. It’s cold. And in that moment I felt I needed to know more. I wasn’t sure about what exactly, but I wanted to know more. Why are you staying out here rather than in the shelter. She stayed in silence for a bit, and then started talking. And we both talked in fact for a long, long, long while.

Paula had been working with databases in the past. She had been very fluent with computers apparently. When she asked what I did for a living and I told her cartoons, and maths, and computers, and stuff, she asked me what programming language I used. I also got to know that once she went in trip or something and got hit by two men (his boyfriend included I believe), leaving her injuries in her head. She had been a very clever woman once, but everything is slow in my head now…, she explained. Everything she said about not fitting in the shelter or anywhere for the matter sounded like a denial of her current condition, of which she was conscious and ashamed. Maybe because of that she said I want to create my own company, I can do it.

When asked about her family, Paula cried for a bit. It took her some moments, which I waited in silence, before she explained me his friend brother passed away some years ago, and that his other brother though she was a burden to the family. Dad would send her money, but not anymore because she had used it in the past to buy drugs. She regretted that so much.

We started talking about me and my images and programming languages (as requested by her) and also about life in general. She gradually got happier, and when she’s forgot her pain for a bit and I felt she was most focused, I asked her about why not going to the shelter instead of staying out there in the cold. She concurred that she would wake up less tired and more focused after a warm night indeed. And no matter what the people treated her like in the shelter, the only way to build her own company would be to stay focused anyway. She agreed to that as well.

I felt bad because I didn’t know how to help her really. What do I know about living in the street, the policies at a shelter, legal issues, shame, medication or being trapped in a world you feel you don’t belong in? Nothing. So I couldn’t understand really the scope of her misery, and hence, I didn’t know how to help.

Do you need anything, was all I could think of asking next. She nodded, and explained what she would find handy in such nights. I went home and came back as soon as I could bringing a scarf, a blanket and a bottle of water with me. Thankfully she was still there when I arrived. She was also happy to see me again. You are back! I handed the items to her, and she put the scar and drunk some water. We exchanged phone numbers, and decided it was time to walk away, me to my apartment and her to a friend’s place where she would take her medication… At that moment I didn’t fear she would simply sleep in the next corner around the block instead of getting to her friends place. According to the texting the following morning and days after, it seems she made it to her friends and slept safe and warm indeed, at least that one night.

Of course, the story of Paula they way she told it to me is probably biased and incomplete, but it is the at the very least the story of a person in hell. And it doesn’t take but the emotional intelligence of a mosquito to realize that nobody wants or decides to be homeless.

So when I hear voices asserting homelessness is the consequence of laziness, or that it is something deserved by those who don’t want to work, I think we are being way too simplistic and prefer to take the easy exit on a morally painful topic. Maybe, conservatives are not assholes, but simply practical people. Because, to be honest, once we admit homelessness is not something deserved, then the feeling of being failing our basic obligations of pity, mercy and help towards those who suffer around us does indeed not feel good. And surely I don’t know the solution. And simply feeling pity doesn’t helps either in any way. But at least have for sure that if instead of being ashamed with me about this you really insist in professing that homeless people decided or deserved or earned homelessness, well, I simply won’t talk to you again.

i eat a lot of condensed milk, especially at nights. i think all that sugar… helps me have sweet dreams

… shouldn’t it be called womenstruation?

hey, i speak a romance language, so i do know the etymological root of “menstruation” is “monthly shit”

i’m sorry, but when you post a picture online of yourself in a shooting range firing a pistol or rifle… the way i feel is a bit like you were posting a picture of you emulating you are raping a baby. my perplexity is twofold.

first, the idea you are having fun with the fantasy of killing somebody when you shoot that black silhouette of a man in white background horrifies me. i guess i should (and to some extent, do) think the same of video games, but for some reason the though of you holding the killing machine in your actual hands and firing it to the human placeholder in front of you… make my soul shiver.

secondly, not only you are enjoying the fantasy of killing, but you are also sharing it online for us all to see! the picture really offends me to levels you cannot imagine. please keep it private, i don’t need to see you playing you’re killing somebody. thanks very much.

this might be a cultural difference, or just me, but in either case i don’t understand it.

(and i’ll once again say what i always say: when you cannot post a dick or tit in facebook but can share a picture of yourself with a gun, well, i won’t allow you to fucking talk to me about values)

This is Elsa, she just arrived to my office, her new home. She is going to be in charge of keeping the yogurt, condensed milk and ice cream cold.

Welcome Elsa!

… who finds it fascinating to read craigslist’s missed connections?

Directional derivatives. And the gradient. Let’s talk about that. Because sometimes, there’s something better than a gradient.

At school we are all taught that gradients are the idea, concept, object and tool to be used, for it is generic. Directional derivatives are regarded only as an intermediate concept to arrive to that of a gradient, and they are set aside for their lack of generality. And while there are good reasons to do so, we shouldn’t forget that sometimes we don’t want the general solution or implementation, but the specialized and optimized one.

Like when you are painting some clouds.

Say you are doing some (cheap) volumetric rendering of clouds. Imagine you want to get some cheap lighting and shaping without scattering and self shadowing computations. Then you can extract a gradient or normal or orientation to do regular lambertian lighting against. So you are going to evaluate a gradient by taking 4 to 6 samples of the volume, only to then dot it with the light direction. Which works. But is very slow – for evaluating your volumetric field 4 or 6 times is expensive.

Now, forget what your teacher told you and have a look to this article on the directional derivatives in the Wikipedia. In particular, look at this formula:

Now, if x was the point in space we are shading/lighting, and f was the volumetric field, then f(x) would be the density at that point and ∇f(x) would the gradient (or “normal”). At the same time, if v was the light direction, then the right side of the equation ∇f(x)·v/|v| would be nothing but our regular N·L or lambertian lighting… which according to the equation is equal to the directional derivative of the field taken in the direction of the light!

So basically, instead of extracting a general derivative in all possible directions and dot with the one direction of interest, you can measure the change (derivative) directly in that direction of interest. Or in other words, rather than taking 4 or 6 samples to extract a generic derivative or gradient, and then dot it with the light direction, we could simply sample the field no more than 2 times, at the current point and at a point a small distance away in the direction of the light (and divide by that distance of course). So, something that is 4 or 6 evaluations can be reduce to no more than 2. Given that one of the evaluations is needed anyway for the opacity of the volume, we are only multiplying by two the amount of evaluations instead of multiplying it by 4 or by 6. Which is a massive speedup of 2x to 3x.

That’s how the images above were rendered in real time, and many of the volumetric elements I created this past year (see for example line 80 here https://www.shadertoy.com/view/XslGRrM)

My friend Ginna sent me this picture she took in her apartment in Vienna, of the amaryllis flower Delilah and I bought for her when we visited there. That was 2007 we believe, which means the flower is 7 years old now. Apparently she is healthy and blooms every year. The trick, Ginna tells me, is to water her during the blooming period and three months after, then don’t do it anymore during the rest of the year.

The picture made my day, and brought lots of memories. I have to return to Vienna some day.