jackdaniel changed the topic of #commonlisp to: Common Lisp, the #1=(programmable . #1#) programming language | Wiki: <https://www.cliki.net> | IRC Logs: <https://irclog.tymoon.eu/libera/%23commonlisp> | Cookbook: <https://lispcookbook.github.io/cl-cookbook> | Pastebin: <https://plaster.tymoon.eu/>
brokkoli_originl has joined #commonlisp
brokkoli_origin has quit [Ping timeout: 272 seconds]
herjazz has joined #commonlisp
brokkoli_originl is now known as brokkoli_origin
istewart has quit [Quit: Konversation terminated!]
istewart has joined #commonlisp
Oladon has quit [Quit: Leaving.]
herjazz has quit [Quit: leaving]
random-nick has quit [Ping timeout: 244 seconds]
random-nick has joined #commonlisp
ski has quit [Server closed connection]
ski has joined #commonlisp
random-nick has quit [Ping timeout: 248 seconds]
leeb has joined #commonlisp
leeb_ has quit [Ping timeout: 260 seconds]
varjag has joined #commonlisp
molson_ has quit [Remote host closed the connection]
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
varjag has quit [Ping timeout: 260 seconds]
_whitelogger has joined #commonlisp
King_julian has quit [Ping timeout: 252 seconds]
King_julian has joined #commonlisp
admich1 has quit [Ping timeout: 245 seconds]
admich1 has joined #commonlisp
peterhil has joined #commonlisp
cmack has joined #commonlisp
jonatack has joined #commonlisp
decweb has quit [Quit: Konversation terminated!]
ewig has joined #commonlisp
jonatack has quit [Ping timeout: 252 seconds]
bpanthi977 has quit [Ping timeout: 248 seconds]
Ruby has quit [Quit: ZNC - https://znc.in]
Ruby has joined #commonlisp
Ruby has quit [Client Quit]
Ruby has joined #commonlisp
Ruby has quit [Client Quit]
Ruby has joined #commonlisp
akoana has quit [Quit: leaving]
edgar-rft` has joined #commonlisp
edgar-rft has quit [Ping timeout: 268 seconds]
istewart has quit [Quit: Konversation terminated!]
scymtym has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
bryce_m has joined #commonlisp
scymtym has quit [Read error: Connection reset by peer]
scymtym has joined #commonlisp
ewig has quit [Ping timeout: 248 seconds]
pve has joined #commonlisp
flip214 has joined #commonlisp
zxcvz has joined #commonlisp
zxcvz has quit [Remote host closed the connection]
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
peterhil has quit [Ping timeout: 276 seconds]
triffid has quit [Ping timeout: 244 seconds]
inline has quit [Quit: Leaving]
triffid has joined #commonlisp
inline has joined #commonlisp
schna has joined #commonlisp
rgherdt has joined #commonlisp
<contrapunctus> I'm using Dexador in a LOOP to post to an API, and when the API returns 429 (too many requests), I want to wait for an hour, retry the failed request, then resume the LOOP.
<contrapunctus> My code, vastly simplified for sake of example, looks like `(restart-case (dex:post ...) (wait-and-retry (c) (sleep 3600) (dex:retry-request c)))`
<contrapunctus> But `dex:retry-request` doesn't actually seem to succeed...whereas if I use a recursive function call instead of `dex:retry-request`, it succeeds.
<contrapunctus> I've also tried using `(dex:retry-request 1)`, with no difference.
Guest47 has joined #commonlisp
<contrapunctus> How do I retry the last query while retaining the local variables? (That's what's lacking in the recursive solution, which breaks progress reporting. I guess I could make a helper function to which I pass the state...but I'm curious why `dex:retry-request` isn't working, and whether anyone else has tried something like this.)
attila_lendvai has joined #commonlisp
attila_lendvai_ has joined #commonlisp
attila_lendvai has quit [Ping timeout: 260 seconds]
ewig has joined #commonlisp
<jackdaniel> (loop (restart-case (progn ... (loop-finish)) (wait-... () (sleep 30))))
treflip has joined #commonlisp
<jackdaniel> something like that
wacki has joined #commonlisp
wacki has quit [Read error: Connection reset by peer]
treflip` has joined #commonlisp
treflip has quit [Ping timeout: 240 seconds]
wacki has joined #commonlisp
olivial has joined #commonlisp
olivial_ has quit [Ping timeout: 276 seconds]
random-nick has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
admich1 has quit [Ping timeout: 260 seconds]
admich1 has joined #commonlisp
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life_ is now known as Lord_of_Life
ewig has quit [Ping timeout: 240 seconds]
treflip` has quit [Remote host closed the connection]
treflip has joined #commonlisp
decweb has joined #commonlisp
bpanthi977 has joined #commonlisp
Guest47 has quit [Quit: Textual IRC Client: www.textualapp.com]
treflip` has joined #commonlisp
treflip has quit [Ping timeout: 252 seconds]
brokkoli_origin has quit [Ping timeout: 252 seconds]
brokkoli_origin has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
mrvdb- has quit [Quit: ZNC 1.9.1 - https://znc.in]
admich1 has joined #commonlisp
mrvdb has joined #commonlisp
treflip` has quit [Read error: Connection reset by peer]
attila_lendvai_ is now known as attila_lendvai
bpanthi977 has quit [Ping timeout: 276 seconds]
Everything has joined #commonlisp
bpanthi977 has joined #commonlisp
ewig has joined #commonlisp
peterhil has joined #commonlisp
pranav has joined #commonlisp
peterhil has quit [Ping timeout: 276 seconds]
varjag has joined #commonlisp
molson has joined #commonlisp
spiderbit has joined #commonlisp
<spiderbit> Maybe somebody can help me with a stumpwm related code I want to write it's I think about scoping:
<ixelp> debian Pastezone
<spiderbit> it just says no matter how I try to write it or add stumpwm: stumpwm:: quote it put it in quotes including using stumpish, it says it can't find the function
<spiderbit> or "invalid function name"
<spiderbit> I can try to add a "menu" or nil argument...
<beach> What function name is it?
<ixelp> stumpwm/menu-definitions.lisp at master · stumpwm/stumpwm
<spiderbit> the "menu-down"
<beach> spiderbit: And that code is not great. The indentation is totally wrong which makes it impossible to analyze without counting parentheses.
<spiderbit> that's what emacs lisp mode makes out of it...
<beach> You then probably have TABs in there which the paste site messes up.
<beach> And you have dangling closing parentheses.
<beach> If you add an explicit package prefix and it still complains that the function does not exist, it probably doesn't.
<beach> Maybe if you do (apropos "menu-down") you can see whether there is a function defined by that name.
<spiderbit> you see in the linked file that it does and if I use the describe-function function of stumpwm it describes it
<beach> Then there must be some order issues, like the function being defined after it is called.
<spiderbit> it still says invalid function name
<beach> Oh, wait, invalid function name suggests that the name itself is malformed.
<beach> What is the name that the error says is invalid?
<spiderbit> menu-down
<beach> That is not an invalid function name. Are you sure it is not quoted or something?
<spiderbit> yes it's quoted
<beach> Then it is not menu-down that is invalid, but 'menu-down.
<beach> And that is indeed an invalid function name.
<spiderbit> with quoted I meant ".."
<spiderbit> but I can write it without "" with ' or with nothing
<spiderbit> it brings the same error
<beach> Oh, that's even worse. Yes, a string is also not a valid function name.
<beach> What do you mean by "I can write it without..." You did in the post.
<beach> ... write it without quotes, I mean.
<spiderbit> I am not the best commonlisp guy, my main lisp knowledge is with emacslisp...
<spiderbit> (define-key m (kbd "F5") (apropos 'menu-down))
<spiderbit> I can change this line
<beach> In your post, it is menu-down, not "menu-down" or 'menu-down. Yet, the error mentiones "menu-down". That is a bit strange.
<beach> That line is not in your post.
<spiderbit> with 'menu-down "menu-down" or menu-down
<beach> APROPOS is not in your post.
<spiderbit> Maybe if you do (apropos "menu-down")
<spiderbit> <- I tried your suggestion
<beach> I meant to do that at the command line to see whether the function is defined.
<beach> But now we have established that this is not the problem.
<beach> And instead, we have an invalid function name.
<beach> So if you execute your original code, what is the name that it says is invalid?
lcn_ has joined #commonlisp
<spiderbit> error in command tea-timer: invalid function name: "menu-down"
<beach> Yes, a string is an invalid function name.
<beach> You have to figure out why your symbol is turned into a string.
<spiderbit> I
<spiderbit> I could try to restart stumpwm hopefully without X crash
spiderbit has quit [Quit: Client closed]
<beach> I don't see how that would help.
<beach> I don't know the library you are using, but I would suggest checking the documentation of define-key.
<beach> Or try (macroexpand-1 '(define-key m (kbd "F5") menu-down))
<beach> ... at the command line, not in your code.
spiderbit has joined #commonlisp
<spiderbit> Well X crashed... but I am back now it says something different.
<spiderbit> the variable MENU-DOWN is unbound
<spiderbit> why variable...
<beach> That makes more sense. It means that define-key is evaluating the last argument.
<beach> So now what happens if you quote it, like 'menu-down?
<spiderbit> it works...
<spiderbit> so my code was not bad but something I did before trashed my namespace...
<spiderbit> need some better developing environment I guess
reb has quit [Remote host closed the connection]
<spiderbit> beach thanks.
puke has quit [Remote host closed the connection]
puke has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
jonatack has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]
admich1 has joined #commonlisp
admich1 has quit [Read error: Connection reset by peer]
admich1 has joined #commonlisp
<beach> Sure. Good luck!
bpanthi977 has quit [Ping timeout: 252 seconds]
mwnaylor has quit [Ping timeout: 260 seconds]
mwnaylor has joined #commonlisp
bpanthi977 has joined #commonlisp
ewig has quit [Ping timeout: 240 seconds]
bpanthi977 has quit [Ping timeout: 248 seconds]
jon_atack has joined #commonlisp
jonatack has quit [Ping timeout: 248 seconds]
bpanthi977 has joined #commonlisp
admich1 has quit [Ping timeout: 265 seconds]
Everything has quit [Quit: leaving]
varjag has quit [Ping timeout: 240 seconds]
admich1 has joined #commonlisp
joast has quit [Ping timeout: 248 seconds]
joast has joined #commonlisp
admich1 has quit [Ping timeout: 252 seconds]
admich1 has joined #commonlisp
phil_bb has quit [Ping timeout: 260 seconds]
zwr has quit [Read error: Connection reset by peer]
zwr has joined #commonlisp
phil_bb has joined #commonlisp
lusciouslover has quit [Quit: \]
lusciouslover has joined #commonlisp
molson has quit [Remote host closed the connection]
molson has joined #commonlisp
jon_atack has quit [Ping timeout: 268 seconds]
admich1 has quit [Ping timeout: 248 seconds]
dra has joined #commonlisp
admich1 has joined #commonlisp
spiderbit has quit [Quit: Client closed]
jonatack has joined #commonlisp
mgl has joined #commonlisp
<contrapunctus> jackdaniel: Thanks for the answer...still, I want to understand why (dex:retry-request 1) or (dex:retry-request c) don't succeed. Ideally, I'd like to avoid changing the LOOP logic and structure.
rkazak2 has quit [Read error: Connection reset by peer]
rkazak has joined #commonlisp
<contrapunctus> (Worst of all, why do they fail silently? Can a restart not throw a new condition...?)
wacki has quit [Quit: Leaving.]
<bike> restarts can do anything. but if you use restart-case as is usual, the same handlers will be in place when the restart is invoked.
attila_lendvai has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #commonlisp
mgl has quit []
admich1 has quit [Ping timeout: 276 seconds]
attila_lendvai has quit [Ping timeout: 272 seconds]
admich1 has joined #commonlisp
pranav has quit [Read error: Connection reset by peer]
<contrapunctus> (Oh derp, I said "throw", conditions are "signalled"...)
<contrapunctus> bike: Maybe I'm supposed to use (invoke-restart 'dex:retry-request) instead? The function (not restart) dex:retry-request seems to invoke the restart if it can find it - could it be that it just can't so it never retries the request?
<contrapunctus> (Maybe I should read phoe's book...)
<bike> yeah, it looks like retry-restart just does nothing if there's no restart.
<bike> also the restart needs to be associated with the condition, so that's an extra wrinkle
<bike> https://github.com/fukamachi/dexador/blob/master/src/restarts.lisp#L17-L18 here it is doing nothing if there's no restart
<ixelp> dexador/src/restarts.lisp at master · fukamachi/dexador
mgl has joined #commonlisp
mgl has quit [Client Quit]
<bike> i have no idea what your code is doing, of course
pranav has joined #commonlisp
istewart has joined #commonlisp
spdegabrielle has joined #commonlisp
jonatack has quit [Ping timeout: 268 seconds]
rgherdt has quit [Remote host closed the connection]
chrcav has joined #commonlisp
jonatack has joined #commonlisp
lcn_ has quit [Remote host closed the connection]
jonatack has quit [Ping timeout: 252 seconds]
pve has quit [Quit: leaving]
admich1 has quit [Remote host closed the connection]
admich1 has joined #commonlisp
admich1 has quit [Ping timeout: 276 seconds]