#clojure log - Jan 04 2013

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

0:13 seangrove: If I try to set the value of an atom to the result of a (map ...) call, will the atom value be lazy or realized?

0:13 In the repl, it prints out seemingly correct, but that could be the repl forcing it to print

0:15 Ok, looks like a lazy seq

0:16 At least I caught it immediately rather than in some infuriating bug later, heh

1:24 jlewis: lol

1:24 whoops, mischan

1:31 mpan: what's the thing that's like assoc but takes k and v in a single seq argument?

1:32 I recall there being a way to reduce pairs into an empty map?

1:32 TimMc: mpan: into

1:32 mpan: TimMc: thank you!

1:47 Anonny: Can I get an example of a path in .lein-classpath should look like? (For when you're designing a lein plugin.)

1:54 Raynes: Anonny: Don't know if you saw, but I released that new version of laser a few days ago, complete with node

1:54 :p

1:55 Anonny: Raynes: I got it that morning. Thanks. It was much shorter than making the node by hand!

1:56 Raynes: Anonny: Everything going smoothly?

1:56 callen: Raynes: you need to make laser buzzword compliant and add Node.js

1:57 Anonny: Raynes: On the laser side of things....

1:57 callen: or rename it pewpew

1:57 Raynes: pewpew!

1:58 Why didn't I think of that? Best name ever.

1:59 Anonny: Raynes: sent you something in dialog window

2:02 callen: Raynes: rename it now, before it's too late.

2:02 Raynes: make a big structural change to justify the switch over

2:04 Raynes: lol

2:04 seancorfield: YO

2:07 Ember-: http://i.imgur.com/4VXXz.jpg

2:54 bbloom: i'm not sure if i'm reading the docs right for the extend function

2:54 (doc extend) ; this won't fit on IRC

2:54 clojurebot: "([atype & proto+mmaps]); Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:foo an-existing-fn :bar (fn [a b] ...) :baz (fn ([a]...) ([a b] ...)...)} BProtocol {...} ...) extend takes a type/class (or interface, see below), and one or more protocol + method map pairs. It will extend the polymorphism of the protocol's methods to call the supplied methods when an AType is

2:55 bbloom: it says "You can extend an interface to a protocol."

2:55 what exactly does that mean?

2:58 amalloy: &(doc extend) ;; lazybot is less lazy than clojurebot, bbloom

2:58 lazybot: ⇒ "([atype & proto+mmaps]); Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:foo an-existing-fn :bar (fn [a b] ...) :baz (fn ([a]...) ([a b] ...)...)} BProtocol {...} ...) extend takes a type/class (or inter... https://www.refheap.com/paste/8094

2:58 bbloom: heh, i figured people all have repls open and can doc it themselves

2:59 it makes me really sad that JVM clojure uses interfaces and not protocols everywhere :-(

2:59 Sgeocom: amalloy, I thought you meant lazy as in lazy vs strict, so was confused

3:10 bbloom: it's kinda a shame

3:10 the extend function would be brilliant

3:10 ... if clojure used protocols instead of interfaces

3:28 Sgeo: I should really read this paper on syntax parameters

3:30 jonasen: kovas_: ping

3:32 kovas_: jonasen: pong

3:32 jonasen: kovas_: I would not merge just yet

3:33 kovas_: jonasen: ok. but its exciting :)

3:33 jonasen: can't wait for the weekend for some time to hack on it

3:33 jonasen: kovas_: There's still stuff to do. I got streaming *out* to console.log working locally :)

3:34 kovas_: jonasen: sweetness

3:34 jonasen: are you coming to clojure/west?

3:34 jonasen: next, I'd like to get interrupt to work

3:35 kovas_: unfortunately not.. Way too far away :(

3:35 kovas_: jonasen: understandable

3:35 jonasen: if you get interrupt to work, ill put it in the UI

3:36 jonasen: kovas_: I already added a button for it :) But it's a no-op still

3:36 kovas_: jonasen: same with *out*

3:36 jonasen: kovas_: I've been thinking about that.. where should *out* go?

3:37 kovas_: jonasen: there are options

3:37 jonasen: first, does it get stored in datomic? I think it does

3:37 jonasen: kovas_: It does

3:37 kovas_: jonasen: its a real bummer that there is no first-class list structure in datomic

3:38 jonasen: but given the state of affairs, probably each line is an entity, with the text and the line number as attributes

3:39 jonasen: and we stream them into the UI as they happen

3:39 jonasen: kovas_: that's basically what I'm doing

3:40 kovas_: tight

3:40 you are a session master now :)

3:41 jonasen: kovas_: In the original evaluation service, you depended on the tx-queue.. is this important?

3:41 kovas_: heh.. the server side maybe. The client side is still a mystery :)

3:42 kovas_: jonasen: yes, i believe it was

3:43 jonasen: the evaluation service should only see the request after it goes into datomic. and the client should only see the response after it goes into datomic.

3:44 jonasen: so listening on the queue seems to be the right way to do that

3:44 jonasen: unfortunately the implementation is totally ugly

3:45 jonasen: as of yet, no higher level functions for e.g. listening on certain attributes

3:45 jonasen: kovas_: Yes, I didn't do it that way. My thinking was that you can rely on it being in datomic if (d/transact ...) succeeds (ACID and all that)

3:46 kovas_: But I can change it to a queue based desing.. that won't be a problem

3:47 *design

3:47 kovas_: yeah, i think thats necessary for it to work in the general case

3:48 right now both the "session service" and the "service called by the session service" are in the same process, so you can do that

3:48 but in general, the evaluation service should be able to participate solely via datomic transactions

3:49 (this distinction is totally complected in the current implementation so its pretty subtle)

3:50 jonasen: kovas_: I kind of agree. Since we use websockets we can totally seperate the request from the response (via the datomic transaction queue)

3:51 It's too bad that (:a datom) returns the entity id instead of the attribute keyword. It makes querying the queue much more awkward

3:53 kovas_: jonasen: yeah thats a total PITA. There must be a better way.

3:53 jonasen: kovas_: sorry if I miss some of your responses, I'm on a *very* shaky network today

3:54 kovas_: jonasen: np. I gotta go to sleep anyway, almost 4am here :0 keep up the good work!

3:55 jonasen: kovas_: Session is too fun to work on! Talk to you later

7:20 flying_rhino: hello

7:27 sundbp: Hi. if i'm actively working with 2 different leinigen projects where project A depends on project B - what's the smoothest way to do it so that A easily picks up the local changes made to B?

7:30 ejackson: sundbp: there are checkout deps: http://stackoverflow.com/questions/8335709/how-can-i-set-up-leiningen-to-work-with-multiple-projects

7:30 sundbp: that's what i'm looking for

7:30 thanks

7:30 ejackson: np

8:42 flying_rhino: hi guys, anyone heard of Grok project at Google?

9:31 jcromartie: so women

9:31 why don't they program

9:31 the age old question right?

9:31 https://twitter.com/puredanger/status/287196600869199873

9:32 p_l|work: the second answer :D

9:32 llasram: I'm going to go with "sexism"

9:33 cemerick: llasram: Probably only a problem on the margins.

9:33 Aggregating all the times I've hired programmers, I think I only got 1-2 resumés from women.

9:33 jcromartie: even if it's just culturally determined, it might be possible that men are geared to modeling the state of a system in their head

9:34 llasram: Oh, I don't mean that men are being preferentially hired

9:34 jcromartie: that's seen as the critical mental skill in programming

9:34 cemerick: There is an imbalance in STEM fields in general.

9:34 jcromartie: and functional programming kind of turns that on its head

9:34 chouser: Is this a pull request that got merged into a contrib lib? https://github.com/clojure/math.combinatorics/pull/1 That's not supposed to happen, is it?

9:35 llasram: I mean that there are a broad array of biases which (a) have pushed women away from STEM in general at young ages, and (b) a sexist culture in technology makes it more difficult for women to work on a personal level, so even fewer then elect to stay in it

9:36 pjstadig: chouser: a PR is just a branch that could/should be merged, and if you merge it manually with git the PR will get closed automatically

9:36 but i guess the jira process even for contrib is patches in jira?

9:36 not merging branches

9:36 chouser: that was my understanding.

9:36 cemerick: chouser: ut-oh

9:38 TimMc: jcromartie: I don't knwo that it's anything specific to Clojure.

9:38 pjstadig: in reality there's no difference between merging a branch and applying a patch

9:38 jcromartie: TimMc: no, but it might be an interesting thing to investigate

9:38 pjstadig: but *sigh* i digress

9:38 gfredericks: idea: for projects named foo, use the ns naming convention foo.lib.* for utility functions that aren't app-specific and could be pulled into a separate lib if it was worth it

9:38 jcromartie: TimMc: vs. more stateful languages/paradigms

9:38 pjstadig: have we had our bi-weekly CA discussion yet?

9:38 chouser: It looks like the author of the PR has his CA in, so that's good at least.

9:39 TimMc: jcromartie: I suspect that since the Clojure world is relatively small, it's harder for women to "break in" just because of the boy's-club effect.

9:39 so the size may be more relevant

9:39 `fogus: I "solve" the merge problem by writing contrib libraries that no one contributes to. :-o

9:40 jcromartie: TimMc: I don't see a "boy's club" in the Clojure community… people are polite here. A "boy's club" carries a connotation of crude jokes and sexism.

9:40 TimMc: Hmm, that's fair. I guess that's not what I meant.

9:40 jcromartie: yeah, I get what you mean though

9:41 some other languages *ahem* are known for having four-letter words and porn in presentations at conferences

9:41 chouser: `fogus: brilliant

9:41 TimMc: As a marginalized group, women in STEM probably look to see where the other women are -- which penalizes small communities.

9:42 `fogus: STEM?

9:42 TimMc: That's just my guess, though. I'm sure there's some good research already out there.

9:42 Science, Technology, Engineering, Math -- I think

9:42 `fogus: Oh! Right.

9:42 I thought it was a new language.

9:42 TimMc: Acronym guessing is fun!

9:43 jcromartie: the fact is that men demonstrate a greater variability in mathematical aptitude, and so there are more men in elite STEM fields simply due to that

9:43 llasram: TimMc: Being large enough to have focused evangelism definitely helps. An acquaintance of mine started a PyLadies group a few months ago, and it's been going like gangbusters

9:43 Sgeo: Oh woah, a Racket person is giving a talk at Clojure/West

9:43 TimMc: llasram: I personally know two women who use Python, but they're both scientists, so... :-)

9:43 * ejackson figures women are too smart to choose this as a career :P

9:44 TimMc: jcromartie: Variability? Ah, that's interesting!

9:44 jballanc: I probably already know the answer to this, but is there a more idiomatic way of turning a string into an int than (Integer. int-str) ?

9:45 jcromartie: jballanc: that's pretty good

9:45 TimMc: jballanc: (Integer/parseInt x) :-P

9:45 I dunno, that's just the form I use. read-string has way more complications than you probably want to deal with.

9:45 but it's there

9:45 llasram: Or, Long/parseLong since Clojure prefers longs for primitive integral values

9:46 jballanc: yeah, just seems...I dunno...mildly dissapointing that something so central relys on the host platform

9:46 I guess read-string doesn't, but everything I've seen suggests shying away from that

9:46 not to mention the issue with user-input strings

9:47 llasram: Or, you could look at it as a good thing that the language doesn't bother wrapping things trivially provided by the host platform :-)

9:47 jballanc: I suppose...

9:47 but then what's the CLJS equivalent?

9:47 jcromartie: jballanc: number parsing is a fiddly little thing

9:48 jballanc: there are too many ways to do it

9:48 TimMc: jballanc: Clojure is host-embracing.

9:48 jballanc: well...host embracing is one thing...host dependent is something else

9:48 TimMc: It would be nice if it were wrapped, though -- you can't map Long/parseLong over a list.

9:48 jballanc: so, for example, I want to turn a 'content-length' header into an integer value

9:48 * ejackson asserts that the fact that so few women have signed the CA means we need to change the CA process.

9:48 jcromartie: jballanc: do you want an exception when it's an invalid format? or do you want a nil? or zero? do you want to round it if it has a fractional part? what if it's octal or hex?

9:49 jballanc: jcromartie: yeah...I know it's not easy...but even the "happy path" conversion isn't abstracted

9:49 means that I have to write different code for clojure vs clojurescript vs clojure-something-else

9:50 jcromartie: jballanc: hm, good point

9:50 TimMc: ejackson: You clever bastard.

9:50 pjstadig: jcromartie: oh yeah, i forgot that no other language has ever solved the problem of parsing ints portable :p

9:50 jballanc: i.e. in my case of a content-length header from an http request, that should almost always be a well-formed integer-as-a-string

9:50 jcromartie: pjstadig: example?

9:51 pjstadig: Ruby, Python

9:51 Perl

9:51 Basic

9:51 i don't know

9:51 C

9:51 jballanc: ...and if it isn't well formed, then it's a violation of the http protocol, so I have bigger problems

9:53 jcromartie: pjstadig: those languages do have platform-specific quirks with regards to data types

9:53 pjstadig: Java

9:53 jballanc: heh

9:53 pjstadig: jcromartie: example?

9:53 jcromartie: pjstadig: so, yeah :)

9:53 jballanc: yeah, I can attest that Ruby has platform-specific quirks

9:54 pjstadig: jcromartie: all we're talking about is "3" -> 3

9:54 jcromartie: so Clojure probably needs parse-int, but would it just defer to the host? and have different behaviors on JS vs JVM?

9:55 Sgeo: Is Clojure so host-embracing that if I were to write Racket-Clojure, reading an int when the string's not an int should return false?

9:55 pjstadig: Clojure's hostiness means that there are semantic differences between Clojure and ClojureScript

9:55 Sgeo: Because that's what Racket's string->number does

9:55 cemerick: ejackson: I endorse that notion as a decent null hypothesis

9:55 pjstadig: it doesn't mean that it's impossible to make abstractions

9:58 jcromartie: I don't think Clojure needs an abstraction around number parsing in core...

9:59 a lib maybe

9:59 it kind of sounds crazy to suggest that number parsing should be a lib though :)

9:59 jballanc: heh, yeah

10:00 I guess one solution would be to modify the http request libraries to return numeric values for things that are expected to be numerical

10:00 ...but I doubt this would be the only example of needing something basic

10:00 cemerick: jcromartie: just part of having a numeric tower

10:00 jballanc: cemerick: is that in the current numeric tower impl?

10:02 cemerick: jballanc: which one? :-P

10:02 jballanc: d'oh... :(

10:02 pjstadig: cemerick: the one that's implemented as a lib :)

10:03 cemerick: pjstadig: which one? :-P

10:03 pjstadig: haha

10:03 jcromartie: I take it all back http://io9.com/5867401/there-really-is-no-difference-between-men-and-womens-math-abilities

10:03 maybe

10:07 cemerick: jcromartie: once math is made as cool as playing FarmVille, then progress will come quickly

10:07 viz. https://twitter.com/cemerick/status/287054644021174272

10:07 jcromartie: cemerick: ouch

10:07 number munchers, man

10:07 * cemerick is probably dating himself w/ the farmville reference

10:07 cemerick: ouch?

10:07 clojurebot: ouch is <repl> what are you, a north korean seamstress

10:08 jcromartie: cemerick: I assumed you meant women playing FarmVille was a cause for the STEM imbalance

10:08 cemerick: my bad :)

10:08 cemerick: hah, no

10:09 I mean, if an activity is considered socially acceptable, nay, cool and aspirational, then lots of things change.

10:09 jcromartie: yes

10:10 cemerick: Being good at math was considered a black mark for everyone in my high school.

10:10 "nerds that take calculus", etc.

10:10 There's a big social/class component there.

10:11 ...which gets it start years prior, with parents and other family that are either present and pushing math and science...or not.

10:15 jaju: Hello people. I can a problem that I have described at: https://gist.github.com/4453240 - Can someone guide me as to what I am missing? I can provide more context.

10:15 can => have (oops!)

10:16 jballanc: cemerick: I suspect part of the issue is also the degre to which failure is accepted at the critical stage where things like math and science start getting hard

10:16 jcromartie: cemerick: yeah, definitely, programming is probably the least cool thing a girl could do in HS

10:16 cemerick: unless she wanted to be swarmed by the guys that program… which, I don't know about that...

10:17 jaju: I have hugely simplified it - making assumptions as to what would be relevant to describe the problem.

10:18 chouser: But none of that matters when it comes to tech conferences, because for those it's obviously up to the organizers to make sure they meet their quota of female speakers.

10:19 jcromartie: chouser: aren't things like quotas sexist, though? if you don't have a pool of qualified women to begin with, you end up with crappy speakers...

10:19 you end up choosing or rejecting speakers based on sex, not qualifications

10:19 chouser: jcromartie: sorry, I forgot to put a joke marker on that one. Please add a ":-)"

10:19 jcromartie: oh right :)

10:20 clojure-newb: hey guys, I'm trying to find a reference somewhere to what '%' does in clojure, seems hard to find for me at least

10:21 jcromartie: I have to say, my experience with female programmers is that I don't have a large enough sample size to have met a good one… so that really makes it hard to be unbiased.

10:21 cemerick: jaju: I can't think of a reason why there'd be a difference between the two.

10:21 jcromartie: clojure-newb: what's the context?

10:21 clojure-newb: jcromartie: (and main (some #(.exists (io/file % (b/path-for main))) source-paths))

10:21 llasram: clojure-newb: In anonymous function defined with the #(...) reader macro syntax, it's the first argument

10:22 ejackson: clojure-newb: its used as an argument to anonymous functions

10:22 jcromartie: clojure-newb: #(do %) roughly equals (fn [x] x)

10:22 jaju: cemerick: Thanks. True, and I have spent the better part of my day getting frustrated at finding out why. I've left out a lot of context to keep the sample simple - is there any remote possibility of something affecting the behavior?

10:23 clojure-newb: thx guys, so if I go read up on anonymous functions again I should find some reference to this

10:23 just did not know where to look

10:23 jcromartie: ,(macroexpand-1 '#(foo %))

10:23 clojurebot: (fn* [p1__27#] (foo p1__27#))

10:23 ejackson: clojure-newb: yeah, wait till you try figure out what ` does :)

10:23 jcromartie: clojure-newb: #() just expands like that

10:24 clojure-newb: ejackson: yeah, I got to go play in the REPL I think

10:27 oh I see… '%' is a synonym for %1

10:28 ejackson: yup

10:28 cemerick: jcromartie: there's all sorts of "soft quotas"; e.g. a Clojure conf organizer might want to hit a 70/30 mix of Clojure/ClojureScript talks. If diversity is thought to be a desirable quality of a conf (along with speaker qualifications), then working to have more women and non-anglo speakers is valid.

10:28 clojure-newb: for some reason I was happily using %1 by default everywhere

10:30 jcromartie: cemerick: true

10:31 so this is sort of the basis of my hypothesis that men are better at managing mental models of mutable state in programming: http://en.wikipedia.org/wiki/Spatial_visualization_ability#Gender_differences

10:31 * ejackson gets onto speaker lists by pretending to be from abroad. Diversity quota and a fat cheque for me. Winner.

10:31 jcromartie: but the difference could be trained

10:31 dunno

10:32 cemerick: ejackson: If only you hadn't published photos of yourself and describe your origins as 'Africa', unqualified. :-P

10:32 jcromartie: but I generally think that modeling the state of a program is a spatial task

10:32 but I am not a scientician

10:32 ejackson: its all true, when I move to the US I fully intend to describe myself as an African American!

10:33 cemerick: 'scientician' should be a word ;-)

10:33 ejackson: cemerick: YES !!!

10:33 cemerick: jcromartie: if that were a problem (something that seems tenuous to me), it still wouldn't be the first order problem. If it were, then we'd have a large number of less-capable women programmers, not essentially-zero women programmers.

10:34 jcromartie: cemerick: obviously some women can be programmers, that much we know for a fact :) from that point we are working on hypothesis

10:35 I think I have only worked with 4 female programmers. One of them knew what she was doing.

10:35 So that's about right.

10:35 For the distribution of all programmers who know what they are doing.

10:35 ejackson: better ratio than among men

10:36 jcromartie: hah yeah, I'd imagine the ratio would fall as my sample size grew

10:36 xbat: hello! i'm a beginner

10:37 i've got lein to work, but all my code is in just one file, and it's getting rather long

10:37 llasram: xbat: Hello!

10:37 acuzio: xbat: namespaces

10:37 xbat: and i can't work out how the namespaces work

10:37 right

10:37 i use (ns namegoeshere) at the top of the new file

10:38 but then how to i import it from the call one?

10:38 it keeps saying er Exception in thread "main" java.lang.ClassNotFoundException:

10:39 hyPiRion: (:require other.namespace)

10:39 llasram: jcromartie: Have you seen this? Was on HN etc when it was first posted. http://therealkatie.net/blog/2012/mar/21/lighten-up/

10:39 craigbro: hey,some nrepl issues to sort out here

10:39 llasram: jcromartie: From the women I know in tech and what I observe, I think what that post describes is the biggest problem

10:40 chouser: I've worked with a handful of female programmers. The worst among them was far more reliable than the worst male programmers I've worked with. The best were on par with some of the best males. They were all among the most pleasant colleagues to work with.

10:40 Is there something to see there?

10:40 jlewis: +1 on that... enough with the casual sexism

10:40 craigbro: I am using nrepl and when I try to complete a symbol in the repl buffer, it throws an error about not finding a class (the class name is the namespace of the symbol i'm tring to complete via long-form some.class.name/startofsymb<TAB>

10:41 works with short-form symbol completion tho

10:41 jcromartie: llasram: I'd say that stuff is not subtle at all. That's pretty overt, if you ask me.

10:42 cemerick: chouser: mostly that it's a pity that "a handful" seems to be typical

10:42 jaju: craigbro: What's your setup like?

10:43 chouser: cemerick: hm, yes.

10:43 llasram: jcromartie: Then count yourself as part of the solution?

10:43 matthavener: chouser: same experience, except last two places i've been were close to 50/50 male/female ratio

10:44 craigbro: jaju, I load nrepl.el

10:44 that is all

10:44 I nrepl-jack-in

10:44 everything else works, short-form symbol completion is fine, just no long-form

10:45 ejackson: There is nothing inate that prevents women being coders, civil engineers (my sister is one) or any other male-dominated thing, nor men being nurses, primary school teachers or taking care of the kids (or flight-attendants as we have seen post 9/11). But we structure our society against it. Even if Clojure became super friendly to women I wouldn't expect a rise in the number of female speakers at conferences. It suc

10:45 ks, but that's it.

10:45 craigbro: what url is this conversation in reference too?

10:45 err, post

10:46 cemerick: ejackson: you're one of those optimists I always hear about :-P

10:46 * ejackson shoos cemerick of his damn lawn

10:46 cemerick: craigbro: probably puredanger's recent tweet?

10:47 ejackson: my family is filled with women who overachieve in male fields, but they take a lot of stick for it, in those fields and in society at large

10:47 jaju: Ah. Not sure, but I had similar problems with nrepl-jack-in. I switched to doing "lein repl" and then a plain "nrepl" in emacs.

10:48 xbat: nope, still can't find the new namespace

10:48 maybe i need to edit project.clj?

10:48 ejackson: xbat: are your files correctly named, and in the right directories ?

10:48 cemerick: At the very least, if the Clojure community becomes more inclusive, then male Clojure programmers will become more attuned to the issues, and might positively influence their daughters, etc.

10:48 xbat: ie: it's not compiling or something

10:48 i don't know

10:48 that's what i'm asking

10:48 * cemerick is playing long ball

10:48 xbat: i put the new one in the same directory as core.clj

10:49 ejackson: xbat: that should be fine

10:49 xbat: right, but it's not seeing it

10:49 what should i put in the ns thing at the top of the new file

10:49 ejackson: cemerick: psychohistory, huh.

10:49 xbat: projectname.namespacename ?

10:49 chouser: None of my kids of either gender seem particularly interested in programming. Maybe I'm representing the activity badly across the board.

10:49 ejackson: xbat: yup

10:49 xbat: or project/namespace ?

10:49 or just namespacename ?

10:49 jaju: craigbro: I never bothered to check nrepl-jack-in once I started using the workaround

10:50 xbat: ok

10:50 well i'll keep trying different versions 'til something works, then :(

10:50 (i was hoping there was something obvs i was missing)

10:50 llasram: xbat: Each file needs an (ns) form at the top, and the namespace name for each needs to match the file path

10:50 jballanc: chouser: honestly, I don't know how much interest I'd have shown in programming if not for Apple IIe BASIC

10:50 xbat: ok

10:50 ejackson: xbat: try grabbing an example from somewhere and basing your work of that.

10:51 llasram: xbat: So within your project 'src' directory, you have "myproject/mynamespace.clj"

10:51 xbat: That needs (ns myproject.mynamespace)

10:52 xbat: oh, so it is a dot, not a slash

10:52 chouser: jballanc: there are options now -- khan academy sandbox and scratch have each generated temporary interest at my house, but neither have had the staying power of origami, crafts, video games, etc.

10:52 cemerick: ejackson: I presume you mean from foundation? Perhaps. Just a variation of "think globally, act locally"

10:52 cmajor7: upgrading from lein1 to lein2. used "lein precate" to update the "project.clj". have ":java-source-paths ["src/xyz/java"]". lein2 compiles java, but is unable to find it when compiling clojure that imports those java artifacts (e.g. (:import org.xyz.Blah))

10:52 jaju: chouser: How old are they? My kids show no interest either, but I'd think it's the age-factor.

10:52 chouser: 5 through 10

10:53 jcromartie: http://www.engr.utexas.edu/wep/firstsecond/visualization

10:53 llasram: xbat: Right. Clojure uses '.' to separate namespace elements. Which mostly only matter in getting mapped to directories for finding source to load

10:53 jaju: 5.5 and 7.5 - and they show no interest (yet)

10:53 xbat: ahha!

10:53 right, that worked :)

10:53 thanks a ton

10:54 ejackson: cemerick: yeah. I do agree that we should actively encourage women in our community as much as possible. If that means we get a few more dodgy talks at conferences, its a small price.

10:54 jcromartie: I can't get my 2.75-year-old to program, and it makes me sad.

10:54 chouser: would giving a dodgy talk be encouraging?

10:54 jcromartie: I might be jumping the gun.

10:54 ejackson: I doubt much will come of it, but the effort should be taken.

10:55 jcromartie: I find "dodgy" talks to be embarrassing and discouraging.

10:55 cemerick: ejackson: I doubt it'll result in anything dodgy. From an organizer's standpoint, it probably just means inviting potential speakers that might not send in a proposal. Sweetening the travel stipend and such might be effective, too.

10:55 jcromartie: you don't want to make the few women in the audience *facepalm*

10:56 `fogus: Talk of dodgy talks seems speculative to me

10:57 cemerick: ...especially given the frequency of dodgy talks that already pop up at confs. :-P

10:58 `fogus: (inc cemerick)

10:58 lazybot: ⇒ 12

10:58 ejackson: cemerick: oh yeah, I agree with that. I was just debunking the principal objection raised that if the pool of female clojurists is small, then having many talks by females will have an effect on quality.

10:58 * cemerick waits for someone to suggest that he shouldn't throw stones, etc ;-)

10:59 ejackson: sorry that I wasn't clear on that.

10:59 TimMc: ejackson: For all I know, the pool of female potential speakers may be *higher* quality, since they've got more to prove in our society...

10:59 cemerick: ejackson: ambiguity and mixed signals in irc? Never!!!1!

10:59 ;-)

11:02 ejackson: my attempted point was that the main objection raised is empty.

11:02 TimMc: The travel stipend suggestion sounds like a good way to make the pool larger, which would circumvent any potential size-related problem.

11:03 ejackson: i'm not sure, the travel budget is not meant to be profitable !

11:03 (despite my earlier jesting)

11:04 i think reaching out and making direct invitations is a good idea.

11:04 cemerick: I hereby waive any travel stipends I'm awarded to make it a wash for at least one person.

11:05 TimMc: :-)

11:05 `fogus: I infer that reading Joy of Clojure will make you a worse Clojurist -> http://goodstuffahead.com/t/clojure

11:06 TimMc: aw

11:06 chouser: heh

11:06 cemerick: retribution for infix

11:07 llasram: `fogus: It makes you a bettor Clojurista instead?

11:07 `fogus: It's painful to get beaten out by not one, but two Erlang books! ;-)

11:07 llasram: Well, maybe if you updated it for a modern Clojure version. Srsly

11:07 pjstadig: `fogus: rest assured that list seems dubious to me

11:07 ejackson: according to whom ?

11:08 `fogus: llasram: That's a great idea

11:09 abp: http://www.reddit.com/r/Clojure/comments/15wosh/clojure_functional_programming_books_site_written/c7qmg2q

11:09 cemerick: `fogus: the real problem is you haven't spread the payola around enough ;-)

11:09 * ejackson figures fogus is the only person to have actually read all those books

11:09 llasram: `fogus: I was joking, but a refresh couldn't hurt. It is still my fave Clojure book though

11:09 (inc `fogus)

11:09 lazybot: ⇒ 1

11:10 craigbro: hmm, note to self, do not put desk in front of south facing window in winter

11:10 sun in eyes all day

11:10 pjstadig: speaking of teaching programming to children male or female, does anyone recommend this book? http://www.laurenipsum.org/

11:11 jcromartie: http://www.humantechnology.jyu.fi/articles/volume4/2008/jones-burnett.pdf

11:11 looks like spatial ability does correlate with programming ability

11:11 fortunately it can be learned

11:11 but does functional programming reduce the need for the spatial ability?

11:12 abp: `fogus The reasoning in his comment is still leaving me speechless.

11:13 `fogus: abp: Well, I can't fault him if he didn't like it. It happens.

11:13 llasram: I think you mean "burn the heretic!"

11:15 cemerick: llasram: isn't it 'nonbeliever'? (assuming you were recalling Life of Brian there)

11:15 chouser: I think midwestern programmers are under-represented among conference speakers, and in tech companies in general.

11:15 abp: Information density isn't for everyone, perhaps. I love the style of writing.

11:15 craigbro: meh

11:16 jcromartie: chouser: midwesterners are not evenly distributed, women are….

11:16 craigbro: apparently not

11:16 jcromartie: they are rather concentrated in the midwest

11:16 maybe we should disperse them

11:16 or get more circummidwesterners to move inwards

11:17 craigbro: I think it's a liberal boondoggle myself

11:17 chouser: midwesterners can move, but you know what they say about taking the programmer out of indiana

11:17 craigbro: yes, more women in programming is good. However, it's like the banner people pick up

11:17 `fogus: craigbro: "liberal boondoggle"?

11:18 craigbro: be kind, help others, and respect diversity of neurological/cutlural backgrounds

11:18 sometimes that means "women in programming" groups and active support for women

11:18 `fogus: Is boondoggle good or bad?

11:18 jcromartie: so if women are better at verbal and worse at spatial, could functional programming be a more-verbal and less-spatial paradigm, and therefore could functional languages be better positioned to recruit females to their communities?

11:19 without trying to improve womens' spatial abilities

11:19 craigbro: `fogus: by boondoggle I mean, a project that is well intentioned but misses the real mark

11:20 jcromartie: I think any idea of gender based neurological/cognitive difference is bogus -- within populations there is far greater diversity along those vectors than consistent difference across the two (at least at the level of the profession/practice of programming)

11:21 jcromartie: craigbro: I think you'd be politically correct but factually wrong.

11:21 llasram: cemerick: I apparently meant "kill the heretic" http://www.youtube.com/watch?v=krb2OdQksMc#t=274s But yes :-)

11:21 craigbro: `fogus: not saying don't support women in programming, or do projects to helpthem explicitely, but I think it's bordering on an internet 'meme' of community disparagement

11:22 `fogus: craigbro: I have no idea if that's right

11:23 TimMc: jcromartie: It may be factually wrong but still pragmatically correct to believe.

11:23 ejackson: is the representation of women in clojure lower than coding in general ?

11:23 craigbro: jcromartie: What? because my reading of cognitive and neurological studies has a different result than you, I am now being politically correct?

11:23 TimMc: That is, a small statistical difference may not have any relevance to building a better society.

11:23 *to methods of

11:24 Anyway, I doubt any discovered difference can acocunt for the massive disparity we see today.

11:24 jcromartie: craigbro: the studies that show differences and the studies that show no differences are not contradictory, they are for different areas

11:24 nDuff: ...there's also no small amount of cultural impact. My fiancee was raised in a wealthy, principally-black community; her impression from her high-school years was that among men, sports starts were idolized, while women were pushed towards science and math.

11:25 craigbro: jcromartie: I did not say no difference. I said greater diversity within group -- aka the "deviation" is on par or stronger than gender correlation

11:25 ejackson: nDuff: seriously ! That's interesting.

11:26 jcromartie: yeah, all said, I'm sure the social aspects are far bigger: workplace sexism; conditioning; etc.

11:26 is there a drive to recruit more female deisel mechanics?

11:26 or more female garbage collectors?

11:27 craigbro: such jobs do not tend to have the self self-valorization of programming 8^)

11:28 ejackson: craigbro: good observation.

11:29 `fogus: Maybe those fields don't see a lack of gender equality to be a problem?

11:29 I have no idea

11:30 tmciver: craigbro: that's your opinion. How about we let females (or whatever group we happen to be talking about) decide for themselves what valor-inducing job they want.

11:30 ejackson: tmciver: i think he was jesting...

11:31 my lord, what a conversation to try have on IRC !

11:31 i think most of us agree that diversity is good for a community, and we are certainly not a diverse community (along several dimensions)

11:32 how to change that, well...

11:32 tmciver: ejackson: what kind of diversity? Diversity of thought, or diversity of sex, race, religion?

11:32 ejackson: tmciver: all of the above.

11:32 chouser: Also, moral good or practical good?

11:33 ejackson: both

11:33 our context, down to the language we speak, affects the thoughts we have, and so how we code

11:33 tmciver: Diversity of thought should be, IMHO, all that matters. I don't care about the others.

11:33 ejackson: having diverse people brings in different ways of thinking

11:34 this is a practical good

11:34 chouser: Ah, well, morality is a whole other thing. For a practical good, I'm content to make efforts to improve the team I'm working with in that regard, and let the rest of the industry worry about itself.

11:34 jballanc: tmciver: the trick is that it's really, really hard to identify what makes for a good diversity of thought a priori

11:34 ejackson: chouser: i think that's good for the wider community too !

11:35 TimMc: tmciver: The gender imbalance may or may not directly be bad for the Clojure community, but is indicative of a problem in the larger (human) community.

11:35 `fogus: tmciver: Very often people different than you and me come from very different backgrounds leading to very different experiences leading to very diverse ideas

11:35 craigbro: a think it is an amusing habit of programmers to think of "thought" or "skill" as things that are distinct from the rest of the human -- it's a sort of myopic egalitarian conceit

11:35 tmciver: `fogus: agreed, but that falls under 'diversity of thought' for me.

11:35 chouser: I think the whole idea of increasing the percentage of women in the industry is somewhat orthogonal to the specific treatment of individual women in certain sub-communities, conferences, etc. I'm much more likely to be persuaded about the moral component of the latter.

11:35 ejackson: diversity of thought arises directly from the other diversities

11:36 jballanc: chouser: likewise...and, let's be honest, most of the behavior that people identify as driving away women/minorities is just straight-out not professional behavior to begin with

11:37 eh, forget professional...I've seen a lot of behavior that would embarras me even if it were just a close circle of friends

11:37 craigbro: jballanc: yes. I think that's the case most of the time -- however, even professional behavior can mask assumtions. Like the boss always asking the women on the team to be in charge of organizing the surprise going away party for leaving party member

11:37 chouser: jballanc: yes. And if a specific incident harder for someone to deal with because they have had to deal with many more such indidents than a non-minority, then so much more shame on the one perpetrating it.

11:37 tmciver: If there's a gender imbalance in a particular industry I don't care what the reason is as long as a group is not being actively discriminated against.

11:38 An imbalance might be due to either lack of interest or lack of ability.

11:38 ohpauleez: I'm catching up here - is all of this in response to something specific?

11:38 ejackson: ohpauleez: I think it was the tweet from @puredanger

11:38 craigbro: ohpauleez: some discussion on twitter about the issue of gender imbalance

11:38 ohpauleez: ahh gotcha

11:39 TimMc: tmciver: True, but I really do think in this case that it's a matter of cultural prejudices.

11:39 jballanc: tmciver: There's a third possibility... women and men may not differ in interest or ability, but I think there's no denying that there are developmental differences

11:39 `fogus: chouser: I think I agree with you. Concrete bad behavior can be more easily addressed than societal issues.

11:39 ejackson: `fogus: can we identify any such behaviour in our community?

11:39 craigbro: "community" is a construct of little value

11:40 `fogus: ejackson: Not that I know of. But I've not had the full range of experiences (and probably never will)

11:40 craigbro: the behavior is social, so you have to look at individuals in specific social contexts

11:40 aka, people at cons, on IRC, in blog posts etc...

11:40 ejackson: community: the aggregation of our mailing list, IRC, Githubs, conferences etc

11:40 oh, we agree :)

11:40 craigbro: aka, look at social interactions, not over-reified notions of a "community" being good or bad

11:41 ejackson: the reificiation of community results in it collecting the sins of individuals, and then painting member with that same brush

11:41 ejackson: `fogus: this is the problem right. Are you saying that its hard for us to identify such behaviour as we don't necessarily know what it is ?

11:42 craigbro: ejackson: look at the whole 29c3 blowup for example -- suddenly even peopel doing supportive acts were assumed to be acting out of some horrid motive attributed to them via association with a unreedmably bad and gender-biased "community"

11:42 * ejackson doesn't know what 29c3 is....

11:43 ejackson: aaah them !

11:43 craigbro: also concentrating on concrete social interactions is alot more effective for identifying and coutner-acting the biases

11:43 aka, fix your interactions and your immediate social groupings, not try and fix a "community" in the abstract

11:45 * ejackson notes that none of this has helped him write that xpath he wanted 30mins ago

11:45 `fogus: ejackson: I think that's part of it. The other part of it is that as a white male living in the US, I rarely have people say things that are meant to belittle me in sexual/racial/cultural ways.

11:45 craigbro: see what happens when I'm waiting for a scaling/perf test to complete???

11:45 lazybot: craigbro: Yes, 100% for sure.

11:45 nDuff: ejackson: Could you repost the question?

11:47 craigbro: core.logic and SQLKorma killed my ORM

11:47 ejackson: nDuff: oh I never posted it... it was just what I was working on before I got sucked into this

11:47 craigbro: hallelujah, it's dead

11:47 ejackson: `fogus: yes, I understand.

11:48 craigbro: finally making the transition to nrepl from swank/slime

11:49 `fogus: ejackson: And when it does happen it doesn't bother me because it's so rare that I can easily dismiss it. My wife on the other hand...

11:49 chouser: As a midwestern Christian, I often hear things said that belittle me in a cultural way. But maybe that's not quite the same thing. :-)

11:50 `fogus: chouser: Right! That never happens to me, so while I can sympathize it's hard to put myself in your shoes and tell if there is a strong anti-Midwestern-Christian bias. :-(

11:50 ejackson: I could start a Fogus Belittlement League, if that would help :P

11:50 craigbro: yah, what kind of name is that anyways?

11:50 * `fogus hopes there isn't

11:51 `fogus: ejackson: have it me

11:51 craigbro: sounds more than foreign, sounds, alien

11:51 made-up, like John Smallberries or John BigBoutte

11:51 * ejackson lacks the courage to take on fogus.

11:51 ejackson: So we should ask, then ?

11:51 TimMc: Who shall bell the cat?

11:52 craigbro: I'm sure he's been called Bogus before, so we gotta do better than that

11:53 `fogus: Yeah. I got over that by 2nd grade

11:54 TimMc: There's gotta be some good acronym we can make.

11:54 jballanc: yeah, I recently experienced first-hand just how obscure and unexpected belittlement can be

11:55 TimMc: What's the phrase again? "Bigotry is fractal."

11:55 jballanc: I moved with my wife to Turkey, and then had to fly to Frankfurt for business...the guy at passport control asked "How long will you be staying in Europe?"

11:55 ...and I found myself slightly insulted by that

11:55 I mean...it's a crazy thing to be insulted by...but there you have it

11:56 I really wanted to snarkily reply "As long as I damn well please, seing as I live in Europe..." but I thought better of it and let it go

11:56 chouser: jballanc: sorry if I'm slow on the uptake -- insulting because Turkey is also Europe but he was implying it wasn't?

11:56 jballanc: yeah

11:56 actually, it's not just specific to Turkey

11:56 when you enter the Schengen zone they ask you about your stay in "Europe"

11:56 TimMc: haha

11:57 jballanc: even though Schengen doesn't actually cover all of *Europe*

11:57 ...it just made me realize how completely context-dependent "belittlement" can be

11:58 TimMc: It probably wasn't seen as belittlement by the passport control agent.

11:58 wreckimnaked: _Europe_ isn't really a precise concept, is it?

11:58 TimMc: Micro-aggressions.

11:58 jballanc: TimMc: exactly! I'm sure he thought nothing of it

11:58 TimMc: wreckimnaked: I've never been clear on this alleged Europe/Asia boundary.

11:58 ejackson: right, I'm going to gym, for my paid-for belittling !

11:58 jballanc: and that one occasion didn't really mean anything to me

11:59 but I could see how little things like that could add up over time to really alter someones outlook

11:59 TimMc: Going barefoot has helped me understand that concept. Over time, the "clever" remarks really add up.

12:00 craigbro: and then core.logic ate my dog, and I haven't been able to get all the blood our of the rug

12:01 wreckimnaked: I've just came back from a trip to Prague for New Year's Eve

12:01 Czechs don't like the term _Eastern Europe_

12:01 they prefer to be on _Central Europe_

12:02 pipeline: which is probably more correct

12:02 TimMc: wreckimnaked: "Well, it's east of everything *important*, see?"

12:02 wreckimnaked: yes

12:02 pipeline: well, it used to BE eastern europe

12:02 you know before 1991

12:03 n_b: many in the UK prefer not to be Europe at all

12:03 pipeline: central europe stopped being a thing for about fifty years ;)

12:03 TimMc: I just want to say... <3 this IRC channel for having this discussion, and having it in a polite, civil, constructive way.

12:03 n_b: the continent is still a massive geopolitical tangle

12:04 TimMc: wreckimnaked: And Russia's up there having an identity crisis or something.

12:04 wreckimnaked: TimMc: I have plans on visiting Russia soon

12:04 TimMc: I tend to think of it as Europe, Asia, the Middle East, and Russia. -.-

12:04 wreckimnaked: it seems like a big mess

12:05 TimMc: but even "Russia

12:05 wreckimnaked: in terms of politics and the ongoing change on their mindset

12:05 TimMc: ^W^W^W

12:05 wreckimnaked: I don't see it really as Europe

12:06 It seems like a really different way of doing things when compared to France or Germany

12:06 chouser: Europe is the only part of Russia I've visited.

12:06 wreckimnaked: chouser: x)

12:08 jballanc: yeah, European politics is waaaay more interesting than anything America has to offer ;-)

12:09 gko: We want Game of Thrones-style politics.

12:18 technomancy: what, the season-ending fiscal-cliffhanger wasn't enough to boost the ratings?

12:18 tough crowd

12:20 n_b: jballanc: Fictionalised Danish Politics are among the most popular TV shows in Britain ;)

12:20 Fiscal Cliff was more interesting when it was called Cliffmas

12:21 Personally I was wishing for Chanukkah was a bit later in the year so we could have 8 days of Filibuster

12:38 craigbro: BTW yall

12:38 I really appreciate the emacs clojure support's progress over the last year

13:00 ambrosebs: dnolen: hows this? https://github.com/frenchy64/typed-clojure/wiki

13:02 aaelony: this is a pretty cool listing http://lanyrd.com/topics/clojure/

13:07 dnolen: ambrosebs: awesome!

13:07 ambrosebs: yeah, I've been meaning to try my hand at typing some core, I will add what I can. thanks much.

13:08 ambrosebs: dnolen: lovely!

13:09 dnolen: I've been researching a very cool inference algorithm which might relieve the need to annotate all anon fns

13:10 dnolen: I'm always thinking how this relates to a static type system for miniKanren :)

13:11 inferring anon fns seems critical to start with.

13:34 ejackson: ambrosebs: those docs are looking really good !

13:35 ambrosebs: ejackson: good!

13:36 ejackson: dnolen: see what prismatic threw at me today: http://zinkov.com/posts/2012-06-27-why-prob-programming-matters/

14:01 nybbles: hello, does anyone know why (get {:a 1} :a (throw (Exception. ))) results in an exception getting thrown?

14:01 hiredman: get is a function

14:02 all arguments are evaluated

14:04 nybbles: hiredman: ah that makes sense, d'oh :)

14:04 nDuff: nybbles: I'd suggest using something like ::default

14:05 nybbles: nDuff: how do you use ::default?

14:06 bpr: ,(get {:a 1} :foo ::default)

14:06 clojurebot: :sandbox/default

14:06 nDuff: (let [result (get {:a 1} :a ::unset)] (when (= result ::unset) (throw Exception.)) result)

14:06 bpr: ^ that too

14:06 nDuff: ::default or ::unset is just a namespaced sigil

14:07 dnolen: ejackson: heh, yes I saw that too. It actually reminded me to look closer at Church.

14:08 ejackson: also it seems Nada Amin is curious about probabilistic programming in support in core.logic as well ... so maybe we can work on this together at some later this year.

14:08 peat_: I have a novice question that I've been knocking my head against that I hope someone can elucidate me on. I have a seq of vectors, any pair of which can be compared like (compare v1 v2). My issue is that I'd like to get the "maximum" vector of the sequence. I figured out (reduce #(if (= 1 (compare %1 %2))) %1 %2) seq-of-vectors). However, I have some vectors that are different but have the same value (= 0 (compare v1 v2)) and would li

14:08 In imperative land, I'd initialize a collection and append to it as fits the condition. However, I'm struggling with an idiomatic functional equivalent.

14:09 ejackson: dnolen: oh yeah ? That would be fun.

14:09 bpr: ,(doc sort-by)

14:09 clojurebot: "([keyfn coll] [keyfn comp coll]); Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator."

14:11 nybbles: nDuff: ah i see, that makes sense, thanks!

14:11 magnars: I have a map, and a list of data structures representing transformations to be done to the map. The transformations should be applied to the map in order, with changes from one reflected when running the next. I am interested in gathering the diffs (additions, changes, retractions) to the map as a result of the list of transformations. Any thoughts or

14:11 insight in how this could be done in an idiomatic way?

14:11 chouser: ,(apply max-key (list ["a" "b"] ["c" "d"]))

14:11 clojurebot: ["c" "d"]

14:11 chouser: peat_: ^^^

14:12 bpr: chouser: i had forgotten about that

14:12 chouser: magnars: maybe 'reductions'?

14:12 bpr: it's easy to forget about. So specific.

14:13 peat_: chouser: Interesting, I'd looked at the max-key function, but it required that my key return an int

14:13 antoineB: hello, is there a "read" like function in clojurescript?

14:14 ohpauleez: antoineB: yes, read-string

14:14 peat_: chouser: will take a look at applying it in this manner.

14:14 chouser: peat_: oh wait, I think I screwed up that example.

14:15 peat_: and you're right.

14:15 ohpauleez: antoineB: it's in the cljs.reader

14:15 aaelony: is anyone familiar with storm-starter? https://github.com/nathanmarz/storm-starter/blob/master/src/clj/storm/starter/clj/word_count.clj

14:16 antoineB: ohpauleez: thanks

14:16 ohpauleez: antoineB: np! totally welcome

14:16 chouser: peat_: I guess you can either use sort-by as bpr suggested, or roll your own max that uses compare instead of <

14:17 peat_: for the latter, you'd probably want to use 'reduce', where the running value is the max vector so far

14:17 antoineB: is there a way do to (new TypeConstr args) in clojurescript?

14:18 i can't use a constructor function as a regular function

14:18 or how can i do (defmacro [sym] (~sym.)) ?

14:18 peat_: chouser: I was thinking it would be trivial if max-key worked on collections like compare. I suppose using the sort-by function would require me to still check items in the collection to only pull the first elements that were equivalent to the max

14:19 karpov: hi all. I am wondering if there's a good (idiomatic?) way to build a multi-dimensional map (i.e. map of maps of maps etc), given a list of records (or maps). like, I got a list of Person records, with Country, City and zip for each, and I want to have a map (of maps...) Country->City->Zip->list of people... Sounds like something common enough, right?

14:19 magnars: chouser: thanks for the suggestion, and also the rubber ducking: while typing in my response, trying to clarify the question, a solution appeared. :-)

14:19 chouser: cool

14:20 peat_: if you're wanting to learn functional style, take a crack at using 'reduce'. It's a tool you want to be comfortable with.

14:20 bpr: ^

14:22 antoineB: nevermind my question you can't do in javascript "new Constr.apply(null, [arg0, arg1])"

14:23 so passing a constructor as a function won't works

14:24 peat_: chouser: Agreed, my grasp of reduce is a bit rudimentary at the moment. My first attempt uses reduce, but somewhat arbitrarily decided ties. I'm still trying to wrap my mind around reduce when there are three entities: v1, v2, and a collection containing previously "winning" vectors.

14:24 chouser: the function you pass to reduce only ever gets two args: the running value (previous result) and the next item from the input collection

14:25 Do you want a collection of previous winners? Or just the one (first? last?) winner?

14:26 peat_: chouser: Well, my first attempt was: (reduce #(if (= 1 (compare %1 %2))) %1 %2) seq-of-vectors), which returns a single winning vector, but I can actually have different vectors that tie when compared with compare.

14:27 chouser: sure. do you want to collect all the ties?

14:27 peat_: chouser: Exactly.

14:28 chouser: even though they're all equal to each other?

14:29 peat_: chouser: Ties evaluate to 0 with compare, but they can actually be different.

14:30 chouser: ok, so your running value will have to be some kind of collection (set or vector, I suppose, of vectors) which is different than the elements of the input sequence. That means you'll need the three-arg form of reduce

14:33 peat_: chouser: cool--I'll take a look at that form. Good to know that I'm at least barking up the right tree with reduce.

14:33 chouser: yep

14:35 amalloy: an easy solution would be to sort the list, and then take items from the front until they stop comparing as zero

14:36 chouser: Hm, come to think of it, items that compare as 0 and yet are different are somewhat dangerous to have around. How did that happen? Are you sure you want it?

14:38 amalloy: chouser: not at all, if you're using a custom comparator to focus on only a subset of their qualities

14:38 bpr: chouser: perhapse the "compare" function is just testing for feature and not attempting to indicate equality. Would you still consider that dangerous?

14:38 for some feature*

14:38 amalloy: eg, sort them by first name, and find all the last names of all the people named abel

14:38 chouser: well, don't try to put them in a sorted set or as keys of a sorted map -- that's definitely broken.

14:39 amalloy: but that's a property of the sort, which is fine. compare is controlled by properties of the objects themselves.

14:39 TimMc: Sounds like that behavior should be pulled out as a custom comparator.

14:40 amalloy: sure, if he's actually got the objects implementing Comparator in a half-baked way that doesn't match with equals, that's bad

14:40 * bpr nods

14:45 cemerick: hi all, Mostly λazy ep 9 (it's a clojure-esque podcast) is out with ohpauleez and lynaghk http://bit.ly/138zzc8

14:45 dnolen: cemerick: SWEET

14:45 cemerick: dnolen: I'm coming for you next. ;-P

14:45 ohpauleez: dnolen: lynaghk does an awesome impression of you

14:45 dnolen: ohpauleez: haha

14:45 cemerick: lol, it's true!

14:45 dnolen: oh noes!

14:52 peat_: amalloy: bpr: chouser: Sorry, stepped away before realizing there was still conversation on my humble question :-) To clear up what I'm up to, I'm going through the Peter Norvig's CS212 Udacity course (taught in python), but using it as a vehicle for learning some clojure. The example is a poker hand selector (naive algo obviously--no fancy hashing functions).

14:52 ejackson: cemerick: you didn't start with star-date !

14:52 cemerick: hah

14:53 ejackson: please tell me someone has a current stardate site online somewhere

14:53 ejackson: hahaha... i think its completely random ! But it would be fun.

14:53 bpr: peat_: gotcha. that sounds fun

14:54 chouser: peat_: did you implement your own compare method?

14:54 TimMc: (let [*date (rand)] ...)

14:55 peat_: Two hands might be represented as: ["6C" "7C" "8C" "9C" "TC"] and ["6D" "7D" "8D" "9D" "TD"]. The hands are different, but their ranking is equal. I have a hand-rank function that does return a vector that can be compared with compare. So, those two hands, while not identical, would have (=0 (compare (hand-rank hand1) (hand-rank hand2)))

14:56 chouser: ahhh. totally acceptable. :-)

14:57 peat_: chouser: well, I was hoping I could use compare as my comparison function. The hand-rank function would return the following for the those two hands: [[true nil nil true true nil nil [10 9 8 7 6]] [true nil nil true true nil nil [10 9 8 7 6]]]

14:58 chouser: I would recommend against convincing clojure's own compare function (or the java interop equivalent) to return 0 for things that are not equal

14:58 having your own rank-compare function would be plenty safe though, and nearly as convenient as making compare do what you were wanting.

14:58 peat_: In the Udacity course, they use python's max function which operates on tuples much the same as clojure's compare function works on vectors (modulo length)

14:59 But of course, they refactor into a procedural chunk of code to handle ties :-)

15:01 dbushenko: has anyone figured out how to test clojurescript with phantomjs?

15:02 peat_: chouser: Actually, compare returning 0 for ties is good. I'd want to keep those!

15:03 ejackson: is there a more idiomatic way to do (take-while identity (iterate f x)) seems like there must be ?

15:04 amalloy: nope

15:04 ejackson: ok, thanks.

15:04 can I rely on that not chunking me ?

15:04 technomancy: a bunch of those kind of functions really should have identity as their default arg

15:05 ejackson: technomancy: that would be cool

15:05 technomancy: problem is I hate having optional args anywhere but the last position

15:07 hornairs: is there any way to "multiplex" OutputStreams? not strictly a clojure question sorry. if I have an OutputStream thats half way through spitting out its stuff and a second client enters the world that would want to see the contents of the OutputStream from the start and continue to get successive reads from it how might I accomplish that?

15:08 i guess I want a broadcasting stream of some sort

15:10 pjstadig: hornairs: there are some classes in apache commons io

15:10 http://commons.apache.org/io/apidocs/org/apache/commons/io/output/TeeOutputStream.html

15:10 hornairs: aw cool

15:10 thanks pjstadig

15:15 amalloy: technomancy: in a way, apply has optional args in the middle

15:16 technomancy: amalloy: true, as does reduce

15:16 but exceptions outside clojure.core are annoying

15:16 amalloy: ah, a clearer example

15:16 chouser: are/fold

15:16 sigh

15:17 r/fold

15:18 amalloy: hah. a clever autocorrect?

15:19 chouser: yeah. just the wrong kind of clever

15:21 ejackson: chouser: are you dictating ?

15:21 :)

15:22 * gfredericks listened to mostlylazy long enough to remember how to pronounce klynagh's name

15:24 TimMc: technomancy: reduce's args must bother you.

15:24 atyz: sorry if this seems dumb: I'm currently interacting with my DB with korma, I've run into a problem making my associations. my problem stems that in model a i have (defentity b (belongs-to a)), in order to do this i need to (defentity a). but now when i try to (defentity a) in model a. it fails because i can't redefine this entity

15:24 TimMc: Optional arg in the *middle*.

15:25 atyz: this is irritating because i want to keep my models separate

15:25 and not require model a inside b

15:25 gfredericks: TimMc: he mentioned that already

15:25 atyz: what is the correct way to go about this

15:25 gfredericks: atyz: I think you just need declare

15:26 (declare b) (defentity a ...) (defentity b ...)

15:26 atyz: gfredericks: that is correct, but i don't want to have all of model bs functions inside the same namespace as model a

15:26 saberman: craigbro: earlier you mentioned core.logic + korma obviating an orm - I'm curious, how are you using them together?

15:26 atyz: it feels dirty

15:27 so to me it feels liek the cleanest way to do it is to have an associations namespace, and include that inside my models

15:27 but that also seems... silly

15:27 craigbro: saberman: souped up defrel, we call them "observations" and some code to define tables and exports them to an SQL database

15:27 gfredericks: atyz: oh so you're defining a in one namespace and b in another?

15:27 craigbro: saberman: so I get a consistent data model in core.logic, and also SQL. I generate sql using korma

15:28 atyz: gfredericks, i'm not. but it feels like i'm forced to.

15:28 (i really think i'm missing something)

15:28 craigbro: saberman: it's a rather complex data model (malware analysis) and we need very fast writes, so no artificial keys, no enforce relations

15:29 atyz: its raelly simple, when i query for model a, i want it to look at the fk, and return the model b associated with it

15:29 and when i query model b, i want it to return all the as associated with it

15:29 model a and b are in separate namespaces

15:29 saberman: craigbro: awesome info, I'm new to core logic, off to do some research :)

15:29 craigbro: saberman: it's high normalized relational model, a series of "facts" ala core.logic (process-modified-path PID PATH TIME) ...

15:29 atyz: and therefor to make the queries i need to (defentity a/b) in each nameapce, which it won't allow me to do

15:29 craigbro: atyz: ah, namespace circular dependencies

15:30 atyz: yes, i feel like i'm missing it

15:30 *something

15:30 craigbro: nope, not missing it

15:30 gfredericks: I don't know of any easy solution there :/

15:30 atyz: what is the correct way to handle this? it feels almost like i need to have an associations namespace and require those in each of the models

15:30 but that just feels like a hack

15:31 craigbro: atyz: what I do is NOT use defenttiy

15:31 and all that

15:31 I use korma's sql generation, functioanlly

15:31 and I just use table references, which are always keywords

15:31 saberman: craigbro: so using c.l as an in-memory schema, essentially?

15:31 atyz: hmm in that case, defentity feels like such a handicap

15:32 craigbro: saberman: sort of, there is no interaction between c.l and my sql gneeration code, except that there is a very obvious and direct mapping between the two that my domain experts only have to learn once

15:32 atyz: that is my opinion as well, unless it's extended to do late-binding on entity references and all that

15:32 atyz: thansk gfredericks + craigbro

15:33 craigbro: atyz: or you put everything in the same namespace. Namespaces are not really like java packages

15:33 atyz: or rather, i think they are much less granular than them

15:33 atyz: sorry, i'm new to clojure, still unsure of the correct ways of doing such things

15:33 craigbro: atyz: for isntance my app has one huge common namespace for models

15:33 ibdknox: most people have an entities.clj

15:34 there's not much of a solution here, it's a fundamental limitation of Clojure's lack of circular dependency resolution

15:34 atyz: ibdknox: thats what i was thinking of doing, but that feels like such a hack and from what i understand, against the way of thinking in a functional language

15:34 ibdknox: ?

15:34 how so?

15:34 that is in no way a hack, nor against functional thinking

15:35 people usually have a routes.clj for compojure routes

15:35 atyz: forgive me if i'm wrong here, but i always thought a win of functional programming was that everything was very granular and you only really required what was needed

15:35 craigbro: hehe

15:36 atyz: by creating an entities.clj you're now carrying the weight of all your associations in every model

15:36 again, i'm new to functional programming, so i may be very wrong

15:36 ibdknox: atyz: you only bring in what you need

15:36 craigbro: weight?

15:36 ibdknox: (:require [blah.entities :refer [enta entb]])

15:36 atyz: aaaaaaaaaaahhhhhhhhhh

15:36 ok, that makes sense

15:37 thank you

15:37 sorry, i was under the misconception that it was like many other languages where you just kind of required the file and everything that was in teh file came along with it

15:38 ibdknox: when it comes to circular deps in Clojure you have two options: remove the mutual dependency or extract the commonality into an NS. When it comes to entity defs, the latter is the only real option regardless of the implementation

15:39 craigbro: ibdknox you can use quotes symbols for entity names

15:39 quoted symbols

15:39 ibdknox: you still need to resolve them to the other namespace

15:40 craigbro: or package qualified symbols

15:40 atyz: ibdknox, craigbro - thanks

15:40 craigbro: yup, but resolve at runtime, not define time

15:40 gfredericks: you still need the var to exist at compile-time

15:40 which could be done with some low-level hacks

15:40 craigbro: nope you don't

15:41 err, well, to be spcific, you don't need it to be interned/bound in the ns at compiletime

15:41 ibdknox: you'd end up in macro hell with this strategy

15:41 gfredericks: craigbro: I'm referring to the current korma impl

15:42 craigbro: yup

15:42 ibdknox: it deifnetly complexifies implementation

15:42 ibdknox: it seems like entities.clj is a fine solution, I don't think we were meant to hack in circular dependency resolution :)

15:43 craigbro: ibdknox: and I personally don't think it's worth all that much, as the entities.clj solution is fine IMO

15:43 algernon: -17

15:43 gfredericks: +17

15:43 ibdknox: for better or worse, it's the "Clojure way"

15:47 atyz: i must say, the way ibdknox has explained the entities.clj solution, i'm pretty ok with it

15:47 * amalloy makes a note to call things the "Clojure way" to garner more agreement

15:48 ibdknox: amalloy: listen, that's mine. Back off.

15:48 craigbro: it makes the shrapnel in my leg from the c.l.l wars, ache

15:48 * amalloy quickly trademarks "The Path to Clojure"

15:50 atyz: amalloy: haha

15:50 peat: Hello everyone. :) I'm doing some work with Twitter, and I'm having trouble finding a lib that plays well with Twitter API v1.1. I'm willing to put in some time bringing a project up to 1.1 if there isn't one. Any recommendations from #clojure on a good place to start hacking?

15:54 jeremyheiler: I've never really used them, but I know of https://github.com/adamwynne/twitter-api and https://github.com/mattrepl/clojure-twitter

15:54 peat: I'm not sure how compliant they are with 1.1 though

15:55 peat: jeremyheiler: Yes, I've been looking at both. I'm using twitter-api right now, and it looks like an easy path to 1.1 ... but I'm checking around to see if I'm missing something, or stepping on toes. ;)

15:55 jeremyheiler: peat: ok cool. figured i'd throw those out there just in case.

15:58 peat: jeremyheiler: I appreciate it. :)

16:15 gfredericks: craigbro: what are the "c.l.l wars"?

16:15 TimMc: comp.lang.lisp?

16:16 * gfredericks has no idea if that's a thing

16:16 TimMc: Usenet, my son.

16:17 gfredericks: I'm too young to know about anything prior to the two-thousand-and-teens

16:17 karpov: ... when ships were made of wood, and men of metal.. =)

16:17 * arrdem is to young to remember that place but has heard the legends

16:17 jballanc: some reading material: http://www.donhopkins.com/drupal/node/109

16:17 amalloy: it's still around, guys. i don't know this "too young" stuff

16:17 TimMc: karpov: When Fortran was only Threetran

16:17 when I was a boy

16:17 arrdem: (inc TimMc)

16:17 lazybot: ⇒ 30

16:18 gfredericks: $karma gfredericks

16:18 lazybot: gfredericks has karma 13.

16:18 Raynes: gfredericks: No you're not.

16:18 TimMc: http://www.stevemacdonald.org/lyrics/wiwab.html

16:18 gfredericks: damn TimMc is a lot cooler than me

16:18 TimMc: Oh, it's "Back when Fortran was not even Three-tran". Oh well.

16:18 arrdem: ,`(doseq [x (range 9000)] (println

16:18 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

16:19 gfredericks: Raynes: what? you want to have a young-off?

16:19 * gfredericks is so young even his grandparents have grandparents

16:19 Raynes: I remember VHS. :(

16:20 chouser: I used Beta

16:20 gfredericks: my grandpa had both vhs and beta and would use them in parallel to copy movies he rented

16:20 arrdem: silly Betamax...

16:20 karpov: whoa.. what is that clojurebot thing? does it respond to code and attempt to execute it?

16:20 metellus: ,(prn "yes")

16:20 clojurebot: "yes"

16:20 arrdem: karpov: that's the point of clojurebot

16:20 Raynes: karpov: There are two bots in here that can do that.

16:20 TimMc: My mom apparently remembers seeing a relative use a wire-recorder.

16:20 Raynes: &(+ 3 3)

16:20 lazybot: ⇒ 6

16:20 jballanc: clojurebot: say hello

16:20 clojurebot: Pardon?

16:21 jballanc: you heard me

16:21 karpov: I am new to IRC, obviously.

16:21 ejackson: pish, I remember when IRC happened over drums.

16:21 arrdem: ,`(doseq [x (range 9000)] (println "(inc clojurebot"))

16:21 clojurebot: (clojure.core/doseq [sandbox/x (clojure.core/range 9000)] (clojure.core/println "(inc clojurebot"))

16:21 Raynes: I remember when #clojure didn't have a lazybot.

16:21 hyPiRion: You guys with technophilian parents, I envy you.

16:21 arrdem: glad I quoted that..

16:21 $karma clojurebot

16:21 chouser: dotimes

16:21 lazybot: clojurebot has karma 15.

16:21 metellus: $karma lazybot

16:22 lazybot: lazybot has karma 11.

16:22 gfredericks: $echo (inc lazybot)

16:22 hyPiRion: echo (inc lazybot)

16:22 lazybot: (inc lazybot)

16:22 hyPiRion: you fool.

16:22 arrdem: ooh is it bot taunting day again?

16:23 karpov: this is very cure, but I can see how the channel can erupt into a very disorderly kind of behaviour =)

16:23 amalloy: ~guards

16:23 clojurebot: SEIZE HIM!

16:23 arrdem: ~gourds

16:23 clojurebot: SQUEEZE HIM!

16:23 amalloy: you see, we have that covered also

16:23 arrdem: especially the gourds.

16:23 ejackson: that is genius !

16:24 arrdem: amalloy: appologies for stealing your party trick

16:24 TimMc: ~botstack

16:24 clojurebot: /me puts lazybot on his head and gropes blindly for a third bot to complete the stack.

16:24 amalloy: arrdem: that's technomancy's favorite, not mine

16:25 karpov: * is testing this star thing

16:25 portly: Hi is anyone using luminus?

16:25 hyPiRion: seems like clojurebot doesn't have /me fixed properly.

16:26 TimMc: hyPiRion: Probably because it is using the IRC protocol directly -- the equivalent of you putting /say in front of your messages.

16:26 clojurebot: Ack. Ack.

16:26 TimMc: crap

16:27 Or do you mean that it should special-case it?

16:27 craigbro: indeed, comp.lang.lisp

16:27 jballanc: ~litany against cons

16:27 clojurebot: litany against cons is "I must not cons. Cons is the perf-killer. Cons is the little death that brings total obliteration. I will face my cons and permit it to pass over me and through me, and when it has gone past I will turn my GC to see its path. And where it has gone there will be nothing; only I will remain."

16:28 hyPiRion: Well, it should either be special cased or rewritten

16:28 arrdem: ~conj

16:28 clojurebot: (conj {:a 1} (when true {:b 2}))

16:28 bpr: that litany is awesome

16:28 hyPiRion: /me in front looks a bug, at least.

16:28 TimMc: I've seen people use it intentionally in that way before.

16:29 hyPiRion: hm.

16:29 hiredman: it is not a bug in clojurebot, it is someone putting /me in front of a factoid incorrectly

16:30 Raynes: yogthos: ping

16:30 arrdem: ,(doc gensym)

16:30 metellus: ,(println (str (char 001) "ACTION forces an action"))

16:30 clojurebot: "([] [prefix-string]); Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique number. If prefix is not supplied, the prefix is 'G__'."

16:30 * clojurebot forces an action

16:30 arrdem: (inc metellus)

16:30 lazybot: ⇒ 3

16:31 Raynes: That's kind of dangerous.

16:31 hyPiRion: Raynes: kind of? .p

16:32 metellus: it's not great

16:32 jballanc: wait...is clojurebot an op? can he kick people?

16:32 metellus: on the bright side, it can only do client-to-client things

16:32 hyPiRion: jballanc: no.

16:32 jballanc: aww...

16:32 metellus: even if it could, that wouldn't work

16:32 jballanc: I mean...yeah, that's probably for the best

16:32 metellus: that only works with ACTION because that's not part of the actual irc spec

16:32 yogthos: Raynes: hey what's up

16:32 Raynes: ,(println (str (char 001) "PRIVMSG #clojure :Hi there, I'm clojurebot."))

16:32 metellus: it's just a client to client thing

16:33 hyPiRion: heh.

16:33 jballanc: ah

16:33 metellus: doing /me is really just a PRIVMSG that irc clients special-case

16:33 Raynes: yogthos: I was going to tell you that portly was asking if anyone here uses luminus, but he left 30 seconds later not understading how IRC works.

16:33 yogthos: Raynes: hehe well next time he's back ;)

16:34 arrdem: Raynes: being that you hang out and shoot the breze until someone answers?

16:34 Raynes: Yes.

16:34 yogthos: indeed

16:34 I just leave it on pretty much now :)

16:34 Raynes: People come thinking is is their own private help line.

16:34 Whereas there are real people doing other things that just haven't seen your question yet.

16:35 yogthos: Do you have ZNC?

16:35 yogthos: Raynes: nope, I use limechat right now

16:35 hyPiRion: Yeah

16:36 jballanc: limechat is nice

16:36 yogthos: tells you when people ping you :)

16:36 terom: ,(println (str (char 003) "4 dangerous?"))

16:36 clojurebot: dangerous?

16:36 jballanc: used it for ~2 years...eventually gave in and switched to irssi though

16:36 TimMc: Raynes: I like to imagine IRC as a room full of mannequins that can be activated by their users. It makes a room full of idlers so much more interesting!

16:36 yogthos: ha!

16:36 solussd: Is it possible to set session expiration to different values for different sessions with Noir? I know how to change them for everybody, but I'd like to implement a "remember me" checkbox that gives you a session that lives past the browser being closed- i want it to be opt-in.

16:36 jballanc: TimMc: I'm convinced that IRC bots are the equivalent of programmer pets

16:37 TimMc: ~botsnack

16:37 hyPiRion: ~botsnack

16:37 clojurebot: Thanks, but I prefer chocolate

16:37 Thanks! Can I have chocolate next time

16:37 yogthos: solussd: not right now

16:37 TimMc: heh

16:37 metellus: ~chocolate

16:37 Raynes: yogthos: You can use ZNC with whatever IRC client you use. It's just a thing you connect to instead of the IRC network directly that handles the connecting for you and keeps you connected all the time. It lets you connect from multiple devices, and when you're disconnected it keeps track of what is said and plays it back for you when you reconnect so that you have context to jump right into conversations.

16:37 clojurebot: I don't understand.

16:37 ibdknox: solussd: use another cookie for that

16:37 Raynes: yogthos: Also, every IRC client worth anything pings you when someone says your name.

16:37 arrdem: lol@jballanc

16:37 yogthos: Raynes: ah nice kinda like screen for irc :)

16:37 Raynes: yogthos: Exactly like screen for IRC. I'll give you an account on my ZNC instance when I get a chance.

16:38 yogthos: Raynes: looking at it right now this one right? http://wiki.znc.in/ZNC

16:38 Raynes: Yep.

16:38 yogthos: Raynes: right on :)

16:38 hyPiRion: I just hook up to a screen session with irssi on it on my private server

16:38 solussd: ibdknox: guess that'll work, thanks

16:38 Raynes: Yeah, meh.

16:38 TimMc: screen is screen for irssi

16:38 arrdem: tmux is screen for irssi

16:38 TimMc: That too.

16:38 jballanc: I take it ZNC proxys the IRC connection for you?

16:39 because I have a remote box that I could use with ZNC, but it's a good amount of latency away from home

16:44 TimMc: jballanc: Have you tried using mosh?

16:44 I've not tried it yet, but it's supposed to help with SSH latency.

16:44 jballanc: ah, yeah...heard of that

16:44 might have to give it a try

16:45 still...my remote box is in AWS-west, and I'm in Turkey :(

16:52 technomancy: latency over IRC is a lot less annoying than latency over something like SSH

16:52 that said, I have no idea what it's like from Turkey

16:54 TimMc: Poor brehaut down in NZ gets all our messages the next day.

16:54 But it's OK, 'cause he's already there.

16:56 jballanc: technomancy: yeah, I guess that is true

16:57 might have to give ZNC a spin (especially if my connection keeps being so flaky...)

16:57 oh, and in case you were curious...latency is generally not bad, but Ankara to Portland is north of 200ms on a good day

17:00 mpan: I'm looking at apply-macro and the docs are telling me not to use it. What should I use instead?

17:01 amalloy: even if my znc latency were a full second it's hard to see why that would matter, granted that my messages still arrive in order. who cares if they arrive a little late, or i get messages a little after they were sent? it's not like irc is a synchronous communication medium, or something like voice chat

17:02 TimMc: amalloy: It means you get ninja'd all the time, that's all.

17:02 arrdem: voice chat synchronous? my clan and I roll on a half-second+ lag on Mumble. way fun for sync-dropping.

17:03 jballanc: ugh...don't remind me...had a G+ hangout earlier today with a good .5 delay *plus* nasty echo

17:03 TimMc: arrdem: I *think* that was English. :-P

17:03 jballanc: like having a meeting in the Grand Canyon

17:04 TimMc: Hey, imagine if we could actually send voice data over dedicated wires. You could probably get pretty good QoS!

17:04 arrdem: TimMc: some days I ponder whether I'm speaking a strict superset of English that describes games and computers...

17:04 amalloy: i didn't say voice chat was synchronous, arrdem, just that it cares about ping time more than irc does. if i ask a question on irc and get the response fifteen minutes later that's no big deal

17:04 TimMc: You could, like, reserve an end-to-end circuit for the duration of the call.

17:05 arrdem: amalloy: understood, I'm being silly.

17:05 jballanc: amalloy: yeah, I'll probably not even notice for IRC...ssh on the other hand...

17:06 technomancy: TimMc: interesting idea, but it would never work

17:07 craigbro: TimMc: what might one call such a system?

17:07 jballanc: ah, finally finished my Clojure/West proposal!

17:07 ...that was a long form

17:07 llasram: mpan: Don't find yourself in a situation where you need to `apply` a macro :-)

17:08 mpan: For the record, I have never found myself in such a situation

17:08 mpan: I find myself in a situation where that *might* be beneficial

17:08 probably there's a better way

17:08 llasram: Yeah, what's the context?

17:09 mpan: uh, so there's a macro called ask, and a macro called ask* which should be in terms of ask

17:09 should I pastebin this?

17:09 oh, and uh, ask and ask* should be variadic

17:09 llasram: Probably

17:10 mpan: https://www.refheap.com/paste/8107 currently doesn't work because I've got it wrong and ask* is expanding to not what it should

17:10 it tells me e is qualified but shouldn't be, so I'm a bit lost

17:11 llasram: mpan: Actually `e` is ns-qualified, and the ask/ask* expansion looks like it should be otherwise fine

17:11 Change `e` to `e#` and you should be good to go

17:11 terom: currently doesn't work because I've got it wrong and ask* is expanding to not what it should

17:12 ups, sorry

17:12 mpan: where can I read up on such details?

17:12 thank you very much for explaining that

17:13 oh wait, this new e is generated?

17:13 chrismoos: Hi, I'm trying to get something like putIfAbsent for a map in clojure…basically I am trying to initialize a default value for a key in a map and there will be concurrent threads attempting to initialize…any ideas?

17:13 dnolen: mpan: gensym'ed

17:13 llasram: mpan: Oh, yes -- the terminal '#' makes it autogensymed

17:13 mpan: just curious, is there a way to get a literal unqualified sym "e" there?

17:14 hiredman: chrismoos: clojure maps are immutable, there is no put of any kind

17:14 llasram: &`(e e# ~'e)

17:14 lazybot: ⇒ (clojure.core/e e__142000__auto__ e)

17:14 mpan: oh cool

17:14 chrismoos: hiredman: i've been trying with a ref

17:14 mpan: thank you all

17:15 chrismoos: hiredman: using alter but if multiple threads go into dosync i end up initializing the key more than once

17:15 dnolen: mpan: ~'e, but you risk variable capture - just use e#

17:15 hiredman: chrismoos: so have them check

17:15 chrismoos: hiredman: i use a let inside the dosync but its only seeing the in-transaction value, not what has already been committed

17:15 err, let-if

17:17 hiredman: chrismoos: transactions need to be side effect free, becuase anything in a dosync block can be run multiple times

17:18 chrismoos: hiredman: yeah, so maybe i'm doing this wrong and using a ref with alter isn't appropriate.

17:18 hiredman: https://groups.google.com/forum/?fromgroups#!topic/clojure/_BGJoqz-3tk

17:19 hiredman: chrismoos: what about it?

17:20 chrismoos: discussion about what i'm looking to do except after reading (and trying) some solutions there it doesn't seem to work out correctly

17:21 hiredman: are you doing side effects in the transaction or not?

17:22 the code in the email does not do side effects in the transaction

17:22 chrismoos: i don't think so -- just making a record and assoc'ing it with alter

17:22 hiredman: chrismoos: so then why do you care if there is a retry?

17:22 or if it gets assoc'ed multiple times?

17:22 arrdem: oh frick... dissoc-in didn't survive contrib did it?

17:23 chrismoos: i'm returning the assoc'd value and i don't want multiple threads using different instances

17:23 dnolen: chrismoos: I think you're not understanding how much work the STM does for you. The situation you're afraid of isn't going to happen.

17:23 hiredman: chrismoos: then have the function you give to alter check for a value

17:24 chrismoos: hiredman: did that but its referencing the in-transaction value which, for concurrent transactions, is missing the key

17:24 so it will continue to assoc it

17:24 hiredman: chrismoos: but really if you are worried about mutiple different instances it sounds like you are using the stm to fiddling with mutable data, which is a bad idea

17:25 you should only use values with the stm

17:26 chrismoos: hiredman: admittedly i'm new to STM and so yeah -- i probably am going about this the wrong way

17:26 dnolen: chrismoos: if you're using a ref w/ a record in it, you're fine - you're worrying about something that the STM solves.

17:26 Zpork: Raynes, I worship his shadow.

17:26 hiredman: dnolen: unless he is associng a stringbuilder in to the ref and writing to the stringbuilder in a transaction

17:26 dnolen: hiredman: right

17:27 hiredman: or other similar things

17:27 * arrdem shall contemplate this evil at a later date

17:27 chrismoos: hiredman: what about this? imagine you have a map and you want to check this map for a uniqueid for a given key. a unique id should only be generated once for a given key, so anyone that queries this key gets the same unique id. if there are multiple queries when the unique id doesn't exist only once generation should occur and all other readers should get the same thing.

17:28 dnolen: chrismoos: that is what STM does

17:28 hiredman: chrismoos: sure

17:28 chrismoos: one sec writing pseudo code

17:28 hiredman: but random id generation is a side effect

17:29 chrismoos: okay well let's just say random id generation = (record. name) where name is a parameter

17:29 S11001001: chrismoos: but as such you don't even need random

17:29 hornairs: hey Raynes, if I ask conch for seq output of a long running program and then iterate over that seq, will i get lines as they are output by the program or is the whole output buffered before being returned as a seq

17:29 hiredman: but nothing mutable is involed, and you don't care what random id you end up with, so you will end up with one which is fine

17:29 Raynes: hornairs: You'll get it as it comes.

17:30 hornairs: Conch will read output into a queue under the hood and the lazy seq you get is fed by that. Keep in mind that if the program outputs a whole bunch of text and you don't read it, it'll accumulate in memory over time.

17:31 arrdem: what would the cleanest way be to apply a transformation a variable number of times to a map?

17:31 (no side-effects here)

17:31 hornairs: Raynes: thanks! i am seeing the buffered behaviour but it must be something I am doing wrong, i am very new to this. a simple doseq should loop over it as it comes right?

17:31 S11001001: arrdem: nth of iterate

17:32 Raynes: hornairs: It could be that the output isn't being buffered by conch, but by the program itself. Sometimes programs output differently when they aren't run from a terminal.

17:32 chrismoos: hiredman: https://gist.github.com/b75be902b2b578e2e55b

17:33 okay i just wrote that, basically i want concurrent calls to get-instance to always return the same value

17:33 Raynes: hornairs: A PTY is used to make the program think you're a terminal in those cases, but that's pretty hard to do in a JVM-based language and I didn't feel like writing any C and figuring out all that nonsense. It's better that you have a PTY in the middle. Check out the 'unbuffer' program from the expect package. It should come with 'expect' if you're on a Linux distro. If you're on a mac, you can get it from homebrew, but it's in a separate

17:33 homebrew repo. If you're on Windows, give up and install Linux.

17:35 pbostrom: chrismoos: the contains? check should go inside the dosync block

17:35 amalloy: chrismoos: looks fine. no concurrency issues can arise, as long as you don't mind occasionally calling (create-some-instance) and then throwing it away

17:35 chrismoos: pbostrom: if-let does a check too

17:35 inside dosync

17:35 amalloy: except that you're forgetting to deref m inside the dosync, of course

17:35 chrismoos: amalloy: i thought this exactly. but that's not what happens.

17:35 hiredman: chrismoos: https://gist.github.com/67d1cc3236b3732df852

17:35 chrismoos: amalloy: yeah: typo

17:36 hornairs: Raynes: wow, thanks for the info! I'll check it out. The other program is phantomjs with console.logs which to the best of my knowledge wouldn't be buffered but I will investigate

17:36 chrismoos: amalloy: when i deref it gives me the current in-transaction value of the map. if multiple transactions are occurring concurrently and they all see the key not existing, they will all execute their alter after the if-let

17:36 Raynes: hornairs: If it doesn't turn out to be the case, let me know and we'll investigate conchisms.

17:37 S11001001: chrismoos: Your transaction should do this: Check the map for an id. If it's not present, take an id from the id source and stick it in the map.

17:37 amalloy: chrismoos: so what? all but one such alter will be thrown away and retried

17:37 S11001001: chrismoos: and *that's it*. You have to leave the transaction before you can get that id back from the map

17:37 dnolen: chrismoos: it doesn't matter, one of them will win, and others will retry see the id and return the set value.

17:37 pbostrom: chrismoos: when you alter the ref, the transaction will restart if the ref was changed by another thread

17:38 amalloy: hiredman: seems like (dosync (-> (alter m ...) (get k))) is easier

17:38 chrismoos: so if i move that get out of the transaction it should be good?

17:38 err, after it

17:38 after the dosync

17:38 S11001001: chrismoos: yes

17:39 hiredman: amalloy: *shrug*

17:40 amalloy: S11001001: are you sure he has to leave the transaction? if he attempts to return the id he put in, and it turns out some other thread run the race, then the transaction will retry; this continues until he's the one who wins the race, at which point the value from inside and outside the transaction is the same so it doesn't matter which he picks

17:40 chrismoos: okay thanks I really appreciate the help! i'm going to try this out now. btw - love clojure!

17:40 S11001001: chrismoos: There really isn't a problem with using it in the transaction, as long as you aren't doing side-effects. But there's no point remaining in the transaction either

17:41 hiredman: I question the exercise

17:41 S11001001: amalloy: leave the transaction sooner and everyone's a winner; it's semantically the same but probably faster

17:53 svedubois: What it means the symbols #^ from (def #^foo.bar x 1). (I suppose it is about the metadata)

17:54 llasram: svedubois: Obsolete syntax. It's the same as ^symbol (which is shorthand for ^{:tag symbol})

17:55 (Where `:tag` is the metadata key the Clojure compiler uses to receive type hints)

17:56 svedubois: And the utility?

17:56 ToxicFrog: Improved compile-time type checking and optimization, I believe.

17:57 llasram: (a) Avoid runtime reflection for JVM method invocations

17:57 (b) indicate primitive types, to avoid un/boxing

18:34 bmaddy: Does anyone know what the ^:index trick is in (defrel property* ^:index p ^:index t)? I'm looking here: http://stackoverflow.com/questions/6713424/how-do-i-express-this-in-clojure-core-logic

18:34 That's surprisingly hard to search for.

18:35 dnolen: bmaddy: it's just indexing - a performance optimization

18:36 bmaddy: So that's a core.logic feature then?

18:36 dnolen: bmaddy: yes

18:36 bmaddy: gotcha. Thanks dnolen!

18:47 arrdem: herm... is there a cleaner way than a (loop (recur)) to compute (F^N x)?

18:49 S11001001: &(doc nth)

18:49 lazybot: ⇒ "([coll index] [coll index not-found]); Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences."

18:49 S11001001: &(doc iterate)

18:49 lazybot: ⇒ "([f x]); Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects"

18:49 S11001001: arrdem: combine

18:50 TimMc: bmaddy: symbolhound might help.

18:51 bmaddy: Heh, it just sends me back to the page I was looking at. :)

18:51 Cool site though. I hadn't seen that yet.

18:54 TimMc: It only searches stackoverflow and maybe a couple other things.

18:55 craigbro: oi

18:57 arrdem: cheers S11001001

19:03 arohner: does typed clojure support assertions on sets yet?

19:03 can I assert that a fn only returns an elements of a specific set?

19:05 arrdem: arohner: (assert (contains? set item))

19:05 arohner: arrdem: yes, but I'm specifically looking at using typed-clojure

19:10 arrdem: arohner: no clue, haven't worked with it yet

19:19 seangrove: I'm looking for a function that given a seq of exclusions, returns the first item from another seq NOT found in the exclusions

19:19 I've written it a few times now, figure I should check if it's built-in at this point

19:20 ppppaul: any xml advice?

19:20 technomancy: seangrove: (partial first remove (comp set exclusions))

19:22 seangrove: technomancy: Let me stare at that for a few minutes

19:23 arrdem_: S11001001: that was (repeatedly) and (nth)?

19:24 S11001001: arrdem_: iterate

19:24 repeatedly is for side-effects

19:24 arrdem_: ah OK

19:35 seangrove: ,((partial first remove (comp set ["a" "b" "c"])) ["b" "c" "d"])

19:35 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$first>

19:36 seangrove: ,(filter (fn [item] (not (some #{item} ["a" "b" "c"]))) ["b" "c" "d"])

19:36 clojurebot: ("d")

19:37 seangrove: But I'm doing a full traversal of the last list there, just to get the first value

19:37 amalloy: seangrove: what on earth is that first one supposed to be? the partial and the comp are both nonsense

19:37 seangrove: amalloy: Apologies, I was struggling towards a more elegant version of the second one

19:38 amalloy: (first (remove '#{a b c} '[b c d]))

19:39 seangrove: amalloy: Definitely much more concise

19:39 But is there a way to return immediately once the first item is found, instead of filtering the whole list?

19:39 Or, I suppose since it's lazy, that's how it'll work outside the repl anyway

19:40 amalloy: that's what the (first) does

19:40 seangrove: amalloy: Well, only on lazy seq's, right?

19:41 amalloy: *shrug* it produces the first element of anything seqable, as fast as that is possible to do

19:49 ravster: hello everyone

19:50 I'm trying to learn data.zip for moving through a xml file, but am having issues. Can someone point me to a tutorial for that project? They don't have tests so I can't even look at those.

19:50 arrdem: ~zip

19:50 clojurebot: zip is not necessary in clojure, because map can walk over multiple sequences, acting as a zipWith. For example, (map list '(1 2 3) '(a b c)) yields ((1 a) (2 b) (3 c))

19:51 arrdem: ah. wrong zip.

19:51 amalloy: ~zipper

19:51 clojurebot: zipper is http://clojure.org/other_libraries#toc5

19:51 amalloy: ~zippers

19:51 clojurebot: zippers are probably not what you want, unless you're already sure you want them: they're great for modifying maps (for certain kinds of access patterns), but usually just get-in and update-in are easier.

19:51 arrdem: (inc amalloy)

19:51 lazybot: ⇒ 39

19:52 amalloy: i should have included tree-seq in that snippet

19:53 arrdem: (inc S11001001) ; he solved my issue and isn't here to be thanked.

19:53 lazybot: ⇒ 4

20:06 arrdem: amalloy: is conj as bad as cons?

20:06 in the context of ~cons

20:06 ~conj

20:06 clojurebot: (conj {:a 1} (when true {:b 2}))

20:06 arrdem: ~cons

20:06 clojurebot: (def ^:const x 42) will cause any compiled reference to x to be as if you wrote 42 instead

20:22 gfredericks: couchdb makes it really painful to not have a fully lazy json parser :/

20:25 ravster: does anyone here have experience with data.zip.xml? We're looking at what it does to a 2-page xml file, and its blowing up the computer.

20:26 and/or what xml parsers would people recommend the use of?

20:26 s/what/'what other'

20:48 bpr: Does anyone know of any tools for managing a Maven repository hosted on S3?

20:49 amalloy: $google maven s3

20:49 lazybot: [java - maven s3 wagon provider - Stack Overflow] http://stackoverflow.com/questions/850570/maven-s3-wagon-provider

20:51 bpr: amalloy: as far as i can tell, that's for doing mvn deploy on your own project

20:51 I'm looking for a tool to install/remove 3rd party jars from s3, etc.

20:52 hiredman: s3cmd

20:52 bpr: but with that you have to know the expected maven repo layout

20:53 hiredman: I suppose that is true

20:53 bpr: i suppose you could basically mirror ~/.m2/repository using s3cmd

20:53 hiredman: yes

20:53 that is what I have done in the past

20:54 bpr: i think a tool like lein-localrepo for s3 would be great

20:59 amalloy, hiredman: thanks. I think i'm going to make a lein-s3-repo modelled after lein-localrepo.

20:59 i'm surprised such a thing doesn't already exist

21:39 xeqi: bpr: you could write something with pomegranate and load maven-s3-wagon-provider to do the deploy/uploads

21:40 tufflax: Say if I want a type to implement two protocols, but the protocols have functions with the same name, what could I do about that?

21:43 bpr: xeqi: thanks. I'm doing something of the like. The provider using is from [org.springframework.build/aws-maven "4.4.0.RELEASE"]

21:43 tomoj: tufflax: shouldn't matter, the protocol fn is namespaced. if they have the same signature there will be problems generating the corresponding interface, though.. dunno about that

21:44 oh, no

21:44 no problems generating each protocol's interface

21:44 bpr: xeqi: though I'm not that familiar with maven, so maybe I'll find that the wagon provider you mentioned is more appropriate.

21:44 tufflax: tomoj: ok nice

21:46 tomoj: but you get "Duplicate method name&signature in class file user/Foo"

21:47 tufflax: Foo is the type?

21:47 amalloy: so don't define the methods inline, tomoj

21:48 (deftype Foo []) (extend Foo I1 ...) (extend Foo I2 ...)

21:48 except my extend syntax is rubbish there

21:48 tomoj: ah

21:49 I'm surprised not to see my typehints make a difference in the protocol interface sigs

21:49 amalloy: protocols are clojure things, not java things. the generated interface is a performance optimization

21:49 tomoj: I guess datomic.Connection isn't an auto-interfaced protocol

21:53 tufflax: Hm, amalloy I'm a bit confused. So I1 and I2 like in different namespaces, and then you could do like (I1-namespace/bar (Foo.))? If bar is a function in I1?

21:53 s/like in/live in/

21:54 dnolen: tomoj: type hints have no meaning on protocol interface sigs

21:55 tomoj: ah

21:56 pandeiro: how is `lein repl` able to require libs without any project.clj?

21:56 dnolen: tomoj: it would be convenient, more consistent for interop, but I guess no one has been bothered enough to fix it.

22:01 tomoj: dnolen: btw, I think I got condw working. but I don't think I actually need it. and my implementation is ugly. I may try to clean it up sometime and submit it

22:02 dnolen: tomoj: nice, lemme know

22:09 alexbaranosky: is Jonase of Eastwood fame on IRC ever? I need to compell him to do more work on Eastwood :D

22:21 muhoo: pandeiro: ~/.lein/profiles.clj ?

22:25 pandeiro: muhoo: ah ok, yeah if you have plugins there, their jars are loaded on the classpath i guess

22:26 muhoo: pandeiro: lein pprint

22:26 or lein deps :tree, maybe

22:27 xeqi: pandeiro: lein also adds a couple of dependencies that way so they can be overritten later (lein-newnew I think)

22:27 pandeiro: muhoo: can't use that outside a project apparently

22:27 muhoo: first cljs hello world http://spazcoin.bamfic.com

22:29 pandeiro: aye, looks like neither do. huh.

22:31 mpan: what's a convenient way to invert the control flow of quil? I have an app that needs to occasionally ask to redraw things, but otherwise the drawing should stay the same

22:32 rather, when the world changes, the sketch should be updated to reflect it

22:34 the world is expected to stay unchanged for seconds at a time, then experience short bursts of frequent changes

22:57 djwonk: I'm looking for pointers on how to debug syntax error. I'm using Emacs and lein. `lein repl` barfs a big stack trace. I don't even know what file to start with. Any suggestions? Things to read?

22:58 Exception in thread "main" java.lang.NullPointerException, compiling:(core.clj:5)

22:58 mpan: https://www.refheap.com/paste paste the relevant source if possible

22:58 Raynes: Paste the stacktrace too, because believe it or not there is useful information in it.

22:59 The stacktrace is probably more important than the source.

22:59 mpan: wait, to clarify, do you get this when you're running your code, or just from starting up the repl?

23:00 I may have misread

23:00 Raynes: From starting up the repl, which sounds like there is unnecessarily AOT compilation going on somehwere.

23:00 somewhere*

23:01 djwonk: thanks everybody. I get it when running `lein repl`. I think the first thing I'm going to do is split apart my load function. right now it has a long list of files to load

23:03 https://www.refheap.com/paste/8116

23:05 xeqi: whats line 5 of dm.core?

23:06 tomoj: muhoo: neat

23:06 the bitcoin client isn't cljs, I assume? is it clj?

23:07 djwonk: xeqi: a long line of (load "…" "…" "…")

23:07 it makes me wonder if the way load is written is useful when something goes wrong

23:08 Sgeo: If something goes wrong, the thing to do is usually regret Clojure being on the JVM

23:08 >.>

23:09 djwonk: now that I split (load "a" "b") into (load "a") (load "b") I'm getting a line number that I can work with

23:10 Raynes: Why are you using load?

23:12 djwonk: Raynes: I want the same namespace in different files. I learned this from http://stackoverflow.com/questions/4690758/splitting-a-clojure-namespace-over-multiple-files

23:12 turns out that `load`ing an empty file gave the java.lang.NullPointerException

23:13 which seems like an edge case that no decent programmer would ever run into

23:14 mpan: djwonk: by any chance, would what overtone does be useful for your use case?

23:14 they also move stuff into a unified namespace, although their motivations differ slightly, see https://github.com/overtone/overtone/blob/master/src/overtone/live.clj

23:14 djwonk: mpan: play cool sounds? sure :) I'll look at the code to see what you really mean

23:15 mpan: they have a number of namespaces, and then they move everything into one namespace, but a major motivator for them is that they have two such namespaces which share a lot of code

23:15 but it seemed like it might benefit your use case also

23:16 djwonk: mpan: that seems like a good option. I'm not experienced enough to know the pros/cons. My approach was working ok until I loaded an empty file

23:17 mpan: djwonk: I'm not sure about the details of the tradeoffs, but one point is that this way, you have individual namespaces which behave normally with regard to what names are accessible where, but you also have one place to access everything

23:19 djwonk: mpan: that sounds good to me. right now, I'm just prototyping a board game with a lot of moving parts -- not sure how to organize until I get an idea of how big it is, so I'm going with the (in-ns 'example.core) and (load "…") approach for now

23:19 I'd rather not name all of the other namespaces quite yet until I have to pick names … but that said, I have to pick names for files, so it sounds like the same difference

23:20 tufflax: If I want to make util.clj that has all my favorite utils, what's the best way to make it available to all my projects? I heard someone talk about "user.clj" but I don't remember much of that

23:20 djwonk: that didn't make sense. I'm trying to avoid "naming the band" until I get an idea of who is in the band :)

23:20 tmciver: djwonk: without knowing what you're trying to achieve my advice to you would be to avoid loading code this way. In general, each file should be its own namespace and you should 'require' the namespaces you need in each file.

23:20 tomoj: tufflax: just make it a library and put it in the dependencies of all your projects

23:21 tufflax: tomoj: so I need to make a jar and upload it somewhere then?

23:21 tomoj: there are ways to make a dependency magically available to all your projects, but don't do that :)

23:21 djwonk: tmciver: did you see the stackoverflow post, though? Clojure itself uses this technique, so is it fair to knock it?

23:21 mpan: do most people have their own local maven repo or something?

23:21 tomoj: tufflax: well you can just `lein install` in the project dir if you don't need other people to be able to get it

23:21 tmciver: djwonk: Yeah, clojure does do weird things like that that you shouldn't copy. :)

23:22 tufflax: tomoj: ok thanks

23:22 tomoj: hm what's the "local repository"?

23:23 tomoj: ~/.m2/repository

23:23 clojurebot: excusez-moi

23:24 djwonk: tmciver: what would you say are the biggest drawbacks to the approach I've chosen relative to the overtone style that mpan mentioned?

23:25 tmciver: I would guess that using the convention of one file per namespace handles dependencies better

23:25 tufflax: tomoj: ok thanks

23:26 djwonk: and allows, for example, a function used by several other namespaces to be loaded (only once) when needed

23:26 tmciver: djwonk: well, in my experience it's just rather unorthodox. Besides, I'm not sure what that technique buys you. I think it's more natural to divide your namespaces up in a logical way. Often times I'll start a project with all my code in one file/namespace and then break it up over time in a way that seems natural.

23:27 djwonk: tmciver: that's why I'm keeping everything in one namespace. I'm splitting across files just for ease of editing.

23:27 my plan is to settle into decent namespaces once it becomes clearer where things go

23:28 tmciver: djwonk: yeah, that sounds fine. I've been using clojure for about two years now (and I'm still a noob!) and I don't think I've ever used load.

23:29 djwonk: tmciver: thanks for sharing the orthodoxy. :) appreciated.

23:29 tmciver: djwonk: that's just my opinion; I'm sure there are use cases out there that would warrant such a thing, I've just never run into them.

23:31 ambrosebs: arrdem: RE: Typed Clojure sets: do you want a type like (IPersistentSet Number), or more specific?

23:33 djwonk: ,(doc use)

23:33 clojurebot: "([& args]); Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preference to calling this directly. 'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer."

23:37 tmciver: djwonk: I believe the conventional wisdom of use these days is: "only use :use with :only".

23:37 djwonk: but I think people generally prefer :require over :use.

23:37 tomoj: "don't use :use. use :require with :refer"

23:37 tmciver: or use :require with :as

23:38 tomoj: yeah, :refer if you insist :)

23:38 djwonk: hmmm. that isn't really sinking in but I'll write it down and see if it makes sense later. :)

23:38 right now, I just want to pile everything into one namespace until it makes sense to divide it up

23:39 mpan: how bad of an idea is it to make a new quil sketch every world update?

23:40 tmciver: djwonk: yeah, that's fine. But if you start publishing code, I'd consider getting rid of those use's :)

Logging service provided by n01se.net