libera/#clasp - IRC Chatlog
Search
12:20:04
bike
figured out how to get arguments in -O3 backtraces, although i don't understand what wasn't working before. oh well
17:05:40
bike
can i get a quick sanity check here: what does (with-open-file (s "/tmp/whatever.txt" :if-does-not-exist :create :encoding :ucs-4 :direction :output) (write-char #\a s)) return?
17:18:59
bike
write-char has a very straightforward definition and the compiler isn't interfering with it, so this is rather mysterious
17:20:50
bike
but it just returns its first argument, so maybe there's something wrong with translators instead
17:27:53
bike
or at least it gets through a couple other encodings fine. in my branch this is failing the encoding-all-encodings-plain test
17:37:56
bike
i mean cl__write_char just calls stream_write_char and then returns the argument it got, and stream_write_char doesn't get a mutable reference
18:07:46
bike
but write_char can't be our only function that takes a Character_sp and returns it, right?
18:09:01
bike
really hope this isn't us doing something undefined in C++ and clang deciding to just go wild with it
19:20:54
bike
oooookay, i made my own write-char and it replicated the effect, but the second time you call it and afterwards it does actually return a character
19:50:46
bike
according to udb, the character argument of write-char is different before and after stream_write_char
20:33:30
bike
not sure if it's the >>=. that wouldn't even make sense since it's more like a left shift is happening
20:35:39
bike
encode_ucs_4 puts four bytes in the buffer and then calls encode_ucs_4be, which puts in another four
20:36:04
bike
but the buffer is allocated (in FileStream_O::write_char) to have ENCODING_BUFFER_MAX_SIZE, which appears to be 6
20:36:57
bike
i have no idea what this ucs-4 encoding even is. yitzi, does it sound right that each character is eight bytes?
20:37:21
bike
"Because the Principles and Procedures document of ISO/IEC JTC 1/SC 2 Working Group 2 states that all future assignments of code points will be constrained to the Unicode range, UTF-32 will be able to represent all UCS code points and UTF-32 and UCS-4 are identical.[5]" hrm
20:41:20
bike
and the reason it only affects the first write-char is that encode_ucs_4 also alters the stream flags to make it ucs-4 big endian for subsequent writes.
20:46:42
bike
https://gitlab.com/embeddable-common-lisp/ecl/-/commit/6e5902bd0881d819b6e3d6ef1e7220c3c33ecf62 seems to date back to ECL
20:47:27
bike
i don't know much about the details here but i think it might make more sense to just interpret :ucs-4 as an external format as being an alis for ucs-4be, rather than doing this mutation stuff
21:19:24
drmeister
bike: I'm over my little programmers block. I tightened up the code and set up a way to rapidly iterate on the function that I'm writing to convert those complex data structures into other complex data structures and then run the function, break at the current point I'm working on, add a line and repeat.
21:20:26
drmeister
At the start of the function it had a long pause as it loads about 3600 cando files so I cached that so I only have to deal with the delay once.
21:24:41
drmeister
SBCL is going to need a conservative GC on the stack and precise on the heap - right?
21:30:10
drmeister
udb is fine with clasp and C++ - I can't imagine it having more trouble with rust.
21:30:50
drmeister
The DOD is going to support us going forward - they want us to get ready to save the world from the next pandemic.
22:17:33
drmeister
bike: cracauer put a bug in my ear about getting Mmtk integrated into cando. What if we have the kids run experiments for us?