Chirp chirp?
good morning ☀️
morning
Morning
🇨🇩✊🏻
good morning
been working on some D3 diagram code for the past week or so. It's really is quite hard to find the right heuristic for selecting data when you can't show everything. I had this same issue with another diagram type.
Good performance morning
(set! warn-on-reflection true) !
related to @ben.sless’s comment, any recommendations on how to set (set! *warn-on-reflection* true) in development?
The docstring is a bit https://clojuredocs.org/clojure.core/*warn-on-reflection*, and sticking it toplevel in my user.clj doesn't appear to give me reflection warnings.
hook in-ns as in redefine clojure.core/in-ns to do its thing, then (set! *warn-on-reflection* true) ?
seems like the kind of thing we should have a flag for in launchpad (as well as :warn-on-boxed), although it's gonna get noisy if you enable it for all library code as well
I think so. I also think it's insane and error prone, but why not 😄
Maybe I could configure it with a whitelist of namespace prefixes?
(launchpad/main {:namespace-maps false
:nrepl-port 55666
:steps steps
:warn-on-reflection {:namespace-prefixes #{"myorg.myapp" "myorg.mylib"}}})yeah something like that
I intend to experiment with hooking vars with conditional execution but I'd be happy for someone else to put their hand in that crocodile's mouth
$ clj
Clojure 1.12.1
user=> (defn foo [x] (.length x))
Reflection warning, NO_SOURCE_PATH:1:15 - reference to field length can't be resolved.
#'user/foo
user=>
$ cat src/user.clj
(alter-var-root #'*warn-on-reflection* (constantly true))this is still in the user namespace, right, @borkdude?
works for any ns
$ clj
Clojure 1.12.1
user=> (ns foobar)
nil
foobar=> (defn foo [x] (.length x))
Reflection warning, NO_SOURCE_PATH:1:15 - reference to field length can't be resolved.
#'foobar/foohmm. I had trouble producing that behavior locally. I'll try again, maybe CIDER up to something.
you need to use alter-var-root
aaaah, sorry, completely missed that part. Thanks! 🙏
$ cat src/user.clj
(alter-var-root #'*warn-on-reflection* (constantly true))
works perfectly. Thanks again! 😁@plexus nice list! https://github.com/plexus/awesome-creative-clojure
lmk if you know of anything else that can go on there!
still lots of room for expansion... example open source indy games, conference talks, etc.
Applied for Clojurists Together funding to make Piglet Clojurescript-compatible. Fingers crossed! 🤞🏻
Exciting! Make self hosted ClojureScript great again?
Very much agree with your points about clojurescript development experience. Hope you get funded!
SCI also has the JVM-esque architecture (vars, eval) but is interpreted. Cherry on the other hand I consider to be a compiled counterpart of this. You can already use it via https://github.com/squint-cljs/cherry/blob/main/doc/embed.md mode to enable eval in browsers too. Like SCI it leans on the existing ClojureScript project heavily though (by design). Making a scittle and nbb but with cherry is on my list, but I think SCI is actually good enough for most of these use cases, which is why I haven't gotten to yet ;). Stack traces / source maps could be better though, which is a big reason I still want to pursue it. Good luck!
Morning 👋