This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-19
Channels
- # admin-announcements (1)
- # beginners (26)
- # boot (6)
- # cider (14)
- # cljsjs (29)
- # cljsrn (19)
- # clojure (87)
- # clojure-austin (5)
- # clojure-belgium (10)
- # clojure-brasil (2)
- # clojure-dusseldorf (15)
- # clojure-greece (17)
- # clojure-russia (51)
- # clojure-sanfrancisco (4)
- # clojure-sweden (20)
- # clojure-uk (31)
- # clojurescript (111)
- # core-matrix (2)
- # cursive (9)
- # datascript (15)
- # datomic (41)
- # dirac (1)
- # emacs (8)
- # flambo (1)
- # funcool (4)
- # hoplon (72)
- # lein-figwheel (3)
- # off-topic (2)
- # om (79)
- # om-next (2)
- # onyx (17)
- # other-languages (16)
- # re-frame (62)
- # reagent (26)
- # remote-jobs (1)
- # rum (3)
- # spacemacs (5)
- # untangled (120)
I have a monad question here: https://clojurians.slack.com/files/josh.freckleton/F1A38K75X/random_numbers_in_monad.clj Basically, how can I map a monadic function over a list, or get a sequence of monadic values?
I accidentally created a #C1A38UB5X channel. Does anybody here have the permissions to delete it?
I cant find find any controls to do it myself
@josh.freckleton: have you looked at https://github.com/funcool/cats and the other funcool related projects?
@danielcompton: thanks for the recommendation, playing around with it now. Still though, how can I get a list of monadic values, like what I'm going for in this code?: https://clojurians.slack.com/files/josh.freckleton/F1A38K75X/random_numbers_in_monad.clj
sorry, not sure, haven’t ever used it, just know it exists
@danielcompton: I'm having fun tinkering with it, thanks, it's a different take than algo.monads
. It should still be simple, I imagine, to do what I'm trying though. hmm....
You can’t/shouldn’t. A monadic function produces a monadic value and a list of monadic values is not a monadic value per se.
In clojure.java.jdbc, is there a way to globally change the default {:identifiers str/lower-case}
to {:identifiers identity}
. It's kind of annoying when you explicitly in SQL do select my_column as "myColumn" ...
and clojure.java.jdbc insists on turning it into "mycolumn"
. Especially when using hugsql (or yesql).
Hey guys, I'm new in clojure, and I have a doubt.
I've seen a lot of examples using match
from this lib: https://github.com/brool/clojure-misc and I want to know if that lib is popular.
I'm from ruby, and in ruby we have the http://rubytoolbox.com where I can see if a lib is popular or not
I’m not familiar with ruby, but maybe https://clojars.org/ could be helpful
There was a website where you could see how popular a dependency was. Can't remember it
You could maybe infer from cross-clj, but its coverage is somewhat spotty
On the specific question, I think most would prefer core.match
It would very good to have something similar to ruby-toolbox. For beginners and others. Now you need to do a lot of manual work. I wonder why it still doesn't exist.
the most referenced projects section in https://crossclj.info/ its awesome 🙂
@donaldball: thanks for the answer! I was looking for a alternative to do pattern matching like haskell
hi, maybe here someone can help me? How to start jetty with HTTP2 if my app needs a param(port)? I use clojure. I try this command: java -Dport=4334 -Dadd-to-start=http2 -jar target/app-0.1.0-SNAPSHOT-standalone.jar But it's doesn`t work. My main function is: (defn -main [& [port]] (let [port (Integer. (or port (env :port) 5000))] (run-jetty (site #'app) {:port port :join? false})))
I think those are system properties, to read those you would need to do (System/getProperty “port”)
@m1dnight: hm, I'm aware that [mv]
is different from mv
. But say I really want a list of mv
, such as in this example where I want a list of random numbers. How can I achieve that with a monad? https://clojurians.slack.com/files/josh.freckleton/F1A38K75X/random_numbers_in_monad.clj
(I can't quite figure out m-map
yet)
nm, you put me on the right path, and m-seq
seems to help:
((m-seq (take 10 (repeatedly randy))) [4 5])
Can I pass an argument to test functions from my (use-fixtures :each (fn [f] … (f some-arg))
fixture using clojure.test?
Or do I have to use binding / with-redefs?
Is there a way to introspect (using reflection) the ctor's of a class?
I'm using a Google API with sadly lacking documentation.
@pesterhazy: maybe the constructor is private and you're not supposed to call it?
@borkdude: quite possible, but there must be some factory or whatever to create an instance of this
@pesterhazy: it's not open source?
good point, I should check. I just got it from maven
https://developers.google.com/resources/api-libraries/documentation/sheets/v4/java/latest/
I actually found the javadoc 🙂
the (Class/staticMethod arg1 arg2)
syntax is sugar over the dot special form (. Class staticMethod arg1 arg2)
, the dot special form can also access static fields like (. Class staticField)
, and the same transformation generates valid dot forms for both
Hi, this is i am again. My problem is how to enable http2 to my project, that use jetty server. I think i can not add param --add-to-startd=http2 becouse my project use jetty like internal entity, i have defined dependency in project.clj, and in this way, my project use already compiled jar file from .m2/repository/org/eclipse/jetty/jetty-server/9.3.8.v20160314 and becouse this i can not set my own params to enable http2. Maybe someone already configured jetty to use http2 in projects? How i can do this?
Any good tips on Could not locate hello__init.class or hello.clj on classpath. Exception in thread "main" java.io.FileNotFoundException: Could not locate hello__init.class or hello.clj on classpath., compiling:(/private/var/folders/bm/lpyn0q012k91nr2311jtk1gh0000gn/T/form-init8179222076077936243.clj:1:125) ? lein uberjar and I are making an acquaintance today and she’s spitting in my eye
The path to your source files is probably wrong. I use boot, and haven’t touched lein in a long time so I can’t point you to it exactly but I think it was “source-paths” or something like that.
Another thing is if you have incorrectly aligned your namespace to your file paths, which includes what I already mentioned.
that it is
I was attempting to use a tutorial as written
(amazon lambda with clojure)
if a tutorial is telling you to use a single segment namespace, I would guess it is written by someone who doesn't know clojure, so following it verbatim may not be the best
as he also wrote a scala program, you might be onto something
5900 members of group, defenetly someone use http2 with jetty, hey where you are?
ty hiredman, that was an entirely good example of what was wrong, wrong source paths + single segment namespace
I’m completely set
@agi_underground: have you seen this http2 example in the ring-jetty9-adapter src? https://github.com/sunng87/ring-jetty9-adapter/blob/master/examples/rj9a/http2.clj
Is there something in Clojure that would easily let me map vectors (e.g. [“foo” 1]
) onto values of an arbitrary type?