#clojure logs

2013-08-04

00:40callentechnomancy: did I just break clojars or something?
01:01callenlein jar && lein pom && scp pom.xml `ls -ltr target/provided/*.jar | tail -1 | awk '{print $8}'` clojars@clojars.org:
01:01callenI am that goddamn lazy.
01:01callenRaynes: ^^ do you have a thing for this, or is it normal to have a ship.sh like that?
01:02onrlets admit, the word 'pom' resembles 'porn'
01:02callenmy font rendering doesn't suck that much ass
01:02callenotherwise I'd agree with you.
01:12ambrosebscore.typed now supports core.async. Please try it out, feedback needed! https://groups.google.com/forum/#!topic/clojure-core-typed/bx-5oYfZf4Y
01:20callenambrosebs: very cool. :)
01:20ambrosebscallen: thx
01:21callenambrosebs: I haven't used core.typed yet but it sounds interesting. How much gets caught at compile time?
01:21callenambrosebs: how does it handle calling into untyped libs?
01:22ambrosebscallen: You have to give annotations at the boundary points. They aren't necessarily checked though, so you could make anything up.
01:22callensure
01:22callendoes it cover colls and scalars, just scalars, and does it have things like linear typing?
01:22ambrosebswhat's linear typing?
01:23callenlike is there a notion of a "Vector of $X?"
01:23callenhttp://en.wikipedia.org/wiki/Substructural_type_system
01:23callencould be done with macros if you wanted to be a massive dick about it.
01:23callenthey have it in Scala as compiler magic.
01:25ambrosebscallen: hmm nope.
01:25ambrosebscallen: I've heard of affine types, they would be nice
01:25callenambrosebs: are collections typed?
01:25ambrosebsyes, as you'd expect with parameters
01:26callenif so, are the types generic to sequences or are they broken out?
01:26ambrosebsbroken out?
01:26callenSeq[int] vs. Vector[int] and List[int]
01:27callencan I pretend a Vector[int] is a Seq[int] using generics?
01:27callen"implements interface ${X}" 'ish behavior.
01:27ambrosebswell, if Vector <: Seq, but it isn't ;) Vector <: Seqable yes
01:27callenSeqable[int]?
01:27clojurebot,(let [testar (fn [x y] (if (= (reduce + (filter odd? (range 0 x))) y) (str y " is an square perfect")) )] (testar 10 25))
01:27callenjesus christ clojurebot shut up.
01:28ambrosebsYep. [1] is (IPersistentVector Number)
01:28ambrosebsand (Seqable Number)
01:28ambrosebsetc.
01:29ambrosebscallen: have a browse: https://github.com/clojure/core.typed/blob/master/src/main/clojure/clojure/core/typed/base_env.clj#L604
01:29callenhoopy. Thanks.
01:41muhooi really wish there was a way to keep nrepl from locking up emacs
01:41callenmuhoo: leiningen version?
01:42muhoo"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
01:42callenmuhoo: lein version plz.
01:43muhoocallen: 2.1.3. was this fixed recently?
01:43callenI'm just going down the list of history in my brain.
01:43callenthere were multiple times something like this got fixed in either leiningen or nrepl.
01:43muhoowell if it is i'll go browse the changelog in nrepl.el and lein
01:44callenI wouldn't root around too much, the stuff I was thinking of was mostly a year'ish ago.
01:44callenthat I'm directly aware of anyway
01:44callenSorry I couldn't be more helpful.
02:22dark_elementi am using Audio API which get minified in advanced mode and breaks. It is part of browser api and not any library.
02:22dark_elementwriting an extensive list of externs for the API is painful
03:04muhooexterns suck. but last one i had to "write" was for flot, and IIRC it was like one line long
03:05muhooi also seem to remember jquery plugins having easy externs files, not sure, memory hazy
03:11dark_elementjust 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."
03:23maharjwhat 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)
03:23maharjreduce with cons and reverse is one that I can come up with but it sounds too complicated
03:26glosoliHey 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
03:29MadFunkmaharj, would (concat a b) work for you?
03:30dark_elementOk figured it out I needed extern files for audio api https://code.google.com/p/closure-compiler/issues/attachmentText?id=710&amp;aid=7100000000&amp;name=webaudio.js&amp;token=VkDqTsdl5VqIZiTNoFcmPmxucN0%3A1375600103686
03:31dark_elementOhh the joy of generating minified js which perfectly works as it's 1 MB unminified counterpart
03:31maharjMadFunk: spot on :) Thanks!
03:31maharjhttps://www.refheap.com/d56cc02b79f668ddc9e8e2aef this was the context I am using it in
03:32maharjSo using concat there is the way to go
03:33MadFunki got lucky, lol. i am still very new with clojure, but I am finding there is always a simpler way to do stuff.
03:33MadFunkglad i could help though.
03:33maharjMadFunk: Yeah, me too. That's why I don't know even the basic function names yet.
03:36MadFunkright 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.
03:38dark_elementMadFunk I am guessing part handling data overlaps between angular and cljs
03:39SeanCorfieldMadFunk: are you using anything specific to bridge between cljs and AngularJS? clang? something else? or does it "just work"?
03:39MadFunkWell, that's the thing. I'm still trying different approaches.
03:40dark_elementMadFunk did you try out this https://github.com/dribnet/mrhyde
03:41MadFunkI 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.
03:42MadFunkdark_element, this (mrhyde) sounds awesome already, thank you
03:43SeanCorfielddark_element: that's the "Metaprogramming Polyfill" library from Clojure/West right?
03:43dark_elementSeanCorfield yup
03:43dark_elementThe only downside to it is it doesn't work on every browser.
03:44MadFunkSeanCorfield, I'll say this-- it's not just working so far, lol. At least not as I want it to.
03:45dark_elementMadFunk, check the talk "Metaprogramming Polyfill" by Tom White. Though he speaks mostly about d3 he later on talks about angular briefly.
03:45dark_elementMadFunk here http://t.co/8ZYyFFA7Um
03:45MadFunkthank you
03:47MadFunkit is difficult finding good docs or reference material for this particular setup
03:47SeanCorfieldwe're not really far into the JS world yet, but it's in our future and I'd rather use cljs if possible
03:49SeanCorfieldwe just took onboard a 3rd party project built with CoffeeScript, Underscore, Handlebars, Backbone, Stylus and 100 other JS-related frameworks (including Socket.IO!)
03:49SeanCorfieldI look over it all and just wish it was written in Clojure...
03:50MadFunkIt's a strangely beautiful language
03:52MadFunkThat sounds like a nightmare Sean
03:52dark_elementSeanCorfield that sounds like mix of everything out there
03:58SeanCorfielddark_element: oh. not _everything_... there are plenty of JS frameworks not used in this app :)
03:59SeanCorfieldI 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...
04:00SeanCorfieldIn some ways the JS explosion of combinable microframeworks is a bit like Clojure's web world...
04:06SeanCorfieldWhat's the "recommended" approach to templating in cljs?
04:07SeanCorfield(I'm thinking in comparison to the Backbone/Underscore inline templates or the Handlebars external templates)
04:07ucbSeanCorfield: 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
04:07ucbSeanCorfield: oh, not sure how that'd compare to those
04:07SeanCorfieldthanx ucb reading now
04:07ucbnw
04:11snake-johnhi 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
04:11SeanCorfielducb: i don't like hiccup much for html work... not sure i'd like dommy either based on that post... but good reading...
04:11callenuse Selmer for server-side templating :)
04:11ucbSeanCorfield: no worries; I've not used it myself, just recalled that post being an interesting read :)
04:12SeanCorfieldsnake-john: i recommend running emacs in client/server mode on mac so you can use emacsclient for terminal version or full cocoa UI
04:13snake-johnseancorfield: would you know a good how-to on installing emacsclient ?
04:13SeanCorfieldi 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
04:13SeanCorfieldsnake-john: no one blogs about it - there's too much pressure against publishing "how-to" stuff that gets out of date
04:14SeanCorfieldbut i might blog about how we set it up at world singles just as an example
04:14SeanCorfieldand of course i'm on my windows tablet right now so checking how i do it on mac is less than obvious :)
04:15ucbSeanCorfield: 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.
04:16SeanCorfieldwe have a plist to start emacs at boot time, then ec starts the gui client by default and ec -t starts the Terminal client
04:17SeanCorfieldour /usr/bin/emacs and /usr/bin/emacsclient scripts just run parts of /Application/Emacs.app/...
04:17SeanCorfieldman, 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!)
04:17snake-johnseancorfield: 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?
04:18SeanCorfieldi just do M-x nrq (nrepl-quit) and then jack in again
04:18SeanCorfieldno need to restart emacs
04:19SeanCorfieldand it's easy enough to (remove-ns ..) to kill off stale namespaces :)
04:19seangoneg'nite
04:19snake-johnAh thanks thats a great tip!!
04:23muhoohas this already been done, in some library somewhere? https://www.refheap.com/17197
04:25muhoobecause, seems like a common thing, to sort a report by its columns
04:26callennot that I know of, but it seems very useful.
04:28TEttingermuhoo, technically you can use java for it http://docs.oracle.com/javase/6/docs/api/java/util/LinkedHashMap.html
04:28TEttingerbut it wouldn't be as nice as what you have to use
04:29TEttingerthough probably faster?
04:29muhooaye, tahnks
04:34TEttingermuhoo, 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)) ]
04:34lazybot⇒ [#<LinkedHashMap {:zero=0, :a=1, :b=2}> #<LinkedHashMap {:a=1, :b=2, :zero=0}>]
04:35TEttingerif 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
04:35muhoooh, wow.
04:36TEttingerso yeah, you could use your code and pass that in, really, if there was any issue
04:49samrati'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
04:50samratAlso tried deleting the java.jdbc file inside ~/.m2 and reinstalling but I'm still getting the same error
04:52TEttingersamrat, using lein 2.x version?
04:53samratTEttinger: yes 2.2.0
04:53TEttingerlein clean / lein deps / any errors produced?
04:54samratTEttinger: nope
04:55TEttingerhave you tried: lein classpath
04:55TEttingerto see if there's some parent that is in the classpath?
04:57samratTEttinger: not sure what you mean, but there doesn't seem to be any older versions there either
04:58TEttingerok, when I add that to my deps and run lein classpath ...
04:58TEttingerit seems ~\.m2\repository\org\clojure\java.jdbc\0.3.0-alpha4\java.jdbc-0.3.0-alpha4.jar is on the classpath
04:59samratTEttinger: yes, my output shows that too
04:59TEttingerthe only file in there is clojure\java\jdbc\sql.clj
05:00TEttingerin that jar I mean
05:00TEttingerso ddl is not in that alpha version
05:00TEttingerthe namespace is clojure.java.jdbc.sql
05:01samratTEttinger: hrm, so the functions in there got moved to jdbc.sql?
05:01TEttingerI searched for ddl, didn't find any in sql.clj
05:01TEttingermight be a bad uploaded version
05:03TEttingerthere is also a jdbc.clj
05:03TEttingerjust ns clojure.java.jdbc
05:03samratTEttinger: yeah, I can :require those namespaces
05:03TEttingerdon't know what happened to DDL
05:04TEttingerbut there is a comment about an overhaul of the API
05:05samratI think ddl was part of the overhaul, the docs point to that namespace in stead of some deprecated functions
05:05TEttingerDDL is fairly new it seems. alpha4 was in may, DDL may have been newer
05:12samratTEttinger: the docs already mention that though, and mentions the other equivalent functions in java.jdbc are deprecated. I am very confused
05:13samratand looks like I missed SeanCorfield by just a little while
05:13TEttingeryeah, 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
05:15TEttingersamrat, 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"]
05:19TEttingersamrat: the first line you need to add is
05:19TEttinger:repositories [["snapshots" "https://oss.sonatype.org/content/repositories/snapshots/&quot;]]
05:20TEttingerthen just change alpha4 to SNAPSHOT in the dependency
05:20TEttingerthat version should have DDL
05:20TEttingeryes, it does, just checked
05:22TEttingersamrat, I would recommend the snapshot solution to the problem over source finagling
05:24samratTEttinger: yeah works for me too
05:28TEttingergreat!
05:34samratTEttinger: 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
05:34TEttingerouch
05:35TEttingermaybe it will be fixed in a week or two, file an issue on his github
05:36TEttingererr, here http://dev.clojure.org/jira/browse/JDBC
07:33shdwprinceExperimenting 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?
07:35noncomhi, 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..
07:35noncomso maybe there is a oop lib that can help?
07:36noncomshdwprince: that is ambigous.. why do you think you can't do that in clojure?
07:39shdwprincenoncom, writing {} after glBegin(...) is neccessary?
07:39noncomshdwprince: 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
07:39noncomno, even in java i would not write these {} as in your example
07:39noncomit is completely pointless
07:40shdwprincenoncom, so that is only for better code grouping..
07:40shdwprincenoncom, anyway, I better use slick2d
07:40noncomi know, but it is redundant.. in clojure i would just call these methods sequentially
07:41noncomyeah, slick2d seems to me a good choice if you wanna make that type of game
07:42noncomshdwprince: there once was penumbra: https://github.com/ztellman/penumbra maybe it will give you some good ideas
07:42shdwprincenoncom, really I need only to rendering big chuncks of text, but with opengl, can you offer some lightweight solution?
07:43shdwprincelightweight is to use lwjgl, but I dont want to mess with all this gl-related code
07:43shdwprincemaybe another day
07:43vmarcinkosory 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
07:43vmarcinko but its not very detailed, and there is no example for exactly this case.
07:43noncomshdwprince: 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?
07:44vmarcinkoso basically, I need something like: java -cp clojure.jar:myapp.jar clojure.main ...?
07:44vmarcinkobtw, I don't want AOT
07:44noncomvmarcinko: try "lein jar" or "lein uberjar".. afair jars will be created in the "target" folder
07:45noncomvmercinko: why don't you want aot?
07:45shdwprincenoncom, shure it'll change. It's roguelike :)
07:46vmarcinkononcom: 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
07:47noncomshdwprince: 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?
07:47vmarcinkoi 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
07:49shdwprincenoncom, 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
07:49noncomvmarcinko: 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.
07:49vmarcinkoso I basically just want to run it like: java -cp clojure.jar:myapp.jar:some3rdpartylib.jar clojure.main ...?
07:49vmarcinkowhereas myapp.jar would contain my clojure source files
07:50vmarcinkobut I cannot find any examples around about this - usually 99% of exmpels are given via repl
07:50noncomshdwprince: 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?
07:50guilleHas clojure got better at stacktraces?
07:50noncomvmarcinko: well, yes, you can go the java cp way...
07:51shdwprinceguille, currently I have no problems with it
07:51shdwprincenoncom, nope, I just making mine for fun and experience
07:51vmarcinkononcom: and you probably don't know what to put in the place of dots -> java -cp clojure.jar:myapp.jar:some3rdpartylib.jar clojure.main ...?
07:52vmarcinko-m com.mycomapny.myapp or something like that, given that this namespace contains -main function?
07:52noncomguille: locs are not given in macros, anonymous functions and maybe somewhere else, so that sometimes gives me troubles, yes
07:52vmarcinkounfortunately, i cannot find any examples of this around
07:52guillecool
07:52noncomshdwprince: you may look https://www.google.ru/search?q=roguelike+in+clojure&amp;oq=roguelike+in+clojure&amp;aqs=chrome.0.69i57j0.2590j0&amp;sourceid=chrome&amp;ie=UTF-8
07:54noncomvmarcinko: maybe smth like http://www.beaconhill.com/blog/?p=283 ?
07:54noncomor http://mikeebert.tumblr.com/post/31792001823/setting-up-a-command-line-clojure-app
07:54shdwprincenoncom, thx, I'll check it
07:54noncomor http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started
07:55noncomshdwprince: cool! i used to play roguelikes a lot, be sure to come up with it and be known then!
07:56shdwprincenoncom, huh, I don't think I'll make it into playable game. Currently its intresting to make it, but in future I dunno :)
07:57guillei'm wondering between common lisp and clojure for my next project
07:57guille*wandering
07:58noncomshdwprince: make it multiplayer then :D
07:58noncomguille: and what you think?
07:59guillewell it's a webapp with some neat algos with a postgres backend, so I'd use both
07:59shdwprinceClojure 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
08:00vmarcinkononcom: 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"...
08:01vmarcinkothat 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
08:01guillewhat 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
08:01noncomvmarcinko: 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
08:01vmarcinkook, np
08:03noncomguille: 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
08:04shdwprincenoncom, java ecosystem and easiest access to it
08:06noncomalthough i must say i really like common lisp too, it is very nice indeed
08:06guilleit's just fantastic, not sure though how much of the CLOS is done in clojure
08:06guilledoes it have feature it?
08:08guillei'm seeing in the internet you have `records'
08:08noncomi 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
08:08guillewell, datatypes
08:08noncomyes
08:09noncomguille: it may well turn out that you need no object system too
08:09guilleyeah, it's possible
08:10guillemuch of it can be built on top of sequences
08:11guilledoes exist a containers library?
08:11guillemeh I don't even know what data structures I'll be throwing at the project yet
08:11guilleit's just an idea I have for side project
08:12guille*a
08:12guilleI'll probably end up doing the algos in c++ interfaced with JNI
08:13noncomguille: i think you can do some more research on what you want to use.. why c++? you want speed?
08:13guilleyep, it's full of tree edit distance comparisons
08:13guilleprobably I'll can cut off on precision for speed
08:14guillebasically it's a data extraction system for html
08:16guilleif the thing works out I'll need some glue (clojure could be idea)
08:16guillewell, it creates automatically wrappers on html for restricted domains
08:20noncomguille: hmm, maybe i do not understand the idea well, but i think that in this particular domain you no need c++, no real win
08:25guillenoncom i'm no c++ guru so maybe i'll end up sketching something in clojure
08:26guilleyou'll notice once I start firing questions around xD
08:31noncomcool!
08:44nkozothere is a way to use "def-" on the REPL?
10:00hyPiRionthere is no def-, but there is def ^:private
10:02TimMcs/def ^:private/Zuul/
10:04nkozothanks, maybe I has an outdated note and def- existed in a previous clojure version
10:06hyPiRionnkozo: defn- exists, but Rich decided afterwards that ^:private was more general and thus omitted def- if I remember correctly
10:25jtoyim 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:28gunsjtoy: Don't you want the base 10 log?
10:28jtoyguns yes much simpler :) thanks
10:31poppingtonichi what's the better a/b testing library for Clojure? Something like the analogue of Rails' A/Bingo
10:31jtoyguns: is that included in clojure? I only see it in incator
10:33clojurenewbhey 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:33gunsjtoy: Math/log10
10:33gunsi think
10:35jtoyyes it is, thx
10:37clojurenewboh, I should add the depth of the data structure is arbitrary
11:26maharjI'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:27maharjIs there a way to see the expansion in CLJS?
11:31maharjOr am I just doing something very silly
11:37shokymaharj: 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:37shokymaharj: so mayube you want the arguments list to be: [getter field-names & body]
11:42maharjshoky: yeah, you're right when I have multiple forms in the body. But now I've got just the explicit do
11:42maharjit works both ways in this case
11:42maharjbut somehow the cljs-part is not working and I have no idea how to go about finding out what is wrong
11:43shokymm can't you expand the macro call?
11:44maharjshoky: Yeah, I've expanded it in clojure side and it seems to come out right
11:45maharjmaybe I should start with something simpler
11:52shokymaharj: 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:53shokymaharj: e.g. (let [a (something)] do (something))
11:53shokythe do doesn't do anything there
11:56shokyguess it doesn't matter for that case.
12:00maharjshoky: yeah, I added the & before the body
12:00maharjbut it did not fix it
12:00maharjI 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:02nDuffmaharj: you're importing set-value but calling set-value!
12:04maharjnDuff: yeah, so it seems. I fixed that but did not change the error message
12:04nDuffwell, you _do_ need a & before the body
12:04nDuffis the corrected, still-broken code available somewhere?
12:05maharjI'll update it, wait
12:06maharjnDuff: https://www.refheap.com/e4c818565c7208e26f1971b33
12:13nDuffmaharj: could you provide your project.clj so I can be using the same dependency versions?
12:13nDuffmaharj: ...as it is, I haven't been able to reproduce that yet.
12:15mainframerI wish the increment function was named "++" rather than "inc".
12:15maharjnDuff: Should be updated
12:17maharjI don't believe it... now it compiles
12:17maharjI cleaned up the project and compiled
12:17maharjnow it works..
12:17nDuffmaharj: that's not exceptionally surprising.
12:18nDuffmaharj: cljs has a lot of temporary files it tries to reuse where possible.
12:18maharjnDuff: okay. will have to keep that one in mind
12:19maharjIs there somekind of rule-of-thumb when this might occur or a type of exception that is susceptible to go away with recompiling?
12:20nDuffmaharj: ...well, having changed the code in such a way that the exception no longer made any sense at all was a good hint. :)
12:20nDuffbut no, I don't have any particularly good advice there.
12:20maharjnDuff: okay :)
12:20maharjthanks a lot
12:20maharjto all people involved :)
12:20maharjbaby steps forward
12:21maharjare there any good tutorials anyone might suggest for getting in grips with the latest and greatest developments in clojurescript development
12:23kmicumodern-cljs is not good enough?
12:25poppingtonicleiningen has now failed to download dependencies 5 times, through "lein deps". I wonder what's the problem...
12:26nDuffpoppingtonic: it's not completely unheard of for Maven Central or Clojars to be experiencing downtime.
12:26nDuffpoppingtonic: worth looking at what the actual error is, of course.
12:26maharjkmicu: I'm going through it currently. It seems good
12:30poppingtonicnDuff: the most common error reports I get are "could not find artifact" and "could not transfer artifact"
12:31nDuffpoppingtonic: details matter.
12:32nDuffpoppingtonic: all from the same repo? Do you have a stack trace? Does it have an underlying exception? Etc etc.
12:33poppingtonicApologies. I'll upload the trace to refheap and post the link in a sec..
12:43poppingtonicnDuff: https://www.refheap.com/17209
12:44nDuffpoppingtonic: are the other instances only happening on talking to central?
12:44nDuffpoppingtonic: (side question: are you going through a proxy server?)
12:45nDuff(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:45muhoocentral does occasionally go sideways
12:46poppingtonicnDuff: thanks for the tip, I'll make time and set one up.
12:47poppingtonicalso, what do you mean "instances"? the other times I ran "lein deps"?
12:47nDuffother cases of this problem, yes.
12:50poppingtonicsec
13:52lyn_ /ignore -channels #mwsf
14:06ucbcan I use test fixtures with each (testing ...) expression in a test defined as deftest? Initial attempt suggests no.
14:13poppingtonicall my downloads come from central.
14:14poppingtonicmake that most. Most "lein deps" downloads come from central, a few from clojars.
14:38shdwprincecan't find function for checking is value inside collection, someone&
14:38shdwprince*?
14:38clojurebot* is just for when you are lazy and sloppy
14:39nDuffdepends on whether you want to iteratively search or do an index check.
14:39shdwprinceI want #(some (= value %) collection)
14:40nDuffshdwprince: the default approach, contains?, will only check indexes -- so if it can't do something efficiently, it won't do it at all.
14:40nDuffAhh.
14:41nDuffIdeally, you structure your data to not need to do that. :)
14:44shdwprincenDuff, i'm just lazy to write (or (= ch \j) (= ch \k) (= ch \h)) and want (inside? [\j \k \h] ch)
14:45nDuff(some? #{ \j \k \h } ch)
14:45nDuffthat's not necessarily quite right, but closer.
14:45nDuffa set is the right tool for that job, not a vector. :)
14:45nDuff...and you can use it as a callable.
14:47shdwprincestill needed to write (some #(= value %) collection), I see no function like your's some?
14:48nDuffshdwprince: huh? the set _is_ the function.
14:48nDuff,(some #{\j \k \h} "just kidding")
14:48clojurebot\j
14:48nDuffwhich is truthy
14:48nDuff,(some #{\j \k \h} "noooo")
14:48clojurebotnil
14:48nDuffwhich is falsey. See?
14:49shdwprince&(some #{\a \b \c} \a)
14:49lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character
14:50shdwprincestrange, for searching char in set of chars I need to write string :)
14:51mgaareshdwprince: 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:51shdwprinceAnyway, I'll do partial solution for my situation
14:52mgaare,(some #{\a} #{\a \b \c})
14:52clojurebot\a
14:52shdwprince&(#{\a \b \c} \a)
14:52lazybot⇒ \a
14:52shdwprince(and \a "Okay")
14:52shdwprince&(and \a "Okay")
14:52lazybot⇒ "Okay"
14:53nDuffshdwprince: you don't need to write a string, you need to provide a sequence. Any kind of sequence.
14:54shdwprincenDuff, shure. But anyway (#{\a \b \c} \a) do the job
14:54nDuffYup.
14:55kmicuYep yep yep
14:59kmicu, (#{nil :a \b #{nil}} #{nil})
14:59clojurebot#{nil}
14:59kmicu, (#{nil :a \b #{nil}} nil)
14:59clojurebotnil
15:19siderishello 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:19siderisdoes anyone know how this could happen?
15:24noncomhi, 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:24noncomso maybe there is a oop lib that can help?
15:25bhaumannoncom: depending on the number of objects you could just put a hash in an atom or ref.
15:25bhaumanlike this (atom {})
15:27noncomyeah 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:29noncomis that ok?
15:54MadFunkdoesanyone know of a good search engine for looking up code? Google doesn't seem to be very helpful with that
16:03gfredericksMadFunk: symbolhound intends to be good at that
16:03gfredericksnot sure how well it does in practice
16:09arcatangithub's search has been useful to me, but it's of course limited to github
16:13shdwprinceThere 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:14gfredericksshdwprince: it'd be an easy macro
16:14shdwprincegfredericks, for partial situation it's a good choice, but not for regular use
16:16gfrederickswhy not regular use?
16:16muhooweird, 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:16muhooand i'm running the dev profile, for sure
16:18shdwprincegfredericks: becose some day you'll stuck with yours version of clojure that will be unclear for others
16:18shdwprincegfredericks: and that solution will not be on clojure.core, so you must require it in every file
16:18mischovWhat do you folks use to profile your clojure code?
16:19gfredericksshdwprince: okay; I don't think there's a good solution then
16:20shdwprincemischov: today find small https://github.com/ptaoussanis/timbre for simple cases
16:22gfrederickswhat are the dependencies of reducers?
16:24gfredericksis it plausible my jvm is missing forkjoin?
16:24hiredmanyes
16:25gfredericksshucks.
16:25hiredmanwhat jvm are you using?
16:25gfredericksopenjdk 1.6.0_27
16:26hiredmanyeah, forkjoin first shows up in 1.7
16:26gfredericksit seemed implausible that clojure requires 1.7, but I guess it's only if you want to use reducers
16:35shdwprinceOh, leiningen, after few weeks on development founded that i'm using clojure 1.4.
16:35shdwprince*of development
16:52tcrayfordis there a decent way to call java package level constructors from a clojure namespace?
16:53tcrayfordin 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:53tcrayfordI guess I can just use reflection :/
16:54gfrederickswhat's a package level constructor?
16:55tcrayfordso if you leave off the "public" modifier, a java constructor is only visible inside that java package
16:56tcrayfordfor example (and my particular one):
16:56tcrayfordPersistentTreeMap(IPersistentMap meta, Comparator comp, Node tree, int _count){
16:56tcrayfordis only callable inside the clojure.lang package
16:56tcrayford(barring reflection)
16:57gfredericksah ha
16:58gfredericksreally that's enforced in the jvm?
16:58tcrayfordclojure says "no matching method found" when you try and compile something that calls it
16:58tcrayfordactually, no matching ctor found
16:58tcrayfordsame thing
16:59MadFunkgfredericks, arcatan: thanks!
17:00scapethanks okasu
17:00gfredericks,(clojure.lang.PersistentTreeMap. nil (comparator (constantly true)) nil 0)
17:00clojurebot#<CompilerException java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.PersistentTreeMap, compiling:(NO_SOURCE_PATH:0:0)>
17:01gfredericks,(clojure.lang.PersistentTreeMap. nil (comparator (constantly true)) nil (int 0))
17:01clojurebot#<CompilerException java.lang.IllegalArgumentException: No matching ctor found for class clojure.lang.PersistentTreeMap, compiling:(NO_SOURCE_PATH:0:0)>
17:01tcrayfordI 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:02gfredericksI guess private methods aren't callable the normal way either are they? so this shouldn't surprise me
17:02tcrayfordright
17:04gfredericksrewrite PersistentTreeMap with deftype
17:04tcrayfordhaha
17:04tcrayfordya trollin
17:04gfredericksthen everything'd be trivial
17:05tcrayfordwait, does clojurescript have persistenttreemap?
17:05gfredericksmaaaaaaaaaaybe
17:05tcrayfordhaha
17:05tcrayfordthis is awful
17:06tcrayfordit does!
17:06tcrayfordhahaaha
17:06tcrayfordI feel ill
17:09futilei 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:18isaacbwis it possible to do floored integer division without pulling in contrib.math?
17:19isaacbwah, unchecked-divide-int
17:21shdwprinceIs possible to regenerate class files without restarting leiningen repl?
17:29isaacbwholy shit I feel like a wizard
17:29kmicushdwprince: https://github.com/clojure/tools.namespace ?
17:33muhoohuh, lein, y u no :jvm-opts?
17:33muhooit's cold ignoring them
17:39hyPiRionmuhoo: what is your input opts?
17:41noncomplease 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:41hyPiRion~mapply
17:41clojurebotYou 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:42noncomoh i have this, i remember you told me in the past
17:44noncomjust 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:45noncombtw, what is that part about "unrolled kw args"? what does it mean?
17:49RaynesIf 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:51hyPiRionAnd if you need it optional, go with [& [map-name]] instead
17:51technomancy...if you are OK giving up arity exceptions anyway
17:51hyPiRionwell, yeah.
17:52technomancyhttps://twitter.com/flangy/status/364123715384000512
17:52shriphanihi, 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:53technomancyshriphani: sounds like a simple composition of two functions
17:54technomancyI don't know of any existing "search for the path to this key" functions though
17:54shriphaniyeah that's what I wanted to find - google didn't help.
17:54hyPiRionnot sure what you mean by "search for the path to this key" even means. Could you provide an example?
17:55shriphanihyPiRion: (insert {:e :f} {:a {:b {:c {:d :e}}}}) -> {:a {:b {:c {:d {:e :f}}}}}
17:57hyPiRionoh, recursive things here.
17:58technomancy(defn path-to [target m path] (if (some #{target} (keys m)) path (for [[k v] m] (path-to target v (conj path k)))))
17:59shriphaniso 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:00technomancy(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:00hyPiRionshriphani: is there only one match, or may there be multiple matches?
18:01shriphanihyPiRion: a parent-child pair is unique.
18:01technomancy(path-to :hi {:what {:are :the :haps {:my {:hi :friend} :eh 3}}} []) ; -> [:what :haps :my]
18:01shriphanitechnomancy: would that work for very deep trees ?
18:01hyPiRionshriphani: I mean, if you look for :e, then {:a {:b :e} :c {:f :e}} will have two hits
18:01shriphanii.e at least 1000 levels
18:01technomancyshriphani: it'll work till the stack overflows
18:02shriphanitechnomancy: that was an issue I was facing previously (when I tried to reduce/map over my current data-structure).
18:03shriphaniI converted ({:parent K :child V} …) to ({K [V1 V2 V3]}, {V1 [V1_1 V1_2]….} and so on
18:04shriphaniand then traversed using a map over children of the current node and that blew up
18:05shriphanitechnomancy: ergo my concern about StackOverflows.
18:06shriphanitechnomancy: would converting to a nested map help ? Or is there something I am not seeing ?
18:20noncomthank you!
18:30noncomwhat 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:40RaynesTweening sounds like some popular preteen dance popularized by the latest Disney star trying to put twerking out of style.
18:40noncom:D
18:41noncomlots 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:42noncomgotta go now, good luck!
19:04aka-
19:43ThatOneGuyhey all. What are you guys up to right now?
19:55RaynesMy neck in Elixir.
20:01bjadoes anyone have a working link to the slides from Rich Hickey's clojure concurrency talk at 2012 Western Mass Developers Group?
20:33shokybja: might not be the exact same slides, but pretty close http://jaoo.dk/dl/jaoo-aarhus-2009/slides/RichHickey_TheClojureConcurrencyStory.pdf
20:34bjashoky: 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:38shokynice
20:57lyn_what's the idiom for getting last element of a vector?
20:59lyn_best I can do is (nth vec (dec (count vec)))
21:01poppingtoniclyn_: (last vec)
21:01lyn_poppingtonic - can it be done in constant time?
21:02poppingtonicvectors are O(1) structures, so yes.
21:02lyn_poppingtonic - api docs say "Return the last item in coll, in linear time"
21:04poppingtonichmm, you're right.
21:04lyn_maybe that's worst case?
21:07poppingtoniclinear 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:09poppingtonic(caveat: I hope my slight noobishness is showing, I admittedly haven't written much clj beyond reading halfway through a bunch of books)
21:11callenthe documentation explains the big O properties of the data structures.
21:12timvisher`C-c C-l`ing a clojurescript file doesn't seem to produce the behavior i'm expecting.
21:12poppingtonicyep. seen the docstring.
21:12timvisherspecifically, it doesn't seem to load the namespace declaration at the top of the file
21:13timvisheri have to specifically `C-x C-e` the ns declaration and then i can load the file in
21:13timvisheranyone else experience something like that?
21:13kurisumasulyn_, 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:13muhoohyPiRion: well lein pprint says :jvm-opts ("-XX:PerfDataSamplingInterval=10000" "-Xmx3g"),
21:13timvisheralso, I seem to have to manually load in required namespaces
21:14timvishersimply evaling the ns doesn't do it.
21:14timvisheri'm using piggieback if that makes any difference
21:14muhooyet, looking at the env, JVM_OPTS appears empty
21:14lyn_kurisumasu that's fine as long as the performance for vectors is better than linear
21:15muhoothis is, of course, with trampoline
21:15lyn_kurisumasu (in which case the api docs are wrong)
21:16kurisumasulyn_, `last` is basically: `last x:[] = x; last x:xs = last xs`
21:18lyn_kurisumasu looks linear to me. rolling my own, thanks.
21:18kurisumasulyn_, no, it recursively iterates over the structure until it gets to the last value, thus linear time.
21:19lyn_(defn last [vec] (nth vec (dec (count vec))))
21:47timvisherno love for the newb clojurescript developer these days. :'(
21:47timvisherah well, night night all!
21:48holohi, 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:48holotimvisher, gnight!
21:52timvisherwow. 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:53timvishersigh. back to brepl. at least chrome can handle it. :(
21:53taliosmm, that's been fixed along time ago in the latest Rhino releases
21:53timvishertalios: how might i tell which version of rhino i'm using?
21:53taliosthe problem isn't that Rhino can't support it - its that JAVA can't support it
21:53timvishermeaning that the problem still surfaces when interacting with rhino?
21:53timvisheri can load the code in JVM clojure just fine
21:53timvisher
21:54taliosyes 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:55talioswhich 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:55timvisherthis is what i'm trying to load: https://gist.github.com/timvisher/6152897
21:55talioshow are you using rhino? if you're using the one in the JDK you're using an ancient beast
21:55timvisherit worked fine under brepl
21:56timvisheri have no idea. i'm using piggieback to start up a clojurescript repl
21:56timvisherit claims to use rhino as a default
21:56talioswhich which version of rhino I guess is the question
21:56talioshopefully it's not using the JDKs one
21:56timvisherhttps://gist.github.com/6152901
21:56talioswhich has many many bugs
21:57timvisheryeah, i've got no idea. :)
21:57timvishercemerick, dnolen: any idea what version of rhino is used by default?
21:57taliosI guess we look at at the source to cemerick's pback
21:58cemericktimvisher: No idea; whatever comes along with cljs. Piggieback doesn't control that.
21:58timvisher1.7r4?
21:58cemerickThere's really no reason to ever use rhino AFAICT
21:58timvisherhttps://github.com/clojure/clojurescript/blob/master/pom.template.xml#L40-L44
21:58timvishercemerick: reason i'm back in rhino is because the brepl was dog slow
21:59timvisherrhino's been much more responsive. should i try something else?
21:59taliosthat's the most recent one. interesting.
22:00timvisherwhich 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:00timvisher:)
22:00timvishermaybe something about how nrepl is interacting with it?
22:01timvishertoo 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:53holoHi, 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:58r0bglees0nholo: 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:02holor0bglees0n, you rock
23:10muhoothis 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:11muhooit's a problem because i need more ram for this jvm, and i have no idea how to give it to it now :-/
23:11muhooi suspect a bug in trampoline, since that's what this is using
23:13callenmuhoo: stop using the trampoline.
23:13muhoono.
23:14holoi was using the trampoline. now i don't
23:14muhooit seems silly to keep a jvm laying around, doing nothing though.
23:15muhooespecially since i need all the RAM i can get for my app, wasting it on a lein jvm is definitely not the goal
23:16muhoobut 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:18muhooi'd upgrade lein but i'm told the latest lein breaks lein-pedantic :-/
23:19holomuhoo, is it an issue in heroku?
23:20muhoonot heroku, locally, and EC2
23:20muhoothe ram issue is i've got a VPS with not too much ram and i need to conserve it
23:24xeqimuhoo: breaks in the sense that most of the functionality is wrapped into `lein deps :tree`
23:25xeqi.. let me rephrase that
23:25xeqiit does break lein-pedantic
23:26xeqibut lein 2.2.0 includes most of the functionality from lein-pedantic in `lein deps :tree`
23:26muhooi *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:26muhooi also use lein deps :tree, but that doesn't throw an error to flag stuff that's getting stomped on.
23:28muhooit 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:30xeqihaha, yeah, anything hitting commons can end up there
23:30muhooor anything that pulls in anything that pulls in anything that hits commons :-/
23:31muhooanyway, 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:31muhoooh, 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:32muhoouh, correction
23:32xeqimuhoo: 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:32muhoosetting jvm-opts in the ROOT of the project map works!
23:32muhoojust putting it in profiles does not.
23:33muhooso it's a problem with profiles, apparently
23:34muhooand, either way, it does not show up in the properties inside the jvm
23:34muhoobut it shows up on the command line.
23:34muhooxeqi: the explicit exclusions messages were very helpful.
23:35muhooheh, are very helpful, i'm sticking with 2.1.3 for them.
23:36callenwere they removed?
23:36muhoocallen: 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:37muhooIIUC
23:37callenwhy not just migrate the changes you want?
23:37muhoobecuase i'm not a maintainer of lein-pedantic?
23:37muhooand how it works is not something i've studied.
23:38callendo what I do
23:38callenmake a mess, then clean it up.
23:38callenyou don't have to be an expert, you just have to migrate the bits you want.
23:38muhoomaybe in a few months i'll have time for that
23:39muhoomeantime, 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:45muhooconfirmed 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:48muhoobroken in 2.2.0 too, submitting bug report, FWIW
23:49callenmuhoo: tyvm
23:50callenRaynes: halp
23:50callenRaynes: piping in Conch is awkward for what I'm doing.
23:51Raynescallen: ?
23:51callenlein jar && lein pom && scp pom.xml `ls -ltr target/provided/*.jar | tail -1 | awk '{print $8}'` clojars@clojars.org:
23:52callenRaynes: that becomes insanely ugly in vanilla sh and Conch as far as I can tell.
23:52RaynesI don't know what 'insanely ugly' and awkward mean when you aren't showing me code.
23:53xeqicallen: I'm rusty on my shell, what is the `ls ....` doing ?
23:53callenls ..... kinda covers the whole line.
23:53lazybotboot data etc home lib media sbin selinux srv usr
23:54callendo you mean ls -ltr?
23:54callenI'm sorting them by date.
23:54xeqiah
23:55callenRaynes: for starters, * expansion isn't working.
23:55RaynesWell that's because conch isn't an implementation of bash.
23:55Raynes:p
23:56callenI know that, but somehow I forgot the java heritage also meant nobody understands the usefulness of a real shell.
23:56RaynesSince this already isn't cross platform, perhaps it's worth it to shell out to bash?
23:57xeqicallen: is this to work around lein not packaging something correctly for provided dependencies?
23:57RaynesI mean, there is a globbing function in fs, but it isn't going to solve everything I imagine.
23:58TimMcI always forget that globbing is a shell thing, and that "shell" libs just do a straight-up system call.
23:59RaynesThe problem here is that bash has a language that is designed to do this.