libera/#commonlisp - IRC Chatlog
Search
1:53:57
pillton
I have a function which signals MODULE-ERROR when invoked as (F :error). I'd like F to perform a different action and emit a warning when invoked as (F :warn-and-reuse). Unfortunately, CL:WARN only signals conditions of type WARNING. Would you create a new condition class MODULE-WARNING or write a version of WARN which accepts ERROR conditions?
1:54:44
Bike
i would not try to signal an error as a warning, because that confuses how callers can respond to it
1:54:55
Bike
e.g. muffle-warning is an appropriate restart for a handler to use for a warning but not an error
1:56:51
pillton
Yeah. My thoughts as well. The downside of MODULE-ERROR is it tends to be a subclass of a lot of operation specific errors. Reproducing the hierarchy for the warning would be pain.
3:18:34
jmes
I'm wondering how to use apply/funcall/mapcar/etc. on macros - well obviously I can't but what should I do when I want to pass macros around like functions?
3:23:29
beach
The point of the macro AND is to avoid evaluating some forms when a preceding form turns out to be NIL. If you already have a list of values, there is no point in the macro AND, so you would use a function instead.
3:35:03
White_Flame
but that's what the macroexpansion does, for the given number of arguments, make a NIL-testing tree with early exit. The lambda will contain that expansion for 2 parameters
3:35:47
White_Flame
and really, "turns the AND into a function" is more "wraps the AND in a function"
11:08:08
lisp123
First hit on Google was https://rdrr.io/cran/qdapDictionaries/man/GradyAugmented.html