#clojure logs

2012-06-13

00:00muhoohahaa
00:00devnamalloy: im aware. but you have to admit, as a dependency it is the kitchen sink
00:00amalloy*shrug*
00:00amalloyi don't see why i would care
00:00mstumpis there an easier way to pass a hash as keyword args than (apply fn (apply concat h))?
00:00devnamalloy: lol
00:00clojurebotamalloy: therfor I return [previous] if rest is empty
00:01muhoobut useful itself doesn't pull in much does it?
00:01amalloypulls in zero
00:01muhootools.macro? that's it?
00:01amalloyoh, not zero anymore
00:01amalloyi guess
00:01amalloybut yes, very little
00:01devnamalloy: "i dont see why i would care"
00:01devni mean, come on dude
00:01amalloysorry bro
00:01muhooso why not? my big worry when pulling in stuff, is that it will cause hairballness
00:01amalloyif having "several files" in your dependency bothers you, use someone else's lib
00:02devnamalloy: what im telling you is that i do.
00:02amalloycool
00:02gfredericksdevn: fork it then
00:02amalloyi have no interest in converting you
00:02devnrather, i dont use someone else's lib. i dont use a lib
00:02devnamalloy: you dont have to be all "fuck off" about it
00:02muhoowow, cranky tonight in #clojure
00:02brehautO_o
00:04TimMcI ended up writing org.timmc/handy, but that was because I didn't like the choice of maven coordinates and package names in useful. :-P
00:04devnim going to make "useless"
00:04gfredericksdevn: I think he ought to have the right to contribute something without hand-wringing over its usage
00:04devnit will contain most of my own code
00:04amalloydevn: you "cringe" at thinking of using useful, you tell me i have to admit it's the kitchen sink, lol when i say i don't care, and tell me to "come one, dude". you can have some fuck-off if you ask for it
00:05devnburps*
00:05devnamalloy: you're reading too much into what im saying
00:07devnamalloy: im sorry if you took that the wrong way. i think other people probably feel similarly. useful is useful, but for me personally i end up just pulling out the fns I actually want. i realize why you dont want to maintain a contrib-like set of repos. that's crazy.
00:08cmajor7what is "the way" to submit/validate a form in clojurescript?
00:08dnolencmajor7: I don't see how it would be any different than JS
00:09aducmajor7: I've been wondering that myself
00:10gfredericksdevn: https://github.com/fredericksgary/clojure-useless
00:10gfredericksI'll give you commit rights
00:10devngfredericks: hahaha
00:11devngfredericks: well played, sir.
00:11gfredericksah there's even a function there already
00:11gfredericks(comp first list)
00:12gfredericksand somebody's watching it. I'm setting you up for success.
00:12devngfredericks: oo oo! I've got one!
00:12devn(defn not-empty? (complement empty?))
00:13gfredericksopen an issue so we can discuss whether or not to call it nempty?
00:14devngfredericks: that might go on for weeks
00:14gfrederickshammock-driven development sometimes does
00:14devnhow about: not-hollow?
00:15gfredericksalso I'd like some appropriate implementation for a function called naughty?
00:16cmajor7dnolen: I mostly do backend, so I only have ideas on how to do it in JS (e.g. via jquery form plugin, etc.). but I was thinking maybe there is a cool clojure(script) way of doing it (e.g. there is a noir way doing it https://gist.github.com/1103146, which is quite nicer than "just javascript", but misses "remotes"), there is also a way to bind events via jayq (e.g. (jq/bind
00:16cmajor7…)), but it is all bits and pieces, hence was wondering what is a "clojurescript" way of doing it.. e.g. ( deform (…) )
00:16gfredericks(defn naughty? [m] (->> m keys (map type) distinct count (< 1)))
00:17devngfredericks: if it's passed a form i think you should just flatten the form, map str, and check for instances of "do.*\s"
00:18brehautgfredericks: type? really?
00:18dnolencmajor7: I'm sure there's an opportunity for an idiomatic lib here - until then - the JS way is the probably your best bet.
00:18devnbrehaut: haha, im now full on belly laughing. "type? seriously? wtf?"
00:19devnnevermind this is going in the "useless" library
00:19cmajor7dnolen: thank you. so if it is indeed the "JS way", would you recommend go with a "jquery form plugin" or there is another known standard JS way?
00:20devnamalloy: btw, please shake my hand. it is going to be awkward when we see eachother at the next conj if you still hold a grudge. i dont to get shanked.
00:20devndont want to*
00:20dnolencmajor7: many examples on the web. jQuery form plugin works too.
00:21devndnolen: does mentorship on gsoc work the same as it used to? there's the mid-term stipend pending mentor approval, yeah?
00:21dnolenthere's going to be a little bit of The Art of the Propagator in core.logic's approach to cKanren ...
00:21dnolendevn: haven't heard anything about that.
00:23devndnolen: oh, well it used to be that students would work for half the summer, and then their mentor would say yes or no to whether or not the student continued on GSoC the rest of the summer. google paid me when i was accepted, and then at midterm. i didnt know if that was still the way it worked.
00:24dnolendevn: no idea, I'm sure I'll hear about it some point.
00:25devndnolen: fair enough, was just interested because i think some sort of progress update for the community on GSoC progress at some point would be cool
00:26dnolendevn: all the projects are GitHub. I'm students will make announcements of their own here and there.
00:26devna short informal summary or formal if the student feels up to it, etc.
00:26devndnolen: fair enough, just saying this in the spirit of making people in the community aware of all the awesome happening as a result of GSoC
00:47dnolenCLJS gets :refer support in :require
00:50tomojI never knew clj had :refer support
00:51amalloytomoj: as of 1.4
00:59zubairHi everyone
01:14devnzubair: hi!
03:11tomojwhat is expected of an ISequential?
03:11tomojjust ISeqable plus some semantics?
03:22noiditomoj, IIRC sequentials are ordered whereas seqables may offer a sequential view of an unordered collection
03:23tomojok, that's the "semantics" bit, but as for actual interface just ISeqable?
03:24tomojwhat is reduce-kv for?
03:25noidiit seems to be just a tag interface https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Sequential.java
03:25tomoje.g. how could you ever get clojure.core.reducers.map to use its [ret k v] version?
03:26tomojnoidi: yeah, so the actual interface requirements are conventional
03:26noidihttps://github.com/clojure/clojure/blob/master/changes.md
03:26noidi"reduce-kv reduces an associative collection."
03:28tomojyeah..
03:28tomojI guess my real question is, why do the defcurried operators have reduce-kv cases?
03:28tomojthey seem impossible to use
03:29noidisorry, can't help you there
03:29noidiI'm not familiar with reducers
04:22amalloytomoj: clojure.core/reduce-kv calls through to the kv-reduce protocol function
04:22amalloyclojure.core.reducers/reduce checks to see whether the input collection is a map, then calls either kv-reduce or coll-reduce
04:22amalloyso those are two ways in which the kv versions can be invoked
04:32ro_sthow do i copy some keys by name to another map?
04:32ro_st(into {} (magic-word source-map))
04:33amalloy&(doc select-keys)
04:33lazybot⇒ "([map keyseq]); Returns a map containing only those entries in map whose key is in keys"
04:33ro_stselect-keys. thank you
04:34ro_stweird. for some reason, emacs thinks that 'k' is the beginning of a chord, and it won't let me simply enter a k into the buffer
04:34amalloyro_st: C-h k k
04:34ro_stsays it's undefined!
04:35ro_stwhen i press k, minibuffer shows 'k-'
04:35ro_ststupid thing
04:36ro_sti wish desktop-mode would remember all my windows and frames
04:36tomojamalloy: example?
04:36amalloyro_st: what about: M-: (key-binding (kbd "k"))
04:37tomojr/map returns something that doesn't implement IKVReduce
04:37amalloyshould show you the function the key is bound to even if it's a prefix key
04:38amalloytomoj: that looks like an oversight in 'folder and 'reducer to me, but i'm not sure
04:38ro_stamalloy: sorry, what should i do?
04:38amalloyro_st: never mind, i was probably wrong. it doesn't seem to work for me
04:39ro_stonly place i can see (kbd "k") anywhere in my .emacs.d is in magit's config
04:40tomojhmm, if they implemented IKVReduce you'd get it if you explicitly called reduce-kv, I guess
04:40amalloytomoj: right, i think that's the intended use case
04:41ro_stshift-K works as it should. it's just lower-case k
04:41ro_stdouble you tee eff ?!
04:43tomojI wonder how multireducers would work given kv reduce
04:45borkdudewhat does the number of people in an IRC channel mean: #clojure has more than #java, #noir has more than #struts - does this mean is becoming more popular, or there are more difficulties working with it? ;)
04:50ivanborkdude: the causality leading to idling in a channel is surely more complicated than that
04:50ro_stamalloy: it was a yasnippet which had "keybinding" as the keybinding.
04:53borkdudeivan what do you think might be the cause to idling?
04:54ivansomething like: freenode user, aware of Clojure, aware of #clojure, (thinks #clojure is worth logging or viewing || might have Clojure question)
04:55ivanthe ability or will to run a persistent IRC client also affects the numbers
05:01muhooit would be fun to figure out what proportion of irc clients idling are on linode or aws
05:22Chiron_Hi, I want to read a large file and process line by line . I'm using line-seq but it the resource consumption is high
05:22Chiron_any idea how to process large text files in clojure?
05:23RaynesChiron_: line-seq is lazy. The only reason the resource consumption would be high would be if you're holding the whole thing in memory.
05:24Chiron_(time (with-open [rdr (java.io.BufferedReader. sql-reader)] (let [seq (line-seq rdr)] (count seq))))
05:30RaynesChiron_: count realizes the whole seq.
05:30RaynesTry that with (reduce (fn [n _] (inc n)) 0 seq) instead of the count call.
05:34ro_stwhy would a map serialise to json as #<BufferedInputStream java.io.BufferedInputStream@5505aa49> instead of as a literal map?
05:34ro_stin this case, the map i'm constructing as {:success (func that calls monger's save)}
05:34ro_stthat func returns true inside the try and false inside the catch
05:36Chiron_ok, will try it. thanks!
05:49amalloyRaynes: count only realizes the whole seq at once if you're hanging onto the head somewhere else - it throws away as it goes, like any good citizen
05:51Chiron_so any better way to handle big files in Clj? especially when a lot (really a lot) of Strings are going to be created due the processing?
06:07TEttingerOK, I have a friend who wants to implement Ruby-style prototype OOP and Mixins... in Clojure, with macros
06:07TEttingerhas anyone already done this?
06:09TEttingerwow, a 2-letter username. nice work, _Vi
06:10ro_stfor fun, or because CLJ doesn't give him what he wants?
06:10TEttingerro_st, because he is used to Ruby and I think would be porting ruby code
06:11_ViTEttinger, 1. Offtopic is it, 2. "Not the name makes noble man, but the man makes noble name".
06:11ro_sti should think it'd be better to learn idiomatic clojure and do it properly
06:11ro_stthat way when no ruby folks are left and new clojure peeps come on, they're comfy
06:11TEttingerro_st, yeah, you are probably right
06:12Bronsa`or you can mimic that with `defprotocol`,`deftype`,`extend` and a hash map.
06:12TEttingerBronsa`, I knew extend would be part of it!
06:12TEttingergreat
06:47ro_stwhen i call a function myself, i get back the map i'm expecting. when a compojure handler calls it and the json middleware serialises it, it's a #<BufferedInputStream java.io.BufferedInputStream@54657f7f>. why?
06:53broquaintCan you paste the relevant code to refheap/gist, ro_st?
06:54ro_stthis is doing it for me: (PUT "/foo" {json :json-params} {:body {:success true}})
06:55ro_stit's like it's passing back some sort of deferred instead of the generated json
06:56ro_stit's wrap-json-response's fault
06:57ro_stor, rather, the issue is somewhere in that middleware
07:26ro_stwhat's the easiest way to prepare string data for use by a ring handler in the repl?
07:26ro_sti've been sending it a :body with a string value, and now reading the ring spec i see it wants an InputStream instead
07:31clgvro_st: afaik, you can use strings and InputStreams. I used strings generated from hiccup and an InputStream for a chart generated with incanter
07:33cshellspit?
07:34cshellI use slurp to read from the InputStream to String so I think spit is the opposite
07:39kainiHi, I have written a little program that generates minesweeper fields. Would you critisize the code and especially tell me, if I have abused any feature or violated a good practise: https://gist.github.com/e31bbacc1c60155187b2 thanks
07:41cshelllooks fine to me
07:42kainiok thanks :)
07:43ro_stclgv, cshell: turns out ring-middleware-format expects an InputStream, as per the ring spec (it slurps it). also turns out that ring.util.test has (string-input-stream str)
07:44ro_stso now my in-repl ring testing fn is https://www.refheap.com/paste/3118
07:45clgvkaini: you can use (pos? bombs_left) for (> bombs_left 0)
07:48kainiclgv, ok
07:49clgvkaini: you cold omit the loop-recur in gen-field by using (into #{} (repeatedly bomb_count (Coord. ...)). you shoud also write bomb-count instead of bomb_count
07:49ro_stwhat's the paredit spell for swapping the depths of the current form with its immediate parent form?
07:49ro_st{:foo (fn [sd] sdf)} becomes (fn [sd] {:foo sdf})
07:51kainiclgv, I didn't know this functions - I'll take a look at them
07:51ro_stpretty sure i saw someone talking about how you can do that
07:55clgvkaini: `neighbour-coords` can be rewritten with `map* statements such that you only need to mention (Coord. ...) a single time and you can avoid mentioning x,y all the time
07:55clgvI meant: map not map*
07:55caspercI'm wondering, what is the best way to create a dynamic sql query in clojure? clojure.data.jdbc doesn't seem to allow it
07:56Bronsakorma?
07:56clgvkaini: ##(doseq [x (range w) y (range h)] [x y])
07:56lazybotjava.lang.RuntimeException: Unable to resolve symbol: w in this context
07:57caspercmaybe, is that any good?
07:57clgvkaini: ##(doseq [x (range 5) y (range 10)] [x y])
07:57lazybot⇒ nil
07:57clgvkaini: ##(doseq [x (range 5) y (range 10)] (print [x y]))
07:57lazybot⇒ [0 0][0 1][0 2][0 3][0 4][0 5][0 6][0 7][0 8][0 9][1 0][1 1][1 2][1 3][1 4][1 5][1 6][1 7][1 8][1 9][2 0][2 1][2 2][2 3][2 4][2 5][2 6][2 7][2 8][2 9][3 0][3 1][3 2][3 3][3 4][3 5][3 6][3 7][3 8][3 9][4 0][4 1][4 2][4 3][4 4][4 5][4 6][4 7][4 8][4 9]nil
07:57ro_stcasperc: sqlkorma.com
07:57ro_stworks beautifully
07:58clgvkaini: so you can write print-field like (doseq [y (range h) x (range w)] (print-cell field (Coord. x y)))
07:59caspercthanks, i'll give korma a try :)
07:59borkdudekorma r0xx0r
07:59clgvkaini: your code would get clearer if you omitted the defrecords but just use vector of vectors instead for representing the field
08:08kainiclgv, what exactly is the difference between conj and into?
08:09clgvkaini: ##(conj [] 1)
08:09lazybot⇒ [1]
08:09clgvkaini: ##(conj #{} 1)
08:09lazybot⇒ #{1}
08:09clgvkaini: ##(into #{} (range 10))
08:09lazybot⇒ #{0 1 2 3 4 5 6 7 8 9}
08:10kaini##(conj #{} (range 10))
08:10lazybot⇒ #{(0 1 2 3 4 5 6 7 8 9)}
08:10kainii see
08:10Bronsainto is essentialy (partial reduce conj)
08:11Chousukeexcept faster :)
08:11Chousukeconj adds an element to a collection, into puts a sequence of elements into a collection
08:12Bronsaafaik into IS reduce conj, implemented with transients
08:13Bronsa$source into
08:13lazybotinto is http://is.gd/sTYtkj
08:13kainiIn simple words: conj = add, into = addAll?
08:15borkdudewtf, why is user.dir set to /Applications/eclipse/Eclipse.app/Contents/MacOS in Eclipse
08:30clgvborkdude: in CCW?
08:31borkdudeclgv well in an app I run on Tomcat, nothing clojure related
08:36clgvwhy is defn set to a macro like this: (. (var defn) (setMacro)) and not like that (def ^{:macro true} let ...)?
08:37Bronsathe compiler doesnt propagate on :macro metadata
08:40clgvbut setMacro does obviously the same: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Var.java#L250
08:44raghuit seems 4clojure.com is down
08:47clgvraghu: yeah Error 502 here as well
08:50Bronsaclgv this trivial patch i wrote some time ago does that, maybe i should open a ticket in jira http://sprunge.us/bWcc
08:54Olsen_Hello all...
08:54Olsen_Anyone else noticed that 4clojure.com is down..?
08:55borkdudeagain?
08:55cshellIt must be running Play!, lol!
08:55Olsen_Yeah, well I just got back to my machine and the site is dead as a doornail - nginx 502 Bad Gateway page instead of the site
08:56clgvBronsa: ah right. well, so the initial lowlevel let has the :macro true only for documentation if it doesnt do anything?
08:57Bronsawell, setMacro sets :macro true
08:58clgvBronsa: yeah but on the variable. the lowlevel let I quoted from the begining of clojure.core has that :macro true on the symbol in the def-statement
09:03borkdudecshell do you mean the play! framework?
09:03cshellyeah, i was just trying to make fun of scala :)
09:04Olsen_C'mon now, there's no need to make fun of Scala when there are languages like Java and C# to take a pop at cshell ;-)
09:04borkdudewhy would Scala be better than C#?
09:05cshelllol
09:05Olsen_lol
09:05kreig1or ruby
09:05kreig1or common lisp!
09:05Olsen_Aww c'mon kreig1 Ruby is FUN at least!
09:05Olsen_;-)
09:06borkdudefun-tional programming, without C-syntax
09:07borkdudefunny programming
09:07Olsen_borkdude: That's about the size of it, aye ;-)
09:08Olsen_I don't suppose the people behind 4clojure.com hang out in here, do they - I mean they might want to know that their sire is boned, and I would like to do some more of the problems! ;-)
09:09borkdudeI bet the people in #haskell speak the same way about clojure ;-)
09:10Olsen_borkdude: Really? All 6 of them..? ;-)
09:10clgvOlsen_: Raynes is frequently here afaik
09:10cshellhaha
09:10borkdudeOlsen_ 845… wow ;)
09:10cshellRaynes was on earlier, is he working on 4clojure?
09:10clgvyeah. his clojail is working there
09:11bhenrywhat's the newest de facto standard for starting a new noir/jayq/fetch/etc project?
09:11clgvlein-noir?
09:12Olsen_borkdude: I tai fit back - that's an amazing number of people for an IRC channel...
09:12Olsen_borkdude: (That's supposed to read "I take it back)
09:12bhenryclgv it looks like cljs-template, but i didn't know if that was at a current state with all ibdknox's projects
09:12borkdudeOlsen_ yeh
09:14clgvbhenry: thats probably new with lein2 then?
09:40timvisheris there any way to get the debugger thrown automatically when i hit an exception to behave like when i intentionally break with swank.core/break?
09:42clgvtimvisher: you can approximate it with (try ... (catch Throwable t (break))) but you still have to put that at a suspicious location
09:43timvisherclgv: :(
09:44clgvtimvisher: I dont know if the java debugging interface has tools to catch an exception as soon as it is thrown
09:44gtrakhow do I get every odd element of a seq?
09:44timvishergtrak: you mean every other element or only odd numbers?
09:44gtrakyea, every other
09:45Vinzentmap-indexed + filter
09:45clgvtimvisher: have you seen http://georgejahad.com/clojure/cdt.html ?
09:45gtrakah
09:45gtrak'map-indexed' is not yet at hand for me
09:45Olsen_grak: (fn [coll] (let [evens(filter even? coll) odds(filter odd? coll)] odd))
09:46clgvgtrak: take-nth
09:46gtrakOlsen_: that's the values
09:46Olsen_gtrak: Where "coll" is the collection that you are passing in
09:46gtrakgotcha
09:46gtrakoh, take-nth is perfect
09:46clgv&(take-nth 2 (range 10))
09:46lazybot⇒ (0 2 4 6 8)
09:47clgv&(take-nth 2 (rest (range 10)))
09:47lazybot⇒ (1 3 5 7 9)
09:47Olsen_gtrak: take-nth would work too...
09:47Olsen_;-)
09:47Vinzenthm, indeed
09:48timvisherclgv: i have but hadn't had time to get into it yet
09:48gtrakmap-indexed and take-nth..... neato
09:48clgvtimvisher: seems it can do some magic
09:49Vinzentbtw, I wonder why there is map-indexed and keep-indexed instead of just indexed
09:49clgvVinzent: function arity
09:49Vinzentclgv, what?
09:49TimMcditto
09:51clgvVinzent: map-indexed and keep-indexed take funtions with two arguments, index and value. `indexed` would create something like a seq of vectors which is only one argument so you would have to do (map (fn [[i v]] ...) (indexed coll)) instead of (map (fn [i v] ...) coll) - thats my explanation ;)
09:52clgvsecond map should be a map-indexed
09:52TimMcHmm. I suppose map-indexed doesn't involve allocation whereas indexed would.
09:52clgvyep
09:54Vinzentclgv, well, yes, but so what? :)
09:54VinzentTimMc, ah, so the reason is Perfomance - accepted.
10:15cshellIs there better way to validate that a string is neither nil or empty than using ,(and (not nil? " ") (empty (clojure.string/trim " "))?
10:15cshelloops, sorry, it's empty?
10:15cshellbut i figure there must me a more concise, idiomatic way that i'm unaware of
10:16ro_stso you want to validate that a string is not nil or empty
10:16ro_stregex?
10:16cshellright
10:16clojurebotSometimes people have a problem, and decide to solve it with regular expressions. Now they have two problems.
10:16cshellLOL
10:16ro_st-grin-
10:16ro_stwhat happens if you regex a nil?
10:16cshellI think you'd get a npe?
10:17ro_st,(re-find #"[^\s]" nil)
10:17clojurebot#<NullPointerException java.lang.NullPointerException>
10:17ro_st,(re-find #"[^\s]" (str nil))
10:17clojurebotnil
10:17Vinzentcshell, there was empty? for strings somewhere
10:17cshell,(str nil)
10:17clojurebot""
10:17cshell,(empty? nil)
10:17clojurebottrue
10:17ro_st-grin-
10:18cshell,(empty? " ")
10:18clojurebotfalse
10:18ro_st,(doc empty?)
10:18clojurebot"([coll]); Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))"
10:18cshellah here we go
10:18Vinzentit's clojure.string/blank?
10:18cshell,(clojure.string/blank? nil)
10:18clojurebottrue
10:18cshell,(clojure.string/blank? " ")
10:18clojurebottrue
10:18ro_styup
10:19cshellYeah, that's it - thanks guys
10:23ro_sti love how little code i'm writing. busy building json rest service on top of mongo database
10:24cshellVery nice - for work or for personal?
10:24ro_stfor work
10:24foxdonutro_st: but is it web scale?
10:25ro_stlast couple weeks was the code that converts sql data to mongo
10:25ro_stand now it's the (massively) simpler rest api on top
10:25ro_styup, web scale
10:26ro_stadvice hugely welcome :-)
10:26foxdonuthttp://www.youtube.com/watch?v=b2F-DItXtZs
10:27ro_stguiding principle at the moment is as simple as possible. no internal state between requests. no session state - it's all in mongo, and we'll move stuff to redis or memcached as we start requiring ram caches
10:28ro_styou don't like mongo? :-)
10:28foxdonutro_st: I've nothing against mongo, really. I just find that clip hilarious.
10:29ro_stoh right
10:29Olsen_I love that video
10:29foxdonutI see it as more about fanboys chanting about a tech without understanding it, rather than mongo specifically.
10:30Olsen_foxdonut: Absolutely
10:31nsxt__can i shard /dev/null in clojure?
10:31Olsen_"is /dev/null web scale?" I f*cking love that moment...
10:32ro_st-grin-
10:34ro_stsorry foxdonut i didn't realise you were trying to have a mement there
10:36foxdonutro_st: huh?
10:36foxdonutOlsen_: impotence mismatch
10:36ro_sta meme-moment, a meme-ment, a mement
10:37Olsen_foxdonut: *giggle*
10:40TimMcI lost it here: "Do you even know what sharding is?" "Shards are the secret ingredient in the web scale sauce!"
10:41Olsen_TimMc: Oh Hell yeah!
10:41Olsen_TimMc: Come on, we've all met someone who speaks this way - it's a very well observed piece, no?
10:42TimMcYes, although it could use less swearing.
10:42TimMcSeemed gratuitous, and didn't work well with the text-to-speech.
10:43Olsen_TimMc: Granted, but at the same time I am a dreadful curser (sometimes), so I don't judge...
10:59uvtcIs subvec the customary way to insert an item into a vector, like so:
10:59uvtc,(println (concat (subvec [:a :b :c] 0 1) ["X"] (subvec [:a :b :c] 1)))
10:59clojurebot(:a X :b :c)
11:00uvtc?
11:02gfredericksuvtc: what do you expect?
11:03gfredericksa vector?
11:03gfredericksoh whoops didn't see your prior question :)
11:03uvtcI meant to ask, what is the typical way to insert an item into a given location in a vector. Doesn't matter if I get a seq.
11:04gfredericksuvtc: there's no performant way to insert into a vector
11:04gfredericksI suppose using into on the first vector might be the best thing
11:04gfrederickssubvecs might be counterintuitive...I don't know the details
11:06uvtcgfredericks, thanks. subvec seems intuitive enough (to me).
11:06gfredericksI mean its performance characteristics
11:06gfredericksif you're not worried about performance I think just dealing with seqs and calling (vec) at the end would be fine. If you really do need vectors.
11:08uvtcgfredericks, No, I don't really need vectors. And hadn't yet considered perf. I just thought it was a common enough thing, to want to insert an item into a mutable list (or vector), and wanted to know the customary way to do it in Clojure.
11:08S11001001uvtc: not common at all; over a couple years of professional clojure programming, I did it once
11:09Bronsauvtc: it seems i was wrong before
11:09S11001001otoh I called map about a million times, and mapcat about half that, take what you will
11:09Bronsauser=> (defn ^:macro f [&form &env])
11:09Bronsa#'user/f
11:09Bronsauser=> f
11:09BronsaCompilerException java.lang.RuntimeException: Can't take value of a macro: #'user/f, compiling:(NO_SOURCE_PATH:0)
11:09uvtcS11001001, Interesting. Will keep that in mind.
11:10uvtcBronsa, hi, perhaps you meant someone else?
11:10Bronsawasnt it you who asked about :macro metadata?
11:11S11001001uvtc: the ideal structure for arbitrary insertion/deletion is a map, rather than vector; depending on your structure, a map may suit you better
11:11uvtcBronsa, no.
11:11Bronsathen sorry, i am mistaken.
11:11uvtcBronsa, haha. n/p :)
11:13S11001001but arbitrarily-positioned insertions into a list are often the early forcing of ordering decisions that could be done lazily, instead, once the whole sequence is accumulated in arbitrary order by sticking elements on beginning or end, whichever's convenient. Accumulating into a map yields similar capabilities
11:13uvtcS11001001, thanks.
11:15uvtcS11001001, will keep in mind that I can often put off ordering today what I can order tomorrow. :)
11:25TimMcuvtc: Just be aware that subvec creates a window onto the original vector, which may interfere with GC.
11:31uvtcTimMc, ah, right. I see in the docs it says that the resulting vec shares structure with the original.
11:33uvtcTimMc, S11001001 thanks again.
11:34edoloughlinIs there a way to list all dependencies in Leiningen? I've got something in my project that depends on clojure-1.2.0, which isn't available anymore...
11:36TimMcedoloughlin: lein1 or lein2?
11:36edoloughlinTimMc: 1.7.1
11:48ro_stedoloughlin: you'll want to use an exclusion for clojure on that dependency, so that it doesn't try to satisfy it and happily accepts the clojure present in your project
11:49ro_sti can't find an example now but i'm sure one of the 450 ppl here can show you :-)
11:50edoloughlinThanks. I'll look it up.
11:50S11001001I thought this was the channel for the common lisp web browser
12:13timvisheranyone who cares about wrap-json-params care to give me some thoughts on my modifications? https://github.com/timvisher/ring-json-params/blob/master/src/ring/middleware/json_params.clj
12:14timvisheralso, is there some difference in the way lein2 works with deps? I can't seem to get it to download anything unless I do something else
12:18jsabeaudrytimvisher, I was under the impression that cheshire was a preferrable choice to clj-json, not sure if that is still the case however
12:18ezyangHey guys, anyone here run Clojure under Azul?
12:18dakronetimvisher: don't use clj-json
12:20TimMcedoloughlin: GOt Maven? lein pom and then mvn dependency:tree
12:20tmarbledakrone: what do propose instead ov clj-json (cheshire)?
12:20dakronetmarble: cheshire
12:21tmarbledakrone: will check out, thx
12:21ezyangWe're getting a NoSuchFieldException 'close' for clojure/core.clj in the initializer
12:34puredangerhey all. got a question I can't figure out. defrecord says you can override methods of Object and I can see that works with (for example) toString. However, if I try to do that with hashCode, that seems to conflict with the generated hashCode and I get a ClassFormatError with a duplicate method.
12:35puredangerI can understand why this might be disallowed (for value semantics of records) but just wanted to make sure that this is a non-solution
12:35puredangerIf so, I will fall back to deftype
12:36dnolenpuredanger: my experience is that you'll run into issues with defrecord if you need to customize Object methods.
12:37hyPiRiondnolen: Is that statement true for toString too?
12:37dnolenhyPiRion: that may be the exception. At one point core.logic tried to use defrecord, but it was too much of a hassle.
12:38dnolenpuredanger: my issue was specific to wanting to customize equals and hashCode
12:39timvisherjsabeaudry, dakrone: i was only using it because it was what was already being used. Doesn't hurt me at all to use cheshire instead. I'm not familiar enough with both of them to know why, but I've heard the same
12:40puredangerthx
12:43hyPiRionWhat mean of my server to crash when I'm active on IRC.
12:43hyPiRionanyway, https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_deftype.clj#L160 seems to be the issue with overriding equals and hashCode
12:44hyPiRionrecords don't implement toString, which seems to make it an exception.
12:48puredangerhyPiRion: yeah, I'd say the docstring should really say toString as the only Object method that can be overridden
12:48puredangeractually I guess clone is the other possibility, not that that would make much sense
12:48TimMcpuredanger: Return "this"? :-P
12:48puredanger:)
12:54lhkhi
12:55lhkwhat types of applications is clojure best for. I'm interested in functional programming but apart from processing data, I just dont see, how its better than imperative/object oriented
12:55ohpauleezlhk: What types of applications do you typically develop?
12:55amalloydo you have any applications that don't involve processing data?
12:56technomancyamalloy: in particular, processing lists
12:56technomancyI've heard List Processing is going to be huge.
12:56amalloysomeone should write a language to make it easier
12:56ohpauleezglomming on that point: A web app - you take a request, process it, generate new data (a response) and return it. Good web apps are stateless (aside from persisted stated in a data store - and now all web systems need that)
12:58lhkI guess id have to divide what ive done so far in two groups: for the uni and as a hobby. At the university all the - very small - programs ive hacked together where meant to implement a specific algorithm, or calculate something. Most of them ran on the command line. As a hobby Ive spend most of my time with visualizers and small tools. All of them relied heavily on GUIs and IO
12:59ohpauleezlhk: I don't have experience with Clojure's tooling around Java Swing, but there are great libraries for declaratively building UIs and visualizations for ClojureScript (in the browser)
13:00S11001001lhk: did you use any data structures not directly related to IO?
13:00lhki assume that for mathematical purposes a language like clojure would be a real treat. But how would i program a stateless GUI ?
13:00ohpauleezClojure is a great general language, very well designed, and carefully crafted (basically, like a delicious beer)
13:00xeqilhk: you'd prolly just use java binding for that, perhaps with seesaw
13:00lhkS11001001: sure. All the usual arrays, lists, heaps, stacks, ...
13:02TimMclhk: It's not that the GUI is stateless; rather, that the state is managed.
13:02ohpauleezlhk: Imagine separating the logical construction of a GUI, from the data that it represents
13:02lhkohpauleez: that sounds like mvc
13:04ohpauleeztrue, but imagine if you could step away from the raw construction of the view
13:04ohpauleezand have it be declarative - like SQL
13:04ohpauleezhttp://www.infoq.com/presentations/Statistical-Graphics-ClojureScript
13:05ohpauleezand all the other reasons everyone else here has said
13:05ohpauleezWatching Rich's talks on state and identity might help as well
13:08nDufflhk: You might find the Ants demo interesting as something fairly simple but with a lot of GUI code and state that actually changes. https://www.refheap.com/paste/3099
13:09nDufflhk: ...the talk that goes with it is http://blip.tv/clojure/clojure-concurrency-819147
13:10hyPiRionlhk: What would you like to program in the future? I think you should base yourself around that.
13:10hyPiRionFor instance, if you like to program eco-friendly microcontrollers, then Clojure isn't the best fit.
13:11ohpauleezhyPiRion: …. *yet*
13:11mattmossIM-GUI might be closer to stateless gui: http://www.johno.se/book/imgui.html
13:11ohpauleez:)
13:11mattmossand http://mollyrocket.com/forums/viewforum.php?f=10
13:11hyPiRionohpauleez: Bold statement you got there.
13:12ohpauleezWith Clojure soon being able to run on Lua - not that bold
13:12mattmossKeep in mind the IMGUI fans on molly-rocket are generally dealing with C++ and building guis in opengl (game devs), so it might be some work to translate that kind of stuff into clojure. Removing ids, etc.
13:13Hodappohpauleez: Clojure might soon be able to run on Lua?
13:14ohpauleezTechnically ClojureScript, but yes, that's the plan
13:14dnolenHodapp: raph_ami1rd is working on it for Google Summer of Code, specifically we want to see how well CLJS performs under LuaJIT
13:15dnolenHodapp: given the numbers we're seeing under V8, I suspect the LuaJIT numbers will be quite good.
13:16hyPiRionohpauleez: Is eLua good for _eco-friendly_ microcontrollers?
13:16ohpauleezI'm with dnolen on that - LuaJIT is extremely fast; last I checked the fastest JIT for a dynamic language/platform pair
13:16ohpauleezhyPiRion: no idea
13:17nDuffhyPiRion: I read "eco-friendly" as "low-power enough to run off of solar with a small battery buffer", so... probably?
13:17ohpauleezdnolen: total side note - I almost have arbitrary namespace injection for my workers put together
13:17ohpauleezwhich means I can make a future-like interface
13:18dnolenhyPiRion: ohpauleez: I don't personally expect Clojure to be great for embedded applications this year - but technology changes at a pretty fast clip. who knows?
13:19ohpauleezfor sure, I was mostly making a tongue-in-cheek statement. But yeah, it's anyones guess - new tech, new projects
13:19dnolenohpauleez: interesting.
13:19hyPiRionnDuff: Ah. I mean "eco-friendly" as in programmed to use the least amount of power. Perhaps "eco-friendly" is a bit vague.
13:22Hodappand for the record, there are plenty of ARM chips that handle JVM bytecode natively.
13:22Hodapphowever, for a small CPU, I'd really think some other Lisp might be a betterfit.
13:22Hodappbetter fit*
13:26hyPiRiondnolen: I think the whole thing boils down to whether we're able to create a sufficiently smart Clojure-compiler, or whether we're able to design faster embedded systems.
13:30S11001001Hodapp: ISLISP, then?
13:33HodappISLISP, CLISP, Scheme, I dunno
13:38HodappnDuff: I'm more thinking of ones that *run* in a small footprint
13:38tbaldridgeA clojure on LuaJIT is going to be a good starting point for embeded systems. The Lua VM is so simple there's not much of a memory overhead
13:39tbaldridgeBut then again you have to define what "small" footprint is. Clojure-Py normally uses about 1/2 the memory of Clojure on the JVM. It still clocks in at about 50MB for a repl (ish)
13:41dnolenhyPiRion: given the rate of change around embedded technologies - I'm betting on faster embedded systems.
13:42ecki've run leiningen on my raspberry pi. it's *really* slow though.
13:42ecki am excited about clojure on lua
13:48TimMceck: Then I'll be able to run Clojure on my camera!
13:48eckhooray!
13:51ndimidukhas clojure.contrib's profile tool been forward-ported?
13:52tbaldridgednolen: is there a repo for the GSOC stuff with pluggable backends? I'd like to track the changes and figure out how I can integrate them with clojure-py
14:33ystaelI don't suppose there's any way to get an AOT-compiled defrecord to generate a class with a package name different from the namespace in which the defrecord occurs?
14:33ystael("No and you are stupid to want that" may be a reasonable answer :))
14:39muhoowhen heroku config:add says "restarting app", does it mean it is physically shutting down the jvm and restarting it all over again, i.e. running main?
14:39technomancymuhoo: yeah
14:39muhooperfect, thanks
14:47technomancyI guess that wouldn't help since the env vars are fixed
14:51amalloyystael: no. if you want it in a different package, put it in a different package
14:53amalloytechnomancy: respect it how? i've never totally understood what the expected response to a SIGHUB is
14:53amalloy*HUP
14:54nDuff...for daemons, the convention is "reread your configuration files and apply changes to the running configuration"
14:55technomancyamalloy: simulate a restart, near as I can tell
14:56technomancyit would make sense for clojure apps that read config from disk, but not from the environment
14:57technomancyhuh; supposedly sighup typically causes interactive process to terminate
14:58amalloytechnomancy: right, because the modem hung up
14:59technomancyheh
14:59technomancyI guess that makes sense, but it's still hilarious
14:59amalloyi always understood it as a slightly less severe SIGINT
14:59amalloy"your owner has abandoned you - dare you go on?
14:59S11001001does rereading environment make sense?
15:00technomancyS11001001: I don't think it can change
15:00redingerAlan Dipert was playing with that a little while back: https://github.com/alandipert/reconfig
15:00redingerI don't actually know how complete it is
15:00technomancyS11001001: maybe there's some deep magic to make it happen with crazy posix calls
15:00technomancyredinger: huh; interesting
15:01duck11231being able to catch SIGHUP to force a config reload would be nice
15:01S11001001so a clojure app that failed to reread environment could hardly be faulted :)
15:02tbaldridgednolen: is there a repo for the GSOC stuff with pluggable backends? I haven't been able to find the repo anywhere
15:02dnolentbaldridge: there's no separate repo - I'm pulling in raph_ami1rd as I get them.
15:02amalloytechnomancy: useful has a function that uses undocumented, unsupported class sun.misc.Signal to handle signals. dunno which JVMs it works on
15:03tbaldridgednolen: so if I look at the main clojurescript repo that's the current state of things?
15:03dnolentbaldridge: some notes here - needs more feedback
15:03dnolentbaldridge: http://dev.clojure.org/display/design/ClojureScript+pluggable+backends
15:04tbaldridgek thanks, I'll take a look
15:05brainproxywith enlive, is there a shortcut for using attr= with multiple values, e.g. (h/attr= :attr foo bar baz)
15:05brainproxyi.e. such that :attr will match on foo or bar or baz
15:09technomancyamalloy: cool
15:09duck1123how bad is it to use sun.* classes? That's normally discouraged, right?
15:10technomancydepends on the context; probably not a good idea in libraries.
15:10amalloyyes. tbh i have no idea why it's in useful
15:10duck1123I might add SIGHUP handling to my app to reload the config.clj file
15:11technomancyconsidering startup time is such a big complaint with clojure it seems like it's worth looking at
15:11amalloy∀x, useful has a function that does x in a questionable way
15:14nDuffIs there a way to get paredit to treat {} in a manner similar to how it does () and []?
15:14thearthurnDuff: it does for me in emacs24
15:14thearthurnDuff: what editor?
15:14nDuffthearthur: emacs23
15:15wkellyalso works for me in emacs24
15:15Chousukeit should work in 23 as well
15:15thearthurnDuff: It worked very well with the old edition of the emacs starter kit, though I have to say that 24 is much more fun
15:15Chousukemaybe you have an old or misconfigured version of paredit
15:15llasramI needed to have a slime-repl-mode hook which does (set-syntax-table clojure-mode-syntax-table)
15:15llasramand I needed to (define-key slime-repl-mode-map "{" 'paredit-open-curly)
15:17nDuffllasram: ...hmm; I'll give those a try.
15:18dnolenpretty sweet use of the CLJS analyzer output, http://github.com/jonase/scape/blob/master/src/scape/emitter.clj
15:18technomancynDuff: it might do that already in clojure-mode but not slime
15:20impomaticHi :-) What's the Clojure equivalent to K&R "The C Programming Language"? Something concise and to the point.
15:20scottjimpomatic: the website
15:20devnimpomatic: programming clojure IMO fits that description fairly well
15:21devnif you're asking for a book recommendation
15:21nDuffProgramming Clojure is probably the thickest Clojure book I have
15:21amalloyscottj: what website? clojure.org is not something i generally recommend to people since it never gets updated
15:21nDuffit's _good_, but I'm not sure I'd describe it as concise and focused on the language itself.
15:22mhansonWhat about Joy of CLojure?
15:22nDuff(certainly goes into more about the surrounding ecosystem)
15:22AimHereJoy of Clojure is fairly concise
15:22thearthuri introduce people to 4clojure.org first
15:22dnolenimpomatic: it's pretty easy to be concise and to the point about C (and still not actually explain how to write sensible C code). I would get the new O'Reilly book.
15:22thearthurerrr 4clojure.com
15:23nDuff...K&R is quite the set of shoes to fill.
15:23sprocpair
15:23nDufferr, yes.
15:24dnolenimpomatic: the O'Reilly book is the only one that really assumes you have existing OOP experience, and is a good tooling reference which is critical.
15:24dnolenimpomatic: you can waste hours on web trying to figure out basic stuff.
15:24nDuffimpomatic: What's your priority? Is it more important that it be short, that it be self-contained, or that it give a very strong high-level overview (but may leave you to go elsewhere for details)?
15:24impomaticHas anyone read the Clojure section in "Seven Languages in Seven Weeks"?
15:25devnill double what dnolen said about recommending the oreilly book, but when i thought of K&R I thought: Joy of Clojure or Programming Clojure due to the size of those books
15:25dnolenimpomatic: that's probably close to useless.
15:26impomaticnDuff: basically to be short and as complete as possible and assume just basic programming experience.
15:26devnimpomatic: short and complete are at odds there, no?
15:26nDuffimpomatic: ...but "complete" in what sense?
15:27nDuffimpomatic: If you aren't ready to do real-world boots-on-the-ground work without understanding the surrounding tools as well as the language, a book that is nothing but a complete overview of the language won't get you where you need to be.
15:27nDuffimpomatic: and a book that's a complete overview of the language but which doesn't explain the rationale can leave you trying to write ${OTHER_LANGUAGE} code in Clojure, which is horrible.
15:28nDuffimpomatic: IMHO, the rationale is the #1 most important thing, which is why I tend to prefer to start with Joy of Clojure, but there's a lot of personal preference there.
15:28devnthat's one reason why i would suggest joy of clojure as a companion to whatever book you decide to get
15:28scottjamalloy: neither does K&R (get updated) :)
15:29nDuffOof.
15:30scottjnDuff: yeah, perhaps best to refer to them as pragprog and o'reilly books
15:30nDuffWas wondering why people were recommending it for concision :)
15:31scottjor halloway and emerick books
15:56timvisherany way to tell lein2 to avoid using a proxy for a particular repository?
15:59timvisherjava needs pac file support badly…
16:00kreig1pac?
16:00clojurebotsingle-segment namespaces are unsupported. (foo instead of foo.core) they may work in a few circumstances, but you shouldn't rely on them.
16:01timvisherhttps://en.wikipedia.org/wiki/Proxy_auto-config
16:01timvishervery popular in the windows corporate networks of the world
16:02gerunddevAnyone have a mixed Java / Clojure project, using 1.7, and building with clojure-maven-plugin?
16:07gtrak~anyone gerunddev
16:07clojurebotno, anyone is a funny thing.
16:07gtrak~anyone
16:07clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
16:08llasramgerunddev: All my mixed Java / Clojure dev is driven from Leiningen
16:09gerunddevI'm adding Clojure to a project that already is invested in maven, java 1.7, and a number of related tools. So far all well except calling Java classes from my Clojure code.
16:10technomancytimvisher: I don't think aether supports setting proxies on a per-repo basis
16:10gerunddevI get Unsupported version exceptions, which seems to indicate my Clojure code is getting compiled as a version other than 1.7.
16:10timvishertechnomancy: boo. corporate networks suck hard…
16:10technomancythis is true
16:10gtrakgerunddev: there's no clojure 1.7?
16:10technomancyyou can't use the same proxy for all repos?
16:11gerunddevI get it when using clojure-maven-plugin, not with zi.
16:11timvishernope
16:11timvishersome are direct traffic, some are through one proxy, others through another
16:11timvisherit's a mess
16:11nDuffgtrak: err, "I read that as with a JVM version other than 1.7"
16:11nDuffs/"I read that as /I read that as "/
16:12gtrakgerunddev: ahh, if your class-files are compiled as 1.7 classes, and clojure isn't, yea that's' a problem I think
16:12timvisherit'd be awesome if pacparser could be used
16:12timvisherin theory, then, we'd be able to get around a lot of this stuff in a typical corporate environment
16:13timvisherbut who's got the time to do that
16:13technomancyin my experience that kind of stuff is usually done by the people feeling the pain =)
16:13technomancypeople with low pain tolerance
16:14timvishermaybe we will then, because it affects us at every turn, no matter what language we're using
16:15hugodgerunddev: is there a reason for using clojure-maven-plugin over zi?
16:16gtrakgerunddev: looks like the clojure plugin forks a process to compile the clojure, I bet you could add some hook in there
16:16nDuffzi?
16:16clojurebotunzip-with is http://paste.lisp.org/display/76458,1/raw
16:16gtrakhttps://github.com/talios/clojure-maven-plugin/blob/develop/src/main/java/com/theoryinpractise/clojure/AbstractClojureCompilerMojo.java
16:16hugodnDuff: https://github.com/pallet/zi
16:17nDuffOooh.
16:17gtrakzi: "The goals use a non-forked execution model – they are executed within the maven process itself, which should make it faster."
16:17clj_newbHi, is there a framework to monitor connections?
16:18gtraklinux?
16:18clj_newbIdeally I'd like to set it like a proxy and process the data
16:18clojurebothttp://www.assembla.com/wiki/show/clojure/Datatypes
16:18lazybotAssembla is deprecated. Use http://dev.clojure.org
16:18technomancyoh snap!
16:18gtrakhaha
16:18S11001001bots scolding bots
16:18gerunddev:hugod I would like to use test-with-junit for use in a build system.
16:18gtrakclj_newb: wireshark
16:19clj_newbwell, I mean like a java agent in clojure, or a proxy (in clojure as well), but thanks
16:19gtrakah, I know there's some faker thing for ring, and clj-http too
16:20nDuffclj_newb: ...what kind of proxy? SOCKS? ...?
16:20clj_newbsocket ideally
16:20clj_newbthanks gtrak I'll dig in google
16:20technomancyyou can wrap a stream in a FilterInputStream and do arbitrary things with it
16:21gerunddev:gtrak Thanks I'll look into that fork.
16:21clj_newbgreat technomancy, I was wondering if there was something done already
16:22hugodgerunddev: oh, ok - should be simple enough to add a task to zi to do that, but I have little incentive to do it myself
16:23gtrakgerunddev: I wasn't recommending the fork specifically, it's just the first thing I googled
16:23gtrakthe first thing when I googled *
16:24gtrakI imagine there's a parameter you have to pass somewhere to make it right
16:25gtrakbut is that the case in java, that 1.6 code can't call into 1.7 code?
16:25gerunddev:gtrak I had been looking at ClojureCompilerMojo and ClojureRunTestWithJunitMojo, the abstract class seems like a better place to start. Perhaps it's calling a property I have set wrong, etc.
16:26gtrakit seems like it's not your fault, but something not yet implemented
16:27gerunddev:gtrak Yes it throws an error like: "Unsupported major.minor version 51.0
16:27gerunddev"
16:27gtrakhttps://groups.google.com/forum/?fromgroups#!topic/clojure-dev/cjG2nVvNJBE apparently clojure classes have a version of 49
16:28gtrakah, gerunddevso check this: http://www.java.net/node/664117 perhaps your maven process is calling an older java version by accident?
16:30nDuffgerunddev: I'd expect that hugod's zi would work so long as Maven is running with the 1.7 JVM, being non-forking.
16:30gtrakalso, are you using java 1.7 features? you can specify a compatibility level on the java-side
16:32gerunddevgtrak: I do have both java 1.6 and 1.7 so misconfiguration is likely. I am using the new try syntax of 1.7.
16:32gtrakah
16:33gerunddevnDuff: Yes zi worked fine, but doesn't have an export of junit format test results.
16:35gtrakgerunddev: I just checked, with jdk7 and lein my AOT classes are still compiled as version 49..
16:35nDuffgtrak: Does that matter? Unless you want Clojure to use JDK7 features in the _bytecode_...
16:35gtrakright... not sure
16:36gtrakbut I wonder if the classes can reference newer ones?
16:36gtraki'll ask on ##java
16:36gerunddevgtrak: That is really interesting, 1.7 should be 51.
16:36cemerickand now gtrak has two problems
16:36nDuffgtrak: they certainly can.
16:37gtrakah
16:37cemerickthe bytecode version is determined by what generates the bytecode; in this case, Clojure.
16:37cemerickor, actually, the rev of ASM that Clojure includes.
16:38gtrakso... it's the java process not being able to load the newer classes, not another incompatibility
16:39gerunddevSo in my case the newer code is java compiled with 1.7. I get the exception calling it from my clojure code.
16:39gtrakare there any examples of 1.7-only libraries we can try clojure against?
16:39shrijeetSeeking recommendation for a book, I am just starting . Can program in java fairly well. What do you guys think of http://pragprog.com/book/shcloj2/programming-clojure
16:40dnolenshrijeet: I recommend the O'Reilly one.
16:40nDuffshrijeet: The O'Reilly book is probably the most complete if you want something that covers the full toolchain and tools
16:40puchaczwhich one?
16:40nDuffClojure Programming
16:40shrijeethttp://www.clojurebook.com/ this I guess
16:41puchaczthx
16:41shrijeetnDuff: thank dnolen: thank you too
16:41nDuffshrijeet: Joy of Clojure is also very good, though Clojure Programming tries to cover the same ground as well (and, indeed, lists it as a source of inspiration)
16:41clj_newbThis might not be the right place, but does anyone know which java environment variable must be set to change the default socket factory