libera/#commonlisp - IRC Chatlog
Search
4:13:11
doulos05
Or Clack/Lack for that matter (That might have the answer). I need to include Single Sign On with Google (based on OAuth2) in an app. I've found clath, which looks like what I need.
4:13:51
doulos05
But I can't figure out where in the caveman2:make-package skeleton, I should put the call to `(clath:component "127.0.0.1") that I see in the documentation.
4:15:01
doulos05
I've tried everywhere that seems obvious to me. lack:builder call in app.lisp, the start function in main.lisp, right after the *web* variable is instantiated in web.lisp...
5:43:59
doulos05
Nevermind, I have found an error in the documentation for clath and will be submitting a pull request. The endpoint to verify clath is working is *server-url*/clath/login/, not *server-ulr*/clath/login
9:45:19
aeth
It predates :keywords? Either that or because at one point you'd have to have specified your &key arguments with :keywords like that
12:31:06
nij-
Why do we say that handler-case unwind everything (worse), but handler-bind is able to preserve the stack?
12:31:23
nij-
This is the example i'm looking at. It seems that they are doing pretty similar things: https://bpa.st/3XAQ
12:32:48
nij-
Yeah my question is .. why is it so, given that they seem to do pretty similar things in the examples I gave.
12:33:39
jackdaniel
nij-: in handler-bind handlers you have access to the dynamic context of the error
12:34:05
jackdaniel
i.e special variable dynamic values may differ, the call stack may be different etc
12:34:32
jackdaniel
handler-case serves another purpose (and may be implemented in terms of handler-bind)
12:35:58
jackdaniel
what do you think about a function name fearless-handler ? a handler that always invokes the restart "continue" when present
12:38:12
Nilby
jackdaniel: having sufferd from having some accidentally fearless handlers, i can say you'll likely spend a lot of time back at top-level without much clue why
12:39:59
jackdaniel
Nilby: I wouldn't put it in the code; I'm tinkering with the bootstrap environment (there is no debugger available then, so it is either _ecl_unrecoverable_error(c); or cl_funcall(1, continuation);
12:43:51
jackdaniel
also if you are clever enough, you don't need to cons a function for the handler body
12:44:14
Nilby
handler-case saves you the step of having to do some restart/return if that's what you want
12:44:51
jackdaniel
I have a macro in my toy utilities handler-case* that executes the body in the dynamic context and only after that returns
12:44:56
Nilby
nij-: sometimes you might even want forms wrapped in both handler-bind and handler-case