This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-11
Channels
- # announcements (4)
- # babashka (4)
- # beginners (164)
- # calva (47)
- # cider (1)
- # cljs-dev (29)
- # cljsrn (3)
- # clojure (137)
- # clojure-europe (23)
- # clojure-nl (3)
- # clojure-spec (7)
- # clojure-uk (44)
- # clojurescript (35)
- # component (8)
- # conjure (119)
- # cursive (32)
- # datomic (12)
- # emacs (31)
- # figwheel-main (36)
- # graalvm (10)
- # jobs (2)
- # kaocha (1)
- # lein-figwheel (3)
- # meander (15)
- # mount (3)
- # off-topic (9)
- # pathom (8)
- # quil (4)
- # re-frame (13)
- # reagent (15)
- # remote-jobs (10)
- # shadow-cljs (128)
- # slack-help (2)
- # spacemacs (8)
- # test-check (6)
- # xtdb (6)
I'm having a hard time getting started with Quil, I'm new to Clojure and I'm hoping someone here can give me a heading navigating the error reporting in my environment. I'm using Emacs + CIDER to try and work on a simple static image with Quil. I find it very annoying that Quil just prints errors from its draw function in the repl... they're not being raised in a pop-up Emacs buffer like other Clojure errors. To make matters worse, it appends every error to the previous printed error before the repl prompt.
I suppose I'm making matters a little complicated for myself, as I've bound an Emacs key to execute "quil.core/redraw" in the Cider repl so I can make my feedback loop a little tighter. So when I re-evaluate my "draw" function, it automatically calls "quil.core/redraw". But when I make an error every two minutes, I have to think "my drawing didn't update, what happened?" So I switch to the repl buffer, and scroll up a long way through a poorly formatted Clojure error, dig out the error, go back to my code, debug... etc. Usually this is some simple error like using "quil.core/width" as a value instead of a function... and a lot of these simple errors are really easy to make because of Quil's reliance on the (frankly crazy) quirks of Processing.
How did you bind the key to q/redraw
? Since redraw
requires bindings I get a NullPointer when trying to execute it on the repl
Imagine how confusing this is with more than one error, because the errors are all appended to each other in the repl! It's extremely frustrating, and this doesn't feel like the interactive programming that I came to Clojure for. I know that Quil is a quirky library to be starting with, and I still want to fall in love with it, but right now I just can't figure out an enjoyable workflow.