This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-01
Channels
- # beginners (59)
- # cider (3)
- # clara (4)
- # cljsjs (4)
- # clojure (144)
- # clojure-finland (2)
- # clojure-italy (10)
- # clojure-russia (2)
- # clojure-spec (7)
- # clojure-uk (53)
- # clojurescript (81)
- # cursive (30)
- # datomic (36)
- # defnpodcast (2)
- # editors (3)
- # emacs (4)
- # events (1)
- # fulcro (12)
- # off-topic (11)
- # onyx (14)
- # parinfer (2)
- # pedestal (12)
- # re-frame (3)
- # reagent (26)
- # shadow-cljs (81)
- # spacemacs (10)
- # sql (59)
- # uncomplicate (4)
- # yada (4)
morning morning
Morning.
Bore da
morning
måååning
Morning
What's news in the world of #clojure-uk?
still serverless-ing
Wrote a library that might be useful to one other person in the World. :thinking_face: I found a paper from 1977 that describes an error-correcting code for alphanumeric data (corrects a single transcription error or a transposition of 2 adjacent characters), and implemented it in Clojure "for fun". Needs some more tests, but it's nearly there!
still wanting to not use clojure, but not having any sane alternative 😬
Which insane alternatives have you tried? 😁
@mccraigmccraig we'll have no anti-clojure treason here brother
@rhinocratic well there is haskell, but i need something that runs on a jvm, and running on js would sure be nice... then there's lux, and while that looks awesome ( @bronsa's syntax-hate aside) for the future it's still not quite there yet... other than that i'm drawing blanks
typed racket ftw (I'm sure someone has written a transpiler somewhere and you can get clojure style literals and other things too)
@mccraigmccraig Afraid I can't think of anything that satisfies those constraints. I also looked at lux and came to the same conclusion - but it looks as though it's worth watching.
This might be surprising but F# is the language I want to learn next, it looks like all of the niceness of Haskell’s type system without the strictness. I’ve been reading this - https://www.amazon.co.uk/Domain-Modeling-Made-Functional-Domain-Driven/dp/1680502549/ and really enjoying it
(and i now have ~100kloc in clojure too, so i'm probably not going anywhere else soon)
@firthh isn't haskell's strictness a big part of the niceness ?
Possibly. I never reached the point in Haskell where I felt productive doing anything that needed IO. Basic toy programs that you could avoid it were nice. Maybe I just need to power through that stage
@alex.lynham I see you're sharing your serverless findings in September
yes I am
didn't realise that was public yet
yes the stuff I've been doing in cljs is how to use serverless with cljs to do a compojure/like backend that you can then build a re-frame app on top
and at work it's been all python and stuff, but I've found myself pinching lots of clojure ideas to make it less icky
honestly if they ever solve the cold start thing for JVM on lambda then clojure is going to destroy for this stuff
🤞 I say
what dyu want from clj || jvm
that you don't get from cljs
@alex.lynham ?
I don't want promises and I don't need async
I want imperative code
I've found that cljs sometimes wrongfoots me with what it returns from an fn and I don't like it. Clojure for me is all about the fewest surprises :)
But that said, I'm using it, I don't mind it, s'all good :)
@alex.lynham what are you using to compose ops with promises ?
Ooh good question
I can't remember without looking at the code
Do you have some recommends?
ha, yeah - most of our code in both clj and cljs is promise-based and reads (mostly) like imperative code. we use a promise-monad from the funcool/cats
lib to achieve this
i've got lots of code if you are interested
Oh yeah, that would be awesome!
Atm my cljs is very 'clj translated into cljs' and there's a few instances where I'm sure there are more idiomatic things. Like 80% of my clojure experience is the jvm one so it's an area where I'm always up for learning more :)
here's an example from our clj cassandra client - it's using an LWT to acquire a unique key. it's a multi-stage process with each i/o op returning a promise (well, a manifold Deferred, but samesame) - https://github.com/employeerepublic/er-cassandra/blob/master/src/er_cassandra/model/alia/unique_key.clj#L54
this is clj, but it works exactly the same with js promises in cljs
here's some stuff from the funcool/cats
docs - http://funcool.github.io/cats/latest/#manifold-deferred
and it works exactly the same with js promises if you use the promesa implementation of the monad - https://github.com/funcool/cats/blob/master/src/cats/labs/promise.cljc