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]
<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...
<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