#clojure log - Apr 25 2009

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

0:20 eee: hi

0:23 replaca: hi eee

0:23 why do you have that nick?

0:26 unlink: Surely this is in the standard library? (fn [n h] (some #(= n %) h))

0:27 eee: i don't know. I go by e on gmail

0:27 i don't think a single e was allowed

0:27 replaca: eee: ahh, I've seen your posts

0:27 eee: how bout replaca

0:28 replaca: I tote an eee pc around with me everywhere so that name is bound for me :-)

0:28 eee: lol

0:28 replaca: it's a misspelling of rplaca which is a CL func

0:28 eee: interesting

0:28 replaca: a particularly innappropriate one for a clojure board, too :-)

0:29 eee: are you a long time CL user?

0:29 replaca: in gmail, I'm tomfaulhaber, so I don't really match

0:29 yeah, but in a dabbling sort of way

0:29 CL always had too much resistance to going together with anything

0:30 eee: i went to the conference just recently

0:30 replaca: oh yeah, where was that? Boston?

0:30 Europe?

0:30 eee: my opinion is that CL's main problem? is actually the fact that emacs uses different key bindings from notepad

0:31 and you pretty much need emacs to program in lisp

0:31 replaca: hah!

0:31 eee: and 99.99999 percent of the world knows MS word

0:31 Boston

0:31 replaca: I use emacs and slime in clojure, so that's not my resistance point

0:31 that's right

0:31 was it a good conference

0:31 ?

0:31 eee: emacs might be cool, but it's just like FP in that it breaks you for normal existence

0:32 replaca: I feel like they keep fighting the same wars and are bogged down by a lot of historical baggage

0:32 eee: it's like knowing grammer but then hangin out where people speak rap or something

0:32 replaca: yeah, it's hard to go back and forth. I had mostly abandoned emacs for a long time, but I've slowly sunk back into it

0:32 eee: so I'd rather just know wordpad

0:33 oh, the conference was fascinating

0:33 made me appreciate both Lisp AND C++ more

0:33 two old warriors

0:33 replaca: :-)

0:33 eee: battle scarred

0:33 replaca: yeah, old warriors with flaws, for sure

0:33 eee: complicated, slow builds

0:34 replaca: yup

0:34 eee: dependency problems

0:34 namespace issues

0:34 funniest part

0:34 was how many talks were about how

0:34 replaca: both have a hard time having "standard" components in a way that python et al don't

0:35 eee: someone had to do a job in language x that their boss made them do

0:35 or that their customer could support

0:35 so instead of writing the program

0:35 replaca: I'm really impressed with how rich has built a language that is lisp but feels "modern"

0:35 eee: step one was to implement a CL interpreter

0:35 replaca: yeah, those who love lisp, love lisp

0:36 eee: then they did it all in lisp

0:36 well, I think a key thing is to shorten up namespaces in clj

0:36 clojure-contrib.

0:36 is already long

0:36 and you still haven't gotten anywhere

0:36 compare that to 'open'

0:36 in python

0:37 no namespace

0:37 or

0:37 'import os'

0:37 easy peasy

0:37 replaca: I started to do that in my current job (write a component in CL) but abandoned it as counter-productive

0:37 eee: not a priority and rich explains why, but eventually that's be cool to have in clj

0:38 replaca: yeah, things from contrib doo migrate down into core

0:38 and then they're just there

0:38 eee: i needed to untar/zip a file on a windows machine

0:38 replaca: also, there is some penalty to coexisting with the java world

0:38 eee: with no winzip

0:38 and no admin to install stuff

0:38 python

0:38 in two lines of code

0:38 replaca: oh, yeah, I saw you're thread about that

0:39 eee: needs to be as unceremonious as that for clj

0:39 java libs are a tangled mess sometimes

0:39 to me

0:39 replaca: I put that whole category of thing under "better support for scripting" and I agree 100% we need to get there

0:40 eee: yesterday i needed to read files into a StringBuffer in java

0:40 and so

0:40 replaca: I'd like to spend some effort thinking about that coming up

0:40 eee: there's a FileReader

0:40 in java

0:40 the docs say

0:40 "convenient" ...

0:40 nope

0:40 what does it take?

0:40 replaca: duck-streams (slurp*)

0:40 eee: a CharBuffer

0:40 sure

0:40 slurp is in the core, too

0:41 but "spit" is missing

0:41 but in java, even worse

0:41 so I'm just saying

0:41 we can't rely on java

0:41 have to wrap it

0:41 i see you agree

0:41 replaca: spit is in duck-streams and they're both smart about files/urls/strings/etc.

0:41 eee: cool

0:42 so like a CharBuffer, just to rant for another sec

0:42 is Abstract

0:42 replaca: I've been using those a little lately - it's a nice little module

0:42 eee: and all the concrete stuff us package protected

0:42 so you can hand a FileReader to a BufferedReader

0:42 not much help

0:42 eventually you need something for when you call Read

0:43 replaca: Yeah, there are times that java is so "pattern-oriented" that it's a joke

0:43 eee: you can implement your own charbuffer

0:43 or your can make a fixed-length buffer

0:43 why not just hand in a StringBuffer

0:43 one time

0:43 if you want

0:43 etc

0:43 replaca: The interesting question with wrapping is "where do you draw the line?"

0:43 eee: when you have python

0:44 with clojure syntax

0:44 but, yeah

0:44 i could be wrong

0:44 replaca: people build these super hairy back-end apps in Java where you need to be able to control that stuff in weird ways

0:44 eee: because there's already an explosion of functions and macros to learn

0:45 I agree with the hairy part. I love to do that

0:45 but not all the time

0:45 so I ended up reading a line at a time.

0:45 but

0:45 replaca: I spent some time building BI/data mining system that crunched crazy amounts of data and I had to get really down and dirty with memory management

0:45 eee: here's why that was dumb for my application. I wanted to stick whole documents into a clob field

0:45 clojurebot: why not?

0:45 eee: why reconstruct the clob?

0:46 why not just say my stream is a clob, go into a record

0:46 replaca: yeah, this is something where laziness should make it invisible

0:47 I'd like to have a lazy string that was backed by somme data source

0:47 eee: and even better if it were non-blocking

0:47 replaca: or producer

0:47 eee: lazy but non-blocking

0:47 replaca: yeah, getting filled up in the background

0:47 eee: start going into the database, I'm moving on

0:48 replaca: I was think of that (in the other direction) for generating nasty xml docs to be sent across the internet

0:48 cemerick: eee: you were at the ILC?

0:48 eee: yeah

0:48 i learned about it from clojure group

0:49 cemerick: hrm, another closet clojure enthusiast! What's your name? Perhaps we chatted.

0:49 eee: Eli

0:49 but there's a scheme eli

0:49 so I go by e

0:49 cemerick: doesn't ring a bell, unfortunately.

0:49 are you local to Boston?

0:49 eee: cause that eli really knows his stuff

0:49 I wish

0:50 then I could get a lisp job

0:50 except that place was cold

0:50 i didn't dress warm enough some nights

0:50 cemerick: well, it was also near the river

0:51 eee: cool place

0:51 cemerick: ...and colder than usual for that time of year, really

0:51 eee: you'd remember me if you saw me

0:51 I asked a lot of (annoying?) questions

0:51 cemerick: eh, probably not.

0:51 eee: :)

0:51 cemerick: Wait, were you casting around for a priority heap?

0:52 eee: were you at the pub that night?

0:52 cemerick: an immutable/persistent one, that is

0:52 eee: working on it now

0:52 cemerick: ah, very nice

0:52 eee: posted about it on the group

0:52 cemerick: hrm, which pub when? :-D Yeah, probably.

0:53 eee: what's it called? Cambridge Brewing Co?

0:53 awesome place

0:53 I have some ideas about decreaseKey() now

0:53 cemerick: yeah, that was the typical hangout.

0:53 eee: anyone interested?

0:54 it's ok if not

0:54 turns out it's an open problem in FP to add it

0:54 lpetit: Hi, just waking up (I live in France :). Do you know whether Rich still needs some help for making version numbering DRY with the build files, etc. ? I'm willing to continue helping, but not if it has already been done !:-) Didn't see anything new, but maybe he was here on IRC before I woke up, and talked about that ?

0:54 eee: without a lot of cost

0:55 cemerick: eee: you mean decrementing a key in a map or somesuch? (I think I missed the context)

0:55 eee: that's right

0:55 in a heap

0:55 you normally only have a handle to min

0:55 replaca: lpetit: I don't think anything's happened since your last post in the group

0:56 lpetit: there wasn't any discussion here this afternoon that I saw

0:56 eee: the challenge

0:56 replaca: ~seen rhickey

0:56 clojurebot: rhickey was last seen quiting IRC, 990 minutes ago

0:56 eee: is to get rid of the amortization

0:56 cemerick: ~seen rhickey_

0:56 clojurebot: rhickey_ was last seen quiting IRC, 408 minutes ago

0:56 cemerick: sorry, I'm probably not a good sounding board...don't even quite remember what a heap is :-)

0:56 eee: make everything worst case optimal

0:56 :)

0:57 heap==priority queue

0:57 lpetit: OK, thanks for the info. clojurebot is really a damn spy !

0:57 cemerick: I have enough on my hands with spatial indexing structures :-)

0:57 oh, OK

0:57 replaca: maybe clojurebot should add the _s automatically

0:57 eee: you doing a spatial index in clojure?

0:57 cemerick: done, yeah, a couple of them.

0:58 eee: have you perchance heard of H2 Database?

0:58 cemerick: k-d tree, rtree, r*-tree, and an interval space (which is my own invention -- haven't seen anything similar in the literature)

0:58 hrm, I don't think so

0:58 eee: it seems promising

0:58 but they don't have those things

0:59 just multidimensional index

0:59 sounds awesome

1:00 cemerick: absolutely necessary for us -- a port of our Java rtree impl was the first thing I wrote in clojure

1:00 any reason to use H2 vs. derby?

1:00 eee: you get to use clojure at work?

1:01 cemerick: I own the business, so I hope so!

1:01 95% of all new code is clojure.

1:01 The other 5% being Java interfaces and ant scripts :-)

1:01 eee: does Derby have three levels of concurrency, robust journalling and roll back, multidimensional indexing, server and embedded mode, ,full text index

1:01 lucene full text index

1:02 an awesome web gui

1:02 encription

1:02 user schemas

1:02 compression

1:02 it's crazy

1:02 100% java

1:02 cemerick: ah: http://www.h2database.com/html/features.html#comparison

1:02 interesting

1:03 eee: they don't compare to sqlite

1:03 which has 100% java driver, too

1:04 and can index on more than one column at a time

1:04 but no concurrency

1:04 and you have to pay Rich Hipp 1-2 grand to add encryption

1:04 oh

1:04 unlink: What is "linked tables"?

1:04 eee: i forgot

1:05 and you can cluster

1:05 cemerick: if only I could get an embedded java db that is capable of single-file storage

1:05 eee: linked tables often refers to attaching two embedded dbs

1:05 arohner: cemerick: doesn't derby do that?

1:05 eee: you have it

1:05 cem

1:06 called sqlite

1:06 hang on

1:06 cemerick: arohner: not the last time I looked ~ a year ago *shrug*

1:06 eee: 100% java

1:06 and fast

1:06 cemerick: eee: using the nestedvm driver isn't really an option

1:06 eee: why not?

1:06 arohner: oh, last time I looked at it was much longer ago than that

1:07 cemerick: it was about 15-20% slower than the native driver when I tested it

1:07 eee: hmmmmm

1:07 then you might not like H2

1:07 arohner: when doing ant compiles, how do you get the stack trace on failure?

1:07 eee: if speed is main factor

1:07 cemerick: still very fast, but the customer at that point wasn't willing to do the swap

1:08 arohner: on stderr?

1:08 arohner: no, I just get one line of stack printed out

1:08 and that's not enough

1:08 cemerick: ah -- is this in netbeans?

1:08 arohner: just command line

1:08 cemerick: hrm.

1:08 eee: well H2 creates a bunch of files for journalling and all that

1:09 cemerick: arohner: try running the build with -v

1:09 unlink: I wonder what "Compatibility modes for IBM DB2, [...], MS SQL Server, [...], Oracle [...]" means.

1:09 eee: so you need 100% java in one file and lightning fast

1:09 arohner: cemerick: ah, that did it. thanks

1:09 cemerick: thankfully, that project is far behind us...haven't touched sqlite in ~8 months

1:09 eee: I think since it is java it wraps jdbc drivers to those things?

1:10 you can link to them

1:10 ?

1:10 when I bring up the little web client

1:10 i can connect to a lot of different things

1:10 really fun app to mess around with

1:10 lot's to try

1:11 somewhat sparse on docs, but they answer questions on the discussion group . . .and easy to figure out

1:11 cemerick: eee: thanks for the pointer to h2 -- I'll have to give it a shot vs derby when we need an embedded db again

1:11 eee: lots of options

1:11 aliases

1:11 functions

1:11 here's something

1:11 ever do pagination in Oracle?

1:12 rownum stuff

1:12 well, it's hard because whatever query you do, the result is row zero

1:12 but

1:12 in H2

1:12 you say, Limit 100 OFFSET 200

1:12 easy!

1:12 smart

1:12 sure no prob cemerick

1:13 unlink: yeah rownum is pretty braindead

1:14 cemerick: egad, Oracle

1:14 * cemerick flashes back to tnsname

1:14 eee: but

1:14 in oracle

1:14 full text index

1:14 real quick

1:14 and way powerful

1:15 sqlite

1:15 toy

1:15 unlink: mysql and pg both have fulltext.

1:15 OK, a bit of a lie with mysql, since only MyISAM support it.

1:15 eee: you can practically get a PhD in Oracle Text

1:17 H2 seems amazing in that they knew they had java, so they did lots of interrop while they were at it, like the option to index with lucene

1:17 and so easy to clister two dbs

1:18 cluster . . . different systems

1:24 cemerick: whoo, hacking on a friday night. Man, I'm an animal.

1:25 arohner: cemerick: tell me about it

1:25 I turned off the video game to code

1:25 cemerick: ahhhh, video games. I miss those.

1:25 such a time-sink though

1:25 arohner: depends

1:26 I think my total TV + movies + video games is less than 10 hours a week

1:26 cemerick: yeah, I'm in the same area. But then, I simply don't play games anymore.

1:26 I used to be big into WoW, which can simply consume your life whole, in one sitting.

1:27 zakwilson: Similar here. I do games, but almost never TV or movies.

1:27 cemerick: My wife went off to a seminar ~2 years ago, and I ended up spending a solid 36 hours playing WoW.

1:27 arohner: yeah, I used to be big into WoW. quit it a few years ago so I could work 80 hours a week on a project

1:28 zakwilson: I have never played WoW. I hear it eats your life.

1:28 eee: something has to

1:29 unlink: My idle time is spent playing with languages like clojure.

1:29 cemerick: it certainly can. I have an addictive/compulsive personality, so I'm susceptible to that sort of thing.

1:29 zakwilson: unlink: similar. I write random crap in Clojure, and I'm learning Haskell.

1:30 unlink: Haskell is pretty cool. It blows your mind a couple times.

1:30 cemerick: arohner: eh, that's a good tradeoff. As a prof once said (about the prospect of video game programming vs. tackling "hard, interesting problems"): "instead of wasting your life pretending to be a person in a fake world, why don't you go be a real person in the real world"...

1:31 I'm hoping clojure will be my last language. I'm nearly ready to get off the programming wagon.

1:31 arohner: and then do what?

1:32 eee: project management

1:32 cemerick: just work on the business for a while, and then maybe go do something completely different. *shrug*

1:32 eee: you have your own business?

1:32 TimDalySr: i've been programming for 38 years and end up learning a new language every year

1:32 unlink: That's a lot of languages.

1:32 TimDalySr: but my "last language" was lisp, which i've used almost everywhere

1:32 eee: neat!

1:33 cemerick: eee: http://snowtide.com/Team

1:33 TimDalySr: ya gotta keep up. languages control what you can think

1:33 eee: oh yeah

1:33 I remember you

1:33 gregh: it's interesting how that works

1:34 cemerick: eee: ut-oh! ;-)

1:34 eee: you're young to be gettin out of programming

1:34 TimDalySr: languages have an "impedence" (think hooking a soda straw to a firehose, thats "high impedence")

1:34 some are near the machine but far from your problem (e.g. assembler)

1:34 some are far from the machine but near your problem (e.g. php)

1:35 zakwilson: I don't think PHP is especially near anybody's problem - it's just easy to deploy.

1:35 gregh: I like to think of php being off on its own island, about to be voted off

1:35 cemerick: heh -- way, way too many 80-hour weeks (and 60-hour weeks otherwise). In programmer years, I might be more like 40 yrs. old. :-P

1:35 TimDalySr: lisp is the only language where you can cross that divide in the same sentence (e.g. (integrate (car x))

1:36 cemerick: that, and I'm more interested in the business/people thing these days. It's a harder problem.

1:37 eee: question about pdfstream

1:38 why not two tools

1:38 one that converts to text

1:38 another that extracts info

1:38 then you can have a word converter, too

1:39 cemerick: Extracting text from word is pretty trivial. The same is not the case with PDFs.

1:40 eee: was just an example

1:40 decoupling

1:40 I mean

1:40 cemerick: the latter contain no description of physical or logical structure, so PDFTextStream implements ~85% of an OCR engine to derive layout, etc.

1:40 eee: i see

1:41 cemerick: it's a market thing too -- way more interchange going on using PDF than anything else. Probably orders of magnitude between PDF and whatever #2 is.

1:41 arohner: is there a public fn to eval a string?

1:41 like clojure.main/eval-opt, but public/reusable?

1:42 TimDalySr: e.g. a common lisp (eval (read-from-string "....?

1:42 arohner: TimDalySr: yes

1:42 clojure.main/eval-opt looks like it does what I want, but it's marked private

1:43 cemerick: clojurebot: ,(eval (read-string "(+ 5 6)"))

1:43 clojurebot: eval is sometimes useful - but only sometimes

1:43 cemerick: ech...

1:43 arohner: well, I'm reading command line options

1:46 eee: ostridge

1:46 how do you spell it

1:46 :)

1:46 firefox underlined so i must be wrong

1:46 cemerick: arohner: (eval (read-string (str "(hash-map " string-of-key-value-options ")"))?

1:46 unlink: How do I get the command line arguments?

1:46 cemerick: that's dumb, but...

1:47 unlink: they're passed as a seq to one's -main fn

1:47 arohner: cemerick: that's nice, but I was thinking of something simpler

1:47 cemerick: unlink: see http://clojure.org/compilation

1:47 arohner: just going to eval command line arguments to run unit tests

1:47 unlink: oh, *command-line-args* is what I wanted.

1:48 arohner: i.e. java my-class (run-all-tests)

1:48 cemerick: unlink: heh, that too :-)

1:49 arohner: now I just need to make mega-jar, and I can deploy this thing

1:49 cemerick: arohner: shouldn't (eval (read-string ...)) should do it then?

1:49 arohner: yeah, it does

1:49 by simpler I mean without the hash-map

1:49 cemerick: good night all

1:50 eee: glad to catch up with you. I hope to see you in the channel again...

1:57 eee: trying to remember some of the languages from the LispCon

1:57 some that are no longer around

1:57 unlink: compile is giving me a "no such file or directory" error when I firmly believe that such a file does exist

2:01 I can do (use 'asdf) but not (compile 'asdf)

2:02 Raynes: Somebody opened up a bottle of crash and poured it on songbird.

2:03 unlink: Oh, by "Exception in thread "main" java.io.IOException: No such file or directory (asdf.clj:1)", it meant it couldn't find "classes/"

2:10 cgrand: unlink: did you set *compile-path*?

2:10 unlink: No, I didn't.

2:11 cgrand: (doc compile)

2:11 clojurebot: Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper classpath-relative directory. The output files will go into the directory specified by *compile-path*, and that directory too must be in the classpath.; arglists ([lib])

2:11 unlink: yes. Creating "classes" gives me a different error.

2:12 java.lang.ClassNotFoundException: asdf$asdf__4

2:13 cgrand: " and that directory too must be in the classpath"

2:13 * unlink coughs

2:13 unlink: yes, thank you for that.

2:23 What is the eager equivalent of map? (i.e. for side effects)

2:24 cgrand: doseq or (doall (map ..)) if you want the return value

2:26 unlink: thanks

2:37 Lau_of_DK: Top of the morning gents

2:38 unlink: good morning

2:44 replaca: oops, here's Lau. That's my signal to go to bed :-)

2:44 unlink: What TZ are you in Lau_of_DK?

2:45 I'm going to make a wild guess here. CET.

2:46 Or I guess, CEST.

2:47 replaca: t

2:52 unlink: replaca: ?

2:56 replaca: unlink: sorry, finger fumble

2:56 good night, all!

2:56 unlink: was wondering if you meant to type the command t

2:57 TimDalySr: it is officially EST here but i think i'm on hawaii time biologically

2:57 replaca: unlink: in fact yes, which I then did

2:58 unlink: replaca: not timebook is it?

2:59 TimDalySr: similarly here, except I'm on JST biologically and it's EDT where I am.

3:04 Lau_of_DK: unlink: GMT+1

3:13 Do we have a list somewhere of the most interesting Clojure projects that are OpenSource ?

3:13 (Im talking about stuff like ClojureQL, SofiaBa, etc...)

3:51 no?

4:01 Ok - Anybody here tried running some Clojure apps on JBoss ?

4:05 clojurebot: ping?

4:05 clojurebot: PONG!

4:13 unlink: Lau_of_DK: that's a good idea

4:13 Lau_of_DK: What is ?

4:15 unlink: "interesting open source clojure projects"

4:16 Lau_of_DK: Oh - you mean making a list?

4:16 unlink: yeah

4:17 Lau_of_DK: Yea - The one on Clojure.org is quite brief, and every once in a while I stumble upon something really interesting

4:17 Hmm... I feel a website coming on

4:53 unlink: Lau_of_DK: http://trevor.caira.com/clojure-packages/

4:53 Lau_of_DK: You're Trevor?

4:53 unlink: yeah

4:53 Lau_of_DK: Nice to meet you Mr. Caira

4:54 unlink: you too, Mr. Lau.

4:54 Lau_of_DK: Is that a PHP site ?

4:55 unlink: no

4:55 Lau_of_DK: What then ?

4:56 unlink: django

4:56 Lau_of_DK: Youre kidding me right?

4:56 unlink: no

4:56 Lau_of_DK: Surely you jest

4:56 unlink: I'm 100% serious.

4:56 Lau_of_DK: You do not seriously intend to link projects which contain the awesome power of Clojure, on an itty bitty Python website?

4:57 There's a Django port, Madison, nicknamed Clabango, available on Github

4:57 unlink: No, only on mighty, powerful Python websites.

4:57 Lau_of_DK: And by the by, its boorked

4:57 I cant submit

4:57 Textfield is too small - I'll do something in Compojure, you'll see how its done :)

4:58 unlink: nah it works

4:58 I just have to approve the submissions.

5:04 I'll be impressed if you can get a working site start to finish in 40 minutes like I did.

5:04 Lau_of_DK: That would not be a problem at all - have you not tried compojure?

5:04 unlink: I have.

5:05 I mean from creating the project directory to a live working site.

5:05 Lau_of_DK: But you're not done, you're site is boorked, so the clock is still ticking :)

5:05 unlink: My site works.

5:05 Lau_of_DK: Matching Django's speed from Compojure is no problem at all

5:06 unlink: http://trevor.caira.com/clojure-packages/?submitted=true

5:15 Lau_of_DK: I've also increased the size of the description input

5:16 Lau_of_DK: So, you're almost done

5:17 unlink: You're right, CSS could use a lot of work.

5:17 Lau_of_DK: But putting those little issues aside, cant you see that its in poor taste to host such a site on a Python framework when Clojure is more than able to do the same

5:17 unlink: Of course it is. I just don't have time to write a website in Clojure right now :-)

5:18 Lau_of_DK: Ok - And I dont mean to knock your work, so I hope that you dont felt that

5:20 unlink: I don't even have Java installed on my webserver.

5:20 Lau_of_DK: You can look up Concourse on Github, its a very simple baseline for Compojure projects, which you can extend ad infinity

5:35 unlink: Lau_of_DK: it doesn't do anything

5:36 Lau_of_DK: Concourse?

5:36 unlink: yes

5:36 Lau_of_DK: Are you an Emacs man, or are you a Fred Flintstone man ?

5:37 unlink: ?

5:37 Lau_of_DK: Are you of such an intelligence, that you use Emacs, or do you resort to lesser tools?

5:37 (ie. Vim, gedit, nano)

5:37 unlink: Does it matter what editor I use?

5:37 Lau_of_DK: In this discussion, it does

5:37 unlink: Then let's discuss something else.

5:38 Lau_of_DK: If you are not an Emacs man, which I can tell that you're not, then you download the entire folder of Concourse, and in the root you'll find server.sh, this you can run, and it will boot a Jetty server on port 8888 I think, which you can view through your browser

5:39 unlink: I know.

5:39 I've done more interesting things than this with compojure.

5:41 Lau_of_DK: A good point about Concourse, is the fact that if you load concourse.el in Emacs, and M-x eval-buffer, then you'll get the server booted up within emacs, and you can compile your functions directly to memory, with instantaneous effect on the servr

5:42 Includes running functions (threads)

5:43 unlink: How does he intend to persist his structs?

5:44 Lau_of_DK: Im not sure how he persists, and you'll have to design a model which is fitting to your needs - I do different things for different applications

5:44 unlink: This application doesn't actually do any persistence.

5:44 Lau_of_DK: That may be true

5:50 unlink: madison is interesting

5:52 And Lau_of_DK, I wouldn't underestimate the productivity of a mature, featureful framework.

5:54 I've moved the site to http://trevor.caira.com/clojure-projects/

5:58 Lau_of_DK: unlink: I wont, Im just estimating Python productivity, its based on opposite principles of Clojure - All the reason why I want Clojure, are also the reasons why I dont want Python

5:58 Chousuke: opposite principles? :/

5:59 Lau_of_DK: Like being non-functional, everything is mutable, not geared for concurrency, code is not data, etc.

6:00 Chousuke: those aren't principles per se.

6:00 Lau_of_DK: But do you understand what I mean, to such an extent that we dont have to argue over choise of words?

6:01 Chousuke: the only real fault in python from that list is concurrency. the others are up to preference :)

6:03 Lau_of_DK: Of course, so the only real issue is, what does the language default to ?

6:03 Chousuke: well, most languages fail those criteria :/

6:03 Lau_of_DK: Ok, but how is that relevant in a comparison between python and clojure? :)

6:04 unlink: The language isn't it at all. It's the libraries.

6:04 In this case, python has a featureful, well-documented, DRY web framework.

6:06 Form validation and rendering is automatic, sending emails is trivial, querying the database is a cinch.

6:07 Lau_of_DK: You talk features, I talk foundations

6:07 unlink: Yes, but features are what get a simple web site running running in < 45 minutes.

6:08 I've never written a large application in clojure, so I can't talk about that from experience.

6:09 Lau_of_DK: Lets agree to disagree - I dont think you're getting my point of view - Clojures/Lisps power for rapid development far exceeds Pythons, its built on better principles (or whatever Chousuke calls them), and its my weapon of choice. You dont have to agree, but you cant convince me by listing features/libraries, by that same logic I would be in Perl right now :)

6:10 unlink: Perl doesn't have Django.

6:13 I can't speak from experience about the effects of the "foundations" of Python and Clojure on the ability to develop rapidly, having only developed large applications in one of them. What I do know is that if I wrote that site in Clojure, I'd have to google for and study the source of various undocumented libraries to begin to approach the expressiveness and simplicity of the application I wrote (which is 100% nothing special), which is already launch

6:14 Lau_of_DK: Yes - You are inexperienced

6:14 And thats fine, but gives no grounds for comparison of the raw fabric of these 2 languages :)

6:16 unlink: If we're talking about rapid development in terms of absolute time to launch, I have major doubts about being able to produce a small to medium-sized product of the same features and robustness in as little time using Clojure as it takes with Django. And I do not fault Clojure -- the language itself was born *after* Django.

6:16 As far as large projects, I still doubt it, but am less certain.

6:17 TimDalySr: i'm not sure that web servers is where clojure would show its strength

6:17 Lau_of_DK: Practical experience proves you wrong, I have written applications that are deployed in major corporations in record time - Their words were "extraordinary speed"

6:17 TimDalySr: the attraction of clojure is the use of multiple processors (e.g. on the azul systems 384 node boxes)

6:18 python cannot scale to that level because of the GIL (global interpreter lock)

6:18 Lau_of_DK: TimDalySr: I trust you're wrong, with the rise of JBoss these days, I think Clojure will absolutely become a powerful player in the web-arena

6:18 unlink: Lau_of_DK: I mean, you didn't prove anything, unless you compared them side-by-side in repeatable, identical conditions. But we're not trying to prove anything; instead get a reasonable comparison. Yet I doubt you've so much as tried Django, never mind have enough experience with it to make such a judgment.

6:19 TimDalySr: performance numbers for python show that on an 8 processor box it shows approximate 2x speedups

6:20 clojure is attractive in the multi-cpu configuration because it appears to scale nearly linearly (8 cpus is nearly 8x)

6:20 unlink: TimDalySr: It depends how you deploy. If you depend on Python's threading, you will be disappointed. However, if you run multiple Python interpreters in parallel, your application may not be any slower.

6:20 TimDalySr: so the key reason i'm interested in clojure is the scaling

6:21 if the task requires the python interpreters to communicate in order to solve the problem then they still do not linearly scale.

6:21 any language can do "massively parallel" scaling tasks

6:21 unlink: TimDalySr: Python doesn't scale in those applications where the bottleneck is CPU, the algorithm is parallelizable AND threading is required over multiple processes.

6:21 TimDalySr: (that is, tasks that are independent)

6:22 unlink: right

6:22 On the web, they don't.

6:22 TimDalySr: so python has a lot of features and libraries but my future looks like a box with hundreds of cpus

6:22 unlink: The request handlers could be as easily running in the same process as on different servers.

6:22 TimDalySr: (e.g. small laptops in 2 years)

6:22 again, you're positing independence

6:23 mutable data implies locking and python discussion of this subject all come down to the GIL

6:23 unlink: yes

6:23 TimDalySr: rich seems to have been very careful about this

6:23 unlink: No disagreements from me.

6:24 TimDalySr: so i want a single emacs with 2k cpus behind it

6:24 unlink: I'm simply noting that in the cases where your threads don't have to communicate much, GIL is moot.

6:24 TimDalySr: there is no argument that web servers can be wildly parallel in python since each request is independent

6:25 but i have a millon line lisp program (axiom) that does computer algebra and i want to use all the cycles i can steal to do an integral

6:26 unlink: Yes, don't write that in Python.

6:26 TimDalySr: well, sage is 5x larger and is written in python

6:26 but "written in python" is mostly exploiting the promiscuous nature of python's interfaces

6:28 doing a computation involves "provisos" (e.g. 1/x provided x != 0)

6:29 and during a single computation i need to rewrite this "on the fly" into interval format (e.g. [ (1/x) in [-inf,0), undefined, (1/x) in (0,+inf] ] so it becomes 3 subproblems

6:30 each subproblem is defined over a single interval

6:30 and these subproblems have to combine their results at the end in a single answer

6:31 if i have a whole tree of computation involves 100 subproblems i want to have a 100x speedup (well, ....) not maxing out at 3x

6:32 since the tree is dynamic and has crossing information (e.g. matching subprolems that are on different branches) i need them all in one task

6:32 this is why i'm interested in clojure and not python for this task

6:34 unlink: yeah

6:34 I'm interested in clojure as a refuge from Python when I need to the metal performance but don't want to write C/Java.

6:35 TimDalySr: black-hole-research problems, please form to the right.... refuge-metal-bands to the left :-)

12:59 eee: got deleteVal() working in the heap

12:59 haven't checked in yet

12:59 (for anyone following)

13:00 different from deleteMin

13:22 Lau_of_DK: Good evening all

13:25 eee: hi Lau_of_DK

13:40 cipher: ,*ns*

13:40 clojurebot: #<Namespace sandbox>

13:49 eee: i think I have decreaseKey() working now

13:50 oh no. finally found an edge case after millions and millions of inserts. good think for random tests

13:51 sooth: Anyone know how to use proxies and cookies with TagSoup?

13:53 eee: had never heard of it

13:53 sooth: (the java library)

13:53 eee: yeah, sounds interesting. googled it

13:53 can't help tho

13:55 sooth: Is there a clojure HTTP lib does handle proxies and cookies?

13:55 s/does/that does/

14:13 durka42: sooth: i've done cookies with clj-http-client just by parsing the headers

14:16 sooth: durka42: Thanks

14:44 Lau_of_DK: sooth: http://gist.github.com/98612

14:48 dnolen: is there an async http request written in Clojure?

15:03 AWizzArd: Can someone please try this: go to the repl, evaluate 1, 2 and then 3. Then eval *3 and then *1. I would expect that *3 will return 1. This happened for me. But as now 1 is the last object returned I would think that *1 will also return that, but

15:04 it doesn't for me

15:04 dreish: I get 1 and 1 for both *3 and *1.

15:05 durka42: me too

15:05 AWizzArd: oki, I will check if an update will help

15:07 thanks for trying

15:19 Lau_of_DK: clojurebot: where are you?

15:19 clojurebot: http://github.com/hiredman/clojurebot/tree/master

15:27 sooth: Thanks Lau_of_DK

16:13 AWizzArd: I am looking for something like (.shuffle [1 2 3]). Any ideas?

16:15 hiredman: Collections/shuffle

16:15 actually

16:15 ~transform

16:15 clojurebot: transform is http://github.com/hiredman/odds-and-ends/blob/8a84e6ddbad9d71f714ba16c3e1239633228a7eb/functional.clj

16:16 hiredman: there is a shuffle at the top of the file

16:17 AWizzArd: thanks

17:54 Hello reg-exp(erts): I have a string that ends with brackets in which there are some digits. For example "some text here[009]". What is the regexp to get "009"? I currently have #"\[(\d*)\]$" but this returns ["[009]" "009"] of which I would have to take the second. Can one change the regexp so that it will return only the "009"?

17:57 gnuvince_: ,(second (re-find #"\[(\d+)\]$" "James Bond [007]"))

17:57 clojurebot: "007"

17:57 hiredman: ,(re-find #"\[\d+\]" "foo [007]")

17:57 clojurebot: "[007]"

17:58 hiredman: ,(re-find #"(?:\[)(\d+)(?:\])" "foo [007]")

17:58 clojurebot: ["[007]" "007"]

17:58 hiredman: ,(re-find #"(?:\[)\d+(?:\])" "foo [007]")

17:58 clojurebot: "[007]"

18:00 AWizzArd: In principle...

18:00 ,(re-find #"\d+" "hallo [006]")

18:00 clojurebot: "006"

18:00 AWizzArd: but.. what if digites appear before the brackets?

18:00 digits even

18:00 gnuvince_: AWizzArd: did you see my example?

18:00 hiredman: you cound just use fnparse

18:01 AWizzArd: gnuvince_: yes, it uses second.

18:01 gnuvince_: The first group is the result of the entire match, the subsequent ones are the the individual matches.

18:01 AWizzArd: yes, that's normal.

18:01 That's expected

18:01 That's how regexes work.

18:01 AWizzArd: ok, I see

18:01 hiredman: ,(re-find #"\[\d+\]" "foo 007 [007]")

18:01 clojurebot: "[007]"

18:02 hiredman: ,(re-find #"\[(\d+)\]" "foo 007 [007]")

18:02 clojurebot: ["[007]" "007"]

18:02 AWizzArd: hiredman: and what is fnparse?

18:02 ,(re-find #"\d+" "hallo 006, are you okay? [006]")

18:02 clojurebot: "006"

18:02 AWizzArd: ,(re-find #"\d+" "hallo 002, are you okay? [006]")

18:02 clojurebot: "002"

18:02 hiredman: it lets you write parser combinators

18:03 define semantic hooks for certain expressions

18:03 clojurebot uses it for defining new facts instead of regexs

18:03 clojurebot: for is a loop...in Java

18:05 hiredman: if you are writing something that parses some kind of grammar it is much nicer then regexs

18:05 ~literal [?] for

18:05 clojurebot: 5

18:06 hiredman: ~literal [0] for

18:06 clojurebot: a loop...in Java

18:06 hiredman: ~literal [1] for

18:06 clojurebot: not a loop

18:06 hiredman: ~literal [2] for

18:06 clojurebot: not used enough

18:06 hiredman: clojurebot: fnparse?

18:06 clojurebot: No entiendo

18:06 hiredman: clojurebot: parse

18:06 clojurebot: parser is http://github.com/joshua-choi/fnparse/tree/master

18:19 chessguy: yay screencast

18:22 eee: hello

18:23 chessguy: hi eee

18:37 hmm, not so "yay"

18:44 ah, there it is

19:37 cads: hey chessguy, how're you doing?

19:38 chessguy: not bad, not bad

19:38 watching the peepcode screencast

19:38 cads: are those worth the $$?

19:39 chessguy: dunno, i'm only halfway through it and still on the fence

19:39 cads: oh wow, I was going to ask which one specifically, but I see they have new clojure oriented ones

19:40 chessguy: yeah, was announced on the clojure google group mailing list the other day

19:48 cads: I'd like to here what you have to say about it when you're done, chessguy

19:48 chessguy: sure

19:48 cads: and also, I didn't know you were interested in clojure, it's a surprise, really :)

19:57 chessguy: cads, do i know you from somewhere else?

19:58 cads: I hang out in #haskell

19:58 chessguy: ah ok

19:59 cads: I think you and conal had a conversation about semantic design, and that stuck in my head

19:59 chessguy: ah yes

19:59 i'm a big fan of his

20:00 cads: same here

20:00 chessguy: pretty new to the clojure world though. so far i'm pretty impressed

20:01 cads: it's pretty comfortable and easy, so far

20:04 I miss hindley-myer though

20:12 chessguy: oy. this is trying to cover way too much

20:13 i'm disappointed, frankly

20:16 cads: what do you mean? I can only imagine something like "This is how we simulate simple tail recursion... and this is how we write a dependently typed theorem checker"

20:20 chessguy: well it tries to cover everything from "what does functional programming mean" to STM to clojure syntax

20:24 cads: it seems like the "functional programming way to concurrency" should be covered in a more advanced talk

20:26 I don't think I can trust the peepcode guys, fuzzy faced latte sipping slightly overweight city-coders they must be

20:29 chessguy: heh

20:29 cads: uuum, well, disregard that outburst please, that's the beer talking

20:32 reviewing the functional programming chapter from halloway's book, and while it doesn't get too in depth with functional polymorphism or anything, it does provide a simple (if brief) grounding in the way clojure implements basic functional idioms like recursion and laziness

20:33 chessguy: is that "on clojure"?

20:33 err, "programming clojure" i mean

20:33 cads: correct

20:34 the book's in beta, but there are electronic versions available

20:36 we've got a clojure group here in atlanta studying it chapter by chapter, an so far it's been pretty good

20:36 err, well we have three people attending the meetings and the cookies are great

20:37 but the book itself, it's been pretty okay, though it's no SICP

20:37 chessguy: heh

20:37 cads: I wish it were more rigorous

20:37 chessguy: but what is? :)

20:37 cads: too true, sadly

20:37 chessguy: have you seen the SICP video series?

20:38 amazing

20:38 cads: and entertaining

20:39 "we'll be talking about processes, which we'll think about as _magic spells_ that do things, and return answers"

20:39 chessguy: "welcome to this lecture on computer science....actually, that's a terrible way to start, since this isn't about computers and it's not a science"

20:40 cads: or something to end of explaining that programming is more like magic than like a real science as of yet

20:40 hehe, did you believe that?

20:41 chessguy: awesome stuff

20:43 and the two sessions on streams were out of this world

20:44 cads: I've only watched the first lecture

20:44 chessguy: well what are you waiting for? :)

20:44 cads: you know, it could be very interesting to adapt some of the lessons SICP gave, from scheme to clojure

20:45 chessguy: a buddy's coming over for a chess match, I'm preparing mentally :D

20:45 chessguy: meh, most of the SICP stuff wasn't scheme specific

20:45 chess, eh?

20:45 what openings do you use?

20:46 cads: e4 or g3 or d4 on white, e5 or d5 or c5 on black

20:47 chessguy: pretty wide range

20:47 cads: i'm not very well studied

20:48 I can't tell you what variations I expect to play, I just go by gut feeling

20:48 chessguy: gotcha

20:48 cads: against a computer I usually fail badly when the computer decides to show me all the weaknesses I allowed

20:49 chessguy: hehe

20:49 cads: what openings do you use?

20:51 chessguy: d4 with white and french or benko with black

20:51 french = e4 e6, benko = d4 nf6 c4 c5

20:54 cads: french always makes me uneasy as white

20:57 chessguy: it often forces style decisions that white wouldn't usually make

20:57 cads: sometimes I open e3 just because I think they might do french otherwise

20:58 anyways, my buddy's here, wish him luck, i'll admit I've had a few brewskies, but I tend to intimidate this guy

20:58 chessguy: haha

20:58 have fun :)

20:58 cads: maybe we'll play sometime

21:01 chessguy: as a general rule, i don't play IRCers

21:28 cads: hah, as a general rule I don't play anyone who's face I can't drunkenly laugh at

21:28 so I might be in luck

21:28 chessguy: lol

21:28 cads: I might get my ass handed to me

21:29 well, shit, maybe our chess interests will intersect sometime else

21:29 I've been thinking of writing a database to store the games I play

21:30 hah, or a machine vision chess game recorder

21:30 but right now I have to avoid mate

21:50 chessguy: beer is fucking terrible! I'm playing for a draw!

21:50 chessguy: lol

21:51 cads: I'm trying to remind myself that this is what I wanted

21:51 chessguy: he doesn't sound very intimidated...

21:53 cads: no, this is great

21:58 heh, resigned

21:58 that is, he did

21:58 I was gonna promote one of my pawns

21:58 chessguy: nice

21:59 so much for playing for a draw

21:59 cads: how comfortable are you in the endgame?

22:02 chessguy: depends what kind of endgame :)

22:03 i'm very comfortable if i have a queen against a bare king :)

22:12 Chouser: Am I supposed to be able to provide unqualified class names to gen-interface and have it use the current imports to resolve them

22:12 ?

22:12 It doesn't seem to be working for :extends or method return types, at least.

22:21 gnuvince_: Good evening

22:33 Anyone watched the Clojure PeepCode screencast?

22:37 chessguy: gnuvince_, i just wawtched it tonight

22:37 gnuvince_: How is it?

22:37 chessguy: posted a review on the mailing list

22:37 i think it tries to cover too much too fast

22:38 gnuvince_: ok

22:38 chessguy: if you're already pretty familiar with clojure and just want to learn about how to set up a multi-threaded server it would probably be worthwhile though

22:38 gnuvince_: One hour is indeed a very short while to cover a language. Rich took three hours in Boston, and I'm sure he would've had a lot more to say.

22:42 Wow... according to -Xprof, 30% of the running time of my application is spent in... clojure.lang.Cons.first

22:43 hiredman: hmmmm

22:43 TimDalySr: in clojure, will (read) read in a valid clojure program?

22:43 hiredman: ,(doc read)

22:43 clojurebot: "([] [stream] [stream eof-error? eof-value] [stream eof-error? eof-value recursive?]); Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current value of *in* ."

22:43 TimDalySr: that is, does (print (eval (read))) work?

22:44 chessguy: ,(doc eval)

22:44 clojurebot: "([form]); Evaluates the form data structure (not text!) and returns the result."

22:45 hiredman: TimDalySr: that is a yes

23:52 msingh: does anyone know of a simple soap client to use with clojure?

23:53 something to add to http://rosettacode.org/wiki/Creating_a_SOAP_Client which compares favorable to the python example would be nice :P

Logging service provided by n01se.net