Fork me on GitHub
#clojure
<
2021-07-08
>
John Bradens02:07:29

I can't open the cljdoc .org website. Is anyone else having this problem? Is there a better way to read documentation? I'm new to clojure. Thank you.

dpsutton03:07:00

it's been down for some time today

John Bradens03:07:05

Ok thanks! Good to know it's not just me.

Matti Uusitalo06:07:45

I was having trouble with the little amount of examples for gen-class. I couldn’t find any example online where arguments are passed to the superclass, so I added https://clojuredocs.org/clojure.core/gen-class to illustrate how to call the superclass constructor. Hopefully the example is clear.

👍 6
Toyam Cox06:07:35

I'm trying to find a library/demo of a library like tilakone, where all state management was done by defining side effects in a single event map and then streaming events. To demo it, this person had written a 2d I think dungeon crawler. My interest is in the state management library, it was mentioned I think in this room some 12 months ago as an upcoming and very appealing way to manage state, and I found it interesting.

Toyam Cox18:07:41

YES!!!!! Thank you!!

👍 3
roklenarcic17:07:10

Hm more interesting discoveries working with core.async. Running alts!! on multiple channels will select nil value from closed channels, which was surprising (i would expect they get ignored). Seems to be quite challenging to distinguish when a channel is closed when you try to non-blockingly read from channel. poll! behaves the same if channel is closed or there is no value in buffer.

phronmophobic17:07:30

This follows from the behavior of close! https://clojuredocs.org/clojure.core.async/close! > Data in the channel remains available for taking, until > exhausted, after which takes will return nil. If there are any > pending takes, they will be dispatched with nil. I don't have a core.async repl handy, but you should be able to do something like the following:

(let [[v _] (alts!! [ch] :default :nothing-to-read)]
  (case v
    nil "channel is closed"
    :nothing-to-read "nothing to read yet"
    ;; else
    (str "read value is: " v)))e

roklenarcic18:07:35

that helps thanks

roklenarcic18:07:43

hm it seems it doesn’t work for me

roklenarcic18:07:54

it returns nil

ghadi18:07:47

closed channels are always readable (returning nil). Recur and remove the close channel from the alts selection

roklenarcic19:07:57

I had that idea but since alts is a macro I wasn’t quite sure how to pass it sequence fof channels that changes over time

phronmophobic19:07:53

alt!! is a macro, but alts!! is function

didibus00:07:13

I still get confused here and there with nil as closed, and sometimes I wonder if that was a good decision. For some things it makes sense, for others it makes things trickier.

Ben Sless09:07:50

If you're doing iteration over the channels the closed channel should be removed, as async/merge does

rymndhng18:07:05

looks like the recording for “A History of Clojure” is out! https://www.pldi21.org/prerecorded_hopl.11.html

👍 52
🎸 27
clj 5
dominicm20:07:58

So much audio equipment 😮

👍 8
vemv00:07:52

the digital drum pads are a nice touch

Paul05:07:41

wow! i love Rich's music studio...

littleli08:07:59

It was really nicely presented. Imagine he was just looking into camera, and there was no live audience. His presentation and the one about Smalltalk were really nice. Good job, as always.

craftybones09:07:12

I remember Rich mentioning owning either an ES335 or some other hollow body, maybe an Epiphone from some other video. Didn’t see that on the wall though

craftybones09:07:29

Also, didn’t expect Rich to have a practice drum kit.

craftybones09:07:43

I think I see a theremin which is also mentioned in one of his talks.

craftybones09:07:42

I wonder if that thing under the black cover on the right hand side by the window is a Haken Continuum…