Re: Basic jupyter notebook kernel

2016-08-24 Thread stisa
Hi Peter, I knew the shadow variable looked too easy! Oh well... :) ( sorry if I keep asking obvious questions, I'm not used to handling memory and the like. I'll have to read up on how memory is handled by nim, the gc, etc ) So you have compile master> master runs block1, forwards its memory/

Re: Basic jupyter notebook kernel

2016-08-24 Thread andrea
Just wanted to say: the plan looks really nice! I do not see any obstruction in just transforming this into an independent interpreter, so if everything works out fine I hope it will eventually lead to a resurgence of `nim i` :)

Re: Basic jupyter notebook kernel

2016-08-24 Thread mora
Hi Silvio, My plan is the following: the python code compiles the master, the master compiles and runs block1. Here block1 is modified (we add a bunch of stuff before and after the code) before compiling. And the magic: block1 compiles block2, and runs it, etc. The `-d:release` flags do many t

Re: Basic jupyter notebook kernel

2016-08-24 Thread stisa
@mora: Sounds like a good plan! I'm still relatively new to nim, so it's probably more detailed than anything I would have thought of. A couple of questions, sorry if they are obvious / make little sense: > The python wrapper will pass the code this binary, which will compile it, and > call it

Re: Basic jupyter notebook kernel

2016-08-24 Thread mora
I started to play with it. My plan is to keep the python wrapper. The reason is simple: I'm comfortable with python, I don't want to support multiple threads in Nim, and I want to send a kill signal to the process if the user wants to interrupt (menu Kernel->Interrupt in Jupyter) a long running

Re: Basic jupyter notebook kernel

2016-08-23 Thread mora
@stisa I have no plans, but it would be very cool. Let me read the contents you sent me, and try to come back with an idea. Peter

Re: Basic jupyter notebook kernel

2016-08-23 Thread stisa
@mora: Hi! No I've yet to make any progress, I got sidetracked a bit. Anyway, feel free to jump in, I'd really love to get a shared context working! Your solution would still be in python right? I _think_ your idea is what the original c kernel does, if you look in [resources/master.nim](https:

Re: Basic jupyter notebook kernel

2016-08-23 Thread mora
Let me do an UP on this thread. @stisa Having a context between the code blocks looks like a non-trivial and very useful task. Did you make any progress? Can I jump in? A little background: I did some experiments half a year ago. I was able to call a function from Nim. The binary was running, i

Re: Basic jupyter notebook kernel

2016-08-03 Thread OderWat
I also asked @Araq to make verbosity:0 really quiet. There is also still output "CC module" which can't be silenced by hint switching. Maybe some solution comes to devel soon!

Re: Basic jupyter notebook kernel

2016-08-03 Thread stisa
@OderWat: Thanks for the PR! I didn't think about tempnames, I guess I got lucky ( or I just didn't notice the bug ). As per disabling `hint[Processing]`, I am on Windows 10 64-bit, and it's still not silent. I guess it's similar to [http://forum.nim-lang.org/t/2350/1](http://forum.nim-lang.or

Re: Basic jupyter notebook kernel

2016-08-02 Thread OderWat
Great. I love such stuff. I made a little PR which disables a hint and fixes bad module names because at least for me there where tempnames with "-" in it which nim does not like.

Basic jupyter notebook kernel

2016-08-02 Thread stisa
Hi all, I got a basic kernel for jupyter notebook working, you can find it on [github](https://github.com/stisa/jupyter-nim-kernel) . It's based on [jupyter-c-kernel](https://github.com/brendan-rius/jupyter-c-kernel) ( actually, it's mostly the same ) and it uses the python implementation of th