Daniel Janus’s blog
Posts in category: programming
cl-netstrings
I’ve just packaged up the Common Lisp netstring handling code that I wrote a week ago into a neat library. Unsurprisingly enough, it is called cl-netstrings and has its own home on the Web. It’s even asdf-installable! I wonder whether this one turns out to be useful for anybody besides me…
Hacking away with JSON-RPC
Let’s try:
(let ((s (socket-stream
(socket-connect "localhost" 10081
:element-type '(unsigned-byte 8)))))
(write-netstring "{\"method\":\"ping\",\"params\":[],\"id\":1}" s)
(finish-output s)
(princ (read-netstring s))
(close s))
; { "result": "pong" }
; --> T
Poliqarp’s new protocol
The first version of the document I’ve been writing about a couple of days ago is now ready for public review. I’ll be making an initial attempt at the implementation once I return from the European Common Lisp Meeting ‘08 and write a report.
I’m not playing this stupid game anymore
Not until the next tournament, that is. My achievements in the 12th Scrabble Championship of Warsaw can be described as “mediocre” at best; four won, one drawn and seven lost games mean that my general rating will drop down by two points or so. Oh well. Everybody knows it’s a stupid game. ;-) At least I’ve managed to get a decent small score, with an average of 377 points per game.