#clojure logs

2010-12-25

05:04fliebelGood morning and Happy Christmas! (You must be getting a lot of these today) (Still 200 people in here?) (Happy Christmas is always with capitals, by the way) (No more comments…)
05:06Lajlafliebel, opdat de heer sterve!
05:29fbru02morning all !!
06:09Raynes$seen cemerick
06:09sexpbotcemerick was last seen quitting 20 hours and 6 minutes ago.
06:52GOSUBis there any way to mimic a Java class with a bunch of fields in Clojure? Will cast help?
06:52RaynesIsn't the fact that proxy implicitly binds 'this' to a proxy instance against Rich's own opinions towards anaphora?
06:54RaynesI imagine that the relevant opinions came well after the point where the implementation being changed in order to support his opinion would have been a breaking change.
08:11mrSpecMorning!
08:11skelter(Merry Christmas)
08:12RaynesHo ho ho.
08:12skelter(times 3 ho)
08:12mrSpecI have problem when trying to make jar file. I use lein uberjar, everything is fine. but when I run java -jar project-standalone.jar I got: Exception in thread "main" java.lang.NoSuchMethodError: edu.uci.ics.jung.visualization.VisualizationViewer.<init>(Ledu/uci/ics/jung/algorithms/layout/Layout;)V
08:12mrSpecCould you help me? under emacs all works fine
08:13Raynes&(apply str (repeat 3 "ho "))
08:13sexpbot⟹ "ho ho ho "
08:14skeltermrSpec, tell us more about your app. Is VisualizationViewer's constructor your own code or a dependency?
08:14RaynesmrSpec: That sort of error is usually something to do with mismatched versions of compiled things. Try lein clean, making sure that it eliminates the classes/ directory.
08:15RaynesAn old class that has recently changed but hasn't been updated can be the result of that.
08:16Rayness/can be the result of that/can result in that/
08:16sexpbot<Raynes> An old class that has recently changed but hasn't been updated can result in that.
08:16mrSpecskelter: I use class method : [lay (new edu.uci.ics.jung.algorithms.layout.ISOMLayout g)]
08:16mrSpecs/class/object/ g is graph
08:16mrSpecso I dont write anything mine
08:16mrSpecRaynes: ok I'll try
08:17skelterI'd try Raynes suggestion, see if a dep has changed. Has this call ever worked?
08:17mrSpecI've never used uberjar before :(
08:17mrSpecso dont know if it worked
08:17skelterIf it persists, pull apart the uberjar and ensure that the dependency jar is getting packaged with it.
08:18RaynesNote that you can view the internals of the jar file (and any jar file) by opening it up in Emacs.
08:18skelterreally? I never tried that
08:18RaynesYup.
08:18RaynesEmacs has it's own neat little mode for viewing zip files.
08:19RaynesJar files are just zip files with fancy extensions, so it works the same.
08:19mrSpecafter lein clean... problem has occured :(
08:19mrSpecok I'll look into jar file :)
08:19skelterI figured that. I didn't know it would open up zips either.
08:20skelterThen the question is how to fix it, or why is lein uberjar not picking up a dep. I'm not sure there. I'm new to all this.
08:20skelteryou might be able to limp by by adding your dependency jar
08:20mrSpecah one more idea
08:21mrSpecmaybe I have something wrong in my project's deps?
08:21mrSpecI'll paste it, sec
08:22skelterI wasn't going to suggest that until you checked your uberjar, but yeah. On the other hand, I'd expect the other steps to have problems, like lein repl . Perhaps not
08:22mrSpechttp://paste.lisp.org/display/118035
08:23mrSpecI use ver. 1.7.6 and 2.0.1
08:24RaynesYou're using two different versions of the same library?
08:24RaynesIn the same project?
08:24RaynesIf so, you've found your problem.
08:25skelterI agree. that is the most suspicious thing I see.
08:25mrSpecI think yes... but lein deps didnt want to download Jung2 version 2.0.1
08:26skelterdo you have a local nexus or artifactory?
08:26mrSpecso I downloaded 2.0.1 where I could, and 1.7.6 where I couldnt...
08:26skelteror could install them in your local .m2
08:26mrSpecskelter: could you tell me something more? I dont get it :/
08:27mrSpecI've used: http://mvnrepository.com/artifact/net.sf.jung
08:27skelterlein had a faq on how to do this.
08:28RaynesmrSpec: Did you try [net.sf.jung/jung2 "2.0.1"]
08:28RaynesIt looks like that is where it is located.
08:28Rayneshttp://stackoverflow.com/questions/3854719/what-is-a-maven-repository-url-for-jung2-java-graph-framework
08:29RaynesSee the accepted answer, wherein a link is included to the location of the library on maven central.
08:29mrSpecoo
08:29RaynesSo, it kind of has to work.
08:29skelterbonus!
08:29mrSpecI'm trying :D
08:29skelterso they changed the namespace of jung?
08:32RaynesWell, they changed the groupId apparently.
08:32RaynesI think that's what you meant though.
08:32skelteryes. apologies for the lack of imprecision. ;)
08:32skelterpre-coffee...pre-eggnog :)
08:33RaynesPsh! Coffee is for weaklings. I'm totally caffeine free and have been awake since 4:30AM.
08:35skelterLoL color me weak caffeine addict. I'm not even sure why I'm awake now.
08:35skelterAny luck mrSpec?
08:36Raynesivey: Good morning and merry Christmas. :>
08:37mrSpecskelter: running....
08:38mrSpecworks!
08:38mrSpecthanks! :D
08:38RaynesGreat!
08:38mrSpecI had just commented the line with jung/jung 1.7,2
08:38Raynes:)
08:39mrSpecas I've already had jung-graph-impl
08:39mrSpecused*
08:41mrSpeclisp.pl/projects/CrawlerClj-1.0.0-SNAPSHOT-standalone.jar
08:41mrSpectestuj! :D
08:42mrSpectzn uruchom xD
08:42mrSpecmozesz wpisac "% Mai 2010%"
08:42mrSpec:D
08:43mrSpecahh sorry
08:43mrSpecwrong window
12:00Raynes&(update-in {:a {:deeply {:nested ['structure 'with 'a 'vector 'inside]}}} [:a :deeply :nested] conj 'inside 'of 'it)
12:00sexpbot⟹ {:a {:deeply {:nested [structure with a vector inside inside of it]}}}
12:47Dodekhey, how does one usually specifies a multidimensional array in clojure? vector of vectors?
12:47Dodeki am actually interested in two-dimensional matrix.
12:59LauJensenv of v
13:01RaynesLauJensen: Afternoon.
13:03LauJensenRaynes: evening :)
13:04DodekLauJensen, ok, is there any more pleasant syntax than ((v 2) 3) ?
13:06LauJensenDodek: Not if you dont make one, I think
13:08Dodekso i need to learn how one writes the macros in clojure, i guess.
13:08LauJensenno no, macros are for evaluation control
13:09Dodeki was thinking of some sort of reader macro
13:09LauJensenYou cant implement reader macros w/o patch Clojure
13:10Dodekoh, that's a shame.
13:10dnolenDodek: or a really wise limitation, depending on your perspective.
13:11LauJensen,(letfn [(lookup [x y v] (-> (nth v x) (nth y)))] (lookup 1 1 [[1 2 3] [4 5 6] [7 8 9]]))
13:11clojurebot5
13:11Dodekdnolen, yeah, one could say that
13:12LauJensenoops thats wrong, but you get the idea
13:12Dodeki really like the fact that you can put a vector in a function place of a form, and the index next
13:12Dodeki find it sad that now i need to implement my own "aref"
13:13dnolen,(get-in [[1 2 3 4] [5 6 7 8] [9 10 11 12]] [2 3])
13:13clojurebot12
13:13LauJensenoh right, thanks dnolen
13:13Dodekseems i don't need to
15:11islonis this the right way to define a private var? (def ^:private home (System/getProperty "user.home"))
15:59qbgWhat is new #clojure?
17:30Rostam :)
21:14ag90Hello there.
23:01stabinHi all, performing first steps with clojure faced the following issue: after downloading clojure-1.2 and clojure-contrib-1.2 and running interpreter I cannot (use 'clojure.contrib.repl-utils) - http://pastebin.com/dQduYcWJ . Am I doing something wrong, or it is some inconsistensy with adding function in one place, but not removing where it should have been removed with 1.2 release?
23:28technomancystabin: that's just a warning. anyway, I think repl-utils is deprecated in 1.2; you shouldn't need it.
23:32stabintechnomancy: http://pastebin.com/5frEBxBL - well, agee, package imported actually, was confused since expected to get show into current namespace; BTW, you are saying it is deprecated - where should I get show from?
23:36technomancystabin: well I haven't used repl-utils, but from what I understand most of it is now automatically brought into repl sessions in 1.2
23:36technomancywhat are you looking for specifically?
23:37stabintechnomancy: show function; it is not available by default, unlike e.g. source
23:38technomancyoh, I see. I guess you want (use '[clojure.contrib.repl-utils :only [show]])
23:38technomancyunless you're using slime, in which case you want C-c S-i
23:38auserhm
23:39stabintechnomancy: o, thanks. sorry for stupid questions, just starting clojure)
23:39technomancysure... the namespace stuff is more confusing than it should be =\
23:54auserhm
23:54ausercan you not use a map in clojure-test?