This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-14
Channels
- # asami (1)
- # babashka (50)
- # beginners (70)
- # bristol-clojurians (6)
- # calva (36)
- # chlorine-clover (1)
- # cider (4)
- # clj-kondo (3)
- # cljdoc (49)
- # cljsrn (5)
- # clojure (96)
- # clojure-australia (3)
- # clojure-dev (1)
- # clojure-europe (84)
- # clojure-nl (4)
- # clojure-spec (9)
- # clojure-uk (65)
- # clojurescript (31)
- # community-development (6)
- # conjure (17)
- # cursive (8)
- # datascript (5)
- # datomic (12)
- # duct (3)
- # emacs (18)
- # figwheel-main (2)
- # fulcro (7)
- # helix (1)
- # jobs (3)
- # luminus (7)
- # off-topic (77)
- # pathom (3)
- # portal (1)
- # rdf (4)
- # re-frame (1)
- # reitit (4)
- # remote-jobs (4)
- # reveal (15)
- # rum (1)
- # sci (38)
- # shadow-cljs (22)
- # spacemacs (1)
- # specter (6)
- # sql (1)
- # test-check (1)
- # tools-deps (60)
- # vim (12)
morning
I do like developing at the repl - I can try out things so quickly, code it up as a test, then try it out and bingo - just works 🙂
it's the thing i miss most about clj tbh
there's no reason you can't repl in js-land is there @alex.lynham?
you can rig up a typescript repl in emacs tbf, but it's just naff
i mean, i already find the cljs repl less useful than the clj one, but everything is async and you can't await stuff easily, so it's just more hassle than writing a unit test tbh
i've used something like this in cljs repl: (defn wait-print [p] (.handle p (fn [success error] (if error (print error) (print success)))))
... and something similar to collect the value/error in an atom - that should work in js repl too ?
yeah i used a similar hack when i was doing cljs/sls stuff
i found it transformational for cljs dev once i got a node-repl going, and could use it pretty much like a clj repl - although CIDER test runner doesn't work, which was sad
idk, it's about going with the grain - it's a pain in TS so i don't do it
it doesn't really add value
and the test watcher for our 400+ tests (db, unit, integration, handler) run in sub 35s, and only run the related changed ones, so that's a better feedback mechanism
anyone here used MongoDb? I've got a n00b question...
not for a while
@rickmoynihan are you folks still using it for bits and pieces?
over my dead body 😆
its only on some legacy stuff providing a small database of users
ah i did wonder if zib (memory, is that right?) had meant it went bye bye
I'm trying to spin up a trivial replicaset for an integration test; everything running locally; every time I try to make a change I get a 'Command failed with error 10107 (NotMaster)'
its never worked as a replicaset, so I'm sure I've just misconfigured something
somehow the initial Master election never happens, maybe?
rs.status()
{
"errmsg" : "no replset config has been received",
"code" : 94,
"codeName" : "NotYetInitialized"
...
}
I guess that's my problemon current project we're using postgres as a nosql store
it's so stable and AWS aurora supports the PG API so
I managed to avoid Mongo until 2020
we've got aws aurora in prod and treat that like a no maintenance nosql store without the faff of dynamo
so if we do need to do complex admin tasks for some reason we can run ad hoc queries which is nice
WebScale innit
it does make me appreciate the thing that datomic has got right
Does anyone have recommends for a templating library, i.e., a template + vars == rendered content. This is not for webpages. I'm thinking of using Thymeleaf (which I've used before)
in recent memory i've used StringTemplate... which was meh... and multiple mustache variants, both home-rolled and imported - i'd probably look at https://github.com/fotoetienne/cljstache , although i haven't used it myself
even in typescript vs js
i reckon conservatively 10% of our code base is in some way basically just dealing with JS being shite at handling null/undefined
infuriatingly typescript helps to a point but tends to kick you when you're down
wasn't really an issue i've ever had in cljs
think the compilation story x lisp parens makes it easier to catch errors at dev time even tho it's dynamic not static
nil
is certainly still a problem in clojure/script but it can’t really have a bullet proof design for it, given it works on platforms where the billion dollar mistake (now surely many, many times that) already exists.
It does however manage to insulate you from many problems handling it, by appropriately nil
punning in the seq/core api’s etc. I can’t really speak for whether typescript does it more or less than clojure, I’m sure it helps a fair bit though.
i think the design of the core api is the key really
because at dev time TS helps a lot
but at runtime you get some DEVASTATING (and i use all caps here because i think they are justified) edge case bugs
gosh darn
just stuff you take for granted in clj(s) too like what happens when you destructure something nested and a key isn't there
in some cases JS will throw, in some cases it's undefined
, it's still a wild west even with the TS layer sometimes