#clojure logs

2008-10-26

01:50larrytheliquidis there a return function statement to prematurely exit a function?
01:50Chousernope
01:50Chouserwriting some imperitive code?
01:51Chouseryou could wrap the remained of your function in a "when" or "when-not"
01:54larrytheliquidya no problems, just wanted to know
04:34viktorjesi tu?
04:34viktorjgracin: jesi tu?
04:35jgracinviktor: tu sam
04:35jgracinbok
04:35viktormoram ti poslat ne?to iz clojurea na ocjenu
04:35jgracinajde
04:35viktor(defmacro html-block [& keyword-block-names]
04:35viktor (map (fn [keyword-block-name] (let [block-name (name keyword-block-name)]
04:35viktor `(defn ~(symbol block-name) [& se#]
04:35viktor (reduce str (concat (list (tag ~keyword-block-name (first se#)))
04:35viktor (if (map? (first se#))
04:35viktor (rest se#)
04:35viktor se#)
04:35viktor (list (str "</" ~block-name ">"))))))) keyword-block-names))
04:35viktor(defn tag [tag-name attrs]
04:35viktor (str "<" (name tag-name)
04:35viktor (if (map? attrs)
04:35viktor (reduce str
04:35viktor (map (fn [x] (str " " (name (first x)) "=" "\"" (second x) "\""))
04:35viktor attrs ))
04:35viktor )">"))
04:35viktor(html-block :html :table :p :td :tr)
04:36viktor(html {:id "12"} (p "jedan paragraf") (table {:class "test"} (tr (td "trva kolona")
04:36viktor (td "druga kolona"))
04:36viktor (tr "drugi red prva kolona")))
04:36viktorevo al nisam prepisivao
04:36kotarakIma paste.lisp.org
04:36viktorza konverziju s-expova u html divim se sam sebi na ovom macrou
04:36jgracinoops! sorry guys, wrong channel!
04:36jgracinviktor: see you in private channel
06:27StartsWithKlisppaste8: help
06:27lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
06:31lisppaste8StartsWithK pasted "Can't call function on macro argument." at http://paste.lisp.org/display/69229
06:32StartsWithKcan anyoune explain to me how i can call a function on macro argument in this context?
07:22StartsWithKrhickey: could you please take a look ate http://paste.lisp.org/new/clojure and tell me why is that line of code not working and is it even posible to do something like that
07:22StartsWithK(ah ~@args -> ~@a) ..
07:39pjb3Paul Graham: "I don't know anything about Clojure." http://tinyurl.com/59frqr
07:40rhickeypjb3: I saw that, I guess it's good. He's been making some general statements about languages and at least I know now he's not talking about Clojure :)
07:41pjb3rhickey: Seems like kind of an arrogant position to me
07:41pjb3Given the buzz that Clojure is generating, if I were writing a Lisp, I would at least take a look
07:41pjb3rhickey: Have you looked at arc? Just to see what he's doing?
07:42rhickeyHe's got his own priorities
07:45rhickeyI was at his original Arc at 3 weeks talk at the Lightweight Languages Workshop at MIT. I didn't get it then and I don't now. Few things that seemed important to him did to me, and apparently vice-versa, other than we both thought cond and let had too many parens.
07:45rhickeyThat's not to say he's wrong, just that Arc is about different ideas than Clojure
07:46rhickeyI find it difficult to read arc code
07:47pjb3sure, and if Paul were to say "I saw Rich's talk about Clojure and I just don't get it, it has different idea" that would be one thing
07:47pjb3but to pretend like it doesn't exist, I don't know, I guess like you said, he's got his own priorities
07:50rhickeyI'm a bit of a languages geek, which may come out in Clojure, but I don't know that that is a prerequisite for being a language designer
07:52pjb3Also, you devoted an incredible amount of time and effort to building a strong community around Clojure, which I think is vital for the success of a language
07:53pjb3Paul seems to either not get that or not care: http://www.arclanguage.org/item?id=8462
07:53rhickeyI'm not offended though - Clojure is doing fine, and I'm more concerned about the people who are interested in it than those who are not
07:54pjb3Well for me personally, I really enjoyed the essays that Paul has written and they are what got me to consider lisp in the first place
07:55pjb3then I saw Clojure and I was like, bam, that's it, that's how Lisp should be
07:55rhickeyagreed, his books and essays were inspirational for me too
07:56pjb3It would be cool to have him as an advocate of Clojure, but it doesn't appear that will happen
07:56pjb3but like you said, Clojure is doing fine anyway, so no big deal
07:59rhickeyI think it's important that both Clojure and Arc exist, they cover different spaces, and I'd hate for people to have ignored Clojure while still waiting for Arc. Now both are released and they can make an informed choice.
08:00pjb3What space does Arc cover?
08:02rhickeyI'd hate to mischaracterize it, but I would say "Lisp from first principles", and effort to find the true atoms underlying Lisp, coupled with a brevity aesthetic
08:04rhickeyWhereas in Clojure I care much more about the abstractions - if some of them are implemented in Java for perf/interop reasons I don't care
08:05pjb3Ah, I see
08:07rhickeyFunctional programming and immutability is important for Clojure, interop with the outside world, commercial developer's concerns, concurrency etc
08:08rhickeyI still need to write software to make a living - if I want to do that in Clojure it a) needs to be practical, and b) needs to be popular
08:09rhickeyPlus I have high hopes for the community making Clojure something I could never achieve myself
08:09pjb3a) check, b) getting there
08:10pjb3I see something like this pretty much every day on twitter: http://twitter.com/offbytwo/statuses/975397542
08:12pjb3and by "something like this" I mean a positive endorsement for Clojure
08:12pjb3not necessarily a negative on arc
08:13pjb3I like your attitude though, it doesn't have to be an arc v. clojure thing
08:14rhickeyExactly - everyone should do what they want
08:14kotarakhealthy attitude
08:14pjb3that happens with ruby v. python way to much, but I suppose it's just human nature
08:15rhickeyI'm very happy that the Clojure community is such a positive one
08:41kotarakHow can one specify hierarchy to use in multimethod dispatch?
08:42rhickeykotarak: dispatch uses isa? internally, you can use hierarchical types, attributes, metadata etc
08:43kotarakI mean: I can do (isa? some-hierarchy ....). Can I do this also with defmulti?
08:44rhickeydefmulti will compare dispatch values using isa?, so you can use any dispatch function that returns a hierarchical value from any aspect of the argument(s)
08:46kotarakok.
08:51pjb3rhickey: What date is considered clojure's "birthday"?
08:53lisppaste8rhickey pasted "simple isa dispatch" at http://paste.lisp.org/display/69232
08:53rhickeypjb3: October 16
08:54pjb3rhickey: 2007 I assume? And what happened then? I'm just looking through the SVN logs, seeing it's actually older than that
08:55rhickeypjb3: Oct 16 2007 was the 'release' date, when I first told people it existed, I worked on it for a couple of years before that
08:56kotarakrhickey: yes. that part I understand, but one can also have different hierarchies. Let's say, I do (derive :foo :bar) and someone else (derive :bar :foo). I think such conflicts are solved by using one own's hierarchy, no? How can I tell the isa?, which hierarchy to use?
08:56kotarak(I mean the isa? used in the dispatch)
08:56pjb3rhickey: Where did you announce it?
08:58rhickeyyou'll note in the example I posted I use ::Rect, that resolves to a namespace-qualified keyword, so ::Rect in one ns is different from ::Rect in another
08:58kotarakAh! Similar to `symbol!
08:58rhickeypjb3: on my mailing lists for jFli and Foil
08:59rhickeykotarak: and derive requires ns-qualified keywords or symbols, just so that people won't have conflicts
08:59kotarakOk. Understand now.
09:00kotarakrhickey: thanks for pointing out :: You have to announce such goodies somewhere.
09:01pjb3So there it is: http://tinyurl.com/birth-of-clojure
09:01arbschtrhickey: is Foil still maintained?
09:02pjb3rhickey: Oct 17 2009 is a Saturday, what do you say we plan the first annual ClojureConf in NYC for that day :)
09:03rhickeyarbscht: I've never had any bug reports, probably due to non-use. I don't actively work on it.
09:03arbschtok
09:03rhickeypjb3: sounds promising, there are a lot of users now but pretty widely dispersed. NYC should be accessible to many.
09:08pjb3(def clojure-conf {:date "2009-10-07" :location "NYC"})
09:08kotarakWhen I just have a run asking obvious question... How do I round a double?
09:08pjb3Unfortunately it's immutable, so the date cannot be changed and no details can be added :)
09:18Fandakotarka: use Math/round
09:19Fandahttp://java.sun.com/javase/6/docs/api/java/lang/Math.html
09:20kotarakFanda: In java one has to look in the most abstruse places. I would have expected something like this in Double.... thanks
09:21Fandakotarak: Yes, I was looking for it there too, but no luck :-)
09:21Fandasearch for "round double java" worked :-)
09:22Fandahttp://www.rgagnon.com/javadetails/java-0016.html
09:25Fanda--- what is the syntax and use of a macro #= ?
09:25Fandasome time ago we talked about #+ and #- ;-)
09:30Fandaplease, could you give few examples of use of #= ? thanks!
09:47kotarakFanda: I think #= evaluates the following as expression and uses the result. #=(+ 1 2) => 3, #=(java.lang.String.) => ""
09:48Fanda_kotarak: I see. Evaluation at reader time.
09:49kotarakYes. But I'm not sure about the exact semantics.
09:49Fanda_I wonder if it can return nothing - not even nil
10:27rhickeypjb3: I should have saw "I saw his Arc at 3 weeks" presentation from LL1, I wasn't there for that one
10:45Lau_of_DKGreetings gentlemen
11:10lisppaste8duck1123 pasted "trouble concat-ing values" at http://paste.lisp.org/display/69239
11:11duck1123should I be using concat to put together a string and the value from a struct?
11:12rhickeywhat's the value in the struct?
11:12duck1123"44"
11:12rhickeythe string "44"?
11:12duck1123{:id "44" :name "Dan"}
11:13duck1123I tried using the number, but was getting an error
11:13rhickeyuser=> (concat "foo" "44")
11:13rhickey(\f \o \o \4 \4)
11:13rhickeyuser=> (apply str (concat "foo" "44"))
11:13rhickey"foo44"
11:13duck1123I'd prefer it to be an int
11:14rhickeyuser=> (str "foo" (str 44))
11:14rhickey"foo44"
11:14duck1123ok, (appy str ) did it, thanks
11:14duck1123I kept getting, clojure.lang.LazyCons@878e636d
11:44StartsWithKsorry to repeat my question, but can someone tell me why is this not working and how should i write the line in question - http://pastebin.com/d5cab853f
12:03fholmstromIs there any book on clojure out yet?
12:04Lau_of_DKI think l_a_m was working on one such fholmstrom, I dont know if its finished though
12:05fholmstromI really want to learn clojure, kind of got hooked on the whole FP thingie - but I can't find any good resources for clojure and it feels counter intuative to learn Common Lisp or Scheme when I really want to be doing Coljure
12:05fholmstrom*clojure
12:06hoeckStartsWithK: its possible using java reflection, unfortunately, i can't find the snipped rich pasted to the group or somewhere in this channel right now
12:07gnuvince_fholmstrom: no book yet, you'll need to go with the documentation on the website and the wikibook.
12:08Lau_of_DKfholmstrom, are you familiar with the Euler project ?
12:09fholmstromLau_of_DK: Never heard of it
12:09hoeckStartsWithK: or you wrap your methods in an anonymous fn with memfn
12:09rhickeyhoeck: http://paste.lisp.org/display/67182
12:10Lau_of_DKfholmstrom, on www.projecteuler.net you will find some 200 mathematical problems of varying difficulity, on clojure-euler.wikispaces.com you'll find many solutions to these written in Clojure, the sum of these will show you alot of Clojure, it can be a good starter I think
12:10gnuvince_fholmstrom: project euler is a bunch of small problems that can help learn a language
12:10StartsWithKhoeck: my problem is ~gx expands to something like G__3472 and not object itself
12:11StartsWithKso when i check for object type its clojure.lang.Symbol
12:13hoeckrhickey: thanks, that was it
12:18Lau_of_DKEveryone who has some experience with Qt/Clojure, please raise your hand
12:18Lau_of_DK_o/
12:18hoeckStartsWithK: but the G__3472 is previously bound in a let to java.lang.JFrame, so (class G__3472) evals to java.lang.JFrame
12:22fholmstromthis
12:22fholmstromand by this i mean clojure
12:22fholmstromit makes me all happy and fluffy inside
12:22Lau_of_DKthats a common side-effect :)
12:22fholmstromit's so beautifull, what have I been doing all these frekin years?
12:23fholmstromand i suspect i only grasp 25% or so of it yet, Im still waiting for that eureka/epiphany moment
12:40kotarakHow can I identify whether some x is a function as returned by fn? fn? checks on IFn, but then we also get maps, etc...
12:43StartsWithK(fn? {}) is true
12:44kotarakyes, since {} implements IFn
12:44StartsWithKand you would like to exclude maps and sets from that check?
12:45kotarakYes.
12:45kotarakOnly fn's.
12:46StartsWithK(and (fn? x) (not (or (map? x) (set? x))))
12:46StartsWithKsomething like that?
12:46kotarakHmm... That could be. Maybe also (instance? AFn x)? Have to check the inheritance tree.
12:46StartsWithKi quess (vector? x) should go in there too
12:47kotarakand keyword?
12:47StartsWithKyes, and keywords
12:49StartsWithKi have this snippet to check is something callable,
12:49StartsWithKhttp://pastebin.com/f7ad9ee14
12:49StartsWithKso if something is fn? i think you should also check is it a special form
12:49kotarakNo. Checking AFn doesn't, I'll probably have to go with the monster check excluding everything else.
12:50kotarakGeez.
12:59rhickeykotarak: why do you want to do that?
13:00fholmstromis there any web effort in the clojure community ?
13:02StartsWithKfholmstrom: http://github.com/weavejester/compojure/tree/master
13:02rhickeyhttp://groups.google.com/group/compojure
13:03rhickeynot to negate any others, Compojure seems to have the most traction at present
13:03kotarakrhickey: man, you sure ask the right questions.... While explaining I notice, that I don't have to check this.
13:05kotarakrhickey: I'm working on the proposed ClojureCheck. I thought combined generators would a fn, but since we use multimethods, one simply defines a new method.... So no need to check.
13:07gnuvince_ClojureCheck as in port of QuickCheck to Clojure?
13:07kotarakyes
13:07gnuvince_*thumbs up*
13:07kotarakWas suggested by Stuart on the list. Since it was in my todo list for quite some time now, I volunteered to look into it.
13:08kotarakI'm just writing an email with the proposed API with a request for comments.
13:17Lau_of_DKI have a question I would like you guys' input on before we do anything. A couple of us have considered making a substitute for Vim/Emacs built on and for Clojure coding. It would be an up-2-date version of emacs, with special features for Clojure specifically and customizeable UI, and it would sport hotkeys and layouts from both Vim/Emacs. Thats the thoughts that are up right now. I would like to hear all views FOR and especially against such a venture.
13:19albinoLau_of_DK: Like Readylisp or Lispbox but for clojure?
13:20Lau_of_DKI am not familiar with any of those, my experiences go as far as VIm/Chimp and Emacs/Swank
13:21albinoLau_of_DK: ReadyLisp -> http://www.newartisans.com/software/readylisp.html
13:21albinoHe basically bundles a lisp with emacs
13:22Lau_of_DKThen no, its a bit more ambitious than that, it would be building an editor from scratch, completely customized to have an interactive development environment for Clojure coding
13:23kotarakSomething more like Lispworks probably
13:23Lau_of_DKIve seen Lispworks, and its more in that direction, yes
13:23Chouserif it's not sufficiently flexible and powerful enough to use for all my text editing, I don't think I'd be interested.
13:24Lau_of_DKBut if you could use all your keyboard-bindings from Vim, wouldnt that basically be all you need ?
13:25kotarakA vim style editor really scriptable (I mean *really* scriptable) with Clojure.... That would be nice.
13:26Chouserkotarak: that's what I dream of.
13:26kotarakLau_of_DK: syntax highlighting, indenting etc. Vim and Emacs do that for hundreds of languages.... Lot of work...
13:26Lau_of_DKThis would be strictly Clojure in that regard
13:27kotarakNo. That's bad. It should Clojure to begin with, but it should be easily extendable as Vim or Emacs.
13:27Chouseroh, no, I still need to edit C++, JavaScript, HTML, etc. I'm not going to keep switching between text editors depending on the type of file I'm editing.
13:27kotarakI'm a bit more megalomanic and think about "replacement". ;)
13:27rhickeyLau_of_DK: I'd wonder why it wouldn't pay to contribute to enclojure
13:28ChouserI hope this isn't taken to be divisive (that's not my point!) and it may change at some point, but right now it's pretty hard to contribute to enclojure.
13:28Lau_of_DKrhickey, It might, I'm not updated on their progress. But to me the leanness of emacs is very appealing compared to a Netbeans/Enclojure environment. Produtivity really is the key issue
13:29rhickeyChouser: I understand, I don't think that's a long-term problem though
13:30ChouserI hope that's true. I do have great hopes for enclojure, but have given up on it for a few months. I'll have to take a look again.
13:30kotarakCan it do editing vi style?
13:30Chouserkotarak: there's a plugin for netbeans that does a pretty stand-up job.
13:30rhickeyI'd hope that many of the big useful features, to be written in Clojure, wouldn't be trapped in any one editor or IDE
13:30kotarakIt's not a killer argument, but I''m so terribly used to it....
13:30Chouserit's called jvi
13:31kotarakHmmm... Maybe I have to have a look.
13:31ChouserI wrote a patch early on to get jvi to work properly with enclojure's repl. It wasn't included for a long time, and I sorta lost interest. I dunno if jvi works out of the box now or not.
13:32rhickeypprint, completion engines, who-calls, namespace browsers etc
13:32Lau_of_DKrhickey, you work out of Aquamacs right ?
13:32rhickeyChouser: I know the enclojure team, they are swamped until after the election
13:34rhickeyLau_of_DK: for now yes, although I am an embarrassingly bad emacs user
13:34Lau_of_DKrhickey, okay, what is your primary reason for choosing Aqua instead of Enclojure?
13:35rhickeyI really hate ctrl-this ctrl-that combos, and haven't bothered to remap many things
13:35Lau_of_DKok
13:35kotarakI tried Aquamacs a few weeks ago. But it's really hard to get going, when you actually want to concentrate on something else. Maybe I have to allocate some dedicated time.
13:36kotarakThese things (emacs, eclipse, netbeans, ..) are so huge....
13:36Lau_of_DKI suppose I do see great benefits in completeing Enclojure instead of undertaking a new venture, as it has great possibilities. But Im not sure if I have the patience to go that way.
13:43Chouserthe election!?
13:44kotarakIs it bad style to define a multimethod for an actual value? (def x (fn [] :xxx)) (defmethod foo x [_] (x))
13:48Lau_of_DKDoes anybody know who this guy 'jamii' is, who does these lisp-pastes on Qt/Clojure?
13:51rhickeyChouser: http://thortech-solutions.com/
13:55Chouserhm, interesting.
14:02PupenoHello.
14:04ChouserHi.
14:05PupenoDo you know a smart way to have the dependency jars in the classpaths when working with Maven when you run the REPL?
14:10akopa I wonder if it would be possible/worthwhile to port slime to JEmacs http://jemacs.sourceforge.net/?
14:12PupenoIt seems the only way would be to manually set the classpath before running Slime, but I'm not sure how to do it other than running emacs from a console, which I dislike...
14:12kotarakakopa: Update (2005-10-19)! Hmmm... Is it still alive?
14:12akopaOr have clojure as an extension language for JEmacs?
14:13akopakotarak: it's still alive in the kawa distribution, which is also still alive.
14:19Lau_of_DKSomebody once showed me a nice little .sh script, which looped all my .jars adding them to the -cp arg, anybody got that lying around ?
14:21PupenoArgh, even appassembler adds them one per directory.
14:23PupenoSo, am I the only one using Maven to write Clojure apps?
14:52Lau_of_DKSomebody once showed me a nice little .sh script, which looped all my .jars adding them to the -cp arg, anybody got that lying around ?
14:59Lau_of_DKhttp://github.com/jochu/clojure-extra/tree/master/sh-script/clojure
14:59Lau_of_DKIts here if anybody else wants it
14:59PupenoLau_of_DK: I have something that can do that in a Maven project, it's still a pain to get it to Clojure.
15:00Lau_of_DKok :) Im blank on Maven, only ever used it to compile the Clojure source
15:00Lau_of_DKAre you working out of Enclojure ?
15:00PupenoIt seems it's painful to work in Lisp even when it's something like Clojure :(
15:00PupenoLau_of_DK: no, Emacs + Slime.
15:00Lau_of_DKk
15:01PupenoLau_of_DK: you are using Enclojure?
15:01Lau_of_DKNo, I tried it back when I first got into Clojure some 4 months ago, had trouble, got no help from the team, dropped it again :)
15:01PupenoLau_of_DK: what then?
15:03Lau_of_DKEmacs
15:04PupenoLau_of_DK: slime or inferior-lisp?
15:04Lau_of_DKinferior-lisp
15:05PupenoLau_of_DK: how do you manage your dependencies/classpath?
15:05Lau_of_DKI'm trying that script that I just linked now
15:07PupenoLau_of_DK: and you set that script as inferior-lisp?
15:07Lau_of_DKyes
15:07PupenoLau_of_DK: and you download your jars manually, and place them manually in some directory and update them manually when you manually found that there are updates? (sorry :P)
15:09Lau_of_DKYes sir - What is the alternative ?
15:11PupenoLau_of_DK: well, with Maven you define your dependencies and it downloads it automatically. The only problem is that they are not in one dir. I've found a way to get a text file with the needed classpath and I'm now trying to see how to get it easily into Emacs environment.
15:11achim_pPupeno: http://www.bitbucket.org/achimpassen/clojure-ties/wiki/Home - i haven't worked on this for quite a while ...
15:12achim_pPupeno: i'd be glad to know if it works for you, but note it's in a *very* early stage of development and completely undocumented :)
15:13Pupenolisppaste8: url
15:13lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
15:14lisppaste8Pupeno pasted "CLASSPATH in my Clojure" at http://paste.lisp.org/display/69257
15:17PupenoOk, it seems there's a huge impedance missmatch with Slime being global and a project containing a set of dependencies...
15:20Pupenoachim_p: it looks interesting. I really don't know what the proper solution is though.
15:20PupenoIt would be nice to have something simple.
15:20Pupenoto use I mean.
15:21achim_pmy idea was to use maven for jars + dependencies + retrieval , but get rid of xml config files
15:21achim_pthey're too bulky for smaller scripting-like things, in my opinion
15:22Pupenoachim_p: agreed.
15:22PupenoWhy can't it be like Python, you just import and that's it...
15:25achim_pi like the idea of PLT scheme's planet - you can do a (require (planet "library")) and everything is taken care of, including downloading the lib. this is what "ties" tries to do for maven-coordinates
15:25PupenoChouser: don't hide!
15:26Pupenoachim_p: I actually prefer to leave installing to my package system, and program should just pick stuff from where it is installed. All this automatic installing is messy.
15:27ChouserPupeno: when I once suggested Java's hanlding of .jars was poor compared to Python's handling of modules, I got a dressing down. Apparently Java's way of doing it is very good, I just don't understand the deficiencies of Pyton's system.
15:28PupenoChouser: I see. Well, don't see what java does except let you solve the problem by yourself.
15:28ChouserSince there is more that I don't know than there is that I know, and because I respect the other opinions of the person telling me this, I'm resolved to avoid the issue.
15:29achim_pPupeno: where does your package system install jars? is there some cross-platform default for this?
15:30Pupenoachim_p: I actually don't know, and it seems that's messy as well, with many jars there not being "discoverable". It doesn't have to be cross-platform.
15:31PupenoI think the problem here is that the REPL is not run in a project-contextual way, because Emacs doesn't have 'projects'. This is something an IDE like NetBeans *solves*.
15:33rhickeyChouser: one thing missing from that conversation was -Djava.ext.dirs, which I wasn't aware of being generally available at the time, which gives you a 'drop your jars here' solution without lots of manual classpath junk
15:33PupenoThe idea that every project has a set of dependencies and that those are defined manually somewhere and that it cannot pick them from a global location doesn't work with the idea of a global REPL at all. You either have global libraries and global REPL or you have per-project libraries and per-project REPL. I don't think Emacs can do per-project REPL.
15:35Pupenorhickey: can you tell us how do you deal with this? do you use Maven for Clojure projects? or what do you do?
15:37rhickeyI put global libs in my system ext dir, others on command-line classpath. I really don't have the problem you are wrestling with at all in my work
15:37rhickeyI find maven and ant and all that XML complexity baffling and unnecessary
15:38tWipI think the idea behind Maven is actually quite ok... it's just a "plugin execution" framework and dependency manager
15:39tWipthe XML stuff (as always) just takes it to a whole new level of complexity
15:43tWipthe maven pom xml files are something like cross between configuration file and a serialized format of the whole project model
15:44sohailrhickey, THANK YOU
15:44PupenoI'm ok with both ways of working, but I always fail to mix them. I think this same thing drove me away from Common Lisp and Scheme.
15:44sohailI just got started witht his maven thing
15:44sohailso complicated
15:45sohailgood to know a Java pro thinks so too ;-)
15:46rhickeyI'm not arguing against those tools, but rather for doing the simplest thing that works
15:46sohailsure. getting started with clojure was easy as pie though :-)
15:47Pupenonow if I could force a lookandfeel into Netbeans, I would use it and that's it.
15:49jgracinPupeno: I use maven-dependency plugin to collect the dependencies for me.
15:50lisppaste8jgracin pasted "Maven deps" at http://paste.lisp.org/display/69260
15:50jgracinand then I have a start.sh script in which I put: export CLASSPATH="$TOPDIR/target/dependencies/*"
15:51Pupenojgracin: and how do you get that to be picked up by Clojure inside Smile?
15:51PupenoSlime I mean.
15:52jgracin(setq swank-clojure-binary "~/src/project/start.sh") and in start.sh
15:52jgracinI start, there's the classpath setting
15:52sohailPupeno, I do (setq swank-clojure-extra-classpaths (directory-files "/path/to/deps" t ".*.jar"))
15:52Pupenommhh... that might work... I'll give it a try after dinner.
15:52PupenoThanks.
15:54arohnernamespaces don't support doc strings yet, do they?
15:54rhickeyarohner: no metadata on namespaces yet
15:55arohnerI was just starting a module, writing comments at the top and thought "hey, this should be in :doc metadata"
15:56jgracinI highly recommend Maven. The most useful feature for me is that it collects all dependencies in one place. I just declare what libraries I need, and Maven fetches them (with caching, of course).
15:57arohnerhas anyone tried ties?
15:57arohnerhttp://www.bitbucket.org/achimpassen/clojure-ties/src/
16:00PupenoThank you all for putting up with me and your recommendations, I'll try to put it all together and post a continuation to my "How to create a Clojure application" (http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/).
16:00lisppaste8Lau_of_DK pasted "Mimic me!" at http://paste.lisp.org/display/69262
16:00Pupenobah, wrong url.
16:01Lau_of_DKGentlement, Ive got all the jars loaded and a Qt Repl running in my normal Repl, how do I mimic this simple code ? Please annote if you can answer this question
16:04PupenoLau_of_DK: is there a Qt Clojure wrapper or you are just trying to replicate that Java code?
16:05jgracinrhickey: any chance you could share with us your thoughts on functional-relational programming? I'm beginning to understand that I don't really need OO system to get all the benefits
16:05jgracinof classical OO languages. However, being used to ORM, I don't have a clear picture of how to substitute it functional approach.
16:05Lau_of_DKPupeno, not sure I understand the question?
16:06PupenoLau_of_DK: I've used Qt only in C++, I understand you are using some Java bindings, right?
16:06ChousukeLau_of_DK: doesn't directly translating that java code work?
16:06Lau_of_DKIm using QtJambi for the bindings
16:06Lau_of_DKChousuke, I dont know, I wasnt able to do it
16:07Chousukeyou said you have a qt-repl?
16:07jgracinrhickey: I've read Out of the Tar Pit, but it's leaves the details out.
16:07Lau_of_DKChousuke, oh youre right
16:07Lau_of_DKDirect translation works
16:08Lau_of_DK*shame on me*
16:08Lau_of_DKNo mystery here gents
16:08rhickeyjgracin: the basic idea is to use uniform generic data structures (like Clojure's) for the 'information' in your application
16:08rhickeyTar pit suggests a relational model for interacting with that data - you can do some of that with clojure.set
16:08lisppaste8Pupeno annotated #69262 with "What about this?" at http://paste.lisp.org/display/69262#1
16:08PupenoOh, too late.
16:09rhickeyBut I think the relational model is a bit awkward for application logic, and hae been looking into integrating Datalog
16:09rhickeywhich is more Prolog-like, supports recursion, and could be directly bound to Clojure data
16:10arohnerrhickey: that would be awesome. I've been thinking similar ideas
16:11jgracinI've checked IRIS and Datalog, but what I don't understand is how Datalog is backed by DB. I'm probably confused with AllegroCache and its use of Prolog. Is that what you have in mind with Datalog?
16:14rhickeyjgracin: oh, to/from db could be anything, no I'm talking about in-memory data manipulation
16:15rhickeyI personally am fine with interacting w SQL w/o an intervening layer
16:16rhickeybut you could probably use metadata to preserve a relationship between data in memory and its source in the db
16:17Lau_of_DKPupeno, thanks for the annnotation :)
16:18jgracinrhickey: much clearer now, thanks.
16:19chmuis swank/start-server the correct function to use if you want to start the swank-server manually outside of emacs?
16:45arohnersigh. I get ties all set up, only to find out that the project I want to use isn't listen in the centeral maven repo, and ties doesn't support not-default repos yet
17:13arohnerachim_p: I tried out ties. it looks pretty cool
17:15achim_parohner: cool - you got it running? i never tried it on anything but my own system. it's more of an idea by now, probably not really useful. any feedback appreciated!
17:16arohnerI did run into one error:
17:16arohner[ties] Error: java.lang.RuntimeException: java.net.MalformedURLException: no protocol: /Users/arohner/.clojure-ties/poms/commons-attributes-api-2.2.pom
17:16arohnerit looks like the xml/parse was complaining that the file path didn't start with a file://
17:17arohnerin maven/deps
17:19arohnerafter hacking transport to return file:// on the transfer file name, it worked fine
17:21arohnerI was surprised at how hard it is to find maven sources for some projects. I expected it to be more widespread
17:21achim_pokay, thanks! i'll fix that ... real soon :)
17:22achim_pcan't do coding for the next two weeks, exams coming up. after that, i'll have lots of time
17:26achim_parohner: if there are any bugs/features you'd like to see, please feel free to add them to the wiki page or create an 'issue' for them
17:28arohnersure
17:35akopaIs this channel archived anywhere public?
17:36arohnerakopa: http://clojure-log.n01se.net/date/
17:36akopaarohner: Thanks.
22:31arohnerman, the more time I spend it Java, the more I'm glad I didn't waste my time on it previously
22:52arohnerin slime, is there a way to show the cause of an exception?
22:52arohnerwhen one exception wraps another?
22:54arohneroh, apparently I have an old slime