Fork me on GitHub
#clojure
<
2018-11-23
>
netpyoung03:11:12

I have a question Is there any other good library for benchmark? I found https://github.com/hugoduncan/criterium https://github.com/davidsantiago/perforate .

netpyoung03:11:45

Which library are you using for benchmark??

seancorfield05:11:52

criterium is what most folks use I think? @netpyoung

andy.fingerhut05:11:57

I had not heard of the perforate lib linked above before, but it uses criterium, and builds on top of it.

seancorfield05:11:04

Oh, cool... I was rushing between rooms so I didn't actually click through...

netpyoung05:11:35

@seancorfield thank you. I tried criterium It looks like unmaintained. but It works well. and I also found another. https://github.com/ptaoussanis/tufte

seancorfield06:11:50

@netpyoung Don't mistake "not updated recently" for "unmaintained" -- a lot of Clojure libraries are "complete" (because they often focus on "do one thing well" and try to be composable with other libraries).

netpyoung08:11:35

@seancorfield okay thank you for correcting my mistake.

todo09:11:30

In boot, how do I add a repo in addition to maven ?

zilti10:11:37

@mseddon Here's the main tool from thi-ng: https://github.com/thi-ng/babel Just started using that recently, too

mseddon11:11:03

Ah! Great, thanks!

zilti10:11:09

Also, stop spreading that the JVM has a slow startup time... Clojure starts up slow as molasses, yes, but that's not the JVMs fault

👍 2
joshkh11:11:32

i'm using deps.edn to include a package from maven, and also an artifact from that same package using :classifier. in a pom.xml i'd include the main package as a dependency, then another entry for the artifact using the extra <classifier> tag, but i can't do that in deps.edn because dependencies are unique keys. is there a way around this?

{:deps {
        {remote.package/parser {:mvn/version "1.0.0"}
         remote.package/parser {:mvn/version "1.0.0"
                                :classifier  "additional-artifact"}}}}
probably a dumb question but i'm stumped

eoliphant19:11:41

I have a quick tools.deps question. I have a simple app, that pulls in a simple lib via :local/root. The lib adds a repository via :mvn/repos. The deps resolution fails for the app, unless I explicitly add the repository def it it as well. Is this expected behavior?

seancorfield20:11:38

It's expected behavior based on how :local/root deps are handled today. There are a number of issues around transitive behavior surrounding :local/root so I don't know whether this would be considered a bug or by design. Perhaps ask in #tools-deps which has a smaller audience and where the question is more likely to be seen? I'd suggest tagging Alex Miller but I suspect he's pretty focused on prep for the Conj and getting 1.10 out the door at this point.

eoliphant02:11:35

Thanks @seancorfield will post this over there. On a similar note, I’ve been doing some reading (including a few of your posts/notes) on monorepos, etc. do you have any examples around of you guys setup with deps?

seancorfield02:11:57

Nothing public, I'm afraid. Our work stuff is almost all proprietary and internal (although a few little things have been open sourced).

eoliphant02:11:14

gotcha, figured as much but just thought i’d ask 🙂

lsund19:11:55

Evening guys, how would one check if a collection (for example vector) is ordered in idiomatic clojure?

(ordered? [1 2 3]) ;; true
(ordered? [2 1 3]) ;; false

lsund19:11:41

Cool thank you. strange that I did not find that post

jaihindhreddy19:11:45

@lsund <= and < are variadic. So (apply <= [1 2 3]) works.

jaihindhreddy19:11:48

If your comparator f isn't variadic though, you can do (->> data (partition 2 1) (every #(apply f %)))