code • words • emotions

Daniel Janus’s blog

Posts in category: programming

cl-morfeusz: A ninety minutes’ hack

23 June 2008 •

Here’s what I came up with today, after no more than 90 minutes of coding (complete with comments and all):

MORFEUSZ> (morfeusz-analyse "zażółć gęślą jaźń")
((0 1 "zażółć" "zażółcić" "impt:sg:sec:perf")
 (1 2 "gęślą" "gęśl" "subst:sg:inst:f")
 (2 3 "jaźń" "jaźń" "subst:sg:nom.acc:f"))

Continue reading

cl-netstrings

30 April 2008 •

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…

Continue reading

Hacking away with JSON-RPC

24 April 2008 •

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

Continue reading

Poliqarp’s new protocol

16 April 2008 •

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.

Continue reading