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

DLang Jupyter Kernel #35

Open
wilzbach opened this issue May 24, 2016 · 8 comments
Open

DLang Jupyter Kernel #35

wilzbach opened this issue May 24, 2016 · 8 comments

Comments

@wilzbach
Copy link
Member

It would be great to have a D Kernel for the Jupyter project (it's quite huge and basically every language is supported).

Documentation:

http://ipython.readthedocs.io/en/stable/development/index.html

Overview of existing kernels:

https://github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages

@MartinNowak
Copy link
Collaborator

Yes, interesting indeed. Does that really need a REPL interface or could it be done via batch execution?

@wilzbach
Copy link
Member Author

Does that really need a REPL interface or could it be done via batch execution?

It's very similar to a REPL (imho it's one), because you need to keep track of the stack / currently available symbols.

@wilzbach
Copy link
Member Author

could it be done via batch execution?

Btw if you are unfamiliar with Jupyter, you can try a couple of Notebooks online
https://try.jupyter.org/

@carljv
Copy link

carljv commented May 27, 2016

I believe there are some that just execute cells as batch, but typically aren't able to share state across cells and are otherwise pretty limited. The ones in interpreted languages, or languages with a REPL seem to work better.

@m3m0ry
Copy link
Contributor

m3m0ry commented Jun 28, 2020

Just to revive this issue a little bit.
Since there is now jupyter-wire in D I have done some experiments: dlang-jupyter

I basically just connected the packages drepl and jupyter-wire. Nothing fancy so far.
It works (somewhat). Yes it has its limitations. But I spend only 4 hours, 3 of which were just me being stupid.

@m3m0ry
Copy link
Contributor

m3m0ry commented Jul 2, 2020

Current limitations:
I have a weird behavior with imports. (this is probably due to fact that drepl doesn't expect 2 lines at a time???)

import std.stdio;
import std.algorithm;

The second one won't work,because only the first one is imported as public.

I have also seen some issues with variable declarations/statements as well (which according to unittests here should work).

The general question is: should I try to fix it in my package, or should we make changes/adjustments/improvements to drepl?
(I'd say it depends. In this example, i would think that drepl should be able to handle multiple statements at once)

@wilzbach
Copy link
Member Author

wilzbach commented Jul 2, 2020

The general question is: should I try to fix it in my package, or should we make changes/adjustments/improvements to drepl?

It looks like all your issues could be fixed in drepl, so that's very likely the way to go. The drepl isn't set into stone, so it's definitely possible to improve.

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

4 participants