#clojure logs

2010-04-06

00:18ztellmanvariadic functions in protocols seem to be broken
00:19ztellmanI assume there's no reason they shouldn't work?
00:27trptcolinis the simplest way to get the truthiness of an expression the following: (not (not expr))
00:27trptcolinor is there something clearer?
00:33_ato,(boolean "I want ice cream")
00:33clojurebottrue
00:33_atotrptcolin: ^
00:33trptcolin_ato: awesome! thanks
00:41slyphonanyone use the mocking lib?
01:36doseqato: thanks, guess I'll definitely get express delivery.
04:07LauJensenMorning all
04:20esjMorning LauJensen and all !
05:28licoressejust looked at Sean Devlins Foil Disclojure, wonder if it was supposed to be a joke
05:29LauJensenhehe
05:31LauJensenlicoresse: He's saying that he'll block all Java Interop and thereby all access to libraries, that everything is now relying on side-effects by returning nil from every symbol. Then he says that Clojure has too much syntax and to solve that, he'll convert it to a curly braces language...
05:32licoresseI like my processors warm
05:32licoresseand, would Sean convert it to curly braces, or would Rich do it?
05:33licoresseI get the joke now, thanks
05:33LauJensenhehe
05:33LauJensennp :)
05:33licoressebut it would be nice to have a clojure interop with obj-c
05:34licoresseI have a hard time doing that stuff now
05:34LauJensenTrue - They need to hurry up with the Clojure-In-Clojure compiler
05:35licoresseIndeed
05:39licoresseBut I have a hard time understanding how exactly this relates to, for instance the obj-c RT, clojure in clojure would still rely on JVM
05:39LauJensenNo, Clojure in Clojure would rely on a bootstrap, JVM, CLR, ASM, Dalvik, Javascript, whatever
05:40_ato>http://blog.n01se.net/?p=41
05:40LauJensenAnd once you have coded that bootstrap, the language compiles itself
05:40licoresseSo it would be more or less like the Squeak VM? A Smalltalk program that generates C code
05:40licoressethat compiles to a platform, et voila, you have a Vm
05:41licoresse_ato: reading it now
05:43ChousukeParts of Clojure would still be host-specific
05:43Chousukebut as cinc progresses, more code might possibly be shared between implementations on different hosts
05:43licoressebut a very tiny kernel, not?
05:44Chousukecurrently the ClojureCLR project basically needs to reimplement everything
05:46Chousukeat the very least things written in Clojure would require fewer changes to port
05:46LauJensenlicoresse: kernel is the same size, just written in Clojure instead of Java, but the bootstrap should be relatively small
05:47Chousukeideally you'd just have to implement some kernel primitives and the rest is written using those primitives but then you might not be able to truly take advantage of the host in the implementation :/
05:47bsteuberLauJensen: "same size, but Java instead of clojure" sounds like a contradiction to me :)
05:47licoresseLauJensen: ok, I was thinking kernel as the movable part, the one thing that needs to be generated, but I follow
05:47licoresseas in Kernel = Bootstrap
05:47LauJensenbsteuber: Well, you get my point I hope
05:48bsteubersure :)
05:48LauJensenlicoresse: Yes it we collectively rename boostrap to kernel, then indeed, its smaller :)
05:48ChousukeI wonder what parts would have to be reimplemented... probably at least protocols, deftype and some core functions... and codegen obviously :P
05:48LauJensen'which parts'
05:48licoressethe braces would prob. have to be redfined as well
05:49Chousukebraces?
05:49licoresseChousuke: yes, like curly braces everywhere
05:49Chousukeright :P
05:49LauJensenlicoresse: I got it :)
05:51licoresseLauJensen: det er godt
06:05licoressedesign patterns in functional languages, anyone?
06:08licoresseworking with this rather huge swing app, and I got add-watch all over the place
06:11licoresseI read some stackoverflow messages related to this, but it' seem FP people are alergic to anything that smells oop, which I find silly
06:13bsteuberwell, most of OO patterns are simply not necessary with first order functions available
06:13bsteuberbut sure, some might still survive :)
06:13licoressepatterns to me, means a formalized way of organizing things
06:13Chousukethe non-weird OOP patterns are not really OOP patterns at alll!
06:13Chousuke-l
06:13egagabesteuber: and possibly new ones emerge
06:14bsteubertrue
06:14ChousukeThe problem with Lisp is that if you find a pattern, you write a macro and the pattern disappears :/
06:14underdevbeat me to it
06:14licoresseChousuke: okay, that sounds fine, how to get to that stage
06:14egagaso how to rid of pattern of writing a macro when seeing first-order pattern ;P
06:15Chousukeyou write code and your brain takes care of the rest.
06:15licoressehave someone categorized the most useful patterns
06:15Chousukethe human brain is exceptionally good at finding patterns
06:15licoresseoh please
06:15Chousukesometimes too good, actually
06:16underdevfacade for sure is still relevant
06:16Chousukecollections of patterns are useful for languages with no means to abstract them away because they demonstrate ways to structure code.
06:16Chousukeif you need to deal with patterns, might as well document the good ones
06:16egagaexceptionally good compared to other known existing things, sure, but i think humans are poor programmers
06:16licoresseegaga: I follow you :)
06:17licoressemy brain is exceptionally bad at tracking 200k lines of code
06:17ChousukeI suppose Clojure has patterns too... They're just called idioms :/
06:17licoressethat's a start, idioms
06:19underdevthe oo guys have been beating the composition > inheritance drum for a long time, and it's just darn easy to compose functions, and then it's still easier to build a macro to compose the functions for you
06:19ChousukeI think syntactic abstraction can condense a large pattern so that it becomes "idiomatic" within the context of the program you're writing. Kind of like in a local dialect.
06:19ChousukeI suppose this means that DSLs are idiomatic in lisps
06:20underdevand DSL is a design pattern (not GOF, but...)
06:21ChousukeWhat about patterns in the design of DSLs? :/
06:22ChousukeLike using vectors for bindings etc.
06:27licoresseAnti-Object-Obsessed: “I do not believe in things. I believe only in their relationships” - George Braque
06:28licoresseIn my life, I learned one thing; the more freedom I get, the more structure I need
06:30underdevIn my life, i've learned one thing: "Don't eat the yellow snow."
06:31licoresselol
06:31underdevboth important lessons, i think
06:31licoresseI have kids trying to learn the same thing, suggestions?
06:32underdevhey, it took a lot of trial and error to figure out that gem.
06:32licoresseis fp an appropriate approach to the yellow-snow-problem
06:33bsteuberA somehow related question is "what can take the place of UML for functional programming?"
06:33licoressehmm
06:34licoressei guess, when you say UML, I am thinking both charts and a language
06:35underdevthere are a lot of uml diagrams that are still useful, but not class diagrams or whatnot
06:35underdevand when i say useful, i'm speaking in the broadest sense of the term
06:35underdevapplicable would be a better word :)
06:36licoressein the kingdom of nouns :)
06:36bsteuberbut maybe there are other kinds of diagrams that might be adequate for functional stuff
06:36egagatype signature
06:37licoressehow do you map pre and post conditions in uml?
06:38licoresse9 years since I even cared about that stuff
06:39licoresseI see that some people use class diagrams for modules, data members for tpes and methods for functions
06:39clojurebotdatatype is see datatypes
06:40licoresseit's just a square box, does not convey anything IMO
07:05tufflaxIf I have made a seq of a vector, how can I revert the seq to a vector in constant time?
07:05liwpI don't think you can do it in constant time...
07:06liwpI think after it's a seq, you can only access it via the seq api which doesn't allow you to convert it to a vector in constant time
07:07liwpbut (vec) will convert a seq to a vector for you, just not in constant time
07:07tufflaxBut the seq IS a vector...
07:07tomojhuh
07:07tufflaxIsn't it?
07:07tomojno vector is a seq
07:07liwpsure, but the seq interface only allows (vec) to call next on it
07:07tufflaxI mean, underneath
07:07tomojoh, perhaps
07:08tomoj,(class (seq []))
07:08clojurebotnil
07:08tomojerr
07:08tufflax,(class (seq [1]))
07:08clojurebotclojure.lang.PersistentVector$ChunkedSeq
07:08liwpso vec will call next on the seq until there are no more elements, i.e. O(n)
07:08liwpI might be totally wrong of course ;-)
07:08tufflaxhehe
07:08tomojif you know that the seq was produced from a vector, then you should have access to the vector, no?
07:09liwp,(source vec)
07:09clojurebotSource not found
07:09LauJensen~source vec
07:09tufflaxMaybe :P
07:09tomojand if the seq was created far away, how do you know it's a vector?
07:09tomojpart of the contract of your function is that you have to pass a particular kind of seq, or something?
07:10tufflaxNo, I'm just curious
07:10tomojor maybe it could be O(1) on vectors and O(n) on other kinds of seqs
07:10_ato,wall-hack-field
07:10clojurebot#<java_utils$wall_hack_field__654 clojure.contrib.java_utils$wall_hack_field__654@19230b2>
07:11_ato,(wall-hack-field clojure.lang.PersistentVector$ChunkedSeq vec (seq [1 2 3]))
07:11clojurebotjava.lang.ClassCastException: clojure.core$vec__4296 cannot be cast to clojure.lang.Named
07:11_atohmm
07:11_ato,(wall-hack-field clojure.lang.PersistentVector$ChunkedSeq 'vec (seq [1 2 3]))
07:11clojurebotjava.security.AccessControlException: access denied (java.lang.reflect.ReflectPermission suppressAccessChecks)
07:12_atodang
07:12tomoj,(doc wall-hack-field)
07:12clojurebot"([class-name field-name obj]); Access to private or protected field."
07:12liwplooking at PersistentVector.java there doesn't seems to be any special casing for creating a new vector from a seq that is a vector underneath
07:13_atoit'd probably work in a regular repl (not in clojurebot's sandbox)
07:13_atotechnically constant-time
07:13_atoalthough it uses reflection
07:13_atoso its probably slow :-P
07:13_ato(and a horribly ugly hack that will eat your babies)
07:15tufflax:p
07:30zakwilsonAnybody awake host a Clojure app on Google App Engine?
07:35liwpI haven't used clojure with app engine, but I just saw this on my RSS reader: http://www.infoq.com/articles/deadline-clojure-appengine
07:36liwpand there are some other posts about it as well, I think
07:36liwpHTH
07:43rhickeywhew, now 3500 members on ggroup
07:44bsteubern1ce
07:49chouserI assume that the more knowledge of Clojure is decentrallized (through books, co-workers who know it, etc.) the larger the ratio of Clojure users to ggroup members will become.
07:50cemerickYeah, probably somewhere between a 1x and 10x multiple, maybe. :-)
07:50chouserright
07:50lpetitsure
07:51chouserI mena, I've never hung out in IRC channels or subscribed to mailing lists for any of the other languages I've learned. Never really even considered doing so.
07:52cemerick#clojure brought me back into irc in a big way. I had given up on it.
07:52cemerickNot that it's to be trusted, but graphs like this are surprising to me. http://www.indeed.com/jobtrends?q=clojure%2Cjruby%2Cscala
07:55chouserhrm, it's going to be hard to keep http://clojure.org/libraries up to date. Correcting bad links will be easy compared to removing "dead" projects and keeping latest relevent ones listed.
07:55chouserneight leiningen nor clojure-maven-plugin is on there, for example.
07:56chouserneither
07:56carkhi think the new protocol/reify/deftyp stuff might bring more people in, because of the performance boost
07:56cemerickthat page can probably be replaced with two links: one searching google, the other searching github. ;-)
07:57LauJensen(or Gitorious)
07:58cemerickLauJensen: is that reasonably installable yet? The last time I looked at it, getting a local install running was a bear of a job.
07:58LauJensenI haven't tried
07:59LauJensenWe picked it because of a cleaner interface, as well as Github being slowed to a crawl, presumable by Rich's weekly 7000 lines of commits :)
07:59cemerickI'd like to have a decent git UI in-house, but I surely am not going to shell out what github wants for FI.
08:00fogus"So far we tracked Clojure separately, but it is so close to Lisp and Scheme that it is indeed better to join it with the other Lisp like languages." -> http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
08:00LauJensencemerick: Use Magit or Egg? Both excellent UIs in their own right
08:01LauJensenfogus: wow, I didnt even know :)
08:01cemerickLauJensen: never tried them. We use gitosis, which is good enough for now.
08:01LauJensenYea its decent
08:02cemerickLauJensen: You should know by now that I don't use anything that involves emacs. :-)
08:02cemerickgitx is my preferred local UI, tho
08:02LauJensenOooh thats right, now I remember :)
08:10rhickeycemerick: what would the google search be?
08:12LauJensenrhickey: If you've seen the "Hacker Search" on my site, thats actual a google search which only gets results from my blog, cgrands, clojure.org and then finally Google. Its a nice way to restrict the search area
08:12tomojhuh, my city is listed in 2nd place on google trends for "clojure" :D
08:12cemerickrhickey: it'd be easy to rig up a little google search box that prepended 'clojure ' to the user-entered query. Prompt with "What would you like to do/build/etc with clojure?" (or whatever). Someone enters "web development", and is shown results for "clojure web development".
08:13cemerickThat won't get them to the perfect libraries in one shot, but will get them very, very close.
08:13rhickeycemerick: no searches like that yield anything remotely like the libraries list. Not to say it doesn't need some updating...
08:13cemerickheh, the intro blog post on "Clojure Web Development with Ring" is result #4 for my example :-)
08:14cemerickrhickey: Sure, but who benefits from the libraries list, practically speaking? It's good for social proof of clojure itself, but I'm not sure people actually use it to find projects/libraries.
08:15cemerick(I say that in the context of the libraries listing always being out of date, as such manicured lists always are.)
08:15carkhit's usefull for newcomers
08:15chousercemerick: we'll be starting a trial of github:fi at work soon
08:15rhickeycemerick: to the extent it was curated and comprehensive, why would you use anything else?
08:16cemerickrhickey: curating it would probably be a number of hours of work per week as things stand, nevermind as the community grows....
08:16egagahow about a convention for library writers to create a page which contains in specified format what the project name is and description, links to important pages, and then one can crawl all the github
08:16cemerickchouser: no kidding! Deep pockets over there. ;-)
08:17rhickeychouser: github:fi ?
08:17cemerickegaga: well, there's already a page showing projects that use clojure on github AFAIK
08:17chousercemerick: well, the trial is free... :-)
08:17cemerickrhickey: http://fi.github.com/
08:18zakwilsonI used clojure.org/libraries about an hour ago to see what sort of parser libraries are available for Clojure.
08:18rhickeyother than the fork management and sparkle for same, why would one run local github?
08:19chouserrhickey: apparently putting our code on github's servers is off the table
08:19rhickeybut you could run local git
08:20rhickeyw/o github
08:20LauJensenw/ gitosis
08:20cemerickgitosis is *not* fun to deal with
08:20LauJensencemerick: I thought it was - fond memories
08:22cemerickHaving a single choke point for all permissions, etc is not good. It was painful enough with just a couple of guys, I can imagine it being totally unmanageable with >10.
08:24chousergithub has a bunch of other features: peer review tools, patch commenting, etc.
08:26cemerickyeah, the baked-in code review is attractive
08:27bsteuberhow about a wiki page that links to libraries? this would scale with the community
08:27ChousukeI think clojure.org is a wiki, so... there already is one :P
08:28cemerickactually, wouldn't clojars be the ideal canonical directory if it were widely used?
08:29LauJensenIt would require some kind of supervision
08:31carkhfrom the look of it, clojar has no clear text on what the library does
08:31rhickeycemerick: I've yet to see clojars act as a directory
08:33rhickeyso how does one find out how code review etc works on github? Do you just have to follow their blog?
08:34Chousukemost likely :P
08:34rhickeyis documentation anathema to ruby-based sites?
08:34Chousukeit seems you can just open the page for a particular commit and leave a comment
08:38bsteuberI'd love to see libraries by user-added tags and number of references from project.clj/pox.xml files on github
08:38chouserrhickey: I just added a line note near the bottom of http://github.com/richhickey/clojure/commit/c733148ba0fb3ff7bbab133f5375422972e62d08
08:39chouseryou can also see the box there to add a comment for the whole commit
08:41rhickeychouser: yeah, I saw little icons and plus signs and figured that out, but not the same as docs
08:41chousertrue
08:41cemerickrhickey: yes, it would definitely need to expose a proper listing, and people would have to populate the description field in their poms / project.clj files.
08:42rhickeypoms and project.clj files - do we need both?
08:42cemerickno, but some people use the former, others use the latter
08:43chouserpoms will be .clj eventually
08:43cemerickah, only poms are pushed to the repo, which makes sense
08:45cemerickI don't think XML will be overtaken, even among clojure projects.
08:45rhickeychouser: yes, I'm wondering why people don't apply their efforts to polyglot and make the clojure support awesome, lein is just going to be burdened with replacing all of maven eventually anyway, and we will be left on our new island. Clojure is about getting off of the Lisp island.
08:45rhickeynot that pom files aren't hideous
08:45cemerickrhickey: clj polyglot is pretty damn great already, it turns out. I've been fiddling.
08:45rhickeycemerick: cool
08:46bsteubercemerick: do you have a good tutorial?
08:46chouserrhickey: it is interesting to hear you weigh in on this -- I had assumed you were intentionally avoiding voicing an opinion. :-)
08:46cemerickbsteuber: I'll put up another screencast when I get through my current queue.
08:46bsteubercool
08:46chousermaven pom.clj files look very nearly identical to lein project.clj files
08:47cemerickit was sort of inevitable, given that it uses maven for deps and that there's only so many ways to skin the cat :-)
08:47rhickeychouser: going through the labrepl effort, we found that maven/POM is a lingua franca - if people use it for their projects they will have the greatest reach. IDEs and other tooling aren't going to support lein anytime soon
08:48bsteubercouldn't we just use a 1-to-1 mapping from xml to clojure?
08:48chouserit's very good that lein projects play well with the maven universe -- producing poms, able to be a dep and have deps from maven
08:48rhickeygiven a pom, you can just open a project and go in any of the IDEs
08:48chouserbsteuber: I think polyglot maven is either that or very close.
08:48rhickeychouser: but what is the round trip? Does lein modify its part of the POM or replace the whole thing?
08:49bsteuberic
08:49cemerickrhickey: of course, tooling support will likely never be at parity for polyglot
08:49cemerickit's a one-off generation each time
08:49rhickeycemerick: same question, what's the round trip (if any)
08:50bsteuberI think lein replaces the whole pom
08:50cemerickall the polyglot impls are supposed to provide stable round-tripping. I don't think lein will generate a project.clj from a pom, but I could easily have that wrong.
08:51rhickeylein would have to make sure it preserved and didn't trash anything it didn't understand
08:51rhickeyat that point, it would have to become a clojure-syntax dialect for maven, which is what polyglot is, no?
08:52cemerickright, exactly
08:52_atolein currently doesn't read poms at all and I doubt there's any intention of making do so
08:52chousermy point is simply that having chosen to use lein is not a dead-end decision. You're not forcing other projects to use lein just provide/consume the dep, and if you decide later to switch to maven it's not likely to be difficult.
08:52bsteubercemerick: do I have to manually call "clj->xml" and "xml->clj" when updating any of the poms? or does it somehow automatically do this from timestamps?
08:53chouserI for one am planning to learn maven.
08:53cemerickrhickey: to be clear, each polyglot impl is supposed to support the *entire* model, so there shouldn't ever be a part of an XML pom that can't be converted to a pom.clj
08:53rhickeycemerick: right, I presumed as much
08:53cemerickbsteuber: going back and forth between xml and clj really shouldn't be a common operation, or really one that you should have to worry about.
08:54rhickeyI'm not saying maven is great, and quite frankly it frightens me, but wheel-reinventing and islands frighten me more
08:54cemerickrhickey: been there, done that? ;-)
08:55bsteuberrhickey: so when does clojure itself switch to mvn?
08:55chousercontrib already uses mvn
08:56bsteuberI know
08:56underdevchouser: have fun!
08:56chouserclojure currently has no deps, so little value there.
08:56rhickeychouser: so I commented on your line comment, and feel as if that discussion is completely in the wrong place, not connected to the issue, trapped in a single commit
08:56chouserunderdev: :-/ yeah, I know.
08:57rhickeybsteuber: for what purpose? I don't even understand why contrib is maven. Someone posted a bug on that, in fact
08:58bsteuberhm, I think I'm just a fan of "one tool to rule (build) them all" - but I see it's not urgent at all :)
08:58cemerickrhickey: The maven release process is pretty compelling.
08:58rhickeycemerick: but what about that has to do with building?
08:59chouserrhickey: yeah, it'll be interesting to work out when/if commit comments make sense.
08:59cemerickrhickey: builds have to produce artifacts, which need to get into repositories eventually, and ideally be reflected as being associated with particular commits, etc.
09:00rhickeycemerick: is any of that happening with contrib?
09:00cemerickIMO, "the build" is everything that happens from the time a programmer types the last paren to when the end-user gets the software on his systems.
09:00chouserha!
09:00rhickeyI found this interested re: associating with commits, and other issues: http://dustin.github.com/2010/04/01/why-not-maven.html
09:01cemerickrhickey: Not sure. I think it was on Stuart's plan, tho he may not have gotten to the release automation part.
09:01chouser"from the time a programmer types the last paren" <- love it
09:01rhickeyall I know is building contrib got harder for me, and much uglier
09:02cemerickpart of that is that core isn't using maven, so there's some bridging that has to happen there now
09:02rhickeywhy does it always print "no sources to compile" and "no tests to run? every time it compiles and runs tests?
09:03cemerickNot sure, but that's probably it looking for Java sources to compile and test.
09:03mattreplplaying well with others seems important
09:03cemerickIt's a simple thing to disable that if it matters.
09:03LauJensenrhickey: So you strongly favor ant for building Clojure projects?
09:04rhickeyLauJensen: I didn't say that, just trying to tease out the costs/benefits
09:04LauJensenOk great
09:04rhickeyany was simple to install, few deps, worked well
09:04rhickeyant
09:04vu3rddrhickey: I along with another guy package clojure/clojure-contrib for debian
09:04rhickeymaven was big and ugly and didn't seem to produce a different result
09:05_atofor contrib and core, depedendency management is basically overkill. For other projects that necessarily have more dependencies its useful
09:05vu3rddcontrib definitely is a bit of pain to build as debian does not allow "pulling the whole internet" to do the builds.
09:05vu3rddwe need to use the maven local repo.
09:05rhickeyanyway, what say maven fans to the critique I linked to above?
09:06vu3rdddebian folks have a wrapper for maven which uses only the local repo
09:06underdevmaven fans? oh maven fans....
09:06underdev<crickets>
09:06cemerick9.9
09:07cemerickbbl
09:07bsteuberrhickey: I'm a mvn newb myself, but I guess the point is that stuff like IDE integration as you said outweigh most of its warts
09:07vu3rddant definitely is much simpler
09:08bsteuberalso, we could just write better clojure-specific mvn plugins that do the jobs
09:08bsteuberI'd love a clojure-framework to support writing own maven plugins :)
09:08bsteubershould not be hard, I guess
09:08underdevchouser is on it!
09:09underdevyou've been volunteered
09:09chouserugh -- that critique worries me, because it's exactly the friction against unusual build requirements that's prompting me to learn maven.
09:09chouserso if maven is going to fail me in that regard ... :-(
09:11_atoI had much the same experience with maven, island or not at least a lein plugin is trivial to write. Ant + maven tasks is probably also a reasonable solution, use ant for your builds and maven only for dependency management
09:11chouserIDE integration isn't much of a plus for me. Actually, almost a minus as things that have IDE integration often seem to *need* it to mitigate other weaknesses.
09:11chouserI'm looking at you, Java.
09:12rhickeychouser: but library authors should care that people who use IDEs might want to work with their lib in an IDE
09:12_atostandard directory structure is about all that it needs
09:13rhickeyemacs+slime rulez is just going to limit the reach of Clojure
09:13rhickeyand good Clojure people have written good IDE support
09:13chouserwell, I wasn't advocating slime either. :-)
09:13rhickeycli rulez
09:13chouserthere we go
09:13rhickey:)
09:14carkhwhat's cli ?
09:14jcromartieif I wanted to use Clojure at work, I would absolutely need to show them an Eclipse/IDEA/NetBeans plugin
09:14underdevcommand line interface
09:14carkhunderdev: thanks
09:14jcromartieand say "look! *click* *click* *click* It's just like Java"
09:14LauJensencemerick makes a good case for Netbeans + Maven I think
09:15chouserno, I definitely want my libs to play well with others. clojure-jna for example needs to be updated to declare deps and be accessible as a dep in some good "standard" way.
09:15chouser...which apparently means *some* amount of work to obey lein or maven rules.
09:15LauJensenwell. He's fond of it. The "simplest possible xml config" weighing in at 38 lines with mysterious keywords scattered was unattractive
09:15rhickeyif it was a big deal, or even required touching an IDE to make you lib IDE-friendly, that would be one thing, if it's just a matter of a (possibly generated) POM...
09:16bsteuberI think if we really care about the island thing, there's no escape from maven - so the best we can do is thinking of how to make it as usable as possible for clojure folk
09:16chouserso in the context of a little lib like clojure-jna, I'm doing nothing unusual, just need some deps -- don't even need to AOT compile -- just writing a pom or having lein generate one for me is attractive.
09:17bsteuberand actually, I do sometimes want to deliver a clojure app as mac os bundle or using webstart, where existing mvn plugins are a blessing
09:18vu3rddit will be great if we have a simple config with key-value pairs of project name, version, dependencies with versions etc etc and a tool chich generates project.clj or pom.xml or whatever
09:18chouserbut at work we have a relatively complex build system -- code in at least 4 general-purpose languages, files in at least 3 other DSLs each with their own code generator (each generating at least 2 languages)...
09:18LauJensenThere's also Gradle...
09:19chouserwhat we've got now works, but requires lots of coaxing and hand-holding. I'm hoping maven will allow me to clean all that up, but "why-not-maven" worries me.
09:19chouserI guess I'll still give it a try...
09:20stuartsierrachouser: Maven will help somewhat by forcing you to clarify the relationships between projects/modules.
09:20stuartsierraBut it might also require rethinking your entire build.
09:20underdevbsteuber: i watched a screen cast where they used maven in netbeans to make a .dm... was excited. Then when it kept failing to build, or even find, the stuff for labrepl, i really didn't know where to begin. Maybe i have a hard time abstracting the java stuff from the maven stuff...
09:21chouserthe relationships are clear, I think. starting from a clean checkout everything builds fine.
09:21chouserthat is, all the internal deps are declared so that things build in the right order
09:21underdev"pc load letter" all day.
09:22chouserunderdev: what does that even mean?
09:22_atochouser: from my experience maven works fine on simpler apps, basically anything that can fit witin its cnoventions. I simlarly converted a lot of Java apps that used monsterous mixes of shell scripts and windows batch files at work over to maven. More complex stuff is doable if you're willing to invest a heck of a lot of time -- the documentation is generally terrible and the user interface (ie config files and command-line)
09:22_atolikewise.
09:22chouser_ato: :-(
09:23_atoI'd really like to like maven, really.
09:23LauJensenYou're not selling it very well ato
09:23_atoI wish it were the answer to my problems
09:23bsteuberunderdev: same problems for me, but I hope once I'm done with the mvn books it all will be a breeze
09:23LauJensenIn this context, what do you guys think about Gradle, it seems pretty mature
09:24underdevand i found a really nifty pom to put stuff on google app engine. There may come a day where the pain of learning is outweighed by the benefits of using it. This day, at least for me, is not that day.
09:24chousergradle *requires* me to use yet another language with it's own irregular syntax?
09:25LauJensenI dont know what you mean by irregular, Groovy as a language is straightforward and easy to pick up
09:25underdevotoh, maven smells like a tool that a tool like an ide would like.
09:25_atobut right now it's just not good enough, I mean sure its got zillions of plugins and IDE support and such, but if it takes me 3 times as long to figure out how to use them than to hack a up quick lein plugin or shell script then I'm happy on my island
09:26underdev^^^^^
09:26LauJensenYea the Lein island is happy island :)
09:27bsteuberso how do I deploy swt applications for different OS'es using lein?
09:27underdevi was just going on a three hour tour...
09:27bsteubermy impression was that lein stops being that simple once you want more than a simple clj project with jar deps
09:28bsteuberbut maybe I just didn't learn enough
09:29LauJensenlein doesn't have the myriad of plugins that Maven does, but shouldn't there be a sensible division between building and deploying?
09:30cemerickLauJensen: so, there's a sensible division between automating stuff using existing tools, and rolling your own half-baked solutions? </snark> ;-)
09:32LauJensencemerick: Oh thats right, you considered it a single task
09:32LauJensenWell I can follow that logic as well, but as Maven has proven, that complicates the matter a little bit
09:32chousercemerick: are you back? do you have a response to that page rhickey linked to?
09:33_atoI don't deploy SWT apps to 3 platforms. What is there to it? To me it's build an uberjar and let people download it. If you want installers and such then that's up to you figure it out. Use maven if it fits, or extend lein, or use some other tool that's whole purpose in life is making installers
09:34cemerickchouser: coming back slowly :-)
09:34bsteuberato: the point is, swt uses native libs, so you need different uberjars depending on your user's OS
09:35underdevthere is yet another tack possible. Making lein do more maven monkey tricks. I forked it to nose around in it, to see what might be done.
09:35chouserI don't see the line where building stops and deploying starts. To build, I need to fetch deps, so I need to declare what they are. To deploy a lib I need to declare what I provide and what else you might need. Shouldn't that all be declared in a single format in a single file?
09:35cemerickunderdev: That makes *no* sense IMO. Gradle is the endpoint of that approach, which I don't think serves anyone.
09:36underdevexcept one would need facility in clojure, not groovy
09:37_atobsteuber: as far as I know, someone added native library support, I'm not sure how extensive it is. In any case it'd be trivial to write a custom lein task that pulls in the files you need for each platform and spits out 3 uberjars
09:39underdevi think it would be cool to have a dir, drop a pom in it, and lein does the rest
09:39underdevit would make sense to me, perhaps only to me...
09:39bsteuberato: hm, okay - I got stuck when trying, but this was prabably lack of determination (and lein docs at that time), so I used a shell script instead
09:40cemerickunderdev: you just described polyglot maven :-)
09:40stuartsierrarhickey: I'm just joining this conversation, reading your comments re Maven for Contrib.
09:40stuartsierraMy goal with switching contrib to Maven was to simplify the build.
09:40underdevthat's not ready for primetime, rt?
09:40cemerickunderdev: very, very close
09:40cemerickscreencast coming soon :-)
09:41underdevexcellent
09:41stuartsierrarhickey: The build.xml for contrib was several hundred lines, difficult to modify, and buggy.
09:42stuartsierraThe pom.xml for contrib, even with extra configuration, is 137 lines, all declarative.
09:42rhickeystuartsierra: what did it do?
09:42stuartsierrathe build.xml?
09:43rhickeymore generally, what's involved in building contrib?
09:43stuartsierrarhickey: Sure, but it's more complicated than that now. Bootstrapping core.clj, AOT-compiling, ...
09:44stuartsierrarhickey: Building contrib has 3 steps: 1) compile gen-class'ing Clojure sources, 2) test, 3) build a JAR
09:44npoektophi! if i use a macro from another file, and i change that file, i must recompile macro-using-file explicitely. Is there a way to automatically recompile all those files that use a macro when i change a macro?
09:45stuartsierrarhickey: The Ant build script AOT-compiled .clj sources in two stages, the gen-class ones first, in a specific order.
09:45Chousuke137 lines still sounds like a lot but I suppose a fair chunk of it is either boilerplate or XML's natural verbosity.
09:45underdevlisp's mortal enemies
09:46stuartsierrarhickey: The order of compilation turned out to be important. After switching to Maven, several bugs were exposed regarding the order in which files got AOT-compiled, which we were able to fix.
09:46stuartsierraNow the build doesn't depend on any particular order in which files get AOT-compiled.
09:46Chousukeunderdev: poms are declarative, though, so it's not so bad.
09:46underdevrt
09:46chousernpoektop: I don't think there's any automated solution to that.
09:47LauJensenstuartsierra: sounds like quite an improvement
09:47underdevbut being declarative, they're operation isn't transparent. but that's a whole 'nother kettle of fish
09:47licoresseGot a Kinder-egg toy today that i could'nt build :(
09:47underdevtheir*
09:47cemerickrhickey: regarding that link you posted a while back: if you're using maven to cut releases, you use the release plugin, which will auto-increment the version number (or you can specify it, *once*), and then it will do a clean checkout, twiddle the version number, do the build, run the tests, deploy the artifact(s), and then tag and push a new SCM commit using the version number you specified.
09:47stuartsierraLauJensen: It was messy for a while, because we had to find those bugs and fix them, but I think I can safely say that the contrib build is safer and more predictable now.
09:48LauJensenGreat - I think I'll make an attempt at understanding it :)
09:48rhickeystuartsierra: I'm all for it being easier to maintain. Is there any way to keep it from saying no sources/no tests while building?
09:49stuartsierrarhickey: probably not, because that's part of the default build lifecycle
09:49cemerickstuartsierra: no, there is
09:49stuartsierracemerick: how?
09:50cemerickstuartsierra: if we're talking about compiling java files, you can evict maven-compiler-plugin from the compile phase
09:51stuartsierraoh really?
09:51stuartsierrarhickey: The biggest problem with Maven, I think, is that it's an all-or-nothing deal. It works best when it can control everything.
09:53underdevthere was a blog post comparing it to tai chi or something, you do best when you yin it's yang, or something to that effect
09:55stuartsierracemerick: Do you know how to disable maven-compiler-plugin in the POM?
09:55underdevYOU'RE YANGING!!
09:55stuartsierraunderdev: I am indeed.
09:56_atomaybe you use this custom lifecycle stuff and remove it from the compile phase? http://www.sonatype.com/people/2009/08/create-a-customized-build-process-in-maven/
09:57cemerickstuartsierra: fiddling now
09:59underdevwhoa, mengu!
09:59underdevhahahahhahahaha
10:00menguhi underdev :)
10:01menguyeah from twitter :P
10:01_atothis is what I mean by its pretty easy for simple stuff but as soon as you need to do something custom you hit a brickwall of new terminology and what appears to be complexity for complexities sake. Sure it *can* do everything but the learning curve is a cliff face and you don't have any chalk -- climbing it hurts!
10:02djpowellhow does maven make it easier to use someone else's library? just sticking the jar files in your lib folder doesn't seem that hard anyway. I don't see how maven makes anything more noob friendly. i feel I wouldn't be remotely qualified to use it unless i'd read a book explaining all of its concepts and processes, and persuaded everyone on the project to do the same; and i'd just rather spend that time doing something else, like
10:02djpowellwatching tv or something
10:02underdev nice
10:02_atoare the books on it any good? do they help?
10:03chouserdjpowell: I want to use ring. ring has a half-dozen dependencies. So, should I go and download each of those deps manually?
10:03djpowellit doesn't seem to be that much of a chore
10:04chouserreally!? when I have to do it again each time I upgrade ring?
10:05carkhring should have the libraries in its source control, problem solved
10:05djpowelli don't know - perhaps if you work on lots of very short projects, that are very dependency heavy, then downloading dependencies starts to take up a significant portion of development time, but I don't usually hit that problem
10:05naeuin Ruby I can create a big array of numbers like so: a = (0..10000000).to_a
10:05cemerickcarkh: I'll pretend you didn't say that. :-)
10:05carkhcemerick: hehe that's what i do on my own projects
10:05naeuhowever, if I try something similar in Clojure I run out of memory: (def a (vec (range 10000000)))
10:06cemerickoy
10:06carkhwhy is this a problem ?
10:06chousercarkh: sure, but then the ring dev has the same problem -- he's got to fetch all his deps manually. Also it means I can't just use his jar anymore, I've got to use his revision control tool and fetch his code.
10:06hiredmannaeu: the default jvm heap is small
10:06cemerickfor one, your source repo will grow very, very large over time
10:06_atonaeu: the JVM has a heap limit you can set on the command-line with eg. -Xmx512m for 512MB
10:06naeudoes Clojure use more memory than Ruby in this kind of situation, or does the JVM place more constraints on memory availability?
10:06cemerickbut beyond that, what chouser said :-)
10:07naeuwhat might the default jvm heap size be, and how might i determine it?
10:07cemerickstuartsierra: OK, I lied. You can unbind executions for plugins that don't bind themselves automagically, which is what maven-compiler-plugin does. :-/
10:07carkhcemerick: repo size isn't a problem these days, as for chouser, the maintainer has to pick and choose manually anyways
10:08cemerickcarkh: when each version of the dependencies is 1, 2, 5, 10MB, that's still a problem
10:08stuartsierracemerick: That's what I thought.
10:08hiredman~google default jvm heap size
10:08clojurebotFirst, out of 18500 results is:
10:08clojurebotHotSpot Internals - Understanding Xss- java stack internals
10:08clojurebothttp://forums.sun.com/thread.jspa?threadID=756468
10:08chouserthere's a reason that every dev environment has tools to address this problem: apt, yum, etc. for C/C++ dev, CPAN for perl, gems for ruby, etc. And apparently maven for java.
10:09carkhcould be overengineering
10:09chouseryep, could be. But it isn't. :-)
10:10stuartsierraProgrammers love automating things.
10:10underdevi think we all want dep management, but we want it be more like fishing than diving into the icy arctic waters of alaska with a k-bar in our teeth
10:10chousercemerick: so there's no way to prevent maven from trying to compile java files? or am I misunderstanding?
10:11cemerickchouser: you can set an exclude, so it won't ever compile anything, but no, it looks like the compilation is hardwired.
10:11stuartsierraI think it can be prevented, but at the cost of defining a new project lifecycle. Seems hardly worth the effort.
10:12cemerickchouser: Seriously? :-|
10:13chousercemerick: it betrays a troubling design attitude.
10:13djpowellI don't think apt and cpan etc are build tools as well as binary libary download tools are they?
10:13_atodjpowell: they are
10:13_atowell in some sense
10:13chouserdjpowell: taken together, they are.
10:13chousercpan certainly does builds of native libs
10:13_atodepends what you define apt as being, but all the apt tools together are
10:13metronomenaeu: ruby does use a whole lot of memory for that as well
10:13_atoand cpan definitely is
10:13stuartsierrachouser: It's not hard-wired into Maven, but it is hard wired into the "jar" lifecycle, which assumes you're building Java software.
10:14chouserstuartsierra: ah, that's a bit better.
10:14cemerickchouser: It's funny, people complain that maven "downloads the internet" because it doesn't ball up all its bits into a massive download, but people complain when it always does certain incredibly common things because it shouldn't be making assumptions. :-P
10:14stuartsierrachouser: So we could define a "clj-jar" lifecycle, which might be useful at some point.
10:14naeumetronome: I'm sure it does - it's just that I'm new to the JVM, and so it's interesting to know the constraints and how I might get a feel for them from within Clojure
10:15chouser_ato: right. apt sits on top of dpkg and friends which definitely includes a complex multi-language build environment. With 'make' down in its guts somewhere.
10:15metronomenaeu: I know I was just saying :) but yeah there is a per-platform maximum heap size
10:16naeumetronome: is there some way of accessing these JVM settings from within Clojure?
10:16djpowell,(.maxMemory (Runtime/getRuntime))
10:16clojurebot66650112
10:16underdevyeah, i'll take apt-get with maven in the guts some where.
10:17naeudjpowell: thanks :-)
10:17djpowellyou can also look at System/getProperties, and JMX for even more stuff
10:18naeuis there a way of listing the static/instance methods of a Java object from within Clojure?
10:18chousernaeu: clojure.contrib.repl-utils/show
10:18naeuat the moment I always refer to the documentation
10:19naeuchouser: oh great, thanks!
10:21chouserhuh -- clojure could determine at method-resolution time (either compile time or at runtime reflection) when a method has varArgs, I think could automatically wrap in an array for you.
10:21chouserwould that be desirable?
10:22stuartsierrachouser: how would it distinguish between varArgs and a single array argument?
10:23bsteuber,(map #(.getName %) (.getMethods (.getClass (java.lang.Integer. 5))))
10:23clojurebot("hashCode" "reverseBytes" "compareTo" "compareTo" "equals" "toString" "toString" "toString" "toHexString" "valueOf" "valueOf" "valueOf" "decode" "reverse" "byteValue" "shortValue" "intValue" "longValue" "floatValue" "doubleValue" "parseInt" "parseInt" "toOctalString" "toBinaryString" "getInteger" "getInteger" "getInteger" "highestOneBit" "lowestOneBit" "numberOfLeadingZeros" "numberOfTrailingZeros" "bitCount" "rotateLeft"
10:23_atothe compiler knows how many args you passed in
10:23_atoah
10:23_atobut if there's only one it doesn't
10:23chouser,(map #(.getName %) (filter #(.isVarArgs %) (.getMethods String)))
10:23clojurebot("format" "format")
10:24stuartsierraah
10:24_atonice
10:24djpowellah - i didn't know the jvm even knew about varargs
10:25chouserI suppose it would complicate already rather complicated method resolution logic.
10:25npoektopi've just showed slime to my co-worker, and he said he would never spend years learning emacs just to use this tool.
10:26djpowellshow him nxml-mode!
10:26doseqEmacs is an archeological artefact.
10:27doseq;)
10:28hoecknpoektop: what is the preferred editor/IDE of your co-worker?
10:28cemerickdoseq: no ;-) necessary :-)
10:28npoektopi don't know that word: weakling or smth?
10:28npoektophoeck, eclipse
10:29doseqcemerick: I'm too old to be genuinely provocative.
10:29djpowellI don't use emacs for Java unless I need to go query-replace-regexp crazy, I use it about 50% of the time for clojure, and I use it for text and xml.
10:30cemerickdoseq: yeah, I'm feeling aged myself in that vector
10:31stuartsierraemacs is like religion, you have to be indoctrinated early
10:31cemerickThe church's best days are long, long past.
10:31_atowhat converted me was on and off over a long time watching a competent emacs user colleague use it. The speed and ease with which they got things done was tempting enough to override the learning curve. It's not for everyone though, it seems to take a certain type of crazy. I was already halfway down that path anyway.
10:32stuartsierraSomeone remarked to me that all the original Emacs devs were pianists (like me), which is why they weren't bothered by seven-finger commands.
10:32doseqI would tolerate it if they used a modern approach to interface design and exposed features gradually.
10:33doseqEclipse is the same. Developers need a bang on the head to say, hey, users haven't seen every step of the development curve like you have. They possess no mental model... you're approach is wrong.
10:33tcrayfordI've been tempted to write a game like learning mode for emacs
10:34tcrayfordThe clojure dojo I go to spends ~90% of the time struggling with emacs :(
10:34LauJensendoseq: You have been flagged for criticizing Emacs once - The second offense results in immediate and permanent ban from the Internet
10:34djpowellI discovered that emacs lets you edit .patch files the other day, and automatically fixes up the hunk headers, and will also tidy up superfluous white-space differences. That is pretty cool.
10:34_atoEmacs not being built like a modern GUI app is half the point of it
10:34doseqLauJensen: noes! :D
10:34stuartsierraI learned Emacs from the tutorials, it's not that hard really. But you have to take the time.
10:35doseqWell, it doesn't even need to be a GUI... just an expositional text UI would do it.
10:35Chousukeemacs is not built like a modern GUI app because it is not one :P
10:35djpowellthe tutorials eschew things like the arrow keys though, which is a bit too hardcore
10:35Chousukeit has its own UI paradigms
10:35doseqThey just throw everything in there and hope you won't notice how confusing it is.
10:35Chousukethat's not true either.
10:36_atotry the tutorial
10:36doseq*shrug* I have my own views.
10:36tcrayfordhaving to take the time to learn emacs has put quite a few people I know off even trying clojure :/
10:36Chousukeemacs development started back when you needed to read manuals to even boot a computer :P
10:36LauJensentcrayford: If Emacs was too hard for them, Clojure would have killed them
10:36cemericktcrayford: point them at any of the very nice IDE plugins!
10:36cemerickLauJensen: that is categorically false
10:37tcrayfordagreeing with cemerick there
10:37tcrayfordclojure has been easier to learn than any other language I've tried
10:37LauJensenYou can agree all afternoon, doesn't change the fact that if you cant figure out a text editor, functional programming is beyond you
10:37cemerickemacs is too hard for me, thanks very much. Or, I should say, I've got better things to do than fiddle with .emacs files all day.
10:37LauJensencemerick: like fiddling with Maven? :)
10:38doseqClojure has that nice quality of being easy to get started... (+ 1 2 3) is the gateway drug.
10:38tufflaxLauJensen emacs is not hard in the same way, not that clojure is all that hard
10:38underdevboom goes the canon, no braggin, try to read my mind just imagine
10:38_atoheh, both Emacs and Clojure are pretty mind-blowingly different from the status quo
10:39doseqMind you, I came from reading Little Schemer and it's WAY better than that.
10:39cemerickLauJensen: yeah; one influences my lonely editor, the other I can use to automate my entire software development process.
10:39doseqF*ck car and cdr, and cdddr or whatever else they thought was super-awesome back in the 60s.
10:40LauJensendoseq: Watch your language please
10:40doseqLauJensen: is my self-censorship not sufficiently powerful?
10:40tufflaxhaha
10:40LauJensenNo- Take a lesson from China
10:41doseqWell, car and cdr deserve it.
10:41LauJensenAnyway - I weigh preferences heavily, so that if one like cemerick prefers Netbeans I think its very great that the option is there, but I struggle to take it seriously when people "cant figure out Emacs"
10:41cemerickMy liking NetBeans vs eclipse vs intellij has essentially nothing to do with the IDEs themselves.
10:42doseqI don't think it's that they couldn't figure it out, just that most of the population isn't masochistic enough to bother.
10:42cemerickI'm totally agnostic w.r.t. IDEs, build tools (despite what people think), and anything else that is auxiliary to what I'm actually trying to get done.
10:43LauJensenI'm completely with you on that cemerick
10:44cemerickLauJensen: Be more empathetic then. :-) Most people really, *really* don't care about their editor, so when presented with a huge opportunity cost for learning emacs, it's totally rational for 95% of all devs to walk away happily.
10:44naeuI like emacs - in general i like anything that's sufficiently challenging that the processes of mastering it teaches in abundance
10:44doseqI got a lot out of reading the UNIX creators' writing about cognitive engineering and their idea of how software tools should snap together thought-wise. Not saying UNIX ever really pulled that off totally, but it was/is a good idea.
10:45naeufrom that perspective I draw parallels between emacs and clojure
10:45tomojis clojure missing a fold operator?
10:45chousercemerick: good luck
10:45hiredmantomoj: seriously?
10:45chousertomoj: 'reduce'?
10:45tomojyes, but what about the other one
10:45cemerickchouser: I am zen. I am like the earth, trammeled yet immovable. ;-)
10:46tomojit's chiral
10:46esj+1 for chiral.... nice word
10:46cemericktomoj: reduce over an rseq?
10:47tomojhmm
10:47cemerickI presume you're talking about foldRight, in scala terminology
10:47tomojyes, one or the other
10:47cemerickor, er, foldLeft. I could never remember which is which.
10:47tomojI can't figure out now which is which
10:47cemerickha!
10:47cemerick#scala FTW!
10:47hiredmanclojurebot: foldl?
10:47clojurebotNo entiendo
10:48hiredmanclojurebot: fold?
10:48clojurebotfold2 is (defn fold2 [f1 acc1 f2 acc2 list] (if (nil? list) [acc1 acc2] (recur f1 (f1 (first list) acc1) f2 (f2 (first list) acc2) list)))
10:48hiredmanclojurebot: very helpful
10:48clojurebotPardon?
10:49tcrayfordcan't you just use reverse before a foldl?
10:49tcrayfordseeing as you're walking the list anyway
10:50tomojfold2 is broken
10:51tomojit should be this https://gist.github.com/1e0df667660e862d7a0c
10:51webwandererhi, the repl says that it can't resolve 'rename'
10:52webwandererare these library functions?
10:52webwanderer,rename
10:52clojurebotjava.lang.Exception: Unable to resolve symbol: rename in this context
10:52tomojwhat would be better would be to have an easy way to define fold operators on sum types
10:52hoeck,clojure.set/rename
10:52clojurebot#<set$rename__7548 clojure.set$rename__7548@1203412>
10:53webwanderercool
10:55LauJensencemerick: Sure they can walk away, and many do and thats fine. My point is simply, that in the context of learning a functional Lisp, please dont play the "I cant figure out Emacs" card. It seems like a distorted argument
10:57cemerickLauJensen: that's just shorthand for "It's not worth spending time on this."
10:57doseqI get the feeling this comes up a lot.
10:58LauJensencemerick: How would you know, if you never learned? :)
10:58chouserLauJensen: conversely, I would ask again that you refrain from hobbling potential Clojure users with the impression they also must learn this other largely unrelated project, regardless of their size.
10:58LauJenseneh?
10:59chouserit's size
10:59LauJensenhobbling?
10:59chousertripping them up
10:59LauJensenchouser: Like I said "walk away and thats fine" - I'm really the most happy when everybody is using what makes them most productive. For you its Vim, for cemerick its Netbeans, for me its Emacs - I have no preference on your behalf
10:59underdevstop breaking the knees of short people interested in clojure!
11:00tomojdoes this mean we shouldn't talk about emacs?
11:00cemerickLauJensen: I've never learned objc, and I know it's not worth spending time on it. :-)
11:00LauJensencemerick: Tell that to the many self-made millionaires using objc :)
11:00cemericktomoj: I think it just means that, when talking to totally new potential clojure programmers, point at IDE plugins first.
11:01underdev#clojure #clojure-emacs #clojure-editor-war #clojure-build-systems #clojure-just-clojure-dammit
11:01tomojok, unless they happen to like emacs ? :)
11:01cemericktomoj: or, in general, be context-sensitive/aware
11:01cemerickright
11:01doseqcemerick: I wish wish wish I could convince myself that manual memory management was worth the effort. Surely iPhone garbage collection can't be that hard.
11:02cemerickdoseq: ha! :-D
11:02tomojdoes it not do garbage collection because it needs some time guarantee?
11:02tomojlike GC causes unpredictable slowdown?
11:03stuartsierratomoj: It's an older language, when GC was still suspect.
11:04doseqWell, they introduced it in Obj-C 2.0 for the Mac. Just not iPhone.
11:04stuartsierrahuh, didn't know that
11:04doseqYeah, it's an option now.
11:05doseqI spent about a month reading Apple's documentation and then my head exploded.
11:05chousercemerick: rather than pointing toward IDE plugins, I'd suggest pointing toward whatever is closest to what they already like: IDE, emacs, vim, whatever.
11:05doseqEvery single page requires about 5 other pages.
11:06doseqAre there any visual expression builders for Clojure already?
11:07stuartsierradoseq: paredit, sort of
11:07stuartsierraI tried once: it's harder than it sounds
11:07doseqstuartsierra: building one you mean?
11:08stuartsierrayes
11:08technomancystuartsierra: you pinged a few days ago?
11:08technomancy(pang?)
11:08stuartsierratechnomancy: Yeah, was talking to talios again about getting a release of swank-clojure into Maven central.
11:08technomancyoh, ok
11:09technomancyI'm actually hoping to gather up what we've got into a 1.2.0 release
11:09technomancythe break stuff is pretty major
11:09doseqI started one the other day using HTML form elements to represent nested expressions, I'm fiddling with it.
11:09stuartsierratechnomancy: Cool, that would be an important first step.
11:09stuartsierradoseq: that's what I tried
11:10doseqstuartsierra: cool, if you ever want to pick it back up you can collaborate with me if you want.
11:11stuartsierradoseq: sure, if I ever have time to go back to it... :)
11:11doseqstuartsierra: I'll let you know how I go.
11:11npoektophey, guys, what time is now in Washington? I need Pacific time, but can't understand, it 8pm or 7pm
11:12hiredmanneither
11:12technomancystuartsierra: after that I'm wondering about handing off maintainership to hugod
11:12npoektopoops 8am or 7am
11:12technomancyhe's much more qualified than I =)
11:12npoektopor 9ma
11:12technomancynpoektop: depends on whether you honor the monstrosity of daylight savings or not
11:13stuartsierratechnomancy: ok, that's fine too. I'd like to get a repo set up for it somewhere, so whoever's maintaining it can sync to central.
11:13technomancyfor those that do it's a little past 8am
11:13npoektopi'm not sure. they said 01:00pm to 02:00pm PT
11:13technomancystuartsierra: can it sync from clojars?
11:15stuartsierratechnomancy: Not as it exists now. A sync-able repo must be complete, self-contained, and contain only releases.
11:15technomancygotcha
11:15technomancyso they can't just skip SNAPSHOTS
11:15stuartsierrano, nor can you say "sync just project X from repo Y"
11:16webwandererHow do I set the repl to pprint by default?
11:16stuartsierratechnomancy: But a repo is just a directory on a web server, so it would be possible to create a second repo on clojars, with some attention to management.
11:17technomancysure; just not a lot of demand from within the community for such a thing
11:18webwandererdefault pretty print.. anybody?
11:18webwanderer*default automatic
11:19stuartsierratechnomancy: it's necessary if the clojure maven plugin wants to use swank-clojure as a dependency.
11:20stuartsierraOr if we want to create Maven archetypes that set up the POM for a Clojure project with swank/contrib/etc. automatically.
11:20technomancyoh, not saying that's unimportant; just that users of clojars don't have a direct need for a releases-only repo
11:21stuartsierraWell, I'd become a user of clojars then...
11:21stuartsierraindirectly...
11:22stuartsierraBut I think if anyone is going to publish a library they should make the extra effort to cut a release.
11:22stuartsierraAll these snapshots all over the place are a nuisance.
11:23technomancydefinitely
11:23stuartsierrachouser: ugh
11:23technomancybut keeping them in the same repo has worked great for me so far
11:23chouserstuartsierra: :-)
11:24stuartsierratechnomancy: oh, sure, that's fine by me. Until you want to sync them to the rest of the world.
11:24technomancyseems like it would be the job of the sync process to filter out the unwanted versions
11:24technomancyI think that's pretty easy with couch replication
11:24stuartsierraPerhaps it should be, but it doesn't do that.
11:25stuartsierraMaven sync is just rsync mirroring.
11:25_atorsync --exclude '*-SNAPSHOT' :-P
11:25stuartsierraDon't blame me, I don't run it.
11:27technomancyI think it's a fine feature; it's just one of those many things that hasn't been implemented because nobody's needed it.
11:28stuartsierraWe need it to build a bridge off the clojars island. :)
11:29_atoshouldn't be too hard to provide a "release-only" view the Clojars repo, if that's all that is required
11:29_atoisn't there some stuff about signing packages and such as well though?
11:30stuartsierra_ato: I don't think packages need be signed, but they must have license/author metadata, and they must have no dependencies not available in the Maven central repo.
11:30stuartsierraIn other words, packages in Maven central may only depend on other packages in central.
11:33doseqWhen the docs say host booleans are "boxed", does that mean they're objects instead of primitives?
11:34lpetitdoseq: ye
11:34lpetits
11:34technomancycould just block snapshots from being downloaded when it sees the maven rsync user-agent. =)
11:34_atohehe
11:35doseqlpetit: thx!
11:36_atoI wonder if anyone's already built a tool for validating whether something meets the maven central criteria
11:36stuartsierratechnomancy: I don't think that would be sufficient: it's a manual application process.
11:36_ato:(
11:36stuartsierraAnd it still doesn't solve the self-contained dependencies problem.
11:38stuartsierra_ato: The criteria are simple: 1) no snapshots, 2) accurate metadata, 3) no external repositories
11:38_ato"To improve the quality of the Central Maven repository, we require you to provide PGP signatures for all your artifacts (all files except checksums),"
11:38_atohttp://maven.apache.org/guides/mini/guide-central-repository-upload.html
11:38stuartsierraah, ok, but there's a plugin for that :)
11:39stuartsierratalios knows more about this than I do
11:39_ato"This used to be the preferred process but we are no longer accepting rsync requests on a per project basis."
11:39_ato"Rsyncs will be provided for Forges that provide hosting services for OSS projects and other large project repositories that meet certain minimum criteria such as validation of PGP keys and pom contents as defined above. "
11:39_atowell I guess maybe Clojars counts as that
11:39_atoalthough it doesn't have PGP keys and validation
11:39stuartsierraYes, and sonian hosts a free Maven repo for open-source projects.
11:41_atohmmm there's 4 approved forges: Apache, Codehaus, Sonatype and Fusesource
11:42technomancystuartsierra: are test dependencies outside maven central OK?
11:42technomancyswank-clojure only has dev-dependencies
11:42stuartsierratechnomancy: I don't think so
11:42technomancyok, well the dev-deps don't make it to the pom currently anyway
11:42stuartsierraThat should be fine then.
11:44_atohttp://nexus.sonatype.org/oss-repository-hosting.html
11:44_ato"After the ticket is created, we will prepare repositories on http://oss.sonatype.org for you. We will update the ticket once it’s done. Normally it takes less than 2 working days."
11:44stuartsierraYes, I meant sonatype, not sonian.
11:45technomancyhaving a dependency on clojure from swank-clojure is kind of redundant anyway
11:46technomancywho's going to use swank-clojure without already having a dependency on clojure? =)
11:47stuartsierraright
11:47stuartsierraAnd clojure releases 1.0 and 1.1 are in central already.
11:48doseqIs it legit to implement a multi-user app in clojure by giving all the users their own namespace?
11:48stuartsierradoseq: no
11:49doseqWhat would be the idiomatic approach to that?
11:49stuartsierradoseq: implement a security protocol :)
11:49technomancydoseq: it might be OK if the app were centered around running clojure code or something
11:49technomancywhere each user could have a sandbox
11:49stuartsierranamespaces are not isolated or protected from one another
11:50technomancybut in general that's not a great idea
11:50_atoheh, yeah just what I was thinking, if the app is a multi-user Clojure programming sandbox...
11:50doseqYeah, it'd be a multi-user reader type situation where a web app intermediates the messages.
11:51stuartsierraThen if it's anything more than a toy you need isolation between users.
11:51_atodoseq: so a client/server model with accounts?
11:52doseqOh I see, because if they knew there were other namespaces they could just run some commands to find out what they are... gotcha.
11:52stuartsierrayep
11:53doseq_ato: Yeah I'm just doing some thought experiments on ways to expose the reader via a multi-user web app.
11:54hiredmanif reading is all you are doing you can just bind eval-reader or whatever to false
11:54stuartsierra(doc *read-eval*)
11:54clojurebot"; When set to logical false, the EvalReader (#=(...)) is disabled in the read/load in the thread-local binding. Example: (binding [*read-eval* false] (read-string \"#=(eval (def x 3))\")) Defaults to true"
11:54hiredmanman, message queues are handy, everyone should have one
11:55danlarkinamen
11:55hiredmanI can email someone this url, go take a nap, and when they click on the url a message goes in my queue which when delivered causes a siren.wav to play on my laptop and wake me up
11:56doseqhiredman: yeah it'd be a read-eval.
11:56_atodoseq: http://github.com/licenser/clj-sandbox/ may be relevant for you
11:57_atoyou have to be pretty restrictive though
11:57pjstadighiredman: what's the url?
11:57stuartsierrahiredman: There's gotta be potential for an app there.
11:57pjstadig:)
11:57_atoeg allowing java interop is basically a game-over
11:57hiredmanstuartsierra: right
11:57_atounless you whitelist it
11:57hiredmanit totally is
11:57danlarkinyeah give us the url so we can wake you up :)
11:58hiredmancan you imagine working on a project and the database guy is busy but will get your schema set up eventually
11:58hiredmanand you have a command you want to run once the schema is setup
11:58technomancydanlarkin: you still need to press two switches 8 feet apart and have three out of the five launch codes to do it.
11:58hiredmanyou give him a url to visit
11:58danlarkindamn!
11:59hiredmanand 'block-on-remote-button 10 && do-stuff'
11:59doseqThanks! clj-sandbox looks really interesting.
12:00danlarkinyou've gotta believe we've tried to breed soldiers with an 8 foot armspan for just this reason
12:00pjstadigfuturistic ninja robot soldiers?!?!
12:00pjstadigsweet!
12:00hiredmanclojurebot: fururistic?
12:00clojurebotNo entiendo
12:00hiredmanclojurebot: futuristic?
12:00clojurebotPardon?
12:01rhickeyI just pushed some perf tweaks, should help in many areas
12:01stuartsierrarhickey: great!
12:02rhickeyalso, you'll now get reflection warnings on unhinted aget/aset/alength
12:02pjstadigclojurebot: mascot
12:02clojurebotthe official mascot of clojure is a futuristic ninja robot
12:03chouserrhickey: count used to be inlined, but you backed it out May 29th. I'm trying to remember why.
12:04rhickeychouser: I think I was trying 2 things then, one was a specific overload for Counted
12:04doseqThis link is so amazingly helpful: http://bc.tech.coop/blog/docs/clojure-docs.html
12:07rhickeychouser: this new thing, foo + fooFrom just helps HotSpot split off the fast path, as was done for seq
12:08chouserok, that's interesting. I was about to ask what the value was, since the semantics appear to be unchanged.
12:09chouseror nearly. I didn't see how the null check first could be hurting anything.
12:46doseqIs there a way to disable Java interop?
12:48defnmy guess is no
12:49defn(class (str "abc")) => java.lang.String
12:49ipostelnikdoseq, in what sense?
12:50patrkrisis there a standard function to unzip a seq of n-dimensional vectors into a seq of n seqs?
12:50doseqipostelnik: like, a Clojure-only mode where arbitrary Java access isn't allowed.
12:51ipostelnikdoseq, most of clojure/core is still implemented in Java, though less so than 1.2
12:51bsteuberdoseq: guess you have to block . and all .methods by hand
12:51bsteuberi.e. ehen reading input
12:51bsteuberwhen
12:51doseqI'm just thinking ahead to Clojure-in-Clojure, probably best not to develop any bad habits early.
12:59defndoseq: if you're worried about that sort of thing (and i personally wouldn't be), just dont use java interop forms
13:00defni dont think you need to protect yourself from it
13:01doseqOk. It's also sort of an effort to delineate Clojure from Java, to figure out how possible it is to explain Clojure to people who know nothing about Java (and don't want to know). But thanks for that.
13:18Crowb4rpart of clojure's poweer is it's access to JAVA
13:20doseqAgreed, but from a teaching point of view the fewer tangents and rabbit holes, the better.
13:25metronomeclojure wouldn't make much sense without the interop though
13:26doseqBut the goal is to evolve into a bootstrapped Clojure-in-Clojure scenario where the JVM isn't a requirement any more.
13:29metronomeis it? that sounds cool but it will take a lot of work. I don't particularly like java but the JVM is incredible so it's a small sacrifice :)
13:30dakroneclojure-in-clojure allows for doing things like ClojureCLR with .NET interop much more easily
13:30dakroneso if you didn't care for the JVM, you could use CLR
13:30metronomeI'm still kinda new to the lisp world anyway, so I don't really know where clojure is going, was just my guess by having read the current codebase
13:32liebkedoseq: even after cinc, Clojure will be a hosted language, with much of its functionality residing in the host platform, whether it's the JVM or the CLR.
13:40dakronetechnomancy: did you get my pull request for leiningen?
13:41technomancydakrone: yeah, I've been sick for a week or so =\
13:41ztellmandoes anyone know if protocols are supposed to support variadic arguments?
13:41dakronetechnomancy: oh okay, I saw the flow of dev stop, wondered if you were traveling or whatnot
13:42technomancythat too
13:42dakronetechnomancy: is there any easy way to add java arguments to the 'lein repl' task?
13:45dakronetechnomancy: also; hope you feel better soon :)
13:45technomancyJAVA_OPTS works for -Dfoo=bar type stuff I think.
13:45technomancythanks, I'm on the mend. =)
13:45dakroneokay
13:45dakronethanks
13:52stuartsierraWith today's deftype patch, I get errors like "ClassCastException: <some deftype> cannot be cast to <another deftype>"
13:54stuartsierraWhere both deftypes have fields with the same names.
13:57patrkrisis it best practice to always deref a ref to retrieve its value although it is callable as a function? That is, is it best practice to do (@a-ref :some-key), even though (a-ref :some-key) works?
13:57stuartsierrayes
13:58Crowb4ryes
13:58stuartsierrarefs being callable is an implementation detail
13:59patrkrisright, thanks
14:08chouserstuartsierra: what? that's not guaranteed?
14:08stuartsierraI can't find the source
14:08stuartsierraAnd now it seems to have disappeared.
14:08stuartsierraNope, still there
14:09chousercallable vars doesn't fall out naturally from anything else -- that support seems to be hand-coded in Var.java
14:09chouserand I use that feature all over the place
14:10stuartsierraoh wait, I was talking about my deftype problem
14:10chouseroh, sorry.
14:10chouseroh, and you were talking about refs anyway, not vars
14:10chousersheesh
14:11chousersorry, I'll go back to not paying attention
14:13stuartsierraSomething to do with using reify to implement ILookup
14:14stuartsierraBut I can't isolate it.
14:16cemerickchouser: re: IDE plugins, I totally agree, every recommendation should be context-dependent.
14:16chousercemerick: yay. :-)
14:21stuartsierraFound it!
14:23stuartsierrarhickey: bug in latest deftype patch: http://paste.lisp.org/+235M
14:26stuartsierraThis happens in other situations too, this is just the simplest case I could find.
14:27stuartsierraSomething to do with binding of a reified ILookup at the call site, I think.
14:35chouserstantont: that's with latest master?
14:35chouseroops, that was supposed to be stuartsierra
14:35chouserthis works fine for me on master at the moment
14:36chouseroh, scratch that. I'm seeing the exception.
14:44brian__noob question> why does does this work with def but not defn? (def counter (let [count (ref 0)] #(dosync (alter count inc))))
14:47Chousukebrian__: how are you defining it with defn?
14:47brian__sorry, i missed the []
14:47brian__it works, sorry
14:48brian__i gues my question ,then , is what is the difference?
14:50Chousukenothing much
14:50Chousukedefn attaches some metadata and the fn actually has a real name instead of a generated one
14:50brian__why have two then?
14:50brian__ok
14:51Chousukedefn is syntactic sugar for defining functions
15:03chouserstuartsierra: I think I have a patch for your bug
15:03stuartsierrachouser: great!
15:07chouser...but I've got a vague suspicion I'm doing it all wrong.
15:09stuartsierraoh
15:09stuartsierrado you know what the cause is, at least?
15:10chouseractually, I think it is right. http://paste.lisp.org/display/97402#1
15:12stuartsierraI don't understand that code well enough to say.
15:12chouserIf I understand correctly, the code in Compiler that generated ILookupThunk checked that it was being passed the right type.
15:13chouserand if not, returned its 'this' arg. The reify code that replaced it didn't do that, so I put it back in.
15:13stuartsierraok, sounds reasonable
15:14chouserI assume that class comparison costs some performance, and maybe there's a faster way to do it, but this seems to give correct results and I think is in the right spirit.
15:14stuartsierraIt's all at compilation time anyway, right?
15:14chouserno, that class equality check is on every lookup
15:15stuartsierraoh
15:15stuartsierrathat doesn't sound right
15:15chouserin the cache-hit case even, to see if it needs to fault out and find a correct LookupThunk
15:16stuartsierrabut what do I know
15:16chouserI'm mostly concerned about the = there -- perhaps it should be .equals or 'identical?'
15:17chouserhm, I bet 'identical?' would be better.
15:18stuartsierraDo you know why reify was used for ILookup in the first place?
15:19chouserI would guess for simplicity -- replaced a couple dozen lines of ASM code with 2 lines of reify
15:19chouser...which should have been 5 lines of reify. :-)
15:19stuartsierraah
15:22chouserit's a bit unnerving how I reach back to experience with postscript and HP calculators to comprehend Compiler.java
15:23stuartsierrawell, it's a stack language, after all
15:24stuartsierraI've toyed with the idea of writing inline Java bytecode in Clojure.
15:39chouser~seen rhickey
15:39clojurebotrhickey was last seen in #clojure, 211 minutes ago saying: chouser: this new thing, foo + fooFrom just helps HotSpot split off the fast path, as was done for seq
15:39rhickeychouser: I'm working on stuartsierra's bug
15:39chouserrhickey: you saw my patch?
15:39rhickeyI did
15:40chouserok
15:40rhickeythanks
15:40rhickeydid you try it?
15:40chousermy patch? yeah, seemed to work.
15:41chouseroh.
15:41chouserwell, I only tried it on his test case. sorry.
15:42patrkriswhich thread pool does future use?
15:42chouserpatrkris: the same as send-off
15:43patrkrischouser: thanks
15:43stuartsierraI thought send-off always created a new Thread
15:43patrkrisstuartsierra: as I understand it, it uses an "expandable" thread pool
15:43hiredmanit's a pool, so it may cache threads
15:43stuartsierraah
15:43chouserclojure.lang.Agent/soloExecutor
15:44chouserwhich is a Executors.newCachedThreadPool
15:57rhickeystuartsierra: fix is up
15:57stuartsierrarhickey: awesome!
15:59rhickeychouser: the problem with your patch is that the classname won't exist when AOTing. My patch grabs the class of this and has the reify close over it
15:59chouseryep, I see it.
15:59rhickeyso, with your patch Clojure didn't build
16:00chouserI'm guessing I had some success when testing dynamically because old versions of the class sometimes existed
16:00rhickeythe problem you ran into was one of the reasons I put this in the compiler in the first place, had forgotten about the issue
16:01chouserclosing over the actual class value is a clever solution
16:01clojurebot-cp and CLASSPATH are mutually exclusive
16:01rhickeyI didn't think of is the first time
16:01rhickeyof it
16:01stuartsierrarhickey: see, now if you were building Clojure with Maven, the snapshot JARs would already be in the repository and I wouldn't have to wait for Hudson ...
16:02rhickeystuartsierra: builds from my machine should be canonic?
16:02stuartsierrasnapshots, yes
16:02chouserthey used to be. :-)
16:02rhickeychouser: not really, only releases
16:03rhickeystuartsierra: I disagree, having the build server reproduce the build is a good quality step, I could have things not checked in
16:03stuartsierratrue
16:04chouserdo seqs cache their hash?
16:04rhickeyit's there now
16:04stuartsierraok
16:06stuartsierraI found my copy of maven-ant-tasks.jar anyway :)
16:09stuartsierraThanks, now lazytest works again
16:09stuartsierraAlong with source directory watchers!
16:10stuartsierraStill some bugs to work out, including the fact that generated test suites always get named "nil"
16:10chouserunit tests as a service?
16:10stuartsierrachouser: More like continuous integration. Change a file, tests get re-run.
16:10chouserinteresting
16:11stuartsierrathat came from Halloway's circumspec
16:12stuartsierralater folks
16:32wthiddenIs it possible to read a deftype object from a file?
16:33chouserno direct support for that currently, I think.
16:33Chousukethey have a literal syntax though.
16:33technomancywthidden: if you define a pr-str method for it when you serialize it you could read it back in
16:33chouserwell, you could read (Foo 1 2) or something
16:33Chousuke#:Foo{:k 1 :k2 2}
16:33chouserChousuke: but that's not readable yet
16:33Chousukeno? :/
16:34wthiddenHmmm as I suspected.
16:34Chousukehow is it not readable if it
16:34Chousukeit's the literal
16:34wthiddenthe #: takes the reader for ride.
16:35wthiddenThe reader looks as the ':' as a dispatch character and does not find it.
16:35wthidden*at
16:36chouserright, the #:Foo{} output is not meant to be readable. At the very least it would have to be fully qualified
16:36Chousukeright.
16:37wthiddenSo i guess i switch back to struct for my task definitions.
16:37chouserstructs aren't readable either, are they?
16:37wthiddenyes they are, or at least for me :)
16:38tcrayfordrhickey: have people told you about the emerging languages conf? http://emerginglangs.com/ The organisers are quite keen to have you on board.
16:38wthiddennot sure what would happen if the struct definition was not loaded before hand however.
16:38chouser,(class (struct (create-struct :a :b) 1 2))
16:38clojurebotclojure.lang.PersistentStructMap
16:39chouser,(class (read-string (pr-str (struct (create-struct :a :b) 1 2))))
16:39clojurebotclojure.lang.PersistentArrayMap
16:39chouserwthidden: they're read as array-maps, not structs.
16:39wthiddenah.. but for my purposes good enough.
16:40chouseroh, well in that case you can have your datatypes print as regular maps too.
16:42wthidden,(doc pr-str)
16:42clojurebot"([& xs]); pr to a string, returning it"
16:43wthiddenchouser: thanks for the good tips.. need to check code in and get walking.
16:43defnhello all
16:47patrkrishas there been any discussions on documentation formatting for docstrings? For example using something like markdown to document functions and what have you
16:48chouserpatrkris: it has come up before.
16:50patrkrischouser: any initiatives?
16:50chouserpatrkris: no, I don't think there's been any concensus on the direction to go
16:51patrkrisok - would be cool with something minimal that could help the reader
16:51patrkrisfor example just having a convention of marking argument names or even the function name to make it stand out in the docstring
16:51chouseryou're thinking of autodoc pages or something else?
16:52patrkriswell the formatting could help make autodoc pages more readable
16:52patrkrisor at least the docstrings
16:54patrkrisI find sometimes, when writing or reading a doc string for a function, that the text becomes less readable and in some cases ambiguous when referring to function/macro/var names, because the docstring is just plain text
16:54patrkrisbut maybe that's just me
16:54chouserwell, it has come up before. :-)
16:54patrkrisas you said, yes :)
16:55technomancyan elisp solution: http://www.emacswiki.org/emacs/CheckDoc
16:55patrkriswill check it out
16:55patrkrisfor now - see ya :)
17:14rhickeytcrayford: yes, I've accepted
17:16rhickeytcrayford: I don't know why I'm not on the list yet
17:16tcrayfordawesome then. Wish I could go
17:20defnhttp://gist.github.com/358134 <-how would you implement a read fn on top of this code? similar to the write, but perhaps use an atom as a queue?
17:32defnRaynes: heh -- I must say your project description of sexpbot made me chuckle -- "a horrible design IRC bot written in clojure"
17:32defnhorribly designed*
17:33defnRaynes: what's up with this wall-hack-method stuff? I've seen this in clojurebot and your bot now...
17:49Raynesdefn: Well, I'm fairly certain that it is horribly designed.
17:49Raynesdefn: The wall-hack-method allows me to call a protected method. What exactly it does is none of my concern.
17:50Raynesdefn: It's a "first large project" sort of thing. So, I was never hopeful about the design stuff. :P
17:53defnRaynes: :)
17:54defnI'd just like to implement a small subset of your bot's functionality -- I'm wading around trying to find out what I can use to accomplish what I need to do.
17:55defnI'm looking to implement a basic reader which will parse lines for a channel, run a couple commands on the incoming line, and that's it.
18:00defnRaynes: anyway, it's not so bad -- i like your multimethods :)
18:01erikcw1I've deceloped a little test app using lein/swank. I'm now trying to figure out how to package it. I created a jar with "lein uberjar" - but when I run java -jar my.jar I get Exception in thread "main" java.lang.NoClassDefFoundError: google-scraper/core - what am I missing?
18:01Raynesdefn: :D
18:03technomancyerikcw1: you sure you're not running an old non-uber-jar you have left around?
18:04erikcw1technomancy: yup -- I did rm *.jar
18:04defnRaynes: oh and thanks for the walton plugin -- hopefully ill have some more progress on indentation and such
18:05Raynesdefn: Yeah. I need to actually integrate it into the bot as well. So that people can be PMed with a few examples on request.
18:05RaynesJust haven't gotten around to it yet.
18:06technomancyerikcw1: creating the uberjar also creates the regular one; be sure you're using *-standalone.jar
18:06defnRaynes: no worries -- i notice the cycle is sort of "omg features!" and then 2 weeks ago by with nothing
18:06defnRaynes: the nature of the beast I guess
18:06erikcw1technomancy: yup -- using the *-standalone.jar
18:06defn2 weeks go*
18:07RaynesHehe.
18:07technomancyerikcw1: if the code is public you could report a bug on the leiningen mailing list
18:59defnmust...add..syntax..highlighting..to...walton...
19:06technomancyany chance we could get the patch on ticket #246 applied?
19:54rhickeytechnomancy: pushed
19:54technomancyrhickey: great; thanks!
19:55rhickeynp
19:55rhickeyyou've been very patient
20:41defnit's moments like this that make me proud to be in this community
20:42lancepantzwhat happened?
20:43defnjust seeing technomany toss out "any chance we could?...", and to have the creator of the language say "all done, you've been very patient" -- it's just nice to see the give and take
20:44chessguyi think i'm gonna cry....
20:44defnlol chessguy
20:45defna guy who plays chess crying...
20:45defnanyway i didn't mean to make a huge deal out of it, i just find that sort of communication and consideration to be very important
20:46defn</rant>
20:46chessguyi.....i love you, defn!
20:46chessguy*giggle*
20:50kwertiianyone know whether Las3r (Clojure -> Flash/SWF compiler) is still alive? Cool idea, but no commits since last May.. :/
20:52dysingerI'm still looking for clojure help... team of 7 currently - looking for one more.
20:52dysingeraedon: aloha
20:53dysinger:)
20:53chessguydysinger, what kind of project?
20:53dysingerdocument archiving, search, discovery & BI backend - multi-node cluster - all clojure
20:54dysingerall cloud
20:54dysingertrillions of docs
20:54dysingerblah blah blah
20:54chessguya startup?
20:54dysinger3 years ago
20:54kwertiidysinger: are you looking for contractors or full time?
20:54dysingerboth
20:56kwertiidysinger: I wrote an OpenCalais/RDF database based semantic parser/search engine for blog feeds. is that something like what you're up to?
20:58chessguy> ({})
20:59chessguyclojurebot, ({})
21:05_ato ,({})
21:09chessguyanybody using eclipse + counterclockwise? what's a faster way to stop the repl, and reload it with the changes to the source?
21:16dnolenchessguy: have you tried (load "your-lib") at the REPL ?
21:26chessguyman, i am totally not getting the 'interactive' part of this interactive language
21:27scottjchessguy: if you've only changed one expression, there's a keystroke to eval that. if you've just changed one file, there's a keystroke to reload that file. They're probably in the menu
21:28lancepantzyou don't have to use it
21:29chessguyok, i have one file, the only line says: (def me {:first-name "andrew"})
21:29chessguyi "run as clojure repl" and eval "(me)"
21:29lancepantzi didn't see the need for it at first, then when i started doing more complex stuff i got it
21:29chessguyand it tells me it can't resolve "me"
21:30chessguy(and no, i'm not typing the quotes around (me)
21:32scottjchessguy: right clicking in your file pane and select clojure > load clojure file in repl
21:33chessguyhm, that works bette
21:33chessguyr
21:33lancepantzor you can (load-file x)
21:33chessguybut i still get: Wrong number of args passed to: PersistentArrayMap (repl-1:2)
21:34scottjme is a map and you're trying to call it as a function
21:34scottjyou want to eval "me". "(me)" tells clojure me is a function
21:35chessguyaha
21:35chessguyduh
21:35scottjof course maps can be used as functions, but you have to give them an arg. so you could call (me :first-name)
21:36scottjthere's probably a way for eclipse to start a repl for a project and have it load your files, but I don't know (I use emacs)
21:42chessguyhm. i'm still screwing something up. now every time i go to load the file into the REPL it's erroring out because the definitions already exist
21:44hiredmanchessguy: you are trying to def in the wrong namespace
21:44chessguyi'm not declaring a namespace
21:45hiredmanif you def X in the namespace b and use b in namespace a
21:45hiredmanthen try to go and def X in a you get that error
21:49chessguyaha, problem was i was using something that was already defined in the core
21:57chessguyok, i think i'm finally able to get around. just in time to go to bed...
22:12dakronedefn: ping
22:16TheBusbySo what's the convention for dealing with multi-word project names and leiningen? I'm running into problems doing "lein new my-project"
22:20dakroneTheBusby: what do you mean? lein new my-project works fine for me
22:21defndakrone: pong
22:21TheBusbywhen I go in the project.clj and add "main my-project.core", and then modify src/my_project/core.clj to have gen-class and a (defn -main...) the standalone uberjar fails with ClassNotFoundException
22:21dakronedefn: just wanted to let you know the link on your blog post seems to be going to the wrong place
22:22defndakrone: thanks for the heads up
22:22defnfixing now
22:22dakronedefn: no problem, looks like a neat tool
22:22TheBusbywondering if ":main my-project.core", should read ":main my_project.core" instead...
22:22dakronemight want to run it through a (distinct ...) before displaying it though
22:23defndakrone: fixed
22:23dakroneI noticed a lot of repeats
22:25defndakrone: yeah that's on the list
22:25defngonna turn the results into a sorted-set
22:25defnthat oughta clean things up a bit
22:26TheBusbydakrone: seems like my-project works fine until you try and execute the uberjar, and then I think the different between "my-project" and "my_project" leaves java unable to execute -main
22:27defnTheBusby: i think your project.clj should be the '-', and your directory/files should use the underscore
22:27TheBusbydefn: that's the way it does it by default, and it doesn't work
22:29dakroneTheBusby: trying it...
22:30TheBusbyevidently "lein new my_project" works fine, but then you have (ns my_project.core (:gen-class)) which doesn't seem very clojury
22:31dakroneTheBusby: got it
22:31dakrone:main my_project.core
22:32dakronein src/my_project/core.clj I have (ns my-project.core (:genclass))
22:32dakroneand then the (defn -main ...)
22:32dakroneand it works now
22:34TheBusbychecking now
22:34TheBusbywhen I do that I get an error during "lein compile" where it says "my_project.core" not found after loading '/my_project/core'
22:35TheBusbywhen I do "lein version" I get "Leiningen 1.1.0 on Java 1.6.0_17 Java HotSpot(TM) 64-Bit Server VM"
22:35dakronewhat does your directory structure look like?
22:35dakroneand can you paste all of your project.clj and the (ns ...) part from your clj file?
22:35TheBusby ~/my-project/project.clj and ~/my-project/src/my_project/core.clj
22:36TheBusby(defproject my-project "1.0.0-SNAPSHOT"
22:36TheBusby :description "FIXME: write"
22:36TheBusby :dependencies [[org.clojure/clojure "1.1.0"]
22:36TheBusby [org.clojure/clojure-contrib "1.1.0"]]
22:36TheBusbywhoops, sorry
22:36TheBusbyhttp://pastie.org/906835
22:37TheBusbyhttp://pastie.org/906838 for core.clj
22:39dakronethis is really really weird
22:39TheBusbywhat version of lein are you using?
22:40dakroneI can build the uberjar *sometimes*
22:40dakrone1.1.0
22:40TheBusbysometimes?
22:40dakronemake a change to project.clj -> won't build, undo it -> won't build, make same change -> builds
22:41TheBusbydoing "lein clean" between attempts?
22:41dakroneno, most likely the culprit
22:43dakronevery strange
22:44TheBusbystill getting inconsistent results?
22:44dakronesort of
22:44dakronenot having any luck
22:45dakronealright.
22:45dakrone:main my_project.core
22:46dakrone(ns my_project.core (:gen-class))
22:46dakronerm -rf classes lib *.jar
22:46dakronethat worked for me
22:46dakroneif you want I can post all the files
22:47TheBusbyI get "lein new my_project" to work earlier
22:47TheBusbyer, I got
22:47TheBusbybut then you end up with the non-clojury ns name. Guess I should just file a bug?
22:47dakroneyea, it seems like using - means use _ everywhere except for the project name
22:49dakroneor, you could keep - in the project name and remove it from the source directory structure
22:49TheBusbydoes that work okay for non-*nix environments?
22:50dakronewhich one? using _ or not having any -'s?
22:50dakroneyour project could be named "my-project" and have src/myproject/core.clj
22:50TheBusbythat works?
22:50dakroneyou have the change the :main name
22:51dakronethe :main would be :main myproject.core and in core.clj the ns would be (ns myproject.core (:gen-class))
22:54dakroneTheBusby: anyway, I'm out for a bit, good luck!
22:55TheBusbydakrone: thanks for your help!
23:32technomancyTheBusby: confirmed there's a bug with the uberjar manifest
23:32technomancyit sure would help if Clojure exposed its own functions for converting between filenames and namespaces. =(
23:33TheBusbytechnomancy: I posted an "issue" to your github repo earlier with a repro plan
23:34TheBusbyin the meantime though I just modified leiningen/jar.clj to do " (str "Main-Class: " (apply str (replace {\- \_} (str main)))) "
23:35TheBusbyI doubt that's correct solution, but it's just what I'm using now...
23:35TheBusbyI'm assuming the "my-project" to "my_project" conversion was necessary
23:45technomancyyeah, that's close enough