This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-22
Channels
- # announcements (11)
- # architecture (7)
- # babashka (26)
- # beginners (314)
- # calva (20)
- # chlorine-clover (1)
- # cider (5)
- # circleci (27)
- # clara (6)
- # clj-kondo (41)
- # cljsrn (6)
- # clojure (120)
- # clojure-berlin (2)
- # clojure-czech (2)
- # clojure-dev (4)
- # clojure-europe (45)
- # clojure-france (4)
- # clojure-germany (1)
- # clojure-nl (5)
- # clojure-uk (20)
- # clojuredesign-podcast (8)
- # clojurescript (6)
- # conjure (42)
- # datascript (5)
- # datomic (21)
- # deps-new (28)
- # duct (1)
- # fulcro (36)
- # graalvm (10)
- # graphql (24)
- # jackdaw (19)
- # jobs (2)
- # jobs-discuss (46)
- # kaocha (6)
- # malli (26)
- # off-topic (21)
- # parinfer (5)
- # re-frame (10)
- # sci (19)
- # shadow-cljs (95)
- # tools-deps (24)
- # vim (3)
¡månmån!
morning
was just reading the source code of a lib we depend on p heavily
and maybe i'm feeling @dominicm 's rage at js today
what's the guilty lib @alex.lynham?
some real 'wow okay, you didn't need to reimplement that' moments
the js jsonschema impl
some highlights
https://github.com/tdegrunt/jsonschema/blob/8bbf2c4e10c2290535f41ac9347f361649976745/lib/helpers.js#L228 ^ where instead of using the ok lodash or excellent ramda libs, they reimplement a bunch of merging utils
https://github.com/tdegrunt/jsonschema/blob/8bbf2c4e10c2290535f41ac9347f361649976745/lib/helpers.js#L116 ^ where there's a random set of regexes when there are libs that cover the RFC regexes (admittedly this one isn't so bad, but I do have to trust them, as they're pretty hard to visually parse)
and this lovely bit of code, which was the source of a bug AFAICT https://github.com/tdegrunt/jsonschema/blob/8bbf2c4e10c2290535f41ac9347f361649976745/lib/validator.js#L202 there's so much mutation going on it's hard to tell what's happening, plus loads of OO misdirection
i worked it out in the end but HOO BOY
been meaning to look at switching to the ajv
lib and this has just accelerated that