Fork me on GitHub
#clojure-uk
<
2021-04-08
>
dharrigan05:04:13

Good Morning!

3
dharrigan05:04:16

Anyone know an android/ios developer looking for a small side gig?

thomas08:04:25

I can do React Native if that is what you are looking for

djm06:04:02

You know it's going to be a good day when you upgrade IntelliJ, and it refuses to let you work on your (non-android) project anymore, because you don't have an Android SDK installed 😁

seancorfield06:04:57

@djm_uk Is that the April update that folks were asking “Does it work with Cursive?“?

djm06:04:20

It was released yesterday.

djm06:04:27

Does it work with Cursive?

djm06:04:54

I was surprised to see how popular Cursive is, on the State of Clojure results

seancorfield16:04:23

Yeah, I’m surprised too. I don’t like big, bulky, Java IDEs 😞 I used Emacs for years (technically “decades” but it was off and on), then switched to Atom, then VS Code (the third most popular Clojure editor).

djm05:04:13

I never got the hang of VS Code. I'm generally uncomfortable without vim's modal editing, but have been having some fun with emacs recently.

djm05:04:54

Sure, but then I could just use vim instead ;)

djm05:04:19

I wonder how well it works though - when I used to have to use Eclipse, there was a vim plugin that worked pretty well (despite a few rough edges). Now that I have to use IntelliJ, I have found that the vim plugin conflicts with IJ's own keybindings way too much

danm14:04:49

Wee, inter-thread communication pain facepalm

mccraigmccraig16:04:10

always fun @carr0t - use a queue/stream/chan ?

danm16:04:31

Naah, I was just being a moron

danm16:04:38

I had a (try ... (a/go ...) (catch ...) (finally ...)) where I was assoc ing an object into an atom in the try and expecting another thread to be able to see it. But I had put a form to dissoc the object in the finally to clean up if there was an error, when it should have been in the catch and the async body in the go block. As it was the function was returning (because async), which was meaning the finally was executing and cleaning up the object before the other thread had chance to see it

thomas08:04:42

@carr0t maybe a bit late... but I think the (preferred) way for observing changes to an atom is with agents and that would be async as well and on another thread.

danm08:04:20

But if the agent is async, how can I be sure that the value has actually been set before doing more work which is dependent on the other thread having the newly set content visible?

danm16:04:39

Now I just have more ring/Jetty async fun, and it might well be that the answer is "stop using Jetty, it's making your life harder" ;)

mccraigmccraig16:04:39

haha, i don't think i've used jetty for a very very long time

mccraigmccraig16:04:45

being a moron is my biggest problem too 🙊

danm16:04:46

This is my problem:

mccraigmccraig18:04:54

ah, yeah... finally can be something of a pain if you mix sync and async contexts... i generally force things to be async and then just use whatever async equivalent of finally you have

danm13:04:03

Turned out I also needed to upgrade the version of Ring to fix some issues, but not upgrade it too far... https://github.com/ring-clojure/ring/issues/436 😉