Daniel Janus’s blog
Clojure as a dependency
2 May 2020
I have a shameful confession to make: I have long neglected an open-source library that I maintain, clj-tagsoup.
This would have been less of an issue, but this is my second-most-starred project on GitHub. Granted, I don’t feel a need for it anymore, but apparently people do. I wish I had spent some time reviewing and merging the incoming PRs.
Indenting cond forms
10 February 2020
Indentation matters when reading Clojure code. It is the primary visual cue that helps the reader discern the code structure. Most Clojure code seen in the wild conforms to either the community style guide or the proposed simplified rules; the existing editors make it easy to reformat code to match them.
Careful with that middleware, Eugene
21 January 2020
I’ll be releasing version 0.3 of Skyscraper, my Clojure framework for scraping entire sites, in a few days.
More than three years have passed since its last release. During that time, I’ve made a number of attempts at redesigning it to be more robust, more usable, and faster; the last one, resulting in an almost complete rewrite, is now almost ready for public use as I’m ironing out the rough edges, documenting it, and adding tests.
3 January 2020
This story begins on August 9, 2017, when a friend messaged me on Facebook: “Hey, I’m going to be on a TV talent show this weekend. They’ll be giving me this kind of problems. Any ideas how to prepare?”
Web of Documents
7 October 2019
In 1960, Ted Nelson envisioned a web of documents.
It was called Xanadu. It was a grand, holistic vision: of documents that, once published, are available basically forever; of bidirectional links that could glue together not just documents, but parts thereof; of managing copyright and royalties. It was complex. And it never really came to fruition.
Re-framing text-mode apps
5 February 2019
“But, you know, many explorers liked to go to places that are unusual. And, it’s only for the fun of it.” – Richard P. Feynman
A couple of nights ago, I hacked together a small Clojure program.
All it does is displays a terminal window with a red rectangle in it. You can use your cursor keys to move it around the window, and space bar to change its colour. It’s fun, but it doesn’t sound very useful, does it?
Happy Programmers’ Day!
13 September 2014
Happy Programmers’ Day, everyone!
A feast isn’t a feast, though, until it has a proper way of celebrating it. The Pi Day, for instance, has one: you eat a pie (preferably exactly at 1:59:26.535am), but I haven’t heard of any way of celebrating the Programmers’ Day, so I had to invent one. An obvious way would be to write a program, preferably a non-trivial one, but that requires time and dedication, which not everyone is able to readily spare.
You already use Lisp syntax
20 May 2014
Unix Developer: I’m not going to touch Lisp. It’s horrible!
Me: Why so?
UD: The syntax! This illegible prefix-RPN syntax that nobody else uses. And just look at all these parens!
Me: Well, many people find it perfectly legible, although most agree that it takes some time to get accustomed to. But I think you’re mistaken. Lots of people are using Lisp syntax on a daily basis…
DOS debugging quirk
6 April 2014
While hacking on Lithium, I’ve noticed an interesting thing. Here’s a sample DOS program in assembly (TASM syntax):
100h N equ 2 start: mov bp,sp mov ax,100 mov [bp-N],ax mov cx,[bp-N] cmp cx,ax jne wrong mov dx,offset msg jmp disp wrong: mov dx,offset msg2 disp: mov ah,9 int 21h mov ax,4c00h int 21h msg db "ok$" msg2 db "wrong$" end starttiny org
2048: A close look at the source
2 April 2014
Dust has now mostly settled down on 2048. Yet, in all the deluge of variants and clones that has swept through Hacker News, little has been written about the experience of modifying the game. As I too have jumped on the 2048-modding bandwagon, it’s time to fill that gap, because, as we shall see, the code more than deserves a close look.