Code Monkey home page Code Monkey logo

Comments (8)

stevengj avatar stevengj commented on August 23, 2024

I don't see how this could be possible with the current framework, because when the widget is changed (e.g. a slider is dragged), it calls Julia code to compute the new value to be displayed. On nbviewer, there is no Julia code running.

A similar limitation should apply to Python notebooks: there, it is Python code being called to compute the new object to display, and similarly nbviewer is not running Python. Unless IPython implements some kind of caching here?

from interact.jl.

mykelk avatar mykelk commented on August 23, 2024

Yeah, I think there would need to be a different macro for this, like @manipulatecached. It would basically call the code for all the various combinations of settings, saving the output, and then using javascript to switch between the saved outputs.

from interact.jl.

dcjones avatar dcjones commented on August 23, 2024

You're looking for something like Shiny in R? It would be nice to have that, and have it share a similar interface to Interact, but it's a pretty big project since it would have to be implemented either as a pretty elaborate caching scheme on the ipython side, or an entirely separate mechanism on the julia side.

from interact.jl.

mykelk avatar mykelk commented on August 23, 2024

@dcjones It looks like Shiny is client-server (which is pretty cool by the way), but I was thinking we could just save a sequence of outputs from writemime for the different parameter settings. Then the javascript control would just display the relevant output.

from interact.jl.

dcjones avatar dcjones commented on August 23, 2024

Right, for some reason I was under the impression they also had the ability to cache output like you describe. Now I'm not sure why I thought that. I looks like it does require an R process.

from interact.jl.

johnmyleswhite avatar johnmyleswhite commented on August 23, 2024

I'm pretty sure Shiny always runs R code on a server to do updates.

from interact.jl.

minrk avatar minrk commented on August 23, 2024

Depending on your level of patience, I would recommend waiting for static widget support in IPython (ipython/ipython#5900), which will work on nbviewer without you needing to do anything other than support vanilla widget messages.

from interact.jl.

stevengj avatar stevengj commented on August 23, 2024

Thanks @minrk, that sounds great. I'm going to close this issue in favor of the IPython issue.

from interact.jl.

Related Issues (20)

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.