Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/luphord/arithmepad

arithmepad is a JavaScript based web notebook than runs entirely in the browser
https://github.com/luphord/arithmepad

client-side javascript notebook

Last synced: 10 days ago
JSON representation

arithmepad is a JavaScript based web notebook than runs entirely in the browser

Awesome Lists containing this project

README

        

# DEPRECATION NOTICE
As of 2022, there is [JupyterLite](https://jupyterlite.readthedocs.io/en/latest/) and [Pyodide](https://github.com/pyodide/pyodide),
which give you a fully browser-based, backend-free scientific computing environment with tons of great packages available.
There is no more need for lowtech **arithmepad**, hence it is now **deprecated**.

# arithmepad

arithmepad is a JavaScript based web notebook than runs entirely in the
browser. There is no server side component. Look and feel as well as
behaviour has been heavily inspired and shamelessly copied from
[Jupyter Notebooks](https://jupyter.org/). Feel free to check out the hosted version on [arithmepad.vercel.app](https://arithmepad.vercel.app)
or one of these examples:

* [Geometric Brownian Motion](https://arithmepad.vercel.app/#Ly8gIWFyaXRobWVwYWQtcHJvcGVydGllcyB7InRpdGxlIjoiR2VvbWV0cmljIEJyb3duaWFuIE1vdGlvbiBFeGFtcGxlIn0KLy8gIWFyaXRobWVwYWQtY2VsbCB7ImNlbGxUeXBlIjoibWFya2Rvd24iLCJzaG93TGluZU51bWJlcnMiOmZhbHNlfQovLyAjIEdlb21ldHJpYyBCcm93bmlhbiBNb3Rpb24gRXhhbXBsZQovLyAtIGRlZmluZXMgcGFyYW1ldGVycyBtdSBhbmQgc2lnbWEKLy8gLSBzaW11bGF0ZXMgYSBHZW9tZXRyaWMgQnJvd25pYW4gTW90aW9uIChHQk0pIHVzaW5nIHRoZXNlIHBhcmFtZXRlcnMKLy8gLSBwbG90cyBhbGwgc2ltdWxhdGVkIHBhdGhzCi8vIAovLyAhYXJpdGhtZXBhZC1jZWxsIHsiY2VsbFR5cGUiOiJqcyIsInNob3dMaW5lTnVtYmVycyI6ZmFsc2V9Cm11ID0gMC4wODsKc2lnbWEgPSAwLjI7Ci8vIC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UyhULCBuKSkpLAogIHNlcmllczogW18obnMpLm1hcChuID0+ICh7eDogUyhULCBuKSwgeTogcGF5b2ZmKFMoVCwgbikpfSkpXQp9LCB7CiAgYXhpc1g6IHt0eXBlOiBDaGFydGlzdC5BdXRvU2NhbGVBeGlzfSwKICBsaW5lU21vb3RoOiBmYWxzZSwKICBoZWlnaHQ6IDMwMAp9KTsKLy8gIWFyaXRobWVwYWQtY2VsbCB7ImNlbGxUeXBlIjoianMiLCJzaG93TGluZU51bWJlcnMiOnRydWV9Cm5wdiA9IE1hdGgucG93KDErciwgLVQpICogbnVtZXJpYy5zdW0oIF8obnMpLm1hcChuID0+IHBheW9mZihTKFQsIG4pKSAqIFEoVCxuKSkgKTs=)

## Screenshots

#### Rename current pad
![Rename current pad](screenshots/screenshot1.jpg "Rename current pad")

#### Using menus and buttons
![Using menus and buttons](screenshots/screenshot2.jpg "Using menus and buttons")

#### Plot example
![Plot example](screenshots/screenshot3.jpg "Plot example")

## Install / Usage

Simply put the content of this repo (at least `index.html` and the `assets` + `vendor` folder) on a static web server and open the page in your browser. There is no server-side code required, everything runs inside the browser.

Pads (i.e. notebooks) can be downloaded to files (and uploaded back). For some example pads, see the `examples` folder.

## History

### Deprecation in 2022
Like a phoenix from the ashes of [Iodide](https://github.com/iodide-project/iodide), the [Pyodide](https://github.com/pyodide/pyodide) project has risen.
Combined with [JupyterLite](https://jupyterlite.readthedocs.io/en/latest/) this finally gives a fully browser-based, backend-free scientific computing environment
with tons of great packages available.
This makes arithmepad superfluous to me, hence it is now deprecated.

### v0.1.4 (not yet)
* Add favicon
* Add web app manifest (first steps towards PWA)

### v0.1.3 (2020-07-31)
* Fix adding cells on clear pad (button did not work)
* Run continuous tests with [Travis CI](https://travis-ci.com/github/luphord/arithmepad)
* Disable worker (which cannot be run from file://)
* Disable Ace snippets (which are not included anyway)
* Remove source maps to prevent warnings

### v0.1.2 (2020-07-28)
* Improve initial example content
* Add link to GitHub project (in `About` menu)
* Host on [arithmepad.vercel.app](https://arithmepad.vercel.app)

### v0.1.1 (2020-06-07)
* Move all vendored dependencies to the `vendor` folder

### v0.1.0 (2020-06-07)
* Release of the code mostly as imported from fossil 2015

### Restart in 2020
In need of a simple way to give potential users a tool to experiment with [gaussian-analytics.js](https://github.com/luphord/gaussian-analytics)
I was looking for JavaScript web notebook. [Iodide](https://github.com/iodide-project/iodide) was still in alpha
and there seemed to be no easy way to self-host it on a static server. Also, I could not find any
other promising alternatives. arithmepad in contrast gave me all the features I required
but loading JavaScript examples by URL. So I decided to restart the project in June 2020.

### Deprecation in 2019
Not having worked on arithmepad for more than three years, I decided to deprecate
the project in early 2019. I considered [Iodide](https://github.com/iodide-project/iodide)
as an alternative, which was actively maintained and of far better quality than arithmepad
ever could be.

### Development in 2015
arithmepad was developed to have a web based JavaScript notebook for the browser.
It was meant to be simple, both in usage as well as in hosting (no requirements
but a static web server) at the expense of more advanced features.