Announcing Elm Notebook, version 2

Elm Notebook V2

I’d like to announce a new version of Elm Notebook (see screenshot below), now available at https://elm-notebook.org .

Elm Notebook operates by talking to the Elm compiler. The Welcome document in the Public docs tab (sidebar, upper right) gives some operating instructions, and the Packages document talks about how to install and use packages. These links will open up the notebooks in guest mode, so you can experiment with but not create you own notebooks. But you can edit, run, and save cells however you wish. Changes to these documents will not be saved, so you can go wild with them.

There is more work to be done on Elm Notebook, but I though that that work would progress faster if I posted it now so as to benefit from your collective suggestions and bug reports.

One hope I have for Elm Notebook is for it to be used in teaching and learning, including studying (and experimenting) on your own. Here are some sample public notebooks towards that end:

If you just want to see if the notebooks work, click on the red Run all cells button in the
header of Elm Notebook. If you run into trouble, please let me know.

I hope that many of you will write your own notebooks and share them with others by making them public. Just click on the private/public button in the footer, right-hand side.

I would like to thank Evan Czaplicki and Mario Rogic for their help with this project. Also thanks to Martin Stewart, who helped me squash several rounds of bugs, oversights, and bad choices.

Note. I’ve changed the way error messages are handled (see image below).

PS. I am thinking about additional features, e.g. being able to play with code that renders SVG or that runs small simulations. Version 1 of elm-notebook had these features, albeit in somewhat clunky form. My plan, however, is to get the strictly REPL part of version 2 perfected first._

29 Likes

Great job! Looking forward to see more. Are you able to reveal what is your main focus right now, like when you mention “getting the REPL part perfected”? Also do you have strong opinions on the UI or can we suggest or make changes?

Please do make suggestions!

Re main focus, I just want to get any bugs that surface, UI issues, etc. worked out before trying to implement new stuff — little min-apps to present graphics, do small simulations, and so forth

After opening a cell, and hovering over a menu item on the far left, the tooltip is hidden.

Just wanted to say that this is still very much a work in progress. Especially regarding error messages, which need improving.

I welcome all suggestions, and I particularly welcome bug reports.

– Jim

2 Likes

I tried the binary tree book. When I press clone, it says “Sorry can’t get that notebook”. The message does not explain anything really and does not suggest any course of action.

Since I’ve used similar things for Python, I think this is really exciting . Keep pushing !

Hi @perty , thanks for the feedback and the encouragement. I suspect that you were signed in as “Guest.” Cloning won’t work in a guest account since such accounts can’t create or save notebooks. Could you try making an account and trying again?

(I should hide “Clone” in Guest mode. It is misleading to have it visible for Guests.)


Here is a test I just did after signing in as “plato”:

  1. I selected the Binary Tree notebook in the public tab and then looked at the footer, lower right-hand corner of app. Here is what I saw:
    Screenshot 2023-10-26 at 1.26.21 AM

  2. Pressed Clone, then got this:


    This indicates that plato has cloned jxxcarlson-binary-trees.

  3. Now I look at the “My Docs” tab:


    I (as user “plato”) find a notebook Binary Trees cloned from jxxcarlson-binary-trees.

I’ve put some directions on cloning notebooks in the Welcome document:

New Features

October 27, 2023

I’ve added a number of new features:

  1. Sidebar on the left: two existing buttons have been moved here and two new buttons have been added:

    • Duplicate – makes a copy of the current notebook
    • Commands – a CLI interface. Currently limited removeCells a b. This will permanently remove all cells in the range a to b inclusive.
  2. You can now put a directive like @include jxxcarlson-parser-separatedby in another notebook. This directive will cause all type, type alias definitions, and declarations in the notebook referenced by jxxcarlson-parser-separatedby to be loaded into the current notebook. In the example below, the functions separatedBy and comma are defined outside the current notebook.

Addendum.. I’ve also added a comment/uncomment button which makes it easy to comment or uncomment cell text. You will see this button when you open a cell to edit it.

There can be more than on @include directive in a notebook, and these can appear anywhere. See, for example this notebook.

1 Like

Nope. I created an account but still get the same error message “Sorry, couldn’t get that notebook (1)”

Also, I noted that when you’re a guest, there’s a label “Sign in as Guest” and a button “Sign out as guest”.

Thanks for the update. I was able to duplicate the misbehavior with the binary trees notebook and have pushed what should be a fix. Could you let me know the results?

I will fix the guest problem as soon as I can … heading out now.

Clone worked now. But the sign-in, sign-up, sign-out deserves an overhaul.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.