freenode/#lisp - IRC Chatlog
Search
18:07:21
jcowan
No, because bignum arithmetic (no overflow) plus array bounds checking will give you an error instead of the wrong answer.
18:08:07
pjb
The problem is that with modular arithmetic, of when no overflow is detected, they get the wrong index.
20:00:41
aeth
elderK, beach: If you need to work with types instead of classes, use https://github.com/markcox80/specialization-store/
20:04:04
aeth
And I think it is slower, except when inline, which can only happen when the type is declared (since CLtL2 doesn't expose the type inference, only the type declarations)
20:57:29
aeth
Working with types probably means numbers or arrays, e.g. (simple-array single-float (3)) or (integer 0 42)
23:34:38
jcowan
It's interesting in that you don't have full control of which method is chosen, only that it will work (and therefore all methods must produce the same results, just by different means)
2:50:52
jcowan
Is the pattern of multiple values that SUBTYPEP uses (first value is the value, second value is a boolean indicating its validity) a common one in CL code?
2:53:45
Bike
i think alexandria:type= uses the same return values, but that's for basically the same thing.
3:25:41
fouric
does anyone know of a lisp reader that preserves the locations of the forms that were read in in the file?
3:26:22
fouric
that is, when i invoke said hypothetical READ, it returns not only the results of normal READ but also line numbers and character indices/columns of where each atom/list was found
3:34:28
Bike
beach's reader has stuff for source tracking https://github.com/robert-strandh/Eclector/