#clojure log - Mar 09 2012

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

0:00 uvtc: technomancy, Ah. Will read the docs for gen-class. Thanks!

0:00 technomancy, Is clojars a "maven repository"?

0:02 technomancy: yeah

0:02 uvtc: I think I read on the lein site that it uses the maven java lib under the hood.

0:02 Is that changing in lein 2?

0:05 s/lein site/lein github page/

0:08 jodaro: huh

0:08 http://elixir-lang.org/

0:08 cool

0:11 uvtc: Perhaps I'm missing something obvious ... is there a way to get the source code for a given lib at Clojars?

0:12 dnolen: huh how do you install swank-clojure w/ lein2?

0:12 devn: uvtc: you already have it

0:13 open the jar and take a look

0:14 yo bro im using clojure to emit clojurescript that emits elixir

0:17 jodaro: heh

0:17 devn: that's cool though

0:17 thanks for sharing that

0:17 jodaro: does the elixir emit erlang?

0:17 and the erlang, like, C?

0:18 romanandreg: is there a way to obtain the IJavaScript results from the cljs.closure/build function?

0:18 I tried calling directly cljs.closure/-compile but that causes some issues

0:18 uvtc: devn, huh. Hadn't seen that before. I'd checked one or two jars, but IIRC they contained only class files...

0:18 devn, thanks.

0:18 dnolen: romanandreg: like grabbing the generated JS?

0:18 devn: uvtc: glad i could help :)

0:19 uvtc: devn, maybe the jars I'd looked at were generated from Java, rather than from Clojure source...

0:19 devn: uvtc: totally plausible

0:19 romanandreg: dnolen: yeah

0:19 devn: it doesn't always work, but for most libs i am able to just open them up

0:20 romanandreg: dnolen: the one that has the info with provides, requires etc

0:21 devn: romanandreg: are you talking about file output?

0:21 (cljsc/build "foo.cljs" {:optimizations :advanced :output-to "foo.js"})

0:21 (read-generated-js *1)

0:23 romanandreg: devn: I'm talking about the actual compiled files...

0:23 https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/closure.clj#L860

0:23 this guys

0:23 yoklov: is there a shorter way to represent (keyword "`")

0:23 without it being a syntax error

0:24 romanandreg: I'm compiling and after that, I want to get all the different namespaces that are provided to generate a google.require with each of them

0:24 iterating over the compiled types calling :provides on each of them

0:24 however, when calling build and then -compile, the compiler gets all fucked up

0:24 :-)

0:24 technomancy: dnolen: it's [lein-swank "1.4.3"]; gotta get that readme updated

0:30 dnolen: romanandreg: what are you trying to do that requires this?

0:31 romanandreg: dnolen: :-)… Having a server handler that every times that receives a request, compiles the cljs, and then tries to get all the provided modules and add them in a script tag after compilation…

0:31 dnolen: don't know if that is a good or a bad idea yet

0:34 ibdknox: romanandreg: you probably don't want to try and require things dynamically

0:34 that will just make you sad in the long run

0:35 romanandreg: noir-cljs might be of some interest as an example, though it explicitly doesn't beam new dependencies up

0:36 romanandreg: ibdknox: well is getting me to drink with the compiler barfing back at me with "Can't recur here" exceptions

0:36 ibdknox: going to check that out

0:36 ibdknox: romanandreg: ah, you've AOT'd the compiler

0:36 romanandreg: rm -rf classes/cljs/

0:40 romanandreg: ibdknox: like noir-cljs so far

0:40 ibdknox: checking out watchtower… are you using inotify for that one? :o

0:54 dnolen, ibdknox: thanks for the help/feedback

1:11 muhoo: #noir is quiet, so maybe i'll ask here instead:

1:11 http://francesco-cek.com/uploading-a-file-to-amazon-s3-using-clojure-and-noir-2/

1:11 clojurebot: c'est bon!

1:12 muhoo: is that still current or is there better tutorial on using the s3 api in noir?

1:12 i just need a simple example that works, then i can take it from there.

1:19 Raynes: i'll tell you one of the features i wish that refheap had.

1:20 the greatest thing about mailing lists is that you can google say an error message, and find a mailing list discussion or forum that has the answer to what the problem was.

1:20 but when i google say a kernel error message, and i get a fucking pastebin, that's worse than useless. because, that's not an answer. it's just a log with the error.

1:21 whereas if the question was asked on a ml, there'd be an answer already there.

1:21 it'd be nice if refheap could somehow keep track of discussions in channels that reference the refheap paste. like a trackback/pingback

1:22 tomoj: hmm

1:22 how do you signal a resolution?

1:23 Raynes: muhoo: So, tags?

1:23 muhoo: The problem with what you suggest is getting people to use it and use it reliably.

1:24 If I were to add a channel thing like hpaste, would anybody use it? If I set it to a default channel, will they change it if it is incorrect? If I add tags, will anyone take the time to tag it?

1:24 muhoo: that's the problem, yes.

1:24 Raynes: There are a lot of problems with it.

1:24 tomoj: it would be an interesting project to try to do this with no participation

1:25 Raynes: Oh, wait, discussions.

1:25 I read that wrong.

1:25 muhoo: yeah, it's like, you'd have to scrape logs of channels, looking for mentions of the refheap paste

1:25 Raynes: That's pretty insane.

1:25 :p

1:25 muhoo: and then archiving the discussion around it.

1:25 well, maybe datomic could do it :-P

1:25 tomoj: but if you just take the next/prev N lines..

1:26 Raynes: Yeah, but actually finding them.

1:26 Where are the logs for a Haskell paste?

1:26 There are 4 or more Haskell channels.

1:26 And when do I scrape the logs? If I do it immediately, the user wont have time to link his paste.

1:26 tomoj: guess people have to ask the bot to join their channel if they want it

1:26 muhoo: it causes a lot of problems, yes. but internet archive has been around for over a decade now, and everybody thought they were insane when they started that too.

1:27 Raynes: Heh

1:27 It's a decent idea, but it sounds like a lot of work for not a lot of payoff.

1:27 muhoo: yep. and i solved my noir/s3 problem by googling the error.

1:27 and got a mailing list discussion that told me, basically " don't use noir/s3" :-)

1:27 Raynes: Heh

1:28 muhoo: looks like it's unmaintained.

1:28 * muhoo goes to loc at clj-s3 instead

1:31 ibdknox: you should use weavejester's

1:31 I'm going to remove noir.util.s3 in 1.3

1:31 muhoo: https://github.com/weavejester/clj-aws-s3

1:33 muhoo: yep, found it

1:37 it works!

1:37 * muhoo does the breaststroke through an underground tunnel.

1:46 devn: muhoo: mario, is that you?

1:47 * devn plays the underwater theme

1:48 devn: http://www.youtube.com/watch?v=TBx-8jqiGfA

1:49 gfredericks: I think this is the first time I have seen #clojure at 1AM, so by induction it must always be mario-themed at this time.

1:55 devn: gfredericks: i like where your head is at

1:56 * gfredericks would prefer a pillow, personally

1:56 * devn is reminded he has Lajla on ignore from over 2 years ago

1:57 * devn removes ignore

1:57 Lajla: Such drastic meassurements

1:57 not at all necessary

1:57 devn: Lajla: it was at one point

1:57 trust me.

1:57 Lajla: Jesus once said 'Vote republican'

1:57 True story.

1:57 Why, what did I do?

1:58 devn: Just being generally disagreeable for what could only be seen as doing so for the sake of it.

1:58 "let me steamroll you for the next hour..."

1:58 Lajla: I'm just misunderstood

1:59 devn: Lajla: or you're completely understood

1:59 take your pick

1:59 Lajla: Like Hitler, Stalin, Mao Zedong and Ché Guevarra

1:59 dreen: lol

1:59 gfredericks: a surprisingly frank place as well; at least with a 2 year lag

1:59 devn: your mother's name is frank.

1:59 Lajla: Besides

1:59 Sonic > Mario

1:59 No doubt about that.

1:59 * devn facepalm

2:00 Lajla: Sonic was in every way superior to the mario games of its generation, the Genesis had superior hardware anyway and sonic took full advangtage of it.

2:00 devn: totally bro

2:00 Lajla: Right on

2:00 devn: Left off

2:00 dreen: rofl, u guys arguing about sonic and mario?

2:00 devn: nope.

2:00 Lajla: programmed by the finest programmers on the world, save for myself and the Microsoft Chief Software Architect

2:00 No

2:00 we agree that sonic was better

2:00 I don't see how you can call Mario better.

2:01 devn: THIS IS AN OUTRAGE

2:01 IT IS CLEAR THAT MARIO WAS BETTER

2:01 HOW DARE YOU

2:01 Lajla: Sonic was just better, the levels were more extensive, it was actually 2D, mario was basically 1D, you couldn't really go up and down like you could in sonic.

2:01 * devn waits for the sarcasm to seep in

2:01 ibdknox: (╯°□°)╯︵ ┻━┻

2:01 Lajla: In mario, if you fell down you were dead, in sonic, you landed on an 'unoptimal route' but at the same time it was much harder to not fall.

2:02 THereby raising the skill ceiling of the game's time runs.

2:02 devn: Lajla: this is why you're "misundertood"

2:02 dreen: in depth knowledge

2:02 devn: these are the rantings of a mad man

2:02 Lajla: In sonic, you had to make platforming combinations to say stay on the best route, in mario you could just pause and take your time to do anything.

2:02 No, this all true.

2:02 You cannot deny this.

2:02 devn: write this in your memoirs

2:02 and i absolutely can

2:02 and i have

2:02 Lajla: Not famous enough

2:03 The Microsoft Chief Software architect is though

2:03 devn: Is that a subtle 1984 reference or something?

2:03 Lajla: No, that's bill gates.

2:03 devn: What are you talking about?

2:03 Lajla: I don't know, one of the first things I ever said here was 'I'm the best programmer in the world save only the Microsoft Chief Software Architect'

2:03 devn: It's like slashdot circa 1995 polluted you and left you for dead.

2:04 Lajla: Ehh, Bill Gates, that's his position at Microsoft.

2:04 Chief Software Architect

2:04 ibdknox: no

2:04 Lajla: Not Chief Exectutive Officer

2:04 ibdknox: that *was* his position

2:04 Lajla: Nowai

2:04 He left us.

2:04 ibdknox: he hasn't held that for a long time

2:04 devn: ibdknox: don't feed the...

2:04 ibdknox: devn: ;)

2:04 Lajla: Who will give us the new version of DirectX now

2:04 What's he doing now then?

2:04 devn: he's drinking apricot tee with his mum

2:05 ibdknox: chilling. You know how it is

2:05 devn: tea*

2:05 tee would be interesting though

2:05 Lajla: devn, I'm not that mad am I?

2:05 I mean, I am diagnosed with paranoid schizophrenia

2:05 dreen: tea from tees'

2:05 devn: Lajla: you're pretty mad, all things considered

2:05 Lajla: but honestly, psychiatrists are just out to get me.

2:05 devn: yeah...totally

2:06 Lajla: To discredit my reputation driven by their alien overlords.

2:06 devn: it must be nice to have a leg up on everyone you ever interact with

2:06 muhoo: omg, what happened here?

2:06 Lajla: muhoo, sonic or mario?

2:06 devn: muhoo: i engaged Lajla -- the worst mistake ever

2:06 Lajla: Picard Engages warp speed

2:06 muhoo: o noes.

2:07 Lajla: Well, he tells LaForge to engage it.

2:07 And then LaForge does it.

2:07 devn: Lajla: good job on the fine detail there

2:07 Lajla: So he engages it by proxy.

2:07 Honestly, I never was a fan of TNG.

2:07 devn: really important to get star trek references completely accurate

2:07 Lajla: I don't know, the characters all feel a little bit too 'perfect'

2:07 I was more a Niner.

2:07 devn: Lajla: have you ever written a show?>

2:08 scripts i mean

2:08 have you ever done that?

2:08 Lajla: Nahhh, I once had to for an art project write a praemise

2:08 muhoo: my roomate was a freak for those star treks. i was anti. i'd call it the "captain!" show

2:08 devn: i'd love to read your immaculate work. i bet it's fantastic

2:08 dreen: perhaps people enjoy tng cos they desire to be more perfect, perhaps u enjoy niner cos you already are perfect...

2:08 Lajla: Got a pretty good grade for it, it was kind of original and weird though.

2:08 devn: yeah kind of shitty

2:08 erm, original and weird

2:08 muhoo: because, i knew it was on, because there was always someone intoning "but, captain!" in a worried, concerned tone

2:08 Lajla: dreen, TNG probably got popular because it told people what they wanted to hear to some extend

2:08 humans, morally infallible beings crusading the galaxy against all evil.

2:09 Whereas DS9 was more like 'Humans, fallible creatures in a universe where right and wrong are complicated and very opague'

2:09 devn: opague...

2:09 totally.

2:09 Lajla: Is that opaque?

2:09 It's opaque isn't it?

2:09 dreen: yes, humans bar any real progress excepting that of technology

2:09 Lajla: I wirte opague because I pronounce it with a g for some reason

2:09 * muhoo goes back to enjoying a sane way to mangle s3 directory structures... with clojure! yay.

2:10 Lajla: I did like the addition of Section 31.

2:10 devn: so anyway, topic

2:10 clojure

2:10 Lajla: Clojure is poison to the mind.

2:10 devn: Lajla: so what is the right thing

2:10 Lajla: Someone in #schem called it 'a degenerate liso', but those guys are soooo fucking elitist.

2:10 devn: please...everyone needs to know what you're thinkin

2:10 you set the bar for all of us

2:10 Lajla: Like, some guy comes there asking for help and lets it slip through that though he likes scheme, he fears it has no industry potential

2:11 and they start raging at him

2:11 And completely scare him away

2:11 What is that

2:11 devn: par

2:11 unfortunately...par.

2:11 dreen: perhaps its a fear of theirs

2:11 devn: lispers are ancient neck-bearded hipsters

2:11 Lajla: THey just justify every stereotype of scheme programmers being out of touch people with their Ph.D. up their arse who can't accept that their pet language isn't popular.

2:12 But then again, here people's minds are already poisoned from no TCO.

2:12 devn: Lajla: that's just angry, stupid grad students

2:12 Lajla: devn, will you dance with me?

2:12 devn: Lajla: why not?

2:12 Lajla: On the Mondscheinsonata?

2:12 Nahhh

2:13 devn: IM A GRAD STUDENT AND I KNOW JAVA SO THIS WHOLE SCHEME THING IS NOT UP MY ALLEY

2:13 Lajla: Do the Große Fuge

2:13 It suits my mind more.

2:13 dreen: sometimes i wish i were a grad student

2:13 devn: kids in school, man. smart guys, but often a very limited perspective

2:13 dreen: i wished that. then i did it.

2:14 then i didn't ever want to do that again.

2:14 dreen: yes, power to u!

2:14 Lajla: devn, so it's the Große Fuge?

2:14 devn: Fugue?

2:14 Lajla: From Beethoven

2:14 devn: Fugue.

2:14 Lajla: Only good piece he ever wrote honestly.

2:14 No, Fuge

2:14 German

2:14 Fuge is German for Fugue

2:14 devn: Why mix languages. You're typing english.

2:14 Keep your colors within the lines.

2:14 Lajla: You know it?

2:15 Well, I will call it the Great Fugue then

2:15 devn: fair play. yeah, I've heard it. You're telling me to "do it"?

2:15 What the hell does that mean?

2:17 Lajla: No

2:17 dance on me with that.

2:17 dreen: i wish to interact with good programmers, so that i may pick up some info here and there

2:17 Lajla: How could you ever ignore me, we are having so much love between us already.

2:18 I am the best in the business save for the microsoft CSA

2:18 Interact with me.

2:18 dreen: yes, i realise that now

2:18 Lajla: I am like Eliza, I respond.

2:18 realize*

2:18 realise is an abomination

2:18 THe OED condemns it and for good reason

2:18 dreen: i am not American..!

2:18 Lajla: It's a 60-year old or so misspelling.

2:18 Doesn't matter.

2:18 It's silly

2:18 dreen: its zilly!

2:19 Lajla: it derives from a mistaken idea that since 'analyse' et cetera is British (and etymologically correct) then 'realise' should also be British

2:19 devn: Lajla: I want to help you, man.

2:19 You are like: "Gotta watch Wapner"

2:19 Lajla: that's where it's wrong, because it's only half a century old and there is no etymological reason for the s there whatsoever.

2:19 It is pronounced with a /z/ and etymologically it derives from the Greak zeta in the form.

2:19 devn: You need to settle down.

2:19 Lajla: devn, what's that?

2:19 devn: You're hyper.

2:19 dreen: ah, well in that case i will be sure to inform my fellow countrymen

2:20 devn: Manic even.

2:20 Lajla: No I'm not

2:20 I'm quite stoic emotionally

2:20 it comes with the paranoid schizophrenia

2:20 devn: Emotional stoicism does not make a stoic.

2:20 Quite the opposite.

2:20 dreen: i was stoic once, in Ultima Online

2:21 devn: oh god...bringin' up UO

2:21 there goes the party

2:21 I played UO like a fiend for 3 years

2:21 until I got banned for duping gold

2:21 dreen: lol

2:21 Lajla: dreen, good

2:21 You carry on the torch for etymological perfection

2:21 Or should I say

2:21 oetymological perfection

2:22 YEEES

2:22 I should.

2:22 devn: Lajla: it's awkward to congratulate yourself.

2:22 Lajla: Oh wait, I shouldn't

2:22 I wonder where I got that from.

2:22 devn: im not trying to be a jerk, but you should know that's weird

2:22 Lajla: I am going to spell it like oeconomy henceforth

2:22 aeternal

2:22 aequality

2:22 YES

2:22 Perfection

2:22 paedantic

2:22 devn: => false

2:23 you are ego stroking

2:23 it's onanistic ridiculosity

2:23 Lajla: aequal relates to similarity, equal relates to horses.

2:23 I like it.

2:23 YES

2:23 Perfection

2:23 dreen: how does one know if ones code is crappy when one does not have anyone else to review it?

2:23 Lajla: Sweet sweet etymological perfection

2:23 dreen, gimme.

2:24 devn: Lajla: I'm glad we had this talk, but you have to go back to ignore. Your self-absorption is without equal. You ruin conversations by "enhancing" then, and worst of all you think it comes from a good place.

2:24 Lajla: See you in the future maybe

2:24 Lajla: aequal*

2:24 Join me in my quaeste

2:24 for etymological perfection

2:25 unrivalled paedentry shall be hours.

2:25 ours*

2:25 devn: quiet.

2:25 Lajla: I should spell dwarf like dwargh

2:25 YES

2:25 devn: nice.

2:25 dreen: by shipping it

2:25 dreen: hmm, i'm afraid it's not Clojure...

2:26 devn: i'm afraid this is the clojure channel

2:27 dreen: indeed it is, which is why i made the previous statement

2:27 devn: drewr: if you want a review post a gist

2:27 eerrr dreen*

2:28 dreen: mmh, yes good idea

2:33 you guys do Clojure for a living?

2:37 muhoo: this is probably the ugliest code around, but it makes me so happy https://refheap.com/paste/988

2:38 dreen: I wish i could rewrite my current in Clojure immediately

2:38 *project

2:40 raek: muhoo: you can have :when clauses in the for to eliminate the call to filter

2:41 muhoo: ah, of course, thanks!

2:41 raek: (for [o [(:objects (s3/list-objects cred "yeah-uhhuh"))] :let [f (:key o)] :when (= "m4v" (last (.split #"\." %))] ...)

2:42 sorry, remove the square sparens around (:objects ...)

2:46 muhoo: interesting, the :let.

2:46 i ended up with (for [f (map :key (:objects (s3/list-objects cred "yeah-uhhuh"))) :when (= "m4v" (last (.split #"\." f)))] f)

3:02 devn: dreen: do rewrite it in clojure, and then show people how nice it is.

3:03 dreen: yes, i would love to, but i dont think my skills would allow me to do it in a decent amount of time

3:04 i have had to struggle for a long time just to create my current version

3:49 muhoo: hmm, there doesn't appear to be a way in clj-aws-s3 to make the thing i put be public ACL

3:49 or to set its mime type

4:01 and i'm sure this has already been done https://refheap.com/paste/989

4:03 i decided i do not like (-> ) anymore

4:03 makes it too hard to debug stuff.

4:04 i'd rather have (stuff (like (this instead)))

4:06 dreen: -> makes my ears bleed

4:06 muhoo: it's nice in dealing with java, i found

4:06 because of all the (-> Foo. .bar Baz. .doh) crap

4:07 dreen: i c

4:07 muhoo: but for clj, i'd rather have parens, thankyouverymuc

4:08 in the repl, if i build stuff like (foo (bar baz)), it makes it easier to copy out just (bar baz) and see what that does, then try (foo (bar baz)) and find where it breaks

4:11 my single, sad, pathetic, but still wildly successful (to me) first useful clojure program: https://refheap.com/paste/990

4:12 dreen: ah to make a useful program@

4:13 muhoo: it only took me 4 hours :-)

4:13 vijaykiran: muhoo: instead of two br use CSS :P

4:13 muhoo: oh gawd, you're making me deal with css too? :-)

4:13 vijaykiran: sooner or later - you need to :)

5:12 y3di: wow reading clojure code is not hard at all, as long as its indented properly

5:14 lucian: y3di: that's part of why i'm torn between my hatred for reader macros and my love for python's beautiful syntax

5:22 y3di: is there a place where I can see the reason of why vectors were used instead of lists in certain language/syntatical constructs?

5:23 such as with let and def

5:23 or fn args

5:24 lucian: for things that aren't function calls, generally

5:24 in clojure you can be pretty confident that in (foo 1 2), foo is a function-like thing (function, macro, etc.) called with 1 and 2 as arguments

5:24 llasram: y3di: or things which aren't "function call like," although the convention is arguably not entirely consistent

5:25 lucian: so in (let [a 1]) it's clear that a isn't being called with 1 as an argument

5:25 some use [ ] in scheme for the same effect, but there it's just synonymous with ( )

5:26 llasram: And in `ns' forms most people use lists for the (:require) etc components, because although it isn't actually function call itself, it evokes the effect of calling the analogous (require) etc functions

5:27 y3di: interesting, so essentially its just to emphasize that the first element of a [] is not a function-like entity

5:28 lucian: basically, yeah

5:28 and also, the language has a bunch of literals, why not use them?

5:28 just like { } is used for metadata, etc

5:28 y3di: thats fair, now that i understand the reasoning, it makes sense

5:29 i think it increases readability too

5:29 lucian: it does

5:29 at least for me, i'm not coming from lisp

5:34 kenneth: hey there, having some trouble

5:35 i'm translating a ruby ML algo to clojure, for practice, and it's spitting out funky values… but i can't figure out where i fucked up. https://gist.github.com/599518c1ca241ddfbafe … ideas?

5:36 output is -1655912.1029067077, expected 2.4

5:36 problem seems to be in the gradient-descent function

5:37 all other functions when tested with the same args in ruby and clj seem to return correct values, but gradient descent spits out random thetas

5:37 ejackson: kenneth: try to factorise it and test small sections

5:40 kenneth: okay, will try that tomorrow morning. think i'm gonna head to bed now

5:41 gotta wake up hella early tomorrow, shouldn't be awake atm

5:44 y3di: so as i try to wrap my head around how clojure (and in extension lisp) works I come across some questions. such as:

5:46 when you bind a function with let, inside another function, wouldnt that be slower than say, defining the function outside the other function and then just calling it in the function

5:46 that way youre not constantly creating the first fn everytime you call the outer function. or am i misunderstanding how lisp works

5:49 raek: y3di: the cost of creating a function value is quite low

5:49 should be in the same order of magnutide as boxing a number

5:49 the function is only compiled once, so you don't end up analyzing the code each time you evaluate a (fn ...) expression

5:51 if the function does not use any free variables, then only one instance of it is needed. I don't know wheter the clojure compiler performs that optimization

5:52 llasram: In the JVM implementation there's a class defined at compile time for each lexical location your code defines a function. At runtime to create a particular instance of that function, it just instantiates the class. So it has the same performance implications of using any other objects

5:55 y3di: word, thanks guys

6:03 is there/how do you do block level commenting? i.e. /* */

6:04 TEttinger: y3di, I use (comment .......)

6:04 but there is probably a better way

6:05 llasram: The `comment' form isn't really ideal, because what's inside the form still does need to parse (parens balance, etc)

6:06 So you can comment out code with it, provide code examples, etc, but can't really make *comments* with it

6:06 For "block comments," you just comment every line in your comment

6:07 Same situation as in Python, Ruby, etc

6:15 y3di: python has the """ """ hack tho

6:17 llasram: Yeah, but you typically only use it for docstrings in practice. In Clojure you just use the regular string syntax for docstrings, with the minor annoyance of needing to escape '"' characters

6:18 zamaterian: Does anyone know when Clojure Programming Rough cuts version get updated to the final version =

6:18 s/=/?

6:46 y3di, (comment ... ) returns nil, another way is to use the #_ then the reader ignores the following for ex: (prn "test" #_(str 3434 dfdf))

7:11 tscheibl: cool.. now I can remove some more Java interop from my projects :)

7:42 dfgdfgdfg: is there a image manipulation library in clojure or any interface for imagemagick?

7:43 dan_b: '"... I knowm, I'll use imagemagick". Now they have two problems'

7:43 (sorry)

7:43 nachtalp: :)

7:45 dan_b: (no, I can't actually answer your question. but my Ruby experience with imagemagick has left me reluctant to go anywhere near it)

8:00 NoICE: bindy: hi

8:01 llasram: dfgdfgdfg: Java has a bunch of basic image-manipulation stuff in the standard library. Depending on what you're doing, might be enough

8:15 dfgdfgdfg: llasram: yup, I am using Jmagick for java..just wanted to check if there is something specifically in clojure for that

8:15 llasram: Ah, gotcha

8:18 tscheibl: It's always nice when you don't have to use Java interop :)

8:21 llasram: Beats doing Java interop in Java :-)

8:26 TEttinger: can anyone recommend a nice-looking GUI framework for Clojure (preferably written in Clojure, not Java, but I'm not picky)? HTML as markup would be OK too

8:26 There's Substance/Insubstantial LaF for Swing

8:29 honestly I would be OK with just an easy-to-use rich-text-display widget in some GUI framework...

8:29 lucian: TEttinger: there's seesaw

8:30 alternatively, you could use a webview

8:30 TEttinger: lucian, I saw seesaw, it looks good but I don't know how stable it is

8:30 lucian, webview?

8:30 lucian: TEttinger: the component browsers use for rendering web pages

8:30 you could even just use a browser

8:31 and seesaw looks actively developed

8:31 TEttinger: lucian, I don't have access to a good server, so browser seems sub-optimal

8:31 lucian: fucking xchat

8:31 TEttinger: I use Floe IRC on windows :-)

8:32 lucian: xchat is the least crappy i've found that isn't LimeChat. and limechat is osx-only

8:32 TEttinger: but yeah if seesaw is decent I can use Substance (maybe Insubstantial now), which makes Swing look pretty excellent

8:33 * vijaykiran +1 for Emacs + rcirc

8:33 nachtalp: lucian: i've used xchat for years without problems...

8:34 lucian: nachtalp: that doesn't make it not crap :)

8:35 nachtalp: lucian: if it doesn't cause problems the crap can't be that bad imho :)

8:36 lucian: the UI is terrible, it forgets things, doesn't automatically remember joined channels ...

8:36 i've started writing my own, but it's not usable yet

8:36 nachtalp: lucian: ic, i just use it as a frontend for dircproxy...

8:37 lucian: i've considered using it as a frontend for znc, but it wouldn't solve the many UI issues

8:37 zamaterian: lucian, is it on github ?

8:38 lucian: zamaterian: bitbucket, but it's really useless atm

8:38 TEttinger: http://insubstantial.posterous.com/insubstantial-71-release so can lein pull in these maven jars without much trouble?

8:38 lucian: i had to take a detour in fixing gtk3/twisted bugs

8:38 nachtalp: lucian: there's always ircII to fall back on ;)

8:39 TEttinger: I am not really sure how to use lein in an eclipse project with CCW

8:39 lucian: zamaterian: if you wish to check it out later when it at least does something, https://bitbucket.org/lucian1900/irk

8:40 zamaterian: thx

8:46 TEttinger: hmm, does the netbeans clojure plugin have integration with lein?

8:49 raek: TEttinger: I think CCW got support for lein projects in a very recent version (or in a version that will be released after some days from now)

8:50 TEttinger: raek, great

8:50 raek: before that I think people used to create a lein project, run lein deps, create a ccw project and include the jars in lib/

8:55 ejackson: blame the French !

8:55 :P

9:43 dnolen: does lein-cljsbuild work with lein2 yet?

10:00 `fogus: pjstadig: Thanks for hitting 1.4 hard lately. It's helping a ton

10:06 pjstadig: `fogus: no problem :)

10:06 just need to get some patches applied ;)

10:10 TimMc: I don't understand why people would migrate their codebase to an unreleased Clojure.

10:11 Unless it is out of the goodness of their hearts? (To find clj bugs before release.)

10:11 gtuckerkellogg: I have a data structure that I was intending to be a ref to a vector of atoms. Now I realize I may need to grow the vector on both ends, and I *think* I should change the whole structure to a sorted map with integer keys. Does that sound reasonable?

10:11 dnolen: TimMc: because they were already migrating to 1.3?

10:12 gtrak`: gtuckerkellogg, maybe an ArrayDeque is what you want?

10:13 * gtuckerkellogg goes to look that up

10:13 gtrak`: dunno if clojure has an analogue

10:14 gtuckerkellogg: i think sorted map may be the thing.

10:15 i have to be able to modify the atoms at any position, and occasionally grow the beast on both ends

10:15 gtrak`: interesting post: http://stackoverflow.com/questions/4238973/writing-datastructures-requiring-pointers-references-in-clojure

10:15 * mefesto is so happy he found stencil

10:15 gtrak`: he recommends a zipper in place of a doubly-linked list

10:16 gtuckerkellogg: ahh, that may be it

10:17 mefesto: I'm guessing `stencil.core/render-file` only works for files on the classpath. Is this true and if so why not support files outside of the classpath?

10:18 TimMc: dnolen: So why not migrate to 1.3, which has known bugs, instead of 1.4, which has unknown bugs (and is still moving).

10:18 dnolen: TimMc: because 1.4 has critical patches for people who were trying to move to 1.3

10:18 TimMc: Ah, OK.

10:18 No 1.3.1?

10:19 Or might that be produced after 1.4 is released?

10:19 gtrak`: we haven't ever had backports yet, have we?

10:20 dnolen: gtrak`: 1.2.1 I think

10:20 gtrak`: oh really? i thought that came out before 1.3

10:20 * gtrak` goes to check

10:23 gtrak`: 9/23 on 1.3, and before april for 1.2.1

10:23 TimMc: So, not a backport?

10:23 gtrak`: maybe they pulled some stuff in from master before 1.3 was actually released?

10:33 stuartsierra: 1.2.1 was not a backport but a fix to critical 1.2.0 bugs.

10:41 pjstadig: moving to 1.3 would be about the same work as moving to 1.4, but 1.3 has some showstopper bugs for us, like the hashing, and RTE wrapping bugs

10:42 1.2.1 was mostly about the Keyword.intern stack overflow bug

10:42 at least that mostly what I wanted when I brought the topic up, but some other stuff got in there too

10:47 zamaterian: pjstadig, is this the hashing bug ? http://dev.clojure.org/jira/browse/CLJ-829

10:48 hiredman: no

10:48 equality was changedin clojure collections

10:48 and hashing wasn't changed to match

10:49 zamaterian: thx

10:51 stuartsierra: 1.4.0 is already beta, will hit final release Real Soon Now

10:51 hiredman: http://dev.clojure.org/jira/browse/CLJ-948 would really make dakrone happy

10:52 (speaking of dakrone)

10:52 stuartsierra: hiredman: feature enhancement, not going to make it in 1.4

10:52 gtrak`: cool story bro

10:53 hiredman: :/

10:53 I understand

11:01 randomnamehere: Hi there

11:02 ,(apply (fn [x & y] (= nil (get y x) )) :a {:a nil :b 2}))

11:02 clojurebot: true

11:02 pjstadig: zamaterian: http://dev.clojure.org/jira/browse/CLJ-861

11:02 hiredman: ,(apply (fn [x & [y]] (= nil (get y x) )) :a {:a nil :b 2}))

11:02 clojurebot: true

11:02 randomnamehere: ,(apply (fn [x & y] (= nil (get y x) )) :b {:a nil :b 2}))

11:02 clojurebot: true

11:03 randomnamehere: ,(apply (fn [x [y]] (= nil (get y x) )) :b {:a nil :b 2}))

11:03 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: sandbox$eval117$fn>

11:03 hiredman: ,(apply (fn [x & y] y) :a {:a nil :b 2}))

11:03 clojurebot: ([:a nil] [:b 2])

11:03 hiredman: ,(apply (fn [x & [y]] y) :a {:a nil :b 2}))

11:03 clojurebot: [:a nil]

11:03 hiredman: oh, of course apply

11:03 randomnamehere: & [y] ?

11:03 lazybot: java.lang.RuntimeException: Unable to resolve symbol: y in this context

11:03 TimMc: randomnamehere: Destructuring.

11:04 `fogus: ,(apply (fn [x & y] (= :FUZZ (get y x :FUZZ) )) :b {:a nil :b 2})

11:04 clojurebot: true

11:05 randomnamehere: ,(apply (fn [x & [y]] (= nil (get y x) )) {:a nil :b 2})

11:05 clojurebot: true

11:05 mr_rm: is anyone using vsclojure plugin? my clojure project does not produce an executable (it's a console app) and i'm not sure if this is expected. it just puts the clj file in bin/Debug

11:05 randomnamehere: ,(apply (fn [x & [y]] (= nil (get y x) )) a: {:a nil :b 2})

11:05 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Invalid token: a:>

11:06 randomnamehere: mhh

11:06 ,(apply (fn [x & [y]] (= nil (get y x) )) :a {:a nil :b 2})

11:06 clojurebot: true

11:06 `fogus: Is this random program mutation?

11:07 randomnamehere: no ;)

11:07 `fogus: Only the fittest code shall survive!

11:07 randomnamehere: ,(apply (fn [x & [y]] (= nil (get y x) )) b: {:a nil :b 2})

11:07 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Invalid token: b:>

11:07 hiredman: randomnamehere: stop using apply there

11:07 randomnamehere: ,(apply (fn [x & [y]] (= nil (get y x) )) :b {:a nil :b 2})

11:07 clojurebot: true

11:07 hiredman: you know what apply does?

11:07 randomnamehere: why hiredman ?

11:07 apply the fn to ...

11:07 hiredman: because apply expects the last argument to be a seq

11:08 so you will never get the map

11:08 randomnamehere: ahh damn! THX

11:08 pitfall

11:08 hiredman: (apply (fn [x] x) {:a 1})

11:08 ,(apply (fn [x] x) {:a 1})

11:08 clojurebot: [:a 1]

11:08 TimMc: randomnamehere: Not a pitfall, you just didn't read the docs.

11:09 I mean, the docs for apply are *dense*, but it says what it does.

11:09 randomnamehere: TimMc: Usage: (apply f args)

11:09 TimMc: &(doc apply)

11:09 lazybot: ⇒ "([f args] [f x args] [f x y args] [f x y z args] [f a b c d & args]); Applies fn f to the argument list formed by prepending intervening arguments to args."

11:09 randomnamehere: How should I know that it cand be callled with a map?

11:09 cause args are not [args] ?

11:10 Bronsa: ,(apply + [1 2])

11:10 clojurebot: 3

11:10 Bronsa: this is what apply does

11:10 mr_rm: is there a better place to ask about vsclojure behavior? there is no #vsclojure

11:11 TimMc: &(apply + 1 2 3 [4 5 6]) ; randomnamehere

11:11 lazybot: ⇒ 21

11:11 `fogus: ,(apply (fn [x & [y]] (= 2 (get y x :FUZZ) )) :b [{:a nil :b 2}])

11:11 clojurebot: true

11:12 Vinzent: randomnamehere, (apply f [1 2 3]) <=> (f 1 2 3). But the doc is incorrect (more precisely, arglist is incorrect). I remember I wanted to file an issue about that but then forget :(

11:13 amalloy: mr_rm: i think they have a mailing list

11:13 mr_rm: thx amalloy

11:14 TimMc: ,(meta #'apply)

11:14 clojurebot: {:ns #<Namespace clojure.core>, :name apply, :arglists ([f args] [f x args] [f x y args] [f x y z args] [f a b c d ...]), :added "1.0", :static true, ...}

11:14 TimMc: Vinzent: Arglists look fine to me.

11:14 gtrak`: anyone found a good office-hammock?

11:14 randomnamehere: So how to get the map in my fn ?

11:15 and how to call fn on :b {:a nil :b 2} without apply?

11:15 TimMc: Just... call it. It's a function, just like apply and +.

11:15 `fogus: ,(:b {:a 1 :b 2})

11:15 clojurebot: 2

11:15 hiredman: randomnamehere: clojure is a lisp-1

11:15 Vinzent: TimMc, it was changed in 1.3 and become incorrect. Let me grep my logs to find that conversation...

11:16 hiredman: there is no function-call

11:16 `fogus: and no spoon

11:17 randomnamehere: I am doing the #4clojure A nil key task

11:17 so I cant

11:17 change the (()))

11:17 TimMc: randomnamehere: In (+ 1 2 3), + is a function. The entire (fn [a b] (* a b)) statement is *also* a function.

11:17 lucian: randomnamehere: perhaps you should read a book first

11:18 randomnamehere: I've read programming clojure

11:22 zamaterian: gtrak, http://www.fatboy.com/gb/shop/product/the-headdemock-black

11:29 randomnamehere: Solved it, but still wondering about apply don't getting maps

11:30 hiredman: ,(doc apply)

11:30 clojurebot: "([f args] [f x args] [f x y args] [f x y z args] [f a b c d ...]); Applies fn f to the argument list formed by prepending intervening arguments to args."

11:31 hiredman: (cons :b {:b nil :a 1})

11:31 ,(cons :b {:b nil :a 1})

11:31 clojurebot: (:b [:a 1] [:b nil])

11:31 Vinzent: TimMc, here it is https://refheap.com/paste/1000 (see mostly end of the paste)

11:32 randomnamehere, why it don't? ##(apply (fn [one-map another-map] (merge one-map another-map)) [{:a 1} {:b 2}])

11:32 lazybot: ⇒ {:b 2, :a 1}

11:33 randomnamehere: Vinzent: but only if the map is in a seq?!

11:33 so it destructs the seq?!

11:35 Vinzent: randomnamehere, hm, that's what apply is for. It applies a function to a seq of args. You can pass a map too, then it'd be treated as a seq of key-value pairs: ##(apply (fn [x y] x) {:a 1 :b 2})

11:35 lazybot: ⇒ [:a 1]

11:38 randomnamehere: ahhhh!

11:38 THX Vinzent

11:38 Vinzent: randomnamehere, you're welcome

11:38 randomnamehere: then it'd be treated as a seq of key-value pairs << hard to guess when you are new to clojure

11:40 TimMc: Vinzent: Ah, tricky.

11:40 Vinzent: randomnamehere, don't guess, find a good article about seq abstraction! :)

11:58 dnolen: whoa lein-cljsbuild ROCKS

12:04 loops: speaking of lein.. i'm following some instructions that say to use lein plugin install.. but it doesn't work and "lein help" doesn't even list plugin as a subcommand :o(

12:05 okay.. i meant to phrase that as a question, not a bitch ;o)

12:06 "lein version" --> Leiningen 2.0.0-preview2 on Java 1.6.0_22 OpenJDK 64-Bit Server VM

12:09 Hmmm.. was remove by Phil Hagelberg without a reason given in the git log.. this is problem with following instructions on da web, always out of date

12:10 Vinzent: loops, I guess it's replaced by :plugins in your project.clj. Although, I thought it'd be an alternative to lein plugin install, not a complete replacement.

12:11 loops: Vinzent, yeah, i just discovered #leiningen, so i'll ask in there. The unfort thing is they didn't remove it from the Zsh command completion so i was tricked to think it should still exist

12:11 randomnamehere: Is there a list of what is new in lein2 ?

12:15 TimMc: loops: File a ticket, I guess.

12:17 dnolen: GSoC 2012 application submitted, fingers crossed

12:17 ejackson: dnolen: good luck!

12:18 loops: Good luck, hope it's accepted

12:18 dnolen: hey well good luck to us all, could get some really neat projects out of it.

12:33 wjc: Hi

12:33 I've got a quick question and I can't seem to find the right google search to answer it

12:34 I don't get why the two elements of the array aren't the same; (let [[f & a] '(* 5 3)] [(apply * '(5 3)) (apply f a)])

12:37 dgrnbrg: What is the fastest, easiest way to transfer lists and maps of strings between python and clojure over a socket?

12:37 I have a clojure daemon that needs to respond to queries from a python client

12:37 or is it easy enough to make a project w/ 1 lein, 2 clj backends?

12:39 nachtalp: wjc: interestingly, this seems to work: (let [[f & a] [* 5 3]] [(apply * '(5 3)) (apply f a)])

12:40 seancorfield: ,(float 1234567890)

12:40 clojurebot: 1.23456794E9

12:41 AimHere: ,(double 1234567890)

12:41 clojurebot: 1.23456789E9

12:41 amalloy: wjc: * is not '*

12:41 mfex: Hi all, in emacs in the slime-repl; how can I clear the line, for instance after putting the previous expr there with C-p?

12:42 amalloy: C-a C-k? there's probably a shorter way, but i just use the simple stuff

12:42 nachtalp: mfex: C-c C-u works for me

12:44 mfex: amalloy, nachtalp: thanks, those work

12:45 muhoo: sirc

12:45 that's it, clojure is now my sysadmin tool of choice: (reduce + (map (comp :content-length :metadata) objs))

12:45 ibdknox: dnolen, crap I forgot. Is it too late for me to still add a couple projects to the list?

12:46 dnolen: ibdknox: no you can add projects whenever you want :)

12:46 ibdknox: awesome

12:46 I've got a couple of good ones I think

12:46 applying korma to other datastores, noir-static, more on the game editor I built

12:48 muhoo: that game editor will have kids climbing over themselves to work on

12:48 Bronsa: lol

12:49 seancorfield: nice, zachary has fixed the auto-suggest search box on clojuredocs.org!

12:51 muhoo: ibdknox: in fact, i'd suggest that the folks at scratch.mit.edu will eventually pick up on it.

12:51 tmciver: I've been trying to figure out wjc's problem above but can't figure it out. Why doesn't this work: ##(let [[f & a] '(* 5 3)] (apply f a))

12:51 lazybot: ⇒ 3

12:51 `fogus: seancorfield: If it suggests something other than juxt then it's still broken

12:51 muhoo: it's the kind of thing i could imagine the media lab at MIT going all in for.

12:52 Bronsa: tmciver: you are applying the symbol + not the function +

12:52 ibdknox: muhoo: I came up with some ideas for it that would probably really blow people away. It's possible to flip the editor around and move the projection to edit the code :D

12:52 `fogus: lol, well done :p

12:52 `fogus: TimMc: Symbol looks itself up in 5, can't find it and returns 3

12:52 muhoo: ibdknox: that's fantastic. and why wouldn't it? a recorder tool.

12:52 Bronsa: ,(let [[f & a] (list * 5 3)] (apply f a))

12:52 clojurebot: 15

12:53 ibdknox: you could also theoretically draw the path you want

12:53 and have it work it out backwards

12:53 within reason

12:53 muhoo: you'll have written macromedia multimedia studio. in clojurescript

12:53 didn't victor demo that?

12:53 where he made that leaf fall?

12:53 tmciver: `fogus: I'm not sure I understand you. symbol looks itself up in 5?

12:53 Iceland_jack: Has there been any Lisp that is homoiconic w.r.t. something other than lists?

12:53 ibdknox: I'm not sure that that translated to code

12:53 Iceland_jack: *have

12:54 technomancy: Iceland_jack: maybe dylan?

12:54 `fogus: timciver: Symbol looks itself up in 5, can't find it and returns 3 (sorry wrong name last time)

12:54 Iceland_jack: technomancy: hm, Dylan isn't really homoiconic

12:54 muhoo: ibdknox: good point. but yes, i see how it could.

12:54 technomancy: forth/factor are supposed to be homoiconic too

12:54 ibdknox: muhoo: that's literally recording a set of positions, this is something a bit different, and unfortunately much harder lol

12:54 zamaterian: tmciver, (let [[f & a] '(* 5 3)] [(apply * [5 3]) (apply (eval f) a)] )

12:54 Iceland_jack: e.g. {:fn * :bdy [10 15]} ⇒ 150

12:54 muhoo: ibdknox: well, you could sidle up alongside it, by stuff like starting with ability to record x,y positions

12:55 eventually it could evolve

12:55 `fogus: ##(let [[f & a] `(~* 5 3)] (apply f a))

12:55 lazybot: ⇒ 15

12:55 muhoo: ibdknox: i teach a class for kids in programming using scratch. so this stuff is very interestng to me.

12:55 tmciver: zamaterian: interesting.

12:56 ibdknox: muhoo: cool :)

12:56 muhoo: ibdknox: lately i've started teaching the more advanced students javascript, since they've kinda outgrown scratch. but they'd love that game editor

12:56 problem is, i can't teach them clojurescript until i LEARN clojurescript :-)

12:57 ibdknox: well, it would be relatively straightforward to build it in JS

12:57 amalloy: students - extra credit: teach muhoo clojurescript

12:57 ibdknox: though to do it "right" you'd need a parser

12:57 to determine the outermost scope that needs to be re-evaluated

12:57 tmciver: `fogus: why does this work: (let [[f & a] [* 5 3] ] (apply f a)) but not (let [[f & a] '(* 5 3)] (apply f a))?

12:58 muhoo: amalloy: hehe. the kids keep me on my toes. the 7th graders doing javascript discovered recursion on their own :-)

12:58 tmciver: `fogus: what is f bound to in the latter case?

12:58 amalloy: tmciver: for the same reason like three people have given

12:58 f is bound to '*

12:58 `fogus: timciver: quote suppresses evaluation, so f is bound to the *symbol* * not the function clojure.core.*

12:58 amalloy: and not to *

12:58 `fogus: what amalloy said

12:59 tmciver: OK, it's starting to sink in.

12:59 zamaterian: tmciver, (type '*) vs (type *)

12:59 amalloy: right. compare: ##(list * 5 3) and ##'(* 5 3)

12:59 lazybot: (list * 5 3) ⇒ (#<core$_STAR_ clojure.core$_STAR_@d2e2a4> 5 3)

12:59 (quote (* 5 3)) ⇒ (* 5 3)

12:59 tmciver: tmciver: that's why (eval f) works in the quoted list case. I see.

12:59 TimMc: Talkin' to yourself again?

12:59 `fogus: tmciver: Symbols are functions too. They look themselves up in whatever they are given as their first arg. If they cannot do that then they return their second arg

12:59 tmciver: ha! yup

13:00 Iceland_jack: this might be equivalent to: {:bdy {:fn map :bdy {:fn partial :body [* 5] [2 3]} :fn *}

13:00 muhoo: ibdknox: well it's a fascinating project. and i think you may really have another startup on your hands if you wanted one.

13:00 tmciver: `fogus: Ah! now your earlier statment makes sense.

13:01 `fogus: ##((symbol a) {'a 42})

13:01 lazybot: java.lang.RuntimeException: Unable to resolve symbol: a in this context

13:01 ibdknox: muhoo: haha well I'm just starting one right now :p Unfortunately, it's on a very different subject :)

13:01 `fogus: ##('a {'a 42})

13:01 lazybot: ⇒ 42

13:01 `fogus: ##('a {'zz 42} :not-found)

13:01 lazybot: ⇒ :not-found

13:02 tmciver: ##('a {'a 42} :not-found)

13:02 lazybot: ⇒ 42

13:02 tmciver: OK.

13:02 muhoo: ibdknox: that's ok. someone will do it. or it'll be an open source project, especially if you can get it into GSoC.

13:02 tmciver: Thanks all for humoring me.

13:02 `fogus: tmciver: keywords do the same thing

13:03 ibdknox: I'd definitely love to really work on it

13:03 tmciver: `fogus: Yeah, I'm very familiar with the keyword case, but symbols are used infrequently for that kind of thing I completely missed it.

13:03 ibdknox: Ultimately, I'd like to go down a similar path to what Bret did. I'm all about interfaces and enablement more than anything.

13:03 tmciver: `fogus: I do recall reading about once now though.

13:04 muhoo: ibdknox: i did a little research into game engines for js. i didn't find any that would have worked for what we were trying to do.

13:05 a lot of them were very expensive, so there is a market for it.

13:06 (well, very expensive for a public school district, which macroexpands out to "not free")

13:06 randomnamehere: leaving, thx for your help

13:09 dnolen: ibdknox: man lein-cljsbuild is crazy, just started really looking at it today

13:10 `fogus: dnolen: crazy awesome or crazy crazy?

13:10 dnolen: `fogus: crazy awesome

13:10 ibdknox: dnolen: he's done a good job with it :) You should check out noir-cljs too, it has the instant compilation stuff that lets you do my game thing from emacs/vim

13:10 dnolen: we're at the point now where the acquisition story is in a good place

13:11 still some weirdness with the compiler when it gets AOT'd, but otherwise things seem ok

13:11 * muhoo wonders what an acquisition story is

13:11 dnolen: ibdknox: cool, I will. I was pretty sure lein was flexible enough to be a general solution for CLJS dev, lein-cljsbuild is proof

13:11 muhoo: is that like "barbarians at the gate"?

13:11 dnolen: ibdknox: no one should use the clojurescript jar directly

13:11 ibdknox: muhoo: just being able to get cljs working on your machine with other libraries

13:12 dnolen: except for people like me doing noir-cljs ;)

13:12 dnolen: ibdknox: yeah :)

13:12 muhoo: what's wrong with using the clojurescript jar?

13:12 dnolen: ibdknox: so lein-cljsbuild jar will package up your cljs and macros conveniently?

13:14 muhoo: same problems you encounter with using the clojure.jar directly.

13:16 ibdknox: dnolen: I haven't looked at that yet. Just generally you can use lein jar to package cljs projects. That's what I do now

13:16 muhoo: i haven't had problems using the clojure.jar directly. though i use lein repl almost exclusively lately.

13:17 dnolen: muhoo: yes, it works for simple things.

13:21 ibdknox: dnolen: any thoughts on where the game editor should go in the list?

13:21 dnolen: ibdknox: feel to create a new section

13:37 ibdknox: lol

13:37 several of my ideas have a "Skill level: medium to insane"

13:38 hiredman: clojurebot: clojure hermitage is when you take a year of hammock time after cashing in on your startup

13:38 clojurebot: Roger.

13:39 ibdknox: I need to get in on that bandwagon

13:40 dnolen: k, ideas added

13:41 dnolen: ibdknox: thx!

14:21 mstump: how can I convert two vectors into a vector of tuples [:a :b :c] [1 2

14:21 3] => [[:a 1] [:b 2] [:c 3]]

14:22 ibdknox: ,(map vector [:a :b :c] [1 2 3])

14:22 clojurebot: ([:a 1] [:b 2] [:c 3])

14:22 TimMc: aka transpose

14:23 ibdknox: ,(doc transpose)

14:23 clojurebot: Pardon?

14:24 Vinzent: mstump, are you sure you don't want zipmap?

14:24 mstump: oh, that was simple enough

14:24 i don't want a map, i'm feeding values into a function

14:25 thanks for the answer

14:26 TimMc: clojurebot: transpose is <reply>(def transpose (partial map vector))

14:26 clojurebot: Ik begrijp

14:27 amalloy: ~zip

14:27 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))

14:30 ckirkendall: anyone have any pointers on debugging macros in clojurescript?

14:30 gfredericks: ckirkendall: can't you macroexpand them like a clojure macro?

14:31 * gfredericks doesn't know for sure

14:31 ckirkendall: I can in clojure just fine but when the form comes in from clojurescript I am trying to see diffrences.

14:32 In particular I don't no how to get the namespace of symbols in the form

14:34 anyone have any ideas how to tell the namespace of a symbol inside a ClojureScript macro?

14:37 zamaterian: ckirkendall, can you use meta ?

14:39 ckirkendall: zamaterian: haven't tried that but will now

14:41 hiredman: ckirkendall: if a symbol has a nemspace component you can call namepsace on it

14:42 ,(map namepsace '(a a/b))

14:42 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: namepsace in this context, compiling:(NO_SOURCE_PATH:0)>

14:42 ckirkendall: even if the form is being passed in from clojurescript?

14:42 hiredman: ,(map namespace '(a a/b))

14:42 clojurebot: (nil "a")

14:42 hiredman: "passed in from clojurescript" means what?

14:43 clojurescript doesn't have macros, you write macros in clojure, which the clojurescript compiler expands before emitting javascript

14:43 ckirkendall: hiredman: passed in from the clojurescript compiler.

14:43 hiredman: it is a regular clojure symbol

14:44 if the symbol has a namespace component you can get it

14:45 I suspect you are operating under the mistaken impression that all symbols "live" in a namespace and some how you can retrieve that

14:45 ckirkendall: hiredman: that is how I under stand it.

14:45 hiredman: symbols do not live in a namespace

14:45 ibdknox: ckirkendall: in cljs you have to fully qualify all of your symbols

14:45 hiredman: symbols are just names and they may or may not have a namespace component as a sort of prefix

14:45 ckirkendall: hiredman: no I am not under that impression

14:46 hiredman: ah, mistunderstood your "that is how I under stand it."

14:46 ok

14:46 well, carry on then

14:46 ckirkendall: ibdknox: hiredman: here is really the issue I can't print out from inside my macro so I am not sure if what I am passing contains certain information.

14:47 hiredman: how can you not print out from inside your macro?

14:48 ckirkendall: hiredman: well that is my issue. The macroexpander in clojurescript is slightly diffrent than the one in clojure.

14:48 hiredman: ckirkendall: Oh

14:48 sure, the compiler is just spitting in to *out* like a jerk

14:49 ckirkendall: hiredman: so debugging a problem is a bit more complicated because it seems the system.out is high-jacked by the compiler and I can't set break points.

14:49 hiredman: you can spit to a file from the macro

14:49 ckirkendall: hiredman: that is great idea!!

14:49 hiredman: thanks

14:50 hiredman: I do one a day, and today has been a slow day so far

14:50 ibdknox: lol

14:50 ckirkendall: lol

14:53 technomancy: lol

14:55 amalloy: one great idea a day? where can i buy shares?

14:56 technomancy: three-lol combo... not bad

14:57 ibdknox: I'm convinced you guys were lol'ing at me lol'ing

14:58 I'm pretty sure we nearly created a blackhole there.

14:58 gotta be careful

15:06 dgrnbrg: I have a jar file, and I want to enumerate all the symbols in it. How can I do this?

15:06 is there a good way to do so in clojure?

15:07 ckirkendall: hiredman: it doesn't look like there is meta data on the symbols coming in.

15:07 ibdknox: dgrnbrg: https://github.com/clojure/tools.namespace

15:08 dnolen: ckirkendall: you want to examine the ns of symbols during macro-expansion?

15:08 ckirkendall: dnolen: Do you have any idea how to get the namespace of a symbol in clojurescript from inside a macro?

15:08 dnolen: yep

15:08 dgrnbrg: ibdknox: docs?

15:09 ibdknox: actually, i need it to understand javascript

15:09 ibdknox: ...

15:09 dgrnbrg: sorry, jaav

15:09 ibdknox: oh

15:09 lol

15:09 dnolen: ckirkendall: the standard functions should just work far as I know.

15:09 dgrnbrg: like, i have apache commons math

15:09 ckirkendall: dnolen: trying to mock a function using a macro and having very little luck.

15:09 dgrnbrg: and I want to get all the classes, methods, and fields, given the jar

15:09 ckirkendall: dnolen: mock as in using goog.testing to mock a function.

15:10 dnolen: ckirkendall: sure, but again, vars resolve in the usual way as far as know. if they don't it's a bug.

15:11 dgrnbrg: ibdknox: do you know if the clojure runtime classpath patching allows loaded classes to be seen via class.forName?

15:12 ckirkendall: dnolen: not sure I follow?

15:12 ibdknox: no idea, I haven't ventured into Java land much from Clojure directly

15:13 ckirkendall: dnolen: inside the macro I need to return the following (.createMethodMock ns sym) I was hoping to pull the namespace off the sym.

15:13 ibdknox: ns flows weirdly through the compiler

15:14 in my experience

15:14 ckirkendall: dnolen: I may have to rethink what I am doing to push more into clojurescript and less in the macro.

15:14 dnolen: ckirkendall: you want the macro to expand to contain the current namespace?

15:15 dgrnbrg: Does clojure include asm3 or asm4 on the classpath?

15:15 ibdknox: if it's just the current you can use *ns*, but I think he wants it for arbitrary symbols

15:15 ckirkendall: dnolen: I want symbols defined in the form being passed to have namespace data attached.

15:16 dnolen: ckirkendall: you have to be more clear. that information is there at macro expand time - do you need it at CLJS runtime?

15:17 ckirkendall: dnolen: ok I am confused? how I do I get the namespace of a symbol inside a form being passed to the macro.

15:17 dnolen: ckirkendall: in the standard way

15:17 ibdknox: ckirkendall: can you put up your code? That would frame the question better

15:20 darq: Hello. Can someone tell me why this macro works when I call it directly but fails when using a bound value. P.S (that's my first macro:) https://refheap.com/paste/1004

15:21 ckirkendall: dnolen: when I call namespace on cljs symbol being passed to the macro I get nil

15:22 ibdknox: darq: mlist is a symbol

15:22 ckirkendall: dnolen: I will try to simplify the test case and post a gist but its going to take a bit

15:23 ibdknox: darq: in your second example, you're doing the equivalent of (for [tcn 'a] ..)

15:23 dnolen: ckirkendall: ah this might be true - but yes make a simple test case and open a ticket.

15:24 ckirkendall: dnolen: ok, will do - in the mean time I will change my approach.

15:25 ibdknox: dnolen: fwiw, my screwing around seemed to indicate ns metadata wasn't being utilized

15:25 dnolen: ibdknox: well ns metadata can't survive so it's all stored in a namespaces atom - it's there just not on the vars (which don't exist at runtime)

15:26 ibdknox: right

15:26 ok, so my understanding is correct then

15:29 Raynes: Yay. RefHeap got its 1000th paste last night.

15:32 mrBliss: ,(let [prim-v (vector-of :long 1 2 3 4), v (vector 1 2 3 4)] (time (dotimes [_ 1e7] (get prim-v 3))) (time (dotimes [_ 1e7] (get v 3))))

15:32 clojurebot: "Elapsed time: 4401.492 msecs"

15:32 "Elapsed time: 3302.558 msecs"

15:33 mrBliss: ,(let [prim-v (vector-of :long 1 2 3 4)] (time (dotimes [_ 1e7] (get prim-v 3))))

15:33 clojurebot: "Elapsed time: 5073.192 msecs"

15:33 mrBliss: ,(let [v (vector 1 2 3 4)] (time (dotimes [_ 1e7] (get v 3))))

15:33 clojurebot: "Elapsed time: 1778.927 msecs"

15:34 candera: How do I reify a nested interface?

15:34 I've got interface IFoo { interface IBar { int apply(int device) } }

15:34 mrBliss: ^ I expected the vector of primitives to be faster than the regular vector. What am I doing wrong?

15:34 candera: I want to reify IBar and implment apply.

15:35 mrBliss: Try aget instead?

15:35 TimMc: vector-of isn't an array

15:35 candera: Sorry - just realized I'm probably jumping in without reading the whole question.

15:36 mrBliss: candera: for a nested class you have to use Outer$Inner, maybe it works with interfaces too

15:36 candera: I did try that. No love.

15:36 Raynes: amalloy: Holy crap. A Clojure mailing list question about clojail.

15:37 candera: CompilerException java.lang.IllegalArgumentException: Can't define method not in interfaces: apply, compiling:(NO_SOURCE_PATH:46)

15:37 Which at least is better than the ClassNotFound exception I was getting before

15:38 mrBliss: candera: have a look at clojure.lang.IFn to find out which methods you need to implement (applyTo(..) in your case).

15:38 amalloy: candera: IFoo$IBar is correct, you probably have the general reify syntax wrong now rather than the specific inner-class syntax

15:38 TimMc: candera: Can you pastebin your reify form?

15:39 Raynes: TimMc: You are dying without a verb for refheap, aren't you?

15:39 TimMc: I am.

15:39 Raynes: If you don't give me a good verb, I'm going to switch to saying pastebin.com as a verb.

15:39 jodaro: can't you just use refheap as a verb

15:39 as is?

15:39 "can you refheap it?"

15:39 Raynes: I've had a few ideas. "heap it" "ref it", but I never found one everyone liked.

15:40 mrBliss: throw it on the RefHeap

15:40 Raynes: toss it on the heap

15:40 :P

15:40 Toss it on the (ref)heap.

15:40 TimMc: pile that shit

15:40 jodaro: heap this

15:40 don't heap me, bro

15:40 candera: Duh. Forgot the this pointer. Amazing how asking the question suddenly makes the idiocy jump out.

15:41 TimMc: candera: Ah, the explicit "this", yeah.

15:41 candera: mrBliss, amalloy, TimMc: thanks!

15:41 Raynes: Idiocy? :\

15:41 candera: My idiocy at forgetting it.

15:41 Raynes: You're not an idiot, man. <3

15:41 You're human.

15:42 candera: Those are not mutually exclusive in my case. ;) But I thank you.

15:42 Raynes: It isn't your fault you didn't sprout from our pod.

15:43 mrBliss: ,(let [prim-v (vector-of :long 1 2 3 4), v (vector 1 2 3 4)] (time

15:43 (dotimes [_ 1e7] (get prim-v 3))) (time (dotimes [_ 1e7] (get v

15:43 3))))

15:43 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>

15:43 mrBliss: sorry

15:43 ,(let [prim-v (vector-of :long 1 2 3 4), v (vector 1 2 3 4)] (time (dotimes [_ 1e7] (get prim-v 3))) (time (dotimes [_ 1e7] (get v 3))))

15:43 clojurebot: "Elapsed time: 5163.396 msecs"

15:43 "Elapsed time: 3186.653 msecs"

15:43 Raynes: That is a fairly unreliable way of testing time.

15:44 TimMc: Using an eval bot? Yeah.

15:44 mrBliss: on my machine the primitive vector is 5x slower than the regular one

15:44 TimMc: mrBliss: I got the same results locally, running multiple times.

15:44 3-4 runs for one, then 3-4 of the other

15:45 mrBliss: I thought a vector of primitives would beat the regular one in speed

15:45 Using a profiler I found out that most time is spent in clojure.core.Vec.arrayFor and clojure.lang.RT.longCast

15:46 but why is it being cast?

15:47 TimMc: mrBliss: Is vector-of a documented feature?

15:47 I remember discovering it recently and being surprised.

15:47 mrBliss: ,(doc vector-of)

15:47 clojurebot: "([t] [t & elements]); Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :boolean. The resulting vector complies with the interface of vectors in general, but stores the values unboxed internally. Optionally takes one or more elements to populate the vector."

15:47 mrBliss: since 1.2

15:48 TimMc: Huh.

15:48 mefesto: Anyone know why `stencil.core/render-file` only supports files on the classpath instead of any file? Hoping to avoid having to slurp the file and use `render-string` instead which won't be cached?

15:50 zamaterian: darq, did you solve you problem ? (defmacro testm [mlist] `(for [tcn# ~mlist] (println tcn#)))

15:53 amalloy: i believe vector-of is intended to improve size, not speed

15:53 mrBliss: amalloy: ok, makes sense

15:55 in my small test a regular vector is 4 times slower than an array and a primitive vector is 20 times slower than an array.

15:56 I'll just use an array for this (both speed and space are a concern).

16:02 TimMc: mrBliss: I guess the boxing is happening at retrieval time.

16:03 Pulls a prim out of the store, boxes it for return.

16:04 darq: zamaterian: yes, but thx:)

16:06 mrBliss: makes sense. Can you prove it by tweaking my test to run in ~ the same time as the test of the regular vector? ;-)

16:06 TimMc: nope

16:10 chouser: (let [x (range 5)] (take 1 x) (realized? x))

16:10 ,(let [x (range 5)] (take 1 x) (realized? x))

16:10 clojurebot: false

16:10 chouser: ,(let [x (range 5)] (first x) (realized? x))

16:10 clojurebot: true

16:12 TimMc: ,(let [x (range 5)] (first x) (realized? (rest x)))

16:12 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.ChunkedCons cannot be cast to clojure.lang.IPending>

16:17 chouser: huh. unfortunate.

16:20 amalloy: chouser: realized? is allegedly for use with lazy seqs, but really it's no good except for promises

16:21 er, delays? not promises, i guess

16:22 okay, futures, delays, and promises. but for lazy-seqs it is a mess

16:27 arohner: alexbaranosky: is there a way to print the name of a fact in an around? it would help some debugging

16:29 Raynes: Wow.

16:29 That sentence was nuts.

16:29 Imagine how that would look to someone who doesn't know midje.

16:30 arohner: Good thing I'm talking to someone who knows midje :-p

16:40 dnolen: wow rhickey keynoting RailsConf

16:40 gtrak`: yea, what's that about?

16:41 maybe they all want clojure? :-)

16:42 TimMc: wtf

16:43 I hope he doesn't talk about TDD at all.

16:43 gtrak`: haha

16:45 are folks still sore about strange loop?

16:46 TimMc: Dunno, but that bit did make me uncomfortable.

16:48 ibdknox: TimMc: you a TDD'er?

16:49 TimMc: Not exactly.

16:49 But I do advocate for thorough testing of code.

16:49 I find the primary benefit is that it forces me to do better case analysis. :-)

16:51 ibdknox: it's true

16:51 dnolen: ibdknox: on a different note - I think the avoiding arguments for arity display will require less work then I thought. Google Closure is pretty smart, we won't have to make many changes.

16:51 ibdknox: dnolen: sweet

16:53 dnolen: it's always nice to find out something isn't as hard as you thought it would be :)

16:54 dnolen: ibdknox: yep

16:54 gtrak`: i like to think of tests as enforcing a contract

16:54 ibdknox: dnolen: I haven't looked into it at all yet. Applying for YC, finishing up here at RFZ, and preparing for ClojureWest has kept me busy

16:55 jbro: I have a leiningen question -- but a warning -- I may be retarded

16:55 I'm on Mac OS, installed clojure 1.3.0 from ports and can run clj and get a REPL

16:56 dnolen: ibdknox: that's cool about YC! More Clojuring in your future I hope :)

16:57 tremolo: jbro: that wasn't a question :)

16:57 jbro: I downloaded the leon script, chmod +x, on path etc, but when I try any leon command I get a NullPointerException: see http://pastebin.com/WBhd4Je9

16:57 ibdknox: dnolen: lots :) A lot of work in CLJS too I think - doing stuff for tablets

16:57 jbro: Do I somehow need to tell leon where my clojure.jar is?

16:57 technomancy: jbro: try 2.0.0-preview2 instead; that's been fixed

16:57 dnolen: ibdknox: sweeeeet

16:57 jbro: ok, I will give it a shot

16:58 technomancy: jbro: where did you get the lein script you're currently using?

16:58 jbro: techno: from your repo: version 1.7.0

16:58 technomancy: jbro: that's not version 1.7.0

16:59 jbro: techno: stable branch isn't 1.7.0?

17:00 I am downloading from the master branch right now.

17:00 technomancy: the stable branch is 1.7.0, but the error you pasted only happens in 2.0.0-preview1

17:00 jbro: That's odd

17:01 ibdknox: technomancy: I'm using heroku in my training :)

17:01 technomancy: ibdknox: o/

17:01 jbro: you committed preview2 today?

17:01 technomancy: last night

17:02 possibly today, depending on your time zone =)

17:02 jbro: techno: I see, checking I see that it was preview1 that was in my /usr/local/bin

17:02 I thought I had copied in 1.7.0, but I must have spaced. preview2 is working

17:02 thank you.

17:03 now my hair won't catch on fire.

17:03 technomancy: sweet

17:03 that's the goal

17:03 jbro: one more question: with clojure 1.3.0, do I now have to include individual namespaces that used to be in clojure-contrib?

17:04 ibdknox: yes

17:04 technomancy: clojurebot: what happened to contrib?

17:04 clojurebot: Well... it's a long story: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

17:05 jbro: right, i see the new namespace mappings, so say I want clojure.math.combinatorics. How do I get it?

17:05 can lein install these namespaces?

17:06 weavejester: jbro: Namespaces of libraries are usually contained in jar files, which can be included in your project.clj file as dependencies.

17:07 jbro: right, got that, what is the best way to obtain said jars?

17:07 clone the repo and build?

17:07 lein?

17:07 clojurebot: lein is http://github.com/technomancy/leiningen

17:07 tmciver: jbro: you put [org.clojure/math.combinatorics "0.0.2"] in your project.clj file on the :dependencies line.

17:07 raek: jbro: let lein handle it for you

17:08 weavejester: Then run "lein deps" to download the jars to your project's lib directory

17:08 raek: no need to build the projects yourself

17:08 jbro: raek: that sounds good, does that mean I always have to be in the context of some project so I can reference its project.clj?

17:08 weavejester: But I believe "lein deps" is automatically triggered by most Lein commands nowadays

17:08 technomancy: weavejester: it's true; running "lein deps" manually hasn't been necessary since May of 2010

17:09 raek: jbro: yes, most things in lein need a project

17:09 jbro: I see, so that suggests I need some type of "scratch" project to noodle about, no?

17:09 raek: it's common to do something like "lein new tinkering" and use that project for "project less" stuff

17:09 jbro: raek: ok

17:09 raek: you can also use the lein-oneoff plugin

17:10 jbro: can I tell lein/clojure a class path so I can download the jars I need and always have them available, whether through lein repl or clj?

17:11 technomancy: clojurebot: clj?

17:11 clojurebot: Cool story bro.

17:11 technomancy: come on clojurebot; I know you have a factiod for that. =\

17:11 jbro: generally clj scripts are best avoided

17:11 jbro: techno, sorry clj is simply a shell script that launches the clojure repl with rlwrap, that's how macports packages clojure.

17:11 technomancy: they're just something your distro packager threw together because they didn't realize that clojure is a library rather than a end-user application

17:12 ibdknox: jbro: yeah, don't use it

17:12 jbro: I don't really intend to, except for perhaps quick one-off tests

17:12 I intend to actually use Emacs/Slime as that is what I use for my lisp development

17:14 raek: jbro: when you get to setting up slime, only follow the official swank-clojure docs

17:14 https://github.com/technomancy/swank-clojure

17:15 jbro: raek: ok, that's sounds good, one of my frustrations with clojure in the distant past was that there were many conflicting instructions on how to get SLIME running

17:15 weavejester: Do people think wrepl or wepl is a better name for a web-based REPL?

17:15 I'm leaning toward wrepl...

17:15 jbro: I never did get it working in a way that didn't nuke my Lisp setup

17:15 weavejester: As it's akin to nrepl

17:16 ibdknox: I like wrepl lol

17:16 TimMc: interepl

17:16 raek: jbro: the first result on google is known to be outdated and misleading

17:16 ibdknox: weavejester: what's the goal?

17:16 tmciver: I second wrepl.

17:16 technomancy: CL compatibility hasn't really gotten any better

17:16 jbro: raek: thanks I'll stick to the official swank-clojure docs

17:16 techno: that's too bad

17:16 technomancy: I like "wepl" because it sounds like something Elmer Fudd would sy.

17:16 say

17:17 weavejester: ibdknox: A web-based REPL using XHR to nREPL, with the Ace editor as the prompt

17:17 TimMc: weavejester: Pronounced "repple" or "dub-repple"?

17:17 weavejester: TimMc: repple, I think.

17:17 ibdknox: weavejester: you should take a look at codemirror, I think it has better clojure support

17:18 technomancy: also "wrepl" is 150% more syllables than "wepl"

17:18 TimMc: technomancy: That depends, now doesn't it?

17:18 weavejester: ibdknox: Ah, interrresting!

17:18 ibdknox: weavejester: it's also worlds easier to use

17:18 technomancy: TimMc: oh, I guess so

17:18 ibdknox: weavejester: I've used it for all my stuff

17:18 TimMc: technomancy: double-you, dubya, and dub

17:19 weavejester: ibdknox: I should have asked sooner. I'd just gotten ace to auto-expand

17:19 ibdknox: haha

17:19 ace is a monster :(

17:19 weavejester: ibdknox: … Codemirror does everything for me...

17:19 ibdknox: :)

17:19 weavejester: ibdknox: Why have I not heard of this library?

17:20 ibdknox: weavejester: people are pretty dogmatic about ace

17:20 which is unforunate

17:20 unfortunate*

17:20 it's easy to extend too

17:21 and quite active

17:21 weavejester: ibdknox: Does it have a read-only mode, do you know?

17:21 ibdknox: hm, that I'm not sure about

17:21 you might want to look into the repl stuff that tryclj.com uses

17:22 weavejester: ibdknox: Ah yes, it does

17:22 raek: jbro: btw, here's the rationale for why leiningen doesn't use the "stuff all your jars in this directory manually" approach: https://github.com/technomancy/leiningen/wiki/Repeatability

17:23 dnolen: ibdknox: being able to package up cljs files in jars is actually kinda sweet, already a way more sane workflow then what I normal do which is copy and paste files around.

17:23 weavejester: ibdknox: I think tryclj.com just uses jquery.console

17:23 ibdknox: dnolen: definitely, the projects will work with lein checkouts too

17:23 dnolen: ibdknox: this is awesome

17:23 weavejester: ibdknox: I don't think that supports a "real" editor.

17:23 ibdknox: weavejester: ah, probably not

17:24 jbro: raek: ok, that makes sense. I can live with a "test" project that has my most commonly used namespaces

17:24 stuartsierra: By the way, it was very useful to us on ClojureScript One projects to be able to add arbitrary elements to the classpath.

17:24 weavejester: ibdknox: Codemirror does support readonly. I'll switch over to it.

17:25 ibdknox: stuartsierra: do lein checkouts solve the same problem? Or is there something specific you can get that way?

17:25 technomancy: Clojars users: please log into the web UI to re-hash your passwords: https://groups.google.com/group/clojure/browse_thread/thread/5e0d48d2b82df39b

17:25 stuartsierra: Specifically, we used a custom Lein plugin to check out sources from Git at specific commit numbers.

17:26 ibdknox: weavejester: are you just going to have a bunch of editors? It doesn't look like it supports read-only regions

17:26 stuartsierra: Then :extra-classpaths in project.clj to add those directories to the classpath.

17:26 ibdknox: stuartsierra: ah, I think you can do the same without the extra-classpaths bit if you use checkouts

17:26 weavejester: ibdknox: It does have a readOnly option in the manual

17:26 stuartsierra: ibdknox: cool. Even pin to specific commits?

17:27 ibdknox: weavejester: yeah for the entire editor

17:27 weavejester: ibdknox: I figure setting each editor to read-only would be easier than recreating the output as a static div.

17:28 ibdknox: stuartsierra: yeah, basically whatever you put in there. So if you cloned that specific commit into checkouts, it should just work :)

17:28 stuartsierra: great

17:28 raek: technomancy: if I successfully logged in, is it done?

17:28 technomancy: raek: yep

17:28 ibdknox: weavejester: yeah, I didn't know if you were trying to do that in a single editor

17:28 weavejester: ibdknox: Oh yeah. So I have an auto-expanding editor as the prompt. When the user submits the code, it gets set to readOnly, and the output and a new editor are added to the bottom.

17:28 raek: ok, great!

17:28 ibdknox: got it

17:28 weavejester: the VS editor would allow you to set certain regions as readonly, it'd be cool to do something similar in codemirror. You would only need one then :)

17:29 weavejester: ibdknox: Well, the return value from the REPL doesn't have to be text in a web-based REPL.

17:29 ibdknox: also true

17:29 weavejester: ibdknox: And I think it would be tricky to embed images and things in an editor...

17:29 ibdknox: weavejester: the VS editor supported anything renderable ;)

17:30 weavejester: probably in this case

17:30 weavejester: ibdknox: VS?

17:30 ibdknox: Visual Studio

17:30 weavejester: ibdknox: oh, right

17:30 I also wanted to have outputs that auto-update.

17:30 ibdknox: ooo

17:30 weavejester: Like an atom might be [atom 1]

17:31 And then update as it's changed, like a watch

17:31 ibdknox: sounds bret victor-ish

17:31 weavejester: You could then connect that to a graph, and have something update in real time.

17:31 ibdknox: yep

17:31 weavejester: I was playing around with the idea of being able to drag a REPL output to a side bar, to double as a watch

17:31 ibdknox: I'm doing something similar with CLJS

17:31 minus the pretty interface you're about to describe

17:32 TimMc: This somehow puts me in mind of my cascade lib...

17:32 weavejester: ibdknox: Maybe I should write said interface in Clojurescript, and have it independent of the back end.

17:32 ibdknox: TimMc: hm?

17:32 TimMc: which maintains a pending-mutation DAG

17:32 ibdknox: weavejester: :)

17:33 TimMc: I don't even know how to describe it properly. You tell it "this depends on that, and here's how to recompute it"

17:33 weavejester: I could also write it in Javascript or Coffeescript, and have it entirely independent, but I'm not sure I need go that far.

17:33 TimMc: ibdknox: Don't worry about it, that wasn't a well-formed thought.

17:34 ibdknox: TimMc: I remember the first pass at the docs for the editor, they tried to explain some concepts as "it's a directed acylcic graph"

17:34 I laughed

17:34 and immediately rewrote them

17:36 as a percentage of the programming population, very few know what a DAG is haha

17:36 TimMc: is that code somewhere? it sounds like it'd be useful

17:40 TimMc: ibdknox: Looking... it's embedded in one of my projects. ALso needs a rewrite, I think?

17:40 ibdknox: https://github.com/timmc/CS4300-HW3/blob/master/src/timmcHW3/cascade.clj

17:40 Hah, looks like I marked it as GPL. That can be changed.

17:42 "clean" should be renamed "clean!" I guess.

17:43 I also have absolutely no idea why (:gen-class) is in there.

17:48 dnolen: ibdknox: hmm, lein-cljsbuild doesn't seem to pick up cljs in jars that are included via project.clj, does this just work for you?

17:54 ibdknox: dnolen: yeah it does, you just need to restart

17:56 TimMc: interesting

18:01 TimMc: ibdknox: I'll probably pull that code out this weekend and relicense it. It was *really* useful for the GUI app it's embedded in.

18:01 ibdknox: cool :)

18:02 TimMc: ibdknox: The only irritating thing is that the cascade map needs to be stored in a ref or something...

18:03 Oh hell, I should have stored it in an atom -- then I could use swap!. Maybe it doesn't need a rewrite.

18:03 ibdknox: an atom makes more sense to me

18:03 TimMc: Yeah, I don't think I knew how to use atoms at the time I wrote it. :-P

18:04 Raynes: amalloy has forced proper usage of atoms down my throat.

18:05 At the very least, I'm terrified enough of using them incorrectly that I always ask him if I'm doin it rite

18:05 amalloy: haha

18:05 TimMc: Raynes: Proper usage, in that you should use them instead of refs when possible, or that you actually should have been using refs?

18:06 ibdknox: yeah, what are the rules of atom-club?

18:07 technomancy: huh; leiningen has three atoms in it, two of which are never modified outside user code.

18:07 ibdknox: I only use refs when coordination matters

18:07 Raynes: I've had at least 10 atom-based solutions that resulted in non-atomic reads and writes.

18:07 technomancy: and no other c.l.IRefs apart from vars

18:07 Raynes: amalloy has called me out on all of them.

18:07 technomancy: actually all the atoms are modified in user code

18:08 ibdknox: Noir uses a few for stately thing

18:08 s

18:08 TimMc: Hmm, wonder if I can dual-license that code GPL/EPL.

18:08 amalloy: stately, huh?

18:08 TimMc: I need to read up on dual-licensing at some point.

18:08 ibdknox: amalloy: yes, they attend dinners and such at the whitehouse

18:08 ~rimshot

18:08 clojurebot: Badum, *tish*

18:09 raek: GPL and EPL are incompatible, so using it through the GPL licence would be hard, since most libs are EPL

18:09 or more accurately: GPL does not want to be mixed with EPL

18:09 TimMc: I believe it doesn't rely on anything except Clojure.

18:10 raek: was this an application or a library?

18:10 TimMc: lib

18:10 Dunno if anyone out there actually GPL-licenses Clojure apps or libs.

18:10 raek: ok, then I can't use your GPL lib in my EPL project...

18:11 since the GPL places certain demands on the code that it is combined with

18:11 TimMc: raek: And you can't use a dual-licensed GPL/EPL lib in an EPL project?

18:11 raek: that you should be able to do

18:11 since you can use the EPL "version"

18:11 TimMc: Interesting. Well, I'll have to read up on this stuff.

18:14 ibdknox: licensing sucks

18:16 Raynes: ibdknox: We should create the grangerpl.

18:16 ibdknox: http://en.wikipedia.org/wiki/WTFPL

18:16 Raynes: Where you may only distribute code that has harry potter references in the comments.

18:16 TimMc: Every time you create a new license, a lawyer eats a kitten.

18:18 ibdknox: google is weird

18:18 apparently this was searched for 11 times: "fetch and ajax chris granger"

18:18 Raynes: Hey, eye bee dee knocks.

18:18 ibdknox: why that exact wording?

18:18 lol

18:19 Raynes: ibdknox: I sometimes pronounce your nick 'ehbidknocks'

18:19 clojurebot: No entiendo

18:19 TimMc: ibid knocks

18:19 ibdknox: Raynes: sometimes I do too, but don't tell anyone

18:19 ib'd knocks

18:21 Scriptor: ibn knocks

18:21 Raynes: I just pronounce it 'Hermione' sometimes.

18:27 tsally: why cant I do (require 'clojure.data.xml) from a swank-clojure repl?

18:28 do I need to do an additional step to set a library path or something?

18:29 nevermind, got it

18:34 technomancy: windows users: is this still a problem? https://github.com/ato/clojars-web/issues/14

18:40 * gfredericks is about to try paredit for the first time

18:41 technomancy: courage, gfredericks!

18:41 qbg: gfredericks: Take these with you: ( )

18:41 technomancy: qbg: "it's dangerous to go alone"

18:41 * gfredericks looks over the new tools

18:41 gfredericks: are these identical?

18:42 who knew a right paren was just a left paren turned around

18:42 qbg: Don't cross the sexps

18:42 gfredericks: okay so I need to go download the el file and add a require and hook into clojure mode and all that?

18:42 all the googlings about the topic just lead to presumably outdated docs

18:44 technomancy: M-x package-install paredit

18:44 ibdknox: gfredericks: I just dropped paredit.vim in bundle directory ;)

18:44 gfredericks: ibdknox: hush

18:44 technomancy: then (add-hook 'clojure-mode 'paredit-mode)

18:44 ibdknox: in my*

18:45 gfredericks: technomancy: what do I install to make package-install work? :)

18:45 technomancy: gfredericks: oh, that's emacs 24; if you're on 23 then it's maybe easier to install by hand?

18:46 gfredericks: man I haven't even heard of emacs 24

18:46 technomancy: it's the best!

18:46 it's at least 4.3% better than 23

18:46 gfredericks: dang I was about to try to compute that myself

18:46 * technomancy did it using C-x C-e since his IRC is in emacs already

18:47 gfredericks: &(format "%.2d%%" (* 100.0 (- (/ 24 23) 1)))

18:47 lazybot: java.util.IllegalFormatPrecisionException: 2

18:47 justicefries: I just need to switch from vim to emacs.

18:47 gfredericks: &(format "%.2f%%" (* 100.0 (- (/ 24 23) 1)))

18:47 lazybot: ⇒ "4.35%"

18:47 justicefries: brain -> vim

18:48 gfredericks: dec'ing a float seems weird

18:48 * Raynes switched from Emacs *to* Vim. :D

18:48 justicefries: I love Vim.

18:48 actually I've been told to harass you about efficient vim with Clojure.

18:49 Raynes: Heh.

18:49 My setup is just crazy simple. I don't have a REPL in my editor because I don't use that part of VimClojure. I might once the nrepl stuff is done, but I'm good with a regular `lein repl`.

18:50 My Clojure setup is just the vim part of VimClojure with fuzzy indent turned on and paredit.vim.

18:50 evil-mode for Emacs is pretty cool.

18:51 justicefries: HMM. I'm using VimClojure, is fuzzy indent and paredit.vim turned on by default?

18:51 Raynes: paredit.vim is separate and fuzzy indent is off by default for God knows why.

18:51 gfredericks: okay here goes...

18:52 maybe it isn't working

18:52 I typed a left-paren and got only that

18:52 Raynes: justicefries: https://refheap.com/paste/1006

18:52 technomancy: gfredericks: add-hook only affects new activations of clojure-mode; it's not retroactive

18:52 so M-x paredit-mode in existing buffers

18:53 gfredericks: technomancy: yeah I closed my buffers for that reason

18:53 oh hmm

18:53 doing the M-x the second time seems to have had a different effect

18:53 probably I messed up reloading my .emacs somehow

18:54 ah now it's on

18:55 justicefries: nice.

18:55 nothing else ever seems terribly useful.

18:56 re: VimClojure at least.

18:58 gfredericks: holy crap look at that thing delete

18:58 this is like org-mode table editing for s-expressions

18:59 technomancy: congratulations gfredericks! http://24.media.tumblr.com/tumblr_ls919rY3Kh1qjtesgo1_500.jpg

19:00 gfredericks: technomancy is the guy at the end of the level who congradulates you and gives you your next mission

19:00 * gfredericks really has no idea if there's a 'd' in 'congradulate' or not at this point

19:02 technomancy: are you asking for a mission?

19:02 because I can totally delegate

19:02 justicefries: haah

19:02 gfredericks: what mission comes after learning paredit?

19:02 technomancy: write a leiningen plugin that makes it easy to sign jars

19:03 amalloy: NPCs ask you to collect various parentheses they left scattered about the landscape

19:03 gfredericks: is that the extent of the requirements so far?

19:03 technomancy: pretty much

19:04 * gfredericks googles jar-signing

19:04 justicefries: anyone mind referring me to ClojureWest?

19:04 technomancy: gfredericks: bonus points for uploading the signature to repositories during deployment

19:04 amalloy: justicefries: you should go to clojure/west, ddue

19:04 technomancy: though you'd have to set up a local nexus/archiva to test against

19:04 justicefries: I'm intending to, amalloy

19:04 I'm using clojure in production now.

19:04 amalloy: i was just taking your request for a referral too literally, see

19:04 justicefries: ooh no

19:05 there's the "friend of attendee"

19:05 that gives $50 off

19:06 oomph that's an expensive flight.

19:07 Raynes: amalloy: Are you guys going to C/W?

19:07 amalloy: no

19:07 Raynes: Good. I'm not alone.

19:07 amalloy: we're not going to alabama either, man

19:07 you are alone

19:07 romanandreg: can someone help me here with cljsbuild and repl-listen, for some reason it doesn't seem to work for me

19:07 Raynes: Heh

19:07 romanandreg: ?

19:08 justicefries: ehh, the videos will be posted pretty quickly.

19:08 maybe I'll hold off.

19:08 romanandreg: The cljs repl seems to start with the browser environment

19:08 tremolo: alabama happens to be a bubbling font of clojure activity, within our company anyway :)

19:09 romanandreg: and I have the xpc from cljs.repl.browser in the browser running

19:09 once I hit (js/alert "hello") on the cljs repl, it just hangs and doesn't do anything else

19:13 ckirkendall: romanandreg, what browser are you running

19:13 romanandreg: FF 10

19:13 ckirkendall: 10.0.2

19:14 ckirkendall: romanandreg, do you have firebug installed

19:14 romanandreg: ckirkendall: I'm using the new developer tools from FF

19:14 I can see there are requests done to localhost:9000

19:15 ckirkendall: romanandreg, if you do (.log js/console "test") does it go to the logs

19:15 romanandreg: ckirkendall: nope, it just hangs the cljs repl…

19:16 ckirkendall: romanandreg, ok so the browser doesn't seem to be connected.

19:17 romanandreg: ckirkendall: https://skitch.com/romanandreg2/8e3x1/fullscreen

19:18 I started trying with google chrome now,

19:19 ckirkendall: romanandreg, hmmm

19:20 romanandreg, I have the same version of firefox. let me try. I haven't tried with firefox.

19:21 romanandreg: ckirkendall: thanks for the help :-)

19:21 _ulises: evening

19:24 jkkramer: technomancy: would you like a patch to show download progress for the maven index?

19:24 technomancy: jkkramer: yeah, sure thing

19:24 jkkramer: technomancy: is a dependency on clj-http ok?

19:24 technomancy: jkkramer: yeah, I think it's already pulled in by repl

19:24 reply

19:24 jkkramer: ok. pull request coming...

19:26 ckirkendall: romanandreg, did you have any luck with chrome?

19:27 technomancy: excellent

19:27 romanandreg: ckirkendall: no… sadly, I'm running the cljs repl both from cljsbuild repl-listen, and doing it directly on clj repl as instructed in the clojurescript wiki and no luck so far

19:28 which is pretty weird

19:28 ckirkendall: wait… I made it work running it from the repl directly

19:28 so I might think is something from cljsbuild

19:28 ?

19:28 need to play a bit more

19:29 ckirkendall: romanandreg, I think so because I am see the same thing

19:29 romanandreg, it hangs when I go through cljsbuild

19:29 romanandreg: ckirkendall: funny thing, clj repl version is hanging on second instruction

19:29 :-

19:30 :-/

19:31 pardon me, it is working

19:31 for some reason the repl get's all sketchy when running from lein2 repl

19:31 cljs repl get's all sketchy

19:46 Frozenlock: What's the correct way to exit a Slime session? I want it to close java when I quit.

19:53 tomoj: Frozenlock: ,s TAB RET

19:54 tmciver: Frozenlock: or , quit RET

19:55 Frozenlock: tomoj: thank you!

20:13 tacoman: :vsplit

20:13 er... >_> wrong buffer

20:15 qbg: tacoman: I know how that happens...

20:15 tacoman: I'm coding my senior project in Emacs + Evil mode so that I can adapt to Emacs itself before doing much heavy stuff in Clojure

20:15 but uh, it ends out that Evil doesn't work in things like erc, so I'm in this sort of hybrid state of mind...

20:16 Frozenlock: tacoman: free yourself, go 100% emacs

20:16 tacoman: Frozenlock: it's not quite as efficient for editing multi-line stuff for me. emacs keybindings are great for things like shell or other single-line stuff, Vim-style for anything longer imo

20:17 qbg: Doesn't Emacs have brainwashing built in at this point?

20:18 tacoman: M-x you-love-emacs-yes-you-do

20:18 qbg: Combine with M-x butterfly

20:18 tacoman: silly me, I don't really want to use Vim bindingz

20:18 *bindings, not trying to use X-treme Z's

20:27 I will say that setting Emacs up for Clojure was a lot easier than dealing with VimClojure

20:47 anyone have any recommendations for Git integration?

20:47 (in Emacs, not Clojure)

20:48 qbg: ansi-term works well :p

20:48 Frozenlock: tacoman: Never tried it, but Magit has a great reputation.

20:48 arohner: magit works great

20:49 tacoman: qbg: can I play Nethack in ansi-term? :P but in all seriousness, awesome Git integration was something I was missing from Vim

20:49 qbg: You can run vi inside emacs inside emacs using ansi term

20:50 Emacs inside emacs is a danger when using ansi-term

20:50 ferd: hey, anybody using swank-clojure-1.4.0 ?

20:51 autocompletion of symbols (meta-TAB) doesn't work for me (it does nothing)

20:52 qbg: ferd: At the repl?

20:52 ferd: and the minibuffer doesn't show the funcion signatures as I type

20:52 Emacs 24

20:52 clojure-jack-in

20:52 qbg: You have namespace loaded?

20:52 ferd: I did "C-c C-l"

20:52 (load file)

20:53 and C-c C-k

20:53 just in case

20:54 arohner: ferd: sometimes it doesn't work for me if there's an exception up (*sldb...*)

20:54 ferd: qbg: it does work in the slime-repl buffer

20:55 qbg: At you repl it is C-c Tab

20:55 ferd: arohner: thanks... but I re-started the session multiple times

20:55 qbg: ferd: You can always fall back to M-\

20:56 arohner: ferd: is your clojure buffer in slime-mode?

20:56 ferd: both C-c Tab and M-tab seem to be bound at my repl, and they work

20:56 arohner: you should see Slime in the list of minor modes at the bottom

20:56 ferd: arohner: yes... status shows "Slime[clojure]"

20:58 ok... I found one of them: M-tab on the buffer is bound to complete-symbol instead of slime-complete-symbol

20:58 (don't know why)

20:59 the minibuffer still doesn't show signatures :-(

21:02 qbg: I guess you meant M-/ ?

21:03 qbg: Yeah

21:04 To be fair, it is muscle memory, and I type Dvorak on a Qwerty keyboard :p

21:09 muhoo: i have a stupid destructuring question. if i have data like [[1,2], [3,4]] etc, and i want to convert it to [1,3] [2,4], how do i do that?

21:09 gfredericks: qbg: it gets real confusing when you start learning to do that by sight

21:09 i.e., hunt-and-peck

21:09 muhoo: actually it's a lazy seq, so it's ([1,2] [3,4]), and i need to get it into (1 3) (2 4)

21:09 qbg: gfredericks: It is actually how I got good at touch typing

21:10 gfredericks: muhoo: (map vector stuff) I think?

21:10 no wait

21:10 (map vector stuff1 stuff2)

21:10 amalloy: ~zip

21:10 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))

21:10 gfredericks: why don't I just do it with the bot

21:10 muhoo: zip. got it.

21:10 gfredericks: HA

21:10 muhoo: i KNEW there was a way to do it. alzheimer's kickin in early.

21:11 so i need to unzip, but i think it's in there

21:11 gfredericks: &(apply map vector '([1 2] [3 4]))

21:11 lazybot: ⇒ ([1 3] [2 4])

21:11 muhoo: gfredericks: actually, that'll work too

21:11 amalloy: ~transpose

21:11 clojurebot: (def transpose (partial map vector))

21:11 muhoo: good christ. there are tons of ways to do it :-/

21:12 amalloy: those are the same way really

21:12 gfredericks: no there's only been one mentioned so far

21:12 amalloy: how many dang bot triggers have you memorized?

21:12 amalloy: well, i taught him the ones i was tired of answering

21:12 qbg: Work smart, not hard

21:12 amalloy: and someone (TimMc?) taught him transpose earlier today, much to my dismay since i already taught him zip

21:12 ~juxt

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

21:13 muhoo: where is transpose?

21:13 gfredericks: ~grok

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

21:13 muhoo: heh

21:13 gfredericks: muhoo: it's not anywhere

21:13 muhoo: but, it's in clojurebot/lazybot?

21:13 gfredericks: (def transpose (partial map vector)) is a suggested implementation you could use

21:13 qbg: See the clojurebot answer for the def

21:13 amalloy: it was inside you all along

21:13 muhoo: i see

21:14 amalloy: but i think the transpose definition is trash really

21:14 you want (partial apply map vector) for sure, because you'll usually have a list-of-lists, not N lists

21:15 gfredericks: projecteuler.com is a big let-down

21:16 tacoman: what's wrong with project euler? it seems like the entire Internet has nothing but good things to say about it

21:16 gfredericks: nothing's wrong with project euler

21:17 not that I know of at least

21:17 qbg: PE is the one use case that the 1.3 numeric changes aren't optimized for

21:18 Can't think of anything else

21:23 muhoo: this is what i ended up with. i suck. but it works: https://refheap.com/paste/1007

21:24 doh, sorry, this https://refheap.com/paste/1008

21:26 ok, so i'm writing scheme code in clojure. it's the best i can do right now :-)

21:27 incanter is wonderfully easy to use though. very nice.

21:27 qbg: You box r just to unbox it again?

21:29 muhoo: i used to work at UPS

21:29 boxing, unboxing, all day long

21:29 qbg: lol

21:29 muhoo: i honestly don't know what you mean by boxing

21:29 Raynes: Dey see me boxin', dey hatin'

21:29 qbg: (map first all) is just (range 10000 100000 1000)

21:30 And then ys is (map vout xs)

21:30 muhoo: oh! good point.

21:30 yeah, it is kind of circular. thanks.

21:33 thanks https://refheap.com/paste/1009

21:35 qbg: Any reason why you are using for for ys?

21:36 muhoo: oh, good call. map'd work

21:36 qbg: You can also get rid of letfn, and move vout into the let

21:43 gfredericks: (defmacro cout [_ s] `(print ~s)) ;; usage: (cout << "foo")

21:49 muhoo: holy crap. https://refheap.com/paste/1010

21:50 that just snuck up on me and worked! and i was shocked that it actually worked.

21:52 TimMc: clojurebot: forget transpose |is| <reply>(def transpose (partial map vector))

21:52 clojurebot: I forgot that transpose is <reply>(def transpose (partial map vector))

21:52 TimMc: ~transpose

21:52 clojurebot: (def transpose (partial apply map vector))

21:52 TimMc: amalloy: Better?

21:52 amalloy: sure

21:53 IME people who want this usually don't realize what they want is transpose (fair; i don't either)

22:56 TimMc: ibdknox: I extracted the cascade lib: https://github.com/timmc/cascade

23:30 y3di: (def ^:dynamic v 1) -- what does the ^:dynamic mean?

23:30 i know :string is an interned string, and represents metadata?

23:30 TimMc: y3di: It means the var can be rebound with (binding ...)

23:31 y3di: What's this about :string?

23:32 y3di: wait so ^:dynamic makes v dynamic? (which means it can be rebound?)

23:32 TimMc: right

23:33 y3di: ^:dynamic is short for ^{:dynamic true}, which attaches that metadata map to the symbol "v" for the compiler to see.

23:33 and when it see :dynamic in the map, it knows not to perform certain optimizations on that var.

23:33 y3di: ah

23:34 so metadata can be applied to any var?

23:37 qbg: Metadata can be applied to many data structures coming from Clojure

Logging service provided by n01se.net