+day macha+



Jonny's in the basement, mixin' up the medicine. I'm on the pavement, thinkin' about the government.


unit testing

Note to self: you don’t really understand your function until you unit test it.

There exist counterexamples to this, but in general, great things are accomplished by small groups of people who are driven, who have unity of purpose. The more people involved, the slower and stupider their union is.

Errors: Alsa, dmix, unable to open slave

If you’re getting error messages like this

ALSA lib pcm_dmix.c:864:(snd_pcm_dmix_open) unable to open slave

when you try to run Firefox in linux, or any other application for that matter, I may have the solution.

There’s plenty of fairly complicated stuff on the internet about that error. None of it helped me. My problem was actually mplayer.

I had it running in the background. But it was using OSS instead of ALSA. So when an ALSA application tried to run, like firefox, it freaked out, and displayed the above error.

Simply by running mplayer with -ao alsa passed to it my problem disappeared.

rsync, mkstemp, fat32, No such file or directory

When you rsync to a fat32 device you encounter problems. Problems because fat32 is an awful, awful filesystem. If you can simply not use fat32, do so. If you’re forced to use it (Hello) then here’s how to get around it.

On to the error messages. The first one you may encounter is:

rsync: mkstemp “YOUR_DEST_DIR/.FILENAME” failed: No such file or directory (2)

This mean rsync is trying to create a temporary file (that’s what mkstemp does), but fails to do so on your fat32 device. If you decide to get around this by giving rsync a new parameter —temp-dir=/tmp you encounter yet another error:

rsync: rename “FILE_IN_TEMP_DIR” -> “DEST_DIR”: No such file or directory (2)

A little searching[1] tells you that these error messages only come up when rsync tries to copy files from an all uppercase directory onto the DEST_DIR. Basically, rsync preserves file or directory names written in lower, upper or mixed case. And fat32 devices do not.

To force your fat32 device to preserve upper, lower or mixed case file and folder names mount it with the shortname option set to win95 or winnt (see man mount; win95 worked for me). Do something like this:

mount /dev/sda1 /media/storage -t vfat shortname=win95

Then your only problem is that fat32 devices poorly timestamp their files, and rsync depends on good timestamping. To make rsync ignore timestamps and go by file-size only give rsync the option:

—size-only

Now you’ve pandered to fat32’s awfulness, everything should work fine.

[1] http://ubuntuforums.org/showthread.php?t=203549

These days... [police arrest photographer for being too tall]

Government passes anti-terrorism laws.
The police use anti-terrorism powers to harass citizens.
Citizens no longer trust the police.
Citizens no longer trust the government.


Yet Mark Thomas, Scholar and Gent, brings us: http://www.guardian.co.uk/commentisfree/2009/feb/09/liberty-central-stop-and-search-police

http://www.eflorenzano.com/blog/post/my-thoughts-nosql/

good summary of non-sql datastores

The professor was disturbed that game rules encouraging competition and varied tactics hardly mattered to gaming community members who wanted to preserve a deeply-rooted culture.

He said his experience demonstrated that modern-day social groups making use of modern-day technology can revert to “medieval and crude” methods in trying to manipulate and control others.

“If you aren’t a member of the tribe, you get whacked with a stick,” he said. “I look at social groups with dismay.”

I assume he’s not a benchmark pro, but he did a decent job already. We can
nitpick his sampling methodology - but it won’t change the result. He is correct that many procs is far more memory consuming than single proc, and we already knew this.

This is a tradeoff we made consciously and deliberately. When firefox crashes, all tabs go down. When firefox memory is compromised (security), all tabs are compromised. In chrome, we don’t have those problems, but instead use more RAM. Further, Chrome is also able to implement per-tab prioritization, so that background tabs don’t make foreground tabs go slow. Firefox can’t do that.

http://groups.google.com/group/chromium-dev/browse_thread/thread/f97adb063b97a81

 I always wondered why Chrome was faster than Firefox, and it turns out it’s not because it uses less ram. The priorisation seems to be why, unless my addons weight firefox down significantly.

Sociologists have long suspected that, for example, children of factory workers would be implicitly taught that the best way to succeed was to keep your head down and obey authority. And while this might in fact make them more likely to succeed in a factory, it would also stifle their chances of upward social mobility.
The man of system… is often so enamoured with the supposed beauty of his own ideal plan of government, that he cannot suffer the smallest deviation from any part of it… . He seems to imagine that he can arrange the different members of a great society with as much ease as the hand arranges the different pieces upon a chess–board. He does not consider that the pieces upon the chess–board have no other principle of motion besides that which the hand impresses upon them; but that, in the great chess–board of human society, every single piece has a principle of motion of its own, altogether different from that which the legislature might chuse to impress upon it. If those two principles coincide and act in the same direction, the game of human society will go on easily and harmoniously, and is very likely to be happy and successful. If they are opposite or different, the game will go on miserably, and the society must be at all times in the highest degree of disorder.