Advertisement

Customize

Friends

Recent Entries · Archive · Friends · User Info

* * *

Here's a part-time web job with a Lispy angle:

Requirements: Programming will consist of Javascript, CSS, and Ajax, within a browser (DOM) environment; experience with all of these is essential. Some familiarity with a Lisp-like language, such as Common Lisp (preferred), Scheme, or Clojure essential. Ability to work independently required. Physical location near Berkeley CA or Richmond VA is desirable, but anywhere in the world is possible.
Tags:
* * *

Google's DNS impairs CDN performance. On both of my colo systems, there are Akamai CDN caches within a few hops and under 3ms. With Google DNS, it's around 10 hops and almost 30ms. Ouch.

* * *

The other day, I had a dream, which I now realize was a premonition, in which I was blogging about the rationality of irrationality. Here are good reasons to be irrational:

  1. Information is not free. It's not usually worth paying the price for certainty, and moreover, by the time you're 100% sure of something, it's probably useless (except if you're a mathematician). We constantly have to act on uncertain information, at the risk of making either great mistakes or great discoveries — all men are irreducibly Entrepreneurs.
  2. Hesitation is costly. Any long term project requires commitment, trust in partners, faith in success, etc. which can only be based on imperfect information. Moreover, once the project is started, time spent worrying or hesitating, even due to good reasons, only decreases the chances of success of the project, while irrational faith in success is a self-fulfilling prophecy.
  3. Most errors don't matter that much. When they matter, there's no need to eagerly chase them, because they'll come after you all by themselves, and then it's time to fix them. And in the rare cases where feedback is deadly and you can't fix an error after the fact, it is better to err a lot on the side of caution than to err only ever so much on the side of danger, so you shouldn't go looking to hard for the truth.
  4. It's important to agree with others on the outcome of otherwise arbitrary decisions. It doesn't matter all that much how one should pronounce the words that convey any given meaning; but if you don't use words in such way that the other party will make sense of it, you won't convey any meaning at all. And you really don't want to mispronounce shibboleth (though one man's pronounciation is another man's mis-).
  5. It's hard to unbundle good and bad ideas, yet good ideas often come in package-deals with bad ideas. Untangling ideas often requires costly domain-specific expertise and efforts that are not always worth the results.

Of course, just because there are good reasons to follow strategies that have the adoption of bad ideas as a necessary consequence, it does not follow that any of those bad ideas is good in itself, or even that the strategy was successful in any particular instance. So having an allegedly good epistemic strategy is no excuse to any of your individual errors.

However, the important point is that you should be understanding decision-making in terms of rules and strategies rather than individual decisions. This is also the main point of Henry Hazlitt's The Foundation of Morality, or of the new (dawkinsian) point of view on genetics and memetics. That's why you should welcome the identification of individual errors, not just as opportunities to fix mistakes (which is not always possible), but also as opportunities to improve your process itself.

* * *
Shuffletron, despite its toyish demeanor, makes an effort to do certain things correctly and efficiently which are critical to its being useful as a music player. To that end, it bypasses the hopeless Common Lisp pathname system in favor of using strings and POSIX system calls, and sidesteps the increasingly prevalent and often misguided "UTF-8 or bust!" mentality in favor of a more robust Unix-like approach of being encoding-agnostic by passing 8-bit characters transparently.

In particular, I made a point of ensuring that the library scan (a recursive walk of the directory) completes as quickly as possible, within reason. My benchmark was the combination of find and grep, which not only traverses the entire tree but does some useful processing on the result. It's not possible to reach that speed without writing excessively low-level Lisp code, but I got close enough that I was happy with the result. It may sound surprising for a task like directory traversal, but any cute processing your Lisp's filesystem interface does - consing/converting strings, decoding characters, building pathnames, converting C structures into nicer Lisp structures, etc. - quickly eats away at this peak performance. Those system calls run a lot faster than I first expected, once the relevant kernel caches are warmed up.

I've been playing with sshfs this evening and wanted to try using it to access my music library on the other side of the planet from a local Shuffletron instance (with appalling but sufficient latency and bandwidth, despite ostensibly being multi-megabit connections on both sides). Oddly, Shuffletron couldn't find any files - it said the library was empty. I soon recalled a potential corner I had cut in the filesystem scanning code.

While scanning the directory tree, you have to figure out whether each entry is a file, directory, or something else. Originally I had done this by calling stat and checking the st_mode field (I'd borrowed the functions from some code that had other reasons to stat the file). While converting the code from sb-posix to osicat-posix for portability to CCL (and beyond!), I cleaned it up to use the struct dirent.d_type field instead, obviating the call to stat. man 2 stat says this about the d_type field:

Other than Linux, the d_type field is available mainly only on BSD systems. This field makes it possible to avoid the expense of calling stat(2) if further actions depend on the type of the file. If the _BSD_SOURCE feature test macro is defined, then glibc defines the following macro constants for the value returned in d_type:

It's available on Linux (except for old versions)? Great, my program only works on Linux anyway, I'll use it! So went my reasoning. I had some misgivings on account of the note "If the file type could not be determined, the value DT_UNKNOWN is returned in d_type," but it seemed to work well enough, and figured I'd just move on rather than write the extra eight lines (!) of code to deal with what appeared to be an obscure case.

With sshfs, I finally found that obscure case. The dtype is always set to DT_UNKNOWN, and shuffletron can't get past the root directory of the library. Despite having written a (simple) FUSE filesystem myself, it isn't immediately clear how you can make that work from the filesystem's side, but it is clear that it was time to add a fallback to calling stat. Having done so, Shuffletron now happily scans my music library over sshfs, which would be great, except that it also takes something like 15 minutes walk the directory tree (even using find!), because every directory appears to involve several trips over the internet. Hundreds of directories times a few seconds each.. not good (this same thing annoys me when copying multiple small files via SCP, incidentally). Just goes to show that presenting something (a computer many thousands of miles away) as something it's not (a local filesystem) can only work so well. If only there were an interface (is there an interface?) to indicate the desired access pattern, so that sshfs could pull all that information quickly in a single batch and keep it in its cache.

This little fix will be present in the forthcoming Shuffletron 0.0.5 release, along with other great features that I've been dutifully testing since July or so. :)
* * *
In the December 12th 1982 issue of Red Rag: the Rag talks to local reggae band Urban Warrior about music, race, unemployment, Rastafarianism, culture and politics; the article is bannered on the front page as "Black news". It is estimated that 2 million council tenants will be worse off with the introduction of the new Unified Housing Benefit; 400 local people sign a petition protesting the Home Office's planned deportation of local resident Shehnaz Sheikh; Raymond Briggs' "When the Wind Blows" is on the shelves at Acorn; and Thursday is a not a good day for pirate radio as that's when the Home Office get their overtime in. [cover]
* * *

Although it's nearly half a year old, I only decently happened upon John Harris's article Game Design Essentials: 20 RPGs. It discusses the evolution of the CRPG/JRPG genres from war gaming and paper role playing games, surveying many the most influential early series in the genre.

I'm a relative newcomer to the roguelike genre. Aside from some childhood exposure to Gateway of Apshai (a crude action game with Rogue influences), I didn't play any roguelike games until taking up nethack sometime in 2006 or 2007. Subsequently the genre has made a big impression on me, providing a solution to certain major problems in game design. Harris appears to agree, as he writes about Nethack:


Nethack is a roguelike, and so I'm required to say something about one of those games' most controversial features: permadeath. (Okay, I admit it -- I've been leading up to this.) Since Ultima and Wizardry, but unlike pen-and-paper games to this day, players are allowed, and even encouraged, to save games and return to them if things go badly, a design characteristic that makes it almost impossible for anything really bad to happen to the player's characters.

I make no secret the fact that I consider this one of the most pernicious aspects of CRPG gaming, that permanent disadvantages acquired during the course of play cannot be used by a designer because the player will simply load back to the time before the disadvantage occurred. Admittedly, the prevalence of this attitude comes from some older games that could easily be made unwinnable if the player wasn't careful.

However, it's reached the point where "adventuring" in an RPG rarely feels risky. Gaining experience is supposed to carry the risk of harm and failure. Without that risk, gaining power becomes a foregone conclusion.

It has reached the point where the mere act of spending time playing the game appears to give players the right to have their characters become more powerful. The obstacles that provide experience become simply an arbitrary wall to scale before more power is granted; this, in a nutshell, is the type of play that has brought us grind, where the journey is simple and boring and the destination is something to be raced to.

Nethack and many other roguelikes do feature experience gain, but it doesn't feel like grind. It doesn't because much of the time the player is gaining experience, he is in danger of sudden, catastrophic failure. When you're frequently a heartbeat away from death, it's difficult to become bored.

Later, he strikes at the heart of why roguelike game mechanics are so compelling:


The theory I have about the engagingness of roguelikes is that they are a form of random narrative generator. The ups and downs of the player's progress becomes that of the story of the character, who has a relatively plain backstory in order to allow the player to invest more of his own personality into him. Most of these stories end in death, but so do our own, and it makes the few stories that make it to the end even more memorable.

The randomness and difficulty of the game, additionally, help to take responsibility for the failure away from the player. The player knows it's hard so any progress he makes is a sign of valor and heroism, instead of poor decision-making or foolish risk-taking. These kinds of stories aren't made up by a script writer; they come from the player's own actions, so they feel more "real."

Also, on JRPGs and Final Fantasy's decent into absurdity:


All RPGs traffic in abstractions. To some degree, an RPG can only be as successful as the extent to which he causes the player to ignore how arbitrary it all is. One of the signs of the aging of the JRPG genre is how its games have, recently, become less careful about how blatantly made-up their various systems are.

I'm a huge fan of the original Final Fantasy and became less fond of each successive game in the series, for roughly the same reasons that lead me to claim that Wing Commander 1 is far better than its sequels. Both franchises could be described as "stagnant and wallowing in its own cinematic pretensions," as Harris says of Final Fantasy. The intrusion of increasingly overwrought stories steal ownership of the character(s) from the player and destroys replayability.


If that sounds like your thing, give the article a read. It's quite long. I enjoyed it, and can't wait to read the rest of the series.

Tags:
Current Music:
NWA, "Fuck tha Police"
* * *

Yannick Gingras has released mini-fract 0.6, which you can use to make fractal movies.

Tags:
* * *

I've long searched for poignant phrase to capture how I feel about a certain style of programming. I've finally spotted one courtesy of Dadhacker: "an attempt to be “grown up”. From this post:



Someone had read the Software Patterns book, because about every third source file implemented a factory; I’m pretty sure there were factories for making factories. Now there are perfectly good reasons to write factories, fine and wonderful reasons to have abstract instantiation, but what was going on in the bulk of this company’s code was fear, realized with indirection and thousands of lines of creative procrastination, and an attempt to be “grown up” with stuff copied from a popular book on design without doing any actual design.
Tags: ,
* * *
Google it, as in:

“Doctors told us that this is rare, and that our child is the only child in The County with this condition,” Jamie Guerrette said Tuesday. “When she was born, we were basically told, ‘Your daughter has bilateral microtia with atresia. Google it.’”

Community seeks to help girl get needed surgery

* * *

Doctors are expensive. Yet most of what they do is follow a simple algorithm with lots of rules. A human aided by an expert system could do the very same thing, for cheaper!

Of course, in rich countries, the established trade unions will never let such a thing be deployed, suing whoever tries to help others with it for unlicensed use of medecine, to protect their legal monopoly. The bastards will also (rightfully this time) argue that a trained physician will know the rules just as well, and be able to better interpret the rules and more importantly, to better interpret the many elements to use as input.

And still, an untrained person with a machine could do all the easy things that a doctor would try, and redirect only the hard cases to a doctor. And in a poor country, that could save a lot of lives. And even in currently rich countries, a lot of money could be saved, and the effort of trained doctors could be redirected where they too would be able to save a lot of lives.

Moreover, such an expert system is not fantasy, it has already been written, long ago: MYCIN. It could easily be updated, and then customized with regional data about which diseases are prevalent where, and what treatment is available at what price there. And of course, it could be taylored towards the non-expert in a way that flags situations where a human expert is needed vs situations where a simple treatment should be tried first.

Let's give MYCIN on an XO to teachers, priests and social workers. A cheap way to save plenty of lives!

Did I say XO? I meant cell phone — maybe equipped with an optical modification to diagnose malaria!

* * *
* * *

Maciej Ceglowski gets into an interesting discussion about Paul Graham's views on art history. Maciej is "idlewords" and Paul Graham is "pg".

* * *
Yesterday webex started failing for me. I did not change anything related to java recently so I was a little perplexed.

Checking it turns out that even the standard test your java page failed. strace revealed the nice error:

$ grep ffff /tmp/TRA
6938 connect(22, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:72.5.124.95", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28 <unfinished ...>
6938 connect(22, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::ffff:72.5.124.95", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)


Notice that I don't have IPv6 connectivity!

Googling it turns out that you can disable IPv6 in java by modifying to ~/.java/deployment/deployment.properties the line:

deployment.javaws.jre.0.args=-Djava.net.preferIPv4Stack\=true

and all is now well. Until I need to access an IPv6 device with java of course :-(.
Tags: , , ,
Current Mood:
frustrated frustrated
* * *

I've seen mistaken claims along the lines of "Common Lisp is easy to optimize, you just add type declarations and the compiler will make it super fast!" So it was nice to see jdz start his article about optimizing Brian's Brain with "optimizing without profiling first is a waste of time." He covers using SB-SPROF to find hotspots and Paul Khuong adds some footnotes about how to interpret SB-SPROF output.

Tags:
* * *

See how far you score in this test.

  1. I feel outrage when I am myself victim of theft or aggression, or other interference with my voluntary transactions.
  2. I am concerned when I witness the theft or aggression of another person.
  3. I recognize that other people have the right to indulge in any voluntary transactions, even though I may despise them, for it's none of my business.
  4. I protest against third parties that prevent other individuals from completing voluntary transactions.
  5. I believe that government and collective entities are overreaching when they interfere in the life of individuals and their voluntary transactions.
  6. I think there are fixed limits to government powers and inalienable individual rights.
  7. I surmise that the domain of legitimate government action is very limited and that current governments are largely exceeding their prerogatives and doing more harm than good.
  8. I reckon that theft is no less theft when it is done legally by government and that intervention against voluntary transactions is no less illegitimate when done in the name of the people.
  9. I take stock that there is no such thing as an external force above and beyond society, only forces internal to society, subject to the same universal dynamics of the incentives of responsible or irresponsible individual decision-makers.
  10. I can make a conceptual distinction between governments as organizations of public force and government as monopolies of public force, and I understand in this as in any matter, monopolies establish the power of parasites without scruples upon honest people.
  11. I realize that only individuals may possess rights, that one can only delegate or cede rights one possesses and is free to keep and exercise himself, that "communities" are fictitious entities, and that claims to represent "Government", "Nation" or "God" are bogus scams to dispossess individuals from their rights.

Inspired by this previous post, as the project of a crafted paper device to be exchanged at the Very Merry UnBirthday Gift Swap organized by the Banditos Misteriosos.

* * *

Having argued the relevance of political reasoning, I'd like to illustrate how this reasoning may be conducted.

While my friend Nasreddin Hodja chastises me for daring to take sides in conflicts that he thinks I should avoid, I think that he brilliantly uses himself the very proficiency that I'm trying to illustrate and encourage with my previous propositions: when others arbitrarily compare two abstract alternatives of a choice unavailable to anyone according to a few criteria of which they presuppose the relevance (often in a mystic quest of purity) while ignoring infinitely many other potential criteria, hodja precisely finds an objective holistic criterion to compare the relative overall goodness of two countries — the massive revealed preferences of migrants and non-migrants between these countries, migration being a concrete choice actually available to many.

Read more... )
* * *
[an emu]

The second batch of chapters is ready for public consumption.

Tags: ,
* * *

Advertisement

Customize