#clojure log - Aug 04 2013

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

0:40 callen: technomancy: did I just break clojars or something?

1:01 lein jar && lein pom && scp pom.xml `ls -ltr target/provided/*.jar | tail -1 | awk '{print $8}'` clojars@clojars.org:

1:01 I am that goddamn lazy.

1:01 Raynes: ^^ do you have a thing for this, or is it normal to have a ship.sh like that?

1:02 onr: lets admit, the word 'pom' resembles 'porn'

1:02 callen: my font rendering doesn't suck that much ass

1:02 otherwise I'd agree with you.

1:12 ambrosebs: core.typed now supports core.async. Please try it out, feedback needed! https://groups.google.com/forum/#!topic/clojure-core-typed/bx-5oYfZf4Y

1:20 callen: ambrosebs: very cool. :)

1:20 ambrosebs: callen: thx

1:21 callen: ambrosebs: I haven't used core.typed yet but it sounds interesting. How much gets caught at compile time?

1:21 ambrosebs: how does it handle calling into untyped libs?

1:22 ambrosebs: callen: You have to give annotations at the boundary points. They aren't necessarily checked though, so you could make anything up.

1:22 callen: sure

1:22 does it cover colls and scalars, just scalars, and does it have things like linear typing?

1:22 ambrosebs: what's linear typing?

1:23 callen: like is there a notion of a "Vector of $X?"

1:23 http://en.wikipedia.org/wiki/Substructural_type_system

1:23 could be done with macros if you wanted to be a massive dick about it.

1:23 they have it in Scala as compiler magic.

1:25 ambrosebs: callen: hmm nope.

1:25 callen: I've heard of affine types, they would be nice

1:25 callen: ambrosebs: are collections typed?

1:25 ambrosebs: yes, as you'd expect with parameters

1:26 callen: if so, are the types generic to sequences or are they broken out?

1:26 ambrosebs: broken out?

1:26 callen: Seq[int] vs. Vector[int] and List[int]

1:27 can I pretend a Vector[int] is a Seq[int] using generics?

1:27 "implements interface ${X}" 'ish behavior.

1:27 ambrosebs: well, if Vector <: Seq, but it isn't ;) Vector <: Seqable yes

1:27 callen: Seqable[int]?

1:27 clojurebot: ,(let [testar (fn [x y] (if (= (reduce + (filter odd? (range 0 x))) y) (str y " is an square perfect")) )] (testar 10 25))

1:27 callen: jesus christ clojurebot shut up.

1:28 ambrosebs: Yep. [1] is (IPersistentVector Number)

1:28 and (Seqable Number)

1:28 etc.

1:29 callen: have a browse: https://github.com/clojure/core.typed/blob/master/src/main/clojure/clojure/core/typed/base_env.clj#L604

1:29 callen: hoopy. Thanks.

1:41 muhoo: i really wish there was a way to keep nrepl from locking up emacs

1:41 callen: muhoo: leiningen version?

1:42 muhoo: "Caching JVM class names"... and then... all of emacs locks up, if the network connection is flaky, i.e. an ssh tunnel to a remote lein

1:42 callen: muhoo: lein version plz.

1:43 muhoo: callen: 2.1.3. was this fixed recently?

1:43 callen: I'm just going down the list of history in my brain.

1:43 there were multiple times something like this got fixed in either leiningen or nrepl.

1:43 muhoo: well if it is i'll go browse the changelog in nrepl.el and lein

1:44 callen: I wouldn't root around too much, the stuff I was thinking of was mostly a year'ish ago.

1:44 that I'm directly aware of anyway

1:44 Sorry I couldn't be more helpful.

2:22 dark_element: i am using Audio API which get minified in advanced mode and breaks. It is part of browser api and not any library.

2:22 writing an extensive list of externs for the API is painful

3:04 muhoo: externs suck. but last one i had to "write" was for flot, and IIRC it was like one line long

3:05 i also seem to remember jquery plugins having easy externs files, not sure, memory hazy

3:11 dark_element: just repeating previous message since i still don't know how to go about it "I am using Audio API which get minified in advanced mode and breaks. It is part of browser api and not any library."

3:23 maharj: what is the most clojure way to join two lists together? i.e. given (let [a '(1 2 3) b '(4 5 6)] ) what is the best way to get '(1 2 3 4 5 6)

3:23 reduce with cons and reverse is one that I can come up with but it sounds too complicated

3:26 glosoli: Hey folks http://pastie.org/8204182#6 how namespace could be affecting the work of remove function ? it seems to work fine until I switch the NREPL to the namespace used in file

3:29 MadFunk: maharj, would (concat a b) work for you?

3:30 dark_element: Ok figured it out I needed extern files for audio api https://code.google.com/p/closure-compiler/issues/attachmentText?id=710&aid=7100000000&name=webaudio.js&token=VkDqTsdl5VqIZiTNoFcmPmxucN0%3A1375600103686

3:31 Ohh the joy of generating minified js which perfectly works as it's 1 MB unminified counterpart

3:31 maharj: MadFunk: spot on :) Thanks!

3:31 https://www.refheap.com/d56cc02b79f668ddc9e8e2aef this was the context I am using it in

3:32 So using concat there is the way to go

3:33 MadFunk: i got lucky, lol. i am still very new with clojure, but I am finding there is always a simpler way to do stuff.

3:33 glad i could help though.

3:33 maharj: MadFunk: Yeah, me too. That's why I don't know even the basic function names yet.

3:36 MadFunk: right now I am working with cljs and angular. I know I want to use features from both, but there's overlap in what each can do, so I am trying to determine what kind of balance between the two is optimal.

3:38 dark_element: MadFunk I am guessing part handling data overlaps between angular and cljs

3:39 SeanCorfield: MadFunk: are you using anything specific to bridge between cljs and AngularJS? clang? something else? or does it "just work"?

3:39 MadFunk: Well, that's the thing. I'm still trying different approaches.

3:40 dark_element: MadFunk did you try out this https://github.com/dribnet/mrhyde

3:41 MadFunk: I want to find an easy way to make requests to and from the clojure backend with angular-- it may end up that the actual clojurescript part becomes pretty minimal, whereas most of the non-angular/html will just be backend clojure.

3:42 dark_element, this (mrhyde) sounds awesome already, thank you

3:43 SeanCorfield: dark_element: that's the "Metaprogramming Polyfill" library from Clojure/West right?

3:43 dark_element: SeanCorfield yup

3:43 The only downside to it is it doesn't work on every browser.

3:44 MadFunk: SeanCorfield, I'll say this-- it's not just working so far, lol. At least not as I want it to.

3:45 dark_element: MadFunk, check the talk "Metaprogramming Polyfill" by Tom White. Though he speaks mostly about d3 he later on talks about angular briefly.

3:45 MadFunk here http://t.co/8ZYyFFA7Um

3:45 MadFunk: thank you

3:47 it is difficult finding good docs or reference material for this particular setup

3:47 SeanCorfield: we're not really far into the JS world yet, but it's in our future and I'd rather use cljs if possible

3:49 we just took onboard a 3rd party project built with CoffeeScript, Underscore, Handlebars, Backbone, Stylus and 100 other JS-related frameworks (including Socket.IO!)

3:49 I look over it all and just wish it was written in Clojure...

3:50 MadFunk: It's a strangely beautiful language

3:52 That sounds like a nightmare Sean

3:52 dark_element: SeanCorfield that sounds like mix of everything out there

3:58 SeanCorfield: dark_element: oh. not _everything_... there are plenty of JS frameworks not used in this app :)

3:59 I like Stylus based on what I've seen in this app. Not sold on CoffeeScript at all. I can see the utility in both Underscore and Handlebars but...

4:00 In some ways the JS explosion of combinable microframeworks is a bit like Clojure's web world...

4:06 What's the "recommended" approach to templating in cljs?

4:07 (I'm thinking in comparison to the Backbone/Underscore inline templates or the Handlebars external templates)

4:07 ucb: SeanCorfield: have you looked at dommy? Here's an interesting post: http://blog.getprismatic.com/blog/2013/1/22/the-magic-of-macros-lighting-fast-templating-in-clojurescript

4:07 SeanCorfield: oh, not sure how that'd compare to those

4:07 SeanCorfield: thanx ucb reading now

4:07 ucb: nw

4:11 snake-john: hi I am using emacs from http://emacsformacosx.com Can I invoke this gui version directly when I am a terminal. something like /Applications/Emacs.app project.clj

4:11 SeanCorfield: ucb: i don't like hiccup much for html work... not sure i'd like dommy either based on that post... but good reading...

4:11 callen: use Selmer for server-side templating :)

4:11 ucb: SeanCorfield: no worries; I've not used it myself, just recalled that post being an interesting read :)

4:12 SeanCorfield: snake-john: i recommend running emacs in client/server mode on mac so you can use emacsclient for terminal version or full cocoa UI

4:13 snake-john: seancorfield: would you know a good how-to on installing emacsclient ?

4:13 SeanCorfield: i replaced /usr/bin/emacs and /usr/bin/emacsclient with versions from /Applications/Emacs.app/... and have a ec script to make them easier to use

4:13 snake-john: no one blogs about it - there's too much pressure against publishing "how-to" stuff that gets out of date

4:14 but i might blog about how we set it up at world singles just as an example

4:14 and of course i'm on my windows tablet right now so checking how i do it on mac is less than obvious :)

4:15 ucb: SeanCorfield: that'd be nice; I currently run the server from my main GUI instance so that I can ec from a terminal. This is not optimal I reckon.

4:16 SeanCorfield: we have a plist to start emacs at boot time, then ec starts the gui client by default and ec -t starts the Terminal client

4:17 our /usr/bin/emacs and /usr/bin/emacsclient scripts just run parts of /Application/Emacs.app/...

4:17 man, it's 1am, the wife's gone to bed, and TV's turning to shit so I'm off to bed... email me at sean@corfield.org and I'll share more details of our emacs setup (and maybe i'll blog it!)

4:17 snake-john: seancorfield: thanks for trying to help. I heard about emacsclient before. What I am skeptical is that when doing clojure stuff I often have to start a new nrepl by restarting emacs because I always suspect haring unwanted vars around. if I use emacsclient I may endue having many *nrepl* buffers which kind of could get unmanageable?

4:18 SeanCorfield: i just do M-x nrq (nrepl-quit) and then jack in again

4:18 no need to restart emacs

4:19 and it's easy enough to (remove-ns ..) to kill off stale namespaces :)

4:19 seangone: g'nite

4:19 snake-john: Ah thanks thats a great tip!!

4:23 muhoo: has this already been done, in some library somewhere? https://www.refheap.com/17197

4:25 because, seems like a common thing, to sort a report by its columns

4:26 callen: not that I know of, but it seems very useful.

4:28 TEttinger: muhoo, technically you can use java for it http://docs.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html

4:28 but it wouldn't be as nice as what you have to use

4:29 though probably faster?

4:29 muhoo: aye, tahnks

4:34 TEttinger: muhoo, found an interesting flaw in LinkedHashMap: ##[(java.util.LinkedHashMap. {:a 1 :b 2 :zero 0}) (doto (java.util.LinkedHashMap.) (.put :a 1)(.put :b 2)(.put :zero 0)) ]

4:34 lazybot: ⇒ [#<LinkedHashMap {:zero=0, :a=1, :b=2}> #<LinkedHashMap {:a=1, :b=2, :zero=0}>]

4:35 TEttinger: if you pass it an unordered map, it doesn't respect that ordering of keys in the primitive, which isn't a bug, but it is unexpected

4:35 muhoo: oh, wow.

4:36 TEttinger: so yeah, you could use your code and pass that in, really, if there was any issue

4:49 samrat: i've added [org.clojure/java.jdbc "0.3.0-alpha4"] to my deps, but clojure/java/jdbc/ddl.clj doesn't seem to be on my classpath. https://www.refheap.com/17198

4:50 Also tried deleting the java.jdbc file inside ~/.m2 and reinstalling but I'm still getting the same error

4:52 TEttinger: samrat, using lein 2.x version?

4:53 samrat: TEttinger: yes 2.2.0

4:53 TEttinger: lein clean / lein deps / any errors produced?

4:54 samrat: TEttinger: nope

4:55 TEttinger: have you tried: lein classpath

4:55 to see if there's some parent that is in the classpath?

4:57 samrat: TEttinger: not sure what you mean, but there doesn't seem to be any older versions there either

4:58 TEttinger: ok, when I add that to my deps and run lein classpath ...

4:58 it seems ~\.m2\repository\org\clojure\java.jdbc\0.3.0-alpha4\java.jdbc-0.3.0-alpha4.jar is on the classpath

4:59 samrat: TEttinger: yes, my output shows that too

4:59 TEttinger: the only file in there is clojure\java\jdbc\sql.clj

5:00 in that jar I mean

5:00 so ddl is not in that alpha version

5:00 the namespace is clojure.java.jdbc.sql

5:01 samrat: TEttinger: hrm, so the functions in there got moved to jdbc.sql?

5:01 TEttinger: I searched for ddl, didn't find any in sql.clj

5:01 might be a bad uploaded version

5:03 there is also a jdbc.clj

5:03 just ns clojure.java.jdbc

5:03 samrat: TEttinger: yeah, I can :require those namespaces

5:03 TEttinger: don't know what happened to DDL

5:04 but there is a comment about an overhaul of the API

5:05 samrat: I think ddl was part of the overhaul, the docs point to that namespace in stead of some deprecated functions

5:05 TEttinger: DDL is fairly new it seems. alpha4 was in may, DDL may have been newer

5:12 samrat: TEttinger: the docs already mention that though, and mentions the other equivalent functions in java.jdbc are deprecated. I am very confused

5:13 and looks like I missed SeanCorfield by just a little while

5:13 TEttinger: yeah, https://github.com/clojure/java.jdbc/commits/master/src/main/clojure/clojure/java/jdbc/ddl.clj DDL is a month old, alpha4 is older. you can download the latest source and do some lein project.clj settings to find it

5:15 samrat, or you can add https://oss.sonatype.org/content/repositories/snapshots to your repo list in project.clj and then change your dep to [org.clojure/java.jdbc "0.3.0-SNAPSHOT"]

5:19 samrat: the first line you need to add is

5:19 :repositories [["snapshots" "https://oss.sonatype.org/content/repositories/snapshots/&quot;]]

5:20 then just change alpha4 to SNAPSHOT in the dependency

5:20 that version should have DDL

5:20 yes, it does, just checked

5:22 samrat, I would recommend the snapshot solution to the problem over source finagling

5:24 samrat: TEttinger: yeah works for me too

5:28 TEttinger: great!

5:34 samrat: TEttinger: but looks like I'll have to use the non-snapshot version anyways. a bunch of stuff has been marked as deprecated but doesn't mention what to use as an alternative

5:34 TEttinger: ouch

5:35 maybe it will be fixed in a week or two, file an issue on his github

5:36 err, here http://dev.clojure.org/jira/browse/JDBC

7:33 shdwprince: Experimenting with lwjgl and clojure, read at the lwjgl wiki such example: https://www.refheap.com/17202. Currently there is no way to produce similar code in clojure?

7:35 noncom: hi, i need to have a mutable storage of similar objects where each object can be referenced and edited/removed selectively. is there any library for that? what comes to mind - a {} with unique digital keys and a group of accompaying functions to handle this storage. what bugs me is that it is very alike to what OOP object management is, where instances are given number-like references..

7:35 so maybe there is a oop lib that can help?

7:36 shdwprince: that is ambigous.. why do you think you can't do that in clojure?

7:39 shdwprince: noncom, writing {} after glBegin(...) is neccessary?

7:39 noncom: shdwprince: to me it's like that you can use any java library with clojure, so you can use lwjgl as well. or you can try to use some engine instead. personally i use jmonkeyengine 3 for opengl graphics

7:39 no, even in java i would not write these {} as in your example

7:39 it is completely pointless

7:40 shdwprince: noncom, so that is only for better code grouping..

7:40 noncom, anyway, I better use slick2d

7:40 noncom: i know, but it is redundant.. in clojure i would just call these methods sequentially

7:41 yeah, slick2d seems to me a good choice if you wanna make that type of game

7:42 shdwprince: there once was penumbra: https://github.com/ztellman/penumbra maybe it will give you some good ideas

7:42 shdwprince: noncom, really I need only to rendering big chuncks of text, but with opengl, can you offer some lightweight solution?

7:43 lightweight is to use lwjgl, but I dont want to mess with all this gl-related code

7:43 maybe another day

7:43 vmarcinko: sory guys for extremely noobish question, but I just finished studying shalowly Clojure via REPl, and am wondering how to package and run clojrue app for first time...I'm not interested in starting my app via lein or something other than basic stuff..Anyway, I just want my .clj source files packaged in some myapp.jar, and call somehow some -main function inside my namespace. All the docs I found is at: http://clojure.org/repl_and_main

7:43 but its not very detailed, and there is no example for exactly this case.

7:43 noncom: shdwprince: yeah, i understand you :) that's why i abandoned things like c++... so can your text be modified or is it static and never changed after being created?

7:44 vmarcinko: so basically, I need something like: java -cp clojure.jar:myapp.jar clojure.main ...?

7:44 btw, I don't want AOT

7:44 noncom: vmarcinko: try "lein jar" or "lein uberjar".. afair jars will be created in the "target" folder

7:45 vmercinko: why don't you want aot?

7:45 shdwprince: noncom, shure it'll change. It's roguelike :)

7:46 vmarcinko: noncom: is it normal to package all app's JARs inside one big jar in clojure world? coming from java land, I always look to have jars separated...Reagrding AOT, I heard somewhere some bad effects of AOT, so I don't mind compile when booting the app

7:47 noncom: shdwprince: i see, well, i asked because handling text is a problem in opengl itself.. there is no THE way to do it and various libs offer various approaches. the most common one is to make bitmap fonts. do you know how they are made in opengl?

7:47 vmarcinko: i know leiningen has its own way of packaging and running apps, but first i wanted to learn the most basic way of how it works under the hood, and then move to some better way of packaging/running things

7:49 shdwprince: noncom, I know about opengl and what features it offer. Slick2d, except of creating display and rendering text can also render images, play sounds, etc.. I don't need that, all I need - rendering character matrix (text) and handling input

7:49 noncom: vmarcinko: i haven't been doing much clojure jaring, and i am a newb too, so i wouldn't speek for all, but for a standalone release app i think i'd prefer to package all in one jar, so "lein uberjar" would work.

7:49 vmarcinko: so I basically just want to run it like: java -cp clojure.jar:myapp.jar:some3rdpartylib.jar clojure.main ...?

7:49 whereas myapp.jar would contain my clojure source files

7:50 but I cannot find any examples around about this - usually 99% of exmpels are given via repl

7:50 noncom: shdwprince: i see, well, then i think slick2d is a good choice then, just use what you need there... btw, there are some roguelikes done in clojure, i think you're aware of it?

7:50 guille: Has clojure got better at stacktraces?

7:50 noncom: vmarcinko: well, yes, you can go the java cp way...

7:51 shdwprince: guille, currently I have no problems with it

7:51 noncom, nope, I just making mine for fun and experience

7:51 vmarcinko: noncom: and you probably don't know what to put in the place of dots -> java -cp clojure.jar:myapp.jar:some3rdpartylib.jar clojure.main ...?

7:52 -m com.mycomapny.myapp or something like that, given that this namespace contains -main function?

7:52 noncom: guille: locs are not given in macros, anonymous functions and maybe somewhere else, so that sometimes gives me troubles, yes

7:52 vmarcinko: unfortunately, i cannot find any examples of this around

7:52 guille: cool

7:52 noncom: shdwprince: you may look https://www.google.ru/search?q=roguelike+in+clojure&oq=roguelike+in+clojure&aqs=chrome.0.69i57j0.2590j0&sourceid=chrome&ie=UTF-8

7:54 vmarcinko: maybe smth like http://www.beaconhill.com/blog/?p=283 ?

7:54 or http://mikeebert.tumblr.com/post/31792001823/setting-up-a-command-line-clojure-app

7:54 shdwprince: noncom, thx, I'll check it

7:54 noncom: or http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started

7:55 shdwprince: cool! i used to play roguelikes a lot, be sure to come up with it and be known then!

7:56 shdwprince: noncom, huh, I don't think I'll make it into playable game. Currently its intresting to make it, but in future I dunno :)

7:57 guille: i'm wondering between common lisp and clojure for my next project

7:57 *wandering

7:58 noncom: shdwprince: make it multiplayer then :D

7:58 guille: and what you think?

7:59 guille: well it's a webapp with some neat algos with a postgres backend, so I'd use both

7:59 shdwprince: Clojure is much more popular that I think. Few days ago I use lanterna directly, today I found clojure library, today I use lwjgl directly, and, surpirise, someone already writed a wrap around it

8:00 vmarcinko: noncom: thanx, but I think i already looked at these sites, and while they offer some nice ways to runpackage apps, they still don't explain this mechanism that I would like... just packaging clojure sources inside one app JAR, no AOT, no external .clj script, and just to call it via "java -cp"...

8:01 that doesn't mean that i will not end up using these suggested ways, i just like to know how things work under the hood before going to other ways

8:01 guille: what I love about common lisp is slime and it's speed on the other hand I know java well and I'd end up implementing some algorithmic bits in it for a speed bump

8:01 noncom: vmarcinko: well, sorry, i never did anything like that. maybe you have to ask this here later, when someone who knows will come, or post the question to the user group

8:01 vmarcinko: ok, np

8:03 noncom: guille: i'm not using emacs, but i heard slime is available for clojure as well. and as for me, being able to use java ecosystem is a killer-feature

8:04 shdwprince: noncom, java ecosystem and easiest access to it

8:06 noncom: although i must say i really like common lisp too, it is very nice indeed

8:06 guille: it's just fantastic, not sure though how much of the CLOS is done in clojure

8:06 does it have feature it?

8:08 i'm seeing in the internet you have `records'

8:08 noncom: i don't think so. but it has a different approach with defrecord and deftype.. you can try google "clojure clos" and find articles on related topics. but afaik no clos is there

8:08 guille: well, datatypes

8:08 noncom: yes

8:09 guille: it may well turn out that you need no object system too

8:09 guille: yeah, it's possible

8:10 much of it can be built on top of sequences

8:11 does exist a containers library?

8:11 meh I don't even know what data structures I'll be throwing at the project yet

8:11 it's just an idea I have for side project

8:12 *a

8:12 I'll probably end up doing the algos in c++ interfaced with JNI

8:13 noncom: guille: i think you can do some more research on what you want to use.. why c++? you want speed?

8:13 guille: yep, it's full of tree edit distance comparisons

8:13 probably I'll can cut off on precision for speed

8:14 basically it's a data extraction system for html

8:16 if the thing works out I'll need some glue (clojure could be idea)

8:16 well, it creates automatically wrappers on html for restricted domains

8:20 noncom: guille: hmm, maybe i do not understand the idea well, but i think that in this particular domain you no need c++, no real win

8:25 guille: noncom i'm no c++ guru so maybe i'll end up sketching something in clojure

8:26 you'll notice once I start firing questions around xD

8:31 noncom: cool!

8:44 nkozo: there is a way to use "def-" on the REPL?

10:00 hyPiRion: there is no def-, but there is def ^:private

10:02 TimMc: s/def ^:private/Zuul/

10:04 nkozo: thanks, maybe I has an outdated note and def- existed in a previous clojure version

10:06 hyPiRion: nkozo: defn- exists, but Rich decided afterwards that ^:private was more general and thus omitted def- if I remember correctly

10:25 jtoy: im trying to figure out order of magnitude fo a number, so for this: (int (/ 112300 10)) how would I get 10000 instead of 11230?

10:28 guns: jtoy: Don't you want the base 10 log?

10:28 jtoy: guns yes much simpler :) thanks

10:31 poppingtonic: hi what's the better a/b testing library for Clojure? Something like the analogue of Rails' A/Bingo

10:31 jtoy: guns: is that included in clojure? I only see it in incator

10:33 clojurenewb: hey guys, I'm trying to convert a map data structure into a nested html list with hiccup, but hickory or anything will do really, details at https://www.refheap.com/17205 - I am really struggling to get the correct nesting etc, can anyone help ?

10:33 guns: jtoy: Math/log10

10:33 i think

10:35 jtoy: yes it is, thx

10:37 clojurenewb: oh, I should add the depth of the data structure is arbitrary

11:26 maharj: I'm trying to wrap my head around macros and CLJS. I tried to do a let-dom function that would use a let and domina's value to bind variables to the values. I came up with https://www.refheap.com/e4c818565c7208e26f1971b33 but compiling it gives error: Wrong number of args (5) passed to: scratch$let-dom

11:27 Is there a way to see the expansion in CLJS?

11:31 Or am I just doing something very silly

11:37 shoky: maharj: i'm a noob so might be totally off. but i think, if you're doing ~@body, the @ means you want to expand the list body

11:37 maharj: so mayube you want the arguments list to be: [getter field-names & body]

11:42 maharj: shoky: yeah, you're right when I have multiple forms in the body. But now I've got just the explicit do

11:42 it works both ways in this case

11:42 but somehow the cljs-part is not working and I have no idea how to go about finding out what is wrong

11:43 shoky: mm can't you expand the macro call?

11:44 maharj: shoky: Yeah, I've expanded it in clojure side and it seems to come out right

11:45 maybe I should start with something simpler

11:52 shoky: maharj: you still need the body as a list with & body, no? otherwise the list (do ...) will get expanded to: do ... without the parens.. so you'd get a let call that with a bare "do"

11:53 maharj: e.g. (let [a (something)] do (something))

11:53 the do doesn't do anything there

11:56 guess it doesn't matter for that case.

12:00 maharj: shoky: yeah, I added the & before the body

12:00 but it did not fix it

12:00 I tried doing some trivial macros and they seem to work for cljs as well, so there is something in that code that is OK with clojure but not clojurescript

12:02 nDuff: maharj: you're importing set-value but calling set-value!

12:04 maharj: nDuff: yeah, so it seems. I fixed that but did not change the error message

12:04 nDuff: well, you _do_ need a & before the body

12:04 is the corrected, still-broken code available somewhere?

12:05 maharj: I'll update it, wait

12:06 nDuff: https://www.refheap.com/e4c818565c7208e26f1971b33

12:13 nDuff: maharj: could you provide your project.clj so I can be using the same dependency versions?

12:13 maharj: ...as it is, I haven't been able to reproduce that yet.

12:15 mainframer: I wish the increment function was named "++" rather than "inc".

12:15 maharj: nDuff: Should be updated

12:17 I don't believe it... now it compiles

12:17 I cleaned up the project and compiled

12:17 now it works..

12:17 nDuff: maharj: that's not exceptionally surprising.

12:18 maharj: cljs has a lot of temporary files it tries to reuse where possible.

12:18 maharj: nDuff: okay. will have to keep that one in mind

12:19 Is there somekind of rule-of-thumb when this might occur or a type of exception that is susceptible to go away with recompiling?

12:20 nDuff: maharj: ...well, having changed the code in such a way that the exception no longer made any sense at all was a good hint. :)

12:20 but no, I don't have any particularly good advice there.

12:20 maharj: nDuff: okay :)

12:20 thanks a lot

12:20 to all people involved :)

12:20 baby steps forward

12:21 are there any good tutorials anyone might suggest for getting in grips with the latest and greatest developments in clojurescript development

12:23 kmicu: modern-cljs is not good enough?

12:25 poppingtonic: leiningen has now failed to download dependencies 5 times, through "lein deps". I wonder what's the problem...

12:26 nDuff: poppingtonic: it's not completely unheard of for Maven Central or Clojars to be experiencing downtime.

12:26 poppingtonic: worth looking at what the actual error is, of course.

12:26 maharj: kmicu: I'm going through it currently. It seems good

12:30 poppingtonic: nDuff: the most common error reports I get are "could not find artifact" and "could not transfer artifact"

12:31 nDuff: poppingtonic: details matter.

12:32 poppingtonic: all from the same repo? Do you have a stack trace? Does it have an underlying exception? Etc etc.

12:33 poppingtonic: Apologies. I'll upload the trace to refheap and post the link in a sec..

12:43 nDuff: https://www.refheap.com/17209

12:44 nDuff: poppingtonic: are the other instances only happening on talking to central?

12:44 poppingtonic: (side question: are you going through a proxy server?)

12:45 (if you _aren't_ going through a proxy server, you might consider setting one up -- they can be configured to automatically retry and hide this kind of problem, in addition to the usual caching goodness).

12:45 muhoo: central does occasionally go sideways

12:46 poppingtonic: nDuff: thanks for the tip, I'll make time and set one up.

12:47 also, what do you mean "instances"? the other times I ran "lein deps"?

12:47 nDuff: other cases of this problem, yes.

12:50 poppingtonic: sec

13:52 lyn_: /ignore -channels #mwsf

14:06 ucb: can I use test fixtures with each (testing ...) expression in a test defined as deftest? Initial attempt suggests no.

14:13 poppingtonic: all my downloads come from central.

14:14 make that most. Most "lein deps" downloads come from central, a few from clojars.

14:38 shdwprince: can't find function for checking is value inside collection, someone&

14:38 *?

14:38 clojurebot: * is just for when you are lazy and sloppy

14:39 nDuff: depends on whether you want to iteratively search or do an index check.

14:39 shdwprince: I want #(some (= value %) collection)

14:40 nDuff: shdwprince: the default approach, contains?, will only check indexes -- so if it can't do something efficiently, it won't do it at all.

14:40 Ahh.

14:41 Ideally, you structure your data to not need to do that. :)

14:44 shdwprince: nDuff, i'm just lazy to write (or (= ch \j) (= ch \k) (= ch \h)) and want (inside? [\j \k \h] ch)

14:45 nDuff: (some? #{ \j \k \h } ch)

14:45 that's not necessarily quite right, but closer.

14:45 a set is the right tool for that job, not a vector. :)

14:45 ...and you can use it as a callable.

14:47 shdwprince: still needed to write (some #(= value %) collection), I see no function like your's some?

14:48 nDuff: shdwprince: huh? the set _is_ the function.

14:48 ,(some #{\j \k \h} "just kidding")

14:48 clojurebot: \j

14:48 nDuff: which is truthy

14:48 ,(some #{\j \k \h} "noooo")

14:48 clojurebot: nil

14:48 nDuff: which is falsey. See?

14:49 shdwprince: &(some #{\a \b \c} \a)

14:49 lazybot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character

14:50 shdwprince: strange, for searching char in set of chars I need to write string :)

14:51 mgaare: shdwprince: the idiomatic usage there is that the set is what you are searching with, and the second argument is what you are searching in

14:51 shdwprince: Anyway, I'll do partial solution for my situation

14:52 mgaare: ,(some #{\a} #{\a \b \c})

14:52 clojurebot: \a

14:52 shdwprince: &(#{\a \b \c} \a)

14:52 lazybot: ⇒ \a

14:52 shdwprince: (and \a "Okay")

14:52 &(and \a "Okay")

14:52 lazybot: ⇒ "Okay"

14:53 nDuff: shdwprince: you don't need to write a string, you need to provide a sequence. Any kind of sequence.

14:54 shdwprince: nDuff, shure. But anyway (#{\a \b \c} \a) do the job

14:54 nDuff: Yup.

14:55 kmicu: Yep yep yep

14:59 , (#{nil :a \b #{nil}} #{nil})

14:59 clojurebot: #{nil}

14:59 kmicu: , (#{nil :a \b #{nil}} nil)

14:59 clojurebot: nil

15:19 sideris: hello I'm using codox to generate documentation, and I get a Could not generate documentation for clj-biojava.blast for one of my namespaces

15:19 does anyone know how this could happen?

15:24 noncom: hi, i need to have a mutable storage of similar objects where each object can be referenced and edited/removed selectively. is there any library for that? what comes to mind - a {} with unique digital keys and a group of accompaying functions to handle this storage. what bugs me is that it is very alike to what OOP object management is, where instances are given number-like references..

15:24 so maybe there is a oop lib that can help?

15:25 bhauman: noncom: depending on the number of objects you could just put a hash in an atom or ref.

15:25 like this (atom {})

15:27 noncom: yeah i know. i could also make functions for managing object's "class" and "instance". like class is a k-v in the hashmap, like :cat {} where {} contains instances like {:uuid-1 instance-1 :uuid-2 instance-2 ...} ?

15:29 is that ok?

15:54 MadFunk: doesanyone know of a good search engine for looking up code? Google doesn't seem to be very helpful with that

16:03 gfredericks: MadFunk: symbolhound intends to be good at that

16:03 not sure how well it does in practice

16:09 arcatan: github's search has been useful to me, but it's of course limited to github

16:13 shdwprince: There is solution for nested (if-let [x (...)] (if-let [y (.. x)]))? Something like (if-let [x (...) y (.. x)]) that breaks after first false? I can imagine some solution using thread operator, but there'll be a lot of anonymous functions

16:14 gfredericks: shdwprince: it'd be an easy macro

16:14 shdwprince: gfredericks, for partial situation it's a good choice, but not for regular use

16:16 gfredericks: why not regular use?

16:16 muhoo: weird, i have :profiles {:dev {:jvm-opts ["-Xmx3g"]}, but when i look at the running JVM_OPTS in the environment of the runnign process it's empty

16:16 and i'm running the dev profile, for sure

16:18 shdwprince: gfredericks: becose some day you'll stuck with yours version of clojure that will be unclear for others

16:18 gfredericks: and that solution will not be on clojure.core, so you must require it in every file

16:18 mischov: What do you folks use to profile your clojure code?

16:19 gfredericks: shdwprince: okay; I don't think there's a good solution then

16:20 shdwprince: mischov: today find small https://github.com/ptaoussanis/timbre for simple cases

16:22 gfredericks: what are the dependencies of reducers?

16:24 is it plausible my jvm is missing forkjoin?

16:24 hiredman: yes

16:25 gfredericks: shucks.

16:25 hiredman: what jvm are you using?

16:25 gfredericks: openjdk 1.6.0_27

16:26 hiredman: yeah, forkjoin first shows up in 1.7

16:26 gfredericks: it seemed implausible that clojure requires 1.7, but I guess it's only if you want to use reducers

16:35 shdwprince: Oh, leiningen, after few weeks on development founded that i'm using clojure 1.4.

16:35 *of development

16:52 tcrayford: is there a decent way to call java package level constructors from a clojure namespace?

16:53 in java (I think), you can put a new class inside the package, and just call package level stuff fine, but it doesn't look like that'd work from a clojure namespace

16:53 I guess I can just use reflection :/

16:54 gfredericks: what's a package level constructor?

16:55 tcrayford: so if you leave off the "public" modifier, a java constructor is only visible inside that java package

16:56 for example (and my particular one):

16:56 PersistentTreeMap(IPersistentMap meta, Comparator comp, Node tree, int _count){

16:56 is only callable inside the clojure.lang package

16:56 (barring reflection)

16:57 gfredericks: ah ha

16:58 really that's enforced in the jvm?

16:58 tcrayford: clojure says "no matching method found" when you try and compile something that calls it

16:58 actually, no matching ctor found

16:58 same thing

16:59 MadFunk: gfredericks, arcatan: thanks!

17:00 scape: thanks okasu

17:00 gfredericks: ,(clojure.lang.PersistentTreeMap. nil (comparator (constantly true)) nil 0)

17:00 clojurebot: #<CompilerException java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.PersistentTreeMap, compiling:(NO_SOURCE_PATH:0:0)>

17:01 gfredericks: ,(clojure.lang.PersistentTreeMap. nil (comparator (constantly true)) nil (int 0))

17:01 clojurebot: #<CompilerException java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.PersistentTreeMap, compiling:(NO_SOURCE_PATH:0:0)>

17:01 tcrayford: I probably shouldn't be doing what I'm doing right now, to be fair, but it's an interesting programming challenge (I'm trying to serialize/deserialize the internals of PersistentTreeMap so that when I deserialize, I don't have to rebalance the tree/resort a heck of a lot)

17:02 gfredericks: I guess private methods aren't callable the normal way either are they? so this shouldn't surprise me

17:02 tcrayford: right

17:04 gfredericks: rewrite PersistentTreeMap with deftype

17:04 tcrayford: haha

17:04 ya trollin

17:04 gfredericks: then everything'd be trivial

17:05 tcrayford: wait, does clojurescript have persistenttreemap?

17:05 gfredericks: maaaaaaaaaaybe

17:05 tcrayford: haha

17:05 this is awful

17:05 * gfredericks mutters PersistentShrubberyMap to himself

17:06 tcrayford: it does!

17:06 hahaaha

17:06 I feel ill

17:09 futile: i dont usually post youtube videos but my wife just shared this one with me and it rocks: http://www.youtube.com/watch?v=oo1giTlBHXQ#at=392

17:18 isaacbw: is it possible to do floored integer division without pulling in contrib.math?

17:19 ah, unchecked-divide-int

17:21 shdwprince: Is possible to regenerate class files without restarting leiningen repl?

17:29 isaacbw: holy shit I feel like a wizard

17:29 kmicu: shdwprince: https://github.com/clojure/tools.namespace ?

17:33 muhoo: huh, lein, y u no :jvm-opts?

17:33 it's cold ignoring them

17:39 hyPiRion: muhoo: what is your input opts?

17:41 noncom: please remind me, how do i pass the optional params map like [& {:keys [key-1 key-2]}] further into a function which accepts the same thing?

17:41 hyPiRion: ~mapply

17:41 clojurebot: You have to do something like (defn mapply [f & args] (apply f (apply concat (butlast args) (last args)))), which just goes to show why unrolled keyword args are a bad idea

17:42 noncom: oh i have this, i remember you told me in the past

17:44 just found that the optional params of the first func should be aliased with :as and that alias must be mapplied then. at first i tried just [& params] and it did not work, but now with [& {:as params}] it mapplies well!

17:45 btw, what is that part about "unrolled kw args"? what does it mean?

17:49 Raynes: If you use the [& {..}] syntax to extract stuff, but you just end up needing to pass that stuff to another function that also takes keyword arguments like that, then you're making things unnecessarily difficult for yourself by taking keyword arguments when you should just be taking a map instead, since it is a total of two extra characters and a lot less of a headache to work with.

17:51 hyPiRion: And if you need it optional, go with [& [map-name]] instead

17:51 technomancy: ...if you are OK giving up arity exceptions anyway

17:51 hyPiRion: well, yeah.

17:52 technomancy: https://twitter.com/flangy/status/364123715384000512

17:52 shriphani: hi, is there a version of assoc-in where I don't need to specify the full path for an insert? i.e. I want it to do a search of the nested map and insert the key

17:53 technomancy: shriphani: sounds like a simple composition of two functions

17:54 I don't know of any existing "search for the path to this key" functions though

17:54 shriphani: yeah that's what I wanted to find - google didn't help.

17:54 hyPiRion: not sure what you mean by "search for the path to this key" even means. Could you provide an example?

17:55 shriphani: hyPiRion: (insert {:e :f} {:a {:b {:c {:d :e}}}}) -> {:a {:b {:c {:d {:e :f}}}}}

17:57 hyPiRion: oh, recursive things here.

17:58 technomancy: (defn path-to [target m path] (if (some #{target} (keys m)) path (for [[k v] m] (path-to target v (conj path k)))))

17:59 shriphani: so essentially, I have a data-structure of the form: ({:parent key1 :child key2} …) and I am trying to transform it to something that I can use clojure's tree libs with

18:00 technomancy: (defn path-to [target m path] (if (some #{target} (keys m)) path (first (for [[k v] m :when (map? v)] (path-to target v (conj path k)))))) ; <- actually works

18:00 hyPiRion: shriphani: is there only one match, or may there be multiple matches?

18:01 shriphani: hyPiRion: a parent-child pair is unique.

18:01 technomancy: (path-to :hi {:what {:are :the :haps {:my {:hi :friend} :eh 3}}} []) ; -> [:what :haps :my]

18:01 shriphani: technomancy: would that work for very deep trees ?

18:01 hyPiRion: shriphani: I mean, if you look for :e, then {:a {:b :e} :c {:f :e}} will have two hits

18:01 shriphani: i.e at least 1000 levels

18:01 technomancy: shriphani: it'll work till the stack overflows

18:02 shriphani: technomancy: that was an issue I was facing previously (when I tried to reduce/map over my current data-structure).

18:03 I converted ({:parent K :child V} …) to ({K [V1 V2 V3]}, {V1 [V1_1 V1_2]….} and so on

18:04 and then traversed using a map over children of the current node and that blew up

18:05 technomancy: ergo my concern about StackOverflows.

18:06 technomancy: would converting to a nested map help ? Or is there something I am not seeing ?

18:20 noncom: thank you!

18:30 what is the library of choice for clojure on tweening? is it incanter or maybe just use a java lib? https://github.com/gstamp/tween-clj seems abandoned..

18:40 Raynes: Tweening sounds like some popular preteen dance popularized by the latest Disney star trying to put twerking out of style.

18:40 noncom: :D

18:41 lots of java alternatives are their but they're not clojuric.. well, i've contacted the author of the lib and see what we can do... so far that was the only lib for tweening on clojure that i've seen..

18:42 gotta go now, good luck!

19:04 aka-:

19:43 ThatOneGuy: hey all. What are you guys up to right now?

19:55 Raynes: My neck in Elixir.

20:01 bja: does anyone have a working link to the slides from Rich Hickey's clojure concurrency talk at 2012 Western Mass Developers Group?

20:33 shoky: bja: might not be the exact same slides, but pretty close http://jaoo.dk/dl/jaoo-aarhus-2009/slides/RichHickey_TheClojureConcurrencyStory.pdf

20:34 bja: shoky: thanks. for the record (assuming this is logged and indexed), I also found them at ftp://anonymous@nat.iem.pw.edu.pl/pub/DOC/clojure/04-ClojureConcurrencyTalk.pdf

20:38 shoky: nice

20:57 lyn_: what's the idiom for getting last element of a vector?

20:59 best I can do is (nth vec (dec (count vec)))

21:01 poppingtonic: lyn_: (last vec)

21:01 lyn_: poppingtonic - can it be done in constant time?

21:02 poppingtonic: vectors are O(1) structures, so yes.

21:02 lyn_: poppingtonic - api docs say "Return the last item in coll, in linear time"

21:04 poppingtonic: hmm, you're right.

21:04 lyn_: maybe that's worst case?

21:07 poppingtonic: linear time in the worst case? I understand it to be average-case as well, since the cost will grow as the vec grows. It's just an accessor, so I wouldn't expect any combinatorial explosion. It probably won't be a problem, unless you're defining lazy vectors.

21:09 (caveat: I hope my slight noobishness is showing, I admittedly haven't written much clj beyond reading halfway through a bunch of books)

21:11 callen: the documentation explains the big O properties of the data structures.

21:12 timvisher: `C-c C-l`ing a clojurescript file doesn't seem to produce the behavior i'm expecting.

21:12 poppingtonic: yep. seen the docstring.

21:12 timvisher: specifically, it doesn't seem to load the namespace declaration at the top of the file

21:13 i have to specifically `C-x C-e` the ns declaration and then i can load the file in

21:13 anyone else experience something like that?

21:13 kurisumasu: lyn_, the implementation is intentionally generic, so it can work with any kind of sequence. You could write a specific implementation for Vectors, but do you really need to?

21:13 muhoo: hyPiRion: well lein pprint says :jvm-opts ("-XX:PerfDataSamplingInterval=10000" "-Xmx3g"),

21:13 timvisher: also, I seem to have to manually load in required namespaces

21:14 simply evaling the ns doesn't do it.

21:14 i'm using piggieback if that makes any difference

21:14 muhoo: yet, looking at the env, JVM_OPTS appears empty

21:14 lyn_: kurisumasu that's fine as long as the performance for vectors is better than linear

21:15 muhoo: this is, of course, with trampoline

21:15 lyn_: kurisumasu (in which case the api docs are wrong)

21:16 kurisumasu: lyn_, `last` is basically: `last x:[] = x; last x:xs = last xs`

21:18 lyn_: kurisumasu looks linear to me. rolling my own, thanks.

21:18 kurisumasu: lyn_, no, it recursively iterates over the structure until it gets to the last value, thus linear time.

21:19 lyn_: (defn last [vec] (nth vec (dec (count vec))))

21:47 timvisher: no love for the newb clojurescript developer these days. :'(

21:47 ah well, night night all!

21:48 holo: hi, even though this issue seems fixed in cljs - http://dev.clojure.org/jira/browse/CLJS-330 - i still have the same error message when dispatching for :default with a js object in this form -> {:a "b"}. should i open a ticket or something? i'm probably doing something wrong, as it's doubtful this went unnoticed

21:48 timvisher, gnight!

21:52 timvisher: wow. rhino barfs on a 74k file. that's really sad. http://www.coachwei.com/2008/09/01/the-64kb-java-language-problem-lesso-learnd-from-using-rhino-to-process-javascript/

21:53 sigh. back to brepl. at least chrome can handle it. :(

21:53 talios: mm, that's been fixed along time ago in the latest Rhino releases

21:53 timvisher: talios: how might i tell which version of rhino i'm using?

21:53 talios: the problem isn't that Rhino can't support it - its that JAVA can't support it

21:53 timvisher: meaning that the problem still surfaces when interacting with rhino?

21:53 i can load the code in JVM clojure just fine


21:54 talios: yes and no - the problem is that the JVM supports a max of 64k per method, and since A LOT of modern JS librarys do the "function that returns a module/class/closure to similar privates" you have one mother freaken huge method/function

21:55 which is also why Rhino is slow - in order to get around that it often runs in interpretted mode, rather than jitted. I believe that was largely fixed in the latest release tho, as I use it for my coffeescript compiler mojo

21:55 timvisher: this is what i'm trying to load: https://gist.github.com/timvisher/6152897

21:55 talios: how are you using rhino? if you're using the one in the JDK you're using an ancient beast

21:55 timvisher: it worked fine under brepl

21:56 i have no idea. i'm using piggieback to start up a clojurescript repl

21:56 it claims to use rhino as a default

21:56 talios: which which version of rhino I guess is the question

21:56 hopefully it's not using the JDKs one

21:56 timvisher: https://gist.github.com/6152901

21:56 talios: which has many many bugs

21:57 timvisher: yeah, i've got no idea. :)

21:57 cemerick, dnolen: any idea what version of rhino is used by default?

21:57 talios: I guess we look at at the source to cemerick's pback

21:58 cemerick: timvisher: No idea; whatever comes along with cljs. Piggieback doesn't control that.

21:58 timvisher: 1.7r4?

21:58 cemerick: There's really no reason to ever use rhino AFAICT

21:58 timvisher: https://github.com/clojure/clojurescript/blob/master/pom.template.xml#L40-L44

21:58 cemerick: reason i'm back in rhino is because the brepl was dog slow

21:59 rhino's been much more responsive. should i try something else?

21:59 talios: that's the most recent one. interesting.

22:00 timvisher: which is actually very funny to hear from me as a year ago i was happily managing a gradle build that took 4 hours to run without any of the tests

22:00 :)

22:00 maybe something about how nrepl is interacting with it?

22:01 too many moving parts for me at the moment to wrap my brain around! that and i'm sort of a simpleton when it comes to all this stuff. i just hammer at the keyboard till something almost like what i want comes out the other end.

22:53 holo: Hi, just want to say a big thank you to everyone here, specially those that have been helping me for the last year, and the clojure and library developers. I could name many people, but it wouldn't be enough. You are amazing! There are no words to show my appreciation. Thank you.

22:58 r0bglees0n: holo: well i definitely didn't help you but thanks for understanding that the free time people devout to IRC/open source isn't free :)

23:02 holo: r0bglees0n, you rock

23:10 muhoo: this is baffling and disconcerting. lein pprint shows :jvm-opts ("-XX:PerfDataSamplingInterval=10000" "-Xmx3g"), but the jvm args in ps don't show those, nor does JVM_OPTS. i have no idea wtf is going on.

23:11 it's a problem because i need more ram for this jvm, and i have no idea how to give it to it now :-/

23:11 i suspect a bug in trampoline, since that's what this is using

23:13 callen: muhoo: stop using the trampoline.

23:13 muhoo: no.

23:14 holo: i was using the trampoline. now i don't

23:14 muhoo: it seems silly to keep a jvm laying around, doing nothing though.

23:15 especially since i need all the RAM i can get for my app, wasting it on a lein jvm is definitely not the goal

23:16 but maybe, if trampoline is broken/unsupported and will never work, then yeah, i should try to figure out a way to not use it.

23:18 i'd upgrade lein but i'm told the latest lein breaks lein-pedantic :-/

23:19 holo: muhoo, is it an issue in heroku?

23:20 muhoo: not heroku, locally, and EC2

23:20 the ram issue is i've got a VPS with not too much ram and i need to conserve it

23:24 xeqi: muhoo: breaks in the sense that most of the functionality is wrapped into `lein deps :tree`

23:25 .. let me rephrase that

23:25 it does break lein-pedantic

23:26 but lein 2.2.0 includes most of the functionality from lein-pedantic in `lein deps :tree`

23:26 muhoo: i *like* lein-pedantic. tells me what deps are getting stomped on by other deps, and what to add to the project to fix it.

23:26 i also use lein deps :tree, but that doesn't throw an error to flag stuff that's getting stomped on.

23:28 it seems like any app that uses clj-http, commons-codec, commons-io, httpclient, etc, is a recipe for dependency hell, and i've got those. lein-pedantic is awesome.

23:30 xeqi: haha, yeah, anything hitting commons can end up there

23:30 muhoo: or anything that pulls in anything that pulls in anything that hits commons :-/

23:31 anyway, i'm whining. been happily developing along for months now with a stable setup, not dealing with lein or deps, and now i have to both add some new deps and get my -Xmx squared away.

23:31 oh, result of experiment: explicitly exporting JVM_OPTS in the shell environment works, lein trampoline recognizes that. but it ignores whatever is in the project map.

23:32 uh, correction

23:32 xeqi: muhoo: np, I'm interested to hear if something in lein-pedantic keeps you from moving. I thought I had gotten the important parts into lein itself, though several people have wanted the explict exclusions messages

23:32 muhoo: setting jvm-opts in the ROOT of the project map works!

23:32 just putting it in profiles does not.

23:33 so it's a problem with profiles, apparently

23:34 and, either way, it does not show up in the properties inside the jvm

23:34 but it shows up on the command line.

23:34 xeqi: the explicit exclusions messages were very helpful.

23:35 heh, are very helpful, i'm sticking with 2.1.3 for them.

23:36 callen: were they removed?

23:36 muhoo: callen: latest lein doesn't support lein-pedantic at all. some of what lein-pedantic did is now folded into lein, but not the warnings/suggestions.

23:37 IIUC

23:37 callen: why not just migrate the changes you want?

23:37 muhoo: becuase i'm not a maintainer of lein-pedantic?

23:37 and how it works is not something i've studied.

23:38 callen: do what I do

23:38 make a mess, then clean it up.

23:38 you don't have to be an expert, you just have to migrate the bits you want.

23:38 muhoo: maybe in a few months i'll have time for that

23:39 meantime, i'm sticking with 2.1.3. i guess i can set the JVM_OPTS in the shell for now and call this action item scratched off my to-do list.

23:45 confirmed then: jvm-opts set in profiles in project.clj does NOT work, but set in root of project or env DOES work. on 2.1.3. might try it on 2.2.0 for grins and see if that's a massive improvelence

23:48 broken in 2.2.0 too, submitting bug report, FWIW

23:49 callen: muhoo: tyvm

23:50 Raynes: halp

23:50 Raynes: piping in Conch is awkward for what I'm doing.

23:51 Raynes: callen: ?

23:51 callen: lein jar && lein pom && scp pom.xml `ls -ltr target/provided/*.jar | tail -1 | awk '{print $8}'` clojars@clojars.org:

23:52 Raynes: that becomes insanely ugly in vanilla sh and Conch as far as I can tell.

23:52 Raynes: I don't know what 'insanely ugly' and awkward mean when you aren't showing me code.

23:53 xeqi: callen: I'm rusty on my shell, what is the `ls ....` doing ?

23:53 callen: ls ..... kinda covers the whole line.

23:53 lazybot: boot data etc home lib media sbin selinux srv usr

23:54 callen: do you mean ls -ltr?

23:54 I'm sorting them by date.

23:54 xeqi: ah

23:55 callen: Raynes: for starters, * expansion isn't working.

23:55 Raynes: Well that's because conch isn't an implementation of bash.

23:55 :p

23:56 callen: I know that, but somehow I forgot the java heritage also meant nobody understands the usefulness of a real shell.

23:56 Raynes: Since this already isn't cross platform, perhaps it's worth it to shell out to bash?

23:57 xeqi: callen: is this to work around lein not packaging something correctly for provided dependencies?

23:57 Raynes: I mean, there is a globbing function in fs, but it isn't going to solve everything I imagine.

23:58 TimMc: I always forget that globbing is a shell thing, and that "shell" libs just do a straight-up system call.

23:59 Raynes: The problem here is that bash has a language that is designed to do this.

Logging service provided by n01se.net