3 ms·
Ask HN: What are some well-designed REPLs?
I am designing a DSL and a REPL, and am looking for some inspiration.
CLI or embedded in editor, I don’t mind either.
- denvaar 3y agoI don't know if it technically qualifies as a REPL[1], but I really enjoy Elixir's interactive console, IEx. What I like about it: - Tab completion (obviously). Not only for functions/modules/bindings that are in scope, but also when you're in a string and begin typing a path, it will complete the directory names and stuff. - You can type "h" before a module or function name to read the docs. Similarly, you can do the same with "t" to see type information. - History of what you've executed, and also a reverse history search feature. - Not fully "readline compatible", but some basic, standard key bindings work. - Plenty of handy helper functions.[2] [1] https://ferd.ca/repl-a-bit-more-and-less-than-that.html https://ferd.ca/repl-a-bit-more-and-less-than-that.html [2] https://hexdocs.pm/iex/1.13/IEx.Helpers.html https://hexdocs.pm/iex/1.13/IEx.Helpers.html
- stop50 3y agoI like bpython. An extension of pythons repl
- uticus 3y agoRuby's IRB has always been nice to work with: https://github.com/ruby/irb#commands https://github.com/ruby/irb#commands Of course LISP is the example to look at with REPL: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop#Lisp_specifics https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93prin... ...esp with Emacs: https://slime.common-lisp.dev/ https://slime.common-lisp.dev/