andrewray / iocaml

An OCaml kernel for the IPython notebook
MIT License
193 stars 20 forks source link

does this work with ipython 3.1.0? #35

Closed bobzhang closed 8 years ago

bobzhang commented 9 years ago

I managed to compile it under ocaml 4.02.1 but when I start iocaml, it can not eval any cell

andrewray commented 9 years ago

iocaml uses ipython 1.3 as a base and would need a fair bit of work to update to 3.1.

Not too sure why iocaml isn't working for you - have you tried installing with opam? That's by far the easiest way to get the correct versions of all it's dependencies.

bobzhang commented 9 years ago

would you mind tell me your working version, I tried 0.13,1.2.1, 3.1, none of them seems to work (on Mac OS)

bobzhang commented 9 years ago

btw, there is no python of version 1.3 in pip

Downloading/unpacking ipython==1.3 Could not find a version that satisfies the requirement ipython==1.3 (from versions: 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.4.1, 3.0.0, 3.1.0, 0.10.1, 0.10.1, 0.10.2, 0.10.2, 0.10, 0.11, 0.11, 0.12.1, 0.12.1, 0.12, 0.12, 0.13.1, 0.13.1, 0.13.2, 0.13.2, 0.13, 0.13, 1.0.0, 1.0.0, 1.1.0, 1.1.0, 1.2.0, 1.2.0, 1.2.1, 1.2.1, 2.0.0, 2.0.0, 2.1.0, 2.1.0, 2.2.0, 2.2.0, 2.3.0, 2.3.0, 2.3.1, 2.3.1, 2.4.0, 2.4.0, 2.4.1, 2.4.1, 3.0.0, 3.0.0, 3.1.0, 3.1.0)

andrewray commented 9 years ago

I think the version was actually 1.1 - sorry for the confusion. That being said, you do not need to install ipython itself.

Can you confirm that you are installing iocaml with opam on macosx? Also, what version of websocket do you have?

$ opam show websocket
             package: websocket
             version: 0.9.3
          repository: default
        upstream-url: https://github.com/vbmithr/ocaml-websocket/archive/0.9.3.tar.gz
       upstream-kind: http
   upstream-checksum: b4515352a346371bebf45c05a6269c22
                tags: org:mirage, org:xapi-project
             depends: lwt >= 2.4.8 & tls >= 0.4 & cohttp >= 0.14.0 & ocplib-endian >= 0.8
  installed-versions: 0.8.1 [4.02.0 4.01.0 4.00.1], 0.9.3 [4.02.1]
  available-versions: 0.6, 0.7, 0.8, 0.8.1, 0.9.1, 0.9.2, 0.9.3
         description: Websocket library

There was a problem on osx with websocket <0.9.2.

bobzhang commented 9 years ago

it works now, given that is possible to generate a single static html file, this is really cool that every open source library should be providing an iocaml note-book page for trying its libraries.

That said, I noticed that the dependency is huge, which is quite fragile and close to impossible to install in a closed environment(you don't have a package manager), for me, the user, I think the most fascinating part of iocaml is that it could generate static notebook(using js_of_ocaml)

I think if I only care about static webpages, there should be a way to get rid of dependency on ipython, if so, I would be very interested, thanks -- Hongbo

andrewray commented 9 years ago

The links at the top of the page here should help; http://andrewray.github.io/iocamljs

In particular http://andrewray.github.io/iocamljs/creating_static_sites - I think this is what you want.

dpinsard commented 9 years ago

It seems that the communication between IOCaml and IPython Notebook 3.2.0 failed. Here is the log:


iocaml log file: 13/7/2015 14:35:02 open and bind socket tcp://127.0.0.1:51693 open and bind socket tcp://127.0.0.1:44075 open and bind socket tcp://127.0.0.1:35238 open and bind socket tcp://127.0.0.1:37002 open and bind socket tcp://127.0.0.1:56117 ô°ÜQ <IDS|MSG> HMAC: header: {"date":"2015-07-13T14:35:02.855353","username":"jupy","session":"95A51AEE282440B48994AA9BF7A394F6","msg_id":"610ecda3-a752-43ca-b8d4-76bdd587f439","msg_type":"kernel_info_request"} parent: {} content: {} SEND ô°ÜQ <IDS|MSG> HMAC: header: {"date":"2015-07-13T14:35:02.855353","username":"jupy","session":"95A51AEE282440B48994AA9BF7A394F6","msg_id":"51294a26-227b-48ac-97c6-5d8784f6d879","msg_type":"kernel_info_reply"} parent: {"date":"2015-07-13T14:35:02.855353","username":"jupy","session":"95A51AEE282440B48994AA9BF7A394F6","msg_id":"610ecda3-a752-43ca-b8d4-76bdd587f439","msg_type":"kernel_info_request"} content: {"protocol_version":[3,2],"language_version":[4,1,0],"language":"ocaml"} 95A51AEE282440B48994AA9BF7A394F6 <IDS|MSG> HMAC: header: {"username":"username","session":"95A51AEE282440B48994AA9BF7A394F6","msg_id":"898731B3D6E84D2F8862DAAFC620F348","msg_type":"kernel_info_request"} parent: {} content: {} SEND 95A51AEE282440B48994AA9BF7A394F6 <IDS|MSG> HMAC: header: {"username":"username","session":"95A51AEE282440B48994AA9BF7A394F6","msg_id":"cb76c778-6a5f-416c-bcae-8c1f5a017a50","msg_type":"kernel_info_reply"} parent: {"username":"username","session":"95A51AEE282440B48994AA9BF7A394F6","msg_id":"898731B3D6E84D2F8862DAAFC620F348","msg_type":"kernel_info_request"} content: {"protocol_version":[3,2],"language_version":[4,1,0],"language":"ocaml"} Exception: Ag_oj_run.Error("Line 1:\nMissing record field user_variables") dying.


Any help is welcome, Denis Pinsard

dpinsard commented 9 years ago

Great news ! In the file Ipython_json.atd I have deleted the line 43: user_variables : dyn;

... and it works !!

andrewray commented 8 years ago

with andrewray/iocaml#36 Jupyter should now be supported once iocaml-kernel is installed with opam. Please see https://github.com/andrewray/iocaml/wiki/jupyter for more info on the testing done with Jupyter.