Fork me on GitHub
#clojure-uk
<
2016-07-15
>
paulspencerwilliams12:07:01

Hey all, hopefully a quick one….

paulspencerwilliams12:07:25

Can anyone suggest why mapping over this:

#object[java.util.Collections$UnmodifiableRandomAccessList 0x60a7e509 [{date=2016-06-13, quantity=37, cost=0, mileage=24}, {date=2016-06-17, quantity=33.61, cost=37.95, mileage=426}, {date=2016-06-20, quantity=22.12, cost=24.97, mileage=683}, {date=2016-06-24, quantity=36.69, cost=41.42, mileage=1134}, {date=2016-06-30, quantity=36.95, cost=40.61, mileage=1577}, {date=2016-07-06, quantity=39.71, cost=44.83, mileage=2063}, {date=2016-07-09, quantity=25.58, cost=28.88, mileage=2386}, {date=2016-07-16, quantity=32.72, cost=36.94, mileage=2783}]]

paulspencerwilliams12:07:34

with

(map
                    (fn [m]
                      (update m "date" (fn [d] (f/parse (f/formatter :date) d))))
                    (.asMaps fill-ups))

paulspencerwilliams12:07:57

causes

java.lang.ClassCastException: java.util.Collections$UnmodifiableMap cannot be cast to clojure.lang.Associative

minimal12:07:43

Looks like you’ll need to use whatever methods UnmodifiableMap provides, rather than update

paulspencerwilliams12:07:31

@minimal: yeah. I was expecting .asMaps to return a sequence of clojure maps, but it doesn’t appear to be...

minimal12:07:32

yeah, that lib knows nothing about clojure maps.

korny13:07:45

It’s a good day when you find a broken JDK “feature” :-}

korny13:07:51

I’ve been hacking at ActiveMQ using Jepsen, and discovered that Java exclusive FileLocks aren’t actually exclusive - at least not how ActiveMQ uses them.

korny13:07:57

Seems ActiveMQ’s “shared filesystem master/slave” model is fundamentally broken when you have a network split. Whee! 🙂

thomas14:07:09

Clojure O’Clock…. woohoo

martintrojer15:07:55

having an absolute blast with Purescript

mccraigmccraig15:07:44

how are you interacting with the dom ? through a react wrapper @martintrojer , or some other way ?

otfrom21:07:24

coup in Turkey? I just can't keep up any more