libera/#commonlisp - IRC Chatlog
Search
21:41:10
clintm
Before I go off and write it, do any of you know of any packages that implement 'expect'? The command from tcl/tk for scripting command line stuff.
22:25:54
mfiano
I had to upload it on one of my throwaway accounts. apparently there is copyrighted music in it. it didn't flag me though, just showing ads to pay the copyrighter
22:30:50
mfiano
I never thought I'd say this, but I wish I knew javascript well enough to not have to add all kinds of hacks just to get something trivial working for my CL code pasting service.
22:31:18
mfiano
Though from what I understand, even if you are good at it there are all kinds of hacks you need to add to work around this crazy language.
22:35:45
mfiano
yitzi: I only know what I learned writing this (the paste.js file referenced): https://paste.mfiano.net/?hKGILYgajzdkxEUv#L175
22:36:13
mfiano
and it is a mess. I could never figure out how to get centering to work on page load...only works on hash change event
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"