freenode/#lisp - IRC Chatlog
Search
22:11:21
p_l
whartung: the crucial difference is that the stack is not unwound, so you don't have to do crazy things to checkpoint and restore state
22:21:12
stylewarning
whartung: The latter one is certainly used interactively, I forget if there are non-interactive invocations
22:21:48
stylewarning
whartung: most of these can be avoided if you can sufficiently pass data about decision-making up and down the call stack
22:24:05
sjl
I use them in my option parsing library. If the library parses command line options and sees an unknown option, it signals a condition and lets you choose between a number of different restarts if you're working interactively: https://github.com/sjl/adopt/blob/master/src/main.lisp#L362
22:24:31
sjl
But if you're writing a program that uses my option parser and want to just ignore unrecognized options, you can choose to invoke the restart programtically https://github.com/sjl/adopt/blob/master/src/main.lisp#L302
22:24:58
sjl
or choose the "treat as normal argument" restart programtically instead https://github.com/sjl/adopt/blob/master/src/main.lisp#L314
2:09:09
PuercoPope
Xach: Don't know if you are aware but https://www.xach.com/clhs has been returning 502 for the last few days. Its my goto search method when outside of Emacs.
4:00:13
fiddlerwoaroof
whartung: before I learned CL, I implemented restarts myself in Python to facilitate a major data migration from a schemaless database to one with a strictly enforced schema
4:00:48
fiddlerwoaroof
It saved me numerous cases of "wait half an hour for a crash to happen, change the code and wait half an hour to see if the fix worked"
4:01:56
fiddlerwoaroof
Although this was a semi-interactive situation: when there was an exception, I'd inspect the data, add a rule to handle it to a collection of rules and then restart the migration process which could now handle the new category of malformed data automatically.