Code Monkey home page Code Monkey logo

Comments (4)

stisa avatar stisa commented on September 25, 2024

You should be able to just pass the backend via the existing flag mechanism, does that not work for you?
eg: #>--backend:cpp at the top of a block.
The kernel itself is compiled to C by nimble install, but you can clone the repo and compile manually to cpp if you really want it, although I don't really see the point to that.

from jupyternim.

unexploredtest avatar unexploredtest commented on September 25, 2024

You should be able to just pass the backend via the existing flag mechanism, does that not work for you?
eg: #>--backend:cpp at the top of a block.

No, it's not working

from jupyternim.

stisa avatar stisa commented on September 25, 2024

OK, looks like I forgot my own way of defining flags, sorry.
It works for me by pasting #>flags --backend:cpp at the top of a code cell.
Note that this will change the compilation of all the notebook to cpp, and due to the way this is done in the background, it will affect previous blocks too, so you can't have a block compiled to c and another with cpp (yet?).

The default is already compiling to C, it basically writes out a temporary nim file, compiles it, and show you only the output from the latest block.
I have a super experimental mode with hot code reloading support, but it had some pretty serious bugs like crashing when echoing a float number due to bugs in the compiler so that is on hold for now, I will revisit it at some point (probably when incremental compilation gets more stable).

ps: Thanks for using this! I'm always happy to get feedback and bug reports

from jupyternim.

unexploredtest avatar unexploredtest commented on September 25, 2024

It works for me by pasting #>flags --backend:cpp at the top of a code cell.

Thanks, that worked! Closing the issue now...

I have a super experimental mode with hot code reloading support, but it had some pretty serious bugs like crashing when echoing a float number due to bugs in the compiler so that is on hold for now, I will revisit it at some point (probably when incremental compilation gets more stable).

Intersting, looking forward to it :)

ps: Thanks for using this! I'm always happy to get feedback and bug reports

Thank you! I was so happy when I found out you could use Jupyter Notebook with Nim, as I'm kinda new to it and I've come from a Python background.

from jupyternim.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.