#clojure logs

2010-01-07

00:07mebaran151maven is my new best friend
00:11replaca_mebaran151: but have you read: http://kent.spillner.org/blog/work/2009/11/14/java-build-tools.html ?
00:13mebaran151replaca_, oh yeah, I hate pom.xml's, but lein makes maven positively beautiful
00:20mebaran151I'm actually scared of anything that references archetypes in all due seriousness
00:23mebaran151has anyone here ever used jbuildr for build files
00:23mebaran151when I played with scala it was a passable a build tool
00:26JonSmitharchetypes?
00:26JonSmithi'm not familiar with those
00:28replaca_mebaran151: no, I've never used that. I do enjoy leiningen, but I think it's going to have to grow in flexibility
00:29JonSmithwhy you smashing compojure?
00:29hiredmanbecause it uses that stupid immigrate macro
00:29hiredmanand a single segment namespace
00:29hiredmanand FileUpload
00:29hiredman(FileUpload is not allowed into appengine)
00:30JonSmithoo
00:30hiredmanI fixed it, but now I need to figure out how to get a pom and upload to clojars
00:30hiredmanI wonder if I can recover the pom.xml from someone else's compojure jar
00:31JonSmithprobably
00:31hiredman
00:31hiredmanI was hoping for "Yes! here's how …"
00:31mebaran151hiredman, you could use lein?
00:31mebaran151the lein file just has all the dependencies
00:31JonSmithhttp://bitbucket.org/jimdowning/hello-mvn-clj/src/tip/pom.xml
00:31JonSmithi googled you one
00:32JonSmithdon't ask me how it works
00:32mebaran151*pom.xml
00:32JonSmithhttp://jimdowning.wordpress.com/2009/07/30/compojure-maven/
00:32JonSmiththat too
00:33hiredmanmebaran151: the compojure project predates lein
00:33mebaran151nah I know
00:33mebaran151but if you know the deps
00:33mebaran151usually building the pom is pretty easy
00:33JonSmithhmm wait
00:33mebaran151the pom.xml lein pom builds is actually just the dependency stanzas
00:33JonSmithwhat i googled is not useful
00:33JonSmithoh well
00:34mebaran151http://github.com/ozzilee/compojure/blob/maven/pom.xml
00:34mebaran151this should probably do it
00:35hiredmanahah
00:35mebaran151that's all the deps you need
00:35hiredmanthe poms are stored in the local maven repo
00:35hiredmanI am not looking for deps
00:36hiredmanI am just trying to publish the jar to clojars
00:36hiredman^-
00:36mebaran151does clojars use the pom.xml for anything?
00:36mebaran151*else
00:36hiredmanclojurebot: thanks
00:36clojurebotPardon?
00:36mebaran151I thought it just used it for the dependency checking
00:37mebaran151I didn't think lein and clojars it built used maven directly to run the compile cycle
00:37hiredmanI am not trying to build compojure
00:37hiredmanI just want a copy in the repo that isn't brain dead
00:49replaca_~seen technomancy
00:49clojurebottechnomancy was last seen quiting IRC, 228 minutes ago
00:49replaca_I'd love to write a plugin for his program, but it makes me want to set my hair on fire
00:59hiredmanreplaca_: :P
01:01replaca_hiredman: everything that's supposed to make your life easier seems to make it harder in some way. I copied the lein-swank plugin, but the :use is giving me " java.lang.IllegalAccessError: eval-in-project is not public (autodoc.clj:1)"
01:01replaca_:-(
01:02hiredmaneval-in-project must not be public then
01:02hiredman
01:02replaca_if only it were that simple!
01:03replaca_"(defn eval-in-project ...)"
01:03replaca_lein-swank uses the same :use and compiles fine
01:05hiredmanare you sure the version of lein you are using matches the tree you are looking at?
01:05replaca_the history says it's never been private
01:06replaca_but that's where I fell into the well - I couldn't get leiningen to build/install/use from source
01:06replaca_but it should be ok cause I copied from lein-swank and that compiles fine in my world
01:07replaca_(and runs too)
01:08hiredmanhmmm
01:08hiredmando you really need evl-in-project?
01:08hiredman(evil) eval
01:08replaca_well, that's kind of the point of the plugin
01:08hiredmaneh?
01:08replaca_(as it is with many plugins in leiningen, I would think)
01:09replaca_well, it's loading code in the project which means it needs the projects classpath, etc.
01:09hiredmanI see
01:09replaca_that *seems* to be leiningen's mechanism for doing that
01:11replaca_it's not exactly doing an eval underneath, it's much scarier: it's consing up an ant job that executes clojure -e with your code.
01:12hiredmanyeah
01:13replaca_autodoc uses ant, too, so maybe the problem is there (though I can't see why it would be)
01:17hiredmanreplaca_:where does the exception popup? I can :usr and :only eval-in-project just fine
01:18hiredmanworks for me :(
01:27replaca_argh! It just needed a "lein clean"!
02:15replacaindeed it is, but not *quite* ready for prime-time. RSN, though!
02:16replacahiredman: you here?
02:16hiredmanyessir
02:16replacahow do you get the info from clojars? is there an api/webhook?
02:17hiredmanscreenscrape
02:17hiredman:(
02:17replacaack!
02:17replacawe gotta get that fixed up
02:18replacaclojars needs to be telling us a *lot* more
02:19replacaat least the data from the pom
02:20hiredmansomething, but if I have to write another rss polling something or other I will cry
02:20replacait's all about webhooks, baby!
02:21replacarss is tech of the past :-)
02:21replacalike the steam engine
02:21hiredmanI wrote an rss -> webhook thing and promptly discovered github uses atom
02:21hiredman:(
02:23replacabummer. github supports webhooks directly, but the project owner has to enable it for you which is kind of lame
02:23hiredmanyeah
02:23replaca(that's how autodoc works)
02:24replacaanything I can browse, I ought to be able to hook
02:30hiredmansomeone needs to write a pubsub node in clojure
02:33replacayeah, that would be a fun project. something along those lines is somewhere on my roadmap if I ever get out of the formatting and documenting game :-)
02:34replacatime to walk the dog and get some sleep
02:34replacasee y'all in the AM.
03:33LauJensenMorning team
04:53erohtar,(def p (promise))
04:53clojurebotDENIED
04:53calvini
06:01adityogood afternoon folks
06:02adityo,(doc cond)
06:02clojurebot"([& clauses]); Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil."
06:03adityofor cond how can i give a final clause i.e if nothing else then this..like t in Common Lisp
06:07adityogot it
06:08adityosimply use tru
06:08adityotrue
06:17Chousukeadityo: use :else. it's the idiomatic "always true" thing.
06:19adityoChousuke: thanks will try it out
07:18tcrayfordis there a way to have variable arity in a macro?
07:46cemericktcrayford: macros can have multiple arities just like other fns
07:46cemerickif the arity really is variable, and you're essentially parsing the arguments, then use rest args
07:48defn`hmmm -- off topic but, does anyone know if it's possible to use HTML frames without a src="blah.html", and instead to render html within that frame?"
07:49defn`i want to do something like [:frame {:name "top"} (html [:h1 "hello world"])] in compojure
07:49defn`but im not sure it's even possible
07:50defn`i dont remember the last time i used frames, heh
07:51cemerickdefn`: No, I don't think you can do that -- you'd probably have to populate the frame's document using js.
07:51defn`yuck
07:51defn`back to the drawing board...
07:53defn`lol god this domain name is weird: internet.com
08:02defn`it's like...really? the internet.com, eh?
08:27JonSmithdefn: you would want to use a div for that
08:28JonSmiththen you can use CSS to position it etc.
09:22sethsif this is too lazy please let me know, but entering a ticket for a single character typo on clojure.org seems too much
09:22sethson http://clojure.org/macros
09:22sethsThe link to Java interop needs an o
09:22sethscurrently is http://clojure.org/java_interp
09:39ordnungswidrighey all
09:40jasappmornin'
09:43ordnungswidrigdoes anybody know of a fully decentral database. Decentral in a sense of gti/darcs?
09:43chouserseths: that's not in git, so the process is a bit different. as in, no process. :-) Thanks for the report.
09:45chouserseths: fixed
09:46ohpauleezordnungswidrig: RMDBS or Keystore?
09:47chouserrdf something?
09:47ohpauleezordnungswidrig: you might want to take a look at CouchDB
09:48ohpauleeznot sure what you want, but I think you're just looking for a distributed storage system
09:48sethschouser: thx
09:48ohpauleezLauJensen: I like the recent changes to Best In Class
09:50ordnungswidrigohpauleez: I know couchdb which is not so bad. Bad I was looking into existing db (rdbms or keystore) based on a decentral basis like git/darcs that support branching / tag / joining. Especially like darcs based on a "patch theory" / "operational transformations"
09:51jasapphow close does couch's sharding come to what you're looking for?
09:52ordnungswidrigjasapp: no very close. If you look at darcs vcs every change is recorded, a "patch" and depending in the changes recorded in different branches you can merge the branches seamlessly. In couch you have a different merge model.
09:53jasappgotcha, I'm not very familiar with darcs
09:54ordnungswidrigjasapp: is an interesting model which fits the idea of fp and persistent datastructures rather well. (No wonder, it comes from the haskell guys).
09:56ordnungswidrigjasapp: I wonder if you can define a model say a relational data model and define operations ("patches" in darcs speak) on it, e.g. insert, update columns, delete, add/remove foreign keys. And for those operations you define inversation and commutation and you'll get undo, merging "for free". (As long as to patches commute)
10:02ohpauleezordnungswidrig: this already sort of happens, patch theory is applied and has been applied in a lot of places
10:03ohpauleezA session, commits, and rollbacks happen as a transaction, which can be applied, and aborted
10:03ohpauleezif you represent the transaction as a diff of the current state, you have what you're looking for
10:04ohpauleezI don't know of any DB that does that, most likely for performance reasons, but it could be cool
10:04ohpauleezYou're basically looking for a distributed delta store
10:05AWizzArdI might have something available in January
10:08ordnungswidrigAWizzArd: I think we chatted about that some time ago, right?
10:11arj_I'm wondering if I need to have a dosync around some code that I want to make sure that it reads the same values of a ref
10:12chouserarj_: yep
10:12arj_ah, so you can shoot yourself in the foot (concurrency wise :))
10:12chouseroutside a dosync, derefing a ref is a "flying read" -- you get whatever you happen to get
10:12arj_thanks
10:12ohpauleezreads happen for free, and you'll get the value at read time, if you want to lock out the read, you'll need a dosync
10:12ohpauleezgah, chouser beat me, I was looking away
10:12chouserof course you could also deref once an put it in local, then just use that local.
10:13chouserif you only care about the state of a single ref, that is. If you want a consistent snapshot of 2 or more refs, you'll need a dosync.
10:14arj_yeah
10:14arj_makes sense
10:14chouserBut again, if you're not going to also update a ref, you can get the values in a dosync, put them in locals, and then do your work outside the dosync.
10:14chouserthis would help reduce the amount of work done if the transaction has to be retried.
10:15chouserbut yeah, you get it. So I'll stop talking now.
10:15chouser:-)
10:16arj_:D
10:16arj_thanks for all the help!
10:22praptakIs there a reason for using doto with methods and functions only?
10:23ordnungswidrigcan I use deftypes with multimethods?
10:24ordnungswidriglike multimethods in clos?
10:25Ankouhi, is there something like prxml which returns the xml-string instead of just printing it?
10:25AWizzArdordnungswidrig: yes, some time ago we talked about it. I had a bit time to work on my db, and next week i will even have a lot of time for it.
10:26the-kennyAnkou: You can wrap the xml-stuff in a (with-out-string)
10:26the-kenny,(doc with-out-string)
10:26clojurebotexcusez-moi
10:26jasapp,(doc with-out-str)
10:26clojurebot"([& body]); Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any nested printing calls."
10:27jasappI kept looking for with-out-string the other day :)
10:28Ankouokay, thanks
10:36chouserpraptak: I don't understand your question.
10:42praptakchouser: The docstring mentions only "methods and functions", not "forms". Does that mean that you cannot use macros?
10:42praptak, (doc doto)
10:42clojurebot"([x & forms]); Evaluates x then calls all of the methods and functions with the value of x supplied at the from of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put \"a\" 1) (.put \"b\" 2))"
10:46Chousukeyou can use macros.
10:47chouser,(macroexpand '(doto foo (if (then-this) (else-that)) (-> fn1 fn2 fn3)))
10:47clojurebot(let* [G__6169 foo] (if G__6169 (then-this) (else-that)) (-> G__6169 fn1 fn2 fn3) G__6169)
10:47chouserpraptak: yeah, the docs could be made a little less ambiguous there I guess.
10:48praptakThanks for the info.
10:55scottjThese 7 lines http://pastie.org/770219.txt appear to be the bottleneck in my program, any ideas on a faster way to do that same thing? (get records out of maps and sum up one key grouped by another key)
10:58ohpauleezscottj: if you change it to apply +, you might see an increase
10:58ohpauleezthe other way is to use agents and partition it
11:07Licenserscottj: did you try it with update-in?
11:08Licenserand what kind of collections are your maps and how big are they??
11:11chouserscottj: you could try using transients for the map you're building.
11:12chouserscottj: you could try doing the :name lookup once: put it in a local to use twice.
11:16chouserthe only other thing I can think of is to try to use primitive numbers for 'result' and the adding, but that might not really work. Unless you're on 'new' using a deftype, (:amount match) is boxed anyway.
11:17jasappis there an easy way to tell if something is getting boxed?
11:18jasappor some guidelines for understanding when things get boxed?
11:19chousernot very easy. I think the best I've got so far is repl-utils expression-info
11:20chouserjasapp: currently collections can't store primitives and literal numbers are boxed.
11:20Chousukewell, currently always on function boundaries, unless it's inlined.
11:20chouserah right, and function boundaries
11:21mebaran151collections in Java box Integers too right?
11:22mebaran151I remember failing to make a List<int> a long time ago
11:22jasapppardon, function boundaries?
11:22mebaran151when you pass a value to a function, it gets boxed to Object
11:22chouserI think so. Generics don't work on primitives, and it's too much trouble to specialize all the containers for primitives. ...until macros and cinc anyway. :-)
11:23chousermebaran151: right, and return values from functions are boxed as well.
11:23mebaran151but you really only need primitives in tight loop recurs, where they don't get unboxed
11:23mebaran151I always felt dealing with primitives was a bit of code smell
11:23mebaran151how do you know if you should be using int or long
11:23chousermaybe it's easier to state it the other way -- only locals, java interop, and things that expand to those at compile time can be primitive.
11:24jasappinteresting
11:24mebaran151if you have a tight loop, you probably wouldn't want to make it lazy anyway
11:25Chousukewith macros you could generate all the overloads for primitives in a few lines of code, but it would bloat the interfaces horribly :/
11:25mebaran151I'm not sure it would be worth it anyway
11:25mebaran151a sufficiently smart compiler shouldn't make the programmer worry about boxing and unboxing
11:26ChousukeAs I understand it, invokedynamic is supposed to solve exactly that problem, but it remains to be seen how well it'll succeed.
11:26mebaran151I've looked at the reflected invoke methods
11:26mebaran151they're a doozy
11:29mebaran151I wonder if it would really be so simple: I get the feeling that lists assume they contain pointers: I wonder what would happen if they suddenly contained something that wasn't a pointer like an int or long
11:32mithraicAre there Clojure method invocations that have to use reflection?
11:32mithraicOr is it guaranteed not to happen unless you go about it yourself?
11:32AWizzArdno, when you call Clojure functions then jvm reflection is not needed
11:33bowyakkahi all, what is the status of clojure functions and other forms with regard to serialisation
11:33mithraicComing from Scala, reflection is used for invocation for structural types, since they're not of a particular known class.
11:33chouserI believe rhickey plans for at least vectors to be able to hold longs and doubles.
11:35chousermithraic: Calling Clojure fns never requires reflection or type hints. Java method calls (both static and instance) may require reflection at runtime if insufficiently hinted at compile time.
11:40bowyakkafor reference I am using clojure to play with oracle / tangosol coherence, when I run the following http://gist.github.com/271354 I get an exception. I am figuring this is happening as part of serialisation, do clojure fn's support sialisation ?
11:40mebaran151bowyakka, nope
11:41bowyakkahahah easy question then
11:41bowyakkafrom vauge memory of other lisps, is it possible to print out a fn's original forms, I could kludge serialisation this way ?
11:42chouserbowyakka: yes, probably.
12:16jasappdoes anyone know what the emacs command is to view the source of a function?
12:16jasappI thought it was C-c C-spc
12:17the-kennyjasapp: M-.
12:18jasappstrange
12:19jasappthanks
12:19the-kennyYou're welcome
12:19jasappdo you know which mode provides that?
12:20jasappI was looking at the normal slime cheatsheet I have, and it says C-M-. is supposed to lookup source
12:20the-kennyI think the functionality is located in slime
12:20jasapphmm, ok
12:21the-kenny(I want to hack on this feature... but it's a bit complicated)
12:21jasappgot some cool ideas?
12:22the-kennyThere's a TODO.org in swank-clojure ;)
12:26mithraicI see the Google Group; there's not also a mailing list?
12:27chousermithraic: there is not. You can set up your Group account to gateway to email.
12:27mithraicCool, thanks. Also: Is it considered polite or inpolite to post a job offer to the group?
12:27jasappit's been done in the past
12:27chouserit's happened a few times now -- haven't heard any complaints :-)
12:31djorkplease do :)
12:32jasappindeed, you'll be hearing from me
12:33jasappwho would have guessed? :)
12:35pjacksonmithraic: based in the US?
12:35mithraicyeah, i think we'll probably prefer someone local to NYC if possible, but we'll see
12:35mithraicit's a medium-term gig, a few months
12:35chouser,(instance? java.util.List [])
12:36clojurebottrue
12:36chouseryay!
12:37cemerickmithraic: who's "we"?
12:39mithraichttp://wirelessgeneration.com, working on http://www.nytimes.com/2009/07/22/education/22school.html
12:45mithraichmm, i might not be supposed to say publicly that we're the ones with that contract. So ~~waves hands~~
12:49pjacksonMaybe I can make some money from Clojure: mithraic, give me $100 or I'll tell your boss what you just did.
12:50pjacksonDamn.
12:50pjacksonOut bid.
12:50mithraicheck, i'll not say it for free (from now on). So you're totally boxed out :)
12:58_schulte_I'm having trouble providing optional arguments w/o code duplication, for example in the following http://gist.github.com/271411 is there an easy way to avoid re-writing the body?
13:00hiredman_schulte_: usually the way it is done is the single arg body calls the two arg body
13:01technomancy_schulte_: heyo!
13:01_schulte_hiredman: perfect, thanks
13:01_schulte_technomancy: hey there!
13:02Chousukeyou can also define a local helper function and use that
13:02technomancylong time no see
13:02Chousukeeg. (letfn [(helper [params] ...)] (defn del-sec ...))
13:02_schulte_yea, stopped working and back to school, I just found a way to force clojure into my research assistantship so I may start showing up around here
13:03technomancyawesome
13:03technomancy_schulte_: I'm thinking about having a seattle Clojure meeting maybe in february.
13:03_schulte_Chousuke: you can have a letfn outside the defn? I wouldn't have thought of that
13:03Chousuke_schulte_: sure. it just creates a closure :)
13:03_schulte_technomancy: I'm living in albuquerque now :)
13:03technomancyjust get together and hack/chat
13:03technomancyoy
13:04technomancy_schulte_: did you move for school?
13:04_schulte_technomancy: yup
13:04Chousukescottj: it's one way to have "private" helper functions without actually defining them as private vars.
13:04technomancy_schulte_: well don't let clojure pull you in too deeply or you'll have to find another maintainer for rinari. =)
13:05_schulte_technomancy: already done :) figured it was best since I haven't used it in months
13:05Chousukescottj: you can also make a local atom or other mutable thing using let, though that's not so idiomatic
13:05technomancy_schulte_: oh nice, who is it?
13:05_schulte_Chousuke: I thought letbound variables were immutable
13:06Chousuke_schulte_: letbound *values* are immutable, but if the value is one of the reference types, then it obviously is mutable :)
13:06_schulte_technomancy: purcell and flavorjones on github
13:07_schulte_Chousuke: ah thanks, clearly I'm still adjusting to some of this clojure-specific stuff
13:07Chousuke(let [a (atom 1)] ...) <- the binding a is immutable, but the value a points to may change.
13:07_schulte_technomancy: they've been handling patches and maintenance for a couple of months now
13:08Chousuke_schulte_: that said, a defn inside a let is not that common, but it's sometimes useful. :)
13:08_schulte_Chousuke: sweet, good to know
13:09_schulte_technomancy: recently all my open-source efforts have been going into http://orgmode.org/worg/org-contrib/babel/ for Emacs org-mode
13:09hiredmanthe occasional big honking letfn
13:24cemerickcgrand: in the mood for an enlive bug report here, or should I file an issue on github?
13:27travisbradythis question is maybe a little silly but, what new stuff does one learn by learning clojure/lisp? other langs i've used: python, haskell, php, java, perl
13:29greghclojure has some practical implementations of modern ideas around concurrency that you may not have encountered before
13:29knuckollsi'm a bit of a clojure noob myself, but software transactional memory style concurrency is not represented in that list
13:30cemericktravisbrady: macros aren't represented in that list
13:31the-kennyYeah, lisp-macros are really cool.
13:31arohnertravisbrady: you'll adopt a more FP style, learn about the evils of global mutable state, and start to think about things at a higher level of abstraction. Or not, depending on how much haskell you've done
13:31the-kennyYou'll miss them in other languages
13:31arohnerclojure is a lot more practical than haskell, though
13:31_schulte_travisbrady: if you don't already have experience with the "functional programming" or with the "code is data" aspects of lisp they are both important to know and will change the way you program in any language
13:32knuckollsso I haven't quite passed the macro hump yet as far as lisps are concerned. I don't get why they're so handy.
13:33arohnerknuckolls: have you every wanted to write a function in say, python, that looked like:
13:33the-kenny-> and .. are verh handy macros.
13:33arohnerdef foo(body): try: body(); catch exceptA; catch exceptB?
13:34greghknuckolls: http://www.defmacro.org/ramblings/lisp.html is a good introduction
13:34gregh(it's a bit slow to start but a worthwhile read)
13:34knuckollsgregh: cool thanks
13:34knuckollsarohner: yeah i have
13:34knuckollsarohner: macros could help?
13:34travisbrady_schulte_, arohner, cemerick: yeah, the functional stuff i've hit on with Haskell, but I'm really interested in macros
13:36arohnerknuckolls: yes, you can write a macro to do that seamlessly in clojure
13:36the-kenny,(macroexpand-1 '(-> 1 inc inc inc))
13:36clojurebot(clojure.core/-> (clojure.core/-> 1 inc) inc inc)
13:36the-kenny,(-> 1 inc inc inc)
13:36clojurebot4
13:36travisbradycurrently I don't even really know what one can do with macros, but a lisp hacker i used to know said they were the single most eye opening and interesting thing he'd encountered in a programming language and he'd used haskell, ml, java, perl, c, etc etc
13:37knuckollsthe-kenny: yeah that helps. i see how -> would come in handy
13:38_schulte_I think small domain specific languages are another place where macros shine, like the common lisp html generation language http://weitz.de/cl-who/#example
13:38gregh"macros" are the last item on http://www.paulgraham.com/diff.html too
13:39the-kennyknuckolls: when is also implemented as a simple macro :)
13:42chousertravisbrady: onlisp is what made me realize I had to learn a language with macros
13:42the-kennyThere are some basic syntactic constructs called "special forms" and any other syntactic construct is implemented as a composition of them, mostly as a macro.
13:47_fogus_I had used macros in CL before, but it was "On Lisp" that really hammered their power home.
13:47chousercustom query language, adding continuations to a language that didn't have them, ... probably other examples I've forgotten.
13:48knuckollsI started on lisp about a year ago but didn't finish it at the time. I believe i've been convinced to pick it back up
13:48cgrandcemerick: still there?
13:48knuckollsthanks.
13:49cemerickcgrand: yeah -- just posted to the group, tho
13:49polypus_fogus_: i've been perusing the pdf a bit. it's high time it was reprinted. $224 on amazon. even better would be a clojure "port"
13:50cemerickcgrand: would you have any interest in a pom file for enlive? I've got one sitting right here. :-)
13:50_fogus_polypus: Hmmmm... I vaguely recall someone starting that... can't remember the name
13:50polypushuh, sure they weren't just porting the examples?
13:51chouserthere's bad stuff in there too, of course.
13:51chouseranaphora?
13:51chouser~anaphora?
13:51clojurebot<rhickey> anaphora == bad
13:51_fogus_polypus: They were totally porting only the examples, and it's out of date. http://blog.fogus.me/tag/onlisp/
13:51cgrandcemerick: I have a lein project.clj here but I haven't kept up with leiningen developments this last month
13:53_fogus_What are the other arguments against anaphora besides that they do not nest?
13:53cemerickcgrand: We've been using clojure-maven-plugin very successfully so far.
13:53cemerickI don't think we'll ever be using lein. *shrug*
13:53polypus_fogus_: well that, and norvig's paradigms book are way up on my reading stack
13:54cgrandcemerick: ok thanks for the report, I'll look at it
13:54_fogus_polypus: I love PAIP. Get to it sooner rather than later if you can.
13:54polypuswil do :)
13:54cemerickcgrand: np. I notice that scraping is now the headline feature, which is sort of funny.
13:54cgrandcemerick: ok, send me the pom.xml
13:55cemerickcgrand: by email, or pull req?
13:55cgrandemail unless you already have it on github
13:56cgrandyeah, I think there are more people using enlive for scraping rather than for templating
13:57cemerickcgrand: I haven't pushed it yet, but I've already got it forked, etc.
14:03mebaran151anybody here ever do any authorize.net stuff and know a good Java wrapper?
15:00scodeAny idiomatic way to slurp a stream? (slurp ...) only takes a filename. If not, does it sound like a good idea to suggest adding a (slurp-stream s) to go with (slurp fname)?
15:00the-kennyscode: mh.. maybe something in duck-streams? Wait
15:00scodeOr else just having (slurp ..) accept a stream, given that (slurp) is not likely to be used in cases where extreme performance matters
15:01the-kennyscode: Try slurp* from clojure.contrib.duck-streams
15:01the-kennyLooks like it supports InputStreams
15:01hiredmanstream like an inputstream?
15:02the-kenny,(use 'clojure.contrib.duck-streams)
15:02clojurebotnil
15:02scodethe-kenny: sounds sensible. any thoughts on whether it would be appropriate to have core slurp support it?
15:02the-kenny,(with-in-str "foobar" (slurp* *in*))
15:02clojurebot"foobar"
15:03the-kennyscode: Personally, I would like to see slurp* as the default slurp.. but it isn't a big issue to write slurp* instead of slurp :)
15:03scodethe-kenny: No issue for me (I have no trouble dpeending on -contrib), but it feels like a useful thing to support in core since slurp is heavily geared towards convenience anyway.
15:04scodeah
15:04scodethe-kenny: slurp* assumes it's a stream it seems.
15:04the-kennyscode: Yes, that's how I think about it.
15:04scodethe-kenny: I'd not want what with slurp though.
15:04scodeI'd want it to support both.
15:04scodeOr else have a separate one for slurping streams.
15:04the-kennyscode: slurp* supports almost everything
15:05the-kennyurls, files, sockets, readers
15:05scodeHmmmm.
15:05scodeOh!
15:05scode(reader ...) does that for it.
15:05scodeSorry!
15:05scodeMy bad.
15:05the-kennyYes
15:07scodethe-kenny: Thanks!
15:08the-kennyYou're welcome :)
15:59cmbntrhi, anybody a idea how to handle classifier dependencies with leiningen?
15:59cmbntrsomething along http://gist.github.com/271563 would be nice...
16:35AlexS_Can anyone help with a leiningen swank problem?
16:36AlexS_I am trying to run lein on a new machine. It seems to be pulling done the dependencies including swank-clojure-1.0.jar and the lein-swank jar but I am getting an error: "swank is not a task"
16:37the-kennyAlexS_: Are you trying to run "lein swank"?
16:37AlexS_the-kenny: Yes
16:38the-kennyAlexS_: You need lein-swank for that, not only swank-clojure
16:38the-kennylein-swank is the leiningen-plugin
16:38the-kennyAlexS_: But if you're using swank-clojure in emacs, you can also do M-x swank-clojure-project without "lein swank"
16:38the-kennythat's how I use it
16:39AlexS_the-kenny: I think I do have the plugin. The lein-swank jar is in my libs directory after running "lein deps"
16:39the-kennyohh my bad. I read too fast. hm..
16:43neotykthe-kenny: how did you set it up so swank-clojure-project works?
16:43neotykthe-kenny: it never connects for me
16:43the-kennyneotyk: Standard layout in leiningen, add swank-clojure to the deps in lein, "lein deps" and then run swank-clojure-project
16:43the-kennyIt's dead-easy
16:44neotykshit it did work this time
16:44the-kennyneotyk: heh, that's good :)
16:44neotyknow the-kenny tell me how you made it work on my machine ;)
16:44the-kennyneotyk: Magic :)
16:45neotykthe-kenny: thanks and kudos
16:45the-kennynp
16:46lpetithello emacs users. In a nutshell, do you use a modified version of paredit.el, for clojure ? I mean, I cannot see paredit.el handling maps {} (and also not sets #{} for deletion too). I'm currently porting the definitions of paredit.el to clojure, so I would like to work with the most clojure-specific version of paredit.el ...
16:47the-kennylpetit: It's relative easy to add handling for { and [ to paredit.. the definitions how to handle parentheses is mapped in some var and you can just add new definitiond to it. I've done that
16:47the-kenny(and I copied & renamed some functions)
16:47lpetitok, but you do not answer my question :-)
16:48the-kennylpetit: Yes, I'm using a modified version :)
16:48the-kennyBut it's a bit buggy
16:48lpetitDo you know of an "official" modified version e.g. provided by technomancy ?
16:48the-kennyhm.. no, sorry
16:49stuartsierraThere is a clojure-specific version of paredit somewhere.
16:49lpetitI also intend paredit.clj (the name of my project) to correctly handle sets, e.g. if you have "#{}|" (pipe for the cursor position) and hit delete, then you will get "" and not "#" (and would also take care of that for selections)
16:49stuartsierraOr a hook in clojure-mode that automatically fixes paredit when it's loaded.
16:50lpetitstuartsierra: ok, I'm asking because while I'm porting commands, I'm thinking of clojure-specific stuff too (see above), and if a modified version were around with other interesting ideas for clojure, I could cross-check ideas
16:53lpetitI guess I'll have to wait for technomancy then.
16:53lpetitOk, time to go to bed here, cu
16:54the-kenny(Mine is broken in the repl :()
16:54stuartsierraDidn't that used to be part of clojure-mode?
16:55the-kennyparedit?
17:06stuartsierraThe fixes to paredit.
17:06stuartsierraThat is, didn't clojure-mode, at one time, include hooks to fix paredit for Clojure?
17:07the-kennyhm.. don't know. I'll take a look,
17:07the-kennystuartsierra: Looks so
17:08the-kennystuartsierra: hm.. But only for {}
17:08stuartsierraBut I think that is missing from the version on ELPA
17:08the-kennyNo
17:08stuartsierraoh, ok
17:08the-kenny*installing paredit from elpa
17:09technomancythe latest paredit beta works without tweaks on {} and []... I'm trying to talk the author into doing a release soon.
17:09stuartsierraAh, ok.
17:10stuartsierratechnomancy: thanks for the update
17:10the-kennytechnomancy: Ah, nice :) Does it work in the repl without bugs?
17:10technomancythe-kenny: as far as I know, yeah
17:11the-kennytechnomancy: If I use paredit from elpa, does the tweaks work? Looks like you're checking for version >= 21, but elpa's version is 20
17:12technomancysorry, I don't remember. paredit is like the one elisp lib I still install by hand.
17:12the-kennytechnomancy: ah ok
17:12the-kennyThen I'll do that too :)
17:13alexykliebke: how do you deal with (def var blah) in files which are prone to be compiled under e.g. lein compile?
17:14alexykI'm rewriting them as (defn varname+ [prevvar] body) and then place a comment ;; (def var (varname+ prevvar))
17:14alexykfor repl'in'
17:14alexykand it gets old quickly
17:15alexykthe sequence of readily available var values is the equivalent of an R console environment for data mining
17:15alexykthe question is, is there a nice way to macroify it
17:16alexyk(defn a+ [x] (* 2 x)) ; (def a (a+ 3))
17:16the-kennytechnomancy: no.. [] is broken in the repl with paredit-beta.el too :(
17:19alexykso, how can I write a macro which, depending on whether it's in repl, will do a defn var+ ... and (def var (var+ ...)), otherwise just (defn var+ ...) ?
17:19alexykwhat's a good convention to suffix a defn solely devoted to defining a var without the suffix?
17:21Licensergood evening my lispy friends :) how are your parensethes tonight?
17:22technomancythe-kenny: wups; you're right. they're matched on input but not enforced for deletion.
17:22the-kennySome repl-with-paredit issues, but else I'm fine :)
17:22technomancystrange
17:22the-kennytechnomancy: Exactly
17:23Licenseralexyk: because our days here are filled with eating potatos and sourkraut and we've to iron our lederhosen all day long
17:23the-kennyLicenser: Hah :D
17:24alexykLicenser: and when do you brew sauerkraut then?
17:24Licenseralexyk: between 6-9 in the morning but only on suttardys with a prime number as date
17:25alexykalso, there should be some time allotted for schnapps and sausages, didn't see that accounted for
17:25the-kennyAnother one!
17:25ordnungswidrigre
17:26ordnungswidrigto the german (speaking) clojurists: are there any local user groups?
17:26Licensertach ordnungswiedrigkeit, how was your sauerkraut today?
17:26alexykyeah, when I see a pattern, it's there, and there's some ordnung to it
17:26the-kennyordnungswidrig: None that I'm aware of.
17:27Licenserordnungswidrig: not that I know of, sadly
17:27Licenserbut we should make one!
17:27ordnungswidrighmm, that was what I thought of. What about registering the locations of interessted people?
17:28Licenserno not Munic and not Brussel :P
17:28somniumclojureliga!
17:28alexyksomnium: aha! did git pull on congomongo, popped eyes
17:29alexykwhat's the scoop?
17:29somniumalexyk: ?
17:29alexyksomnium: yeah, what's the main changes? want to try and wonder what to expect
17:29somniumalexyk: leiningen now, trying to strip the binaries out
17:29Licenserso we managed to be perfectly evenly spread around germany? That is actually quite a extraordenary event
17:29alexyksomnium: did you implement :really-only in fetch? :)
17:29the-kennyLicenser: Looks so
17:30somniumalexyk: hmm, would you settle for skip and limit for now? :)
17:30Licenserberlin in the capital :P
17:30alexyksomnium: allright :)
17:30somniumalexyk: been caught up with a js-compiler project
17:30the-kennyordnungswidrig: Leiningen near Frankfurt?
17:30jasappso we can write map reduce functions in clojure?
17:31alexyksomnium: I thought yegge had enough js stuff in his blog :)
17:31somniumalexyk: congomongo is on a as-I-need-new-features basis atm :)
17:31ordnungswidrigthe-kenny: there is anything _near_ leiningen?
17:31Licensersomnium: a js-compiler? as in compiling java script and running in clojure?
17:31alexyksomnium: yeah, but, should I upgrade for speed?
17:31somniumLicenser: yeah, in fact it works, but horribly documented atm
17:31the-kennyordnungswidrig: Not really :D
17:31Licensersomnium: where can I sign up?
17:32LicenserI did that in ruby and was trying to get something like that working in clojure
17:32somniumI ported compojure's html-dsl on top of dojo with it
17:32the-kennyordnungswidrig: But Leiningen would be ok for me :)
17:32somniumscrytica on github
17:32ordnungswidrigleiningen wouldn't be any more central than berlin or stuttgart :-)
17:32somniumplanning to announce once I get some derent examples in order
17:32the-kennyordnungswidrig: But it would be awesome :)
17:33Licenserheh
17:33technomancymaybe if you can't make it there you could host a showing of the Naked Jungle at the meeting instead: http://en.wikipedia.org/wiki/The_Naked_Jungle
17:33ordnungswidrigthe-kenny: in a way, yes. They surely would wonder why a clojure user group meeting would be there
17:33the-kennyordnungswidrig: We could write a poster with "install" and stick it next to the town sign
17:34somniumLicenser: ah, backwards
17:34Licenserhttp://de.wikipedia.org/wiki/Mittelpunkt_Deutschlands <- we should meet there
17:34somniumLicenser: writing clojure and compiling to javascript
17:34Licenseraww that is booring :P
17:34jasappsomnium: for map reduce?
17:34somniumjasapp: for whatever you want
17:34jasapphmm
17:35Licenserwe could do like ... camping ... there
17:35ordnungswidrigLicenser: to easy, not clojure related :-) Anyway we should consider the point of germany which is reachable fastest for any inhabitant.
17:35the-kennyordnungswidrig: We should write a small web-app which calculate the best point for every registered german user
17:35the-kennyIn clojure, of course
17:36Licensergöttingen looks kind of central
17:36LicenserI've that implemented already
17:36somniumwow, you guys are organized
17:36Licenserit returned "Berlin"
17:36Licenser(defn best-place-in-germany [ & _] "Berlin")
17:37Licenser,(member:defn best-place-in-germany [ & _] "Berlin")
17:37clojurebotjava.lang.Exception: Unable to resolve symbol: member:defn in this context
17:37Licenser,(defn best-place-in-germany [ & _] "Berlin")
17:37clojurebotDENIED
17:37alexykfor some reason, my German studies recently stumbled upon Otto Widdenen, and it occurred to me that he used his simple U-9 skillfully so scuttle 3 big ships, in the same way careful use of small Clojure may defeat some behemoth languages. Just a random association of the day.
17:37ordnungswidrigLicenser: epic cheating fail
17:37alexykso the meeting my be held in Kiel
17:37Licenserordnungswidrig: actually an epic copy and paste fail ;)
17:37ordnungswidrigor büsingen.
17:38Licenseralexyk: I'm not entirely certain submarine tactics apply to clojure, diving never protected me from a stack overflow at least
17:39alexykLicenser: need a longer snorkel then
17:39Licenseralexyk: I'm scuba diver I don't need no norkels
17:39ordnungswidrigbad hersfeld is considered the center regarding the autobahn connections. I know many parcel services have their central hub there (amazon ships from there as well afaik)
17:39Licenserordnungswidrig, the-kenny: How about erfurt
17:40ordnungswidrigLicenser: as long as an ICE stops by there, I'm in
17:40ordnungswidrighehe, hagelberg?
17:40ordnungswidrighttp://twitter.com/technomancy/status/7494992839
17:40Licenserit's just an idea, after all the university there is kind of well known for IT and the CCC has something to do with it too when I remember right
17:41Licensererfurt has a ICE stop, just looked at dahn.de
17:42ordnungswidrigI worry that it's more about the people that can organize a location in infrastructure than the geographic location. An CS department which is in clojure could be a help
17:43Licenser*nods* Yes that is always hard if noone is there who can do that :(
17:43Licenserso we're back to the point of a city where someone of the participants lives?
17:43ordnungswidrighmm, meetup.com does anybody know this?
17:43somniumalexyk: ah, it might be a touch faster, I made a couple small changes to ClojureDBObject (ArrayLists -> Array) and use c.l.RT to create maps/vectors
17:44alexyksomnium: what about the "new" branch, is it in sync and ahead of the master still?
17:44somniumalexyk: but it seems you've been straining your harddrive more than your jvm
17:44ordnungswidrigakkording to meetup.com they is one person from magdeburg
17:44Chousukealexyk: it hasn't replaced master yet.
17:44alexyksomnium: a single scan of a simple collection takes an hour, it's the main bottleneck now
17:45Licenserordnungswidrig: never looked at ti
17:45ordnungswidrigmeetup.com does not accept openid -> fail
17:45alexykChousuke: I mean somnium's own new for congomongo, relying on the clojure's new
17:45somniumalexyk: new still has an old version of CDBO atm
17:45Chousukealexyk: ah.
17:45alexyksomnium: good to know, I'll wait until the merge
17:45somniumalexyk: Ive decided to be content with 1.1 and just wait for 1.2 rc for development
17:45Licenserordnungswidrig:
17:46alexyksomnium: that's supposed to bring deftype and protocols into master, right?
17:46Licenserthe-kenny: #clojure.de (no reason to bother everyone here with our discussion - I think it is kind of specific ;)
17:46somniumalexyk: yeah
17:46alexykindeed, for now Clojure lacks Scala's suffix-artifact-version convention, and managing branches of clojure and all its related paraphernalia seems too much
17:47alexykin maven repos
17:47alexykor anyhow
17:47somniumalexyk: you could try just pulling clojure-db-object and mongo-java-driver off clojars, they should just drop in and work
17:47chouserClojure's using branch name for "artifact" now
17:48chouserunless I'm misunderstanding the point
17:48somniumalexyk: mongo-java-driver was bumped to 1.1 so will need the new one
17:49ordnungswidrigthe-kenny: well, #clojure.de is fine but let's announce this once a day in #clojure, right?
17:49alexykchouser: so how's the new branch called in maven?
17:49the-kennyordnungswidrig: Okay :)
17:52alexykwhat I mean w.r.t Scala is the convention to name branch-depending things like, something-2.8.0-SNAPSHOT in the artifact, and version stays numeric, amnd groupId is org.scala-tools or something. This way you can easily use ${scala.version} in the pom.xml properties and in every relevant product
17:53somniumalexyk: I think its org.clojure/clojure "1.1.0-new-SNAPSHOT"
17:53alexyksomnium: that's a problem, branch pushed into version number. But still workable.
17:53somniumalexyk: I dont know a thing about maven
17:53somnium<3 leiningen
17:54alexyksomnium: repo is still maven, and namespace/versioning too
17:54alexykbbl
18:17Licenseracutally a question, is there a way to make a function cache it's results (yes I know that would be a yes) BUT only a limited number of them?
18:18the-kennyLicenser: hm... you could simply define a custom version of memoize. It's trivial
18:18LicenserI know, just wanted to get sure not to reinvent the wheel ;)
18:45konrDo you currently use SLIME with both Clojure and CL? If so, how? I used to add sbcl to the slime-lisp-implementations list, but it doesn't work in the current version, as slime doesn't define it.
19:07technomancykonr: slime from CVS doesn't work with clojure
19:08konrtechnomancy: I'm usint everything from ELPA
19:08konr*using
19:09technomancyoh, then I don't know, sorry. I know some people have gotten it to work with the elpa version.
19:12the-kennyI think a big issue are the missing *.lisp-files for the elpa-version.
19:12the-kennySo you have to install the by hand
19:14technomancyoh yeah, for CL you still have to install swank by hand
19:14technomancyelpa only contains elisp files
19:15the-kennyI know, I know.
20:03mebaran151I'm trying to wrap netty for a project I'm doing and I'd like to make a reusable clojure netty wrapper
20:03mebaran151anybody have any suggestions or ideas what would be an idiomatic wrapping?
20:05mebaran151also working around a library with annotations would be useful too
20:11Licenserhmm in repl is there a way to unbind a symbol?
20:15somnium,*ns*
20:15clojurebot#<Namespace sandbox>
20:16somnium,(ns-unmap 'sandbox '+)
20:16clojurebotnil
20:16somnium,(+ 2 2)
20:16clojurebotjava.lang.Exception: Unable to resolve symbol: + in this context
20:17somnium,(use 'clojure.core)
20:17clojurebotnil
20:18Licensersomnium: you broke clojurebot!
20:19somniumLicenser: I put him back!
20:19Licenser,(- 2 2)
20:19clojurebot0
20:19somnium,(+ 2 3)
20:19clojurebot5
20:20mebaran151,(+ 2 2)
20:20clojurebot4
20:20mebaran151poor clojure bot
20:21somniumnot sure what happens if you unmap his ns fns
20:21Licensersomnium: I was about to ask what haoppens if you unmap use :P
20:22somniumLicenser: give it a shot! :P
20:22Licenserno I don't want to ^^
20:22somniumclojurebot: <3
20:22clojurebot<3 is ♥
20:23Licenserheh
20:24Licenserbut I fear it might work
20:31chouseryou could still do clojure.core/use
20:33_schulte_and idea what could be causing the error running "lein deps" w/incanter? http://gist.github.com/271790
20:35liebke_shulte_: the incanter-full jar didn't get uploaded to clojars, just the meta data. I haven't figured out why yet
20:35_schulte_liebke: ok, thanks
20:36liebkeI've tried a couple times, but it isn't working for some reason
21:07durka42bah
21:07durka42i hate cryptic errors about anonymous functions
21:15mebaran151durka42, I often end up binding my anonymous function in a let just to get better debug messages
21:15durka42ah, if only i had known which anonymous function it was :)
21:15durka42it was the defmulti dispatch function
21:16durka42i should have just gone through the program and named all the #() fns
21:23Licenserwow I'm impressed the data classes are really fast!
21:23somniumLicenser: data classes?
21:23Licenserstructures sorry
21:24somniumlike deftype?
21:25Licensernono like structs, lists vectors and stuff
21:26somniumah, well, everything seems fast when you spend a lot of time with ruby :P
21:26Licenseroh go die :P
21:28Licenserbut still I'm impressed like
21:28Licenseriterating through a 2k list, mapping over everyting and changing stuff within it is greatly fast
21:40Licenserhrm is there something like reset the slime clojure thingy? or reload the project?
21:43somniumLicenser: I usually run swank-clojure-project again to wipe out the image, like that?
21:43Licenseryea kind of aside of being somewhat uncompfortable :P
21:43Licenserit behaves very oddly
21:44Licenserit's nice for mini projects but as soon as I've more then one file and they require eachother they behave very oddly
21:44Licenserlike reloading something via use does not reload it
21:44somniumdo you use slime-compile?
21:45Licenserno what does it do?
21:45somnium(or whatever its called, C-c C-k)
21:45LicenserSorry started out with emacs like 2 days ago :P
21:45somniumit compiles the current buffer, so you dont have to reload anything
21:46somniumunless you've added new vars, then you have to (use 'whatever)
21:46Licenseroddly that (use didn't reloaded stuff for me
21:47somniummaybe (use 'whatever :reload) then
21:48Licenserah okayn that is a good hint :D
21:48LicenserGetting used to emacs is really hard -.-
21:48somniumLicenser: since you're experimenting with emacs I would recommend trying inf-ruby (by matz) while youre there
21:49somnium(its slow, but still pretty cool) :P
21:49Licenseris it in the ELAP thingy?
21:49somniumyeah
21:49Licensergood cause I've no clue how to add anything else :P
21:50Licensersad thing is most of the stuff where you can read up shows simple things but as soon as it gets more complex it does not work too well any more :/
21:51somniumwell, elisp is just an older, less attractive cousin clojure
21:52LicenserI mean simple things like 'how the heck to get a buffer back' :P
21:52somniumLicenser: Im sure in a week you'll have emacs tying your shoelaces for you in the morning
21:53Licenseractually not :P
21:53somniumLicenser: C-x C-b should give you a list
21:53somniumLicenser: are you using ido?
21:54somniumer, emacs-starter-kit?
21:54Licenserif I'd find something better I'd toss EMCAS in the can burn it berry it, burn the place I berried it and freaking a bunker over it so I'd never ever have to see it again
21:54Licensersomnium: long story short, I tried, isn't working so no :P
21:54Licenserthe sugestion of the #emacs channel regarding my problem was 1) that is not supported, 2) Buy a new keybard
21:54somniumhmm
21:55somniumand C-h b?
21:55somniumhow about M-x list-buffers?
21:55somniumsry
21:55somniumM-x list-buffers
21:56somniumLicenser: emacs is an elisp repl that grew a text editor
21:56Licenserthat wasn't the problem :P problem was that AquaEmacs does not read the .emacs.d directory
21:56somniumthatll do it :)
21:56Licenserthanks ^^
21:56somniummaybe try carbon?
21:57somniumIm on ubuntu, so ... I have less choice?
21:57LicenserI tried that one, it does not work togehter with all the mac key bindings :P
21:58Licenserand especially not with a german keyboard
21:58Licenserso #emacs suggested to buy a english keyboard -.- way thank you
21:58LicenserI killed swank :D
22:00somniumhmm
22:00Licenserheh I seem to have a hand for braking things -.-
22:01Licenserno I just had to wait 5 min :D
22:03somniumLicenser: you can rebind everything, I use dvorak so I hacked on a bunch of things and keep .emacs under git
22:04Licensersomnium: I know I know, you can do anything with it but I just want an editor :P
22:04somniumLicenser: though I wonder if 'buy a new keyboard' isnt better advice at this point O.o
22:04Licenserheh
22:04LicenserI do have an english keybard does not save the issue of OS X keys
22:08defn`'lo all
22:08somniumLicenser: aquamacs + english keyboard is also broken?
22:09Licenserno aquamax works with both
22:09Licenserbut not with the .emacs.d directory for config files :P
22:09somniumodd, but no clue about aquamacs, sry
22:09Licenserdon't worry
22:10LicenserI'm not going to code amy more for tonight, it's too f*ing frustrating right now
22:10somniumLicenser: you dont have an actual file called .emacs in your home dir do you?
22:11LicenserYEs I do, and I know that I've to remove it to get .emacs.d working but aquamax ignores emacs.d even if there is no .emacs file
22:11somniumok, nw :)
22:11somniumnm
22:12Licenserit's horrible and gets worst with every houre I think :/
22:26mebaran151_Licenser
22:26mebaran151_if you're not an emacs junkie
22:26mebaran151_try netbeans
22:26mebaran151_it's surprisingly good
22:34defn`mebaran151: too late, he left
22:49mebaran151ah poor dude, busy fighting the 80's
22:53chouserpop quiz!
22:54chouserWhich of Clojure's classes has instances that print with undecorated round parens, and yet does not implement clojure.lang.ISeq?
22:57somniumclojure.lang.Cons?
22:58Licensersomnium:
22:58chousersomnium: reasonable guess. but no.
22:58chouser,(isa? clojure.lang.Cons clojure.lang.ISeq)
22:58clojurebottrue
22:58somniumbah, I used instance :/
23:01chouser,(seq? (cons 1 '(2)))
23:01clojurebottrue
23:01chouser:-)
23:05somniumI used instance on both classes :/
23:09somniumchouser: is this a trick question? it prints readably as ( ... )?
23:10chouserno trick.
23:11chouser(-> x (conj 1)) ;=> (1)
23:11defn`anyone seen _ato lately?
23:11chouser(seq? x) ;=> false
23:11defn`alternatively, does anyone know if liebke's compojure works with the renamed org.clojure/clojure "1.1.0-master-SNAPSHOT" in lein?
23:12chousersomnium: ...though reading that back in will of course create an object of a different type -- PersistentList instead of the type that was printed.
23:13liebkedefn`: that's why I uploaded compojure, to get a copy that worked with the renamed clojure-master
23:13defn`awesome liebke
23:13defn`thanks
23:14defn`liebke: i cant seem to find it on clojars
23:14defn`is it org.clojars.liebke/compojure "0.3.1"?
23:16liebkedefn`: org.clojars.liebke/compojure 0.3.1-master
23:16liebkeyeah, search doesn't work very well
23:16liebkeI usually browse the repository directly now: http://clojars.org/repo/org/clojars/liebke/compojure/0.3.1-master/
23:17defn`liebke: i didn't even know that existed
23:17defn`thanks
23:20chouserno more guesses for my pop quiz?
23:20chouserI suppose I could give a hint.
23:21replacachouser: hang on, I'm working...
23:29replacahmm, I'm thinking that it's a PersistentQueue, but I can't figure out how to make one
23:29replacathe repl blanches at my attempts saying it can't match the constructor
23:30chouserreplaca: you win!
23:30chouserreplaca: did you examine the .java sources?
23:31somniumah
23:31replacaof course.
23:31somniumit implements IPersistentList
23:31chouser,(conj (clojure.lang.PersistentQueue/EMPTY) 1)
23:31clojurebot(1)
23:31chouser,(seq? (clojure.lang.PersistentQueue/EMPTY))
23:31clojurebotfalse
23:31replacaahh, I was trying to invoke he constructor directly
23:31mebaran151why is PersistentQueue so private anyways
23:32replaca*he => the
23:32mebaran151it seems like something general useful, worth having a function like (queue) or something
23:32mebaran151right there in core
23:33mebaran151every now and again I see this question come up and I wonder why its hidden
23:33chouserrhickey has said things about wanting to avoid abuse by people who want some kind of workflow control, like a BlockingQueue
23:33somniuma list is its own seq, a queue is a list, a queue is not a seq
23:33chouserso putting off making it "more public" until a more complete queue abstraction or story is in place. I guess.
23:34somniumchouser: is there a story to the not-a-seq detail?
23:36defnomg the #python channel is brutally stupid
23:36defnso glad to be back here...
23:37knuckolls_are [org.clojure/clojure "1.1.0-master-SNAPSHOT"] and [org.clojure/clojure-contrib "1.0-SNAPSHOT"] the most up to date?
23:37somniumchouser: nm, just remebered the original question
23:39replacahmm, that's interesting. It looks like Rich took okasaki's original idea, but because we have O(1)-ish append vectors, he was able to skip the reverse step
23:39replacaif I'm reading the code right
23:42mebaran151he really is a master craftsman
23:42defnThink: Bob Vila
23:43defnalthough I wouldn't trust Rich to do redo my crown molding
23:43mebaran151now on an even more craftsmen-y level, does anybody have a favorite authorize.net library
23:43mebaran151I have to write some payment code
23:58defn`mebaran151: sorry, no ieda
23:58defn`idea*