[IPython-dev] Hi Matthias, wondered what the latest on ...

Matthias BUSSONNIER bussonniermatthias at gmail.com
Thu Oct 17 07:48:06 EDT 2013

Le 17 oct. 2013 à 04:46, Joshua Donnelly a écrit :

> Thanks Matthias, for your reply and links 
> also for letting me know about the mailing list
> and for your first pass at a node kernel for ipython
> basically I was following along the instuctions in 
> http://nbviewer.ipython.org/4279371/node-kernel.ipynb
> and trying to get that to work
> I ran "profile create node" which did create... 
> C:/Users/Administrator/.ipython/profile_node/ipython_notebook_config.py
>  to which i added
> c = get_config()
> c.SubprocessKernelManager.kernel_launch_program = ['node','C:/Users/Administrator/node-kernel/kernel.js','{connection_file_name}']

Get rid of this line.
> c.MappingKernelManager.kernel_manager_class= 'IPython.zmq.subprocesskernel.SubprocessKernelManager'

> c.Session.key=''
> # which may as well be the whole file since the rest is just comments anyway
> all the other instructions i tried to run exactly, i got stuck at this one
> "First you will need the content of this pull request if it have not been merged yet."
> since I couldn't find  Carreau:irb "Carreau wants to merge 5 commits into ipython:master  from Carreau:rib  "

You do not need this pull request anymore. Use IPython stable without any modification, except configuration.

> so I did a completely new clone from your ipython fork
> <C:\A\Y\IPY\>clone https://github.com/Carreau/ipython.git .
> [C:\A\Y\IPY\]"C:\A\Y\Canopy\Env\User\python.exe" -i "C:\A\Y\Canopy\Env\User\Scripts\pip-script.py" install -e ".[notebook]"
> to symlink and install -- and that worked!!
> PS  i am back on the main dev master now, as per your email
> when I ran "-m IPython notebook --profile=node" it generated a whole screed of errors 

why are you executing the module ? isn't `ipython` lowercase entry point existing ?

> so at the moment python, QT, ruby?, emacs, and web notebooks, can talk to ipython,
> but what about for an old hypertext application that just speaks ajax and jsonp, or for
> a newer browser like NodeWebKit with the full power of zeromq/sockets/and all those 
> other modules.

I think there a need to clear up the architecture. 

You have kernels : 
 - Python Kernel
 - Ruby Kernel
 - Julia Kernel
 -  Scala Kernel
 - (Node Kernel)

That speak, through ZMQ to frontend.
	- QtConsole
	- Console
	- Webserver**
 	- Vim
	- ….

The web server is not much more that a ZMQ<-> web socket proxy that speaks with clients :
	- HTML/javascript notebook 
	- Emacs

You can then mix'n'match, i.e. Emacs-IPython-Notebook can have a ruby kernel… etc.

> what I really want to know is how to do "Hello World" from either a node context or an old browser...
> Say I had the following… [...]

Older prototype of notebook were using polling and things like that, but we **need** web sockets to
push data. You can try to hack it for older browser but there are more things that will not work. 
We are really relying on new web tech to have the notebook to work.

> If ipython had an http or api I could do it, similarly if it emitted jsonp that would be even better, since 
> the notebooks could be saved to disk and they would work online or offline, cross domain, 
> over BOTH file:// or http:// protocols, no sever required!!! which would be a major win.

I really don't understand what you mean there. 
Are you trying to make an In-Browser js kernel like that : 


> all the url rewriting makes it hard to even insert a static

What url rewriting ?

> file, I found that "custom.js" placed all the way over at, OMG... 
> C:\Users\Administrator\.ipython\profile_default\static\custom\custom.js
> worked in chrome but not in IE10, so I abandoned it in favour of "monday.txt"
> <script src="{{static_url("custom/custom.js") }}" type="text/javascript" charset="utf-8"></script>
> <script src="" ></script>

Why are you modifying templates ?

> served from my local machine, but not everyone needsor wants or to have
> run another server just to add some script. In fact the whole notebook thing
> (minus the ipython eval) COULD run without a server just by addressing the 
> and coming up with some simple user/file page IDs that expanded to static 
> file locations, I could provide more info help on a way to do this if required.

I'm sorry, but I don't understand what you are trying to do. the server already serve local file under the 
file/ prefix, so you can reference files from CWD. 

> I included them a longer version of this email, but it's almost like 2 or 3 extra
> topics, and a whole list of complaints/suggestions, which are best only given
> when invited ~ because I'm sure that my issues and more you are aware of , since
> I've seen some of the conference calls/hangout sessions. I'm just saying some
> of the work I've done could help fix those pain points, and I'm happy to give an outline.

Please do, there is probably a missunderstanding and we are considering doing Live Q & A on Google
hangout. Il would be great to find a way to collect question and have user vote for what they would like to answer.

> In short I just want "Hello World" run('1+1') get "2" from a  +a web browser without 
> sockets and the nodewebkit browser or a plain node.js script (via zmq)

The without socket will be the hard part from now. 
But from what I see you are not looking for a JS kernel.
You are looking for the JS client that will send request.

I don't have time now, but I'll try to have a look. 

More information about the IPython-dev mailing list