This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-15
Channels
- # beginners (11)
- # boot (80)
- # carry (1)
- # cider (5)
- # cljs-dev (290)
- # cljsrn (4)
- # clojure (50)
- # clojure-canada (5)
- # clojure-dev (2)
- # clojure-korea (2)
- # clojure-russia (17)
- # clojure-spec (22)
- # clojurescript (41)
- # cursive (12)
- # datomic (10)
- # figwheel (1)
- # hoplon (68)
- # klipse (1)
- # off-topic (1)
- # om (16)
- # onyx (15)
- # parinfer (1)
- # proto-repl (4)
- # proton (2)
- # re-frame (14)
- # reagent (12)
- # ring (5)
- # vim (4)
- # yada (34)
When I have a character like \a
or \newline
, is there a way of getting it's representation (like (symbol "\a")
or what is really appropriate here) back?
@didibus UPD: In fact, I was wrong. prn
would do it right for me:
"\a" is the reader representation of it. Once read in, it becomes java.lang.Character
The prn functions are for when you want to print reader friendly strings, and the print functions are for when you want human readable strings
Yes, thank you. I'm mostly using prn
Oh, didn't know about pr
š
one w/o newline should be
Those are for reader readable strings. And then print, print-str, println, println-str are the equivalent for human readable strings
Now, I rather want a pretty-printer which is reader-friendly and colored at the same time. E.g. aprint
is colored (which is good), but tends to truncate output
You have to know that the newline variants like println and prn are not thread safe. The order of the newline and the preceding string are not guaranteed, so you could end up with a newline before or after in the case of a race condition
Yes, btw, I were once solving this with core.async
(when I had e.g. reducers/fold
concurrent stuff in play) ā instead of (println x)
I were doing (put! debug-ch x)
and had a go-loop to print these messages
didn't know about this. interesting, why isn't println
doing kinda the same?
I had a conversation about it with Alex Miller a while ago, and it seems that's just not what they want it to do. Couldn't really understand why not.
uhm, good to know. These internals are sometimes interesting
may be it's some legacy/Java thing that they use...
Someone had mentioned that if you implement println as (print (str ...)) then if you try to println an infinite sequence you would out-of-memory
aha...
Don't know if that was the real reasoning behind it or not. I guess it would be a trade off between the race condition or the potential of out-of-memory errors.
Why does Transit (CLJ) mutate objects to accomplish it's conversions? (My question is embedded as a comment on the previous snippet)
Not a transit dev, but basically that example is about interoperating with the standard java machinery for reading/writing to arbitrary data sources/sinks.
Reading and writing from strings is great, and I don't know but I would assume transit has that as well. But for e.g. a REST API data transport format, reading from a Reader
and writing to a Writer
makes more sense.
for one thing, it can be done incrementally, instead of needing the whole contents to reside in memory at once
@josh.freckleton not sure if that actually speaks to what you aren't liking. Because I also could read that this is a complain about that being the first example on the Transit README.
@geoffs That makes sense about interop. And I don't mean to complain, but this just took me completely by surprise, so, apologies to anyone I offended, because I know they're working hard to create free open source awesomeness. Is there a Transit option for referentially transparent (non-side-effecting) code for reading/writing?
Hi, leiningen has the complement function for test selectors, so (complement :integration)
will run anything but the :integration tests. Do you know if there is a way to exclude more test? like (complement :integration :web ...)
Never mind, I was not aware I could write simple functions, so something like this: (fn [m] (not (or (:web m) (:integration m))))
does it
Contributors wanted for the very cool project Advent of Clojure https://www.reddit.com/r/Clojure/comments/57lnet/contributors_wanted_for_advent_of_clojure/?ref=share&ref_source=link
how can i call start-server
from aleph.http
in a boot task? i keep getting aleph.netty$start_server$reify__5742 cannot be cast to clojure.lang.IFn
@pvinis you need to put identity
at the end of your boot task then it will work.
Boot tasks should return a function
Hi everyone! ā¦ I would really appreciate a hand on a little āsetupā problem Iām dealing with right now. I want to embed the Pentaho reporting engine on an application Iām currently building. However, I canāt properly configure the leiningen project.clj file to fetch the required dependencies. The Pentaho libraries can be found here: http://repository.pentaho.org/ and my project.clj look like this.
I believe that my ā:repositoriesā configuration is wrong, but Iām not sure how to fix it. Obviously, this is my first time trying to add dependencies from a repository different than Clojars.
I changed :repositories [[āpentahoā "
. I didnāt get any error. I guess now everything is fine.
Hi everyone. Is Clojars up?
my lein deps
(on existing project) or lein new figwheel foobar
commands hang forever (not sure if the issue with the latter one might be related to Clojars)
@andrewboltachev seems like it is. you can check it in the future here: http://status.clojars.org/
(also tried to download something just to make sure)
('cause I used to be checking their Twitter instead)
If it took for me 2min16sec to install deps for a fresh "lein new fighweel ..." project, what can be wrong? My network connectivity? http://dpaste.com/2YXWREP