#clojure log - Jul 31 2010

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

0:11 cpfr: hey how could I extend a java class in clojure

0:21 technomancy: Drakeson: sure; go ahead and experiment in a branch

0:21 Drakeson: how come though? what's the advantage?

0:22 dsantiago: you can do it with leiningen checkout dependencies

0:22 but it's awkward to do with swank by itself

0:29 dsantiago: I mean, does that let you maintain two separate repls in slime at the same time?

0:31 technomancy: oh, connecting to two separate swank servers at once?

0:31 I haven't tried that. it may be possible.

0:31 dsantiago: When I try it gets rid of the first repl, as far as I can tell.

0:32 technomancy: I always just keep two separate Emacs instances up

0:33 dsantiago: Ah, I don't think I can do that on Mac.

0:33 Thanks.

0:33 slyrus: you can already do that on two seperate ports, no?

0:33 technomancy: you can, but OS X makes it hard.

0:33 at least for GUI instances

0:34 dsantiago: Yeah, I gotta use Aquamacs to make it tolerable.

0:34 technomancy: eep.

0:37 leifw: has anyone gotten a successful emacs/slime/nailgun/clojure setup working?

0:37 assuming I figure out my regular emacs/slime/clojure problems, it would be nice to stick nailgun in there too

0:37 technomancy: leifw: what does nailgun get you?

0:37 leifw: not like I'm starting and stopping slime all the time, but it would be neat I guess

0:37 technomancy: you mean being able to use a single instance from either Emacs or the CLI?

0:37 leifw: pretty much

0:38 technomancy: I think a socket-repl would be an easier way to attain that

0:38 leifw: interesting

0:38 technomancy: there's a socket-repl in contrib that's easy to use; just start that and telnet to it

0:38 fualo: dsantiago: Aquamacs makes things hard...

0:38 leifw: :o

0:39 technomancy: leiningen 1.3 may allow you to enter multiple tasks at the command line with something like lein clean, jar, test leiningen.test-core, repl

0:39 any objections to using commas as a task separator?

0:40 dsantiago: Yeah, but what're ya gonna do?

0:41 fualo: are there any folks that aim to make other implementations of clojure?

0:43 technomancy: fualo: there's clojureCLR; I think everyone else is waiting for Clojure to be closer t oself-hosting

0:43 Scriptor: fualo: what do you mean other implementations? As in other backends?

0:44 slyrus: clojure on CL would be nice :)

0:44 technomancy: slyrus: you can adapt my clojure-on-elisp compiler to output CL =)

0:45 the one I haven't started

0:45 slyrus: I assumed the clojure-on-elisp things was a joke, right?

0:45 ah, ok.

0:45 technomancy: well it would be foolish to start a new implementation right now with clojure-in-clojure "just around the corner"

0:45 Scriptor: I'm working on a kinda-like-clojure-not-really to php compiler

0:46 if anyone wants to lose their sanity and help :p

0:46 slyrus: technomancy: but I'm assuming clojure-in-clojure will still run on the jvm, no?

0:46 it's just that the java bits of the source tree will move to clojure

0:46 technomancy: slyrus: right

0:46 slyrus: my hypothetical clojure-on-cl would not use the jvm

0:47 technomancy: sure, there's plenty of talk of porting to other runtimes

0:47 llvm, JS, etc.

0:48 slyrus: stm, seqs, the new object model, etc... would all make for a nice lispy dialect on top of, say, SBCL's compiler infrastructure

0:48 technomancy: slyrus: there's also talk of porting qi to clojure

0:48 no idea how serious that is

0:50 dsantiago: technomancy: Is that take all based on waiting for clojure-in-clojure, or going ahead without it?

0:50 technomancy: that "plenty of talk" you mean? yeah.

0:52 fualo: technomancy: seld hosting?

0:52 *self

0:52 as in not on jvm?

0:53 Scriptor: fualo: as in it's all written in clojure, I think

0:53 technomancy: fualo: no, as in not implemented in the Java Programming Language™

0:53 fualo: ah, cool

0:53 slyrus: technomancy: what's wrong with spaces? lein clean jar "test leiningen.test-core" repl

0:53 fualo: I just wonder if people will split from the jvm...

0:54 technomancy: slyrus: well it's much more common to want to give an argument to a task than to want to chain tasks

0:54 dsantiago: If there was a version of Clojure that would let me write Cocoa apps, I'd totally use it.

0:54 technomancy: so spaces are used for that.

0:55 dsantiago: Something like Macruby.

0:55 technomancy: it's possible

0:56 dsantiago: If I was smart enough to understand all the things clojure does, I'd work on it. I need someone better, though.

0:57 technomancy: maybe by the time clojure is self-hosting you'll understand it better. =)

0:57 dsantiago: That's what I was hoping for.

0:57 If the STM stuff is rewritten in Clojure, it becomes a lot easier.

0:58 slyrus: technomancy: back to the here and now... any chance clojure-mode could do (def...) style processing for (foo/defmoose ...) instead of just (def...)?

0:58 in particular it's the fnparse defrules that are killing my indenting

0:59 but, besides that, did I say how awesome fnparse is? oh yeah, I think I did -- a couple of times even

0:59 technomancy: slyrus: it probably could. I'm not sure the specifics of how, but I'm sure it could be done with some elisp pokage.

0:59 slyrus: aren't you the clojure mode maintainer? :)

1:00 d'oh

1:00 jochu is, I guess

1:00 technomancy: I'm the ... steward.

1:00 maintainer is kind of a strong word.

1:00 slyrus: heh

1:01 the regent

1:03 daaku: i'm reading the docs, but i'm not getting why this wont work in the repl: (gen-class :name user.t1 :extends Exception) (new user.t1)

1:04 do i need to trigger some sort of explicit compile on it? or import it?

1:04 technomancy: daaku: there are less-awkward ways of signaling exceptions than subclassing; have you tried clojure.contrib.condition or error-kit?

1:04 but yeah, you need to perform an explicit compilation step. kind of annoying; better to avoid it if you can.

1:07 daaku: i'm reading about conditions now, but i looked at error-kit and couldn't figure out how to make it "except"

1:07 seemed like it continue was the only option, or throwing an exception, which meant the higher level needed another fork

1:07 i guess i didn't quite get it

1:08 technomancy: error-kit is much more involved than c.c.condition

1:09 c.c.condition is really slick. I could see it being part of Clojure itself some day.

1:10 daaku: technomancy: i'm having a hard time finding docs for this :(

1:11 brehaut: daaku have you seen clojuredocs ?

1:11 technomancy: basically you can raise a map with arbitrary fields and it's treated like an exception

1:11 then you can use the handler-case macro like you'd use try except instead of exception classes you put a predicate there

1:11 daaku: brehaut: yeah, didn't have anything more

1:12 technomancy: thank you, that makes perfect sense now :)

1:12 brehaut: daaku aight sorry bout that then

1:12 technomancy: the first clause to match the raised condition acts as a catch clause

1:12 daaku: so destructring to match exceptions of sorts?

1:12 technomancy: kind of

1:12 daaku: reminds me of erlang's pattern matching

1:13 technomancy: anyway, it's under-appreciated.

1:13 daaku: technomancy: i'll give it a shot

1:13 tomoj: I wonder if this "Overriding previous definition of reference to.." stuff is nothing to worry about

1:14 technomancy: tomoj: some ns you're using hasn't been updated for Clojure 1.2

1:14 tomoj: ah

1:15 technomancy: probably something like seq-utils

1:18 tomoj: strange that it happens during `lein deps`

1:19 virgin project from `lein new`, add swank-clojure 1.3.0-SNAPSHOT to :dev-deps, then `lein deps` gives two of those warnings

1:22 technomancy: tomoj: can't repro here. which lein?

1:23 fualo: can closures in clojure maintain state with lexically-scoped variables in different invocations?

1:23 technomancy: fualo: sure, if you close over an atom

1:23 or an agent, ref, etc. but usually an atom.

1:23 brehaut: fualo: have an example http://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/middleware/session/memory.clj

1:24 tomoj: technomancy: 1.2.0

1:24 brehaut: ;)

1:24 fualo: ah, interesting technomancy...

1:24 technomancy: tomoj: weird... if you can repro with the latest master on git please open a ticket

1:24 tomoj: will do

1:24 fualo: thanks brehaut

1:25 brehaut: fualo: it has the additional detail of faking an object with a map but you can happily ignore that

1:25 technomancy: g'night (UGT)

1:28 fualo: this is a weird question too, but how exactly to closures maintain the values of local variables across calls?

1:28 I thought these local variables in the stack were destroyed

1:29 brehaut: fualo thats what 'closure' means really

1:29 a closure is not dissimilar to an object with a single method

1:30 fualo: but there is nothing in the function body that specifically says "keep this around" is there?

1:30 brehaut: the reference to the name

1:30 the compiler is able to infer that the name comes from a scope outside the function

1:30 based on what you do with that function the compiler can work out how to handle it

1:31 i dont know how detailed clojure's compiler is with regard to those sorts of optimisations but there are a lot of options available to it.

1:32 if you want to see some mind blowing stuff, have a read about what Steele's original scheme compiler did with lambdas

1:33 fualo: ha, I will

1:33 that would be interesting

1:33 brehaut: it is

1:33 dsantiago: Dumb question: When a closure is made around a local variable, does that variable stay the same every time the closure is invoked, or can it change between invocations?

1:33 brehaut: dsantiago: if its a clojure value (ie immutable) and not wrapped in a ref

1:33 then yes, it stays the same

1:34 if its a java object, then maybe not

1:34 if its a ref type, you have some fairly clear semantics about how it might change

1:34 dsantiago: Right, I'm not talking about immutables in closure specifically, I was actually wondering about other lipss in general.

1:34 brehaut: i couldnt say about lisps in general

1:34 i believe schemes variables are by default somewhat similar to clojure's 'var' reftypes

1:35 which is to say dynamically bound variables

1:35 Chousuke: locals in other lisps tend to be mutable.

1:35 fualo: Oh, I get it

1:36 it's the nested functions in a closure that give it the ability to store state

1:36 right?

1:38 brehaut: its more about there being a function defined within a scope, eg (def counter (let [c (atom 0)] (fn [] (swap! c inc))))

1:38 in that example you have a fn inside a let

1:39 (that form is sometimes known as let over lambda)

1:39 the let is defining a scope that surrounds the fn, but the fn is passed back as the result of the let expression

1:40 i dont think im helping am i?

1:41 fualo: brehaut: this is!

1:41 I am very close to understanding this

1:41 brehaut: excelent :)

1:41 its one of those concepts that is actually quite simple, but seems way more confusing than it really is till you've got a handle on it

1:41 dsantiago: http://letoverlambda.com/index.cl/guest/chap2.html#sec_5

1:41 fualo: brehaut: and I've been thinking currying was closures for ages

1:41 brehaut: fualo what languages are you coming from?

1:42 fualo: brehaut: R, Python, C, perl

1:42 some lisp

1:42 brehaut: fualo: i can only speak for Python and C. C has nothing like closure, python does although its scoping rules are a bit... curious (though you often dont get bitten by them)

1:43 python doesnt have a construction that is like let, so you would have to use another function to define the scope

1:43 fualo: so the magic of closures comes from (1) returning functions from functions and (2) lexical scoping?

1:43 brehaut: yes

1:44 although if you think about (let [a 1] (map #(+ a %) [1 2 3 4]))

1:44 the #( ) fun there is also a closure

1:44 so its more about the lexical scoping

1:45 dsantiago: excellent link

1:45 fualo: brehaut: ah, I get it

1:45 dsantiago: Yeah, answered my question, I think it's a good explanation.

1:45 fualo: it is the lexical scoping

1:45 brehaut: dsantiago: yes

1:45 fualo: thanks so much brehaut

1:45 brehaut: no worries

1:46 fualo: that is a great link dsantiago

1:46 I may have to get that book

1:46 brehaut: just dont ask me to explain continations ;)

1:46 fualo: ha

1:46 I may have to get that book

1:47 I've learned quickly that I can't learn clojure to learn FP... I have to learn FP to learn clojure (well, at least)

1:48 brehaut: fualo: it's best to learn FP in tandem with a language

1:48 fualo: yea, I am doing that too

1:48 with clojure and emacs lisp

1:48 brehaut: (better yet, languages - a lisp and an ML is ideal in my opinion)

1:48 Chousuke: Rather you can learn Clojure without knowing FP, picking up the basics, and once you have learned enough FP, you get to relearn Clojure the right way :P

1:49 brehaut: fualo: you might find a more gentle introduction to FP than Let over lambda a less punishing introduction

1:49 it gets pretty deep pretty fast

1:49 fualo: ah, good to note

1:50 I looked at The Little Schemer, but the format is... difficult

1:50 brehaut: the little schemer is a fantastic book

1:50 but its unussual

1:50 my recollection is that by the end of it you will know how to write a Y implementation

1:50 fualo: Y implementation?

1:51 slyrus: y combinator?

1:51 brehaut: The applicative order fixed point y combinator

1:51 (or some permutation of those words)

1:51 absalom: I took Robinb Popplestone's famous class on scheme.

1:52 Good class.

1:52 brehaut: fualo: http://www.dreamsongs.com/NewFiles/WhyOfY.pdf

1:52 absalom: Devoted two sessions to the gamma combinator too.

1:52 No one understood it at the end though.

1:52 brehaut: heh

1:52 Chousuke: what helped me to understand FP was thinking of code as expressing a transformation, instead of a seriers of instruction

1:52 s

1:53 absalom: Write some programs in an applicative style.

1:53 brehaut: for me it was sitting down and learning the λ calc

1:53 and writing a lazy interpreter for it

1:53 absalom: People are better at understanding things once they have a motivation for them.

1:53 brehaut: totally

1:54 callen-nyc: javascript is remarkably good at teaching people the value of closures and currying, in my experience.

1:54 the only people whom I know personally that know what currying is are js hackers :P

1:54 fualo: R has been pretty good too

1:54 brehaut: callen-nyc: it was originally a scheme derivative wasnt it?

1:54 callen-nyc: R is a little domain specific for a lot of people to stretch their wings though.

1:54 brehaut: it still is.

1:54 absalom: Hmm- maybe it is remarkably good at teaching that to a small percentage of javascript programmers.

1:54 callen-nyc: brehaut: it's just scheme + prototypes + weird types + DOM

1:54 brehaut: callen-nyc: what i meant to say is it didnt have the c family syntax

1:54 callen-nyc: absalom: I don't really care about the bottom 50%

1:55 brehaut: I don't really focus on syntax.

1:55 absalom: OK, well I was talking abiout the bottom 90% ;)

1:55 callen-nyc: syntax doesn't change how I think about a problem, semantics do.

1:55 brehaut: sure, but JS syntax is a bit of a mine field

1:55 absalom: there are a lot of javascript programmers.

1:55 callen-nyc: brehaut: you can make a turing tarpit with no alphanumerics in js.

1:55 brehaut: i wrote nothing but javascript professionally for about 2 years

1:56 callen-nyc: absalom: there are a lot of ditch diggers. I bet most of 'em are mediocre.

1:56 absalom: Yeah, well js is a weird combination of genius and idiocy.

1:56 fualo: I'm not sure now if R has closures in the same way as clojure

1:56 brehaut: function cons(h,t) { return function p(acc) { return acc(h, t); }; };

1:56 callen-nyc: absalom: luckily idiocy can be overcome but genius cannot be injected.

1:57 this is what I get for reinstalling my clojure setup, lein's completely changed.

1:57 absalom: Hmm.. if you had had to work with some of the js code I have had to fix you would not be so sanguine aboiut the idiocy, I think.

1:57 callen-nyc: absalom: I can't speak to your woes, I work for a company that has some excellent js people

1:57 I write my own, but either way.

1:57 brehaut: callen-nyc: i feel your pain

1:58 callen-nyc: brehaut: what happened to lein swank?

1:58 absalom: Javascript is basically a deeply flawed prefix Lisp.

1:58 callen-nyc: I'm bloody mad now.

1:58 brehaut: callen-nyc: no idea sorry, ive never used swank

1:58 callen-nyc: absalom: eh. no macros though. scarcely counts.

1:58 absalom: meh.. there were no macros in early lisps either.

1:58 callen-nyc: absalom: early lisps were 30 years ahead of their time

1:59 although I've seen people run js through a cpp, that hardly counts.

1:59 absalom: actually, if you really want a powerful expression of code-is-data, you want Io/Ioke/Seph

1:59 absalom: ridiculous faculties for traversing the code and making arbitrary modifications.

2:00 brehaut: callen-nyc: you can do clever things with js eval and script language="my dsl"

2:00 callen-nyc: brehaut: I'm spoiled by Io, I'm afraid.

2:00 you can monkeypatch a single operator or expression at will anywhere in your code.

2:00 you traverse it like a native data structure.

2:00 it's nuts.

2:04 absalom: sorry- my internet connection is flaky.

2:04 callen-nyc: absalom: welcome back.

2:04 absalom: you missed me waxing rhapsodic about Io :P

2:04 absalom: www

2:04 funny

2:05 callen-nyc: ?

2:05 absalom: there are limits to nostalgia

2:05 callen-nyc: does anyone know what happened to lein swank?

2:05 absalom: careful, you're in a lisp channel.

2:06 absalom: That said- never did Io.

2:06 heh ;)

2:06 callen-nyc: absalom: has the most powerful metaprogramming faculties I've ever seen.

2:06 absalom: Well, I am something of a CLer

2:06 callen-nyc: absalom: you can swap-out a single operation or expression out of any part of your code at will

2:06 absalom: you traverse it like a native data structure.

2:06 totally absurd.

2:07 absalom: And I am in fact experiencing some stage of Kuibler-Ross's formula with Cl as a parameter...

2:07 really?

2:07 brehaut: absalom: hah

2:07 absalom: Youi see that is my self-destructie nature manifesting itself...

2:08 The good lord knows that the last thing I should do is go investigate IO.

2:08 callen-nyc: uh, right then.

2:09 absalom: If I had just decided to do Java a few years ago.. but the ni suppose you must know that story.

2:10 I mean, I suppose most of the core clojure developers could have been core JBoss developers had they wanted to be so.

2:11 But I have been waiting for Lisp to win for a _long_ time.

2:12 tomoj: callen-nyc: what do you mean what happened to it?

2:13 callen-nyc: tomoj: "that's not a task"

2:13 absalom: But I am pretty much at the acceptance point with CL...

2:13 callen-nyc: absalom: "win"

2:13 absalom: oi vey. winning is making money.

2:13 tomoj: callen-nyc: do you have swank-clojure in your dev-deps?

2:13 callen-nyc: absalom: if you're making money and using tools you enjoy, nobody can fault you.

2:14 [swank-clojure "1.2.0"]

2:14 [leiningen/lein-swank "1.1.0"]

2:14 tomoj: did you run `lein deps`?

2:14 absalom: It is basicalky dead as a serious implementation language and no amount of wizard coding will bring it back.

2:14 callen-nyc: :| yes.

2:14 tomoj: get rid of the lein-swank dep, no longer needed

2:14 lein -v?

2:14 callen-nyc: tomoj: secondary desperate cargo cult measure

2:14 tomoj: not my original attempt.

2:14 Leiningen 1.2.0 on Java 1.6.0_21 Java HotSpot(TM) Client VM

2:14 tomoj: hmm

2:14 and swank-clojure's jar is in lib/dev?

2:14 callen-nyc: still not working.

2:15 swank-clojure-1.2.0.jar

2:15 absalom: Meh- ther is a limit to how much you can force an unpopular language in your subordinates before they rebel abd you get ousted.

2:15 tomoj: odd

2:15 callen-nyc: tomoj: believe it or not, I'm not incompetent, merely incredibly unlucky.

2:15 tomoj: incredibly, incredibly unlucky.

2:15 absalom: I speak from experience ;)

2:15 callen-nyc: tomoj: I bump into everything like this.

2:15 tomoj: rare apt bug? I'll trip right over.

2:15 tomoj: does `lein help` list the swank task?

2:15 callen-nyc: tomoj: unusual apache behavior? I'll be the one to drown.

2:16 tomoj: nosir.

2:16 brehaut: callen-nyc: things like that are why i'm a non-tool using primate

2:16 tomoj: maybe try swank-clojure 1.3.0-SNAPSHOT instead

2:16 you shouldn't have to.. but that's currently working for me

2:16 callen-nyc: brehaut: things like that are why I gave up on virtualenv in python-land.

2:16 [org.clojure/clojure "1.2.0-beta1"] relevant?

2:16 tomoj: no, I have that too

2:16 callen-nyc: retrying.

2:17 brehaut: callen-nyc: yup. ive found the sanest i get is a text editor, a repl and a virtualbox image for each project

2:17 callen-nyc: brehaut: no dice grandma.

2:17 absalom: The thing is that people are sonditioned to hatre lisps enough that a lisp has to have a lot of cheese to win.

2:17 callen-nyc: er

2:17 tomoj: no dice grandma.

2:17 absalom: err- conditioned to

2:18 I wonder if clojure has enough cheese.

2:18 callen-nyc: absalom: are you using cheese the way jwz did?

2:18 absalom: I mean it as the reward the mous gets if he crosses the barrier

2:19 the reward.

2:19 callen-nyc: (= your-usage jwz-style) returns true then.

2:19 absalom: C; clearly lacked cheese...

2:19 err- CL

2:20 callen-nyc: absalom: clj is attracting ruby people because of the concurrency, state containment, and speed.

2:20 absalom: For clojure to be accepted it will have to have a better pain to cheese ratio than CL...

2:20 callen-nyc: absalom: combined with relative power.

2:20 hiredman: clojurebot: bonnie is <reply>my bonnie lies over the ocean, my bonnie lies over the sea

2:20 clojurebot: c'est bon!

2:20 callen-nyc: absalom: so I'd say there's cheese for people who've been constrained by slow VMs and want a faster but still powerful lang.

2:20 tomoj: callen-nyc: your project.clj looks like this? https://gist.github.com/1d865ae756aa70d04889

2:20 absalom: Yeah, but this all looks so simple if you aare a Lisper.

2:20 brehaut: callen-nyc: that applies to python folk to i think

2:20 callen-nyc: brehaut: *coughs*

2:21 brehaut: sorry?

2:21 callen-nyc: brehaut: I know low level langs, but yeah, clojure is the best overall compromise I can come up with for what I want to do.

2:21 brehaut: I'm a professional py/django guy :P

2:21 brehaut: callen-nyc: ah right :) ive done that too

2:21 absalom: Anyway, as a professional Python programmer I can say, without fear of contradition, that Norvig is wrong. Python is not an acceptable Lisp.

2:22 brehaut: my current hobby project is rebuilding my django powered whole site in clj

2:22 callen-nyc: brehaut: on my second django/generalist job right now.

2:22 absalom: I can even tell you where he goes wrong.

2:22 callen-nyc: brehaut: I have a mini CMS that has gone from sinatra + mysql -> django + postgres -> flask + mongodb

2:22 brehaut: callen-nyc: cool :) my django/py job got crushed by the recession

2:22 callen-nyc: absalom: where?

2:22 brehaut: :(

2:22 brehaut: I work for a startup out in MV.

2:22 absalom: It is where he considers eval to be an important language feature.

2:23 brehaut: im in new zealand, its basicly a wasteland of .net shops

2:23 callen-nyc: tomoj: it wasn't dev-dependencies before, fixed that

2:23 absalom: and one that

2:23 brehaut: or (shudder) php

2:23 callen-nyc: tomoj: that still didn't fix it though.

2:23 absalom: akes python lisp=equivalent.

2:23 tomoj: so, do you have swank-clojure in lib/dev for real this time?

2:23 callen-nyc: absalom: in a very-very-very-very crude way, he's right

2:23 absalom: but not meaningfully so, making you practically speaking, correct.

2:24 brehaut: Columbus, OH is where I was before NYC / SF

2:24 brehaut: .NET wasteland too

2:24 absalom: yes, but he didn;t say "tarpit-acceptable lisp"

2:24 callen-nyc: absalom: I know, that's why I qualified my statement.

2:24 brehaut: I spent 3 years working in C# before django

2:24 absalom: yeah, zactly.

2:24 callen-nyc: brehaut: there are actually clojure shops in MV.

2:24 brehaut: (mountain view, bay area)

2:24 brehaut: callen-nyc: i became a javascript programmer because i detest C#2 so much

2:24 callen-nyc: thanks :)

2:24 absalom: I mean, I knew P Greenspun..

2:25 callen-nyc: brehaut: I'm around startup people who know what MV means too much, sorry :P

2:25 tomoj: yessir

2:25 absalom: And you, Mr Norvig, are no P Greenspun

2:25 callen-nyc: tomoj: and it's a snapshot version

2:25 still no dice.

2:25 brehaut: callen-nyc: no problem :) i only know one bay area guy

2:25 callen-nyc: tomoj: wait

2:25 tomoj: just got a java exception.

2:26 absalom: Anyway, the more I look at clojure the more I think that it might be acceptable...

2:26 callen-nyc: tomoj: NO_SOURCE_FILE:1 :P

2:26 absalom: I showed it to a java guy recently

2:26 absalom: middle-aged

2:26 absalom: he screeched at the parentheses

2:26 tomoj: what's the actual exception?

2:26 callen-nyc: absalom: I literally couldn't get him to look past those.

2:26 Caused by: java.lang.NumberFormatException: For input string: "[PORT=4005]" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)

2:26 lein swank [PORT=4005] [HOST=localhost]

2:27 absalom: Well, if you come from CL land...

2:27 brehaut: callen-nyc: my coworkers reaction to F# code is the dual 'Wheres the braces?!'

2:27 absalom: clojure has some defects.

2:27 But..

2:27 tomoj: callen-nyc: did you actually type "lein swank [PORT=4005] [HOST=localhost]" ?

2:27 callen-nyc: brehaut: I like F#, but I'm unwilling to work in Microsoft-land again.

2:27 tomoj: cargo cult. yes.

2:27 absalom: a lot of them are basically unavoidable if you targert the JVM...

2:27 callen-nyc: tomoj: feel free to swat me if this was braindead

2:27 tomoj: one would type "lein swank 4005 localhost"

2:27 absalom: Unless you want to target it with an inerpreter.

2:28 tomoj: but those are the defaults, so just "lein swank"

2:28 brehaut: callen-nyc: i have little choice about .net land, and until clojure.clr is more ready, F# is the best ive got

2:28 callen-nyc: tomoj: brilliant. trying it now.

2:28 brehaut: callen-nyc: anyway, anything is better than VBScript

2:28 callen-nyc: tomoj: socket opened. your patience is that of a saint and you are more manly than an emu. Thank you.

2:28 absalom: Anyway, even for the hardcore Cler...

2:28 callen-nyc: brehaut: friend of mine back in Columbus works in VB6 full-time

2:29 brehaut: that said, he spends very little of his week actually working.

2:29 absalom: Clojure is a lot closer than python is.

2:29 brehaut: callen-nyc: VB6 is terrible, but VBScript is actually worse

2:29 callen-nyc: brehaut: I remember.

2:29 painfully.

2:29 absalom: The other thing is that..

2:29 callen-nyc: brehaut: I'm glad most of my work was new C# dev

2:29 absalom: Cl can't change

2:29 callen-nyc: brehaut: I actually got to stay in .NET 3 most of the time.

2:29 absalom: standards blah blah blah

2:29 brehaut: .net 3+ is managable

2:29 absalom: It;s probably the best fixed spec ever made, but...

2:29 callen-nyc: brehaut: expression treeeeeeees

2:30 brehaut: callen-nyc: a moderately useful type inferencer :)

2:30 callen-nyc: also mona^H^H^H^HLinq

2:30 absalom: anyway, I have been more and more and more won over by clojure's rationale, but...

2:31 callen-nyc: brehaut: hahahaha.

2:31 brehaut: I know some die-hard microsofties

2:31 brehaut: I kept trying to explain to them that LINQ was monads expressed in ORM syntax

2:31 brehaut: they didn't bloody believe me.

2:31 brehaut: hah

2:31 absalom: As a Cler I am used to doing as lot of imperatiove progtamming, mixed with a lot of functional stuff.

2:31 brehaut: i think the smartest thing microsoft ever did was put the C# team down the hall from the F# team, and the F# team down the hall from the haskell guys

2:31 callen-nyc: brehaut: they thought monads was some ridiculous http://arsenal.theoffside.com/files/2010/04/doc-brown-300x295.jpg thing.

2:32 brehaut: yeah, MS has some good language design these days.

2:32 brehaut: the guy heading C# is sensible.

2:32 absalom: Some stuff is better modeled with mutable state.

2:32 callen-nyc: brehaut: but. I refuse to be tied to an ecosystem I can't control

2:32 brehaut: thusly, I stopped devving on my mac, and stopped working in .NET :P

2:32 absalom: some, da.

2:32 absalom: hence refs. :)

2:32 brehaut: i can imagine the haskell guys sitting there going 'wow, this is really amazing math. lets make it usable by programmers' and the F# guys going 'wow, this is really amazing haskell stuff, lets make it usable to real programmers' and the C# guys going 'wow, this is cool F# stuff, lets make it usable to real programmers'

2:33 and the VBnet net guys are just drooling

2:33 callen-nyc: tomoj: working brilliantly. I'd send you beer if I could.

2:33 absalom: Yep.. But it's syntactic overhead, at least

2:33 callen-nyc: brehaut: lmfao.

2:33 absalom: concurrency and

2:33 absalom: immutability are the only sensible defaults in the coming future.

2:33 absalom: you know this.

2:34 absalom: The problem with fuinctional programming is that in the end everything looks like a function to the fuintional programmer.

2:34 Yeah, I do..

2:34 callen-nyc: absalom: I know core FreeBSD devs who are aware of this, and they've been in C-land for like, 20 years.

2:34 absalom: well, at least I do know that I am not smart enough to manually manage concurrency.

2:34 callen-nyc: absalom: as soon as I started explaining clojure in terms of true immutability she brightened right up.

2:35 absalom: Yeah- I am doing 3D animation stuff right now and..

2:35 Hmm- actually bad example...

2:36 Bu it's a good question...

2:36 Theoretically speaking, which problems can be parallized?

2:37 err- parallelized...

2:37 brehaut: absalom: thats rather a broad question isnt it?

2:37 absalom: Clojure is a bet on "a lot"

2:37 callen-nyc: absalom: it's actually not

2:37 absalom: Indeed it is.

2:37 callen-nyc: absalom: a bigger bet on parallelism is more like haskell and map-reduce databases.

2:38 absalom: I mean if it turned out that no one cared much about parallelizing computations for consumer software...

2:38 callen-nyc: absalom: parallelism depends on the composition of the work, how much of it is computation versus data processing, and how independent the computations are.

2:38 absalom: there is no 'consumer software'

2:38 absalom: Hmm- but the whole point of mapreduce is tht i requires no language support.

2:38 callen-nyc: absalom: people are using clojure to deploy services, not desktop software.

2:38 brehaut: absalom: there are things that cant be 'parallized' that can be 'concurrent' though right?

2:38 callen-nyc: brehaut: yes.

2:39 absalom: Sure- but where is the win there?

2:39 callen-nyc: absalom: scaling

2:39 brehaut: making concurrent code composable and reasonable makes for some rather clear solutions to otherwise hairy problems

2:39 callen-nyc: absalom: independent jobs can be worked on in parallel

2:40 absalom: I mean I am mainly playing devil's advocate here, but..

2:40 callen-nyc: absalom: otherwise you'd have to work on them serially with a context switch

2:40 brehaut: absalom: figured :)

2:40 callen-nyc: absalom: which sucks.

2:40 absalom: Let me give you a great example of scaling an parallelism

2:41 I work for an animation studio right now, writing animation software...

2:41 Sometimes they need to render things

2:41 brehaut: absalom: that sounds like you are entering the embarrassingly parallel territory pretty easily

2:41 absalom: They achieve parallelism very easily: the software ios designed so that no frame depends on another.

2:42 Do they can use a process for each frame if they want.

2:42 *So

2:42 And they can break rendering up over, literally, hundreds of machines, with thousands of cores.

2:43 That is parallelism.

2:43 callen-nyc: that's because graphics are ridiculously parallel

2:44 absalom: The thing is.. we are talking about things that can be easily broken up into dicrete chunks.

2:44 callen-nyc: there's zero dependent computation frame to frame.

2:44 absalom: thank god, otherwise 3d would be a ridiculously hard problem.

2:44 absalom: it gets more complicated if you have dependencies on other computations, but...

2:44 brehaut: i cant help but think that this is rapidly devolving into an Internet Argument here (ie, violently in agreement)

2:45 absalom: sure..

2:45 I mean I just wonder to what degree this will be the case.

2:45 I think you are right that its the best ase for clojure.

2:46 brehaut: absalom: actually, clojure is turning into a pretty damn fine web back end tool too

2:46 absalom: Cause the only way I see for people to keep selling more powerful computers is more cores.

2:46 brehaut: even asside from the concurrency aspect

2:46 callen-nyc: absalom: people aren't going to use clojure for rendering, if at all, for a long time

2:46 absalom: services mate.

2:46 absalom: sure, but is it beer than CL for that?

2:46 err- better

2:46 callen-nyc: absalom: yes and no.

2:47 absalom: sbcl is pretty wicked if you annotate the types, but clojure has the potential to be faster.

2:47 absalom: I mean with hunchentoot and parenscript and JSON libs and etc...

2:47 callen-nyc: absalom: hunchentoot sucks compared to what clojure already has.

2:47 absalom: I'm sorry but come on.

2:47 absalom: Cl was without a doubt the most capable web language three years ago...

2:47 callen-nyc: absalom: I'd rather work in raw aleph than hunchentoot.

2:47 absalom: you been reading too much PG mah boy.

2:47 absalom: meh..

2:47 callen-nyc: absalom: less kool-aid

2:48 absalom: I d=never took him too seriously.

2:48 except when I read his intro book back in the 90s in school.

2:48 ANSI common lisp is a good book

2:49 No Kool-AID there..

2:49 callen-nyc: absalom: makin' me feel young.

2:49 absalom: I really believe that based on my own expereince...

2:49 callen-nyc: absalom: I was referring to essays that resuscitated CL for awhile.

2:49 absalom: working in CL-WHO and parenscript is an enlughtening esperience

2:49 And I say that as someon who ha managed some very successful sites

2:50 callen-nyc: did Norvig really say python = Lisp because of fucking eval()?

2:50 did he think eval() was novel or something?

2:50 absalom: Yeah, well I found PG less and less convincing as he went on...

2:50 callen-nyc: I'm sorry, I just find that baffling.

2:51 absalom: he's doing alright now that he's moved from programming advice to business advice.

2:51 absalom: the thing is that when I say that CL+hunchentoot +CL-WHO+parenscript was very comnpelling for me at that time it has nothing to do with Graham..

2:51 None of those things existed when he wrote beating the averages.

2:51 callen-nyc: absalom: I grok.

2:52 absalom: I figured when you started talking mid-90s

2:52 not a lot of options back then.

2:52 absalom: I had just come from several years managing websites that got millions of hits a day and were written in Java and.. pain.

2:52 callen-nyc: absalom: I had my share of battling jboss.

2:53 kinda disturbs me how hard RedHat pushes jboss.

2:53 they shouldn't be so opinionated about app infrastructure.

2:53 absalom: The sad thing is that I was the one who decided to do Java.. no one else to blame.

2:53 well, except management.

2:54 brehaut: surely its not as bad as aspnet webforms

2:54 absalom: Hmm.. nor sure, but...

2:55 it got pretty bad as nepotism added more and more contractors to the mix...

2:55 Java works pretty well if you don;t change your mind, ever.

2:55 brehaut: haha

2:55 bbl; giant (cyclopean?) pile of dishes to deal with

2:56 absalom: But actually you know John Foderaro once famously called CL a programmer amplifier...

2:56 Java was initially designed, explicitly I think, to be a programmer dampener.

2:57 brehaut: absalom: i thought the goal was to drag C++ programmers half way to lisp?

2:57 absalom: I mean you can;t look at Java 1.0 and think anything else.

2:57 Nah, that is just Guy Steele trying to verbalkly shower.

2:58 The oiujnt was that all programmers were heretofore going to be pretty equal.

2:58 err- point

2:58 No cleverness allowed.

2:58 callen-nyc: brehaut: nah. java is pretty weak in terms of power, especially early on.

2:58 brehaut: what abs said. no cleverness allowed.

2:58 brehaut: java was designed to commoditize programming/programmers

2:58 brehaut: callen-nyc: be that as it may, C++ was pretty weak in terms of sensible

2:58 absalom: exactly...

2:59 callen-nyc: brehaut: luckily? the complexity of massive java projects beat them.

2:59 brehaut: haha

2:59 kaiwren: brehaut: They got a quarter way there when IntelliJ first came out. Java is barely manageable only with an AST IDE. Ditto C#.

2:59 absalom: but at least you can be crazy productive in C++ if you are ohne of the ten guys in the world who actually understands it.

2:59 kaiwren: But any language benefits from an AST IDE.

2:59 callen-nyc: absalom: I know some competent C++ people

2:59 absalom: they establish known patterns of working, and *STICK TO THAT*

3:00 absalom: Sure.. competent.

3:00 callen-nyc: absalom: I mean, they work fast.

3:00 absalom: I know some people qho can make C++ look like Lisp...

3:00 callen-nyc: absalom: as do I.

3:00 absalom: err- well maybe one, actually.

3:00 callen-nyc: absalom: guy I know works in signal processing and some other things

3:00 absalom: dude's a master of qt and boost.

3:01 absalom: But template meta-programming is a rather bad analogue for macros.

3:01 Equivalent, but...

3:01 callen-nyc: absalom: everything in C++ has to be quite static.

3:01 absalom: So the point of Java 1.0 was to make all programmers the same.

3:01 callen-nyc: absalom: templates are a space/time trade-off

3:02 absalom: guess which one they chose to axe? :P

3:02 absalom: Within a certain delta.

3:02 callen-nyc: absalom: that might explain why yegge emphasized typing speed so much

3:02 absalom: within that certain delta, WAM matters :D P

3:02 :P

3:02 absalom: meh- yegge was sort of right about that I think...

3:03 Not that you would know it fomr my typing, but..

3:03 I hate laptop keyboards...

3:03 callen-nyc: absalom: I work at a dual-display + desktop mouse/keyboard hooked into a laptop

3:04 absalom: honestly, I type quite fast on my laptop, but I do it rarely for programming.

3:04 absalom: Even if you only keep 60 lines a day you probably type thousands getting there.. not being able to type introduces pathilogies.

3:04 err- pathologies

3:04 as for spelling...

3:04 callen-nyc: absalom: I do spend a lot of time hacking in a repl

3:04 absalom: typing speed helps, but history recall helps more.

3:04 absalom: But my point is that Java was meant to keep you from being clever..

3:04 But that didn;t work...

3:05 People started leaving Java for clearly worse engineered things like Python...

3:05 callen-nyc: absalom: 'worse'

3:05 absalom: So they started adding cleverness to Java...

3:05 callen-nyc: absalom: at the VM level, sure. at the language level, Python is pretty tolerable.

3:05 nteon: absalom: what do you mean by worse engineered?

3:05 absalom: But since Java was initially designed to prohibit cleverness...4

3:06 Can you write a compiler that will compile all legal Python code to something efficient?

3:06 No, of course not...

3:06 callen-nyc: absalom: PyPy ++ RPython

3:06 absalom: the JIT is making a lot of progress

3:06 absalom: Lisp/Clojure aren't perfectly static/able to be compiled down either

3:07 absalom: it's the trade-off you choose to make up-front.

3:07 absalom: Does CPython have reasonable garbage collection?

3:07 Yeah, but why make an unnecessary tradeoff?

3:08 Python is ad-hoc.

3:08 brehaut: absalom: CPython has a fairly standard refcount system. releases memory early, slows stuff down a bit

3:08 callen-nyc: absalom: unnecessary?

3:08 absalom: what do you think you're coding in with clojure exactly?

3:08 absalom: I men, if it weren't I wouldn't be in this channel. I would stick with Python.

3:08 callen-nyc: absalom: it's a dynamic type system

3:08 absalom: it has similar performance limitations as python, but with some edges over it + running on the JVM

3:08 absalom: meh.. let's talk about a tale of two pythons...

3:09 callen-nyc: you sound drunk.

3:09 nteon: haha

3:09 callen-nyc: or sleep deprived.

3:09 absalom: the first python was a compiler developed at CMU...

3:09 nteon: \quit

3:09 bah

3:09 absalom: hmm- do you not sdee aht I am getting at cullen?

3:10 callen-nyc: absalom: you seem to be finding the liquor cabinet just fine

3:10 :P

3:10 absalom: Python was developed in an ad-hoc manner that makes it almost impossible to compile it to efficient code.

3:10 callen-nyc: the ad-hoc nature isn't all that relevant to its performance limitations.

3:10 it's a far more structured and disciplined language than ruby.

3:10 absalom: Perhaps..

3:11 But I tend to put them in pretty much the same category.

3:11 callen-nyc: it's just a sequence of decisions that led to a whole language, upon which there is a determinable set of performance limitations given known runtime technologies.

3:11 absalom: Thouh of course Ruby's implementation is terrible...

3:11 callen-nyc: I repeat, Clojure is dynamically typed and is a JVM language, it can't be "compiled down" any more than python can.

3:11 absalom: it's improved greatly, of late.

3:12 absalom: ruby 1.9 put it on par with the best of python.

3:12 it continues to improve in performance more quickly than python, in fact.

3:12 CPython is a reference implementation. period.

3:12 if you want fast, use pypy-jit

3:12 absalom: Clojure is derived fron a series of languages that were designed to be compiled to efficient machine code.

3:13 callen-nyc: absalom: if that were the case it wouldn't be dynamically typed and it wouldn't be on the JVM

3:13 absalom: I think you're misconstruing something.

3:13 absalom: You really need to go back and look at the history of Lisp cullen.

3:13 CL, for instance, was never statically typed.

3:14 callen-nyc: absalom: you know nothing about me

3:14 really, nothing.

3:14 absalom: But one of the explicit goals of the standardization process was to some up with a language that could be compiled to efficient native code.

3:14 callen-nyc: absalom: and it's rude for you to suggest I need to go read some eldritch material just because it satisfies your hipster obscurity ethic.

3:14 absalom: I'm done with this conversation, please sober up.

3:14 absalom: meh...

3:16 It's rude of you to insist that people who correct your misonceoptions are being rude to you.

3:17 callen-nyc: absalom: you know nothing of what I know. Stop.

3:18 absalom: It is certaily true that it was an explicit goal of the designers of CL that CL be comilable to reasonably efficient machine code. That is just a statement of fact, and you can discover it if you go back and look at the documents.

3:19 Many of the design decisions made during the standardization process were made for that reason.

3:20 That CL is dynamically typed is not particularly material.

3:53 daaku: technomancy: thanks for building lein int!

4:31 callen-nyc: how would I go about expressing arity and slicing programmatically?

4:31 like python's [] slicing syntax.

4:37 tomoj: is that two separate questions?

4:37 or does python's [] slicing syntax express arity programmatically?

4:38 callen-nyc: tomoj: indirectly, in terms of how clojure seems to use arity.

4:38 tomoj: you may consider it two different questions if it makes it easier for you to answer.

4:39 tomoj: I don't understand either question then :)

4:39 callen-nyc: tomoj: rephrase

4:40 tomoj: [element0, element1, element2, element3][0] returns element0

4:40 tomoj: does (fn [a b]) express arity, but not "programmatically"?

4:40 callen-nyc: tomoj: yes.

4:41 tomoj: I'm sending something a list, I want to fetch an arbitrary selection from the list without expressing manual arity like

4:41 [obj1 obj2 obj3]

4:41 tomoj: manual arity?

4:41 callen-nyc: [0, 1, 2, 3, 4, 5][:3] returns [0, 1, 2] in python

4:41 tomoj: you must speak a different language than I :(

4:42 callen-nyc: okay lets go ahead and pass on arity.

4:42 and ignore the pattern matching.

4:42 slicing.

4:42 see the python slice above?

4:42 howdoidothat?

4:42 tomoj: -> (subvec [0 1 2 3 4 5] 0 3)

4:42 sexpbot: => [0 1 2]

4:43 callen-nyc: subvector I take it that means? thank you.

4:43 too bad I can't make that into a reader macro :P

4:43 clojure.lang.ArraySeq cannot be cast to clojure.lang.IPersistentVector

4:43 brehaut: callen-nyc: nth is the equivalent of the index i believe

4:44 tomoj: subvec only works on vectors

4:44 callen-nyc: tomoj: re-split returns lists :(

4:44 brehaut: callen-nyc: or get if you have a vector

4:44 tomoj: -> (take 3 [0 1 2 3 4 5])

4:45 sexpbot: => (0 1 2)

4:45 callen-nyc: take 3 works

4:45 for a list without needing to cast, that is.

4:46 thankee. :)

4:51 tomoj: -> (class (seq (into-array [1 2 3])))

4:51 sexpbot: => clojure.lang.ArraySeq

4:51 tomoj: things that look like lists often aren't lists :(

4:52 callen-nyc: bwaha.

4:52 I fixed ellipsize.

4:52 bloodying annoying the way Halloway wrote the example

4:52 had a space between the ellipsis and the final word.

4:52 fixed :P

4:53 (trivial I know)

4:54 defn: hey all

4:54 * defn prays for Runa to call him

4:55 callen-nyc: defn: hahahaha. HN reader identified.

4:56 defn: callen-nyc: :X

4:56 callen-nyc: defn: nice name.

4:56 defn: I work for a company that's in walking distance of Runa.

4:58 defn: callen-nyc: cool. My name IRL is Devin -- I actually had defn before I started messing with clojure

4:58 callen-nyc: defn: I'm sure a few educated guesses would suss my name out.

4:58 defn: :)

4:58 nice use of the word suss

4:58 i need to use that more often

4:58 callen-nyc: defn: nutty parents, loved words.

4:59 defn: callen-nyc: I'm almost definitely not qualified to work for Runa, but God would it be a great opportunity to dig in deep and cut off my friends and family for a year or so

5:00 callen-nyc: defn: where are you now?

5:00 defn: Wisconsin :\

5:00 callen-nyc: defn: I have an ex-girlfriend I still talk to out there.

5:00 defn: I did the cut-off thing about two years ago, NYC was a part of that.

5:00 somnium: defn: ever been to/driven through Beloit?

5:00 defn: hopefully she doesn't have the same name as my girlfriend

5:00 callen-nyc: defn: kinda don't miss them anymore, kinda wish I settle too.

5:00 defn: somnium: yes

5:00 callen-nyc: defn: I sincerely doubt you would be foolish enough to date this woman.

5:01 somnium: defn: cool, I went to school there

5:01 defn: Beloit College?

5:01 somnium: yeah

5:01 defn: Can you loan me a few grand?

5:01 somnium: heh

5:01 defn: :D

5:01 I almost went to Beloit College, but the artsy emo kids made me want to stick my hand in a wood chipper

5:02 that, and it was insanely expensive

5:02 somnium: its gone up I here

5:02 callen-nyc: lmao.

5:02 somnium: I graduated 2003

5:02 defn: I think it's something like 34k or something per semester

5:03 somnium: they used to give away a lot of scholarships

5:03 callen-nyc: egads.

5:03 defn: yeah they still do actually -- i could have competed for one of them, but I would have been forced into an area of study

5:03 they have a massive endowment

5:04 Which admittedly may have been a better plan seeing as I dropped out of college

5:04 callen-nyc: ...did something change about the ^ reader macro?

5:04 * callen-nyc high fives defn

5:04 callen-nyc: defn: I left after a single quarter ;)

5:04 defn: callen-nyc: yeah I think that's deprecated callen-nyc, or at least, it's going to be

5:05 callen-nyc: defn: I'm definitely raising a reader exception trying to use it.

5:05 what's the bloody meta macro now?

5:05 defn: (meta)

5:05 :)

5:05 callen-nyc: okay so there is none.

5:05 frick.

5:05 defn: are you on 1.2.0-RC1

5:05 callen-nyc: let's consult Mr. project.clj...

5:05 -beta1

5:05 somnium: there never was a meta macro

5:06 defn: what am i thinking of

5:06 callen-nyc: ^blah

5:06 defn: i thought ^ was once upon a time the meta macro

5:06 callen-nyc: ...yeah me too.

5:06 it was in 1.0 I thought.

5:07 has this been deleted from everyone's collective memory like a b horror movie?

5:07 somnium: that puts meta data on symbols at read time, not the same as (with-meta)

5:07 defn: yeah I'm sure of it because I got a lot of warnings throughout 1.1.0 as a result of ^ in libs I was using

5:07 ahh somnium sure

5:07 ,^{:a 1 :b 2} [1 2 3]

5:07 clojurebot: [1 2 3]

5:08 defn: ,(meta ^{:a 1 :b 2} [1 2 3])

5:08 clojurebot: {:a 1, :b 2}

5:08 defn: ,(with-meta ^{:a 1 :b 2} [1 2 3])

5:08 clojurebot: java.lang.IllegalArgumentException: Wrong number of args (1) passed to: core$with-meta

5:08 defn: oopsie-daisies

5:09 ,(with-meta ^{:a 1 :b 2} [1 2 3] {:tags "vector"})

5:09 clojurebot: [1 2 3]

5:09 defn: ,(meta (with-meta ^{:a 1 :b 2} [1 2 3] {:tags "vector"}))

5:09 clojurebot: {:tags "vector"}

5:09 * defn starts to confuse himself

5:09 callen-nyc: you've lost me.

5:10 defn: callen-nyc: http://clojure.org/metadata

5:10 callen-nyc: defn: that's all well and good, I knew that

5:10 somnium: its come up before, the disparity between ^ and (with-meta ...), Im sure there's more than one example in the logs

5:11 callen-nyc: defn: it's just that when I first learned Clojure, 1.0 prevailed and ^ worked as a reader macro for (meta )

5:11 defn: somnium: indeed

5:11 callen-nyc: yeah that's changed, now you use ^ like with-meta, and you use (meta) to return the metadata on the object

5:12 somnium: correct that if it's spotty please -- it's 4:00 AM :)

5:12 callen-nyc: yeah I'm not following. I'll have to hash it out in my swank repl.

5:12 I'm looking at the doc for with-meta and meta, I see nuhzink that would indicate ^ would be useful/necessarty

5:13 somnium: my understanding, which may be outdated, was that ^ is for type hints, and (with-meta ...) is for application-level metadata

5:14 Lajla: ->{:key (+ 1 2)}

5:14 sexpbot: => {:key 3}

5:14 defn: somnium: that is sounding closer to the truth, but I specifically remember refactoring some code to use (meta) instead of ^obj

5:14 Lajla: ->(eval {:key (list '+ 1 2 3)})

5:14 sexpbot: java.lang.SecurityException: Code did not pass sandbox guidelines: (#'clojure.core/eval)

5:14 somnium: although people still do (ns ^{:doc "blah blah" blah ...})

5:15 for "constant metadata" I guess, though now Im inventing terms

5:15 Lajla: Lacous Somniorum

5:15 Somnium, esne somians?

5:15 defn: bah humbug to ns metadata

5:16 callen-nyc: defn: sounds like global state vars to me.

5:17 defn: I think it's just being "fancy". No need for frills on an NS macro.

5:18 tomoj: clojure-mode doesn't like ns metadata

5:18 therefore I don't like ns metadata

5:19 somnium: all hail clojure-mode

5:19 defn: Long live the Mode.

5:19 callen-nyc: hahahaha. major modes in emacs dictating programming practices.

5:19 I'm guilty of the same in js :P

5:20 defn: http://clojure-log.n01se.net/date/2009-09-29.html#i43

5:20 rhickey: manic12: not necessarily, the point of deprecating ^ was so that it could replace #^

5:21 callen-nyc: asdfsdf. I knew it.

5:21 also, #^ isn't working either.

5:23 tomoj: -> (meta ^{} [])

5:23 sexpbot: => nil

5:23 tomoj: -> (meta ^{} ())

5:23 sexpbot: => nil

5:23 tomoj: oh, hmm

5:23 (meta ^{} ()) is {:line 1} for me

5:24 somnium: ,(meta ^String ())

5:24 clojurebot: {:tag java.lang.String}

5:24 callen-nyc: , ^String

5:24 clojurebot: EOF while reading

5:25 callen-nyc: ,#^String

5:25 clojurebot: EOF while reading

5:25 callen-nyc: ,(meta String ())

5:25 clojurebot: java.lang.IllegalArgumentException: Wrong number of args (2) passed to: core$meta

5:25 callen-nyc: ,(meta ^String ())

5:25 clojurebot: {:tag java.lang.String}

5:25 callen-nyc: ,(meta #^String ())

5:25 clojurebot: {:tag java.lang.String}

5:25 callen-nyc: ...okay?

5:31 defn: ,*clojure-version*

5:31 clojurebot: {:interim true, :major 1, :minor 2, :incremental 0, :qualifier "master"}

5:32 defn: callen-nyc: what are you looking to do

5:34 callen-nyc: sleep, in a moment.

5:34 defn: callen-nyc: heh

5:35 callen-nyc: can you go tell Runa to hire me when you wake up?

5:35 callen-nyc: I'm still in NYC, haven't moved to Mountain View yet

5:35 work from home.

5:35 defn: ah, can't say who you're working for?

5:35 callen-nyc: hahaha. not publicly in IRC ;)

5:39 defn: :)

5:39 callen-nyc: defn: I'm racking out. Later.

5:39 defn: callen-nyc: good talking to you, tell those Runa dudes I said hello :)

8:55 pdk: (doc iterate)

8:55 clojurebot: "([f x]); Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects"

8:58 pdk: (doc char?)

8:58 clojurebot: "([x]); Return true if x is a Character"

9:03 serp_: ,(take 5 (iterate inc 1))

9:03 clojurebot: (1 2 3 4 5)

9:09 Lajla: ->(take 5 (iterate #(* % %) 2))

9:09 sexpbot: => (2 4 16 256 65536)

9:28 * raek just realized that you don't have to use namespace qualified keywords when not using the default hierarchy

9:29 raek: ,(derive :c :p)

9:29 clojurebot: java.lang.AssertionError: Assert failed: (namespace parent)

9:30 raek: ,(derive (make-hierarchy) :c :p)

9:30 clojurebot: {:parents {:c #{:p}}, :ancestors {:c #{:p}}, :descendants {:p #{:c}}}

9:33 pdk: (let [myfn (fn [x] (lazy-seq (cons x (myfn (inc x))))] (myfn 1))

9:33 ,(let [myfn (fn [x] (lazy-seq (cons x (myfn (inc x))))] (take 5 (myfn 1)))

9:33 clojurebot: Unmatched delimiter: ]

9:33 pdk: ,(let [myfn (fn [x] (lazy-seq (cons x (myfn (inc x)))))] (take 5 (myfn 1)))

9:33 clojurebot: java.lang.Exception: Unable to resolve symbol: myfn in this context

9:33 pdk: bah

9:34 is there a way to define a function in a let block that's recursive but not tail recursive

9:34 aside from just making it its own helper function with an obscure name or something

9:35 raek: pdk: I know of two ways: (fn my-fn [x] ...) gives a name to the function itself, (letfn [(myfn [x] ...]) combines this with let

9:36 pdk: hmmm

9:36 raek: ,(fn foo [] foo)

9:36 clojurebot: #<sandbox$eval500994$foo__500995 sandbox$eval500994$foo__500995@12f9b2e>

9:36 pdk: the way with just fn my-fn might involve changing less code though is it considered bad practice in light of letfn

9:36 ,(let [myfn (fn myfn [x] (lazy-seq (cons x (myfn (inc x)))))] (take 5 (myfn 1)))

9:36 clojurebot: (1 2 3 4 5)

9:36 pdk: \o/

9:36 cool beans

9:37 raek: either that or the letfn version is fine, I think

9:38 ,(letfn [(myfn [x] (lazy-seq (cons x (myfn (inc x)))))] (take 5 (myfn 1)))

9:38 clojurebot: (1 2 3 4 5)

9:38 raek: not a very big difference

10:19 pdk: when you curry a function with partial are the provided arguments evaluated every time the curried function is called or just evaluated once and memorized in the function for each time you call it

10:19 say if i have (first x) or something like that as one of the provided arguments to the curried function and i don't want it to be the same value forever

10:21 (doc partial)

10:21 clojurebot: "([f arg1] [f arg1 arg2] [f arg1 arg2 arg3] [f arg1 arg2 arg3 & more]); Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args."

10:26 pdk: hmm

10:26 probably shouldn't count on %1 %2 etc working in partial forms

10:33 gerryxiao: slime git not work now?

10:34 i got connection refused error

10:35 git.boinkor.net[0: 2001:858:745:a0e4:200:1aff:fe19:d355]: errno=Connection refused

10:35 fatal: The remote end hung up unexpectedly

10:36 any ideas?

11:20 raek: I'm doing some Scheme now and I've started to miss Clojure's ability to do destructuring in let

11:20 does Scheme have something similar?

11:21 gfrlog: doesn't clojure have a built-in queue data structure hiding somewhere?

11:21 raek: gfrlog: clojure.lang.PersistenQueue

11:21 qbg: raek: The implementation may have a version of DESTRUCTURING-BIND

11:21 gfrlog: thanks

11:22 raek: qbg: doesn't look like it in my case. (i'm using dr scheme)

11:22 qbg: ,(into clojure.lang.PersistentQueue/EMPTY [1 2 3])

11:22 clojurebot: #<PersistentQueue clojure.lang.PersistentQueue@6b58d153>

11:22 gfrlog: so there aren't any clojure.core functions for it?

11:22 qbg: PLT Scheme/Racket is full of stuff, so there must be something somewhere

11:22 raek: yes, conj, peek and pop

11:23 gfrlog: this leads to a more general question regarding efficiency...if I use general seq functions a such a class, will it retain the efficiency characteristics of the original class, or might it end up morphing into a linked list or something?

11:23 raek: ,(let [q (into clojure.lang.PersistentQueue/EMPTY [1 2 3])] [(seq (conj q 4)) (peek q) (seq (pop q))])

11:23 clojurebot: [(1 2 3 4) 1 (2 3)]

11:24 raek: the sequence functions return sequences, so yes, you cannot do e.g. append to the back on vectors after you have got a seq on it

11:25 the functions that returns a data structure of the same kind are listed on the data structures page on clojure.org

11:25 qbg: thanks anyway, will continue to look

11:28 gfrlog: raek: thanks

11:53 Bahman: Hi all!

11:55 gfrlog: hi

11:56 ,(let [tell-bahman-hi #(println "Hi Bahman!")] (tell-bahman-hi))

11:57 clojurebot: Hi Bahman!

11:57 Bahman: gfrlog: Hello there! Weird way to say Hi however I liked it :-)

11:57 gfrlog: on second thought I would have had him use "Bahman: hi!"

11:58 bozhidar: gfrlog: you might have skipped the let part though ;-)

11:58 gfrlog: oh certainly, but I wanted to give the function a name

11:58 ideally I would use (defn tell-bahman-hi ...) but clojurebot would have glared

12:00 bozhidar: gfrlog: fair is fair

12:02 gfrlog: ,((fn [x] (list x (list (quote quote) x))) (quote (fn [x] (list x (list (quote quote) x)))))

12:02 clojurebot: ((fn [x] (list x (list (quote quote) x))) (quote (fn [x] (list x (list (quote quote) x)))))

12:08 qbg: ,(symbol (apply str (reverse "eval")))

12:08 clojurebot: lave

12:08 qbg: ,(symbol "eval")

12:08 clojurebot: eval

12:08 qbg: ,(resolve (symbol

12:08 clojurebot: EOF while reading

12:08 qbg: ,(resolve (symbol "eval"))

12:08 clojurebot: #'clojure.core/eval

12:09 qbg: ,((resolve (symbol "eval")) '(+ 2 2))

12:09 clojurebot: 4

12:09 qbg: Uh oh...

12:16 gfrlog: ,((resolve (symbol "eval")) '(def gfrlog "glaven"))

12:16 clojurebot: DENIED

12:16 gfrlog: ,eval

12:16 clojurebot: #<core$eval clojure.core$eval@9524c6>

13:19 raek: ,((resolve (symbol "eval")) (list (symbol "def") 'raek-was-here "hello"))

13:19 clojurebot: #'sandbox/raek-was-here

13:20 raek: *evil grin*

13:20 ,raek-was-here

13:20 clojurebot: "hello"

13:21 raek: ->((resolve (symbol "eval")) (list (symbol "def") 'raek-was-here "hello"))

13:21 sexpbot: java.lang.SecurityException: Code did not pass sandbox guidelines: (#'clojure.core/resolve)

13:29 jstirrell: /msg nickserv identify giovanni

13:29 as

13:30 damn i suck at irc

13:46 technomancy: oh snaaaap!

13:47 gfrlog: it's okay, to everyone else it looked like "********"

13:48 * technomancy logs in using "hunter2"

13:48 maravillas: heh

15:25 arohner: sigh. Why did Sun decide that Integer and String should be final?

15:27 qbg: String being final means you can't (without using reflection) violate invariants it imposes

15:28 arohner: yes, but there are nice things you can do with subclassing, without changing the behavior at all

15:28 qbg: The class library depends on String's behaviour, so that is enforced.

15:29 kotarak: Oh magic #clojure channel with thy infinite wisdom and knowledge! What might be the name and the author of the paper looking into the comparison operators, which clojure's = follows as far as I know? (Something with equal? equiv?)

15:29 qbg: egal

15:29 By Baker IIRC

15:29 kotarak: Ah. Thank thou, magic channel.

15:33 Here the link FWIW: http://home.pipeline.com/~hbaker1/ObjectIdentity.html

16:06 tomoj: oh, I figured out why clojure-mode doesn't like ns metadata

16:06 it's looking for #^ and not ^

16:06 if you add a ? after the # on line 703, it works fine

16:08 LauJensen: tomoj: technomancy is still maintaing that right?

16:08 tomoj: dunno

17:06 lozh: tomoj: raek put some fixes for that in his branch of clojure mode in the last couple of days

17:13 tomoj: cool, thanks

17:26 rubydiamond: anybody uses safari books online service

17:34 kencausey: rubydiamond: I used to, what do you want to know?

17:34 rubydiamond: kencausey: how is it

17:35 kencausey: It's pretty good, it all depends on whether they have books you value.

17:35 I dropped it primarily to save money but also because in a way I've outgrown the library, I'm a little too far out on the bleeding edge for publishing now.

17:37 rubydiamond: hmm

17:37 kencausey: I suggest you browse the library and decide whether you can find at least 20-30 books you think you might want to reference in the next year

17:37 rubydiamond: kencausey: if i buy $10 month a plan, does it mean I can access all the books

17:38 kencausey: okay..

17:38 kencausey: Not really, you add a book to your library, it must stay there 30 days, taking up a slot

17:38 and you have a limitted number of slots

17:38 where do you see a $10 a month plan?

17:39 I kept it as long as I did partially because I had a grandfathered 14.95 rate for what is now 22.99

17:39 rubydiamond: kencausey: there is one with 5 slots $10 a month

17:40 kencausey: link? I know that used to have that but I don't see it on the site now

17:40 s/that/they/

17:40 sexpbot: link? I know they used to have they but I don't see it on the site now

17:40 kencausey: thanks but no thanks sexpbot

17:41 rubydiamond: Basic Starter - 5 slot Bookshelf

17:41 it's $9.99 per month

17:42 kencausey: that sounds right, but I don't see it anywhere anymore

17:42 rubydiamond: hmm

17:42 I can see it

17:42 kencausey: on https://ssl.safaribooksonline.com/subscribe ?

17:43 rubydiamond: kencausey: suppose I have 5 books in my slot

17:43 can i change atleast one of them to other ones

17:43 kencausey: each one will have a 30 day countdown from the moment add it

17:43 s/add it/you add it/

17:43 sexpbot: each one will have a 30 day countdown from the moment you add it

17:43 kencausey: until that timer counts down, it can't be removed from the slot

17:44 rubydiamond: kencausey: that's bad

17:44 there are folders too

17:44 kencausey: I rarely found it a problem in practice, but I had 10 slots

17:44 I think the folder don't change anything, they are just organizational tools

17:44 The really only relate to those users with more slots

17:45 I suggest you go with the free trial though and decide for yourself

17:45 I didn't fiddle with it much in the last year or so, it's possible something has changed and I did not realize it.

17:45 rubydiamond: hmm

17:46 okay... slots concet is not that good

17:47 concept*

17:47 kencausey: well, they can'

17:47 t complete kill their print business yet ;)

17:47 $43 a month for total free access doesn't seem unreasonable to me

17:48 that's like 1.5 books a month, maybe

17:48 rubydiamond: kencausey: right

17:48 * rubydiamond time to sleep

17:48 rubydiamond: thanks kencausey

17:49 kencausey: sure

18:55 fielcabral: Hello #clojure peeps. I'm a java programmer learning clojure.

18:56 brehaut: hi fielcabral

18:56 fielcabral: hi brehaut

18:58 danlarkin: hi fielcabral

18:58 fielcabral: hi dan larkin

19:11 tomoj: slyrus: so how do you use the json.clj parser?

19:12 defn: hello

19:12 fielcabral: hi defn

19:12 tomoj: oh, got it

19:13 raek: clojure.contrib.json?

19:13 clojurebot: clojureql is http://gitorious.org/clojureql

19:14 tomoj: (:product @(:result ((<document>) (h/make-state "{\"foo\":\"bar\"}"))))

19:14 :/

19:22 dash: ok so i just watched _Are We There Yet?_ and all I can say is "it's about time somebody said this stuff"

19:24 what should I read next? :)

19:36 defn: dash: I think I've watched that lecture like 8-9 times :\

19:36 dash: oh?

19:37 defn: dash: I have a mess of stuff for you to check out

19:37 In fact (makes a todo) I'm going to post a huge backlog of all the links I have with some descriptions, but in the meantime:

19:38 dash: http://delicious.com/thinkpaste/clojure

19:38 that's all of my clojure stuff to-date

19:38 fielcabral: dash what is "are we there yet?"

19:38 defn: fielcabral: http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey

19:39 fielcabral: thank you

19:39 defn: yw

19:43 flintf: dash: I've been watching the full disclojure series and finding them to be pretty good

19:45 dash: flintf: url?

19:46 flintf: dash: http://vimeo.com/channels/fulldisclojure

19:46 dash: ah, so just language tutorials.

19:47 (disclaimer: I am a Python hacker looking for ideas to steal.)

19:47 flintf: ah, still you might find some good stuff in there

19:51 fielcabral: See you later guys.

19:55 ihodes: got a little typo to (?) report: on http://clojure.github.com/clojure/clojure.string-api.html under Overview, (ns your.namespace.here

19:55 (:require '[clojure.string :as str])) is there; but there should be no apostrophe before the [clojure.string...

19:59 brehaut: dash, you would probably get a lot of mileage about of reading about clojure's sequence library and seeing how you could use similar ideas with itertools

19:59 dash: brehaut: Nah, that's hardly interesting

19:59 it's the ideas about value, state, identity, and time that are interesting.

19:59 brehaut: dash: each to their own then :P

20:00 but sequence is an important abstraction there!

20:00 dash: brehaut: oh?

20:00 brehaut: a sequence is not just a data structure

20:00 you could concievably have (for example) a sequence of mouse possitions over time

20:01 dash: ok, so if it's not just a data structure, what else is it

20:01 brehaut: purely mechanically its basicly just an interface. similar to iter in python

20:01 ihodes: seq is an API in clojure

20:02 a seq needs to implement 'rest' 'first' and 'cons'

20:02 dash: sure, what i've read about clojure's interfaces has been quite nice

20:02 ihodes: sorry–i'm probably stepping into a conversation that goes way back before i entered the room

20:02 brehaut: ihodes: not really

20:03 dash, sequences allow you to take something that would be loopy or iterative and break it down into its fundamental computational parts

20:03 lancepantz_: dnolen: you around?

20:04 brehaut: dash: the same as iterators do in oo langs. learning about how you can compose sequence manipulations is really powerful and applicable to a wide variety of languages

20:08 raek: actually, seqs don't implement cons...

20:09 modulo some technicalities, first and rest is the whole interface

20:10 sequences do what iterators do in other languages, but does not have the flaw that they mutate

20:10 dash: brehaut: sure. but like you said, python already has that

20:10 * raek reads some more lines upwards

20:10 brehaut: dash yes im quite aware, but you were asking for ideas you could steal right?

20:10 dash: brehaut: and you're not missing much, i just got here myself :)

20:11 brehaut: sure, but i want clojure's _good_ ideas

20:11 like persistent data structures and concurrency and such-like. )

20:11 :)

20:11 raek: making iterators immutable is one of clojure's best ideas

20:11 dash: yep.

20:12 brehaut: raek: yes definately

20:12 dash: I think there are ways that the epochal time model can be combined with an object-oriented language.

20:13 raek: there's nothing that's in the way of implementing that model in a class-based system

20:13 dash: well. i'm not even talking about classes, particularly.

20:13 raek: it's just that the standard libraries are built with mutable objects in mind

20:14 I was going to write object oriented, but when adhering to the epochal time model, I don't know if I would consider it object oriented anymore :)

20:15 dash: raek: well, there's a language called E

20:15 raek: maybe we will talk about Epochal Oriented Programming in the future..

20:15 * raek looks up E on wikipedia

20:15 dash: it both has a principled model of time and concurrency _and_ is object oriented :)

20:15 http://erights.org/

20:16 jave: is there some triple-store with clojure bindings?

20:16 dash: and, not surprisingly, has a good set of persistent data structures

20:17 raek: a solid foundation for great ideas...

20:17 dash: so... basically i am contemplating a variant of python where the literals produce immutable lists/maps :)

20:18 raek: hrm, there is tuple-list, set-frozenset, dictionary-____

20:19 ok, maybe tuples aren't considered to be immutable lists

20:20 python has gone some of the way by providing immutable data structures with value semantics

20:20 it's great to be able to have, for example, sets as keys in dictionaries

20:21 *frozensets

20:21 I like your idea. python is my second favorite programming language... :)

20:24 dash: raek: yes, lack of immutable maps is the killer

20:26 raek: also, is there any way of "updating" python's tuples and frozensets (in a persistent manner)?

20:27 I guess you can do splicing as with string...

20:27 (also, +1 for immutable strings...)

20:27 or should I say, "inc"

20:29 dash: raek: what's the difference between "updating" and making a new one? :)

20:29 raek: I was thinking about making a new one that shares structure with the old one

20:30 i.e. don't copy everything

20:30 dash: oh

20:30 implementation detail! ;)

20:31 raek: well, one of the neat things with persistent datastructures is constant time updating

20:31 dash: sure

20:31 but you can go back and implement that whenever you like :)

20:32 raek: clojure's data structures are actually pretty simple

20:32 dash: sure

20:33 raek: I recommend reading http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/ and peeking into the source code

20:35 anyway, it's amazing that persistent data structures practically can promise the same time complexity as mutable ones

20:35 dash: mostly my interest here is driven by working on a large scale python project and having to deal with the uncertainty promulgated by a big mess of mutable global state

20:35 raek: yeah i'm mostly familar with older techniques like trailers and so forth

20:36 raek: I've heard about the Global Interpreter Lock

20:37 dash: yeah that's just an optimization introduced because they didn't want unsynchronized access to dicts

20:38 and lists, etc

20:38 Anyway that's not a concern for me, our app is single threade.

20:38 d

20:38 brehaut: dash did you see the comments GvR made about CSP stuff and future pythons ?

20:39 dash: yes, it's rather depressing

21:00 aah, and rich hickey's amazon bookshelf lists _Lisp in Small Pieces_

21:00 awesome.

21:06 defn: raek: nice reading material

21:06 thanks for that link

21:32 raek: indentation and font-lock to the people

21:32 http://github.com/raek/clojure-mode/commits/master

21:33 good night

21:33 danielfm: nice!

21:50 defn: ooh ahh

22:27 technomancy: is test! a decent name for a lein task that cleans and fetches deps before running the tests?

22:27 Antoine de Saint-Exupery would hate it, but I'm thinking about adding it to the next lein.

22:34 defn: Antoine de Saint-Exupery was a sap.

22:35 lancepantz_: technomancy: i think it would make sense as an option to the test task

22:43 defn: http://feeds.feedburner.com/jobsrubynow?format=xml -- could someone tell me how to parse this?

22:44 duck1123: Hey guys. Is Clojure still finicky about running with custom classloaders? I wrote an Openfire plugin using Clojure, but when I try to load it, I get an error that it can't find clojure/core.clj on the classpath

22:44 defn: im trying to do: (parse (slurp "http://feeds.feedburner.com/jobsrubynow?format=xml"))

22:44 but it throws an exception

22:48 daaku: i'm at a point where i think some of my code could be split into a library. i want to basically create a new git repo for this library, but keep using it in it's source form since i'm actively developing both, rather than have to create a jar and install it to my local repo in a static fashion

22:48 anyone have suggestions on how best to go about this?

22:49 duck1123: well, actually, I see clojure/core_init.class in the clojure jar. (1.2.0-master-SNAPSHOT) and since this error is coming from clojure.lang.RT I know it's loaded

22:50 rhudson: defn: leave out the slurp call -- xml/parse expects a string arg to be a URI

22:51 defn: rhudson: oh duh

22:51 thanks rhudson

22:52 technomancy: lancepantz_: appending ! is like an option. =)

22:52 the task definition is just (doto project clean deps task)

22:52 which is why I would even consider adding it to begin with

22:53 defn: i sort of like being forced to throw another flag on there

22:53 or at least that's the behavior id generally expect

22:53 lein test --deps

22:53 technomancy: defn: the definition of the test task is _much_ cleaner if you assmue all its arguments are test namespaces to run.

22:54 defn: well then you've made up your mind! :)

22:54 technomancy: I do it right now with a shell alias lcdt = lein clean && lein deps && lein test

22:54 lancepantz_: i don't think either is correct

22:54 technomancy: well, the question is whether to add this one-liner task or to just have people make a shell alias for it.

22:54 clojurebot: max people is 283

22:55 lancepantz_: i should say, i don't think either one is incorrect :)

22:56 the counter argument to the bang is that your doing something that is lispesque in bash

22:56 technomancy: we'll also add a method to chain tasks, but it seems like 90% of the usage of chaining tasks would just be for these three together.

22:56 lancepantz_: "idiomatic bash" is a flag

22:56 but it is a clojure tool, so a bang make sense

23:04 mister_m: why should I learn clojure instead of python

23:04 rhudson: why not learn them both?

23:05 mister_m: if I thought I had the capacity to retain them both I probably would give that a try

23:06 rhudson: you might surprise yourself

23:06 What languages do you know now?

23:06 mister_m: I suppose you might be right

23:07 I wouldn't say that I really 'know' any, but I have some experience with java and C++

23:07 lancepantz_: mister_m: what are your goals?

23:08 to get a job? to learn?

23:08 enlightenment? :)

23:08 mister_m: lancepantz, I'd choose enlightenment and education

23:09 lancepantz_: *cough* clojure *cough*

23:09 mister_m: :)

23:09 lancepantz_: look over the first few chapters of the SICP

23:09 defn: forgive my ignorance: http://feeds.feedburner.com/jobsrubynow?format=xml --> How can I get a collection of titles from that XML?

23:09 lancepantz_: it kinda touched me personally

23:09 rhudson: mister_m, then I'd say Clojure over Python, if you have to choose, in that Python is closer to the same kind/style/philosophy of language of C++ & Java

23:10 lancepantz_: defn: have gist of what you have so far?

23:10 mister_m: what do you guys think of scheme?

23:10 defn: lancepantz_: yeah one sec

23:10 rhudson: I.e. you'll learn more learning Clojure than learning Python, I believe

23:11 defn: lancepantz_: http://gist.github.com/502905

23:11 practically nothing there :)

23:11 lancepantz_: i like scheme, but sicp is my only experience with it

23:11 defn: i just havent worked with xml much, and the clojure.xml documentation is nil all the way around

23:12 rhudson: defn: it looks like that feed is RSS2, so you need to understand that schema

23:12 mister_m: I'm a little apprehensive wth scheme and other lisps, becuause the community is so fragmented

23:14 between all the different implementations

23:14 defn: rhudson: how do you mean? I see: :rss, :item, :title

23:15 rhudson: defn: it means I *don't* know the RSS2 schema, so I couldn't have said offhand how to find a title. :)

23:16 defn: heh

23:17 Scriptor: mister_m: plt racket seems to be the major implementation rightn ow

23:17 *now

23:17 rhudson: But if tthere's a :title tag, you could use xml-seq to visit all the nodes in the doc, filter out the ones with tag=:title, and pull out the content

23:18 defn: there we go :)

23:18 thanks rhudson

23:18 wow that's slow...

23:24 im thinking im doing something wrong :)

23:25 Bahman: Hi all!

23:25 rhudson: defn: I did like (->> url xml/parse xml-seq (filter #(= (:tag %) :title) (mapcat :content))

23:28 notsonerdysunny: Hi all.. I am a newbie to both enclojure and netbeans. I am trying to build labrepl. The build seems successfull. However when I try to start the repl, it is telling me that the clojure-master-1.2.0-snapshot.jar and the corresponding clojure-contrib<..>.jar is not available.. when I try to rebuild .. I noticed that the maven build is unable to download those files due to non-availability of...

23:28 ...the resource.. How can I fix this?

23:36 defn: rhudson: what's the diff between xml-seq and zip/xml-zip

23:38 lancepantz_: heh, someone needs to make something that's like paste-bin, but an irc channel with a repl bot

23:38 rhudson: defn: xml-seq gives you a sequence of nodes, in depth-first order.

23:38 lancepantz_: so we could all go to like #clj-8317313 and load an ns

23:38 and all share a repl

23:38 defn: that's an awesome idea

23:38 rhudson: zip/xml-zip gives you a "zipper" over the same tree, which lets you move around the tree and edit it

23:39 defn: lancepantz_: seriously. cool idea.

23:39 lancepantz_: yeah, i realized i got your solution 10 minutes after rhudson had it

23:39 defn: then if you need to hop namespaces: /join #clj-ns2

23:39 lancepantz_: right

23:40 defn: (ns clj-ns2 (:use clj-8317313))

23:40 badda bing badda boom

23:40 lancepantz_: yeah, that'd be cool

23:40 defn: i dont know how honest to god useful itd be

23:40 but it could be fun for sure :)

23:40 * defn would run it in a VM to make sure no one did anything mean

23:41 rhudson: Maybe limit execution to some fraction of a second.

23:42 defn: or maybe just say: fuck it. let's get dirty.

23:42 sandboxes are nice because you think: "this is great. ill be able to stop everything naughty from happening automagically"

23:42 rhudson: Whoever's paying for the cycles might not see it quite the same way...

23:42 defn: but then you realize it screws up all sorts of things you want to do

23:43 rhudson: fair enough but I mean, I think as long as there was a nice layer that stopped you from reading/modifying files outside of the classpath or project-dir

23:43 then id be obliged to trust people

23:46 rhudson: Well, I think most of the things we want to illustrate to each other don't take that long to run, and a time limit would prevent e.g. both deliberate and accidental infinite loops

23:46 defn: yeah but sometimes stuff takes time

23:46 rhudson: true

23:46 defn: like let's say we were working on a big xml document and we wanted to parse out XYZ and then do all sorts of computationally intensive things

23:47 lancepantz_: maybe allow people to authenticate to it

23:47 defn: lancepantz_: not a bad idea

23:47 lancepantz_: and if you're authed then you are allowed more cycles

23:47 defn: actually putting it on freenode might be a bad idea

23:47 lancepantz_: it would have to be

23:47 defn: rate limiting would screw things up

23:48 if i printed 300 lines to the REPL youd be scrolling while i was still typing

23:48 perhaps spawning a little irc network where one person plays the host

23:49 lancepantz_: there would be some limits with an irc interface

23:49 i think to solve what you're proposing you would want to make it a web app

23:50 how do they do those clojure sites, is that html5 stuff?

23:50 not java applets i assume

23:50 defn: simple JS

23:50 and by "clojure sites" which do you mean?

23:50 like "try clojure"?

23:50 lancepantz_: like try clojure

23:50 defn: yeah that's just JS

23:50 rhudson: There's a Mac text editor (the name of which I'm forgetting at the moment) that allows multiple people to work on the same doc peer-to-peer. Something like that for programming would be cool

23:50 defn: you can get fancy with some HTML5 and CSS3 magic

23:50 rhudson: subethaedit

23:50 rhudson: right

23:50 defn: are you guys emacs users?

23:51 http://www.emacswiki.org/emacs/Rudel

23:51 rhudson: I swore off emacs years ago

23:51 defn: sharing a repl is hard...

23:52 lancepantz_: if you wanna try out Rudel I've been curious to see if they've made any progress

23:52 lancepantz_: looks interesting, i will sometime

23:52 defn: lancepantz_: with cake eval we might be able to do some of this stuff with a text editor

23:53 lancepantz_: it'd be possible

Logging service provided by n01se.net