Closed JerryI closed 8 months ago
Do you mean like selecting text in the wolfram documentation or on stackexchange right clicking on the selected text and selecting evaluate wolfram code
from the right click menu? Injecting javascript from a server into a page sounds like something a web extension could do but I am not sure. I never built a web extension.
I was thinking publishing notebooks as HTML files or React components (or any other way) like one can do now, but bringing possibility to evaluate cells in the notebook using websockets, connected to the locally running Wolfram Kernel.
Imagine, you wrote a blog with an inset of some of your calculations or whatever. In general user can see the static data, plots (sometimes can even drag sliders and etc). Then, on attempt to do something with those cells a website uses so-called custom url protocol (file://, vscode://, mailto:// ...). Most apps uses it to send a mail to the corresponding email address, when a user click on link or opens a VSCode or some messenger app you have or AppStore or Windows Store, so it is quite common nowadays. But now, we will register a custom url protocol used to open a wolframscript
session with a single file, that will run a local server and will attach to the webpage you are looking at. Therefore, you can run cells, see the result, while actual page is hosted somewhere else and the provider doest even know anything about what you are doing. Because all magic is done in a preloaded static HTML page with javascript running on its side. No extensions needed, just a page with and a single link that kicks a wolframscript
.
So just to check out someone's work, you just need to open a page with it, press Shift-Enter and see the results.
The problem is to register this protocol, however, since now I am shipping frontend as real executable desktop app, It won't be a problem to do all this stuff during the installation procedure.
I've seen something similar with python code pages a long time ago. But since it is an open-source thing, they recently managed to recompile an entire Python interpreter to run it inside a browser (webassembly). But, it's a different story ;)
However, you idea will also be possible with a sort of extension, that needs to be written (that's might be a problem). You are right.
Cool I see so it's for sharing notebooks made with the app and uploaded to the web like maybe kind of like how you would share an interactive Jupyter book https://jupyterbook.org/en/stable/interactive/interactive.html or the wolfram web demos https://demonstrations.wolfram.com/ but for an entire notebook without using wolfram cloud with its limitations on how much resources you can use (If I remember correctly). That could indeed be nice for collaborations.
Yes, something like this. In principle one can also already run everything in a browser using wljs-interpreter . However, it does support only numerical computations and quite limited. Only if one can write a transpiler (compiler) from pure WL code to it, but it is very cumbersome task and requires tons of work.
Probably the future autonomous language models will be able to translate from the Wolfram Language to your syntax with a few examples of the intended syntax, documentation, and tests that they can generate and try (probably will need to be multimodal with vision). People can then tweak to their liking.
The translation task with expected outputs sounds straight forward enough that an upgrade to Open AI's code interpreter with added vision might be able to do it with a few examples of the intended outputs (although the costs for analysing images and repeated debugging might be significant).
I still plan on working on implementing some graph related functions but I am not sure if I should wait as the code seems to be unstable at the moment and I might loose time trying to understand the current code.
I still plan on working on implementing some graph related functions but I am not sure if I should wait as the code seems to be unstable at the moment and I might loose time trying to understand the current code.
The GUI for plugins management is almost ready, the tutorial will come shortly after. So it is isolated system with its API, you actually do not need to know how it works inside to write plugins / whatever
The original idea was suggested by one of the developers - @KirillBelovTest
.html
or whatever web format (already done)wolframscript
installed (or frontend)urlprotocol
to connect to the Kernel using secure websockets