Fork me on GitHub
#quil
<
2019-10-22
>
Zac Bir13:10:14

Lorenz Attractor

👍 12
Zac Bir15:10:19

What are some strategies folks use to debug running quil loops with cider? I’m encountering issues and I’d like to see the state of things at runtime. I can start a normal cider-debug session C-u C-M-x on the draw function and then supply a made up state in the repl and walk through it but it doesn’t trigger on the initial condition, so I’d rather set a breakpoint and catch the exception at the particular state the system is in when it happens.

Zac Bir20:10:16

Hmm, whenever I try to drive a 4096x4096 image, my machine slows to a crawl. I need to set this up headlessly. On my iPhone using Python, I can crank this out in a few seconds.

Alex Miller (Clojure team)21:10:12

the code above is all using boxed numbers, which are about 100x slower than primitives

Alex Miller (Clojure team)21:10:38

some well placed type hints would probably help a lot

Alex Miller (Clojure team)21:10:52

the first set of defs could be marked as both ^:constant and ^long or ^double as appropriate and the state would probably need to be a double or long array (didn't look at it that closely)

Zac Bir22:10:35

Ha, went looking for more info and stumbled on your blog post on just such a topic http://insideclojure.org/2014/12/15/warn-on-boxed/

Zac Bir22:10:27

Thanks for the tips

Alex Miller (Clojure team)23:10:42

it's more disturbing when I search for something and find a blog I wrote that answers the question, which happens regularly