15/06/2010
Parallel computing is the next paradigm shift, everybody knows this, but not everyone is taking the proper action to face it adequately. One thing to do is to read on the subject and force oneself to code using threads and various degrees of parallelism; and that’s pretty easy now that a quad core machine doesn’t cost all that much. But the next step, distributed computing, necessitates, well, more than one machine, and if you have different levels of memories and communication channels, all the better.

So out of a bunch of old x86 PCs, I’ve decided to build my own portable mini-cluster with 8 nodes. Nothing all that impressive, but still plenty of fun to build.
Read the rest of this entry »
30 Comments |
hacks, Operating System, programming, Zen | Tagged: Cluster, DIY, MDF, multi-threading, networking, NUMA, old PCs, parallel computing, recycling, threaded rods, why not?, x86 |
Permalink
Posted by Steven Pigeon
01/06/2010
Sometimes, we look for relation between objects of different dimensionality, search for proportionality rules and try to factor away constants, or, at least, figure out what they are made of. A cute example of which came to me in the shower…

Knowing your weight, can you know how much soap you use?
Read the rest of this entry »
1 Comment |
hacks, Mathematics, wtf | Tagged: Constants, Geometry, shower, soap, topology |
Permalink
Posted by Steven Pigeon
25/05/2010
It always amazes me to see how people put trust in their service providers. While in principle, there’s no real need to worry, careless implementation of services can really have dire consequences!

And it’s not like leaks and exploits are rare. Sometimes we hear about them, sometimes we don’t. Let’s consider these two (amongst those) I know about:
Read the rest of this entry »
3 Comments |
hacks, Life | Tagged: AppStore, Encryption, Exploit, hash, Myspace, Quick, Service Provider, Services, Trust |
Permalink
Posted by Steven Pigeon
18/05/2010
In calculus 101, amongst the first things we learn, is that the derivative a function is the slope of the tangent to the function, that is, the instantaneous slope at some point on the function. We have, for some function
that the derivative
is given by:

So the formulation looks like a slope, and it is taught that it is a slope as well; all the concepts surrounding differentiation are expressed in terms of slopes of tangents, and that’s OK, because that’s what they are.
But suddenly, in calculus 201, we learn how to find the anti-derivative of a function, also known as the integral. But the metaphor changes completely: we’re know talking about the area under the curve. Wait. What?
Read the rest of this entry »
Leave a Comment » |
hacks, Inoffensive Rant, Mathematics, Science | Tagged: Integral, Riemann, Riemann Integral, Slope, Surface Integral |
Permalink
Posted by Steven Pigeon
04/05/2010
Leave a Comment » |
algorithms, hacks, Life, Mathematics, Zen | Tagged: algebra, Equation System, Equations, Generality, Geometry, Paradigms, Simplicity, Vector |
Permalink
Posted by Steven Pigeon
14/04/2010
This afternoon, on #bash on Freenode:
[19:08:56] < DrMax > well, yes, with the trailing -print, it works as expected
[19:09:20] * nDuff mutters about people who don't follow his examples exactly, and then complain when they don't work. :P
[19:09:37] < DrMax > lol yes, sorry, my bad
[19:09:58] < DrMax > won't do it again, promise
[19:11:55] < DrMax > find is the platypus of the *nix ecosystems. It has a beak, claws, venom. It swims, lay eggs, is ugly, but somehow manages to survive
[19:12:13] < DrMax > I hate this command
[19:12:39] < DrMax > nDuff : nevertheless, the help is greatly appreciated
[19:13:48] < nDuff > eh; find is like *nix in general -- a little picky about who its friends are. Once you get to know it though, it's the kind of friend that helps you move bodies.
[19:14:16] < DrMax > hmm interesting, but I don't have to move bodies very often
[19:14:21] < DrMax > I'd rather have regular friends
We’re discussing find, the command I hate the most in all *nix-like commands. Needless to say, the guys and gals on #bash are always extremely helpful and got me on my way.
Leave a Comment » |
Bash (Shell), hacks, wtf | Tagged: Find, Freenode, helpful friends, IRC, platypus |
Permalink
Posted by Steven Pigeon
16/03/2010
QuickSort, due to Hoare, is one of the best comparison-based sorting algorithms around. There are a number of variations, but the vanilla QuickSort does a great job… most of the times.

Indeed, there are occasions where QuickSort leaves its expected
run-time to reach
run-time, its worst case. But what does it take to push QuickSort into its worst behaviour?
Read the rest of this entry »
4 Comments |
algorithms, hacks, Mathematics, programming, rants, theoretical computer science, wtf | Tagged: bubble sort, C, comparison sort, computational complexity, evil, Hoare, malicious data, QuickSort, sort, sorts, Worst Case, Worst Case Behavior |
Permalink
Posted by Steven Pigeon
09/03/2010
Phimuemue, in a recent post (at the time of writing, anyway) present his variation on sorting floating point values using radix sort. His implementation wasn’t dealing with the pesky sign bit so I offered a slight modification to his algorithm as a comment on his blog. But for some reason, he did not allow to post it.

So I’ll present my solution here.
Read the rest of this entry »
8 Comments |
algorithms, C, C99, hacks, Portable Code, programming | Tagged: endian, endianness, endians, floating point numbers, IEEE 754, Radix Sort, stddint.h |
Permalink
Posted by Steven Pigeon
02/03/2010
As you already know—if you read my blog before—I use Emacs as my primary editor, for C, C++, Python, LaTeX, etc., and I’ve grown fond of the clunky ol’ piece of software. Still, once in a while, I need an extra, potentially weird customization.

Read the rest of this entry »
3 Comments |
emacs, hacks, Life in the workplace, programming, Unit Testing |
Permalink
Posted by Steven Pigeon
23/02/2010
Have you ever add to decide, you and your colleagues, where to go for lunch? Each time, it ends up being a committee, of course. It gets even worse when not only you have many colleagues, but also two offices, or two groups, at different locations. Since we work in a rather large city, we want to walk to the chosen restaurant, rather than drive, but in a way that is fair to either group.

So to settle the argument about where are the restaurants midway of both locations, we need a map, and some math.
Read the rest of this entry »
2 Comments |
algorithms, hacks, Life in the workplace, Mathematics, programming |
Permalink
Posted by Steven Pigeon