This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-30
Channels
- # admin-announcements (3)
- # aws-lambda (12)
- # beginners (88)
- # boot (73)
- # capetown (6)
- # carry (16)
- # cider (8)
- # cljsjs (7)
- # clojure (90)
- # clojure-belgium (4)
- # clojure-dev (19)
- # clojure-greece (41)
- # clojure-portugal (1)
- # clojure-quebec (4)
- # clojure-russia (25)
- # clojure-spec (172)
- # clojure-taiwan (1)
- # clojure-uk (76)
- # clojurescript (82)
- # cursive (37)
- # datavis (2)
- # datomic (46)
- # devcards (1)
- # emacs (4)
- # euroclojure (6)
- # events (1)
- # hoplon (31)
- # jobs (1)
- # keechma (9)
- # off-topic (4)
- # om (7)
- # onyx (65)
- # other-languages (15)
- # pedestal (1)
- # planck (50)
- # proton (1)
- # re-frame (40)
- # reagent (7)
- # spacemacs (14)
- # spirituality-ethics (37)
- # testing (1)
- # untangled (2)
- # yada (44)
how do I turn a BufferedInputStream into a string? mock.request returns response :body as buffered input stream, and I just want to print it out
posted question on SO: http://stackoverflow.com/questions/38120418/convert-bufferedinputstream-to-string-in-clojure
@petrus: I believe just using slurp
will work
Ah, as someone mentioned on SO
what I think this should do is deref the curpage
atom and then return :red if it's the same as the name, or black otherwise. but for whatever reason it's always returning black...
It only works with literals. Strings, numbers, etc. Nothing it has to interpret or change.
Though case seems to be kind of weird, because you don’t seem to do anything with name
. You may have elided it though.
Any recommendations for getting setup with an IDE? I'm used to text-editors like Atom; not an emacs/vim person.
I heard some people recommend lighttable? which I installed, but not sure how to set it up with the best plugins
@montanonic: I’m super happy with cursive (IntelliJ plugin). IMO worth trying (at least)
okay, thank you 🙂
@montanonic: you’re welcome. (in case there is #C0744GXCJ channel)
It’s not unbounded, it’s unbuffered
(iirc)
Pretty sure Rich’s statement on unbounded channels is NO
No, just that it’s unbuffered; writes and reads will block until there’s a counterparty
I don’t see a take in your example
This works:
sparkfund.api.repl=> (def c (clojure.core.async/chan))
#'sparkfund.api.repl/c
sparkfund.api.repl=> (future (clojure.core.async/>!! c 1))
#object[clojure.core$future_call$reify__8947 0x1519d302 {:status :pending, :val nil}]
sparkfund.api.repl=> (clojure.core.async/<!! c)
1
If you want a buffered channel, just supply the size as the arg to chan
and you’re good to go
anyone have experience with ztellman's automat library? I'm trying to grok it and having trouble internalizing FSM's in general
@montanonic: If you like Atom, you might want to check out https://github.com/jasongilman/proto-repl
Thanks for letting me know. Currently I have cursive set up so I'll see how it fares me.
I didn't list the take part of the code just because I found that it's been blocked on the put
I'm using IntelliJ Clojure plugin, I guess it behaves differently from a regular REPL?
… that would be surprising?
ah, it seems to be spawning a new thread which needs to be interrupted for the normal behavior to work: `(future (>!! ch "hi")) Evaluation interrupted. => #object[clojure.core$future_call$reify__6736 0x13cd362b {:status :pending, :val nil}] (println (<!! ch)) hello`
`(future (>!! ch "hi")) Evaluation interrupted. => #object[clojure.core$future_call$reify__6736 0x13cd362b {:status :pending, :val nil}] (println (<!! ch)) hello`
Hi guys - I'm someone who's been experimenting with clojure and im excited by the possibility of using clojurescript to never have to write javascript again 😄
any tips about weathe to learn om or reagent or something else - just for hacking - nothing to serious at the minute
@niall: You may find this interesting: https://github.com/Day8/re-frame
ok sounds interesting - tbh my mind is still rather blown from functional programming...im only just recovering
i will! while you're all being so helpful, i have anothe noob question. I have a feel what what operations are fast and slow in other languages, but not yet in clojure
its on github here https://github.com/niallrobinson/enigma-clojure
@niall https://github.com/niallrobinson/enigma-clojure/blob/master/src/enigma/crack.clj#L15-L23
For lein with Clojurescript, can you set compiler optimizations from a profile? I used with-profile to pick a profile with :optimizations :advanced but I'm seeing comments in the produced javascript.
Hi. I just installed the new relic app monitor, and to my surprise it reports 100s of threads running on the JVM. I use plenty of future
s, but I thought they came from a limited pool?
@polymeris: futures use an unbounded pool
@polymeris: see https://github.com/TheClimateCorporation/claypoole if you want some control
thanks, @danlebrero I thought I had read somewhere they used a fixed size pool
@polymeris: a fixed pool is used in agent's "send" fn. Note that send-off uses an unlimited pool