Fork me on GitHub
#clojure-europe
<
2020-09-16
>
orestis04:09:37

Good morning!

slipset05:09:16

Good morning!

slipset05:09:51

WRT the java versions. I wish they could split this stuff into at least three things. Jvm, language, and std library. As a Clojure dev I have little interest in the evolution of the language nor the std lib, but the evolution of the jvm is interesting.

slipset05:09:54

Like, I don’t care if java the language is at ver 25, it a bump in jvm version might be very interesting.

genRaiy08:09:32

I know what you mean but they often have bug fixes and performance improvements in the core SDK so it's not just the JVM that matters to us

pez05:09:17

Good morning. My mind is a bit blown by what3words: https://what3words.com/snapped.trip.segments

pez05:09:25

That particular location is a common meeting place in Stockholm city. ”Let's meet by the mushroom at Stureplan” and everyone knows where you mean. Switch to satellite view on that site and zoom in and you'll sort of figure why ”mushroom”.

pez05:09:28

https://en.wikipedia.org/wiki/Stureplan (there's a photo of ”the mushroom” there).

jasonbell18:09:14

I love What3Words, want to get it integrated into DeskHoppa but I’m concerned there’s commercial licensing restrictions. Need to look closer into it.

pez18:09:28

I heard @U0H9BVB98 complain about the license as well.

Niclas09:09:09

It just feels to me like a solution that should be open to everybody without monetization

dharrigan05:09:41

Good Morning!

genRaiy08:09:40

also .... morning

genRaiy09:09:50

can I also add that Slack threads hurt the MX of this channel (where MX is My eXperience and not some fucking emacs thing 😝 )

slipset09:09:07

We all understood that it wasn't an emacs thing, because the emacs thing is written M-x as in M-x all-hail-emacs.

genRaiy09:09:34

why oh why reply via a thread .. I'm so triggered :)

slipset09:09:15

If there is any consolation, I hate threads as well.

genRaiy10:09:51

there is none while you keep doing things we both hate :)

otfrom16:09:50

there are 2 kinds of languages. Those people don't use and those people complain about. 😄

otfrom09:09:12

I dislike that you can't easily get back to the context just from the top of a thread

zoldar09:09:30

👋 morning

orestis10:09:18

Urban dictionary is helpful in defining UGT, but only after giving me the naughty stuff first 🤪

😄 6
dharrigan10:09:35

There's a link at the top - the channel topic 🙂

pithyless10:09:12

> Now, instead of spending time figuring out what time of day is it for every member of the channel, we spend time explaining newcomers benefits of UGT. Sounds eerily similar to most programming related topics. 😂

😄 9
otfrom12:09:34

I figure most people here are GMT +/- 3?

genRaiy13:09:40

where are the -3 folks?

genRaiy13:09:20

please show yourselves :)

slipset13:09:13

I’m a 10X

😂 3
otfrom14:09:45

@raymcdermott some Greenlanders apparently?

genRaiy14:09:40

haha yeah I understand the theory but is it a reality?

otfrom14:09:23

and I don't think we're really that picky here about where people are from or where they are living. It is just more lively during GMT day time

otfrom14:09:40

@raymcdermott my fat bike would be a lot of fun in Greenland

genRaiy14:09:16

we couldn't be fussy if we wanted to be ... but of course, all can come 🙂

otfrom14:09:32

first time really using cond-> today

clj 3
otfrom16:09:49

so far. I seem to be really bad at it. 😭

pez16:09:51

Haha (if that is appropriate, but you made me lol). What do you find hard about it?

Dmytro Bunin16:09:33

bad is falthy, so i guess he cannot execute what he wants?

otfrom16:09:03

I was aiming for lols. I've just not used it and I'm a bit tired today, so I first wasn't using cond-> right (not acting on the threaded item) and then messed up my update statement

otfrom16:09:30

hmm... update the last item of a vector?

user> (def my-vec [1 2 2])
#'user/my-vec
user> (update my-vec (dec (count my-vec)) inc)
[1 2 3]

otfrom16:09:38

surely there must be a better way?

pez16:09:10

Not sure about better, but here's a way

(-> my-vec
      drop-last
      vec
      (conj 3))

pez16:09:35

No, you want to inc...

otfrom16:09:24

yeah, I'm actually doing a fair amount of work on the last map in a vector based on a new map coming in in the middle of a reduce

otfrom16:09:55

the new record might mean that I have to edit the old one, so having a way of accessing it quickly and editing it quickly is what I need

otfrom16:09:02

peek works for access, but not for editing

otfrom16:09:19

IIRC count of a vector is O(1)

otfrom16:09:23

it is O(n) on a list

pez16:09:57

Yes, I don't think your way is inefficient at all.

Dmytro Bunin16:09:06

sounds like specter would be a nice fit for this

Dmytro Bunin16:09:11

or other lens library

Dmytro Bunin16:09:22

but then you will introduce a dependency

otfrom16:09:53

yeah, I'd like to avoid that unless I need to. What I have works and is OK. I just feel like I must be missing something obvious in core

Dmytro Bunin16:09:11

be careful with seq’s though 😉

otfrom16:09:56

yeah, need to make sure I have vectors and they stay vectors

otfrom16:09:06

don't want to add on the wrong end

Dmytro Bunin17:09:15

i believe you cannot update seqs by index at all, maybe im wrong though

slipset18:09:18

To me it sounds strange to want to update the last thing of a thing. This makes me believe you have a n- tuple rather than a vector of random size?

👍 3
slipset18:09:06

Which might suggest that you could model this either as a map (with known keys) or that last will always be two and the sequence will always be a vector, so you could (update 3-tuple 2 inc) or somesuch

ordnungswidrig07:09:39

@U0525KG62 would you take advantage in storing the vectors in reverse during the reduce? That way you could take advantage for [head & rest] destructuring

otfrom07:09:50

Hmm.. I need to conj a new item on after editing the previous which makes it tricky

otfrom07:09:40

@UFY00FM0B you can use the index of an item in a vector like a key

Dmytro Bunin07:09:54

yeah, but not a lazy seq

Dmytro Bunin07:09:56

that’s what I meant

otfrom07:09:18

@U04V5VAUN the vector grows as I add new items

otfrom07:09:20

Normally I would do a map but I can't in this instance which is why I'm finding myself inexperienced

Dmytro Bunin07:09:47

cljs.user=> (update '(1 2) 1 inc)
Execution error (Error) at (<cljs repl>:1).
No protocol method IAssociative.-assoc defined for type cljs.core/List: (1 2)

Dmytro Bunin07:09:51

okay I’m not crazy 😄

otfrom07:09:31

@UFY00FM0B you are completely correct about seqs and lists

otfrom07:09:36

If your list was a vector then that update would work. I'm not at a repl atm tho

Dmytro Bunin08:09:52

yes, you are right

otfrom09:09:03

just need to make sure nothing mashes your vector into a seq (which can be tricky)

ordnungswidrig11:09:07

and potentially expensive. Transducers could help

otfrom11:09:42

Yeah, this is all in a transducer chain

slipset05:09:16

Good morning!