freenode/#sbcl - IRC Chatlog
Search
14:40:58
stassats
i can trivially record atom forms for errors and get them displayed by sbcl, but more trouble with trying to use that information in slime
14:41:29
stassats
it records source positions by installing reader macros for #\( and so on, but there's no reader macro for X in (progn x)
15:15:23
stassats
wrapping each form into a structure, which stores the source position, then there'll be no problem locating atoms
16:01:56
pfdietz
You could have a read table in which all characters are macro characters, so there are reader macros even for X.
16:05:03
pfdietz
Can do whatever we want for non-standard characters in the standard read table, so make all those extra characters share a common reader macro?
17:12:16
phoe
if the character is not found in the list of 256 ASCII characters or what not (if char-code is 256 or more), then fire this function
17:15:52
nyef``
That, too. Sometimes, the correct customization is to ignore the customization hook and do something with the underpinnings instead.
17:17:45
stassats
currently, the source forms are tracked using a hash-table, which, obviously, doesn't work for atoms
17:18:29
stassats
i got it to work for reporting which form is producing errors by using the conses the car of which the atom comes from
17:19:53
stassats
so, wrapping source forms in some kind of structure will allow to dispense with the hash-table and atoms will be identifiable
17:57:46
stassats
ok, i guess can't use it for compilation, just for mapping form numbers to characters
18:03:59
jsnell
the problem is that you need to pass macros the raw s-expression, not a tree of wrapper objects
18:08:31
jsnell
you could do things like convert macro arguments from the wrapped format to raw, and then map any atoms in the returned form back to the wrapped ones. but that breaks down if there are multiple instances of the same atom in the input form
20:04:52
stassats
but there's a lot to be done between this and something usable. and macros that don't reuse original conses will break it