libera/#clasp - IRC Chatlog
Search
14:30:33
bike
::notify yitzi do you know any remotely portable way to get the line and column position of an input stream? if i'm reading nontrivial gray streams correctly, stream-line-column is not it.
15:12:41
yitzi
bike: we have https://github.com/clasp-developers/clasp/blob/1c689e103f0e7ae14ca5227ce09bf0eb15c197b5/src/lisp/kernel/clos/streams.lisp#L874-L881
15:14:21
yitzi
But this is not in Gray streams. I don't think I put into nontrivial-gray b.c. I don't recall there being a consensus. We could add an extension for it, I think I didn't before because it exposes the terrible naming of STREAM-LINE-COLUMN
15:15:15
bike
yitzi: i'm hoping for something to use in cross-clasp, i.e. to use from sbcl or otherwise not clasp
15:15:27
bike
it's not strictly necessary, but it would make the source info in the produced image better
15:18:57
bike
it looked like you had to dip into sb-kernel even for stream-line-column, so i suppose that's a bad portent
15:52:37
yitzi
SBCL doesn't track line and col for input streams. It uses a TLF index and then calls this monstrosity https://github.com/sbcl/sbcl/blob/95edde75867a9f468c48103de42f09351970f479/src/code/late-extensions.lisp#L37
15:55:01
yitzi
I'll probably add stream-input-column and stream-input-line to ngray, but it isn't going to solve your problem. You'll probably need to do this: https://github.com/yitzchak/common-lisp-jupyter/blob/master/src/cl-jupyter/utils.lisp#L78-L145