libera/#commonlisp - IRC Chatlog
Search
2:54:36
Josh_2
I rewrote a critical part of my software system and it seems to have come together nicely. There was a lot of deleting and rewriting :joy:
3:39:56
patrix
Nice. I’m about to embark on some refactoring as well, though my project is only 2 weeks old haha
8:28:47
jackdaniel
you can hack the structure itself to put zero as denominator, but then you'll break arithmetics
8:30:34
jdz
Posterdati: my feeling is that you're trying to use ratios where their use is inappropriate.
8:31:05
jdz
Posterdati: maybe try complex numbers or cons cells if you really want to avoid your own data structure.
10:34:58
louis77
Josh_2: is there something in CL like Clojure's EDN for remote process-to-process communication?
11:00:07
patrix
I've seen 2 attempts at EDN libraries on Github.. one is a skeleton with no code, one I haven't managed to load properly, and appears to be quite complex .. I also wish there was a simple EDN reader/emitter for CL.. still surprised there's none..
11:02:23
hayley
EDN doesn't capture interesting CL types adequately; vectors can have element types, and hash tables can have different test functions.
11:04:53
patrix
well I ended up converting my file from EDN to JSON and was able to read it in my CL code. so I'm not making use of anything fancy in EDN
11:36:14
Demosthenex
ok, so i want to "tail -f" a file, is there a way to make read-line wait for input?
11:40:54
Demosthenex
hrm, i was reading from a FIFO before, that hung properly. now i'm reading a file and need to wait for it like tail -f
11:48:53
Demosthenex
https://stackoverflow.com/questions/6460500/using-stdout-from-shell-script-in-common-lisp has an example
11:50:45
jackdaniel
if you are interested in non-portable solutions then you may force fd-stream in sbcl to "hang" by setting (setf (sb-sys:fd-stream-listen stream) t)
12:13:08
jackdaniel
it is not that it is an exported interface, more a hack so don't get attached to it too much :)
14:08:19
_death
you can see how tail does it.. my guess is this is a good starting point: https://github.com/coreutils/coreutils/blob/master/src/tail.c#L1158