Fork me on GitHub
#off-topic
<
2018-08-27
>
souenzzo11:08:41

There is some clojure repl that allows to cancel the current evaluation, like bash?

valtteri11:08:29

At least Cider has cider-interrupt > Interrupt any pending evaluations.

👍 4
valtteri12:08:14

I don’t know how it works under the hood though.

john16:08:48

Doesn't work for CLJS though

pablore16:08:39

I need to setup messaging between an elixir server and a clojure server. What are my alternatives?

polymeris19:08:37

I would first figure out whether I need sync or async messages, FIFO or not, at-most-once, etc, and then narrow it down from there

pablore01:08:09

Async and FIFO

pablore17:08:25

The format (transit, json, etc) is not as important as the transport (http, other). There is phoenix socket, but it doesn’t have a client for clojure. Would a 2-way message queue do this job?

john18:08:15

maybe websockets?

4
pablore01:08:12

Tried websockets, but now we are thinking something more close to TCP

john01:08:46

That should work then. If elixir exposes some generic tcp socket server, you should be able to find lots of example implementations of socket clients built in clojure, if not java implementations you can write in clojure

john01:08:06

What's the application?

Ramzi18:08:47

Do you believe God uses Clojure?

john18:08:13

most likely

mpenet19:08:02

STOMP comes to mind

mpenet19:08:37

But websocket is prolly easier

hiredman20:08:56

a big question for messaging is if you are going to introduce a broker (like rabbitmq or whatever). if not for whatever reason, then an http rest kind of endpoint usually seems like the best thing to do (most languages can make PUTs of whatever payloads to each other just fine)

john22:08:01

along the lines of our previous discussion on "lock-free", GC free data structures, there appears to be some prior art here: https://aturon.github.io/blog/2015/08/27/epoch/

john22:08:13

"There are a few non-GC-based ways of managing memory for lock-free code, but they all come down to the same core observations: There are two sources of reachability at play – the data structure, and the snapshots in threads accessing it. Before we delete a node, we need to know that it cannot be reached in either of these ways. Once a node has been unlinked from the data structure, no new snapshots reaching it will be created."

john23:08:41

According to the above blog, these data structures can be faster than their GC'd counterparts. And with wasm or graal, we can spin up SABs between any number of languages. So we could run functions from hosts that clojure targets, leveraging the benefits of the host language, but still talking a common lingua franca across the sab.

john23:08:39

So host/languages better at one algorithm can focus on one part of a data structure and other hosts can focus on other parts, from different threads, but operating on the same shared data at the same time. And it could sorta decouple clojure algorithms from a particular host's GC, when operating over the sab. Seems like a pretty good idea.

john23:08:59

So who wants to build this thing?

john23:08:04

... though... I don't know the way...