freenode/#clasp - IRC Chatlog
Search
13:55:49
drmeister
Yes. AAirlines delayed my flight to Dallas so long that I missed the connection. So I spent the night in Dallas.
15:21:02
Bike
drmeister: https://github.com/clasp-developers/clasp/issues/637 how would i determine if this is fixed? i can load cl-unicode now (though i had to work around an unrelated thing)
17:21:40
kpoeck_
Bike, the failing ansi test, is that with eclector as reader (cst) or clasps reader (ast)
20:11:21
Bike
looking at the format compiler macro. i can rewrite it to only involve the formatter function in one place, which should reduce code generated (and not really affect performance meaningfully), so i'll probably do that
20:11:44
Bike
karlosz suggested optimizing the case of format nil with a control string with no directives, but looking through sources i don't see that very often
20:12:08
Bike
what i do see a lot of is format nils that could be reduced to concatenate and prin{c,1}-to-string
20:12:25
Bike
sbcl optimizes that case, but only if the arguments are known to be strings, which means the princ-to-strings can be skipped
20:12:58
Bike
we don't really have the infrastructure to pull that off, and having a bunch of princ-to-strings... might be worse? or maybe not since that's what the formatter will be doing anyway
20:13:25
Bike
or rather it does princ to a shared stream, right, so it probably conses less that way
20:16:32
Bike
there's lots of tricksy stuff we could do if we really wanted, though. for example if the control string only has ~d kind of directives, we could work out the length of the string based on integer-length and other arithmetic, and just allocate it and write in, which would probably be faster than the string stream
20:24:50
Bike
is there any case in which (princ-to-string string) != string? probably with all the print variables...
20:28:13
Bike
well yeah, it returns a string. i'm asking if it returns the same string you put in, if you put in a string
20:29:00
Bike
it seems like probably. so we could have princ-to-string return immediately if given a string, and then the format optimization would be more okay
20:34:21
Bike
the other thing i can do with format is skip the function call, which sounds pointless, except there's all this "&optional (#:format-arg-28932 (ERROR 'CORE::FORMAT-ERROR ...))" stuff that would then avoid
20:35:13
Bike
so format could pretty much expand into just a bunch of print calls and whatever other logic, at least in the case of simple directives. that sounds nice
20:45:39
scymtym
wouldn't you have to ensure that pprint dispatch doesn't do something custom for strings?
20:47:55
kpoeck18
I believe only *print-escape* matters with strings and princ-to-string implies :escape nil