freenode/#sbcl - IRC Chatlog
Search
2:11:44
|3b|
(though arguably bad style for any code you share with others, since it affects everything loaded after it too)
2:13:51
lottaquestions_
That's right. One thing that really puzzled me about what stassats said was that one has to stop using the old code and start calling new code.
2:15:55
|3b|
it has no effect on existing code, so a running function won't be affected by recompiling that function. only calls made after the binding is changed will see the new code
2:15:57
lottaquestions_
so say I have a function called foo, that I recompile with C-u C-c C-c, how do I get to use the new version of foo instead of the old one? stassats seemed to be saying that there is a way of doing it
2:18:25
|3b|
just not always obvious what counts as "call it" in that case, for example inlined code doesn't get automatically recompiled, and function objects (for example returned from #' ) only see the specific code from when it was evaluated, not any code associated with that name later
2:20:17
|3b|
and code interrupted by debugger/stepper/etc continues executing the old code, though sounds like you got that part. restarting something higher on the stack usually works for that (when it is calling through the binding)
2:23:01
lottaquestions_
I already experienced the function objects issue :-), and had interesting results with restarting frames ie disappearing global variables
2:23:57
|3b|
yeah, debugger isn't perfect, so sometimes you have to just exit and start from top call
2:25:21
|3b|
restarting frames doesn't help much when there is external state (files, network, destructive modification of data structures, etc), since nothing restores that state
2:26:12
|3b|
(unless you write a bunch of magic unwind-protect code to simulate transactions or something, but even that probably wouldn't help with network code)
13:06:18
flip214
Krystof: https://github.com/phmarek/yason/issues/48 strange coincidence, isn't it? Please talk to each other, though I suspect this is just an alias of you ;)