Posts Tagged ‘PHP’

September 22nd, 2008

Practicality: PHP vs. Lisp? (32)

Tags: , ,

Eric at LispCast wrote an article about why PHP is so ridiculously dominant as a web language, when arguably more powerful languages like Common Lisp linger in obscurity.
I think the answer is pretty easy. In real life, practicality usually trumps everything else. Most programmers aren’t paid to revolutionize the world of computer science. […]

February 18th, 2008

RSS feed (Common Lisp) (2)

I made an RSS 2.0 feed for my origami gallery the other day. Thanks to CL-WHO this is trivial. Here’s the complete code:
;; RSS
(defun rss ()
(cl-who:with-html-output-to-string (s nil :prologue “<?xml version=\”1.0\” encoding=\”ISO-8859-1\” ?>”)
(:rss :version “2.0″ :|xmlns:atom| “http://www.w3.org/2005/Atom”
(:channel […]

February 11th, 2008

One benefit of a Lisp-driven website (25)

My Common Lisp-powered origami photoblog is still up and running smoothly so far. (I posted more models, go look, shameless plugs and so on and so forth.) No major problems to report in the past couple weeks.
One huge benefit (in my opinion) of a site run on Common Lisp is the way you […]

January 10th, 2008

*sigh* (5)

Tags: , , ,

I spent four hours working on my photo-blog in Common Lisp that I’ve mentioned earlier.
Why does Common Lisp hate me? After four hours, I’m not yet even to the point where I can reliably, successfully load all the libraries I need to load. How pathetic is that? I haven’t even gotten to […]

December 13th, 2007

False (1)

Tags: , , ,

In Ruby, the only things that are false are nil and false. This is a nice change over other languages where other things evaluate to false in boolean tests. Like C and many others, which considers the integer 0 to be false. So is 0.0 false? How about 1e-999999? Or […]

December 4th, 2007

Better (0)

Tags:

Today I turned my 750+ lines of ugly PHP into 200 lines of much nicer PHP, and the shorter version works much better than the longer version. So I’m feeling happier with myself than I was yesterday. I did finally manage to make my parser recursive and remove all the special-case handling code. […]

December 2nd, 2007

Sigh (0)

Tags: , ,

Part of what Ableson and Sussman keep saying in these lovely lecture videos is that a good way to solve a problem is to divide it into layers of abstraction, where one layer of abstraction gets its work done by using a “language” that you wrote in the abstraction layer immediately below it. They […]

November 13th, 2007

PHP namespaces? Nope! (2)

Tags:

Today, I found out that PHP 5 still doesn’t support namespaces. This is kind of extremely crap. I wrote a bunch of classes whose names are simple things like Scale and Numeric. These are good names because non-programmers have to work with this code, and certain names have meanings in those people’s field […]

November 9th, 2007

Lisp quibbles (2)

Tags: , , , ,

At night to relax I’ve still been reading about Common Lisp. There’s a lot to like about it.
But there’s one thing that drives me crazy:
Let’s define a variable: DEFVAR, DEFPARAMETER.
Let’s define a method: DEFMETHOD.
Let’s define a macro: DEFMACRO.
Let’s define a package: DEFPACKAGE.
Let’s define a class: DEFCLASS.
Let’s define a symbol macro: DEFSYMBOL Whoops, […]

November 7th, 2007

Javascript forays, PHP adventures (2)

To add yet another language to the ever-expanding list of languages I know well enough to get by but have far from mastered, in the past week or two at work I’ve needed to play with Javascript a lot. I’ve long thought of Javascript as the bane of my existence, if only for the […]