#clojure logs

2009-12-15

00:05hamzaguys, what is the best way to add 1 to a list contaning (2 3) so that i get (1 2 3), tried (concat 1 '(2 3)) but does not work?
00:06_ato,(cons 1 '(2 3))
00:06hamza_ato: thanks.. that worked..
00:07hiredman_,(cons 1 '(2 3))
00:07clojurebot(1 2 3)
00:07hiredman__!
00:07hiredman_good lord freenode
00:32hiredmanclojurebot: ping?
00:32clojurebotPONG!
00:33Rayneshiredman: ping?
00:38KirinDave1Hmm
00:38KirinDave1Compojure+enlive's performance is damn impressive if you don't run the template every time.
00:39KirinDave1I wonder if I could genericize this into a macro.
01:20hamzaguys i am kinda at lost, how would you turn a list such as ((1) (2 3 4)) into (1 (2 (3 4))) or reverse ((1 2 3) (4)) into (((1 2) 3) 4) ?
01:23arbscht,(reduce #(list %1 %2) (clojure.contrib.seq-utils/flatten '((1 2 3) (4))))
01:23clojurebot(((1 2) 3) 4)
01:23hiredman:|
01:23hiredmanlist
01:24hiredmanthe anonymous function is not needed
01:25arbschthm yes
03:27LauJensen1Morning team
03:55tomojI wonder what the probability is that I will someday find a clojure job
03:56esjmorning all
04:09hoecktomoj: not that low, I think
04:10hoecktomoj: at least I am very confident :)
05:26shantanudid anybody encounter this error while compiling Clojure sources through Maven?
05:26shantanuorg.apache.maven.lifecycle.LifecycleExecutionException: Clojure failed.
06:00ordnungswidrighi
06:01esjyo
06:03ordnungswidrigthat was hard work. irc over ejabberd. connecting as a osx newbie trouble
07:35aldebrnHi, I'm trying to use git clojure, and "ant clean jar" gives me hundreds of warnings, plus some errors in clojure/src/jvm/clojure/lang/Numbers.java all complaining about methods on toBigDecimal(x). This is on OpenJDK java version "1.6.0_0", any hints?
07:37hamzajust a guess, but maybe some methods on suns api not availible on openjdk..
07:41aldebrnThanks hamza. What's the difference between the clojure and the "clojure (new)" entities at build.clojure.org ?
07:43the-kennyaldebrn: new is based on the "new" branch on github. It has some new things like defprotocol/deftype
07:43hamzahere is some more info if you are intrested,
07:43hamzahttp://stuartsierra.com/2009/12/14/objects-are-not-adts?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+StuartSierra+(Digital+Digressions+by+Stuart+Sierra)
07:44hamzatalks about the new features in new branch
07:44the-kenny_ato: ping
07:44aldebrnIs new strictly a superset of non-new?
07:44_atothe-kenny: pong
07:44the-kenny_ato: Is that you compojure-jar on clojars?
07:45the-kenny*your
07:45_atothe one with ato in it?
07:45_atoyeah
07:45the-kennyYes.
07:46the-kennyIt looks like it's broken because clojure was renamed to "1.1.0-master-SNAPSHOT"
07:46_atoegh.. annoying. Yeah that pretty much broke everything, I wish they symlinked it
07:48the-kennyhm.. maybe someone will symlink it.
07:49_atohrmm..
07:49_atoI wonder if I can do it in Clojars actually
07:50_atooh well, probably betters to just update all the jars, hopefully it won't get renamed again
07:51liebkethe-kenny: I uploaded a version of Compojure to address that problem: [org.clojars.liebke/compojure "0.3.1-master"]
07:52the-kennyliebke: Ah, sounds good. That one wasn't listed in my search for "compojure"
07:53liebkeyeah, the search doesn't seem exhaustive
07:56_atosearch doesn't work if there's no description set. Damn have I still not pushed out the fix for that. I gotta stop tinkering with this widefinder stuff and give Clojars some more work
07:57_atough... all the tutorials and such are going to be pointing at 1.1.0-alpha as well, aren't they?
07:57_atoperhaps I should upload the old snapshot
07:58_atoI guess it's better that people are out of date than can't get things to work at all
08:00aldebrnliebke, I'm about to send a message to incanter group asking about an error in compiling Incanter: it breaks with 'Exception in thread "main" java.lang.ClassFormatError: clojure.contrib.pprint.PrettyWriter (erroneous identifier) (io.clj:22)' and I wanted to apologize in advance for asking what must have a very simple answer...
08:00Chousukealdebrn: you might want to try recompiling clojure-contrib
08:01hamza`i had this error, when i compiled clojure-contrib without pointing clojure.jar
08:01hamza`even if clojure.jar is in your classpath for some reason it won't pick it.
08:01aldebrnThat's where I know it from too, but incanter build includes clojure
08:01liebkealdebrn: yes, Chousuke and hamaza' are right
08:01liebkewhich build script are you using?
08:01liebkeant or maven?
08:10_atook, I've just pushed the old-named clojure jar to clojars' repository: http://clojars.org/repo/org/clojure/clojure/
08:10liebkealdebrn: if you're using maven, I wonder if you have a version of clojure-contrib in your repository that isn't pointing to the clojure jar. If you're using ant (and ant deps), then I don't know what's wrong :-(
08:10_atothat should at least serve as a temporary measure
08:11_atocome on 1.1 so we can all start pointing everything at stable version numbers
08:11liebke_ato: nice :-)
08:17Chousuke_ato: until everyone starts using defprotocol and deftype and then you need git master for everything again ;P
08:18ChousukeHm, I wonder if it's right to call transient things "transient values"
08:19ChousukeI don't want to call them mutable because they're more than that.
08:20ordnungswidrigChousuke: more than mutable?
08:20cemerickChousuke: if they're mutable, it's hard to call them 'values'
08:20cemerickIMO
08:20Chousukeordnungswidrig: yeah. they're really mutable only as an implementation detail .)
08:21ordnungswidrigChousuke: I see. No third state after immutable and mutable
08:22ChousukeI just think it's important that people not think of them as mutable things.
08:23Chousukebecause you can't use them to write imperative algorithms.
08:23esjis there simpler way to select a subset of values from a hash-set directly, or is (into [] (map #({:a 3 :b 3 :c 4} %) '(:c :a))) the way ?
08:23Chousukeesj: (into [] the-map [:c :a])
08:24Chousukehm
08:24Chousukeforgot map
08:24Chousukeoh well.
08:24ChousukeI think there's something in the clojure.set namespace too. maybe.
08:24chouser"transient collections"?
08:25esj,(into [] {:a 3 :b 3 :c 4} [:a :c])
08:25clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: core$into
08:25Chousukechouser: yeah, but the intermediate things? :/
08:25chouseresj: select-keys
08:25Chousukeesj: yeah, you need the map still. I was just too hasty :P
08:25esj:)
08:26Chousuke,(into [] (map {:a 1 :b 2 :c 3} [:a :c]))
08:26clojurebot[1 3]
08:26chouserChousuke: what intermediate things?
08:26chouser,(select-keys {:a 1 :b 2 :c 3} :a :c)
08:26clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: core$select-keys
08:26Chousukechouser: those values you get when you're actually building the data structure.
08:26esj,(select-keys {:a 1 :b 2 3} [:a :c])
08:26clojurebot5
08:26chouserthose are transients, aren't they? transient collections.
08:26esjthanks guys, in business now.
08:27Chousukecollections is too long a name ;P
08:27chouserheh
08:28ChousukeI don't think "transient value" is too bad a name. it's immutable for the duration of its lifetime :)
08:28Chousukewhich is exactly until you try to mutate it.
08:29ordnungswidrigChousuke: ant then?
08:31Chousukehm?
08:32cemerick'value' has a very specific implication of immutability AFAIK. Consider, would "mutable integer" make sense?
08:32rhickeytransient value is a contradiction
08:32ordnungswidrigChousuke: argl, I meant, "and then?" after you try to mutate them
08:33Chousukeordnungswidrig: the reference becomes invalid and using it again means undefined behaviour.
08:33Chousukeall the functions return new transient things that you should use.
08:33ordnungswidrigChousuke: i see
08:36chouserjust leave off the second word like we do with locals. They are transients.
08:36chouser"transient" is a noun in this case
08:42chouserasking for donations apparently gets you some money and *lots* of opinions. :-)
08:43Chousukeheh
08:43rhickeyactually I'm glad it hasn't devolved into arguments about open source and free software in general
08:44cemerickrhickey: mostly ;-)
08:44rhickeyright
08:45praptakA quick syntax question - does (fn [] 3) have a #() equivalent?
08:45Chousukenot really.
08:46Chousuke#(do 3) is the closest you can get :)
08:46chouserpraptak: not really. You can say #(do 3) but that's rather ugly
08:46praptakThanks, I was just curious.
08:46chouserpraptak: (fn [] 3) is fine. Or (constantly 3)
08:46cemerickI usually use constantly -- code == docs.
08:47rhickeyyes
08:47praptak@chouser: Thanks, I didn't know about constantly.
08:47ordnungswidrigi like constantly
08:50praptakAh, it even works for any number of arguments
08:51chouserright, so not exactly the same as (fn [] 3)
08:53cemerickrhickey: have you bothered to look at any of the jdk7 closure stuff since devoxx?
08:53ordnungswidrigChouser: taken any number of args is not bad in this case
08:54cemerickSeems like everything's going to be in flux for an extended period of time from what I've read.
08:54rhickeycemerick: I've read the blog posts - there's a long road ahead
08:55cemerickthat's what I figured you'd say
08:56cemerickThere's going to be a lot of jdk7-esque forks come next year, I'll wager.
08:56rhickeyhttp://mail.openjdk.java.net/pipermail/lambda-dev/2009-December/000023.html
08:59cemerickyeah, i saw that
08:59cemerickI don't grok it all fully, of course. The process seems right broken though.
09:00rhickeyit's a difficult thing to retrofit
09:01rhickeyalthough, now that Java is behind C#, maybe the borrowing could go the other way
09:02ordnungswidrigAnything to whatch out for regarding aquamacs and clojure?
09:02rhickeywill always be more verbose than in a language built around it
09:02rhickeyordnungswidrig: that's my combo, though I don't use Slime
09:04cemerickit seems like this is Java's last hurrah w.r.t. attempting big changes. The gridlock seems intense, and I can't imagine it getting any better.
09:05rhickeychecked exceptions are proven a terrible idea by closures
09:08ordnungswidrigrhickey: clojure-mode with elpa works fine? What do you use if not slime? *wonder*
09:09rhickeyordnungswidrig: brute force
09:09ordnungswidrigrhickey: never considered this. you mean, just a repl
09:10rhickeyordnungswidrig: yes, just clojure-mode + repl
09:10cemerickrhickey: how's the intellij clojure stuff these days?
09:11ordnungswidrigrhickey: then, you can be sure to receive a donation from me :-) I'll declare it as solatium
09:11rhickeycemerick: I just got IDEA 9 installed - haven't done much Clojure editing but debug seems much smoother
09:11rhickeyordnungswidrig: thanks :)
09:17fliebelIs there any Markdown thing for Clojure? The only thing I found was Javascript ran through Rhino.
09:18karmazillafliebel: there's markdownj for Java
09:19fliebelkarmazilla: I read it has serious issues, but I might try it…
09:20chouserfliebel: we're using markdownj for the book. Hasn't been a problem yet, afaik.
09:20fliebel"the book"?
09:21hamza`i use markdownj from clojure, the only problem i had is if i put a list just before a code block it messes up.
09:22chouserfliebel: the book about Clojure that Fogus and I are writing.
09:22chousermarkdown as a spec is creaking a bit under our ever-growing requirements, but markdownj as an implementation hasn't cause us any problems I'm aware of.
09:22fliebelchouser; ah, that book, cool!
09:23chouseryeah, no link for the book yet. hopefully this week...
09:25fliebelI think the Showdown+Rhino is a very creative solution… I'm not sure how MarkdownJ compares with that…
09:31fliebelhmmm, showdown+rhino looks good!
09:48devlinsf(doc future-canceled)
09:48clojurebotI don't understand.
09:48devlinsf(doc future-cancelled)
09:48clojurebotGabh mo leithscéal?
09:48devlinsf(doc future-cancelled?)
09:48clojurebot"([f]); Returns true if future f is cancelled"
09:49devlinsfrhichey: cancelled is spelled w/ 1 l
09:49devlinsferr... rhickey
09:49devlinsfoops
09:50cypher23devlinsf, both are correct. 2 l is british, one l is american spelling
09:50djorkwhat's up with clojure.contrib.http.agent
09:50devlinsfOh...
09:50djork"java.lang.IllegalStateException: bytes already refers to: #'clojure.core/bytes in namespace: user (NO_SOURCE_FILE:0)"
09:50djorktrying to use it
09:50devlinsfFirefox is yelling at me. Nevermind
09:50the-kennydjork: I think that's fixed in a newer version of clojure-contrib
09:50esjdjork: it crashes with an existing symbol
09:51cypher23devlinsf, you probably have an american-english dictionary :)
09:51esjdjork: I'm excluding it on require
09:51esj (:use compojure
09:51esj clojure.contrib.json.write
09:51esj [clojure.contrib.http.agent :exclude (bytes)]))
09:51djorkhuh
09:51djorkseems like it might be better to fix http.agent :)
09:51devlinsfcypher23: Well, seeing how I live in the US :)
09:52esjI mailed Stuart at the time, I think.
09:52the-kennydjork: It's fixed: http://github.com/richhickey/clojure-contrib/blob/master/src/clojure/contrib/http/agent.clj#L66
09:52djorkhmm
09:53rhickeydevlinsf: that's one spelling where I agree with the brits
09:53fliebelcypher23: I'd love to have java.awt.colour :D
09:53devlinsfrhickey: Okay, cool. It'll be fun to watch this issue pop up on the list occasionally :)
09:54devlinsfrhickey: Should I create an assembla ticket & immediately close it to document this non-issue?
09:55djorkthe-kenny: I still seem to be getting the error after pulling and rebuilding the jar
09:55rhickeydevlinsf: probably not, I wonder if people really look for closed issues on things like that
09:55the-kennydjork: hm... strange
09:55djorkit may be my own classpath problem
09:56devlinsfrhickey: Okay, no problem
09:57djorkboth clojure.jar and clojure-contrib.jar are up-to-date from master
10:02djorkwhen I change the name of 'bytes' in http.agent, I can use it
10:02djorkBTW I'm trying to use it in a REPL
10:02djork(use 'clojure.contrib.http.agent)
10:03djorkdo I need to use it :as something else?
10:04fliebelHow would this convert to clojure code? Runtime.getRuntime().exec(Command)
10:05angerman(. Runtime/getRuntime exec Command) ?
10:05chouser(.exec (Runtime/getRuntime) Command)
10:05angermanright. should proably wrap the Runtime/getRuntime.
10:06fliebel,(.exec (java.lang.Runtime/getRuntime) "ls")
10:06clojurebotjava.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
10:06scgilardiThe fix to contrib allows "require 'clojure.contrib.http.agent" to work, but by using "use" you're trying to bring bytes into the user namespace.
10:06chouserangerman: I don't really like using the naked . operator in regular code anymore.
10:07scgilardiyou can either require it and use its full namespace to qualify its names, require it :as to use an alias to qualify its names, or use it and exclude bytes yourself.
10:07fliebelangerman & chouser: gives back #<UNIXProcess java.lang.UNIXProcess@1629ce8c>
10:07angermanchouser: guess that's personl preference. though I hardly do interop, so I don't really have an opinion on it.
10:07chouserfliebel: congrats! success!
10:07angermanfliebel: so? what did you expect?!
10:07scgilardiuser=> (use '[clojure.contrib.http.agent :exclude [bytes]])
10:07scgilardinil
10:08fliebelI expected to see the output of the command… but it's java anyway, so I guess I should fetch some io reader somewhere... :S
10:09chouserfliebel: you might be interested in clojure.contrib.shell-out
10:09fliebelchouser: might be :D Thanks!
10:11chouserangerman: not a huge deal, but http://clojure.org/java_interop mentions the forms at the top of the page are "preferred"
10:13djorkso I should require http.agent instead of use
10:16scgilardirequire will work well and is generally preferable to use. require with an :as will make typing more convenient.
10:17djorkso that's the best way to use a lib that may have namespace conflicts, then?
10:17djorkI've always been using (use)
10:17djorkbut I guess use is kind of heavy-handed
10:18chouseryeah, unadorned 'use' is unfortunately very convenient at first but often causes trouble in the long run.
10:19devlinsfDepends on the lib
10:19chouserI'm now in the habit of always using 'use', but always with :only and/or :as
10:19devlinsfe.g. , I'll use clojure.test in test code
10:19drewrthe only time I use require is when I'll use most of the publics in an ns
10:19scgilardiat the repl, I think it's fine to utilize whatever is convenient. When writing an "ns" form for a lib, it's nice for a (human) reader to be able to trace the origin of every non-core name used. That means either using require, require with :as, or :use with only.
10:20chouserscgilardi: yes, good point. naked 'use' at the repl is fine.
10:22scgilardione thing I don't do enough is "enter" the namespace I'm working in at the repl using "in-ns". That makes all of its names available without namespace-qualifying.
10:22fliebelwhat is the preferred way in clojure to handle files? just plain java.io?
10:23scgilardiclojure.contrib.duck-streams makes lots of file and stream-related work very easy.
10:23devlinsfHey, question about PersisentStructMap
10:23scgilardiclojure.contrib.java-utils has some helpful functions
10:24aldebrnliebke, I've made an "fft.clj" in the same vein as stats.clj and core.clj in the incanter/src/main/clojure/incanter directory, is there something else I need to do before clj will pick it up?
10:24scgilardiand java.io and java.nio are there to use as well.
10:24fliebelscgilardi: thanks
10:24devlinsfI have an instance of a struct map and I'm trying to get at the definition
10:25devlinsfSimilar to how I'd get at a comparator w/ a PeristantSortedMap
10:25chouserdevlinsf: yeah, you can't get anything useful there.
10:25devlinsfWell, looking at the class def it seems I should
10:26devlinsf(.def (my-instance)) should do the trick
10:26devlinsfWould patching in a simple getDef method do the trick?
10:26chouserit's not public
10:27liebkealdebrn: use load-file
10:27chouserdevlinsf: yes, making it public would let you get at it.
10:27chouserif you just want a list of the keys, you can do (keys (empty a-struct))
10:46rhickeydevlinsf: I don't want to enhance structmaps, rather people move to deftype
10:48devlinsfrhichey: Okay. I'll review deftype, and let you know if I need to request an enhancement
10:48devlinsfAh
10:48devlinsfrhickey
10:49devlinsfHacker news calls you Rick... I call you Hichey.. k & h are confusing!
10:50devlinsfAnyone: How do I browse the new branch on github?
10:50chouserdevlinsf: theres a 'brnaches' dropdown
10:50devlinsfAh, got it
10:51rhickeydevlinsf: there are definitely differences between defstruct and deftype, but defstruct has problems (AOT, serialization) that deftype solves, plus perf is better, can implement protocols etc
10:53cypher23devlinsf, use the power of tab completion? :)
10:53devlinsfrhickey: Right now I'm intereted in the map-like abilities of defstruct.
10:53devlinsfcypher23: Using a brower right now :(
10:54cypher23oh
10:54devlinsfrhickey: What did you decide about types supporting keyword lookup?
10:55rhickeydevlinsf: they do
10:56devlinsfOkay. What class implements IDynamicType? Or is that compile time magic?
10:56rhickeydevlinsf: you shouldn't need to fiddle with IDynamicType
10:57devlinsfrhickey: Okay, here's what I'm really looking for. defstruct had the associated PersistentStructMap class. What is the analog of PersistentStructMap for types?
10:59devlinsfOh, wait.... do I need to look in clojure.asm?
10:59rhickeydevlinsf: you should read through this: http://www.assembla.com/wiki/show/clojure/Datatypes and try them - they can implement IPersistentMap just by requesting it and not defining the methods
11:00shantanuhi all
11:00chouserdeftypes don't have to share any common superclass except Object
11:00devlinsfAh.
11:00chousershantanu: hi
11:01shantanuam wondering if anybody encountered something like thjis: java.io.FileNotFoundException: Could not locate org/bitumenframework/jettify/clj__init.class or org/bitumenframework/jettify/clj.clj on classpath
11:01devlinsfHmmm... so I think this answer my underlying question.
11:01shantanuthis is while compiling clojure code with maven
11:01chousershantanu: looks like something you want isn't in your classpath.
11:01devlinsfThere probably is NOT the need to use a map operation over a type the same way there is in a hashmap
11:02devlinsfThanks rhickey & chouser
11:03chouserdevlinsf: if the type doesn't implement IPersistentMap, then probably not.
11:03shantanuthe same code compiled fine with Ant....seems related to maven-clojure-plugin
11:03devlinsfchouser: Even if does, it's a completely different beast
11:03devlinsfchouser: That, and this discussion can wait until 1.2 is closer to release
11:04devlinsfThen let's finish documenting 1.1 :)
11:05rhickeywe seem to be stuck on 1.1. In the old days I would just zip up the latest and ship it :)
11:05rhickeyactually I always did a (painful) doc day
11:05devlinsfHa! the old days
11:05devlinsfShows how fast things have changed
11:06rhickeynow I'm afraid of all the maven stuff - all the numbers have to align with I don't know what, artifacts etc
11:06devlinsfrhickey: Could you help use write the chuncked seqs section?
11:06devlinsf*us
11:07chouserit's probably unavoidable anyway, but I was hoping to not have to include structs in the book.
11:07chouserdevlinsf: is the chunked seqs section started somewhere?
11:08devlinsfYeah, follow SS' link
11:08devlinsfhttp://groups.google.com/group/clojure-dev/browse_thread/thread/5a5a9aa1352f12f4
11:08devlinsfWell, it's outlined
11:10rhickeytransients section should just refer to http://clojure.org/transients rather than paraphrase, I think
11:11devlinsfrhickey. Okay, could you add the last part, where how to properly use them is discussed
11:11cemerickrhickey: I'm sure you've seen the writing on the wall that maven is the one true way these days? ;-)
11:12cemerickwe'll actually be 95% maven by the end of the week, which is a little crazy
11:14cemerick"We need something to manage all this incidental complexity!" :-P
11:15rhickeyyou mean, to introduce it?
11:15cemerickthat was a joke, there, son!
11:16rhickeyI'm too afraid of Maven to laugh
11:16cemerickI was too until about 12 days ago. Used ant for ~10 years.
11:17devlinsfcemerick: Wow. I just had netbeans do it for me
11:17cemerickdevlinsf: builds, you mean?
11:17chouserant scares me too though
11:17devlinsfYeah
11:17chouserwe use cmake at work.
11:17chousercmake scares me
11:18cemerickIDEs beg for you to tie your build to a local environment. That's why I went with NB years ago, it didn't have its own build circus.
11:18rhickeydevlinsf: I'm fearful of overdoing it as far as release notes etc. There are docs on the functions. Some things are best not said twice. But transients and chunks are topics. See prior release notes - they were just gussied up commit logs. Special notes only to highlight new features, or document breakage/deprecation. I think we need to KISS. Right now, not knowing what maven will need is the dark area for me
11:18cemerickchouser: you prefer to use butterflies?
11:18cemerick;-)
11:19chousercemerick: make. I like make.
11:19rhickeycemerick: clojure used to build with a javac one-liner
11:19chouserwell, gnumake
11:19cemerickMy only sustained exposure to make is via autoconf. The one time I had to actually screw with a makefile was not pleasant. At that point, I longed for XML.
11:20chouserthe chunk functions don't seem to have docstrings
11:22chouserrhickey: I assume you'd take a ticket/patch for chunk fn docstrings?
11:22hugodis using extend the expected way to define a protocol method implementation on a deftype that calls the deftype's own factory function?
11:33KjellskiWhen will clojure turn 2.0? I mean, have you a better guess then "When it´s done" ?
11:34danm_does anyone even know what 2.0 means for clojure yet? why would the timeline for 2.0 be important to you right now?
11:34shantanuchouser: it seems i found out why the maven build was breaking -- whenever the namespace contains an underscore, it barfs
11:35Kjellskidanm_ : no not really... I´m just interested... ^^
11:35shantanuchouser: i faced similar issue when compiling with Ant earlier
11:35danm_Kjellski: fair enough, I was just sort of confused
11:35chousershantanu: really? hm.
11:36shantanuchouser: i just removed the underscore from the namespace -- it now compiles fine
11:36bjorkintoshwhat happens if people don't start supporting clojure's daddy?
11:36bjorkintoshdoes it mean it dies and never turns 2.0?
11:37shantanuchouser: i suspect this may have to do with Clojure's compile module (the way it resolves namespaces)
11:39Chousukebjorkintosh: probably development just won't be as rapid as it could be.
11:40bjorkintoshah that's sad.
11:40bjorkintoshit seems the language has generated a lot of excitement and it's a shame the creator of it hasn't been banished to an ivory tower :P
11:40bjorkintoshokay okay that was mean.
11:41bjorkintoshlisp and ivory towers seem to go together though.
11:41chouserClojure is not that kind of lisp. :-)
11:41ChousukeI suppose Rich just doesn't feel like spending 15 years slowly building up momentum.
11:41danm_seems fair
11:44cemerickshantanu: what version of clojure-maven-plugin are you using?
11:45shantanuchouser: it is <groupId>com.theoryinpractise</groupId> <artifactId>clojure-maven-plugin</artifactId> <version>1.0</version>
11:45shantanuchouser: oops! bad copy-paste
11:46shantanucemerick: another oops! hi cemerick
11:47cemerickwell, clojure-maven-plugin is up to 1.1 in releases, so that's a good first thing to try
11:47cemerickFurther, the 1.2 snapshots (not sure if they're around anywhere, I just have them deployed internally) have a lot of good improvements.
11:48shantanucemerick: i just decided to learn Maven today, and gave this plugin a try :-) -- i will try 1.1 out
11:48cemerickit's worked well for me :-)
11:48shantanuand 1.2 as well
11:49cemerick(and I have plenty of libs with dashes in the ns, FWIW)
11:49shantanudashes seem to cause problems when compiling with Ant, but underscores were fine with Ant
11:50shantanuso i fell back to underscores
11:50shantanuseems i should experiment a bit more
11:51rhickeychouser: I'm not sure I want people using chunk fns yet, maybe label experimental
11:51rhickeyditto transients - experimental (more on this in a sec)
11:52rhickeydevlinsf: sorry, I got called away - anyway, your outline is good, but fn docs need to make it into fns and concept docs onto the clojure.org site - I don't want people searching for release notes for docs
11:54devlinsfrhickey: Okay, makes sense
11:54devlinsfrhickey: should there be a PSA in the mailing list when you release 1.1, though?
11:55rhickeydevlinsf: sure
11:56ericthorsenI want to define a symbol called 'Class in a namespace. I put (:refer-clojure :exclude (Class)) in the ns decl and call (ns-unmap *ns* 'Class). Loads dynamically but won't AOT. Keep getting "Class already refers to: class java.lang.Class in namespace:"
11:56ericthorsenIs this possible to do?
11:56rhickeyI'd also like to try release candidates this time around, so we know the zip and naming is all ok for downstream things
11:57rhickeyericthorsen: dunno
11:57ericthorsenrhickey: Doh!
11:57rhickeysounds scary remapping Class
11:58Chousukeat least making source tarballs is relatively easy. github does them for you :P
11:58devlinsfrhickey: Sounds cool. What else exactly needs to happen, besides fleshing out the docs? Is there a concrete to do list before RC1?
11:58ericthorsenrhickey: I know...I could "want something else" but it will make what I'm doing not uniform
11:58shantanucemerick: the underscores still don't cut it with the 1.1 plugin, but it works with dashes
11:59Chousukehm, right, docs.
11:59devlinsfericthorsen: Steal a trick from Ruby. name your fn klass
11:59cemerickshantanu: wait, namespaces with underscores fail, but ns' with dashes are OK?
11:59ChousukeIIRC I saw some reference in clojure.test docstrings to subversion and google code. Should probably fix that.
11:59shantanuyes
12:00cemerickhuh. Well, I can't say I've ever made an ns with an underscore in it.
12:00rhickeydevlinsf: http://groups.google.com/group/clojure-dev/browse_frm/thread/be3f0a7c26ee2fd6
12:00shantanui admit that's unusual...i did so because i ran into issues with Ant with dash-in-filenames
12:01devlinsfrhickey: Yeah, I remember that. Do these items have human names attached to them?
12:01shantanui guess avoiding dashes and underscores is a good idea
12:02rhickeydevlinsf: like code names? :)
12:02devlinsfLol
12:03devlinsfThat'd be fun. I was think of a much mor boring version, though
12:03cemerickdashes are right and proper, IMO. An ns with an underscore is a tad ugly, I'd say. *shrug*
12:03aldebrnTo make sure I'm remembering correctly: one should try to use deftype instead of structmaps as of now
12:03devlinsfLike "Who is responsible for this"?
12:03subhadeepclojure rocks
12:03rhickeydon't use underscores in ns names
12:04replacaQ (cause I'm too lazy to read right now): is = on a persistent data structure equivalent to lisp eq or lisp equal? (Seems like eq would be just as effective for persistent structures and a whole lot faster, but I just want to check my logic before I get too deep.)
12:04rhickeydevlinsf: stuartsierra was supposed to be marshaling the process
12:04devlinsfAh
12:05devlinsfrhickey: What about "A Plan for release candidates"? SS or you?
12:06rhickeyreplaca: there's no guarantee that 2 = data structures have a shared genesis and thus a shared root - can't be eq
12:06rhickeydevlinsf: I've gotta run right now - my preference is for an absolute minimum of ceremony and fuss
12:06devlinsfk
12:06devlinsftttyl
12:07replacarhickey: ahh, yes I thought there was a hole in my thinking! I was thinking the other way around. Thanks.
12:09aldebrnTo make sure I'm remembering correctly: one should try to use deftype instead of structmaps as of now
12:10rhickeyvery nice response so far: http://clojure.org/funders
12:10fliebelFor those who suggested using markdownj: I got this issue as well: http://code.google.com/p/markdownj/issues/detail?id=6 and in my tests showdown+rhino runs nearly as fast.
12:11fliebelrhickey: maybe you should put up a donation button, or am I overlooking it?
12:12cypher23fliebel, right on the front page? http://clojure.org/
12:12cemerickfliebel: big honkin' image in the middle of clojure.org ;-)
12:13fliebelok, mi fault, I was just looking on the funders page… my mind ignores buttons and adds for the rest of the time ;)
12:14replacarhickey: Great to hear! I'll be there too, next time I'm sitting in front of my computer at home. Though I think Clojure actually *costs* me money :-)
12:14Chousukerhickey: where do you think :pre and :post should be documented? defn?
12:15drewrrhickey: you might want to list the people that donated through sourceforge back in the day
12:15drewrI'll definitely be donating again though
12:23qedhttp://cr.openjdk.java.net/~mr/lambda/straw-man/
12:26qedfreenode has been absolutely unbearable the last couple of days
12:30bjorkintoshhide join/part messages :)
12:30bjorkintoshis it that freenode is b0rked or buggy?
12:30nubaand netsplits
12:30bjorkintoshcan't the netsplits be done cleanly?
12:31nubafrom [Global Notice] >we're still experiencing heavy ddos directed at a variety of locations where we have infrastructure hosted.
12:31bjorkintoshoh.
12:31bjorkintoshthat's not nice.
12:32nubanope
12:32nubaset yourself to +w if you want to receive these notices
12:32nuba /mode bjorkintosh +w
12:34fliebelWho made clojurebot?
12:36chouserclojurebot: who's your daddy?
12:36clojurebotwho is x
12:36chouserfliebel: hiredman
12:37fliebelchouser: It's written in Clojure I guess? :D
12:37chouserfliebel: I believe so, yes. :-)
12:37chouserclojurebot: where are you?
12:37clojurebothttp://github.com/hiredman/clojurebot/tree/master
12:39fliebelIt would be cool if it had some voicemail functionality…
12:41qedwhy voicemail?
12:41qedare you calling irc channels or something?
12:42qed"hello, yes, this is fliebel, im looking to speak with chris houser"
12:42Chousukehm.
12:42fliebelI mean that you can leave a message for someone who's not online
12:42qed"ahhh, he's away from his desk...very well then"
12:42qedfliebel: ahh :)
12:42Chousukeit might be useful to have "dummy vars" to document some features of Clojure that apply to multiple functions.
12:43qedChousuke: clojurebot !
12:43qedoops
12:43qedclojurebot: !
12:43clojurebotCLABANGO!
12:44qedheh heh, whatever happened to Madison Square Clabango
12:46qedChousuke: that makes sense to me
12:48qedclojurebot: outback steakhouse
12:48clojurebotI want to go to there
12:59qedclojurebot: whose job isthat
12:59clojurebotthat's romanb's job
12:59polypusclojurebot: who are you?
13:00clojurebotYou will not become skynet
13:00the-kennyclojurebot: skynet?
13:00clojurebotGabh mo leithscéal?
13:00the-kennyclojurebot: skynet
13:00clojurebotI don't understand.
13:00the-kennyHm... I thought I've told him he *will* become skynet
13:00polypusclojurebot: wanna come back to my pad for a drink?
13:00clojurebotfor is not used enough
13:01qedheh
13:01qedclojurebot: e4
13:01clojurebotI resign
13:01polypuslol
13:02qedclojurebot: curious
13:02clojurebot/nick other-clojure-bot
13:02polypusmaybe he (she?) could do better: http://psycochess.sourceforge.net/
13:03qedclojurebot: sex?
13:03clojurebotIt's greek to me.
13:04polypusgreek sex?
13:04qedkinky
13:06qedclojurebot: historical ninja robots
13:06clojurebothistorical ninja robots are so 1999...
13:06qedclojurebot: futuristic ninja robots
13:06clojurebotsooo much better than any of the historical ninja robots
13:06qedagreed
13:07StartsWithK3000 users on ml :)
13:07qedclojurebot: twitteronia
13:07clojurebottwitteronia is where shaq lives
13:10bagucodeclojurebot: seen ztellman?
13:10clojurebotno, I have not seen ztellman
13:10bagucodeclojurebot: thank you
13:10clojurebotYou will not become skynet
13:10qedheh
13:11qedhe's got an attitude today
13:11bagucodeThat's rude
13:12cp2_hrm, im surprised this iphone didnt burn through my desk yet
13:12cp2_Benchmarking: FreeBSD MD5 [32/32 X2]... DONE
13:12cp2_Raw: 434 c/s real, 444 c/s virtual
13:12cp2_er
13:12cp2_http://pastie.org/private/rjhods0x4h9ocwr2mazq1g
13:12the-kennyclojurebot: I will become skynet
13:12clojurebotTitim gan éirí ort.
13:12the-kenny:(
13:13qedclojurebot: the-kenny is <reply>I heard he's becoming skynet.
13:13clojurebotc'est bon!
13:13qedclojurebot: the-kenny
13:13clojurebotI heard he's becoming skynet.
13:13the-kennyqed: No, I wanted to bring him to say he will become skynet
13:13the-kennyNot me ;)
13:13qedoh, hehe
13:13the-kennyqed: I told him "You will become skynet" and he got it wrong
13:13qedclojurebot: forget the-kenny
13:13clojurebotI forgot the-kenny
13:15qedi suppose i should quit playing with the bot now...
13:16qedclojurebot: leiningen is <reply>http://github.com/technomancy/leiningen
13:16clojurebotAck. Ack.
13:16KirinDaveSo I was reading http://blog.higher-order.net/2009/11/23/clojure-circuit-breaker/
13:16KirinDaveCool code
13:17KirinDaveBut is deftype going to become part of idiomatic clojure?
13:17KirinDaveI thought the point of it was to allow folks to plumb clojure to java with maximum performance
13:17devlinsfkirindave: Yes, it is slated for 1.2
13:17KirinDavedevlinsf: I mean, culturally.
13:17KirinDaveI worry that everyone will use it in preference to what exists now because it's more familiar to java programmers.
13:18KirinDave"I know this, this is an Object System"
13:18KirinDaveAre there concerns about that?
13:18qedi wont use it because i don't like Java
13:18qed;)
13:18Raynes1.2? Not 1.1 :(.
13:18Chousukedeftype and protocols are not java things.
13:18Chousukethey're Clojure things.
13:18KirinDave1yes, I know.
13:18ChousukeThey're not really object-oriented either.
13:19RaynesI wish it would appear sooner. Feels kind of silly using structs when something that will replace them is right around the corner.
13:19KirinDave1They're more similar than pure functional.
13:19hiredmanprotocols don't create an is-a relationship
13:19KirinDave1Chousuke: See what Raynes just said?
13:19Chousukeobjects couple methods with data, which neither deftype nor protocols do.
13:19KirinDave1deftype, now replacing structs.
13:19hiredmanKirinDave1: yes
13:20KirinDave1Is that the intent of deftype tho?
13:20hiredmanKirinDave1: in idiomatic clojure deftypes will be like better structs
13:20hiredmanjust holders for data
13:20Chousukestructmaps never were anything besides a size-optimised map
13:20Chousukemaps
13:20hiredmanwith a type
13:21RaynesAnd then we have reify. Isn't that going to replace proxy or something?
13:21Chousukemost of it.
13:21polypushttp://stuartsierra.com/2009/12/14/objects-are-not-adts
13:21hiredmanlike datatypes in haskell or erlang
13:21Chousukereify is a mostly java interop thing though I think
13:22RaynesI would just use the new branch of Clojure, but it still seems to break swank for me for some reason. Phil can't reproduce it.
13:22polypushttp://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf
13:23ChousukeI suppose deftype feels like object-orientation because it creates things that would be objects in Java and most OOP languages :/
13:23KirinDaveIt just seems like what's going to happen is that idiomatic clojure is going to go from using a set of generic types to using a set of predeclared types.
13:23chouserstructmaps don't really have a type
13:23KirinDaveWhile I understand that sometimes that makes sense.
13:24KirinDaveIn general, it's unnecessary.
13:24KirinDaveFor example, in that circuit breaker example, it didn't seem necessary.
13:25KirinDaveI'm as big a fan of Wittgenstein's ladder as the next guy, but I am concerned about how readable most clojure code will be if everyone thinks they need a ton of types for every program.
13:25Chousukeyou'll still be using maps and vectors, don't worry.
13:26KirinDaveI know _I_ will.
13:26KirinDaveAnd 90% of the time that'll make sense
13:26ChousukeWell, at first everyone will be excited about the new playthings.
13:26KirinDaveBut I'd hate to start seeing other clojure code senselessly use deftype.
13:26Chousukebut I'm sure it'll settle down eventually.
13:26chousermost application-level deftypes will implement IPersistentMap
13:26cemerickah, things are coming together now http://twitter.com/jvanzyl/statuses/6703401181
13:28KirinDaveWell, I admit to some trepidation.
13:28KirinDaveAfter years of trying to get java developers to look at lisp and failing.
13:29KirinDaveI suspect, so crassly, that if you give people a familiar construct they'll prefer it. :)
13:32Chousukethere are over 100 contributors already it seems.
13:39dysingercemerick: we setup invoiced support with rich yesterday - did you beat me to it ?
13:39dysinger;)
13:40cemerickdysinger: Yeah, I think we beat you, but ours isn't a monthly commitment -- we don't have all that shiny VC money ;-)
13:40dysingerI qualified my tweet with "first _invoiced_ monthly" just in case :P
13:40cemerickyeah, I saw that :-)
13:40drewrugh, swank-clojure-find-package is the bane of my existence
13:41cemerickI'm hoping to make a monthly contribution, essentially backing into a regular royalty based on clojure-based app sales
13:41polypusugh
13:46dysingerholy netsplit x2
13:47lghtng_away_awayit's DDOS
13:47lghtngfreenode is under assault atm
13:47hiredmandysinger: are you guys still hiring?
13:48dysingerhiredman: on going yes
13:49lghtngmaybe flks didnt hear the 'pikes to the boards' calls a few days back...
13:50hiredmandysinger: I sent my resume into the jobs@ address a week or two ago, and had't heard back, so I was just kind of curious
13:50lghtngi'd be checking me some updates on critical servers that get referenced alot in freenode traffic, there may be some flanking and spillover onto ircops and allies
13:51dysingerhiredman: ok thanks for the reminder
13:51jasappdysinger: likewise
13:51dysingerhiredman: I'll go check it out - I may have missed it.
13:51hiredmanjasapp: he'll snap a pool cue in half and make us fight for it
13:52dysingerjasapp: hiredman - real names ?
13:52jasappI didn't write clojurebot, so I'm sure it won't be much of a fight :-)
13:52dysinger(so I can match up the emails)
13:52hiredmanKevin Downey
13:52jasappJeff Sapp
13:52dysingerok - I'll setup calls with you today
13:53hiredmanexciting
13:54cemerickheh, sonian is going to swallow the clojure jobs market whole ;-)
13:55hiredmanpull a google
13:56drewrI'm sure dysinger wouldn't mind
13:56jasappI always wondered about when google had to let go of their hiring curve philosophy
13:56cemerickWe'll just have to grow a new batch when we're ready :-)
13:56dysingerWe don't have endless slots but there is work
13:57dysinger:) I am just happy there is jobs
13:57dysingerThese are just the beginning
13:57cemerickabsolutely, it helps everyone
13:57cemerickI was a little surprised by Sonatype. They weren't on my radar at all.
13:58dysingersame here
13:58dysingerThey do maven right ?
13:58cemerickright
13:58dysingerNexus server & consulting
13:58cemerickI think @talios has done work there before, and he's behind clojure-maven-plugin, so I guess the conversations came easily enough.
14:00devlinsfcemerick, dysinger: where is this mythical clojure job market?
14:00dysingerdevlinsf: @ home
14:00devlinsfAh
14:00cemerickdevlinsf: dysinger has ~415 devs, we've got two ;-)
14:00devlinsf:)
14:00dysingerhehehe
14:00dysingerWe only have 5
14:01cemerickyeah, but that's not nearly as wry
14:01jasappare both of you at snowtide?
14:01jasappcemerick, and devlinsf?
14:01cemerickno, dysinger is with Sonian
14:01devlinsfHa, no I'm somewhere else
14:02jasappahh, ok
14:02bagucodednolen: ping
14:02dnolenbagucode: hola
14:03dnolenbagucode: pong, rather
14:03bagucodednolen: I just updated the default path mappings for :native-path in my leiningen fork. Turns out the "send a function from project.clj that gives back a path" was kinda tricky since everything in defproject is quoted.
14:04dnolenbagucode: yeah, I thought about it some more, and I think settling for a uniform lein native path standard is probably the best approach. Sorry haven't had a chance to follow up on the lein ML thread.
14:04bagucodeBut I threw in a fn? check anyway in eval-in-project so if someone manages to pass it a function it will work ;)
14:06dnolenbagucode: thx for working this stuff out, it's makes working with Penumbra so much simpler. So do you think supporting LWJGL will be a big project? Or mostly a swap?
14:07bagucodednolen: Actually, ztellman contacted me to tell me that he was planning on switching to lwjgl! So I'm going to leave that to him obviously :)
14:08bagucodednolen: This is a direct quote "Just FYI, since I noticed the comment in your project.clj file. I plan to begin work on it this weekend."
14:08dnolenbagucode: wow, cool.
14:22cemerickis DoSing freenode just an exercise in griefing, or is there a real objective?
14:25dnolenbagucode: i was thinking about taking a stab it, but if you are going to anyway, I'll just follow your progress ;)
14:25technomancycemerick: sounds like it's targeting a host that's co-located with freenode servers
14:26cemerickoh, I see
14:26mee_cemerick: I think it's usually just griefing, or perhaps it's the staging environment for botnet developers
14:26mee_taking down freenode is one of the functional tests in their suite
14:26mee_;)
14:28bagucodednolen: Alright, I'll just keep at it then. But I don't have much time (between actual work and some stupid contest I agreed to enter). But I'll tell you if I don't think I'll finish it so you can do something about it yourself if that is the case.
14:29dnolenbagucode: actually I'm totally up for collaboration, sorry, didn't know if you want to figure it out yourself.
14:29dnolenbagucode: I will definitely help.
14:30bagucodednolen: I just want it to work :) I think we have the same goal here so I'll gladly take help
14:30dnolenbagucode: fetching your latest now ;)
14:36alexykwhat's the idiomatic ways to do this: (merge-with (fn [vr v] (conj (if (seq? vr) vr [vr]) v)) {:a 1 :b 2} {:a 0.5 :c 4})
14:36alexyk,(merge-with (fn [vr v] (conj (if (seq? vr) vr [vr]) v)) {:a 1 :b 2} {:a 0.5 :c 4})
14:36clojurebot{:c 4, :a [1 0.5], :b 2}
14:37chouseralexyk: the first map may have seqs as values, but the second may not?
14:38polypusit'd be nice if you could go:
14:40polypus(defmulti name fun (:thing-to-match [args] ...))
14:40polypusi mean (defmulti name fun (:thing-to-match [args] ...) ...)
14:40devlinsfalexy: use group-by
14:40devlinsfalexyk: (Sorry) Check clojure.contrib.seq-utils
14:40devlinsfSomething like (group-by key a-coll-of-maps)
14:40polypusw/o always having to rewrite the method names and defmethod
14:41chouserpolypus: should be an easy enough macro to write. :-)
14:42devlinsfalexyk: Hmm... maybe...
14:43devlinsfalexyk: no, I like your version
14:44devlinsfI can't get group-by to work w/o a second mapping operation
14:44mee_except re: chouser's comment, i think 'v' should be replaced with an if to handle v being a seq-providing-thing
14:44devlinsfWell... maybe a pivot....
14:45devlinsfYeah
14:45devlinsfCheck this out:
14:45devlinsfMy Pivot: http://groups.google.com/group/clojure-dev/browse_thread/thread/9a518c853bfbba8b#
14:46devlinsfOr Alex Osborne's Map reduce by
14:46mee_oh, conj handles that, nm
14:46devlinsfAlexyk: http://groups.google.com/group/clojure/browse_thread/thread/7a17676521019237
14:47devlinsfAlexyk: Yeah, use alex's version
14:48polypuschouser: yep, just thought it'd be good in core
14:48polypusirc = fail
14:51stuartsierraI feel like there was not a consensus on whether or not we were doing anything with contrib in conjunction with 1.1.
14:51mefestohey everyone. is there some procedure i need to go through in order to be able to post to the clojure google group? I'm already registered as a member but my replies don't seem to go through.
14:51stuartsierramefesto: new members are moderated
14:52devlinsfstuartsierra: I think we're supposed to bundle contrib as-is
14:52devlinsfstuartsierra: At least something is frozen
14:52mefestostuartsierra: ok, thanks.
14:52stuartsierradevlinsf; Bundle, as in, put contrib in clojure.jar?
14:52stuartsierraThat would mean big changes to the build/packaging process.
14:52rhickeystuartsierra: I think it got muddled between making a branch of contrib, bringing parts of contrib into core, and the original question (for me at least), bundling some parts of contrib in the release zip
14:53stuartsierrarhickey: Right. So what do you want to do?
14:53stuartsierraMy inclination is to get Clojure 1.1 out the door, then deal with contrib.
14:57devlinsfWould freezing contrib "as-is", and calling contrib 1.1 be good enough?
14:57devlinsf2 different jars
14:58mattreplanyone been working on a queue protocol/interface for passing messages between threads and/or VMs?
14:58stuartsierradevlinsf: I'm not thrilled by that prospect, but it would help out with the dependency issues, at least.
14:58chouserJava comes with queues for passing between threads. BlockingQueues
14:59chousermattrepl: agents have queues inside, too.
14:59devlinsfstuartsierra: That's my main concern. At least there would be a common jar to build applications against
15:00stuartsierradevlinsf; Yeah, probably the best we can achieve before the end of '09.
15:00mattreplchouser: you mean in the sense that there's a pool of agents?
15:00devlinsfstuartsierra: I'd be very happy with that.
15:00devlinsfIt's above my pay grade, though :)
15:00chouseragents queue up to use threads from the pool (when using 'send' not 'send-off'), but also actions queue up to be serviced by the agent they were sent to.
15:01mattreplchouser: cool, didn't realize the latter
15:01stuartsierradevlinsf: It's above everyone's pay grade; we're hackers, not release managers. ;)
15:02devlinsfstuartsierra: Too true.
15:02technomancyit's unfortunate that it's impossible to build a project that uses both Clojure 1.0 and contrib using automated dependency mechanisms
15:02chouserwell, except stuartsierra's been deputized. He's a release manager now.
15:02technomancyhopefully 1.1 can avoid that fate
15:02stuartsierraOh, yeah. :|
15:02devlinsftechnomancy: Would this plan help lien?
15:03technomancydevlinsf: it would help everyone using stable releases who doesn't want to build and copy their jars around by hand.
15:03stuartsierraWe could even back-release "contrib 1.0", but I'll put that off 'till january.
15:03technomancyleiningen, clojure-maven-plugin, and ivy alike.
15:04devlinsfstuartsierra: Awesome. how did you feel about my proposal here: http://groups.google.com/group/clojure-dev/browse_thread/thread/c0b9b7857f19001c
15:05devlinsfstuartsierra: It's basically what we're saying
15:05stuartsierradevlinsf: need to test maven/ant/build stuff first, and finish the changes doc, but otherwise yes
15:06devlinsfOkay
15:06devlinsfstuartsierra: Rich was talking about removing the transients section, and linking to the clojure page directly
15:07stuartsierradevlinsf: I wondered about that myself.
15:07devlinsfstuartsierra; Hmmmm... at the very minimum we should provide a link
15:10devlinsfLink inserted
15:12devlinsfstuartsierra, rhickey: After thinking a bit, I like the idea of leaving the transients section in. Have more than one explanation in place would help people pick up the concept. Hearing it explained differently will help different people.
15:14stuartsierra"mvn install" doesn't work in current Clojure master; even after "ant"
15:17cemerickyeah, the poms are just wrong
15:18stuartsierraI'm tempted to rewrite as a Maven-based build, calling out to Ant for scripting.
15:19ericthorsencemerick: Are you referring to the default source root in the pom files (or lack thereof)
15:20albinowhy not call out to clojure :)
15:20cemerickstuartsierra: I floated that last week, rhickey didn't sound receptive
15:20stuartsierraalbino: because we're building Clojure!
15:20cemerickericthorsen: to start, yes
15:20stuartsierracemerick: ok, I can probably hack the POM so it works with the ant build
15:21alexykhey guys, I know it's almost cast in stone, but contrib is really stdlib
15:21albinostuartsierra: so we can't call out to the previous version of clojure while building the newer version?
15:21cemerickstuartsierra: I think 1.2 is a reasonable goal for lobbying for a maven-driven build
15:21alexykperhaps a similar mechanism can be deployed as for clojure-lang to rename it
15:21alexykwith an alias to c.c. until deprecated
15:21stuartsierraalbino: theoretically we could, but the we'd need to include the old version in the build
15:21cemerick*parts* of contrib are a stdlib. Other parts, not so much.
15:22albinostuartsierra: okay, I'll stop harping, but I'd rather install a previous version of clojure over ant and maven :)
15:22ericthorsencemerick: I was going to submit a patch until I saw that having more than one source root for a maven project was not supported out of the box (I know little about MAven)
15:22alexykcemerick: exactly. So perhaps a smaller, fixed stdlib can be carved out of contrib.
15:22stuartsierraalbino: you'll probably only need ant
15:22cemerickericthorsen: multiple source roots aren't a problem, that's a simple fix
15:22devlinsfalexyk: See here:
15:22stuartsierraalexyk: that's a goal in my mind for 1.2
15:23cemerickgetting the compilation and install/deployment of the various artifacts will take a little bit of work
15:23devlinsfhttp://groups.google.com/group/clojure-dev/browse_thread/thread/e5083948af33939f#
15:23cemerickdevlinsf: thank you
15:24devlinsfme 4....
15:24cemerickI think that's a more productive path than promoting libs
15:24devlinsfJust don't know how to set status in irc...
15:24stuartsierraI've got a whole set of standard libs laid out in my head.
15:24stuartsierradevlinsf: type /me then your status
15:24alexykah ok, link covers it
15:24devlinsfstuartsierra: Thanks
15:24stuartsierradevlinsf: welcome
15:25stuartsierraBut first, 1.1 or bust!
15:25devlinsfYes, 1.1
15:25devlinsfstuartseirra: Want to talk to you about str-utils for 1.2... but it can wait
15:26cemerickI'd actually rather see a real stdlib discussion hold off until 1.3 or whatever -- get the types, protocols, reify under our belt
15:26chouseralso, parts of clojure.jar are stdlib
15:26chouserclojure.xml, clojure.zip
15:26devlinsfclojure.test
15:27stuartsierrarhickey: I'm going to make a ticket for Maven-related stuff in 1.1, ok?
15:29stuartsierracemerick: good point re types/protocols/reify
15:29stuartsierraIn the interim, numbered contrib releases might help some people out.
15:30cemerickIf a transition to maven can be made, then that's *almost* not necessary.
15:30stuartsierracemerick: almost
15:30cemerick...or, so easy to do as to make it a non issue :-)
15:30stuartsierraRight.
15:30Chousukehmm
15:31stuartsierraHere's an easy fix for a Java person: http://www.assembla.com/spaces/clojure/tickets/218-Deprecate-old-launch-Classes
15:31alexykstuartsierra: will maven releases cover cases for different branches? in Scala, it's solved by suffixing the maven artifactId with a version, e.g. scala-json-2.7.7 vs scala-json-2.8-SNAPSHOT. Then the version field is a true version. This is the consensus for Maven-centric tools after a lot of trying.
15:31ChousukeI wrote some documentation for function pre- and postconditions but I still don't like that it all is in the fn docstrings
15:32alexykE.g. I'd like to try protocols in an easy to build way, having clojure-new, contrib-new all properly stuffed into maven
15:32stuartsierraalexyk: We're close to that with build.clojure.org
15:32Chousukeideally you should be able to do something like (doc preconditions) and (doc postconditions) :/
15:33stuartsierraChousuke: could you copy that into the Changes doc?
15:33Chousukestuartsierra: Sure.
15:33stuartsierraChousuke: thanks
15:33alexykstuartsierra: how close? :) is the convention the same? I've seen clojars kinda tossig namespaces, suggesting same naming for groupId and artifactId. Doesn't help with language branches at all.
15:34alexyki.e., where does the "new" branch suffix go?
15:34alexykbtw "new" is quite a terrible branch name
15:34stuartsierraalexyk: I don't have answers for you, I'm afraid.
15:35alexykstuartsierra: you're the first person not spitting nails about maven but rather wanting something to do with it, hence my asking :)
15:36stuartsierraalexyk: I will continue to push for regular Maven-based releases, but there's a lot of organizing to do.
15:36alexykstuartsierra: good
15:37hiredmanalexyk: new refers to new new, the main feature the branch was originally for work on
15:38alexykhiredman: right, but in maven, it better be called clojure-proto or something meaningful. There's also something new, and nothing's new under the Sun.
15:39alexykalways new, I mean
15:39stuartsierraok, I'm off for a bit, I'll try to tackle the 1.1 POM this evening
15:40hiredmanalexyk: the feature that the new branch was originally made to work was called "new"
15:40alexykhiredman: ah, ok. Well it takes 3 iterations to penetrate a head. :)
15:41alexykIt's like a person called Andwhatsyourname.
15:42alexyk"-- My name is John. -- Andwhatsyourname! -- John, and yours? Andwhatsyourname! ..."
15:48devlinsfalexyk Who's on first?
15:48alexykdevlinsf: I don't get baseball, so that makes no sense to me :)
15:49devlinsfgasp!
15:49devlinsfIt's a classic!
15:50alexykdevlinsf: I know, still makes no sense! :)
15:54lghtngbaseball is a test of coolness under pressure
15:55lghtngunlike continuous action sports that arent quite as dependent on actual 'zero to 60' quickness
16:01KirinDaveoh man
16:01alexyklghtng: baseball is middle-aged men in tight pants leisurely walking around for 8 hours
16:01KirinDaveThis is not a good conversation to have in #clojure.
16:01devlinsfSo it doesn't belong in this ball park?
16:02alexykok, back to basics. How do I merge a seq of tiny maplets, ({:a 1} {:b 2}) into one huge map, {:a 1 :b 2} most concisely & fast? My seq is long.
16:02arohner,(doc merge)
16:02clojurebot"([& maps]); Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result."
16:03alexyk,(merge ({:a 1} {:b 2}))
16:03clojurebotnil
16:03KirinDaveAnd also
16:03chouser,(apply merge ({:a 1} {:b 2}))
16:03clojurebotnil
16:03KirinDave,(doc merge-with)
16:03clojurebot"([f & maps]); Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (f val-in-result val-in-latter)."
16:03chouser,(apply merge [{:a 1} {:b 2}])
16:03clojurebot{:b 2, :a 1}
16:03alexykI don't need -with, I'm guaranteed to have distinct keys.
16:04alexyk,(merge {:a 1} {:b 2})
16:04clojurebot{:b 2, :a 1}
16:04KirinDaveLol
16:04alexykworks for literals, not for enclosing seq
16:04danm_,(reduce merge '({:a 1} {:b 2} {:c 3}))
16:04clojurebot{:c 3, :b 2, :a 1}
16:05danm_yay?
16:06the-kenny,(apply merge '({:a 1} {:b 2} {:c 3}))
16:06clojurebot{:c 3, :b 2, :a 1}
16:06alexykdanm_: leaves me with only the last element of real data, which I test with (take 5 bigseq)...
16:07danm_hmm, worked for clojurebot though
16:08hiredmanalexyk: are you sure you are using it correctly?
16:09alexykhiredman: no :)
16:09hiredman
16:10alexykwtf: http://paste.pocoo.org/show/157258/ ?
16:10alexykdoh
16:10alexykI need to invert keys...
16:10hiredman
16:11djorkreduce + merge?
16:11djorkare you positive?
16:11hiredmandjork: his keys are not unique
16:11devlinsfalexyk: clojure.set
16:11alexykdjork: works, my data was inverted
16:11alexykI fetch from Mongo and just need to insert into the map differently
16:12alexykbtw that was justinbieber dominating twitter pagerank. How many of you know who that is? (instant poll)
16:13alexykor, does *anybody* know who Justin Bieber is?
16:14alexyk...there's nothing wrong in admitting you do! :) For the betterment of science.
16:29alexykis there a filter-not predefined?
16:30chouserremove
16:30alexykthx!
16:35lghtbthrm
16:36lghtngthe sparlq might be a little steep for me at this point
16:36lghtngi need something simpler
16:36lghtngas a learning project
17:02mabes,(let [foo (transient {})] (doseq [i (range 15)] (assoc! foo i i)) (persistent! foo))
17:02clojurebot{0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6, 7 7}
17:03mabesdoes anyone know why I could only assoc! 8 times within a doseq? ^^ (I'm using transients to count stuff)
17:03Chousukemabes: that's abuse of transients
17:04Chousukemabes: you can't reuse the reference.
17:05mabesChousuke: well, I have a version that is not using transients and just uses maps with persistent structures but the memory use is an issue
17:05Chousukemabes: no, I mean
17:05mabesso, I found this post that suggested using transients for something similar: http://www.bestinclass.dk/index.php/2009/12/clojure-vs-ruby-scala-transient-newsgroups/
17:05Chousukemabes: you can't write imperative code with transients.
17:05mabesoh
17:05mabeshrm.
17:05Chousukemabes: it's mutable, but it still needs to be functionally structured.
17:06Chousukemabes: treat it as it were a regular immutable map and everything will be fine.
17:06mabesChousuke: ok, so I would need to restructure the comprehension into maps or something?
17:08alexykliebke: how do I plot 4 mllion [x y] pairs?
17:08liebkevery carefully :-)
17:08Chousukemabes: http://gist.github.com/257351
17:09alexykliebke: I mean, what's the fun for scatter plot? And will JFreeCharts take 4 mil?
17:09Chousukemabes: build it just as if it were a functional map, just substituting assoc for assoc! and wrapping the final return value with (persistent! ..)
17:10the-kennyalexyk: Maybe just write them to a file and call gnuplot on it
17:10alexykthe-kenny: the whole point of using incanter is to dispense with files :)
17:10liebkethe function is incanter.charts/scatter-plot. I would be (pleasantly) surprised if it handled 4 mil points
17:10alexykliebke: need I sort them anyhow?
17:11liebkeno
17:11Chousukemabes: the whole point is that you don't need to change the way you write algorithms just to use transients :)
17:11alexykliebke: well, histogram can handle millions; I wonder how can I bucket points to plot fewer...
17:12mabesChousuke: right. Thanks for the info and gist. Reading up on transients now..
17:12liebkealexyk: try it with the full set, see how it goes
17:13alexykliebke: My data is a seq ([1 2][3 4]...), should I just call scatter-plot repeatedly with it?
17:14liebkescatter-plot takes two sequences, x and y -- you'll need to convert your data format a bit
17:14alexykah ok
17:14technomancyit seems like a lot of the confusion over transients stems from confusion between "persistent" and "immutable" data structures.
17:15technomancyI understand why they are often conflated, but if you focus on the fact that transients are simply not persistent then it's much clearer
17:15Chousukethat's why I like the naming.
17:15rhickey_yes, the idea is that they are opposites
17:16rhickey_in that dimension
17:16technomancyif people don't understand what persistence means, it's no wonder transients are confusing.
17:17Chousukerhickey_: btw, how about extending the assert macro to accept an optional message argument? Could make error messages much clearer.
17:17the-kennyIt's helpful to read the text about the falling tree :)
17:17Chousukewouldn't be a breaking change either.
17:20Chousukerhickey_: I have some documentation stuff in my git tree, and I think the pre/postcondition failure messages are a bit too generic. "assertion failure: (> x y)" is not very nice :/
17:22lghtng'creating identities out of things that should be values'
17:22lghtngman. that's deep.
17:23polypusis there something like finite? implemented for seqs and collections?
17:25lghtngyou know, i sort of have a theory that object oriented paradigm creep has damaged the business model, which has given birth to the Cloud. a sort of mass retreat behind the firewalls.
17:25technomancypolypus: See http://en.wikipedia.org/wiki/Halting_problem =)
17:26polypushaha
17:26hiredman~the halting problem?
17:26clojurebot"There is no problem in computer programming which cannot be solved by an added level of indirection." -- Dr Maurice Wilkes
17:27drewrtechnomancy: you noticed that swank-clojure-find-package doesn't work for namespaces with meta?
17:27polypusthis could be done though if one knoew the origin of a seq. like (map f [1 2 3]). metadata could indicate that the seq is finite.
17:27polypusknew*
17:27hiredman~halting problem?
17:27clojurebotnot a problem, the average bid for it on getacoder is $821.00
17:27technomancydrewr: I don't work with any namespaces that have metadata (other than docstrings), so I haven't noticed that myself.
17:27technomancywaiting for someone who does use them to submit a patch. =)
17:28drewrI don't work with them either until I try to patch code that does, e.g. clojure.core :-)
17:28polypusif it is unknown whether it is finite false could be returned from finite?
17:29drewrenvisioning the regexp that mimics the clojure reader is giving me a headache
17:29alexykliebke: can I first do (def myplot (scatter-plot xs ys)) and then (view ..) it?
17:29liebkeyes
17:29technomancydrewr: boo; when did that get added to core.clj. =(
17:29lpetitpolypus: in the case of a seq, how do you know it is unknown ? :-)
17:29alexykwell it's ingesting 4 mil points, let's see :)
17:30polypus(:finite (meta a-seq))
17:30technomancydrewr: not supporting it was my subtle way of discouraging people from adding useless metadata, but I guess if it's made its way into core that battle is lost. =(
17:32polypusmap could set the meta of a new seq from a finite collection to true. if it is mapping a seq onto a seq it could inherit the meta
17:32polypuscycle could return a seq with #^{:finite false} etc.
17:33polypusis there some reason this could not work?
17:33liebkealexyk: cool, I need to go now, let me know later if it works.
17:33alexykliebke: yeah, still ingesting...
17:34liebkealexyk: I imagine it will take a while. talk to you later
17:34alexykliebke: ttyl
17:34tomojpolypus: it bottoms out
17:34lpetitpolypus: i don't know
17:34tomojand where it bottoms out, I'm sometimes going to have to say for myself whether it's finite or infinite
17:35arohnertomoj: what do you mean by 'bottoms out'?
17:35polypustomoj: in cases where it is unknown it just just return false
17:36hiredman_polypus: if you want a finite seq, use a list
17:36tomojpolypus: ok, that could work
17:36arohnerpolypus: another way to think of this is seqs have two methods: give me the next, and give me the rest
17:37arohner"give me the rest" is a function that is almost arbitrary
17:37tomojarohner: I mean that eventually the value for :finite has to come from somewhere, and there are places where there is no way for it to automatically be provided
17:37lpetitpolypus: use case for this new "functionality" ?
17:37tomoj(unless you just are conservative and have it be false when you don't know)
17:37polypustomoj: example of a place
17:38arohnerpolypus: I can construct a valid lazy seq that is infinite on Tuesdays, and finite the rest of the days of the week
17:38tomoj:)
17:38polypuslpetit: when designing an api where the user can supply a collection and you need to know whether it is finite w/o the user having to specify it explicitly.
17:38arohnerso it does come down to the halting problem
17:39tomojsuppose we have a predicate that returns true if the number passed to it is the sum of two primes, false otherwise
17:39technomancypolypus: calling it "finite?" is misleading; the best you can do is "known-finite?"
17:39polypussure the name is not set in stone
17:39hiredman_if it is finite, use a list
17:39tomojnow (take-while goldbach? (iterate (partial + 2) 2))
17:39hiredman_,(list? (iterate inc 0))
17:39clojurebotfalse
17:39tomojno one knows whether this seq is finite or infinite :(
17:39hiredman_,(seq? (iterate inc 0))
17:39clojurebottrue
17:40hiredman_,(apply list (take 5 (iterate inc 0))))
17:40clojurebot(0 1 2 3 4)
17:40arohnerthat needs to die as an idiom
17:41tomojyeah
17:41Chousukehmm
17:41Chousuke,(range)
17:41clojurebotjava.lang.IllegalArgumentException: Wrong number of args passed to: core$range
17:41technomancyarohner: why a function? why not just a var? positive-integers
17:41hiredman_technomancy: var would hold the head
17:41Chousuketechnomancy: head holding
17:41technomancydoh
17:42lpetitpolypus: as hiredman said, in your api, either expect your user to pass a real collection (finite), or a seq (possibly infinite) + the explicit flag saying if it's finite or unknown ?
17:42tomojsomething for just generating arithmetic sequences would be cool
17:43tomoj[2,4,..]
17:44lpetittechnomancy: can you explain to me the difference between "persistent" and "immutable", or more interestingly, where the difference is important ?
17:45hiredman_tomoj: uh, what is iterate then?
17:46technomancylpetit: in a nutshell, persistent means "old versions are still available for use without performance penalties", which means that persistent data structures are immutable, but not neccessarily vice versa
17:46technomancyit probably deserves a blog post. we'll see. =)
17:46chouserbut transients are still their own thing.
17:46technomancyactually not 100% sure if the "without perf penalties" is part of a strict definition of persistent, but in the context of clojure it's true
17:46chousernot immutable and therefore not persistent. But also cannot be treated as mutable.
17:47technomancychouser: but their mutability is an implementation detail that the user shouldn't be aware of. the user should just be aware of their non-persistence
17:47technomancyIIUC
17:47rhickey_technomancy: yes, that's the better way to think about it.
17:48rhickey_because mutability is a weak concept
17:48tomojhiredman_: something I can use to make something which is for generating arithmetic sequences
17:48aldebrnNoob question about mutability. How should I think about Java numerical libs that operate on arrays in-place? Should my wrapper function somehow copy the input, send that to the Java lib, and return the processed copy to the caller?
17:49rhickey_I didn't have time earlier, but I have some new ideas around transients
17:49technomancyit doesn't help that to many developers coming from OO, persistence means "saving to disk". (all the good words have been used)
17:50rhickey_yeah
17:51hiredman_~latex \sum_{i=0}^{∞} i+1
17:52notallamais there a conventional way to name types with deftype? Like-this, OrThis, or-this?
17:53lpetittechnomancy: so "persistent", beyond conveying the meaning of immutability, also conveys the meaning that derivative objects can be made cheaply from the datastructure at hand ?
17:55technomancylpetit: more or less. and that old versions persist for free.
17:56rhickey_lpetit: the performance promises are those of the data structure. persistence really gets to the fact that 2 versions have independent lifetimes, both preserving those promises
17:57rhickey_vs implementations that cheat and have perf degrade for older versions, or older versions are read-only etc
17:58rhickey_for me, full persistence means older is as good as newer
18:13KirinDaveHm
18:14KirinDaveI am trying to read that monad tutorial for clojure.
18:14KirinDave(at http://onclojure.com/2009/03/06/a-monad-tutorial-for-clojure-programmers-part-2/)
18:14KirinDaveThe "mystery" exercise is eluding me though
18:15KirinDaveDoes anyone know what the intent was there?
18:18hiredman_man
18:18hiredman_clojure cds!
18:18hiredman_like a relase of clojure + contrib on a cd with a printed picture on it
18:19hiredman_the swirly λ logo thing
18:22technomancymwoichandising!</space-balls>
19:02notallamaso i need to run some functions sequentially. order doesn't matter, but only 1 should run at a time. agents don't fit, because i need the value, not the side-effect. atoms don't work because it shouldn't retry. any suggestions?
19:07arohnernotallama: do you need some kind of threading? Why not just a normal function?
19:07arohner[(funA) (funB) (funC)]
19:09notallamaarohner: i'm trying to wrap a side-effectful, mutable-stateful library. so i'm calling the function from multiple threads, but i want it to block if another thread is doing so.
19:10arohner,(doc promise)
19:10clojurebot"([]); Experimental. Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to delivery will block. All subsequent derefs will return the same delivered value without blocking."
19:10arohneror maybe
19:10arohner,(doc future)
19:10clojurebot"([& body]); Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block."
19:14notallamanot quite what i need. i think i know what i need now, though. it just occured to me that this thing is basically an iterator, so a lazy-seq should work.
19:15arohnerah, that's interesting. you're right though, one instance of a lazy seq will evaluate each item once, in order
19:16notallamai think repeatedly will make this crap much easier to deal with.
19:20mabesI am trying to use pmap on some big chunks of data. It seems to work great and churns through everything but after it outputs the data the process just hangs for several seconds.. does that sound familiar to anyone?
19:22_atomabes: add (shutdown-agents) to the end of your program
19:22mabes_ato: ahh, so pmap use agents under the hood that you have to shutdown explicitly... thanks for the tip
19:26_atomabes: yeah, well I don't think it uses agents exactly but it uses the same thread pool. That's something that I trip over all the time. Not sure why it can't happen automatically.
19:27mabes_ato: ok. many thanks, that was very frustrating but we are now seeing major win with pmap :)
19:28notallamafuture uses the agent pool as well (the send-off pool)
19:31arohner_ato: AFAIK, java doesn't have a "it's time to shut down now" hook, so code can't clean itself up automatically
19:31arohnerah, nm. I has one, but has been deprecated since 1.2
19:31arohners/I has/it has/
19:31hipertrackerhow tu run clojure script from the shell? What shebang I can use?
19:35technomancyhipertracker: there's a shell script in contrib, but there's really no single good way to do that unfortunately. everyone seems to end up rolling their own launchers. =(
19:36hipertrackertechnomancy: its is strange. even Scala has simple shebang
19:37twbray_ato: Waiting with bated breath for your WF writeup.
19:42_atotwbray: I'm on the final section. :-) Sorry, I'm a terribly slow writer
19:42twbray_ato: nag, nag nag
19:45hipertrackertechnomancy: I create simple bash file cljrun: java -cp /opt/local/share/java/clojure/lib/clojure.jar clojure.main $1. it work
19:45hipertrackerer, it works
20:03technomancyhipertracker: there's no standard location for the jar(s) though. plus most programs at least use contrib. and then many use other third-party jars as well.
20:04hipertrackertechnomancy: I know. I use clojure from macport
20:04hipertrackermacports
20:06hiredman_technomancy: you can replace the system classloader with something you can add stuff to
20:08hiredman_(I happen to have such a classloader am looking for feedback)
20:20technomancyhiredman_: O RLY? send 'er on over.
20:20technomancysounds intriguing
20:21hiredman_http://gist.github.com/255766 if you run that, it will create a cl.jar in the pwd, and print instructions for use
20:21technomancywill take a look later tonight; thanks
20:22hiredman_let me know what you think
20:29aldebrnAny right way to do complex numbers in Clojure? (I'm using JTransform, it stores complex number arrays as [real1 imag1 real2 imag2 real3 imag3])
20:31defnaldebrn: check out http://commons.apache.org/math/userguide/complex.html
20:32defnaldebrn: if you're going for speed, Java might not be the right direction
20:34defnaldebrn: also, just out of curiosity i found there is a clojure-contrib library in the works for
20:35aldebrndefn, thanks. I guess I'm looking for the same kind of speed Python and Matlab give, by farming out heavy math stuff to custom C/Fortran libraries
20:35defnah
20:35defnfor it*
20:35aldebrnI saw that too, and was discouraged by clojure-contrib's complex support as limited to arithmetic/compare
20:36defn*nod* -- as far as speed goes it looks like C, C++, etc. is probably the best route
20:38aldebrnI want to emphasize that scientific computing in Python/Matlab (this latter is heavily Java-based) is very fast computationally (thanks to external libraries) and very fast coding (thanks to high-level language)
20:38aldebrnAre you suggesting I find what C/C++/Fortran libraries are used and write wrappers for Clojure?
20:39defnaldebrn: i dont know enough to give you a definite answer
20:39defnbut that seems like a possible route, no?
20:41aldebrnAnything is possible :). liebke is gathering a lot of functionality in Incanter, let's hope the complex-number work has been done
20:41defnaldebrn: sure, it's hard to imagine incanter wouldn't at some point have complex numbers
20:42liebkealdebrn: Parallel Colt has complex number support, I just haven't needed it, so I haven't wrapped it
20:43aldebrnliebke, that's great. I'll look into it
20:43aldebrnHard to do FFTs without easy complex numbers
20:46aldebrnParallel Colt todo item: 'Port PLASMA 2.0 and implement all the wrappers (include complex arithmetic in single and double precision).'
20:46aldebrnBut the basic stuff is there :)!
21:11dnolen_ato: ping
21:12dnolen_ato: so there a 10mb limit on Clojars uploads? I'm trying to get jogl2 up there so I can hack on :native-dependencies support, can this be upped just a tad?
21:12dnolen_ato: my jogl2 jar is 11.8mb
21:17_atodnolen: ah sure. I just set a conservative 10mb to start with. Just a sec
21:18dnolen_ato: thx!
21:22_atodnolen: give it a try now
21:22dnolen_ato: working like a charm.
21:23_atocool. :)
21:25RaynesI'm surprised people still use the whole "OMG but it's a better OS than it is a text editor." thing anymore.
21:27dnolen_ato: how do you delete something you've pushed? does pushing something again wipe out the old one?
21:27_atodnolen: if it's the same version then yeah it'll overwrite it
21:28_atoa delete function is on my TODO list but I haven't gotten around to it yet.
21:28dnolen_ato: ok cool.
21:36tomojis it safe to try leiningen again yet?
21:42defnerror in process filter: Wrong number of arguments: called-interactively-p, 1
21:43defnim getting that when i run swank-clojure-project
21:56_atotwbray: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
22:01hiredman__ato: #^"Ljava[.lang.String;" should be #^"[Ljava.lang.String;"
22:04_atohiredman_: ah thanks
22:08hiredman__ato: excellent write up
22:11rhickey_3000 members on the google group!!
22:12_atohiredman_: thanks. :-)
22:12danlarkin_ato: ya just finished reading, supergrats
22:12_atorhickey_: woohoo!! I was watching the count down last night... 2994... 2995...
22:14stuartsierrarhickey_: I dropped my Maven ticket, instead added ZIP distribution target to the Ant build.
22:15chouser_ato: "We open first open"
22:16alexykstuartsierra: why? maven is very useful!
22:16_atochouser: ah, thanks
22:16stuartsierraalexyk: Current build supports maven via Maven Ant Tasks
22:17stuartsierraNot ideal, in my opinion, but good enough for 1.1.
22:17alexykstuartsierra: oh well
22:17RaynesHaha. It's moved from hating on Emacs, to hating on Lisp and other dynamically typed languages. (in #haskell)
22:18alexykRaynes: I found #haskell very disconcerting compared to #ocaml, #scala and #clojure. Probably size matters.
22:18alexyk..wait until script kiddies arrive en masse
22:19alexykwe need a pack of strict disciplinarians ready
22:19RaynesMost of them are rather smart people. It just gets on my nerves when they pretend Haskell is the only viable language out there.
22:19hiredman_clojurebot: whose job is it to keep them in line?
22:19clojurebotthat's weihsiu's job
22:20RaynesIt's sort of like the Java, C#, etc coders pretending that object orientation is the only way to do things.
22:20rhickey_stuartsierra: my maven concerns had to do with artifact naming etc. I think there was some problem last time with the svn tag not matching or something.
22:21rhickey_we should still build with ant definitely
22:21stuartsierrarhickey_: Ok, I submitted a patch to build a distribution ZIP with Ant.
22:21rhickey_also ericthorsen has brought up an issue with our pom which was never resolved
22:21rhickey_something about it messes up Netbeans
22:22stuartsierra~seen ericthorsen
22:22clojurebotericthorsen was last seen joining #clojure, 237 minutes ago
22:22alexykfunny, I was pondering using jruby in my JVM stable, and tried to see if I have all the standard map, filter, list routines in it. What OO briings there is . notation left to right and the do...end block, possibly as { } -- that's a good contribution to functional. The question is, can you translate most of the goodness between clojure and ruby.
22:25stuartsierraFound ericthorsen's msg: http://groups.google.com/group/clojure-dev/browse_thread/thread/c8cec4225fecd01d/3d39f207754cb263
22:25technomancy_ato: looks like a stray "nnnn" snuck into your WF2 article
22:25technomancy(happens to me all the time)
22:25stuartsierraThe problem appears to be that Netbeans sees a pom.xml and assumes that the project is Maven-based.
22:26stuartsierraWhich it isn't, so Netbeans assumes a different directory structure than what's there.
22:26rhickey_zip with ant a good idea
22:27rhickey_stuartsierra: yes, I didn't know enough about either to help him, but no one ever chimed in
22:27alexykhow do you materialize a lazy seq in the same way as (count xs)?
22:27_atotechnomancy: thanks. yeah.. I just recently disabled arrow keys to force myself to do navigate the proper way so I keep doing that all the time now :P
22:27alexyk_ato: Clojurnne beginners :)
22:27stuartsierrarhickey_: It should be better now that we have pom-template.xml instead of pom.xml
22:28alexyk_ato: nice writeup
22:28rhickey_stuartsierra: ok
22:29stuartsierrarhickey_: sent ericthorsen an email about that
22:29rhickey_the new zip file should nest the stuff in a clojure directory, got complaint about the old one
22:30stuartsierraYes, I made sure to do that.
22:30stuartsierraIt creates clojure-{VERSION}.zip, expanding to clojure-{VERSION}/...
22:31rhickey_makes sense
22:31stuartsierraChanges doc is coming along nicely; Chousuke wrote up pre/post conditions.
22:40defn(defn merge-rows [a b] (map + (map #(apply max %) (partition 2 1 a)) b)) (map #(apply max %) (partition 2 1 (reverse [[1] [2 3 4] [5 6 7]])))
22:40defnerr (merge-rows (reverse [[1] [2 3] [4 5 6]]))
22:40defnwhy doesnt merge-rows blow up here? im only giving it one arg
22:41hiredman_it should, if it doesn't then it is not defined or being called as you described
22:41defnoops nevermind
22:42hiredman_:)
22:42defnwhat i was surprised about i guess is:
22:42defn,(partition 2 1 [[4 5 6] [2 3] [1]])
22:42clojurebot(([4 5 6] [2 3]) ([2 3] [1]))
22:43defnso merge-rows understands the first arg to be [4 5 6] and [2 3], yes?
22:43defnerr the first and second args
22:44hiredman_eh?
22:45defn(defn merge-rows[a b]
22:45defn (map + (map #(apply max %) (partition 2 1 a)) b))
22:45defn
22:45defn(reduce merge-rows (reverse routes))
22:45defnbleh sorry
22:46defnthe only arg there, in my eyes, is the array of arrays, which is routes: [[4 5 6] [2 3] [1]]
22:46hiredman_not arrays
22:46hiredman_vectors
22:46defnblahhhh im sorry man my brain is mush
22:46tomojreduce is not calling the function with (reverse routes)
22:46hiredman_and partition being a seq function calls seq on it's argument
22:46defnoh right
22:47defnim going to quit on that note, i cant believe i missed that :\
22:47hiredman_so you get '([4 5 6] [2 3] [1]) and partition operates on a seq of values
22:48defnyeah, reduce is really what gives us the ability to apply that function across routes
22:49defnanyways, thanks for showing me the error of my ways
22:52defnhttp://meshy.org/2009/12/13/widefinder-2-with-clojure.html
22:52defn_ato: nice.
22:53_ato:)
22:56defn_ato: this is awesome. thanks for posting it. can i add an rss feed to your blog, or should i download this so i dont lose it :)
22:57_atodefn: there's an atom thingy here: http://meshy.org/atom.xml
22:57_atowhich may or may not be valid
22:57defnyeah i found it after a bit of trial and error
22:57defnit looks valid to me
22:58defni guess my main question was, do you plan to keep this blog up?
22:59_atoyeah probably. I don't expect to post that often, but there's some clojars stuff I'd like to write up
22:59defn*nod* -- what are you using for writing your post? it looks like... pygments + markdown maybe?
23:00twbrayHey _ato, is http://meshy.org/ your canonical URL?
23:00_atotwbray: yep
23:01twbrayYes, your feed is valid, http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fmeshy.org%2Fatom.xml
23:01_atodefn: yeah, I tried jekyll after you were talking about it. I'm a big fan of markdown and pygments just works. Here's what the source looks like: http://meshy.org/~ato/tmp/2009-12-13-widefinder-2-with-clojure.markdown.txt
23:03twbray_ato: Was that 13 minutes really your *first* run?
23:03technomancyshould that be mentioned in the docstring?
23:04twbray_ato: You want an affiliation if I mention you? "Alex Osborne, of XXX..."
23:05hiredman_of #clojure :P
23:05_atotwbray: I think it was my first run that completed on the full dataset. That may not be the exact timing but it was around that. I'd done a fair bit of testing on the smaller version, and didn't give it enough RAM in my real first run so it just got stuck.
23:05defn_ato: cool, what this {% highlight clojure %} line? I've been using a verion of markdown in python where you specify code blocks with a #!clojure or :::clojure depending on if you want line nos
23:06twbrayhiredman: I like that
23:08_atotwbray: you could say "National Library of Australia" as the affiliation
23:08_atohttp://www.nla.gov.au/
23:08twbrayOK
23:08twbrayCanberra is an unsuspected hotbed of functional programming I'm sure
23:09_mstour clojure user group has two members!
23:09_mstbut we're marketing aggressively...
23:09_ato_mst: we should add Mark Reid to it
23:09defnheh, i cant find anyone around here interested in clojure
23:09_mst*three* members!
23:09shoovertechnomancy: It uses the cached (growable) thread pool used by send-off, so it shouldn't affect anything related to agents
23:09_mst(the third doesn't know he's in yet... the initiation may come as a shock)
23:10defn_mst: haha
23:10defnis this '_' business preceding your nicks a gang sign?
23:10_msthm... isn't that just something erc does?
23:10_msta gang of sorts...
23:10tomojerc doesn't do it to me
23:11_mstI mean, since "mst" was already taken by someone more deserving :)
23:11_atoyeah.. same for me
23:11technomancyshoover: I just was noticing that _ato's code calls shutdown-agents after using pmap
23:11tomojI get a backtick on the end if I try to connect when I'm still here
23:12technomancyif that's required it should be stated somewhere
23:12shoovertechnomancy: true, you would need to know that
23:12twbrayThere are a few things in _ato's code that you "need to know" :)
23:12twbrayNow more people will.
23:13shooverI like how _ato put the appropriate emphasis on "don't rewrite split unless you have to!"
23:13defnyeah, kudos _ato for not just the great code, but an excellent explanation
23:14_atoyeah, I think pmap uses the same thread pool as agents. I guess it's called shutdown-agents just because agents existed before pmap
23:14shoovertechnomancy: my question is if we can get rid of shutdown-agents by using daemon threads and making the programmer call await to purposely block on running agent threads
23:15shooverin other words, use threads that don't intrinsically block System/exit
23:15_mstshoover: it's come up before: http://www.assembla.com/spaces/clojure/tickets/124
23:16shoover_mst: thanks, I wasn't aware
23:17technomancy_ato: hey, I hope you haven't been waiting on me for that clojars browse functionality I said I was going to write.
23:18technomancyI'm going to have to retract my offer to implement it; too busy with lein and swank and holidays etc.
23:18_atotechnomancy: nope, I've been distracted by this widefinder stuff. I've got 6 clojars emails sitting in my inbox that I need to deal with now that's out of the way
23:18technomancyor at least to implement it in a timely manner
23:18_atotechnomancy: okay, no worries :)
23:20technomancyactually that's not fair; I'm glad there are a lot of people discussing/contributing to leiningen and swank
23:20technomancyI just can't keep up. =)
23:22chouser_ato: great writeup!
23:24_atochouser: thanks. :-)
23:32defn_ato: will you be submitting this to the results page for WF?
23:32defn_ato: you mention you inched past single-threaded C, but you also beat one of the OCaml implementations
23:34_atoah, I guess I should
23:34_atohmm
23:37defnit looks like you're supposed to email tim.bray@sun.com with your results for a 100,000 line sample, but seeing as tim is in here, im not sure that's necessary
23:38_atoyeah, I think that's just to get an account on the box. probably I just need to create a sun account and I'll be able to edit the wiki
23:38_atogoing for lunch though first, I'm starving, writing really takes a lot of energy
23:38defn_ato: again, great job, enjoy your lunch :)
23:41tomojmabes: hey, are you a clojurian now?
23:41devlinsfWhere is _ato's post?
23:41mabestomoj: heh, getting there ;) I have some people on board at work so we've been doing some prototyping with it to get a feel for it
23:42mabesdevlinsf: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
23:42tomojcool
23:42mabestomoj: what about you?
23:42tomojseems to me that people here aren't as obsessed with testing
23:42tomojI miss webrat :(
23:43tomojmabes: also getting there, but much more slowly probably
23:43mabestomoj: I think we are probably going to keep all of out webapps in ruby for the time being.. we are just using clojure for the backend heavy lifting stuff
23:43tomojyeah, makes sense
23:44defntomoj: im interested in testing more, but for now im focused on learning forms and playing with the pieces
23:44tomojI hope someday for a clojure webapp ecosystem that makes me as happy as ruby's
23:44mabesthere is a clojure webdriver adapter currently.. and you can use cucumber with clojure so that will get you pretty far
23:44tomojwat
23:44tomojshit, I've been working on a webdriver adapter, didn't know someone already did it
23:45mabesheh, yeah... lemme get the link...
23:45devlinsf_ato: Good stuff
23:45defnwhat is the biggest step between where clojure's web development tools are now and where ruby's are?
23:45tomojmikitebeka's?
23:45devlinsfdefn: I'd say front end
23:45mabestomoj: http://github.com/mikitebeka/webdriver-clj yep
23:46tomojthanks
23:46devlinsfdefn: It's really easy to make Rails look great
23:46devlinsfdefn: Of course, I'm a CSS + HTML nerd
23:47tomojI started with an htmlunit adapter because there I could use enlive style selectors easily, which was awesome. with webdriver I don't think I can do that efficiently, but oh well :(
23:47tomojfrontend? you mean like sass/erb/haml stuff?
23:47devlinsfYeah
23:48devlinsfThe "What people see" stuff
23:48devlinsfI like erb
23:48devlinsfOf course, I'm no compojure expert
23:49tomojI think I have been convinced of enlive's style of doing things over erb's
23:49tomojdefn: my personal concern currently is acceptance testing
23:49hiredman_if I recall correctly webdriver uses htmlunit
23:49hiredman_(htmlunit is nice)
23:50tomojyeah but it abstracts over it so that it can also use firefox etc
23:50technomancyerb is horrible
23:50mabeshiredman_: thats correct- and you can have it switch to seleniun
23:50tomojwhich means I can't do what I did when using htmlunit directlly
23:50devlinsftechnomancy: It's what I know
23:51technomancyI mean it's obvious, but it's ugly and impossible to write good tool support for
23:51mabeserb is nice for designers... if you think your designer complained about writing haml just let them try the compojure html syntax :p
23:51technomancysince ruby's grammar is insane to begin with; embedding it inside HTML just pushes it over the edge
23:51tomojmabes: let them try enlive :)
23:52tomojthere they just hand you the html mockup with fake data and everything
23:52devlinsfI haven't wrote HTML in 6 months
23:52devlinsfI DO like clojure's XML stuff way better
23:52mabestomoj: yeah, it looked interesting but I haven't tried it.. are you working on a project that is available on github?
23:53defndevlinsf: yeah ive used rails a lot and ive enjoyed it, im trying to use compojure right now, but ive found it pretty kludgey
23:53tomojnope, I am at the just-playing-around stage
23:53mabesyeah...
23:53danm_wow, 8 minutes for WF2?
23:53danm_great writeup
23:53defndefinitely
23:53defnato is a rockstar
23:53danm_no kidding
23:53defnto use the parlance of our times
23:54danm_that's pretty cool
23:54technomancyif his avatar is any reflection of reality, he's got the hair to match