Category: Programming

Parsing Complex Comparisons

An interesting tidbit: can your programming language parse a < b < c? Perl can’t. Ruby can, but returns an error “undefined method `>’ for false:FalseClass.” Interestingly, Python accepts it, and even gives the correct result. Something clever must be going on in the parser to make that work. Update October 17: Although Lisp can’t parse the expression…

Read the full article

code.nytimes.com

A cool new site, with the best possible slogan, “All the code that’s fit to printf().” Nice to see a giant media company getting into this.

Darcs with Capistrano for Rails

I’ve used Darcs as my only version-control system for a while now. When I got into Rails, I naturally wanted to use Capistrano. Unfortunately, Darcs and Capistrano don’t get along too well. Darcs’ file-based repositories don’t mesh well with Capistrano’s assumption that the repository is accessed through a server, a la Subversion. I ran into…

Read the full article

Rails Sucks, Long Live Rails

Wowsers. I just spent two nail-biting, hair-pulling days getting Ruby on Rails running on a new dedicated server. What’s the deal here? I spent the first six hours trying to get Capistrano to work with darcs. Then I gave up on Capistrano. I didn’t know anything about Mongrel, nginx, Lighttpd, or any of that stuff,…

Read the full article

Stretching LaTeX

I recently picked up The LaTeX Companion, 2nd Edition. It’s… dense. It shows a lot of amazing things LaTeX can do, but also highlights its weaknesses. Most of these weaknesses have to do with the legacy of TeX itself. For example, it’s difficult to flow text around objects, because TeX determines line widths before it…

Read the full article

Beyond Syntax

From a 1995 paper on intentional programming: “Present day syntax had [sic] been predicated on a character stream that could have been input from punch cards, or teletypes.” Exactly! Why are we still working in a punch-card manner on million-pixel displays? Why are we still arguing about curly brackets versus parentheses when Unicode has millions…

Read the full article