Distel is a fairly fancy Erlang IDE implemented in Emacs. Homepage at http://www.bluetail.com/~luke/. This is a BragAboutMyFunHack? page :-)
The name comes from "Distributed Emacs Lisp." Distel's core is an extension of EmacsLisp to support a large subset of the Erlang programming model: processes, pattern matching, and distribution. This makes Emacs act as an Erlang node, participating in distributed message-passing with real Erlang nodes, which makes it very easy and natural for Erlang and EmacsLisp programs to interact. Since EmacsLisp is, like other Lisps, a ProgrammableProgrammingLanguage?, the Erlang-like language extensions are implemented simply with Lisp functions and macros.
This core makes it easy to write EmacsLisp programs that talk with Erlang nodes, and we've implemented an IntegratedDevelopmentEnvironment in this way. The current features, mostly based on Emacs's amazing facilities for developing EmacsLisp programs, are:
- Finding function definitions. This lets you jump from a function call in a source file to the definition of the function being called. It is very similar to the Emacs TAGS feature, but doesn't required a TAGS file. To find the source, it uses the "reflective" capabilities of an Erlang node to find out where a function is implemented.
- Completion of module and function names. Type a partial module or function name, press M-TAB, and it will be completed (if unique), or a list of possible completions will be displayed.
- Code evaluation. You can enter an Erlang expression from the minibuffer, have it evaluated on an Erlang node, and see the result.
- Online Documentation. Distel quickly builds and caches a heuristic database of documentation for all Erlang functions. You can query this database with Elisp-style describe and apropos commands.
- Refactoring. Distel has one refactoring command that takes an expression inside a function and refactors it as a sub-function. The argument list is automatically generated by analysing the expression to see which variables become free.
- Process manager. Shows a 'top'-style listing of all Erlang processes running in a particular node, and lets you inspect, trace, or kill them.
- Debugger. Lets you turn on debugging for particular modules and set breakpoints from regular Emacs source buffers. Also supports single-stepping particular debugged Erlang processes from Emacs.
- Interactive sessions. An Erlang version of Emacs Lisp Interaction buffers, where you can enter Erlang expressions or function definitions and have them evaluated. This is closer to a Lisp RePl? than the standard Erlang shell.
- Profiler. Painless support for having an arbitrary expression profiled, and inspecting the results.
Distel is now a
can't-live-without for me, and it has attracted some cool people to make serious extensions. It's also the program that I'm personally most proud of. Tremendous fun. --
LukeGorrie
Quick links to some documents on the homepage:
I had some fun presenting it at the conference with a home made slideware program / markup language. For laughs, here is the front slide: