Rich_Morin

Rich_Morin

I just finished reading Hell Is Other REPLs in Colin Okay’s SAVE-LISP-OR-DIE series. It’s an interesting look at Common Lisp, with perceptive comparisons to various other languages.

The article closes with this summary, making me wonder how IEx compares to the Common Lisp REPL:

… true interactive development is programming such that

  1. your program never crashes
  2. because it enters an interactive debugger
  3. where you never lose program state
  4. unless you choose to do so
  5. after a thorough inspection of state
  6. including the call stack
  7. and after you have tinkered, recompiled functions, and edited objects
  8. and after you have tried restarting the computation
  9. all while the live program is running, possibly remotely.

AFAIK, IEx supports most (if not all) of this. However, I don’t feel qualified to make a detailed assessment. I’d also be interested to hear folks’ thoughts on REPL capabilities and features that the list doesn’t mention.

Would anyone like to offer some clues and/or comments?

Showing Posts 1 to 8

marciol

marciol

One thing I miss from Ruby is something like Ruby Pry Rescue

There is an awesome presentation, and at this point, he explains how you can use it to just catch any error and fix it dynamically, as one can do in CL.

crispinb

crispinb

Having played with Clojure enough last year to be mildly dangerous (as I am now with Elixir!), the biggest thing which jumps out at me is more tool ergonomics than fundamentals. The Clojure REPL (similarly to other LISPS) is typically linked directly to your editor, such that you can hit a keystroke and instantly eval any changes into the running application, with output into the editor buffer (either as a transient overlay for info, or to a comment for further use). It’s hard to explain how smoothly interactive this makes the development process feel.

mattmower

mattmower

I really missed this coming to Elixir. I’m not sure if it just hasn’t been implement yet or if there’s something about Elixir/BEAM that precludes it.

crispinb

crispinb

I don’t know either, but if you look at the scope of nRepl, CIDER etc, it’s a lot of work!

ityonemo

ityonemo

The up arrow should remember multiline input for goodness sake.

Go use Julia, and type this:

julia> function add(x, y)
   x - y
end
julia> add(4, 3)

Now, go back and edit the add function to fix it. It’s straightforward.

It is not so in elixir (or python, or ruby, so we’re not alone but that is no excuse to not do better).

Also, I kind of want naked functions in the repl context. That’s probably too much to ask but it could be done by having a “IEx.Repl” module that is “imported” into the context and the def macro in the IEx scope triggers a recompilation of this module

Rich_Morin

Rich_Morin OP

I’m happy to see that we’re getting some interesting suggestions. Assuming that nobody brings up any show-stopper objections, please consider turning these ideas into formal issues for IEx.

StephanLehmke

StephanLehmke

Elixir interaction mode for emacs would certainly be appreciated.

I never ever used the native shell of any programming language if there was a corresponding emacs mode available.

Oops – there seems to be Alchemist, so I’ll check that out…

cjbottaro

cjbottaro

That would be so awesome. I work around it by using clipboard history/manager.

I’m super glad they recently allowed pipelining without requiring parens.

If we’re making requests, I would like a dynamic prompt. Seems easy to allow an anonymous function as a prompt, rather than an interpolated string. Use case is we have a multi-tenanted app and it would be nice to see what tenant you’re set to in the prompt:

iex(1)> Tenant.set("foo")
iex(1)[foo]> Tenant.set("bar")
iex(1)[bar]> 
— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews