GithubHelp home page GithubHelp logo

Issues running notebook about ihaskell HOT 18 CLOSED

ihaskell avatar ihaskell commented on May 18, 2024
Issues running notebook

from ihaskell.

Comments (18)

gibiansky avatar gibiansky commented on May 18, 2024

Sorry it's taken me a while to respond... but I briefly looked into things and didn't find any reason that might happen. FYI, a * just means the kernel (IHaskell) probably crashed for some reason.

I'll give this a shot on a different setup soon and see if I can reproduce it.

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

Well it was a bit strange since the console log window was displaying "Kernel heartbeat" or something similar. And it works fine on port 8888. Maybe that's an issue with my local config.

Btw do you plan to add support for ghci custom commands (:kind, :type, :hoogle...) ?

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

Yes. :type and such already work, and we plan on adding the rest.

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

Yeah :type works.

I guess I'll close this issue since I guess I'm the only one having it ;)

from ihaskell.

jcurbo avatar jcurbo commented on May 18, 2024

Sorry for not commenting until now, but I was having the exact same issue. Just haven't had time to dig into it. I didn't see any error messages in the kernel window, just the "Connecting to: tcp://..." messages whenever I tried to evaluate a cell. I can provide more details if necessary.

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

@jcurbo @X01 I've played around with this some more and cannot get it to happen.

More importantly, that port has nothing to do with the IHaskell kernel - it's just the HTTP port that the notebook server is running on. That is handled entirely by IPython, so the port should not in any way be affected by IHaskell, as that is just a kernel behind IPython.

I suspect that means this is some sort of bug with IPython? If you'd like to check, you should go into ipython_config.py and comment out this line:

c.KernelManager.kernel_cmd = [exe, 'kernel', '{connection_file}']

That forces IPython to resort to normal IPython kernels instead of IHaskell. If you have the same problem when you change it in that way, this is an IPython bug, and you should close this issue; if you don't, let me know, because that'd be really strange...

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

@gibiansky

After commenting out the line I can't see anything in the notebook. With --debug flag I can see that the reply from the kernel but nothing appears in the notebook. (whether on default port or not)

And now I can't get it to run on port 8888 either :)

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

Does the normal IPython notebook work? (Via ipython notebook) You can throw some Python code at it and see what happens (print "Hello")

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

Well yes and no.... I had to open a new incognito window. Natural suspect would be javascript then

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

Huh. ...does IHaskell work in an incognito window?

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

Nope :)
In fact I started by opening a ticket on ipython/ipython, then realize ipython seemed to be ok
I'm as puzzled as you are

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

Try getting IHaskell from the repo again. Make sure to cabal clean and reinstall. I'm currently testing from the following IPython branch:

https://github.com/ivanov/ipython/tree/console-display-text

(It has some fixes for IHaskell console)

Running everything in incognito, what happens with ipython notebook? What about ipython notebook --profile haskell? What about IHaskell notebook?

Potentially useful output:

  1. Contents of the config files in ~/.ipython/profile_haskell
  2. Output IHaskell setup and other IHaskell calls
  3. Output of cabal configure and cabal install

Hopefully we can figure out what's going on... I'm really confused, and don't really understand how IHaskell could be affecting IPython in this manner. Looks like a bug somewhere, though hard to tell where...

Finally, does IHaskell console work as expected?

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

Recompiled and I can't get the console to work:
IHaskell: attempting to use modulemain:IHaskell.Types' (./IHaskell/Types.hs) which is not loaded`

Well, since the javascript from IHaskell also affected IPython notebooks, I really think there something wrong in there. Either in IHaskell's or in IPy base js

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

You can't run ihaskell in the same directory as the sources, sadly.

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

JavaScript from the Haskell profile doesn't affect the ipython native
python notebook

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

JavaScript from the Haskell profile doesn't affect the ipython native

Well, it did, through the cache (see ipython/ipython#4626)

You can't run ihaskell in the same directory as the sources, sadly.

Running from another dir, the prompt appears but I never get an answer (it worked previously in the console)

In [1]: print "fdsf"

In [2]:
Do you really want to exit ([y]/n)? y

(running with --debug flag)

btw the kernel is not killed on exit

from ihaskell.

gibiansky avatar gibiansky commented on May 18, 2024

For ihaskell console to work, you must be on the github branch linked above.

And yes, caching makes sense...

And yeah, console doesn't kill the kernel properly: updated IPython fixes
this.
On Dec 12, 2013 7:59 PM, "x0l" [email protected] wrote:

JavaScript from the Haskell profile doesn't affect the ipython native
Well, it did, through the cache.

You can't run ihaskell in the same directory as the sources, sadly.
Running from another dir, the prompt appears but I never get an answer:

In [1]: print "fdsf"

In [2]:
Do you really want to exit ([y]/n)? y

btw the kernel is not killed on exit


Reply to this email directly or view it on GitHubhttps://github.com//issues/45#issuecomment-30484787
.

from ihaskell.

0x0L avatar 0x0L commented on May 18, 2024

For ihaskell console to work, you must be on the github branch linked above.

Oopps... Sorry for that :)
Now both IPy and IHaskell notebooks work fine on their default ports (and using zmq4)

Maybe they've changed something in the tornado caching policy, this would explain why custom.js from ihaskell got loaded into ipy notebooks.

Anyhow, thank you very much for helping me out and for this project: I now have a decent place where to learn and experiment with Haskell !

from ihaskell.

Related Issues (20)

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.