Lazy-spy: Clojure logging/spy for lazy sequences

Clojure.contrib’s log/spy macro does not realize the contents of lazy sequences by default when logging, as they might be infinitely long. If you’re sure that your lazy sequence is finite, you can use this lazy-spy macro to force it to be realized when it’s logged, so that you can inspect the contents.

Posted in Tech | Tagged , | Comments Off on Lazy-spy: Clojure logging/spy for lazy sequences

Flash BIOS Without a Floppy

Flashing the BIOS without a floppy drive can be done with an Ultimate Boot CD (free!) and a USB memory stick. BIOS upgrades usually come in the form of an MS-DOS executable meant to be run from a bootable floppy, but modern computers don’t usually have floppy drives anymore, and who has a copy of […]

XML DTD Validation in Clojure: Turning It Off, Parsing Malformed XML

I wanted to parse some externally-generated and malformed HTML, so naturally I went to the short and sweet clojure.xml/parse function. I got a nasty error: error: Server returned HTTP response code: 503 for URL: It seems that the W3C blocked access to the DTDs two years ago, but Java still tries to load […]