![]() | Ned Batchelder : Blog | Code | Text | Site February 2008 » Home : Blog |
« January 2008 | » Main « | March 2008 » Sidney Diane HusseinWednesday 27 February 2008 Yesterday John McCain apologized for a warm-up speaker's disparaging mention of Barack Hussein Obama. It has been a favorite pastime of right-leaning talk show hosts to use Obama's full name. Rush Limbaugh typifies the attitude about this practice:
Limbaugh is being disingenuous here. He understands full well why his brethren use Obama's full name, but not Clinton's (Hillary Diane Rodham Clinton) or McCain's (John Sidney McCain III). This is a "when did you stop beating your wife" ploy. They pick at the name like a scab, hoping to stir feelings of unease among their listeners. When they are called on it, they innocently ask what's the big deal; why is it a bad thing to mention a Muslim-sounding name on the air; who's the xenophobe now; etc. It's all despicable, but frankly I don't know why we expect anything better from talk radio rabble-rousers.
tagged:
politics» 20 reactions Python solversTuesday 26 February 2008 There's something magical about complex algorithms. They take a hard problem and build a strong fence around it. Once you've got an implementation working, you don't have to worry about what's inside any more. Take the specifics of the problem at hand, drop them into the algorithm, and out pops an answer. It's like a cartoon machine with lights and wheels on the outside, and magic happens on the inside. I've been poking around looking at Python implementations of algorithms for solving. Roughly speaking, these tools take a system of constraints, and produce an answer comprising the values that satisfy the constraints. I'm sure there are more, but these are what I've turned up in a quick search. ¶ Simple Gauss-Jordan Elimination is a classic math technique for solving a system of linear equations. This works great, but is crying out to be implemented as a C extension. ¶ SMAWK (an awk-like acronym of the authors' initials) finds the maxima in each row of a large matrix of values, provided the matrix is totally monotone. This sounds esoteric, but has applications in computational geometry and other areas. David Eppstein used it to implement Knuth's paragraph wrapping algorithm, and if an algorithm lets you re-implement Knuth-Plass in 65 lines of Python, I'm guessing you have a powerful algorithm. David has a bunch of other algorithmic stuff for Python too. ¶ logilab-constraint and python-constraint are two Python implementations of constraint solvers. These seem to be good at discrete problems like solving Sudoku or eight queens. BTW: Roman Barták maintains a list of constraint system implementations which could be useful. Beyond these, there are tons of fascinating techniques: simulated annealing (with some Python implementations), genetic algorithms (Python implementations), and optimization algorithms of all sorts.
tagged:
python,
algorithms» 7 reactions Brick FetishSunday 24 February 2008 Brick Fetish is about the history of Lego building blocks. It does a good job shining a light on Lego's deep past. So good, in fact, the most recent entry in its timeline is for 1973! I thought I knew a lot about Lego, but I didn't know that the brick design originated with a British company named Kiddicraft, or that Lego bricks were first distributed in the US by Samsonite. They also have scans of vintage catalogs. The brick yard set was one I particularly enjoyed.
tagged:
history,
lego» 1 reaction Fysics PhunSunday 24 February 2008 Phun is a 2D physics simulator. There seem to be a lot of these recently (Crayon Physics, for example), I'm not sure why. But Phun lives up to its name, it is phun to play with, and comes with a few sample scenes that are easy to fiddle around with and see what happens. The tower under attack by a catapult is especially good for experimentation. I recommend building a flimsy water tank on top of the tower for extra drama. For other ideas, check out YouTube:
tagged:
science,
games» 1 reaction Paul is or is not deadSaturday 23 February 2008 The original weblogs were running logs of stuff seen on the web. They were great for remembering some useful or wacky thing that you had surfed to, and thought you might want to tell others about, or find again later yourself. Though blogs have since grown to be more of a personal expression and publishing phenomenon, they are still very useful for that same goal of recording a slice of the web. I often recall a page later and wish that I had linked to it here, so that I could find it again. I also recall pages that I am certain I did link to from here, then find that I did not. The other day at lunch, the Paul Is Dead conspiracy theory came up. I mentioned a wacko page "proving" that Paul was dead, and said I had linked to it years ago. Turns out I hadn't. I don't think this is exactly the page I was remembering, but it'll serve: The King is Naked uses minutely observed photographic evidence to prove that Paul McCartney was replaced in 1966 by a surgically altered double referred to as Faul (faux Paul). Meanwhile, Larry Curtis, in his Sir James Paul McCartney page also exhaustively examines the photographic evidence, and concludes that it's all nonsense.
tagged:
music,
obsession» 2 reactions HistoryShotsSaturday 23 February 2008 HistoryShots is a boutique infographics shop specializing in timeline visualizations of history. I was taken with their History of the Political Parties: It neatly summarizes the ebb and flow of the parties' dominance over the years, combined with tabular information, all presented in a retro style. It's like Edward Tufte without the self-congratulation. For much more like this, check out information aesthetics, a blog devoted to information visualization. Apache proxy auto-re-loaderSunday 17 February 2008 On my development machine, I use the Django development web server, proxied by Apache so that static files can be served directly by Apache. Because of the way the Django development server works, when I edit a source file, it automatically restarts, and I can reload my browser page to see the effects of the new code. This works great, except that it takes a little time for Django to restart. As my Ctrl-S (save the file), Alt-Tab (switch back to the browser), Ctrl-R (reload the page) twitch gets faster, the browser reloads before Django has restarted, and I end up with a stupid error page:
Then I keep hitting Ctrl-R until the page comes up. The last thing I need is another pellet lever in my life. This simple hack solved my problem. In Apache's http.conf, add this line: # If Django isn't ready yet, try again automatically. This makes use of the fact that Apache ErrorDocument directives can specify the literal content to return to the browser in addition to the usual filename or URL to return. 502 is the error status for Bad Gateway. Now when Django isn't ready, the browser shows a simple message, then reloads automatically every two seconds until it gets a real page. Of course, you could write a nicer page, maybe with some attempt to not reload forever in the case that the server really isn't coming up, but this quick hack works and makes those slow restarts a small moment of peace.
tagged:
web» 3 reactions Jenn: visualizing polytopesSaturday 16 February 2008 Jenn is a graphical toy for visualizing polytopes, which are kind of like polyhedra generalized to four dimensions. I don't understand the math, but the pictures sure are pretty: The Windows version seems not to support some of the rendering features. Take a look at the gallery to see the full coolness.
tagged:
math
/
via:
dataisnature.com» react What I wish congress understoodThursday 14 February 2008 I've been unusually perturbed by the recent activity in Congress. These principles to me seem self-evident:
This last point is especially galling, since the President had at his disposal a law (the Foreign Intelligence Surveillance Act) which authorized him to wiretap, and provided immunity for the companies that assisted him, with a very light set of requirements. But he chose to ignore that law, and the telecomm companies looked the other way. Supporters of telecomm immunity argue that we need the help of private companies in the war on terror, and that liability to suits would make them reluctant in the future. If that reluctance causes them to examine whether their actions would be contrary to law, then I think it is a good thing. Retroactive immunity for companies that blindly obeyed an administration thumbing its nose at federal law is a travesty.
tagged:
politics» 17 reactions Enumerating treesMonday 11 February 2008 I was hacking around with a program that needed tree-structured data, and I wanted to generate all possible trees of a certain size. I searched around and found nothing useful. After a few experiments involving Python generators, postfix expressions, and recursive trees, I've got some code to enumerate binary trees. » read more of: Enumerating trees... (17 paragraphs)
tagged:
python,
math» 8 reactions The googles of the pastSaturday 9 February 2008 In these modern times we are supposed to value the reach and speed of the Internet over the physical clumsiness of actual books. But the libraries pictured in Librophiliac Love Letter: A Compendium of Beautiful Libraries are really gorgeous. I'd love to visit any of them. A few are in Boston or nearby. I've seen the outside of the Boston Athenaeum, which has double doors, leather inside thick brass: These libraries were the information treasures of their day, the Googles of their time. The difficulty of collecting the information made the libraries all the more valuable, and you can see that they were designed as treasure houses or cathedrals. Today's information is more accessible, so long as it is recent. These libraries still have a place for those that need access to the past. And they sure are beautiful. Alex at Neatorama has a run-down of The Evolution of Tech Companies' Logos. It's fascinating to see the history, and to realize just how old some of these firms are. IBM used to sell meat slicers, and Nokia used to be a wood-pulp mill? I'm not sure Firefox yet deserves a place in the list, and why not include Hewlett-Packard?
tagged:
design
/
via:
Drawn!» 2 reactions Jimiyo fine art spritesTuesday 5 February 2008 Jimiyo is Jimi Benedict, an artist who lives on a ranch in Utah so as to have time to perfect his art. He's got tons of great drawings and t-shirt designs, but two of his recent pieces are what caught my eye. Artists work from what is around them, and what they are familiar with. What do you create if you are an artist who grew up with crudely-drawn video games? I find it fascinating the way he turned sprites into fine detailed art without losing their essential sprite-ness, using the limitations of the sprite to shape the outcome even in a medium without restrictions. The old technology is now part of the cultural soup in which artists seek inspiration, and will continue to make appearances in unexpected places.
tagged:
art,
video games
/
via:
Drawn!» 2 reactions UsavichSunday 3 February 2008 Usavich is a strange little cartoon from Japan. Let me see if I can summarize: two rabbits are imprisoned in Russian jail. One is dumb and gentle, the other is placid unless provoked, and then he becomes ultraviolent. There's also a transvestite chick and a frog, and there's no dialog. The whole thing is as bizarre as any other cartoon you haven't watched yet, and after a few episodes, it all makes perfect sense. As Jim Flanagan (from whose del.icio.us feed I got the link) says,
It's a very well-done cartoon. The official site has high-quality video, but only half the episodes are there. Automatic Daddy has collected all of the YouTube clips for your convenience.
tagged:
animation,
japan
/
via:
del.icio.us/jimfl» 2 reactions I'm trying to build PIL from sources on Windows, and I'm stuck. I hope someone will have a nugget of info that will get me going again. The README in the PIL tarball says to download three prerequisites from GnuWin32: zlib, jpeg, and freetype, so I downloaded the -bin and -lib for each of those. I added the GnuWin32 directories to the setup.py, and run it to build the extension. The PIL setup.py tries to sniff out the libraries it needs, and disables features that need missing libraries. It decides that zlib is present, but that jpeg and freetype are not. Debugging through the setup.py code, it's finding libz.a in the GnuWin32 lib directory. There is no libjpeg.a or libfreetype.a, so it claims they are not available. In fact, it looks for any of these names for jpeg: libjpeg.dylib, jpeg.dll, libjpeg.a, liblibjpeg.dylib, libjpeg.dll, or liblibjpeg.a. None of these are present. In the bin directory, I have freetype6.dll and jpeg62.dll, but it won't know to look for those numeric suffixes. Just copying files around and renaming them seems like the wrong way to go. Searching for information, I find many cryptic pages discussing a2dll, o2dll, dlltool, and so on. I don't understand them. Each time I try a new set of instructions, it points me to another piece of software I don't think I have, and don't know how to get. I feel like a total n00b. Can someone help?
tagged:
help,
windows» 3 reactions « January 2008 | » Main « | March 2008 » | |