freenode/#lisp - IRC Chatlog
Search
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/
6:13:18
aeth
pfdietz: Not entirely similar, because it's actually the default value, which happens to have the default default value of NIL
6:14:06
aeth
Although I guess you could see an overridable value there as being sort of like the EOF value in the read functions.
6:32:54
rk[ghost]
ah, aye aye. any one i imagine is better than me writing from scratch in native CL or worse calling grep/sed as an external function :P
6:34:48
rk[ghost]
hmm, however looking at the history.. last change seems to be in 2k8.. which is fine and dandy in most cases, but html5 was 2k14...
6:36:38
beach
I do know that gilberth (the author) worked hard to make it parse traditional, but syntactically incorrect, HTML.
6:41:12
MichaelRaskin
You mean bookmark export? There the problem is simpler, because it is known to be valid and non-fancy
6:42:20
rk[ghost]
i just thought, psh, why i am at it may as well learn a good html parser lib just in case i plan to do other jazz
7:23:26
beach
(defun cat (&rest strings) (apply #'concatenate 'string strings)) something like that.