Giter Site home page Giter Site logo

jupyter-elm-kernel's Introduction

This kernel adds support for Elm to Jupyter notebooks.

While basic functionality is in place, this is still very much a work in progress. I'm still figuring it all out. Any help, ideas, etc. would be great.

Requirements

  • Python 3.6+

Installation

Either install from a repository using pip:

pip install elm_kernel

or install the package from source:

pip install -e .

Then install the kernel spec:

python -m elm_kernel.install

Usage

Run jupyter notebook and select the Elm kernel for a new notebook.

Multi-cell code examples

By default, when you execute a code cell with the Elm kernel the code will not be compiled. Instead, the kernel simply queues up code cells. This way you can break longer examples over multiple cells, interleaving the code cells with supporting Markdown cells.

In order to ask the kernel to actually compile your code, you need to terminate a code cell with the line:

-- compile-code

When the kernel sees a cell like this it contatenates, in cell-execution order, all of the executed but uncompiled code cells (i.e. everything since the start of the kernel or the last -- compile-code cell). It then compiles the concatenated code, returning the result to the notebook.

For a concrete example of this, see examples/the-elm-architecture.ipynb.

This is a bit hacky, and we're actively searching for a better alternative. Ideas are welcome!

Examples

The examples directory contains a few examples of how to use this kernel. Just go to that directory and run jupyter notebook to see them.

jupyter-elm-kernel's People

Contributors

eeue56 avatar kaijicode avatar

Watchers

 avatar

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.