This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-08
Channels
- # announcements (22)
- # aws (4)
- # babashka (25)
- # beginners (78)
- # calva (9)
- # cider (22)
- # cljdoc (2)
- # cljsrn (2)
- # clojure (27)
- # clojure-australia (7)
- # clojure-europe (22)
- # clojure-nl (15)
- # clojure-uk (26)
- # clojurescript (20)
- # datahike (3)
- # datomic (15)
- # events (1)
- # helix (5)
- # honeysql (4)
- # kaocha (1)
- # malli (1)
- # meander (1)
- # off-topic (84)
- # pathom (14)
- # re-frame (3)
- # reagent (28)
- # reitit (6)
- # sci (1)
- # shadow-cljs (78)
- # tools-deps (30)
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.
Ok thanks! Good to know it's not just me.
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.
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.
was it o doyle rules engine? https://github.com/oakes/odoyle-rules https://github.com/oakes/play-cljc-examples/tree/master/dungeon-crawler https://www.youtube.com/watch?v=XONRaJJAhpA
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.
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
that helps thanks
hm it seems it doesn’t work for me
it returns nil
closed channels are always readable (returning nil). Recur and remove the close channel from the alts selection
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
alt!!
is a macro, but alts!!
is function
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.
If you're doing iteration over the channels the closed channel should be removed, as async/merge does
looks like the recording for “A History of Clojure” is out! https://www.pldi21.org/prerecorded_hopl.11.html

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.
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
Also, didn’t expect Rich to have a practice drum kit.
I think I see a theremin which is also mentioned in one of his talks.
I wonder if that thing under the black cover on the right hand side by the window is a Haken Continuum…