#clojure logs

2009-04-25

00:20eeehi
00:23replacahi eee
00:23replacawhy do you have that nick?
00:26unlinkSurely this is in the standard library? (fn [n h] (some #(= n %) h))
00:27eeei don't know. I go by e on gmail
00:27eeei don't think a single e was allowed
00:27replacaeee: ahh, I've seen your posts
00:27eeehow bout replaca
00:28replacaI tote an eee pc around with me everywhere so that name is bound for me :-)
00:28eeelol
00:28replacait's a misspelling of rplaca which is a CL func
00:28eeeinteresting
00:28replacaa particularly innappropriate one for a clojure board, too :-)
00:29eeeare you a long time CL user?
00:29replacain gmail, I'm tomfaulhaber, so I don't really match
00:29replacayeah, but in a dabbling sort of way
00:29replacaCL always had too much resistance to going together with anything
00:30eeei went to the conference just recently
00:30replacaoh yeah, where was that? Boston?
00:30replacaEurope?
00:30eeemy opinion is that CL's main problem? is actually the fact that emacs uses different key bindings from notepad
00:31eeeand you pretty much need emacs to program in lisp
00:31replacahah!
00:31eeeand 99.99999 percent of the world knows MS word
00:31eeeBoston
00:31replacaI use emacs and slime in clojure, so that's not my resistance point
00:31replacathat's right
00:31replacawas it a good conference
00:31replaca?
00:31eeeemacs might be cool, but it's just like FP in that it breaks you for normal existence
00:32replacaI feel like they keep fighting the same wars and are bogged down by a lot of historical baggage
00:32eeeit's like knowing grammer but then hangin out where people speak rap or something
00:32replacayeah, 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
00:32eeeso I'd rather just know wordpad
00:33eeeoh, the conference was fascinating
00:33eeemade me appreciate both Lisp AND C++ more
00:33eeetwo old warriors
00:33replaca:-)
00:33eeebattle scarred
00:33replacayeah, old warriors with flaws, for sure
00:33eeecomplicated, slow builds
00:34replacayup
00:34eeedependency problems
00:34eeenamespace issues
00:34eeefunniest part
00:34eeewas how many talks were about how
00:34replacaboth have a hard time having "standard" components in a way that python et al don't
00:35eeesomeone had to do a job in language x that their boss made them do
00:35eeeor that their customer could support
00:35eeeso instead of writing the program
00:35replacaI'm really impressed with how rich has built a language that is lisp but feels "modern"
00:35eeestep one was to implement a CL interpreter
00:35replacayeah, those who love lisp, love lisp
00:36eeethen they did it all in lisp
00:36eeewell, I think a key thing is to shorten up namespaces in clj
00:36eeeclojure-contrib.
00:36eeeis already long
00:36eeeand you still haven't gotten anywhere
00:36eeecompare that to 'open'
00:36eeein python
00:37eeeno namespace
00:37eeeor
00:37eee'import os'
00:37eeeeasy peasy
00:37replacaI started to do that in my current job (write a component in CL) but abandoned it as counter-productive
00:37eeenot a priority and rich explains why, but eventually that's be cool to have in clj
00:38replacayeah, things from contrib doo migrate down into core
00:38replacaand then they're just there
00:38eeei needed to untar/zip a file on a windows machine
00:38replacaalso, there is some penalty to coexisting with the java world
00:38eeewith no winzip
00:38eeeand no admin to install stuff
00:38eeepython
00:38eeein two lines of code
00:38replacaoh, yeah, I saw you're thread about that
00:39eeeneeds to be as unceremonious as that for clj
00:39eeejava libs are a tangled mess sometimes
00:39eeeto me
00:39replacaI put that whole category of thing under "better support for scripting" and I agree 100% we need to get there
00:40eeeyesterday i needed to read files into a StringBuffer in java
00:40eeeand so
00:40replacaI'd like to spend some effort thinking about that coming up
00:40eeethere's a FileReader
00:40eeein java
00:40eeethe docs say
00:40eee"convenient" ...
00:40eeenope
00:40eeewhat does it take?
00:40replacaduck-streams (slurp*)
00:40eeea CharBuffer
00:40eeesure
00:40eeeslurp is in the core, too
00:41eeebut "spit" is missing
00:41eeebut in java, even worse
00:41eeeso I'm just saying
00:41eeewe can't rely on java
00:41eeehave to wrap it
00:41eeei see you agree
00:41replacaspit is in duck-streams and they're both smart about files/urls/strings/etc.
00:41eeecool
00:42eeeso like a CharBuffer, just to rant for another sec
00:42eeeis Abstract
00:42replacaI've been using those a little lately - it's a nice little module
00:42eeeand all the concrete stuff us package protected
00:42eeeso you can hand a FileReader to a BufferedReader
00:42eeenot much help
00:42eeeeventually you need something for when you call Read
00:43replacaYeah, there are times that java is so "pattern-oriented" that it's a joke
00:43eeeyou can implement your own charbuffer
00:43eeeor your can make a fixed-length buffer
00:43eeewhy not just hand in a StringBuffer
00:43eeeone time
00:43eeeif you want
00:43eeeetc
00:43replacaThe interesting question with wrapping is "where do you draw the line?"
00:43eeewhen you have python
00:44eeewith clojure syntax
00:44eeebut, yeah
00:44eeei could be wrong
00:44replacapeople build these super hairy back-end apps in Java where you need to be able to control that stuff in weird ways
00:44eeebecause there's already an explosion of functions and macros to learn
00:45eeeI agree with the hairy part. I love to do that
00:45eeebut not all the time
00:45eeeso I ended up reading a line at a time.
00:45eeebut
00:45replacaI 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
00:45eeehere's why that was dumb for my application. I wanted to stick whole documents into a clob field
00:45clojurebotwhy not?
00:45eeewhy reconstruct the clob?
00:46eeewhy not just say my stream is a clob, go into a record
00:46replacayeah, this is something where laziness should make it invisible
00:47replacaI'd like to have a lazy string that was backed by somme data source
00:47eeeand even better if it were non-blocking
00:47replacaor producer
00:47eeelazy but non-blocking
00:47replacayeah, getting filled up in the background
00:47eeestart going into the database, I'm moving on
00:48replacaI was think of that (in the other direction) for generating nasty xml docs to be sent across the internet
00:48cemerickeee: you were at the ILC?
00:48eeeyeah
00:48eeei learned about it from clojure group
00:49cemerickhrm, another closet clojure enthusiast! What's your name? Perhaps we chatted.
00:49eeeEli
00:49eeebut there's a scheme eli
00:49eeeso I go by e
00:49cemerickdoesn't ring a bell, unfortunately.
00:49cemerickare you local to Boston?
00:49eeecause that eli really knows his stuff
00:49eeeI wish
00:50eeethen I could get a lisp job
00:50eeeexcept that place was cold
00:50eeei didn't dress warm enough some nights
00:50cemerickwell, it was also near the river
00:51eeecool place
00:51cemerick...and colder than usual for that time of year, really
00:51eeeyou'd remember me if you saw me
00:51eeeI asked a lot of (annoying?) questions
00:51cemerickeh, probably not.
00:51eee:)
00:51cemerickWait, were you casting around for a priority heap?
00:52eeewere you at the pub that night?
00:52cemerickan immutable/persistent one, that is
00:52eeeworking on it now
00:52cemerickah, very nice
00:52eeeposted about it on the group
00:52cemerickhrm, which pub when? :-D Yeah, probably.
00:53eeewhat's it called? Cambridge Brewing Co?
00:53eeeawesome place
00:53eeeI have some ideas about decreaseKey() now
00:53cemerickyeah, that was the typical hangout.
00:53eeeanyone interested?
00:54eeeit's ok if not
00:54eeeturns out it's an open problem in FP to add it
00:54lpetitHi, 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 ?
00:54eeewithout a lot of cost
00:55cemerickeee: you mean decrementing a key in a map or somesuch? (I think I missed the context)
00:55eeethat's right
00:55eeein a heap
00:55eeeyou normally only have a handle to min
00:55replacalpetit: I don't think anything's happened since your last post in the group
00:56replacalpetit: there wasn't any discussion here this afternoon that I saw
00:56eeethe challenge
00:56replaca~seen rhickey
00:56clojurebotrhickey was last seen quiting IRC, 990 minutes ago
00:56eeeis to get rid of the amortization
00:56cemerick~seen rhickey_
00:56clojurebotrhickey_ was last seen quiting IRC, 408 minutes ago
00:56cemericksorry, I'm probably not a good sounding board...don't even quite remember what a heap is :-)
00:56eeemake everything worst case optimal
00:56eee:)
00:57eeeheap==priority queue
00:57lpetitOK, thanks for the info. clojurebot is really a damn spy !
00:57cemerickI have enough on my hands with spatial indexing structures :-)
00:57cemerickoh, OK
00:57replacamaybe clojurebot should add the _s automatically
00:57eeeyou doing a spatial index in clojure?
00:57cemerickdone, yeah, a couple of them.
00:58eeehave you perchance heard of H2 Database?
00:58cemerickk-d tree, rtree, r*-tree, and an interval space (which is my own invention -- haven't seen anything similar in the literature)
00:58cemerickhrm, I don't think so
00:58eeeit seems promising
00:58eeebut they don't have those things
00:59eeejust multidimensional index
00:59eeesounds awesome
01:00cemerickabsolutely necessary for us -- a port of our Java rtree impl was the first thing I wrote in clojure
01:00cemerickany reason to use H2 vs. derby?
01:00eeeyou get to use clojure at work?
01:01cemerickI own the business, so I hope so!
01:01cemerick95% of all new code is clojure.
01:01cemerickThe other 5% being Java interfaces and ant scripts :-)
01:01eeedoes Derby have three levels of concurrency, robust journalling and roll back, multidimensional indexing, server and embedded mode, ,full text index
01:01eeelucene full text index
01:02eeean awesome web gui
01:02eeeencription
01:02eeeuser schemas
01:02eeecompression
01:02eeeit's crazy
01:02eee100% java
01:02cemerickah: http://www.h2database.com/html/features.html#comparison
01:02cemerickinteresting
01:03eeethey don't compare to sqlite
01:03eeewhich has 100% java driver, too
01:04eeeand can index on more than one column at a time
01:04eeebut no concurrency
01:04eeeand you have to pay Rich Hipp 1-2 grand to add encryption
01:04eeeoh
01:04unlinkWhat is "linked tables"?
01:04eeei forgot
01:05eeeand you can cluster
01:05cemerickif only I could get an embedded java db that is capable of single-file storage
01:05eeelinked tables often refers to attaching two embedded dbs
01:05arohnercemerick: doesn't derby do that?
01:05eeeyou have it
01:05eeecem
01:06eeecalled sqlite
01:06eeehang on
01:06cemerickarohner: not the last time I looked ~ a year ago *shrug*
01:06eee100% java
01:06eeeand fast
01:06cemerickeee: using the nestedvm driver isn't really an option
01:06eeewhy not?
01:06arohneroh, last time I looked at it was much longer ago than that
01:07cemerickit was about 15-20% slower than the native driver when I tested it
01:07eeehmmmmm
01:07eeethen you might not like H2
01:07arohnerwhen doing ant compiles, how do you get the stack trace on failure?
01:07eeeif speed is main factor
01:07cemerickstill very fast, but the customer at that point wasn't willing to do the swap
01:08cemerickarohner: on stderr?
01:08arohnerno, I just get one line of stack printed out
01:08arohnerand that's not enough
01:08cemerickah -- is this in netbeans?
01:08arohnerjust command line
01:08cemerickhrm.
01:08eeewell H2 creates a bunch of files for journalling and all that
01:09cemerickarohner: try running the build with -v
01:09unlinkI wonder what "Compatibility modes for IBM DB2, [...], MS SQL Server, [...], Oracle [...]" means.
01:09eeeso you need 100% java in one file and lightning fast
01:09arohnercemerick: ah, that did it. thanks
01:09cemerickthankfully, that project is far behind us...haven't touched sqlite in ~8 months
01:09eeeI think since it is java it wraps jdbc drivers to those things?
01:10eeeyou can link to them
01:10eee?
01:10eeewhen I bring up the little web client
01:10eeei can connect to a lot of different things
01:10eeereally fun app to mess around with
01:10eeelot's to try
01:11eeesomewhat sparse on docs, but they answer questions on the discussion group . . .and easy to figure out
01:11cemerickeee: thanks for the pointer to h2 -- I'll have to give it a shot vs derby when we need an embedded db again
01:11eeelots of options
01:11eeealiases
01:11eeefunctions
01:11eeehere's something
01:11eeeever do pagination in Oracle?
01:12eeerownum stuff
01:12eeewell, it's hard because whatever query you do, the result is row zero
01:12eeebut
01:12eeein H2
01:12eeeyou say, Limit 100 OFFSET 200
01:12eeeeasy!
01:12eeesmart
01:12eeesure no prob cemerick
01:13unlinkyeah rownum is pretty braindead
01:14cemerickegad, Oracle
01:14eeebut
01:14eeein oracle
01:14eeefull text index
01:14eeereal quick
01:14eeeand way powerful
01:15eeesqlite
01:15eeetoy
01:15unlinkmysql and pg both have fulltext.
01:15unlinkOK, a bit of a lie with mysql, since only MyISAM support it.
01:15eeeyou can practically get a PhD in Oracle Text
01:17eeeH2 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
01:17eeeand so easy to clister two dbs
01:18eeecluster . . . different systems
01:24cemerickwhoo, hacking on a friday night. Man, I'm an animal.
01:25arohnercemerick: tell me about it
01:25arohnerI turned off the video game to code
01:25cemerickahhhh, video games. I miss those.
01:25cemericksuch a time-sink though
01:25arohnerdepends
01:26arohnerI think my total TV + movies + video games is less than 10 hours a week
01:26cemerickyeah, I'm in the same area. But then, I simply don't play games anymore.
01:26cemerickI used to be big into WoW, which can simply consume your life whole, in one sitting.
01:27zakwilsonSimilar here. I do games, but almost never TV or movies.
01:27cemerickMy wife went off to a seminar ~2 years ago, and I ended up spending a solid 36 hours playing WoW.
01:27arohneryeah, I used to be big into WoW. quit it a few years ago so I could work 80 hours a week on a project
01:28zakwilsonI have never played WoW. I hear it eats your life.
01:28eeesomething has to
01:29unlinkMy idle time is spent playing with languages like clojure.
01:29cemerickit certainly can. I have an addictive/compulsive personality, so I'm susceptible to that sort of thing.
01:29zakwilsonunlink: similar. I write random crap in Clojure, and I'm learning Haskell.
01:30unlinkHaskell is pretty cool. It blows your mind a couple times.
01:30cemerickarohner: 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"...
01:31cemerickI'm hoping clojure will be my last language. I'm nearly ready to get off the programming wagon.
01:31arohnerand then do what?
01:32eeeproject management
01:32cemerickjust work on the business for a while, and then maybe go do something completely different. *shrug*
01:32eeeyou have your own business?
01:32TimDalySri've been programming for 38 years and end up learning a new language every year
01:32unlinkThat's a lot of languages.
01:32TimDalySrbut my "last language" was lisp, which i've used almost everywhere
01:32eeeneat!
01:33cemerickeee: http://snowtide.com/Team
01:33TimDalySrya gotta keep up. languages control what you can think
01:33eeeoh yeah
01:33eeeI remember you
01:33greghit's interesting how that works
01:34cemerickeee: ut-oh! ;-)
01:34eeeyou're young to be gettin out of programming
01:34TimDalySrlanguages have an "impedence" (think hooking a soda straw to a firehose, thats "high impedence")
01:34TimDalySrsome are near the machine but far from your problem (e.g. assembler)
01:34TimDalySrsome are far from the machine but near your problem (e.g. php)
01:35zakwilsonI don't think PHP is especially near anybody's problem - it's just easy to deploy.
01:35greghI like to think of php being off on its own island, about to be voted off
01:35cemerickheh -- way, way too many 80-hour weeks (and 60-hour weeks otherwise). In programmer years, I might be more like 40 yrs. old. :-P
01:35TimDalySrlisp is the only language where you can cross that divide in the same sentence (e.g. (integrate (car x))
01:36cemerickthat, and I'm more interested in the business/people thing these days. It's a harder problem.
01:37eeequestion about pdfstream
01:38eeewhy not two tools
01:38eeeone that converts to text
01:38eeeanother that extracts info
01:38eeethen you can have a word converter, too
01:39cemerickExtracting text from word is pretty trivial. The same is not the case with PDFs.
01:40eeewas just an example
01:40eeedecoupling
01:40eeeI mean
01:40cemerickthe latter contain no description of physical or logical structure, so PDFTextStream implements ~85% of an OCR engine to derive layout, etc.
01:40eeei see
01:41cemerickit'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.
01:41arohneris there a public fn to eval a string?
01:41arohnerlike clojure.main/eval-opt, but public/reusable?
01:42TimDalySre.g. a common lisp (eval (read-from-string "....?
01:42arohnerTimDalySr: yes
01:42arohnerclojure.main/eval-opt looks like it does what I want, but it's marked private
01:43cemerickclojurebot: ,(eval (read-string "(+ 5 6)"))
01:43clojureboteval is sometimes useful - but only sometimes
01:43cemerickech...
01:43arohnerwell, I'm reading command line options
01:46eeeostridge
01:46eeehow do you spell it
01:46eee:)
01:46eeefirefox underlined so i must be wrong
01:46cemerickarohner: (eval (read-string (str "(hash-map " string-of-key-value-options ")"))?
01:46unlinkHow do I get the command line arguments?
01:46cemerickthat's dumb, but...
01:47cemerickunlink: they're passed as a seq to one's -main fn
01:47arohnercemerick: that's nice, but I was thinking of something simpler
01:47cemerickunlink: see http://clojure.org/compilation
01:47arohnerjust going to eval command line arguments to run unit tests
01:47unlinkoh, *command-line-args* is what I wanted.
01:48arohneri.e. java my-class (run-all-tests)
01:48cemerickunlink: heh, that too :-)
01:49arohnernow I just need to make mega-jar, and I can deploy this thing
01:49cemerickarohner: shouldn't (eval (read-string ...)) should do it then?
01:49arohneryeah, it does
01:49arohnerby simpler I mean without the hash-map
01:49cemerickgood night all
01:50cemerickeee: glad to catch up with you. I hope to see you in the channel again...
01:57eeetrying to remember some of the languages from the LispCon
01:57eeesome that are no longer around
01:57unlinkcompile is giving me a "no such file or directory" error when I firmly believe that such a file does exist
02:01unlinkI can do (use 'asdf) but not (compile 'asdf)
02:02RaynesSomebody opened up a bottle of crash and poured it on songbird.
02:03unlinkOh, by "Exception in thread "main" java.io.IOException: No such file or directory (asdf.clj:1)", it meant it couldn't find "classes/"
02:10cgrandunlink: did you set *compile-path*?
02:10unlinkNo, I didn't.
02:11cgrand(doc compile)
02:11clojurebotCompiles 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])
02:11unlinkyes. Creating "classes" gives me a different error.
02:12unlinkjava.lang.ClassNotFoundException: asdf$asdf__4
02:13cgrand" and that directory too must be in the classpath"
02:13unlinkyes, thank you for that.
02:23unlinkWhat is the eager equivalent of map? (i.e. for side effects)
02:24cgranddoseq or (doall (map ..)) if you want the return value
02:26unlinkthanks
02:37Lau_of_DKTop of the morning gents
02:38unlinkgood morning
02:44replacaoops, here's Lau. That's my signal to go to bed :-)
02:44unlinkWhat TZ are you in Lau_of_DK?
02:45unlinkI'm going to make a wild guess here. CET.
02:46unlinkOr I guess, CEST.
02:47replacat
02:52unlinkreplaca: ?
02:56replacaunlink: sorry, finger fumble
02:56replacagood night, all!
02:56unlinkwas wondering if you meant to type the command t
02:57TimDalySrit is officially EST here but i think i'm on hawaii time biologically
02:57replacaunlink: in fact yes, which I then did
02:58unlinkreplaca: not timebook is it?
02:59unlinkTimDalySr: similarly here, except I'm on JST biologically and it's EDT where I am.
03:04Lau_of_DKunlink: GMT+1
03:13Lau_of_DKDo we have a list somewhere of the most interesting Clojure projects that are OpenSource ?
03:13Lau_of_DK(Im talking about stuff like ClojureQL, SofiaBa, etc...)
03:51Lau_of_DKno?
04:01Lau_of_DKOk - Anybody here tried running some Clojure apps on JBoss ?
04:05Lau_of_DKclojurebot: ping?
04:05clojurebotPONG!
04:13unlinkLau_of_DK: that's a good idea
04:13Lau_of_DKWhat is ?
04:15unlink"interesting open source clojure projects"
04:16Lau_of_DKOh - you mean making a list?
04:16unlinkyeah
04:17Lau_of_DKYea - The one on Clojure.org is quite brief, and every once in a while I stumble upon something really interesting
04:17Lau_of_DKHmm... I feel a website coming on
04:53unlinkLau_of_DK: http://trevor.caira.com/clojure-packages/
04:53Lau_of_DKYou're Trevor?
04:53unlinkyeah
04:53Lau_of_DKNice to meet you Mr. Caira
04:54unlinkyou too, Mr. Lau.
04:54Lau_of_DKIs that a PHP site ?
04:55unlinkno
04:55Lau_of_DKWhat then ?
04:56unlinkdjango
04:56Lau_of_DKYoure kidding me right?
04:56unlinkno
04:56Lau_of_DKSurely you jest
04:56unlinkI'm 100% serious.
04:56Lau_of_DKYou do not seriously intend to link projects which contain the awesome power of Clojure, on an itty bitty Python website?
04:57Lau_of_DKThere's a Django port, Madison, nicknamed Clabango, available on Github
04:57unlinkNo, only on mighty, powerful Python websites.
04:57Lau_of_DKAnd by the by, its boorked
04:57Lau_of_DKI cant submit
04:57Lau_of_DKTextfield is too small - I'll do something in Compojure, you'll see how its done :)
04:58unlinknah it works
04:58unlinkI just have to approve the submissions.
05:04unlinkI'll be impressed if you can get a working site start to finish in 40 minutes like I did.
05:04Lau_of_DKThat would not be a problem at all - have you not tried compojure?
05:04unlinkI have.
05:05unlinkI mean from creating the project directory to a live working site.
05:05Lau_of_DKBut you're not done, you're site is boorked, so the clock is still ticking :)
05:05unlinkMy site works.
05:05Lau_of_DKMatching Django's speed from Compojure is no problem at all
05:06unlinkhttp://trevor.caira.com/clojure-packages/?submitted=true
05:15unlinkLau_of_DK: I've also increased the size of the description input
05:16Lau_of_DKSo, you're almost done
05:17unlinkYou're right, CSS could use a lot of work.
05:17Lau_of_DKBut 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
05:17unlinkOf course it is. I just don't have time to write a website in Clojure right now :-)
05:18Lau_of_DKOk - And I dont mean to knock your work, so I hope that you dont felt that
05:20unlinkI don't even have Java installed on my webserver.
05:20Lau_of_DKYou can look up Concourse on Github, its a very simple baseline for Compojure projects, which you can extend ad infinity
05:35unlinkLau_of_DK: it doesn't do anything
05:36Lau_of_DKConcourse?
05:36unlinkyes
05:36Lau_of_DKAre you an Emacs man, or are you a Fred Flintstone man ?
05:37unlink?
05:37Lau_of_DKAre you of such an intelligence, that you use Emacs, or do you resort to lesser tools?
05:37Lau_of_DK(ie. Vim, gedit, nano)
05:37unlinkDoes it matter what editor I use?
05:37Lau_of_DKIn this discussion, it does
05:37unlinkThen let's discuss something else.
05:38Lau_of_DKIf 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
05:39unlinkI know.
05:39unlinkI've done more interesting things than this with compojure.
05:41Lau_of_DKA 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
05:42Lau_of_DKIncludes running functions (threads)
05:43unlinkHow does he intend to persist his structs?
05:44Lau_of_DKIm 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
05:44unlinkThis application doesn't actually do any persistence.
05:44Lau_of_DKThat may be true
05:50unlinkmadison is interesting
05:52unlinkAnd Lau_of_DK, I wouldn't underestimate the productivity of a mature, featureful framework.
05:54unlinkI've moved the site to http://trevor.caira.com/clojure-projects/
05:58Lau_of_DKunlink: 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
05:58Chousukeopposite principles? :/
05:59Lau_of_DKLike being non-functional, everything is mutable, not geared for concurrency, code is not data, etc.
06:00Chousukethose aren't principles per se.
06:00Lau_of_DKBut do you understand what I mean, to such an extent that we dont have to argue over choise of words?
06:01Chousukethe only real fault in python from that list is concurrency. the others are up to preference :)
06:03Lau_of_DKOf course, so the only real issue is, what does the language default to ?
06:03Chousukewell, most languages fail those criteria :/
06:03Lau_of_DKOk, but how is that relevant in a comparison between python and clojure? :)
06:04unlinkThe language isn't it at all. It's the libraries.
06:04unlinkIn this case, python has a featureful, well-documented, DRY web framework.
06:06unlinkForm validation and rendering is automatic, sending emails is trivial, querying the database is a cinch.
06:07Lau_of_DKYou talk features, I talk foundations
06:07unlinkYes, but features are what get a simple web site running running in < 45 minutes.
06:08unlinkI've never written a large application in clojure, so I can't talk about that from experience.
06:09Lau_of_DKLets 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 :)
06:10unlinkPerl doesn't have Django.
06:13unlinkI 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
06:14Lau_of_DKYes - You are inexperienced
06:14Lau_of_DKAnd thats fine, but gives no grounds for comparison of the raw fabric of these 2 languages :)
06:16unlinkIf 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.
06:16unlinkAs far as large projects, I still doubt it, but am less certain.
06:17TimDalySri'm not sure that web servers is where clojure would show its strength
06:17Lau_of_DKPractical experience proves you wrong, I have written applications that are deployed in major corporations in record time - Their words were "extraordinary speed"
06:17TimDalySrthe attraction of clojure is the use of multiple processors (e.g. on the azul systems 384 node boxes)
06:18TimDalySrpython cannot scale to that level because of the GIL (global interpreter lock)
06:18Lau_of_DKTimDalySr: 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
06:18unlinkLau_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.
06:19TimDalySrperformance numbers for python show that on an 8 processor box it shows approximate 2x speedups
06:20TimDalySrclojure is attractive in the multi-cpu configuration because it appears to scale nearly linearly (8 cpus is nearly 8x)
06:20unlinkTimDalySr: 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.
06:20TimDalySrso the key reason i'm interested in clojure is the scaling
06:21TimDalySrif the task requires the python interpreters to communicate in order to solve the problem then they still do not linearly scale.
06:21TimDalySrany language can do "massively parallel" scaling tasks
06:21unlinkTimDalySr: Python doesn't scale in those applications where the bottleneck is CPU, the algorithm is parallelizable AND threading is required over multiple processes.
06:21TimDalySr(that is, tasks that are independent)
06:22unlinkright
06:22unlinkOn the web, they don't.
06:22TimDalySrso python has a lot of features and libraries but my future looks like a box with hundreds of cpus
06:22unlinkThe request handlers could be as easily running in the same process as on different servers.
06:22TimDalySr(e.g. small laptops in 2 years)
06:22TimDalySragain, you're positing independence
06:23TimDalySrmutable data implies locking and python discussion of this subject all come down to the GIL
06:23unlinkyes
06:23TimDalySrrich seems to have been very careful about this
06:23unlinkNo disagreements from me.
06:24TimDalySrso i want a single emacs with 2k cpus behind it
06:24unlinkI'm simply noting that in the cases where your threads don't have to communicate much, GIL is moot.
06:24TimDalySrthere is no argument that web servers can be wildly parallel in python since each request is independent
06:25TimDalySrbut 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
06:26unlinkYes, don't write that in Python.
06:26TimDalySrwell, sage is 5x larger and is written in python
06:26TimDalySrbut "written in python" is mostly exploiting the promiscuous nature of python's interfaces
06:28TimDalySrdoing a computation involves "provisos" (e.g. 1/x provided x != 0)
06:29TimDalySrand 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
06:30TimDalySreach subproblem is defined over a single interval
06:30TimDalySrand these subproblems have to combine their results at the end in a single answer
06:31TimDalySrif i have a whole tree of computation involves 100 subproblems i want to have a 100x speedup (well, ....) not maxing out at 3x
06:32TimDalySrsince the tree is dynamic and has crossing information (e.g. matching subprolems that are on different branches) i need them all in one task
06:32TimDalySrthis is why i'm interested in clojure and not python for this task
06:34unlinkyeah
06:34unlinkI'm interested in clojure as a refuge from Python when I need to the metal performance but don't want to write C/Java.
06:35TimDalySrblack-hole-research problems, please form to the right.... refuge-metal-bands to the left :-)
12:59eeegot deleteVal() working in the heap
12:59eeehaven't checked in yet
12:59eee(for anyone following)
13:00eeedifferent from deleteMin
13:22Lau_of_DKGood evening all
13:25eeehi Lau_of_DK
13:40cipher,*ns*
13:40clojurebot#<Namespace sandbox>
13:49eeei think I have decreaseKey() working now
13:50eeeoh no. finally found an edge case after millions and millions of inserts. good think for random tests
13:51soothAnyone know how to use proxies and cookies with TagSoup?
13:53eeehad never heard of it
13:53sooth(the java library)
13:53eeeyeah, sounds interesting. googled it
13:53eeecan't help tho
13:55soothIs there a clojure HTTP lib does handle proxies and cookies?
13:55sooths/does/that does/
14:13durka42sooth: i've done cookies with clj-http-client just by parsing the headers
14:16soothdurka42: Thanks
14:44Lau_of_DKsooth: http://gist.github.com/98612
14:48dnolenis there an async http request written in Clojure?
15:03AWizzArdCan 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:04AWizzArdit doesn't for me
15:04dreishI get 1 and 1 for both *3 and *1.
15:05durka42me too
15:05AWizzArdoki, I will check if an update will help
15:07AWizzArdthanks for trying
15:19Lau_of_DKclojurebot: where are you?
15:19clojurebothttp://github.com/hiredman/clojurebot/tree/master
15:27soothThanks Lau_of_DK
16:13AWizzArdI am looking for something like (.shuffle [1 2 3]). Any ideas?
16:15hiredmanCollections/shuffle
16:15hiredmanactually
16:15hiredman~transform
16:15clojurebottransform is http://github.com/hiredman/odds-and-ends/blob/8a84e6ddbad9d71f714ba16c3e1239633228a7eb/functional.clj
16:16hiredmanthere is a shuffle at the top of the file
16:17AWizzArdthanks
17:54AWizzArdHello 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:57gnuvince_,(second (re-find #"\[(\d+)\]$" "James Bond [007]"))
17:57clojurebot"007"
17:57hiredman,(re-find #"\[\d+\]" "foo [007]")
17:57clojurebot"[007]"
17:58hiredman,(re-find #"(?:\[)(\d+)(?:\])" "foo [007]")
17:58clojurebot["[007]" "007"]
17:58hiredman,(re-find #"(?:\[)\d+(?:\])" "foo [007]")
17:58clojurebot"[007]"
18:00AWizzArdIn principle...
18:00AWizzArd,(re-find #"\d+" "hallo [006]")
18:00clojurebot"006"
18:00AWizzArdbut.. what if digites appear before the brackets?
18:00AWizzArddigits even
18:00gnuvince_AWizzArd: did you see my example?
18:00hiredmanyou cound just use fnparse
18:01AWizzArdgnuvince_: yes, it uses second.
18:01gnuvince_The first group is the result of the entire match, the subsequent ones are the the individual matches.
18:01gnuvince_AWizzArd: yes, that's normal.
18:01gnuvince_That's expected
18:01gnuvince_That's how regexes work.
18:01AWizzArdok, I see
18:01hiredman,(re-find #"\[\d+\]" "foo 007 [007]")
18:01clojurebot"[007]"
18:02hiredman,(re-find #"\[(\d+)\]" "foo 007 [007]")
18:02clojurebot["[007]" "007"]
18:02AWizzArdhiredman: and what is fnparse?
18:02AWizzArd,(re-find #"\d+" "hallo 006, are you okay? [006]")
18:02clojurebot"006"
18:02AWizzArd,(re-find #"\d+" "hallo 002, are you okay? [006]")
18:02clojurebot"002"
18:02hiredmanit lets you write parser combinators
18:03hiredmandefine semantic hooks for certain expressions
18:03hiredmanclojurebot uses it for defining new facts instead of regexs
18:03clojurebotfor is a loop...in Java
18:05hiredmanif you are writing something that parses some kind of grammar it is much nicer then regexs
18:05hiredman~literal [?] for
18:05clojurebot5
18:06hiredman~literal [0] for
18:06clojurebota loop...in Java
18:06hiredman~literal [1] for
18:06clojurebotnot a loop
18:06hiredman~literal [2] for
18:06clojurebotnot used enough
18:06hiredmanclojurebot: fnparse?
18:06clojurebotNo entiendo
18:06hiredmanclojurebot: parse
18:06clojurebotparser is http://github.com/joshua-choi/fnparse/tree/master
18:19chessguyyay screencast
18:22eeehello
18:23chessguyhi eee
18:37chessguyhmm, not so "yay"
18:44chessguyah, there it is
19:37cadshey chessguy, how're you doing?
19:38chessguynot bad, not bad
19:38chessguywatching the peepcode screencast
19:38cadsare those worth the $$?
19:39chessguydunno, i'm only halfway through it and still on the fence
19:39cadsoh wow, I was going to ask which one specifically, but I see they have new clojure oriented ones
19:40chessguyyeah, was announced on the clojure google group mailing list the other day
19:48cadsI'd like to here what you have to say about it when you're done, chessguy
19:48chessguysure
19:48cadsand also, I didn't know you were interested in clojure, it's a surprise, really :)
19:57chessguycads, do i know you from somewhere else?
19:58cadsI hang out in #haskell
19:58chessguyah ok
19:59cadsI think you and conal had a conversation about semantic design, and that stuck in my head
19:59chessguyah yes
19:59chessguyi'm a big fan of his
20:00cadssame here
20:00chessguypretty new to the clojure world though. so far i'm pretty impressed
20:01cadsit's pretty comfortable and easy, so far
20:04cadsI miss hindley-myer though
20:12chessguyoy. this is trying to cover way too much
20:13chessguyi'm disappointed, frankly
20:16cadswhat 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:20chessguywell it tries to cover everything from "what does functional programming mean" to STM to clojure syntax
20:24cadsit seems like the "functional programming way to concurrency" should be covered in a more advanced talk
20:26cadsI don't think I can trust the peepcode guys, fuzzy faced latte sipping slightly overweight city-coders they must be
20:29chessguyheh
20:29cadsuuum, well, disregard that outburst please, that's the beer talking
20:32cadsreviewing 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:33chessguyis that "on clojure"?
20:33chessguyerr, "programming clojure" i mean
20:33cadscorrect
20:34cadsthe book's in beta, but there are electronic versions available
20:36cadswe've got a clojure group here in atlanta studying it chapter by chapter, an so far it's been pretty good
20:36cadserr, well we have three people attending the meetings and the cookies are great
20:37cadsbut the book itself, it's been pretty okay, though it's no SICP
20:37chessguyheh
20:37cadsI wish it were more rigorous
20:37chessguybut what is? :)
20:37cadstoo true, sadly
20:37chessguyhave you seen the SICP video series?
20:38chessguyamazing
20:38cadsand entertaining
20:39cads"we'll be talking about processes, which we'll think about as _magic spells_ that do things, and return answers"
20:39chessguy"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:40cadsor something to end of explaining that programming is more like magic than like a real science as of yet
20:40cadshehe, did you believe that?
20:41chessguyawesome stuff
20:43chessguyand the two sessions on streams were out of this world
20:44cadsI've only watched the first lecture
20:44chessguywell what are you waiting for? :)
20:44cadsyou know, it could be very interesting to adapt some of the lessons SICP gave, from scheme to clojure
20:45cadschessguy: a buddy's coming over for a chess match, I'm preparing mentally :D
20:45chessguymeh, most of the SICP stuff wasn't scheme specific
20:45chessguychess, eh?
20:45chessguywhat openings do you use?
20:46cadse4 or g3 or d4 on white, e5 or d5 or c5 on black
20:47chessguypretty wide range
20:47cadsi'm not very well studied
20:48cadsI can't tell you what variations I expect to play, I just go by gut feeling
20:48chessguygotcha
20:48cadsagainst a computer I usually fail badly when the computer decides to show me all the weaknesses I allowed
20:49chessguyhehe
20:49cadswhat openings do you use?
20:51chessguyd4 with white and french or benko with black
20:51chessguyfrench = e4 e6, benko = d4 nf6 c4 c5
20:54cadsfrench always makes me uneasy as white
20:57chessguyit often forces style decisions that white wouldn't usually make
20:57cadssometimes I open e3 just because I think they might do french otherwise
20:58cadsanyways, my buddy's here, wish him luck, i'll admit I've had a few brewskies, but I tend to intimidate this guy
20:58chessguyhaha
20:58chessguyhave fun :)
20:58cadsmaybe we'll play sometime
21:01chessguyas a general rule, i don't play IRCers
21:28cadshah, as a general rule I don't play anyone who's face I can't drunkenly laugh at
21:28cadsso I might be in luck
21:28chessguylol
21:28cadsI might get my ass handed to me
21:29cadswell, shit, maybe our chess interests will intersect sometime else
21:29cadsI've been thinking of writing a database to store the games I play
21:30cadshah, or a machine vision chess game recorder
21:30cadsbut right now I have to avoid mate
21:50cadschessguy: beer is fucking terrible! I'm playing for a draw!
21:50chessguylol
21:51cadsI'm trying to remind myself that this is what I wanted
21:51chessguyhe doesn't sound very intimidated...
21:53cadsno, this is great
21:58cadsheh, resigned
21:58cadsthat is, he did
21:58cadsI was gonna promote one of my pawns
21:58chessguynice
21:59chessguyso much for playing for a draw
21:59cadshow comfortable are you in the endgame?
22:02chessguydepends what kind of endgame :)
22:03chessguyi'm very comfortable if i have a queen against a bare king :)
22:12ChouserAm I supposed to be able to provide unqualified class names to gen-interface and have it use the current imports to resolve them
22:12Chouser?
22:12ChouserIt doesn't seem to be working for :extends or method return types, at least.
22:21gnuvince_Good evening
22:33gnuvince_Anyone watched the Clojure PeepCode screencast?
22:37chessguygnuvince_, i just wawtched it tonight
22:37gnuvince_How is it?
22:37chessguyposted a review on the mailing list
22:37chessguyi think it tries to cover too much too fast
22:38gnuvince_ok
22:38chessguyif 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:38gnuvince_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:42gnuvince_Wow... according to -Xprof, 30% of the running time of my application is spent in... clojure.lang.Cons.first
22:43hiredmanhmmmm
22:43TimDalySrin clojure, will (read) read in a valid clojure program?
22:43hiredman,(doc read)
22:43clojurebot"([] [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:43TimDalySrthat is, does (print (eval (read))) work?
22:44chessguy,(doc eval)
22:44clojurebot"([form]); Evaluates the form data structure (not text!) and returns the result."
22:45hiredmanTimDalySr: that is a yes
23:52msinghdoes anyone know of a simple soap client to use with clojure?
23:53msinghsomething to add to http://rosettacode.org/wiki/Creating_a_SOAP_Client which compares favorable to the python example would be nice :P