Posts

Showing posts from June 21, 2009

Death of a Troll

perm url with updates: http://xahlee.org/Netiquette_dir/death_of_a_troll.htmlDeath Of A TrollXah Lee, 2009-06-25Erik Naggum is dead. He's born in 1965, died in 2009, this month. I wanted to write a essay about it, my impressions of him, our exchanges, ... but it'll take probably a week to write a account or obituary sort of thing in a way that is to my satisfaction. It'll involve digging my unorganized newsgroup archive that are scattered in different places on my hard drive, and endless painful hours in google newsgroup archive search... Seems rather a formidable task, because i want to write it well and fully linked. For now, see our past exchanges at google group: Source. Roughly, our first exchange is in ~1999, when i was learning lisp (Scheme) for the first time and was asking about the cons business. (see: Xah Lee's Computing Experience Bio) I read comp.lang.lisp almost exclusively for Erik's posts. (See: Why do I Rant In comp.lang.lisp? ) Since he stoppe…

google-code-prettify tutorial

perm url with updates: http://xahlee.org/js/google-code-prettify/index.htmlGoogle-code-prettify ExamplesXah Lee, 2009-06-20This page gives some examples using Google-code-prettify technology, and evaluate its quality.Google-code-prettify (GCP) is a javascript library that syntax color computer lang source code in html. It does the job on the fly. Project page at: http://code.google.com/p/google-code-prettify/.Basic UseIt is very easy to use. All you have to do is to download the javascript files. Then, in your web page, add these lines: <linkrel="stylesheet"type="text/css"href="gcp/prettify.css"> <scripttype="text/javascript"src="gcp/prettify.js"></script> <bodyonload="prettyPrint()"> Then, in places you want your source code to be colored, wrap it with a “pre” tag like this: <preclass="prettyprint"> x = 1+1; # something something </pre> Advantages:Your lang source code is still r…