Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPython profile_haskell #12

Closed
Carreau opened this issue Oct 23, 2013 · 6 comments
Closed

IPython profile_haskell #12

Carreau opened this issue Oct 23, 2013 · 6 comments

Comments

@Carreau
Copy link
Contributor

Carreau commented Oct 23, 2013

Hi,

Really happy to see that, You should definitively make an announcement on IPython-dev mailing list (on top of Hacker news thread)!

As you might, or might not be aware, we are trying to add the ability to select from many kernel in IPython notebook, and as Fernando Perez wrote to you, we'll be happy to get your feed back.

I personally have no experiences with Haskell, but as I'm currently tweeking IJulia and IRuby custom profiles to have better integration with the notebook (correct syntax highlighting and all that), I'm proposing myself to help writing IHaskell custom profile.

Here are the custom files that IJulia replaces in .ipython/profile_julia , where should I put the equivalent in IHaskell repository and how to get them copied in the right place (is there an install script) ?

(NB, I'm also mostly in charge of nbviewer, so If you have a notebook you want to put on the frontpage, I'll be happy to do so)

@gibiansky
Copy link
Member

That's really great to hear! I'm happy to contribute any feedback and have
wanted to contribute something to IPython for a while now.

I'm going to rework the install script (which you run via 'IHaskell setup')
to enable a bit more flexible configuration. Currently, it is all in
IHaskell/IPython.hs and is just hardcoded as a list. Feel free to modify
that if you would like, but sometime in the next week I will get around to
refactoring that into IHaskell/Config/*.hs and use Template Haskell to make
it easier to edit these IPython profile config files. I'll shoot you an
email when that's done, I guess.

I will really appreciate your help getting the IPython side of things
working nicely. (Once that's a bit farther along, if possible I'd like to
add some custom plugins to CodeMirror to enable unicode and 'conceal'
(vim-style) and other nice things, too...)

On Tue, Oct 22, 2013 at 11:30 PM, Matthias Bussonnier <
notifications@github.com> wrote:

Hi,

Really happy to see that, You should definitively make an announcement on
IPython-dev mailing list (on top of Hacker news thread)!

As you might, or might not be aware, we are trying to add the ability to
select from many kernel in IPython notebook, and as Fernando Perez wrote to
you, we'll be happy to get your feed back.

I personally have no experiences with Haskell, but as I'm currently
tweeking IJulia and IRuby custom profiles to have better integration with
the notebook (correct syntax highlighting and all that), I'm proposing
myself to help writing IHaskell custom profile.

Here https://github.com/JuliaLang/IJulia.jl/tree/master/deps are the
custom files that IJulia replaces in .ipython/profile_julia , where
should I put the equivalent in IHaskell repository and how to get them
copied in the right place (is there an install script) ?

(NB, I'm also mostly in charge of nbviewer, so If you have a notebook you
want to put on the frontpage, I'll be happy to do so)


Reply to this email directly or view it on GitHubhttps://github.com//issues/12
.

@Carreau
Copy link
Contributor Author

Carreau commented Oct 23, 2013

I'll wait for you to clean things up then.

Don't build too much on parsing .py config file, we are exploring[1] the ability to have JSON config file that should be easier to update programmatically.

I don't know the CM plugin you are speeking about, but I can have a look if you have links.

If you need more rapid feedback or to discuss face to face, we have live Google Hangout every thursday at 10am PST, you can probably ask for en invite.

[1] understand we are fighting, and nobody moves from their position.

@gibiansky
Copy link
Member

I've added a more general configuration mechanism here: e52d418

You can now edit the *.py files in the IHaskell/config directories, and, upon running IHaskell setup, they are copied into the profile that it creates. Note that this works only for the files that are currently there - it is very easy to add more if necessary, but it won't just work automatically.

Note that this uses TemplateHaskell to compile in the configuration into the IHaskell executable. You actually must recompile via cabal installand then rerun IHaskell setup for things to work.

Changing this to any other filetype is easy as well - its a matter of changing IHaskell/IPython.hs writeConfigFilesTo function and just renaming the files. So if you guys switch to JSON, nothing would change.

Let me know what your plans are and if there's anything else I should do on this front.

@gibiansky
Copy link
Member

Also, you need to run cabal clean before cabal install, because cabal does not know that the *.py files have changed and thus doesn't recompile the appropriate modules. (This is what I get for using TemplateHaskell).

@aavogt
Copy link
Contributor

aavogt commented Oct 28, 2013

I think ghc could check those .py files. The definition of the template quasiquote could use addDependentFile. Or you could wait/hope for the following change to the template-haskell library: http://ghc.haskell.org/trac/ghc/ticket/8483

@gibiansky
Copy link
Member

@aavogt Thanks for the tip. I've made an issue in the here Github repo, but the underlying problem is with quoteFile. So I think for now I will just leave it as is and use cabal clean - I briefly fiddled around with adding my own addDependentFile but it was a bit of a pain. I hope that your patch to GHC gets in soon, which would fix the issue - thanks a bunch.

Anyway, I'm closing this issue as there's now a mechanism for doing custom profile files, even if it requires recompiling.

vaibhavsagar pushed a commit that referenced this issue Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants