5 ms·
The sibling comments seem to interpret your need in a lispy way! In IPython, you could use arrow keys to go back in history and then edit the code you want and
by behnamoh 3y ago
The sibling comments seem to interpret your need in a lispy way! In IPython, you could use arrow keys to go back in history and then edit the code you want and execute it. It seems you're saying that CL doesn't have this feature. But what the commenters say is you don't probably need this feature anyway because you can write the code you want in the editor and send it to REPL. Python's REPL has this feature too, but obviously it's not a "clean" approach because sometimes we just want to experiment with things and don't want to pollute the main code with these one-off expressions.
- kragen 3y agoi think it would be more accurate to gloss the sibling comments as saying that the place where lisps put this feature is in emacs rather than in ipython; that is, emacs is the lisp equivalent of ipython python's built-in repl also lacks the desired feature, and it's kind of a pain in the ass, but the ^o keybinding can go some distance to compensating for it; when you use ↑ or ^r to get back to a desired line in history that begins a multiline block, after editing it, type ^o instead of enter, and the next line will appear below. works in bash too, and it's super common in my experience to want to run multiple historical commands in sequence instead of just one jupyter notebook is maybe a better alternative to the emacs feature. darius bacon's halp provides a sort of notebook-like feature in emacs
- ryan-duve 3y agoI kind of figured I was approaching this wrong. If that approach was useful, I would have found someone already implemented it. One silly hangup I have is I am more comfortable in Vim than Emacs, and I am trying to isolate my learning to a language and not a language-plus-an-editor. This must be how people feel when I suggest they switch to Vim to make a certain workflow easier :-) My goal isn't really to get "IPythonButForCommonLisp", but to iteratively build up programs so I can quickly learn syntax. I'm going to go with the Slimv suggestion the next chance I get and see if that solves it. Instead of working in revisioned code, I'll probably just work in `Untitled.lisp` until I get the hang of things.