Giter Club home page Giter Club logo

iodide's Introduction

Please note: Iodide is no longer under development, nor being actively maintained.

New PRs and issues are unlikely to be reviewed, and bugs are likely to go unfixed. We hope that future projects may be able to learn something from our experiments, so as of September 2020 we have no plans to take down the demo server at https://alpha.iodide.io/. Nonetheless, iodide.io should not be used for important work, as it may be shut down in the future.

Note that the pyodide project (python-on-webassembly) continues and is unaffected by this change. For another take on interactive, client-side notebooks, you may also be interested in the Starboard Notebook which provides some of the same capabilities as Iodide and is in active development.

Huge thanks to our community for your support and interest over these last few years!


CircleCI Join the chat at https://gitter.im/iodide-project/iodide codecov

The Iodide notebook

View source for science

Try it in your browser right now!

Today, sharing scientific results is easier than ever. You can email a PDF, write up a Google doc, or post to your blog. You can embed plots, data tables, and even interactive visualizations. But what if you want people to be able to replicate and extend your results -- to take your results and “view source” to see how you arrived at your conclusions? Or even hack and remix them to ask their own questions?

To do that now, you typically have a couple of options. You could send your code alongside your nice, clean PDF or blog post, allowing you fine-grained control over your presentation, but that requires you to separate your presentable results from your code and to manage multiple files. Alternatively, you could share your results and code bundled together in a notebook format that mixes code with write-up; this has the advantage of keeping your code and results closely tied together, but the presentation can get a bit unwieldy, especially if you want to share your results with a less technical audience. And in either case, sharing your code will only allow your collaborators to replicate and extend your results if they are first able to replicate your whole setup -- if they can run your code with the same libraries, the same data, and the server access.

If only there was a technology that was great for presenting documents and visualizations, that allows code to run anywhere with zero setup, and that all scientists and citizens had access to...

Luckily, that technology already exists: the web browser.

lorenz-scaled-loop

Iodide is a modern, literate, and interactive programming environment that uses the strengths of the browser to let scientists work flexibly and collaboratively with minimal friction. With Iodide you can tell the story of your findings exactly how you want, leveraging the power of HTML+CSS to display your results in whatever way communicates them most effectively -- but still keeping the live, editable code only one click away. Because Iodide runs in the browser you already have, you can extend and modify the code without having to install any software, enabling you to collaborate frictionlessly.

And thanks to WebAssembly, working in the browser doesn't mean that you're restricted to working in just JavaScript. Via the Pyodide project you can already do data science work in the browser using Python and the core of the Python science stack (Numpy, Pandas, and Matplotlib). And that's just the start. We envision a future workflow that allows you to do your data munging in Python, fit a quick model in R or JAGS, solve some differential equations in Julia, and then display your results with a live interactive d3+JavaScript visualization... and all that within a single, portable, sharable, and hackable file.

Our focus is on delivering frictionless, human-centered tools to scientists. You can read more about our core principles below. If this vision resonates with you, please consider contributing to the project!

Visit https://alpha.iodide.io/ to see example and demo notebooks, and to learn more!

For information on developing and contributing to iodide, please see our documentation.

PS: We've got a few other ideas about how to make in-browser workflows as ergonomic for scientific tasks as possible, including

  1. using modern JS transpilation tools to extend JS syntax for numerical computing -- just enough for matrix operations, operation broadcasting, n-dimensional slicing, and a few other basic scientific computing needs;
  2. compiling best-in-class C/C++ science libraries (and runtimes!) to Webassembly and wrapping them in ergonomic JS APIs.

If either of those projects appeals to you, please reach out!

Get in touch

Please feel free to join our Google group to contact us and keep up with what we're working on.

You can also chat with us on Gitter.

License

The Iodide code is shared under the terms of the Mozilla Public License v2.0. See the LICENSE file at the root of the repository.

iodide's People

Contributors

algentile avatar bcolloran avatar cglotr avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar djbarnwal avatar fkohlgrueber avatar hamilton avatar iflameing avatar imranariffin avatar imshubhamsingh avatar jandrewtorres avatar jezdez avatar mdboom avatar mehmetoguzderin avatar openjck avatar pradeepgangwar avatar ralts1337 avatar renovate-bot avatar renovate[bot] avatar robhudson avatar robotblake avatar rvwatch avatar samrose-ahmed avatar teonbrooks avatar thenamankumar avatar wlach avatar ziyaowei avatar zzl0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iodide's Issues

implement localStorage solution to maintain state between sessions

Given that this app uses react + redux, and the stored state of the app is fundamentally just a big json object, we can save this in local storage so that this early-stage app can persist for a particular user.

As a starting point, let's simply make a big 'save' button to save the state to local storage. I attempted to save the state to local storage with each state change (which happens with every cell edit right now) and that made the app a little fussy.

We can use #16 to capture the name of the notebook, which can be saved w/ a simple, serialized key-value pair.

remove state from the title bar

Allowing there to be some small state-saving in the title component actually makes it harder to update the title from the main redux state object.

cell styling, wrapping, click zones

for parity with jupyter, we should wrap both the input and output from each cell in a div that is clickable without entering edit mode (in jupyter you can click to the left of the edit box to select a cell while in command mode). a click target like this is useful for editing/deleting/adding/moving cells.

implement a forward / backward state button

Given that we're using redux, and have the entire state saved, we can very easily move back and forth between states - that is, we can implement forward / backward state buttons.

implement a simple DOM cell type for svg, canvas, webgl, etc

We need a DOMCell, which allows you to simply have a cell displayed as an active DOM element. It needs the following options:

  • id, which allows for css selection.
  • element type, such as div, svg, canvas, etc
  • some way of saving the last render state of the enclosed dom element, which will make translating to a static report easier in many cases.

save execution history to state

We want to maintain a running list of chunks of code that are executed. Cell execution and external script additions should be appended to this list.

external script loader cell type

As discussed, we want a cell type for loading external scripts. In terms of UI, the proposal at this point is to have an input in which you can list URLs for external scripts to be loaded, and upon execution of the cell, the scripts will be added to the document head. This should also update the execution history list (see #46)

[meta] redesign cell display to remove clutter

I put together an mvp cell design to simply get all the underlying logic in-place. Ultimately getting the actual result displays looking closer to a well-formulated document (like RMarkdown) is the goal. Will update this list w/ more points as I tweak / commit.

  • move buttons to right of cell
  • tweak the CodeMirror instances for cleanup
  • keep buttons invisible until cell hover

create the right primitives for dom manipulation within the computation engine

The aim of a serverless notebook is to create a client-based computational "kernel" that can live in the browser. This removes the need for a server to do the heavy lifting. Removing the server opens the door for a truly portable (thus reproducible) scientific computing environment.

There are many challenges with this approach, but from a low-level / technical point of view, one very important challenge will be how to manipulate the dom from the kernel layer.

dealing with scope: global / window, var, etc.

as of this filing, we have no great way to make sure the scope feels consistent. Using var in a cell block, for instance, will not perpetuate across cells, because the declaration will be made within the scope of the Function call. So var b = 10 will not make b available to all cells, whereas b=10 will. This seems like merely a nuisance, but this issue will track all discussion re: how we want to approach scope in case others have strong opinions.

add a declared variables view

At the moment we're just putting the js-interpreter properties out there but it's not particularly usable or useful. This needs to be wrapped in some functional language to pull out before it even hits that component.

create a solution for changing cell type

This includes the requisite action, reducer, and UI element. The first two will be reusable across the app in other ways, while the UI piece will likely change.

[meta] mvp keybindings, pt. 1

We need to implement jupyter-style keybindings for:

  • entering / exiting command mode (lifted directly from jupyter)
  • selecting the next / previous cell
  • moving a selected cell up and down
  • adding / inserting a cell
  • deleting a cell
  • running a cell
  • switching between cell types

Given that these are Page-specific, we can implement the keybindings in that component.

remove js-interpreter and replace with Function, for sake of demo expediency

Eventually we want to address the compute kernel issue, but for the sake of expediency (and easy DOM manipulation #13) we're going to keep everything tractable so we can begin showing others a demo version. This requires removing js-interpreter (already considered a stopgap) with Function, which gives us the app's scope.

delete declared variables when loading a notebook from local storage

Our demo version (for now) keeps everything saved / stored in the current thread. So when we switch notebooks, we still have the global namespace of whatever has been run so far.

Really, this is a deeper question about WHERE notebooks live, WHAT a notebook represents, and HOW we manage state.

For a demo, this won't be an issue. But we will need to eventually come to some major decisions.

recall saved notebooks

For the demo notebooks will be saved in local storage. Build some functionality to recall them. Relies on #3

function declaration doesn't really work

hmmm, this is a big problem.

with the following cells:
%% function add(a,b){return a+b) return add(1,2) %% add(3,4) %%

from the first cell, you correctly get 3; but from the second cell, there is no output, and the console reports "ReferenceError: add is not defined".

So crapola, the scoping issues involved in executing code with Function are getting us. Gonna play with a branch using vanilla eval, which may operate differently wrt scope-- https://stackoverflow.com/questions/4599857/are-eval-and-new-function-the-same-thing

make cells selectable

A cell is selected if it is clicked, or currently being edited. This allows us to supply keybindings for running a cell, moving a cell, adding / deleting, and inserting a cell before or after the selected.

This should be as easy as providing an action called SELECT_CELL which takes the cellID.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.