jupyter-dart-kernel icon indicating copy to clipboard operation
jupyter-dart-kernel copied to clipboard

Investigate using an Interactive Kernel for Dart

Open tomas291184 opened this issue 1 year ago • 2 comments
trafficstars

This is a python kernel Notebook:

img1

Is there a way to do it with dart kernel:

img2

tomas291184 avatar Oct 07 '24 14:10 tomas291184

@tomas291184 thanks for reporting the issue.

My understanding is this has to do w/ function scope. So, basically, the way the program runs is that it wraps everything in a main rust program and runs it and gives you the output in the notebook. i.e., you can't have two functions in your main program with the exact same function signature the way it's implemented.

This is a simple wrapper kernel. When you use python in jupyter, it relies on an interactive kernel, ipython.

https://ipython.readthedocs.io/en/stable/

Since writing this wrapper kernel for dart, an interactive package has also been released for Dart:

https://pub.dev/packages/interactive

In any case, I think such functionality ** can ** be achieved, but it would require integrating with a more interactive kernel, where you have access to certain intermediate representations of variables, functions, the call stack, etc.

If you would like, we can repurpose this issue (I.e., just change the title) to something like - "Investigate using an Interactive Kernel for Dart". Basically, a spike - b/c this would be a heavier lift and would require understanding what/how the nature of the interactive kernel works.

It would certainly be cool and it would be much more like how python works inside the notebook.

Thanks again for reporting this.

vickumar1981 avatar Oct 09 '24 14:10 vickumar1981

@tomas291184 going to keep this issue open, just in case, anyone wants to investigate using the interactive package for Dart and see if that makes things easier.

vickumar1981 avatar Oct 16 '24 15:10 vickumar1981