#clojure logs

2010-04-20

00:28jsandai'm trying to use clojure.contrib.string but get the following error,
00:28jsandauser=> (require '[clojure.contrib.string :as s])
00:28jsandajava.lang.VerifyError: class clojure.contrib.string$loading__5009__auto____40 overrides final method meta.()Lclojure/lang/IPersistentMap; (NO_SOURCE_FILE:0)
00:28jsandamy deps org.clojure/clojure "1.2.0-master-SNAPSHOT and org.clojure/clojure-contrib "1.2.0-SNAPSHOT
00:29jsandai downgraded them to 1.1.0 but now i get a FileNotFoundException
00:31jsandai'd like to use some of the functions in clojure.contrib.string. can anyone tell me what versions i ca/should use?
00:51livingstonhello
00:52livingstonwell, I just learned a lot about IRC / getting verified with the nickserver, anyway...
00:52technomancyyeah, any chance now that we've got ops we could get that policy change?
00:52livingstonI was trying to sort out the parallelization libaries in clojure
00:52technomancy*changed?
00:53technomancywhenever I connect as my alt nick I can never change back to "technomancy" since it says I'm banned in this channel for not being registered =(
00:54livingston(I don't know, there's some documentation from freenode here, that's roughly what I did, http://freenode.net/faq.shtml#nicksetup )
00:54sexpbot" freenode: frequently-asked questions"
00:55livingstonso the doc on the parallelization lib say it's depricated, but then talks about how to use it, and there are parallelization functions listed on the cheat sheat ...
00:55livingstonanyone know what's up and what API I should be looking at seriously for that?
00:56dakroneack, there are so man compojure libs on clojars, how am I supposed to know which one to use?
00:56technomancydakrone: my guess would be this one: http://clojars.org/compojure
00:56sexpbot"compojure | Clojars"
00:57technomancylivingston: what's deprecated now? what's "the parallelization lib"?
00:57dakronetechnomancy: cool, thanks
00:57technomancydakrone: all "org.clojars.*" versions should be considered non-canonical
00:58technomancy_ato: have you tried to get any volunteers to help implement features?
00:58livingstonthe stuff that's here: http://clojure.org/other_libraries says depricated but then talks about it
00:58dakronetechnomancy: yea, more obvious would help
00:59technomancylivingston: oh dang; I didn't realize the forkjoin stuff was deprecated
00:59technomancyI wonder what's going on there
01:00livingstoni don't think it is, I think it's that wrapper, it's oddly worded
01:01livingstonbecause then there is what's written here: http://github.com/richhickey/clojure/blob/1.1.x/changes.txt ~line 60
01:01technomancyoh, so maybe it's getting mainlined?
01:03livingstonas far as I can tell, so I guess i just need to get the par branch from github, like it says, I was just wonding if anyone has done that or had any experince or docs on it.
01:05Raynes$example into
01:05sexpbot(into #{} '(a b a c d g g w)) => (w g g d c a b a)
01:29livingstonlater, thanks.
01:47chessguyis there some macro for evaluating an expression, but only 1 step of the evaluation, for debugging purposes?
02:09slyphonok, NPE, you're on notice
02:11slyphonwoah woah woah, you can get a NPE in a destructuring bind?
02:11slyphonWTF?
02:12slyphonhow the fuck is that possible?
02:13carkhthe question is : what the f... where you doing ?
02:13carkh=)
02:13carkhwere*
02:15slyphonhttps://gist.github.com/8d9ec7b059168c1a94ae
02:15slyphoncarkh: that
02:15slyphon(essentially)
02:16carkhah
02:16slyphoni'm seriously baffled
02:17carkhi think you should rather look at tyhe effect of passing nil values to the URI. constructor =P
02:17slyphonhrm
02:17carkhembarassing, i know !
02:17slyphonbut why would it say that the NPE was coming from line 1 then?
02:17slyphonno, i'm not embarassed, i make mistakes like that :)
02:18carkhwe all do =)
02:18slyphonit's just that the traceback is telling me the wrong thing
02:18carkhyou might want to try it at thee repl
02:18slyphoni'll just put in some sane defaults
02:20slyphon,(java.net.URI. "http" nil "localhost" 3000 "/path" nil nil)
02:20clojurebot#<URI http://localhost:3000/path&gt;
02:20slyphon,(java.net.URI. "http" nil "localhost" nil "/path" nil nil)
02:20clojurebotjava.lang.NullPointerException
02:20slyphonfuck you, Java!
02:21carkhah expecting an integer it seems =P
02:21slyphon,(java.net.URI. "http" nil "localhost" 0 "/path" nil nil)
02:21clojurebot#<URI http://localhost:0/path&gt;
02:21slyphon!!!
02:22carkh,(java.net.URI. "http" nil "localhost" 80 "/path" nil nil)
02:22clojurebot#<URI http://localhost:80/path&gt;
02:22slyphon,(java.net.URI. "http" nil "localhost" -1 "/path" nil nil)
02:22clojurebot#<URI http://localhost/path&gt;
02:22slyphonmother
02:22carkhhaha that's bad
02:22carkhmagic value !
02:26slyphonGAH!
02:27slyphonwhat a bunch of jerks
02:36slyphoncarkh: thanks
02:36slyphoncarkh: i needed someone to point out the obvious :)
02:36carkh=)
02:47Licenser_morningf
03:33vIkSiThi all
03:34vIkSiTwhat resources would people recommend to learn functional data structures/algorithms using clojure?
03:34LauJensenMorning :)
03:35esjHello all
03:35vIkSiThey LauJensen, esj
03:36vIkSiThrm
03:36vIkSiTlooks like comcast is having troubles
04:08defnvIkSiT: id suggest just reading Programming Clojure, reading other people
04:08defnpeople's code
04:08defnyou will start to see "imperative" style clojure vs functional style
04:08defnit's just time on task
04:09defnaww he left
04:09LauJensentime on task ?
04:10defnyeah, making stuff work
04:10defnwriting code for fun
04:10defnif you don't know a lick about FP I say just jump into the mix and immerse yourself -- you start to understand how it works after you fail enough
04:11LauJensenI say solve Eulers 1 - 50 without any sideeffects, then you're good to go
04:11defntotally forgot about that -- euler was a great way to learn Clojure -- I did exactly what you say
04:11defnalthough I think I kicked the bucket at 47 :)
04:12rysSolve Eulers 1-50 in the same night!
04:12LauJensenThats more sensible than someone like kotarak for instance, how kicked the bucket af 216 I think :)
04:12defnoh my god.
04:12LauJensen(and put the results on clojure-euler.wikispaces.com IIRC)
04:13defni should go back and keep working on my euler stuff -- it's fun to watch your repository grow and grow
04:14defnalthough i can say that euler is definitely not the best way to learn all of clojure -- i knew nothing of certain real life clojure niceties living in the euler bubble
04:14zmilai solved almost all of the second 50 Eulers in clojure :) the first half was in javascript
04:17defn:)
04:22AntonyBlakeyTrying to run autodoc on clojure git head, gives me errors like this: ./src/clj/clojure/core_deftype.clj: failed (ex = java.lang.IllegalArgumentException: Wrong number of args passed to: core$fn (core_deftype.clj:14)). which results in no documentation for things like deftype/defrecord et al.
04:22AntonyBlakeyAnyone seen this before?
04:23AntonyBlakeyActually, mostly this error: failed (ex = java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to clojure.lang.IPersistentVector (protocols.clj:9)).
04:23AntonyBlakeyI'm on OS/X
04:24Chousukehmhm
04:25licoresseI've seen it a lot, earlier ;)
04:25AntonyBlakeyUsing autodoc-0.7.0-standalone.jar
04:25zmilathe main problem in solving Eulers in Clojure is: when I get result in REPL, then I'm lazy to copy and organize the solution pretty
04:25AntonyBlakeyI definitely have the latest sources
04:26Chousukedoesn't look like there's anything weird in core_deftype.clj
04:27Chousukeso most likely it's an autodoc bug
04:28AntonyBlakeyIt happens on 19 source files, yet the gh-pages doc on github includes the docs for the stuff that won't generate for me, so an autodoc bug looks unlikely
04:28Chousukedid you try running autodoc from git?
04:29AntonyBlakeymy next step
04:30Chousukethere's nothing wrong in protocols.clj either
04:31AntonyBlakeyNor in any of the other files.
04:32Chousukezmila: :P
04:32Chousukezmila: use pretty-print
04:33Chousukethough I suppose even better would be to use emacs and slime and write your code nicely organised right from the start :)
04:33AntonyBlakeyBugger, git head has the same problem. I wonder if it's an OSX specific bug.
04:34ChousukeI'll give it a try
04:34AntonyBlakeyThanks
04:35Chousukewhat's the command you're using to build the docs?
04:35AntonyBlakeyjava -jar<path to autodoc.jar>
04:35AntonyBlakeyIn the clojure checkout
04:35AntonyBlakeydir
04:36hoeckAntonyBlakey: are you using the latest clojure? there were some breaking changes to deftype recently
04:36AntonyBlakeyright this second git head
04:37AntonyBlakeyAnd autodoc craps out on walk.clj, xml.clj, set.clj ...
04:37ChousukeI get it too.
04:38AntonyBlakeyHmm. I wonder how Tom generated the clojure.org docs then ... they include defrecord and deftype. Oh well.
04:39Chousukeit craps on the ns forms
04:41AntonyBlakeyNot in core_deftype - it fails on the first defmacro
04:43ChousukeI wish it printed the entire stacktrace :/
04:52Chousukehm. can't seem to be able to extract a stacktrace out of it
04:53ChousukeI suppose you need to send mail to the autodoc maintainer
04:54AntonyBlakeyI can get a stacktrace with a source mod.
04:54Chousukeso what function throws the error? :/
04:55Chousukeor rather, what function call the function that throws the error? :P
04:55Chousukecalls*
04:55AntonyBlakeyclojure.lang.Compiler.analyzeSeq(Compiler.java:4599)
04:56Chousukehm. that's not the right one
04:56AntonyBlakeynot much help. It's actually clojure not compiling the source
04:56Chousukeor if it is... eep
04:56Chousukehm, might be a problem with the included clojure version actually
04:57Chousukeit's using 1.1.0 to laod 1.2.0 sources :/
04:57Chousukelet's try upgrading the dependencies...
04:57AntonyBlakeyhttp://gist.github.com/372213
04:57AntonyBlakeyI did that, gave a different error.
04:58AntonyBlakeyMaybe that's the error to track down.
05:00AntonyBlakeya pprint error
05:00Chousukeright. and that's the error that you get when you try to reload clojure.core
05:05Chousukeit doesn't seem like --load-except-list works either :(
05:07AntonyBlakeyI can't work out how to load the param file for clojure that comes with the autodoc src.
05:08AntonyBlakeyIt specifies not to load core.clj and parallel.clj
05:09AntonyBlakeyAmongst other things.
05:20ChousukeAntonyBlakey: I have no idea either :P
06:03vu3rddLauJensen: your emacs screenshot on the grand tour blog looks awesome.
06:03vu3rddwhich color theme is that?
06:03LauJensenThe one I mention in the preceding post: http://www.bestinclass.dk/index.php/2010/03/approaching-productivity/
06:03sexpbot"Approaching Productivity | BEST IN CLASS"
06:06vu3rddLauJensen: Thanks
06:06LauJensenvu3rdd: np :)
06:19defnbest way to serializing a single clojure datastructure? (spit (java.io.File. data.dat) @*some-ref*)
06:21bsteuberdefn: I've got (with-out-writer filename (prn obj)) - but no idea if it's better or worse
06:21LauJensen(spit file (prn obj))
06:22bsteuber,`spit
06:22clojurebotclojure.contrib.duck-streams/spit
06:23LauJensenduck-streams? A little outdated are you
06:24unfo-duck-streams aren't relevant anymore?
06:24LauJensenNot since they renamed to 'io'
06:24unfo-aah. kewl. ty :)
06:25LauJensennp :)
06:27licoressesomeone ping me
06:27LauJensenWe'll need an IP :)
06:28Licenser_failed
06:28licoresse:) np
06:28licoresseapple routers s***
06:29licoresse(sometimes)
06:30LauJensenGoes for anything made by apple IMHO
06:31licoresseI'm not so clever I could survive on anything different
06:32licoresseLauJensen: Like your post on erc
06:32LauJensenGreat :)
06:32licoresseI did the same here, but using growl.el instead
06:33licoresseI did it for compiler notifications too
06:33LauJensenIts quite handy I think - Only thing I need, is that if I accidentally leave Emacs in #clojure and leave the computer, I'll probably miss any and all highlights since I left :)
06:34licoressejust use some enlive to scrape todays log
06:35defn:)
06:35defnenlive was so weird to me at first
06:35defnbut it makes so much damned sense now
06:36Licenser_hmm do refs have something like hooks? so I get the stuff in alter?
06:36LauJensen,(doc add-watch)
06:36clojurebot"([reference key fn]); Experimental. Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, its new-state. Whenever the reference's state might have been changed, any registered watches will have their functions called. The watch fn will be called synchronously, on the agent's thread if an agent, before any pending sends if agent or ref. Note that
06:37Licenser_ah neat
06:40LauJensenthe watch is hooked on each datastructure, so I think you'll have to roll your own
06:40licoresseor just replace the add-watch fn
06:41licoresseno time this week
07:38defnclass com.stuartsierra.lazytest$loading__5009__auto____3 overrides final method meta.()Lclojure/lang/IPersistentMap;
07:39defnideas?
07:41defnit's kind of a bummer to have seen circumspec, and now lazytest, and to have followed their development for what seems like ages, not ever being able to get them to work
07:41chessguyis there some macro for evaluating an expression, but only 1 step of the evaluation, for debugging purposes?
07:41hoeckdefn: someone tried to extend a final method
07:41defnchessguy: (macroexpand-1)?
07:42defnchessguy: oh i see what you mean
07:42chessguyyeah, not for macros
07:42rhickeydefn: what are you doing when you get that message?
07:42defn(use 'com.stuartsierra.lazytest)
07:42hoeckchessguy: clojure-debuggers are in the works, meanwhile you can use java debuggers to do that
07:43cemerickdefn: smells like trying to use a lib AOT-compiled for 1.1 with 1.2
07:44defncemerick: that might be it -- perhaps stuart is moving lazytest to 1.2 and hasn't cleaned it all up yet
07:44cemerickdefn: it's not a matter of cleaning anything up -- stuff that's AOT-compiled for 1.1 is not binary compatible with 1.2
07:44defncemerick: i specifically saw 1.2.0-master-SNAPSHOT and 1.2.0-SNAPSHOT
07:44chessguyprobably a code smell anyway, i need to break up these 30-line functions into smaller pieces
07:45defnbut it might be a user error -- ill rebuild the jar -- i just found this guy hanging out in target/
07:45cemerickmaybe, but when in doubt, load the lib from sources or a source jar instead of an AOT-compiled jar
07:46defncemerick: *nod* -- im not familiar with mvn, i did a mvn install in the project root and found this in target/ as i said
07:47defnanyway, before i take up anymore of your time let me try a few things -- thanks!
07:47cemericksure. FYI, AOT compilation and maven are orthogonal. It's just a matter of what's been configured to happen upon building.
07:49bpsmI'm having a terrible time building contrib master against clojure master.
07:49bpsmI posted a message about it
07:49bpsmhttp://groups.google.at/group/clojure/browse_thread/thread/1830a793986c4935?hl=de#
07:49bpsmany ideas?
07:50rhickeybpsm: the very latest? I spent the weekend and yesterday fixing that
07:50bpsmyea, I know...
07:50bpsmand I'm not seeing it on my mac anymore, but I get it consistently on my quad-core linux
07:51rhickeybpsm: what Java on the Linux?
07:51bpsmJava version: 1.6.0_10
07:51rhickeySun/er, Oracle's Java?
07:52bpsmrhickey: sun's
07:52rhickeyum, now Oracle has 2 Java's, aargh
07:52defnwait...what? 2 javas?
07:52bozhidaryes
07:52bozhidarjrockit as well
07:52bozhidarfrom BEA
07:53Licenser_chessguy: o.O
07:53chouserwell, the sun one is techincally oracle's now. :-/
07:53Licenser_2 javas?
07:53bozhidarwhich they acquired with WebLogic...
07:53rhickeybpsm: you are absolutely certain you have clean builds of both Clojure and contrib, and your contrib build is using that Clojure?
07:53chessguyLicenser_, ?
07:53bozhidarLicenser_: JRockit being the second one
07:53Licenser_I am scared of someone having 2 javas
07:53bpsmrhickey: yes, I'm certain (see the reproduction script inlined in my message)
07:54bozhidarI hear they are planning to merge some of the features of JRockit into the standard distribution
07:54defnthere are two javas: http://en.wikipedia.org/wiki/Java and http://en.wikipedia.org/wiki/Java_(programming_language)
07:54sexpbot"Java - Wikipedia, the free encyclopedia"
07:54bpsmrhickey: (I keep hoping I'm doing something obviously stupid, but I can't find it yet.)
07:54bozhidarso they might not be two for long...
07:54bpsmrhickey: the repo script gets fresh copies of both repositories form github and builds from those.
07:55bozhidardefn: there are actually more javas - the coffee, the island ... :-)
07:55bozhidarsome people spell them jawa though...
07:55rhickeybpsm: what if you use commit 19dd3c593e7a29cbca514c6ab7424ff22e353cc6 of CLojure?
07:56chessguyanybody played around with porting any of the code from the SICP videos (http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/) to clojure?
07:56defnbozhidar: my first link was to the island :)
07:56bpsmrhickey: 19dd3c59, the same error, the last time I tried.
07:57defnchessguy: yes, let me grab the link
07:57bpsmrhickey: will adjust the repo script accordingly to try it again...
07:57defnchessguy: http://sicpinclojure.com/
07:57sexpbot"SICP in Clojure"
07:57bozhidardefn: I assumed it was the Java platform - too much Java development can do that to someone's mind :-)
07:57rhickeybpsm: I don't see wher eyou are forcing contrib build to use a specific version of Clojure: -Dclojure.jar=...
07:57chessguymm, the book is a little different from the videos
07:58defnchessguy: ah, my fault -- chessguy, do you want to work on it together? id like to watch those videos
07:59bpsmrhickey: "mvn -e -Dclojure.jar=$CLOJURE package", no?
07:59chessguydefn, i already started on porting code from one of the lectures
07:59bsteuberbpsm: I've got exactly the same problem
07:59defnwhich lecture? perhaps we could combine, fill in the gaps and such
07:59chessguydefn, there's a really cool generic simplification engine that they build in episode 4a. was hacking on it until like 1 am last night
08:00bsteubergave up this morning to focus on other work, though
08:00chessguydefn, i have yet to find any code online anywhere in any language for that
08:00chessguyso i'm porting it directly off the slides in the video
08:00defnchessguy: awesome man -- ive actually downloaded all of those videos but never got around to finishing more than 1 and 2
08:00bpsmbsteuber: yea, I may have to move my current project back to 1.1 as contrib.json stopped working for me yesterday in connection with this problem
08:00chouserI just rebuilt the latest clojure and contrib on linux -- no problem at all.
08:01defnbuilds for me as well
08:01chouserbpsm: I didn't use -e on my mvn line
08:01chessguydefn, they are totally awesome. should be required watching for every single programmer
08:01defni also did not use -e
08:01bpsmchouser: good that it works for someone.
08:01chouserbpsm: :-/
08:01bpsmchouser: I only used -e for the output it produces. i've run it without -e and gotten the same result.
08:01chouserthis is java 1.6.0_16-b01
08:01rhickeybpsm: I don't grok your shell stuff well enough to see that
08:02chessguydefn, this simplifier is like 100 lines of code, but it would probably be 1000 in other languages, and not as expressive
08:02chessguythough....it's not actually working yet...
08:02bpsmrhicky: i've rerund my repro script for 19dd3c and see the same badness. (what am I missing?)
08:03defnchessguy: cant wait to get to it, im going to continue watching right now in fact :) and chessyguy, if you are interested in combining code into a consumable repo of code examples for the videos let me know -- ill start compiling as i watch
08:03rhickeybpsm: 19dd3c is quite neutered, it's hard for me to imagine it doing anything like what preceded or followed it
08:03chessguydefn, i've already committed to doing a similar port of the code in 4b for the math club in our company
08:04rhickeybpsm: in particular, if you are getting:
08:04rhickeyCaused by: java.lang.NullPointerException
08:04rhickey at clojure.core.protocols$fn__6000$G__5996__6004.invoke(protocols.clj:11)
08:04bpsmrhickey: it's hard for me to imagine too
08:04rhickeythen you are definitely not using the right version, as protocol based reduce was commented out
08:04bsteuberbpsm: it builds for me with -Dmaven.test.skip=true
08:04rhickeyCaused by: java.lang.NullPointerException
08:04rhickey at clojure.core.protocols$fn__6000$G__5996__6004.invoke(protocols.clj:11)
08:04rhickey at clojure.core$reduce__6111.invoke(core.clj:4719)
08:04chessguydefn, yeah, i probably need to start a github repo somewhere
08:05bsteuberthough I'm not sure if everything's fine with that build
08:05bpsmrhickey: no, I get teh java.lang.IllegalArgumentException: No method in multimethod '*' for dispatch value errors that come from complex-numbers
08:05rhickeybpsm: could you please paste/gist the full stack trace you are getting with 19dd3c593e7a ?
08:06bpsmrhickey: will do
08:08defnchessguy: chessguy http://github.com/defn/clojure-sicp
08:08chessguywow
08:08chessguythat was fast
08:09defnchessguy: it's only a few commands
08:09chessguyyeah, i haven't really fiddle with github before
08:09bpsmrhickey: http://gist.github.com/372353 is partial, clojure unit tests don't write the full traces anywhere obvious.
08:10defnchessguy: oh -- it's pretty easy -- pm me if you need help with anything.
08:11chessguydefn, some of the code samples will be the same as or similar to the book, but i personally wouldn't mind re-implementing them anyway
08:11defnchessguy: yeah it's just a little knowledge project. who knows, it might be useful to someone at some point...
08:12bpsmrhickey: I'm trying to reproduce it in test-json by removing the test-complex-numbers test to see if I can get a clearer stack trace.
08:13|jowag|Hi there!
08:13|jowag|I can redirect *out* with binding macro, but it only works (correctly) for current thread. Is there a way to redirect *out* for current and all other threads created later?
08:14chessguydefn, am i better of /msg defn i want to clone that repository, right?
08:14chessguyha
08:14chessguy#fail
08:14cemerick|jowag|: binding is thread-local by definition
08:15chessguy#morecaffeineneeded
08:16|jowag|cemerick: I know, that's why I'm finding something else to perform the redirection
08:16Licenser_jowag: you can use functions to do that
08:17cemerick|jowag|: rebinding *out* globally (or permanently swapping out System.out) is almost never a good idea. What are you fundamentally trying to do?
08:17Licenser_like (future x (fn [] (binding [*out* *out*] (your code))))
08:17Licenser_or something like that I guess
08:20|jowag|cemerick: I'm trying to remotelly control REPL without swank, so I assumed my custom server will need to redirect *out* so I can send it to the client :)
08:20bpsmrhickey: the good news is that I can't reproduce the problems with json
08:21bpsmrhickey: those came up toward the end of the weekend thread
08:21bpsmrhickey: and showed the connection to protocols
08:21rhickeybpsm: you have 2 completely unrelated problems, all those related to protocols are gone, this is just a multimethod thing with complex
08:22bpsmrhickey: ok. two problems. not related.
08:22bpsmrhickey: still don't unerstand why the multi-method related builds fail for me on linux and not on mac os, but i'll continue to investigate this evening. maybe i'll figure it out.
08:24hircusbpsm: same JVM version on both?
08:24cemerick|jowag|: The rare valid use case. Most people asking that are actually looking for a logging framework or something. :-)
08:25bpsmhircus: 1.6.0_10, _16, _15, _19, but all on linux
08:26cemerick|jowag|: you want alter-var-root
08:26cemerick,(doc alter-var-root)
08:26clojurebotDENIED
08:26cemerickhrm
08:26_atobpsm: which revision of contrib are you testing with? I can't see that in the reproduce log you posted to the list
08:27cemerick|jowag|: there's a variety of remote repl servers out there already though. *shrug*
08:27|jowag|cemerick: Yep, I was thinking about it, but I don't know if it won't have some nasty side-effects
08:27bpsm_ato: you're right the mvn download output barfed all over it.
08:27bpsm_ato: it's af2a730fde0d8df0ab4a41153580105a36a20e7f
08:28|jowag|cemerick: well I know of swank and nailgun, any other repl servers you know of?
08:28cemerick|jowag|: if you do it wrong, it certainly will. Worth noting is that stuff written to System.out doesn't go through *out*, so that's something to consider.
08:28cemerick|jowag|: enclojure has one; very nice, small, easily-embeddable API
08:31chessguydefn, you still around?
08:31SynrGwin 2
08:31SynrGbuh
08:34defnchessguy: i am
08:34_atobpsm: :/ I just ran your reproduce script on (Arch) Linux x86_64 (Sun java 2.6.0_20) and it succeeded with those revisions as well
08:37Licenser_sun jav 2.6?!?
08:38_atotypo
08:38_ato1
08:38|jowag|cemerick: thanks, I'm gonna look into it
08:38Licenser_ah okay IU was scared ther e:)
08:41Licenser_hi _ato by the way
08:43_atoaah
08:43_atogot it
08:43_atoreproduced it I mean
08:43_atoon a Ubuntu box with 1.6.0_15
08:43_atoi686
09:02rhickey_ato: can you please paste a stack trace?
09:06_atorhickey: http://gist.github.com/372402
09:06_atosame as bpsm, I'm working on pulling it out of maven and trying to isolate it now
09:06rhickey_ato: thanks
09:12zmila,(reduce (fn [acc [k v]] (assoc acc v (conj (acc v) k))) {:a 1 :b 1 :c 1})
09:12clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection
09:13zmila,(reduce (fn [acc [k v]] (assoc acc v (conj (get acc v []) k))) {:a 1 :b 1 :c 1})
09:13clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection
09:13zmila,(reduce (fn [acc [k v]] (assoc acc v (conj (get acc v []) k))) {} {:a 1 :b 1 :c 1})
09:13clojurebot{1 [:a :b :c]}
09:14zmila,(reduce (fn [acc [k v]] (assoc acc v (conj (acc v) k))) {} {:a 1 :b 1 :c 2})
09:14clojurebot{2 (:c), 1 (:b :a)}
09:17_atorhickey: seems the problem might actually be being triggered by clojure.contrib.test-load-all if I take that test out then test-complex-numbers succeeds
09:18_atoah.. so it reloads everything
09:23rhickey_ato: so, depending on the set sort, may reload the defmethod that complex has already updated, not to be updated again
09:24avarI've forgotten the term used for "a language whose syntax is made up of its core datastructures" which applies to all lisps, someone help me out :)
09:24chouserhomoiconic
09:24avarthanks:)
09:27chousernp
09:29cemericksome bold claims: http://blogs.perl.org/users/leon_timmermans/2010/04/why-perl-6-is-different.html
09:29sexpbot"Leon Timmermans at blog.perls.org: Why Perl 6 is different"
09:30_atorhickey: yes, I think you're spot on
09:30rhickeyso we need to either pull test-load-all or force it to run last
09:31_atohttp://gist.github.com/372430
09:31_ato^ consistent on both machines
09:32avarcemerick: How funny. I was just about to reply to that:)
09:32cemerickavar: M-expressions, fully realized (ostensibly)?
09:33avarcemerick: In theory anyway.
09:37Licenser_cemerick: I find the rules idea pretty interesting
09:37Licenser_so I think it is 'too powerful' for the easy things so it will be a cool but hardly used feature
09:38rhickeyanother option is to have defmulti generate defonce
09:38rhickeysince this is a general reloading issue
09:38avarRules are used to parse Perl 6 itself. It's a very nice feature. I wish it was available in other languages, like clojure :)
09:39AWizzArdrhickey: if you are not too busy right now: did you see my messages to you some days ago, where I reported a bug in Cells?
09:39cemerickLicenser_: The syntax for rules itself looks pretty rough.
09:39rhickeyAWizzArd: I'm not supporting cells right now
09:39avarEssentially perl 6 rules are just a way to move what was previously individual regex ops into subroutine calls. So you can write parsers just like you'd write classes.
09:39rhickeyAWizzArd: got my hands full prepping for 1.2
09:39cemerickMost people have a hard time with sexpr macros, so more complicated metaprogramming systems are going to have even less uptake.
09:40rhickeyAWizzArd: do you think your cells problem indicates a problem with deftype et al
09:40rhickey?
09:40AWizzArdrhickey: yes, I understand it. I just wanted to inform you about it. It's a fix of just 6 loc. It comes from deftype. (deftype Foo [a]), (:a (Foo. 10)) ==> nil
09:40avarcemerick: Sure, that's my worry as well. But that was always going to be the case with M-Expressions wasn't it ?:)
09:41Licenser_cemerick: YeaI had a really hard time to understand all the stuff even for simple things
09:41AWizzArdYou use the field :lock in Cells, and try to access its value via (:lock some-cell). But now instead of :lock we should use (cell-sentry some-cell) instead. That's it. Shows up at 7 places in the code. Very small fix.
09:42SynrGwin 2
09:42Licenser_avar: yes it is an interesting feture but the question is is it really needed?
09:43avarcemerick: Perl 6 (which is still evolving) does a somewhat good job of bringing you there. e.g. if you'd write (defun + (a b) (plus a b)) in lisp you'd write multi sub infix:<+>(Num $a, Num $a) { plus($a, $b) } in Perl 6. The infix:<> in turn being defined in a grammar rule that you could override
09:43rhickeyAWizzArd: so, not a problem in deftype, but in cells.clj?
09:43avarLicenser_: I have no idea, for some value of "needed" :)
09:43Licenser_*g*
09:43AWizzArdrhickey: I would say so, yes. If deftype is not supposed to support the (:field obj) syntax anymore, then it is in cells.clj.
09:44rhickeyAWizzArd: so, will have to wait
09:44Licenser_avar: what I mean is, it is cool but may of the cool things are nearly useless (or unused) in 90% of the cases
09:44_atorhickey: yes, it would be nice if reloading was safe, but I can see this happening any time there's a an arrangement where one namespace "registers" something with another (whether by multimethods or some other means). I guess the only way to get around that would be to reload all the dependent namespaces transitively, which might well break other things
09:45rhickey_ato: there is a general issue for that transitive reloading, no progress recently. Too big to take on now
09:45AWizzArdrhickey: yes sure, was jfyi. I fixed it locally on my system.
09:45avarLicenser_: Being able to do more metaprogramming is always good. There's a lot of neat stuff being done in Perl 5 with the metaprogramming facilities it has already.
09:45rhickeyAWizzArd: ok, I'm sure I'll trip over it next time I update :)
09:45AWizzArdgreat :-)
09:45avarLicenser_: Perl has bettes support for higher order functions and introspection than any other syntax-heavy language I know of, which gets used a lot in practice.
09:45avaranyway I'm going to stop blathering about Perl 6 in #clojure :)
09:45Licenser_heh
09:46chousermodular regex I'm sure would be very nice for certain problem domains
09:46Licenser_I found the regexp support in java/clojure a bit sad
09:47avarModular regexes are good for anything you use regexen for, them being just strings kind of sucks for anything complex
09:47Licenser_I wanted to write a tokenizer and failed to find a performant way to parse the syntax since I did not find something like 'find the next matching token' I'm sure perl 6 would be great there
09:48_atorhickey: not sure I entirely understand the purpose of test-load-all but if it really is just a simple sanity check to make sure all namespaces in contrib are loadable, probably just taking out :reload would do it. Or I guess removing them all with remove-ns first and then loading them again (without :reload)
09:49rhickey_ato: I'm more inclined towards a general fix, as people trip over this in the repl as well
09:49rhickeyalmost done
09:50_atoyep it has bitten me as well at the REPL. :)
09:53chouseravar: well, we do have #"" which is ever so slightly better than plain strings. But I agree something better should be possible.
09:53chouserIt makes sense that perl would put that better thing at the root of the whole language, and it'll be interesting to see how that pans out. I think the right solution for Clojure will look a bit different.
09:53qbgDo any of the Clojure IDEs hid the javaness of exceptions?
09:56qbg*hide
09:59hamzagents what is the difference between >> and >>> bit operators in Java?
10:00Licenser_>> is much bigger and >>> is realy really much bigger?
10:00_atohamza: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/op3.html
10:00sexpbot"Bitwise and Bit Shift Operators (The Java&trade; Tutorials &gt; Learning the Java Language &gt; Language Basics)"
10:09avarcemerick: Anyway, I replied at http://blogs.perl.org/users/leon_timmermans/2010/04/why-perl-6-is-different.html
10:09sexpbot"Leon Timmermans at blog.perls.org: Why Perl 6 is different"
10:12chouserI was once pretty excited about Perl 6. Now I see mutable collections and just feel tired.
10:12mefestoI'm taking a first look at leiningen and was wondering if this is becoming the defacto standard build setup for clojure projects? Is this mainly for clojure only projects and maven for mixed?
10:13chousermefesto: if you're comfortable with maven, I'm not sure there's much value in using lein.
10:13mefestochouser: so it's a simpler alternative if you don't want to learn maven?
10:15chouserI shouldn't say much as I don't know much, but a log of people who are intimidated by maven seem to enjoy lein.
10:15mefestook thanks. looking forward to "the joy of clojure" btw.
10:16hircusmefesto: Incanter just moved from Maven to Lein, so you might want to ask there about the rationale
10:17Chousukechouser: I had to code some python the other day and I found myself continuously annoyed by little things like dictionaries throwing exceptions when keys are missing and that you can't actually do "for (k, v) in dict:" ...; or that x, _ = foo fails if foo has only one element; etc...
10:17mefestohircus: will do, thanks. I've been using ant this whole time and am just fed up :)
10:18Chousukechouser: overall, I think python is a nice language, but the little things are suprisingly important :/
10:19Chousuke(I think newer versions of python might support the k,v iteration of dicts but 2.4 doesn't)
10:22Chousukealso I kept assuming that methods of lists return the list :P
10:22arbschtChousuke: but you can k,v iterate over dict.items() iirc
10:23Chousukearbscht: yeah, but I don't see why that's necessary :/
10:23hircusarbscht: yes; in fact you still have to do that if you want k,v iteration even in 2.6
10:23ChousukeI suppose it has something to do with the python philosophy of "explicit is better than implicit" but I think it fails in this case :P
10:24hircusChousuke: if Python were to support multiple return values, then there is a clean way to support both for k in d: and for k,v in d:
10:25Chousukehircus: well, I really wouldn't mind if only the latter case were supported, as in Clojure.
10:25hircusbut there'd be a performance cost, presumably, in the case where you really only want the keys
10:25hircusI guess d.keys() already handle that
10:25Chousukeyes.
10:25digash,(deftype Foo [#^String bar])
10:26clojurebotDENIED
10:26digash[ 1] bar : Object
10:26digash
10:26digashis this intentional, bug or not implemented yet?
10:30rhickeydigash: not implemented, only primitives and Object right now
10:30rhickeythe hint will still work, but the field type will not be limited
10:31rhickeyi.e. the hint will avoid reflection in uses of the field
10:33digashgot it, i guess the constructor signature will reflect that too when it is implemented
10:33bsteuberhow do you guys organize your local javadoc?
10:35rhickeydigash: right now it follows other hints, non-primitives are type hints but not storage or argument restrictions
10:38digashrhickey: in the future, is there any reason not to do an argument restrictions. I think it will make producing libraries for Java consumption easier.
10:39rhickeydigash: it's on the todo list
10:40rhickeycemerick: could you please put in an issue for the ns + :gen-class thing you found the other day?
10:40rhickeyI don't want to drop it
10:42digashrhickey: cool, is there an official todo list or is there a ticket I could track?
10:44rhickeydigash: https://www.assembla.com/spaces/clojure/tickets/252-support-typed-non-primitive-fields-in-deftype
10:44sexpbot"#252 - Support typed non-primitive fields in deftype (New) | Clojure | Assembla"
10:44cemerickrhickey: sure, np.
10:45rhickeycemerick: you can put it in 1.2 milestone
10:45cemerickrhickey: you want a patch too, or no?
10:46rhickeycemerick: I got tripped up on something given the straightforward fix, then got pulled onto more pressing things, feel free to give it a shot
10:46digashrhickey: awesome, thank you.
10:52cemerickrhickey: the most straightforward fix seems to be (into {} (partition 2 options)) in gen-class -- that didn't pan out for you?
10:53rhickeycemerick: no, I got some error
10:53cemerickhrm, OK
10:54rhickeycemerick: when calling compile explicitly
10:54cemerickrhickey: as opposed to via clojure.lang.Compile, etc?
10:56rhickeycemerick: (compile 'the.thing.you.gave.me) was as far as I got
10:56cemerickok
10:57bsteuberrhickey: do you confirm received CA's? Or should I just assume it arrived after like 2 weeks and start proposing patches?
10:58rhickey_ato or bpsm: could you please try the latest clojure in the context where you were seeing failed contrib build on complex? thanks
10:59rhickeybsteuber: your name will appear here: http://clojure.org/contributing. Note I don't check every week
11:00bsteuberrhickey: ok, thx
11:01rhickeycemerick: if that's working for you then I might have tripped on the other problems, since fixed
11:02rhickeycemerick: it should just be that simple fix
11:02cemerickrhickey: I'll give it a whirl later today, I'm off in faraway lands at the moment. :-)
11:03rhickeycemerick: I'll try again if you could point me to that gist again
11:04cemerickrhickey: http://paste.lisp.org/display/97911
11:05bsteuberrhickey, _ato, bpsm: the newest clojure commit fixes the complex number bug for me
11:06rhickeybsteuber: this during contrib testing phase? was it reproducible for you before the fix?
11:08bsteuberrhickey: yes
11:08rhickeybsteuber: great - thanks!
11:23_atorhickey: yep, the fix worked on my machine as well
11:23rhickey_ato: great, thanks
11:28shayfrendtpop quiz of the day! why is this run-tests! method always returning a status code of 0 when run with leiningen? https://gist.github.com/31356c45d66b3594de17
11:29shayfrendt(since that screams n00b, feel free to kick me back to the ruby channel... :-)
11:34Chousukeleiningen is actually a bash script
11:34Chousukemaybe it just ignores the return value of java?
11:34Chousukeor maybe there are no failing or erroneous tests ;P
11:35_atorhickey: this fix means we can no longer redefine the multimethod (eg to change the dispatch function) though, right? (well without undefining it explicitly)
11:37_atoI guess it has to be one or the other
11:37djpowelljust spotted a japanese translation of stuart's book with a quirky cover
11:38hircusdjpowell: URL?
11:39djpowellhttp://shop.tsutaya.co.jp/book/product/9784274067891/
11:39sexpbot"????????Clojure/???????????? - TSUTAYA ??????????? - ?"
11:39stuartsierraI like the cat
11:39shayfrendtChousuke: hehe console output: https://gist.github.com/9b42a842ba3049a6672a I think you're right though...perhaps the bash script isn't outputting the error codes properly
11:43hircusstuartsierra: yah. perhaps someone should design a cat-based mascot for Clojure? (assuming Rich is not a dog-person)
11:43fogus_The guy who translated Stu's book has a great Scheme site: http://practical-scheme.net/
11:49hircusfogus_: ah, he's the Gauche guy? cool
11:50hircusanyone knows if in the Japanese translation, he wrote an introduction? would be interesting to read the perspective of a Scheme expert on Clojure
11:51rhickey_ato: there is now remove-all-methods, but yes, must undef to change the dispatch function
11:52hircus(at Indiana University, where the programming language faculties are Scheme heavy, Clojure tends to meet with some.. skepticism)
11:53rhickeyhircus: no cat mascots for Clojure please
11:54hircusrhickey: was half tongue-in-cheek. No animal mascot at all, then?
11:54cemerickhrm...
11:54cemerick~mascot
11:54clojurebotthe official mascot of clojure is a futuristic ninja robot
11:54cemerickI was never that fond of the ninja thing, though.
11:54cemerickrhickey: oh, seriously, their pupils are two parens! :-P
11:54fogus_cemerick: I was when I was 8
11:55cemerickninjas are fine; ninja mascots? *shrug*
11:55cemerick"hey mister, your ninja is draggin'!"
11:56cemerickMy cat writes half my code.
11:57fogus_cemerick: I vote Tom Servo... or Torgo as the official mascot
11:58pjstadigninja robots have stm built in
11:58pjstadigcats do not
11:58cemerick+1 on Tom Servo :-)
11:59stuartsierralooks like a Dalek
11:59danlarkinEXTERMINATE
12:00pjstadighehe Tom Servo
12:00fogus_Official Clojure phrase: MITCHELL!
12:00pjstadigi'm not sure he looks like a ninja, tho
12:03technomancyshayfrendt: I haven't figured out a way to pass exit codes from the project subclassloader to the main leiningen code yet
12:03cemerickpjstadig: what he lacks in combat skills he more than makes up for in cunning and wit.
12:03pjstadigthe other requirement is futuristic...can't just be a ninja robot
12:04technomancythe security settings of the subclassloader prevent it from exiting
12:06hircusgtg -- bye all
12:23chessguydefn, ping?
12:35cemerickfogus_: helluva lot of hand-waving
12:36stuartsierramost programming language comparisons involve a lot of hand-waving
12:36fogus_I not even sure where to go with that post. I think I'll just stare at that XKCD comic
12:37cemerickRight.
12:37cemerickfogus_: The funny thing is, lots of these sorts of "debates" are won simply by showing up and being louder.
12:38fogus_I tend to prefer the fingers-in-ears-screaming-lalalalalalalala method of debate
12:40technomancycontroversy gets readers; that's how the Internet works
12:42fogus_technomancy: You mean things like "Macros are the equivalent of Godwin’s Law."
12:45_atoI've yet to read a good article that tries to "compare" Clojure and Scala -- they all seem very superficial, and as you say more about trying to generate controversy than really do any justice to either language
12:47stuartsierrabecause no one makes serious use of both at the same time
12:47stuartsierrareally?
12:47fogus_I work a lot in Scala at work.
12:48fogus_Used to do some monkey work in the code itself also
12:48stuartsierracool
12:48stuartsierraso what's your take?
12:48fogus_Having said that. I think it's pointless to draw a comparison
12:49stuartsierrafogus_: heh
12:49fogus_You can squint and say "well this looks like that, and that looks like this other thing", but that doesn't tell you much
12:51fogus_As for that post, I wouldn't want to replace my macros with compiler plugins. :p
12:53cemerickAbout the only meaningful similarity is that they're both on the JVM -- which is an important connection. Other than that, just about everything is different enough to admit that they're on completely different branches of the family tree.
12:55stuartsierrafogus_: just gwin and bear it
12:56fogus_I want the head of whomever invented CSS
13:00chouserAny discussion of Clojure that sums up its approach to concurrency as "STM" is suspect.
13:02shayfrendttechnomancy: thanks for the feedback - went out to lunch. i think for now we can probably just write a bash wrapper script with a regex that looks for "FAIL" in the console output :-)
13:03slyphondoh!
13:03slyphonwhy isn't def- public?
13:03chouserthere's no such thing as 'def-' is there?
13:03slyphonno?
13:04chouserthere's defvar- in contrib
13:04slyphon(def #^{:private true} *blah* "this is private")
13:04slyphonchouser: there's a def- in core
13:04slyphonit's just not exported
13:04slyphonpublic, whatev
13:05chouserare you sure?
13:05tomojI can't seem to (:gen-class :main false)
13:05tomoj"Duplicate key: :main"
13:05tomojin 1.2.0
13:05chousertomoj: ha! nice.
13:05slyphonhrm
13:05slyphonchouser: damn, i thought i saw one
13:06tomojsimilarly I can't supply a different :name
13:06slyphoni guess i just dreamed it
13:06chouserI've been wrong a lot today, so I wouldn't be surprised if you found it.
13:06slyphon:)
13:06tomojI guess in 1.2.0, gen-class/proxy for jetty might be outdated?
13:06redingertechnomancy: So do you have any kind of CI around your lein projects?
13:07cemericktomoj: it's a known bug, I'll hopefully have a patch into rhickey today
13:07sattviktomoj: I believe it's a bug in 1.2. I remember reading about it somewhere.
13:07chousertomoj: I think gen-class itself is broken.
13:07chousercemerick: oh, that's the one you were working on?
13:07tomojyeah, but now we also have alternatives to gen-class, right?
13:08cemerickchouser: yes, though not much yet
13:08cemericktomoj: just take out the :main false for now
13:08chousernope, nothing replaces all of gen-class yet, though that will be a happy day...
13:08tomojah
13:08sattviktomoj: I don't think so, not if you want to subclass a class, rather than just interfaces.
13:09tomojwell I think I don't even need this gen-class stuff anyway, I'm looking at http://www.deepbluelambda.org/programming/clojure/generate-your-class-and-proxy-it-too
13:09sexpbot" Generate your class and proxy it too : Deep Blue Lambda"
13:09tomojbut all I want to do is start jetty with a .war, not create my own servlets, so.. probably don't need any of this crap
13:09sattvikNo, you don't need gen-class or proxy for that.
13:10chouseryou're sure you don't need a named class for a .war?
13:10cemericktomoj: you need at least one gen-class, as chouser suggests.
13:10cemerickto do a .war deployment, that is
13:11hiredmancan't you use a deftype for that these days?
13:11tomojthe .war is already there
13:11tomojit's not clojure stuff
13:11sattviktomoj: If you already have a war file, you just need to do the embedded Jetty part.
13:11tomojI just want to start jetty and point it at that war in clojure, so that clojure is in the same jvm as jetty
13:11tomojsattvik: oi, I feel like I should already understand this with all the help you gave me
13:12cemerickhiredman: that's a good point -- deftype names should be stable now, though I don't know if they're stable as in "obvious" or stable as in "consistently generated".
13:12tomojsattvik: thanks again
13:16sattviktomoj: Something like this should work: http://gist.github.com/372766
13:16tomojthanks, yeah, that's basically what I'm working on
13:16tomojexcept jetty 6, so s/eclipse/mortbay/
13:17sattviktomoj: Yes, that's right.
13:17chouserdeftype produces the ununged classname all the time now, but still won't let you extend a concrete class.
13:23cemerickchouser: you *could* implement javax.servlet.Servlet, but I'll bet that'll cause issues in most containers.
13:34slyphonis there a slime function that switches the namespace of the repl to the one the point is currently in?
13:35tomojslyphon: well, slime-repl-set-package can help
13:35tomojC-c M-p
13:35slyphonah
13:35tomojI had one that didn't require you to accept the default and would just switch right away, but it doesn't seem to work anymore
13:35slyphonoh, bummer
13:36tomojwould be pretty simple to fix it now that I know a bit more about swank-clojure, will let you know if I do
13:36slyphonawesome!
13:36slyphonconsider it a feature request :)
13:38slyphontomoj: it's close enough with the default
13:38slyphon;)
13:39technomancyshayfrendt: that works for now; I'd like to find a solution to the ant subclassloader issue though
13:40technomancyredinger: nothing yet
13:40shayfrendttechnomancy: roger dodger
13:40technomancyshayfrendt: hint hint, patches welcome =)
13:40replacahmm, are docstrings on multimethods broken in master right now?
13:40shayfrendttechnomancy: haha i knew that was comin
13:40shayfrendttechnomancy: i'll let ya know what we come up with
13:41technomancyshayfrendt: probably just involves some API detective work
13:41hiredmanreplaca: what do you mean broken?
13:42replacaI haven't done much testing, so it might be something weird in my code, but I'm seeing no doc metadata on multimethods that are declared with docstrings
13:43replaca(and by "much" I mean "any") :-)
13:44replacathis is on files loaded with "load" if it matters
13:44hiredmanworks for me
13:44replacahiredman: thanks, I'll do more detective work then
13:44hiredmanyou aren't trying to use docstrings with defmethod are you?
13:44replacano, defmulti
13:45replacait's through all of contrib with the autodoc engine
13:45replacabut maybe there's something the autodoc engine is doing that's causing the prob
13:49hiredmanreplaca: the :vars in the generated json doc for contrib have been empty for a while
13:49slyphonis there a way with the :require clause in ns to descend into a ns, like (:require [clojure.contrib [http [agent :as agent]]])
13:49stuartsierramaybe since fns got metadata?
13:50stuartsierraslyphon: no
13:50slyphondamn
13:50hiredmanstuartsierra: docs and such still go on vars don't they?
13:50hiredmancurl http://github.com/richhickey/clojure-contrib/raw/gh-pages/api-index.json
13:50stuartsierradunns
13:50stuartsierradunno
13:51hiredmananyway, clojurebot's ability to lookup stuff from contrib has been broken for so time
13:55tomojhas anyone using pmaven configured extra repositories?
14:07tomojah, translating a pom.xml with an extra repo to pom.clj just leaves it out
14:08tomojguess this means it's impossible in pom.clj
14:08tomojI'm beginning to like xml
14:08fogus_hiredman: Whoa!
14:08fogus_Somehow that escaped me
14:12technomancyback in the day we had to use proxy to add metadata to fns!
14:12cemericktomoj: pmaven is quite certainly in a fetal stage. In any case, XML will be the primary project description language for some time to come, given the abundance of tools that work with it.
14:17tomoj"Copying 105 files to ../lib" hah
14:25BorkdudeCan I get an Eclipse ctrl+space like autocompletion in emacs?
14:26Borkdudeand I don't mean C-M-/ (dabbrev-completion)
14:26technomancyBorkdude: can you be more specific?
14:26technomancyerr-descriptive
14:27Borkdudeok, I'm on the repl and I want to see all the functions/macro's that start with do
14:28Borkdudebecause I want to do something 1000 times, but I don't know dotimes
14:28Borkdudesay
14:29technomancyso you're talking about non-cycling var completion?
14:29BorkdudeWhat's that and how do I do it?
14:29technomancyI think hiredman uses something like that
14:30tomojM-x slime-complete-symbol ?
14:30Borkdude(find-doc "do") isn't really helping
14:30arohnerBorkdude: if you're running slime/emacs, "do" <tab> does it
14:30tomojdepending on what tab is bound to
14:30Borkdudearohner, ah good
14:30arohnerM-x slime-indent-and-complete-symbol
14:30tomojyeah, I have tab bound to that
14:30arbschtand if you must use find-doc, you probably want a regexp: (find-doc "^do.*")
14:31tomojit takes a regexp as a string?
14:31arohner(find-doc #"^do\w+") does it for me
14:31tomojah
14:31arohnerthat finds "doc" and "dotimes", but doesn't find "do"
14:32chouser'do' isn't a Var
14:32arohnerchouser: right, but I think the regex wouldn't catch that, even if do was a var
14:32chouseroh
14:32chousersure
14:33chouser(find-doc #"^do")
14:33Borkdudeah find-doc with regexp is very useful, I could mention that on @cleotd
14:33Borkdudebecause it's also IDE-independent right?
14:33chouserarohner: oh, nm, I see what you're saying.
14:37Borkdudeso find-doc only finds var's?
14:38replacahiredman: sorry, I was in transit. Is the json index broken? or is it an issue on clojurebot's side?
14:38chouserBorkdude: right, not special forms.
14:38hiredmanreplaca: if you run curl, the stuff at the end where the vars with docs would be is all empty
14:39replacahiredman: oh, I see!
14:40replacaI'll fix that up
14:40replacaautodoc has been going through some changes (isn't it always) so I probably broke something
14:41hamzais there a equivelent to read-string that will read the whole string and return it instead of one by one, (read-string "(list :A :b) (list :c :D)") returns only the first list?
14:42ninjuddhamza: not that i know of, but i wrote this for a project i'm working on
14:42replaca,(read-string (str "(do " "(list :A :b) (list :c :D)" ")"))
14:42clojurebot(do (list :A :b) (list :c :D))
14:42ninjudd(defn read-mult [str]
14:42ninjudd (let [r (java.io.PushbackReader. (java.io.StringReader. str))]
14:42ninjudd (loop [items []]
14:42ninjudd (try
14:42ninjudd (recur (conj items (read r)))
14:42ninjudd (catch Exception _ items)))))
14:43replaca,(read-string (str "[" "(list :A :b) (list :c :D)" "]"))
14:43clojurebot[(list :A :b) (list :c :D)]
14:44hamzareplica ninjudd thank you both..
14:44ninjuddreplaca: that's a good way to do it
15:06Borkdudeany ideas for @cleotd (Clojure Example of the Day) are welcome, if you have useful snippets to share
15:06rhickeycemerick: fixed
15:07cemerickrhickey is making me look like a slacker
15:07cemerick;-)
15:07cemerickthanks
15:08rhickeycemerick: np
15:08rhickeyyou hadn't created an issue?
15:09cemerickrhickey: it's literally on my day's todo list right here. It likely would have been put in around 4-ish, after I got off this call. :-/
15:25raekanyone know how to make paredit insert a matching bracket, even for curlies?
15:26technomancyraek: you need a newer version of paredit I think
15:32BorkdudeIs Shawn Hoover of Clojure Box sometimes in this channel?
15:32BorkdudeI wonder why I don't have paredit included (although I find it annoying in Eclipse CC)
15:33chouserBorkdude: yeah, he's here sometimes.
15:34BorkdudeIsn't paredit much like static typing? ;-)
15:35redingerExcept useful
15:35Borkdudehehe
15:46slyphonjava's URI class is completely psychotic
15:58IntensityHi. I'm using counterclockwise in Eclipse (both for the first time) in an existing Java project, and I'd like to get the Java code to call Clojure code. Is anyone acquainted with Eclipse and/or CCW enough to help me with this?
16:01kotarakIntensity: clojure.lang.Var someClojureFn = clojure.lang.RT.var("your.namespace", "some-clojure-fn"); someClojureFn.invoke(someArgument);
16:04Intensitykotarak: Thanks for the information. I've seen Java code and how it can interoperate with Clojure in the way you suggest. What I'm unsure about is Eclipse, as I'd like the current Java project (built by someone else) to know how to "include" clojure.jar. I successfully added a Clojure source file to the project, but it's not yet integrated.
16:05kotarakIntensity: ah, ok. Sorry. Don't use eclipse.
16:07Intensitykotarak: Ok. I've asked in #eclipse. I may need to learn much more about it to know how to integrate a Clojure source file. I'm also completely new to it, but hope to get over the initial barrier (minimally, being able to run code like you suggest above).
16:08kotarakIntensity: look out for lpetit
16:08kotarakIntensity: he's the author of ccw and hangs out here from time to time.
16:08Intensitykotarak: Ok, cool. Thanks for the pointer.
16:20tomojomgwtfbbq
16:20tomojjust got a repl into solr, hurraah
16:21cYmentomoj: solr?
16:22tomojcYmen: http://lucene.apache.org/solr/
16:22sexpbot"Welcome to Solr"
16:22RaynesTitles should be more useful, imo.
16:27dakroneI asked in #compojure, but no one seems around, can anyone tell me why url is nil in this (even though I am going to localhost:8080/parse/1)? http://gist.github.com/373003
16:27tomojand I can recompile my gen-class'd plugin and see the changes without restarting solr, woohoo
16:28chousertomoj: you shouldn't even have to recompile if you're just changing the implementations of your gen-class methods.
16:28tomojright, I mean C-c C-k
16:28chouseroh ok.
16:28tomojso I guess that's actually reloading
16:28tomojyeah, no .class files change
16:29tomojtoo bad there's a bunch of nasty steps to take to get into this place
16:29tomojhad to write a solr plugin that starts a swank server, then jar it up and embed it in solr.war along with clojure and swank-clojure
16:29kotarakchouser: substitute with \et for suitable Vim magic. :)
16:30tomojsolr gets tricked into initializing my dummy plugin which just starts swank :/
16:30chouser:-)
16:36slyphonpartial confuses me
16:37chouserit's the next level
16:37chouseryou'll get it. What are you looking at?
16:37lancepantzi haven't gotten that far yet either
16:37slyphonclojure.contrib.http.agent
16:37technomancypartial is so much fun that it can be tempting to abuse
16:37slyphonline 225
16:37technomancyalong with comp and reduce
16:38kotarakand juxt
16:38slyphoni used "cons" for the first time yesterday
16:38slyphonthat validated clojure for me
16:38chouserslyphon: ok, the first arg to partial is always a function
16:38kotarakI hardly ever use cons.
16:38slyphonkotarak: yeah, which is such a nice change from say sbcl
16:38chouserslyphon: do you see the function?
16:38technomancythe only time I've used cons was trying to debug a crazy macro
16:38kotarak,((partial str "Hello" " ") "World!")
16:38clojurebot"Hello World!"
16:39slyphonchouser: yeah, it's part of *http-agent-defaults*
16:40slyphonso buffer-bytes
16:41chouserheh, there are a whole lot of functions going on there.
16:41slyphonyeah
16:41slyphoni think i see what he's doin' though
16:41slyphonit's a way of binding stuff in a particular context
16:41slyphonbut it won't get evaluated until you call the generated fn
16:41slyphon?
16:41chouserhandle-response is a function that will get 3 args: the agent value, the result of 'partial' and opts.
16:43chouserhandle-response (line 111) calls that second arg "handler" and invokes it with no args at all.
16:43slyphonah, so partial is creating a thunk for handle-response
16:43chouseryes!
16:43chousergood!
16:43slyphon:D
16:43slyphonIT CAN BE TAUGHT!
16:44slyphonbut you want to delay evaluation of the agent arg in that thunk until it's time? (i.e. the reply has been received)
16:44chouserif you know how many args partial's result will be called with (no args in this case) you can rewrite it as a fn.
16:45slyphonahhh
16:45chouserso in this case (partial (:handler opts) a) --> (fn [] ((:handler opts) a))
16:45slyphonahhh
16:45slyphonok
16:45slyphonso it's a flexible way of doing that
16:45chouserright
16:46slyphonok, not so hard
16:46slyphon:)
16:46chouserso more like (fn [& args] (apply (:handler opts) a args))
16:46slyphonah
16:47slyphoni think i was expecting something more along the lines of scala's partial stuff, which i still don't really grok
16:47slyphonwhere you get the foo(blah)(wtf?)
16:47chouserand if you're not lost yet, you can look up the source to 'partial' and see we've essentially derived it. :-)
16:48slyphonhah! sweet
16:48slyphonok, well, i'll have to look for a nail to hit with this hammer :)
16:48chouserwell, scala methods can accept multiple argument lists, so ... uh ...
16:48slyphonyeah
16:48slyphonscrew scala, though
16:48slyphon:D
16:48slyphonchouser: thanks!
16:48chousernp. welcome to the next level. :-)
16:49slyphonwow, only one quarter!
16:49chouserwhen you're all comfortable with partial, try it out with comp and juxt. I'm easily defeated by such bosses.
16:50slyphonhahaha
16:50slyphonhiredman blew my mind with his use of "trampoline" in callbacks
16:51technomancyyou have to use the partial-gun to beat ReduceMan before you can defeat JuxtMan.
16:51technomancyhaven't you played MegaMan 3?
16:51Chousuke:P
16:52chouserMetaMan?
16:53ChousukeIt took me a while to understand how trampoline works
16:53Chousukebut I think I do now :/
17:06bsteuber,(doc juxt)
17:06clojurebot"([f] [f g] [f g h] [f g h & fs]); Alpha - name subject to change. Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]"
17:09tomojif I want to subclass an abstract java class in clojure, I'll have to use gen-class, right?
17:10kotarak,((juxt inc dec) 1)
17:10clojurebot[2 0]
17:10kotaraktomoj: shouldn't this also work with proxy?
17:11tomojoh, thank you very much for saying that
17:11kotaraktomoj: well, I don't know for sure, but I think it should work.
17:11tomojin other cases I need gen-class because solr will blow up if it doesn't find a .class file, but in this case, proxy is perfect because I'm returning a single-use instance of something
17:15slyphongak
17:15slyphon& options can sometimes be a real pain
17:52MadWombatHello all
17:53MadWombatI seem to be having trouble with Runtime. The following works fine in SLIME, but doesn't work when called from a jar (.. Runtime (getRuntime) (exec "uname"))
17:54MadWombatI get java.lang.IllegalArgumentException: No matching method found: exec for class java.lang.Runtime
18:01hyp3rvigi1antyou could download it directly from here, too, if you want: http://free.antivirus.com/hijackthis/
18:01sexpbot"HijackThis - Trend Micro USA"
18:01hyp3rvigi1antoops
18:01hyp3rvigi1antsorry
18:02slyphonso, if you can't await in an agent action, is there some way to "chain" agents?
18:02slyphonrather, chain agent actions?
18:03sattvikMadWombat: what do you mean by ‘called from a jar’?
18:07MadWombatsattvik: well, I am trying to make swank-clojure cygwin aware, when I call this expression from REPL or SLIME, it runs fine, when it gets called as part of the swank process it gives me an error
18:09nurvHi.
18:12sattvikMadWombat: Hmm.. I don't know why it would work. You could try it without the .. macro and see if that works.
18:13sattvikMadWombat: I meant: "would not work"
18:16MadWombatsattvik: I tried every which way, with (.exec, with (. Runtime (getRuntime) and other combinations :(
18:17RaynesIf you rebind *out*, how do you set it back to the default?
18:17sattvikMadWombat: It may be easier or perhaps even better to use (System/getProperty) or (Syste/getenv). Especially the latter since I think cygwin sets some sort of CYGWIN variable.
18:18sattvikRaynes: System/out, or the previously bound value?
18:19Raynes(binding [*out* System/out] ..) doesn't seem to be.
18:19_atoRaynes: exit the (binding ...) form? or save the original somewhere and restore it?
18:19_ato,(doc *out*)
18:19clojurebot"; A java.io.Writer object representing standard output for print operations. Defaults to System/out"
18:20Raynes(binding [*out* System/out] (println "lol")) => java.io.PrintStream cannot be cast to java.io.Writer
18:20_ato(binding [*out* (java.io.PrintWriter. System/out)] ...)
18:21_atothat doc string is somewhat misleading
18:21RaynesIndeed.
18:21_ato,(doc *in*)
18:21clojurebot"; A java.io.Reader object representing standard input for read operations. Defaults to System/in, wrapped in a LineNumberingPushbackReader"
18:21MadWombatsattvik: I think I partially figured it out, the call I mentioned actually works, its the other one I use that causes trouble, where I call (.. Runtime (getRuntime) (exec "cygpath" path))
18:22sattvik,(class *out*)
18:22clojurebotjava.io.StringWriter
18:22sattvikWell, on my REPL it's a OutputStreamWriter.
18:22_atoMadWombat: from the javadoc: exec(String[] cmdarray)
18:23_atoyou need to pass it a string array
18:23Raynessattvik: In my REPL, it's a StringWriter. :p
18:23RaynesCause of swank, I guess.
18:24sattvikMadWombat: You can do (exec (into-array "cygpath" path))
18:28sattvikRaynes: Checking the Clojure source: *out* is set in RT.java to new OutputStreamWriter(System.out). So, like _ato said, exit the (binding …) or save and restore the original.
18:31MadWombatsattvik: nah, I just use (str "cygpath " path)
18:32MadWombatI have a rather stupid question, how do I assign value to a function argument? That is if I have (defn f [x] (how do I change value of x from here?))
18:32_atoMadWombat: that might break on paths that have spaces in them though
18:33MadWombat_ato: correct, I will fix that
18:35_atoMadWombat: by "assign" are you talking about default arguments? (defn f ([] (f "something")) ([x] ...))
18:35_atoso (f) is then equivalent to (f "something")
18:36MadWombat_ato: no, I need to change the actual value passed into the function
18:36_atoeither I'm misunderstanding what you mean or that's not possible in Clojure
18:37_atothere's shadowing: (defn f [x] (let [x (inc x)] ...))
18:37MadWombat_ato: in this case, I have a file name passed into a compile function and I need to check if I am under cygwin and convert the file name if I am. There is a bit of stuff done with the file, so I don't want to enclose the whole thing in the if form or something, I just want to change the file name in place
18:39_atoso I think shadowing is what you want... (defn f [path] (let [path (cygwin-path path)] ... normal body ... ))
18:43scottjMadWombat: in clojure (and I believe many other functional PLs) you don't reassign "variable names"
18:43MadWombat_ato: thank, seems like it does what I want
18:44MadWombatscottj: a form, by any other name...
18:54heauxbagwhat's a good starting point for someone interested in learning clojure? fairly experienced programming background but not much functional/lisp experience
18:56technomancy~peepcode
18:56clojurebotpeepcode is a commercial screencast series; see the Clojure one at http://peepcode.com/products/functional-programming-with-clojure by technomancy
18:57sattvikheauxbag: There is the Clojure 101 course starting in a few days: http://rubylearning.com/blog/2010/03/09/clojure-101-a-new-course/
18:57sexpbot"Clojure 101: A New Course"
18:57technomancythe prags' book is quite good too
18:57cemerickthere's also the full disclojure series
18:57cemerickThe Joy of Clojure MEAP has been excellent so far.
18:58heauxbagtechnomancy: actually got the peepcode screencast, glad people recommend it
18:58cemerickheauxbag: Mark Volkmann's long tutorial is really fantastic. Very gentle intro: http://java.ociweb.com/mark/clojure/
18:58sexpbot"Mark Volkmann's Clojure Page"
18:58technomancycools
18:58cemerickhrm, http://java.ociweb.com/mark/clojure/article.html is the actual tutorial
18:58sexpbot" Object Computing, Inc. - Java News Brief - March&nbsp;2009"
19:02scottjheauxbag: I think rich's screencasts are superb
19:02scottjrecorded talks showing him code rather
19:28MadWombatis there an HTML parser for clojure?
19:30scottjthere's java's tagsoup and enlive
19:31MadWombatscottj: how do I make lein recognize them as deps?
19:32scottjhttp://clojars.org/enlive
19:32sexpbot"enlive | Clojars"
19:33scottjadd the lein line to project.clj. for jars I think you install them to maven (some maven commands will print out the command line in their errors) and then referencing it in project.clj also
19:34nurvhttp://github.com/nathell/clj-tagsoup
19:35scottjI guess tagsoup is in clojars as well so you don't have to install manually with maven
19:35MadWombathow do I install an arbitrary jar into a maven repo so I can use it with lein?
19:36MadWombatscottj: enlive looks promising
19:36technomancyMadWombat: if you edit your project.clj to reference it and then run "lein deps", the error message will include instructions of how to install it
19:36technomancylocally anyway
19:36MadWombattechnomancy: thanks
19:37MadWombattechnomancy: sorry about erronious pull request earlier
19:37scottjMadWombat: the line you're looking for is like this: mvn install:install-file -DgroupId=com.google.appengine -DartifactId=appengine-api-1.0-sdk -Dversion=1.3.0 -Dpackaging=jar -Dfile=appengine-api-1.0-sdk-1.3.0.jar
19:37MadWombatscottj: heh
19:37MadWombatscottj: thanks
19:37MadWombatscary
19:37technomancynp
19:38scottjtechnomancy: what's the argument against having a dir in the project that lein will look for jars instead of going to maven dir?
19:39scottjis it the lack of groupid and version?
19:39technomancyscottj: you mean checking jars into git?
19:39technomancygit is abysmally bad at tracking binary files
19:40technomancyevery time you upgrade a dependency, the diff will include a removal of the entire old jar plus a re-add of the new jar
19:40technomancypretty soon a fresh clone of your project takes twenty minutes
19:41scottjtechnomancy: nothing to do w/ git, I mean having a dir like lib that has jars that get included on classpath but they don't get deleted w/ lein clean
19:42technomancyso each developer is responsible for tracking down all the deps and putting them in the right place manually?
19:42technomancyit's doable, just tedious
19:42scottjwell, you end up doing worse than that if you have to install to local maven repo
19:43technomancyyeah, a local maven repo is only a temporary solution
19:44technomancyonce it's in a local repo, it's easy to rsync out somewhere so you can share it
19:47scottjI guess the argument against having a jars dir that's included on cp and not deleted like lib, that you'd use for jars that aren't in public repos, is that ppl should learn to use mvn local install, it's not too hard :)
19:47technomancyeven a remote mvn server is not that tricky either
19:48technomancyit'd be cool if someone documented how to set up a private clojars instance
19:50cemericktechnomancy: can nexus, artifactory, etc., not serve as a lein deploy target?
19:50technomancycemerick: good question. I haven't looked into it.
19:51technomancymy gut tells me hudson would be the quickest way to get going, but there could be better options.
19:51cemerickthe free version of nexus is absurdly full-featured, and dead-simple to deploy.
19:52cemerickhudson-as-a-repo is a bit of a hack -- in particular, the fact that it doesn't prevent release redeployments is irksome
19:54technomancyit's worked great for us in our narrow use case, but I could see how that'd be a problem
19:54technomancyI am interested in alternate clojars installations for other reasons though; I think down the line third-party mirrors will be come a necessity
19:55technomancygiven an optimistic projection of Clojure's growth
19:56cemerickI'd hope that we could start getting popular projects rolling into central. That would necessitate something like artifactory or nexus, as central is moving quickly away from ssh/scp/rsync-based mirroring.
19:58cemerickyou mean syncing with central?
19:58technomancyyeah, making it easy to sync from clojars to central
19:59cemerickit's apparently a piece of cake if you're not trying to sync with them via rsync...even easier if you're signing the artifacts.
19:59chessguy'evening
19:59cemerick@talios has gone through this for clojure-maven-plugin, sounds like the process has been simplified and expedited quite a bit
20:00chessguyanybody care to help me debug an algebraic simplifier?
20:02cemericktechnomancy: even easier, sonatype is apparently providing nexus hosting for open source projects http://www.sonatype.com/people/2009/06/publishing-your-artifacts-to-the-central-maven-repository/
20:02sexpbot"Sonatype Blog &raquo; Publishing Your Artifacts to the Central Maven Repository"
20:05technomancyif it can match "scp pom.xml foo.jar clojars@clojars.org:" for ease-of-use, I'm all for it.
20:06Tordekhi, what's the - in "(defn -name...)"?
20:08sattvikTordek: Generally, there is nothing special about it. Specifically, it is often the default prefix of functions that are implementing Java methods that are being generated using gen-class.
20:08remleduffThere's an awful lot of value of being able to go to clojars and browse and *only* get clojure artifacts, I'd hate to lose that if the community moved to a nexus repository
20:08Tordekthanks
20:40defnanother amazingly awesome post by nakkaya: http://nakkaya.com/2010/04/20/fractals-in-clojure-newton-fractal/
20:40sexpbot"Fractals in Clojure - Newton Fractal"
21:08chessguyhey defn
21:31MadWombatI need to parse a javascript array definition, so I think, I need a basic token parser. Is there a library I can use or a sample parser I can take a look at?
21:32dakroneMadWombat: you could give http://github.com/jrockway a shot
21:32dakroneerr
21:32dakronehttp://github.com/joshua-choi/fnparse
21:33dakronewrong link
21:34chessguydid i get banned?
21:34_ato,(read-json "[1, \"hello\", 3]")
21:34clojurebot[1 "hello" 3]
21:34_atoMadWombat: ^ if you just mean parsing a JSON array
21:34dakronechessguy: err, no? you're in here now
21:34_atoclojure.contrb.json.read
21:35chessguyyeah, weird, i got a strange message from freenode saying i'd been banned
21:35_atoclojure.contrib.json.read *
21:35chessguydefn, you around?
21:36tomoj_ato: how'd you know read-json was available?
21:36MadWombat_ato: worth a try :)
21:37lancepantzclj-json is much much faster than clojure.contrib.json
21:37MadWombat_ato: I need to extract an array from a javascript file, I use regex to separate the array definition from the rest of the code and now I need to parse the array itself
21:37lancepantzfwiw
21:37_atotomoj: /msg clojurebot ,(read-json "[1, \"hello\", 3]")
21:37tomojoh, heh
21:43hiredmanclojurebot also has danlarkin's clojure-json stuff
21:50chessguyman, i sure would love it if someone could take a look at this simplifier code and help me debug it: http://ideone.com/VlRwu
21:50sexpbot"Ideone.com | VlRwu"
21:51chessguy(as an aside, the syntax-coloring on that site for clojure sucks)
22:31wlangstrothIt seems that Scala is losing popularity on Github: http://github.com/languages/Scala
22:32wlangstrothClojure is still #18, and at #19 ... Common Lisp.
22:41joshua-choiI've got a question. Before deftype switched from factory function (A x y) vars to class constructors (A. x y), I often used namespace aliases with my deftypes' factory functions (require [something :as s]) (s/A x y).
22:42joshua-choiNow, I seem to be unable to do that with the new constructors.
22:42joshua-choiIs it possible to use namespace aliases with the deftype constructors at all? Or do I have to use import from now on?
22:50hiredmanjoshua-choi: if you switch to defrecord or make your own factory function
22:51joshua-choihiredman: Actually, I'm using defrecord; I'm still running into the same problem. I didn't mention it just for conciseness
22:51joshua-choiA factory method is probably my best bet, but it's unfortunate...What did you mean by defrecord, though? Does it do something different in this case?
22:52hiredmanthe same problem as in no factory functions?
22:52joshua-choiYeah.
22:52hiredmanhuh
22:52joshua-choiDoes defrecord create factory methods?
22:52hiredmanI had thought defrecord was supposed to supply those
22:52joshua-choiHmm, actually, hang on...
22:53hiredmanfactory functions
22:53joshua-choihiredman: No, defrecord doesn't seem to create factory functions for me.
22:53joshua-choiDoes it for you, in the latest Clojure?
22:54hiredmanlet me grab the latest
22:55hiredmanactually the docstring for defrecord doesn't mention factory fns
22:56hiredmanthat is some what worrying, I thought the point was to have a level of indirection between you can the class
22:57joshua-choihiredman: The removal was a pretty new change; did you know about it? (I found out two days ago :( )
22:58hiredmanI knew it was removed for deftype
22:58remleduffYou can't have a factory function that has the name of the Class, because the Class name is now supposed to be stable, and they'd conflict
22:58hiredmanremleduff: even if you re-defrecord?
22:59joshua-choiremleduff: Right. But is there a way to use namespace aliases still? Or must I (import ...) now?
22:59hiredmanI haven't really been following it that much, I mean, I'm simple, I just use functions maps and seqs with a set here and there
23:00remleduffI hadn't encountered that, I guess you'd have to import. You also can't (map RecordType [values]) anymore either, there were a handful of cases Rich was trying to decide whether they were important enough to support was my impression. He'd talked about something like RecordType/create I think
23:04remleduffhttp://clojure-log.n01se.net/date/2010-04-15.html#07:55
23:04sexpbot"#clojure log - Apr 15 2010"
23:04joshua-choiremleduff: How long ago did Rich mention RecordType/create?
23:04remleduffWas just searching for it :)
23:04joshua-choiWow, at the same time. :)
23:11remleduffI'm surprised no one has run into that before, I guess most people don't use records from a different namespace than the one they define them in? Or else they didn't alias the namespace
23:12joshua-choiI'm surprised too, though
23:14joshua-choiAh, someone did ask it, on 2010-04-15 10:46.
23:17remleduffHmm, that just makes the ns macro even more complicated (require and use are for clojure stuff, import is for java stuff -- except import is also for records and types)
23:19joshua-choiI know. I hope Mr. Hickey will figure out something about the factory methods, or at least a definite no.
23:19joshua-choiNo pressure though