enjoying salad since 1978.

Friday, December 31, 2004

"Spain 1937"

The stars are dead; the animals will not look:
  We are left alone with our day, and the time is short and
History to the defeated
  May say Alas but cannot help or pardon.
One of the big battles of Syndication appears near an end. From the NetNewsWire beta (2.0b10) notes:
RSS parser

It no longer tries to deal with non-well-formed feeds. In real life, a non-well-formed feed is almost always a feed with an unencoded ampersand. NetNewsWire used to work around this problem—but the work-around had a bad side effect: it made the HTML visible in the description pane. Which led to lots of bugs reports and erroneous impressions.

Friday, December 24, 2004

Posing nude for a magazine.

[Re-magazine] is a Dutch-based, English-language 'magazine about just one person'. They pick someone, a rather ordinary person, and make the whole magazine about him or her. The latest issue is about Hester, a failed London screenplay writer (and already narrative is in crisis, right in the foreground) aged 37. There are interviews with Hester about her depression, her feelings of fatigue and frustration with London, there's a photoshoot on Hungerford Bridge, a trip to her mother's house in the countryside, an interview with her more go-getting (but less likeable) sister about her, a discussion between Hester and her mother, who also went to art school and has always been rather competitive with Hester. Re-Magazine have taken the format of the usual magazine and turned it around. [...]
[found here via Robert Sayre]

Tuesday, December 21, 2004

Emacs and Javascript

"The following is intended to provide instructions for setting up an (X)HTML editing environment for Emacs suitable for Web Developers."

Monday, December 20, 2004

Tattoos

So, I'm researching my next tattoo and looking at the work of some local artists and what do I find? This tattoo. Wow, I think I'll get one of Machiavelli.

Tuesday, December 07, 2004

repubsub

Hey, mod_pubsub has relaunched, now it's written in Twisted Python. No more wondering why mod_perl crashed on me.

Monday, December 06, 2004

flak photo: Stacy Wong

Look, Flak Mag published one of Stacy's photos on their flak photo blog

Friday, December 03, 2004

Nokia Image Upload Protocol.

Rui Carmo breaks down the Nokia Image Upload Protocol, with source.

Thursday, December 02, 2004

BF to C in awk

I wrote a Brainfuck to C translator in awk. It only takes a few minutes and I noticed that no awk version of this existed.

I haven't run it through it's paces (I just wrote a few small brainfuck programs to test it out) so if you find a bug, please let me know.
#!/sw/bin/awk -f                                                                                                                                                                           
# a brainfuck to C translator.                                                                                                                                                             
# Needs a recent version of gawk, if on OS X,                                                                                                                                              
# try using Fink's version.                                                                                                                                                                
#                                                                                                                                                                                          
# steve jenson                                                                                                                                                                             

BEGIN {
  print "#include <stdio.h>\n";
  print "int main() {";
  print "  int c = 0;";
  print "  static int b[30000];\n";
}

{
  #Note: the order in which these are                                                                                                                                                      
  #substituted is very important.                                                                                                                                                          
  gsub(/\]/, "  }\n");
  gsub(/\[/, "  while(b[c] != 0) {\n");
  gsub(/\+/, "  ++b[c];\n");
  gsub(/\-/, "  --b[c];\n");
  gsub(/>/, "  ++c;\n");
  gsub(/</, "  --c;\n");
  gsub(/\./, "  putchar(b[c]);\n");
  gsub(/\,/, "  b[c] = getchar();\n");
  print $0
}

END {
  print "\n  return 0;";
  print "}";
}
update: You can blame this on Evan Martin, his recent post wherein half the universe decided to weigh in about PHP had a mention of mod_bf. Am I easily distracted or what?

update: Last update, I swear. Darius said that I don't need to initialize b if I declare it static. Also, I realized that my previous version wouldn't understand if you had multiple operators on the same line since it was matching records and not fields. This version works on all of the programs I tried in the Brainfuck archive (as long as you strip comments).