5 ms·
Matlab has a nice sort-of-repl feature which I miss in every other language: you can separate the code in a file into several blocks and then execute the curren
by yoodenvranx 9y ago
Matlab has a nice sort-of-repl feature which I miss in every other language: you can separate the code in a file into several blocks and then execute the current block (the one with which contained the cursor) with ctrl+enter. With this feature you still have the full text editing capabilities but you also have a flexibility you get from a repl.
- mclehman 9y agoLisp + Emacs + SLIME: miss no longer. Picking them all up is a tall order though.
- taeric 9y agoWhat do you mean with "picking them all up?"
- _mhr_ 9y agoThey mean the learning curve is steep.
- taeric 9y agoAh, fair enough. The nice thing is most repl's have the same bindings as each other. So, some basic drills can get you up to speed.
- pklausler 9y agoA "steep learning curve" actually means that the amount learnt grows rapidly over time. It's odd how this basically obvious conceptualization has had its meaning inverted in popular usage.
- taeric 9y agoThis is one of my pet peeves, as well. Though I have moved on. Colloquially, it is clear how folks take that saying. Just transpose the chart if it helps you think about it. That is, it may have originated with that meaning. But it is far from unique in having the general meaning shifted with use.
- pjmlp 9y agoEmacs suffers from not being like Lisp machines REPL, meaning lacking graphical display on buffers. If I remember correctly, XEmacs used to support it (which was my favorite fork), but it seems to have faded away. For example, try to achieve this demo on Emacs. https://www.youtube.com/watch?v=o4-YnLpLgtk https://www.youtube.com/watch?v=o4-YnLpLgtk
- abhirag 9y agoI have never used a Lisp Machine so forgive my naivety but I saw the demo and you seem to be referring to the ability of displaying images inline in a buffer. Emacs can definitely do that, I have used Emacs IPython Notebook[1] which is a REPL supporting this. I could fire up a jupyter notebook and use pillow[2] to recreate the image manipulation part of the demo. [1] -- (https://github.com/millejoh/emacs-ipython-notebook/blob/master/README.rst https://github.com/millejoh/emacs-ipython-notebook/blob/mast...) [2] -- (https://python-pillow.org/ https://python-pillow.org/)
- pjmlp 9y agoThat is partially what I was referring to. The other part, which might not be visible on that video is the integration of debugger into the REPL, and the ability to redo a piece of code after breaking into the debugger and fixing it. So you can do something like, REPL => error (ask to start debugger) => track down and fix error => restart error expression => finish the execution of the original REPL expression with the respective result.
- abhirag 9y agoThe only debugging experience I find enjoyable in Emacs is debugging Clojure using cider[1] and I think it comes close to what you are describing but I think you might already be aware of that :) [1] -- (https://github.com/clojure-emacs/cider/blob/master/doc/debugging.md https://github.com/clojure-emacs/cider/blob/master/doc/debug...)
- bitwize 9y agoSLIME doesn't give you this?
- abhirag 9y agoYou seem to be using SublimeText, check out SublimeREPL extension[https://github.com/wuub/SublimeREPL/blob/master/README.md https://github.com/wuub/SublimeREPL/blob/master/README.md]. Once setup you'll be able to evaluate code blocks in a running REPL :) Also, Emacs modes of most languages with REPLs will have this functionality inbuilt.
- jhgb 9y agoLisp buffers? Smalltalk workspaces? Is this capability any different from those?
- blt 9y agoMatlab's REPL experience is great. It satisfies almost all of the "what makes a good REPL" and "what makes a programming language REPL-friendly" criteria in the article. Having a full featured plotting library available to inspect intermediate values when debugging is amazing.
- auggierose 9y agoI guess Mathematica has the most advanced interface in that respect. That's what inspired all the other repls like Jupyter.
- bitwize 9y agoMost Lisp modes for Emacs have an eval-sexpr-at-point command which allows you to send the current sexpr to the REPL. This is in SLIME for CL but even the most basic Scheme mode has it as well.
- _pmf_ 9y agoClojure's Emacs REPL also has this; it's strange that the article does not mention it, but talks about copying back and forth between REPL and suorce, which I consider a antipattern and really ugly workflow.
- jasonm23 9y agoEmacs can do this with Ruby, Python... Hell, you can get it to eval buffer, region, line with anything that'll accept input and return a useful output. The ease at which one can get any language (or I/O machine) to play along with this workflow in Emacs is astonishing.
- suraj 9y agoJupyter[1] lifted this feature from Matlab & made it work with any kernel. [1]: http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Running%20Code.html http://jupyter-notebook.readthedocs.io/en/latest/examples/No...
- pedrosorio 9y agoI believe it was inspired by Mathematica which created the concept of notebooks with cells backed by a kernel in 1988: https://en.wikipedia.org/wiki/Wolfram_Mathematica#The_Notebook_interface https://en.wikipedia.org/wiki/Wolfram_Mathematica#The_Notebo...