This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-11
Channels
- # announcements (2)
- # beginners (30)
- # biff (6)
- # calva (4)
- # cider (4)
- # clj-yaml (3)
- # clojure (14)
- # clojure-europe (43)
- # clojure-nl (8)
- # clojure-norway (34)
- # clojure-uk (2)
- # clojurescript (11)
- # clr (2)
- # conjure (3)
- # cursive (1)
- # datomic (18)
- # helix (1)
- # humbleui (6)
- # hyperfiddle (110)
- # java (25)
- # kaocha (2)
- # lsp (29)
- # missionary (7)
- # off-topic (9)
- # pathom (106)
- # polylith (27)
- # rdf (12)
- # re-frame (9)
- # releases (4)
- # spacemacs (2)
- # tools-build (4)
- # tools-deps (6)
måning
Glad to hear if @U052852ES
Are you thinking that spec might actually see a non-alpha release Ray? ... or just hopeful that something else may come of it?
I mean, that would be great. I don't know why it stalled out, but if it was work pressure - and we get that - it would be a wonderful contribution.
> I can't disagree with anything you say except intelij being better than emacs, obviously ... 😜
(when-not (resolve 'clojure.core/parse-long)
(defn parse-long [s]
(Long/parseLong s)))
yet when I pull in the namespace, it seems to return 'nil' for the resolve, thus it evals the (defn
...
i.e., (require '[foo.bar :as f])
gives me a WARNING: parse-long already refers to: #'clojure.core/parse-long in namespace: foo.bar
I don't understand why the resolve would return a nil (obviously, I'm using clojure 1.11+)
I guess it would be easier to do :refer-clojure :exclude [parse-long]
instead. Although my question still remains 😉
This is because defn
causes an analysis-time side effect, always creating the var. It's better to do this via a macro:
(defmacro when-not-exists [sym body]
(when-not (resolve sym) body))
user=> (when false (def x 10))
nil
user=> x
#object[clojure.lang.Var$Unbound 0x5c20ffa8 "Unbound: #'user/x"]

Hah, that's curious behaviour 🙂
A little gotcha
Just https://www.youtube.com/watch?v=jTX45V5JuN4 by the ThoughtWorks CTO and her favourite fitness function is the Simian Army. This is nice but er, a bit fancy IMHO. Is there a term such as 1% architecture? By which I mean the FANGs are the 1% (or even 0.1% or 0.01% etc) and the rest of us can do monoliths and a DB without the need for monkeys?
@raymcdermott At what point does "a monolith and a DB" get complex enough to warrant more "advanced" approaches? I agree that the FAANGs of this world have crazy complexity scale issues to deal with but I think they also have some interesting insights into dev/test workflows to offer... Many decades ago, the small UK company I worked for was big into testing and software QA (and static analysis) and one of the things we worked on was mutation testing: you have a testing engine that makes small, random code changes and runs the test suite to see if you could detect the change/breakage. We did quite a bit of work on compilers, runtime systems, and test suites 🙂 So I inherently like the Simian Army / "chaos testing" stuff.
It’s definitely interesting technology. And of course there are patterns outside of monolith + DB (eg event driven) that are interesting. But I feel like there’s a significant danger of finding complexity in edge cases that won’t often happen or matter.
True, you have to judge how likely you are to run into those edge cases -- and you have to be aware of the trade offs being made and whether they're appropriate trade offs for your company.
@slipset with Clojure meetup invite and skies with beautiful views - Norway is treating me good 😇