freenode/#lisp - IRC Chatlog
Search
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.
8:10:13
makomo
no-defun-allowed: i think this is what you're looking for http://metamodular.com/CLOS-MOP/slot-value-using-class.html
8:14:16
no-defun-allowed
it'd be awfully spammy if most of the room went "i don't know much about sly"
8:17:01
sink
Better question then: How do I start understanding a large and underdocumented CL project? I feel lost just reading the code. How do I start interactively fiddling with it?
8:19:03
sink
I'm looking at a CL project in this case. I've actually had a much nicer time debugging Elisp issues (mostly because it's not doing anything fancy, just routine functions for scripting and text editing).
8:22:07
fiddlerwoaroof
Or, if you have a code sample that uses the project, maybe look at the source of the functions that your code sample uses and play around with the inputs in the repl
8:22:13
sink
no-defun-allowed: That's how I found myself lost in source code. I jump to one function that throws an error, then try to figure out what defun+ is, and before I know it I'm swamped in macros.
8:22:43
sink
fiddlerwoaroof: I see everyone talking about this Test Driven Development and testing thing. Where do I start?
8:23:26
no-defun-allowed
anything that touches agile or extreme programming only deserves pointing and laughing
8:24:00
jackdaniel
pfdietz: do you have by chance some code snippet to show how you implement slot-unbound condition to lazily compute values? you've mentioned it the other day and it sounds clever, but I'm curious how did you implement that
8:24:05
fiddlerwoaroof
no-defun-allowed: I work at a TDD-heavy shop, it actually puts some useful design pressure on your code
8:24:20
no-defun-allowed
cause your test cases have to be pretty damn good or you lose where you didn't test