libera/#sicl - IRC Chatlog
Search
18:00:32
Duuqnd
I've been thinking about how to implement the random-state type. My first thought was to just make it a class, but then I read that random-state must be able to be printed and read back in. SBCL does this by simply having random-state be a struct, but I'm not sure what to do here. I could make it a struct, but I'd like to hear more opinions.
18:03:58
Bike
i don't think readability should be a factor there. even without a custom random state reader syntax you could just use #., and in fact now that i'm looking at it sbcl uses #. within the struct anyway
18:06:17
Duuqnd
Yeah, I thought about using #. but I'm not sure what exactly would come after that. A (make-instance 'random-state) or similar?
18:11:18
Duuqnd
It could be something like #.(sicl-random:make-random-state ...) except the name "make-random-state" is already taken by CL so it would have to be called something else.
18:15:19
Duuqnd
I initially didn't want to do that because it would be ugly, but really, nobody prints a random-state to admire it, all that really matters there is that it can be printed and read.
18:16:02
Bike
yeah, since the standard just says it has to be readable without actually explaining any details, a program that does anything with it but READ isn't portable anyway
3:21:46
beach
For UNWIND, I think I can get away with having the UNWIND function return, so that it would be an indirect JMP followed by a relative JMP with a label.
3:22:13
beach
But we do have cross-function labels, so I changed my mind about assembling each function separately.
3:32:02
beach
However, not much will get done today. I need to go buy food in 2 hours or so, and my favorite coauthor is coming over for lunch, so I need to cook for her.