Message Boards Message Boards

OpenSource Notebook Interface with JavaScript

Posted 1 year ago
POSTED BY: Kirill Belov
15 Replies
Posted 4 months ago

Wolfram should buy this from you, or hire you to do design.

POSTED BY: Josh H

Thank you for your flowers ❤️ We are still quite far from Mathematica and limited in dynamics (actually using completely different architecture). I believe we could be just another branch focused on symbolics, syntax sugar, portability and dynamic evaluation in a family of tools like Jupyter, Pluto (Julia), Observable and etc.

Most probably, devs of Mathematica also don't really like JS ;D

Kirill and I are big fans of ideas behind Wolfram Language and aim to make it more accessible and affordable outside the Wolfram ecosystem. Like I am using WLJS almost everyday in teaching duties and so far it works really well. It runs somewhere on my server and I just connect it from any outdated PC in a lab using a browser and show students real-time simulations like this one ;)

enter image description here

POSTED BY: Kirill Vasin
Posted 4 months ago

Why did you decide to make a new frontend instead of working on the official Jupyter extension? That would have wider appeal, I'm not sure I can get IT to approve installing something like this, as great as it looks.

POSTED BY: Josh H

We tried in a past. It comes with many limitations, which kill the whole purpose

  • uneditable output cells
  • no syntax sugar possible or 2D math input (we rely on customized CodeMirror 6 editor with a lot of supporting structures to make as fast as possible)
  • a huge overhead from ZMQ protocol used typically in Jupyter Kernels. We would not be able to come even close to the speeds that we have now with a direct TCP link in dynamics.
  • we would need to support two systems instead of one (Python interpreter + Wolfram Engine)

We even run our own tiny Wolfram Language interpreter in Javascript to help with dynamics and user's input. It goes waaay beyond a simple extension and most probably API of Jupyter will never allow us to use this freedom.

In general you don't have to install anything. It works fine as a simple console application (clone a repo and hit wolframscript -f Scripts/start.wls), it won't change any files outside the project directory.

POSTED BY: Kirill Vasin

First, thank you for this question. It is an important one.

Do I know what I am talking about?

  • I have developed a few Jupyter packages in Python and Raku.

  • Those are "full featured" chatbooks, which I use everyday in different contexts.

  • Here is a comparison of Python, Raku, and WL on LLM functionalities that includes chatbooks.

Deficiencies of Jupyter

  • For a long time Jupyter notebooks were clunky and buggy.
  • Many of the user experience designs for Jupyter are questionable.
    • Some sort of "vi mode" is employed!!
  • It is not trivial to make magic cells with different types of output.
  • There is no reliable way to make JavaScript graphics display in Jupyter notebooks.
    • Certain hacks are used and they do not always work.
  • I tried to develop further Wolfram Language Jupyter Kernel without much success.
    • This a personal point of view, of course.
    • After studying the code, I decided it is not worth my time to change or develop it further.

On WLJS

  • If you are going to use a "web-browser" solution, it should be better if it is "directly" based on JavaScript.
  • Jupyter itself has JavaScript roots: a fundamental design decision is to use JSON.
    • Similar to the use of M-expressions by Mathematica notebooks.
  • A front end programmed in JavaScript gives much more "immediate" interactive functionalities.
    • Including graphics, Manipulate-like interfaces, Dataset, etc.
  • Please see the response by Kirill Vasin above.
    • He provides details I do not need to summarize or spell out here.
    • And yes, ZeroMQ is great, but it has a fair amount of "small difficulties" in all programming languages I used it with.
      • (Python, R, Raku, Swift, WL.)
POSTED BY: Anton Antonov
Posted 5 months ago

How difficult would it be to interface this front-end with Mathics?

POSTED BY: Mma Usr
Posted 5 months ago

Hi! It will most likely be impossible to run this entirely on Mathics, as in its current form, Mathics lacks many of the critical features to run the server. But, Mathics can be plugged in quite easily as a separate kernel with its own cell type. Then you will have both Mathics and WL in one notebook at the same time

POSTED BY: Kirill Belov
Posted 1 year ago

We have a new release with support for displaying new types of charts and tables, the ability to connect to a stung server and a transparent theme! I'll post details here soon!enter image description here

POSTED BY: Kirill Belov

Lots of moving parts in that notebook solution!

Here is a corresponding image (can be generated with the attached notebook):

enter image description here

Attachments:
POSTED BY: Anton Antonov
Posted 1 year ago

As far as I understand, these wolfs and rams are trying to read the documentation for the Integrate function =D

POSTED BY: Kirill Belov

Well, most likely verifying Integrate's integration rules...

POSTED BY: Anton Antonov

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Posted 1 year ago
POSTED BY: Kirill Belov
POSTED BY: Kirill Vasin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract