Good morning!
Morning
Good morning!
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.
Like, I don’t care if java the language is at ver 25, it a bump in jvm version might be very interesting.
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
Good morning. My mind is a bit blown by what3words: https://what3words.com/snapped.trip.segments
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.
I heard @looveh complain about the license as well.
It just feels to me like a solution that should be open to everybody without monetization
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”.
https://en.wikipedia.org/wiki/Stureplan (there's a photo of ”the mushroom” there).
Good Morning!
Helloouw
Morning!
Morning
Morning
also .... morning
moin moin
can I also add that Slack threads hurt the MX of this channel (where MX is My eXperience and not some fucking emacs thing 😝 )
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
.
re: https://clojurians.slack.com/archives/CBJ5CGE0G/p1600246850349000, yeah I think so too
I dislike that you can't easily get back to the context just from the top of a thread
If there is any consolation, I hate threads as well.
Morgen!
👋 morning
Urban dictionary is helpful in defining UGT, but only after giving me the naughty stuff first 🤪
There's a link at the top - the channel topic 🙂
there is none while you keep doing things we both hate :)
> 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. 😂
I figure most people here are GMT +/- 3?
where are the -3 folks?
please show yourselves :)
I’m a 10X
@raymcdermott some Greenlanders apparently?
haha yeah I understand the theory but is it a reality?
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
@raymcdermott my fat bike would be a lot of fun in Greenland
we couldn't be fussy if we wanted to be ... but of course, all can come 🙂
first time really using cond->
today
so far. I seem to be really bad at it. 😭
Haha (if that is appropriate, but you made me lol). What do you find hard about it?
bad is falthy, so i guess he cannot execute what he wants?
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]
surely there must be a better way?
@otfrom would you take advantage in storing the vectors in reverse during the reduce? That way you could take advantage for [head & rest]
destructuring
Hmm.. I need to conj a new item on after editing the previous which makes it tricky
@dmytro.bunin you can use the index of an item in a vector like a key
yeah, but not a lazy seq
that’s what I meant
@slipset the vector grows as I add new items
Normally I would do a map but I can't in this instance which is why I'm finding myself inexperienced
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)
okay I’m not crazy 😄
@dmytro.bunin you are completely correct about seqs and lists
If your list was a vector then that update would work. I'm not at a repl atm tho
yes, you are right
just need to make sure nothing mashes your vector into a seq (which can be tricky)
and potentially expensive. Transducers could help
Yeah, this is all in a transducer chain
there are 2 kinds of languages. Those people don't use and those people complain about. 😄
Not sure about better, but here's a way
(-> my-vec
drop-last
vec
(conj 3))
No, you want to inc
...
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
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
peek works for access, but not for editing
IIRC count of a vector is O(1)
it is O(n) on a list
Yes, I don't think your way is inefficient at all.
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
sounds like specter would be a nice fit for this
or other lens library
but then you will introduce a dependency
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
be careful with seq’s though 😉
yeah, need to make sure I have vectors and they stay vectors
don't want to add on the wrong end
i believe you cannot update seqs by index at all, maybe im wrong though
Morning
have you seen https://github.com/vvvvalvalval/supdate
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?
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