Giter Site home page Giter Site logo

Comments (3)

helins avatar helins commented on June 8, 2024

Hi,

A ctx is functionnally pure, it's just Clojure data structures and functions, so using fun-mode can help with state management. Indeed, writing Quil examples would be too time consuming at the moment. Overall, it depends how comfortable you are both with Quil and DSim. I have had mixed responses for DSim, where people either understand very well where this is going or have a hard time. So I find it hard to target both. I would advice to just focus on DSim for the moment, without any drawing whatsoever, just get how it works.

Then I hope it becomes more straightforward to imagine how to use it for drawing since this is just about managing state over time. There is nothing too specific about that state when it comes to drawing, akin to how Re-frame uses generic Clojure data structures for building UIs for instance.

I know @flyingmachine has been grokking with animation but I don't know how far or how well that went :)

from dsim.cljc.

flyingmachine avatar flyingmachine commented on June 8, 2024

My little dsim/d3 experiment went well! The animation was meant to show requests and responses for a collection of nodes in a server cluster.

I used dsim to model request timelines, something along the lines of:

  • At t0 (time 0) msg0..8 (messages 0-8) are at n0 (node 0)
  • At t15 msg0..2 are at n1, msg3..5 are at n2
  • at t18 msg6..8 are at n3

This dsim timeline would describe the location of each request in reference to time zero. To produce animations, however, I needed the duration of each message's trip between nodes; if msg5 is at n1 at t15 and n2 at t30, the duration is 15. That just required writing a little helper function to derive these values from the dsim timeline data.

Hope this helps.

from dsim.cljc.

helins avatar helins commented on June 8, 2024

Thanks!
(feel free to share if there is something online :) )

from dsim.cljc.

Related Issues (4)

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.