5 ms·
Help me understand what the page being rendered is doing. Is that like an interactive app you are serving for user input?
by RocketSyntax 5y ago
Help me understand what the page being rendered is doing. Is that like an interactive app you are serving for user input?
- qbasic_forever 5y agoIt's an observable notebook: https://observablehq.com/ https://observablehq.com/ Basically a notebook where you write JS code and see the results immediately rendered in the notebook. In this case it's being served locally instead of requiring you to use their service website. If you've ever used Jupyter or IPython this is very similar (code notebooks) but with some interesting changes in philosophy and more of a Javascript implementation instead of python. What might be tripping you up is that in this demo the observable notebook isn't showing the code cells, only the outputs. The code is in the editor on the left and the output on the right is the result of running the code as an observable notebook. In some ways it is like a simple interactive web app.
- Isthatablackgsd 5y agoIs that similar concept to Overleaf for LaTeX?
- kragen 5y agoLaTeX doesn't really support interactive data visualizations or reactive re-rendering, and it's a pretty difficult environment to do things like read a CSV data file and do a linear regression in. Observablehq is closer to Jupyter, Excel, R Studio, Octave, or Tk than LaTeX.
- Isthatablackgsd 5y agoI'm sorry that I didn't specify. What I meant of a "live WYSIWYG" like Overleaf compile tex on the fly. I hope I am clear of what I meant. Or I am misreading you?
- qbasic_forever 5y agoYeah that's the core idea with all code notebooks like Observable or Jupyter, etc. You get instant feedback and results right in the notebook. So you type some code, usually press a button to run, and instantly see the results right next to the code. It would be kind of like if your traditional IDE had a run button that compiled, ran, and dumped the output of your in development program as comments right below the lines you're editing.
- kragen 5y agoIt's kind of like that, but LaTeX compiles to an image you can print out on a sheet of paper. By contrast, in ObservableHQ, or in Gnumeric, you can make a reactive document that responds in real time to something like dragging a slider. https://observablehq.com/@kragen/plotting-with-a-slider https://observablehq.com/@kragen/plotting-with-a-slider is a really simple example, slightly tweaked from one of Mike Bostock's; you can drag the slider to change the parameters of the WebGL plot displayed below it. This gives you a much faster feedback loop than editing and recompiling in Overleaf. It's way more live than Overleaf. Also, the document lives at an URL and you can link to it with different parameters. So instead of just being a static document, it's a program that takes its input from the URL, interacts with the user, and lets the user save their work as a URL and send it to somebody else, like https://observablehq.com/@kragen/plotting-with-a-slider?f=sin%28sin%28x%20*%20%28sin%28y%29%20-%20cos%28x%20*%20omega%29%29%29%29%20-%20cos%28cos%28y%20*%20%281.0%2Fcos%28x%20*%20omega%29%20-%20sin%28y%29%29%29%29 https://observablehq.com/@kragen/plotting-with-a-slider?f=si... for example. And then, as I said, if you want to do a linear regression in LaTeX, you are going to be a very sad panda very soon, because it's possible.
- RocketSyntax 5y agoomg. i had no idea observable was js-focused. i always thought it was another R/python competitor.