markandrewj / jupyter-nodejs

A node.js kernel for jupyter/ipython

Home Page:http://nbviewer.ipython.org/gist/jaredly/404a36306fdee6a1737a

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jupyter NodeJS

This is a kernel for Jupyter

Get it while it's hot! or view the example notebook

Prereqs

  • IPython 3.x
  • node
  • ZeroMQ

Installation

git clone git@github.com:notablemind/jupyter-nodejs.git
mkdir -p ~/.ipython/kernels/nodejs/
npm install && node install.js
make
ipython console --kernel nodejs

And viola!

image

Also, in the iPython notebook:

image

Supported features:

  • tab-completion (both for variables and paths)
  • error reporting
  • magics! The available extensions can be configured via package/config.js

Installation

node install.js [install-dir] will install the kernel.json file that ipython looks for. The default is for linux machines, ~/.ipython/kernels/nodejs/. You will have to specify an install dir for Mac and Windows (see the docs for info about what that should be)

BabelJS Magic for es6+ goodness

%load_ext babel and then

%%babel
class Awesome {
  constructor() {
    console.log('yeah!')
  }
}

Hovever: import ... syntax doesn't work because of live bindings foo, so just use require() normally and all will be well.

Clojurescript compilation via a himera server

%load_ext clojurescript http://himera-emh.herokuapp.com and then

%%clojurescript
(clojurey goodness)

About

A node.js kernel for jupyter/ipython

http://nbviewer.ipython.org/gist/jaredly/404a36306fdee6a1737a

License:MIT License


Languages

Language:JavaScript 99.5%Language:Makefile 0.5%