#clojure log - Apr 25 2015

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

10:41 gfredericks: does anybody know of any tools for reducing the redundancy between docstrings and READMEs?

10:44 TimMc: gzip, I think

10:45 dumptruckman: hello

10:45 gfredericks: TimMc: :P

10:48 dumptruckman: looking for a hint with this koan... "One function can beget another" (= 9 (((fn [] ___)) 4 5))

10:49 justin_smith: dumptruckman: that function needs to return a function that takes 4, 5 and returns 9

10:49 the ___ are the position for a value to be returned

10:50 ,(((fn [] str)) "hello" ", " "world")

10:50 dumptruckman: oooh

10:50 clojurebot: "hello, world"

10:50 dumptruckman: that's why there are 2 sets of paren

10:50 justin_smith: right

10:52 dumptruckman: well

10:52 i thought i had tried to do what you said

10:52 and it didn't work

10:52 gfredericks: ,(((fn [] (fn [] (fn [] print-str)))) 'hello 'more 'worlds)

10:52 clojurebot: #error{:cause "Wrong number of args (3) passed to: sandbox/eval51/fn--52/fn--53", :via [{:type clojure.lang.ArityException, :message "Wrong number of args (3) passed to: sandbox/eval51/fn--52/fn--53", :at [clojure.lang.AFn throwArity "AFn.java" 429]}], :trace [[clojure.lang.AFn throwArity "AFn.java" 429] [clojure.lang.AFn invoke "AFn.java" 40] [sandbox$eval51 invoke "NO_SOURCE_FILE" 0] [clojure.la...

10:52 dumptruckman: but trying it again it worked

10:52 justin_smith: gfredericks: I think you needed more parens

10:53 gfredericks: as usual

10:53 ,((((fn [] (fn [] (fn [] print-str))))) 'hello 'more 'worlds)

10:53 clojurebot: #error{:cause "Wrong number of args (3) passed to: sandbox/eval81/fn--82/fn--83/fn--84", :via [{:type clojure.lang.ArityException, :message "Wrong number of args (3) passed to: sandbox/eval81/fn--82/fn--83/fn--84", :at [clojure.lang.AFn throwArity "AFn.java" 429]}], :trace [[clojure.lang.AFn throwArity "AFn.java" 429] [clojure.lang.AFn invoke "AFn.java" 40] [sandbox$eval81 invoke "NO_SOURCE_FILE" ...

10:53 luoluoluo: (println "hello")

10:53 gfredericks: I give up

10:53 dumptruckman: ,(((fn [] (fn [] (fn [] (print-str))))) 'hello 'more 'worlds)

10:53 clojurebot: #error{:cause "Wrong number of args (3) passed to: sandbox/eval111/fn--112/fn--113", :via [{:type clojure.lang.ArityException, :message "Wrong number of args (3) passed to: sandbox/eval111/fn--112/fn--113", :at [clojure.lang.AFn throwArity "AFn.java" 429]}], :trace [[clojure.lang.AFn throwArity "AFn.java" 429] [clojure.lang.AFn invoke "AFn.java" 40] [sandbox$eval111 invoke "NO_SOURCE_FILE" 0] [clo...

10:53 luoluoluo: ,(print "hello")

10:53 clojurebot: hello

10:53 justin_smith: ,(((((fn [] (fn [] (fn [] print-str)))))) 'hello 'more 'worlds)

10:53 clojurebot: "hello more worlds"

10:53 dumptruckman: i was about to try that next

10:53 justin_smith: gfredericks: classic, off by one

10:54 gfredericks: I'm just the idea guy, I don't mess with parens.

10:56 dumptruckman: wait...

10:56 this still isn't working

10:56 (= 9 (((fn [] #(* %1 %2))) 4 5))

10:56 gfredericks: have you checked what the right bit evals to?

10:56 justin_smith: dumptruckman: ##(* 4 5) ; last I checked this was not 9

10:56 lazybot: ⇒ 20

10:56 dumptruckman: doh

10:57 gfredericks: ,(Math/exp 4 5)

10:57 clojurebot: #error{:cause "No matching method: exp", :via [{:type clojure.lang.Compiler$CompilerException, :message "java.lang.IllegalArgumentException: No matching method: exp, compiling:(NO_SOURCE_PATH:0:0)", :at [clojure.lang.Compiler analyzeSeq "Compiler.java" 6740]} {:type java.lang.IllegalArgumentException, :message "No matching method: exp", :at [clojure.lang.Compiler$StaticMethodExpr <init> "Compiler....

10:57 justin_smith: dumptruckman: also #(* %1 %2) is * (given you are guaranteed two args)

10:57 ,(Math/exp 4.0)

10:57 clojurebot: 54.598150033144236

10:57 gfredericks: aw shucks

10:57 justin_smith: ,(Math/pow 4.0 5.0)

10:57 clojurebot: 1024.0

10:57 * gfredericks is just the idea guy, does not mess with numeric type fiddling

10:57 justin_smith: hehe

10:57 * gfredericks or specific method selection

10:58 justin_smith: or arities

10:58 gfredericks: yeah any of those

11:02 dumptruckman: can't seem to figure this one out either (= 25 (___ (fn [n] (* n n))))

11:02 my guess was (fn [f] (f))

11:02 justin_smith: I think there needs to be a 5 somewhere

11:03 dumptruckman: oh right

11:03 that would make sense >.>

11:03 i need more coffee

11:04 anyone got any resources for helping to think functionally

11:05 having trouble changing my thinking away from the use of mutable state

11:05 justin_smith: I have heard of some koans...

11:05 :)

11:05 dumptruckman: i mean on a more theoretical level

11:06 justin_smith: dumptruckman: the general principle is actually pretty simple. Anything that needs to "change" must become the argument to a new function call or recursion

11:06 so that in that new scope the new value replaces the previous (though the original has not mutated)

11:07 dumptruckman: i mean, i get the principle.. i just feel like i need to read/watch something to help really retrain my innate thinking

11:07 of course maybe i'm just wanting to procrastinate

11:08 justin_smith: dumptruckman: have you used loop/recur?

11:08 dumptruckman: ;)

11:08 no

11:08 justin_smith: ,(loop [x 0 y 0] (if (> x 100) x (recur (+ x y) (inc y))))

11:08 clojurebot: 105

11:09 geirby: morning

11:10 justin_smith: dumptruckman: it should be clear how the args to that recur are effectively modifying x and y

11:10 but it's not a mutation, it's a new binding that does not alter the previous value

11:10 you could try it in your repl, with some printing added

11:10 geirby: who can tell where ->RedBlackTree come from here http://bit.ly/1GiiYnw ? Is it some feature of deftype I'm not aware of?

11:10 gfredericks: ,(deftype Heyo [])

11:10 clojurebot: sandbox.Heyo

11:10 gfredericks: ,->Heyo

11:10 clojurebot: #object[sandbox$eval49$__GT_Heyo__51 0x752f5f2a "sandbox$eval49$__GT_Heyo__51@752f5f2a"]

11:10 gfredericks: ,(doc ->Heyo)

11:10 clojurebot: "([]); Positional factory function for class sandbox.Heyo."

11:10 gfredericks: geirby: yep.

11:12 TimMc: gfredericks: Here is a ridiculous thing I made: https://github.com/timmc/arrpl

11:12 dumptruckman: so

11:12 gfredericks: "Hmm, I seem to have made a ridiculous thing. Somebody must tell gfredericks about it!"

11:12 TimMc: exactly

11:12 to be fair, I'm telling everyone

11:12 dumptruckman: recur just changes the values and starts at the beginning of the loop?

11:13 TimMc: ...but especially you. PRs welcome. :-P

11:13 justin_smith: dumptruckman: it binds new values, nothing truly changed

11:13 geirby: gfredericks: thanks.

11:13 justin_smith: dumptruckman: but yes, that's the idea

11:13 dumptruckman: so

11:14 each arg in recur binds to the respective param in loop?

11:14 gfredericks: TimMc: the idea is to coopt existing copyright statements?

11:14 justin_smith: dumptruckman: exactly

11:15 TimMc: gfredericks: Yeah!

11:15 justin_smith: dumptruckman: also, for things that are not a loop, but just an update, you can use let and binding / shadowing ##(let [a 1 b (inc a) c (+ a b) c (inc c)] c)

11:15 lazybot: ⇒ 4

11:15 TimMc: I mean... no! It is to explain what all those silly "all rights reserved" statements mean.

11:15 justin_smith: dumptruckman: not that the portion "c (inc c)" does not mutate c, it shadows it with a binding derived from the old one

11:15 TimMc: this is the license those were referring to all along

11:15 justin_smith: *note

11:16 luxbock: dumptruckman: I just finished reading The Little Schemer and I thought it was great

11:16 gfredericks: TimMc: oh I see but now also you are personally famous

11:16 TimMc: as the author of that heavily used license?

11:16 I guess so!

11:16 gfredericks: congratulations

11:17 #lifehack

11:17 luxbock: now I get to dive into The Reasoned Schemer next, core.logic here I come

11:19 TimMc: gfredericks: This joke is falling surprisingly flat. Maybe it will be funnier once there's a lawsuit. Lawsuits always make things funny.

11:19 gfredericks: TimMc: I think it's because I'm not a lawyer enough so it doesn't connect with me at a low enough level

11:20 dumptruckman: thanks luxbock

11:25 Shayanjm: If anyone happens to need a hexagonal circle packing implementation : https://github.com/AbleEng/hexpacker <shameless self plug>

11:25 I also would love some code critiques. Still trying to learn how to write things more clojure-y

11:28 TimMc: gfredericks: Well, it is of course unenforceable, but I really like the ambiguity of the license's *own* copyright statement.

11:29 Also, I'm playing with the notion of "what does it mean to license something". Note how the GPL says you have to include the actual text, but some licenses say you can just link to them.

11:29 and I think with some you can just say "available under such and such a license".

11:30 justin_smith: the misunderstandings are numerous

11:31 see for example people that make you click through gpl as if it were a eula (it isn't, it's a redistribution license)

11:38 gfredericks: the numerous misunderstandings are why I don't lawyer very much

11:41 * gfredericks obligatory https://twitter.com/othersome/status/152191192673697792

11:48 kwladyka: http://www.purelyfunctional.tv/ - is it worth to pay? Somebody watched this?

11:49 or mayby you can recommend somethign more?

11:53 TimMc: gfredericks: that sounds like a good law-er

11:55 gfredericks: TimMc: no beating around the bush

12:42 saik0: Shayanjm: neat. you could eliminate the post-dedup operation by removing the circles on one of the edges

12:51 sveri: quick vote: multimethods or protocols?

12:51 for a storage abstraction

12:51 justin_smith: sveri: a protocol

12:52 sveri: seems like the protocol wins 1:0 :D

12:52 justin_smith: any reasons you prefer the protocol?

12:53 justin_smith: sveri: because it abstracts over multiple operations, and dispatches on type

12:53 both of these describe the storage abstraction scenario

12:53 (at the very least you hve put and get)

12:53 sveri: ah, right, multiple operations, so obvious, havn't thought of that, but yea

12:54 justin_smith: and you would have no reason to use any dispatch other than type

12:54 sveri: (inc justin_smith)

12:54 lazybot: ⇒ 245

12:54 justin_smith: which means multimethods provide one detriment, and no benefits

12:56 sveri: thank you very much

13:00 ane: using Foo. requires me to import that class, how can i make Foo visible for using it in ->Foo?

13:00 justin_smith: ane: ->Foo does not require import, it only needs require or use

13:01 ane: so to make Foo visible from namespace xyz, what's the way? adding [xyz :refer [Foo]] to require?

13:02 justin_smith: you don't need Foo to be visible, you need ->Foo

13:02 Foo is not a thing you can require, it's a class

13:02 ->Foo is a function, something you can require

13:03 ane: oh yeah

13:03 derp

13:06 justin_smith: the whole namespace/var vs. package/class thing is a little weird - less simple than many things in clojure

13:07 ane: i agree. it's a bit confusing, but less so than in other languages

13:08 what are the practical differences between Foo. and ->Foo?

13:08 justin_smith: ane: ->Foo is first class, and can be accessed the same way you would any other var in the namespace

13:09 while Foo. is actually a reader macro expanding to (new Foo)

13:09 and needs import, or fully qualified package name, to access it

13:09 and cannot be used first class

13:41 gfredericks: also cannot be tricked out in the same way as vars

14:29 Lewix: HI guys

14:29 https://gist.github.com/6ewis/48968c8d338a1e10424a

14:30 I don't understand this piece of code - I know what the output is but i find it difficult to follow the logic

14:30 recursion is a pain in the arse

14:31 gfredericks: so is nonstandard indentation :(

14:32 looks like it just maps over the vector producing an output vector

14:33 it uses the first arg to keep track of the stuff it has yet to do, and the second arg to accumulate the output

14:43 Lewix: gfredericks: is it obvious to you cause it dont see it

14:43 gfredericks: if it's empty it shows out which is []

14:44 the first time around* - if it's not empty it recall itself with two arguments?

14:45 gfredericks: yeah, it's moving things from the first arg to the second

14:46 the mechanisms are first, rest, and conj

15:09 Poky: hey sveri, how's the typed stuff going?

15:12 saik0: how does lighttable display lazy seqs?

15:13 gfredericks: not sure how lighttable does it, but there's a *print-length* var or something that lets you automatically abridge things

15:16 sveri: Poky: hey there, I got it going, but after adding a lot of functions I did not keep them up to date, however, I finished the first release of closp-crud, the plugin that the typ things were for :-) And how does the scala stuff do for you?

15:20 Poky: nice. I see you're going for that github streak ;)

15:20 I'm almost done with scala.. trying to figure out ldap auth with mongodb all day today.

15:20 sveri: Poky: funny, yea, I wanted to try it out, it's interesting to stay motivated like that

15:21 ouch, ldap :D

15:21 I never liked that, is it a requirement you have?

15:21 Poky: and btw. do you know that article: https://aphyr.com/posts/322-call-me-maybe-mongodb-stale-reads about mongodb?

15:21 clojurebot: Huh?

15:22 Poky: yeah I tried that with github, but you need a concrete project in order to make it work.. like closp :D

15:23 it's just for an assignment.. I need to secure the server and picked mongodb as the application running on it.. I really don't even know why ldap is part of it

15:23 sveri: Hehe, I see

15:24 Poky: I don't even know what it's good for tbh. Like why do I need ldap for authentication over mongodb..

15:24 just another db for users over db

15:24 sveri: ldap is more like active directory than like a database

15:24 and it is widely used as a business / groups / user backend

15:26 Poky: could be... as I said, I've never seen it before. I don't even know what I am doing. :D

15:27 sveri: Poky funny, I wish you good luck with that. I only managed once to get a ldap backend working for me and it was one of the most painful experiences and I said that in relation to the fact that I even had windows 3.1 running on my desktop some time ago :D

15:27 *say

15:29 Poky: well that's encouraging isn't it :D I mean tutorial on monodb http://docs.mongodb.org/manual/tutorial/configure-ldap-sasl-openldap/ is really short. so it's probably my fault

15:29 doesn't help that their repositories aren't working for the debian server I have running.. so I don't even know if I have the enterprise version that can do it.. ;D oh well, it'll get done. somehow. :D

15:29 sveri: Ok, some motivation, the last time I tried ldap is like 8 to 10 years ago, so I guess things have become better and easier in between :D

15:30 virtual machines or better, docker will be your friend there. heck, maybe you find docker images for that

15:31 Poky: well I've never touched mongodb, I've never seen ldap.. I guess I might as well add docker to the mix if I get desperate

15:32 sveri: take the docker tour on the website, it is really easy to get started with, on the other hand, you are right. two new technologies are usually one to much, adding a third won't make things easier

15:34 Poky: well, I have to mongodb running OK. I have acess to ldap via some phpuglyadmin.. now I just need to figure out how to make them talk I think :)

15:34 sveri: ok, then just do that

15:34 no need for a third layer :D

15:34 Poky: but docker is definitely on my list of things to play with. seems to be hot nowdays

15:35 sveri: Poky: it is and it does make things easier, but it has it's limits and they are pretty tight

15:39 gfredericks: limits?

15:41 dviramontes: hi, anyone here using Figwheel with Quil.cljs ?

15:43 sveri: gfredericks: well, it's a best practice to only run one service in one container, part of the reason is they replaced systemd by fakesystemd which makes it hard to run several services. You have to know in advance which ports you will have opened inside your container. Only some operating systems are supported as hosts / "guests", every user belonging to the docker group has basically root access, which is by design and maybe some mor

16:16 gfredericks: hmm; yeah.

16:52 thatguy: I'm passing a map to yessql for saving data. Any convenient way to get the correct keys out of the params map, into this "entity" map?

16:52 Thinking now just to have a list of the db keys in a var, that i could use to copy

16:53 or is there a way to say, only copy keys that match the target map? i'm new, obviously

16:59 tomjack: target map?

16:59 "only copy keys that match the target map" sounds like "only copy the keys I want to copy" to me

17:02 in other words, please elaborate and/or give example input/outputs you want

17:09 arohner: ,(doc select-keys)

17:09 clojurebot: "([map keyseq]); Returns a map containing only those entries in map whose key is in keys"

17:09 arohner: thatguy: ^^ ?

17:22 sohalt`: Hi, I'm trying to get a ClojureScript REPL running and having no luck with both the node and the brepl one. (I used the lein mies template) The brepl one hangs and the node one gives me a "TypeError: Cannot read property 'call' of undefined"

17:23 Any ideas what I'm doing wrong?

17:23 bbloom_: sohalt`: are you trying to use the absolute latest version of cljs? seems like dnolen is actively changing the repl & there have been a few bugs/regressions/etc

17:26 sohalt`: bbloom_: I'm trying to use 0.0-2755 -- that's the one specified in the lein mies template. Not sure, whether it's the absolute latest.

17:27 bbloom_: that's a bit old, which is probably a good thing :-)

17:29 sohalt`: Oh, ok. I'll try a newer one. Also I noticed the node repl and brepl scripts in the mies template differ from what the quick-start page in the wiki says.

17:30 bbloom_: i couldn't get 3211 to work for me, but 3196 worked fine. dnolen hasn't popped up for me to bug him about it

17:30 i just changed the url to download the jar

17:30 cljs.jar is super easy to get started w/ compared to pretty much everything else

18:01 slipset: I've got this thing in core.async which is causing me some head-ache

18:01 the code is here https://gist.github.com/slipset/7cf68e62d82fb50ae587

18:01 My expectation is that Even should only serve even customers, and Odd should only serve odd customers,

18:02 but a typical run of this ends up a mix of odds and evens for both Odd and Even.

18:07 weavejester: bbloom_: Are you using 3211 with Clojure 1.7.0-beta1 or later?

18:08 bbloom_: weavejester: https://github.com/clojure/clojurescript/wiki/Quick-Start#clojurescript-compiler says "The standalone ClojureScript JAR comes bundled with Clojure 1.7.0-Beta1."

18:09 weavejester: bbloom_: Ah :)

18:17 sohalt`: Hm, no luck with the jar (3211) aswell. The repl displays "Waiting for browser to connect ..." and then hangs

18:17 I'll try 3196

18:20 Yes! "cljs.user=>" Thanks!

18:25 Does anybody have a recommendation for a library to modify svg from clojurescript?

18:29 thatguy: (let [entity {:b 20 :c 30}

18:29 req {:a 1 :b 2}]

18:29 (merge

18:29 entity

18:29 (select-keys req (keys entity))))

18:30 If anyone cares, that's my solution from the help i got earlier. thx all

19:10 tahmid: Hello guys

19:10 I am trying lein-droid

19:10 But I can’t change the background color of my image-view

19:11 In java I can write imageView.setBackgroundColor( Color.parse(“FFFFFF”));

19:11 But I can’t import the color class

19:12 Help me please

19:12 justin_smith: tahmid: what is the full package of Color?

19:12 tahmid: android.graphics.Color

19:13 justin_smith: and what did your import look like?

19:13 tahmid: (import ‘[andorid.graphics.Color])

19:14 justin_smith: (import android.graphics.Color) or (import (android.graphics Color))

19:14 wait, I think that second one needs a '

19:15 tahmid: Nope

19:15 It worked

19:15 justin_smith: ,(import '(java.util UUID))

19:15 tahmid: thanks

19:15 clojurebot: java.util.UUID

19:15 justin_smith: np

19:15 tahmid: (import android.graphics.Color) worked

19:15 (inc justin_smith)

19:15 lazybot: ⇒ 246

19:15 oddcully: also this looks like a rather odd '

19:15 justin_smith: yeah, the second one is handy if you want multiple things from one package though

19:16 ah!

19:16 ,(import (java.net URL URI))

19:16 clojurebot: java.net.URI

19:16 tahmid: nice

19:16 justin_smith: forgot that worked without the quote (works with it too though)

19:17 tahmid: should I ever use vector like in the :require form

19:17 justin_smith: tahmid: vector vs. list are both accepted, but list is the first choice for import, vector is the first choice for require

19:17 bitcycle: Hey all. I've got leiningen-2.5.0 installed via brew but lein plugin install compojure-app isn't working. :( Can someone tell me what I'm doing wrong?

19:18 justin_smith: "lein plugin install" is a thing with lein 2?

19:18 tahmid: lein new compojure Your_App_Name

19:19 bitcycle: justin_smith: how would I install compojure-app project template?

19:19 justin_smith: you don't install templates, you instantiate them

19:19 like tahmid said

19:19 bitcycle: ah, and how does the lein tool know where to get the templates?

19:19 justin_smith: for actual plugins, you add them to your ~/.lein/profiles.clj or to your project.clj

19:20 bitcycle: it finds them the same way it finds any other library, it looks for packages called lein-template iirc

19:20 weavejester: bitcycle: It looks for a project called <whatever>/lein-template in clojars.

19:20 oddcully: bitcycle: lein new --help

19:20 bitcycle: justin_smith: I'm super new to the-JVM/clojure -- coming from Python/C++.

19:20 justin_smith: just wondering about where the libs live out on the interwebs.

19:21 justin_smith: bitcycle: OK. I think you'll find clojure/lein super weird at first, but eventually grow to like it

19:21 oddcully: bitcycle: bitcycle ~/.m2 most of the time

19:21 bitcycle: oddcully: huh?

19:21 justin_smith: bitcycle: it uses repositories like clojars and maven-central and sonatype, then it caches them under your ~/.m2/repositories/

19:21 oddcully: bitcycle: bitcycle ~/.m2/repository to be exact

19:21 bitcycle: oddcully: m as in maven?

19:21 weavejester: bitcycle: By default Leiningen has two Maven repositories it uses to find packages.

19:21 oddcully: bitcycle: m as in maven

19:21 bitcycle: Ah.

19:22 weavejester: bitcycle: Maven Central (https://search.maven.org/) and Clojars (https://clojars.org/)

19:22 bitcycle: Ok. That makes more sense. Thanks for helping, guys.

19:22 tahmid: clojure for android is getting better and better

19:22 weavejester: bitcycle: The ~/.m2 directory is where packages are locally cached.

19:22 justin_smith: tahmid: cool, that's good to hear

19:22 I have a 1.7 repl installed, but have only played with it briefly

19:23 bitcycle: weavejester: is there a well-known dependency repo on the interwebs similar to python package index (pypi)?

19:23 oddcully: bitcycle: mavencentral, jcenter

19:24 justin_smith: clojars.org also has an index to its packages

19:24 oddcully: bitcycle: clojars of course for clojure things

19:24 bitcycle: lol. clojars.

19:25 weavejester: bitcycle: Maven Central is generally used for Java packages, Clojars is used for Clojure packages.

19:25 bitcycle: and I thought the Python community was cheezy with their names.

19:25 justin_smith: bitcycle: we have some super bad ones

19:25 bitcycle: weavejester: cool, cool.

19:25 oddcully: bitcycle: if you are on lein you can install the `plz` plugin, which makes adding new stuff really a nobrainer: lein new app; cd app; lein plz add instaparse

19:25 justin_smith: bitcycle: lazybot uses a lib called irclj

19:25 bitcycle: oddcully: doesn't adding a new lib simply mean updating the project file?

19:26 oddcully: bitcycle: sure, but you would have to get the version number first

19:26 weavejester: bitcycle: "lein-plz" is just a plugin that automates the updating, IIRC

19:26 But I tend to find it useful to start off doing things the "long way" before using shortcuts.

19:26 justin_smith: bitcycle: yes, it just updates the project.clj for you (finding latest stable version)

19:27 bitcycle: oddcully: shouldn't you _want_ to know the version you're pinning?

19:27 :)

19:27 I guess it does that for you. ...

19:27 justin_smith: there is also pallet/alembic for updating your deps at runtime in a repl without restarting

19:27 bitcycle: Nice.

19:27 justin_smith: (almebic.still/load-project) loads up any new deps

19:27 oddcully: bitcycle: at project start i gladly take the recent one. and even if not: saves my typing in the first place

19:28 justin_smith: alembic won't drop deps though, only add new ones

19:29 oddcully: bitcycle: i also have my mavensearch twoliner script. i am lazy! searching websites bores me to death. a pip/easy_install user should know the value of such tools ;)

19:29 bitcycle: for sure. you guys are making it super easy and nice to get into clojure. Thanks for that. I'm prepping for a sysad role working with tomcat and what-not -- so I figured I would brush up on the jvm.

19:31 not sarcastic, I promise.

19:31 :)

22:11 brainproxy: i'm getting a "call to static method invokeStaticMethod on clojure.lang.Reflector can't be resolved", related to invoking `lein run` when I have a *warn-on-reflection* set to true via :global-vars

22:12 but in my testing profile, I have it set to true also and made sure I'm not actually doing any reflection

22:20 justin_smith: have you changed the version of your clojure dep recently? if so try lein clean

22:52 arrdem: Anyone know of a library function f which replaces all regex matches in a string s with f of the match?

22:57 justin_smith: ,(clojure.string/replace "hello world" #"[^ ]+" (fn [s] (str s "ay")))

22:57 clojurebot: "helloay worlday"

22:57 arrdem: shit.

22:58 justin_smith: hiding in plain sight

22:58 arrdem: now I just feel bad

22:59 there are even examples of that behavior on Grimoire

22:59 okay I'll take it

23:02 TEttinger: (inc justin_smith)

23:02 lazybot: ⇒ 247

23:02 arrdem: (inc justin_smith)

23:02 lazybot: ⇒ 248

23:03 justin_smith: ,(string/replace "hello world" #"[^ ]+" (fn [s] (str (subs s 1) (first s) "ay")))

23:03 clojurebot: #error{:cause "No such namespace: string", :via [{:type clojure.lang.Compiler$CompilerException, :message "java.lang.RuntimeException: No such namespace: string, compiling:(NO_SOURCE_PATH:0:0)", :at [clojure.lang.Compiler analyze "Compiler.java" 6543]} {:type java.lang.RuntimeException, :message "No such namespace: string", :at [clojure.lang.Util runtimeException "Util.java" 221]}], :trace [[cloju...

23:03 TEttinger: arrdem, was it you or gfredericks who did that amazing test.chuck regex generator?

23:03 justin_smith: ,(clojure.string/replace "hello world" #"[^ ]+" (fn [s] (str (subs s 1) (first s) "ay"))) ; better pig latin

23:03 clojurebot: "ellohay orldway"

23:03 justin_smith: TEttinger: that was gfredericks

23:03 and that was a work of genius

23:04 TEttinger: arrdem makes the prancy pony that is grimoire, right

23:04 * arrdem prances

23:04 TEttinger: heh

23:04 justin_smith: and oxcart

23:05 arrdem: justin_smith: currently using that <platform>::<ns>/<n> notation all over Grimoire

23:05 justin_smith: cool

23:05 arrdem: now if you just use that in a markdown file somewhere it'll automagically generate the link and insert it

23:05 justin_smith: oh, nice

23:06 TEttinger: I am really looking forward to getting out of javaland. I've been writing lots of these gnarly heavily-mutable array- and map-based things for a game lib. I've written these before in clojure, most of them, and performance is uh a concern

23:06 arrdem: would it be... presumptive to PR the clojure cookbook repo adding Grimoire links all over the place?

23:06 just an idea I had

23:23 and it's working!

23:23 justin_smith: cool

23:23 TEttinger: nice

23:23 that was fast

23:24 justin_smith: amazon is now offering GaaS http://www.marketplace.org/topics/business/final-note/now-amazon-will-let-you-rent-goats

23:24 arrdem: ahaha

23:26 justin_smith: actual link http://www.amazon.com/exec/obidos/ASIN/B00UBYDXXQ

23:28 arrdem: hum... so it sorta kinda works in that if you say clj::foo/bar it'll give you _a_ link to that but if you're on an old version now you don't want the link to the _newest_ version of that you want the link to _this_ version of that.

23:28 sigh

23:39 Is there a good way to do Maven package introspection?

23:40 justin_smith: http://eclipse.org/aether/ like what aether does?

23:41 arrdem: probably

23:41 justin_smith: arrdem: maybe the Artifact class http://download.eclipse.org/aether/aether-core/1.0.1/apidocs/org/eclipse/aether/artifact/Artifact.html

23:42 arrdem: of course we have a nice clojure frontend to aether https://github.com/cemerick/pomegranate

23:43 arrdem: oh thank the Old Ones

23:43 (inc justin_smith)

23:43 lazybot: ⇒ 249

23:43 arrdem: (inc cemerick)

23:43 lazybot: ⇒ 20

23:44 arrdem: https://www.dropbox.com/s/saonllz7zc0v9de/2015-04-25-224326_1185x1057_scrot.png?dl=0

23:45 I'm thinking that I could probably try to tack artifact metadata into the Grimoire datastore and then resolve the "right" version of whatever def you refer to with a short name from that context.

Logging service provided by n01se.net