Fork me on GitHub
#clojure-uk
<
2020-01-22
>
dharrigan02:01:05

It's fubared

dharrigan06:01:38

Tis fixed now

thomas12:01:46

So here is a shameless plug a website that a colleague build: https://www.plantaforest.io/

thomas12:01:48

An API that allows you to donate towards planting tree directly from you product.

Conor12:01:57

A much better idea than the 'monetize your API via Blockchain' thing I saw recently

flefik12:01:04

I love the idea but 10% service fee seems steep. Ugh

Ben Hammond13:01:20

he was very ill

thomas13:01:46

@cfeckardt I agree, that is a bit on the steep side. I'll pass the feedback on.

peterwestmacott15:01:03

(into {} [[1 2]])
=> {1 2}

peterwestmacott15:01:26

(into {} (map #(map identity %) [[1 2]]))
ClassCastException java.lang.Long cannot be cast to java.util.Map$Entry  clojure.lang.ATransientMap.conj (ATransientMap.java:44)

mccraigmccraig15:01:44

do the individual entries need to be vectors rather than lists @peterwestmacott?

peterwestmacott15:01:22

nothing needs to be anything. I'm just trying to understand why this fails

mccraigmccraig15:01:05

(into {} (map #(mapv identity %) [[1 2]]))

mccraigmccraig15:01:23

the map-entry pairs need to be a vector rather than a list

👍 1
peterwestmacott15:01:57

yes, that seems to be it

peterwestmacott15:01:05

the error is rather confusing though

mccraigmccraig15:01:02

yeah, not sure where the long in the message comes from

mccraigmccraig15:01:14

obvs from the first element of the map-entry pair, but how come it's not clojure.lang.PersistentList cannot be cast to java.util.Map$Entry

mccraigmccraig15:01:19

oh, the clojureverse post explains it... but yeah, confusing error

dharrigan15:01:41

this works too (into {} (map #(identity %) [[1 2]])), but that's probably not what you want 🙂

dominicm15:01:57

There's a clojureverse on this

dharrigan17:01:31

So, update - my production Clojure application is merrily chugging along - over 21 MILLION trips processed since the weekend and over 4 MILLION speeding violations

dharrigan17:01:47

I think I'll end my updates there. Safe to say, that Clojure has more than proven it's worth 🙂

👏 2
dharrigan17:01:19

You know what has been enormously useful - just for now - whilst I'm bedding this in - is to be able to attach a REPL to the remote application and change something in real time (some little bug fixes that were required - and were eventually rolled out via an automatic deploy shortly there after). However, having the ability to do that is really a (dangerous - but useful) soooopar power 🙂

seancorfield18:01:15

That's awesome @dharrigan! 'grats!

seancorfield18:01:11

Love having the REPL into production -- even just for debugging, it's super valuable. And for those occasional, must-have, on-the-fly fixes... yup!

flefik18:01:18

@dharrigan im probably in there somewhere. If I PM you my licence plate number can you do a little ‘snip snip’ in the database?