freenode/#lisp - IRC Chatlog
Search
21:02:20
andreyorst`
can someone explain me the main difference between restart-case and restart-bind, besides that restart-bind is uded to implement the restart-case?
21:02:58
andreyorst`
Like I understand the difference between handler-bind and handler-case, but I can't gasp this for restart-case/bind
21:07:33
Bike
it's kind of the same thing. When a restart-bind restart returns nothing special happens, so invoke-restart returns, presumably into the condition handler it was called from.
21:07:48
Bike
whereas when a restart-case restart returns, control is transferred to the point of the restart-case.
21:10:28
andreyorst`
I'm implementing condition system for Lua, and I've already did restart-case, so now I'm unsure if I really need to add restart-bind as well, given that docs advice to use restart-case in almost every situation
21:11:34
Bike
i don't think i've ever seen restart-bind used in application code, but on the other hand i don't see any reason not to since you pretty much need it to implement restart-case anyway.
21:12:29
Bike
sure, and how'd you do it? if it's anything like how it's done in lisp, some kind of dynamic binding of restart functions
21:13:43
andreyorst`
yeah, I'm constructing fake dynamic scope at runtime with Lua tables, and do some trickery to turn errors into conditions that bubble up this fake dynamic scope stack
21:14:09
Bike
restart-bind is really very primitive. It pretty much just dynamically binds functions, like how flet lexically binds them.
21:15:58
andreyorst`
I have implemented restart-case, handler-bind, handler-case, ignore-errors, and unwind-protect
21:16:29
andreyorst`
and tried porting some examples from Common Lisp, it works exactly the same at the moment
21:18:12
andreyorst`
I've meant that when handler in handler-bind calls the invoke-restart I know where to transfer the control
21:19:07
andreyorst`
the trickiest part to implement was when handler inside handler bind itself signals the condition, I spent three days debugging C stack overflows :D
21:22:25
andreyorst`
Bike: thanks for explanations of restart-bind. I think I will leave it out for now
22:35:24
jackdaniel
jcowan: afair it was deliberely released to public domain by authors before ansi standard was accepted
22:36:01
jackdaniel
I think that this is described in detail on one of Kent Pitman website pages (don't remember which)
22:36:05
jcowan
Excellent. The Interlisp group wants to reformat it in Interlisp style now that Interlisp is moving toward ANS CL support.
22:40:02
jcowan
I know that Xach has it online in the original TeX at Github, and the same content is online as HTML at https://mr.gy/ansi-common-lisp
22:41:16
jackdaniel
you may also look for the cleaned up tex source - afair the repository is called clstandard-build on gitlab
22:41:40
jackdaniel
that said you my find it by accessing cvberry.com on internet archive (for some reason domain expired and the site is not up anymore)