#clojure logs

2010-12-09

00:14auserhola
00:19technomancywow, this is kind of embarassing: http://groups.google.com/group/clojure/browse_thread/thread/4b9a0d4da8c36c09
00:23technomancyscripts are referencing all kinds of files that don't exist; they won't even launch on machines with less than 3GB of ram; they assume you've got the Mac version of yourkit installed in a specific location. eep.
00:25technomancythe readme has twelve lines (four relevant) about Clojure followed by tons of stuff about asm
00:25defntechnomancy: that's why I was suggesting hamster
00:25defnhttps://github.com/harukizaemon/hamster
00:26technomancyoh, I see. cool
00:27technomancyeven with that, you want alter semantics though, which I don't see cloby providing
00:27technomancyI guess ref-set! semantics is better than nothing
00:28dnolentechnomancy: debatable. It's kinda slow. You're slowing down your mutable code. Might as well just live on the edge.
00:33defnhow so? (are you slowing down your mutable code?)
00:33defn@dnolen
00:35defntechnomancy: is there any reason to assume alter semantics couldn't be added?
00:37technomancydefn: not at all; I implemented them in clojure-gem
00:37technomancyit's a bitmore awkward without first-class functions, but it's easy to do
01:24btw0If string slicing using "subs" cannot have negative args, how can i get the specified lenth of a substring at the end of a string?
01:24technomancyI think I submitted a patch to make subs accept a negative argument
01:25technomancyhrm; maybe not. I guess I just proposed it.
01:27btw0cool, but is there an elegant way to achive that for now?
01:44amalloy&(let [s "long string"] (subs s (- (count s) 3)))
01:44sexpbot⟹ "ing"
01:44amalloynot exactly elegant, but not terrible
01:44amalloybtw0: ^^
01:50btw0thanks, i've also found "tail" in clojure.contrib.string does this too
01:52hiredman,(doc partition-all)
01:52clojurebot"([n coll] [n step coll]); Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end."
01:54auserhas anyone here ever use RMI or some other messaging in clojure?
02:01defni always forget about subs
02:02defnI think in general the partition fns have been the most all-around useful for me.
02:02nattohi, is anyone familiar with the error "error in process filter; Wrong type argument" in emacs+slime?
02:03nattothis is mentioned in github and SO, which basically say "please use the ELPA version", which I do, and still can't resolve it
02:04nattoi.e. where you'd expect the backtrace in emacs, the error appears and hangs
02:05technomancynatto: maybe you have the other version of slime still installed alongside it?
02:07nattoi was using the boinkor.net version, but now I installed slime via ELPA, and my .emacs knows nothing of the boinkor version
02:07nattoso there is no "slime" appearance in my .emacs
02:07technomancyno version from apt-get or anything either?
02:08nattonope, not there
02:09technomancyhmm; I haven't seen that. maybe M-x toggle-debug-on-error and send the stacktrace to the swank-clojure mailing list?
02:09defnhow many people are actually doing web development with clojure?
02:10nattobtw technomancy, I assume you're aware that when the ELPA slime prompts to install clojure, it gives an error because repo.technomancy.us isn't giving jars?
02:10technomancynatto: yes, swank-clojure from elpa has been deprecated for quite some time now.
02:10defnlet me rephrase that because it's somewhat rhetorical: what is preventing more people from doing web development in clojure? where are some good places to look to in philosophy that are more in alignment with the style of language?
02:11nattoi see...
02:12defnerr, some good places to look where the the underpinnings of the design rely on something which resembles clojure
02:12technomancynatto: all you need on the elisp side is slime and slime-repl
02:12technomancysounds like it's time for another blog post
02:13nattoso the "recommended way" right now is to launch a swank server externally then do slime-connect?
02:13nattosorry i'm missing something
02:13defntechnomancy: you did a lot of ruby, (maybe still do?) do you have any ideas on the whole rails story and how one can translate it without making a mess into clojure?
02:13defns/into/in
02:13sexpbot<defn> technomancy: you did a lot of ruby, (maybe still do?) do you have any ideas on the whole rails story and how one can translate it without making a mess in clojure?
02:14nattoand yes a blog post will be much appreciated -- there are all sorts of different guides out there, all within the last 9 months, all leading to different results
02:14technomancynatto: that's right, though there's a little lib called durendal that combines the two steps
02:14technomancydefn: I'm not sure. I haven't really done frontend web work since 06 or so.
02:15defntechnomancy: what is your opinion on a "web development" story for clojure?
02:15defnDoes it make sense? Is it a square peg in a round hole?
02:15technomancydefn: on the whole I'm really glad clojure seems to be resisting the monolithic framework approach of rails
02:15nattook, well i'll be happy as long as i can just recover my old and trusty slime->clojure repl at this point (many hairs pulled out).
02:15technomancyeven if it's more work up-front to piece things together, you end up with a much more coherent result
02:15defntechnomancy: I agree, actually -- but there is a trade off
02:16defnmore work up-front is sort of contrary to what seems to be so prevalent in the community: a desire for adoption
02:16nattook so, there's a bucket of tricks for emacs, and the bucket of tricks includes setting up slime+clojure?
02:16technomancydefn: true, but it's much easier to achieve something cohesive from composable libraries than to try to go the other direction
02:17technomancynatto: tl;dr: lein swank in a shell, then M-x slime-connect in Emacs
02:17technomancyonce you've got that working you can try durendal which may be a bit more convenient, but don't sweat it up front
02:18defntechnomancy: optimized for developer happiness, and convention over configuration
02:18defnin the case of the former I believe we're halfway there. in the case of the latter I think we're behind the curve
02:20nattoso i've been able to do slime-connect to a swank server (so i'm opening another process aside emacs) since i got slime. the backtrace still hangs emacs though
02:21technomancynatto: clojure 1.3?
02:22natto1.2, after discovering 1.3 doesn't work
02:22nattowait... no, lein swank uses 1.3 sorry.
02:22nattolet me retry
02:22technomancythere are definitely unresolved issues with 1.3 =\
02:23nattoyes i discovered there was no print-doc after much head scratching
02:24natto(all the blog posts about setting up that pull from rhickey's github will lead to these errors!)
02:27nattook lein's swank is 1.3.0 (should be pulling from github). clojure is 1.2.0
02:27technomancysubs with negative offset: http://dev.clojure.org/jira/browse/CLJ-688
02:28technomancynatto: that's what you want; 1.3.0-SNAPSHOT of swank
02:28technomancyso how about calling into with a string as its first arg?
02:29technomancyseems like if seq of a string returns a seq of chars, you should be able to reverse that operation with into
02:31nattono dice.
02:31nattojust to confirm: swank=1.3.0-SNAPSHOT, clojure-1.2.0.jar, slime, slime-repl, clojure-mode all from ELPA
02:31nattothat's the bare setup
02:32technomancywhat Emacs version?
02:32natto23.2, from PPA
02:32nattolaunch lein's swank-clojure, in emacs, slime-connect, all defaults. type a<return>, expect stack trace, get hang
02:33nattoGNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.21.6) of 2010-09-01 on americium, modified by Debian
02:33technomancycould try emacs -Q; manually M-x eval-buffer in ~/.emacs.d/elpa/slime-xxxx/slime.el just to rule out the possibily of mix-up on the elisp side.
02:36nattoso 1. i get Versions differ: ... 20100404 (swank).; continue. swank server: Error reading swank message
02:37natto2 is swank server error. there's no 3rd point
02:40technomancysorry, not sure what's going on there =\ try the swank-clojure mailing list I guess
02:45nattoah. got it. it's autopair
02:45technomancy...?!
02:46nattoi'm not sure why i got a hang in the last emacs -Q
02:46technomancythat's a serious bug if autopair affecting the connection to swank
02:47nattoactually no i didn't. i had to load more than slime.el to get a repl
02:47nattothis is a different error from the one i was getting when i just ran M-x slime
02:47technomancytime to ditch it and grab paredit
02:47nattobut (autopair-global-mode) causes hang in repl from slime-connect
02:48nattoautopair's for electric "'({[
02:48nattocan't have everything :-/
02:48nattobut, i have a stacktrace now. so happy! thanks!
02:49nattothanks very much
02:49technomancysure. better report a bug with autopair though.
02:49nattook
02:57defnautopair?! paredit!
02:58nattodo you use electric quotes?
02:59nattoi installed autopair on top of paredit for that
02:59technomancythat's redundant
03:00nattoit is, but js2-mode provides its own quote matching, so autopair falls back to paredit in that mode
03:00nattobut otherwise -- do you use something for electric quotes?
03:02technomancyparedit does electric quotes
03:10nattothere are some behaviors in autopair i was more happy with. playing around it looks like paredit changes the default way you delete parens?
03:10Deranderit seems to
03:11defnhaml and sass have indentation rules that allow you to forego parens, why not leverage that?
03:11nattoyou can probably configure one to behave like the other, but vanilla autopair behavior is quite nice imo (aside of crashing the repl)
03:12Deranderdefn: how would you do haml w/o parens in clojure?
03:12Deranderoh wait, what was that other html gen library?
03:13defnhiccup?
03:13Deranderyeah
03:13DeranderI think hiccup is closer to the spirit of haml than clj-haml
03:13defnhm, I disagree
03:13defntry to get your designer to use hiccup
03:13defnclj-haml is clojure,
03:14defncloser*
03:14defnhaml is still a stretch, but at least they'll use it
03:14DeranderI don't look at it as a "for designers" thing
03:14DeranderI see it as a power tool for me
03:14defnyeah, it just seems to turn out that most of the people who do most of the templating and view-wrangling on my projects do PSDs, followed by haml
03:14Deranderand aren't they basically the same thing except clj-haml uses calls to h= in favor of nested vectors?
03:15defnDerander: again, explain that to your designers
03:15Deranderseriously, they look basically the same except one has less line noise
03:16defnthey care more about aesthetics
03:16defnnature of the breed
03:17Derander(html [:div#header [:h1 "hello!"]]) vs (h= :html (h= :div#header (h= :span "hello!")))
03:18Deranderwe're arguing something subjective, but to me the former is nicer looking
03:18defnoh, there i tend to agree
03:19defnbut what im saying is, neither is "haml"
03:19Deranderright
03:19defnwhich is what i need
03:19defns/need/want
03:19sexpbot<defn> which is what i want
03:19hiredmanif you use enlive your designers can just write html and you can use css selectors to inject content
03:19Deranderit'd be pretty simple to parse %h1 to [:h1
03:19Deranderhaml turns into nice sexps I'd imagine
03:19defnhiredman: that adds to the dev load, though
03:20defnhiredman: i mean, i've considered enlive, but i don't think i'd use it as my primary templating solution
03:20DeranderI like a combination of haml and enlive
03:20Deranderthey each have their perks
03:20Deranderwhen I work in ruby I use haml and erb depending on the situation
03:21defni basically never use .erb unless it's a page full of script tags, like google analytics partials
03:21DeranderI use erb for static content
03:21Deranderwell
03:21Derandertext heavy content w/ lots of tags in the middle of it
03:22Derander"Hello we are <strong>Company name</strong> and we make <a href = "...">product</a>" reads better to me
03:22defnmy sense is this: if we had a way to do something similar to Rails without it being Rails (very modular, not a cathedral)
03:22defnwe'd have a better "web dev" story for clojure
03:22Deranderright now ring is basically rack, right?
03:23DeranderI haven't worked with ring in any real sense
03:23defnright
03:23Deranderrails is basically some nice helpers on top of rack nowdays
03:23defnmany nice helpers
03:23defnit's huge, but it turns out a lot of it is necessary
03:23Deranderclojureql fills the orm gap kind of
03:23Deranderneed something for migrations
03:23defnlots of error wrangling, lots of model niceties
03:23Deranderfor errors
03:24Deranderyeah
03:24defnyeah clojureql is close, but still cumbersome
03:24defnpeople need the same damn experience they have when they boot up a rails app
03:24DeranderI think rails wins in terms of view helper libraries mostly
03:24Derandercan implement the backend stuff very efficiently in clojure
03:24bobo_view helper libraries?
03:24Deranderall of the fancy link routing, inflection stuff, ajax helpers
03:25bobo_(i dont know rails)
03:25Deranderform helpers
03:25bobo_ah you mean so you can do ajax stuff without knowing javascript?
03:25Deranderkind of
03:25Deranderyou can do it to a point
03:25Deranderthe original goal that rails had was to abstract away javascript
03:25bobo_predefined components, or something like that?
03:25Deranderthat went out of vogue w/ rails 3
03:26defnyes the routing is nice, arel is nice, generators are nice, the built-in helpers/utilities are nice, the model agnosticism is nice, the way things just map up as long as you name them correctly is nice
03:26Derander<% form_for @comment do |f| %> ... is how you start a form tag in rails for a comment object
03:26defnewwww
03:26defnuse formtastic!
03:26Deranderyou could drop in <% remote_form_for @comment do |f| %> and have it automagically be ajaxified
03:26Deranderdefn: talking vanilla rails
03:26defn<% semantic_remote_form_for
03:26defnah, sure
03:26Deranderand now it's form_for ... :remote => true anyways
03:26defn*nod*
03:27bobo_personaly you lost me at <%, i hate that. but i agree that something like it is needed for the masses
03:27defnbobo_: i hate it too
03:27Deranderbobo_: rails < 2 would spam generated prototype.js stuff
03:27bobo_enlive changed my view of web development
03:27Deranderbobo_: rails 3 will stick data-attributes in and give you unobtrusive js to use
03:27defnbobo_: that's why i use haml. the same thing looks like: = remote_form_for ...
03:27bobo_and i learned some jquery, and now i dont want any crappy components
03:27Deranderbobo_: yeah, rails 3 is really nice w/ jquery now
03:28bobo_but i do understand that it is needed
03:28Deranderit's officially "js framework agnostic"
03:28Derandernot sure to what extent is true
03:28defni dont get the fucking prototype.js default
03:28defnwtf?
03:28Deranderit was the best thing when rails came out
03:28defnwho uses that garbage?
03:28defnyes, 4 years ago
03:28defnjQuery has been the du jour for at least a year
03:28Deranderrails 3 has been in dev for like two years
03:29Deranderbut yeah
03:29Deranderthere is no default anymore
03:29Deranderyou can use whatever you want
03:29defn*nod*
03:29defni dont know what the answer is honestly, im just ranting
03:29Deranderand there has been a jquery.rails drop in for a very long time
03:29Deranderthat would redefine helpers/provide js as a complete replacement for prototype
03:29defnim just doing a lot of work in rails lately and find the way rails behaves to be what one should expect in any other framework
03:30Deranderusually, yeah
03:30defnotherwise it has more pain than it's worth
03:30defnshops aren't going to switch unless they have that work-alike feeling
03:31defncopy and paste haml templates, convert a rails app to clojure with a single command, etc.
03:31defnthat sort of thing needs to happen for webdev adoption
03:31Derandernot sure to what extent that is true
03:31Deranderpeople switched to rails from php/asp
03:31Deranderand that was a sea change
03:32defni've worked with some prominent rails consulting firms and there is little interest in clojure
03:32DeranderI'd like to think that ruby programmers are fairly open minded in general. you have to keep up with a *lot* of new libraries to be cutting edge
03:32Derandermm
03:32DeranderI haven't
03:32Deranderso I don't know
03:32defnwhen i try to explain the webdev "story", it's fragmented
03:32defnit doesn't make any sense
03:32defntoo many steps. too many hurdles. too many new things to consider. too much choice.
03:32defnthey just want a goddamn framework.
03:33Deranderrails is getting that way too, lately, but the people who are doing it know how to navigate it
03:33defnive spent the better part of two months getting "back in the saddle" on rails. i was off in another land for ~3 years
03:33Derandergetting started now you have your choice of 3 templating languages, 4 auth solutions, 2-3 testing solutions, umpteen trillion sub-testing-libraries, 3 or 4 major orms
03:33Deranderand that's just major components
03:33defnDerander: yes, but now enumerate those in clojure
03:34Deranderif you want to do twitter, facebook, csv, xml, html parsing, etc.
03:34Deranderhah, I have no idea
03:34DeranderI don't know clojure libraries.
03:34defn /you don't know what you don't know/
03:34defnthis is the problem.
03:35defnIt's not that there is a lack of maturity. It's that there is a lack of presentation.
03:36defnHere is an example of rails-related documentation: http://mongoid.org/
03:36Deranderright
03:36defnNothing like that exists in the clojure community.
03:37defnSo the libraries look brittle and iffy.
03:37Derandermongoid is a slick piece of software too
03:37Deranderon the other hand, nothing like http://clojuredocs.org/ exists in the rails community :-)
03:37defnsure it does :)
03:38Deranderhttp://railsapi.com/ ?
03:38defnit's called google, because ruby/rails was born in the heat of "blogs"
03:38Deranderhah
03:38defneveryone contributed, it's just indexed elsewhere :)
03:38Deranderdeveloper tools for clojure are massively superior
03:38Deranderemacs/slime is just good
03:38Deranderbut that's just lisp in general
03:39defnyeah there's no equivalent in ruby which sucks so bad
03:39defnit's just sad everytime i'm reminded of it
03:39Deranderit feels like it should be possible to do
03:39defn /some/ of it is possible to do.
03:39defnyou could build a source code traversing thing-a-mabob
03:40defnso in swank you so M-., maybe you add something like that to comint ruby
03:40DeranderI think you could get pretty close w/ some mishmash of static analysis, drb and irb
03:40defns/so/do
03:40sexpbot<defn> do in swank you do M-., maybe you add domething like that to comint ruby
03:40defndrb is a graveyard
03:40defnprobably better to use something else
03:41DeranderI don't mean drb itself
03:41Deranderthe concept
03:41defnah sure
03:41Deranderlike a ruby method server
03:41Deranderala swank
03:41Deranderrubymine is getting damn good at ruby code analysis
03:41defneveryone i work with derides rubymine
03:41Deranderhave you tried it?
03:41defni own a copy, yes
03:41Derandermm
03:41DeranderI couldn't use it for primary dev
03:41defnthe refactoring tools are pretty great
03:41Deranderright
03:41defntcrayford has a wonderful refactoring project for clojure
03:42Deranderit's getting good at understanding semantics and doing debugging and stuff
03:42defni wish there was more attention paid to it
03:42Deranderyeah, I've been meaning to install that for awhile
03:42defndo it. just try it out. you will feel like you're wathing magic.
03:42defns/wathing/watching
03:42sexpbot<defn> do it. just try it out. you will feel like you're watching magic.
03:42DeranderI am severely time limited
03:42Deranderhigh school student doing college apps & working
03:42DeranderI'm studying spanish right now on the other monitor :P
03:42defndon't play games with me. you're on irc.
03:43defnnice calculated move there
03:43Derander;-)
03:43defnquit making excuses and do it.
03:43defn:)
03:43DeranderI will later
03:43DeranderI have it on a todo list
03:43Deranderbut emacs isn't open right now
03:43defnhttps://github.com/tcrayford/clojure-refactoring
03:44Deranderright
03:44defnthread-first and thread-last are great fun to play with
03:44DeranderI wish I understood font-lock
03:44Deranderthere are a lot of things I want to do with syntax highlighting in clojure
03:44defnyou can walk through a bunch of source you've written without paying attention to thread-first/last
03:44Deranderthat I simply can't implement
03:45defnand then go back and literally hit hotkeys on your forms and change them to use ->, ->>, so you can see the readability changes immediately
03:45defnit's great.
03:45Deranderright
03:45DeranderI want arguments to functions to be highlighted in their bodies
03:45defni wish more language focused on "code filters"
03:45Derandercode filters?
03:46defnwhat we're describing are "code filters". my term, not sure what the proper nomenclature is...
03:46defnwe're not changing the overall truth of the function
03:46Deranderoh, yes.
03:46defnwe're just changing its structure
03:47Deranderyes. I remember a few years ago when I was learning ruby I had an epiphany about refactoring
03:47defni think it would be cool to have a photoshop Filters-size list of possible "filters" you could apply to a form.
03:47Deranderit was a really magical moment
03:48Deranderbasically what you're talking about -- thinking about transformations as keeping the same meaning while altering the structure
03:48DeranderI think that's why sexps are so pretty to me
03:48Deranderit's easier to do that
03:48defni cannot convince anyone to use clojure
03:48defni think im a terrible salesman or something
03:49DeranderI don't really argue for clojure, just for thinking outside the imperative/procedural/oop box
03:49DeranderI usually do it by challenging somebody to a coding competition
03:49defni object strongly to that
03:49defnthe first part :)
03:49defnwe /must/ argue for clojure
03:50Deranderwhy?
03:50clojurebothttp://clojure.org/rationale
03:50defnFP has taken a lot of ideas from OOP, but the reverse is not true
03:50Deranderhaha
03:50Licensermorning!
03:50DeranderLicenser: good morning
03:50defnmorning Licenser, long time no see
03:50LicenserI have chocolat!
03:50defnNOMNOMNOM
03:50Licenserdefn: yap I had to manage to break my IT departments security again so I could use IRC :P
03:50defnssh tunnel or even more hackish?
03:51Deranderhttps://github.com/ivan4th/swank-js <-- this is glorious
03:51defnDerander: ive been using that for the last week now! :)
03:51Deranderbreaking through firewalls at school has been the single greatest motivation to learn about ssh
03:51Deranderdefn: another one of those things I haven't installed yet
03:51Licenserdefn: both
03:51DeranderI'm hung up on slime
03:51Licensersince SSH isn't allowed
03:51DeranderI have slime/slime-repl from elpa
03:51Deranderbut those versions don't include slime-contrib
03:51Deranderand I haven't managed to get a working emacs ecosystem w/ cvs slime yet
03:51Licenseronly stupidly proxied connetion ....
03:51DeranderI've tried three time
03:51defnDerander: don't use CVS slime
03:51defnDerander: what platform?
03:52Deranderdefn: os x
03:52Derandercarbon emacs
03:52DeranderLicenser: are they blocking the protocol or the port?
03:52Licenseraquamax ftw
03:52defnwhat OS v#?
03:52Derander10.6.5
03:52defnDerander: i compiled from source
03:52LicenserDerander: everything
03:52DeranderI used to use aquamacs but I saw no benefit to continuing to do so
03:52Deranderhah. fun
03:52defnim on 10.6.5
03:52Deranderfor awhile they blocked 22 at school so I ran it on 443
03:52Deranderdefn: I don't think it's an emacs problem
03:53DeranderI think I just need to trash a significant portion of my .emacs.d and rebuild
03:53defnoh your config is broken?
03:53Deranderit's working now
03:53defnor you cant `make`?
03:53LicenserDerander: yes so they are a bit more strict here so they don't let you connect to 443 either unless it goes over ther effing proxy either
03:53Deranderif i remove elpa slime/slime-repl and insert cvs slime then I'm fucked
03:53DeranderLicenser: yeah, they eventually did that
03:53defnwhat is all this cvs talk?
03:53defnthis is crazy.
03:53Deranderdefn: that is what I was advised to do
03:54defndo /not/ use cvs. use github.
03:54DeranderLicenser: the school runs a networking class so we argued successfully for an unfirewalled (mostly) linux box that can sh out
03:54DeranderI bounce everything through that now
03:54Deranderhttps://github.com/nablaone/slime ..?
03:54LicenserDerander: yea sadly our IT department are dorks
03:54defnthat's the one
03:54DeranderLicenser: windows guys?
03:54defni use technomancy's though
03:54Deranderdefn: "imported from CVS daily"? :)
03:54LicenserDerander: yes
03:55defnDerander: there are nightly builds you know?
03:55defnlike, DMGs
03:55Deranderdefn: of carbon emacs?
03:55Deranderor slime?
03:55Deranderah, technomancy's is frozen w/ clojure compat
03:55Licensersad part is that I work in a Telco Supplyer so everyone in my department has a good understanding of networking and IT, sadly we are not the IT depretment :P
03:55Deranderit's the new version of slime from cvs that are owning me.
03:55DeranderLicenser: of course
03:55DeranderLicenser: the district's networking/it used to be run by this sweet old linux guru
03:56Derandereverything open source and primarily student setup/run
03:56Licenserheh that is good
03:56Deranderran great for 14 years
03:56Deranderhe retired to teach the networking class
03:56Deranderwindows guy managed to spend $4 million in 3 years and break literally everything
03:56Licenserwhich reminds me I should call our IT department since their stupid patches won't install
03:56Deranderactive directory: broken, proxies: broken, internet outages: common, firewalls: too restrictive, email: broken
03:57Deranderreplacing all linux and mac servers w/ windows servers in a district that uses exclusively macintosh computers for the users
03:57defnLicenser: i suggest a 3g tether
03:57Derander</rant>
03:57Licenserdefn: the reception in here is horrible
03:57Licenserwe're like in a pharadayic cage
03:57defnfarradayic?
03:58defnfarraday cage?
03:58defns/farraday/faraday
03:58sexpbot<defn> faraday cage?
03:58Licenseryes that stuff
03:59defnheh
04:01Deranderla encuesta
04:02defngood night all
04:02defngood talking with you Derander
04:02Derandergood night
04:02defnciao Licenser
04:05LicenserÍ haaaate windows
04:05Deranderyes
04:05Deranderme too
04:05Derandergood night from me as wlel :-)
04:06Licensertake care Derander
04:10fliebelmorning
04:25defn' as a constituent character is fun.
04:27raek# as a reader macro character is fn.
05:32auserclojure noob here... having some trouble importing the clojar dependency (org.clojars.ctdean/apache-cassandra) from lein.
05:33auserI have "[org.clojars.ctdean/apache-cassandra "0.7.0-beta3"]" in the project.clj and (:import '(org.clojars.ctdean.thrift CassandraDaemon) in the class file, but it's failing with ClassNotFoundException
05:38btw0_for identation of coding style, is there a simple rule of thumb? I am a little confused of when to use 2 spaces and when to align all args to the first args
05:39Chousukealign args when it looks okay. :P
05:43Chousukeso, hm. Indent code according to the level of nesting, and align code after indenting it as needed to make it visually appealing.
05:44raekbtw0_: 2 spaces are mostly used for special forms
05:45Chousukehm?
05:45Chousuke2 spaces is used for all indents.
05:45raekhrm, that's not how clojure-mode does it...
05:46ChousukeWhen does it indent more than 2 spaces?
05:46Chousuke(per level, of course)
05:46btw0_raek: so 2 spaces for special forms and ident args to the first one for all other cases?
05:47raek(foo a
05:47raek b
05:47raek c)
05:47raekbut
05:47Chousukeraek: that's alignment, not indentation
05:47raek(if pred
05:47raek a
05:47raek b
05:47btw0_raek: i got it, thanks
05:47raekI guess I wasn't aware of the difference...
05:48ChousukeThe way I see it b and c have the same indent as foo
05:48Chousukeand are just aligned to a
05:48Chousukewhile with if, a and b are their own scopes, one level deeper than if, so they need a new indent
05:50Chousukeit gets somewhat trickier with defn etc. that takes parameter vectors and dosctrings and whatnot before the actual code block begins
05:56raekone difference from other lisps I have noticed is the tendency for this:
05:56raek(dosync
05:56raek (a)
05:56raek (b))
05:56raekinstead of
05:56raek(dosync
05:57raek (a)
05:57raek (b))
05:57stain_that looks totally different! :)
05:57stain_1-space-indent must die
06:26Licenseraloa
06:28lpetitin ccw i currently implemented the most "repeatable" (context free) indentation heuristic possible: alignement with the first previous sibling which is the first non blank thing on a line, or else 2-space indent from the parent paren form, or else 1-space indent from the parent non-paren ({, [, etc.) form (1-space or 2-space relative to the end of the form "opening", that is if the form is 2 chars wide, like in #(, it's 2 spaces from th
06:29lpetitThere's not assumption about whether we're in a function call, a special op call, a macro call.
06:31Licenserlpetit: ccw's identation works good I just had one feature request: ident all or ident selection :)
06:31Licenserthat'd be sweet
06:32lpetitindeed.
06:32LicenserI had to reindent a large file and it was hell :P doing it for each line on it's own
06:32lpetitThough when I work on this again (yet I'm busy with finalizing the repl ui integration), I'll first make auto-indent better, by also reindenting possibly existing following siblings and children.
06:33lpetitLicenser: :-(
06:33Licenserlpetit: not your fault, it came from moving source around and each editor having it's own thoughts about identations
06:34Licenseralso in the repl UI I kind of miss the prompt
06:34Licenserit's hard to see what NS you're in
06:34lpetitAnd I'll do this "smarter auto indent" smart enough not to ruin hand-made indentation: it will just reindent the line you ask it for, observe the col change (+ 2 , -3, whatever), and replicate this change to the following lines concerning children and siblings;
06:35lpetityes, the prompt issue keeps coming
06:35Licenser^^
06:36lpetitDid you do a permanent switch to the (temporary) repl ui fork ?
06:36Licenserother then that I find the repl management in the beta a bit more confusoing then in the stable :P
06:36Licenseryap
06:36cemerickLicenser: I'm listening :-)
06:36lpetitheh, there were sufficient disclaimers about the stability of this branch :-p
06:36lpetitlook, you've awaken the wolf :)
06:37Licenserlpetit: yes I don't talk about crash's but about usability
06:37Licenserit is a nice improvment that you have a 'run as clojure' now so I kind of miss the simple 'start project REPL'
06:37lpetitworking hard today on bringing more of paredit to it
06:37lpetit??
06:37Licenseroh yes and paredit in the repl console can be a PITA if you copy/paste half finished code :P
06:37Licenser*starts eclipse*
06:38lpetitwhen paredit is totally ported, intend it to behave as in the editor, including the 2 modes: default and strict.
06:38lpetits/intend/expect/
06:38sexpbot<lpetit> when paredit is totally ported, expect it to behave as in the editor, including the 2 modes: default and strict.
06:40Licenseralso the enable/disable clojure thing could indicate if itis currently active or not
06:40LicenserAND if you reopen the workspace the clojure menu is gone
06:40Licensersorry for whining so much but I figure feedback helps :=
06:41Licenserthe editor has paredit modE?
06:41cemerickIt seems like the typical approach in eclipse-land is that, once a nature is added to project, it's not removable. We could match that. *shrug*
06:42cemerickLicenser: Indeed, I use it constantly.
06:42LicenserI only see that you can set up strict mode, is that paredit mode?
06:43cemerickyeah
06:43lpetitLicenser: strict mode is what emacs users call paredit mode, yes
06:43Licenserah okay
06:43Licenserokay okay :)
06:43lpetitYou can change the default mode an editor is open in, via Window > Preferences > Clojure > ...
06:43Licenserctrl+alt+l seems for some reason not to work when you have no repl started
06:44Licenserthat'd also be noice if it could start the repl if you are trying to load something into it :P
06:44lpetitknown regression, reported by Lee, if I remember well
06:44cemerickLicenser: what command does that correspond to?
06:44Licenserah okay :)
06:44Licensercemerick: load file in REPL
06:45lpetityes, the enable / disable clojure thing should be smarter. There's an issue for it.
06:45lpetitConcerning the clojure menu, I'm not sure I understand.
06:45cemericklpetit: That's not a regression, IMO. That's a flaw in Lee's workflow. If I start popping open new REPL processes because I try to load a file without a REPL available, I'll be very irritated. :-|
06:45Licensertraclked it down: if you select the project and are not in a editor the clojure menu disapears
06:46lpetitcemerick: That's a regression wrt how things work in 0.0.64. How things work in 0.0.64 being a good or bad thing is another topic :)
06:46Licenserit makes sense since currently there are only editor level commands in there but it is a bit confusing tohave it pop up and hide
06:47cemericklpetit: fair enough :-)
06:47Licenseranother question is compiling, is there something like 'compile project'?
06:47lpetitLicenser: well, it's dynamically visible depending on the context, indeed.
06:47LicenserI kind of didn't found it hat do do the horrible thing of writing a maven pom
06:47cemerickThat's usually considered a feature :-)
06:47lpetitLicenser: hot topic.
06:47Licenserheh
06:47Licensershould I mention the next hot topic: dependencies :P
06:47lpetitLicenser: I definitely want to rework the current Clojure Builder.
06:48cemerickLicenser: eclipse's model is to continuously build projects
06:48Licenservery sweet would be lein support (in my eyes)
06:49cemerickA contentious issue.
06:49lpetitEven without talking (heh, Chas ;) ) about not hijacking the clojure application started by the user for the internal needs of ccw, the current builder does 2 things: it loads things in the application, and it does this by compiling namespaces.
06:49Licenser*nods* so in other words if I want to have things packaged I will be dependant on maven or lein right?
06:50lpetitI want it to be the other way around: it should only load things. AOT compilation should be only done when there's no REPL ('cause e.g. in windows the AOT compilation will fail if the class file is already loaded by the JVM)
06:50cemerickLicenser: the project.clj "model" is in such a state of flux, I don't think lpetit or I have any interest in spending time tracking it.
06:50Licenseralso true
06:51cemerickLicenser: Eclipse has excellent ant, maven, and gradle plugins. *shrug*
06:51lpetityep
06:51Licenserbut maven is horrible, ant is supposed to be horribler and gradle - never tried it
06:52Licenseryet lein is the mostly wide spread build/dep management tool for clojure I think
06:52cemerickI'm sure I'll be including that topic in my next survey.
06:52lpetitIf the world was just: "existing java ecosystem build tools (maven, gradle, ant)" versus "clojure NIH-reinvented lein build tool", and all the clojure community (or a biig part of it) was behind lein, then I'll consider supporting it *now*.
06:52Licenserhmm perhaps if there were a lein library that'd let people do things like (lein compile "my/project/dir")
06:53lpetitThe problem, is, the NIH syndrom has led to (to my knowledge): leiningen, cake, cljr.
06:53Licenserwhat is NIH?
06:53lpetitNot Invented Here
06:53Licenserah
06:54Licenserno to be frank I don't care if the build tool is writen in Visual basic, just that maven for example is horrible complex compared to a project.clj
06:54Licenserthe pom.xml for the project I work on has like 160 lines of which I only understand half. the project.clj would have less them 10 I guess
06:55Licenserthat is what I currently measure 'I prefare line over mvn'
06:55Licenseror rather the pom.xml
06:56Licenserdon't care what works in the background if I don't have to magle with it
06:56lpetitLicenser: but isn't the philosophy of Clojure to not reinvent the wheel, and to provide (when possible) "lightweight" layer over existing java libs ? ;-)
06:56Licenserisn't lein doing exactly that? :P
06:56lpetitlein, cake, etc., by adding their own way of providing "plugins", by masking the use of maven plugins, do not play it well IMHO
06:56Licenserafiak is it using ant/mvn for the actual work just coving it
06:57Licenserso in the end I don't care as long as I don't have to fill out a 160 line form to download 2 dependencies and compile my project in a jar
06:57LicenserI have enough of that byrocracy out of the programming world :P and trust me I do I live in germany
06:57lpetitno, lein is reinventing existing maven plugins, and just leveraging the use of maven libs for accessing / managing maven repos.
07:00lpetitIf I was not busy enough with ccw, I'd work to push clojure version of polyglot maven, help make clojure-maven-plugin more featureful (for example the REPL you get from clojure:repl is so 70ies ;) ), and add this clojure layer which would enable building maven plugins in clojure to be super easy.
07:01cemericklpetit: did you see the project.clj-SPEC thread?
07:01lpetitYes, but where is it now ?
07:01cemerickhasn't moved: http://groups.google.com/group/projectclj---spec/browse_frm/thread/855ce112689fb33f
07:02cemerickpmaven appears to be a broken premise, at least according to the two contributors to the clojure side of it.
07:02lpetitoh no, I hadn't seen this projectclj google group
07:03lpetitjoining it right now
07:03lpetitwill read it later, though, dinner time!
07:06cemerickIt's not really a "live" group. I think that thread sorta killed it. :-(
07:07cemerickLicenser: FWIW, those of us that use maven don't do it because we're masochists or because we like "bureaucracy". e.g. http://cemerick.com/2010/03/25/why-using-maven-for-clojure-builds-is-a-no-brainer/
07:07fliebelIs there something like Pythons Mechanize for Clojure? Mechanize is one mutable object thing, and it kills me.
07:11mfexfliebel, perhaps https://github.com/clj-sys/clj-http
07:11Licensercemerick: I'll ra that
07:12fliebelmfex: nah, Mechanize is specialized in scraping data and submitting forms.
07:14cemerickfliebel: Check out selenium -- primarily intended for automated webapp testing, but it'll do for a lot of other uses as well.
07:14cemerickAbsurdly comprehensive functionality.
07:15fliebelcemerick: It's not Clojure, right? The I might just as well use Mechanize.
07:15cemerickHrm, almost certainly mutable stuffs though -- it uses the actual browsers (e.g. webkit or mozilla, or whatever).
07:16mfexfliebel, there is also this in java: http://htmlunit.sourceforge.net/
07:16Licensercemerick: my yuck with maven is that the pom's are horrible to read/write and the oficial documentation expects to to know the stuff already since they just explain things like: Filter - you can filter stuff with that, no mention of syntax or how exactly things work
07:16cemerickfliebel: As you like. Just because something's not written in Clojure doesn't mean it's bad. Having JVM libs at our disposal is one of our greatest strengths.
07:18cemerickLicenser: If it's XML you don't like, I'd agree with you; but, that's the same objection people raise about lisps and their parentheses…fundamentally a cosmetic one. FWIW: http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files
07:19Licensercemerick: yes I do dislike XML but if I had to write 160 lines clojure to compile my project and pack it in a jar I'd just object that as much
07:20LicenserI don't even dislike XML in general, I think it is overused in some places and the pom is one of them in my eyes
07:20fliebelcemerick: I will have a look around. The Python thing works fine, but the browser is a mutable object, that changes as you browse, so I have to make sure to leave it as it was after every action.
07:21Licensercemerick: I think I read that already, but I still failed to do what I wanted and had to redo my application structure since I failed to work out maven's copy stuff dependencies
07:22Licenserhack I am still not rid of the useless folders in the target directory
07:22cemerickfliebel: I wouldn't expect anyone to be crazy enough to reimplement a browser client framework in a persistent fashion. *shrug*
07:23Licenserthings like maven-archiver
07:24fliebelcemerick: I don't see why a browser needs to be so stateful on a sateless protocol like HTTP.
07:24Licenseror classes - for some reason
07:25Licenser[
07:26cemerickLicenser: there's no doubt that maven is not the simplest tool. Of course, if it were, I wouldn't be using it.
07:26Licenserdon't you like simple tools?
07:28cemerickfliebel: A stateless protocol says nothing about the architecture of the client that implements it.
07:29cemerickLicenser: Yes, but I need *capable* tools as well. A simple build tool that can't do what I need it to do isn't very helpful to me.
07:29LicenserI personally think that simplicity is a very important feature
07:29Licensercemerick: I think that's wrong
07:29Licenserthings don't have to be complicated to be capable
07:30fliebelcemerick: True, I can see how this could be implemented in a persistent manner though.
07:30LicenserI belive that simple things should be simple
07:30cemerickfliebel: I'm certain it could; the question is, who wants to take that particular implementation and maintenance burden? ;-)
07:31cemerickLicenser: "build", broadly writ, is not a simple concept.
07:31LicenserI mean I dear to say that many pom files are more complex and hard to write then the code they compile - especially in clojure land
07:32Licensercemerick: it has simple basics
07:39cemerickLicenser: We'll have to agree to disagree. I've exceeded my quota of beating the dead build horse for the day. FWIW, my bottom line re: maven v. lein/cake is here: http://groups.google.com/group/projectclj---spec/msg/ff9439428484059b
07:45bozhidarhi, guys
07:45bozhidaranyone here running stock SLIME + clojure?
07:46bozhidarrecently I've been hacking some Common Lisp and I had to go back to the stock SLIME instead of the clojure compatible in ELPA
07:46bozhidarso I was wondering what are my options now
07:47bozhidarI tried connecting to a swank-clojure server started from lein
07:47bozhidarthe repl opened
07:47bozhidarbut nothing would be evaluated in it
07:47bozhidarthere was nothing significant in the inferior lisp buffer as well
07:59mrBlissbozhidar: I've experienced the same. I'm using slime-20100404.1 from technomancy's elpa repo. I pulled in the rest of slime of the same CVS revision (the same day at least), hoping it wouldn't break. I didn't touch the original files from technomancy. Clojure works perfectly and CLISP as well. The only problem I've noticed: closing CLISP sldb buffers produces an error, but you can just ignore it and press enter again.
08:00bozhidarmrBliss: I dream of upstream Clojure support in SLIME someday...
08:00mrBlissbozhidar: me too :-)
08:01mrBlissbozhidar: or a non-stripped down version of SLIME in technomancy's elpa repo.
08:01bozhidarwell, he mentions in the docs
08:01bozhidarthat his slime should work with Common Lisp
08:02bozhidarbut it doesn't(at least for me) and that's what's causing my grief
08:02bozhidarbut you're right, a fully fledged SLIME would be a welcome resolution to the problem
08:03bozhidarwhat environment are you using cemerick?
08:03mrBlissThe thing I hate about SLIME is the font on the homepage (Curse you Comic Sans MS!) ;-)
08:04cemerickbozhidar: I use Eclipse and ccw, but I wouldn't bother trying to convert emacs users; my point is, a purpose-build emacs environment for Clojure would seem to be an obvious step, yet no one's taken it.
08:06cemerickSLIME (AFAIK) is weighed down by a ton of stuff that's legacy to CL, knows nothing about the JVM, and apparently breaks on HEAD regularly vs. swank-clojure. Seems less than ideal. *shrug*
08:06bozhidarcemerick: you're absolutely correct. As far as I know the problem is that the implementation of such supports require vast knowledge of both SLIME & Common Lisp
08:06cemerickBut then, I'm the last person that should be advising emacs users on what they should do. ;-)
08:07bozhidarcemerick: I'm a progressive Emacs user and I understand and accept its problems
08:07jweissif i just want to create a class with some methods (and I won't be creating any instances from clojure, just creating the class to be consumed by a java tool), can i use reify? i don't have any interfaces to implement
08:09cemerickjweiss: reify generates an instance of an anonymous class.
08:09cemerickYour use case would require gen-class.
08:09bozhidarcemerick: Emacs is less than ideal for many tasks, but I think that Lisp coding is not one of them. If the situation around slime doesn't get resolved however I might move my Clojure coding next to my Java coding - in IntelliJ IDEA
08:10jweisscemerick: ok that's how i'm doing it now. i thought i might be able to use defrecord or reify, but i don't think it quite fits
08:10cemerickbozhidar: how is La Clojure doing these days, anyway? It was in rough shape last I looked.
08:10cemerickjweiss: You could use definterface and defrecord together…
08:10bozhidarcemerick: there is a new release of the plugin for the upcoming IDEA X
08:11bozhidarI haven't had the time to play with it yet, but I heard some nice comments about it
08:11cemerickI heard it's not functionally different though…just made IDEA X compatible?
08:11jweisscemerick: yeah, i may try that just because gen-class is awkward. i don't even need the interface but it may be less awkward :)
08:11bozhidarcemerick: the old version didn't even work so I'd call this is a welcome improvement :-)
08:12cemerickha.
08:12cemerickyikes :-)
08:12bozhidarcemerick: it seems that JetBrains are investing heavily in Groovy & Scala - the support from them rivals the Java support
08:12cemerickGroovy makes sense. Scala seems like a bad bet.
08:13cemerickbozhidar: you should give ccw a shot, if you can bear the pain of eclipse ;-) The latest RC is *very* good, and lpetit is busy making it better even now.
08:13bozhidarcemerick: what makes you think that? most people seem to prefer scala - better performance, FP
08:14lpetita grave for groovy
08:14bozhidarcemerick: I might check it out. I used to use Eclipse a lot before I found IntelliJ and don't have anything against in particular(except for the terrible plugin updates)
08:14cemerickbozhidar: Groovy has a *huge* community, far larger than either scala or Clojure. And, assuming Oracle doesn't drop the ball on Java 7 and 8, I don't think scala will see much "mainstream" adoption. *shrug*
08:15lpetitcemerick: java has a *huge* community :p
08:16cemericklpetit: point taken, I was speaking in relative terms. Groovy has a decent sized community. Better? ;-)
08:16cemerick'course, we'd then have to characterize the Scala and Clojure communities as diminutive, which is rhetorically unfortunate.
08:17lpetityes, to me groovy filled a hole. And now "it's there". But really I don't like groovy. Even groovy's creator said he would not have written groovy if scala had been 4 years older.
08:17bozhidarcemerick: sadly, in my country(Bulgaria), none of those languages has any community
08:17bozhidarI judge about something'
08:18bozhidars popularity by google trends, stackoverflow questions and the amount of books being published
08:18cemericklpetit: I saw that, and I don't understand it at all -- groovy as the dynamic counterpart to Java isn't replaced in any way by scala.
08:19bozhidarscala feels like a dynamic language although it's not
08:19fogus`cemerick: It depends on the original motivation for creating Groovy.
08:20bozhidarand it has nice support for parallel programs, which Groovy lacks
08:20lpetitcemerick: to be really honest, programs which start with weak static typing compilation checks do this half by religion, half by ease of implementation !
08:21cemerickfogus`: yeah, perhaps he had a particular use case that is now better served by scala. On spec though, the languages couldn't be less alike.
08:21lpetitfogus: indeed, thus my point on not doing compile time type check and saying it's a feature where it's a resource dedication choice
08:22lpetits/where/when/
08:22sexpbot<lpetit> fogus: indeed, thus my point on not doing compile time type check and saying it's a feature when it's a resource dedication choice
08:22fogus`If I hadn't discovered Clojure the world would have had to content with yet another poorly implemented Scheme. :p
08:22fogus`s/content/contend/
08:22sexpbot<fogus> If I hadn't discovered Clojure the world would have had to contend with yet another poorly implemented Scheme. :p
08:23bozhidarhaha, good one fogus` :-)
08:23dnolenlpetit: it's not just a resource dedication choice. Static typing guarantees are still so weak. You build a complex system that can catch only a small portion of programmer error.
08:24cemerickfogus`: no need to stop now; it's not like yet another poorly implemented scheme will hurt anything. ;-)
08:24lpetitdnolen: I'd call that "throwing the baby with the bath water" :)
08:24fogus`cemerick: ;-)
08:24dnolenlpetit: no, it's like ubiquitous laziness, it's a great idea generator. but it's a also a big pain in the butt.
08:24lpetitAt least the Qi language has proven that this could be done.
08:26dnolenlpetit: yes Qi's approach is great. But with Qi III just around the corner, that's 10 years of work. resource dedication has to be considered in that time frame.
08:26lpetitdnolen: I would really see nothing wrong with an optional type check system "a la Qi" on clojure. And Rich seems to agree with this.
08:27lpetitdnolen: Exactly. It's more resource dedication than anything else. It's too easy to claim it's a feature not to have it.
08:28dnolenlpetit: totally. but it's not a feature worth having if not done right.
08:28dnolenI find Odersky's complaints on how Scala's popularity basically froze the language telling in that regard.
08:29dnolens/complaints/comments
08:29sexpbot<dnolen> I find Odersky's comments on how Scala's popularity basically froze the language telling in that regard.
08:29cemericklpetit: does he really agree? I thought his last comment was in the neighborhood of "if someone wants to implement it and use it, they're free to do so"…
08:29fogus`cemerick: That was my "reading" as well
08:29lpetitdnolen: granted. And I really appreciate Rich having the intelligence to say that, cause then clojure is not slowed down by a poor implementation.
08:31dnolenAlan Kay's points about "style" vs. "accretion" languages is also appropriate. Lisp usually gives you an escape hatch and and more opportunities to change your mind.
08:31cemerickdnolen: well, Scala needed some freezing. fogus`'s tweets notwithstanding, I struggle to truly understand scala code, even if I can bang it out mostly blindly.
08:31cemerickThat needed a ;-)
08:32lpetitcemerick: I remember him telling that he would find it interesting to do something like in Qi. But there are a lot of pre-requisite work, which have not been done yet. He (wisely) wanted to be able to build this on top of a more general rule inference system.
08:32cemerickI must not have been around for that.
08:33kotarakI recently listened to two introductory talks to Scala. And I was quite disappointed of what kind of hoops you have to hop through. And how the underlying warts and bolts shine through... :/
08:33fogus`lpetit: ... with Datalog at its base
08:33cemerickfogus`: I was going to say, a decent unification library would make a lot of sense…
08:33lpetitfogus: yes, it's "Datalog" I couldn't make out of my fingers.
08:35esjyes please ;)
08:35lpetitcemerick: there http://groups.google.com/group/clojure/browse_thread/thread/6f8bf865f4afbb6f/5d8366b79d80edc0?lnk=gst&amp;q=datalog+static+typing#5d8366b79d80edc0
08:36lpetitfogus: I'm really a noob wrt these inference engines. For example (without tongue in a cheeke pliz ;) ), are clojure.unify and mini-kanren and alike (logos it is ?) competitors ?
08:37cemerickah, I do seem to remember that…from before I gave up on reading the clojure ML
08:38dnolenlpetit: Logos is me mostly me studying Prolog and Prolog literature in Clojure, w/ an interest in seeing how well a Clojure Prolog engine could perform.
08:39dnolenminiKanren is basically a purely functional take on Warren's Abstract Machine, a good thing to try with Clojure.
08:39fogus`lpetit: The core.unify lib only solves a very narrow problem that is orthogonal to inference.
08:40dnolenI think a sufficiently performant Datalog in Clojure will need to use ROBDDs. Lots 'o work.
08:41lpetitROBDDs being ... ?
08:41dnolenReduced Ordered Binary Decision Lists
08:41lpetitok, it's definitely not my field of expertise :-p
08:41fogus`lpetit: David has taken a slightly different route to unification than me, but I don't see it as competition. Hopefully there will be cross-pollination
08:41dnolenhttp://bddbddb.sourceforge.net/
08:41lpetitthanks for the info!
08:42lpetitmust leave, cu
08:42esjbddbddb !
08:42esjits like caadddr :)
08:44fogus`lpetit: take care
08:45esjthing they could have thrown some "p"s in there to give the dyslexics more to cheer about
08:46dnolenfogus`: totally, I added my unifier to see what it would take to add one that worked like yours.
08:55bozhidarcemerick: IDEA's La Clojure doesn't look that good even now - starting a new REPL generates a NPE :-)
08:55cemerickyikes!
08:55cemerickbozhidar: that's even worse than before IIRC
08:56bozhidarit's still RC so they fix something before the final release but I seriously doubt it
08:56bozhidarLa Clojure doesn't support Clojure 1.2.0 as well
08:56bozhidaronly 1.0 and 1.1
08:56cemerickMight be time to stick a fork in that one. :-(
08:56bozhidarit seems that trying ccw might be a good idea :-)
08:57cemerickbozhidar: Definitely go for the RC. It has much-improved REPL support.
08:57cemerickI think we'll probably do one or two more RC's before putting out an 0.2.0 release.
08:58bozhidarok, I'll certainly try the RC
09:01bozhidarbtw as we spoke JetBrains officially unveiled IntelliJ X :-)
09:07cemerickbozhidar: whoa, they list Clojure as a "supported language". That's some unfortunate marketing B.S.
09:09bartj&(clojure.set #{2} '(2 3))
09:09sexpbotjava.lang.ClassNotFoundException: clojure.set
09:10bozhidarcemerick: the small community is the greatest IntelliJ weakness. There is almost nothing developed outside of JetBrains and the end result is to be expected...I think the same 5 or so guys develop the plugins for most of the lesser known langs and I really doubt that they are experts in all of them
09:10bartjthe above expression does not warn saying (2 3) is not a set
09:10bartjand it returns a #{}
09:11cemerickbozhidar: The published screenshots show them browsing around enclojure's codebase, too. That's just bad form. :-(
09:11cemericke.g. http://plugins.intellij.net/preview/popup/?sid=2625&amp;pid=4050
09:13bozhidarcemerick: this is disturbing indeed, I haven't noticed it before
09:13chouserweird
09:22bartjchouser, were you replying to my question/comment above?
09:24chouserbartj: no, that's just undefined behavior when you give a funtion undocumented input. :-)
09:24chouser"weird" was for a product screenshot to include code from a competing product
09:25chouseroh no, I created another race condition. Grrr
09:25bartjchouser, would that be classified as a bug?
09:27chouserbartj: probably not. well, maybe a bug in the code that's calling a clojure.set function with a non-set argument
09:34bartjchouser, ok, thanks
09:53jcromartiewhat's up with clj-stacktrace? the example in the readme doesn't print a stacktrace http://github.com/mmcgrana/clj-stacktrace
09:56jcromartienever mind, I'm way out of date
09:58jcromartiewas using 0.1.0
09:58jcromartienever mind, 0.2.0 doesn't do anything either
09:59dnolenjcromartie: are you using Clojure 1.2.0? IMO, Clojure 1.3.0 stacktraces outdo clj-stacktrace.
10:00jcromartieI'm using the released Clojure 1.2
10:00jcromartie1.2.0
10:01dnolenjcromartie: hmm, I never had any issues w/ clj-stacktrace and 1.2.0, but I mostly used it in the context of Ring.
10:02jcromartieIt just doesn't seem to do anything on exceptions in the repl
10:07jcromartieshould I be using clj-stacktrace 0.1.0 or 0.2.0?
10:08fogus`,``````````x
10:08clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.StackOverflowError>
10:08jcromartieis there perhaps some extra step I'm missing, or maybe it doesn't work with lein repl?
10:09cemerickkotarak: FYI: https://groups.google.com/group/clojure-clutch?hl=en
10:09kotarakcemerick: thanks :) Clojure and Couch feel like a good team. :)
10:09cemerickIndeed they are. :-)
10:10jcromartiecompare https://gist.github.com/734802 to https://github.com/mmcgrana/clj-stacktrace/blob/master/README.md
10:11jcromartiewow ok
10:11jcromartieyou know what's COMPLETELY missing from the clj-stacktrace readme?
10:11jcromartiethat you have to use (pst) to print stack traces
10:12tonyljcromartie: it seems like clj-stacktrace is not being loaded in the class path
10:12tonylwait, scratch that
10:12tonylthen use would've send an error
10:13jcromartiereadme says "For example, to print a nice stack trace in a REPL:" but is missing a rather important bit (the part with what you have to do to actually print the stack trace)
10:14tonylI would contact the author about it.
10:22fliebelkotarak: I missed the conversation about Couch. What are you doing?
10:22kotarakfliebel: there was not really a discussion about couch. I use it to back me homepage rewrite.
10:23jcromartieI've thought about using couch
10:23fliebelkotarak: Are you using Clutch or Clojure-CouchDB? (And what is the homepage?)
10:23jcromartiebeing able to just stick Clojure hash-maps in a document store seems too good to be true though
10:24jcromartieI wonder how it would scale for a business app
10:25fliebelI wonder how those CouchDB libs deal with failed updates.
10:25kotarakfliebel: clutch. http://kotka.de/blog. The blog is done by blosxom (an ancient perl script). The static part is terribly out-of-date, because I broke my mason scripts (also perl). I'm about a re-design with a new build system in the background using clojure and couch.
10:26kotarakfliebel: they will probably tell you?
10:26fliebelFor example, I get 2 copies of the same document, update them, and insert the updates one after another. After the first update, the _rev is changed, and the second update will fail.
10:27fliebelSo unless there is magic in there, it looks painful in a real app where Couch gets hammered a bit.
10:29kotarakfliebel: this is what clutch tells you: #<CompilerException java.io.IOException: CouchDB Response Error: 409 Conflict (REPL:4)>
10:30fliebelkotarak: I thought it would be nice to implement the atom interface on top of Couch, but I can't, because there isn't one.
10:31kotarakfliebel: I know. And even if it were there, I'm not sure it would be a good idea. However I showed how you do it locally for your projects (or anyone who wants to use the modified API).
10:31kotarakfliebel: I would be highly suspicious of any automatic merging going on there....
10:32fliebelkotarak: No merging! Just getting the new version and applying the fn until it works. Just like the regular Atom spin loop.
10:33kotarakfliebel: yeah exactly. The merging. Someone changes a key :a to value :b and another one to :c. The :c guy is faster (and more correct because :b is already out-of-date). Now the :b guy retries and overwrites with a wrong value. No. I don't like that.
10:33kotarakAt least not for the systems I work with.
10:34kotarakIf everything is purely based on computations, then the situation might be different.
10:34fliebelkotarak: So how would you handle the issue if Couch told you the update failed?
10:35kzar`I'm just reading about multimethods, haven't tried them yet but they look cool. One thing I wasn't sure about, when you use stuff like (derive doesn't that change some global variable somewhere? Does it end up working OK?
10:35kotarakfliebel: the :b guy (which is a guy in front of computer) would go "huh?", read ":c", understand what happened (or get that understanding from a colleague) and skip his try to write :b somewhere
10:36kotarakkzar`: it does end up OK, because you have to use ::qualified-keywords.
10:37kzar`kotarak: How come using qualified keywords makes it OK? (Sorry I'm probably being dumb here)
10:37kotarakkzar`: because your derivations don't interfer with others. But you can just as well use a custom hierarchy with defmulti.
10:37fliebelkotarak: But you're assuming you just change the value regardless of that's in it, in which case you'd use reset! If you do (swap! doc inc) You'll want to have both executed, regardless of the order.
10:38kotarakfliebel: I don't need that up to now. But maybe my systems are just weird.
10:39kotarakand the user base small...
10:39kotarakand the data volume miniscule....
10:39kotaraketc.
10:39fliebelkotarak: But your case would still work as expected with reset!, right?
10:39kzar`kotarak: OK thanks I think I getya
10:40kotarakfliebel: no. Because afterwards there is a :b, where there should be a :c. The point is, that the computer cannot decide about :b or :c. You need human intervention. (In my case. Incrementing a counter is something different)
10:42jweiss& (#({:k :v}))
10:42sexpbotjava.lang.IllegalArgumentException: Wrong number of args (0) passed to: PersistentArrayMap
10:42jweissi'm a little baffled by the syntax here, how come it doesn't just return the map
10:43kzar`jweiss: I think you're trying to call the map as a function but with no arguments
10:43kzar`,{:a 1 :b 2}
10:43clojurebot{:a 1, :b 2}
10:43jweisskzar`: i thought i was creating a fucntion that returns a map, and calling the function.
10:43kotarakjweiss: #(foo) is (fn [] (foo))
10:44tonyl((fn [] {:k :v}))
10:44tonyl&((fn [] {:k :v}))
10:44sexpbot⟹ {:k :v}
10:44kotarak,(#(hash-map :k :v))
10:44clojurebot{:k :v}
10:44jweissah so i can't use the literal
10:44jweissok thanks
10:44fliebelkotarak: So you define the 'correct' order by the order people get the value, rather than by the order in which they update it?
10:45kzar`jweiss: Could you do it like this ,(#(map [:k :v])) ?
10:45kzar`,(#(map [:k :v]))
10:45kzar`,(#(hash-map [:k :v]))
10:45clojurebotjava.lang.IllegalArgumentException: Wrong number of args (1) passed to: core$map
10:45clojurebotjava.lang.IllegalArgumentException: No value supplied for key: [:k :v]
10:46kzar`,(#(hash-map :k :v))
10:46clojurebot{:k :v}
10:46tonyl&(#(apply hash-map [:k :v]))
10:46sexpbot⟹ {:k :v}
10:46kotarakfliebel: No. I define "correct" by the content. If two people edit the same entry at the same time, those two people have to figure out, whether everything is ok on conflict. Not the machine.
10:48kotarakfliebel: Because the machine can't know whether really 500 or 700 units are blocked in production somewhere at the other end of the world.
10:48kotarakfliebel: But the people working with the data know it.
10:51fliebelkotarak: … Okay, I'll give the issue some more thought.
10:57fliebelkotarak: I think in your case you could still use compare-and-set! to resolve the conflict case yourself.
11:15Islondoes anyone knows how to add a maven repository to cake?
11:19RaynesIn your project.clj: :repositories [["nameofrepo" "linktorepo"]]
11:19RaynesShould do the trick.
11:23Islonthanks Raynes =)
11:55fliebelkotarak: I'm trying the protocol thing now, but it doesn't work: java.lang.IllegalArgumentException: No single method: swap_BANG_ of interface: iatom.IAtom found for function: swap! of protocol: IAtom
11:56fliebelOkay, I'm messing up arguments...
12:03Islonhow do I take elements from a seq 2 by 2?
12:03tonyltry partition
12:04tonylpartition-all too
12:04Islonexactly what I want!
12:04Isloni always forgot function names ><
12:05tonylme too, there are a lot of function names
12:06Isloni know what the function does but not the name
12:09tonyl&(count (remove fn? (vals (ns-publics 'clojure.core))))
12:09sexpbotjava.lang.SecurityException: You tripped the alarm! ns-publics is bad!
12:09tonyl,(count (remove fn? (vals (ns-publics 'clojure.core))))
12:09clojurebot546
12:09Isloni should use more clojuredocs too
12:10tonylthat is not counting macros
12:10tonylyeah that helps me
12:10tonyl,(count (remove #(:macro (meta (var %1))) (vals (ns-publics 'clojure.core))))
12:10clojurebotjava.lang.Exception: Unable to resolve var: p1__571# in this context
12:11tonylI am getting this error
12:11tonyli don't know why
12:12tonyl,(count (filter #(:macro (meta %1)) (vals (ns-publics 'clojure.core))))
12:12clojurebot71
12:12tonylweird
12:17amalloytonyl: %1 can be shortened to %, and #(:macro (meta %)) can be written as (comp macro meta)
12:17amalloyer, :macro
12:17tonylthat is true, I need to use comp more, god knows my code needs it in some parts
12:18tonylbut i thought meta needed a var
12:18tonylnot a symbol
12:18tonyloh wait ns-publics vals are vars
12:18tonyl:P
12:18amalloyright you are
12:26fliebelOkay, I'm still messed up with the methods of my protocol. :(
12:27fliebelThis is what I have: https://gist.github.com/735020
12:28fliebelworks: (swap! (atom 1) + 1) fails: (swap! (atom 1) inc)
12:29amalloyfliebel: "fails" is not very specific
12:29clojurebotYou don't have to tell me twice.
12:29Chousukefliebel: protocol fns don't support varargs
12:29amalloylol. good work clojurebot
12:29fliebeljava.lang.IllegalArgumentException: No single method: swap_BANG_ of interface: iatom.IAtom found for function: swap! of protocol: IAtom
12:30Chousukefliebel: so you're in fact binding three parameters, f, & and args
12:30fliebelChousuke: That doesn't make sense, I think… The one without varargs is the one that fails, right?
12:32fliebelAnd what about reset! and compare-and-set! they don't use varargs either, but they don't work as well.
12:32Chousukehm wait
12:33Chousukedon't you need to add "this" to the protocol declarations too?
12:33fliebelI don't know… Might try...
12:33Chousukewould explain why (swap a + 1) works since it takes three args. (that get bound to f & args)
12:34fliebelNow everything I do gives me the error.
12:37amalloyfliebel: that's progress! (probably)
12:38fliebelone moment...
12:42fliebelRight, now that I have everyting sorted out, it comes down to the vararg problem.
12:43fliebelBut java.lang.Atom must also take varargs in some way, right?
12:43amalloyfliebel: clojure.lang.Atom
12:43fliebelright...
12:44hiredmanyou can trivially turn a vararg into a fixed arg
12:45fliebelswap(IFn f, Object x, Object y, ISeq args)
12:45hiredmanprotocols are best as implementation contracts, not usage
12:46hiredmanso you have a lower bound of what is needed, which is described by a protocol, with a library of functions built on top of it
12:46fliebelsorry, diner is ready.
12:56Licenseraloa
12:57amalloyhiredman: ah, i see what you mean. so his Atom protocol only needs (atomic-swap f args), and then he builds a library on top of that to supply swap!, reset!, etc, for everything that extends the Atom protocol?
13:02hiredmanreally it only needs to take a function since you can pass it something like #(apply f % args)
13:03amalloybetter still
13:04amalloyi'm starting to feel like i might understand how protocols are different from interfaces now
13:18fliebelI hope this makes somewhat sense? I works at least… https://gist.github.com/735020
13:21amalloyfliebel: did you read what hiredman and i discussed while you were at dinner?
13:23amalloythat is, IAtom would be best written as a protocol with just one function, named something like atomic-swap or swap*, and then you build up a library of functions that use that to implement varargs, reset!, etc, on top of that function
13:24fliebelamalloy: So I would just be doing ava.util.concurrent.atomic.AtomicReference
13:27amalloyno, you'd be defining an interface/protocol for things that are like AtomicReferences
13:27fliebelBut it does make sense...
13:27amalloythen you build a library that deals with such things, and extend your protocol to AtomicReference, c.l.Atom...
13:28fliebelright, makes sense.
13:29fliebelBut then I do have to implement Atom I think...
13:30amalloyum, what?
13:31fliebelIf I have compare-and-set! defined in the interface, I can't simply map swap! to clojure.core.swap!
13:34amalloy(defn aref-swap! [ar f & args] (compare-and-set! ar #(apply f % args)))
13:34amalloyis not a complicated implementation
13:36fliebelamalloy: But that is not a proper swap!, swap! loops until compare-and-set! succeeds. But anyway, I need to implement a abstract swap! and reset! and do the interface for compare-and-set!
13:38fliebelAnd there is still validate and notifyWatches to consider. Both are in ARef, which I don't fancy implementing.
13:39amalloyso make swap! your primitive, if you prefer. is there a reason you need access to compare-and-set?
13:39fliebelYea, because it's part of what Atom does, and part of what I want. As kotarak outlined, swap! is not the solution to everything.
13:47fliebelamalloy: Any idea how to best get hold of the methods in ARef?
13:49amalloyfraid not. i don't think i understand the question, but that's all right cause i can't think of a meaning for the question where i'd know the answer :)
13:50fliebelamalloy: I think I'll have to implement IRef and do it myself. Atom extends ARef, which contains methods to implement watcher and validator functions.
14:10amalloyfogus`: did you see what he did yesterday to poor tree-seq? i'm thinking chaotic good
14:11technomancyI'm just gonna leave this here: http://www.piratejesus.com/nerdcore/005.html
14:12Raynestechnomancy: I'm just going to pick it up and walk off with it.
14:15fliebelIs there a reason why swap calls validate and notifyWatches as well? Because it calls compareAndSet which does both already.
14:34brehauthas anyone got a good intro/best practise for the clojure.test stuff?
14:34auseryes, i would like that too
14:34brehautim currently fumbling round in the dark writing the worst tests in the world
14:42KirinDaveHum
14:42KirinDaveI have a var containing a reference to a class.
14:42KirinDaveHow do I construct a new instance of the class referred to in that var?
14:43KirinDaveIs it just reflection stuff?
14:43hiredmanyes
14:44Chousukean actual var object or just a global def?
14:44amalloy,(.newInstance java.util.Date)
14:44clojurebot#<Date Thu Dec 09 11:44:52 PST 2010>
14:44KirinDaveShucks, was hoping there was a clojurism.
14:44hiredmanamalloy: not all classes support that
14:44KirinDaveChousuke: Actual var.
14:44Chousukethen you need to deref the var first I guess
14:44cemerickKirinDave: check out clojure.lang.Reflector for handy utility methods.
14:44amalloyhiredman: well, depends what you mean. they all support newInstance, but they don't all have a no-arg ctor
14:45hiredmanwhich is what I mean
14:45KirinDaveIt'd be an error if they didn't have a no-arg ctor.
15:04fliebelHow do I run java with the cake cp?
15:07jjidoCan someone help me with TWAIN-SANE? I installed all the packages, I have the preferences pane but no SANE button in Image Capture
15:08stuartsierrajjido: I think you've got the wrong channel.
15:08RaynesI think you've got the wrong universe.
15:08jjidostuartsierra: well observed.
15:09jjidoRaynes: what is yours?
15:12ninjuddfliebel: what do you mean by that?
15:18fliebelninjudd: I need to do something like java -jar -cp some:jars:in:my:project some.class, but doing so manually is painful and unsafe, because I use some snapshots in deps.
15:18ninjuddfliebel: just build an uberjar
15:18ninjuddor you can use 'cake bin' to create a standalone executable
15:19fliebelFair point… So I just do java -jar my-project.jar some.class
15:20ninjuddfliebel: if you want to use -jar, you need a main class
15:20ninjuddjust add ':main namespace' to your project.clj
15:20ninjuddand add a -main function to that namespace
15:20fliebelninjudd: some.class needs it right? Not my core ns.
15:21ninjuddyour main function can be in any namespace you want, but you can only have one per project
15:21bytecolorimport choco.Choco; => (ns choco-tut (:import (choco Choco))) ; is this a correct translation from Java to clojure?
15:22chouserso, what's the state of the art for maven/lazy-test integration?
15:22tonylbytecolor: it looks like a good import to me
15:22chouserstuartsierra: oh, hi
15:23technomancybytecolor: should be choco.bo; kupo!
15:23technomancy(not really)
15:23dmart__chocobo.. wasn't that a bird in some video game?
15:24tonylsounds like an incantation lol
15:24stuartsierrachouser: hi.
15:25stuartsierraLazytest has a Maven plugin of its own now.
15:25chouserah, I see it.
15:25bytecolorI'm trying to access a method of Choco: (.makeIntVar Choco "foo" 0 3) ; IllegalArgumentException No matching method found: makeIntVar for class java.lang.Class clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:50)
15:25chouser1.0.1-SNAPSHOT
15:25stuartsierrayse
15:25stuartsierrayes
15:25stuartsierra1.0.0 release will also work
15:26stuartsierraThere's no direct dependency between the plugin and the library version.
15:27nickikstuartsierra, could you tell what the stat on the clojure conj videos is?
15:27chouserstuartsierra: should I mention the test goal in the plugin config?
15:27tonylbytecolor: have you try separating the ns and import statement?
15:27stuartsierrachouser: test is a phase, not a goal, and yes
15:28bytecolortonyl: hrm, no
15:28tonyllike (ns choco-tut) (import '(choco Choco)) (.makeIntVar Choco "foo" 0 3)
15:29stuartsierrachouser: the sample-maven-project module shows you how to set it up.
15:29tonylif makeIntVar is static you can use (Choco/makeIntVar "foo" 0 3) to
15:29chouserstuartsierra: ah, thanks.
15:29mduerkseni'm just wondering: does anyone use a infix macro? i built mine because some math forms are really more readable, but interestingly i don't use a often as i thought i would at the beginning. i'm quite new to lisp, is it the case that after some time, one can read prefix-math just as well?
15:30stuartsierrachouser: So are you actually using lazytest?
15:30chouserstuartsierra: about to
15:30stuartsierracool
15:30chouserstuartsierra: should I not?
15:30tonylbytecolor: if not, it seems like a reflection problem
15:30bytecolorI don't know if it's static or not, there is not instance of Choco. I'm using my C++ understanding of 'static' here. I'm Java stupid.
15:30stuartsierrachouser: no, just curious, haven't heard from many people
15:30chouserwe've got new code, and need unit tests. I'd hate to use clojure.test since it's creator has abandoned it. :-)
15:31chouserhm, we're not on clojure 1.3 yet. might be a problem.
15:31bytecolortonyl: same error if I separate the two
15:31raekmduerksen: incanter (a statistics lib) provides an infix macro, as people seems to prefer the usual notation for mathematic expressions
15:31chousermainly ring's fault.
15:32tonylbytecolor: it seems like a reflection problem, based on that error
15:32tonylfrom the arguments that makeIntVar needs
15:32chousermduerksen: that experience is common, I believe. by the time one knows lisp well enough to write an infix macro, one has already begun to find it less attractive.
15:32bytecolortonyl: is that something *I* can work around?
15:32tonylsure
15:32tonylwhat is the signature of that makeIntVar method?
15:32chousermduerksen: http://www.fogus.me/fun/unfix/
15:32clojurebot#<RuntimeException java.lang.RuntimeException: java.lang.Exception: 503>
15:32bytecolortonyl: you mean the way in which the args are overloaded?
15:33tonylyeah
15:33bytecolorah
15:33bytecolortonyl: three overloaded methods, second var differs, int, List<Integer>, int[]
15:34bytecolorsecond argument, that is
15:34tonylso the second argumend can accept int or a list of ints or an array
15:35bytecoloryes
15:35tonylthe thing is that clojure's ints are javas Integers
15:35tonylor in ver 1.3 would be Longs
15:36bytecolorI'm using 1.3
15:36tonylok so they are Longs I believe
15:36mduerksenraek, chouser: thank you. i think i will use infix occasionally, when it comes to bigger and more nested math.
15:36tonylyou need to convert them to primative int
15:37bytecolorah, with a simple cast?
15:37tonylor typehint them
15:38tonyllike ^int val, ^int val2
15:38bytecolorand yes, I'm clojure stupid as well ;) But I will learn clojure!
15:38bytecolorok
15:38tonylIt gets interesting when you are mingling with the host too
15:40bytecolorhrm, the call is (.makeIntVar Choco (str "cell" j) 1 (* n n)), so the last two forms would need to be cast to int
15:41bytecolor^int val, is that the same as adding meta data?
15:41bytecoloror just looks the same
15:41amalloybytecolor: it is the same
15:41tonylyou add the meta data
15:41amalloy&(meta ^String [])
15:41sexpbot⟹ nil
15:42amalloy&(let [^String x []] (meta x))
15:42sexpbot⟹ nil
15:42amalloyhm
15:42raek&(meta ' ^String [])
15:42sexpbot⟹ nil
15:42amalloywell, it's there somewhere :P
15:42tonyl&(let [x ^String []] (meta #'x))
15:42sexpbotjava.lang.Exception: Unable to resolve var: x in this context
15:43raekaren't you adding metadata to the code literal rather than the value?
15:43tonylyeah, but helps with reflection
15:43raek&(meta (with-meta [] {:tag String}))
15:43sexpbot⟹ {:tag java.lang.String}
15:50bytecolorhrm so I'd have to do: ^int (* 1)
15:51bytecolormeeting time. I'll get back to this in a bit. Thanks for the suggestions.
15:52arohnerhas anyone used jclouds blobstore successfully?
15:55hugodarohner: I have, and know of several others
15:56arohnerhugod: it used to work for me, running an older beta (3? 4?), now beta 6 through 8 are blowing up for me, just doing 'hello world' on s3
15:56arohner"Caused by: java.lang.NoSuchMethodError: com.google.common.base.Joiner.on(C)Lcom/google/common/base/Joiner;"
15:58amalloyarohner: that's java's linkage error: some class was built against a different jar version than it's being run against
15:59arohnerok. What can I do about it?
16:01amalloyusually i curl up into a ball and cry
16:02amalloyi don't know anything about your app, but you could look and see what jars on your build path and class path have com.google.common packages in them, and see if there are differences
16:03hugodI would agree, sounds like some sort of dependency issue - you might run mvn dependency:tree and see what is using the google libs
16:05arohneramalloy, hugod: thanks. That fixed it
16:05arohnerturns out, infer pulls in some google collections
16:08bytecolor(with-meta 1 {:tag int}) => ClassCastException, can't cast Long to IObj. Why is it an IObj and not clojure.lang.Integer?
16:09tonylthe arguments are flipped
16:10tonylbut a sole 1 can't be cast
16:10tonyli mean type hinted like that
16:11amalloy&(supers IObj)
16:11sexpbotjava.lang.Exception: Unable to resolve symbol: IObj in this context
16:11amalloy&(supers clojure.lang.IObj)
16:11sexpbot⟹ #{clojure.lang.IMeta}
16:11amalloy&(supers Integer)
16:11sexpbot⟹ #{java.lang.Number java.io.Serializable java.lang.Object java.lang.Comparable}
16:11amalloybytecolor: ints can't hold metadata
16:11chouserstuartsierra: lazytest:watch is awefully slick
16:11bytecolorah
16:12stuartsierrachouser: thanks!
16:14tonylbytecolor you could use (int 1)
16:14arohnerbytecolor: when type hinting numbers, the hint goes on the symbol, rather than the object
16:15tonylscratch my last advice, that won't help reflection on that overloaded method
16:15tonylyou are better of saving the value and type hinted it
16:15bytecolortonyl: that's what I'm about to try
16:17fliebelYay, that was easy(er than I expected): atom-style couch updates: https://github.com/pepijndevos/couch-atom
16:21amalloyfliebel: neat. you might want to tone down the warning about regular atoms: they'll only suffer in performance if the caller uses couch-atom.iatom/swap! instead of clojure.core/swap!
16:21arohnergrr, now blobstore is claiming that my data already in S3 fails the naming conventions
16:22fliebelamalloy: True...
16:28hiredmanarohner: s3 zones are apparently fragmented about allowed names
16:29arohnerhiredman: yes, but jclouds is failing when I call (containers) on data that's already in S3
16:29arohnerI call (containers), and then jclouds throws an exception and tells me my input data is invalid
16:30hiredmanah, well, thats jclouds for you
16:30arohnerhiredman: yeah. Just one of those days where everything's broken
16:32bytecolorcan't type hint a local
16:32amalloyarohner: good news! if ##(+ 2 2) is 4, then at least arithmetic isn't broken...*waits for sexpbot's result*
16:32sexpbot⟹ 4
16:32tonylbytecolor: what do you mean a local?
16:33hiredmanwe've stopped using jclouds for storage and ended up writing our own api which ended up looking sort of like https://github.com/hiredman/cellar (surprise surprise)
16:33amalloy&(let [^String x 10] (.length x))
16:33sexpbotjava.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
16:33amalloy&(let [x 10] (.length x))
16:33sexpbotjava.lang.IllegalArgumentException: No matching field found: length for class java.lang.Integer
16:34bytecolortonyl: well I was trying to store the literal 1: (let [x 1] ...) then type hint the x in the expression
16:34amalloybytecolor: i just type-hinted the local 10, and you can tell it works because i get different exceptions. what do you think you should be able to do that isn't working
16:34hiredmanand I consequently haven't done any further work on cellar
16:34bytecolor(let [x 1] ^int x) or (let [x 1] (with-meta x {:tag Integer}))
16:35arohnerhiredman: does it work?
16:35amalloybytecolor: but neither of those *should* work
16:35arohnerhiredman: or, how crazy do I have to be to use it? :-)
16:35amalloywith-meta is trying to tag the value 1, not the variable x
16:36amalloy^int x inside the let body is...probably trying to do: ((int)new Integer(1))
16:37hiredmanarohner: cellar? uh, pretty crazy, I think you should at least be using jets3t, I think the s3 support in cellar is just using the s3 http api
16:37hiredmanand be sure to handle cases where talking to s3 fails (happens more often then you'd think, even from ec2)
16:38bytecolorbbl
16:39hugodhiredman: I am sure adrian would like to hear your issues with jclouds in #jclouds
16:42hiredmanhugod: we don't have any issues anymore
16:42hugodhiredman: :) I understood that
17:04ihodesure
17:04ihodeswoops
17:06ihodesis anyone familiar with getting slime (specifically, slime-repl) working with swank-clojure without using ELPA?
17:08rata_ihodes: you can use lein swank
17:09ihodesrata_: i do use lein swank, the issue is getting my slime-repl connected to my running swank server. slime itself is connected, but i don't know how to access the slime-repl
17:10raekhrm. when using ELPA, I think that can happen if you install slime but not slime-repl
17:10rata_that's right... do you have slime-repl installed?
17:11raekthe repl is supposed to turn up in *slime-repl-clojure*
17:11ihodesi do have it installed, and i have it (require 'slime-repl) in an init file
17:11ihodesbut when i start slime (connect it to swank with slime-connect in emacs) the repl doesn't start
17:12raekone thing you could try is to install an older version of slime
17:12ihodes and if i start the repl on its own, i get a weird prompt
17:12ihodesi'm using Phil's modified version of slime and slime-repl
17:12rata_ihodes: try with (slime-setup '(slime-repl)) in your emacs init file
17:13ihodesoh sweet, that appeared to work! thanks. let's see if the rest does now :)
17:17ihodesrata_: excellent! thanks so much. i just don't like relying on huge software i don't quite understand more than i need to…e.g. ELPA.
17:17rata_=)
17:18ihodesrata_: one final question, if you will: i get this error when i do "slime-connect": Versions differ: nil (slime) vs. 20100404 (swank). Continue? (y or n)
17:20amalloyadd to .emacs: (setq slime-protocol-version 'ignore)
17:21rata_mmm.. I didn't know that one :)
17:22amalloycuriously it works on my home machine but not my work machine; i imagine it's an ordering problem - need it before or after something in my .emacs. i don't care enough to track it down, though, so no advice from me on that score
17:23technomancypackage.el is part of Emacs now... so you pretty much have to bite the bullet and get comfy relying on huge software you don't understand.
17:23technomancynobody understands all of Emacs
17:23ihodestechnomancy: is it? part of 24?
17:24technomancyya
17:24ihodesamalloy: thanks!
17:24technomancyhttp://bit.ly/pkg-el
17:24brehauttechnomancy: is that the elpa stuff?
17:25ihodestechnomancy: in that case, i'll wait until 24 is out to learn to love the bomb ;)
17:25ihodesunless it's out!?
17:26ihodescemerick: such an emacs-hater :P which IDE are you using?
17:26chouserorg.apache.maven.plugin.MojoExecutionException: Clojure failed.
17:26chouserat com.theoryinpractise.clojure.AbstractClojureCompilerMojo.callClojureWith(AbstractClojureCompilerMojo.java:429)
17:26cemerickihodes: shockingly, eclipse + ccw
17:26rata_technomancy: do you know a possible reason why "lein compile" doesn't compile my deps into classes/ ? (but it does in the other computers I'm using)
17:26cemerickchouser: surely there's a final cause floating around
17:27Rayneschouser: You didn't add enough Mojo to your Mojo, dawg.
17:27chousercemerick: that was the root cause. final exception: org.apache.maven.lifecycle.LifecycleExecutionException: Clojure failed.
17:27rata_*using it
17:27chouserat org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
17:28cemerickchouser: rerun with -X
17:28technomancyrata_: probably lein issue #141; working around a bug in clojure.
17:30chousercemerick: what do you want from that?
17:30chouserpresumably it's from this clause: if (status != 0) { throw new MojoExecutionException("Clojure failed."); }
17:30cemerickchouser: you should see a more useful root cause in there
17:30cemerickoh, bugger
17:31cemerickchouser: Assuming that's from c-m-p source, your next step is to throttle talios next time you see him ;-)
17:31cemerickchouser: if you like, go ahead and gist the whole mess of garbage you just got dumped with
17:31rata_technomancy: thanks! =) :keep-non-project-classes true solved the problem
17:32chousercemerick: let me double-check my plugin version number. 1.3.6 ?
17:33cemerickchouser: 1.3.7 is current
17:33technomancyrata_: in general shipping the .class files of your dependencies is not a good idea though. (modulo the protocol thing =\)
17:33cemerickthough I don't expect that you'll see any difference with it vs. 1.3.6
17:40chousercemerick: meh. Not sure I'm allowed to paste this.
17:41chousershoot. well, I've got to run now anyway.
17:41cemerickchouser: launch codes and everything, huh? How about just the part after where it starts the clojure:foo stuff.
17:43chouserhm, found the java command line it's apparently trying to run
17:43chouserthat runs fine, exit status 0
17:44chouserok, that's all the time I have. thanks for offering to help
17:44arkh_anybody know of anything that can receive/send with linux netfilter NFQUEUE from java (clojure)?
17:44arkh_goog gave no joy on that search
17:56rata_technomancy: I'm not shipping them, I just want them in the classes dir because so it's easier to set the classpath when calling my AOT-compiled files
17:57rata_*running
18:20joshua__Hi again. I'm using enlive for scraping right now and I found that I was using (first (:content (first [selector-goes-here]))) so frequently that I made a function fcontentf. Thing is it feels like grabbing the content and the like might be the sort of thing that is built into the library. My question: Is there a way to grab the content of the first selection easily (or any helper functions you think I should know about)?
18:23amalloyjoshua__: i know nothing about enlive, but if you actually wrote the function out as a defn, let me suggest something like (def fcontentf (comp first :content first vector))
18:24amalloyor something like that
18:24joshua__`(doc comp)
18:24amalloy(since i'm not sure what [selector-goes-here] means - is the [] a vector?
18:24amalloy&(doc comp)
18:24sexpbot⟹ "([f] [f g] [f g h] [f1 f2 f3 & fs]); Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc."
18:25joshua__Oh, that is nice.
18:25joshua__yes
18:25joshua__[] is the vector.
18:25amalloy&((comp inc inc inc inc) 1)
18:25sexpbot⟹ 5
18:25joshua__That is a cool function.
18:25joshua__It reminds me a lot of ->.
18:26raekjoshua__: this is what I often end up with: https://gist.github.com/645239
18:26amalloyjoshua__: functional programming is full of em!
18:26amalloy-> is very nice too, but as a macro you can't use it in the same places
18:26raek(all-text (first (html/select node [:p])))
18:26joshua__raek: that looks like where I'm headed too atm.
18:26joshua__ty for the suggestion.
18:26amalloy&(#(-> % inc inc inc) 1) :P
18:26sexpbot⟹ 4
18:27cky$source comp
18:27sexpbotcomp is http://is.gd/isOeP
18:28amalloyyou can implement comp using just reduce, which is a fun exercise
18:28ckyamalloy: You mean like http://refactormycode.com/codes/836? ;-)
18:29ckyamalloy: (Disclosure: I wrote that code.)
18:31ckyThe interestingness with Scheme is that you can return multiple values, so, a true composition operator would have to handle that case, and call the next function in the chain with the right number of arguments.
18:31ckyi.e., if you do (compose f g), and g returns 3 values, then it should call f with 3 arguments.
18:42gfrloglein repl doesn't work -- is this because everybody uses emacs and so I'm the only one who would notice?
18:43amalloygfrlog: lein repl requires a project, last i checked. are you inside a lein project when you run this?
18:43jcromartieI use lein repl
18:43jcromartieconstantly
18:44technomancygfrlog: there were issues with earlier releases, but I'm not aware of anything outstanding in 1.4
18:44jcromartielein repl should work without a project.clj
18:44technomancythat said, I don't know anyone personally who uses it, so there is an element of what you're suggesting. =)
18:44gfrlogamalloy: I am inside a project, and it's ironic you say that because I often run it outside a project
18:45gfrlogtechnomancy: I had 1.3 and things were fine (but old), and I tried downloading 1.4, which is when I started having trouble. It says it can't connect
18:45amalloysee my careful disclaimer: "last i checked" :P
18:45gfrlogit is a very good disclaimer
18:45scottjanyone have fast test running happening on save with lein?
18:46technomancygfrlog: interesting; guess we need an issue for that. haven't heard of that problem before
18:46gfrlogtechnomancy: this is what I'm getting http://codepad.org/l3L4NVhe
18:46gfrlogwhere do issues go?
18:47technomancyscottj: with clojure-test-mode C-c C-, saves, so you basically have it there with swank
18:48technomancygfrlog: github tracker
18:54gfrlogtechnomancy: so "lein repl" works fine outside the project. Were there any breaking changes to project.clj or anything else?
18:57technomancygfrlog: I don't know what's in your project.clj
18:58gfrlogI'll keep poking at it and file the issue if I can't figure it out
19:00technomancyit could be that the repl server is just taking too long to start and needs its timeout lengthened
19:01technomancythe repl task launches a socket server; so as a workaround you could telnet to it in another window
19:01scottjtechnomancy: nice, I guess I'm ok with going to the test buffer to run them. Have you hooked up difftest or anything to get better error messages in C-c ' or in repl?
19:02technomancyscottj: yeah, difftest works great.
19:03scottjC-c ' or repl? I have difftest working on lein test
19:04gfrlogtechnomancy: I bet it's that; My code has a database connection that can't be reached locally, so that might be the root cause
19:06technomancyconnecting to a DB at the top-level should be avoided
19:08gfrlogtechnomancy: noted; thanks for the help
19:12scottjtechnomancy: ^?
19:13ohpauleezRaynes: Have you considered renaming "show-issues" to "list-issues" in the github api
19:13ohpauleezto match the endpoint api name
19:13Raynesohpauleez: A lot of those names leave a lot to be desired. I've been meaning to go through and clean up the names and make them more consistent, but I've also been meaning to drop 50 pounds and learn to fly airplanes.
19:14ohpauleezRaynes: I'll fork and pull request, I'm going to be dorking around with the api to make a visualize tool in the next few days
19:15Raynesohpauleez: That would be great! Let me know if you run into any significant bugs. A lot of the more esoteric API calls haven't been tested.
19:15ohpauleezwill do
19:16jcromartielet's say I have a defmulti in one .clj file, and I have a bunch of defmethods in other namespaces, and so the defmethod files need to require the defmulti file
19:17jcromartieI guess I can't include all of the defmethod files from the defmulti file?
19:24ohpauleezjcromartie: Is the problem that you want to have all the defmethods written on other files, but available in the file where the defmulti appears?
19:24jcromartieyeah
19:24jcromartiealthough it's not really necessary
19:25ohpauleezjcromartie: Well, if you need it, checkout: https://github.com/ztellman/potemkin
19:25ohpauleezit gives you a "import-fn"
19:26ohpauleezif you can get around not using it, it's always nice not to have an extra dependency\
19:49jcromartieI just don't "get" code organization in clojure
19:49jcromartieor, in general
19:49gtraknamespaces?
19:49clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
19:49gtrakthanks clojurebot
19:49jcromartie:)
19:49gtrakhaha
19:49jcromartieyeah
19:49jcromartieI understand namespaces
19:49jcromartieand java packages
19:50jcromartieand anything else you want to call them
19:50jcromartiebut the general principles behind *building* them are lost on me
19:50jcromartieI guess because I haven't written enough large projects, but I want to try to split things up anyway since it sounds like a good idea
19:50jcromartieso I just mess things up in the end
19:50jcromartiebecause it's not really driven by necessity
19:51gtrakhow do they do it in lisp?
19:51gtraki'm really new to clojure, so I can't help so much, just asking :-)
19:51jcromartieI dunno
19:52jcromartiehttp://stackoverflow.com/questions/73045/whats-the-best-way-to-organize-code http://www.hanselman.com/blog/HowDoYouOrganizeYourCode.aspx
19:52jcromartiehmm, never mind, the hanselman link is junk
19:55jcromartieand stack overflow
19:55jcromartieNOTE TO SELF: don't paste links before reading them
19:55gtrakhttp://stackoverflow.com/questions/329221/medium-size-clojure-sample-application
19:56jcromartiehere we go http://stackoverflow.com/questions/670948/how-to-organize-packages-and-prevent-dependency-cycles
19:59gtrakthat's not really clojure-specific tho
20:01jcromartieno
20:01jcromartiebut I'm missing the more abstract concepts
20:03jcromartieok, focus time
20:03jcromartiebye
20:03auserlater
20:23brehautIs anybody willing to critique some noob code?
20:24gtraksure
20:24gtrakbut i'm a noob too
20:24brehautheh
20:24NoobFukaireI'm a noob as well
20:25brehauthttps://github.com/brehaut/necessary-evil/tree/master/src/necessary_evil
20:25brehautignore core.clj
20:40pppauli don't know what it is trying to do?
20:44brehautpppaul: my project?
20:46pppaulyeah
20:46pppaulit's easier to ask people to review a snip of code and state an objected of what it is supposed to do
20:48brehautpppaul: im fine with clj in the very small, its at a slightly larger scope that i need some help with. anyway. methodcall and methodresponse implement serialization and deserialization of xml-rpc's dodgy wire format
20:49brehautpppaul: parse and unparse are the entry point functions in both methodcall.clj and methodresponse.clj
20:50brehautpppaul: if you are unfamiliar with xml-rpc think of it as lame json
20:51pppaullove the json
20:51pppaulXML-RPC like SOAP?
20:51brehautits a precursor to soap
20:51brehautthe creator of xml-rpc was an early contributer to soap
20:52brehautits also about as underspecified as soap is over specified
20:54brehautmy apathy to the format has grown to quite strong dislike as ive worked on the project
20:56pppaulwell
20:56pppauli looked at it
20:56pppaulseems easy to read
20:57brehautthanks for taking the effort to do that
20:57scottjditto your body placement on same line as params is odd though
20:57pppaulpersonally, i think xml and code dealing with xml is not as sexy as json
20:58pppaulanyway, i tried doing xml stuff a little while ago, and my code was a mess compared to yours. so i'll use it as ref next time i need to work with xml
20:59brehautpppaul: sweet
20:59brehautscottj: you mean like [arg] (....) in defns?
21:01scottjbrehaut: yeah don't necessarily dislike it, but it does limit indentation later
21:02brehautscottj: ok. i've been a bit unsure about some of that stuff style-wise. i clearly need to go look at some more idiomatic code
21:05scottjthere is a certain attractiveness to there being whitespace below the arglist. the only other formatting thing I saw is most clojure code doesn't have columns of left justified stuff except at the beginning of a line. I personally like the look of it but it can be hard to be consistent and most programmers probably don't know how to do it automatically in their editor
21:06brehautscottj: one thing i like about the [arg] (body) thing is it makes 1 arity functions consistent with 2+ arity funs
21:06brehautscottj: im not sure what you mean by the left alignment, can you give me an example?
21:08scottjwhen you put more than one space between two forms
21:08brehautoh right
21:09brehautim sure i read a quote about that in the Joy of Clojure actually. really wish i had my PDF on this computer
21:12brehautcheers for the thoughts anyway
21:21chouserclojure-maven-plugin is failing, but refusing to say why
21:21technomancychouser: you're making me all nostalgic!
21:22chouserI fetched the source to add debugging messages, but I can't build it
21:23chouserrather frustrating
21:24hiredmangiven that talios was in here the other night and seemed to think that ^File[] a was a type hint that a is an array of files...
21:25chouserthe antlr maven plugin is fantastic. saved so much manual effort, once we found the latest version
22:08auserhola
22:08auserso I'm having a bunch of issues trying to get a library into my leiningin project
22:08tonylhola
22:09auserI need some insight... I'm trying to work with Hazelcast, which is *not* in clojars... so I downloaded the .jar and placed it in my lib/ dir. however, when I import it in the file, I get an error message (blech)
22:09auserhi tonyl :)
22:10ausera ClassNotFoundException, of course
22:10auserusing: (:import '(com.hazelcast.core Hazelcast Topic MessageListener)), that is
22:12auserI'm sure someone has had to deal with this in the past
22:13tonylI don't use lein
22:13tonylsorry can't be much of help
22:13auserhm, do you use a project.clj?
22:14tonylnope
22:14auserdo you use maven?
22:14tonylnever used java or lisp so I don't know java environment staff
22:14auserahh
22:14tonylI need to learn them though
22:14tonyl*stuff
22:15tonylbut there are a lot of capable people around here that know about this
22:15auser:)
22:15auserhope so
22:17auseralright, be back after I bike home
22:48rata_auser: ping!
22:48auserpong
22:48auserholla
22:48rata_hola
22:49rata_ok, to include a library that's not in clojars in your project file you have to do the following
22:49auser[oh you are a life-saver]
22:49rata_first, include it as a dep even if it's not in clojars and then run lein deps... it won't finish, but will say something interesting
22:50auseralrighty... I think I did that and got scared from the error message
22:50rata_for example, I have [clojure.data.finger-tree "0.0.1-SNAPSHOT"] in my project.clj, even when clojure.data.finger-tree isn't in clojars
22:50auserah, okay, then I'll add that back in
22:53auserso then I download it and put it in the lib/ directory?
22:53rata_no
22:53auseroh, okay
22:54rata_btw, have you read the FAQ here? https://github.com/technomancy/leiningen
22:54rata_well, the error message includes a mvn invocation
22:54rata_that you must run to install the library in your maven local repository
22:54auserah
22:55auserhow will that work for collaboration?
22:55rata_you just have to replace the /path/to/file with the path to the jar file you downloaded
22:55ausereveryone will have to run that, I suppose
22:55technomancyauser: hazelcast is in maven central; it doesn't need to be in clojars: http://jarvana.com/jarvana/inspect-pom/com/hazelcast/hazelcast/1.9/hazelcast-1.9.pom
22:56auseroh, I searched clojars.org
22:57auserrata_: for the future, run the maven command and install it that way, technomancy thanks for the note... have you used hazelcast?
22:57auserout of curiosity
22:57cemerickeverything in maven central is always available to lein and cake builds
22:57technomancyauser: just trivial messing around
22:57auserinterestin cemerick... I can add that to the repositories in the project.clj, right?
22:58cemerickauser: it's included implicitly
22:58auserinteresting.
22:59cemerickauser, rata_: if you need to use jars that aren't in clojars or maven central, then you really should have a nexus or artifactory install for your team/organization. Barring that, you can abuse e.g. github as a maven repo. That's bad form, but will get you through if you absolutely can't be bothered with a proper repository: http://cemerick.com/2010/08/24/hosting-maven-repos-on-github/
23:00auserlol, alright... I appreciate the note about it, I'll read that, but you were definitely right, it's included just like that
23:03technomancycemerick: have you tried using s3?
23:04cemerickas a mvn repo?
23:04technomancyright
23:04technomancythere's a wagon for it
23:04cemerickno, never thought of that
23:04technomancyI haven't looked into it, but apparently it's a thing
23:05technomancyI mean I haven't tried it for myself
23:05cemerickas in, useful in interesting ways, or a clever hack?
23:05technomancysomewhere in between, I guess. =)
23:06cemerickheh
23:06technomancyslightly less hacky than github
23:06cemerickI feel just a little bad about putting that github hack out there, as I've gotten a fair number of tweets from people saying they're using it.
23:07cemerickI suppose it's a small step up from local installs and jamming things into clojars surreptitiously, but…
23:08cemerickThere was a fellow who was working on a hosted mvn repo service. Seems like a more and more of a good idea, as things go along.
23:10technomancycloudbees hosted hudson plus hosted mvn or mvn-on-s3 would be remarkably simple for folks who need private repos.
23:10technomancyI guess the main disadvantage of s3 is it's harder to provide lucene indexes
23:10cemerickTrue; the trickier part is that you couldn't update it atomically.
23:11cemerickNot that people would generally care. :-/
23:11technomancyhm; right
23:11cemerickyeah, pair that with downstream proxying repos, and you could be in for a world of hurt, actually.
23:12technomancywell usually there's not much downstream of a private repo
23:12cemerickah, private, no; presumably plenty of people would like to get their stuffs into a publicly-available repo, but aren't interested in central's hurdles
23:13technomancyisn't sonatype pretty good for that?
23:14cemerickIt's certainly not difficult to get access to OSS' releases repo, etc.
23:14cemerickBut that still requires signing artifacts, interacting with nexus, etc.
23:14cemerickTotally doable, but surely not of interest to hobbyists, solopreneurs, etc.
23:16rshis there a way in clojure to accept an arbitrary java string and eval it?
23:18rata_cemerick: having to install clojure.data.finger-tree in my local maven repository is, I hope, just a temporal solution until finger trees go into clojure.core or clojure.contrib
23:19cemerickrata_: finger trees will be in central as soon as chouser gets on the stick ;-)
23:19tonylrsh: clojure uses java Strings so I would guess it does
23:19tonylthe tricky part is to get the string
23:19cemerick,(-> "(+ 1 2 3)" read-string eval)
23:19clojurebotDENIED
23:19cemerickfeh
23:19cemerickrsh: ^^
23:20rshso by an arbitrary java string, i meant to say a string with arbitrary java code :)
23:20cemerickah-ha
23:20cemerickthat's trickier
23:20cemericknothing Clojure-specific. There's plenty of info on the web about runtime compilation and execution of Java code.
23:21cemerickrsh: a random google search result http://stackoverflow.com/questions/1064259/how-can-i-compile-and-deploy-a-java-class-at-runtime *shrug*
23:23rshyeah, most info I have found make a runtime.exec call
23:23rshwhich doesn't seem right to me to just run a small bit of code
23:25rata_cemerick: btw, what's a nexus or artifactory install?
23:32rata_I'm going to bed... see you guys
23:32tonyllaters
23:59technomancyso... making clojure.core/into work on strings... worth doing for symmetry's sake?