clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
orestis 2020-09-16T04:00:37.332700Z

Good morning!

jiriknesl 2020-09-16T04:49:11.332900Z

Morning

slipset 2020-09-16T05:25:16.333300Z

Good morning!

slipset 2020-09-16T05:27:51.336900Z

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.

slipset 2020-09-16T05:28:54.338200Z

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

raymcdermott 2020-09-16T08:54:32.347Z

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

pez 2020-09-16T05:39:17.339600Z

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

jasonbell 2020-09-16T18:28:14.370600Z

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.

pez 2020-09-16T18:34:28.371300Z

I heard @looveh complain about the license as well.

Niclas 2020-09-17T09:03:09.383700Z

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

pez 2020-09-16T05:42:25.343400Z

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”.

pez 2020-09-16T05:47:28.344900Z

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

dharrigan 2020-09-16T05:52:41.345300Z

Good Morning!

synthomat 2020-09-16T05:54:54.345600Z

Helloouw

2020-09-16T06:22:08.345900Z

Morning!

jiriknesl 2020-09-16T07:01:21.346100Z

Morning

thomas 2020-09-16T07:38:18.346300Z

Morning

raymcdermott 2020-09-16T08:52:40.346900Z

also .... morning

2020-09-16T08:55:29.347600Z

moin moin

raymcdermott 2020-09-16T09:00:50.349Z

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

slipset 2020-09-16T09:11:07.349300Z

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.

2020-09-16T09:13:45.349900Z

re: https://clojurians.slack.com/archives/CBJ5CGE0G/p1600246850349000, yeah I think so too

2020-09-16T09:14:12.350400Z

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

slipset 2020-09-16T09:18:15.351Z

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

plexus 2020-09-16T09:23:45.351300Z

Morgen!

zoldar 2020-09-16T09:34:30.351500Z

👋 morning

orestis 2020-09-16T10:18:18.352500Z

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

😄 2
dharrigan 2020-09-16T10:20:35.352900Z

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

raymcdermott 2020-09-16T10:57:51.354800Z

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

pithyless 2020-09-16T10:58:12.355Z

> 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. 😂

😄 3
2020-09-16T12:29:34.355900Z

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

raymcdermott 2020-09-16T13:03:40.356500Z

where are the -3 folks?

raymcdermott 2020-09-16T13:05:20.357100Z

please show yourselves :)

slipset 2020-09-16T13:23:13.357400Z

I’m a 10X

😂 1
2020-09-16T14:11:45.358100Z

@raymcdermott some Greenlanders apparently?

raymcdermott 2020-09-16T14:12:40.358700Z

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

2020-09-16T14:14:23.359800Z

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

2020-09-16T14:14:40.360100Z

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

raymcdermott 2020-09-16T14:17:16.361200Z

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

2020-09-16T14:54:32.361500Z

first time really using cond-> today

1
2020-09-16T16:06:49.362Z

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

pez 2020-09-16T16:07:51.362100Z

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

2020-09-16T16:08:33.362700Z

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

2020-09-16T16:18:30.363900Z

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]

2020-09-16T16:18:38.364200Z

surely there must be a better way?

ordnungswidrig 2020-09-17T07:07:39.374Z

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

2020-09-17T07:16:50.374200Z

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

2020-09-17T07:17:40.374400Z

@dmytro.bunin you can use the index of an item in a vector like a key

2020-09-17T07:17:54.374600Z

yeah, but not a lazy seq

2020-09-17T07:17:56.374800Z

that’s what I meant

2020-09-17T07:18:18.375Z

@slipset the vector grows as I add new items

2020-09-17T07:20:20.375200Z

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

2020-09-17T07:23:47.375600Z

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)

2020-09-17T07:23:51.375800Z

okay I’m not crazy 😄

2020-09-17T07:38:31.376Z

@dmytro.bunin you are completely correct about seqs and lists

2020-09-17T07:42:36.376800Z

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

2020-09-17T08:11:52.382300Z

yes, you are right

2020-09-17T09:37:03.383900Z

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

ordnungswidrig 2020-09-17T11:00:07.385200Z

and potentially expensive. Transducers could help

2020-09-17T11:21:42.385400Z

Yeah, this is all in a transducer chain

2020-09-16T16:23:50.364300Z

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

pez 2020-09-16T16:29:10.364500Z

Not sure about better, but here's a way

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

pez 2020-09-16T16:30:35.364700Z

No, you want to inc...

2020-09-16T16:31:24.364900Z

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

2020-09-16T16:31:55.365100Z

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

2020-09-16T16:32:02.365300Z

peek works for access, but not for editing

2020-09-16T16:32:19.365500Z

IIRC count of a vector is O(1)

2020-09-16T16:32:23.365700Z

it is O(n) on a list

pez 2020-09-16T16:35:57.366Z

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

2020-09-16T16:36:03.366400Z

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

2020-09-16T16:36:06.366700Z

sounds like specter would be a nice fit for this

2020-09-16T16:36:11.367Z

or other lens library

2020-09-16T16:36:22.367500Z

but then you will introduce a dependency

2020-09-16T16:36:53.367700Z

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

2020-09-16T16:41:11.368900Z

be careful with seq’s though 😉

2020-09-16T16:58:56.369100Z

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

2020-09-16T16:59:06.369300Z

don't want to add on the wrong end

2020-09-16T17:09:15.370400Z

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

jasonbell 2020-09-16T18:28:22.370900Z

Morning

raymcdermott 2020-09-16T18:30:52.371Z

have you seen https://github.com/vvvvalvalval/supdate

slipset 2020-09-16T18:39:18.371500Z

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?

👍 1
slipset 2020-09-16T18:41:06.371700Z

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