GithubHelp home page GithubHelp logo

Comments (10)

gibiansky avatar gibiansky commented on May 21, 2024

If your cell stays marked as busy, the kernel is almost certainly dead. The console interface is a bit broken right now - I've been developing mostly for notebook and really need to work on the console as well. :{ code :} is not supported, either; sorry about that... feel free to create a feature request issue.

As for notebook errors - can you switch back to 03c5a95, run IHaskell setup and IHaskell notebook and then find a minimal broken example? Then, paste output of those two commands as well as the files in ~/.ipython/profile_haskell/*.py.

Although everything should work on IPython 1.0.0, you could also try switching to HEAD and seeing if it works. I'm not sure why the kernel is dying and need a bit more info to go on :(

from ihaskell.

wcbeard avatar wcbeard commented on May 21, 2024

:{ code :} is not supported

Really? I paste this into the console and it seems to work:

In [3]: :{
   ...: data Value = X Int
   ...:            | Y String
   ...:            | Z Float
   ...:            deriving Show
   ...:
   ...: let values = [X 20,
   ...:               Y "Test",
   ...:               Z 0.5]
   ...: mapM_ print values
   ...: :}
Out[3]:
X 20
Y "Test"
Z 0.5

I may have been unclear, but I only tried this in the console, and it works with or without :{ :}. I'm new to Haskell, but I thought I read that it's required for multiline ghci input. But I assumed multiline input is expected in the notebook without :{ :} by default, so it would be unnecessary anyways.

from ihaskell.

wcbeard avatar wcbeard commented on May 21, 2024

After

git stash
git checkout 03c5a95
IHaskell setup
cabal install
IHaskell notebook

I tried to print again, and terminal output is here. I'll update IPython in a minute and see if that helps.

from ihaskell.

gibiansky avatar gibiansky commented on May 21, 2024

Whoa, you're right! About the :{ ... :}. ...I think this might be an accident. Python recognizes the ':' characters as Python delimiters and thus enters multiline mode. Then, IHaskell interprets :{ and :} as directives (along the lines of :t). It doesn't report an error (that's a bug!) and just does nothing. Then, it interprets the rest of the code block as it would for the notebook. As a result, :{ and :} work... by accident. Whoa.

from ihaskell.

wcbeard avatar wcbeard commented on May 21, 2024

Interesting on multilines...didn't know python sees ':' as a delimiter, maybe an IPython thing? I think they have really flexible parsing, you can even paste in In [1]: ... or >>> in the cells at the start of a line and it doesn't care. (Makes it really nice for copy/pasting stuff from the web.)

from ihaskell.

gibiansky avatar gibiansky commented on May 21, 2024

By 'delimiter', I mean that ':' denotes the beginning of an indented block, as in

if condition:
    # Indented block
    pass

IPython handles that by starting a multiline input, which helps us in this case!

from ihaskell.

wcbeard avatar wcbeard commented on May 21, 2024

I just upgraded ipython--it was at 1.0.0 (4481c323e0d), now at 1.1.0 (7c2ea3a) (or did you mean I should try the 2.0 version?). cabal install'd and IHaskell setup'd again, and I'm still getting a busy signal. Though output looks similar. Not terribly descriptive...any other ideas on how to get logged info that could be useful?

from ihaskell.

wcbeard avatar wcbeard commented on May 21, 2024

I had been hesitant about upgrading to v2.0 dev since it wouldn't work for either language. Figured out the browser cache was messing things up so I cleared it and have the notebook working on both languages. Not sure if it was the ipython version or cache, but it's working! Thanks!

And for anyone else out there having trouble w/ IPython notebook dev version... clear your cache!

from ihaskell.

gibiansky avatar gibiansky commented on May 21, 2024

Huh, that's very strange. How do you clear the IPython cache? I'd like to add that to the README as a troubleshooting tip.

from ihaskell.

wcbeard avatar wcbeard commented on May 21, 2024

It's just the browser cache for whatever browser you're in. F5 usually works, but I had to go Settings > Show advanced > Clear browsing data > empty the cache in Chrome.

Also, I switched back to IP 1.1.0, and it didn't work, so that probably had more to do with it than the cache, but clearing the cache would be necessary for the IP version upgrade, I think. I've got a virtualenv working for IHaskell using IP 2.0 now, so both languages are happy for the time being...

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.