#clojure log - Jan 13 2011

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

0:00 amalloy: cemerick: i'm actually using an atom, which i think is substantially different in context

0:00 cemerick: This topic came up on stackoverflow recently: http://stackoverflow.com/questions/4562122/use-clojureql-or-stm-asynchronous-writes

0:00 clojurebot: #<RuntimeException java.lang.RuntimeException: java.lang.Exception: 503>

0:00 Enclojed: cemerick: sure, that's how it's done in Red Dwarf, more or less. I still don't see how to do it safely here

0:00 cemerick: gonna look at SO now

0:01 cemerick: amalloy: yeah, I wasn't sure what that atom was there for

0:01 amalloy: cemerick: heh. yes, i may have written the example wrong

0:01 cemerick: Enclojed: what do you mean, "safely"? Agent sends and watcher notifications aren't performed until the transaction closes.

0:01 amalloy: i mean more like (send-message (determine-message-from (swap! data do-transaction)))

0:02 Enclojed: amalloy: Oh, heh, that looks like the obvious way to do it, duh. Alright I'll try that.

0:03 cemerick: What I mean specifically is avoiding doing anything that fouls up the STM guarantees, that's all. I didn't realize there was an easy way to pass information back out of a transaction that way, but of course it makes sense.

0:04 amalloy: Enclojed: right, all(?) the stm constructs return the value they assigned to their atom/ref

0:04 Enclojed: amalloy: Yeah I'm just now seeing that... it seems consistent with a lot of other things in clojure.

0:04 amalloy: the synchronous ones, anyway. obviously that doesn't make sense for agents

0:05 cemerick: amalloy: atoms don't participate in transactions at all

0:05 Enclojed: amalloy: do agents give you something ilke a futuer?

0:05 amalloy: Enclojed: yeah, but futures give you something even more like a future

0:05 cemerick: no, but they do retries

0:05 which is the relevant part for Enclojed's concerns

0:06 cemerick: sure; my eyes just crossed a bit when I saw STM mentioned in conjunction with atoms

0:07 Enclojed: cemerick: are you going to be at the meetup in Cambridge tomorrow?

0:07 amalloy: cemerick: really? i mean, maybe technically atoms don't participate in the stm, but they're extremely close cousins

0:07 and you have to consider all the same things when using them

0:08 * cemerick is likely to get even more curmudgeonly the longer he writes book material :-P

0:08 Enclojed: cemerick, amalloy: at my old job we used atomic data types and STM together, as long as you weren't an idiot about it, it worked just fine :)

0:08 especially if the number didn't have to be accurate :D

0:08 cemerick: Enclojed: Nope, won't make it. Not sure I'd want to bother with the drive anyway, given the snowpocalypse.

0:09 amalloy: Atoms offer an uncoordinated CAS. IO isn't safe within a fn passed to swap!, but that's about where the similarities end.

0:09 Enclojed: cemerick: sorry to hear that... I wouldn't normally drive in this for that, but I'll be in the area beforehand anyways.

0:10 amalloy: CAS?

0:10 clojurebot: paredit screencast is http://p.hagelb.org/paredit-screencast.html

0:10 cemerick: Enclojed: where are you usually?

0:10 compare and swap

0:10 Enclojed: cemerick: I live ~40 minutes west of Boston.

0:10 Atoms and Transactions are both atomic right?

0:11 And they are composable

0:11 cemerick: amalloy: atoms wrap a http://download.oracle.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicReference.html which is what defines the semantics

0:12 amalloy: cemerick: yeah, i know

0:12 cemerick: Enclojed: yes, and yes, but atoms do not participate in transactions.

0:13 Enclojed: yeah, if they did it'd kind defeat the point of them, right?

0:13 cemerick: That is, swap! and reset! are side-effecting w.r.t. a running transaction that may retry.

0:13 Yeah, I'm just nitpicking the proximity of the words "STM" and "atom". :-|

0:13 Enclojed: no kidding -- I'm in Holyoke

0:13 Enclojed: Well it's important for people to not get the wrong idea I'm sure :)

0:13 clojurebot: max people is 317

0:14 amalloy: clojurebot: keep it down, will you?

0:14 clojurebot: Pardon?

0:14 Enclojed: cemerick: Yup, not far from here at all.

0:14 So you two seem like you'd totally know

0:15 cemerick: Enclojed: You're in the Worcester area then?

0:15 know what?

0:15 Enclojed: I'm trying to figure out how to write programs in Clojure very quickly, and would like to find a good starting point in terms of how people structure them.

0:15 I have a lot of experience with functional programming, but mostly in ML dialects and scala

0:15 only just the tiniest bit of lisp

0:16 cemerick: Acton actually, which is a little farther away

0:16 What I really need is some kind of "Clojure for scala weirdos" or whatever

0:17 The language documentation does an excellent job of describing the language, however I'm more concerned with best practices and general structures at the moment. I can always look up how functions work etc as I need them.

0:18 amalloy: Enclojed: "lazy sequences" are the two most important words i can think of for writing clojure code

0:18 Enclojed: amalloy: Yeah, used those in scala pretty often

0:20 amalloy: code structure...i dunno, write some functions describing what you want to do to your data :)

0:20 Enclojed: amalloy: that's the part I already know how to do, more or less :(

0:20 amalloy: I'm more concerned about using things like multimethods w/ records and how to do that in the STM construct easily

0:21 amalloy: Enclojed: i rarely use any of those three things. they're nice to have, but not the core features

0:22 Enclojed: amalloy: I need the STM because I'm writing a server and concurrency is a huge part of the design

0:22 amalloy: records seem to be the cleanest way to keep my data

0:22 cemerick: Enclojed: amalloy's comment is on point more than he probably realizes. Clojure disposes of so much of the ceremony that exists in most programming languages, and is so "data-oriented" that the structure of Clojure applications seems to represent the contours of the domain far more than any other language I've encountered.

0:22 amalloy: Enclojed: meh. records are just optimized hashmaps

0:22 Enclojed: amalloy: multimethods I can probably do without, but I would really like to have some way to do inheritence and all that

0:23 amalloy: Enclojed: no, you really don't want inheritance, most of the time :)

0:23 cemerick: That is to say, outside of some probably very broad idioms, there's probably no such thing as "typical structure" of Clojure programs.

0:24 Enclojed: amalloy: oh, I think inheritence is generally evil, however my problem domain more or less requires it

0:24 amalloy: Enclojed: i dare you

0:25 Enclojed: amalloy: I generally avoid inheritance but, for instance, in game programming it's generally part of the data model, and dispensing with it will lead to a lot of code duplication

0:27 amalloy: I'm not using it out of some idea that OOP is how programs should be written or anything like that. It's just the fact that the behavior that certain aspects of the simulation needs to follow are so concisely represented using a hierarchy of overriding implementations that it's kinda silly not to use that facility when it's provided.

0:27 amalloy: Enclojed: that's fair

0:28 Enclojed: amalloy: but yes, I definitely believe you that one shouldn't overdo it, especially in a functional language

0:28 amalloy: i'm not sure whether you want protocols or multimethods, then; probably some mix thereof

0:29 Enclojed: amalloy: yeah I was looking at both... I really like what protocols are, but the lack of implementation bit there means it's only useful for situations where I don't expect to be mixing implementations

0:30 cemerick: Enclojed: that doesn't seem clear to me at all -- you can absolutely define default implementations.

0:30 amalloy: Enclojed: no, not at all. the idea is that you use a protocol to define some bare-minimum set of functionality that an object has to have

0:31 then write libraries to provide a richer set of features for all Foo-like objects

0:31 Enclojed: Right, which is not really what I need here

0:31 What I *really* need here is to be able to make something that's a "Foo" but with this one behavior tweaked slightly.

0:32 and then be able to make noe of those, but with smoething else tweaked

0:32 tomoj: too bad

0:32 :P

0:32 Enclojed: inheritance is outstanding for this, though I could be able to use composition to achieve it as well

0:32 tomoj: implementation inheritance is evil, supposedly

0:33 cemerick: Enclojed: in Java terms, are you looking to completely override implementation, or optionally call superclass' implementation(s)?

0:33 Enclojed: Either, depending on the situation

0:33 tomoj: oh, didn't read backscroll

0:34 Enclojed: Yeah I agree that inheritence often sucks all that etc etc, but for some things, like in this case game programming, it's something that maps so *very* well to the problem domain

0:34 amalloy: tomoj: you're going to make it onto the Most Judgmental of 2011 list if you keep this up :)

0:34 Enclojed: I think there's a rule that any real programmer has to have at least a hundred strong opinions, often exactly the opposite of whoever they are currently working with :)

0:35 cemerick: Enclojed: protocols definitely allow you to selectively "override" baseline implementations.

0:35 tomoj: amalloy: I don't even know why implementation inheritance is supposed to be evil

0:35 Enclojed: cemerick: sure, but can I do that multiple levels deep?

0:35 cemerick: definitely

0:35 tomoj: I just know that you won't find it in clojure because rich said so

0:35 amalloy: tomoj: i don't either, but it must be true

0:36 cemerick: Enclojed: extend takes a map of protocol impls; you can construct that map to mirror whatever implementation overriding strategy you want.

0:37 Enclojed: cemerick: alright, that means if I want to "inherit" from a record I start with that record's implementation map and then do whatever I want to it?

0:37 cemerick: right

0:37 going down that route, the implementations really just don't belong to the records

0:37 Enclojed: cemerick: alright. I will see if I can do without multimethods then, although I know that they are very useful for specifying certain kinds of "special case" behavior

0:39 The only reason that I would want to tie implementations to records is that the logic will need to persist some logic-specific state data, and so that already has to be in the record somewhere.

0:39 cemerick: Yeah, the data definitely belongs in records. But, that doesn't mean the implementation does.

0:40 multimethods provide for arbitrary dispatch characteristics and an ad-hoc hierarchy. If you don't need the latter, and the type-based dispatch is appropriate, then protocols are uniformly superior.

0:40 Enclojed: cemerick: Hmm I might be using a different definition of "in" than you. I don't intend on putting the functions into each instance of a record.

0:41 cemerick: Enclojed: I'm just talking about whether the implementation is inlined in particular defrecord-generated classes, or exists separately (and therefore is available to be "overridden" for other types).

0:42 Enclojed: cemerick: Oh, that's not what I meant really. I guess it's hard to describe what i meant, but what I really want is whatever dispatch mechanism I use to automatically know which implementation to use, I don't want to have to manually keep that data somewhere and then dispatch on my own.

0:42 cemerick: looks like I can get a lot more flexibility from multi-methods but I don't think I need that very often, I will try just using protocols for now and see if that's good enough. is there something like isa? for protocols?

0:42 amalloy: satisfies

0:43 cemerick: Protocols dispatch on types, period. Thus, each record type will dispatch "on its own"

0:43 amalloy: &(doc satisfies?)

0:43 sexpbot: ⟹ "([protocol x]); Returns true if x satisfies the protocol"

0:43 Enclojed: k... i'm gonna go play with those then

0:51 amalloy: cemerick: i like the characterization as "following the contours of the problem domain"

0:51 cemerick: amalloy: yeah, so did I :-) Going to blog it in a bit.

0:52 amalloy: maybe i should start a blog, in case i say something catchy and nobody will do me the favor of plagiarizing to their own blog

0:54 (PS this will never happen)

1:02 seancorfield_: amalloy: you don't already have a blog? shame...

1:09 amalloy: seancorfield_: well, i've never felt i had anything interesting to say. having someone proclaim it a shame that i don't have a blog might get me to change my mind

1:09 and my day job is with a content company who'd like it if i did some writing as well as coding...

1:10 talios: <delurk> it's a shame you don't have a blog. </delurk>

1:11 TobiasRaeder: morning

1:19 seancorfield_: amalloy: a blog is a great place to write yourself reminders - which other people may find useful

1:19 amalloy: seancorfield_: hah, that's a very compelling description

1:20 seancorfield_: i often search for stuff and my own blog comes up - and i've heard other bloggers say the same :)

1:21 tomoj: think of any prettier ways to write (fn [x] ((#'foo (:bar x)) x)) ?

1:21 eh, can't be that terse anyway

1:24 amalloy: (-> x :bar #'foo (.invoke x))?

1:24 not terribly pretty either, but interesting anyway

1:25 tomoj: needed (when-let [baz (#'foo (:bar x))] (baz x)) anyway

1:26 amalloy: ah, true

1:26 cemerick: -> doesn't work like you'd think with #'

1:27 amalloy: cemerick: yikes, good point

1:27 needs (#'foo) i guess

1:27 seancorfield_: tomoj: can you explain what that function actually does??

1:28 tomoj: given an x, look up (:bar x) in a map foo to get a function, then call that function with x

1:29 the #' is just so that it picks up changes when I redefine foo

1:29 seancorfield_: (var foo) right?

1:29 tomoj: yeah

1:31 (the when-let is to keep it from calling nil)

1:32 amalloy: tomoj: you could use c.c.core/-?>

1:32 but i guess you can't get a self-call in that way

1:33 speaking of which, do we have a "clojure-like" version of (.invoke f args)? ie, apply but without list expansion

1:35 * amalloy tests to make sure he knows what .invoke does...##(.invoke first [1 2])

1:35 sexpbot: ⟹ 1

1:37 tomoj: if you're calling invoke that way you know the arity, so #(%1 %2 %3 ..) ?

1:38 :/

1:40 got my hopes up stupidly when #(~@%&) eval'd without error

1:40 amalloy: tomoj: it must exist already, somewhere - it's just CL's funcall

1:40 tomoj: too bad, so beautifully ugly

1:41 amalloy: haha

1:41 qbg: You shouldn't need funcall

1:41 What are you trying to do?

1:41 amalloy: qbg: why not? (-> x :bar (.invoke y)) should be one way to rewrite ((:bar x) y)

1:42 in this example it's less legible with funcall of course

1:43 qbg: ,(-> {:bar inc} :bar (apply 5 []))

1:43 clojurebot: 6

1:44 amalloy: qbg: yeah, i guess. i don't like the [] there

1:45 tomoj: nil works too but I bet you don't like it any better

1:45 qbg: Methinks you want too much out of ->

1:45 tomoj: I don't understand

1:46 oh, nevermind, I misread as "too much of ->" and was confused :P

1:47 huh

1:48 qbg: I just use let for complex threadings; I suspect that a specific macro for such usage would not be much better.

1:48 tomoj: why did it take me this long to realize that ##(-> 10 (range) (->> (map -))) works (admittedly a silly example)

1:48 sexpbot: ⟹ (0 -1 -2 -3 -4 -5 -6 -7 -8 -9)

1:49 amalloy: tomoj: yeah, and you can do similar things with doto

1:50 (doto (Foo.) (.setBlah Baz) (-> set! x 10))

1:51 er, ...(-> (set! x 10))

1:52 i really like the freedom that ->, ->>, and doto give you to write your operations in whatever order makes sense rather than forcing inside-out or left-to-right or whatever

1:55 zvrba: amalloy: hmm, quick explanation of -> and ->> ? documentation is a bit opaque

1:55 amalloy: &(macroexpand '(->> (range) (filter even?) (take 10) (reduce +)))

1:55 sexpbot: ⟹ (reduce + (take 10 (filter even? (range))))

1:56 zvrba: ah, akin to a pipe?

1:56 amalloy: uhhmmm, sorta

1:56 qbg: Is macroexpand aliased to macroexpand-all in sexpbot?

1:56 zvrba: &(macroexpand '(-> (range) (filter even?) (take 10) (reduce +)))

1:56 sexpbot: ⟹ (reduce (take (filter (range) even?) 10) +)

1:56 amalloy: qbg: it might be. i didn't think it was, but now that you mention it it must be...

1:57 zvrba: really it blindly rewrites your forms, but it's most often used as a conceptual pipe

1:57 zvrba: -> is a bit harder to wrap head around :S

1:57 qbg: &(macroexpand-1 '(->> (range) (filter even?) (take 10) (reduce +)))

1:57 sexpbot: ⟹ (reduce + (take 10 (filter even? (range))))

1:57 zvrba: amalloy: but what is -> then?

1:57 amalloy: oh, qbg, i know

1:57 qbg: ???!

1:57 zvrba: amalloy: if ->> is pipe, what is -> ?

1:58 qbg: They are both pipes in a sense

1:58 -> makes the previous form the first argument

1:58 amalloy: sexpbot macroexpands all your code before evaluating any of it, so it can scan for not-allowed functions forms and members

1:58 qbg: ->> makes it the last

1:58 amalloy: Seems like a bug

1:59 amalloy: qbg: as it happens, i'm currently working on a macroexpand plugin

1:59 zvrba: qbg: aha! it suddenly makes sense :-)

1:59 tomoj: huh.. ##(first '(for [x 1] x))

1:59 sexpbot: ⟹ let*

1:59 qbg: Oh boy

1:59 That is terrible

1:59 tomoj: &(first '(1 2 3))

1:59 sexpbot: ⟹ 1

1:59 tomoj: well, that's good at least

2:00 amalloy: qbg: yeah, the '(for) thing is definitely a bug i didn't know about

2:00 that one i'll fix

2:00 tomoj: same bug as the macroexpand[-1] examples above, isn't it?

2:00 amalloy: automatically macroexpanding all the way, i won't fix but might hide

2:01 tomoj: i guess it is, isn't it

2:01 tomoj: except it kind of looks like a feature if you squint

2:01 amalloy: tomoj: usually it is in fact desirable

2:01 qbg: '(eval 5)

2:01 &'(eval 5)

2:01 sexpbot: java.lang.SecurityException: You tripped the alarm! eval is bad!

2:02 qbg: Yeah...

2:02 amalloy: but i'm reorganizing things so it only macroexpands-all on actual macroexpand forms

2:02 zvrba: &(5)

2:02 sexpbot: java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn

2:02 qbg: &'[eval 5]

2:02 sexpbot: java.lang.SecurityException: You tripped the alarm! eval is bad!

2:02 amalloy: qbg: understanding &'(eval 5) is extremely difficult. i'd do it if i could

2:02 clojurebot doesn't do it right either

2:03 ,'(eval 5)

2:03 clojurebot: DENIED

2:03 qbg: It also denies it when it is in a vector

2:04 amalloy: ,[eval]

2:04 clojurebot: DENIED

2:04 amalloy: they all do

2:04 zvrba: amalloy: how about using security policy to 1) disallow access to external resources [files,sockets,etc] 2) put a time limit on evaluation of each request

2:04 amalloy: zvrba: that's all already done

2:04 zvrba: amalloy: wouldn't that also solve the eval problem? ie. allow you to support eval w/o having to analyze it?

2:04 amalloy: so what's the problem with eval?

2:05 amalloy: oh yeah, also disallow loading of other classes.

2:05 qbg: Do you want people defining stuff all over the place

2:05 amalloy: zvrba: you also can't (def)

2:05 zvrba: aha

2:05 qbg: put every statement into a new namespace.

2:05 qbg: statement = every &.. request from irc

2:05 amalloy: zvrba: so? you're still leaking memory everywhere

2:05 zvrba: amalloy: can't you programmatically erase a namespace?

2:06 hmm

2:06 amalloy: zvrba: yes. but this is a much more complicated problem than you'd think at first glance

2:06 zvrba: what you're saying is that clojure doesn't have first-class environments?

2:06 amalloy: if you want to contribute to the effort, check out https://github.com/Raynes/clojail

2:06 zvrba: like (eval [something] [variable-bindings-environment])

2:06 qbg: Nope

2:06 zvrba: IIRC, CL does have environment parameter to eval, but it is nowhere specified how to define an environment

2:07 qbg: CL doesn't either

2:07 zvrba: that's the bit I like about Lua: easy to manipulate envs

2:07 qbg: You have &environment lambda keywords for macros in a few spots

2:07 Clojure 1.2+ has an implicit &env argument to macros though

2:08 Basically only useful for getting the names of variables in the lexical scope though...

2:08 zvrba: i hate github's webpages

2:08 they don't wrap properly in narrow windows

2:08 and using "fit to width" in opera makes a column 5-10 characters wide of it

2:09 amalloy: zvrba: have you tried githun filefinder?

2:09 zvrba: hmm?

2:09 amalloy: github rather

2:09 zvrba: obviously, not :)

2:09 what is that?

2:09 amalloy: http://sr3d.github.com/GithubFinder

2:10 zvrba: no

2:11 amalloy: cuts down substantially on the pain involved in browsing repos, and might fix your width issues

2:12 there's some javascript you can add as a bookmark to open the repo you're browsing normally with ghfinder

2:12 qbg: Brute force way to solve the bot issues: Have a queue of JVM instances ready to evaluate a single expression, then kill them once done ;)

2:12 zvrba: uh, it's been a long time I did some programming in my free time :/

2:13 are there any plans for Clojure to support first-class environments?

2:13 like, what is the problem with doing eval in a specified namespace?

2:13 qbg: You could create a new namespace, or switch to a different one and do stuff there

2:13 tomoj: a new jail, huh

2:14 that means new jailbreaks :)

2:14 clj-sandbox had me beat

2:15 amalloy: qbg: if you allow eval, the user can get around any clojure-based restrictions you care to place

2:15 qbg: amalloy: My last reply was w.r.t. why creating a new namespace doesn't work

2:15 amalloy: oh i see

2:16 you meant the client could, not the sandbox could

2:16 qbg: Yes

2:16 The JVM instances idea might be fun

2:16 In a cruel, sick way at least

2:17 amalloy: qbg: as of this very second i'm accepting donations for a bigger vps

2:18 i'll name one of the jvms after you

2:20 tomoj: &(tomoj)

2:20 sexpbot: ⟹ hello! nil

2:20 qbg: I remember seeing some classloader hack that let you evaluate expressions in a different clojure version; I wonder if any of that could be used to spawn light clojure instances...

2:20 amalloy: tomoj: wut

2:20 tomoj: do something clever and hacky via /msg or something?

2:21 tomoj: dunno if I'd say clever

2:21 maybe it was clever when I did it to clj-sandbox, same trick :(

2:22 amalloy: hah. well, please let us know in #sexpbot about any exploits you discover

2:22 we work pretty hard to make them not exist

2:34 tomoj: &(doc +)

2:34 sexpbot: ⟹ "([] [x] [x y] [x y & more]); Returns the sum of nums. (+) returns 0. FNORD"

2:35 * amalloy quietly murders tomoj

2:54 tomoj: that I just wrote (sdrawkcab ("!dlrow ,olleh" nltnirp)) probably means it's time to go to bed

2:55 amalloy: tomoj: pure genius

2:56 tomoj: it would be genius if the definition of sdrawkcab was also backwards

2:56 unfortunately I guess that's impossible without cheating

2:58 amalloy: tomoj: implement it as a palindrome

2:58 tomoj: :D

2:58 amalloy: (defn ... nfed)

2:59 the ... is left as an exercise for the reader

2:59 tomoj: hmm

2:59 won't it always macroexpand to orcamfed ?

3:00 amalloy: tomoj: (defmacro ... (let [orcamfed ...] orcamfed))

3:01 you can't do it as a palindrome *and* with balanced parens, probably, but that seems like asking a lot

3:04 tomoj: oh well

3:04 LauJensen: Morning all

3:05 amalloy: morning LauJensen

3:05 earlier we were discussing how i should start a blog to be more like you

3:05 arbscht: this could be a start (defn _# [] #_ nfed)

3:06 LauJensen: amalloy: That would be great

3:06 arbscht: When is the next WR due?

3:06 arbscht: LauJensen: this weekend

3:07 LauJensen: arbscht: Alright - Its great that you're putting in the work - and I can tell its a lot of work!

3:07 arbscht: another fortnightly review

3:08 the news part isn't much work tbh -- I should have released that without the special feature, but I mistakenly thought I could squeeze it together within a weekend

3:11 LauJensen: ok. I was impressed that you collected news from so many different communities

3:11 arbscht: you should see my rss reader and mailing list subscriptions...

3:12 LauJensen: I tried subscribing to the Clojure ML which killed my productivity in a week :(

3:12 arbscht: tbatchelli_'s daily intertweets roundup is a really good source

3:16 LauJensen: Yea I check them out daily as well

3:36 TobiasRaeder: Morning, again :)

3:36 clojurebot: Pardon?

5:27 ejackson: Hello all

5:30 LauJensen: mjello

5:30 kryft: 'allo

5:33 ejackson: Finally got my DIY standing desk worked out this morning. Previous versions have ben rather unstable.

5:34 and flying laptops are a poor idea

5:55 LauJensen: DIY ejackson ? pics :)

5:55 ejackson: hahahah

5:55 alrightyyy.....

6:00 LauJensen: You are indeed a creative man

6:00 !

6:01 Is that an 'authorized' stand you're using the for the laptop?

6:01 ejackson: yeah, it folds up nicely fro when I have to travel

6:01 LauJensen: nice, got a link/name for it?

6:01 ejackson: and that is a wine case that's bringing the keyboard up to the proper height ;)

6:02 LauJensen: Yea it wouldn't work without the wine case and the floor board :)

6:02 ejackson: its ergonomically correct, and gets me off my fat ass, which is critical.

6:03 LauJensen: ejackson: You know they actually sell tables which allows you to both sit and stand right?

6:03 ejackson: oh yeah, they also sell software.

6:03 so i'm told.

6:03 LauJensen: Oh you're trying to be clever... now I get it...

6:04 ejackson: :D

6:05 i figure you'd approve, it is very much in line with your ideas on doing everything the best way possible.

6:05 the idea of a standing desk, at any rate.

6:06 the macguyver construction, maybe less so :)

6:07 LauJensen: Hmm. I dont know how I feel about you using a storage cabinet, a wine box, a floor board to mimic a box product and say its in line with my ideas ... :)

6:08 ejackson: :)

6:59 opqdonut: how long do your projects tests take?

7:00 were trying to optimize ours, were at 50secs at the moment

7:00 fliebel: tests? (yea, I'm evil)

7:00 opqdonut: the tests involve jni libs doing some quite heavy processing

7:00 but they still seem rather slow for some reason

7:01 maybe memory churn

7:02 fliebel: opqdonut: Is all the heavy processing needed, or could you test on a subset of the data, or whatever?

7:02 opqdonut: well it seems that it is needed. we have separate large tests which are run on "more real" data

7:02 they're run periodically on a test server and take tens of minutes

7:03 fliebel: ouch...

7:03 opqdonut: i'm just curious as to how low people have gotten their turnaround times

7:04 fliebel: But if you want to find out the answer to your question, check out some github projects and run their tests :)

7:04 opqdonut: mm, yes, good idea

7:05 mids: opqdonut: I was thinking about adding some of the JunitMax features to a clojure test runner

7:06 (JUnit Max keeps statistics of past run length and failure rate and sorts them to give you the quickest feedback)

7:06 fliebel: *puzzled look* Does anyone know why Clojure might insert whitespace in front of my printed data?

7:07 mids: fliebel: calling println with multiple arguments?

7:07 fliebel: mids: Yea...

7:07 mids: I believe that injects spaces, try str on it first

7:08 opqdonut: mids: we've been considering something like that

7:08 mids: were printint the top 10 time consuming tests at the moment

7:09 fliebel: opqdonut: Random idea: Distributes tests over a small cluster :)

7:09 mids: opqdonut: yeah, after adding some timing stats I got mine back to 14 seconds including jvm startup

7:09 also there are some testrunners out there that do parallel execution

7:10 opqdonut: distributing will probably only help down to 10secs or so

7:10 sub-second unittests would be cool

7:10 mids: what sort of project is this by the way?

7:10 mids: some tiny web application :)

7:11 opqdonut: ok

7:11 mids: how do you run your testsuite? as part of the CI? manually executed?

7:15 opqdonut: mids: developers run the tests manually, and the mergemaster runs tests as a prerequisite for merging

7:16 hmm, I grabbed clojure-contrib from git and am trying "mvn test"

7:16 [INFO] Unable to find resource 'org.clojure:clojure:pom:1.2.0-master-SNAPSHOT' in repository clojure-snapshots (http://build.clojure.org/snapshots)

7:16 that sounds kinda stupid

7:17 mids: opqdonut: I got an autotest runner setup, which starts as soon as a .clj file is written to disk

7:17 together with a nice red/green bar this is very effective

7:17 opqdonut: ah sounds neat

7:18 mids: https://gist.github.com/771550

7:19 maybe it could be used to only run specific test cases based on which file / subdirectory is written to

7:19 Raynes: _na_ka_na_: ping

7:20 _na_ka_na_: Raynes, I present myself before you, bow

7:20 * Raynes bows

7:20 zoldar: hello, I'm trying to define a macro for handling conditions (clojure.contrib.condition) inside (try ...): http://paste.lisp.org/display/118588 . When compiling, I'm getting information about 'catch' symbol being unresolvable in current context . What am I doing wrong?

7:20 Raynes: _na_ka_na_: http://dev.clojure.org/jira/browse/CONTRIB-99

7:21 That bug appears to have been magically fixed in 1.3

7:21 I was going to fix it, but found that somebody had beat me to the chase.

7:22 _na_ka_na_: sweet

7:22 Raynes: Just wanted to point it out. :>

7:22 _na_ka_na_: thanks for that :)

7:23 opqdonut: hmm, I must be doing something wrong. the 1.2.x tag of clojure-contrib fails with a "java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V"

7:23 (when building clojure.contrib.repl-ln)

7:23 raek: sounds like you're mixing jars from different clojure versions

7:23 Raynes: Are you building it with the corresponding Clojure? That error is almost always a sign of mismatched versions of AOT compiled Clojure code.

7:24 opqdonut: I'm letting mvn grab the needed clojure jar

7:24 ok, "maven clean" fixed it.

7:24 my bad probably

7:50 Raynes: $seen kzar

7:50 sexpbot: kzar was last seen quitting 4 weeks and 1 day ago.

8:10 Dranik: how to debug a clojure program without an ide?

8:11 LauJensen: Dranik: You'll have to ask the vim users. I think kotarak and chouser are the last two left

8:11 fliebel: LauJensen: Why Vim users?

8:11 Dranik: LauJensen, isn't there a comand-line way?

8:11 LauJensen: fliebel: Everybody else has an IDE

8:11 Dranik: yea, open a cake repl in your project

8:11 Dranik: LauJensen, me also but I'm not satisfied with them

8:12 I'm much happier with gvim than with netbeans/enclojure

8:13 LauJensen: Dranik: Great, however most people are happy with Emacs

8:14 Dranik: yep, I was trying to get used to it for two months until I almost have broken my fingers playing the emacs chords

8:14 so how to use cake to debug clojure code?

8:14 LauJensen: Dranik: Oh - You didn't mention up front that you were a woman... :)

8:15 Dranik: ???

8:15 LauJensen: Dranik: cake repl just gives you a project repl, in which you can use whatever tools you normally would to debug. Im actually not sure how you attach a debugger

8:15 Dranik: ok

8:16 LauJensen: check in #cake.clj

8:20 Raynes: LauJensen: That was mean. People who whine about Emacs's chords aren't women! They're armless pirates!

8:21 LauJensen: Raynes: Oh Im sorry - I wasn't trying to be mean, I was just surprised thats all :)

8:21 Raynes: ;)

8:22 I don't know, it seems it always comes down to "it's huge" or "the keybindings suck", in which case I merely give up and presume that they're happy enough with Vim to just plain not care.

8:22 I use Emacs because I can use it for *everything*. Any language. I mean, seriously, I'm writing my book in it.

8:23 * chouser wrote a book in vim. *shrug*

8:23 Dranik: chouser, thanks :-)

8:23 chouser: well, part of a book. Fogus wrote the rest in emacs.

8:24 Dranik: chouser, do you debug clojure code somehow?

8:24 LauJensen: Dranik: chouser doesnt make mistakes, so he doesnt need debugging :(

8:24 Raynes: I wasn't implying that it couldn't be done in Vim. I was just stating why I use Emacs. If you asked me why I use Emacs over Vim, I'd answer with "tetris and M-x eshell"

8:24 LauJensen: Raynes: I use Emacs for the same reasons. And the keybindings that suck, get changed

8:25 Raynes: LauJensen: My hyper key is my hero.

8:25 Dranik: Raynes, the keyword here: "if you ask". I don't ask about your emacs. I ask about debugging clojure

8:25 LauJensen: Is that bound to M-x zone-mode ?

8:25 chouser: I rarely step through clojure code examining locals and the like. I've never done that much in any language.

8:26 Raynes: Dranik: Just making conversation. Certainly not trying to steal your question's spotlight! :)

8:26 chouser: careful examination of stack traces and liberal logging generally work well enough for me.

8:27 fliebel: chouser: You mean just inserting println statements?

8:27 Raynes: LauJensen: I have stuff like H-c for slime-connect and H-s for magit's status buffer.

8:27 Dranik: yeah, what the logging tool do you use?

8:27 chouser: fliebel: When I'm watching stdout, yes.

8:28 Raynes: println is my go-to debugging source. I've encountered few problems I couldn't solve with 5 or so strategically placed printlns.

8:28 chouser: though on some projects I end up writing a 5-line function to allow turning on or off logging in certain sections of code

8:28 fliebel: The only time I used a debugger was with Python, because it was included *shrug*

8:28 * fliebel uses vim

8:28 Dranik: yeah, python debug is great!

8:28 the same as in RoR

8:29 so I was waiting something alike in clojure

8:29 chouser: the clojure debugging framework is out there. I really should invest the time to figure out how to use it.

8:30 fliebel: chouser: You don't. There is one that can insert a repl at some point, and one that gets you a call stack… on pre 1.2

8:30 Dranik: fliebel, cdt?

8:31 fliebel: I don't recall anything about it, just that I couldn't get anything like pdb in Clojure.

8:33 LauJensen: chouser: Did you ever educate yourself on Maven like you wanted to ?

8:35 clgv: Can I use components that are licensed under LGPL in my project which shall be licensed with EPL (since this is the license of clojure)?

8:35 LauJensen: Yes, but you might get sued :)

8:36 raek: I would think so. last time I investigated it, I came to that conclusion.

8:36 clgv: than you shouldnt say yes! :P

8:36 LauJensen: clgv: All of these licenses basically require a lawyer to fill you in, but in my oppinion you're free to do so

8:36 raek: LauJensen: why?

8:36 clgv: ok :)

8:36 raek: the cause of the GPL-EPL incompability is not in the LGPL, at least

8:36 LauJensen: raek: Because as best as a layman can understand these complicated documents, only experienced lawyers really know what they're about. A danish lawyer told me, that nobody understands the GPL3, and if anybody did they were lying.

8:37 +said

8:38 clgv: I find that license stuff very tricky, too.

8:38 LauJensen: clgv: If you dont find it tricky, its probably because you dont understand it at all

8:38 Licenser: stop highlighting me :(

8:38 LauJensen: Licenser: Stop selling licenses

8:38 chouser: LauJensen: yeah, pretty well. I'm using maven on a half-dozen projects now, I understand it well enough to make use of it at least.

8:38 LauJensen: chouser: Are you glad you took that route?

8:39 Licenser: Í don't but once upon a time I found it a smart idea to put 'lice' in my highlighing list

8:42 chouser: LauJensen: yep

8:43 LauJensen: hmm. so cemerick's gotten to chouser as well...

8:43 cemerick: what did I do now?

8:44 LauJensen: cemerick: You seem to have pulled chouser to the dark side as well

8:44 cemerick: oh, the usual, I guess :-P

8:44 LauJensen: :)

8:45 cemerick: Indeed. I have great power.

8:45 chouser being super-persuadable and entirely unopinionated himself.

8:45 :-D

8:45 LauJensen: "Chas Emerick - Great in Power and XML"

8:47 Licenser: I don't know if Great in XML is a compliment

8:48 cemerick: Licenser: I'm certain that it's not, coming from Lau.

8:48 Licenser: heh

8:48 cemerick: I'll be Master of IDEs soon.

8:48 Licenser: that sounds nice, which do you master?

8:48 or do you just plan to run slave processes on all of them?

8:49 cemerick: I think only vim users make slaves of other IDEs.

8:50 fliebel: cemerick: So you mean vim users bend their IDE to their will, and other users are slave of their IDE?

8:50 chouser: right, because usually when a user and an IDE enter a relationship, the IDE becomes the master

8:50 cemerick: fliebel: heh, no, I was referring to e.g. http://eclim.org/

8:51 chouser: Dude, you're going to be using Eclipse by the end of the year.

8:51 chouser: wait, this year? cool!

8:52 you know, it's possible. I recently gave up my tabbing/tiling window manager.

8:52 cemerick: chouser: Yeah. I'd say you'll be in serious fiddling stage before the next conj. You have all the signs.

8:52 chouser: not at all comfortable yet with the new arrangement

8:52 technomancy: ouch, no more tiling?

8:53 chouser: technomancy: yeah, I'm using pywo for a kind of ad-hoc fake tiling

8:53 cemerick: I took a look at the tiling "window managers" for OS X last week. Was not impressed at all. I'm intrigued by the idea, but I don't see any decent OS X impls.

8:53 chouser: hoping to hack on it with a friend to add more features

8:53 technomancy: chouser: oh, ok, so a layered approach. I approve of this notion. =)

8:53 chouser: technomancy: :-)

8:54 technomancy: tiling rulesets can be orthogonal to the program that does decorations etc.

8:54 chouser: right

8:55 and tiling as a tree of horizontal or vertical splits was never an ideal approach, afaic

9:02 LauJensen: Am I alone in pretty much having a maximized app on each screen?

9:03 technomancy: LauJensen: I do that when I don't have my external monitor in.

9:03 actually I do that always except for using skype for work

9:03 LauJensen: That was the reason I could say goodbye to Awesome WM...

9:03 dakrone: LauJensen: I do the same

9:03 LauJensen: k

9:30 lpetit: As for tiling wms, etc. : I just want to be able to move both edges of adjacent windows at the same time. This is what really bothers me. First resizing one window. Then the other one.

9:35 Yeah, ccw's repl view now uses the same structural edition mode (default or strict) than is configured at workbench level, yoohoo !)

9:35 * lpetit happy

9:37 lpetit: chouser by the end of the quarter :-p

10:25 AWizzArd: I have a ns with a (:genclass) and AOT'ed it and JAR'ed. Now I want to set a window icon which I read from my jar. In Java this is: ImageIO.read(getClass().getResource("picture.gif"));

10:25 How do I do the getClass() part?

10:25 technomancy: just pass the class itself

10:27 LauJensen: lpetit: When will CCW be ready for me ?

10:27 lpetit: LauJensen: When will you be ready for CCW ? :-p

10:28 AWizzArd: technomancy: ok thx, will try that

10:28 LauJensen: lpetit: As soon as it supports all of Emacs keybindings and preferably has a built in IRC client, inspector, debugger etc...

10:29 lpetit: LauJensen: why ask, then ? you already know the answer.

10:29 LauJensen: lpetit: Why, have you stopped improving on it already?

10:30 lpetit: No, but I'm not trying to rewrite emacs in java :-p

10:31 so YMMMV as to whether ccw is ready or not

10:31 s/YMMMV/YMMV/

10:31 sexpbot: <lpetit> so YMMV as to whether ccw is ready or not

10:33 mduerksen: lpetit: ccw 0.0.64 had to many disadvantages comparing to emacs, but i think ccw 0.2 stable has a chance of replacing emacs for me

10:33 lpetit: mduersken: btw, a new ccw0.2 is around the corner. A matter of a few days

10:34 technomancy: lpetit: have you tried the lein-eclipse plugin? any good?

10:34 cemerick: …and hopefully one more RC so I can slip my fixes in before it goes final ;-)

10:34 lpetit: cemerick: yeah, I owe you this one

10:34 mduerksen: lpetit: looking forward to it :) will it be available on the update site at the same time?

10:34 lpetit: technomancy: alas not, too focused on ccw today (which, overall, is a good thing :) )

10:35 LauJensen: technomancy: what does it do that eclipse doesnt?

10:35 lpetit: mduerksen: yes, with a different Feature name than the main branch.

10:35 technomancy: LauJensen: I don't know, that's why I was asking if he'd tried it.

10:35 LauJensen: :)

10:36 lpetit: technomancy: but I've left a comment on the owner's blog, so I'm also waiting for his answer before getting my hands on it

10:36 technomancy: ok, just curious

10:37 cemerick: IIRC, it generates an eclipse project from a lein project.clj

10:37 I think there was someone on the ML that used it successfully.

10:37 lpetit: LauJensen: creates the 2 Eclipse project's metadata files from project.clj, without having to go the install maven eclipse plugin -> lein pom -> import your project as a maven project. The steps become lein eclipse -> import your project as a regular eclipse project

10:38 cemerick: the answer I gave the previous day on ccw ml would have been much shorter if I had discovered lein eclipse (and checked it worked) before :)

10:38 AWizzArd: technomancy: as long I haven't AOTed my module I can not refer to my class right? So am I supposed to use Class/forName and make a check if my app was started from a (emacs) repl or command line and see if I should execute that forName call?

10:39 technomancy: AWizzArd: sorry, I don't really use AOT. all my info is second-hand.

10:39 how you launched shouldn't be an issue though; it's just whether the .class files are present or net

10:39 *not

10:40 LauJensen: ok

10:41 lpetit: must go get child at school, cu all later

10:41 AWizzArd: technomancy: though you can't have a NS with a :gensym, then (in-ns NS) and just eval NS to a class unless it is AOTed.

10:41 Okay, I will try a dynamic solution with forName.

10:54 hiredman: clojurebot: ping?

10:54 clojurebot: PONG!

11:31 signalseeker: technomancy: I was able to get up and running with your swank-clojure instructions without a problem

11:32 Thanks!

11:32 technomancy: signalseeker: great

11:33 signalseeker: Now, I need to decide which clojure book to start reading first - The Joy of Clojure or Programming Clojure?

11:33 Any suggestions?

11:33 fogus`: I personally recommend Joy of Clojure

11:33 Raynes: Man, I wish my book was finished. This would be the perfect place for shameless self-promotion.

11:34 Like that!

11:34 fogus`: High five.

11:34 signalseeker: haha, Raynes: whats the name of your book?

11:34 Raynes: The working name is Meet Clojure until I come up with something clever.

11:34 Might have to consult technomancy on that one.

11:34 signalseeker: Oh okay

11:35 Raynes: My book should have the cleverest name of all the Clojure books.

11:35 signalseeker: You could call it "Clever Clojure"

11:35 Raynes: Not clever enough. ;)

11:35 redinger: sexpbook

11:35 Derander: sexy sexps

11:35 Raynes: redinger: "sexpbot: An Introduction to Clojure". You sir, are a God.

11:36 sexpbook*

11:37 fogus`: The problem is that technomancy might suggest you name your book "Lucian Gregory" :-O

11:37 Raynes: I actually like that name. I'm putting it on my seriously-consider list. Thanks redinger.

11:37 fogus`: Yeah, I was thinking that as well. :\

11:38 redinger: Sure

11:39 * Raynes is having a beef taco hotpocket for brunch.

11:39 redinger: signalseeker: I guess I should recommend Programming Clojure, since I work for the author

11:39 mduerksen: Raynes: who or what is the focus of your book? that might give the right direction for your title

11:39 redinger: But, Joy of Clojure is awesome as well

11:40 signalseeker: I am sure both are awesome! But I get the feeling the Programming Clojure is a little dated now?

11:40 Raynes: I'd recommend Joy of Clojure, not because Programming Clojure is bad but because it's somewhat outdated.

11:40 redinger: yeah, it was written in the 1.1 days

11:40 So, none of the 1.2+ stuff is covered

11:41 Raynes: mduerksen: A freely available humorous and lighthearted introduction to Clojure for people of all walks of programming life. So, sexpbook is actually pretty 'there'.

11:42 I can hear people now "Check out the sexpbook." in the same way you hear people talking about the Ruby Pickaxe. :p

11:42 signalseeker: I think I will start with The Joy of Clojure in that case, considering I am interested in the new (performance) oriented features

11:42 mhi^: What do you think of "Practical Clojure", BTW?

11:43 Raynes: Clojure Programming, an upcoming book by cemerick, will be the one to cover most of the 1.3 stuff. My book wont be done until after 1.3 comes out (purposely) so that I can make amendments to recognize the 1.3 changes as well.

11:44 So, theoretically, both of our books will be the ones to cover 1.3 in the near future.

11:44 signalseeker: Raynes: that makes sense. You should definitely target the 1.3 features

11:44 Raynes: I imagine that mine will be done before his, given that publishers are weird and like to spend 6 months doing random stuff even after a book is finished, and mine isn't being published.

11:44 signalseeker: Are you doing a MEAP or some kind of early edition as well?

11:45 Raynes: Not that it's a competition. His book will be a lot longer than mine.

11:46 My book will be free (at least, the ebook version will be, and it'll be open source). Once it is close to completion, I'll throw the source on Github and put out early drafts for public review to gather feedback before the book is finalized.

11:46 mduerksen: Raynes, signalseeker: btw, what *are* the new 1.3 features? the only thing i was able to spot is the unchecked-math. where should i look to find out was else has changed/has been added?

11:46 Raynes: Until then, I'm giving the draft to pretty much anybody that asks, but not making it totally public.

11:46 opqdonut: mduerksen: defstatic

11:46 i.e. typed functions

11:46 that can return primitives, for example

11:47 mduerksen: a, right, primitive hints in functions

11:47 Raynes: mduerksen: I am a bit uneducated in that. I haven't had time to do real investigation.

11:47 mduerksen: *function signatures

11:48 redinger: mduerksen: https://github.com/clojure/clojure/blob/master/changes.txt

11:48 signalseeker: redinger: Perhaps you could ask your employer to update this book as well?

11:48 mduerksen: thanks redinger, thats helpful

11:49 signalseeker: I can't imagine it would be that much more work

11:49 redinger: signalseeker: agreed

11:50 hiredman: opqdonut: the static stuff is not likely to survive to the 1.3 release

11:51 opqdonut: oh?

11:51 how come?

11:51 hiredman: a combination of other changes provide a better solution to the problem defstatic was aimed at addressing

11:52 opqdonut: do you have a link to a discussion on this? or do you care to elaborate?

11:52 hiredman: IFn is going to have overloads for primitives to some degree, and they will still be first class function

11:52 opqdonut: okay

11:52 because our project is _really_ interested in performance upgrades

11:52 hiredman: opqdonut: rhickey has talked about it in here and at the conj

11:52 the other issue is var resolution, which the change from dynamic vars by default addresses

11:53 opqdonut: mhmm

11:53 hiredman: well, not resolution but dereferencing

11:54 mduerksen: Raynes: "Clojurify Your Ways", "Clojure - The Bright Side of Programming", "Clojure For Yummies"

11:55 Raynes: I'm still leaning toward sexpbook.

11:55 opqdonut: hiredman: thanks!

11:55 hiredman: confluence may have this

11:58 http://dev.clojure.org/pages/viewpage.action?pageId=950293 this page makes it sound less fleshed out than it is

12:05 S11001001: Bookjure

12:05 ejackson: (clojure)

12:06 Raynes: ejackson: That's a good one.

12:06 ejackson: thank you

12:06 Raynes: S11001001: I considered that one, but found it too... common.

12:06 S11001001: a little

12:06 Raynes: ejackson: I'm putting it right up there with sexpbook.

12:06 opqdonut: the name should be googleable

12:06 S11001001: was not meant in earnest :)

12:07 Raynes: opqdonut: sexpbook should be very googleable.

12:07 opqdonut: yes, it is

12:07 (clojure) very ungoogleable

12:08 Raynes: One of the chapters of the book is named "))))))))))))))))))))))))".

12:08 So, I'm pretty solid on parenthesis fun.

12:08 sexpbook is fantastic.

12:11 fliebel: "a parenthesis" "apparent he is"

12:19 Raynes: fliebel: http://www.reddit.com/r/programming/comments/f1nh9/im_tired_of_the_nosql_buzz_and_bring_you_slouchdb/

12:19 I also put it on hacker news.

12:20 fliebel: Raynes: "seq a Clojure book?" "(peek Clojure)" "cons-tructive Clojure"

12:20 Raynes: Thanks :)

12:20 Raynes: You people suck at names. Except redinger.

12:21 fliebel: Ah, found it: http://news.ycombinator.com/item?id=2100496

12:43 LauJensen: Raynes: I'd go with "Meet Clojure"

12:43 Simple, professional. "sexpbook" is guaranteed to put you in an unfortunate google space

12:44 Raynes: Simple, boring, professional.

12:45 I'm not really looking for publicity or top google results. Plus, the book will be qualified with ": An Introduction to Clojure".

12:48 LauJensen: Clever trumps boring and professional in this case. This book should, with any luck, fill some of the niche that Learn You a Haskell fills.

13:34 mhi^: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=clojure&lang2=lua

13:40 Scriptor: mhi^: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=clojure&lang2=luajit

13:42 mhi^: Scriptor: JIT doesn't count! No, I just wondered that Clojure is faster, because I always thought of Lua as a small and pretty fast language.

13:43 You can also clearly see that Clojure uses a lot more memory. I'm not too familiar with functional programming yet.. I guess that's due to all the recursion used?

13:44 fliebel: Or just the JVM...

13:45 mhi^: Well, I guess that would make sense, too.

13:50 harrowbits: Every feature supported by Clojure is supported at runtime. - what does this mean? :)

13:50 technomancy: it means some of the blurbs on the website haven't been updated in a long time

13:51 harrowbits: but it also have several other meanings

13:51 * Raynes opens his dictionary.

13:51 harrowbits: xD

13:51 Raynes: Nope, it means precisely what technomancy said.

13:51 harrowbits: okiedokie

13:51 Raynes: ;)

13:51 Scriptor: mhi^: technically, JIT does count since the JVM is jitted :)

13:53 harrowbits: what is clojure?

13:53 Raynes: mhi^: Yes, the JVM is definitely why Clojure uses a lot of memory. The JVM allocates it's memory at startup. You can make adjustments to the amount of space that is allocated via JVM options and stuff to lower the memory consumption.

13:53 A programming language.

13:53 Scriptor: I guess that improves performance later on as it doesn't need to allocate memory later on?

13:53 harrowbits: from the point of view of java

13:53 lang

13:54 Raynes: Java's point of view is hindered by severe tunnel vision.

13:54 harrowbits: is it related to java, or just built on java as opposed to ie. C++

13:55 Scriptor: harrowbits: it's pretty well integrated with java

13:55 harrowbits: am i safe to assume I can use java-like syntax in clojure?

13:55 Raynes: No.

13:55 Clojure is a Lisp and uses a Lispy syntax.

13:55 Nothing even remotely like Java.

13:55 Scala would be closer to that.

13:55 harrowbits: all right, that makes it clearer:)

13:56 does it have an ide? :)

13:56 Scriptor: 1. Compiles directly to jvm bytecodes (not just interpreted) 2. can interopt with existing java code

13:56 Raynes: It is, however, extremely well-integrated with the JVM and interoperating with Java is a pleasant summer breeze.

13:56 Scriptor: harrowbits: there are plugins for eclipse, netbeans, etc.

13:56 though most use emacs

13:56 harrowbits: eclipse plugins sound good

13:57 Scriptor: harrowbits: how much example code have you seen

13:57 ?

13:57 harrowbits: though looking at this: http://clojure.org/runtime_polymorphism seems rather cryptic, are there many assumptions or "connections" that need to be kept in the user's brain?

13:57 fogus`: Scala is to Java as a car is to a murder weapon

13:58 harrowbits: a second level vehicle then

13:58 Raynes: fogus`: It has curly brackets though. It *is* closer.

13:58 fogus`: Also, what if the victim was ran over by the car? The car would be the murder weapon.

13:59 harrowbits: killer transports weapon and gets in car with it and now car transports kill then weapon :)

13:59 Raynes: inb4clojurehascurlybracketstoo ##{:I :am :a :map}

13:59 sexpbot: ⟹ {:I :am, :a :map}

13:59 harrowbits: kill=killer* was last heh

13:59 what's the first char though?

13:59 ok i like lists

14:00 (defmethod encounter [:Bunny :Lion] [b l] :run-away)

14:00 trying to understand anythingO_o

14:01 ok here http://clojure.org/getting_started

14:02 (+ 1 2 3) this one makes sense :)

14:02 clojurebot: *suffusion of yellow*

14:02 Scriptor: harrowbits: the defmethod stuff is more advanced, dealing with a concept called multimethods

14:03 harrowbits: ok

14:03 Scriptor: harrowbits: http://www.moxleystratton.com/article/clojure/for-non-lisp-programmers

14:03 mhi^: Raynes: Ah, I see. Thanks for the hint.

14:03 Scriptor: that article is a great introduction for someone not used to lisps

14:03 Raynes: (defmulti encounter #{:bunny :lion}) (defmethod encounter :bunny [_] :cuddle) (defmethod encounter :lion [_] :run-away)

14:03 Scriptor: And, if I'm right, it's older than planet Earth itself.

14:04 Scriptor: Raynes: yea, but it doesn't cover much beyond the absolute basics

14:04 harrowbits: thanks, checking

14:04 Scriptor: everything in there is still pretty relevant

14:04 harrowbits: what happens if you need to use a comma between ()

14:05 Scriptor: harrowbits: in clojure, commas are basically considered whitespace, so it's purely an aesthetic thing

14:05 harrowbits: awesome

14:05 Scriptor: though they're mostly used when dealing with map literals and such, separating key-value pairs

14:06 harrowbits: is there any 3d representation of all idioms in the language or some kind of 3d ide for working with clojure such that I can easily parse connections ?

14:06 Scriptor: a 3d ide?

14:06 amalloy: what...what...what would a 3d anything mean

14:07 harrowbits: I guess some sort of treeview(in 3d?) of all that makes clojure

14:08 and all that I add with my clojure program

14:08 oh wait, what year is this?

14:08 ah sorry

14:18 amalloy: i guess his new year resolution was to learn clojure in 2012?

14:27 cemerick: Raynes: I'll have to hire you as my PR man ;-)

14:35 fogus`: Opinion: a) insane, b) awesome, c) all of the above? https://github.com/fogus/marginalia/blob/master/src/marginalia/parser.clj

14:38 ejackson: fogus`: something be wrong with my browser... i'm only seeing about 40 lines. Where's the rest of it ?

14:39 fogus`: ejackson: :p

14:40 arj: I know this is common complain but java is really slow at starting up. It used to be ok, but now with the google libraries added as well, it can take many minutes to start up. Any ideas, hints? This is on my ubuntu laptop

14:41 it's pure I/O since I can hear the disc crunching all the time while it's loading. top shows on wait and no cpu :(

14:43 S11001001: minutes?

14:56 benreesman: anyone here used cascalog?

14:57 technomancy: clojurebot: anyone?

14:57 clojurebot: Please do not ask if anyone uses, knows, is good with, can help you with <some program or library>. Instead, ask your real question and someone will answer if they can help.

14:59 arj: S11001001: yes, minutes :(

14:59 cemerick: benreesman: were you looking for a recommendation pro or con, or do you have a question you'd like help with? :-)

15:00 benreesman: cemerick: just wondering if folks have had good experiences with it

15:02 cemerick: benreesman: a number of people use it and are happy with it from what I've overheard. Talk of cascalog (and really, hadoop in general) is rare in this channel.

15:02 cinch: arj: you could put the JVM in a ramdisk to help with the startup time

15:03 benreesman: cemerick: cool thanks for the recommendation. i'm going to need to start learning hadoop and i'd love to do it using clojure if possible. cheers.

15:03 * cemerick isn't sure that was a recommendation :-)

15:03 cemerick: here-say, sure

15:03 technomancy: if you have to do hadoop, cascalog seems like the least-painful way from what I've heard.

15:04 S11001001: I was bothered by Zope/Plone startup time when I did that, so I added a Plone daemon to startup, and it got faster :)

15:05 cemerick: It seems common for people that think they need hadoop to take a look at it and its supporting libs, and then back away slowly to something just a little less intimidating (yet perfectly suitable for their needs).

15:06 myself included :-)

15:06 technomancy: cemerick: sounds ... familiar.

15:06 cemerick: benreesman: ^^

15:06 technomancy: I think it's a right of passage to a certain extent.

15:06 david`: are there any clojure programmers that weren't java programmers or even lisp programmers?

15:06 S11001001: the sentence at the top of http://clojure.org/protocols seems out-of-date

15:07 cemerick: "First, we looked at hadoop. After a little while we backed off to couchdb/mongo/mysql." :-P

15:07 david`: there is a large contingent of python and ruby folk

15:07 david`: cool, I am a ruby programmer by day as well

15:08 benreesman: at the moment i'm just map reducing directly in clojure off the disk

15:08 map of line-seq of file-seq, very simple stuff

15:13 cemerick: benreesman: in that case, you might want to approach hadoop warily, if you're not certain you actually need it. Because if you don't, you'll wish you could have had those N weeks of your life back. ;-)

15:14 benreesman: cemerick: this particular project i'm probably going to get away with some simpler, but hadoop is in heavy use at my company so i'm looking for a gentle way to learn more about it. it does seem a little intimidating at first glance though :)

15:17 cemerick: benreesman: In that case, godspeed, and make sure you bring a towel. :-)

15:17 benreesman: haha

15:34 Raynes: cemerick: 10 bucks an hour, and I'm always on.

15:42 chouser: david`: I didn't know java or lisp well at all before starting on Clojure.

15:48 lpetit: Counterclockwise 0.2.0 RC4 sent to the wild. /me going offline right n

15:51 Raynes: candlejack was he

15:52 TobiasRaeder: is there a complete downloadable version of the clojure (doesn't need to include contrib) documentation? (as seen on clojure.org for example)? cant find one

15:52 Raynes: TobiasRaeder: If you use Firefox, there are a few extensions that can download web pages recursively.

15:53 mrBliss: or wget :)

15:53 Raynes: Or wget, yes.

15:53 wget is the son of my God.

15:54 TobiasRaeder: alright, thanks

15:55 lpetit: technomancy: if at some point in time lein-eclipse seemed rock solid, would it be an option to have it included in lein's distrib ?

15:56 raek: the question re downloadable docs comes up every now and then

15:56 technomancy: lpetit: no, even lein swank is kept outside lein

15:56 lpetit: oh, so Im' not jealous :-)

15:56 technomancy: but now it's easy to install plugins like that for the whole user so they don't have to be included in every project.clj

15:57 raek: maybe some hudson+autodoc wiz could cook up something...

15:57 lpetit: ok, fair enough, and good to know

15:57 technomancy: just want to keep the core slim

15:59 lpetit: I understand. Now I know this is not an option. That's fine with me.

16:00 technomancy: I'm even starting to wonder if javac belongs in the core.

16:00 Raynes: lpetit: Not that I'm the final word on the subject, but a port to cake might be something considered for cake proper, assuming it's light weight.

16:02 Berengal: Is there a way to reset the swank-server environment without restarting the server entirely?

16:02 lpetit: Raynes: good to know, too. Thx. I indeed have some plans on making a cake-eclipse. lein-eclipse is currently 91 locs, fyi (though I've still not tested it, so maybe, after intensive edge case tests, on linux, windows, etc., it may grow a little bit more, but my guess is that it'll still average one or two hundred lines max.

16:03 Raynes: lpetit: I think that, as long as it doesn't add dependencies, it would be lightweight enough.

16:04 lpetit: Raynes: ok. I'll come back to you when ready, keeping your constraints in mind.

16:05 Raynes: Speaking of plugins, I recently added a clojars plugin to cake. It uses cljr's clojars code, and thus works the same. I rewrote the part that adds the library to project.clj so that it doesn't mutilate the file. Fun stuff.

16:05 It has the search functionality of cljr and all that.

16:05 lpetit: late here, must leave, 'night all

16:06 technomancy: does anyone use leiningen with archiva or nexus?

16:08 S11001001: yes

16:10 abrenk: Raynes: just talked to lpetit, I'll give him commit access to lein-eclipse tomorrow

16:10 Raynes: abrenk: Neat. :>

16:11 abrenk: Raynes: don't know what you guys were talking about, he just pinged me on github

16:12 Raynes: abrenk: We were talking about porting it to cake and it possibly ending up in cake proper.

16:12 Berengal: technomancy: I did, but our nexus server didn't mirror clojars properly

16:17 technomancy: Berengal: I just added a task so you can deploy directly to private servers.

16:18 rather than clojars' somewhat-hacky scp deployment

16:18 abrenk: Raynes: okay, great! Shouldn't be hard. Most of it is just using clojure.contrib.prxml to produce the XML. Anyway, I'm also off to bed.

16:19 S11001001: technomancy: nifty

16:19 Berengal: technomancy: Private servers as in arbitrary repos?

16:21 technomancy: Berengal: not sure what that means... you can deploy to remote repositories that you have access to

16:22 Berengal: technomancy: That's sort of what I meant. In maven you define repos in your settings.xml, along with url and password, and then in the pom you say to which repo snapshots and releases go

16:22 Is that what's added?

16:23 technomancy: yeah, you can provide url/credentials either in project.clj, ~/.lein/init.clj, or on the command-line

16:23 Berengal: Nice :)

16:23 technomancy: right now it only deploys to http:// and file:/// repos; haven't gotten scp working yet

16:23 but it's a start

16:24 especially nice for having hudson builds initiate a deploy

16:48 robonobo: hi, can anyone tell me what the function is to get a sequence without the n first elements?

16:49 Raynes: &(drop 2 [1 2 3 4])

16:49 sexpbot: ⟹ (3 4)

16:50 ossareh: &(drop-last [1 2 3])

16:50 sexpbot: ⟹ (1 2)

16:50 robonobo: thanks

16:51 Raynes: &(doc drop-last)

16:51 sexpbot: ⟹ "([s] [n s]); Return a lazy sequence of all but the last n (default 1) items in coll"

16:51 amalloy: ossareh: drop-last is wildly inefficient

16:51 Raynes: &(butlast [1 2 3])

16:51 sexpbot: ⟹ (1 2)

16:51 ossareh: I felt bad for 1 and 2.

16:51 amalloy: i don't see how it can actually be lazy

16:51 oh, i take it back. that's not so bad

16:51 it only needs to buffer N elements, not read the whole seq

16:52 &(take 10 (drop-last 10 (range)))

16:52 sexpbot: ⟹ (0 1 2 3 4 5 6 7 8 9)

16:52 ossareh: &(take 3 (map #(prn %) (range)))

16:52 sexpbot: ⟹ (012345678910111213141516171819202122232425262728293031nil nil nil)

16:52 ossareh: the whole lazy thing confuses me a fair bit tbh

16:53 Raynes: It's actually really simple.

16:53 I hardly even dedicate a section to it in my book.

16:53 ossareh: I get the theory - but in that example I should only see prn of 3 items no?

16:53 Raynes: It's a simple thing that is usually explained horribly.

16:54 ossareh: clearly some pre-caching is taking place

16:54 amalloy: ossareh: chunking

16:54 Raynes: Some lazy sequences are chunked.

16:54 ossareh: has there been a thread in the news group on chunking?

16:54 amalloy: it's a performance "optimization" that "rarely affects semantics". i don't buy it myself

16:55 Raynes: amalloy: And it sounds disgusting to book.

16:55 amalloy: ?

16:55 Raynes: "That sequence is chunking. Get out of the way before some of it gets on you."

16:55 raek: side-effects (except for reading) in lazy sequences does not make much sense for me

16:55 ossareh: heh

16:55 S11001001: technomancy: how about https repos?

16:56 Raynes: And if you have a stackoverflow in a function working with a chunked sequence, is that function blowing chunks?

16:56 ossareh: raek: fair point - tis an efficient way to demonstrate that lazy isn't always as clear as it sounds like it will.

16:56 Raynes: </end cleverness>

16:56 ossareh: s/\.$/ be./

16:56 sexpbot: <ossareh> raek: fair point - tis an efficient way to demonstrate that lazy isn't always as clear as it sounds like it will be.

16:58 technomancy: S11001001: haven't tried it, but it should work.

16:58 raek: since a sequence is a value, it shouldn't matter whether it's a chunked lazy seq or not

16:58 side-effect for each thing in a collection => doseq

17:01 dnolen: amalloy: I haven't really seen it affect semantics, and it's not hard to construct real one-at-a-time lazy-seqs. I've only needed that to get TCO-like behavior, less common desire I should think.

17:02 it's also discourages people from leaning on loop/recur too much, which was common the early days.

17:02 ossareh: &(type (range))

17:02 sexpbot: ⟹ clojure.lang.LazySeq

17:03 dnolen: &(take 2 (map #(prn %) (lazy-seq (cons 1 (lazy-seq (cons 2 (lazy-seq (cons 3 nil))))))))

17:03 sexpbot: ⟹ (12nil nil)

17:04 ossareh: heh

17:05 amalloy: dnolen: it's never been a problem for me either, but there ought to be an easier way to turn it off

17:06 dnolen: amalloy: have you needed to turn it off?

17:06 ossareh: are there any 'tells' around whether your getting a chunked seq or not? (other than the side effecting code).

17:06 dnolen: ossareh: I expect sequences to be chunked unless I explicitly wrote code for one-at-a-time behavior

17:07 amalloy: dnolen: no, i haven't

17:08 ossareh: dnolen: and a chunk will always be the first 32 elements regardless of their size?

17:08 dnolen: amalloy: I'm sure that's why rhickey hasn't included it, nobody would actually use it and for small the % of folks that do need it, they know what to do and it's quite simple.

17:09 ossareh: 32 elements*. "the first" is poor wording.

17:10 dnolen: ossareh: yes I think so, tho I'd consider the exact behavior of chunked seqs an implementation detail.

17:12 ossareh: dnolen: true that. Good to know about the fact things are chunked though, a mate put me onto it a few days ago and I didn't think about it until just now. I could see this tripping you up accidentally - "I have a sequence of data where every element is pretty large", let me make it lazy - and you actually incur the cost of 32 of them being realized.

17:13 I'm sure I'll never find myself in this situation, mind you :)

17:13 dnolen: ossareh: yes, most complaints come from people doing Project Euler.

17:13 ossareh: ah, so I may stumble across this then if I ever get back to it.

17:14 dnolen: definitely one of the many cases where Clojure favors production oriented practicality over textbook purity

17:14 ossareh: *nod*

17:17 david`: if I am making a Justin Beiber fan site with blog and forums, should I use conjure

17:17 or is there something better

17:17 robonobo: david`: definitly clojure

17:18 bieber uses it himself

17:18 david`: o rly

17:18 is that cuz he gets DDOSed and needs something fast/reliable

17:18 scottj: david`: conjure is like rails. I would use something prebuilt with blog/forums functionality written in whatever language and call it a day :)

17:18 david`: but I want to learn clojure

17:19 while I make my justin bieber site

17:19 * ossareh was just hit with a sudden urge to die.

17:19 david`: I couldn't get conjure to run on clojure 1.2 last time I tried

17:19 let me try again

17:21 robonobo: ossareh: i think he's trolling

17:22 david`: :(

17:22 robonobo: i would think the intersection of people who want to learn or even know about clojure and beiberfans is quite small

17:22 ossareh: probably - but such is my disdain for that floppy haired bastard.

17:23 320m views on you tube of his latest crap.

17:24 tonyl: david`: I think now there are more options to help with web development in clojure then conjure, but I haven't use any

17:25 robonobo: &(str (reduce str (repeat 3 "baby, ")) " oh!")

17:25 sexpbot: ⟹ "baby, baby, baby, oh!"

17:25 scottj: compojure/hiccup, ring/enlive, */slice are some options, and mixtures of them

17:25 I think there was a graphic of all the clojure web libraries/layers

17:26 tonyl: here is a link that might help http://stackoverflow.com/questions/3325033/comparison-of-clojure-web-frameworks#3325078

17:27 brehaut: tonyl: the comment about clojureql is clearly wrong now :)

17:29 tonyl: yeah, I should add that comment. I am looking for a real project to work with the new clojureql

17:30 brehaut: tonyl: ive just started porting my site over from clutch/couchdb to mysql/clojureql; its been good so far and lau is fixing most of my days issues by the time i start the next day :)

17:31 tonyl: brehaut: haha that lau. Interesting, I need to get a new server for my personal site pretty soon. I'll try it then :) it looks like a nice piece of code and api

17:32 mids: brehaut: NoNoSQL?

17:32 brehaut: tonyl: yeah. the api is especially nice. just watch out for column name qualification corner cases ATM

17:32 tonyl: brehaut: thanks

17:33 brehaut: mids: heres my metric for leaving couch: it was going to take more effort to get couch to do what i wanted (both in terms of learning and doing) than to port the whole thing to mysql and just do it there

17:37 david`: thanks scottj and tonyl

17:56 ossareh: brehaut: not having used couch - I've found the ability to represent and use my data as json (aka clojure data structures) so powerful.

17:56 brehaut: I use riak, fwiw.

17:56 brehaut: ossareh: yeah that part of couch is great

17:56 ossareh: though I agree with the learning curve - particularly wrt maintaining your own indexes

17:57 brehaut: ossareh: in couch i ran into problems around reuse of view code and expressiveness of (in particular) reduce functions

17:57 ossareh: no doubt a more learned couch user wouldnt suffer these

17:57 ossareh: does couch permit you to run javascript on the server?

17:57 brehaut: but im learning clojure, and enlive at the same time

17:57 ossareh: yes

17:58 ossareh: as long as it is referentially transparent

17:58 ossareh: brehaut: does that mean it shouldn't change the data when it runs?

17:59 brehaut: ossareh: it means that all the calculations are based on the arguments (eg the documents content)

17:59 ossareh: brehaut: huh. interesting.

17:59 brehaut: ossareh: oh, and that you dont mutate the world, but couch ensures that so its not a problem

18:23 dnolen: hmm anybody messed w/ SLaTeX to generate nice Clojure source PDF output ?

19:10 hercynium: Boston Clojure meetup starting now \o/

19:11 headlessClown: aww. i totally would have come had i known

19:11 hercynium: next month then!

19:11 headlessClown: absolutely

19:19 Berengal: Woo, 3 hours of sharp flow, and I've reimplemented my first-year project from my uni days. Anyone care to check for pathologies? --> http://hpaste.org/43014/tictactoe

19:51 amalloy: hey what's a good intro book these days? JoC is the only one i've read but i can't remember which other ones are up-to-date/good

19:51 * Clinteger is wondering too

20:04 amalloy: Clinteger: i just wrote my first not-actually-blog-post on clojure at http://hubpages.com/hub/What-is-Clojure

20:22 brehaut: amalloy_: your code snippets could do with a bit more line-height

20:30 chett: so (merge ["a" "b"] ["1" "2"]) gives ["a" "b" ["1" "2"]], what will give me ["a" "b" "1" "2"]?

20:35 pdk: ,(concat ['a 'b] [1 2])

20:35 clojurebot: (a b 1 2)

20:35 pdk: voila chett

20:35 chett: thanks

20:35 pdk: granted you'll need to turn it back into a vector after doing concat

20:35 ,(vector (concat ['a 'b] [1 2]))

20:35 clojurebot: [(a b 1 2)]

20:35 pdk: ummm

20:36 correction

20:36 ,(vec (concat ['a 'b] [1 2]))

20:36 clojurebot: [a b 1 2]

20:36 pdk: success

20:37 also take note you can try out 1 line bits of code within the chat if you put , in front of them

20:38 chett: ,(println 'test)

20:38 clojurebot: test

20:38 chett: (println test)

20:38 pdk: yeah the bot looks for the ,

20:39 chett: ,;(println 'test)

20:39 clojurebot: EOF while reading

20:40 chett: step two -> generate an error

20:41 pdk: the ; did it in

20:41 ; is a sly one i tells ya

20:42 chett: ,(def test 'test)

20:42 clojurebot: DENIED

20:42 chett: heh

20:42 I could see how that would cause problems

20:55 raek: you don't need the vector -> seq -> vector trip

20:56 ,(into ['a 'b] [1 2])

20:56 clojurebot: [a b 1 2]

20:58 tonyl: &(apply (partial conj ['a 'b]) [3 4 5 6] )

20:58 sexpbot: ⟹ [a b 3 4 5 6]

21:03 chett: ,(doc into)

21:03 clojurebot: "([to from]); Returns a new coll consisting of to-coll with all of the items of from-coll conjoined."

21:03 chett: ,(doc partial)

21:03 clojurebot: "([f arg1] [f arg1 arg2] [f arg1 arg2 arg3] [f arg1 arg2 arg3 & more]); Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args."

21:06 tonyl: or what into basically does ##(reduce conj [:a :b] [1 2 3 4])

21:06 sexpbot: ⟹ [:a :b 1 2 3 4]

21:06 brehaut: tonyl: with an added transient

21:07 tonyl: yeah, that helps in transient contexts

21:07 brehaut: into is one of the functions that needs to be emblazened on the clojuredocs front pages so that everyone knows about it

21:09 tonyl: when I first saw it i had the "everything looks like a nail" syndrome, I am trying to learn to use it where it is needed only now :P

21:09 brehaut: hah yeah :)

21:09 tonyl: it is a nice tool

21:11 pdk: partial is used for currying functions

21:12 brehaut: pdk for a fuzzy definition of currying

21:13 pdk: i aim to please

21:13 tl;dr currying = turning multi-argument functions into series of one-argument functions

21:13 brehaut: hah

21:14 which are then trivially partially applicable

21:26 cheezey: i'd like to override the assoc function to check for a specific key, how can i do this?

21:27 brehaut: cheezey: what do you mean by that?

21:27 cheezey: are you wanting to override it just for your own code, or for all code in your program?

21:28 cheezey: just my code

21:28 like it would do the same thing as assoc but i can do additional things by checking the keys from the arguments

21:29 brehaut: cheezey: whats stopping you just writing your own function and using that in place of assoc?

21:29 cheezey: brehaut: nothing, im wondering how to do that =P

21:29 like the whole multi arguments thing

21:30 brehaut: ,(source assoc)

21:30 clojurebot: java.lang.Exception: Unable to resolve symbol: source in this context

21:30 brehaut: cheezey: do you have a clojure repl open?

21:30 cheezey: oh i can look at source

21:30 :D

21:30 thnx

21:30 brehaut: uhuh

21:31 theres two things that assoc does; first it has two arities

21:31 the second arity has a varargs

21:32 the second arity loops over the varargs pairs calling its non-varargs arity for each pair

21:33 cheezey: http://clojure.org/special_forms for more details on the fn definition forms

21:39 cheezey: thnx brehaut

21:39 brehaut: cheezey: no problem

22:00 amalloy: $source assoc

22:00 sexpbot: assoc is http://is.gd/akhg2O

22:00 amalloy: ^ easiest way to get source

22:01 brehaut: (inc amalloy)

22:01 sexpbot: ⟹ 3

22:09 Derander: is there a nice way to have a swank server for clojure repls just hanging around for testing stuff?

22:09 right now i have a "test" project

22:11 amalloy: Derander: cake has a global project, which is used if you run a cake command outside of a real project - you can start swank from there. lein has something similar but i'm not familiar with it

22:13 brehaut: thanks for the suggestion about code snippets. i'll get on it

22:14 brehaut: amalloy: no problem. the article was good

22:15 amalloy: brehaut: hm. apparently i don't have access to detailed formatting options

22:15 brehaut: amalloy: dont you work there?

22:16 amalloy: brehaut: i know, right?

22:16 brehaut: amalloy: classic :)

22:16 amalloy: i'll put the code snippets in bold. that's almost the same thing.....

22:16 brehaut: :)

22:17 amalloy: at least i know who to talk to, to get that changed

22:22 brehaut: amalloy: do you use clojure at your job?

22:23 amalloy: brehaut: not for anything i get paid for. sometimes when nobody's looking i do open-source clojure stuff

22:23 brehaut: amalloy: nothing like a bit of skunk works to may like easier

22:23 amalloy: *squint* okay, i couldn't puzzle that one out. skunk works?

22:24 brehaut: sneaky projects

22:24 give or take

22:24 i think its some sort of old military jargon

22:26 Derander: amalloy: that's neato

22:26 amalloy: Derander: the cake global project?

22:26 Derander: yes :-)

22:28 amalloy: yeah, it's handy. check out ~/.cake/project.clj and ~/.cake/templates/default too for some sweet cake features

22:28 Derander: I will do this

22:28 Thanks for the heads up

22:33 technomancy: Derander: swank-clojure comes with a shell wrapper that sets up a project-independent swank server

22:34 lein install swank-clojure 1.3.0-SNAPSHOT; ~/.lein/swank-clojure

22:34 Derander: No project.clj found in this directory.

22:34 technomancy: ^

22:35 ☁ ~ lein install swank-clojure 1.3.0-SNAPSHOT

22:43 cheezey: can i get :import to not print out stuff?

22:44 amalloy: cheezey: it doesn't print anything. it just returns the last class it imported; when you type it by hand at a repl, that results in a class being displayed

22:45 cheezey: oh ok

22:45 amalloy: &(import javax.swing.JFrame)

22:45 sexpbot: ⟹ javax.swing.JFrame

22:45 amalloy: &(do (import javax.swing.JFrame))

22:45 sexpbot: ⟹ javax.swing.JFrame

22:45 amalloy: er

22:45 &(do (import javax.swing.JFrame) nil)

22:45 sexpbot: ⟹ nil

22:45 amalloy: if you really don't want that

22:46 technomancy: Derander: you need a newer lein probably

22:47 Derander: technomancy: alright. I'll work on it

22:47 thanks

23:20 davek: b

23:56 amalloy: seancorfield, talios: http://hubpages.com/hub/What-is-Clojure at your request

23:57 seancorfield: i requested that? :)

23:57 amalloy: you're not exactly the target audience for the first entry, but it's my new bloggish thing

23:57 seancorfield: ah, yes, i did request that you blog!! good man!!

23:59 amalloy: i'd love topic suggestions, in the comment area, or via the Contact amalloy link, or irc or whatever

Logging service provided by n01se.net