freenode/#lisp - IRC Chatlog
Search
11:47:42
aeth
phoe: Oh, can you look over my conditions file? https://gitlab.com/zombie-raptor/zr-utils/-/blob/master/conditions.lisp
11:48:08
aeth
phoe: Those were the most common (error foo) patterns in my engine so I turned those into define-conditions a while back.
11:49:08
aeth
The idea of putting it in my utility library (and I might even move that into its own standalone library) is that that makes it easier for different libraries/programs to use the same conditions
11:51:33
aeth
Oh, hmm, I guess I don't. This is why I like exports at the top of the file. Makes it easier to spot that kind of thing.
11:52:04
phoe
a unit test suite would have caught this sort of thing - which is why I try to unit test every single thing I can
11:52:59
phoe
I'd split longer report functions into their own named functions, but that's a matter of taste
11:53:48
aeth
I probably will build those out of helper functions/macros at some point, but I haven't written enough to make clear patterns
11:54:01
phoe
and the starting vowel kind of stuff literally begs to be a helper function unto its own
11:55:34
aeth
yeah, I'm not very happy with that lambda in general... it was pretty tricky to write and iirc it was more about getting it to work correctly with the (REPL, not unit) tests.
11:55:56
aeth
Quite a few different branches, but they're all useful because of how common that error is
11:57:37
aeth
I could probably build required-input-error into another, third assertion in the checked-types metaclass
14:10:03
jcowan
aeth: I never thought macrolet/let-syntax made very much sense. "In section 2 of this paper, the notation A ~ B means blablabla, but in all other sections it means bliblibli". Who organizes papers like that?
14:23:07
jcowan
In Dijkstra's guarded-command language, if you refer to a variable in an inner block you must redeclare it there
16:15:07
beach
I mean, I don't think there is a requirement like that. If you stick an :AROUND method that supplies initargs, I don't think that is illegal.
16:17:29
phoe
"The generic function reinitialize-instance can be used to change the values of local slots of an instance according to initargs."
16:18:03
phoe
I can kinda infer that if the user supplies no INITARGS then the user may expect nothing to change
16:18:35
specbot
Reinitializing an Instance: http://www.lispworks.com/reference/HyperSpec/Body/07_c.htm
16:24:07
phoe
I ran into an issue where my buggy code cleared out values of slots after calling REINITIALIZE-INSTANCE with no initargs
16:24:34
Bike
but if you want reinitialize-instance to refresh its place in an external store or something that would probably be okay.
19:41:09
pimpom
Can I "expand a list" an pass the contents as input to a function in CL? E.g. I have some function (defun some-fun (arg1 &rest args) ...) and want to pass "args" as several arguments to another function call within this function.
21:47:45
phoe
What is the easiest way to define two packages that cross-reference each other via local nicknames?
22:20:13
Bike
phoe: with sbcl's interface, call add-package-local-nickname for one, i guess. gets annoying if you also want to be able to reeevaluate defpackage forms without complaint, tho