#clojure log - Oct 31 2011

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:09 spoon16: technomancy: is :use in the NS declaration appropriate or should I use require? looking up the difference

0:09 technomancy: spoon16: I prefer :require for things like io

0:10 spoon16: why?

0:10 clojurebot: http://clojure.org/rationale

0:10 technomancy: it's a matter of personal preference, but my general rule is to pick :use for things "internal" to a given module and :require for things from external libraries

0:10 spoon16: I see

0:10 makes sense

0:11 technomancy: where a module is loosely defined as a bunch of namespaces that present a unified external interface

0:25 Raynes: http://tryclj.com/ <-- New domain name for Try Clojure

0:26 technomancy: Raynes: is that heroku-hosted?

0:26 Raynes: No.

0:26 I don't trust Heroku nearly enough, given that I know next to nothing about it.

0:26 I'm sure it'd probably die with two simultaneous users, given that I'm on the free account.

0:26 technomancy: heh

0:27 Raynes: I'm setting a subdomain up for the heroku instance.

0:27 technomancy: I thought Clojure was supposed to be good at concurrency?

0:27 Raynes: :)

0:27 http://h.tryclj.com/ this one is running on Heroku.

0:27 Can't promise that it'll always be there.

0:28 ibdknox: I thought it was just pretty. It does concurrency too?

0:28 I bet it can even read from disk...

0:28 tolstoy: technomancy: Following your instructions on https://github.com/technomancy/swank-clojure, and can "jack-in" if I start Emacs from the shell inside my leon project.

0:29 technomancy: How do you do it if you start Cocoa Emacs GUI style?

0:29 technomancy: tolstoy: there are various tricks; I think the gist of it is that you need to set your exec-path variable

0:29 but I don't have a Mac myself

0:30 tolstoy: technomancy: Ah, okay.

0:30 technomancy: clojurebot: mac os x path?

0:30 clojurebot: execution timeout is 10 seconds

0:30 technomancy: I see.

0:30 tolstoy: I suppose if I do it at least once, "slime" will be installed and I can just slime-connect.

0:30 technomancy: tolstoy: well, you probably want to fix your path. having a properly-configured path is good for more than just slime. =)

0:31 the official Apple instructions tell you to write a plist.xml file, but I tell you to do that with a clean conscience

0:32 tolstoy: the other hacky workaround would be to symlink lein to somewhere on the default path

0:32 tolstoy: Hm. I'm not even sure what you mean by fixing my path. Emacs context, or shell?

0:32 lein is already on my path.

0:32 I use it all the time! ;)

0:32 technomancy: tolstoy: it's on your shell's path

0:32 which is ignored by Mac GUI applications

0:32 tolstoy: Ah. Hm.

0:33 I see that emacs as exec-path as you mentioned. I guess I can set that to /usr/local.

0:33 technomancy: Anyway, knowing that the clojure-jack-in command is failing because it can't find lein on a path is helpful in and of itself.

0:34 technomancy: yeah, that is probably the #1 most annoying thing about Mac OS X

0:34 as far as bug reports I have to deal with anyway

0:34 I'm sure I could find more annoying things if I used it myself =P

0:35 tolstoy: Heh. Well, I suppose you could add: (setq exec-path (append exec-path '("/path/to/lein")))) as an example somewhere.

0:36 technomancy: yeah, I think that is probably the simplest solution

0:36 Raynes: tolstoy: https://gist.github.com/1326920

0:36 tolstoy: If we could get Sublime Text 2 to connect to swank, I'd be happy. ;)

0:36 Raynes: This is what I use to fix my path for everything -- not just leiningen

0:36 technomancy: there's a way you can actually get the $PATH from a running shell process; that would probably be a bit more accurate

0:37 Raynes: I tried my best to get Sublime Text to work with cake, but Python in Sublime Text 2 doesn't seem to work the same as Python outside of it.

0:37 technomancy: but that should do the trick

0:38 tolstoy: Raynes: Thanks!

0:39 Raynes: I don't actually know what it does or how it works, but hey, it does.

0:40 tolstoy: Yep. Slime/swank have started, now.

0:41 I've no idea if it knows I'm in my project, though.

0:41 Docs: From inside a project, invoke M-x clojure-jack-in.

0:42 However, I don't know how to indicate that I'm "inside a project".

0:42 Raynes: It should just know.

0:42 If you're in a file inside that project, then you're in the project.

0:42 technomancy: tolstoy: any file that's within the project root will do

0:43 or directory, if you invoke it from the shell

0:43 tolstoy: If I start emacs via command line while inside a project dir, I'm fine. But if I start the Cocoa version, the "working" directory is my home directory, I think.

0:43 Raynes: technomancy: I don't think it needs to be in the root.

0:43 technomancy: by "from the shell" I mean from a shell inside emacs

0:43 tolstoy: So, (in-ns my-app.core) gets me class not found.

0:44 technomancy: tolstoy: that's expected

0:44 you need to require it first

0:45 ibdknox: not having really done the whole emacs thing yet, but being on here enough to see all the questions

0:45 tolstoy: Okay, way, so…. I open an ansi-shell from within emacs, cd to my project, then run clojure-jack-in?

0:45 ibdknox: is there some piece of documentation that needs to be written?

0:45 technomancy: ibdknox: not as much as there being documentation that needs to be unwritten.

0:45 ibdknox: or is it just that this is so finicky that you have to work through it every time?

0:45 technomancy: hah. fair enough

0:45 technomancy: ibdknox: the path thing is a general Mac OS X issue though

0:45 Raynes: The problem is that 9 thousand people have written their (wrong) way of getting things set up.

0:46 technomancy: nothing to do with slime

0:46 Raynes: Which may or may not be their fault, depending what the state of Clojure in Emacs was at the time of the writing.

0:46 ibdknox: right

0:46 tolstoy: In the olden days when I first played with clojure, I just did "lein swank" and installed slime via package.el and it worked great.

0:46 Raynes: In general, people should contribute official documentation rather than generate unofficial documentation and slather it across the internet.

0:47 technomancy: ibdknox: anyway pretty soon you will know all the answers so I can just pretend to be AFK when people have trouble with slime. =)

0:47 spoon16: is there a way in clojure.contrib.io to do a buffered read of a file? I want to in a loop process a buffered byte array being read from a file so that the entire file does not need to be loaded into memory… I'd really like this to work somehow using the Streams protocol defined by clojure.contrib.io

0:47 ibdknox: haha

0:48 Raynes: Contrib is deprecated. You'll want to check out clojure.java.io.

0:48 ibdknox: technomancy: I'll stick with my VIM for now... Until cemerick and I build a new clojure environment ;)

0:48 spoon16: technomancy probably mentioned that earlier and then I went to contrib instead of java

0:48 Raynes: Well, the old contrib anyway.

0:48 It was split out into multiple libraries.

0:48 technomancy: clojurebot: mac os x path is screwed up when using GUI applications. if your Emacs instance can't find an executable, you can try fixing its $PATH with https://gist.github.com/1326920

0:48 clojurebot: 'Sea, mhuise.

0:49 tolstoy: Ah, ansi-term did the trick. I can get to a namespace now.

0:49 spoon16: still… how in clojure do I process one portion of a stream at a time?

0:50 ibdknox: $google lamina

0:50 lazybot: [Anchor Lamina - Manufacturer of Die Sets, Die Components, Metal ...] http://www.anchorlamina.com/

0:50 ibdknox: darn

0:50 $google lamina clojure github

0:50 lazybot: [ztellman/lamina - GitHub] https://github.com/ztellman/lamina

0:50 ibdknox: spoon16: I suspect that ^ might be useful

0:50 technomancy: lamina is pretty complex for something like that

0:51 ibdknox: fair enough

0:51 technomancy: you could just doseq over a line-seq

0:51 presuming it's line-oriented textual data

0:51 Raynes: http://clojure.github.com/clojure/clojure.java.io-api.html#clojure.java.io/input-stream

0:52 cemerick: ibdknox: oh, the pressure :-P

0:52 ibdknox: cemerick: damn, I thought I said it quiet enough that you wouldn't hear ;)

0:54 cemerick: ibdknox: I hear everything, everywhere.

0:55 ibdknox: cemerick: I totally take back all that stuff I said earlier then.

0:55 cemerick: :-D

0:55 ibdknox: hehe

0:55 cemerick: s'ok, since no one can zing me worse than I.

0:56 tolstoy: Ah, lovely. clojure.tools.logging + slime/repl: not so working.

0:56 ibdknox: true of us all, I suspect

0:57 Hah, I forgot to announce that the new Noir version of readyforzero.com launched this past thursday :)

0:58 clickable link: https://www.readyforzero.com

0:58 Raynes: ibdknox, cemerick: We should all get together and hack up a Clojure editor in my suite on the 9th. Though I guess it'd mostly be me and ibdknox arguing over whether or not it should be modal and cemerick would be arguing with both of us about where the buttons should go and why we shouldn't integrate Clojure-based build systems.

0:58 ibdknox: haha

0:59 cemerick: Raynes: you're behind the curve on your cemerick stereotypes ;-)

0:59 Raynes: :p

0:59 cemerick: "cemerick never met an XML tag he didn't like" is always a classic

0:59 ibdknox: oh no

1:00 XML is evil

1:00 evuhl, even

1:01 Raynes: XML is eval.

1:01 ibdknox: ~rimshot

1:01 clojurebot: Badum, *ching*

1:02 cemerick: inanimate tools are amoral

1:02 hrm, not so catchy

1:02 ibdknox: lol

1:03 Raynes: ibdknox: Congrats on the new site.

1:03 It's lovely.

1:03 ibdknox: Raynes: thanks :)

1:03 btw, I'd settle for no modality... at first ;)

1:04 Raynes: If it can't play tetris, it isn't worth editing code in.

1:04 ibdknox: lol

1:05 cemerick: "Technologists making regrettable decisions are often neither foolish nor evil, but rather inextricably bound by the prevailing technocultural mores of their time."

1:05 * cemerick can bury you all in bullshit

1:06 * ibdknox tries digging himself out, but it all starts going dark

1:07 * cemerick logs out before being accused of being a relativist

1:07 cemerick: :-)

1:10 technomancy: "Database choices are like girlfriends. You don't know all the intimate details, and you probably don't want to."

1:12 ibdknox: hahaha

1:12 (inc technomancy)

1:12 lazybot: ⇒ 18

1:45 tolstoy: Hm. So, in slime, if you eval or compile a function which is repeatedly called by a thread, it doesn't seem to change. Different from common lisp?

1:46 technomancy: tolstoy: depends how the function is referenced

1:46 HOFs can hold on to older versions of a function

1:47 tolstoy: Hm. The function is the actual runnable of the thread, so I can see it would hold on to it.

1:48 Okay, that make sense.

1:49 I tend to write apps as a collection of "services" one of which is a web service, the others being connections to (say) rabbitmq, or file watchers, or something.

1:49 It's quite fun to be able to use slime/swank to start and stop them independently of each other.

1:53 Wow! Made a runner to invoke another function, recompiled the other function, and now both old and new functions are being called by the thread.

1:53 Okay, shutting up.

1:53 Raynes: &(. System/out println "foo")

1:53 lazybot: java.lang.SecurityException: You tripped the alarm! System/out is bad!

1:53 Raynes: $botsnack

1:53 lazybot: Raynes: Thanks! Om nom nom!!

1:58 ibdknox: Raynes: what's scary about System/out?

1:59 Raynes: ibdknox: The fact that some guy was using it to spam tryclojure's console earlier.

1:59 ibdknox: I see

2:00 Raynes: Nothing dangerous about it, just annoying.

2:26 fmw: I'm having a problem with converting a macro that works in Clojure to something that generates the right Javascript output when used in ClojureScript: https://gist.github.com/c1d38d2107ec75239d67

2:27 basically, I'm not sure how to reference a variable I create (route-segments#) in my generated code (right now it thinks it is vix.core.route_segments_SHARP_)

2:28 I'm aware that this is not the best time to ask, because I'm sure most people will be asleep or heading to work in virtually every timezone, but your input would be much appreciated ;)

2:28 note that some of the generated Javascript lines may be very wide with a horizontal scroll, btw

2:34 ibdknox: fmw: fully qualify route-matches

2:34 and don't quote it

2:35 fmw: ibdknox: how do you mean fully qualify?

2:35 not sure what that means

2:35 ibdknox: my.ns/route-matches

2:35 fmw: ibdknox: ah, I see!

2:35 let me try that

2:36 ibdknox: awesome, that fixes it!

2:37 ibdknox: fmw: working on moustache for cljs?

2:38 fmw: ibdknox: maybe something similar, not sure. for now, I wanted a nicer routing function for my app (https://github.com/fmw/vix)

2:38 ibdknox: cool :)

2:39 fmw: but I'm hoping to polish that code and eventually distill a small framework out of it, similar to moustache/compojure

2:40 the routing based on html5 history URI changes (with the particular function loading the right content via XHR) is pretty neat for backend-type applications, at least

2:41 ibdknox: :)

2:41 indeed

2:42 need to finish my sql'ing so I can get back to my CLJS :)

2:43 fmw: ibdknox: yes, there is lots of interesting new stuff to do for it still (e.g. an elegant testing solution; which is pretty high on my todo list)

2:49 ibdknox: hmm, there seems to be a similar problem remaining: the params variable in the body is fully qualified as vix.core.params now (see e.g. the var temp__3698__auto____2393 declaration, where it defines the clauses)

2:50 that one should be the ~'params from the if-let

2:51 ibdknox: where is params coming from?

2:52 fmw: its supposed to be the result of teh (route-matches ...) fn

2:52 basically, the point of the macro is to make the result of that function (a map with values for the uri) available to the body

2:53 ibdknox: and params# doesn't work?

2:53 fmw: ibdknox: let me try

2:53 the params is called in the body, btw, the Cljs (routes) fn listed earlier)

2:54 ibdknox: hm

2:55 you probably want to do this a different way

2:55 magic variables like that are scary

2:55 fmw: ibdknox: adding # doesn't work, no

2:56 also, the clauses vari

2:56 s/vari/variable seems to be declared *before* the params in the javascript

2:57 which probably works in the Clojure code as data sense, but seems problematic in Javascript

2:58 ibdknox: I agree with you on the magic variable thing, but it felt like an OK solution to do it like this at the time

2:59 at least, I didn't find a better alternative

3:01 moustache uses native destructuring, which is nice, but I wanted something similar to a (cond) structure with a default case

3:01 ibdknox: I see

3:17 fmw: ok, the problem was that the double when-let wasn't correct: it should only happen at compile time

3:18 Raynes: ibdknox: Man, deploying to Heroku is so much easier than it should be. It's almost dangerously easy.

3:19 ibdknox: Raynes: haha, even more points for technomancy ;)

3:19 Raynes: Did I miss something? ;o

3:19 ibdknox: Raynes: he works there now

3:20 Raynes: Oh.

3:20 Ooooooh. That's why he said 'heh' when I said that I didn't trust heroku earlier.

3:20 ibdknox: haha

3:20 yeah

3:20 Makin' enemies :p

3:20 fmw: last remaining problem is that (feed/display-edit-feed-form (:language params) (:feed-name params)) produces weird output: return vix.views.feed.display_edit_feed_form.call(null,"﷐'language".call(null,params__2395),"﷐'feed-name".call(null,params__2395));


3:21 for some reason its calling params on the keyword string

3:21 Raynes: Though, I'm not sure there is anything stopping me from hosting on Heroku full time.

3:21 ibdknox: fmw: it's calling the keyword, which is a function with the parameter params

3:21 Raynes: I'm just not sure how much pounding it will withstand on the free account.

3:22 ibdknox: Raynes: the problem for me was always cost

3:22 fmw: ibdknox: yes, in Clojure, but not in Javascript

3:22 ibdknox: Raynes: heroku has a beautiful workflow and I made sure Noir deployed to it out of the box

3:22 fmw: that code you pasted did exactly that

3:23 Raynes: I'd never pay for Heroku. Not for open source hosting anyway.

3:23 ibdknox: fmw: "﷐'language".call(null,params__2395)

3:23 fmw: ibdknox: that works in Javascript?

3:25 ibdknox: fmw: I haven't looked too deeply into how they implemented keywords, but someFn.call() is definitely valid JS

3:26 fmw: ibdknox: ah, I was wrong, it implements keywords like that, yes

3:27 ibdknox: lol

3:27 Raynes: It's kind of odd that Heroku isn't clearer on what exactly you get with a free account. Or maybe I'm just not looking hard enough.

3:27 ibdknox: https://github.com/clojure/clojurescript/blob/master/src/cljs/cljs/core.cljs#L1219

3:27 fmw: I was sure it generated javascript going the other way around, but just tested it with (:foo {:foo "bar"}) and that returns "﷐'foo".call(null,cljs.core.ObjMap.fromObject(["﷐'foo"],{"﷐'foo":"bar"})); indeed

3:28 Raynes: http://stackoverflow.com/questions/4536326/heroku-free-account-limited

3:28 This leads me to believe that this could almost certainly handle tryclojure unless suddenly everybody on the planet decided that they loved Clojure and wanted to pound a javascript repl.

3:29 I mean, it isn't like any kittens will die if I host it there full-time for a while and see what happens. I can move it back to my VPS whenever.

3:29 ibdknox: It's never been clear to me what a dyno equals

3:29 Raynes: technomancy: Hear our cries! Document!

3:29 http://devcenter.heroku.com/articles/dynos Well, this is helpful.

3:30 "A single dyno can process one request at a time. For a typical app, this translates to somewhere between 10 and 50 dynamic requests per second."

3:30 It looks like, for the most part, they limit performance, not overall usage.

3:31 And tryclj is kind of slow anyways.

3:31 But not nearly as slow as tryruby

3:31 * Raynes files his fingernails arrogantly.

3:31 Raynes: Yeah, I'm just going to switch it over for now. Give it a while.

3:31 ibdknox: :)

3:32 zakwilson: I'm playing around with irclj. The bot doesn't seem to want to connect, and isn't spitting out any information about the attempt.

3:32 Raynes: zakwilson: Any exceptions or anything? Anything at all? :(

3:33 zakwilson: Raynes: nothing. I can display the bot and see :connected? false.

3:33 Raynes: Can you show me your code?

3:33 * Raynes puts on his Irclj hat.

3:33 zakwilson: Sure.

3:34 https://gist.github.com/1327073 <-- it should join this channel and do nothing.

3:36 Raynes: Looking now.

3:40 How are you running the bot?

3:40 I just ran it and it connected fine. However, it says that the nickname is already in use, so your bot is connected on freenode. It just isn't in here.

3:40 Either that or somebody else has irclj_bot_test… somehow.

3:41 zakwilson: ^

3:41 zakwilson: I'm just evaluating the (def bot...)

3:41 Raynes: In a repl?

3:41 zakwilson: slime

3:41 Raynes: That is almost certainly your problem.

3:41 Output is probably being directed elsewhere.

3:42 zakwilson: Well... I can see how that could happen.That shouldn't cause it to not connect though, should it?

3:43 Raynes: zakwilson: No, but he was already connected a moment ago when I tried to connect. Just wasn't in here. No clue why.

3:43 zakwilson: I got exactly the same behavior in a cake repl.

3:43 Raynes: He is connecting for me fine, but he isn't joining the channel.

3:43 Trying to figure out why.

3:44 zakwilson: cake redirects output as well. check .cake/out.log

3:45 zakwilson: I see your problem.

3:45 :channels is something you pass to connect -- not create-irc. Why? I have no idea.

3:46 But that and sneaky output redirection are your problems, I think.

3:47 :)!

3:47 zakwilson: Well that looks like something different.

3:47 msgs => #<Agent@1d272e52: [":)!" "Well that looks like something different."]>

3:48 Raynes: Hah

3:48 zakwilson: Well, that's working. Thanks.

3:49 Raynes: No problem. If you run into any issues, let me know. I'm going to do some serious work on it after the Conj.

3:50 zakwilson: It looks nice except the oddness with the channels arg. Why DID you do that?

3:52 ibdknox: I called my little IRC experiment bizirc. A fitting name, I think. IRC is a ridiculous protocol

3:53 zakwilson: Now, one more thing I need: something that lets me call a function periodically - say every 10 minutes.

3:55 ibdknox: yay executors :p

3:55 actually

3:55 at-at might cover that

3:56 zakwilson: https://github.com/overtone/at-at

3:56 zakwilson: ibdknox: thanks

3:56 ibdknox: sam is awesome

3:57 pyr: ibdknox: i have something similar here: github.com/pyr/tron

3:57 ibdknox: haha

3:57 nice name :)

3:58 pyr: :)

3:58 ibdknox: I should stop rewriting that

3:58 and just use one of these

3:58 I think I've written executor code 3-4 times now

3:59 Raynes: zakwilson: I have no idea.

3:59 Because I'm a stupid teenager that does stupid teenager things, I guess.

3:59 ibdknox: Raynes is mostly asleep when he writes libraries for other people to use ;)

3:59 zakwilson: That's a good reason, I suppose.

4:00 Raynes: I'm going to hate 2014. Turning 20 is going to take away my only good excuse for writing bad software

4:00 ibdknox: oh no

4:00 you get to keep that until 25ish

4:01 Raynes: Really? Excellent.

4:01 ibdknox: "oh don't mind him, he just got out of college"

4:01 "they don't teach real programming there"

4:01 lol

4:01 So you're safe for a bi

4:01 t

4:02 pyr: 75% of the programming crowd doesn't write good software ever

4:03 so you should be safe

4:03 Raynes: It's a good thing we have you.

4:03 :>

4:03 pyr: i didn't mean it like that

4:03 Raynes: I know what you meant.

4:03 I was just being cocky.

4:04 pyr: it sounded cocky the way i phrased it too

4:04 but i'm french, being cocky is like second nature to me

4:04 ibdknox: haha

4:04 (inc pyr)

4:04 lazybot: ⇒ 1

4:04 ibdknox: btw 75% is a bit low ;)

4:04 pyr: i know

4:05 funny thing though

4:05 in the near future

4:05 ibdknox: the distribution of talent is no different for programming than anything else, unfortunately

4:05 pyr: the bad programmers won't only do java and php anymore

4:05 ibdknox: (and JS)

4:05 pyr: i'm pretty sure there's gonna be a new kid on the block

4:05 node.js looks like a strong contender

4:05 * ibdknox sighs

4:06 pyr: it's got all the php magic

4:06 ibdknox: JS makes it so easy to write awful code

4:06 and so incredibly hard to write even decent code

4:06 pyr: no structure, easy spaghetti, inline templates

4:06 ibdknox: the cruise control for awesome ;)

4:07 I originally wrote typewire in node

4:07 it was disgusting

4:07 rewrote it in clojure at less than 30% of its original size

4:07 pyr: i can see its relevancy for very small things

4:08 Raynes: ibdknox: could you run host against tryclj.com for me?

4:09 ibdknox: DNS caches suck

4:10 especially when you get something upstream caching the record

4:10 then you're stuck for a few hours

4:10 Raynes: Indeed.

4:11 licenser: You wouldn't happen to be around, would you?

4:12 ibdknox: alright gentlemen, I've stared at the documentation I haven't been writing for long enough :p

4:12 Raynes: Actually, never mind. I'll just make nginx redirect it.

4:13 ibdknox: g'nite!

4:13 Raynes: Night

6:19 Chousuke: hm

6:19 I don't understand how emacs starter kit works

6:20 isn't elpa supposed to add packages to my load path automatically. that doesn't seem to be happening for all of the packages :/

6:24 looks like it's loading files from my config before it adds elpa stuff to the load path

6:38 AWizzArd|work: What version of the ESK did you download?

6:40 I am under the impression that this Elpa thing downloads files into ~/.emacs.d /elpa and just loads that stuff when starting Emacs.

6:43 But for example Paredit, I found, is not activated automatically. I had to actively load it in my user.el file.

6:50 fhd: Can anyone point me to a little Clojure code style guide? I'm confronted with some code that has >160 column long lines and puts closing parens on a separate line. I want to make them stop :)

6:57 Chousuke: AWizzArd|work: the issue seemed to be that esk loads its config files too early, when elpa hasn't finished loading all autoloads for installed packages

6:59 I added my configuration in init.el after (package-initialize) but I wonder if there's a better way.

6:59 I still can't make ipython work well with emacs though, it seems pretty broken

6:59 emacs hangs completely whenever I try to tabcomplete something :P

7:00 AWizzArd|work: Chousuke: in the init.el file there should be just a few lines of code, shown under "Installation" at https://github.com/technomancy/emacs-starter-kit

7:01 But you should add in the same folder that contains the init.el also a file named chousuke.el or whatever your username is.

7:02 In that file one can put some configuration settings.

7:04 Chousuke: AWizzArd|work: yes but esk loads those too early it seems

7:04 AWizzArd|work: if I put code there I get errors about python-mode not being in load path

7:04 well, to be precise I put code in a file under .emacs.d/$USER/

7:05 AWizzArd|work: Chousuke: you can rename your current .emacs.d folder, make sure that no file ~/.emacs exists and just unpack a fresh checkout of ESK and rename that to .emacs.d, add the 4 line init.el file and slowly add your configuration.

7:05 Chousuke: AWizzArd|work: my esk is installed from ELPA

7:05 AWizzArd|work: Chousuke: mine is in ~/.emacs.d/at.el

7:05 Chousuke: on emacs 24

7:06 AWizzArd|work: Yes, the current ESK from technomancy only delivers the absolute basics.

7:06 You have to add that init.el file yourself and from there on download the ESK via this Marmelade thing.

7:06 I am on Emacs 24 too.

7:08 Chousuke: AWizzArd|work: that's what I did

7:08 AWizzArd|work: And directly after those few steps it already can not start?

7:09 Chousuke: AWizzArd|work: it does start, but if I install python-mode from elpa, then try to require it in .emacs.d/oranenj/python-programming.el, things do not work.

7:10 AWizzArd|work: I see.

7:11 Chousuke: I suspect this is because the package manager runs starter-kit before adding the python-mode package to load-path

7:12 I'm not quite sure what I can do to fix that :/

7:41 AWizzArd|work: So the python load problem is not due to your own config, right?

7:55 licenser: Raynes: now I am

8:10 Chousuke: hmmhmm

9:54 todun: hi all. I'm looking to see if I can find an example of using clojure to implement google's MapReduce algorithm using Software Transactional Memory. Any help is appreciated. Thanks.

9:54 (something simple would be nice, still new to clojure)

10:02 TimMc: todun: Where does STM come in? (I'm not familiar with MapReduce, but I am familiar with map and reduce...)

10:03 joly: I'm not sure why you'd use shared state for it

10:03 todun: TimMc: STM comes in when I want to solve some random problem that can be re-written concurrently.

10:03 joly: to get more experience with the topic.

10:15 leo2007: My linux distro comes with clojure 1.1. Should I install a newer one?

10:16 babilen: leo2007: Yes (which distro is this?)

10:16 pyr: leo2007: you might as well just install leiningen and let that handle your clojure versions

10:16 babilen: +1

10:17 davidrupp: leo2007: You will want either 1.2.1 or 1.3.0.

10:17 pyr: leo2007: https://github.com/technomancy/leiningen

10:17 babilen: leo2007: Which distribution is this?

10:19 leo2007: ubuntu 11.10

10:22 babilen: leo2007: AFAIK Ubuntu messed up the packaging of leiningen. The version in Debian works fine, so you might want to install leiningen from upstream for now. That being said: Clojure 1.2 has been packaged as clojure1.2 and clojure1.3 is in Debian but not Ubuntu.

10:25 leo2007: babilen: I have leiningen 1.6.1 in the repo of ubuntu

10:26 but they don't have clojure 1.3. Is there any compatibility issue between 1.3 and 1.2.1?

10:26 babilen: leo2007: Yes, I know. Unfortunately Ubuntu messed up the sync and now has a version of leiningen in the repositories that does not work with the packages java ecosystem. I fixed this in Debian, but can't upload to Ubuntu. See https://bugs.launchpad.net/ubuntu/+source/leiningen for details.

10:27 leo2007: So just install leiningen directly from https://github.com/technomancy/leiningen for now as suggested by pyr.

10:28 davidrupp: leo2007: Take a look at http://dev.clojure.org/display/doc/1.3, particularly section 1 (Deprecated and Removed Features)

10:30 leo2007: Also https://github.com/clojure/clojure/blob/master/changes.md. There's a comment on the dev.clojure.org page that claims it's out of date.

10:30 babilen: leo2007: I would personally recommend to use/learn/target clojure1.3. The only downside is that you might find that some of the contrib libraries are not available due to the restructuring detailed on http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

10:31 davidrupp: leo2007: Or if you're going to use libraries that have not yet been upgraded to 1.3.

10:40 lnostdal: i guess the wiki on http://dev.clojure.org/display/doc/1.3 hides the * characters around fred there

10:40 it says (def fred) but it should say (def *fred*)

10:41 leo2007: What would be a good book to buy? I am looking for something like K&R but for clojure.

10:42 mdeboard: leo2007: Joy of Clojure and Practical Clojure are both very good

10:44 fdaoud: leo2007: if you can wait a month or two, there are also two more books coming: Clojure Programming (O'Reilly) and Clojure in Action (Manning)

10:44 also upcoming but later on, Programming Clojure, second edition (Pragmatic Programmers) and Meet Clojure (No Starch Press)

10:45 leo2007: so many books. which of the two languages are doing better, scala or clojure?

10:45 fdaoud: hehe

10:46 Clojure. Did you ask that question on #scala too? :D

10:46 leo2007: fdaoud: no.

10:46 llasram`: leo2007: If you're just going to get one book, I double-plus recommend /Joy of Clojure/. It really gets the reasoning behind language features and why they work as they doo

10:46 s,gets,explains,

10:48 babilen: +1 for Joy of Clojure -- Great book and a good introduction.

10:49 leo2007: llasram`: thanks for that.

10:51 babilen: leo2007: Scala and Clojure are quite different languages. I can, as probably most people in here, only recommend to learn Clojure in particular if you haven't learned a lispy language before. You *will* like it and the community is just marvellous. The decision also depends on the project you want to use it for, but I personally like the "feel" of Clojure much more than the feel of Scala. YMMV

10:54 leo2007: babilen: OK. I prefer language lispy than javay.

10:55 fdaoud: +1 babilen

10:59 leo2007: how to teach lein to use clojure 1.3 instead of 1.2.1?

11:00 gfrederi1ks: leo: change the version in the project.clj?

11:01 babilen: leo2007: Edit project.clj, use something like " :dependencies [[org.clojure/clojure "1.3.0"]]" in there and run "lein deps"

11:02 leo2007: fwiw, I just pinged the Ubuntu people and the issue should be solved soon

11:04 leo2007: Let us know if you need help with your Emacs/Vim/Clooj/Eclipse/... setup :)

11:05 TimMc: technomancy: Why does lein default to 1.2.* for new projects?

11:06 babilen: TimMc: IIRC the change to 1.3 is planned for 2.0 -- I guess the template just uses the clojure version leiningen uses itself.

11:07 But yeah, good question.

11:07 TimMc: ah

11:08 leo2007: babilen: I setup the emacs+slime+clojure long ago. One of the nagging issue is bundling of an outdated slime.el which after loading interferes with my slime setup for Common Lisp.

11:08 babilen: leo2007: Ok, are you using https://github.com/technomancy/swank-clojure and https://github.com/technomancy/clojure-mode (both are on marmalade)

11:09 ?

11:09 .oO( technomancy the toolbox )

11:25 leo2007`: clojure-mode.el references font-lock-beg and font-lock-end, where are those vars defined?

11:29 llasram`: Huh. That is interesting. I think they must be dynamically-scoped variable which are part of the font-lock "API"?

11:29 leo2007`: Are you hacking on clojure-mode ?

11:30 leo2007`: I can hack on clojure-mode.

11:31 llasram`: See this many compiler warnings: http://paste.pound-python.org/show/14475

11:32 llasram`: Ahh, I see. Yes. If you pop open font-lock.el, you'll see `defvar's for font-lock-beg and font-lock end. Part of the API, so not much to do about it

11:34 leo2007`: llasram`: thanks. Could something like this be installed? http://paste.pound-python.org/show/14478

11:39 llasram`: I've never been a hard-core elisp programmer, but maybe? The documentation for elisp `defvar' suggests that multiple invocations for the same symbol should be safe

11:42 leo2007`: llasram`: yes. and maybe this too http://paste.pound-python.org/show/14479

12:22 jcromartie: "Paul Graham originally wrote reddit, in lisp, on the back of a napkin while he was waiting for a coffee. it was so powerful that it had to be rewritten in python just so that ordinary computers could understand it."

12:23 hiredman: I heard he was waiting for tea

12:23 jcromartie: I'm drinking tea.

12:23 Chousuke: didn't he write it in arc, and it's called hacker news :P

12:23 TimMc: It was definitely yerba maté, I have this from a very good source.

12:27 kephale1: has anyone here tried shen for anything practical?

12:28 jcromartie: kephale1: the weird closed-source Lisp?

12:28 kephale1: weird, maybe, but the sources seem to be available

12:28 jcromartie: oh, I thought it was not open

12:29 kephale1: it has peculiar licensing that you can only modify the source in a certain way, but it is freeware

12:33 jcromartie: hm that is peculiar

12:33 simard: yup, why even go for it then..

12:34 jcromartie: I think it would discourage me from using it in production, seeing as it looks like a one-man job, and there's no other backing as far as I can tell.

12:34 Most closed languages have massive corporate backing, and most open languages have massive community backing.

12:34 But Shen just... doesn't.

12:34 Even then, I don't really know what it brings to the table that couldn't just be a library in other lisps.

12:35 well, I guess it is implemented in CL...

12:35 so it basically is a library

12:35 kephale: yeah

12:35 jcromartie: could be ported to Clojure

12:36 kephale: i thought i heard that it had been

12:36 jcromartie: hm

12:37 kephale: the reasoning for investigating it being that I want a nice C/C++ based lisp that i can plug in to some code that i have

12:37 it only there was a port of clojure

12:46 khaliG_: jcromartie, pattern matching is pretty nice

12:47 * khaliG_ has been having severe ML envy lately. ie. http://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.pdf

13:06 technomancy: TimMc: lein uses 1.2 in new project skeletons because that's what existed at the time of the last leiningen release =)

13:08 Raynes: so tryclj.com is all switched over?

13:09 Raynes: technomancy: Yep.

13:09 technomancy: sweet

13:09 ibdknox: technomancy: question about dynos

13:09 technomancy: sure

13:10 ibdknox: technomancy: how do they ensure only one request is taken car of at a time, since jetty is going to spawn N threads for N concurrent requests?

13:10 care*

13:11 technomancy: ibdknox: I believe that particular piece of info is outdated and only applies to the old ruby-only stack

13:11 ibdknox: technomancy: k, I that's what I figured. Do you know what a dyno is at a practical level?

13:12 ugh typing fail

13:12 technomancy: it's basically just the abstraction over a process.

13:13 each dyno has a single process associated with it at a given time, but that process can die and get restarted or get migrated to a different host.

13:13 Raynes: All I know is that this deploy workflow is just the bees knees.

13:13 ibdknox: I see, is a process allocated a certain amount of resources?

13:14 Raynes: yeah, it's beautiful :)

13:14 Raynes: I don't even have to ssh into my VPS and run a shell script anymore! I mean, I could have had automation before, but I was always too lazy to set anything up. Heroku does that for me automagically.

13:17 technomancy: heck yeah

13:18 Fossi: how can i generate a recursive function like this: (myfunc foo #(myfunc foo #(myfunc foo [...])))?

13:21 simard: Raynes: heroku vs amazon ec2 ?

13:21 heroku seems to be a bit more expensive

13:22 ibdknox: simard: ec2 is cheaper and is more manual, which may or may not be necessary

13:22 simard: for most apps heroku is much easier to get along with

13:23 Raynes: simard: Never used the latter.

13:24 fdaoud: Fossi: along the lines of (iterate myfunc foo) ?

13:25 Fossi: fdaoud: ah, excellent, thanks

13:26 ah, not quite

13:26 but i think repeatedly should somehow work

13:29 llasram`: Wouldn't a better comparison be heroku vs elastic beanstalk? I think elastic beanstalk is JVM-only, but otherwise...

13:30 I haven't used either, but I keep meaning to :-)

13:30 ibdknox: llasram`: yeah they're very different levels of abstraction

13:30 ec2 and heroku that is

13:31 cemerick: It's really hard to make direct comparisons; most people choose one or the other because of some key feature they need that others lack, not because A is "better" than B.

13:31 llasram`: Right. In fact, I learned recently that heroku runs on EC2

13:31 cemerick: ec2 != beanstalk, of course.

13:31 ibdknox: yeah

13:54 simard: llasram`: heroku runs on ec2 ? cool.. it's a real economy out there, with resellers and all :)

14:10 Raynes: technomancy: I heard that ec2 was just a cover and that, in reality, Heroku was hosted on God's very own servers. Is this true?

14:10 Chousuke: technomancy: I hit a slight issue with emacs-starter-kit today. It seems esk loads the user config files at a point where not all elpa packages have been added to the load-path so I get errors about them. I solved it by moving the config loading into a function and adding that to after-init-hook, but is there a better way?

14:10 technomancy: Raynes: I can neither confirm nor deny said allegations.

14:10 hiredman: technomancy: I am seeing "let*: Not enough arguments for format string" when trying to run clojure-jack-in

14:11 technomancy: Chousuke: in general user.el is used a lot less in v2 of the starter kit; can you just move everything to init.el?

14:11 hiredman: from clo-mo git?

14:11 hiredman: yes

14:11 maybe a few days ol

14:11 old

14:11 technomancy: hmm... lemme see

14:12 hiredman: what's clojure-swank-command?

14:12 Chousuke: technomancy: I guess I could

14:13 technomancy: Chousuke: I need to make that clearer; needing user.el is really an edge case in v2.

14:13 it was necessary in v1 because esk monopolized init.el

14:14 Chousuke: customize complains a lot about variables being set outside it too :P but I guess that's mostly a cosmetic issue

14:14 hiredman: "cd %s && lein jack-in %s &"

14:15 Chousuke: I've been trying to figure out how to get a good python repl but it seems to be a mess :/

14:15 technomancy: hiredman: ok, the cd part shouldn't be necessary

14:15 Chousuke: things change variables all over and I can't figure out where the issues are

14:15 technomancy: Chousuke: customize is a mechanism designed to trick people into thinking they don't need to write elisp. =)

14:15 Raynes: technomancy: http://technomancy.us/153 Your second code block has a line sticking out. The "starter-kit-eshell" part. In safari. Haven't checked elsewhere.

14:15 technomancy: Chousuke: almost all the setq calls are in starter-kit-misc.el

14:15 hiredman: so, uh, how do I get rid of it? it's not like I added it

14:15 Raynes: Only two ls though, so it's forgivable.

14:16 Chousuke: technomancy: yeah, but for the python stuff there's python-mode.el, ipython.el and anything-ipython.el at least :P

14:16 technomancy: hiredman: I dunno; that's not the default value.

14:16 hiredman: the only to references to clojure-swank-command in ~/.emacs.d are the defcustom and the use in the let

14:16 I have nothing setting it

14:17 can you just setq a defcustom?

14:17 technomancy: maybe an old version of clojure-mode is getting loaded somehow and adding the cd part?

14:18 I vaguely recall an older revision using cd

14:19 hiredman: also, "lein jack-in %s" works fine for me, but the if statement there ends up picking "echo \"lein jack-in %s\" |sh"

14:19 (which is dumb, because sh is not my shell and has no idea what my PATH is)

14:19 * Raynes hopes that he didn't break this somehow.

14:19 technomancy: hiredman: probably because it runs before your path has been fixed

14:20 hiredman: no

14:20 technomancy: hiredman: you don't set your $PATH in ~/.profile?

14:20 Raynes: I've written about as much elisp as… well, the elisp I added to clojure-mode.

14:20 hiredman: because I use the same dotfiles on many machines and have machine dependent .zshrc's that customize the PATH

14:20 technomancy: =\

14:20 I do have an uncommitted revision here to use $SHELL

14:21 because lots of people are confused about .profile anyway.

14:21 hiredman: *shrug*

14:22 either way, 'lein jack-in' works without that nonsense, but clojure-mode ignores it and picks the other one

14:22 technomancy: yeah, but I don't want people to have to think about the $PATH brokennes

14:23 "echo \"lein jack-in %s\" | $SHELL -l" appears to work; going to go with that

15:06 R4p70r: Is there an existing function that returns the seq containing the most elements like (defn longest [x y] (if (> (count x) (count y)) x y))

15:08 leafw: http://clojure.org/java_interop#Java%20Interop-Type%20Hints seems out of date: no mention of primitive type hinting in functions and return types.

15:08 is that right, or am I looking at the wrong page?

15:09 and is ^static still valid for defining a function, or not

15:09 ?

15:10 Raynes: Pretty sure static is a dead idea.

15:11 leafw: Raynes: so it is a no-op

15:11 TimMc: ,(count "\ud80c\udc00") ; could count count code points instead of chars, maybe?

15:11 clojurebot: 2

15:12 Raynes: leafw: I'm not sure about that.

15:24 TimMc: OMG, j.l.String doesn't even have a simple way to get the number of Unicode characters in the string!

15:25 llasram`: leafw: A quick perusal through the Clojure compiler code shows all actual use of {:static true} metadata commented out

15:27 leafw: llasram`: thanks

15:50 jcromartie: TimMc: would it be useful to provide a unicode character reader/seq?

15:57 (defn unicount [s] (count (remove #(Character/isHighSurrogate %) s)))

15:57 lame, yes

15:59 R4p70r: jcromartie, that's simple ;-)

16:01 jcromartie, What kind of problem makes you deal with the "astral" planes of Unicode?

16:02 jcromartie: R4p70r: not me... TimMc

16:02 I just deal with UTF-8 in and out... escaping the nasty characters where necessary

16:03 hey wait

16:03 better yet

16:04 String.codePointCount

16:04 "Returns the number of Unicode code points in the specified text range of this String."

16:04 anyway I come here and solve silly tangential problems when I don't feel like dealing with work

16:05 so

16:05 yeah

16:05 TimMc: jcromartie: I have a nasty feeling codePointCount actually walks the string each time.

16:06 There is no arg-less variation, so I don't think it is special-cased for whole-string counts.

16:06 R4p70r: You might as well ask what kind of problem makes me deal with non-ASCII.

16:09 jcromartie: TimMc: I don't think there's any way to count code points without walking the string. The only way to avoid doing it more than once would be to memoize the result.

16:11 TimMc: of course they could fix j.l.String to store the code point count along with the length but that would require walking it at least once anyway

16:12 I think counting unicode characters is a rare use of String anyway

16:12 mattmitchell: is it possible to use apply on java method calls?

16:12 jcromartie: mattmitchell: you have to use memfn

16:12 mattmitchell: ,(doc memfn)

16:12 clojurebot: "([name & args]); Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args. Use when you want to treat a Java method as a first-class fn."

16:13 mattmitchell: jcromartie: ahh thanks!

16:13 R4p70r: TimMc, I agree with jcromartie. Java strings were originally designed as UCS-2 strings.

16:13 jcromartie: actually mattmitchell I think I'm wrong

16:14 edw: Is there a channel for ring, or should I just go ahead and try here?

16:14 jcromartie: edw: here is good

16:15 mattmitchell: actually yes, you want memfn, but you have to specify the arg names... it's weird

16:15 mattmitchell: jcromartie: ok cool, i'll have a look. thanks.

16:17 edw: Cool. I'm using wrap-multipart-params and I'm getting an ItemSkippedException from inside ring's parse-multipart-params. Any idea what's up?

16:18 jcromartie: are you uploading files?

16:18 edw: Yes.

16:19 jcromartie: sounds like you've got a lazy seq that's reading file data

16:19 right?

16:19 clojurebot: Equal Rights for Functional Objects is Baker's paper on equality and why it's impossible to define sensible equality in the presence of mutable data structures: http://home.pipeline.com/hbaker1/ObjectIdentity.html

16:19 jcromartie: and when the lazy seq is realized, it's reading from a stream that the file upload iterator has already moved on from

16:20 edw: paste your code (gist or pastebin)

16:20 edw: You mean, am I actually uploading a file when I exercise the code? Or am I desiring to upload files, in a broader sense. I am submitting a multipart form.

16:20 gfrederi1ks: wow -- I just discovered you can cause the reader to blow the stack with an 8-character string

16:20 edw: OK.

16:20 jcromartie: gfrederi1ks: what's the string? :)

16:21 gfrederi1ks: "```````x"

16:21 ibdknox: haha

16:21 :p

16:22 gfrederi1ks: even if it didn't blow the stack, the size of the return value grows exponentially with each backtick, so you could elsewise fill up memory

16:22 edw: Here you go: https://gist.github.com/1328776

16:22 (Thanks for looking at this, btw.)

16:23 ibdknox: edw: your form isn't multipart

16:23 oh

16:23 nm

16:23 edw: How do you know that, ibdknox?

16:24 ibdknox: edw: magic ;) Also I read too quickly

16:24 edw: I have 'enctype="multipart/form-data"' in my HTML...

16:25 jcromartie: edw: so your POST /toc handler just responds with the uploaded file contents?

16:27 edw: jcromartie: Eventually I'm going to save it, using SPIT, at least to start.

16:27 jcromartie: ya

16:27 ibdknox: edw: java.io.copy

16:28 edw: But I get the same error even if I comment out that line and return something more mundane.

16:28 ibdknox: edw: I don't see anything obvious with what you have here

16:28 edw: what version of ring/compojure?

16:28 edw: ring 1.0.0-RC

16:29 ibdknox: edw: can you put the stacktrace in with your gist?

16:30 edw: Sure.

16:30 jcromartie: ah, yes, stacktraces help :)

16:30 edw: Just updated it.

16:33 ibdknox: I really don't know :/

16:34 edw: Yeah. Has me stumped too. Time to build the smallest reproducible example I can.

16:34 ibdknox: I know I got noir to do an upload the other day, but I can't remember if it was ring RC or beta

16:35 jweiss: so, i'm trying to get prxml working with clojure 1.3. it calls clojure.contrib.string/escape which says {:deprecated "1.2"} but no message as to what replaced it?

16:36 that fn is throwing a rather odd error NoSuchMethodError clojure.lang.Numbers.lt(II)Z

16:36 ibdknox: jweiss: clojure.string/escape

16:36 where did contrib go?

16:36 $google where did contrib go?

16:36 lazybot: [Where Did Clojure.Contrib Go - Clojure Design - Clojure Development] http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

16:36 ibdknox: that trigger must have been removed

16:37 jweiss: ibdknox: i know where contrib went, maybe i don't understand the word deprecated

16:37 wouldn't deprecated 1.2 mean, deprecated IN 1.2?

16:37 not, "after" 1.2?

16:37 ibdknox: jweiss: that's how I'd read it, yeah lol

16:38 jweiss: i guess clojure.string is supported in 1.2 so it is right

16:38 ibdknox: yep

16:38 jweiss: but i am used to java where javadoc usually tells you what to use instead :)

16:38 ibdknox: the would definitely be better

16:39 jweiss: well i guess i'm gonna package up my own prxml then, i haven't signed the contributor agreement yet

16:40 jcromartie: edw: what if you don't do (log/info (str file))

16:44 edw: I'm looking at this https://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/middleware/multipart_params.clj

16:45 I think the implementation is wrong here, and it should not be using a lazy seq to build the param map

16:46 ibdknox: hah

16:46 I bet you're right

16:47 jcromartie: anyway, edw, the problem is that something is attempting to read the stream after the FileItemIterator has moved on

16:50 look for anything using :stream

16:51 I wonder if reduce is reading ahead in the seq?

16:52 ibdknox: well

16:52 the issue has to be something specific to his implementation. uploading works

16:53 jcromartie: in general?

16:53 I'd hope so :P

16:54 reduce doesn't seem to be eager with consuming the output of a lazy-seq

16:54 so yeah

16:56 arohner: is there a fn for determining whether a value can have metadata attached?

16:56 like (supports-meta? x)

16:58 sigh, (apropos meta) shows a "supports-meta?" fn, but doesn't tell me which ns it's in

16:58 jcromartie: only symbols and collections

16:59 ibdknox: and fn's I thought...

16:59 jcromartie: no, only their vars

16:59 but it's really on the symbol of the var...

16:59 it's kind of, complicated

16:59 at least I think

16:59 but it works

16:59 arohner: I'm pretty sure I just need to check (instance? clojure.lang.IMeta)

17:00 actually, IObj

17:00 jcromartie: yeah I was going to say

17:00 ,(source meta)

17:00 clojurebot: Source not found

17:00 jcromartie: oh

17:00 well

17:00 IMeta is good

17:00 ibdknox: ,(meta (fn []))

17:00 clojurebot: nil

17:01 ibdknox: ,(with-meta (fn []) {:name "cool"})

17:01 clojurebot: #< clojure.lang.AFunction$1@1fcd9f9>

17:01 ibdknox: ,(meta (with-meta (fn []) {:name "cool"}))

17:01 clojurebot: {:name "cool"}

17:01 jcromartie: so fns do have metadata

17:01 ibdknox: jcromartie: fn's can have meta :p

17:02 jcromartie: functions, collections, symbols, vars

17:03 but the metadata on the actual function value of a defn is different from the metadata on the var

17:32 jweiss: ughhh, clojure 1.3 totally ruins any attempts at tracing

17:33 well, not totally, but the only way I can think of to do it, by rebinding

17:33 like clojure.contrib.trace does

17:34 technomancy: with-redefs?

17:36 jweiss: technomancy: that looks like it may work, thanks

17:38 technomancy: cool

17:39 jweiss: technomancy: seems to work surprisingly well, just replaced "binding" in the existing trace macro with "with-redefs".

17:41 arohner: is there a workaround to chunking when using 'for'?

17:42 jweiss: ah, except, i used to be able to send traces of different threads to different files, that won't be straightforward now without thread-local bindings

17:43 i guess the trace fn can check it's own thread

17:44 i wonder if i can just with-redefs to just apply ^dynamic and go from there

18:01 TimMc: ,(let [cpcount #(.codePointCount % 0 (.length %)), a "\ud80c" b, "\udc00"] (map (juxt count cpcount) [a b (str a b)]))

18:01 clojurebot: ([1 1] [1 1] [2 1])

18:01 TimMc: :-(

18:01 * Raynes pats TimMc on the back.

18:01 Raynes: You'll get it eventually, pal.

18:05 TimMc: Raynes: Just noting that cpcount is not linear across j.l.String concatenation.

18:06 Raynes: technomancy: I want a Heroku t-shirt. What can I do about this?

18:06 technomancy: Raynes: we'll have some at the conj to hand out for sure

18:07 Raynes: Awesome!

18:07 You'd do well to watch me. I'm apt to hoard them.

18:08 I've got about 4 different Clojure shirts of various sizes from last year's conj. Though to be fair, there were waaaaaay too many of them.

18:08 The worst part is that I haven't worn one of those shirts even once.

18:08 But my mother has.

18:09 technomancy: the thing I always forget about conferences is that you don't need to pack as many shirts as you think you do

18:09 because you always get some there.

18:09 sean-away: i didn't get to the conj but a friend got me one of those shirts - which i wear to other user group meetings to spread the clojure love!

18:09 Raynes: I just don't wear white.

18:09 technomancy: yeah, I have too many white conference shirts already =\

18:10 Freidenker: Newbie question: When I open the RELP in a terminal I can't use the arrows, I'll get weird symbols (e.g.: "user=> ^[[D" for the <- arrow)

18:11 ibdknox: Freidenker: how are you starting your repl?

18:11 Raynes: You need to use rlwrap or something similar. lein and cake do this for you automatically.

18:11 Freidenker: ibdknow: I type "clojure" in a terminal (Linux)

18:11 It's ibdknox, sorry :P

18:12 ibdknox: Freidenker: use leiningen, it'll make your life much easier

18:12 Raynes: http://blog.raynes.me/blog/2011/10/22/problems-with-clojure-plus-homebrew/

18:12 ^ This is a post I did on this topic. Be careful -- it's pretty heavy with snark.

18:12 ibdknox: Freidenker: most OS distributions of Clojure are terribly broken

18:13 sean-away: i wrote up a blog post on installing Emacs / Leiningen / Clojure for Windows - despite grumbles from the peanut gallery here that we have too many out of date blog posts about that...

18:13 Freidenker: OK I'll try that, thank you very much.

18:13 Raynes: To be fair, installing Leiningen with your package manager would probably be okay. If it is actually there. But I wouldn't bother, because it'll be a horrible pain to update it and stuff.

18:13 technomancy: I'm wondering if the term "build tool" confuses people about this.

18:14 seancorfield: i had a few friends try it out, mostly on Windows 7 (i'm on windows xp) and they mostly got up and running with it

18:14 technomancy: I can see how people would see that and think "oh, I don't need that yet; I just want to get started"

18:14 Raynes: technomancy: cake makes a few attempts to refer to itself as a 'development environment'.

18:14 seancorfield: a couple hit a road block with non-hex unicode characters in a file

18:14 technomancy: Raynes: yeah, I have switched to "lein is for automating clojure projects" in most of my docs.

18:14 seancorfield: which seems to be due to (setq default-directory "C:\Users\person") in their init.el

18:15 should be \\ instead of \

18:15 technomancy: maybe even "a user interface for Clojure"?

18:15 seancorfield: but on XP, emacs did not put anything in my init.el...

18:15 ibdknox: technomancy: build tool definitely threw some of my friends off... the equated it to msbuild/ant

18:15 Raynes: That's the line of thinking I went with in that blog post.

18:15 But I did say 'build tool'.

18:15 I'll edit that in a bit.

18:16 technomancy: ibdknox: do you think "it's for automating Clojure projects" is better?

18:16 ibdknox: technomancy: definitely better, I'm not sure that's the best we can do though

18:17 mabes: Raynes: not saying I disagree with you, but don't other packages just contain jar files?

18:17 seancorfield: in one of my blog posts i said "Leiningen is an essential Clojure tool that can create projects, resolve library dependencies, compile your code, run your tests, fire up a REPL and a whole lot more."

18:17 ibdknox: technomancy: hinting that its the easiest way to get started with Clojure would be useful

18:17 Raynes: mabes: Not sure what you're referring to.

18:17 seancorfield: heh, from that same blog post: "The easiest starting point is to get Clojure up and running with Leiningen."

18:17 technomancy: ibdknox: yeah, but when you read that in lein's own readme it sounds like just a marketing claim =)

18:18 reading it in other contexts is different though

18:18 mabes: Raynes: I can't think of any exact examples now but I think I have installed packages which had subdepes which all it did was install jars files (this was in ubuntu).

18:18 ibdknox: technomancy: yeah... I still maintain there should be giant "download lein" link on clojure.org with a heading "Get started"

18:18 mabes: s/subdepes/subdeps/

18:19 Raynes: mabes: But the problem is the 'install' part. It is trying to install Clojure in a central location. Then, when users get to the actually create a project part, they're in here asking what they're supposed to do. The answer is always going to be Leiningen or cake, so it makes sense to just skip the crap and get to what you can use from now on.

18:19 mabes: anyways, like I said, I don't disagree with you, but I think there may be a precedent for package managers installing java libraries

18:19 technomancy: ibdknox: I wouldn't mind =) but so far I've held back on stuff like that in my own wiki edits to avoid accusations of impartiality

18:19 seancorfield: maybe one day clojure/core will embrace leiningen as the easiest way to get started :)

18:20 technomancy: mabes: it definitely makes sense to use an OS-level package manager to install libraries, but only in so far as they are dependencies for user-level applications.

18:20 ibdknox: technomancy: well when I get a minute to breathe I'll push on the issue

18:20 technomancy: seancorfield: maybe it would help if I stopped making fun of them for not accepting pull requests and other contributions. =)

18:21 seancorfield: maybe :)

18:21 but we can all gang up on them at the conj! :)

18:21 ibdknox: I'm for it

18:21 it's absolutely what we should do

18:21 Raynes: technomancy: If you decide to corner Rich and beat him until he says pull requests are the bomb, I'll help.

18:21 ibdknox: it should be painfully obvious how to start

18:22 and it's not :(

18:22 seancorfield: it's a pity that on windows lein still needs either wget, curl or for users to d/l the leiningen jar :(

18:22 mabes: technomancy: BTW, did the leiningen package make it into a main debian or ubuntu repo? or will it ever?

18:22 technomancy: mabes: it's in debian, but it's broken in ubuntu

18:23 it looks like they're working on syncing the fix from debian now at least though

18:23 seancorfield: any windows users here want to review / critique my upcoming emacs / leiningen / clojure blog post for windows (xp & 7)?

18:23 technomancy: seancorfield: someone said powershell is capable of performing HTTP downloads

18:23 mabes: thats nice..

18:23 ibdknox: technomancy: it is

18:23 technomancy: seancorfield: presumably at some point enough windows users will be using that to make it make sense as the default windows lein implementation?

18:24 last time it was discussed people told me it didn't have wide enough penetration to really justify it

18:24 brehaut: technomancy: you have access to the .net stdlib from powershell so even if you couldnt you could

18:24 seancorfield: is there a powershell version of lein.bar?

18:24 s/bar/bat/

18:24 technomancy: seancorfield: someone cooked up a proof-of-concept at one point

18:25 devn: seancorfield: i'll peek at it -- im doing a noob night on getting a working Clojure setup, and I have a feeling there will be a couple of windows users

18:26 technomancy: huh; interesting: https://github.com/lispnik/powershell-leiningen

18:26 I hadn't seen that implementation

18:32 devn: oh, did you get a local user group going?

18:32 seancorfield_: devn: http://corfield.org/articles/emacs_win.html

18:33 that's a temporary link that will go away once the blog post is up

18:33 the main stumbling block several windows users have hit is "Non-hex digit used for Unicode escape" when trying to do clojure-jack-in

18:34 i suspect this is due to \U in one of their .el files - based on google - but so far have not had success walking anyone thru it...

18:39 technomancy: seancorfield_: also I remember talking a bit about encouraging folks to download the lein jar by hand instead of by curl and I don't really remember if we came to a conclusion on that

18:40 seancorfield_: it wasn't clear where to put the JAR

18:40 psyllo: Thanks for the blog post Raynes. This brings up some good discussion.

18:40 technomancy: oh, because the place considered $HOME on windows shifts around a lot, that's right

18:40 psyllo: Does anybody install Java via a package manager?

18:40 seancorfield_: you'd need to figure out where each version of windows considers the "home" directory to be and then manually MD the .lein folder there

18:41 and create a self-installs folder inside that (or is it self_installs?)

18:41 psyllo: Java, is not in and of itself useful.

18:41 technomancy: seancorfield_: yeah, that's probably more trouble than it's worth

18:41 psyllo: Clojure being installed via a package manager makes perfect sense.

18:41 seancorfield_: self-installs

18:41 technomancy: psyllo: for me java is only installed via the package manager because lein pulls it in

18:41 it's not something the end user interacts with

18:42 psyllo: So, you seeing where I'm going with this?

18:42 Sysadmins and users all over the world install java, the VM, the Language or however they think of it.

18:43 Clojure could be installed with the option of picking a "build tool"

18:43 technomancy: psyllo: if they are installing the java package directly, that's only because the actual thing they want to use is either not packaged or packaged incorrectly.

18:43 nobody wants Java for the sake of Java

18:44 psyllo: FreeBSD packages would often have ncurses option windows that allowed you to select some build time options etc. Likewise Clojure could have a default 'lein' or an optional 'cake' etc.

18:44 Just a thought... but I do think it's something that could make sense within an OS's package manager.

18:45 technomancy: Exactly what I'm saying. But it's a package anyway.

18:45 technomancy: sure

18:45 I don't think anyone's saying it shouldn't be a package, just that you shouldn't install it directly.

18:45 psyllo: An exception to that is support for certain web pages... nobody installs web pages ;)

18:46 If you're trying to close the gap and make this accessible to newcommers, having a Clojure package installed directly may be a good option.

18:47 And I don't think it would violate the users expectation of what can/should be installed via their package manager.

18:47 Just offering that up

18:47 technomancy: psyllo: it may be, but only if Clojure/core decides to make Clojure into an application targeted towards end users.

18:48 otherwise each packager is going to have to code up their own half-assed shell script that the #clojure channel is going to end up debugging for poor confused users =\

18:49 psyllo: I think there is definitely a gap to be closed here, and it will be closed one day if Clojure continues to grow.

18:50 ibdknox: psyllo: that's the wrong direction I think. In order for Clojure to continue to grow, these issues have to get sorted out

18:51 psyllo: ibdknox: Don't know the future, but it seems Clojure is currently doing just fine in spite of this. Or am I wrong in that assumption?

18:52 ibdknox: psyllo: not at all, but from what I can tell we're still pulling in early adopters

18:52 that pool runs out eventually :)

18:53 psyllo: Cool yeah :)

18:54 pdk`: ,(Math/pow 16 3)

18:54 clojurebot: 4096.0

18:54 psyllo: Clojure setup effect is according to expectations of its users it seems. A lot like SBCL or another non-commercial CL.

18:54 s/effect/effort/

18:58 technomancy: psyllo: do you mean it matches peoples' expectations?

18:58 psyllo: technomancy: Yes

18:58 devn: technomancy: yeah, I've had a user group going for about 8 months. It's been very mixed in terms of turnout, but slowly growing

18:58 technomancy: devn: wow, nice

18:58 devn: We had 8 people last meeting

18:58 (big for Madison, WI) :)

18:58 technomancy: that's more than some seajure meetings =)

18:59 psyllo: I've barely ever used LispWorks, but when I was new to CL I saw it as something that would get me in the door and running right off the bat. For example: http://www.lispworks.com/images/lw-ide-gtk.png

18:59 devn: granted we have one person who just wants to tell everyone how awesome scala's type system is

18:59 and a recovering haskellholic

19:00 brehaut: devn, thats not the same person?

19:00 psyllo: But, I ended up using SBCL most of the time anyway ;)

19:00 devn: :D -- He's a very smart guy, knows loads about Scala and is great at explaining things, but I've been sort of wrestling with "Do we make this a general FP group or keep it Clojure"

19:00 I've decided to keep it Clojure.

19:01 seancorfield_: the bay area clojure group had about 40 attendees for chas emerick's talk on clojurescript and couchdb

19:01 we usually get 20-30 people at meetings

19:01 devn: nice.

19:01 psyllo: That was the first Clojure meetup I've been to.

19:01 I was impressed by the turn out.

19:01 seancorfield_: we're doing a hands on emacs session this week and have 24 ppl signed up already

19:02 devn: btw, I hate Merb. It makes me want to stab someone. (Pay no attention to this. Long day.)

19:02 technomancy: seancorfield_: yeah, we had an Emacs workshop at one of our earlier meetings for everyone to bring their questions. =)

19:02 devn: isn't it deprecated?

19:02 devn: technomancy: long story, but, yes, except people still have apps on it that need to be ported, maintained, etc.

19:03 technomancy: =\

19:04 seancorfield_: we've had a lot of clojurescript coverage at the bay area group ... but we're also going to do a workflow / build tool session early next year

19:04 and we're now meeting every month in the same location which helps

19:04 technomancy: yeah, nothing like consistency

19:05 gtrak: anyone interested in having a baltimore meetup?

19:18 edw: jcromartie: Thanks for your thoughts. (I was *very* AFK.) I've downgraded to clj 1.2.1 and things are working. I'll try re-upgrading once I demo what I'm working on and have some time to experiment.

19:47 vijaykiran: Hi all .. can anyone give me a hint on how to serve a static file using compojure (0.6.5) ?

20:23 gfrederi1ks: vijaykiran: I remember there being a way to specify a directory to serve static files from. It might have been a function from the ring library itself? not sure.

20:25 vijaykiran: gfrederi1ks: there is indeed ring.utils.response/file-response but somehow I'm not able to figure out how to connect / to index.html

20:25 I can get /index.html working though

20:26 ibdknox: vijaykiran: that's not how compojure was designed

20:27 vijaykiran: you would have to create routes for them

20:27 and then serve the static files as your response

20:29 vijaykiran: I did add a route GET "/" to a function which calles ring/file-response - not sure if that's the right way (sorry noob here)

20:30 here's what I have https://gist.github.com/1329499

20:30 ibdknox: it depends on what you want. The simplest thing to do is just slurp the file

20:30 (slurp (clojure.java.io "/path/to/index.html"))

20:32 longer term you probably want to read those on start and just serve the string of the content

20:34 vijaykiran: I just want to show the static index.html when there's a request to localhost:8000/

20:34 A simple default static home page that is

20:35 ibdknox: yeah

20:35 the slurping the file will do that

20:35 brehaut: or serve static media with your gateway server rather than an embeded server / application logic

20:36 ibdknox: yeah, you shouldn't be using ring to do that

20:36 buuuut

20:36 just to mess with things for now

20:36 brehaut: caveat: except for during dev

20:36 ibdknox: do the slurp thing :)

20:36 vijaykiran: :) okay .. thanks I'll try that

20:36 brehaut: ibdknox: ring accepts a file as the body of a response; why slurp?

20:37 ibdknox: brehaut: it's easier to cache a string, but in this case it doesn't matter

20:53 vijaykiran: thanks ibdknox - I finally got what I wanted with a redirect : (GET "/" [] (ring.util.response/redirect "/index.html"))

20:54 ibdknox: fwiw, it might be worth looking into Noir, if for no other reason than the tutorials: http://www.webnoir.org

20:56 vijaykiran: yes . I'm looking it as well - wanted to try with something at lower level first :)

20:59 technomancy: I'm not going to get to use juxt here, am I? http://p.hagelb.org/memfn-fail.html

20:59 =(

21:00 timvisher: hey all

21:00 i'm trying to get lein-difftest working

21:00 ibdknox: technomancy: nice try :p

21:00 timvisher: how do i go about installing it's dependencies if I want it as a user level plugin?

21:01 technomancy: timvisher: there's a bug in 1.6.1; need to either go back to 1.5.2 or run from git. =(

21:01 timvisher: boo. :(

21:02 ah well, np

21:03 technomancy: thanks for that post though! My mouth hung wide open when I saw difftest. Someone demoed Spock at my employer and I just about shouted "want" at the top of my lungs. difftest gets me pretty much the whole way to what I wanted. :)

21:04 ibdknox: timvisher: spock?

21:04 timvisher: is there a bot that knows how to do ,spock testing framework?

21:04 http://code.google.com/p/spock/

21:05 nvmnd, Quicksilver is faster. ^_^

21:09 gtrak``: ibdknox, vijaykiran, isn't it better to use the mmap'd files?

21:10 there's a resource-response function somewhere

21:11 https://github.com/mmcgrana/ring/blob/11a096e86bd2b9bc105b4dd032bd96265d17c317/ring-core/src/ring/util/response.clj#L65

21:12 ibdknox: gtrak``: there's no real advantage to that over the slurp unless he's jaring it and deploying it

21:12 which would be the wrong approach

21:12 gtrak``: let the os cache it?

21:12 ibdknox: as brehaut said earlier, the Clojure server really shouldn't be serving statuc files

21:12 gtrak``: instead of hogging up memory

21:13 aperiodic: nginx is a beast at serving static content

21:13 gtrak``: ibdknox, i agree it shouldn't, but during development, it's much simpler to do everything in one place until you really need to scale, yes? are you talking like nginx?

21:15 ibdknox: gtrak``: I completely agree, and that's my point it's just for dev so it doesn't really matter so much. But yeah, nginx will do this wonderfully

21:16 brehaut: and for the dev version, surely the simplest piece of code is preferable?

21:16 gtrak``: really really you should be using a third-party like akamai

21:16 ibdknox: yep!

21:17 gtrak``: brehaut, my static file-serving code is like 1 line

21:18 brehaut: gtrak``: thats relatively simple ;)

21:18 ibdknox: mines like 2 chars :D

21:18 mine's*

21:18 brehaut: i run my dev sites inside a full linux VM so i have no lines of code for my static file serving :P

21:18 gtrak``: define a route, calculate the path, wrap-file-info and you're good

21:22 man, are we really going to have all that time to do the unconference stuff at conj?

21:23 it looks like there won't be sleep

21:23 ibdknox: sleep is for the weak ;)

21:32 mattmitchell: WOuld someone mind explaining how I can extend a java class, set a protected property in the "constructor", then instantiate it?

21:39 jayunit100: hi guys :

21:40 I want to simulate several random samples, by using an infinite list generator ....

21:40 (take 5 (shuffle [1 3 4 5 6 2 4 3 ]) )

21:41 aperiodic: mattmitchell: the first bit can be accomplished by specifying the class in gen-class

21:41 ##(doc gen-class)

21:41 lazybot: ⇒ "Macro ([& options]); When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory. When not compiling... https://gist.github.com/1329612

21:41 jayunit100: That will give me random list of size 5.... but what is the idiom to continually calculate a running "average" of each list of 5, for an arbitratily long time long time ?

21:41 gen-class?

21:41 clojurebot: No, jayunit100, you want gen-interface + proxy

21:41 jayunit100: oh ok

21:42 aperiodic: jayunit100: no, you don't, i was talking to mattmitchell, sorry

21:42 jayunit100: oh ok

21:42 no prb

21:42 mattmitchell: aperiodic: ok i was messing around with proxy, but didn't know whether or not it should be gen-class or proxy

21:42 mange: jayunit100: What do you mean by average, sorry?

21:45 aperiodic: mattmitchell: i believe you can only extend classes using gen-class, and you cannot access protected members of a proxied class

21:45 jayunit100: ##(take 5 (shuffle [1 3 4 5 6 2 4 3 ]) )

21:45 lazybot: ⇒ (2 4 6 5 3)

21:45 jayunit100: ##(take 5 (shuffle [1 3 4 5 6 2 4 3 ]) )

21:45 lazybot: ⇒ (5 2 3 4 4)

21:45 jayunit100: notice how if we average those 2 lists, the val is different.

21:46 so [1 3 4 5 6 2 4 3 ] simulates a population ,

21:46 mattmitchell: aperiodic: ok good to know. So how do you set an instance member using gen-class?

21:46 aperiodic: mattmitchell: if you haven't already read it, the page from clojure.org on class-generation goes into a lot of detail about using gen-class

21:46 jayunit100: [1 3 4 5 6 2 4 3] is a population and [1 3 4] and is a "sample"....

21:46 mange: Yeah, but then the word running is confusing me. Do you just want a list of averages of each group of 5?

21:47 aperiodic: mattmitchell: http://clojure.org/compilation

21:47 jayunit100: no... i want to take the average of a random subset.

21:47 once, twice, three times, etc....

21:47 mattmitchell: aperiodic: excellent thanks. I'll dig into that.

21:47 jayunit100: and continually recalculate the "mean" of the "means"...

21:47 do you know what "standard error" is ?

21:48 aperiodic: mattmitchell: the API docs on gen-class are also handy

21:48 mattmitchell: http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/gen-class

21:48 jayunit100: Im trying to simulate population sampling ....

21:48 mattmitchell: aperiodic: looks like i have some reading to do :)

21:49 aperiodic: so what I'm looking to do is possible though?

21:49 mange: So, the shuffle makes each group of 5 random, then you want to take groups of 5 and average their mean with a "global" mean?

21:49 aperiodic: mattmitchell: i think so. looks like you'll need to use set! to actually set the field, as described in http://clojure.org/java_interop

21:49 jayunit100: yeah... to see how many samples i need in order to get a good average mean.

21:50 as you can imagine, the more random samples, the closer to the "true" mean of the "whole" population we get.....

21:50 anyways--- ill be back gotta take the dog out...

21:51 jcromartie: edw: ah, I am using 1.2.1

21:51 I bet reduce is slightly greedier in 1.3 or something like that

21:52 aperiodic: mattmitchell: although it's possible that you can't set the field in the constructor, and will need to do that in a :post-init function

21:53 mattmitchell: aperiodic: interesting, so post-init gives access to the instance scope?

21:55 aperiodic: mattmitchell: sorry, what do you mean by "instance scope"?

21:55 despite doing a lot of java interop, i don't actually know a lot about java :)

21:56 jcromartie: aperiodic: fortunately, there's not much to know about Java

21:56 that's why it's a good host platform :P

21:56 aperiodic: mattmitchell: the reason I think you need to use a post-init fn is that to set! an instance field, you need a reference to the instance

21:57 mattmitchell: you don't have that in the constructor

21:57 mattmitchell: aperiodic: ahh well then yes, post-init sounds like the right thing then. Sorry, I

21:57 m

21:57 oops

21:57 I'm no java ninja either :)

21:58 brehaut: there are java ninjas‽

21:59 jcromartie: edw: yes, I found your problem with the mutlipart form thing

21:59 mattmitchell: brehaut: yeah, one of my old co-workers, and he was no fun to be around either.

21:59 jcromartie: in Clojure 1.3, reduce is greedier than 1.2.1

22:00 edw: so 1.3's reduce is consuming the lazy sequence of uploaded files... the middleware should be converted to use some other construct instead of reduce

22:01 but it might just be a bad idea to use a lazy sequence where the order of generation and consumption matter

22:04 mange: jayunit100: This is what I went with: http://paste.pocoo.org/show/501125/

22:06 ... And now I see the function 'reductions' which would have saved me a lot of energy there.

22:08 jcromartie: mange: everybody goes through that :)

22:08 mange: "Hey, I have this great idea, I wonder why nobody's ever done that before! ... Oh..."

22:10 jayunit100: Take 2! http://paste.pocoo.org/show/501126/

22:39 romanandreg: quick question… do you know if this concept of "Streams" in clojure is still on development? => http://clojure.org/streams

22:39 I'm trying to find some library code that has that via google, but no luck so far

22:41 brehaut: romanandreg: it refers to the google code svn at the top of the page; that indicates that its pretty ancient. i think this might actually have been a precursor to the new lazy-seq stuff introduced in 1.0 or 1.1

22:42 romanandreg: i could be 100 miles off though

22:49 romanandreg: brehaut: what about the stream-utils API, is this dated as well? => http://richhickey.github.com/clojure-contrib/stream-utils-api.html

22:49 lazybot: Nooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/stream-utils-api.html and try to stop linking to rich's repo.

22:49 romanandreg: hahahahaha

22:49 brehaut: romanandreg: well, as a ballpark, everything in old contrib is dead code

22:50 except when its listed here as not being dead http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

22:51 romanandreg: perhaps if you told us why you wanted streams, someone could give you more precise/useful information

22:51 romanandreg: brehaut: I have a Haskell background, I wanted to check something similar to Enumerators/Iteratees

22:52 brehaut: olegs iteratees paper ate my brain. i was more confused after reading that than before ;)

22:54 romanandreg: brehaut: hehehe yes, it tends to be really complicated at the start

22:55 after internalizing the thing for 25 times, is how I get it

22:55 got*

22:55 brehaut: haha

22:55 being completely in the dark about how it works i cant make any useful comment sorry

22:55 romanandreg: brehaut: at least you try :-) thanks

23:00 brehaut: romanandreg: jim duey and konrad hinsen are probably the most well known for haskelly ideas in clojure (in particular functors, monads and arrows). its possible one of them has written some stuff related to streams

23:01 romanandreg: http://intensivesystems.net/writings.html

23:01 romanandreg: nice

23:02 brehaut: yes, I should send them an email just to check out if they have been up to doing something similar to Iteratees in Clojure

23:03 brehaut: thanks for the info, you have been really helpful \o/

23:03 brehaut: thats why we are here right? :)

23:05 romanandreg: yes! I would love to have more IRC channels like this pine

23:05 one*

Logging service provided by n01se.net