2010-12-25
| 05:04 | fliebel | Good 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:06 | Lajla | fliebel, opdat de heer sterve! |
| 05:29 | fbru02 | morning all !! |
| 06:09 | Raynes | $seen cemerick |
| 06:09 | sexpbot | cemerick was last seen quitting 20 hours and 6 minutes ago. |
| 06:52 | GOSUB | is there any way to mimic a Java class with a bunch of fields in Clojure? Will cast help? |
| 06:52 | Raynes | Isn't the fact that proxy implicitly binds 'this' to a proxy instance against Rich's own opinions towards anaphora? |
| 06:54 | Raynes | I 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:11 | mrSpec | Morning! |
| 08:11 | skelter | (Merry Christmas) |
| 08:12 | Raynes | Ho ho ho. |
| 08:12 | skelter | (times 3 ho) |
| 08:12 | mrSpec | I 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:12 | mrSpec | Could you help me? under emacs all works fine |
| 08:13 | Raynes | &(apply str (repeat 3 "ho ")) |
| 08:13 | sexpbot | ⟹ "ho ho ho " |
| 08:14 | skelter | mrSpec, tell us more about your app. Is VisualizationViewer's constructor your own code or a dependency? |
| 08:14 | Raynes | mrSpec: 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:15 | Raynes | An old class that has recently changed but hasn't been updated can be the result of that. |
| 08:16 | Raynes | s/can be the result of that/can result in that/ |
| 08:16 | sexpbot | <Raynes> An old class that has recently changed but hasn't been updated can result in that. |
| 08:16 | mrSpec | skelter: I use class method : [lay (new edu.uci.ics.jung.algorithms.layout.ISOMLayout g)] |
| 08:16 | mrSpec | s/class/object/ g is graph |
| 08:16 | mrSpec | so I dont write anything mine |
| 08:16 | mrSpec | Raynes: ok I'll try |
| 08:17 | skelter | I'd try Raynes suggestion, see if a dep has changed. Has this call ever worked? |
| 08:17 | mrSpec | I've never used uberjar before :( |
| 08:17 | mrSpec | so dont know if it worked |
| 08:17 | skelter | If it persists, pull apart the uberjar and ensure that the dependency jar is getting packaged with it. |
| 08:18 | Raynes | Note that you can view the internals of the jar file (and any jar file) by opening it up in Emacs. |
| 08:18 | skelter | really? I never tried that |
| 08:18 | Raynes | Yup. |
| 08:18 | Raynes | Emacs has it's own neat little mode for viewing zip files. |
| 08:19 | Raynes | Jar files are just zip files with fancy extensions, so it works the same. |
| 08:19 | mrSpec | after lein clean... problem has occured :( |
| 08:19 | mrSpec | ok I'll look into jar file :) |
| 08:19 | skelter | I figured that. I didn't know it would open up zips either. |
| 08:20 | skelter | Then 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:20 | skelter | you might be able to limp by by adding your dependency jar |
| 08:20 | mrSpec | ah one more idea |
| 08:21 | mrSpec | maybe I have something wrong in my project's deps? |
| 08:21 | mrSpec | I'll paste it, sec |
| 08:22 | skelter | I 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:22 | mrSpec | http://paste.lisp.org/display/118035 |
| 08:23 | mrSpec | I use ver. 1.7.6 and 2.0.1 |
| 08:24 | Raynes | You're using two different versions of the same library? |
| 08:24 | Raynes | In the same project? |
| 08:24 | Raynes | If so, you've found your problem. |
| 08:25 | skelter | I agree. that is the most suspicious thing I see. |
| 08:25 | mrSpec | I think yes... but lein deps didnt want to download Jung2 version 2.0.1 |
| 08:26 | skelter | do you have a local nexus or artifactory? |
| 08:26 | mrSpec | so I downloaded 2.0.1 where I could, and 1.7.6 where I couldnt... |
| 08:26 | skelter | or could install them in your local .m2 |
| 08:26 | mrSpec | skelter: could you tell me something more? I dont get it :/ |
| 08:27 | mrSpec | I've used: http://mvnrepository.com/artifact/net.sf.jung |
| 08:27 | skelter | lein had a faq on how to do this. |
| 08:28 | Raynes | mrSpec: Did you try [net.sf.jung/jung2 "2.0.1"] |
| 08:28 | Raynes | It looks like that is where it is located. |
| 08:28 | Raynes | http://stackoverflow.com/questions/3854719/what-is-a-maven-repository-url-for-jung2-java-graph-framework |
| 08:29 | Raynes | See the accepted answer, wherein a link is included to the location of the library on maven central. |
| 08:29 | mrSpec | oo |
| 08:29 | Raynes | So, it kind of has to work. |
| 08:29 | skelter | bonus! |
| 08:29 | mrSpec | I'm trying :D |
| 08:29 | skelter | so they changed the namespace of jung? |
| 08:32 | Raynes | Well, they changed the groupId apparently. |
| 08:32 | Raynes | I think that's what you meant though. |
| 08:32 | skelter | yes. apologies for the lack of imprecision. ;) |
| 08:32 | skelter | pre-coffee...pre-eggnog :) |
| 08:33 | Raynes | Psh! Coffee is for weaklings. I'm totally caffeine free and have been awake since 4:30AM. |
| 08:35 | skelter | LoL color me weak caffeine addict. I'm not even sure why I'm awake now. |
| 08:35 | skelter | Any luck mrSpec? |
| 08:36 | Raynes | ivey: Good morning and merry Christmas. :> |
| 08:37 | mrSpec | skelter: running.... |
| 08:38 | mrSpec | works! |
| 08:38 | mrSpec | thanks! :D |
| 08:38 | Raynes | Great! |
| 08:38 | mrSpec | I had just commented the line with jung/jung 1.7,2 |
| 08:38 | Raynes | :) |
| 08:39 | mrSpec | as I've already had jung-graph-impl |
| 08:39 | mrSpec | used* |
| 08:41 | mrSpec | lisp.pl/projects/CrawlerClj-1.0.0-SNAPSHOT-standalone.jar |
| 08:41 | mrSpec | testuj! :D |
| 08:42 | mrSpec | tzn uruchom xD |
| 08:42 | mrSpec | mozesz wpisac "% Mai 2010%" |
| 08:42 | mrSpec | :D |
| 08:43 | mrSpec | ahh sorry |
| 08:43 | mrSpec | wrong window |
| 12:00 | Raynes | &(update-in {:a {:deeply {:nested ['structure 'with 'a 'vector 'inside]}}} [:a :deeply :nested] conj 'inside 'of 'it) |
| 12:00 | sexpbot | ⟹ {:a {:deeply {:nested [structure with a vector inside inside of it]}}} |
| 12:47 | Dodek | hey, how does one usually specifies a multidimensional array in clojure? vector of vectors? |
| 12:47 | Dodek | i am actually interested in two-dimensional matrix. |
| 12:59 | LauJensen | v of v |
| 13:01 | Raynes | LauJensen: Afternoon. |
| 13:03 | LauJensen | Raynes: evening :) |
| 13:04 | Dodek | LauJensen, ok, is there any more pleasant syntax than ((v 2) 3) ? |
| 13:06 | LauJensen | Dodek: Not if you dont make one, I think |
| 13:08 | Dodek | so i need to learn how one writes the macros in clojure, i guess. |
| 13:08 | LauJensen | no no, macros are for evaluation control |
| 13:09 | Dodek | i was thinking of some sort of reader macro |
| 13:09 | LauJensen | You cant implement reader macros w/o patch Clojure |
| 13:10 | Dodek | oh, that's a shame. |
| 13:10 | dnolen | Dodek: or a really wise limitation, depending on your perspective. |
| 13:11 | LauJensen | ,(letfn [(lookup [x y v] (-> (nth v x) (nth y)))] (lookup 1 1 [[1 2 3] [4 5 6] [7 8 9]])) |
| 13:11 | clojurebot | 5 |
| 13:11 | Dodek | dnolen, yeah, one could say that |
| 13:12 | LauJensen | oops thats wrong, but you get the idea |
| 13:12 | Dodek | i really like the fact that you can put a vector in a function place of a form, and the index next |
| 13:12 | Dodek | i find it sad that now i need to implement my own "aref" |
| 13:13 | dnolen | ,(get-in [[1 2 3 4] [5 6 7 8] [9 10 11 12]] [2 3]) |
| 13:13 | clojurebot | 12 |
| 13:13 | LauJensen | oh right, thanks dnolen |
| 13:13 | Dodek | seems i don't need to |
| 15:11 | islon | is this the right way to define a private var? (def ^:private home (System/getProperty "user.home")) |
| 15:59 | qbg | What is new #clojure? |
| 17:30 | Rostam | :) |
| 21:14 | ag90 | Hello there. |
| 23:01 | stabin | Hi 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:28 | technomancy | stabin: that's just a warning. anyway, I think repl-utils is deprecated in 1.2; you shouldn't need it. |
| 23:32 | stabin | technomancy: 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:36 | technomancy | stabin: 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:36 | technomancy | what are you looking for specifically? |
| 23:37 | stabin | technomancy: show function; it is not available by default, unlike e.g. source |
| 23:38 | technomancy | oh, I see. I guess you want (use '[clojure.contrib.repl-utils :only [show]]) |
| 23:38 | technomancy | unless you're using slime, in which case you want C-c S-i |
| 23:38 | auser | hm |
| 23:39 | stabin | technomancy: o, thanks. sorry for stupid questions, just starting clojure) |
| 23:39 | technomancy | sure... the namespace stuff is more confusing than it should be =\ |
| 23:54 | auser | hm |
| 23:54 | auser | can you not use a map in clojure-test? |