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
11:48:46
hayley
lisp123: What I did around this time last year, as we used it for university work, was to run Minecraft with shaders on. That way the GPU would warm your computer room up.
11:49:38
hayley
In a pinch, model checking or fuzz testing can work, though in my experience CPUs make for worse heaters.
11:50:35
lisp123
i wonder if you could do some cryptomining for the same and make some $$ on the side
11:52:30
hayley
They also tend to be tuned in a way that makes interactive use of the computer unbearable, too. So best stick with the classics, if you want to use the computer.