#clojure log - Jan 31 2012

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

0:03 jkdufair: anyone have experience with cdt?

0:06 devn: jeremyheiler: yeah, it seems interesting maybe -- idk

0:07 jeremyheiler: yeah, im hesitent about things like this. I mean, it took me a while to release Domain Driven Development really only translated into "don't be stupid, and think about design"

0:07 realize*

0:24 devn: jazzy

0:30 jbiesnecker: jeremyheiler: These things are like (most) religions, which all tend to boil down to more or less the Golden Rule. Generally they're different ways to slow down, reason about your problem before you start working on it, etc.

0:31 devn: jbiesnecker: they offer dimension, an angle for consideration

0:31 jbiesnecker: it's a nice review of possible paths one might consider taking

0:32 jbiesnecker: devn: not saying they're useless by any means, but rather that they tend to revolve around the same handful of ideas.

0:33 devn: and sometimes it's the revolving that makes the idea make sense.

0:34 cmajor7: (starting out with clojure): In imperative world, there are (XA) transactions, AOP, messaging(JMS/AMQP), Security, TCP/IP, etc.. What is the general approach to these things in the clojureland? to just reuse what is there in Java world? [seems that problems can be solved simpler with clojure, but a lot of "enterprise" concerns are still there]. appreciate your thoughts.

0:36 devn: jbiesnecker: that's a really fantastic way of saying that.

0:37 jbiesnecker: i agree with you.

0:37 jbiesnecker: for now ;)

0:37 jbiesnecker: devn: ;)

0:38 metajack1: cmajor7: In some cases there are really nice Clojure abstractions for those (STM, Avout, Lamina, etc) and in some cases you just use the JVM libraries already available. A lot of times you start with the latter and end up creating the former.

0:41 devn: cmajor7: im playing that chord sequence on my guitar right now. is this a song i should recognize?

0:43 muhoo: i'm kind of avoiding overtone because i have to focus on stuff that's going to make money

0:43 cmajor7: metajack1: thank you. I am just trying to estimate a "what would it take" scenario by looking at the last couple apps I wrote in "Scala / Spring Integration" that talk to sockets and do AOP and XA. I am thinking I'd love to be able to achieve the same (but of course more elegantly and simpler :) ) in clojure. What I am stumbling upon are regular things.. get XA resource.. create an aspect, hook into a monstrous websphere mq, etc.. would i

0:43 devn: start touring muhoo :)

0:44 muhoo: devn: been there, done that

0:44 have the poverty to show for it.

0:44 cmajor7: muhoo: may songs start with cmajor7. Actually _any_ song that starts with the major chord can start with cmajor7 :)

0:45 muhoo: i prefer the bill evans chord, 3 7 9 with the 1 in the bass.

0:45 devn: so specific

0:45 i cant pick one

0:45 technomancy: nuclearsandwich: fixed in lein 1.7, but I guess I better fix it in swank too

0:46 devn: it's like killing a child or something -- chords require context to be themselves

0:46 metajack: I think messaging is going to be the same. As for sockets, the abstractions in Lamina and Aleph are really nice. I have no experience with AOP in clojure or with distributed transactions, but for the latter you have easy access to ZooKeeper or Avout, or if it's all in process, you can just use Clojure's STM.

0:46 muhoo: what is AOP?

0:46 aphyr: muhoo: macros.

0:46 metajack: muhoo: Aspect oriented programming I assume

0:46 amalloy: invisible macros

0:46 muhoo: aop is macros?!

0:46 aphyr: weak macros, haha

0:46 cmajor7: muhoo: http://en.wikipedia.org/wiki/Aspect-oriented_programming

0:47 devn: i honestly am dumbfounded as to what is happening in here

0:47 technomancy: aaelony: I'm heading off, but if you could try the 1.x branch of leiningen from git and open an issue if it breaks that would be great

0:47 muhoo: my god, there's so much buzzword bullshit involved in just working around weaknesses in OOP

0:48 aphyr: Basically a way to write functionality in different discrete ways and plug them together in functions

0:48 muhoo: AOP, design patterns, feh.

0:48 cmajor7: think about is a weaving the code into any spot of you program later.. ( e.g. compile time, byte code weaving, run time )

0:48 aaelony: ok, do you have a link so I'm sure to try the right one?

0:48 technomancy: git://github.com/technomancy/leiningen.git

0:49 muhoo: the statement above about all these things just being flaiings at trying to acheive some elusive platonic ideal is quite good, i think.

0:49 aaelony: cool, thanks

0:50 muhoo: aphyr: thanks

0:50 cmajor7: muhoo: aop is not really a pattern, but what they call a cross cutting concern tool without polluting the codebase. think about security, logging, exception handling, tx management, etc.. that could be "weaved" later on into your code base

0:51 muhoo: similar to writing algorithms to handle seqs, so you can later plug lots of different types of data into it? :-)

0:51 aphyr: Maybe. You even seen ruby method alias chaining?

0:51 aaelony: technomancy: from the leiningen directory I do bin/lein, right? that gives me an exception.

0:51 aphyr: do_something_before_foo?

0:52 muhoo: no i haven't gotten that deep into ruby.

0:52 carllerche: Are people still having issues w/ transient maps on the latest clojure 1.4 alpha?

0:52 aphyr: muhoo: that's AOP, in a sense. Wrapping up methods in other methods that provide, say, connection safety, thread safety, logging, debugging, etc.

0:52 muhoo: aphyr: like ring middleware?

0:53 aphyr: muhoo: Sure, that'd be a nice example/

0:53 devn: alias method chains are the same as ring middleware?

0:53 carllerche: amalloy: I noticed you submitted a transient map issue

0:53 technomancy: aaelony: if you get an error on the 1.x branch after following the "building" instructions in the readme, please open an issue on github

0:53 aaelony: ok

0:53 metajack: ah, i've used this in Emacs without knowing that much about it. There it's called advice.

0:54 aphyr: devn: in the sense that they're composing orthogonal functionality into single functions, yes.

0:54 amalloy: carllerche: quite a long time ago, and based on an issue someone posted about on the mailing list. i don't follow the alphas so i dunno

0:55 nuclearsandwich: technomancy: awesome, thanks. Is 1.7 ready for testers or should I be patient.

0:55 carllerche: I will submit an issue… for now is there a way to work around transient maps? It seems that converting a java HashMap into a persistent map uses transient maps, so I would guess it would still be buggy

0:55 technomancy: nuclearsandwich: should be good to go apart from documentation and a couple irreproducible bug reports; hope to release in a few days

0:55 cmajor7: metajack: right. an "aspect" could have one or more "advice"s that could be "applied" to a certain "pointcut" (that can be regex specified) in your code

0:56 metajack: cmajor7: In that case, I think you'll find Clojure quite a bit more powerful for this :)

0:57 amalloy: well, clojure only has macros, not secret-invisible macros that get applied all through your codebase without any visible signs

0:57 technomancy: "INVISIBLE MACRO" might make a good lolcat though

0:57 metajack: amalloy: You could replace vars at runtime with new versions though right?

0:57 muhoo: or a band name.

0:57 amalloy: technomancy: feel free to steal that

0:57 cmajor7: metajack: right.. while I have a very good imperative understanding of AOP, since I am only starting out with Clojure, I have a hard time placing it in the clojureland

0:57 amalloy: metajack: but how will you reassign let? i'm sure AOP lets you give advice around "assigning variables"

0:58 (not that i actually want this in clojure)

0:58 cmajor7: amalloy: thanks. are you saying that if I need to add an "auth" capability into functions that follow a certain pattern, I can do it with macros?

0:58 metajack: amalloy: Does AspectJ do this? From the wikipedia page it mostly looked like augmenting function calls.

0:58 amalloy: metajack: whatever. you can't do that either, across all functions

0:59 "every time i call a function whose name starts with x, please do ____"

0:59 aphyr: Sure you can

0:59 Wrap your entire program in a macro that recursively rewrites forms

0:59 amalloy: cmajor7: you could, but usually it's more flexible to just use higher-order functions

0:59 aphyr: Take every fn that starts with x and rewrite it to do something else

0:59 amalloy: aphyr: yes, yes, i know macros can do anything

0:59 aphyr: Why you'd want to is beyond me though, haha :)

1:00 metajack: cmajor7: I'd go read a Ring or Compojure tutorial to get an idea of how passing around wrapper functions works. It's probably similar enough to give you some good ideas.

1:01 cmajor7: amalloy: trying to wrap me head around it :) are you talking passing "some" function f(x) into another f(y) just in case.. to later enrich f(x) with "auth" capability?

1:01 amalloy: eg, (defn wrap-security [f] (fn [& args] (when *secure-connection* (apply f args)))) - you take a function in, and return a new function that performs the original action only if the connection is secure

1:02 aphyr: cmajor7: https://github.com/aphyr/ustate/blob/master/reimann/reimann.config

1:02 cmajor7: metajack: thanks.. once I am finished with the Mark Volkmann's tutorial :)

1:02 metajack: cmajor7: If you know python, it's pretty similar to python decorators. Django uses this for transactions for example.

1:02 aphyr: Each of those is a function that encapsulates the functions below it to contextualize them.

1:02 muhoo: i was going to ask about decorators

1:03 i did see a similarity between middleware and decorators, but hadn't studied them enough to know for sure.

1:05 cmajor7: aphyr, amalloy: but aren't these examples _assume_ that there is "security" ( e.g. auth ) in the first place? I may be missing something.. though [can't inhale clojure that fast just yet]

1:06 aphyr: cmajor7 really AOP all comes down to writing bits of code to attack separate problems in composable ways.

1:06 amalloy: yes, my example assumes there's some way to find out if auth has happened; i'm not going to write a whole auth layer in irc. but the point is you can wrap render-webpage with the auth functionality, even though render-webpage knows nothing about auth

1:07 cmajor7: amalloy, aphyr, metajack: thank you. I got the "wrapper function" approach. makes sense.

1:09 aphyr: cmajor7: you can invert that as well: functions make calls to globally scoped hooks that allow them to do interesting things.

1:10 For instance, (defn send [message] (with-network-connection [conn] (send-message conn n)))

1:11 with-network-connection doesn't know what connections are used for, but it creates, locks, and provides them to callers as a service.

1:11 and could itself be extended with logging, debugging, etc.

1:13 cmajor7: aphyr: yep, I see.. I guess the whole AOP aspect is there mostly because it is hard to "change" the behavior of something that is already there without inheritance.. where in Clojure ( any functional language ), we can just pass a decorated function...

1:15 moving on from AOP (marking it "the clojure way is understood")… how easily do you think I can use clojure with something like Spring Integration ( channel | pipe | filter, etc.. )? ( I understand that you would have reservation from using it with anything like Spring Xyz, but I do believe Spring Integration solves "integration" in a very simple and powerful way )

1:16 aphyr: Integration is just queue-backed message passing?

1:18 I'd reach for agents, nonblockingqueue + threadpool, regular old fn composition, or something like Lamina.

1:20 cmajor7: https://github.com/ztellman/lamina may be interesting

1:20 cmajor7: aphyr: not just queue.. it implements EIP patterns http://martinfowler.com/books.html#eip where you have things like message stores, protocol adapters ( jms, amqp, jdbc, webservices, etc.. ), aggregators, splitters, etc..

1:21 aphyr: sure. thanks, I'll take a look

1:21 aphyr: cmajor7: here's a fn-composition implementation of aggregators, splitters, filters, pipes, stateful things, etc. https://github.com/aphyr/ustate/blob/master/reimann/src/reimann/streams.clj

1:21 y3di: hey guys, i assume clojurescript doesn't mesh well with alot of the newer js frameworks (backbone.js)?

1:25 cmajor7: aphyr: looks cool. if I need to connect these channels / pipes to something such a MQ (websphere, rabbit, etc..) where do I start?

1:26 aphyr: consume-all -> mq client?

1:26 Plus a few lines for connection safety and logging I gues

1:27 Or you could use Spring Integration, if that's what you really want.

1:29 cmajor7: but if I do use Spring Integration / Camel, is there a way not to get into OOP trap by using it in Clojure?

1:29 aphyr: Dunno dude, I try to stay far away from anything that says "enterprise" or "pattern".

1:30 If no wrappers exist you could write one, or you could create objects and do things java-interop style.

1:31 My limited experience with interop (via antlr) has been pretty painless--I just try to get out of java and into clojure as fast as possible.

1:32 jbiesnecker: Is there an LRU object cache library that supports expiration? I've been googling and not coming up with anything...

1:34 cmajor7: aphyr: while I agree with you that enterprise, pattern, process, etc.. are really vague and useless concepts, I actually see strengths in both worlds ( e.g. how mature Camel / Spring Integration is and at the same time how elegant, simple and beautiful Clojure is ). Since I do not yet know Clojure well (still going through tutorials), I do not feel how simple would it be to use both...

1:34 aphyr: cmajor7: if it helps, writing java in clojure seems easier than writing java in java.

1:38 cmajor7: aphyr: I would prefer "clojure in clojure" and "java in java" :), but I get what you're saying

1:39 aphyr: thanks for your help.. bouncing off..

1:58 muhoo: where is the show function now that there's no more contrib?

1:58 where's repl-utils, in general now?

2:00 tjgillies: im trying to import classes into clojure from a jar but im getting an error

2:01 user=> (import '(jm.util Play))

2:01 java.lang.ClassNotFoundException: jm.util.Play (NO_SOURCE_FILE:10)

2:02 jar is in my classpath

2:03 and jar tf jMusic1.6.3.jar lists class

2:06 oh

2:06 jar wasn't in my classpath, fail

2:06 im new to JVM

2:09 muhoo: that's weird. i have no clojure.contrib.repl-utils. why?

2:09 yawNO: hi

2:09 muhoo: &(require 'clojure.contrib.repl-utils)

2:09 lazybot: java.io.FileNotFoundException: Could not locate clojure/contrib/repl_utils__init.class or clojure/contrib/repl_utils.clj on classpath:

2:09 muhoo: huh

2:09 &(require clojure.contrib.repl-utils)

2:09 lazybot: java.lang.ClassNotFoundException: clojure.contrib.repl-utils

2:10 muhoo: wtf?

2:16 devn: &*clojure-version*

2:16 lazybot: ⇒ {:major 1, :minor 3, :incremental 0, :qualifier nil}

2:16 devn: &(use 'clojure.repl)

2:16 lazybot: ⇒ nil

2:17 devn: &(doc filter)

2:17 lazybot: ⇒ ------------------------- clojure.core/filter ([pred coll]) Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects. nil

2:26 jbiesnecker: I have a java interop question (and I don't really know Java). I'm trying to use Google's ConcurrentLinkedHashMap as an LRU cache ( http://code.google.com/p/concurrentlinkedhashmap/wiki/ExampleUsage )

2:27 and I can't figure out how to create the object

2:27 It uses a builder object, but I can't seem to import / reference that object

2:27 And I don't really know enough about Java to know what what I'm looking for is even called

2:28 raek: jbiesnecker: do you have a link to the javadoc for those classes?

2:29 the examples don't say which packages the classes are in

2:29 jbiesnecker: raek: http://concurrentlinkedhashmap.googlecode.com/svn/wiki/release-1.2-LRU/index.html

2:29 raek: ok

2:29 jbiesnecker: raek: (import '(com.googlecode.concurrentlinkedhashmap ConcurrentLinkedHashMap)) works just fine in the REPL

2:30 raek: but I can't get anywhere from there

2:30 raek: (ns ...your-ns... (:import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap))

2:31 (let [cache (doto (ConcurrentLinkedHashMap$Builder.) (.maximumWeightedCapacity 1000) (.build))] ...)

2:31 java has . in the name of nested classes

2:31 but it's really a $ in the name on the JVM level

2:31 which is what clojure sees

2:32 jbiesnecker: When I do that (in the REPL, does it matter?) I get "CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: ConcurrentLinkedHashMap$Builder, compiling:(NO_SOURCE_PATH:43)"

2:32 raek: sorry, my example does not work for two reasons

2:33 1. the nested class is its own class, so it needs to be imported too

2:33 (ns ...your-ns... (:import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap$Builder))

2:33 2. you want the result of .build, not the the builder to be bound to 'cache'

2:34 (let [cache (-> (ConcurrentLinkedHashMap$Builder.) (.maximumWeightedCapacity 1000) (.build))] ...)

2:34 jbiesnecker: you should be able to access ConcurrentLinkedHashMap$Builder in the repl if you have run (import 'com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap$Builder)

2:35 jbiesnecker: raek: Huzzah! It works. Thank you so much!

2:35 raek: I think it was importing the Builder class, or rather me not importing it) that was getting me.

2:35 raek: yeah, afaik this is not explained in the official docs :(

2:36 the part about the $, that is

2:36 jbiesnecker: No, I hadn't seen it.

2:36 Thanks again, that was a nice end to far too much frustration :)

3:16 echo-area: clgv: ping

3:17 clgv: echo-area: pong

3:17 echo-area: clgv: http://pastebin.com/qEJrWemb <-- As for yesterday's question, I wrote a test program

3:18 I think both the forms (board-map #(dosync (ref %)) board) and (board-map ref board) are the same effect

3:19 clgv: echo-area: oh, I dont think you can conclude that from that code snippet.

3:19 echo-area: Why?

3:19 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to clojure.lang.IPersistentStack>

3:21 clgv: well you have very likely only one thread accesing the data at a time since the other sleeps meanwhile.

3:22 I dont think the question whether (board-map #(dosync (ref %)) board) and (board-map ref board) in absence of other concurrent operations does lead to much insight. The interesting question in my opinion is: "what do you use dosync for?"

3:23 +"do the same in absence..."

3:23 that second question is pretty well covered in JoC, I think

3:24 echo-area: IMHO the point here is that both of the two may print inconsistent values for `board'. The right way to go seems to be (dosync (board-map ref board)), as in the link.

3:24 clgv: yep that would be the right one

3:25 wasnt it deref instead of ref?

3:25 echo-area: Ah right, it was a typo ;-)

3:25 Whoa I typed wrong for all the forms

3:25 :(

3:26 clgv: Anyway, thanks for the help

3:50 Blkt: good morning everyone

3:51 llasram: Ah, time zones. Good morning, Blkt :-)

3:52 clgv: good morning

4:06 clj_newb: is there a short hand for (with-meta 'Matrix {:rows 20, :cols 12}) ?

4:06 G0SUB: clj_newb, ^{:rows 20 :cols 12} 'Matrix?

4:07 clj_newb: G0SUB: jus the syntax I was looking for; thanks

4:07 G0SUB: clj_newb, mind you, the quote will mess up the metadata attachment. the metadata will get attached to the (quote Matrix) form instead of the symbol Matrix.

4:08 clj_newb: crap

4:08 how do I fix this?

4:08 llasram: What's the bigger picture of what you're trying to do?

4:08 G0SUB: clj_newb, depends on what you want.

4:08 clj_newb: i'm using functional zippers for my wysiwyg editor

4:08 now, I need to attach meta data to nodes, things that aren't sub nodes; but are important

4:09 like for example, the dimensions of a matrix

4:09 i.e. '(Matrix 1 2 3 4) is not enough; since I don't know if it's 1x4, 2x2, or 4x1

4:09 I need some meta data hanging around -- stuff that are not entries of the matrix, yet are important, i.e. cols/rows

4:09 llasram: Hmm. That sounds an awful lot like data, not metadata

4:10 clj_newb: the reason I don't want to store it as '(Matrix rows cols ~@data) .... is that it then forces a change a setup in my data structures

4:10 clgv: clj_newb: most likely you should make that explicit within your deftype/defrecord

4:10 clj_newb: llasram: agreed; I didn't think this out before hand

4:10 this was more of a "build a prototype; hate self later" approach

4:12 llasram: Less hate, more refactoring!

4:12 clj_newb: genrally, I find that if I'm not kicking myself; refactoring is premature optimiation

4:14 clgv: clj_newb: that sounds pretty wrong

4:21 clj_newb: this is terrible; I think i'm goign to have to define a proper protocol/interfaces for zipper nodes now

4:21 and interact with them in an intelligent manner

4:21 instead of just having everything be a bunch of lists

4:24 G0SUB: clj_newb, :-)

4:27 Fossi: is there a chance to get http://dev.clojure.org/jira/browse/CLJ-801 backported to 1.2?

4:28 "Protocols Should Handle Hash Collision"

4:28 it makes our appengine webapps crash spontaneously

4:39 phil___: because of what clj_newb said, what is the community consensus of maps vs defrecords/types?

4:39 _phil: on*

4:41 i.e. from what i understand, dont try to structure pure data too much (Person, Employee...) but when it comes to architecture then defrecords/types etc are encouraged (i.e. Window, Widget, FileReader)

4:41 correct?

4:43 :/

4:44 llasram: _phil: That's not quite my understanding of the norms / intent behind the structures

4:45 _phil: llasram: could you elaborate?

4:46 llasram: Sure :-) Was trying to track down some documentation to back up my statements, but I'll just wing it

4:46 _phil: :)

4:46 llasram: I think deftype is usually used for things which are purely software abstractions. So some "architecture" stuff, and things like data structures, etc

4:47 But defrecords implement the map interfaces

4:48 _phil: llasram: and when do we use maps? :)

4:48 llasram: I haven't used them myself much, but they let you do type-based polymorphic dispatch, without sacrificing (much) of the flexibility of using maps for domain models

4:49 _phil: llasram: yes, what i do right now is i use maps but "abstract" away the API behind functions so that i can easily convert to defrecords if i should need polymorphism

4:50 but im not sure if thats the right approach

4:50 llasram: That is my understanding of the best practices as well

4:50 _phil: so youd say defrecords for "data" and deftypes for "architecture"?

4:50 llasram: That matches my understanding of the intent as well

4:51 _phil: or rather, defrecords for data *should the need arise*

4:51 llasram: Right

4:51 _phil: allrights, this clarifies things, thanks!

4:51 *allright :)

4:52 llasram: Of course, we could both be wrong... Muhaha

4:52 I just deployed my first production Clojure project last week

4:53 _phil: yea, i think clojure is more of an "individualist" language than others right now :)

4:53 i.e. "theres no right way to do it"

5:08 clgv: _phil: there is also this flowchart http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/

5:21 _phil: clgv: thx!

5:24 Raynes: ROSEBUD!

5:25 samaaron: Raynes: have you been watching Columbo re-runs again?

7:47 phil: in which interface is (get ...) defined?

7:47 its not clojure.lang.Associative

7:48 when i look at the source, it seems that (get ...) invokes the runtime (clojure.lang.RT)

7:49 so is it even possible to deftype something that overrides get?

7:49 llasram: phil: ILookup is probably what you want

7:50 phil: llasram: hm, where is ILookup defined?

7:50 clojure.lang?

7:50 llasram: yah

7:50 phil: llasram: has it been added recently? cant seem to find it :/

7:52 llasram: Added on Aug 2, 2009 according to git

7:53 phil: llasram: sorry for the noob question, but can you point me to the exact location in the source? or is it not in jvm/clojure/lang?

7:54 llasram: That's where it should be: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ILookup.java

7:54 phil: oh god what kind of clojure do i have :/

7:55 llasram: An incomplete one, apparently? That is v odd

7:55 Where did you get it from, OOC?

7:56 phil: llasram: google code oh god

7:56 :D

7:56 llasram: Oh! Yes, v old

7:56 phil: hahah i feel a bit stupid now :D

7:57 llasram: thanks a lot!

7:57 llasram: Oh, np!

8:46 solussd_: what is the opposite of the interpose function? I want to take a list and separate it into two lists- one of even indices and one of odd. :)

8:47 RickInGA: there is a take-nth function, or something like it, looking up....

8:47 TimMc: solussd_: partition

8:48 Hmm, maybe not quite.

8:48 solussd_: yeah.. thought that at first too

8:49 RickInGA: try (doc take-nth)

8:49 TimMc: solussd_: Right, you need striding here.

8:49 RickInGA: &(take-nth 2 (range 10))

8:49 lazybot: ⇒ (0 2 4 6 8)

8:50 solussd_: that can work

8:50 RickInGA: &(take-nth 2 (rest (range 10))

8:50 lazybot: java.lang.RuntimeException: EOF while reading, starting at line 1

8:50 TimMc: OK, I bet there's a function that can split into n lists.

8:50 RickInGA: &(take-nth 2 (rest (range 10)))

8:50 lazybot: ⇒ (1 3 5 7 9)

8:51 TimMc: $findfn 3 (range 9) [[0 3 6] [1 4 7] [2 5 8]]

8:51 lazybot: []

8:51 TimMc: oh well

8:52 solussd_: &(let [l [1 2 3 4 5 6]] [(take-nth 2 l) (take-nth 2 (rest l))])

8:52 lazybot: ⇒ [(1 3 5) (2 4 6)]

8:52 solussd_: kind of ugly

8:53 RickInGA: can you pass a second param no take nth?

8:53 &(take-nth 2 1 (range 1 10))

8:53 lazybot: clojure.lang.ArityException: Wrong number of args (3) passed to: core$take-nth

8:53 RickInGA: guess not :(

8:53 solussd_: &((juxt (partial take-nth 2) (comp (partial take-nth 2) rest)) [1 2 3 4 5 6])

8:53 llasram: &(map (partial take-nth 3) (take 3 (iterate rest (range 12))))

8:53 lazybot: ⇒ [(1 3 5) (2 4 6)]

8:53 ⇒ ((0 3 6 9) (1 4 7 10) (2 5 8 11))

8:54 solussd_: of course, I want to be able to do it w/ arbitrary lists

8:54 llasram: &((fn [n s] (map (partial take-nth n) (take n (iterate rest s)))) 3 (range 12))

8:54 lazybot: ⇒ ((0 3 6 9) (1 4 7 10) (2 5 8 11))

8:55 RickInGA: wow, that's cool

8:55 solussd_: &((juxt (partial take-nth 2) (comp (partial take-nth 2) rest)) [1 '+ 2 '* 3 '+ 4 '/ 5 '+ 6])

8:55 lazybot: ⇒ [(1 2 3 4 5 6) (+ * + / +)]

8:55 TimMc: &(apply map vector (partition 2 (range 20)))

8:55 lazybot: ⇒ ([0 2 4 6 8 10 12 14 16 18] [1 3 5 7 9 11 13 15 17 19])

8:55 TimMc: BAM

8:55 solussd_: :D

8:55 TimMc: Not lazy, but it works.

8:55 (Don't use it with an infinite input.)

8:56 solussd_: :) thanks

9:24 TimMc: A proper striding function would be nice, though.

9:25 RickInGA: timmc: striding function?

9:28 TimMc: RickInGA: Transpose of partition.

9:29 what solussd_ was asking for

9:35 RickInGA: gotcha

10:56 cmajor7: (def s1 #{:a : b : c :d :e}) ; spaces in 'b' and 'c' to get rid of smiley faces in irc

10:56 (def s2 #{: c :d :f :g :h})

10:56 (/ (count (intersection s1 s2)) (count s1)) ; => 2/5

10:56 what would be a more elegant way to find a percentage one set matches/covers the other?

10:56 thank you

10:57 TimMc: cmajor7: If your IRC client turns :b into a smiley and you can't change that, I think you need a new client. o.O

10:58 cmajor7: And that solution looks fine. Sets are counted in constant time: ##(counted? #{1 2 3})

10:58 lazybot: ⇒ true

11:00 cmajor7: timmc: thank you. you mean they are counted as they get created?

11:01 TimMc: Yep. So are maps and vectors.

11:01 Oh, and lists.

11:01 cmajor7: that's cool :)

11:01 (smiley is intentional)

11:01 jeremyheiler: ahhhhhh unbalacned paren *dies*

11:03 TimMc: clgv: You could also roll your own intersection counter if you didn't want to incur the cost of building the intersection set: ##(let [a (set (range 0 6)) b (set (range 0 10 2))] (reduce #(if (a %2) (inc %) %) 0 b))

11:03 lazybot: ⇒ 3

11:03 TimMc: clgv: But that's likely such a small performance hit that there's no sense worrying about it. :-)

11:05 &(let [a (set (range 0 1e5)) b (set (range 0 1e5 3))] (reduce #(if (a %2) (inc %) %) 0 b))

11:05 lazybot: ⇒ 33334

11:05 clgv: TimMc: did I ask something? not today I think

11:05 TimMc: bah

11:06 cmajor7: ^ those up there were supposed to be addressed to you

11:06 clgv: TimMc: lol you got me as default? :P

11:06 TimMc: yeah

11:06 clgv: guess I am asking too much ;)

11:06 TimMc: I don't understand irssi's tab completion algorithm.

11:07 The problem is that it's usually right, so I've been lulled into complacency.

11:07 clgv: :D

11:07 cmajor7: TimMc: thanks, interesting. performance is not a problem. looking for clarity..

11:07 TimMc: cmajor7: Then go with intersection, it is visually clear what is being computed.

11:07 lnostdal: hi guys, is it possible to extend clojure agents to work nicely with not only the built-in transactions (dosync), but also with "other" transactions like e.g. database ones? .. i mean the agents must not only wait until the clojure transactions are done before running, but must also wait until the db transaction is done running

11:08 TimMc: lnostdal: ORM, eh?

11:08 ~ORM

11:08 clojurebot: Object-Relational Mappers are the Vietnam of computer science.

11:08 TimMc: heh

11:08 lnostdal: i don't know .. it's a mix

11:08 RickInGA: hehe

11:09 llasram: lnostdal: Clojure agents don't interact with the STM system, so... no?

11:09 TimMc: THey sort of do.

11:10 llasram: How so? They're reference types, but that doesn't mean they use STM. `dosync' means nothing to an agent

11:10 TimMc: If you're in a transaction, a 'send(-off) will only act once. But the agent doesn't know that.

11:10 llasram: Ahhh

11:10 Ok

11:10 TimMc: So... sort of.

11:10 lnostdal: You could make the STM transaction fail if the DB transaction fails, right?

11:11 ##(dosync (when false (io!)))

11:11 lazybot: ⇒ nil

11:11 TimMc: ##(dosync (when true (io!)))

11:11 lazybot: java.lang.IllegalStateException: I/O in transaction

11:12 romain_p: Would anybody suggest alternatives to represent graphs in this code ? The name+gensym solution I came up with seems yucky, but I have no other ideas https://gist.github.com/1711377

11:12 RickInGA: http://sqlkorma.com/ claims to be "Tasty SQL for Clojure" and "For the real world" -- I would look there. (I haven't played with it yet myself).

11:12 lnostdal: anyway .. anyone know?

11:12 romain_p: (also, generic readability/idioms critique?)

11:12 lnostdal: TimMc, ah, nice idea with the io! .. thanks

11:12 TimMc: lnostdal: Test what happens with agents first.

11:13 llasram: TimMc: OOC, do you know where the agent/transaction behavior is documented? It's pretty clear from the code for clojure.lang.Agent, but I don't think I'd read that before

11:14 TimMc: Oh, I thought it was controlled by the dosync. Got a link handy?

11:15 lnostdal: Ooh. Actually, just an exception will work fine.

11:15 llasram: TimMc: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Agent.java#L248

11:15 TimMc: lnostdal: By the way, you'd better be damn sure that agent will succeed, otherwise the DB will be out of sync with it.

11:17 llasram: Huh. Greek to me.

11:18 maio: can I somehow ignore SSL certificate errors when fetching URL with slurp?

11:25 TimMc: I doubt there's a var to bind -- you'll probably want to create your own URL input stream with custom settings.

11:25 muhoo: i'm confused in this example, does %2 mean mod 2 or arg 2 to the lambda? (reduce #(if (a %2) (inc %) %)

11:25 % overload

11:25 TimMc: arg

11:25 muhoo: so where's ar %1 ?

11:26 TimMc: muhoo: % is shorthand for %1

11:26 muhoo: or does % mean %1 ?

11:26 ok, thanks

11:26 TimMc: mod is mod

11:27 RickInGA: tinMc, mod is mod, or rem?

11:28 TimMc: &((juxt unchecked-divide-int mod quot rem /) -20 6)

11:28 lazybot: ⇒ [-3 4 -3 -2 -10/3]

11:29 muhoo: damn you are fast with those one-liners

11:29 TimMc: No I;m not.

11:29 * muhoo looks up juxt

11:29 TimMc: grep 'mod.*rem' chatlog/freenode/#clojure.log

11:29 llasram: ~juxt

11:29 clojurebot: juxt is a little hard to grok but it's the best thing ever

11:29 muhoo: %(doc juxt)

11:30 &(doc juxt)

11:30 lazybot: ⇒ ------------------------- clojure.core/juxt ([f] [f g] [f g h] [f g h & fs]) Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applyi... https://refheap.com/paste/517

11:30 TimMc: &((juxt + -) 20 1)

11:30 lazybot: ⇒ [21 19]

11:31 muhoo: brain. melt.

11:32 mintsoup: ~map

11:32 clojurebot: map and the other sequence functions used to be lazy, but with the advent of chunked sequences, may or may not be lazy, consult your local ouija board

11:33 muhoo: hehehe

11:33 &(doc map)

11:33 lazybot: ⇒ ------------------------- clojure.core/map ([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each co... https://refheap.com/paste/518

11:35 muhoo: hmm, juxt does seem a bit to me like map

11:35 mintsoup: &(map #(% 20 1) [+ -])

11:35 lazybot: ⇒ (21 19)

11:35 muhoo: oh!

11:36 TimMc: except juxt is decidedly not lazy

11:37 (which has never been a problem for me, or probably anyone)

11:37 muhoo: so it is reversed. in map you put the args into the lambda, and the functions into the body, and in juxt you put the functions up front and then the args to present to them

11:37 TimMc: muhoo: Not exactly.

11:37 juxt creates a function, and you can do with that function as you wish.

11:38 muhoo: a function that maps args to several functions?

11:39 i mean

11:39 &(map #(% -20 6) [unchecked-divide-int mod quot rem /])

11:39 lazybot: ⇒ (-3 4 -3 -2 -10/3)

11:39 muhoo: ((juxt unchecked-divide-int mod quot rem /) -20 6)

11:39 &((juxt unchecked-divide-int mod quot rem /) -20 6)

11:39 lazybot: ⇒ [-3 4 -3 -2 -10/3]

11:41 muhoo: i find this stuff irresistably fascinating, though i certainly don't quite understand it yet

11:41 TimMc: muhoo: ##(let [ops (juxt + - *)] (take 10 (map ops (range) (range 20 10 -2))))

11:41 lazybot: ⇒ ([20 -20 0] [19 -17 18] [18 -14 32] [17 -11 42] [16 -8 48])

11:42 TimMc: The result of a juxt is just a function that can be passed around. It doesn't have to be used right then and there.

11:42 muhoo: cool, i see the advantage now over map

11:46 as opposed to ##(let [fns [unchecked-divide-int mod quot rem /]] (map #(% -20 6) fns))

11:46 lazybot: ⇒ (-3 4 -3 -2 -10/3)

11:47 mintsoup: i just wanted to see what clojurebot said about map ;p

11:50 muhoo: where do the factoids in clojurebot come from? the docs?

11:50 clgv: muhoo: user definition

11:51 clojurebot: muhoo is a questioner of clojurebot factoids

11:51 clojurebot: Ack. Ack.

11:51 clgv: ~muhoo

11:51 clojurebot: muhoo is a questioner of clojurebot factoids

11:52 ckirkndall: acagle: ping

11:53 muhoo: clojurebot: muhoo is also not a number

11:53 clojurebot: Alles klar

11:53 clgv: ~muhoo

11:53 clojurebot: muhoo is a questioner of clojurebot factoids

11:54 lnostdal: ~paste

11:54 clojurebot: paste is http://gist.github.com/

11:54 muhoo: clojurebot: paste is also http://www.refheap.com

11:54 clgv: lnostdal: lol Raynes should change that I guess ;)

11:54 lnostdal: clgv, refheap is better?

11:54 muhoo: clojurebot: paste is http://www.refheap.com

11:54 clgv: lnostdal: he developed refheap ;)

11:55 muhoo: lnostdal: "better", i dunno. but it's written in clojure and developed by one of the guys here

11:55 i use it.

11:55 clojurebot: Ik begrijp

11:55 lnostdal: ok, cool .. refheap it is then; dogfooding :)

11:56 clojurebot: Ok.

11:56 clgv: ~paste

11:56 clojurebot: paste is http://www.refheap.com

11:56 lnostdal: font looks fuzzy though :P

11:56 maybe it's just linux here

11:56 (xfce)

11:57 muhoo: iirc he's using html5 fonts

11:57 lnostdal: ok, the chrome here should support that i think

11:58 looks waaay better in firefox actually .. weird

11:58 arkh: ckirkendall: ping

11:58 muhoo: i'm on ff7 on debian, looks fine to me.

11:58 seanm: lnostdal: it could depend on what flags chromium was built with

11:59 TimMc: clojurebot will still say "gist" when you ask for "paste" -- it's factoid-forgetting feature is really broken.

11:59 seanm: I had a similar problem a ways back

11:59 can't remember how I fixed it. Super helpful, right?

12:00 TimMc: oh god I said "it's"

12:01 * TimMc seppuku

12:01 muhoo: clojurebot: seppuku is I AM DISHONORED! AIEEEE! *dies*

12:01 clojurebot: Ok.

12:02 muhoo: ~seppku

12:02 clojurebot: No entiendo

12:02 muhoo: ~seppuku

12:02 clojurebot: seppuku is I AM DISHONORED! AIEEEE! *dies*

12:02 muhoo: ok enough fun, back to work for me

12:02 ckirkendall: arkh: what's up

12:04 arkh: ckirkendall: in your fork of Clojurescript One you have "public/javascripts/goog/dojo" included in your config :libs. Is that the same dojo as dojotoolkit.org or is that a name for a google thing?

12:04 * muhoo wondders if sqlkorma can handle composite primarykeys

12:05 muhoo: i like chris granger's stuff, but orm's give me the shakes. and composite primary keys are the waterloo of most orm's.

12:10 ckirkendall: its a goog thing

12:11 arkh: it is goog.dom.query

12:11 arkh: its based on the dojo stuff

12:11 pandeiro: is it still too early to assume document.querySelector/All are everywhere?

12:13 arkh: ckirkendall: ah - thank you

12:15 RickInGA: woo hoo, just the excuse I was looking for... http://euroclojure.com/2012/

12:17 TimMc: RickInGA: To travel to Europe?

12:17 OK, does anyone else think it's a little weird to have an Uncle Sam image on the EuroClojure page?

12:19 jeremyheiler: TimMc: That's funny. I didn't even notice that.

12:19 mintsoup: Will videos from clojure conj 2011 be posted at some point?

12:19 RickInGA: tinmc: yeah, to go to Europe.

12:20 mintsoup: just saw this on twitter http://clojure.com/blog/2012/01/31/first-conj-2011-videos-available.html

12:21 mintsoup: nice.. hopefully sam aaron's will be posted soon.

12:21 RickInGA: cemeric: just read your tweet... mostly lazy office hours? Neat idea!

12:22 (love the podcast btw)

12:23 gfredericks: ~ping

12:23 clojurebot: PONG!

12:50 pcavs: Why can't I seem to call (String/format "%s" "foo") properly?

12:50 ,(String/format "%s" "foo")

12:50 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;>

12:51 raek: pcavs: vararg java methods are a bit special under the hood

12:51 technomancy: pcavs: why not just clojure.core/format?

12:51 raek: they actually take an array as their last argument

12:52 pcavs: technomancy: I would, but I'm using Clojure to test java code, then I translate it into Java ><;

12:52 Was wondering super quick what the behavior of String.format with fewer varargs then format expressions was (but then I started shaving a yak/digging)

12:53 well looks like (source format) has answered my questions, thanks

12:53 TimMc: pcavs: so did raek

12:54 pcavs: true, thanks all.

13:12 perezd: people who are using zeromq in clojure: what is the defacto library to use?

13:29 fliebel: Whoa! Europe Clojure Conference!

13:33 amro: is there any way to tell which cljs is causing an error in clojurescript?

13:33 I'm getting Exception in thread "main" clojure.lang.ArityException: Wrong number of args (5) passed to: compiler$eval889$fn--890$pfn

13:35 I actually tracked that down, but it would still be nice to know for future reference

13:35 muhoo: oh fantastic, the (source ) command. no IDE necessary. truly happy.

14:07 jkdufair: so has anyone seen clojurecraft? http://www.github.com/sjl/clojurecraft

14:07 sjl: jkdufair: yes :)

14:07 jkdufair: it's a fun system for interacting with Minecraft using Clojure

14:07 oh hi!

14:07 sjl: hah, hey

14:08 jkdufair: my son is totally into MC and I want him to learn to program

14:08 this is my shim :-)

14:08 alexyk: how do I require duck-streams nowdays?

14:08 jkdufair: did you happen to see my fork?

14:08 technomancy: alexyk: (require 'clojure.java.io)

14:08 sjl: I stopped updating Clojurecraft when Notch went crazy changing the protocol every two days a while ago, and haven't gotten back to it yet.

14:08 alexyk: technomancy: and it has spit and such?

14:08 jkdufair: i got it behaving fairly nicely with MC 1.1

14:08 technomancy: alexyk: some of duck-streams got moved to clojure.core

14:08 sjl: jkdufair: not yet, but I've been meaning to look at it. Maybe I can do that after work tonight

14:08 jkdufair: no rush

14:08 alexyk: super

14:08 TimMc: ,(resolve 'spit)

14:08 technomancy: a few things got dropped entirely

14:08 clojurebot: #'clojure.core/spit

14:09 technomancy: the rest is in clojure.java.io

14:09 sjl: jkdufair: nice

14:09 jkdufair: i found a great resource that documents the current state of the protocol, thankfully

14:09 TimMc: alexyk: ^ presumably what you are looking for?

14:09 jkdufair: great piece of kit, sjl

14:09 sjl: jkdufair: thanks! there are still a bunch of things that need to get done before I see it being generally useful

14:10 jkdufair: well if you need help, i'm interested in hacking on it

14:10 sjl: jkdufair: but at least the most horrifying part, the bit-twiddling protocol stuff, is done

14:10 alexyk: TimMc: yep, awesome

14:10 sjl: jkdufair: yeah, definitely -- I'll look at the fork tonight and let you know

14:10 jkdufair: sjl: indeed

14:11 my goal is for my son and i to sit down and build a sillybot that spits out monty python insults when you whack at it

14:11 sjl: heh

14:11 alexyk: now I have a list of strings. I want to output them one per line. Should I just going them and spit or is there a better way for ling lists>?

14:11 sjl: jkdufair: one of the bad parts about the Minecraft protocol -- there's no way to reliably tell who hits you

14:11 jkdufair: oh my

14:11 alexyk: hmm -- write-lines is no longer there

14:11 sjl: jkdufair: the closest you can do is look at who's nearby when your health goes down

14:12 TimMc: alexyk: (doseq [l lines] (println l)) might do it

14:13 alexyk: TimMc: I'm in repl...

14:18 TimMc: alexyk: with-out-str

14:18 technomancy: replaca: is it intentional that pprint doesn't honor *flush-on-newline*

14:18 ?

14:20 alexyk: how do we do set difference?

14:22 and, how do I import string join vs del join? am a bit rusty

14:23 after a year of Scala :)

14:24 technomancy: clojure.string, clojure.set

14:24 alexyk: what's the import statement from repl for string join, renaming it to say strain?

14:24 strjoin?

14:25 TimMc: alexyk: You want to able to say str/join, right?

14:25 (require '[clojure.string :as str])

14:26 _phil: TimMc: why is ' necessary when its not a list?

14:26 alexyk: TimMc: cool

14:27 _phil: TimMc: nvm, because its trying to resolve clojure.string, got it

14:29 amalloy: it would also try to resolve str

14:30 _phil: amalloy: yea, i was confused :) but i like that aspect of clojure - its dynamic but it still catches the most blatant errors by resolving symbols at compile time

14:32 alexyk: _phil: my early laments about NPE were met with counter-claims of "Null ate my mother and my father"

14:33 _phil: alexyk: i like how clojure handles nil though

14:34 i think it wouldve been better if there was no nil at all but idk if that is even possible in such a dynamic language like lisp

14:34 in the 10 seconds iv thought about it right now, i dont see why not

14:35 (get ...) would have to return (nothing) or (just)

14:35 but without type annotations thatd probably be a nightmare to handle

14:36 TimMc: nil is already a minor nightmare

14:36 amalloy: heh

14:36 i also like how haskell handles nil, which seems to be what you're asking for, but it's just not appropriate for clojure

14:37 _phil: amalloy: yes, thats exactly what id like to see, but yes, without type enforcement that would probably be even worse than having nils all over the place

14:37 does (get) return a value or a value wrapped in a maybe?

14:38 amalloy: we don't have maybes

14:38 _phil: go figure

14:38 i was talking hypotetically :)

14:38 amalloy: well if maybes existed, obviously you'd return one

14:38 but in real life, you use get's not-found third argument, or you use find instead of get, when you need to tell nil apart from "no entry"

14:39 &(get {:x 1 :y nil} :y :nothing)

14:39 lazybot: ⇒ nil

14:39 amalloy: &(get {:x 1 :y nil} :z :nothing)

14:39 lazybot: ⇒ :nothing

14:39 _phil: amalloy: yes, im aware of that, just thinking out loud what the implications of a deeply ingrained maybe type would be

14:39 i think without pattern matching it would make no sense

14:40 TimMc: _phil: Luckily, we're using a lisp, so that's no problem.

14:41 _phil: TimMc: what speaks against maybe & pattern matching in a lisp?

14:42 (completely reversing my previous position now :)

14:42 hugod: mm, how do you set a root binding for a existing unbound var?

14:44 gtrak: ckirkendall: how's the cincyfp going?

14:44 * hugod reaches for .bindRoot

14:49 pjstadig: hugod: part of the 1.2 => 1.3 paid we've experienced had to do with .setRoot being changed to .setRawRoot or something

14:50 alexyk: ~((fn [x] (inc x)) 1)

14:50 clojurebot: Excuse me?

14:50 alexyk: ~ ((fn [x] (inc x)) 1)

14:50 clojurebot: No entiendo

14:51 alexyk: how do I make it compute?

14:51 &((fn [x] (inc x)) 1)

14:51 lazybot: ⇒ 2

14:51 alexyk: &(-> 1 (fn [x] (inc x)))

14:51 lazybot: java.lang.UnsupportedOperationException: nth not supported on this type: Long

14:51 alexyk: -- how do we overcome the second case?

14:52 I want lambdas in ->

14:53 ritre: &(-> 1 ((fn [x] (inc x))))

14:53 lazybot: ⇒ 2

14:53 hugod: pjstadig: thanks for the warning

14:54 alexyk: right. more parens

14:57 how do I make a map out of [[1 2] [3 4]] ?

14:59 Bronsa: &(into {} [[1 2] [3 4]])

14:59 lazybot: ⇒ {1 2, 3 4}

15:00 alexyk: yay

15:04 how do I force a lazyseq?

15:04 brehaut: doall or dorun

15:05 Raynes: &(doall (range 10))

15:05 lazybot: ⇒ (0 1 2 3 4 5 6 7 8 9)

15:05 Raynes: &(dorun (range 10))

15:05 lazybot: ⇒ nil

15:07 ckirkendall: gtrak: very good how are your adventures in Baltimore. Did you group get started up.

15:08 gtrak: ckirkendall: yes, we've had 2 beer nights and doing a talk/hack night tomorrow, it's small but enthusiastic right now

15:09 ckirkendall: We been running around 15-20 for awhile. I am talking at the cincy JS group about ClojureScript next wed.

15:09 gtrak: awesome, I saw you guys are still doing one talk per-meeting, how's that working out?

15:11 ckirkendall: its working well, we have more topics than we have meetings right now. I think we are booked through Apr.

15:12 gtrak: In march we have a group coming down from Columbus to do an Overtone concert.

15:12 gtrak: freaking sweet :-)

15:12 you should record it

15:12 ckirkendall: gtrak: That's a good idea I will chat with Carin about it.

15:24 jcromartie: (reset! motivation nil)

15:32 jondot2: hey guys

15:33 im wondering, how should i namespace my ring middleware?

15:33 if the middleware is called 'ping', is it impolite to drop it in ring.ping namespace?

15:33 Raynes: my.awesome.ping.middleware.

15:34 jondot2: i wouldn't like to use the common __mycompany_.ping.middleware, i think it discourages collaboration

15:34 Raynes: It's just a name.

15:34 gtrak: it's impolite to use someone else's namespace in general, what kind of collaboration would that discourage?

15:34 arguing about name collisions?

15:35 jondot2: people avoiding contribution thinking this is something that belongs to a company

15:35 Raynes: You can name it com.pornhub.ping and people will still work with it if they like it.

15:35 ibdknox_: lol

15:36 gtrak: jondot2: then use org.

15:36 Raynes: If Github started putting out com.github.* namespaced libraries...

15:36 They wont collaborate if your company sucks, I guess. :P

15:37 jondot2: i had a bad day guys

15:37 TimMc: I use org.timmc

15:37 ibdknox_: I usually just do ibdknox/.. since my name is unlikely to collide ;)

15:37 jondot2: TimMc, ok, that sounds reasonable

15:37 TimMc: Don't use mine!

15:37 gtrak: TimMc: you're a well-coordinated bundle of organs

15:37 jondot2: TimMc :)

15:38 Raynes: ibdknox_: I want to namespace things hermione.*, but I figure I'd be infringing on your space.

15:38 TimMc: gtrak: That's what my momma always said.

15:38 ibdknox_: Raynes: yeah man, lay off... that one's mine.

15:39 jondot2: so its needles to say that the same deeply nested structure as in Java exist in clojure? no movement to brake off it? (such as naming it org-mycompany-project)

15:39 as opposed to org.mycompany.project

15:39 benares_98: portman.natalie.grits

15:39 gtrak: jondot2: i don't really see a difference between hyphens and dashes

15:40 ibdknox_: gtrak: the number of folders

15:40 jondot2: gtrak, the directory structure i'd need to mkdir -p ?

15:40 * ibdknox_ shrug

15:40 gtrak: meh? you make the file once, then emacs can auto-follow to find your file

15:40 M-.

15:41 jondot2: well i know there is a solution, i'm just poking around to avoid the solution

15:41 it may be my opinion, but i dislike Java's deeply nested folders

15:41 gtrak: jondot2: eclipse helps you find classes too

15:42 i hate projects that create their own structures and don't follow conventions

15:42 jondot2: like this one? https://github.com/medSage/clj-http/tree/master/src/clj_http

15:42 hmm.. i'll just use that kind of structure, was under my nose all this time

15:43 brehaut: jondot2: i think https://github.com/dakrone/clj-http is the canonical repo now

15:44 Raynes: It is.

15:44 dakrone: It is.

15:44 jondot2: yep, that was just in my browser history i guess

15:46 sorry if i made you guys uncomfertable, sometimes i'm just too eager when i have a chance of not doing something i disliked doing for a long time :)

15:46 Raynes: You make us all very comfortable.

15:47 jondot2: in what way?

15:48 Raynes: The best kinds of ways.

15:48 ibdknox_: lol

15:49 this is headed somewhere not good

15:49 brehaut: too many hormones involved

15:49 gtrak: Raynes is ready to slip into something more comfortable

15:50 * jondot2 looks for the wizard hat

15:51 * TimMc euphemisms Raynes

15:53 gtrak: btw, FP baltimore is having the first talks/hack night tomorrow

15:53 BaltimoreFP, rather

15:53 ibdknox: gtrak: can san franciscans come?

15:54 gtrak: yes

15:54 Raynes: technomancy: ibdknox is bouncerfied.

15:54 ibdknox: it's like I'm a whole new man

15:55 TimMc: Yessss, now we can bug him any time of day or night.

15:56 ibdknox: perhaps I should've considered the implications...

15:56 Raynes: Hah

15:56 ibdknox: But you don't have to see the bugging until you reconnect. ;)

15:56 ibdknox: I should create a bot version of myself

15:56 to work in my stead

15:56 technomancy: ibdknox: oh man, it saves so much time. highly recommended.

15:57 ibdknox: technomancy: what about it saves time?

15:57 technomancy: earlier you said it's like you're a whole new man?

15:58 hiredman: self markov models are the next GTD

15:58 ibdknox: haha

15:58 GTD made a lot of money...

15:58 * ibdknox considers the possibility

15:59 ibdknox: unrelated, for anyone interested, here's a simple example of some of the CLJS state stuff I've been working on https://refheap.com/paste/522 non-deterministic-finite-state-machine-driven-ui FTW

15:59 TimMc: ibdknox: Is it because of your childhood that considers the possibility?

16:00 ibdknox: TimMc: abuh?

16:00 brehaut: TimMc: lol

16:01 gtrak: any speculation why apple's sending so many folks to clojure/west?

16:01 ibdknox: gtrak: source?

16:02 Raynes: They totally plan to replace objective c with Clojure.

16:02 ibdknox: Alex Miller.

16:02 lrn2twitter

16:02 ibdknox: lol

16:02 brehaut: gtrak: i suspect they are apple people going to clojure west, rather than being sent by apple

16:02 cemerick: There was a guy in here a year ago or so that claimed to be from Apple, who said that Clojure was being used a fair bit. *shrug*

16:03 gtrak: ibdknox: @ClojureWest: "So far the company with the most developers attending Clojure/West is... Apple. Surprised?"

16:03 brehaut: cemerick: sounds unlike an apple employee :P

16:03 cemerick: brehaut: I should have *bolded* "claimed".

16:03 ibdknox: heh

16:03 brehaut: cemerick: nope :P

16:03 ibdknox: well maybe I can teach some of them to build websites ;)

16:03 gtrak: don't know if that implies they're sponsored to go by apple

16:04 Raynes: ibdknox: They wont build any websites unless it is STEEL colored and blank.

16:04 brehaut: i understand that even if they go on their own, they arent supposed to say they work at apple

16:04 TimMc: ibdknox: Have you ever interacted with the ELIZA chatterbot?

16:04 ibdknox: TimMc: I have :)

16:05 Raynes: true, should make the class pretty easy to teach

16:05 TimMc: ibdknox: I was imagining using ELIZA as your replacement while you weren't logged in.

16:05 alexyk: how do you prepend an element to a vec?

16:05 ibdknox: TimMc: it's a pretty good approximation of me

16:05 Raynes: You probably don't really want to.

16:05 gtrak: alexyk: you can cons one onto a seq'd vec

16:06 alexyk: gtrak: will it still be a vec?

16:06 Raynes: No.

16:06 gtrak: the vec part will

16:06 TimMc: alexyk: The output of cons is always a seq.

16:06 alexyk: Raynes: I'm doing silly data mangling

16:06 so everything goes

16:06 Raynes: Finger trees!

16:06 brehaut: ,(class (rest (cons :a [:b])))

16:06 clojurebot: clojure.lang.PersistentVector$ChunkedSeq

16:07 Raynes: I use finger trees for all my softwares.

16:07 TimMc: Raynes writes all his monads using finger trees.

16:07 ibdknox: I use bloomfilters for basically everything.

16:08 gtrak: ,(class (cons :a [:b]))

16:08 clojurebot: clojure.lang.Cons

16:09 gtrak: the Cons class is quite simple

16:09 Raynes: Quite.

16:09 jondot2: jondot

16:09 crap.

16:09 ibdknox: lol

16:09 Raynes: Raynesbot.

16:09 ibdknox: Hi Raynesbot, how are you today?

16:09 Raynes: Bot, dot, whatever. It's all the same to me.

16:10 jondot2: well great now you know the sudo password to one of my VMs

16:10 lazybot: I'm excellent. Thanks for asking.

16:10 Raynes: jondot2: Yeah, I've already deleted all of your data.

16:10 ibdknox: lazybot: you're welcome.

16:11 gtrak: jondot2: now I'll go and brute-force through my all the vm's in the world database organized by rooted hosts

16:11 ibdknox: gtrak: should take what? 15mins?

16:11 lazybot: ibdknox Would you consider a homorobotic romance?

16:11 gtrak: yea, ec2's really fast

16:12 ibdknox: haha

16:12 jondot2: only that its a virtualbox under a double NAT..

16:12 gtrak: jondot2: really fast

16:12 Raynes: Man, I can almost hear cemerick sigh as he watches the conversation degrade.

16:12 ibdknox: I assume he hates us all now.

16:13 Luckily I can claim someone stole my bounced identity and this is all a terrible joke.

16:13 Raynes: http://euroclojure.com/2012/euroclojure-2012/ Holy crap.

16:13 ibdknox: yeah, I'll probably submit a couple talks to that one

16:14 alexyk: is there a mean/average in std lib?

16:14 gtrak: i don't think i can afford any more clojure conferences

16:14 yawNO: london

16:14 :;

16:14 alexyk: Clojure/west I'll visit

16:14 yawNO: *;_;

16:14 crap

16:14 cemerick: Raynes: There's very little that makes me sigh. Presume I'm smirking at all times. ;-)

16:14 Anyone know who's running the euroconf?

16:14 gtrak: but i will be at clojure/west :-D

16:15 yawNO: cemerick: i might

16:15 ibdknox: cemerick: whoever this is: http://companycheck.co.uk/company/07908329

16:15 yawNO: no wait

16:15 may

16:15 just kidding

16:15 cant

16:16 gtrak: ~enter

16:16 clojurebot: Pardon?

16:16 ibdknox: ~guards

16:16 clojurebot: SEIZE HIM!

16:16 ibdknox: ~anyone

16:16 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

16:16 ibdknox: hah it's still there

16:16 axle_512_: just saw a tweet from newsycombinator about the clojure conj videos… really digging Rayn'es clojail talk

16:16 alexyk: &(reduce '+ [1 2 3])

16:16 lazybot: ⇒ 3

16:17 gtrak: I'll steal the one from ##java

16:17 aaelony: noticed that Aaron Bedra is wearing a sweet Grateful Dead / Clojure Lambda T-shirt in the One () to Rule them All video (http://www.infoq.com/presentations/One-Parenthesis-to-Rule-them-All) ... !!! are those on cafepress somewhere ?

16:17 alexyk: (reduce + [1 2 3])

16:17 &(reduce + [1 2 3])

16:17 lazybot: ⇒ 6

16:17 gtrak: ~enter is not punctuation. Please don't press your Enter or Return key until you've finished typing your question, sentence, or idea. It is annoying to see that and hard to follow.

16:17 clojurebot: Ik begrijp

16:17 gtrak: ~enter

16:17 clojurebot: enter is not punctuation. Please don't press your Enter or Return key until you've finished typing your question, sentence, or idea. It is annoying to see that and hard to follow.

16:18 alexyk: isn't it interesting to see how '+ causes reduce to silently be wrong

16:18 TimMc: alexyk: Why do you think that was the wrong answer?

16:19 brehaut: ,((comp (partial apply /) (juxt (partial apply +) count)) [1 2 3])

16:19 clojurebot: 2

16:19 cemerick: aaelony: Nope, he made it.

16:19 technomancy: "On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."

16:19 ibdknox: ,('+ 3 4)

16:19 clojurebot: 4

16:19 aaelony: cemerick: i think it's pretty awesome

16:20 technomancy: clojurebot: wrong figures is <reply>"On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."

16:20 clojurebot: c'est bon!

16:20 TimMc: Oh, I see, (quote +)

16:20 I've gotten into the habit of putting ' in front of var names in discussion.

16:20 alexyk: TimMc: I understand it's not "wrong", but sshy a symbol would return the last arg in a form?

16:20 why

16:21 TimMc: alexyk: I believe it has to do with lookups.

16:21 brehaut: its not the last, its the second

16:21 ibdknox: ,('+ 3 4 5 6)

16:21 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (4) passed to: Symbol>

16:21 alexyk: brehaut: awesome mean too

16:21 brehaut: ('+ {'+ :a} :foo)

16:21 ,('+ {'+ :a} :foo)

16:21 clojurebot: :a

16:21 brehaut: ('+ {'- :a} :foo)

16:21 ,('+ {'- :a} :foo)

16:21 clojurebot: :foo

16:22 brehaut: its the same thing as keywords as accessors in maps

16:22 alexyk: brehaut: what's your Twitter nic?

16:22 brehaut: @brehaut

16:22 ibdknox: how unoriginal ;)

16:22 brehaut: (shocking i know)

16:22 dpritchett: Is there a shorter way to write this? (map #(vector (:title %) (:published %)) my_coll)

16:22 brehaut: (map (juxt :title :published) my_coll)

16:22 ibdknox: (map (juxt :title :published) my-coll)

16:22 damnit

16:22 TimMc: dpritchett: juxt!

16:22 dpritchett: thanks!

16:23 ibdknox: beaten to the punch

16:23 brehaut: ibdknox: you didnt screw the hyphen though

16:23 dpritchett: ibdknox if it makes you feel any better i am working in noir

16:23 ibdknox: sweet

16:23 TimMc: brehaut: You sniped amalloy on a juxt answer!

16:23 brehaut: TimMc: i know!

16:23 someone should check if hes ill

16:23 ibdknox: ~juxt

16:23 clojurebot: juxt is usually the right answer

16:23 Raynes: amalloy is nuts for juxt.

16:24 amalloy: brehaut: i was ill, on my deathbed, but the mere mention of juxt has revitalized me

16:24 brehaut: lol

16:24 ibdknox: amalloy: you have a highlight rule for juxt don't you?

16:24 amalloy: ibdknox: that would be little use, right? nothing left to contribute once it goes off

16:25 Raynes: ibdknox: He uses pidgin for IRC. He probably doesn't even have a highlight rule for 'amalloy'. Chances are, he pays someone to watch his client just in case someone pings him.

16:25 brehaut: mechanical turk

16:25 TimMc: lazybot emails him every time

16:25 ibdknox: lol

16:25 dpritchett: I was using Quassel and feeling hardcore about it until I noticed its cache was using up about 1/3 of the disk on my VPS. Now I'm using freenode webchat...

16:26 Raynes: dpritchett: OS X?

16:26 ibdknox: what's the best way to monitor memory usage from within your app?

16:26 dpritchett: win7 here at the office raynes

16:26 I had quassel running on osx at home and win7 at work

16:26 the server was ubuntu LTS

16:27 Raynes: ibdknox: Get inside the app with a video camera pointing to an instance of yourkit.

16:27 ibdknox: Raynes: I tried that, the camera was too shaky to get a good read.

16:28 amalloy: $javadoc System

16:28 lazybot: http://download.oracle.com/javase/6/docs/api/java/lang/System.html

16:28 TimMc: ibdknox: Probably something to do with JMX

16:29 MBeans and whatnot.

16:29 amalloy: from within your app? i'd suggest something more like http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#freeMemory() if a crude tool is sufficient

16:29 ibdknox: crude is ok

16:30 I'm running out of memory on heroku but I'm not using much locally, so I just need something I can look at to get an idea where things are going haywire

16:36 Licenser: ibdknox are you still wokring on cljs-watch?

16:36 ibdknox: Licenser: I still use it everyday, yes

16:37 Licenser: do you plan on porting it to the newer cljs releases? :)

16:37 ibdknox: hm?

16:38 Licenser: I want to use some recent things in cljs like the new -bla syntax for parameters and cljs-watch keeps compiling with the old stuff

16:39 ibdknox: you just need to pull inside your copy of clojurescript

16:39 it uses whatever you have locally

16:40 Licenser: oddly for me it does not work, if i use cljs directly it runs with the new stuff, if I run cljs-watch it uses the old stuff

16:40 ibdknox: hm is your clojurescript_home potentially pointing at some old dir?

16:41 Licenser: pretty sure not it's part of my makefile and using the smae cljourescript_hope I use to compile but I will double check

16:45 but thanks for the hint ibdknox I'll investigate on that

16:45 ibdknox: okidoke, let me know if there's something I need to do.

16:46 jondot2: whats the canonical OSS license to use for clojure libs? i see EPL generated by lein, however some others go with MIT

16:46 hm perhaps 'encouraged' is the word

16:47 Chousuke: EPL is common

16:48 gtrak: WTFPL

16:48 Licenser: ibdknox thanks mate :) I will

16:48 tjgillies: i use cljr and sometimes it gets "stuck" as in unresponsive, is there a way to get back to user=> ?

16:48 Chousuke: WTFPL is a bad licence for anything :P

16:48 gtrak: ha, why?

16:48 Chousuke: it's too informal

16:49 brehaut: its a real thing‽

16:49 huh so it is

16:51 tjgillies: MIT is my fav

16:51 because its GPL compatible, without going the way of GPL

16:52 Raynes: Chousuke: wtfpl is a great license. Get out of my channe.

16:52 channel*

16:52 pjstadig: CC0

16:53 dpritchett: anyone have a favorite standalone repl?

16:53 pjstadig: or Unlicense

16:53 gtrak: what's a standalone repl?

16:54 brehaut: reply cljr ?

16:54 jedahu: I prefer the ISC license http://en.wikipedia.org/wiki/ISC_license

16:54 pjstadig: dpritchett: i have a script in my bin that just runs clojure

16:54 dpritchett: so i'm using lein repl and vim to play around with a little shell of a noir project

16:54 brehaut: actually, i dont know if reply is stand alone

16:54 pjstadig: but it doesn't have any like classpath support

16:54 dpritchett: I'd like it if I had auto-indenting and syntax highlighting and whatnot

16:54 brehaut: gtrak: a repl that doesnt exist in a project

16:54 dpritchett: i can live without it at the repl, but i just like to check every so often

16:54 tjgillies: i like cljr because the swing version lets me click on the screen with my mouse

16:55 gtrak: brehaut: ah, i just make a project for that

16:55 brehaut: gtrak: if you dont need dependancies (or 1.3 i think), then lein repl works fine without a project context

16:55 djh_: Can anyone explain to me something. I'm trying to look for this function http://clojuredocs.org/clojure_contrib/clojure.contrib.string/substring_q in the "modularised" Clojure Contrib

16:55 TimMc: dpritchett: You mean, you want a REPL that acts like Emacs?

16:55 dpritchett: pretty much, tim

16:55 djh_: on this page it says http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go that clojure.contrib.string was migrated to clojure.string

16:55 dpritchett: or pry or irb or bpython or ipython

16:56 each of which isn't attached to an editor

16:56 djh_: but I can't seem to find the function in there

16:56 pjstadig: djh_: i don't think everything from clojure.contrib.string made the cut

16:56 dpritchett: Maybe I can just load some repl-oriented stuff into my dev-dependencies and then it'll show up at my repl? irb is pretty boring out of the box but when you load in a few runtime gems it gets downright usable

16:56 djh_: pjstadig: Ah I see, OK thanks

16:57 dpritchett: something like Wirble would be great

16:57 TimMc: $findfn map (partial % "oo") ["foo" "bar"] [true false]

16:57 lazybot: []

16:58 TimMc: djh_: ##(.contains "foo" "oo")

16:58 lazybot: ⇒ true

16:58 TimMc: which is all 'substring? ever was.

16:59 djh_: TimMc: ah thanks man, yeah just went to look at the source and noticed that

16:59 _phil: Licenser: also take a look at https://github.com/davesann/cljs-watch

16:59 Licenser: ibdknox actually Iu will send a pullrequest towards you :)

16:59 _phil did it crashes w/o saying anything

17:00 jondot2: heres an experiment's results: clj 36 LOC, ruby 63 LOC, node.js 71 LOC, C# 153 LOC, same component, same principle frameworks (ring, rack, connect, mvc.net) - nice!

17:00 _phil: it handles cross compilation between clojure and cljs and handles configuration etc

17:00 Licenser: oh

17:00 Licenser: never crashed here but im afraid i cant help you :/

17:01 Licenser: _phil no worries :)

17:02 actually not the error was somewhere entireu differnet

17:02 _phil: Licenser: only thing i know is clojure needs to be on the path and $CLOJURESCRIPT_PATH needs to be set

17:03 Licenser: _phil it starts up, no java errors or anything just quietly dies

17:03 _phil: Licenser: i mean $CLOJURESCIPT_HOME

17:03 Licenser: I know ^^

17:03 _phil: Licenser: oh... you have to pass it a parameter

17:03 Licenser: now I git the version from ibdknox working so I am happy

17:03 _phil: gen-watch f.e.

17:05 Licenser: f.e.?

17:06 jedahu: _phil: fwiw, there is also https://github.com/jedahu/lein-clojurescript

17:06 _phil: for example :)

17:06 jedahu: sorry, that should have been directed to Licenser

17:06 _phil: jedahu: np but ive also been meaning to try it out but havent had the time til now

17:07 Licenser: jedahu yes I know but I don't have a clojure project just cljs for my frontend code

17:07 _phil: Licenser: i.e. cljs-watch gen-watch

17:07 Licenser: _phil that is whaty I tried to run :)

17:07 Will watch to gen-src for:user$project_dirs@3a8721bd is all what it said before ending

17:08 jedahu: _phil: watching checkouts projects is a good idea

17:08 _phil: Licenser: do you have a cljs-opts.clj file?

17:08 Licenser: nope

17:08 jedahu: I'll have to implement it in lein-clojurescript

17:08 * Licenser passed the options via the arguments

17:10 _phil: jedahu: i think lein-cljs is a cleaner solution, cljs-watch generates two additional src folders in your project root

17:10 jedahu: its kind of a hack

17:11 Licenser: cljs-watch does not generate any folders for me

17:12 _phil: Licenser: strange, it generates src-generated and cljs-staging

17:12 Licenser: perhaps only the one from davesann?

17:12 _phil: from your src folder

17:12 Licenser: oh yes, im talking about that one :)

17:12 Licenser: ah okay I use the original

17:13 _phil: the original cljs-watch doesnt handle cross compilation so it doesnt need to generated additional folders

17:13 Licenser: now that this is solved I just need someone to write me the CLJS for my gui :P

17:13 _phil: generate8

17:14 while were talking about cljs-watch, is there a way to keep the repl up-to-date when a file is saved?

17:16 i remeber there was some ns-watcher thing, has anyone used it successfully?

17:21 amro: how can I use apply with a .method in cljs?

17:32 jedahu: _phil: hadn't come across lein-cljs, looks good :-)

17:33 _phil: jedahu: oh i meant lein-clojurescript :) didnt know there was lein-cljs either

17:39 jedahu: _phil: turns out it's based on https://github.com/zkim/cljs which is an old clojure->javascript compiler, so not that relevant after all

17:43 pjstadig: technomancy: bump https://github.com/technomancy/swank-clojure/issues/103

17:44 jedahu: amro: (. obj -method (apply obj (. [arg1 arg2] -array)))

17:45 _phil: there is also https://github.com/jedahu/lein-repljs

17:46 _phil: jedahu: thx, ill have a look :)

17:49 dpritchett: Hey ibdknox, "lein uberjar && java -jar <jarname>" should work on Noir out of the box, right?

17:50 That is, for a project generated by lein noir new

17:50 ibdknox: dpritchett: I think you'll need to use load-views-ns instead of load-views

17:52 dpritchett: Thanks. Excuse me while I go stare the API docs and try to figure out why there are two separate load-views functions.

17:52 ibdknox: dpritchett: history

17:52 dpritchett: So I guess my version of the lein noir plugin uses the deprecated function?

17:52 ibdknox: load-views-ns is a little more robust and will be used in the templates moving forward

17:53 yep

17:58 dpritchett: So I figured out the proper syntax for load-views-ns and I was able to get the app back up and running with "lein run" but my attempts to run the uberjar are still stalling out at "could not find the main class: myappname.server"

17:59 Here's the code fwiw https://gist.github.com/1713638

18:00 ibdknox: you need (:gen-class) in your server ns decl

18:01 amro: jedahu: what's -array in that?

18:03 dpritchett: Thanks for the hand holding, ibdknox. I'm back in business.

18:03 ibdknox: good deal :)

18:05 aphyr: tw

18:05 jedahu: amro: the field of a cljs vector that holds the underlying js array

18:06 amro: I'm confused how that maps back to a regular apply call, (apply fn arg1 arg2 seq)

18:07 I basically have (. obj method x y z), where x y z are in a vector

18:09 ibdknox: (apply (.-method obj) x y z)

18:09 (.-method obj) will give you the property (which is a function)

18:09 however

18:10 "this" will be bound incorrectly in that case

18:10 if that method uses it

18:10 jedahu: amro: like ibdknox said, it doesn't map to regular apply

18:13 amro: (defn wrap-method [& args] (.apply (. obj -method) obj (. args -array)))

18:14 amro: sorry, that should be: (defn wrap-method [prop & args] (.apply prop obj (. args -array)))

18:15 amro: then (apply (wrap-method (. obj -method)) arg1 arg2 seq)

18:15 mabes: did class loading change any in 1.3? I'm upgrading a project from 1.2 and it is claiming that it can't file a AOTC class file even though I've verified it exists..

18:16 just looking for related changes that might explain the break...

18:19 amro: jedahu: thanks, I got it to work

18:20 technomancy: pjstadig: just use ^:regression =P

18:25 amro: is there a standard way to automatically bootstrap repls with a few forms at the start?

18:30 jedahu: amro: good :-)

18:38 amro: I sometimes get this error when running lein clojurescript: Exception in thread "main" clojure.lang.ArityException: Wrong number of args (5) passed to: compiler$eval889$fn--890$pfn

18:38 it's not consistent at all- I can recompile without any source changes and it doesn't happen

18:39 try a few times and it will happen again, still no source changes

18:39 any ideas why?

18:41 jedahu: amro: does cleaning the 'out' directory change anything? (lein clojurescript fresh)

18:46 pcavs: Not a pure clojure question, but does anyone else run into the problem when using clojure-jack-in in emacs, when the repl prints out anything beyond five to ten lines, the repl gets off and puts the cursor in the wrong spot after commands?

18:46 amro: jedahu: I just ran it 20 times in a row and no more error, I'm gonna chalk that down as a success

18:48 Uncaught TypeError: Cannot call method 'call' of undefined - I've marked the function with ^:export and this still happens. am I missing something?

18:55 jedahu: amro: does it happen for optimizations lower than :advanced?

19:09 amro: jedahu: I don't have any optimizations

19:10 jedahu: amro: iirc ^:export only comes in to play for :advanced optimization

19:11 amro: so chances are there is something else going on

19:12 amro: have you checked out the js source of the error in your browser?

19:14 amro: yeah, it's what I pasted

19:14 I checked in the inspector, the object doesn't exist as it should

19:15 engine.main.setup.call(...) is generated, but engine.main doesn'tt have a setup

19:18 sjl: I give up. The "Where did Clojure contrib Go" page lists the new names of contrib stuff, but doesn't tell you how to GET them.

19:18 Where can I find the magic names/numbers that need to go into project.clj to actually use these things?

19:18 brehaut: http://search.maven.org/

19:19 eg http://search.maven.org/#search%7Cga%7C1%7Cclojure.algo.monads

19:19 technomancy: or lein search

19:19 if you feel like downloading huge maven repo indices from overloaded mirror servers

19:19 sjl: technomancy: lein search has been hanging downloading an index for a few minutes now. I ctrl+c'ed it

19:20 technomancy: yeah, the mirrors are ridiculous

19:20 it's 80MB of lucene files, but still

19:20 brehaut: thats why its never completed for me

19:20 sjl: brehaut: hmm, I assume I should just use the latest version listed here and hope it works with 1.3?

19:20 technomancy: IIRC all contribs have to work on 1.2 and 1.3 to have a release

19:21 brehaut: some of them have a newer release in the sonatype snapshot repo

19:22 technomancy: I wonder if lein search should take a "I don't have all day; just try clojars" flag =(

19:22 brehaut: haha

19:23 it'd be helpful for people trapped on craptacular (international?) connections

19:24 technomancy: oh, actually that's trivial to implement using profiles in lein2

19:25 Raynes: clojurebot: profiles support in line2 is the answer to life, the universe, everything.

19:25 clojurebot: 'Sea, mhuise.

19:25 brehaut: wait, isnt that juxt?

19:25 technomancy: {:clojars {:omit-default-repos true :repositories {"clojars" "http://clojars.org/repo/&quot;}}} ; <- put that in ~/.lein/profiles.clj, then do "lein with-profile clojars search cheshire"

19:25 brehaut: lein2 isnt out yet though right?

19:25 technomancy: wellllllll

19:26 what does "out" mean?

19:26 brehaut: i dont know

19:26 xeqi: a non-snapshot version?

19:26 brehaut: normal plebs like me who forget to upgrade lein?

19:26 technomancy: try it and see!

19:26 if it breaks, you get to keep both pieces

19:26 brehaut: fantastic :P

19:27 technomancy: seriously though, I'll have a preview release by clojurewest

19:27 all that's missing for the preview is the enhanced repl and native deps

19:27 both of which I have delegated to other hackers =)

19:28 cemerick: nag, nag, nag ;-)

19:28 * Raynes pretends he isn't one of those hackers.

19:28 brehaut: is the enhanced repl an nrepl thing or reply?

19:28 or something else?

19:28 technomancy: brehaut: it's ... both!

19:28 Raynes: Gotta earn my damn sticker.

19:28 cemerick: technomancy: bencode has landed, so it won't be long: https://bitbucket.org/kotarak/nrepl

19:28 * technomancy rubs his hands together

19:29 xeqi: cemerick: I've also got a pull request on pomegranate that would be nice to get into the preview

19:30 brehaut: how long till one of the technomancys replaces slime / swank with an nrepl equivalent

19:30 cemerick: xeqi: I missed that somehow. Shocking, given github's awesome notifications. :-P

19:30 I'll get it merged in tomorrow-ish

19:30 xeqi: np

19:30 figured it might have been missed

19:31 cemerick: brehaut: nrepl is a swank equivalent (though I think it's better, of course)

19:31 it's the SLIME part that's tough

19:31 technomancy: it's better

19:31 as a server

19:31 brehaut: cemerick: right. i presume theres lots of stuff intermunged in slime land?

19:31 technomancy: considering it wasn't a line-by-line port of an ancient CL program =)

19:32 brehaut: lol

19:32 technomancy: or rather a defun-by-defun port

19:32 cemerick: brehaut: yeah, there's *really* tight coupling between SLIME and swank, and emacs in general and swank

19:32 * Raynes wishes kotarak didn't use bitbucket.

19:33 cemerick: If bitbucket implements asciidoc well, then… :-P

19:33 Raynes: cemerick: I don't think they even implement markdown well.

19:33 :\

19:33 brehaut: cemerick: lol. what is the appeal of asciidoc other than its not markdown?

19:33 cemerick: If they had fixed their pricing 2 years ago, then they might have been where github is now.

19:33 * technomancy has gotten a lot more sympathetic towards hg users since 0) using git submodules and 1) trying git without magit

19:34 * brehaut wishes bzr wasnt so damn slow

19:34 Raynes: cemerick: I use bitbucket just for private repos.

19:34 * Raynes wishes darcs was more popular.

19:34 cemerick: brehaut: asciidoc doesn't suck

19:34 * hiredman still bencoding nrepl is dumb

19:34 hiredman: still thinks

19:34 technomancy: lol bzr

19:34 Raynes: technomancy: If you and I started using hg, I bet we'd convince the entire community to…

19:34 brehaut: technomancy: yeah.

19:34 cemerick: markdown doesn't suck as bad as textile, but that's not saying much.

19:34 brehaut: technomancy: but at least its UI didnt suck

19:35 technomancy: yeah, it has the best docs

19:35 also the best icon

19:35 brehaut: it has an icon?!

19:35 Raynes: technomancy: Let's do it. leiningen on hg on bitbucket. Go.

19:35 technomancy: http://wiki.bazaar.canonical.com/LogoOptions?action=AttachFile&do=get&target=bzr+icon+64.png

19:35 dgrnbrg: Can syntax quotes be nested?

19:35 cemerick: hiredman: There's a Transport protocol, so if anyone has a better idea that suits all parties…

19:35 brehaut: huh so it does

19:35 technomancy: Raynes: I'm locked into git for work

19:35 _phil: Raynes, technomancy: yes please, hg!

19:35 dgrnbrg: to make a macro-generating-macro?

19:35 Raynes: Quit your job.

19:35 hiredman: (/ 10000 365)

19:35 clojurebot: *suffusion of yellow*

19:35 technomancy: also, magit is too good for words

19:35 Raynes: _phil: Never.

19:36 cemerick: sexprs don't cut it

19:36 hiredman: ,(/ 10000 365)

19:36 clojurebot: 2000/73

19:36 amalloy: dgrnbrg: it sounds like this question would be easier to answer by trying it yourself than by asking here

19:36 Raynes: technomancy: fugitive.vim is surprisingly sufficient. I've enjoyed using it.

19:36 hiredman: ,(double (/ 10000 365))

19:36 clojurebot: 27.3972602739726

19:36 dgrnbrg: amalloy, I have tried it, and it doesn't seem to work, so I'm hoping my question will result in an alternative

19:36 technomancy: ,(double :your-refreshment)

19:36 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.lang.Number>

19:36 adam_w_: ,(double (/ 22 7))

19:36 clojurebot: 3.142857142857143

19:36 ibdknox: technomancy: lol

19:36 technomancy: supposedly you can use hg as a client for git repos now though?

19:36 amalloy: k. well, it's totally possible, but is generally a really hard thing to do right so it's not surprising you had trouble

19:37 it's also something you need to do a lot less rarely than you think, so consider a different approach entirely

19:37 dgrnbrg: I need to have some functions evaluate their arguments as thunks inside another function to catch exceptions and do something to them

19:37 brehaut: amalloy: a lot _less_ rarely?

19:38 amalloy: er

19:38 ibdknox: more

19:38 Raynes: Hahaha.

19:38 amalloy: less often

19:38 Raynes: $logout

19:38 brehaut: phew!

19:38 lazybot: You've been logged out.

19:38 Raynes: $shell

19:38 lazybot: Raynes: It is not the case that you don't not unhave insufficient privileges to do this.

19:38 * Raynes dances

19:38 amalloy: dgrnbrg: so far, sounds like you want a function for creating functions, not a macro for creating macros

19:39 dgrnbrg: I need the arguments to not be eagerly evaluated

19:39 since I need to wrap them in (try)

19:39 I'm pretty sure I need a macro to do that

19:39 amalloy: *shrug* make them functions

19:39 adam_w_: have you thought about using futures?

19:39 dgrnbrg: The end syntax is important

19:39 ibdknox: I write macros that write macros that write functions that spit out programs to write macros that write...

19:40 dgrnbrg: it has to look like (defn-exceptions my-funk [args] body)

19:40 amalloy: &(let [thunk #(throw (Exception. "OMG")), wrap-try (fn [f] (try (f) (catch Exception e "Caught it!")))], (wrap-try thunk)))

19:40 lazybot: java.lang.SecurityException: You tripped the alarm! catch is bad!

19:40 dgrnbrg: and each arg must get wrapped in a try to catch any exceptions it might cause

19:41 I've written that part as functions

19:41 ibdknox: hm

19:41 dgrnbrg: but I need to automagically wrap the arguments into thunks

19:41 what are the rules for unsplicing in nested syntax-quotes?

19:41 amalloy: okay. so that's a macro. you don't need two macros

19:41 dgrnbrg: but I need to make lots of functions like that

19:42 so I need a macro to write the argument-wrapping macros

19:42 ibdknox: this is seeming very odd

19:42 why do they need to be caught individually?

19:43 dgrnbrg: since I they're each independent computations, and I want to report as many exceptions as possible

19:43 ibdknox: if they're computations, why wouldn't they be their own functions?

19:43 amalloy: i kinda feel like nested syntax-quotes is a journey you need to go on alone

19:44 ibdknox: that would catch their own exceptions

19:44 dgrnbrg: ibdknox, since I want to allow the user to give me expressions

19:44 the API is complex, and I want to hide the complex

19:44 -ity

19:46 Raynes: ibdknox: https://refheap.com/paste/524 best thing ever.

19:47 ibdknox: That will fix your problem with horrid indentation in (defpage ..) and (defproject ..).

19:47 And anything else starting with def or with.

19:47 technomancy: Raynes: what, no vimscript highlighting yet?

19:47 ibdknox: yeah I found that a bit ago

19:47 Raynes: Huh, that shouldn't have pasted the whole page.

19:48 Just the end is relevant.

19:48 technomancy: It has VimL highlighting, but my vimrc has no extension and thus my vim plugin doesn't know what to set highlighting to.

19:48 edit'd

19:48 dgrnbrg: I've almost solved it--I just want to quote an unquote-splicing operator

19:49 but if I write (unquote-splicing) instead of ~@, it generates different code

19:49 _phil: is there a vim plugin to paste directly to refheap or gist or whatever?

19:49 Raynes: _phil: http://github.com/Raynes/refheap.vim

19:50 Okay, bug.

19:51 It doesn't know the difference between a single highlighted line and the whole file. I thought I fixed that. Guess not.

19:51 Will tackle it later.

19:51 _phil: Raynes: thx, trying it out

19:52 Raynes: _phil: You need a vim compiled with Ruby support enabled.

19:52 Also, Vim's Ruby support is the devil, so if it doesn't work… Rawr.

19:52 _phil: Raynes: macvim has it by default right?

19:52 ibdknox: _phil: yes

19:52 Raynes: Yep.

19:52 _phil: cmt + t works at least

19:52 Raynes: Macvim should work fine.

19:53 _phil: good

19:53 Raynes: If command-t works, it should work.

19:53 ibdknox: Also, how do you feel about ctrlp vs command-t? The former is the default in janus distributions, but when I open clj files with it they aren't highlighted and the author can't reproduce :(

19:54 ibdknox: I use command t

19:54 though rarely

19:54 amalloy: Raynes: maybe he should use a sexier text editor, if he's having trouble reproducing

19:54 Raynes: NERDtree is for nerds.

19:54 ibdknox: lol

19:54 brehaut: rimshot

19:54 Raynes: ~rimshot

19:54 clojurebot: Badum, *tish*

19:54 brehaut: thanks

19:54 ibdknox: someone changed it from ching?

19:54 Raynes: https://github.com/kien/ctrlp.vim

19:55 technomancy: doesn't rimshot imply that at least it was close?

19:55 ibdknox: Raynes: I used buffer explorer for the most part

19:55 amalloy: ibdknox: i stole it verbatim from fsbot

19:55 technomancy: if we were talking about basketball rather than drums, yes

19:55 brehaut: f sharp bot?

19:55 technomancy: aha

19:55 Raynes: brehaut: God no.

19:56 amalloy: brehaut: #emacs bot

19:56 brehaut: oh :S

19:57 amalloy: and really, the sound *is* more of a tish. ching is what is often said aloud, but the cymbals just don't sound like that at all

19:57 _phil: Raynes: LoadError: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to l

19:57 oad -- rubyheap

19:57 tjgillies: technomancy: wow, all your libaries are awsome, thanks

19:57 ibdknox: amalloy: I agree, it's more of a chuh

19:57 tjgillies: libraries*

19:58 brehaut: http://www.youtube.com/watch?v=kpoanOlb3-w

19:58 ^ cymbol at 1000fps

19:58 s/ol/al/

19:59 i dont think a symbol at 1000fps would be as interesting

19:59 technomancy: not true

19:59 amalloy: he should stop leaving that thing out in the sun. looks like he borrowed it from salvador dali

19:59 _phil: do i need any additional deps for refheap.vim?

20:00 technomancy: some of them are lame

20:00 this, on the other hand, is awesome: http://27.media.tumblr.com/tumblr_lxkqilGXuz1qzfsnio1_250.jpg

20:00 brehaut: amalloy: hes lucky it didnt aquired weirdo dolphins or strange giraffe/elephants

20:02 amalloy: brehaut: sorry man, bendy clocks are the limit of my cultural knowledge

20:03 brehaut: one of the bendy clocks is on a dolphine thing

20:05 amalloy: i have to have something to show for trying to get into art school years ago

20:06 dgrnbrg: I figured out the macro:

20:07 here's my macro-writing macro

20:07 https://gist.github.com/1714329

20:11 I'm quite pleased with ~@'~body

20:15 cemerick: seancorfield: really? Still looks stale here.

20:15 Raynes: "Anthony quite possibly is the youngest member of Clojure community, he is 17. Avid cat lower and Stuart Sierra’s groupie with occasion inspired green hair."

20:15 Did anybody else think my hair was green?

20:16 Because it was supposed to be blue. Albeit I went with a really really light blue that could probably be interpreted as green.

20:16 brehaut: Raynes: you are a cat lower?

20:16 ibdknox: it was blue

20:16 Raynes: brehaut: Apparently so.

20:16 http://vitalyper.wordpress.com/2011/11/17/clojure-conj-2011-recap/

20:17 The first time I died my hair, it was *exactly* like stuartsierra's hair.

20:17 dyed*

20:17 Not even purposely. I think he just uses the same dye as me.

20:20 TimMc: Damn you, technomancy, now I'm watching *all* the slow motion videos on YouTube!

20:21 brehaut: TimMc: while technomancy is normally the provider of apropos links, i think this time its my fault?

20:21 ibdknox: TimMc: brehaut sent that I think :p

20:21 TimMc: Oh, so it is!

20:21 ibdknox: man, I'm just off my game today

20:21 brehaut has beaten me multiple times :p

20:21 TimMc: I opened both links, you see.

20:21 and forgot which was which

20:22 brehaut: TimMc: http://www.youtube.com/watch?v=TKF6nFzpHBU

20:22 iphone 4 inside an acoustic guitar: you can see the wave forms on the strings. very cool

20:23 TimMc: NOT CLICKING

20:24 You've done enough damage today!

20:29 ibdknox: technomancy: any thoughts why my process on heroku would eat ridiculous amounts of memory, but not do so locally?

20:30 technomancy: you didn't switch it to using utf-32, did you?

20:30 ibdknox: no lol

20:30 technomancy: yeah... not sure. are you using lein trampoline? that might help address the symptoms

20:30 ibdknox: just using lein run

20:31 I'll give trampoline a shot

20:31 technomancy: lein trampoline run will save some memory

20:31 ibdknox: we're talking 600mb here, though

20:31 lol

20:32 technomancy: just a handful of threads?

20:32 ibdknox: 3

20:32 technomancy: surely not 3 total threads?

20:33 is it even possible to have only 3 threads when using jetty?

20:33 ibdknox: yeah, it creates them as it needs them

20:33 and I just restarted it

20:34 technomancy: so is it 600 MB before responding to any requests? or after a few?

20:34 ibdknox: it jumps to 787 from about 120 after 2 concurrent requests

20:34 technomancy: O_O

20:34 ibdknox: yeah

20:34 it doesn't even go up 1mb locally

20:35 lol

20:35 I'm very confused

20:35 technomancy: can I privmsg?

20:53 tjgillies: anyone know how to stop http-server for aleph?

20:53 aphyr: (server)

20:53 tjgillies: repl driven development is new to me heh

20:54 slime is the best

20:57 aphyr: Unable to resolve symbol: server in this context

20:59 aphyr: tjgillies: presuming you bound the server you created to a variable called server.

20:59 tjgillies: aphyr: oh, well i didn't bind to anything heh

20:59 i guess im out of luck

20:59 aphyr: You can get it from the REPL history

20:59 *1, *2, etc

21:00 tjgillies: oh nice

21:00 aphyr: I think

21:01 tjgillies: i'll just restart slime and bind next time

21:01 heh

21:06 jedahu: hmm, found a bug in clojurescript: (defn next [a] (inc a))

21:07 ibdknox: ?

21:07 jedahu: hangs the repl while ram is chewed up and assigns the function to cljs.core.next when compiled

21:07 ibdknox: :refer-clojure :exclude [next]

21:08 as a workaround

21:08 jedahu: should compile to: my.ns.next = function(a) ...

21:09 ibdknox: yes, that fixes it

21:14 dnolen: jedahu: ibdknox: ticket created http://dev.clojure.org/jira/browse/CLJS-140

21:14 jedahu: dnolen: I was just writing one up :-)

21:27 axle_512_: How does one println to a stream that is not stdout?

21:27 suppose I have an seq of streams, and I want to send a string to each of them?

21:28 s/streams/outputstreams/

21:30 brehaut: ,(doc with-out)

21:30 clojurebot: Excuse me?

21:30 dgrnbrg: with-out-str

21:30 ,(doc with-out-srt)

21:30 clojurebot: Pardon?

21:30 dgrnbrg: ,(doc with-out-str)

21:30 clojurebot: "([& body]); Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any nested printing calls."

21:31 axle_512_: dgrnbrg: thanks

21:32 TimMc: axle_512_: (binding [*out* ___] ...), actually

21:32 dgrnbrg: (let [str (with-out-str body)] (map #(.print % str) seqs))

21:33 axle_512_: TimMc: thanks. So for each item in my seq, just re-bind *out* to that stream

21:33 dgrnbrg: with binding, you could interleave the IO differently

21:33 TimMc: dgrnbrg: That's an awfully roundabout way of doing it...

21:33 dgrnbrg: TimMc, you need to write the string to a temp buffer and then copy it around

21:33 axle_512_: In my case, I am thinking these would be socket connections. Thinking chat-client… I want to iterate over all the connected clients, and send the message to each of them

21:34 er chat-server

21:34 dgrnbrg: you'll want to use binding, almost certainly

21:34 TimMc: dgrnbrg: with-out-str doesn't allow streaming.

21:34 dgrnbrg: for ^^^ reasno

21:34 TimMc: with-out-str is halla handy, though

21:34 *hella

21:34 axle_512_: ok, got it. thanks guys. much appreciated.

21:35 jeremyheiler: Do you really need to rebind *out* here? If you have writers/streams, could just call println or write directly on them in a doseq.

21:35 dgrnbrg: today I wrote a macro that writes a macro that writes a function...I'm pretty pleased that it works

21:35 with nested syntax-quotes

21:36 axle_512_: jeremyheiler: how do you call println directly on the stream?

21:36 jeremyheiler: (.println stream-obj)

21:36 well

21:36 (.println stream-obj "sting to write")

21:36 brehaut: (.write stream "abc")

21:37 axle_512_: ok, so revert to java-interop for that… got it.

21:37 TimMc: Hmm, true -- if you have the data and the streams *right there*...

21:37 jeremyheiler: axle_512_: the methods on the stream are available to you.

21:37 yea

21:37 axle_512_: Thanks!

21:37 brehaut: actually, outputstream only has write byte[], no string

21:37 amalloy: TimMc: "halla". your attempt to impress the kids with your hip lingo has just made you look like you enjoy jewish egg-bread

21:38 axle_512_: brehaut: true… so I think I can convert my streams to writers

21:39 TimMc: amalloy: Challah. Fuckin' delish.

21:39 amalloy: it is, i can't argue with that

21:39 TimMc: Especially with bacon, I bet.

21:39 although it certainly doesn't need it

21:39 amalloy: a twist on the traditional bacon-and-eggs breakfast?

21:40 TimMc: sure

21:40 and lunch, and dinner

21:40 amalloy: note also the wicked pun on "twist" with the twisty challah

21:40 brehaut: its a pitty javas io lib is so class inheritance heavy :/

21:41 TimMc: amalloy: BAM

21:41 brehaut: Luckily, amalloy has a solution for you.

21:41 brehaut: TimMc: ah yeah, i think ive seen that

21:41 a nice lib

21:42 alexyk, jeremyheiler: fyi if you want print… methods you want to wrap your writer in a java.io.PrintWriter

21:42 jeremyheiler: brehaut: I know. i figured that was given (or at least implied)

21:43 brehaut: s/writer/writer,file,or outputstream/

21:43 axle_512_: understood. thanks

21:43 TimMc: There's always 'spit, yeah?

21:43 That'll take just about anything.

21:44 jeremyheiler: spit cleans up when it's done.

21:44 probalby want to keep the socket open.. maybe.. lol

21:45 brehaut: jeremyheiler: anyone who has come to clojure from non-jvm languages may well not know the ins and outs of javas IO libs

21:46 jeremyheiler: so its worth stating things

21:46 TimMc: jeremyheiler: Ooh, didn't know that.

21:46 I guess that makes sense.

21:46 jeremyheiler: brehaut: true

21:48 tjgillies: is it just me or is lein uberjar taking forever

21:48 jeremyheiler: axle_512_: check out clojure.java.io/writer for easy wrapping of a outputstream in a bufferedwriter. you could go one step further and wrap that in a PrintWriter so you can call println

21:48 ibdknox: tjgillies: you're probably running code at the top level

21:48 tjgillies: ibdknox: eh?

21:48 ibdknox: tjgillies: and as such are running it when you jar

21:48 tjgillies: oh

21:49 ibdknox: gotcha

21:49 jeremyheiler: axle_512_: I mean println the method on the printwriter, not the fucntion.

21:49 axle_512_: jeremyheiler: ok, i think I'll do exactly that

21:49 tjgillies: ibdknox: thnx

21:49 ibdknox: np

21:52 axle_512_: one other question about my chat-server learning example...

21:54 I am thinking of storing the streams (or PrintWriters actually) of all connected users in a set in an atom. When a new user joins or drops out, I adjust the set by swap!-ing in the new set. Sound like the right way to handle the concurrency and shared set?

21:54 brehaut: axle_512_: yes that seems sensible

21:54 axle_512_: behaut: thanks, I think I'm starting to get it. I'm enjoying this :-)

21:55 TimMc: axle_512_: Could any of your writes block?

21:56 brehaut: axle_512_: if by swapping in the new set you mean (swap! my-atom assoc …)

21:56 err

21:56 not assoc, conj

21:56 axle_512_: brehaut: yes, that's what I mean

21:56 brehaut: cool :)

21:56 axle_512_: TimMc: Hmm, I don't expect the writes to block… but I suppose it is possible

21:57 TimMc: The writes would be performed on the output streams bound to sockets for each remote client

22:02 ibdknox: you know, I think I might implement a rule with my projects that to submit a bug, you have to submit a pull request with a test that fails

22:02 brehaut: ibdknox: thats a pretty cool idea

22:03 ibdknox: people have been really good about giving me small repros, so I'm definitely not complaining, but it seems like a really clean way to do it

22:08 TimMc: ibdknox: For some types of projects, that sounds reasonable.

22:08 brehaut: ibdknox: might be a little tricky with korma? needing sql to be submitted as well?

22:09 ibdknox: brehaut: hm? almost all bugs with korma can be proven with strings

22:09 brehaut: i guess thats true

22:09 ibdknox: TimMc: yeah, only provable ones

22:09 lol

22:09 Korma is like the poster child for it

22:09 TimMc: I mean, there are some things I despair of writing regression test for.

22:10 alexbaranosky: ibdknox, if they don't submit a failing test, then just tell them you probably won't fix it

22:11 ibdknox: pinot would be almost impossible to do that way

22:33 jweiss: when i see a 10-line block of code like this, where every line is nearly identical https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_print.clj#L263 , I wonder why it's not written as a list and a macro? less readable? slower? seems like it would be easier to maintain at least.

22:34 ibdknox: it would be far less obvious

22:36 jweiss: to who? someone who doesn't know what macros do?

22:36 to me, that block is "do a defmethod for these 10 things)

22:37 how many such lines before it *would* be better as a macro?

22:37 (i know there's no real answer here, just looking for opinions of people who have more experience w clojure than me)

22:38 ibdknox: in that particular case I'm not sure the answer is ever

22:38 if even one of those needs to vary

22:38 at some point in the future

22:38 jweiss: ibdknox: what do you mean?

22:38 ibdknox: you've lost whatever you were gaining by the uniformity the macro would provide

22:38 brehaut: i wonder how much effort it would take to convert the cljs reader into the much discussed format preserving reader

22:39 jweiss: oh i see, you mean if one of the items had to break the pattern

22:39 ibdknox: jweiss: yeah, which doesn't seem unreasonable in that case

22:39 likewise, there's already a lot of magic going on there with the multi-methodness of it, I'm not sure it would actually make it clearer.. just add another layer of indirection

22:40 jweiss: ok. i tend to look at my own code that looks like this and say "i'm repeating myself". i suppose my code gets less clear, but i feel compelled to make it smaller :)

22:43 oakwise: does clojurescript warn about the new property access form on every method call with 0 args now?

22:43 or am I doing something weird?

22:43 ibdknox: it does

22:44 oakwise: no way to say "I get it already!"? :)

22:45 jedahu: oakwise: on the next release those warnings will be gone

22:45 oakwise: jedahu: ah great thanks

22:46 aphyr: Is there a clojure strftime?

22:48 oakwise: I found the tiniest of bugs in the Host Interop section of the cljs wiki: `(.sb toString)` should be `(.toString sb)`

22:48 ibdknox: oakwise: edit it :)

22:48 oakwise: ibdknox: I haven't signed the contrib agreement yet :\

22:49 TimMc: It's a wiki, just do it. :-)

22:49 ibdknox: you don't need to to edit the wiki

22:52 oakwise: TinMc: ibdknox: oh cool thanks. Done!

22:52 amalloy: i thought wiki was hawaiian for "slow and unwieldy, like jira"

22:52 jweiss: hehe i'm laughing because i once had to administer jira

22:52 * jweiss shudders

22:52 brehaut: amalloy: sure fast, messy and inaccurate?

22:53 s/sure/surely/

22:54 oakwise: was jira chosen b/c github wasn't around/up-to-snuff, or was it a conscious decision over other options?

22:54 brehaut: its to minimise contributions from 3rd parties

22:54 jweiss: hehe

22:54 brehaut: </jest>

22:55 jweiss: i know jira is a lot more configurable, not sure if that had anything to do with it

22:55 brehaut: it was chosen before githubs issues got decent

22:55 not sure if that was a factor

22:55 metajack: It's news to me that GitHub's issues is decent ;)

22:55 brehaut: metajack: it was worse :P

22:56 and at least its not bugzilla

22:56 oakwise: hah

22:56 metajack: i liked bugzilla if you fixed the default form to have less info and customized the queries.

22:56 TimMc: GitHub's issues feature is for completeness. It allows them to attract a much larger user base.

22:56 jweiss: i can't decide which i hate more ,jira or bugzilla . i worked on both jboss and red hat projects, so had to use both

22:56 metajack: but out of the box experience was quite poor

22:57 brehaut: 'quite'

22:59 oakwise: TimMc: they claim it's feature limited by design

22:59 http://zachholman.com/talk/how-github-uses-github-to-build-github

23:41 devn: Saddle up. This is a wonderful talk.

23:41 http://www.infoq.com/presentations/The-DCI-Architecture

23:54 https://github.com/w01fe/Clojure-traits/blob/master/src/example.clj

23:55 Interesting.

Logging service provided by n01se.net