4 ms·
Cider (the clojure plugin for emacs) has a variant that prompts you for the the values for those variables.
by synthc 5y ago
Cider (the clojure plugin for emacs) has a variant that prompts you for the the values for those variables.
- weavie 5y agoOh nice. That's one place where Clojure beats Common Lisp then..
- PuercoPop 5y agoDoes it? Asking for a value when encountering an unbound variable is a default restart $ sbcl This is SBCL 2.1.1.52.HEAD.321-f8a57bcca, an implementation of ANSI Common Lisp. More information about SBCL is available at <http://www.sbcl.org/>. SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. \* (\* x x) debugger invoked on a UNBOUND-VARIABLE in thread #<THREAD "main thread" RUNNING {1001860103}>: The variable X is unbound. Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE ] Retry using X. 1: [USE-VALUE ] Use specified value. 2: [STORE-VALUE] Set specified value and use it. 3: [ABORT ] Exit debugger, returning to top level. (SB-INT:SIMPLE-EVAL-IN-LEXENV X #<NULL-LEXENV>) 0] 2 Enter a form to be evaluated: 3 9 \*
- fiddlerwoaroof 5y agoYeah, in fact, Clojure needs special tooling for this, while it’s built into CL’s execution model.
- marciol 5y agoThis is interesting tool[1] that allows much the same with Clojure [1]: https://github.com/IGJoshua/farolero https://github.com/IGJoshua/farolero
- weavie 5y agoActually, yes I seem to remember it doing that a while ago. I think my Emacs setup has messed up somehow. Now I just get: Debugger entered--Lisp error: (void-variable k) And then a stack trace. No option for restarts. It works if I run from the command line though..
- eckesicle 5y agoWhich function is that? I couldn't find it in the docs
- utxaa 5y agohmmm ... what if it's a closure, and it depends on a huge lexical environment?