This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-11
Channels
- # bangalore-clj (1)
- # beginners (24)
- # boot (134)
- # boulder-clojurians (2)
- # cider (3)
- # cljs-dev (2)
- # cljsjs (44)
- # clojars (9)
- # clojure (60)
- # clojure-greece (2)
- # clojure-quebec (1)
- # clojure-russia (44)
- # clojure-spec (15)
- # clojure-uk (1)
- # clojurescript (37)
- # core-matrix (1)
- # datomic (7)
- # emacs (1)
- # hoplon (154)
- # liberator (3)
- # mount (2)
- # om (20)
- # onyx (2)
- # pedestal (3)
- # planck (12)
- # re-frame (26)
- # reagent (32)
- # uncomplicate (4)
Alright imma say it: core.async
is freaking sexy. I'm in love.
; define an async channel
(def log-chan (chan))
; start a process thread and wait for events on that channel
(thread
(loop []
(when-let [v (<!! log-chan)]
(prinln v)
(recur)))
(prinln "Log Closed"))
; Define a function that adds events to the channel
(defn log [msg]
(>!! log-chan msg))
; Call a log file
(log "foo")
I am well and proper getting nerdgasms here with this async video
This is seriously great stuff https://www.youtube.com/watch?v=enwIIGzhahw
@eslachance: Lot’s more at https://www.youtube.com/playlist?list=PLhi8pL3xn1OTDGCyXnkZStox6yFjn2583 if you want to go further, though it does require a subscription (I find it worthwhile at that price though).
huh! I didn't even know youtube did that (the subs thing).
But yeah seriously that video from Timothy is just perfect, the kind of thing that gets me to learn and appreciate the language
I want more of that
The rest of his stuff is equally good
Oh it is him lol
Yep 🙂
It looks like he’s got another course at http://online-courses.startclass.com/l/79625/Communicating-Sequential-Processes-with-core-async but I’ve not watched that one.
My friend @oahner keeps telling me about stuff in clojure and he always gets me really interested but then I look at the stuff and I get scared with complexity. Finally I'll be able to follow along XD
Yeah, there’s so much interesting stuff that it’s pretty hard to know where to start. I found core.async and CSP super interesting when I first started but I’ve not found an actual use for it in my work, but the concepts from it (and many other things in Clojure) have completely changed how I think about things. It’s a pretty enjoyable journey and there’s always more to learn so I haven’t gotten bored yet.
I most definitely know what to use channels and stuff in. Unfortunately for some reason the code in the video doesn't work (probably because async changed) so I have to look into that
it was so elegant.. 😞
oh! nevermind I had to use async/chan
instead of chan
I just tried to move some functions into another ns… now I have src/cavalry-stats/core.clj
and src/cavalry-stats/data.clj
in data.clj, the ns decl is (ns cavalry-stats.data …
In core.clj, when I type (require ‘cavalry-stats.data) it works fine
But when I try
(ns cavalry-stats.core
(:require [ring.adapter.jetty :as jetty]
[compojure.core :as compojure]
[ring.util.http-response :as response]
[ring.middleware.reload :refer [wrap-reload]]
[ring.middleware.format :refer [wrap-restful-format]]
[selmer.parser :as selmer]
[cavalry-stats.data :as data]
))
I get an error, CompilerException java.lang.Exception: namespace 'cavalry-stats.data' not found, compiling:(cavalry_stats/core.clj:1:29)