quil

Zac Bir 2019-10-22T13:42:14.029200Z

Lorenz Attractor

👍 3
Zac Bir 2019-10-22T15:37:19.031900Z

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 Bir 2019-10-22T20:52:16.034200Z

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.

alexmiller 2019-10-22T21:12:12.034800Z

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

alexmiller 2019-10-22T21:12:38.035200Z

some well placed type hints would probably help a lot

alexmiller 2019-10-22T21:14:52.036400Z

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 Bir 2019-10-22T22:41:35.037100Z

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 Bir 2019-10-22T22:44:27.037500Z

Thanks for the tips

alexmiller 2019-10-22T23:44:42.038Z

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

Zac Bir 2019-10-22T23:54:09.038300Z

haha