Announcing ReplMaker.jl a simple little tool to bypass the headache of implementing your own REPL mode for your pet DSL or full language. This package is BYOP (Bring Your Own Parser).
Nice! This is definitely going in my Julia toolbelt…
However, I can’t be the only one who worries about the potential unbounded proliferation of Julia REPL modes? I wonder if there should be a mechanism to detect when one starts using
a package with a REPL mode that conflicts with an existing package in scope? And would this be something to go in Core? Or this library?
Finally, I’ve been thinking for a while about some sort of more generic multi-REPL-mode-select mechanism. For example, what if you could enter >
at the default REPL prompt and be presented with a simple menu of all the REPL modes currently installed?
@jballanc Good points! Perhaps it’d be a good default to hide all the repl modes behind a Terminal Menu and then if someone really needs a repl mode that they can access with just one button press instead of two, we can support that.
I think detecting conflicts wouldn’t be too bad. I could just look and see if the current repl keymap has any overlap with the keymap I’m merging it with and flash a warning if there is any overlap.
Edit: I implemented a simple warning whenever initrepl
overwrites a special key. The menu interface will require a bit more thought.
Okay, I have made the package compatible with both 0.7 and 0.6 and made some minor tweaks. I’ll work on trying to submit to Metadata soon.
ReplMaker.jl is now tagged and available from METADATA! It’s just one ]add ReplMaker
away!