[ANN] down.0.2.0 and omod.0.4.0

It’s my pleasure to announce new releases for down and omod which provide a nice ocaml toplevel user experience upgrade. Simply add to your .ocamlinit:

#use "down.top"
#use "omod.top" 

And enjoy all the benefits you can learn about in the down manual and in the omod tutorial.

These are mainly maintenance releases but if you ever thought that down was a bit slow when pasting code, it now (well for almost two years…) implements bracketed pastes. Thanks to @emillon for the reference.

Daniel


A big thanks to my donators.

14 Likes

So many years of using Unix terminals, and I only learnt about bracketed pastes escapes today. Thanks for that, @dbuenzli and @emillon!

2 Likes

Just so I understand the intent better, is this an alternative to utop?

The feature sets do not fully overlap.

For example as far as I know there’s nothing like omod (load libraries by mentioning the module you want to use rather the rembering the library name where it resides) in utop. But IIRC you can use omod with utop, at least there some detection here.

The completion in down is likely too primitive for a heavy toplevel user (it relies on ocp-index and doesn’t understand opens) but it makes the bare ocaml toplevel usable (in a slightly better way than rlwrap would), especially if you care about a clean environment – utop setups a bunch of system things which makes it difficult to interactively test some system code. The exact impact of down on ocaml’s environment is described here, basically a signal handler for SIGWINCH and set raw mode on stdin when it prompts you.

So I would rather say that it makes ocaml usable rather than being an alternative to utop.

7 Likes

Thanks @dbuenzli for this nice lightweight improvement to the toplevel! Now if only someone had some spare time to make it work on Windows… :slight_smile:

Nicolas

First step would be to describe the problems. I see no Windows issue in any of the repos.

Another thing I forgot to mention is that both should work with ocamlnat . Not sure whether an utopnat exists.

There is one now :slight_smile: Down does not work on Windows · Issue #34 · dbuenzli/down · GitHub

Cheers,
Nicolas

1 Like