Category: Programming

Ruby vs. Lisp

I’m certainly not the first to do this, but I felt like writing it. Comparing Ruby and Common Lisp: Syntax: Advantage, Common Lisp. No contest here. Ruby’s syntax is ugly, with all those ends hanging around and the { |var| … } block syntax. The one thing Ruby has going for it is conciseness. The…

Read the full article

The Virtues of Static Typing

When I first discovered dynamically-typed languages like Perl and Ruby, I was convinced of their superiority to statically-typed languages like C++. No longer did I have to waste hours typing redundant type declarations or adding casts just to make the compiler happy. Dynamic typing allowed me to work quickly and unencumbered in what felt like…

Read the full article

The Weirdness of C++

I’ve been dredging up my C++ for a class recently, and I’m struck by just how weird it feels now that I spend most of my time with Ruby. I was all proud of myself for remembering how to write a copy constructor. Then I ran into a situation like this: MyClass a = foo;…

Read the full article

Paragraph Numbering and the Semantics of BLOCKQUOTE

Continuing on the theme of HTML’s flaws, consider the humble BLOCKQUOTE. While long used simply to indent text, it has a recognizable semantic meaning: a long quotation from another work. A block quote may contain multiple paragraphs, so BLOCKQUOTE logically enough is a block-level element that contains other block-level elements like P. But suppose I…

Read the full article

Learning to Cook With Ruby

I don’t much like programming language tutorials. They’re useful for getting the general sense of what a language is all about, but they inevitably elide too many crucial details to teach you how to write a real program. When I got interested in Ruby, I read the on-line version of Programming Ruby: The Pragmatic Programmer’s…

Read the full article

HTML Footnotes

Leonard’s comment on my post about XML and footnotes got me thinking about representing footnotes in HTML. Not the visual presentation — there are lots of options for that, using CSS, JavaScript, and internal links — but the semantic one. In other words, using nothing but semantically-meaningful HTML tags (DIV, SPAN, P, A), how should…

Read the full article

Defining Eval … In a Library

I was at LispNYC last night listening to Anton van Straaten discuss his work on R6RS, the new Scheme standard. One surprising change from R5RS is that eval is defined in a library. Eval, in a library? Holy scopes! The Common Lispers in the audience were aghast. Even the Schemers were a tad confused. Anton…

Read the full article

Where Does the XML Go?

Here’s a question that’s been bugging me for a while: what’s the best way to store information that is a mixture of highly- and loosely-structured data? For example, a collection of documents like Project Posner. Certain attributes of each document like the title, date, and citation fit easily into a normalized relational database model. But…

Read the full article

Good Ideas

Sometimes I feel like every time I come up with a good idea, I read about it somewhere else a week later. It least it’s nice to have some indication I’m not a raving lunatic. This time, A List Apart suggests Paper Prototyping, just what I was talking about a week ago.