This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-12
Channels
- # adventofcode (6)
- # announcements (10)
- # beginners (70)
- # boot (55)
- # calva (15)
- # cljs-dev (18)
- # clojure (32)
- # clojure-europe (4)
- # clojure-nl (2)
- # clojure-spec (20)
- # clojure-uk (6)
- # clojurescript (14)
- # cursive (11)
- # datomic (31)
- # figwheel-main (7)
- # fulcro (1)
- # incanter (1)
- # jobs-discuss (3)
- # juxt (1)
- # off-topic (17)
- # onyx (5)
- # pathom (3)
- # pedestal (2)
- # quil (20)
- # re-frame (6)
- # reitit (1)
- # ring (2)
- # rum (5)
- # shadow-cljs (73)
- # spacemacs (5)
- # tools-deps (11)
- # uncomplicate (1)
- # unrepl (1)
- # yada (11)
Hi, I have a question about quil library. How to I call individual functions in the REPL, e.g. quil.core/random? Most quil function can only be run inside sketch functions (I think because of state handling). Is the any way to grab the current state in the repl and execute code?
processing functions are defined in applet class, so every wrapper needs this context.
Actually my question is part of a bigger thing I'm struggling with. I'm quite new to clojure, quil and all the tooling around. Currently I follow the workflow as described here (with fun-mode)
https://github.com/quil/quil/wiki/Dynamic-Workflow-(for-REPL)
That means: open a repl, load the main file (where the defsketch
macro is) and then actual implementation (called dynamic.clj
in the tutorial), i.e. the setup
, draw
and update
functions. Now I start coding by e.g. altering (defn update-state)
followed by either reevaluation of that function or reloading that the whole file (i.e. (use :reload 'sketch.dynamic)
.
However, actually I would like to pause the sket (i.e. the draw loop), play along with functions (figure out what they do and how they work), e.g. quil.core/random and continue the draw loop. But I don't known how to accomplish this.
In my current approach the code must be perfect otherwise I get constantly errors, because of the repeated update/draw calls.
Does quil support my intended workflow, i.e. starting stopping the draw loop or did I miss something (do something wrong)?
that sounds interesting. But like I said, I'm new to clojure. Could you provide an example or a link for further documentation?