(deleted 5 paragraph dismissive rant until I found out that this is part of a project for tools for STEM education, i.e. this is meant for educational samples only) I think it's rather important to look at it with that in mind.
Yes - STEM is a primary focus of Blabr. In fact, an initial application we had in mind was to convert interactive Excel spreadsheets from the Space Math @ NASA website (http://spacemath.gsfc.nasa.gov). We have several examples here: http://spacemath.github.io. These are all for educational purposes.
The advantage for students is that they can view the modules directly in a browser (desktop, Chromebook, iPad, etc.), and interact with the modules immediately. No need to download spreadsheet documents that require compatible spreadsheet software.
However, we also see Blabr as a candidate in other science/engineering areas. For example, these blabs are for phase locked loop design:
We think so, too. Here's an example of a blab gallery based on modules from the popular Space Math @ NASA educational website: http://spacemath.github.io
We would love to work with educators to create interactive blab galleries for math and science.
Wonderful. I really like the idea of being able to deliver some interactive analysis, there's a huge amount of value I think in being able to let someone tinker a little bit with a threshold & explore things in a controlled way.
Something I particularly like is that because it works in a browser I guess I could package it up as a single HTML file if I wanted and anyone could open it, or at least hosting becomes just "put the files somewhere" rather than running a server & backend code.
Thank you. Easily setting up "tunable" parameters (e.g., sliders) in a computation was a key requirement for Blabr.
For example, it is very instructive/insightful to adjust the variable k in this compressive sensing blab to see the abrupt transition between sparsity and non-sparsity: http://blabr.io/?e8a066234715f21c21fd
Regarding packaging a blab: yes, it's very simple to share a blab on the web. After editing the blab, just click "Save" at the top right. This will save the blab to a Github Gist. You'll then get a link to the blab, like the one above (for the compressive sensing blab). Share the link with anyone. There are two ways to save a blab:
1. Anonymous Gist - easiest way, no need for GitHub account, but no revision control (new gist for each save).
2. Gist under your GitHub username - full revision control (gist revision each time you edit and save your blab); can make gist public or private.
Short answer: yes. Long answer: any javascript library (plotting or otherwise) can potentially be used within blabr by creating a "widget" [0]. (Although the API for creating your own widgets is under construction.) For example, [1] extends the built-in plot function (both based on flot [2]). We already use d3.js, so I am sure we could create a widget for xkcd plots based on [3] (say).
Nice website. Are you executing the code on the client or server? We are both instructors and have been working on a similar tool to help our students learn MATLAB, React, React Router, MongoDB, and Babel-ES6. It has worked really well for our students. Check it out: https://SaturnAPI.com
We'd love to collaborate or exchange ideas. If you are interested, feel free to email me at panthongw@gmail.com.
As somebody who has to deal with spreadsheets every day and hates that workflow, I really appreciate the initiative.
That said, I would like to see a more clear explanation of what is the use case. Scientific computing is a too general term. In other words, when should I consider blabr? How does it compare with a spreadsheet or a real programming language? Also important: when should I NOT use blabr?
Thanks for this great question. To answer it, a good place to start is with why we wanted to build Blabr.
Some months ago, we were working with interactive spreadsheets from the Space Math @ NASA website: http://spacemath.gsfc.nasa.gov/ILabs.html. These are all Excel spreadsheets, with interactive 'sliders' that let students experiment with a variety of mathematical models for planetary structure, heat flow and rotation among other modeled properties.
The author of the spreadsheets (Dr Sten Odenwald, NASA) wanted to create online versions of these modules. He wanted a way for students to easily access and interact with the modules directly in a browser, on a range of devices used in today's classrooms (e.g., Chromebook, iPad). Using Google Docs (Sheets) was a possibility, but it didn't have support for the kind of sliders and plots that the modules required.
But there was a more fundamental issue with spreadsheets: it's hard to understand the math. Mathematical formulas are cryptic because they (usually) use cell references, and are buried behind the results in cells. Consider, for example, the Excel file for the module "Basic Properties of Mars as a Planetary Body" (ILab11marsmodel.xlsx on the ILabs page above). It includes this formula for modeled center distance:
=($J$5+$J$8*COS(6.242*(B8+16)/$J$11))
It isn't straightforward to understand the math behind that computation. And for the Space Math educational spreadsheets, math is a key part of the learning.
Something like this would be clearer:
m = r + a*cos(6.242*(t+16)/p)
where
r = slider "radius"
a = slider "amplitude"
p = slider "orbital-period"
and t is a specified time vector (array).
Note also that m is a vector dependent on the time vector t. In the Excel spreadsheet, this is accomplished by:
1. specifying t values (17 of them) in column B.
2. specifying the formula in a cell of another column.
3. copying the formula (16 times) in the new column.
But how does the student know that the formula is the same for each row? That's very tedious to do by inspection. Typically, you look at the copied formulas and--based on a quick perusal of formulas and cell references--you assume that they are all the same formula. But this can be dangerous. We found that sometimes the formulas do differ as you move down a column. But what's worse, sometimes that's what the spreadsheet author intended, and other times it's a bug! For example, the spreadsheet author might have edited a formula and forgotten to copy it over all cells in a column.
We felt that there's got to be a better way for these kinds of science/engineering/math spreadsheets. And that was the focus of the Blabr design. For the Mars spreadsheet, here's the blab equivalent we came up with: http://blabr.io/?3df6e2368e89a8c3f780. (More examples: http://spacemath.github.io) The math is much easier to follow than it is in the Excel spreadsheet. Moreover, a vector formula is specified in one place, rather than copied across a column of cells.
In summary, we'd say that the following are reasonable criteria for using Blabr, rather than using a spreadsheet:
1. You want to create an online, interactive computational worksheet (web page) with sliders, tables, and plots.
2. A key focus of the worksheet is the math itself. You want the math to be easy to follow, and to edit.
These are typical criteria for a range of scientific computing applications (especially for education and mathematical modeling), which is why we're focusing Blabr (for now) on the notion of "scientific computing for the web".
Clearly there will be many use cases where a spreadsheet is more suitable than a blab. We'll give that part of the question more thought, and reply soon.
Thank you very much for a very detailed answer. It is much clearer to me what are the strengths of the project now.
Something I wonder is if there are any plans to make blabs capable of dealing with the heavy computations needed in scientific applications (obviously using some sort of FFI or external solvers), or are they only intended for "interactive exploration"?
I don't see Blabr as a tool for problems that take a long time to run.
On the other hand, that doesn't mean that we can only aspire to minor problems in the browser. For instance, [0] solves a famous nonlinear PDE (which was a heavy computation not that long ago).
So, yes, Blabr is for "interactive exploration". But, I believe that allows a large (and increasing) range of interesting problems.
Blabr currently supports pasting a string of values (space-separated, or comma+space-separated) into a table column. (Conversely, if you copy a table column to the clipboard, its values are stored in the clipboard as a comma+space-separated string.) We plan to expand this functionality to support other import/export formats, including CSV and JSON.
That demo was really nice to watch! One thing though, why does the "output" textarea show a list of values for kxx, (the y = kxx line early in) however when you make the table that dynamically computes values (editable cells table), you get a numeric result? Am I missing something here?
Edit the first column (x) and you see both x and y (x*x) displayed in the computation eval box. Down arrow in the last cell extends the table. Backspace in an empty cell removes the row.
Currently, no. But this is our #1 priority. We're aiming for a simple embedding solution, e.g., 1) an html div with gist id attribute (plus loading a JavaScript file); and 2) a WordPress plugin. Stay tuned...
Great approach to a problem. I'd like to see more tools like this. Is it open source? Can I suggest you to support double screen so that the results is always visible?
I recently went went public with something similar - www.cadwolf.com
Mine is similar in that it does math in the browser. However, the goal of cadwolf is to do math and documentation on the browser and remove the need for the user to know a programming language.
I really like what you guys did, but why would someone use blabr to run coffeescript instead of just running their own program? What is the use case outside of a learning tool?
Also, I would love to know what you think of cadwolf.
Thanks! Please try the "Fork" link at the bottom of a blab. You can either save as a public gist or (with a token from GitHub) a private gist. We have some ideas about merging forks, but nothing concrete yet.