#clojure logs

2010-10-03

01:58sam1234j
01:59amalloysam1234: k?
01:59sam1234accidently pressed enter
02:08shachafsam1234: Or perhaps ^J?
02:53amalloytechnomancy: no more TeX? you get that problem figured out, then?
04:02ashleyw_Hi, is there a way to expand a vector of values into the arguments of a method? e.g. something like this http://pastie.org/1196308
04:08LauJensenashleyw: Im not 100% sure what you're trying to do, but generally I'll recommend you to use reduce instead of apply if you want t communicate that you're doing some kind of accumulation (instead of spreading of args). If you simply want to add all of the numbers given in 2 vectors, you could
04:09LauJensen(defn addnums [[a b]]
04:09LauJensen (+ (reduce + a)
04:09LauJensen (reduce + b)))
04:09LauJensenWhere the argumentlist itself is splitting the vector into 2 subvectors. Otherwise, make some kind of flattening operation
05:53_ulisesmorning all
05:54raekmornin'
06:33zmyrgel`how can I specify that I want symbols value?
06:33zmyrgel`I have defined some symbols as (def NORTH 1), (def SOUTH -1) etc.
06:34_ulisesand you want the 1 for NORTH?
06:34zmyrgel`then I get error "can't cast Symbol to Number" in code like (map #(some-function x %) directions)
06:34zmyrgel`directions is a list of (NORTH SOUTH)
06:35zmyrgel`I assumed it would use the values of the symbols and not the symbols themselves
06:35mrBlisszmyrgel`: try a vector instead of a list
06:36mrBlisszmyrgel`: or (list NORTH SOUTH)
06:36mrBlisszmyrgel`: you're probably quoting your list, so the symbols don't get evaluated
06:36zmyrgel`mrBliss: yep, just noticed the quoting thing
06:37raek(def north 1) (def south -1) (def directions [north south]) (map #(some-function x %) directions)
06:37_ulisesthis seems to work for me: http://pastebin.com/1n8vxhjC
06:37_ulisesbut maybe I'm not understanding the question :/
06:37_ulises(yes, I used a vector instead of a list)
06:39raekzmyrgel`: be sure that you understand the difference between (a b c), '(a b c) and (list a b c)
06:39zmyrgel`raek: yep, I know that. I just had made the error some time ago
06:42zmyrgel`is there any good method of profiling code in clojure?
06:43mrBlisszmyrgel`: visualvm is quite easy
07:25LauJensenHow is the Clojure-Android story ?
07:29kjeldahlIs there a new story? The most up-to-date info I've found (with references to github etc) is here: http://stackoverflow.com/questions/973386/android-adverse-to-dynamic-languages
07:30LauJensenkjeldahl: I don't know what the official story is on GC, but I know its fixed in several proprietery alternatives to Dalvik
07:49leafwis there any lazy reverse fn?
07:51LauJensennot possible
07:51leafwI believe you, but is there any ratinale wy
07:51leafwwhy
07:52leafwalso: why :^static fn can only accept ^long and ^double, and not ^int for example, in its args?
07:55cemerickleafw: because ^int doesn't give you anything beyond what ^long does.
07:55leafwcemerick: you mean performance-wise, they are identical?
07:56leafwI can believe that in 64-bit CPUs. Fair enough.
07:56cemerickMost JVMs are optimized for doubles and longs these days, yeah.
07:56cemerickBut that's not the point.
07:56leafwmath with float is faster than with double. Test it yourself.
07:56leafw(in java world, at least)
07:58cemerickthe Sun jvm is biased towards doubles. Heard it from someone at Sun with my own ears.
07:58cemerickRegardless, that's not all that went into it.
07:58LauJensenleafw: If you have a sequence X which you want to reverse, you have to start with the last element in that list. To realize that last element, you also need to realize all the elements leading up to it, hence we're no longer lazy
07:59leafwcemerick: float is faster (and less accurate). That's a fact.
07:59cemerickWell, if *you* say so, then I guess so. :-P
07:59leafwLauJensen: but if one has a list of objects that are all realized, i.e. a non-lazy list, then reverse could be lazy, returning them as it goes. Or is it that what it does current?
08:00LauJensenleafw: Wouldn't change anything
08:00leafwLauJensen: ok
08:00leafwcemerick: YMMV. I work with float[] images ... math is about 1.5x faster than with double[].
08:02cemerickleafw: This is an undecidable point with just the two of us dropping anecdotes.
08:02cemerickAnd entirely unrelated to the question of :^static's impl.
08:02LauJensenleafw: As I recall, Richs argument was that doubles on the JVM are now typically as fast, sometimes faster than floats
08:04leafwLauJensen: thanks.
08:07LauJensennp
08:10kjeldahlLauJensen: Regarding Dalvik, your information is probably more updated than mine.
08:19_uliseshow can I dispatch mult-methods based on some property of their 2nd argument? i.e. if i do (defmulti foo :type) then :type is used on the first arg. passed to foo, not its second
08:26AWizzArd_ulises: (defmulti foo (fn [arg1 arg2] [(> arg1 arg2) (class arg2)]))
08:27_ulisesoh! so I could just do (defmulti foo (fn [_ p2] (:type p2)))
08:27_ulisesexcellent!
08:27AWizzArdyes
08:27_ulisesthanks :)
08:28AWizzArdfirst the defmulti is called, and its return value is compared with all defmethods that are available. The right one is selected and then this specific foo is called again with the original arguments
08:30_ulisesso first the defmulti is called with all the arguments passed?
08:30_ulisesand then the appropriate method is called, again, depending on the result of the dispatch-fn, with all the arguments passed?
08:33tobiasraederis it possible to (deftype person [proxy firstname lastname] ...) and then do something like (person. "firstname" "lastname")?
08:33leafwtobiasraeder: use defrecord for that
08:34tobiasraeder@leafw i need to use deftype tho since defrecord doesnt support :volatile-mutable afaik
08:35leafwit doesn't :) that's why defrecord is so useful. With deftype and volatile-mutable, you are back into mutable java world.
08:35leafwbut you knew that already, nm.
08:35tobiasraederyeah, but since this is a huge java interop thing im working on i don't really have a way to bypass it :/
08:36LauJensentobiasraeder: Looks like its possible with a factory fn ?
08:37tobiasraeder@LauJensen yeah i guess so
08:51LauJensenAny tomcat buffs in here ?
09:13raektobiasraeder: just out of curiosity: did you try the atom solution? if so, what lead you to your decision?
09:30tobiasraeder@raek im using deftype with :volatile-mutable now because it seems to fit what i need really
09:32jaleyHi guys, anyone able to help out a leiningen newb quickly?
09:33tobiasraederjust go ahead ;)
09:33BahmanHi all!
09:33jaleyi've created a projected added dependencies for compojure, enlive and ring, plus dev-dependencies for swank-clojure, when I run lein deps I get an exception for an attempt to use nth on a Symbol
09:34tobiasraeder@jaley can u put your project.clj into a gist or something of that sort?
09:34jaleysure, off to pastebin, brb
09:36jaley@tobiasraeder http://pastebin.com/Urh0x7SJ
09:36raekjaley: wrap [swank-clojure "1.2.0"] in another vector
09:36tobiasraederyou need a second pair of [] around your [swank-clojure "1.2.0"]
09:37tobiasraedersince the dev dependencies are a vector of dependencies aswell
09:37tobiasraederso it should be :dev-dependencies [[swank-clojure "1.2.0"]])
09:37jaley@raek @tobiasraeder that got it, thanks guys
09:43tobiasraederis it possible to generate a vector of java object instances in a macro?
09:44_ulisesis there an alternative to re-starting the swank process whenever one needs to redefine things such as multi-methods?
09:45Raynes(ns-unmap *ns* 'multi)
09:46_ulisesthanks! :)
09:50tobiasraederis there a way to have a function return (MyJavaClass. "parameter") ?
09:52raektobiasraeder: you want the class to be given as an argument?
10:00raektobiasraeder: (.newInstance (.getConstructor MyJavaClass (into-array Class [String])) "parameter")
10:00Rayneshttp://stackoverflow.com/questions/3748559/clojure-creating-new-instance-from-string-class-name
10:01tobiasraederthanks :) i managed to get it to work a bit different, ill gist it real quick. comments are more than welcome
10:03tobiasraederhttp://gist.github.com/608591
10:34tobiasraederif i have something along those lines (defn myfn [name] '(MyClass. name)) is there any way to get the value of name as first parameter to MyClass. without making it a macro?
10:37_ulisescan I get your thoughts on "purely functional data structures" by Chris Okasaki? (if anybody has read it)
10:50raektobiasraeder: with java's reflection API, I think you can
10:51raekeither by doing something like what I posted before, or by using clojure.lang.Reflector/invokeConstructor
10:52raekthat will not result in any Clojure code that uses the (MyClass. name) syntax, though
10:52tobiasraeder_back
10:53tobiasraeder_@raek the problem was the quoted form didnt evaluate the name parameter (obviously)
10:53raektobiasraeder: http://pastebin.com/zWTU6NVf
10:53tobiasraeder_@raek the (for me) easiest solution seems to be (defn myfn [name] `(MyClass. ~name))
10:54raekyes, a macro solution would be one of the simplest ways, I think
10:54tobiasraeder_well its a function since i wanna pass it to a map inside another macro
10:54raek`Integer
10:54raek,`Integer
10:54clojurebotjava.lang.Integer
10:54tobiasraeder_i just didnt realize you could do `~ etc in fns aswell
11:11jaleycan defrecord take a doc string?
11:19raekjaley: no. the doc strings goes on the protocols.
11:20raekjust like docstrings goes on the defmulti rather than the defmethods
11:20jaley@raek right.. that makes me think perhaps i shouldn't use a record for plain old data?
11:21raekrecords are plain old data, with a type
11:22raekbut if you don't need dynamic dispatch on type, records might be overkill
11:22jaley@reak ok.. as i was hoping - but it doesn't make sense to document them?
11:22raekwhat a method should do is defined by the protocol
11:23jaley@raek yeah, but I just wanted to note what a collection of fields represent. guess it's doesn't really matter
11:24raekI usually describe "data contracts" in the ns docs
11:24tobiasraeder_can you define a macro that in turn defines a function like that: (defn create-<firstparameter-of-macro> [& args] (new <firstparameter-of-macro> args)) ?
11:24tobiasraeder_i seem to fail horribly :/
11:24jaley@raek that works - thanks
11:25raekfor example, a x-map is a map that has the :a, :b and :c keys, which has the meaning...
11:26raekstatically typed languages has the advantage that the type is the intuitive place to put the docs at
11:26raekbut clojure does very much or most of it's things without types
11:27jaley@raek yeah that makes sense, i was just look for a sensible place to document what a bunch of fields meant. the ns docstring will be fine
11:28raekjaley: an example: http://github.com/raek/quirclj/blob/master/src/se/raek/quirclj/message.clj
11:30mrBlisstobiasraeder_: my try: (defmacro defn-create [x] (list 'defn (symbol (str "create-" x)) (vector '& 'args) (list 'new `~x 'args)))
11:31raektobiasraeder_: the problem with the 'new' special form is that you cannot 'apply' it
11:31mrBlisstobiasraeder_: I wouldn't use it though ;-)
11:32tobiasraeder_@raek in which sense "apply"?
11:32raekmrBliss: when calling (create-foo 1 2 3), wouldn't that try to call (new foo [1 2 3]) instead of (new foo 1 2 3)?
11:33mrBlissraek: that's what tobiasraeder_ asked
11:34mrBlissa better solution: http://gist.github.com/608662 (not mine)
11:34raekI think using java's reflection capabilities is the only general approach
11:35raekunless you have fixed arities for your constructors
11:35tobiasraeder_well i know the arguments that will be passed to the ctor in the macro, yes
11:36raekif you have a seq s of arguments to a function f, you invoke the function with (apply f s)
11:36Rayneshttp://stackoverflow.com/questions/3748559/clojure-creating-new-instance-from-string-class-name I did the same thing in my answer. It doesn't work quite as well as I'd hoped though (read the comments).
11:37raekbut with a special form like new, there is no such apply function
11:37tobiasraeder_alright, thank you
11:58_uliseswhat's the best way of making a single parameter entirely optional? is it using ?
11:58_ulisesor &?
12:00raekone way is (defn foo ([x] (foo x 0)) ([x y] (+ x y)))
12:01raekanother way could be (defn foo [x & [y]] (+ x (or x 0)))
12:03mrBliss,(binding [inc dec] (map inc [1 2 3]))
12:03clojurebot(0 1 2)
12:03mrBliss,(binding [inc dec] (map #(inc %) [1 2 3]))
12:03clojurebot(2 3 4)
12:03raekor (defn foo [x & more] (+ x (get more 0 0)))
12:04jaleyis there a quick way of sending an (in-ns <current namespace>) to the repl with swank?
12:04raek(some math operations are static functions, and are optimized by the compiler)
12:04mrBlissHow can I make my second form do the same as the first? (difference: rebound var inside a anonymous function)
12:04mrBlissjaley: C-c M-p
12:05jaleymr8liss: merci beaucoup
12:06mrBlisssolving my problem ^^ would make testing some functions a whole lot easier
12:07raekmaybe something like (ns ... (:refer-clojure :exclude (inc))) (def inc clojure.core/inc)
12:08_ulisesraek: thanks
12:09mrBlissraek: seems to work in my example, I'll try to incorporate it in my tests. Thanks
12:09raek_ulises: I think the first one is the most common
12:10_ulisesexcellent, thanks again.
12:11rrc7cz`how can you apply on a Java method? something like (apply (.fillRect gfx) [10 10 20 20])?
12:11raekmrBliss: some of the functions in clojure.core is allowed to be inlined. by making the ns of the var being something else than clojure.core, the compiler will not do any of those optimizations
12:12mrBlissraek: it was just an example, I only have to rebind my own functions
12:12raekthen it should always work.
12:13raek,(binding [first second] (map first [[1 2] [3 4]]))
12:13clojurebot(2 4)
12:14raek,(binding [first second] (map #(first %) [[1 2] [3 4]]))
12:14clojurebot(1 3)
12:14raekhrm
12:14raekmaybe this behaviour happens for all vars in clojure.core
12:14raek,(binding [first second] (doall (map #(first %) [[1 2] [3 4]])))
12:14clojurebotjava.lang.StackOverflowError
12:15mrBlissraek: it's actually quite complicated: the functions I need to rebind are private, in another namespace and I need to use them in the functions that replace them. I might have some problems later when I'll have to rebind functions in futures and pmaps...
12:16raekprivate functions can be used from other namespaces with @#'the-fn
12:16raekvery useful in testing...
12:16mrBlissI'm using with-private-fns for that
12:17raekanyway, lookout for binding things in clojure.core and using binding with lazy sequences
12:18raekif the lazy sequences escape out of the binding form, the any usage of the rebound var in the lazy seq will see the "outer" value
12:19raekmrBliss: also, have you seen this? http://github.com/marick/Midje
12:22mrBlissI only need it in my tests, so I don't think I'll run into that problem. Yes I've seen Midje and put it on my todo list. But I'd rather switch to lazy-test when that's final. Thanks for the help
12:25solussd_hm. when did clojure start supporting metadata on functions?
12:26raekin 1.2
12:26solussd_neat
12:34ldhanson2i've got a map on which I call (keys my-map), which gives me a clojure.lang.APersistentMap$KeySeq. I'm trying to use do/recur to loop through each key in the sequence, but calling 'first' on the key sequence gives "java.lang.ClassCastException: clojure.lang.PersistentHashMap cannot be cast to java.util.Map$Entry at clojure.lang.APersistentMap$KeySeq.first (APersistentMap.java:130)". Am I missing something?
12:39mrBlissldhanson2: can you post the code?
12:56ldhanson2mrBliss: i'm currently trying to isolate the code to reproduce it, it's not occurring in simple test scenarios. doing so may well help me discover the problem, but i was hoping it rang a bell for somebody
12:59mrBlissldhanson2: rather strange error message
13:02ldhanson2mrBliss: indeed. before I call first on it i even (assert (seq? keyseq)) so one would think that's not a problem
13:09carkha question about protocols and namespaces : i have a protocol Matcher in namespace A, it has a single method "match". I want to use it from namespace B but i have reflection warnings. Is there a way to "import" the protocol into namespace B so that i don't have to type hint with the fully qualified and very long name of namespace A ?
13:28carkhso here is the answer to my question : do not use the namespace A as the Matcher name will be to the var created by the defprotocol form
13:29carkhinted i need to require the namespace, then import A.Matcher
13:29carkhinstead*
13:29carkhwhich is quite a lot of work =/
13:31bhenrycarkh i'm pretty sure you can import just the matcher without the require, unless you need other stuff in namespace A.
13:32carkhi get a class not found
15:16tobiasraeder_Anyone got an idea why i might get "Class clojure.lang.Reflector can not access a member of class MyObjectProxy with modifiers "public"" when i try to create an instance of MyObjectProxy?
15:17tobiasraeder_it got a public constructor (whcih is pretty obvious i guess) which im trying to call
15:19tobiasraeder_solved it
16:01leafwis zipmap lazy?
16:02leafwit's doing a loop/recur ... likely not
16:02leafwor is loop lazy?
16:02AWizzArdnot lazy
16:02AWizzArdloop + recur = goto
16:02leafwthanks
16:03leafwI just blowed up 12 Gb of RAM, and I was wondering. zipmap looks like the problem
16:03leafwalso: is (apply merge-with + ... not lazy either? I.e. will all maps be generated, and then apply applies?
16:03AWizzArdleafw: how much RAM do you have in your box?
16:04leafwthis one has 16 Gb
16:04AWizzArdnice
16:04leafwuseful :)
16:04AWizzArdahead the average
16:04leafwoh no, this machine is actually small here. Standard is more like 24 or higher
16:05hiredmanthe only lazy thing in clojure is lazy-seqs
16:05leafwhiredman: map is lazy, reduce is lazy ... or arent' they?
16:05hiredmanwell my laptop has 8 gigs, so …
16:05AWizzArdalso very nice
16:05leafwa laptop with 8 Gb is a treat
16:05hiredmanmap produces a lazy seq so it is lazy
16:05hiredmanreduce is not lazy
16:05leafwhiredman: what about reduce?
16:05leafwok
16:05leafwthanks
16:05hiredmanthe only lazy thing in clojure is lazy-seqs
16:05AWizzArdin 1990 a real good computer had maybe 8 mb of RAM, so we got a factor of 1000 in two decades :)
16:06AWizzArdevery two years a doubling, which will give us average RAM of around 100 gb by the end of this decade
16:06hiredmanto be fare I *had* to buy more ram because right now even with 8gigs I only have 90mb free
16:06hiredmanfair
16:06AWizzArduhm, what are you doin? :)
16:07leafwhiredman: "for" is also lazy
16:07AWizzArdBtw, a very good time to buy ram now, very nice price
16:07hiredmanleafw: for produces a lazy-seq
16:07leafwI see
16:07hiredmanthe only lazy thing in clojure is lazy-seqs
16:07leafwhiredman: I get it :)
16:07AWizzArdfor is built with lazy-seq's under the hood
16:08leafwdo all fn that return a lazy-seq are labeled as lazy in their docs?
16:08leafwis there a list of lazy fn to look at?
16:08AWizzArdleafw: you can do (source your-fn) and have a quick look
16:08leafwAWizzArd: (find-doc "lazy") lists a few
16:08AWizzArdThere is no regularity in the docs I think
16:11jaleyhey guys - i was wondering.. what's the best way to organize test data files in a leiningen project? can i somehow avoid making assumptions about the working directory?
16:13jk_ AWizzArd: where does "source" come from? if i type (source _something_) in the repl, source is not found
16:14freakazoidhas anyone built a transactional map yet? one where concurrent updates, including inserts and deletes, to different keys don't conflict?
16:14freakazoidI've thought of a way to do it but I wanted to make sure it hadn't already been done first
16:18technomancyjaley: usually you just have the same structure but with _test.clj tacked on to the end
16:18technomancyeach implementation namespace corresponds to one test namespace
16:22jaley@technomancy yeah actually I wanted to have some extra text files with test data in them
16:22technomancyjaley: test-resources is for those
16:22jaley@technomancy and was wondering if there's a standard place to keep test data
16:22leafwok, so it's clear: apply is evil ... realizes all sequences first, then applies.
16:23jaley@technomancy ah ok, in the root of the test folder? is there some documentation about this somewhere that i've missed?
16:23technomancyjaley: in the root of the project
16:23jaley@technomancy great - thanks!
16:23technomancyit's documented in sample.project.clj; I guess it should be in the tutorial too
16:25jaley@technomancy it's fine - i even had that open in another tab, just totally missed it (d'oh!). thanks again
16:25technomancysure
16:30chouserleafw: just got here, but ... what? apply is lazy.
16:30leafwchouser: then I don't get it. Now it's churning away at 1 GB of RAM ... no more blowing up
16:30chouserthat is, apply doesn't realize the seq you give it any more than is required by the function you're passing it to.
16:31leafwlet me paste it somewhere
16:32chouser,(let [f (fn [a b c & more] (+ a b c (first more)))] (apply f (range 10)))
16:32clojurebot6
16:32chouserer
16:32chouser,(let [f (fn [a b c & more] (+ a b c (first more)))] (apply f (range)))
16:32clojurebot6
16:32leafwwasn't there a paste bin where #clojure was listed? not paste.lisp.org?
16:32chouserleafw: paste.lisp.org or gist.github.com
16:33leafwthanks
16:35chouserah, apply on merge-with will consume the whole seq
16:35leafwhttp://gist.github.com/608905
16:36chouserthe problem there is merge-with, which returns a map, and maps aren't lazy.
16:36technomancyit's not that apply is lazy, it's that lazy functions can be applied
16:36leafwany nicer ways to write the second version?
16:37chouserif any link in the chain is eager, the input seq will be fully realized. apply won't do that, but something else (like merge-with) certainly can.
16:37leafwchouser: I was expecting merge-with to only care about two maps at a time
16:37chouserintersting. reduce will certainly realize the whole input seq to
16:37leafwand to forget all maps that it has already seen
16:37chousertoo
16:37chouserhm
16:38leafwwell, at least I have a solution, but it's not pretty to say the least
16:39leafwI'm computing node centrality in a tree (graph without loops) that represents a neuron ... looks way cool in 3D
16:41chouser:-) I'm sure
16:47AWizzArdleafw: how deep is your tree?
16:52leafwAWizzArd: about 3000 nodes
16:52leafwwith 88 branch points
16:54AWizzArdso, do you mean the deepest point is 88 nestings?
16:56AWizzArdleafw: (reduce (fn [l _] (cons l ())) (range 88)) or range 3000?
16:58leafwno, deepest degree is about 500 or so
16:59AWizzArdok
17:06chouserhm, well I don't see where merge-with would be holding the head of the seq.
17:08alistairkCan anyone point me (a Clojure newbie) in the right direction to install Clojure 1.2 with Emacs on Ubuntu 10.04
17:08alistairk?
17:09leafwchouser: no idea either. The whole script is here: http://github.com/acardona/Fiji-TrakEM2-scripts/blob/master/TrakEM2/backbone_.clj
17:09AWizzArdalistairk: the Emacs Starter Kit could be a good point to start
17:09AWizzArdalistairk: basically you download a folder .emacs.d and put it into your home, and make sure that there is no .emacs file in your home.
17:10technomancyalistairk: cljr is a nice place to start experimenting, then once you want to create a project look at leiningen
17:10technomancyalso relevant: http://www.assembla.com/spaces/clojure/wiki?id=clojure&amp;wiki_id=Getting_Started_with_Emacs
17:12alistairkThanks guys - I'll check your suggestions out. The problem is specifically with Clojure 1.2 - I have Emacs and Clojure 1.1 working
17:12alistairkbut obviously want to start playing with Clojure 1.2
17:12alistairk;-)
17:12jaleywhat would cause a NoSuchMethodError <init> when trying to instantiate a record? :s
17:13technomancyit should be easy to swap in 1.2 in your project.clj
17:16leafwgood night all
17:16leafwthanks for the help and the company.
17:26jaleyhm weird. i did a lein clean and recompiled and the problem went away
17:26jaleyit's nice when that happens
17:32florianjunkerIs there some way to use leiningen with a SOCKS proxy?
17:40alistairk(progn (load "/home/alistairk/.emacs.d/elpa/slime-20100404/swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "/tmp/slime.7839" :coding-system "iso-latin-1-unix"))
17:40alistairkClojure 1.2.0
17:40alistairkuser=> java.lang.Exception: Unable to resolve symbol: progn in this context (NO_SOURCE_FILE:1)
17:41technomancyalistairk: you're launching slime in some way that assumes you're working with common lisp
17:41technomancyhave you read the swank-clojure readme?
17:41alistairkSorry, will do. Is Emacs Starter Kit 'compatible' with Clojure 1.2.0?
17:42technomancysure; they're orthogonal
17:42alistairkBrilliant! Thanks for your patience...
17:42alistairkI'll get there ;-)
17:45alistairktechnomany: by the way - I like how the Emacs Starter Kit configures Emacs - very nice
17:46alistairkInstalling Leiningen...
17:55lpetitHmmm
17:57lpetitI need help understanding Open source license issue
17:58lpetitSay I have written a program under the EPL. This program includes an antlr grammar for clojure.
17:59lpetitNow I see the antlr grammar has been included into another program. This program is not licensed under EPL at all. Sort of a BSD-like "own copyright without any guarantee, etc."
17:59lpetitA
18:00lpetitAt least there's credit for my work in a ATTRIBUTION.txt file.
18:00alistairkInstalled Leiningen. Added the swank-clojure "1.2.1" dependency to the project.clj file and ran 'lein swank [PORT=4005] [HOST=localhost]'
18:00lpetitIsn't this a violation of the EPL ?
18:00lpetitI'm referring to this : http://www.eclipse.org/legal/eplfaq.php#USEINANOTHER
18:00alistairkException in thread "main" java.lang.NumberFormatException: For input string: "[PORT=4005]" (NO_SOURCE_FILE:1)
18:00carkhlpetit: i think they can use your work, but need to include the license for that part
18:00Chousukelpetit: well at least the antlr grammar should be licenced under the EPL AFAIK.
18:01lpetitit's part of ccw and ccw is licensed under EPL.
18:01alistairkDoes that mean that I have to download the Swank Clojure source first (it doesn't download it?)???
18:01chouserlpetit: I think that is a violation
18:01alistairkGuys, is this the right place for me to be asking these questions?
18:01carkhyep they cannot change the license of your code
18:02lpetitcarkh: they did not, or it's very well hidden
18:02chouserlpetit: I'm sure they'd appreciate a friendly reminder to pay attention to license details.
18:02chouseralistairk: yep, right place. just hang on. :-)
18:02lpetitThe ATTRIBUTION.txt file is just an acknowledgement of the provenance of the work, there's no mention of license
18:03alistairkthanks - no hurry
18:03chouseralistairk: ok, unfortunately I don't use emacs or swank and don't really know what to advise
18:03lpetitWell, I'll think about how to turn my answer. Don't necessarily want to get a new enemy on this little earth, just to make things clear :)
18:04ansraalistairk: the bit in brackets can be left out, those are showing default values for the port and host, running 'lein swank' should work
18:04chouserlpetit: sure. you could offer to grant them a custom license, if you own that whole file
18:05chouserlpetit: or just suggest they include an EPL license notice for that one file
18:05lpetitchouser: yeah, thanks for the advice.
18:07alistairkoops, just running 'lein swank' seems to be working :-)
18:08chouserlpetit: since they took your work without permission, it should be possible to be polite and undemanding and still generate a sense of guilt in them. :-)
18:09alistairkthanks ansra
18:09alistairkyep it seems to be working
18:09alistairkthanks guys
18:09ansrasure thing, have fun :0
18:10lpetitchouser: hmm, last question. Would you ask this to him publicly ? (answering the email on #clojure ?).
18:12carkhhuh i wouldn't (on the first try)
18:18lpetittoo late :)
18:18lpetitbut things were not as bad as I first thought
18:20carkhohwell your message isn't too stern anyways =)
19:10defngreetings gents
19:12Rayneschouser: He was overreading the README. 'lein swank [PORT=4005] [HOST=localhost]' should have been 'lein swank 4005 localhost'
19:12RaynesIn case you were wondering, and for future reference. I bet he read that command, and those were just vague placeholders.
19:22AWizzArd~seen rhickey
19:22clojurebotrhickey was last seen quiting IRC, 4113 minutes ago
19:22AWizzArd,(/ 4113 60.0)
19:22clojurebot68.55
19:22Raynes$seen rhickey
19:22sexpbotrhickey was last seen quitting 4113 minutes ago.
19:22Raynessexpbot agrees
19:23AWizzArd(:
19:23AWizzArdgood night
19:23RaynesNight.
23:34notostracaI am trying to find information on a nice deed the clojure community did -- a bunch of people paid for someone's airfare to a clojure conference, but I can't find anything using google
23:35notostraca(trying to evangelize a bit)
23:43maravillasnotostraca: http://cemerick.com/2010/09/10/a-clojure-scholarship-lets-send-raynes-to-the-conj/
23:43maravillasand the next post, http://cemerick.com/2010/09/10/anthony-simpson-will-receive-his-clojure-scholarship-thanks-to-you/
23:44notostracathanks a ton
23:44maravillasnp