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

[Feature request] Feature parity with IPython #99

Closed
malmaud opened this issue Oct 24, 2013 · 3 comments
Closed

[Feature request] Feature parity with IPython #99

malmaud opened this issue Oct 24, 2013 · 3 comments

Comments

@malmaud
Copy link
Contributor

malmaud commented Oct 24, 2013

IJulia is truly awesome, but it's still missing some of the nice things that IPython has for making interactive computing nicer. I thought I'd enumerate some of them here and get a sense for if people think these are important to have or are too low-priority to work on now (or ever) or require substantial changes in Julia itself to implement.

  • The ? operator

? on a variable produces richer information than Julia's current ?, include its nicely formatted current value and other metadata:

In [3]: x=[1,2]
In [4]: ?x
Type:       list
String Form:[1, 2]
Length:     2
Docstring:
list() -> new empty list
list(iterable) -> new list initialized from iterable's items
  • ?? operator for seeing the source of a function
In [5]: def f(x):
   ...:     y=x+1
   ...:     return y
   ...: 

In [6]: ??f
Type:       function
String Form:<function f at 0x10317baa0>
File:       /Users/malmaud/tmp/<ipython-input-5-9d6105d7ff7a>
Definition: f(x)
Source:
def f(x):
    y=x+1
    return y
  • pylab mode

Automatically import commonly-used scientific packages to the global namespace. In our case, that would probably mean

using HDF5
using JLD # for @save and @load
using PyPlot

and perhaps also Distributions and nlopt, which roughly accord with scipy functionality.

  • Redefinition of composite types in the global module

Currently it's convenient to define types in a Julia notebook, since it has to be wrapped in a module or will throw an error when the cell is re-evaluated.

And commonly-used magics:

  • autoreload mode

Every time a command is executed as the REPL, first reload all (or a specified subset) of imported modules from disk. That makes the style of development where you are editing a julia package in a standard editor while testing it in the REPL more convenient.

  • Command-line functions
    cd, ls, etc. typed at the REPL operate as run(ls).
@stevengj
Copy link
Member

@malmaud
Copy link
Contributor Author

malmaud commented Oct 25, 2013

Thanks for the reply - looks like it's really Julia enhancements that I'm after.

@malmaud malmaud closed this as completed Oct 25, 2013
@stevengj
Copy link
Member

Note that IJulia now reads .juliarc.jl at startup (#64) if you want to automatically import some packages.

(The only problem is that this make it hard for other people to use your notebooks if you forget to add using statements to the notebook.)

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

2 participants