#clojure log - Dec 09 2010

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

0:14 auser: hola

0:19 technomancy: wow, this is kind of embarassing: http://groups.google.com/group/clojure/browse_thread/thread/4b9a0d4da8c36c09

0:23 scripts 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.

0:25 the readme has twelve lines (four relevant) about Clojure followed by tons of stuff about asm

0:25 defn: technomancy: that's why I was suggesting hamster

0:25 https://github.com/harukizaemon/hamster

0:26 technomancy: oh, I see. cool

0:27 even with that, you want alter semantics though, which I don't see cloby providing

0:27 I guess ref-set! semantics is better than nothing

0:28 dnolen: technomancy: debatable. It's kinda slow. You're slowing down your mutable code. Might as well just live on the edge.

0:33 defn: how so? (are you slowing down your mutable code?)

0:33 @dnolen

0:35 technomancy: is there any reason to assume alter semantics couldn't be added?

0:37 technomancy: defn: not at all; I implemented them in clojure-gem

0:37 it's a bitmore awkward without first-class functions, but it's easy to do

1:24 btw0: If string slicing using "subs" cannot have negative args, how can i get the specified lenth of a substring at the end of a string?

1:24 technomancy: I think I submitted a patch to make subs accept a negative argument

1:25 hrm; maybe not. I guess I just proposed it.

1:27 btw0: cool, but is there an elegant way to achive that for now?

1:44 amalloy: &(let [s "long string"] (subs s (- (count s) 3)))

1:44 sexpbot: ⟹ "ing"

1:44 amalloy: not exactly elegant, but not terrible

1:44 btw0: ^^

1:50 btw0: thanks, i've also found "tail" in clojure.contrib.string does this too

1:52 hiredman: ,(doc partition-all)

1:52 clojurebot: "([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."

1:54 auser: has anyone here ever use RMI or some other messaging in clojure?

2:01 defn: i always forget about subs

2:02 I think in general the partition fns have been the most all-around useful for me.

2:02 natto: hi, is anyone familiar with the error "error in process filter; Wrong type argument" in emacs+slime?

2:03 this is mentioned in github and SO, which basically say "please use the ELPA version", which I do, and still can't resolve it

2:04 i.e. where you'd expect the backtrace in emacs, the error appears and hangs

2:05 technomancy: natto: maybe you have the other version of slime still installed alongside it?

2:07 natto: i was using the boinkor.net version, but now I installed slime via ELPA, and my .emacs knows nothing of the boinkor version

2:07 so there is no "slime" appearance in my .emacs

2:07 technomancy: no version from apt-get or anything either?

2:08 natto: nope, not there

2:09 technomancy: hmm; I haven't seen that. maybe M-x toggle-debug-on-error and send the stacktrace to the swank-clojure mailing list?

2:09 defn: how many people are actually doing web development with clojure?

2:10 natto: btw 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?

2:10 technomancy: natto: yes, swank-clojure from elpa has been deprecated for quite some time now.

2:10 defn: let 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?

2:11 natto: i see...

2:12 defn: err, some good places to look where the the underpinnings of the design rely on something which resembles clojure

2:12 technomancy: natto: all you need on the elisp side is slime and slime-repl

2:12 sounds like it's time for another blog post

2:13 natto: so the "recommended way" right now is to launch a swank server externally then do slime-connect?

2:13 sorry i'm missing something

2:13 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 into clojure?

2:13 s/into/in

2:13 sexpbot: <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?

2:14 natto: and 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

2:14 technomancy: natto: that's right, though there's a little lib called durendal that combines the two steps

2:14 defn: I'm not sure. I haven't really done frontend web work since 06 or so.

2:15 defn: technomancy: what is your opinion on a "web development" story for clojure?

2:15 Does it make sense? Is it a square peg in a round hole?

2:15 technomancy: defn: on the whole I'm really glad clojure seems to be resisting the monolithic framework approach of rails

2:15 natto: ok, 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).

2:15 technomancy: even if it's more work up-front to piece things together, you end up with a much more coherent result

2:15 defn: technomancy: I agree, actually -- but there is a trade off

2:16 more work up-front is sort of contrary to what seems to be so prevalent in the community: a desire for adoption

2:16 natto: ok so, there's a bucket of tricks for emacs, and the bucket of tricks includes setting up slime+clojure?

2:16 technomancy: defn: true, but it's much easier to achieve something cohesive from composable libraries than to try to go the other direction

2:17 natto: tl;dr: lein swank in a shell, then M-x slime-connect in Emacs

2:17 once you've got that working you can try durendal which may be a bit more convenient, but don't sweat it up front

2:18 defn: technomancy: optimized for developer happiness, and convention over configuration

2:18 in the case of the former I believe we're halfway there. in the case of the latter I think we're behind the curve

2:20 natto: so 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

2:21 technomancy: natto: clojure 1.3?

2:22 natto: 1.2, after discovering 1.3 doesn't work

2:22 wait... no, lein swank uses 1.3 sorry.

2:22 let me retry

2:22 technomancy: there are definitely unresolved issues with 1.3 =\

2:23 natto: yes i discovered there was no print-doc after much head scratching

2:24 (all the blog posts about setting up that pull from rhickey's github will lead to these errors!)

2:25 * technomancy grumbles about out-of-date blog posts

2:27 natto: ok lein's swank is 1.3.0 (should be pulling from github). clojure is 1.2.0

2:27 technomancy: subs with negative offset: http://dev.clojure.org/jira/browse/CLJ-688

2:28 natto: that's what you want; 1.3.0-SNAPSHOT of swank

2:28 so how about calling into with a string as its first arg?

2:29 seems like if seq of a string returns a seq of chars, you should be able to reverse that operation with into

2:31 natto: no dice.

2:31 just to confirm: swank=1.3.0-SNAPSHOT, clojure-1.2.0.jar, slime, slime-repl, clojure-mode all from ELPA

2:31 that's the bare setup

2:32 technomancy: what Emacs version?

2:32 natto: 23.2, from PPA

2:32 launch lein's swank-clojure, in emacs, slime-connect, all defaults. type a<return>, expect stack trace, get hang

2:33 GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.21.6) of 2010-09-01 on americium, modified by Debian

2:33 technomancy: could 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.

2:36 natto: so 1. i get Versions differ: ... 20100404 (swank).; continue. swank server: Error reading swank message

2:37 2 is swank server error. there's no 3rd point

2:40 technomancy: sorry, not sure what's going on there =\ try the swank-clojure mailing list I guess

2:45 natto: ah. got it. it's autopair

2:45 technomancy: ...?!

2:46 natto: i'm not sure why i got a hang in the last emacs -Q

2:46 technomancy: that's a serious bug if autopair affecting the connection to swank

2:47 natto: actually no i didn't. i had to load more than slime.el to get a repl

2:47 this is a different error from the one i was getting when i just ran M-x slime

2:47 technomancy: time to ditch it and grab paredit

2:47 natto: but (autopair-global-mode) causes hang in repl from slime-connect

2:48 autopair's for electric "'({[

2:48 can't have everything :-/

2:48 but, i have a stacktrace now. so happy! thanks!

2:49 thanks very much

2:49 technomancy: sure. better report a bug with autopair though.

2:49 natto: ok

2:57 defn: autopair?! paredit!

2:58 natto: do you use electric quotes?

2:59 i installed autopair on top of paredit for that

2:59 technomancy: that's redundant

3:00 natto: it is, but js2-mode provides its own quote matching, so autopair falls back to paredit in that mode

3:00 but otherwise -- do you use something for electric quotes?

3:02 technomancy: paredit does electric quotes

3:10 natto: there are some behaviors in autopair i was more happy with. playing around it looks like paredit changes the default way you delete parens?

3:10 * defn doesn't understand cssgen, clj-haml, and others

3:10 Derander: it seems to

3:11 defn: haml and sass have indentation rules that allow you to forego parens, why not leverage that?

3:11 natto: you can probably configure one to behave like the other, but vanilla autopair behavior is quite nice imo (aside of crashing the repl)

3:12 Derander: defn: how would you do haml w/o parens in clojure?

3:12 oh wait, what was that other html gen library?

3:13 defn: hiccup?

3:13 Derander: yeah

3:13 I think hiccup is closer to the spirit of haml than clj-haml

3:13 defn: hm, I disagree

3:13 try to get your designer to use hiccup

3:13 clj-haml is clojure,

3:14 closer*

3:14 haml is still a stretch, but at least they'll use it

3:14 Derander: I don't look at it as a "for designers" thing

3:14 I see it as a power tool for me

3:14 defn: yeah, 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

3:14 Derander: and aren't they basically the same thing except clj-haml uses calls to h= in favor of nested vectors?

3:15 defn: Derander: again, explain that to your designers

3:15 Derander: seriously, they look basically the same except one has less line noise

3:16 defn: they care more about aesthetics

3:16 nature of the breed

3:17 Derander: (html [:div#header [:h1 "hello!"]]) vs (h= :html (h= :div#header (h= :span "hello!")))

3:18 we're arguing something subjective, but to me the former is nicer looking

3:18 defn: oh, there i tend to agree

3:19 but what im saying is, neither is "haml"

3:19 Derander: right

3:19 defn: which is what i need

3:19 s/need/want

3:19 sexpbot: <defn> which is what i want

3:19 hiredman: if you use enlive your designers can just write html and you can use css selectors to inject content

3:19 Derander: it'd be pretty simple to parse %h1 to [:h1

3:19 haml turns into nice sexps I'd imagine

3:19 defn: hiredman: that adds to the dev load, though

3:20 hiredman: i mean, i've considered enlive, but i don't think i'd use it as my primary templating solution

3:20 Derander: I like a combination of haml and enlive

3:20 they each have their perks

3:20 when I work in ruby I use haml and erb depending on the situation

3:21 defn: i basically never use .erb unless it's a page full of script tags, like google analytics partials

3:21 Derander: I use erb for static content

3:21 well

3:21 text heavy content w/ lots of tags in the middle of it

3:22 "Hello we are <strong>Company name</strong> and we make <a href = "...">product</a>" reads better to me

3:22 defn: my sense is this: if we had a way to do something similar to Rails without it being Rails (very modular, not a cathedral)

3:22 we'd have a better "web dev" story for clojure

3:22 Derander: right now ring is basically rack, right?

3:23 I haven't worked with ring in any real sense

3:23 defn: right

3:23 Derander: rails is basically some nice helpers on top of rack nowdays

3:23 defn: many nice helpers

3:23 it's huge, but it turns out a lot of it is necessary

3:23 Derander: clojureql fills the orm gap kind of

3:23 need something for migrations

3:23 defn: lots of error wrangling, lots of model niceties

3:23 Derander: for errors

3:24 yeah

3:24 defn: yeah clojureql is close, but still cumbersome

3:24 people need the same damn experience they have when they boot up a rails app

3:24 Derander: I think rails wins in terms of view helper libraries mostly

3:24 can implement the backend stuff very efficiently in clojure

3:24 bobo_: view helper libraries?

3:24 Derander: all of the fancy link routing, inflection stuff, ajax helpers

3:25 bobo_: (i dont know rails)

3:25 Derander: form helpers

3:25 bobo_: ah you mean so you can do ajax stuff without knowing javascript?

3:25 Derander: kind of

3:25 you can do it to a point

3:25 the original goal that rails had was to abstract away javascript

3:25 bobo_: predefined components, or something like that?

3:25 Derander: that went out of vogue w/ rails 3

3:26 defn: yes 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

3:26 Derander: <% form_for @comment do |f| %> ... is how you start a form tag in rails for a comment object

3:26 defn: ewwww

3:26 use formtastic!

3:26 Derander: you could drop in <% remote_form_for @comment do |f| %> and have it automagically be ajaxified

3:26 defn: talking vanilla rails

3:26 defn: <% semantic_remote_form_for

3:26 ah, sure

3:26 Derander: and now it's form_for ... :remote => true anyways

3:26 defn: *nod*

3:27 bobo_: personaly you lost me at <%, i hate that. but i agree that something like it is needed for the masses

3:27 defn: bobo_: i hate it too

3:27 Derander: bobo_: rails < 2 would spam generated prototype.js stuff

3:27 bobo_: enlive changed my view of web development

3:27 Derander: bobo_: rails 3 will stick data-attributes in and give you unobtrusive js to use

3:27 defn: bobo_: that's why i use haml. the same thing looks like: = remote_form_for ...

3:27 bobo_: and i learned some jquery, and now i dont want any crappy components

3:27 Derander: bobo_: yeah, rails 3 is really nice w/ jquery now

3:28 bobo_: but i do understand that it is needed

3:28 Derander: it's officially "js framework agnostic"

3:28 not sure to what extent is true

3:28 defn: i dont get the fucking prototype.js default

3:28 wtf?

3:28 Derander: it was the best thing when rails came out

3:28 defn: who uses that garbage?

3:28 yes, 4 years ago

3:28 jQuery has been the du jour for at least a year

3:28 Derander: rails 3 has been in dev for like two years

3:29 but yeah

3:29 there is no default anymore

3:29 you can use whatever you want

3:29 defn: *nod*

3:29 i dont know what the answer is honestly, im just ranting

3:29 Derander: and there has been a jquery.rails drop in for a very long time

3:29 that would redefine helpers/provide js as a complete replacement for prototype

3:29 defn: im 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

3:30 Derander: usually, yeah

3:30 defn: otherwise it has more pain than it's worth

3:30 shops aren't going to switch unless they have that work-alike feeling

3:31 copy and paste haml templates, convert a rails app to clojure with a single command, etc.

3:31 that sort of thing needs to happen for webdev adoption

3:31 Derander: not sure to what extent that is true

3:31 people switched to rails from php/asp

3:31 and that was a sea change

3:32 defn: i've worked with some prominent rails consulting firms and there is little interest in clojure

3:32 Derander: I'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

3:32 mm

3:32 I haven't

3:32 so I don't know

3:32 defn: when i try to explain the webdev "story", it's fragmented

3:32 it doesn't make any sense

3:32 too many steps. too many hurdles. too many new things to consider. too much choice.

3:32 they just want a goddamn framework.

3:33 Derander: rails is getting that way too, lately, but the people who are doing it know how to navigate it

3:33 defn: ive spent the better part of two months getting "back in the saddle" on rails. i was off in another land for ~3 years

3:33 Derander: getting 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

3:33 and that's just major components

3:33 defn: Derander: yes, but now enumerate those in clojure

3:34 Derander: if you want to do twitter, facebook, csv, xml, html parsing, etc.

3:34 hah, I have no idea

3:34 I don't know clojure libraries.

3:34 defn: /you don't know what you don't know/

3:34 this is the problem.

3:35 It's not that there is a lack of maturity. It's that there is a lack of presentation.

3:36 Here is an example of rails-related documentation: http://mongoid.org/

3:36 Derander: right

3:36 defn: Nothing like that exists in the clojure community.

3:37 So the libraries look brittle and iffy.

3:37 Derander: mongoid is a slick piece of software too

3:37 on the other hand, nothing like http://clojuredocs.org/ exists in the rails community :-)

3:37 defn: sure it does :)

3:38 Derander: http://railsapi.com/ ?

3:38 defn: it's called google, because ruby/rails was born in the heat of "blogs"

3:38 Derander: hah

3:38 defn: everyone contributed, it's just indexed elsewhere :)

3:38 Derander: developer tools for clojure are massively superior

3:38 emacs/slime is just good

3:38 but that's just lisp in general

3:39 defn: yeah there's no equivalent in ruby which sucks so bad

3:39 it's just sad everytime i'm reminded of it

3:39 Derander: it feels like it should be possible to do

3:39 defn: /some/ of it is possible to do.

3:39 you could build a source code traversing thing-a-mabob

3:40 so in swank you so M-., maybe you add something like that to comint ruby

3:40 Derander: I think you could get pretty close w/ some mishmash of static analysis, drb and irb

3:40 defn: s/so/do

3:40 sexpbot: <defn> do in swank you do M-., maybe you add domething like that to comint ruby

3:40 defn: drb is a graveyard

3:40 probably better to use something else

3:41 Derander: I don't mean drb itself

3:41 the concept

3:41 defn: ah sure

3:41 Derander: like a ruby method server

3:41 ala swank

3:41 rubymine is getting damn good at ruby code analysis

3:41 defn: everyone i work with derides rubymine

3:41 Derander: have you tried it?

3:41 defn: i own a copy, yes

3:41 Derander: mm

3:41 I couldn't use it for primary dev

3:41 defn: the refactoring tools are pretty great

3:41 Derander: right

3:41 defn: tcrayford has a wonderful refactoring project for clojure

3:42 Derander: it's getting good at understanding semantics and doing debugging and stuff

3:42 defn: i wish there was more attention paid to it

3:42 Derander: yeah, I've been meaning to install that for awhile

3:42 defn: do it. just try it out. you will feel like you're wathing magic.

3:42 s/wathing/watching

3:42 sexpbot: <defn> do it. just try it out. you will feel like you're watching magic.

3:42 Derander: I am severely time limited

3:42 high school student doing college apps & working

3:42 I'm studying spanish right now on the other monitor :P

3:42 defn: don't play games with me. you're on irc.

3:43 nice calculated move there

3:43 Derander: ;-)

3:43 defn: quit making excuses and do it.

3:43 :)

3:43 Derander: I will later

3:43 I have it on a todo list

3:43 but emacs isn't open right now

3:43 defn: https://github.com/tcrayford/clojure-refactoring

3:44 Derander: right

3:44 defn: thread-first and thread-last are great fun to play with

3:44 Derander: I wish I understood font-lock

3:44 there are a lot of things I want to do with syntax highlighting in clojure

3:44 defn: you can walk through a bunch of source you've written without paying attention to thread-first/last

3:44 Derander: that I simply can't implement

3:45 defn: and then go back and literally hit hotkeys on your forms and change them to use ->, ->>, so you can see the readability changes immediately

3:45 it's great.

3:45 Derander: right

3:45 I want arguments to functions to be highlighted in their bodies

3:45 defn: i wish more language focused on "code filters"

3:45 Derander: code filters?

3:46 defn: what we're describing are "code filters". my term, not sure what the proper nomenclature is...

3:46 we're not changing the overall truth of the function

3:46 Derander: oh, yes.

3:46 defn: we're just changing its structure

3:47 Derander: yes. I remember a few years ago when I was learning ruby I had an epiphany about refactoring

3:47 defn: i think it would be cool to have a photoshop Filters-size list of possible "filters" you could apply to a form.

3:47 Derander: it was a really magical moment

3:48 basically what you're talking about -- thinking about transformations as keeping the same meaning while altering the structure

3:48 I think that's why sexps are so pretty to me

3:48 it's easier to do that

3:48 defn: i cannot convince anyone to use clojure

3:48 i think im a terrible salesman or something

3:49 Derander: I don't really argue for clojure, just for thinking outside the imperative/procedural/oop box

3:49 I usually do it by challenging somebody to a coding competition

3:49 defn: i object strongly to that

3:49 the first part :)

3:49 we /must/ argue for clojure

3:50 Derander: why?

3:50 clojurebot: http://clojure.org/rationale

3:50 defn: FP has taken a lot of ideas from OOP, but the reverse is not true

3:50 Derander: haha

3:50 Licenser: morning!

3:50 Derander: Licenser: good morning

3:50 defn: morning Licenser, long time no see

3:50 Licenser: I have chocolat!

3:50 defn: NOMNOMNOM

3:50 Licenser: defn: yap I had to manage to break my IT departments security again so I could use IRC :P

3:50 defn: ssh tunnel or even more hackish?

3:51 Derander: https://github.com/ivan4th/swank-js <-- this is glorious

3:51 defn: Derander: ive been using that for the last week now! :)

3:51 Derander: breaking through firewalls at school has been the single greatest motivation to learn about ssh

3:51 defn: another one of those things I haven't installed yet

3:51 Licenser: defn: both

3:51 Derander: I'm hung up on slime

3:51 Licenser: since SSH isn't allowed

3:51 Derander: I have slime/slime-repl from elpa

3:51 but those versions don't include slime-contrib

3:51 and I haven't managed to get a working emacs ecosystem w/ cvs slime yet

3:51 Licenser: only stupidly proxied connetion ....

3:51 Derander: I've tried three time

3:51 defn: Derander: don't use CVS slime

3:51 Derander: what platform?

3:52 Derander: defn: os x

3:52 carbon emacs

3:52 Licenser: are they blocking the protocol or the port?

3:52 Licenser: aquamax ftw

3:52 defn: what OS v#?

3:52 Derander: 10.6.5

3:52 defn: Derander: i compiled from source

3:52 Licenser: Derander: everything

3:52 Derander: I used to use aquamacs but I saw no benefit to continuing to do so

3:52 hah. fun

3:52 defn: im on 10.6.5

3:52 Derander: for awhile they blocked 22 at school so I ran it on 443

3:52 defn: I don't think it's an emacs problem

3:53 I think I just need to trash a significant portion of my .emacs.d and rebuild

3:53 defn: oh your config is broken?

3:53 Derander: it's working now

3:53 defn: or you cant `make`?

3:53 Licenser: Derander: 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

3:53 Derander: if i remove elpa slime/slime-repl and insert cvs slime then I'm fucked

3:53 Licenser: yeah, they eventually did that

3:53 defn: what is all this cvs talk?

3:53 this is crazy.

3:53 Derander: defn: that is what I was advised to do

3:54 defn: do /not/ use cvs. use github.

3:54 Derander: Licenser: the school runs a networking class so we argued successfully for an unfirewalled (mostly) linux box that can sh out

3:54 I bounce everything through that now

3:54 https://github.com/nablaone/slime ..?

3:54 Licenser: Derander: yea sadly our IT department are dorks

3:54 defn: that's the one

3:54 Derander: Licenser: windows guys?

3:54 defn: i use technomancy's though

3:54 Derander: defn: "imported from CVS daily"? :)

3:54 Licenser: Derander: yes

3:55 defn: Derander: there are nightly builds you know?

3:55 like, DMGs

3:55 Derander: defn: of carbon emacs?

3:55 or slime?

3:55 ah, technomancy's is frozen w/ clojure compat

3:55 Licenser: sad 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

3:55 Derander: it's the new version of slime from cvs that are owning me.

3:55 Licenser: of course

3:55 Licenser: the district's networking/it used to be run by this sweet old linux guru

3:56 everything open source and primarily student setup/run

3:56 Licenser: heh that is good

3:56 Derander: ran great for 14 years

3:56 he retired to teach the networking class

3:56 windows guy managed to spend $4 million in 3 years and break literally everything

3:56 Licenser: which reminds me I should call our IT department since their stupid patches won't install

3:56 Derander: active directory: broken, proxies: broken, internet outages: common, firewalls: too restrictive, email: broken

3:57 replacing all linux and mac servers w/ windows servers in a district that uses exclusively macintosh computers for the users

3:57 defn: Licenser: i suggest a 3g tether

3:57 Derander: </rant>

3:57 Licenser: defn: the reception in here is horrible

3:57 we're like in a pharadayic cage

3:57 defn: farradayic?

3:58 farraday cage?

3:58 s/farraday/faraday

3:58 sexpbot: <defn> faraday cage?

3:58 Licenser: yes that stuff

3:59 defn: heh

4:01 Derander: la encuesta

4:02 defn: good night all

4:02 good talking with you Derander

4:02 Derander: good night

4:02 defn: ciao Licenser

4:05 Licenser: Í haaaate windows

4:05 Derander: yes

4:05 me too

4:05 good night from me as wlel :-)

4:06 Licenser: take care Derander

4:10 fliebel: morning

4:25 defn: ' as a constituent character is fun.

4:27 raek: # as a reader macro character is fn.

5:32 auser: clojure noob here... having some trouble importing the clojar dependency (org.clojars.ctdean/apache-cassandra) from lein.

5:33 I 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

5:38 btw0_: 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

5:39 Chousuke: align args when it looks okay. :P

5:43 so, hm. Indent code according to the level of nesting, and align code after indenting it as needed to make it visually appealing.

5:44 raek: btw0_: 2 spaces are mostly used for special forms

5:45 Chousuke: hm?

5:45 2 spaces is used for all indents.

5:45 raek: hrm, that's not how clojure-mode does it...

5:46 Chousuke: When does it indent more than 2 spaces?

5:46 (per level, of course)

5:46 btw0_: raek: so 2 spaces for special forms and ident args to the first one for all other cases?

5:47 raek: (foo a

5:47 b

5:47 c)

5:47 but

5:47 Chousuke: raek: that's alignment, not indentation

5:47 raek: (if pred

5:47 a

5:47 b

5:47 btw0_: raek: i got it, thanks

5:47 raek: I guess I wasn't aware of the difference...

5:48 Chousuke: The way I see it b and c have the same indent as foo

5:48 and are just aligned to a

5:48 while with if, a and b are their own scopes, one level deeper than if, so they need a new indent

5:50 it gets somewhat trickier with defn etc. that takes parameter vectors and dosctrings and whatnot before the actual code block begins

5:56 raek: one difference from other lisps I have noticed is the tendency for this:

5:56 (dosync

5:56 (a)

5:56 (b))

5:56 instead of

5:56 (dosync

5:57 (a)

5:57 (b))

5:57 stain_: that looks totally different! :)

5:57 1-space-indent must die

6:26 Licenser: aloa

6:28 lpetit: in 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

6:29 There's not assumption about whether we're in a function call, a special op call, a macro call.

6:31 Licenser: lpetit: ccw's identation works good I just had one feature request: ident all or ident selection :)

6:31 that'd be sweet

6:32 lpetit: indeed.

6:32 Licenser: I had to reindent a large file and it was hell :P doing it for each line on it's own

6:32 lpetit: Though 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.

6:33 Licenser: :-(

6:33 Licenser: lpetit: not your fault, it came from moving source around and each editor having it's own thoughts about identations

6:34 also in the repl UI I kind of miss the prompt

6:34 it's hard to see what NS you're in

6:34 lpetit: And 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;

6:35 yes, the prompt issue keeps coming

6:35 Licenser: ^^

6:36 lpetit: Did you do a permanent switch to the (temporary) repl ui fork ?

6:36 Licenser: other then that I find the repl management in the beta a bit more confusoing then in the stable :P

6:36 yap

6:36 cemerick: Licenser: I'm listening :-)

6:36 lpetit: heh, there were sufficient disclaimers about the stability of this branch :-p

6:36 look, you've awaken the wolf :)

6:37 Licenser: lpetit: yes I don't talk about crash's but about usability

6:37 it is a nice improvment that you have a 'run as clojure' now so I kind of miss the simple 'start project REPL'

6:37 lpetit: working hard today on bringing more of paredit to it

6:37 ??

6:37 Licenser: oh yes and paredit in the repl console can be a PITA if you copy/paste half finished code :P

6:37 *starts eclipse*

6:38 lpetit: when paredit is totally ported, intend it to behave as in the editor, including the 2 modes: default and strict.

6:38 s/intend/expect/

6:38 sexpbot: <lpetit> when paredit is totally ported, expect it to behave as in the editor, including the 2 modes: default and strict.

6:40 Licenser: also the enable/disable clojure thing could indicate if itis currently active or not

6:40 AND if you reopen the workspace the clojure menu is gone

6:40 sorry for whining so much but I figure feedback helps :=

6:41 the editor has paredit modE?

6:41 cemerick: It 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*

6:42 Licenser: Indeed, I use it constantly.

6:42 Licenser: I only see that you can set up strict mode, is that paredit mode?

6:43 cemerick: yeah

6:43 lpetit: Licenser: strict mode is what emacs users call paredit mode, yes

6:43 Licenser: ah okay

6:43 okay okay :)

6:43 lpetit: You can change the default mode an editor is open in, via Window > Preferences > Clojure > ...

6:43 Licenser: ctrl+alt+l seems for some reason not to work when you have no repl started

6:44 that'd also be noice if it could start the repl if you are trying to load something into it :P

6:44 lpetit: known regression, reported by Lee, if I remember well

6:44 cemerick: Licenser: what command does that correspond to?

6:44 Licenser: ah okay :)

6:44 cemerick: load file in REPL

6:45 lpetit: yes, the enable / disable clojure thing should be smarter. There's an issue for it.

6:45 Concerning the clojure menu, I'm not sure I understand.

6:45 cemerick: lpetit: 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. :-|

6:45 Licenser: traclked it down: if you select the project and are not in a editor the clojure menu disapears

6:46 lpetit: cemerick: 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 :)

6:46 Licenser: it makes sense since currently there are only editor level commands in there but it is a bit confusing tohave it pop up and hide

6:47 cemerick: lpetit: fair enough :-)

6:47 Licenser: another question is compiling, is there something like 'compile project'?

6:47 lpetit: Licenser: well, it's dynamically visible depending on the context, indeed.

6:47 Licenser: I kind of didn't found it hat do do the horrible thing of writing a maven pom

6:47 cemerick: That's usually considered a feature :-)

6:47 lpetit: Licenser: hot topic.

6:47 Licenser: heh

6:47 should I mention the next hot topic: dependencies :P

6:47 lpetit: Licenser: I definitely want to rework the current Clojure Builder.

6:48 cemerick: Licenser: eclipse's model is to continuously build projects

6:48 Licenser: very sweet would be lein support (in my eyes)

6:49 cemerick: A contentious issue.

6:49 lpetit: Even 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.

6:49 Licenser: *nods* so in other words if I want to have things packaged I will be dependant on maven or lein right?

6:50 lpetit: I 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)

6:50 cemerick: Licenser: 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.

6:50 Licenser: also true

6:51 cemerick: Licenser: Eclipse has excellent ant, maven, and gradle plugins. *shrug*

6:51 lpetit: yep

6:51 Licenser: but maven is horrible, ant is supposed to be horribler and gradle - never tried it

6:52 yet lein is the mostly wide spread build/dep management tool for clojure I think

6:52 cemerick: I'm sure I'll be including that topic in my next survey.

6:52 lpetit: If 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*.

6:52 Licenser: hmm perhaps if there were a lein library that'd let people do things like (lein compile "my/project/dir")

6:53 lpetit: The problem, is, the NIH syndrom has led to (to my knowledge): leiningen, cake, cljr.

6:53 Licenser: what is NIH?

6:53 lpetit: Not Invented Here

6:53 Licenser: ah

6:54 no 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

6:54 the 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

6:55 that is what I currently measure 'I prefare line over mvn'

6:55 or rather the pom.xml

6:56 don't care what works in the background if I don't have to magle with it

6:56 lpetit: Licenser: but isn't the philosophy of Clojure to not reinvent the wheel, and to provide (when possible) "lightweight" layer over existing java libs ? ;-)

6:56 Licenser: isn't lein doing exactly that? :P

6:56 lpetit: lein, cake, etc., by adding their own way of providing "plugins", by masking the use of maven plugins, do not play it well IMHO

6:56 Licenser: afiak is it using ant/mvn for the actual work just coving it

6:57 so 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

6:57 I have enough of that byrocracy out of the programming world :P and trust me I do I live in germany

6:57 lpetit: no, lein is reinventing existing maven plugins, and just leveraging the use of maven libs for accessing / managing maven repos.

7:00 If 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.

7:01 cemerick: lpetit: did you see the project.clj-SPEC thread?

7:01 lpetit: Yes, but where is it now ?

7:01 cemerick: hasn't moved: http://groups.google.com/group/projectclj---spec/browse_frm/thread/855ce112689fb33f

7:02 pmaven appears to be a broken premise, at least according to the two contributors to the clojure side of it.

7:02 lpetit: oh no, I hadn't seen this projectclj google group

7:03 joining it right now

7:03 will read it later, though, dinner time!

7:06 cemerick: It's not really a "live" group. I think that thread sorta killed it. :-(

7:07 Licenser: 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/

7:07 fliebel: Is there something like Pythons Mechanize for Clojure? Mechanize is one mutable object thing, and it kills me.

7:11 mfex: fliebel, perhaps https://github.com/clj-sys/clj-http

7:11 Licenser: cemerick: I'll ra that

7:12 fliebel: mfex: nah, Mechanize is specialized in scraping data and submitting forms.

7:14 cemerick: fliebel: Check out selenium -- primarily intended for automated webapp testing, but it'll do for a lot of other uses as well.

7:14 Absurdly comprehensive functionality.

7:15 fliebel: cemerick: It's not Clojure, right? The I might just as well use Mechanize.

7:15 cemerick: Hrm, almost certainly mutable stuffs though -- it uses the actual browsers (e.g. webkit or mozilla, or whatever).

7:16 mfex: fliebel, there is also this in java: http://htmlunit.sourceforge.net/

7:16 Licenser: cemerick: 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

7:16 cemerick: fliebel: 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.

7:18 Licenser: 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

7:19 Licenser: cemerick: 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

7:20 I 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

7:20 fliebel: cemerick: 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.

7:21 Licenser: cemerick: 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

7:22 hack I am still not rid of the useless folders in the target directory

7:22 cemerick: fliebel: I wouldn't expect anyone to be crazy enough to reimplement a browser client framework in a persistent fashion. *shrug*

7:23 Licenser: things like maven-archiver

7:24 fliebel: cemerick: I don't see why a browser needs to be so stateful on a sateless protocol like HTTP.

7:24 Licenser: or classes - for some reason

7:25 [

7:26 cemerick: Licenser: there's no doubt that maven is not the simplest tool. Of course, if it were, I wouldn't be using it.

7:26 Licenser: don't you like simple tools?

7:28 cemerick: fliebel: A stateless protocol says nothing about the architecture of the client that implements it.

7:29 Licenser: 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.

7:29 Licenser: I personally think that simplicity is a very important feature

7:29 cemerick: I think that's wrong

7:29 things don't have to be complicated to be capable

7:30 fliebel: cemerick: True, I can see how this could be implemented in a persistent manner though.

7:30 Licenser: I belive that simple things should be simple

7:30 cemerick: fliebel: I'm certain it could; the question is, who wants to take that particular implementation and maintenance burden? ;-)

7:31 Licenser: "build", broadly writ, is not a simple concept.

7:31 Licenser: I 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

7:32 cemerick: it has simple basics

7:39 cemerick: Licenser: 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

7:45 bozhidar: hi, guys

7:45 anyone here running stock SLIME + clojure?

7:46 recently I've been hacking some Common Lisp and I had to go back to the stock SLIME instead of the clojure compatible in ELPA

7:46 so I was wondering what are my options now

7:47 I tried connecting to a swank-clojure server started from lein

7:47 the repl opened

7:47 but nothing would be evaluated in it

7:47 there was nothing significant in the inferior lisp buffer as well

7:59 mrBliss: bozhidar: 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.

8:00 bozhidar: mrBliss: I dream of upstream Clojure support in SLIME someday...

8:00 mrBliss: bozhidar: me too :-)

8:01 bozhidar: or a non-stripped down version of SLIME in technomancy's elpa repo.

8:01 bozhidar: well, he mentions in the docs

8:01 that his slime should work with Common Lisp

8:02 but it doesn't(at least for me) and that's what's causing my grief

8:02 but you're right, a fully fledged SLIME would be a welcome resolution to the problem

8:02 * cemerick has never quite understood the loyalty to SLIME on the part of Clojure developers.

8:03 bozhidar: what environment are you using cemerick?

8:03 mrBliss: The thing I hate about SLIME is the font on the homepage (Curse you Comic Sans MS!) ;-)

8:04 cemerick: bozhidar: 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.

8:06 SLIME (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*

8:06 bozhidar: cemerick: 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

8:06 cemerick: But then, I'm the last person that should be advising emacs users on what they should do. ;-)

8:07 bozhidar: cemerick: I'm a progressive Emacs user and I understand and accept its problems

8:07 jweiss: if 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

8:09 cemerick: jweiss: reify generates an instance of an anonymous class.

8:09 Your use case would require gen-class.

8:09 bozhidar: cemerick: 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

8:10 jweiss: cemerick: 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

8:10 cemerick: bozhidar: how is La Clojure doing these days, anyway? It was in rough shape last I looked.

8:10 jweiss: You could use definterface and defrecord together…

8:10 bozhidar: cemerick: there is a new release of the plugin for the upcoming IDEA X

8:11 I haven't had the time to play with it yet, but I heard some nice comments about it

8:11 cemerick: I heard it's not functionally different though…just made IDEA X compatible?

8:11 jweiss: cemerick: yeah, i may try that just because gen-class is awkward. i don't even need the interface but it may be less awkward :)

8:11 bozhidar: cemerick: the old version didn't even work so I'd call this is a welcome improvement :-)

8:12 cemerick: ha.

8:12 yikes :-)

8:12 bozhidar: cemerick: it seems that JetBrains are investing heavily in Groovy & Scala - the support from them rivals the Java support

8:12 cemerick: Groovy makes sense. Scala seems like a bad bet.

8:13 bozhidar: 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.

8:13 bozhidar: cemerick: what makes you think that? most people seem to prefer scala - better performance, FP

8:14 lpetit: a grave for groovy

8:14 bozhidar: cemerick: 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)

8:14 cemerick: bozhidar: 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*

8:15 lpetit: cemerick: java has a *huge* community :p

8:16 cemerick: lpetit: point taken, I was speaking in relative terms. Groovy has a decent sized community. Better? ;-)

8:16 'course, we'd then have to characterize the Scala and Clojure communities as diminutive, which is rhetorically unfortunate.

8:17 lpetit: yes, 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.

8:17 bozhidar: cemerick: sadly, in my country(Bulgaria), none of those languages has any community

8:17 I judge about something'

8:18 s popularity by google trends, stackoverflow questions and the amount of books being published

8:18 cemerick: lpetit: 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.

8:19 bozhidar: scala feels like a dynamic language although it's not

8:19 fogus`: cemerick: It depends on the original motivation for creating Groovy.

8:20 bozhidar: and it has nice support for parallel programs, which Groovy lacks

8:20 lpetit: cemerick: to be really honest, programs which start with weak static typing compilation checks do this half by religion, half by ease of implementation !

8:21 cemerick: fogus`: 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.

8:21 lpetit: fogus: indeed, thus my point on not doing compile time type check and saying it's a feature where it's a resource dedication choice

8:22 s/where/when/

8:22 sexpbot: <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

8:22 fogus`: If I hadn't discovered Clojure the world would have had to content with yet another poorly implemented Scheme. :p

8:22 s/content/contend/

8:22 sexpbot: <fogus> If I hadn't discovered Clojure the world would have had to contend with yet another poorly implemented Scheme. :p

8:23 bozhidar: haha, good one fogus` :-)

8:23 dnolen: lpetit: 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.

8:24 cemerick: fogus`: no need to stop now; it's not like yet another poorly implemented scheme will hurt anything. ;-)

8:24 lpetit: dnolen: I'd call that "throwing the baby with the bath water" :)

8:24 fogus`: cemerick: ;-)

8:24 dnolen: lpetit: no, it's like ubiquitous laziness, it's a great idea generator. but it's a also a big pain in the butt.

8:24 lpetit: At least the Qi language has proven that this could be done.

8:26 dnolen: lpetit: 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.

8:26 lpetit: dnolen: I would really see nothing wrong with an optional type check system "a la Qi" on clojure. And Rich seems to agree with this.

8:27 dnolen: Exactly. It's more resource dedication than anything else. It's too easy to claim it's a feature not to have it.

8:28 dnolen: lpetit: totally. but it's not a feature worth having if not done right.

8:28 I find Odersky's complaints on how Scala's popularity basically froze the language telling in that regard.

8:29 s/complaints/comments

8:29 sexpbot: <dnolen> I find Odersky's comments on how Scala's popularity basically froze the language telling in that regard.

8:29 cemerick: lpetit: 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"…

8:29 fogus`: cemerick: That was my "reading" as well

8:29 lpetit: dnolen: granted. And I really appreciate Rich having the intelligence to say that, cause then clojure is not slowed down by a poor implementation.

8:31 dnolen: Alan 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.

8:31 cemerick: dnolen: 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.

8:31 That needed a ;-)

8:32 lpetit: cemerick: 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.

8:32 cemerick: I must not have been around for that.

8:33 kotarak: I 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... :/

8:33 fogus`: lpetit: ... with Datalog at its base

8:33 cemerick: fogus`: I was going to say, a decent unification library would make a lot of sense…

8:33 lpetit: fogus: yes, it's "Datalog" I couldn't make out of my fingers.

8:34 * fogus` is going to hit core.unify hard over the holiday

8:35 esj: yes please ;)

8:35 lpetit: cemerick: there http://groups.google.com/group/clojure/browse_thread/thread/6f8bf865f4afbb6f/5d8366b79d80edc0?lnk=gst&q=datalog+static+typing#5d8366b79d80edc0

8:36 fogus: 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 ?

8:37 cemerick: ah, I do seem to remember that…from before I gave up on reading the clojure ML

8:38 dnolen: lpetit: 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.

8:39 miniKanren is basically a purely functional take on Warren's Abstract Machine, a good thing to try with Clojure.

8:39 fogus`: lpetit: The core.unify lib only solves a very narrow problem that is orthogonal to inference.

8:40 dnolen: I think a sufficiently performant Datalog in Clojure will need to use ROBDDs. Lots 'o work.

8:41 lpetit: ROBDDs being ... ?

8:41 dnolen: Reduced Ordered Binary Decision Lists

8:41 lpetit: ok, it's definitely not my field of expertise :-p

8:41 fogus`: 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

8:41 dnolen: http://bddbddb.sourceforge.net/

8:41 lpetit: thanks for the info!

8:42 must leave, cu

8:42 esj: bddbddb !

8:42 its like caadddr :)

8:44 fogus`: lpetit: take care

8:45 esj: thing they could have thrown some "p"s in there to give the dyslexics more to cheer about

8:46 dnolen: fogus`: totally, I added my unifier to see what it would take to add one that worked like yours.

8:55 bozhidar: cemerick: IDEA's La Clojure doesn't look that good even now - starting a new REPL generates a NPE :-)

8:55 cemerick: yikes!

8:55 bozhidar: that's even worse than before IIRC

8:56 bozhidar: it's still RC so they fix something before the final release but I seriously doubt it

8:56 La Clojure doesn't support Clojure 1.2.0 as well

8:56 only 1.0 and 1.1

8:56 cemerick: Might be time to stick a fork in that one. :-(

8:56 bozhidar: it seems that trying ccw might be a good idea :-)

8:57 cemerick: bozhidar: Definitely go for the RC. It has much-improved REPL support.

8:57 I think we'll probably do one or two more RC's before putting out an 0.2.0 release.

8:58 bozhidar: ok, I'll certainly try the RC

9:01 btw as we spoke JetBrains officially unveiled IntelliJ X :-)

9:07 cemerick: bozhidar: whoa, they list Clojure as a "supported language". That's some unfortunate marketing B.S.

9:09 bartj: &(clojure.set #{2} '(2 3))

9:09 sexpbot: java.lang.ClassNotFoundException: clojure.set

9:10 bozhidar: cemerick: 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

9:10 bartj: the above expression does not warn saying (2 3) is not a set

9:10 and it returns a #{}

9:11 cemerick: bozhidar: The published screenshots show them browsing around enclojure's codebase, too. That's just bad form. :-(

9:11 e.g. http://plugins.intellij.net/preview/popup/?sid=2625&pid=4050

9:13 bozhidar: cemerick: this is disturbing indeed, I haven't noticed it before

9:13 chouser: weird

9:22 bartj: chouser, were you replying to my question/comment above?

9:24 chouser: bartj: no, that's just undefined behavior when you give a funtion undocumented input. :-)

9:24 "weird" was for a product screenshot to include code from a competing product

9:25 oh no, I created another race condition. Grrr

9:25 bartj: chouser, would that be classified as a bug?

9:27 chouser: bartj: probably not. well, maybe a bug in the code that's calling a clojure.set function with a non-set argument

9:34 bartj: chouser, ok, thanks

9:53 jcromartie: what's up with clj-stacktrace? the example in the readme doesn't print a stacktrace http://github.com/mmcgrana/clj-stacktrace

9:56 never mind, I'm way out of date

9:58 was using 0.1.0

9:58 never mind, 0.2.0 doesn't do anything either

9:59 dnolen: jcromartie: are you using Clojure 1.2.0? IMO, Clojure 1.3.0 stacktraces outdo clj-stacktrace.

10:00 jcromartie: I'm using the released Clojure 1.2

10:00 1.2.0

10:01 dnolen: jcromartie: hmm, I never had any issues w/ clj-stacktrace and 1.2.0, but I mostly used it in the context of Ring.

10:02 jcromartie: It just doesn't seem to do anything on exceptions in the repl

10:07 should I be using clj-stacktrace 0.1.0 or 0.2.0?

10:08 fogus`: ,``````````x

10:08 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.StackOverflowError>

10:08 jcromartie: is there perhaps some extra step I'm missing, or maybe it doesn't work with lein repl?

10:09 cemerick: kotarak: FYI: https://groups.google.com/group/clojure-clutch?hl=en

10:09 kotarak: cemerick: thanks :) Clojure and Couch feel like a good team. :)

10:09 cemerick: Indeed they are. :-)

10:10 jcromartie: compare https://gist.github.com/734802 to https://github.com/mmcgrana/clj-stacktrace/blob/master/README.md

10:11 wow ok

10:11 you know what's COMPLETELY missing from the clj-stacktrace readme?

10:11 that you have to use (pst) to print stack traces

10:12 tonyl: jcromartie: it seems like clj-stacktrace is not being loaded in the class path

10:12 wait, scratch that

10:12 then use would've send an error

10:13 jcromartie: readme 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:14 tonyl: I would contact the author about it.

10:22 fliebel: kotarak: I missed the conversation about Couch. What are you doing?

10:22 kotarak: fliebel: there was not really a discussion about couch. I use it to back me homepage rewrite.

10:23 jcromartie: I've thought about using couch

10:23 fliebel: kotarak: Are you using Clutch or Clojure-CouchDB? (And what is the homepage?)

10:23 jcromartie: being able to just stick Clojure hash-maps in a document store seems too good to be true though

10:24 I wonder how it would scale for a business app

10:25 fliebel: I wonder how those CouchDB libs deal with failed updates.

10:25 kotarak: fliebel: 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:26 fliebel: they will probably tell you?

10:26 fliebel: For 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:27 So unless there is magic in there, it looks painful in a real app where Couch gets hammered a bit.

10:29 kotarak: fliebel: this is what clutch tells you: #<CompilerException java.io.IOException: CouchDB Response Error: 409 Conflict (REPL:4)>

10:30 fliebel: kotarak: 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:31 kotarak: fliebel: 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:31 fliebel: I would be highly suspicious of any automatic merging going on there....

10:32 fliebel: kotarak: No merging! Just getting the new version and applying the fn until it works. Just like the regular Atom spin loop.

10:33 kotarak: fliebel: 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:33 At least not for the systems I work with.

10:34 If everything is purely based on computations, then the situation might be different.

10:34 fliebel: kotarak: So how would you handle the issue if Couch told you the update failed?

10:35 kzar`: 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:35 kotarak: fliebel: 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:36 kzar`: it does end up OK, because you have to use ::qualified-keywords.

10:37 kzar`: kotarak: How come using qualified keywords makes it OK? (Sorry I'm probably being dumb here)

10:37 kotarak: kzar`: because your derivations don't interfer with others. But you can just as well use a custom hierarchy with defmulti.

10:37 fliebel: kotarak: 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:38 kotarak: fliebel: I don't need that up to now. But maybe my systems are just weird.

10:39 and the user base small...

10:39 and the data volume miniscule....

10:39 etc.

10:39 fliebel: kotarak: But your case would still work as expected with reset!, right?

10:39 kzar`: kotarak: OK thanks I think I getya

10:40 kotarak: fliebel: 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:42 jweiss: & (#({:k :v}))

10:42 sexpbot: java.lang.IllegalArgumentException: Wrong number of args (0) passed to: PersistentArrayMap

10:42 jweiss: i'm a little baffled by the syntax here, how come it doesn't just return the map

10:43 kzar`: jweiss: I think you're trying to call the map as a function but with no arguments

10:43 ,{:a 1 :b 2}

10:43 clojurebot: {:a 1, :b 2}

10:43 jweiss: kzar`: i thought i was creating a fucntion that returns a map, and calling the function.

10:43 kotarak: jweiss: #(foo) is (fn [] (foo))

10:44 tonyl: ((fn [] {:k :v}))

10:44 &((fn [] {:k :v}))

10:44 sexpbot: ⟹ {:k :v}

10:44 kotarak: ,(#(hash-map :k :v))

10:44 clojurebot: {:k :v}

10:44 jweiss: ah so i can't use the literal

10:44 ok thanks

10:44 fliebel: kotarak: So you define the 'correct' order by the order people get the value, rather than by the order in which they update it?

10:45 kzar`: jweiss: Could you do it like this ,(#(map [:k :v])) ?

10:45 ,(#(map [:k :v]))

10:45 ,(#(hash-map [:k :v]))

10:45 clojurebot: java.lang.IllegalArgumentException: Wrong number of args (1) passed to: core$map

10:45 java.lang.IllegalArgumentException: No value supplied for key: [:k :v]

10:46 kzar`: ,(#(hash-map :k :v))

10:46 clojurebot: {:k :v}

10:46 tonyl: &(#(apply hash-map [:k :v]))

10:46 sexpbot: ⟹ {:k :v}

10:46 kotarak: fliebel: 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:48 fliebel: 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:48 fliebel: But the people working with the data know it.

10:51 fliebel: kotarak: … Okay, I'll give the issue some more thought.

10:57 kotarak: I think in your case you could still use compare-and-set! to resolve the conflict case yourself.

11:15 Islon: does anyone knows how to add a maven repository to cake?

11:19 Raynes: In your project.clj: :repositories [["nameofrepo" "linktorepo"]]

11:19 Should do the trick.

11:23 Islon: thanks Raynes =)

11:55 fliebel: kotarak: 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:56 Okay, I'm messing up arguments...

12:03 Islon: how do I take elements from a seq 2 by 2?

12:03 tonyl: try partition

12:04 partition-all too

12:04 Islon: exactly what I want!

12:04 i always forgot function names ><

12:05 tonyl: me too, there are a lot of function names

12:06 Islon: i know what the function does but not the name

12:09 tonyl: &(count (remove fn? (vals (ns-publics 'clojure.core))))

12:09 sexpbot: java.lang.SecurityException: You tripped the alarm! ns-publics is bad!

12:09 tonyl: ,(count (remove fn? (vals (ns-publics 'clojure.core))))

12:09 clojurebot: 546

12:09 Islon: i should use more clojuredocs too

12:10 tonyl: that is not counting macros

12:10 yeah that helps me

12:10 ,(count (remove #(:macro (meta (var %1))) (vals (ns-publics 'clojure.core))))

12:10 clojurebot: java.lang.Exception: Unable to resolve var: p1__571# in this context

12:11 tonyl: I am getting this error

12:11 i don't know why

12:12 ,(count (filter #(:macro (meta %1)) (vals (ns-publics 'clojure.core))))

12:12 clojurebot: 71

12:12 tonyl: weird

12:17 amalloy: tonyl: %1 can be shortened to %, and #(:macro (meta %)) can be written as (comp macro meta)

12:17 er, :macro

12:17 tonyl: that is true, I need to use comp more, god knows my code needs it in some parts

12:18 but i thought meta needed a var

12:18 not a symbol

12:18 oh wait ns-publics vals are vars

12:18 :P

12:18 amalloy: right you are

12:26 fliebel: Okay, I'm still messed up with the methods of my protocol. :(

12:27 This is what I have: https://gist.github.com/735020

12:28 works: (swap! (atom 1) + 1) fails: (swap! (atom 1) inc)

12:29 amalloy: fliebel: "fails" is not very specific

12:29 clojurebot: You don't have to tell me twice.

12:29 Chousuke: fliebel: protocol fns don't support varargs

12:29 amalloy: lol. good work clojurebot

12:29 fliebel: java.lang.IllegalArgumentException: No single method: swap_BANG_ of interface: iatom.IAtom found for function: swap! of protocol: IAtom

12:30 Chousuke: fliebel: so you're in fact binding three parameters, f, & and args

12:30 fliebel: Chousuke: That doesn't make sense, I think… The one without varargs is the one that fails, right?

12:32 And what about reset! and compare-and-set! they don't use varargs either, but they don't work as well.

12:32 Chousuke: hm wait

12:33 don't you need to add "this" to the protocol declarations too?

12:33 fliebel: I don't know… Might try...

12:33 Chousuke: would explain why (swap a + 1) works since it takes three args. (that get bound to f & args)

12:34 fliebel: Now everything I do gives me the error.

12:37 amalloy: fliebel: that's progress! (probably)

12:38 fliebel: one moment...

12:42 Right, now that I have everyting sorted out, it comes down to the vararg problem.

12:43 But java.lang.Atom must also take varargs in some way, right?

12:43 amalloy: fliebel: clojure.lang.Atom

12:43 fliebel: right...

12:44 hiredman: you can trivially turn a vararg into a fixed arg

12:45 fliebel: swap(IFn f, Object x, Object y, ISeq args)

12:45 hiredman: protocols are best as implementation contracts, not usage

12:46 so 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:46 fliebel: sorry, diner is ready.

12:56 Licenser: aloa

12:57 amalloy: hiredman: 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:02 hiredman: really it only needs to take a function since you can pass it something like #(apply f % args)

13:03 amalloy: better still

13:04 i'm starting to feel like i might understand how protocols are different from interfaces now

13:18 fliebel: I hope this makes somewhat sense? I works at least… https://gist.github.com/735020

13:21 amalloy: fliebel: did you read what hiredman and i discussed while you were at dinner?

13:23 that 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:24 fliebel: amalloy: So I would just be doing ava.util.concurrent.atomic.AtomicReference

13:27 amalloy: no, you'd be defining an interface/protocol for things that are like AtomicReferences

13:27 fliebel: But it does make sense...

13:27 amalloy: then you build a library that deals with such things, and extend your protocol to AtomicReference, c.l.Atom...

13:28 fliebel: right, makes sense.

13:29 But then I do have to implement Atom I think...

13:30 amalloy: um, what?

13:31 fliebel: If I have compare-and-set! defined in the interface, I can't simply map swap! to clojure.core.swap!

13:34 amalloy: (defn aref-swap! [ar f & args] (compare-and-set! ar #(apply f % args)))

13:34 is not a complicated implementation

13:36 fliebel: amalloy: 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:38 And there is still validate and notifyWatches to consider. Both are in ARef, which I don't fancy implementing.

13:39 amalloy: so make swap! your primitive, if you prefer. is there a reason you need access to compare-and-set?

13:39 fliebel: Yea, 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:47 amalloy: Any idea how to best get hold of the methods in ARef?

13:49 amalloy: fraid 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:50 fliebel: amalloy: 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:07 * fogus` thinks chouser is lawful good

14:10 amalloy: fogus`: did you see what he did yesterday to poor tree-seq? i'm thinking chaotic good

14:11 technomancy: I'm just gonna leave this here: http://www.piratejesus.com/nerdcore/005.html

14:12 Raynes: technomancy: I'm just going to pick it up and walk off with it.

14:15 fliebel: Is there a reason why swap calls validate and notifyWatches as well? Because it calls compareAndSet which does both already.

14:34 brehaut: has anyone got a good intro/best practise for the clojure.test stuff?

14:34 auser: yes, i would like that too

14:34 brehaut: im currently fumbling round in the dark writing the worst tests in the world

14:42 KirinDave: Hum

14:42 I have a var containing a reference to a class.

14:42 How do I construct a new instance of the class referred to in that var?

14:43 Is it just reflection stuff?

14:43 hiredman: yes

14:44 Chousuke: an actual var object or just a global def?

14:44 amalloy: ,(.newInstance java.util.Date)

14:44 clojurebot: #<Date Thu Dec 09 11:44:52 PST 2010>

14:44 KirinDave: Shucks, was hoping there was a clojurism.

14:44 hiredman: amalloy: not all classes support that

14:44 KirinDave: Chousuke: Actual var.

14:44 Chousuke: then you need to deref the var first I guess

14:44 cemerick: KirinDave: check out clojure.lang.Reflector for handy utility methods.

14:44 amalloy: hiredman: well, depends what you mean. they all support newInstance, but they don't all have a no-arg ctor

14:45 hiredman: which is what I mean

14:45 KirinDave: It'd be an error if they didn't have a no-arg ctor.

15:04 fliebel: How do I run java with the cake cp?

15:07 jjido: Can someone help me with TWAIN-SANE? I installed all the packages, I have the preferences pane but no SANE button in Image Capture

15:08 stuartsierra: jjido: I think you've got the wrong channel.

15:08 Raynes: I think you've got the wrong universe.

15:08 jjido: stuartsierra: well observed.

15:09 Raynes: what is yours?

15:12 ninjudd: fliebel: what do you mean by that?

15:18 fliebel: ninjudd: 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:18 ninjudd: fliebel: just build an uberjar

15:18 or you can use 'cake bin' to create a standalone executable

15:19 fliebel: Fair point… So I just do java -jar my-project.jar some.class

15:20 ninjudd: fliebel: if you want to use -jar, you need a main class

15:20 just add ':main namespace' to your project.clj

15:20 and add a -main function to that namespace

15:20 fliebel: ninjudd: some.class needs it right? Not my core ns.

15:21 ninjudd: your main function can be in any namespace you want, but you can only have one per project

15:21 bytecolor: import choco.Choco; => (ns choco-tut (:import (choco Choco))) ; is this a correct translation from Java to clojure?

15:22 chouser: so, what's the state of the art for maven/lazy-test integration?

15:22 tonyl: bytecolor: it looks like a good import to me

15:22 chouser: stuartsierra: oh, hi

15:23 technomancy: bytecolor: should be choco.bo; kupo!

15:23 (not really)

15:23 dmart__: chocobo.. wasn't that a bird in some video game?

15:24 tonyl: sounds like an incantation lol

15:24 stuartsierra: chouser: hi.

15:25 Lazytest has a Maven plugin of its own now.

15:25 chouser: ah, I see it.

15:25 bytecolor: I'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:25 chouser: 1.0.1-SNAPSHOT

15:25 stuartsierra: yse

15:25 yes

15:25 1.0.0 release will also work

15:26 There's no direct dependency between the plugin and the library version.

15:27 nickik: stuartsierra, could you tell what the stat on the clojure conj videos is?

15:27 chouser: stuartsierra: should I mention the test goal in the plugin config?

15:27 tonyl: bytecolor: have you try separating the ns and import statement?

15:27 stuartsierra: chouser: test is a phase, not a goal, and yes

15:28 bytecolor: tonyl: hrm, no

15:28 tonyl: like (ns choco-tut) (import '(choco Choco)) (.makeIntVar Choco "foo" 0 3)

15:29 stuartsierra: chouser: the sample-maven-project module shows you how to set it up.

15:29 tonyl: if makeIntVar is static you can use (Choco/makeIntVar "foo" 0 3) to

15:29 chouser: stuartsierra: ah, thanks.

15:29 mduerksen: i'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:30 stuartsierra: chouser: So are you actually using lazytest?

15:30 chouser: stuartsierra: about to

15:30 stuartsierra: cool

15:30 chouser: stuartsierra: should I not?

15:30 tonyl: bytecolor: if not, it seems like a reflection problem

15:30 bytecolor: I 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:30 stuartsierra: chouser: no, just curious, haven't heard from many people

15:30 chouser: we've got new code, and need unit tests. I'd hate to use clojure.test since it's creator has abandoned it. :-)

15:31 hm, we're not on clojure 1.3 yet. might be a problem.

15:31 bytecolor: tonyl: same error if I separate the two

15:31 raek: mduerksen: incanter (a statistics lib) provides an infix macro, as people seems to prefer the usual notation for mathematic expressions

15:31 chouser: mainly ring's fault.

15:32 tonyl: bytecolor: it seems like a reflection problem, based on that error

15:32 from the arguments that makeIntVar needs

15:32 chouser: mduerksen: 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:32 bytecolor: tonyl: is that something *I* can work around?

15:32 tonyl: sure

15:32 what is the signature of that makeIntVar method?

15:32 chouser: mduerksen: http://www.fogus.me/fun/unfix/

15:32 clojurebot: #<RuntimeException java.lang.RuntimeException: java.lang.Exception: 503>

15:32 bytecolor: tonyl: you mean the way in which the args are overloaded?

15:33 tonyl: yeah

15:33 bytecolor: ah

15:33 tonyl: three overloaded methods, second var differs, int, List<Integer>, int[]

15:34 second argument, that is

15:34 tonyl: so the second argumend can accept int or a list of ints or an array

15:35 bytecolor: yes

15:35 tonyl: the thing is that clojure's ints are javas Integers

15:35 or in ver 1.3 would be Longs

15:36 bytecolor: I'm using 1.3

15:36 tonyl: ok so they are Longs I believe

15:36 mduerksen: raek, chouser: thank you. i think i will use infix occasionally, when it comes to bigger and more nested math.

15:36 tonyl: you need to convert them to primative int

15:37 bytecolor: ah, with a simple cast?

15:37 tonyl: or typehint them

15:38 like ^int val, ^int val2

15:38 bytecolor: and yes, I'm clojure stupid as well ;) But I will learn clojure!

15:38 ok

15:38 tonyl: It gets interesting when you are mingling with the host too

15:40 bytecolor: hrm, the call is (.makeIntVar Choco (str "cell" j) 1 (* n n)), so the last two forms would need to be cast to int

15:41 ^int val, is that the same as adding meta data?

15:41 or just looks the same

15:41 amalloy: bytecolor: it is the same

15:41 tonyl: you add the meta data

15:41 amalloy: &(meta ^String [])

15:41 sexpbot: ⟹ nil

15:42 amalloy: &(let [^String x []] (meta x))

15:42 sexpbot: ⟹ nil

15:42 amalloy: hm

15:42 raek: &(meta ' ^String [])

15:42 sexpbot: ⟹ nil

15:42 amalloy: well, it's there somewhere :P

15:42 tonyl: &(let [x ^String []] (meta #'x))

15:42 sexpbot: java.lang.Exception: Unable to resolve var: x in this context

15:43 raek: aren't you adding metadata to the code literal rather than the value?

15:43 tonyl: yeah, but helps with reflection

15:43 raek: &(meta (with-meta [] {:tag String}))

15:43 sexpbot: ⟹ {:tag java.lang.String}

15:50 bytecolor: hrm so I'd have to do: ^int (* 1)

15:51 meeting time. I'll get back to this in a bit. Thanks for the suggestions.

15:52 arohner: has anyone used jclouds blobstore successfully?

15:55 hugod: arohner: I have, and know of several others

15:56 arohner: hugod: 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:56 "Caused by: java.lang.NoSuchMethodError: com.google.common.base.Joiner.on(C)Lcom/google/common/base/Joiner;"

15:58 amalloy: arohner: that's java's linkage error: some class was built against a different jar version than it's being run against

15:59 arohner: ok. What can I do about it?

16:01 amalloy: usually i curl up into a ball and cry

16:02 i 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:03 hugod: I would agree, sounds like some sort of dependency issue - you might run mvn dependency:tree and see what is using the google libs

16:05 arohner: amalloy, hugod: thanks. That fixed it

16:05 turns out, infer pulls in some google collections

16:08 bytecolor: (with-meta 1 {:tag int}) => ClassCastException, can't cast Long to IObj. Why is it an IObj and not clojure.lang.Integer?

16:09 tonyl: the arguments are flipped

16:10 but a sole 1 can't be cast

16:10 i mean type hinted like that

16:11 amalloy: &(supers IObj)

16:11 sexpbot: java.lang.Exception: Unable to resolve symbol: IObj in this context

16:11 amalloy: &(supers clojure.lang.IObj)

16:11 sexpbot: ⟹ #{clojure.lang.IMeta}

16:11 amalloy: &(supers Integer)

16:11 sexpbot: ⟹ #{java.lang.Number java.io.Serializable java.lang.Object java.lang.Comparable}

16:11 amalloy: bytecolor: ints can't hold metadata

16:11 chouser: stuartsierra: lazytest:watch is awefully slick

16:11 bytecolor: ah

16:12 stuartsierra: chouser: thanks!

16:14 tonyl: bytecolor you could use (int 1)

16:14 arohner: bytecolor: when type hinting numbers, the hint goes on the symbol, rather than the object

16:15 tonyl: scratch my last advice, that won't help reflection on that overloaded method

16:15 you are better of saving the value and type hinted it

16:15 bytecolor: tonyl: that's what I'm about to try

16:17 fliebel: Yay, that was easy(er than I expected): atom-style couch updates: https://github.com/pepijndevos/couch-atom

16:21 amalloy: fliebel: 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:21 arohner: grr, now blobstore is claiming that my data already in S3 fails the naming conventions

16:22 fliebel: amalloy: True...

16:28 hiredman: arohner: s3 zones are apparently fragmented about allowed names

16:29 arohner: hiredman: yes, but jclouds is failing when I call (containers) on data that's already in S3

16:29 I call (containers), and then jclouds throws an exception and tells me my input data is invalid

16:30 hiredman: ah, well, thats jclouds for you

16:30 arohner: hiredman: yeah. Just one of those days where everything's broken

16:32 bytecolor: can't type hint a local

16:32 amalloy: arohner: good news! if ##(+ 2 2) is 4, then at least arithmetic isn't broken...*waits for sexpbot's result*

16:32 sexpbot: ⟹ 4

16:32 tonyl: bytecolor: what do you mean a local?

16:33 hiredman: we'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:33 amalloy: &(let [^String x 10] (.length x))

16:33 sexpbot: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String

16:33 amalloy: &(let [x 10] (.length x))

16:33 sexpbot: java.lang.IllegalArgumentException: No matching field found: length for class java.lang.Integer

16:34 bytecolor: tonyl: well I was trying to store the literal 1: (let [x 1] ...) then type hint the x in the expression

16:34 amalloy: bytecolor: 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:34 hiredman: and I consequently haven't done any further work on cellar

16:34 bytecolor: (let [x 1] ^int x) or (let [x 1] (with-meta x {:tag Integer}))

16:35 arohner: hiredman: does it work?

16:35 amalloy: bytecolor: but neither of those *should* work

16:35 arohner: hiredman: or, how crazy do I have to be to use it? :-)

16:35 amalloy: with-meta is trying to tag the value 1, not the variable x

16:36 ^int x inside the let body is...probably trying to do: ((int)new Integer(1))

16:37 hiredman: arohner: 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:37 and be sure to handle cases where talking to s3 fails (happens more often then you'd think, even from ec2)

16:38 bytecolor: bbl

16:39 hugod: hiredman: I am sure adrian would like to hear your issues with jclouds in #jclouds

16:42 hiredman: hugod: we don't have any issues anymore

16:42 hugod: hiredman: :) I understood that

17:04 ihodes: ure

17:04 woops

17:06 is anyone familiar with getting slime (specifically, slime-repl) working with swank-clojure without using ELPA?

17:08 rata_: ihodes: you can use lein swank

17:09 ihodes: rata_: 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:10 raek: hrm. when using ELPA, I think that can happen if you install slime but not slime-repl

17:10 rata_: that's right... do you have slime-repl installed?

17:11 raek: the repl is supposed to turn up in *slime-repl-clojure*

17:11 ihodes: i do have it installed, and i have it (require 'slime-repl) in an init file

17:11 but when i start slime (connect it to swank with slime-connect in emacs) the repl doesn't start

17:12 raek: one thing you could try is to install an older version of slime

17:12 ihodes: and if i start the repl on its own, i get a weird prompt

17:12 i'm using Phil's modified version of slime and slime-repl

17:12 rata_: ihodes: try with (slime-setup '(slime-repl)) in your emacs init file

17:13 ihodes: oh sweet, that appeared to work! thanks. let's see if the rest does now :)

17:17 rata_: 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:17 rata_: =)

17:18 ihodes: rata_: 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:20 amalloy: add to .emacs: (setq slime-protocol-version 'ignore)

17:21 rata_: mmm.. I didn't know that one :)

17:22 amalloy: curiously 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:23 technomancy: package.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:23 nobody understands all of Emacs

17:23 ihodes: technomancy: is it? part of 24?

17:24 technomancy: ya

17:24 ihodes: amalloy: thanks!

17:24 technomancy: http://bit.ly/pkg-el

17:24 brehaut: technomancy: is that the elpa stuff?

17:25 ihodes: technomancy: in that case, i'll wait until 24 is out to learn to love the bomb ;)

17:25 * cemerick is reminded of hearing people alternately compare emacs + package.el to eclipse and/or maven

17:25 ihodes: unless it's out!?

17:26 cemerick: such an emacs-hater :P which IDE are you using?

17:26 chouser: org.apache.maven.plugin.MojoExecutionException: Clojure failed.

17:26 at com.theoryinpractise.clojure.AbstractClojureCompilerMojo.callClojureWith(AbstractClojureCompilerMojo.java:429)

17:26 cemerick: ihodes: shockingly, eclipse + ccw

17:26 rata_: 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:26 * chouser glares around indiscriminately

17:26 cemerick: chouser: surely there's a final cause floating around

17:27 Raynes: chouser: You didn't add enough Mojo to your Mojo, dawg.

17:27 chouser: cemerick: that was the root cause. final exception: org.apache.maven.lifecycle.LifecycleExecutionException: Clojure failed.

17:27 rata_: *using it

17:27 chouser: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)

17:28 cemerick: chouser: rerun with -X

17:28 technomancy: rata_: probably lein issue #141; working around a bug in clojure.

17:28 * rata_ is checking issue #141

17:29 * chouser drowns

17:30 chouser: cemerick: what do you want from that?

17:30 presumably it's from this clause: if (status != 0) { throw new MojoExecutionException("Clojure failed."); }

17:30 cemerick: chouser: you should see a more useful root cause in there

17:30 oh, bugger

17:31 chouser: Assuming that's from c-m-p source, your next step is to throttle talios next time you see him ;-)

17:31 chouser: if you like, go ahead and gist the whole mess of garbage you just got dumped with

17:31 rata_: technomancy: thanks! =) :keep-non-project-classes true solved the problem

17:32 chouser: cemerick: let me double-check my plugin version number. 1.3.6 ?

17:33 cemerick: chouser: 1.3.7 is current

17:33 technomancy: rata_: in general shipping the .class files of your dependencies is not a good idea though. (modulo the protocol thing =\)

17:33 cemerick: though I don't expect that you'll see any difference with it vs. 1.3.6

17:40 chouser: cemerick: meh. Not sure I'm allowed to paste this.

17:41 shoot. well, I've got to run now anyway.

17:41 cemerick: chouser: launch codes and everything, huh? How about just the part after where it starts the clojure:foo stuff.

17:43 chouser: hm, found the java command line it's apparently trying to run

17:43 that runs fine, exit status 0

17:44 ok, that's all the time I have. thanks for offering to help

17:44 arkh_: anybody know of anything that can receive/send with linux netfilter NFQUEUE from java (clojure)?

17:44 goog gave no joy on that search

17:56 rata_: 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:57 *running

18:20 joshua__: 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:23 amalloy: joshua__: 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:24 or something like that

18:24 joshua__: `(doc comp)

18:24 amalloy: (since i'm not sure what [selector-goes-here] means - is the [] a vector?

18:24 &(doc comp)

18:24 sexpbot: ⟹ "([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:25 joshua__: Oh, that is nice.

18:25 yes

18:25 [] is the vector.

18:25 amalloy: &((comp inc inc inc inc) 1)

18:25 sexpbot: ⟹ 5

18:25 joshua__: That is a cool function.

18:25 It reminds me a lot of ->.

18:26 raek: joshua__: this is what I often end up with: https://gist.github.com/645239

18:26 amalloy: joshua__: functional programming is full of em!

18:26 -> is very nice too, but as a macro you can't use it in the same places

18:26 raek: (all-text (first (html/select node [:p])))

18:26 joshua__: raek: that looks like where I'm headed too atm.

18:26 ty for the suggestion.

18:26 amalloy: &(#(-> % inc inc inc) 1) :P

18:26 sexpbot: ⟹ 4

18:27 cky: $source comp

18:27 sexpbot: comp is http://is.gd/isOeP

18:28 amalloy: you can implement comp using just reduce, which is a fun exercise

18:28 cky: amalloy: You mean like http://refactormycode.com/codes/836? ;-)

18:29 amalloy: (Disclosure: I wrote that code.)

18:31 The 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:31 i.e., if you do (compose f g), and g returns 3 values, then it should call f with 3 arguments.

18:42 gfrlog: lein repl doesn't work -- is this because everybody uses emacs and so I'm the only one who would notice?

18:43 amalloy: gfrlog: lein repl requires a project, last i checked. are you inside a lein project when you run this?

18:43 jcromartie: I use lein repl

18:43 constantly

18:44 technomancy: gfrlog: there were issues with earlier releases, but I'm not aware of anything outstanding in 1.4

18:44 jcromartie: lein repl should work without a project.clj

18:44 technomancy: that said, I don't know anyone personally who uses it, so there is an element of what you're suggesting. =)

18:44 gfrlog: amalloy: I am inside a project, and it's ironic you say that because I often run it outside a project

18:45 technomancy: 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:45 amalloy: see my careful disclaimer: "last i checked" :P

18:45 gfrlog: it is a very good disclaimer

18:45 scottj: anyone have fast test running happening on save with lein?

18:46 technomancy: gfrlog: interesting; guess we need an issue for that. haven't heard of that problem before

18:46 gfrlog: technomancy: this is what I'm getting http://codepad.org/l3L4NVhe

18:46 where do issues go?

18:47 technomancy: scottj: with clojure-test-mode C-c C-, saves, so you basically have it there with swank

18:48 gfrlog: github tracker

18:54 gfrlog: technomancy: so "lein repl" works fine outside the project. Were there any breaking changes to project.clj or anything else?

18:57 technomancy: gfrlog: I don't know what's in your project.clj

18:58 gfrlog: I'll keep poking at it and file the issue if I can't figure it out

19:00 technomancy: it could be that the repl server is just taking too long to start and needs its timeout lengthened

19:01 the repl task launches a socket server; so as a workaround you could telnet to it in another window

19:01 scottj: technomancy: 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:02 technomancy: scottj: yeah, difftest works great.

19:03 scottj: C-c ' or repl? I have difftest working on lein test

19:04 gfrlog: technomancy: 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:06 technomancy: connecting to a DB at the top-level should be avoided

19:08 gfrlog: technomancy: noted; thanks for the help

19:12 scottj: technomancy: ^?

19:13 ohpauleez: Raynes: Have you considered renaming "show-issues" to "list-issues" in the github api

19:13 to match the endpoint api name

19:13 Raynes: ohpauleez: 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:14 ohpauleez: Raynes: 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:15 Raynes: ohpauleez: 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:15 ohpauleez: will do

19:16 jcromartie: let'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:17 I guess I can't include all of the defmethod files from the defmulti file?

19:24 ohpauleez: jcromartie: 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:24 jcromartie: yeah

19:24 although it's not really necessary

19:25 ohpauleez: jcromartie: Well, if you need it, checkout: https://github.com/ztellman/potemkin

19:25 it gives you a "import-fn"

19:26 if you can get around not using it, it's always nice not to have an extra dependency\

19:49 jcromartie: I just don't "get" code organization in clojure

19:49 or, in general

19:49 gtrak: namespaces?

19:49 clojurebot: namespaces 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:49 gtrak: thanks clojurebot

19:49 jcromartie: :)

19:49 gtrak: haha

19:49 jcromartie: yeah

19:49 I understand namespaces

19:49 and java packages

19:50 and anything else you want to call them

19:50 but the general principles behind *building* them are lost on me

19:50 I 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:50 so I just mess things up in the end

19:50 because it's not really driven by necessity

19:51 gtrak: how do they do it in lisp?

19:51 i'm really new to clojure, so I can't help so much, just asking :-)

19:51 jcromartie: I dunno

19:52 http://stackoverflow.com/questions/73045/whats-the-best-way-to-organize-code http://www.hanselman.com/blog/HowDoYouOrganizeYourCode.aspx

19:52 hmm, never mind, the hanselman link is junk

19:55 and stack overflow

19:55 NOTE TO SELF: don't paste links before reading them

19:55 gtrak: http://stackoverflow.com/questions/329221/medium-size-clojure-sample-application

19:56 jcromartie: here we go http://stackoverflow.com/questions/670948/how-to-organize-packages-and-prevent-dependency-cycles

19:59 gtrak: that's not really clojure-specific tho

20:01 jcromartie: no

20:01 but I'm missing the more abstract concepts

20:03 ok, focus time

20:03 bye

20:03 auser: later

20:23 brehaut: Is anybody willing to critique some noob code?

20:24 gtrak: sure

20:24 but i'm a noob too

20:24 brehaut: heh

20:24 NoobFukaire: I'm a noob as well

20:25 brehaut: https://github.com/brehaut/necessary-evil/tree/master/src/necessary_evil

20:25 ignore core.clj

20:40 pppaul: i don't know what it is trying to do?

20:44 brehaut: pppaul: my project?

20:46 pppaul: yeah

20:46 it's easier to ask people to review a snip of code and state an objected of what it is supposed to do

20:48 brehaut: pppaul: 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:49 pppaul: parse and unparse are the entry point functions in both methodcall.clj and methodresponse.clj

20:50 pppaul: if you are unfamiliar with xml-rpc think of it as lame json

20:51 pppaul: love the json

20:51 XML-RPC like SOAP?

20:51 brehaut: its a precursor to soap

20:51 the creator of xml-rpc was an early contributer to soap

20:52 its also about as underspecified as soap is over specified

20:54 my apathy to the format has grown to quite strong dislike as ive worked on the project

20:56 pppaul: well

20:56 i looked at it

20:56 seems easy to read

20:57 brehaut: thanks for taking the effort to do that

20:57 scottj: ditto your body placement on same line as params is odd though

20:57 pppaul: personally, i think xml and code dealing with xml is not as sexy as json

20:58 anyway, 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:59 brehaut: pppaul: sweet

20:59 scottj: you mean like [arg] (....) in defns?

21:01 scottj: brehaut: yeah don't necessarily dislike it, but it does limit indentation later

21:02 brehaut: scottj: 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:05 scottj: there 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:06 brehaut: scottj: one thing i like about the [arg] (body) thing is it makes 1 arity functions consistent with 2+ arity funs

21:06 scottj: im not sure what you mean by the left alignment, can you give me an example?

21:08 scottj: when you put more than one space between two forms

21:08 brehaut: oh right

21:09 im sure i read a quote about that in the Joy of Clojure actually. really wish i had my PDF on this computer

21:12 cheers for the thoughts anyway

21:21 chouser: clojure-maven-plugin is failing, but refusing to say why

21:21 technomancy: chouser: you're making me all nostalgic!

21:22 chouser: I fetched the source to add debugging messages, but I can't build it

21:23 rather frustrating

21:24 hiredman: given 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:25 chouser: the antlr maven plugin is fantastic. saved so much manual effort, once we found the latest version

22:08 auser: hola

22:08 so I'm having a bunch of issues trying to get a library into my leiningin project

22:08 tonyl: hola

22:09 auser: I 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:09 hi tonyl :)

22:10 a ClassNotFoundException, of course

22:10 using: (:import '(com.hazelcast.core Hazelcast Topic MessageListener)), that is

22:12 I'm sure someone has had to deal with this in the past

22:13 tonyl: I don't use lein

22:13 sorry can't be much of help

22:13 auser: hm, do you use a project.clj?

22:14 tonyl: nope

22:14 auser: do you use maven?

22:14 tonyl: never used java or lisp so I don't know java environment staff

22:14 auser: ahh

22:14 tonyl: I need to learn them though

22:14 *stuff

22:15 but there are a lot of capable people around here that know about this

22:15 auser: :)

22:15 hope so

22:17 alright, be back after I bike home

22:48 rata_: auser: ping!

22:48 auser: pong

22:48 holla

22:48 rata_: hola

22:49 ok, to include a library that's not in clojars in your project file you have to do the following

22:49 auser: [oh you are a life-saver]

22:49 rata_: 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:50 auser: alrighty... I think I did that and got scared from the error message

22:50 rata_: 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:50 auser: ah, okay, then I'll add that back in

22:53 so then I download it and put it in the lib/ directory?

22:53 rata_: no

22:53 auser: oh, okay

22:54 rata_: btw, have you read the FAQ here? https://github.com/technomancy/leiningen

22:54 well, the error message includes a mvn invocation

22:54 that you must run to install the library in your maven local repository

22:54 auser: ah

22:55 how will that work for collaboration?

22:55 rata_: you just have to replace the /path/to/file with the path to the jar file you downloaded

22:55 auser: everyone will have to run that, I suppose

22:55 technomancy: auser: 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:56 auser: oh, I searched clojars.org

22:57 rata_: for the future, run the maven command and install it that way, technomancy thanks for the note... have you used hazelcast?

22:57 out of curiosity

22:57 cemerick: everything in maven central is always available to lein and cake builds

22:57 technomancy: auser: just trivial messing around

22:57 auser: interestin cemerick... I can add that to the repositories in the project.clj, right?

22:58 cemerick: auser: it's included implicitly

22:58 auser: interesting.

22:59 cemerick: auser, 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:00 auser: lol, alright... I appreciate the note about it, I'll read that, but you were definitely right, it's included just like that

23:03 technomancy: cemerick: have you tried using s3?

23:04 cemerick: as a mvn repo?

23:04 technomancy: right

23:04 there's a wagon for it

23:04 cemerick: no, never thought of that

23:04 technomancy: I haven't looked into it, but apparently it's a thing

23:05 I mean I haven't tried it for myself

23:05 cemerick: as in, useful in interesting ways, or a clever hack?

23:05 technomancy: somewhere in between, I guess. =)

23:06 cemerick: heh

23:06 technomancy: slightly less hacky than github

23:06 cemerick: I 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:07 I suppose it's a small step up from local installs and jamming things into clojars surreptitiously, but…

23:08 There 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:10 technomancy: cloudbees hosted hudson plus hosted mvn or mvn-on-s3 would be remarkably simple for folks who need private repos.

23:10 I guess the main disadvantage of s3 is it's harder to provide lucene indexes

23:10 cemerick: True; the trickier part is that you couldn't update it atomically.

23:11 Not that people would generally care. :-/

23:11 technomancy: hm; right

23:11 cemerick: yeah, pair that with downstream proxying repos, and you could be in for a world of hurt, actually.

23:12 technomancy: well usually there's not much downstream of a private repo

23:12 cemerick: ah, 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:13 technomancy: isn't sonatype pretty good for that?

23:14 cemerick: It's certainly not difficult to get access to OSS' releases repo, etc.

23:14 But that still requires signing artifacts, interacting with nexus, etc.

23:14 Totally doable, but surely not of interest to hobbyists, solopreneurs, etc.

23:15 * technomancy nods

23:16 rsh: is there a way in clojure to accept an arbitrary java string and eval it?

23:18 rata_: 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:19 cemerick: rata_: finger trees will be in central as soon as chouser gets on the stick ;-)

23:19 tonyl: rsh: clojure uses java Strings so I would guess it does

23:19 the tricky part is to get the string

23:19 cemerick: ,(-> "(+ 1 2 3)" read-string eval)

23:19 clojurebot: DENIED

23:19 cemerick: feh

23:19 rsh: ^^

23:20 rsh: so by an arbitrary java string, i meant to say a string with arbitrary java code :)

23:20 cemerick: ah-ha

23:20 that's trickier

23:20 nothing Clojure-specific. There's plenty of info on the web about runtime compilation and execution of Java code.

23:21 rsh: a random google search result http://stackoverflow.com/questions/1064259/how-can-i-compile-and-deploy-a-java-class-at-runtime *shrug*

23:23 rsh: yeah, most info I have found make a runtime.exec call

23:23 which doesn't seem right to me to just run a small bit of code

23:25 rata_: cemerick: btw, what's a nexus or artifactory install?

23:32 I'm going to bed... see you guys

23:32 tonyl: laters

23:59 technomancy: so... making clojure.core/into work on strings... worth doing for symmetry's sake?

Logging service provided by n01se.net