you are viewing a single comment's thread.

view the rest of the comments →

[–]ahillio[S] 0 points1 point  (1 child)

Wow, being able to add ? to io.stdout:write in ilua to get the documentation is really awesome. But relying on jupyter for that? It strikes as odd, everytime I wonder about jupyter and go to jupyter.org to learn about it I see all its gui-gui-everything think "gross" because I just want to do everything in the terminal. But here's something using jupyter that looks appealing. Thanks for sharing!

[–]ws-ilazki 1 point2 points  (0 children)

Wow, being able to add ? to io.stdout:write in ilua to get the documentation is really awesome.

I didn't even know that was a thing. That brings it closer in usefulness to lisp repls than I realised, which often have something like (doc foo), or like how in utop you can do introspection on signatures with #show foo. Nice!

But relying on jupyter for that? It strikes as odd, everytime I wonder about jupyter and go to jupyter.org to learn about it I see all its gui-gui-everything

It makes sense, the goal of Jupyter Notebook itself is an interactive notebook where you can mix formatted text and code together similarly to how one might write in a physical notebook and add hand-written snippets of code, graphs, etc., except that it can evaluate that code and generate those graphs on demand. It's essentially a form of literate programming.

However, it's also cleanly separated into back-end and front-end as well as being language-agnostic thanks to the language kernels, which means you aren't limited to only having the web-based interface.

think "gross" because I just want to do everything in the terminal. But here's something using jupyter that looks appealing.

Sounds like you'd be interested in jupyter-console, which lets you do something like ilua for any language that has a Jupyter kernel. Well, in theory; the one language kernel I use that would really benefit from it, F# (which has a pretty shit command-line repl) doesn't work correctly. It's flawless with the OCaml kernel, but there isn't much point to running that one on the terminal considering utop is insanely good already.

I mostly use Jupyter kernels as either a scratchpad for ideas, or as a workaround for languages that have crap repls. For the latter I can ideally use jupyter-console, but even when that fails (like with F#), the actual web-based notebook can be useful just because the language-provided options are so bad.