This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-20
Channels
- # beginners (49)
- # boot (139)
- # cider (10)
- # clojure (82)
- # clojure-belgium (59)
- # clojure-dusseldorf (5)
- # clojure-russia (11)
- # clojure-sanfrancisco (2)
- # clojure-uk (56)
- # clojurebridge (4)
- # clojurescript (138)
- # cursive (19)
- # datomic (8)
- # dirac (1)
- # editors (11)
- # emacs (18)
- # flambo (21)
- # hoplon (45)
- # jobs (1)
- # juxt (3)
- # keechma (1)
- # mount (43)
- # off-topic (2)
- # om (64)
- # om-next (1)
- # onyx (2)
- # other-languages (8)
- # re-frame (72)
- # reagent (99)
- # ring-swagger (7)
- # rum (3)
- # spacemacs (21)
- # specter (5)
- # untangled (42)
- # vim (4)
- # yada (7)
Clojure user doesn’t like to use label bug
in their github issue 😜
https://labs.ig.com/static-typing-promise
I'm trying to figure out a way to combine core.typed
and Prismatic's Schema into one namespace for learning purposes. If s
denotes the schema namespace and t
denotes core.typed
, this is the only way I've figured out how to do it without core.typed spitting out extremely large error messages:
(t/ann ^:no-check tagged-function [s/Str :-> s/Str])
(t/tc-ignore (s/defn tagged-function :- s/Str
[arg :- s/Str]
arg))
;; and then when calling tagged-function
(t/tc-ignore (tagged-function "string"))
Question: Is this the only/best way to do it, or am I missing something?i simply couldn't imagine doing it in any other language, and I didn't even know about clojure until 3 days ago
@bcbradley: Hi, do you have a link to your Code? Or is it closed?
Does anyone know how can I access the Class instance of a Java type from Clojure? (the equivalent of doing MyClass.class
in Java)
hi all . Does anybody use datomic ? I looking for new architecture to build functional reactive domain modeling
I’m having this warning:
Warning: version conflict detected: org.clojure/clojure version changes from 1.4.0 to 1.8.0
I have seen others here with a similar problem, but not really a solution.
When I run boot show -p
I get no version problems (have added the necessary exclusions). My Clojure version is set to 1.8.0 explicitly in boot.properties
.@slotkenov: check if you have a org.clojure "1.4.0" dependency in your build.boot
@thachmai: not explicitly, but had a dependency in my ~/.boot/profile.boot
which seemed to be the culprit. Added clojure to the exclusions there as well, now the warning is gone. Thanks!
Why do I get this error when running boot on Ubuntu 15.04 with OpenJDK-8 https://paste.fedoraproject.org/368800/ ?
@shakthimaan: try removing line 3
@pesterhazy: Thanks! that worked!
hooray
Is there a convention within the Clojure community for the maximum amount of characters on a line of Clojure code? Is it 80 (the default bikeshed
checks for), or does it differ per person/team/project? Or is the convention that there is no convention and should the code just be ‘readable?'
I for one don't follow that rule; sometimes it's hard if you have long function names and nested anonymous functions
I would say nowadays 120 characters is fine. If you keep your functions short, I don't foresee troubles with having big lines, you will rarely have them, perhaps when you have it, there might be a reason.
Restricting the length of lines almost inevitably causes people to prefer terse identifiers or insert artificial line breaks. I much rather want to see unabbreviated identifiers and line breaks that follow the structure of the code.
What can cause a "TypeError: goog.global.setTimeout is not a function" when building with boot?
I think there is an error in the http://clojure.org page/section on multi field comparators. Does anyone know if such issues are supposed to be reported on the Clojure jira?
well goog
is in javascript land
Okay.
@pesterhazy: Ah yes, might be better.
I want to turn a given string into an input stream — is there something shorter than this? (java.io.ByteArrayInputStream. (.getBytes "abc"))
martinklepsch: https://clojuredocs.org/clojure.core/with-in-str
y, I guess I could use that and than pass *in*
to my input-stream-expecting function but that seems a bit funky 🙂
@martinklepsch: (-> "abc" .getBytes
(java.io.StringBufferInputStream. "abc")
attempt №3. someone use http2 with hetty?
@ghadi: no, problem exactly with jetty( but i`m surprised that noone doesn`t try to start jetty with http2 param
@ghadi: but i have a new question for you: it is enough free version of nginx for use it as reverse-proxy that will be distribute the load between jetty instances?
@ghadi: and if i will be use nginx like reverse-proxy, do i need a will http2 on jetty`s?
@ghadi: ok, thank you for answers!
Weird question maybe but why people seem to prefer ;;
instead of just ;
for comments?
is because they want it to be similar to //
which many other languages uses?
;;
accomplishes, as far as I know, the same thing as ;
but obviously looks different
so it’s legacy coming from emacs then?
or maybe rather lisps in general
simple comments ;
, grouping of code with ;;
, and 3 or 4 ;
for file headers and summaries
Ah, that lead me to http://stackoverflow.com/a/6365579
comment
seems like a good macro to use for groups of code though, rather than ;;
http://www.gnu.org/software/emacs/manual/html_node/elisp/Comment-Tips.html seems to explain the comment conventions a bit better as well
@agi_underground: Did you get a chance to look at the response from @curtis.summers yesterday regarding HTTP2 with Jetty? It appears that you can pass along the parameter to the run-jetty
call like (jetty/run-jetty dummy-app {:port 5000 :h2c? true :h2? true :ssl? true :ssl-port 5443 })
rather than to the java
command line. I have not tried this personally, but it seems reasonable.
@dorab: yes, i try to use jetty9-adapter, but project needs not only adapter, but and ring, ring-server; when i include ring, it needs to exclude ring-jetty-adapter dependency, and this where dependency hell starting. lib-noir include ring or ring-adapter; when we include only ring-jetty9-adapter, app will be needs jetty-server, ring-core and so on. if someone can demonstrate project with working ring functionality, and custom jetty-adapter, this will be fantastic.
@dorab: but today i`m asking about seting nginx as reverse-proxy, and that i think good solution. I don`t know, but think we don`t need http2 between nginx and jetty instances in this case.
Hi all! I'm trying to do the following in Clojure... I have data (ordered by first elem/ date) like this: ["2015-04-28" "TRIAL"]["2015-05-28" "REGULAR"]["2015-06-28" "TRIAL"]["2015-07-28" "TRIAL"]["2015-08-28" "REGULAR"]["2015-09-28" "REGULAR"]["2016-10-28" "REGULAR"] I need to pick up state changes (compared to previous in list) and detect conversions and renewals, so that I end up with a list like this: -> ["CONVERSION" "2015-05-28"]["CONVERSION" "2015-08-28"]["RENEWAL" "2015-09-28"]["RENEWAL" "2015-10-28"] Piece of cake in Java, as you simply keep a pointer to the previous record, but I'm not sure how to best approach this in Clojure. Does anyone have a suggestion?
@chillenious: how are you trying to collect the changes? Like you want a list of changes and when?
yep, basically
so TRIAL -> REGULAR and REGULAR -> REGULAR
friday!
of course
sorry it’s been a while and struggling with sql problems all day
thanks
together with partition 2 1 (so that I get a feed of current + previous)
@chillenious: partition-by
if your data is sorted
well, thing is I need to detect either a change from trial -> regular, or a repetition regular - regular (and ignore trial -> trial)… partition seems perfect for that?
together with reduce