This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-12
Channels
- # bangalore-clj (1)
- # beginners (10)
- # boot (5)
- # cljs-dev (47)
- # cljsrn (19)
- # clojure (57)
- # clojure-russia (63)
- # clojure-spec (26)
- # clojure-uk (7)
- # clojurescript (104)
- # cursive (26)
- # data-science (2)
- # datomic (1)
- # dirac (1)
- # hoplon (11)
- # juxt (23)
- # off-topic (16)
- # om (6)
- # onyx (3)
- # parinfer (2)
- # protorepl (2)
- # re-frame (1)
- # ring-swagger (1)
- # untangled (2)
You may want to use reify
instead of proxy
since HostKeyVerifier
is an interface (sshj, correct?)
i.e. ssh
in the Java code needs to be the first argument to .addHostKeyVerifier
in the Clojure code, I believe
@fellshard, the "this" was from doto 🙂, and yes, interface from sshj, and thank you, it worked
doesn't seem like a bug. when reading in cljs tools.reader has no idea that baz
is aliased
@ghadi sure, but i'd expect the reader to think like "oh, i'm reading the clj
branch of a reader conditional - let's consider those clj
aliases I tossed away earlier"
@ghadi how does it read any ::foo/bar
like keywords then? surely it has to be aware that some namespace was aliased as foo
hello, i'm trying to get greglook/whidbey working in boot repl, anyone here familiar with that code?
I'm trying to build a core.async channel to cycle thru responses every time the channel is read. But every time I try and read it blocks. Why?
(def c (chan))
(go (>! c (cycle [:a :b])))
(<!! c)
Newbee question: If I have this data, how do I go about "searching" for Example 2? In Ruby you could do something like .where(name: "Example2")
[{:name "Example 1"
:description "This is a description"}
{:name "Example 2"
:description "This is a description"}
{:name "Example 3"
:description "This is a description"]
@eoy You would use filter
to find the match.
(filter #(= “Example 2” (:name %)) [{:name ,,,}])
That will return a seq of all the matches. If you only want the first one, you can call first
on the result.
And if I wanted to grab all that matches a regex of #"Example"
I'd just have to modify the condition?
@vigilancetech I think the line where you do (go (>! c (cycle [:a :b])))
is doing something different than you expect.
someone on IRC answered my question.
I needed to set it up with async/to-chan
@mtnygard actually I was getting 0 values 🙂
@vigilancetech Because it would never finish realizing the value of cycle
to put it into the channel, right?
I read somewhere that like cond is lazy and conj is not or vice versa, so I'm thinking perhaps using one of those to get a lazy take infinity might work
Oh, I know what's happening I think. Its trying to give an infinite sequence to the channel because that's probably hungry
anyway, a lot of clojure is still a mystery to me
also I’ve been running into this problem in 1.9-alpha14 RuntimeException EOF while reading
and then RuntimeException Unmatched delimiter: }
:
(def a #:test{:a 1
:b 1})
here’s my solution for removing ns from map:
(defn unqualify [m]
(com.rpl.specter.macros/transform [(com.rpl.specter/walker keyword?)] (comp keyword name) m))
@vigilancetech: neither cond or conj is lazy, lazy-seq is lazy
and maybe you were thinking of cons, not cond
to answer my question above, http://clojure.org/reference/reader under "Map namespace syntax“ has some documentation on the new reader syntax