libera/#sbcl - IRC Chatlog
Search
8:02:02
vasily
Is there any way to read vectors of arbitrary (more or less) numeric element type from (unsigned-byte 8) streams without using slow tools like nibbles? I don't really know C++, but I think I want something like std::as_bytes or std::as_writable_bytes. In ANSI CL you cannot displace an array into other array of different type, but maybe SBCL has something for this?
8:10:36
vasily
Use case: suppose you have a stream which contains both single-float's, double-float's etc. You don't want to reopen it any time you want to read a value of different type. Nibbles reads or writes vectors just using a loop.
8:38:46
hayley
Shinmera: Well, we don't need to imagine. Clearly vasily uses arm64 and my VOPs for that haven't been upstreamed yet :)
10:43:59
vasily
:initargs (:distribution "https://beta.quicklisp.org/dist/quicklisp.txt" :%version :latest)
14:10:50
stassats`
read into an ub8 array and then access it according to your needs. if you really need to create arrays from it, then you won't have any luck with nibbles