#clojure log - Oct 10 2013

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

0:00 coventry: Well, I came across this because I was getting the "unbound fn" error in "real" clojure source files. Can't be chunking in this case, each form will be executed in series, chunked or not.

0:10 muhoo: isn't eval evil?

0:11 coventry: I was just using it to make a one-liner.

0:11 arrdem: (dec muhoo) ; not fully

0:11 lazybot: ⇒ 2

0:12 arrdem: *funny

0:14 muhoo: meanie

0:14 hmm wonder if those ccan go negative

0:14 (dec muhoo)

0:14 lazybot: You can't adjust your own karma.

0:15 muhoo: well fine

0:15 arrdem: muhoo: first no we tried that, second off we have a real eval and I'm greatful for it.

0:15 muhoo: (kill muhoo)

0:17 coventry: Attached a multi-file example. http://dev.clojure.org/jira/secure/attachment/12308/unbound-eg.tgz

0:21 wtfwtf: (dec muhoo)

0:21 lazybot: ⇒ 1

0:22 wtfwtf: (dec muhoo)

0:22 lazybot: ⇒ 0

0:22 wtfwtf: (dec muhoo)

0:22 lazybot: ⇒ -1

0:22 clojurebot: It's greek to me.

0:22 muhoo: cool it can go negative

0:22 Raynes: (inc muhoo)

0:22 lazybot: ⇒ 0

0:26 JulienFantin_: How can I handle a BytesInputStream returned as the :body of an http-kit response?

0:32 arrdem: (inc muhoo)

0:32 lazybot: ⇒ 1

0:32 arrdem: (inc muhoo)

0:32 lazybot: ⇒ 2

0:33 coventry: ##(doseq [i (range 100)] (inc muhoo))

0:33 lazybot: java.lang.RuntimeException: Unable to resolve symbol: muhoo in this context

0:33 arrdem: coventry: the bots ignore each-other and themselves :/ that sort of thing isn't possible anymore

0:36 rhg135: hello again, anybody have an idea why with https://bitbucket.org/rhg135/jim-js i get https://www.refheap.com/19591 when running node on it

0:39 arrdem: would someone else please read https://github.com/Engelberg/instaparse/issues/46#issuecomment-26025774, because I have no idea what Engelberg is asking for comment on :/

0:41 logic_prog: is there a clojure reader that also contains line/column numbers as meta data? for example "(+ a\nb)" in this case, I'd like the "b" to be labeled "line 2, char 1"

0:42 jared314: arrdem: he is looking for a more task specific name. :ignored could refer to anything

0:42 arrdem: logic_prog: data.edn may, but the core reader only keeps line info for top level forms.

0:42 jared314: ah. ok thanks.

0:43 coventry: logic_prog: clojure.tools.reader

0:43 logic_prog: coventry: you're starting to become among my favorite people in #clojure

0:44 coventry: No worries. :-)

0:45 akurilin: Is there a nice pattern out there for chaining a few "given a map, if condition is true, assoc this to it, otherwise return original map"

0:46 I can thread a map through a few function literals, but it doesn't look very elegant

0:46 I bet Haskell has a monad for this :P

0:46 logic_prog: yeah

0:47 but Clojure has a macro for this

0:47 I actually wrote one two years ago.

0:47 TEttinger: logic_prog: does this work? https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LineNumberingPushbackReader.java ?

0:48 akurilin: logic_prog, nothing out of the box, right?

0:48 TEttinger: if ?

0:49 logic_prog: TEttinger: that looks like it shoudl work, but I'm currently studying coventry's link

0:49 TEttinger: ,(let [m {:a 1}] (if true (assoc m :b 2) m))

0:49 clojurebot: {:b 2, :a 1}

0:49 TEttinger: akurilin, I really don't see how that gets any simpler than if

0:50 logic_prog: coventry: I don't think that works, the IndexingPushbackReader is basically a char reader it doens't seem to read clojure forms

0:52 coventry: logic_prog: clojure.tools.reader/read gives you back forms with metadata on all symbols.

0:52 (position metadata)

0:53 akurilin: TEttinger, well I don't know if your case fits, but I'm looking to use this a few times in a threading macro. Maybe I should write something like an assoc-if which takes an additional conditional fun fn

0:53 sounds like something logic_prog was talking about

0:53 TEttinger: if-let may do it

0:54 ddellacosta: hmm, how do I get the nrepl port of currently running nrepl server?

0:54 in repl

0:54 rhg135: im writing a simple protocol in js, because the jvm is way too ram heavy for this simplicty, but i may have to relearn python or worse learn js

0:55 logic_prog: (. (Runtime/getRuntime) exec "netstat -ln")) :-)

0:56 coventry: ddellacosta: It's in .nrepl-port of the project you ran "lein repl" in.

0:56 *in the top directory of the project

0:56 ddellacosta: coventry: ah, found it--thanks. Assumed for some reason it would be stored in dynamic var or something.

0:59 technomancy: you can probably find it by spelunking around in nrepl's guts, but the file is much easier

1:01 logic_prog: coventry: (clojure.tools.reader/read (clojure.tools.reader.reader-types/indexing-push-back-reader ...)) seems to only get me the meta information on _top_level forms

1:01 i.e. for (+ 1 2 3)

1:01 the meta for "+", "1", "2", and "3" are all nil

1:01 namccarty: Welp, I just finished my first serious program in clojure. It was a logical deduction sudoku solver. It was simpler than I would haven even thought possible back when all I knew was Java and C. Consider me completly converted.

1:02 logic_prog: whereas the nmeta for "(+ 1 2 3)" has the actual correct data

1:03 coventry: logic_prog: It will only put metadata on *symbols*. Won't get numbers. Would be nice if it did... Not sure why it's not getting '+.

1:04 logic_prog: coventry: my bad, it picked up on the "+" also

1:04 coventry: nice, thanks

1:05 hmm, maybe I should just roll my own parser

1:05 how hard can parsing a scheme like be, besides dealing with the crap dealing with comments and strings

1:07 coventry: logic_prog: It's pretty simple code. It wouldn't be too hard to extend it to wrap non-IObj's in something you can put metadata on.

1:07 logic_prog: https://github.com/clojure/tools.reader/blob/54546edff7566c544e2aad5b225617b2a557b1c7/src/main/clojure/clojure/tools/reader.clj#L677

1:07 looks simple enough indeed

1:08 oh shit it exapnds macros too?

1:08 damn

1:09 coventry: logic_prog: No.

1:09 Those are reader macros.

1:09 logic_prog: ah

1:09 thanks for clarifying

1:10 rhg135: sigh python

1:13 coventry: logic_prog: If you do make it wrap non-IObj's, can you let me know? I would have use for it.

1:14 logic_prog: coventry: seems fair enough given all your help

1:15 is there a pr-with-meta ?

1:15 which takes a clojure data structure, and prints it out, but along with the meta data too

1:18 coventry: ,(binding [*print-dup* true] (print-dup (with-meta 'a {:foo true}) *out*)) (See ztellman's sleight.reader for an interesting use of this.)

1:18 clojurebot: ^#=(clojure.lang.PersistentArrayMap/create {:foo true}) a

1:18 TEttinger: namccarty:

1:18 coventry: *poof*

1:19 TEttinger: (inc namccarty)

1:19 lazybot: ⇒ 1

1:22 muhoo: akurilin: i think (cond-> ...) is it?

1:22 namccarty: I have only some idea what just happened, but I like it

1:22 muhoo: also (cond->>)

1:23 arrdem: namccarty: you just won internet point!

1:23 *points

1:24 muhoo: too bad they're not bitcoins

1:24 metellus: (inc internetpoints)

1:24 lazybot: ⇒ 1

1:27 patrickod: anyone here able to help with a newbie's compojure uberjar issues?I I'm getting java.lang.NoClassDefFoundError when trying to run a jar of my first project

1:28 akurilin: muhoo, oh yeah, I always forget about that one. *shakes fist at clojure docs*. You can actually see Arthur show exactly my use case in his example, including those #(if) functions I was talking about: http://stackoverflow.com/a/13830599/1449964

1:28 muhoo, thanks for reminding me :)

1:29 muhoo, the one downside is that cond-> forces you to use the entire threading flow for conditionals

1:29 whereas if you make an (assoc-if) function, you can use a regular ->

1:29 except now you can only do assoc

1:29 so one way or another you're picking what to pivot on

1:30 TEttinger: assoc can take multiple args

1:31 muhoo: ,(doc assoc-if)

1:31 clojurebot: It's greek to me.

1:31 muhoo: ?

1:31 akurilin: muhoo, as in, you write one yourself :P

1:31 muhoo: oh

1:32 cond-> helped me a lot. at least my let's weren't so huge

1:33 (inc inc)

1:33 lazybot: ⇒ 4

1:33 muhoo: (dec dec)

1:33 lazybot: ⇒ 0

1:33 muhoo: (inc dec)

1:33 lazybot: You want me to leave karma the same? Fine, I will.

1:33 muhoo: ~botsnack

1:33 clojurebot: thanks; that was delicious. (nom nom nom)

1:33 * muhoo gives up

1:33 technomancy: clojurebot: moar whuffie plz

1:33 clojurebot: Gabh mo leithscéal?

1:40 TimMc: I still need to read that.

1:40 TEttinger: patrickod: do you have :aot for the main class?

1:41 patrickod: nope I have :main instead

1:41 TEttinger: so if your ns was pat.core, you would have in project.clj both :aot and :main specify pat.core .

1:41 it is a change in lein 2.2 I think

1:41 patrickod: ah ok. :) I've been reading out of date docs so

1:41 TEttinger: :main no longer implicitly :aots, it throws everyone off.

1:41 technomancy...

1:42 :)

1:46 patrickod: TEttinger mind if I ask you a follow on ? getting a cryptic error message now running lein ring uberjar

1:46 TEttinger: cryptic error eh?

1:46 pastebin?

1:46 patrickod: https://gist.github.com/patrickod/b231e9ab4649ada4b635

1:47 TEttinger: can you put project.clj in there?

1:47 patrickod: ^

1:47 patrickod: sure.

1:48 https://gist.github.com/99faff34335e4643ca92

1:48 TEttinger: :aot needs a vector of namespaces

1:48 :main only can do one, so it only needs one namespace not in a vector, but :aot can do the whole lot

1:49 you can also do :aot :all

1:49 patrickod: ah ok. :)

1:49 thanks!

1:50 TEttinger: np, I've hit my head against the wall on similar issues before

1:52 patrickod: bleh still getting the same issue. most weird

1:56 TEttinger: same line number?

1:56 pastebin both?

1:57 patrickod: https://gist.github.com/patrickod/b346ed0e0f2cb768c20e

2:01 TEttinger: patrickod, is your main method named -main ?

2:02 patrickod: yep one second here's the core.clj https://gist.github.com/1ccda719fbdb47e8e65a

2:04 TEttinger: ...uh oh then. this could be that unpleasant bug regarding hyphens in namespace paths.

2:04 see how in the error it has underscores after clj ?

2:04 but the ns has hyphens?

2:04 patrickod: oh my :(

2:05 hadn't crossed my mind.

2:05 TEttinger: try taking out "clj-" or giving it some dash-free name

2:05 patrickod: are underscores a suitable replacement?

2:05 TEttinger: I think they should be?

2:06 I've seen them in prismatic's stuff

2:06 that's not likely to be it, but I am unsure of what else it could be

2:06 (I thought the -/_ thing was fixed or worked around)

2:07 patrickod: it would seem that isn't it

2:07 yep changed all references to use underscores and still seeing the same

2:08 TEttinger: ok.

2:09 try lein compile

2:09 that may give an interesting error

2:09 ^ patrickod

2:10 patrickod: ran without issue

2:10 yep with 0 exit code

2:10 trust me to hit this sort of issue with a tiny first project

2:10 jumping in the deep end

2:11 TEttinger: haha I know, it's a weird one

2:11 ok, look in... hang on a sec

2:12 target\classes in the project root, file explorer

2:12 there should be some subfolders

2:12 at least one

2:12 patrickod: yep there's quite a few

2:13 TEttinger: is one clj-geoip, or the version you renamed it to?

2:14 patrickod: there's a geoip_clj directory yeah

2:14 TEttinger: ok, in there, is there a core$_main.class ?

2:15 patrickod: yep

2:16 TEttinger: double-check project.clj :aot and :main refer to the same clj_geoip.core ?

2:17 also the folder needs to be renamed

2:17 patrickod: oh ok

2:17 TEttinger: java inherited junk...

2:17 patrickod: that's the one thing I didn't do

2:18 both :aot and :main point to the smae

2:18 same*

2:18 there are no folders with dashes left. yet getting the same error.

2:18 TEttinger: lein clean, then lein uberjar >

2:18 ?

2:19 patrickod: yay!

2:19 TEttinger: haha did that work?

2:19 patrickod: yep

2:19 I was running lein ring uberjar before

2:20 TEttinger: fantastic!

2:20 patrickod: so I'm wondering if lein uberjar is the fix, or lein clean

2:20 TEttinger: ohhhh

2:20 patrickod: is that a nono?

2:20 TEttinger: I don't know much about ring

2:20 I don't think they have their own uberjar, it may need to have lein uberjar run first

2:22 patrickod: maybe. lein ring uberjar is still broken

2:22 no matter if lein uberjar works

2:22 TEttinger: yay

2:22 can you run it?

2:22 patrickod: yep

2:22 working perfectly

2:23 although it's throwing a *lot* of errors due to NullPointerExceptions

2:24 TEttinger: I think that's the first time I've solved a complicated compilation problem without help from a more senior #clojure denizen. hooray runtime errors instead of compile time errors!

2:24 patrickod: I've graduated :)

2:24 it runs fine in the development server, now to make this thing work as a jar

2:28 TEttinger: I'm beginning to wonder if regexes are not the best way to get data out of a spreadsheet... one of my search regexes looks like

2:28 ^([^\t]*)\t\d+\t([^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d)\t([^\t]*\t[^\t]*\t[^\t]*\t[^\t]*)\t([^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d)\t([^\t]*\t[^\t]*\t[^\t]*\t[^\t]*)\t([^\t]*\t\d\t\d\t[^\t]*\t\d\t\d\t[^\t]*\t\d\t\d\t[^\t]*\t\d\t\d\t[^\t]*\t\d\t\d\t[^\t]*\t\d\t\d)\t([^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d\t[^\t]*\t\d)

2:28 patrickod: I thought that was ASCII art gone wrong for a second

2:28 TEttinger: I'm doing this to transform the line into clojure code, so it can be sorted etc

2:29 that's only the search, the replace is gnarly

2:41 namccarty: Quick style question, is the clojure equivlant to the named lets in scheme just a loop with a recur, or is there something that is used more often

2:42 I tought myself clojure from the docs, so I don't realy have the benefit of inheriting someone else's style

2:45 I should probably get around to teaching myself spelling. Well, I'm an enginner, don't really need that

3:30 Oh sweet mother of god, y u do dis clojure? I am getting a null pointer with a missing stack trace.

3:31 Anyone know anything that can cause a null pointer exception with a missing stack trace?

3:36 Never mind my last statements, clojure suddenly decdided to behave

3:51 TEttinger: namccarty, what kind of game did you say you were going to program in clojure>

3:51 namccarty: TEttinger: We are currently planning on making a tower defense thing, and then to make a 4x-ish game

3:54 TEttinger: cool. I should just say, in my experience clojure data structures have a lot of nice features but speed isn't really one of them for certain tasks. for performance-critical stuff, you should look into using primitives and arrays as much as possible. failing that, transients are nice and fast too.

3:57 namccarty: Alright, so while I am sitting here fighting with virtual vm

3:57 TEttinger: also, hiphip makes array handling easier https://github.com/Prismatic/hiphip , and I've been meaning to learn plumbing. https://github.com/Prismatic/plumbing

3:57 namccarty: does anyone know a better way to profile clojure code?

3:57 TEttinger: you mean visualVM? there are commercial ways for java code that work just as well for clojure

3:58 there may be some free ones

3:58 namccarty: yeah, visualvm

3:58 i cant get it to do profiling

3:58 andyfingerhut: I've heard good things about YourKit, but haven't tried it myself. It is free for use on open source projects.

4:00 TEttinger: http://www.fatvat.co.uk/2009/05/jvisualvm-and-clojure.html?m=0

4:01 namccarty: wat

4:01 it randomly started working

4:05 TEttinger: namccarty: https://groups.google.com/d/msg/clojure/TYNWRlspTkQ/2itdV_YTs3oJ

4:05 tips for how to use visualvm with clojure

4:05 and other profilers

4:06 namccarty: Thank you

4:08 TEttinger: no prob, I'd like to see what you can do with this, since I never got it working. I think that post has my solution though

4:08 namccarty: hmm

4:08 i got it working

4:09 im still derping around in my little sudoku solver, looks like most of my time is spent in hash table comparisons

4:10 equality comparisions that is

4:10 i need to figure out how values works in clojure so i can get past that

4:10 TEttinger: want to put it on github?

4:12 namccarty: It started as a project euler sloution, and now I plan on keeping going through it until i get clojure idioms down

4:12 https://gist.github.com/nmccarty-school/6914491

4:13 I can't get it to tell me where the hash table equality comparisions are happening, but im pretty sure it is inside attempt-solve-with-deduction

4:14 and by pretty sure, i mean I should quit computers if that isnt where they are

4:15 I need to find an efficent way to signal if attempt-deduction made any changes

4:16 the only way I am seeing to do that now is to invoke state and throw in a refrence type. Are there any idioms that can get me out of this?

4:17 TEttinger: is the sudoku.txt available?

4:19 namccarty: you see the example-board-vec, it is just a list of sudoku boards given in project euler problem 96 i have edited with emacs to turn into a vector made out of things like those

4:19 unless you are wanting to solve the problem, that file is useless

4:20 TEttinger: ok

4:21 namccarty: if you want to see it in action: (pprint (deparse-board (solve example-board)))

4:22 it takes about 130 ms on my system, and half of that is turning the map repusentation of the board into the vector one and pretty printing it

4:24 actually, i lied, the actual solve and then converting to nested vectors only takes ~25 ms for the built in example on my system

4:24 that is not a typical example though

4:25 the built in example just happens to be one that can be solved really eaisly by my code

4:25 let me see if i can find a hard one

4:29 TEttinger: I updated the gist to include a sudoku.txt with a few random puzzles

4:30 TEttinger: thanks

4:30 namccarty: The first one takes a few orders of magnitude longer to solve than the example in the code

4:41 TEttinger: namccarty, I'm getting pretty tired, but I think looking at functions like update-in and get-in would allow you to rewrite this with no map step, should be faster

4:41 just operate on 2d vectors

4:43 namccarty: TEtringer: thanks, ill look into it

4:55 Oops, sorry TEttinger, totally mispelt your name there

5:00 TEttinger: haha

5:00 np

5:00 it's common.

5:08 mercwithamouth: hrmm can someone tell me what's going on here? Exception in thread "main" java.lang.IllegalArgumentException: Parameter declaration #{:butter :egg :milk} should be a vector

5:08 https://www.refheap.com/19598

5:09 here's my code....i suspect my fridge-ingredients definition??? but i believe i've followed the tutorial correctly

5:09 also is it common for clojure to change the order of values in a set?

5:10 ianeslick: You can't rely on it not doing so (changing order in a set)

5:10 mercwithamouth: well duh i guess it put them in order =P

5:10 ahhh i see

5:10 def ...not defn. thanx mercwithamouth

5:10 ianeslick: Thus the definition of 'set'. I think there is an unexposed ordered set data structure somewhere?

5:11 (sorted-set :a :b :c)

5:13 mercwithamouth: hrmm funny that's fixed. now i'm getting a vaguer error..i'll spend a few more min looking over =P

5:14 'if should be a vector'

5:17 instilled: hi. i'm trying to apply (map …) to each element of a sequence, collecting the output in a sequence. Could someone point out to me how to do this the fp way? cheers!

5:17 ianeslick: You have a sequence of sequences?

5:18 instilled: yes.

5:18 it's a seq of seqs.

5:18 ianeslick: You want to get back a seq of seqs?

5:18 Or flatten?

5:18 instilled: flatten.

5:18 ianeslick: (mapcat #(map fn %) seq-of-seqs)

5:19 instilled: i'll try! cheers for that quick response!

5:19 ianeslick: Returns a flattened list applying fn to all the elements of the inner seqs

5:19 mercwithamouth: ha! found it! =P

5:41 ,(println "hello")

5:41 clojurebot: hello\n

8:07 sm0ke: hey guys anyone using postal?

8:07 i dont seem to find where the smtp config like server, port and password goes?

8:09 vijaykiran: sm0ke: you can pass the settings as map to send-message fn

8:10 sm0ke: vijaykiran: oh yes..as a meta map ? ^{}

8:10 thanks

8:10 clgv: sm0ke: well the desing choice to have it as metadata is at least debatable...

8:11 vijaykiran: sm0ke: yup

8:12 yeah meta-map is an odd choice indeed.

8:12 sm0ke: hmm..are there some other libraries for mailing? i see it is not developed actively

8:13 vijaykiran: clojurewerkz has one to AFAIR

8:13 https://github.com/clojurewerkz/mailer

8:14 which is also built on top of Postal - it seems

8:14 sm0ke: :D yes

8:14 vijaykiran: last commit 2 months ago - seems healthy to me

8:15 besides not much would change too frequently in JavaMail world :)

8:15 sm0ke: yep postal should do i think

8:16 clgv: the decision to use any of these depends on how much money is at stake in your project

8:16 sm0ke: :P

8:18 Any software in this world expands until it can send a mail.

8:18 everything is at stake

8:19 clgv: I disagree. there is at least as much software that does not expand to need to send mails

8:19 sm0ke: clgv: they are not fully exapnded yet

8:20 clgv: sm0ke: no. why should an optimization algorithm ever send an email? :P

8:20 sm0ke: clgv: thats not a software anyways

8:20 clgv: I already guessed that you have a very limited scope that you call software ;)

8:20 sm0ke: :/

8:22 clgv: thats is because your "optimization algortihm software" didnt send me any mails yet

8:23 * clgv roflmao

10:47 deg: Wow, quiet for a few hours! Has the US gov't shut down IRC, or is just my connection?

10:49 CookedGryphon: Hey, I'm doing some java interop and overriding a class with gen-class for which I need to call super

10:50 following the docs for gen-class I have :exposes-methods {methodName superMethodName} and then i'm calling (.superMethodName this) in my overridden method

10:50 but I'm getting no matching field found. Any clues?

11:12 llasram: CookedGryphon: What's your particular use-case? For much Java interop which requires concrete classes and inheritance, I've generally found it much easier to write a stub Java class which calls into Clojure via the Clojure Java API

11:16 CookedGryphon: llasram: I'm half way through doing that as we speak :)

11:17 llasram: CookedGryphon: Cool :-)

11:17 CookedGryphon: I'd still be curious to know what I was doing wrong though, as far as I can tell I was following the docs to the letter

11:19 john2x: how do I explode a map {:foo "bar" :fizz "buzz"} => [{:foo "bar"} {:fizz "buzz"}]?

11:19 CookedGryphon: john2x: would [[:foo "bar"] [:fizz "buzz"]] suffice?

11:20 mdrogalis: ,(map (partial apply hash-map) (map vec {:foo "bar" :fizz "buzz"}))

11:20 clojurebot: ({:fizz "buzz"} {:foo "bar"})

11:21 CookedGryphon: ,(seq {:foo "bar" :fizz "buzz"})

11:21 clojurebot: ([:fizz "buzz"] [:foo "bar"])

11:21 john2x: thanks both :)

11:21 xeqi: ,(for [[k v] {:foo "bar" :fizz "buzz"}] {k v})

11:21 clojurebot: ({:fizz "buzz"} {:foo "bar"})

11:24 jcromart_: I'm trying to imagine a good way to model objects from LDAP in Clojure. Seems like protocols might be a good fit, since LDAP entries can have multiple "classes"

11:25 eh, I dunno

11:25 I could also just have namespaced functions on the raw LDAP entry hash map

11:28 deg: What's the best workflow to build a deploy a project that includes a libray, where the library includes clojurescript?

11:29 I'm splitting an existing project into pieces, and my current use of lein-cljsbuild doesn't seem to do the trick.

11:58 arrdem: clojurebot: ping

11:58 clojurebot: PONG!

12:03 repl: Why is (take 1 m) returning different results for list and a vector in: (def m (map (fn [v] (do (println v) v)) '(1 2 3 4 5))) and (def m (map (fn [v] (do (println v) v)) [1 2 3 4 5]))?

12:03 Lazy sequence returned only when list is passed to the map?

12:04 By return different results, I mean different printing behaviour, Both return the same value.

12:07 `cbp: can a transient be safely counted?

12:07 hyPiRion: repl: because lists are not chunked by default

12:09 repl: hyPiRion: Ah, chunking. OK.

12:12 hyPiRion: Modified the example to use very large list and vector, confirmed lazy sequences in both cases, thanks. Clojure evaluated 32 items in a vector at minimum, only 1 in a list.

12:23 edw: Yo guys, we're hiring a Clojure programmer in NYC.

12:26 That said, I just read the first paragraph of this, and it's basically 100% accurate: <http://bit.ly/1aq4ovm>

12:28 ThePawnBreak: I'm trying to use rayner's file system library, but with-cwd gives the error No implementation of method: :as-file of protocol:

12:28 nDuff: ThePawnBreak: How are you invoking it?

12:29 ThePawnBreak: (fs/with-cwd path (fs/rename x y))

12:29 nDuff: ThePawnBreak: the first argument needs to be something you can call (file) on.

12:29 ThePawnBreak: what *is* path?

12:29 ThePawnBreak: path to a dir

12:29 /home/cristi/folder/

12:29 nDuff: what _exact_ object type?

12:29 Print it.

12:29 ThePawnBreak: string

12:30 dobry-den: When I'm navigating my devsite with `lein ring server`, if an exception is thrown but i reload the website, it seems to revert back to the state before the exception.

12:30 What's responsible for that behavior?

12:30 ThePawnBreak: "/home/cristi/folder/"

12:30 dobry-den: reload as in f5

12:31 ThePawnBreak: nDuff: any suggestions?

12:32 nDuff: ThePawnBreak: Give me a minute. Installing the library.

12:32 ThePawnBreak: sure

12:32 * nDuff has yet to get lein try to actually work.

12:34 nDuff: ThePawnBreak: I can't reproduce that when genuinely using a java.lang.String

12:34 ThePawnBreak: I suggest instrumenting to be sure you aren't getting a nil in there by mistake.

12:34 ThePawnBreak: there's no nil, I'm sure

12:35 nDuff: (or a Byte[], or something else)

12:35 ThePawnBreak: path, x and y are string literals

12:35 nDuff: Cannot reproduce, then.

12:35 ThePawnBreak: :(

12:35 thanks, anyway

12:35 nDuff: (Which version of the library?)

12:35 bordatoue: is there a way to read lines simultaneously from two files such that line1 from file A and line1 from fileB is read iteratively. I can use something like doseq [ lineA (read-fileA ) lineB (read-fileB)])

12:36 ThePawnBreak: nDuff: how do I tell?

12:36 nDuff: ThePawnBreak: well, what version did you put in your project.clj?

12:36 ThePawnBreak: oh, sorry, im stupid

12:36 1.4.4

12:36 nDuff: ThePawnBreak: If you can provide a standalone reproducer, by the way, that might help.

12:36 * nDuff is using 1.4.5, and checks the changelog between them.

12:37 nDuff: ...yeah, I don't see anything here that would make sense for the behavior given.

12:37 Need a reproducer.

12:37 ThePawnBreak: I'll try to make one now

12:38 it worked :(

12:38 that means I have a mistake someplace else

12:38 dobry-den: bordatoue: yeah, you could just line-seq both files and alternate

12:39 just like you'd alternate from [:a :b :c] and [1 2 3]

12:40 bordatoue: dobry-den: please can you provide an example

12:40 ThePawnBreak: nDuff: the problem was that (take 1 list) returns a list, and I assumed it returned an object of the type of the ones in the list; thanks for helping me

12:40 nDuff: ThePawnBreak: ...that *is* why I asked you to print the actual object.

12:40 ThePawnBreak: (which, err, you said that you did).

12:41 ThePawnBreak: I did, I just didn't notice the parens (it's a longish string)

12:41 nDuff: Ahh. Anyhow, glad to hear it's tracked down.

12:41 dobry-den: bordatoue: (doseq [lineA (line-seq fileA), lineB (line-seq fileB)] ...)

12:41 wait

12:41 nvm

12:42 bordatoue: dobry-den: that doesn't alternate

12:42 dobry-den: (map func (line-seq fileA) (line-seq fileB)) was what i was thining of

12:43 bordatoue: dobry-den: thanks very much, i will try that

12:43 nDuff: ThePawnBreak: You might use (first list) instead, btw.

12:45 dobry-den: bordatoue: (map vector ...) would return a lazy seq of [line1A line1B] [line2A line2B] ...

12:49 clojure's laziness and seq interface makes working with files so easy

12:49 the naive code you write to handle a 2kb file often handles 12gb files

12:52 mycelloandi: in java.jdbc 0.3.0-alpha5 it looks like with-connection is deprecated - what should be used instead though?

12:56 joegallo: mycelloandi: http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html

12:58 bordatoue: dobry-den: its not working using map, it is only iterating through one file not alternating between files

13:05 nathanic: bordatoue: i wouldn't expect it to alternate, i'd expect it to be passing lines from each file as additional arguments to the fn you're mapping, and your fn could then do the alternation

13:05 ,(map vector [1 2 3] [:one :two :three])

13:05 clojurebot: ([1 :one] [2 :two] [3 :three])

13:08 nathanic: ,(interleave [1 2 3] [:one :two :three])

13:08 clojurebot: (1 :one 2 :two 3 ...)

13:10 bitemyapp: ,(mapcat concat (map vector [1 2 3] [:one :two :three]))

13:10 clojurebot: (1 :one 2 :two 3 ...)

13:10 AimHere: ,(interleave [1 2 3] [:one :two :three])

13:10 clojurebot: (1 :one 2 :two 3 ...)

13:14 dobry-den: bordatoue: (map vector (line-seq file) (line-seq file2)) isn't iterating through them both line-by-line?

13:15 that doesn't sound consistent with map's doc

13:16 nathanic: i think it'll stop whenever the either file runs out of lines, and you miss the remainder of the longer file

13:18 dobry-den: nathanic: yeah, that's true. you could have a third seq (repeat ":)")

13:20 nathanic: ,(map vector [1 2 3 4] [:one :two] (repeat ":-)"))

13:20 clojurebot: ([1 :one ":-)"] [2 :two ":-)"])

13:20 dobry-den: :-)

13:20 im really good in interviews

13:21 oh, this is what i was thinking: partition-all

13:22 partition-all with a (repeat ":-)") pad collection

13:26 not that it helps

13:26 bordatoue: dobry-den: is there any other solution, basically I want to print a line from FileA and FileB as lazyseq. If i use map vector read-fileA read-fileB, then I need to wait till the map returns to use its output

13:29 dobry-den: so this doesnt work for you: (doseq [[a b] (map vector (line-seq fa) (line-seq fb))] (println a b))

13:29 nDuff: bordatoue: map returns a lazy sequence

13:30 bordatoue: so that return should be, well, immediate.

13:30 bordatoue: nDuff: oh, thanks

13:30 upwardindex: I'm a bit mixed up about brepl. I would like to have a brepl from nrepl.el but can't seem to figure out if I should be using piggieback, austin, or something else?

13:30 bordatoue: dobry-den: thanks very much that should work

13:32 dobry-den: bordatoue: unfortunately the map ends when either line-seq runs out of lines first. i guess you'd want to pad it so that [[1 :a] [2 :b] [3 nil] [4 nil]] but nothing immediately obvious comes to mind

13:35 mdeboard: vagrant ssh dev

13:35 feh

13:35 dobry-den: as usually i tend to crunch along with whatever dumb solution i think of first, like making both line-seqs return nil forever when they run out, tehn checking for [nil nil] -- until i stumble upon some elegant solution.

13:36 like maybe i find some `map-but-pad-with-nil` function one day

13:41 xeqi: upwardindex: I use austin, and something similar to the https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample

13:41 piggieback is the nrepl-middleware that takes over an nrepl connection and makes it a cljsrepl

13:42 upwardindex: xeqi: do you also serve pages using hiccup? this seems to be the breaking point for me as my pages are static

13:42 xeqi: austin is some setup that makes it very easy to embed it in a browser

13:43 upwardindex: nope, as part of the setup I run a development server that takes my static html and embeds the browser repl connection call

13:44 relevant part of the sample project: https://github.com/cemerick/austin/blob/master/browser-connected-repl-sample/src/clj/cemerick/austin/bcrepl_sample.clj#L9

13:44 upwardindex: xeqi: ahh that is what I'm missing

13:45 cemerick: upwardindex: options in cemerick.austin exist to start the backend HTTP server on a fixed port, with a fixed session ID, so you can hardcode that into your static HTML if you like

13:45 Would love to have a sample project along those lines...

13:45 dnolen: ok multimethods in JS I'm down with, would fix CLJS numerics http://2013.jsconf.eu/speakers/brendan-eich-js-responsibilities.html

13:45 upwardindex: cemerick: oh, I had seen how to do the static port but not the static session id

13:48 dobry-den: I have a forum where users write Markdown and I render it to HTML. To prevent <script></script>, would it be robust enough to escape all < and > characters into htmlentities?

13:50 bja: is there a way to do the equivalent of (apply (partial new SomeClass) args)?

13:50 well, not the equivalent, but what that code snippet is trying to do if new wasn't a special form

13:51 Bronsa: (clojure.lang.Reflector/invokeConstructor class (object-array args))

13:52 metellus: bja: I think that would just be (SomeClass. args here)

13:53 oh, yeah ignore me

13:54 bja: Bronsa: thanks

13:54 Bronsa: bja: np

14:06 TimMc: dobry-den: The Markdown converter should be doing that for you. I think.

14:11 dobry-den: TimMc: youre supposed to be able to embed html in markdown. but i figured it out.

14:11 What's generally the problem is cljs-generated js throws TypeError: clojure.lang is undefined?

14:12 throws it on `clojure.lang.PersistentHashMap.create.call(...`

14:17 coventry: msg dobry-den So is it definitely safe if you escape <>?

14:17 bah.

14:18 dobry-den: The js error is caused by this line https://github.com/yogthos/markdown-clj/blob/master/src-cljs/markdown/core.cljs#L5

14:18 coventry: yeah, apparently <>&

14:31 tufflax: ,(.name (the-ns 'clojure.core))

14:31 clojurebot: clojure.core

14:31 tufflax: ,((memfn name) (the-ns 'clojure.core))

14:31 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No matching method found: name for class clojure.lang.Namespace>

14:31 tufflax: what's going on there?

14:33 pjstadig: ,((memfn getName) (the-ns 'clojure.core))

14:33 clojurebot: clojure.core

14:33 pjstadig: name is a field

14:33 tufflax: oh

14:34 thanks :P

14:34 pjstadig: np

14:35 dobry-den: How come this cljs destructures without clojure.lang: http://cljsfiddle.net/fiddle/danneu.cljsfiddle.test1 - but this destructure uses clojure.lang.PersistentHashMap https://github.com/yogthos/markdown-clj/blob/master/src-cljs/markdown/core.cljs#L5

14:40 dnolen: dobry-den: not sure what you are asking?

14:43 dobry-den: dnolen: When I use that markdown lib's mdToHtml function, if i just pass 1 arg to it, it works. but if i pass `params` to it, javascript says that clojure.lang is undefined since the code that destructures the map in init-transformer uses clojure.lang

14:43 however, i can't seem to get reproduce clojure.lang in a cljsfiddle

14:43 dnolen: dobry-den: still not understanding what you are saying

14:44 dobry-den: is there a bug in your own code and your can't replicate on cljsfiddle?

14:44 s/your/you

14:45 dobry-den: Yes. I guess my first question is: should clojure.lang be defined in clojurescript-compiled javascript?

14:45 dnolen: dobry-den: no

14:49 dobry-den: Basically, when I try to use mdToHtml in this markdown-clj library, it compiles javascript that uses clojure.lang.PersistentHashmap on this line https://github.com/yogthos/markdown-clj/blob/master/src-cljs/markdown/core.cljs#L5 - and i'm trying to figure out why.

14:49 could it be because init-transformer is also defined in the Clojure source?

14:53 dnolen: dobry-den: hrm, I don't know. what version of ClojureScript are you using?

14:56 jonasen: dobry-den: dnolen: this could maybe be a cljsbuild crossovers issue?

14:57 https://github.com/yogthos/markdown-clj/blob/master/project.clj#L16

14:59 dobry-den: Thanks. Yeah, I manually added latest Clojurescript version just now and it works

14:59 dnolen: dobry-den: you always need to specify a CLJS version

14:59 dobry-den: I have warning-message blindness it seems.

15:00 Probably from working on a Rails 2.x app on Ruby 1.9.3 for so long

15:13 jcf: hello all, is there anyone here familiar with Midje who could tell me why the following code won't work… https://gist.github.com/jcf/d6b09419effb973423f8

15:14 I have no idea why `..a..` is not recognised as a metaconstant when all the code examples in the wiki seem to suggest it should work

15:42 TimMc: jcf: You have to use the =contains=> arrow.

15:43 Err, wait... I'm actually not sure what you're trying to do there.

15:43 jcf: @TimMc I'm essentially trying to use a metaconstant as a replacement for a let, because I need to use provided to fake some code

15:44 @TimMc at the moment I'm having to write code like this: https://gist.github.com/jcf/d6b09419effb973423f8#file-repetition-clj

15:44 TimMc: jcf: I think you want (provided ..a.. =contains=> {:key 1})

15:44 jcf: @TimMc that amount of repetition bugs me

15:46 mlb-: Given a running uberjar, is it possible to update a library it depends on?

15:48 mdrogalis: mlb-: Under what circumstances would you want to do that?

15:48 nDuff: mlb-: the _easy_ answer is "no".

15:48 mlb-: the comprehensive answer involves noting that one can construct new classloaders at runtime.

15:49 mlb-: ...but it's painful. Potentially, very painful.

15:49 mlb-: $DAYJOB has interest in using clojure. The likely deployment would be sending a customer some installer, then later sending them updates

15:49 mdrogalis: You're almost definitely better off putting a queue or a wire between the component and anyone who depends on it.

15:49 Installers. D:

15:49 mlb-: I shoould say, it's a very, very, enterprise $DAYJOB

15:49 mdrogalis: So you're trying to achieve no downtime?

15:50 mlb-: not no downtime (otherwise I'd've pushed them more towards Erlang), but ability to upgrade

15:50 nDuff: mlb-: I'd tend to (very, very) strongly agree with mdrogalis

15:51 mlb-: ...put a queue in between your processes, and you can switch processes out; no need to try to upgrade in place within a JVM.

15:51 mlb-: JVM in-place upgrades are painful?

15:51 nDuff: mlb-: even when you're using tooling built with the intent of allowing replacing library versions inside of a running JVM (such as OSGi), it's painful and hard to test.

15:51 mdrogalis: Indeed - it will leave you blistered.

15:52 nDuff: mlb-: Yes. Very yes. Also, Clojure is hard to fit into the OSGi model.

15:52 mlb-: ...I've done a little bit of work on that in the past, and have ideas for more to do in the future, but that doesn't make it fun. At all.

15:52 TimMc: jcf: No, that replaces your existing provided line.

15:53 nDuff: (Clojure's conventions around generated class names &c. are actually a particularly bad fit with OSGi's assumptions about package boundaries and their management)

15:53 mlb-: Another usecase there'll be is potentially running multiple versions of a library at once. I have stumbled across https://github.com/flatland/classlojure

15:54 nDuff: mlb-: I seriously, *seriously* advise taking the advice offered by mdrogalis on this one, and sticking to a one-classloader-per-JVM convention. It'll do wonders for your sanity.

15:54 mdrogalis: mlb-: I'd take a step back and look at it at a higher level than library support.

15:55 If you need tolerance in terms of new types or data or messages, there are formats that can do that for you, like Avro.

15:55 nDuff: mlb-: ...running multiple JVMs attached to a bus should be a much less painful thing.

15:56 mdrogalis: Sorry, that last sentence probably didn't make sense. I'm trying to point out that there are better ways for coordinating multiple versions of the same library.

15:57 nDuff: mlb-: there are some places where you can get very, very unexpected errors from the JVM in the multiple-classloader case

15:58 jcf: @TimMc I appreciate you're help, but I'm still stumped… https://gist.github.com/jcf/d6b09419effb973423f8#file-repetition-clj

15:58 nDuff: mlb-: things like "com.me.IFoo does not implement com.me.IFoo", when they're coming from different classloaders.

15:58 mdrogalis: Seen that before. >_>

15:59 nDuff: mlb-: if you're in an OSGi shop, then y'all have tooling for handling this that works decently in _most_ JVM-based languages, but doesn't work as well in Clojure

15:59 mlb-: ...because of the way Clojure does classloading, for instance, clojure.core.* libraries need to be bundled in with clojure.core itself.

16:00 (have some ideas on how to fix that, intend to give it a shot some day, not sure when the spare time will present itself).

16:00 ^^ that's in terms of OSGi packaging, btw, to be clear, not classloading in general.

16:02 jstew: Greetings. I'm looking at database migration tools. Lobos looks nice but seems inactive. Drift looks more active, but not as widely used. Anyone have an anecdotal opinion on which one is better?

16:03 TimMc: jcf: I don't know if you can use =contains=> that way in the repetition.clj example, and the web_test.clj file hasn't been altered in the way I suggested.

16:03 jcf: @TimMc I'm only updating the repetition file (I'm copying and pasting the contents of my actual tests in to the gist :)

16:15 mlb-: nDuff: Okay, thanks for the thorough explanations =]

16:22 nathanic: jstew: it's not clojure, but at work (a java enterprise shop) we use http://flywaydb.org/ and are pretty happy with it.

16:26 Raynes: That moment when you realize you've been listening to the LOTR soundtrack for 15 minutes.

16:26 TimMc: That moment when you realize you accidentally put an ambient track on loop 45 minutes ago.

16:26 Raynes: $last

16:26 lazybot: Raynes is listening to: Muse - Uprising [The Resistance]

16:27 TimMc: wtfhax

16:27 Raynes: $botsnack

16:27 lazybot: Raynes: Thanks! Om nom nom!!

16:27 scriptor: Raynes: I try to save that for Friday

16:27 Raynes: TimMc: $last is connected to last.fm.

16:27 TimMc: technomancy: Big Giant Circles has a kickstarter for his next album.

16:27 Raynes: And I scrobble everything I listen to to it.

16:28 Scriptorion: $last

16:28 lazybot: Scriptorion last listened to: The Album Leaf - Another Day (Revised) [In A Safe Place]

16:28 TimMc: It knows when you are sleeping, it knows when you're awake.

16:28 tbaldrid_: $last

16:28 lazybot: Couldn't find that user.

16:28 tbaldrid_: HAH! you can't catch me, NSA!!!!

16:28 Scriptor: \/nick to your last.fm username

16:28 TimMc: $last phyzome

16:28 Raynes: So you can always see what I'm listening to by doing $last RaynesFM, This is the window I give you into my life, TimMc.

16:28 lazybot: phyzome last listened to: Big Giant Circles - Katana Blaster [Impostor Nostalgia]

16:28 Raynes: Scriptor: Yes, you can also pass it an argument.

16:29 $last Scriptor

16:29 lazybot: Scriptor last listened to: Roy Gates - Come Alive [Trancemaster 6000 (Jubilee Edition)]

16:29 Scriptor: I think I forgot the password for Scriptor

16:29 or that's someone else

16:29 llasram: There's a service a large number of people tell what music they're listening too?

16:29 * llasram feels like he should be telling some kids to clear off his lawn

16:29 Raynes: Scriptor: You can change back to your nick and do $lfmassoc Scriptor and it'll remember who you are from then on.

16:30 Scriptor: ooh

16:30 $lfmassoc Scriptorion

16:30 lazybot: Associated your username.

16:30 Scriptor: $last

16:30 lazybot: Scriptor is listening to: The Album Leaf - Eastern Glow [In A Safe Place]

16:30 Scriptor: sweet

16:30 Raynes: Oh, I had it backwards. Thought the other nick was your usual one. :P

16:30 llasram: Scriptor: Great album

16:31 Scriptor: llasram: it is

16:31 leo_33: if you go to an interview and there is no response after 3 weeks is it a no for sure?

16:31 Scriptor: depends on the company

16:32 big company, startup?

16:33 `cbp: leo_33: you can try asking them? :P

16:35 noprompt: ughh. wtf.

16:35 leo_33: very big company

16:35 noprompt: i just wanna go ape shit on github right now.

16:35 technomancy: TimMc: backed it 2 days ago. can't wait =D

16:35 noprompt: haven't we all agreed that implicit is bad?

16:35 mercwith1mouth: i had a dream last night....and...this might sound odd but does anyone want to make a starcraft clone with me? =)

16:35 noprompt: :(

16:36 Scriptor: …in clojure?

16:36 mercwith1mouth: Scriptor: absolutely

16:36 coventry: What is the suppress-read var intended for? Looks like if it were true it would stop LispReader.read in its tracks. Why?

16:36 noprompt: Scriptor: he's a troll.

16:36 Scriptor: thanks

16:36 mercwith1mouth: i'm jk ...haven't heard/seen that guy in a while

16:36 noprompt: lol

16:37 mercwith1mouth: noprompt: lol i'm not 'that' troll...just figured i'd keep his memory alive

16:37 mtp: i think we collectively ran him off

16:37 mercwith1mouth: lol it would be funny if we actually did make one 'after he left'

16:37 noprompt: i'm writing a comment on gh and i feel like i want to use ### in front of everything to get my point across.

16:37 TimMc: Haven't seen lajla in a while for that matter.

16:38 Lajjla: TimMc I am the finest programmer in the world safe the microsoft chief software architect

16:38 Chousuke, is this not true?

16:38 Bronsa`: coventry: there's no such thing

16:40 coventry: Bronsa: No, but it's mentioned in RT/suppressRead as a potential future feature.

16:41 https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L1720

16:41 Bronsa`: coventry: yeah, I think that's just a leftover

17:13 johndo: Hi - can I download the Clojure API HTML docs anywhere? The ones on the website.

17:14 mtp: you can probably download them from the website

17:14 technomancy: johndo: the API docs are all there in the repl

17:14 coventry: johndo: I think they're generated with autodoc from the source: http://tomfaulhaber.github.io/autodoc/

17:15 johndo: Yeah, I understand the great REPL doc tools, but I also like the HTML format

17:16 bitemyapp: arohner: safe to say you're using keen.io for your analytics?

17:16 arohner: bitemyapp: actually, no

17:16 we just work in the same building

17:17 I use mixpanel and datomic

17:18 bitemyapp: arohner: oh, I asked because you had mentioned analytics in the response you gave to them. You saw me present Simonides - I was looking for guidance from people like you who have those needs.

17:18 dnolen: If anyone has time to confirm this one would be super helpful - http://dev.clojure.org/jira/browse/CLJS-606

17:18 arohner: yeah

17:18 have you seen https://heapanalytics.com/ ?

17:18 we experimented with them a little

17:19 bitemyapp: arohner: yup. What worked and what didn't?

17:19 seangrove: dnolen: This need to be tested on anything other than windows?

17:19 arohner: but in general, the hard part is figuring out what you want to measure

17:19 dnolen: seangrove: yeah I just want more information, if replicable outside of windows

17:20 arohner: also, heap is very 'implementation specific'. i.e. if you say 'oh, logins are when you click #login' and then you change the button id, you're hosed

17:20 seangrove: Will test out

17:20 arohner: w/ mixpanel, there's a clear separation between webapp implementation and the conceptual thing you care about

17:20 also, we do a ton backend events

17:20 bitemyapp: arohner: backend generated event "annotations" is one of the elaborations I wanted to explore.

17:20 cemerick: dnolen: yeah, same behaviour with the warnings I see when using piggieback/austin with cljs > 1847

17:20 clojurebot: Alles klar

17:21 cemerick: obviously more going on there, but the line numbers are off in the warnings I see

17:21 mheld: am I being silly or is there something wrong here with my destructuring (then recapture) of a hash -> http://pastie.org/pastes/8393372/text?key=fxv8gm5zpavjwsdcmvtqmw

17:21 arohner: also, all major products completely fail at funnel analysis, and A/B testing

17:21 mheld: I'm getting a "Unable to resolve symbol: everything in this context"

17:21 bitemyapp: arohner: typically the abstraction in systems like Simonides/Heap is that you use the selectors to create the event names/types, which translate to what you actually care about. Did you find this insufficient? Was the reliance on the implicit dom information uncomfortable?

17:21 dnolen: cemerick: ok, btw I landed some fixes in master which removed the spurious errors from browser REPL for me. Hopefully you see these as well.

17:21 arohner: so for funnels, a thing that nobody does is "show me all the people who did step #1, and then *didn't* do step #2"

17:22 cemerick: dnolen: oh sweet, you got the same warnings with the stock brepl?

17:22 arohner: bitemyapp: yes, implicit dom information was a problem. there's nothing that says "don't mess with this, because it will hose analytics"

17:22 dnolen: cemerick: yes

17:22 cemerick: excellent

17:22 thanks :-)

17:22 mheld: oh ha

17:22 bitemyapp: arohner: I'm considering explicit DOM annotation for event tracking. (attrs)

17:23 mheld: missed a level of ()s

17:23 arohner: bitemyapp: that's cool, but then how is that different from 'mainstream' analytics?

17:23 bitemyapp: arohner: still no manual JS event emitters, you're just rendering DOM. Still collect everything, but added layer for more specific querying if desired.

17:24 arohner: given my druthers, I'd prefer a DOM tag attr to JS code emitting the event.

17:24 arohner: true

17:24 bitemyapp: so you can still select by CSS selectors, but you can cherry-pick the explicit DOM attrs if you want

17:24 arohner: esp. if you don't have to deal with e.g. page clicks

17:25 bitemyapp: A-B is implicit to page location/hash, you just split them into segments and compare the funnels. I can make it more auto-magic later.

17:26 arohner: the drop-off funnels thing is doable.

17:27 arohner: bitemyapp: it's a minor thing, but nobody includes an A/B calculator in the actual comparison page

17:27 bitemyapp: arohner: I'm writing the logic for defining what a page session vs. overall visit session is, you can scope the funnel to either of them and then make the funnel 1. Did this 2. Negation of "did this"

17:27 arohner: and if you want to be super-scientific, an explicit "don't show me the results until I have N samples"

17:27 bitemyapp: Then it just queries for people whose sessions included 1, but not 2 in the session scope.

17:28 arohner: (a-b testing calculator and n samples) - that's an ongoing concern of mine and it's why I'm hesitant to add anything like Mixpanel's "list" interface that lets you inspect sessions.

17:28 people are too eager to make n=1 decisions based on that.

17:29 arohner: meh. they can make bad decisions today

17:29 but you can add tools to make it easier to make good decisions

17:29 bitemyapp: I get your meaning, I'd just rather focus on the more constructive parts initially.

17:30 noprompt: cemerick: thanks for merging that! :)

17:30 bitemyapp: arohner: the explicit DOM attrs aren't just for nominative event tracking, they're for adding arbitrarily queryable metadata to the events.

17:30 the backend event annotation is that plus de novo event emit

17:31 There'll be higher level patterns layered on top of this so people don't really have to think about my data model.

17:32 arohner: thank you very much for your time! my email address is on my github page here: https://github.com/bitemyapp/ if you think of anything else.

17:32 arohner: np

17:33 seangrove: dnolen: Repro'd here on osx

17:33 TEttinger: mheld: the line [{:keys [longitude latitude k] :as everything}] doesn't do anything

17:33 dnolen: seangrove: huh ok

17:34 TEttinger: try putting that in a let, mheld

17:34 dnolen: seangrove: so has it always been off or is there something specific here?

17:35 TEttinger: oh did you solve it already, mheld?

17:46 TimMc: mheld: Oh, is this for the project you were mentioning in ccs?

17:49 mheld: TimMc!

17:49 probably not?

17:49 I'm not sure

17:49 TimMc: Oh, OK.

17:49 Startup thingy.

17:49 mheld: TimMc: http://weft.io

17:50 TimMc: Yeah, that. :-) Wasn't sure if it was public.

17:52 bitemyapp: TimMc: CCS?

17:52 mheld: I didn't know you were doing that in Clojure - pretty cool.

17:54 mheld: bitemyapp: yeah!

17:55 bitemyapp: was originally RoR but then SAP happened and jruby wasn't playing nice with their stuff

17:55 so I said fuck it and took what I had into clojure/compojure

17:55 gotta say, enlive + middleman and hiccup together make a great team

17:57 plus, it doesn't matter what we're using anyway -- lots of fun SOA stuff ;-)

18:08 TimMc: bitemyapp: The first rule of ccs is that you don't talk about ccs.

18:08 (An IRC channel for the College of Computer (and Information) Science at Northeastern University.)

18:28 noonian: ,'(foo 'bar ~foo)

18:28 clojurebot: (foo (quote bar) (clojure.core/unquote foo))

18:28 noonian: how can I get the value of a var unquoted into a quoted form?

18:30 i.e., if the Var named foo points at the symbol 'foo.bar/baz, I want an expression like '(require ~foo) to return (require 'foo.bar/baz

18:31 arohner: noonian: `(require ~foo)

18:31 backtick, not single quote

18:31 also, require takes a namespace, not a var

18:31 so (require 'foo.bar), not (require 'foo.bar/baz)

18:32 noonian: yeah, sorry

18:32 thanks

18:32 I'm actually doing (-> 'foo.bar/baz namespace symbol) to take care of that heh

19:02 dnolen: Bronsa: ping

19:02 Bronsa: dnolen: pong

19:02 dnolen: http://dev.clojure.org/jira/browse/CLJS-606

19:03 Bronsa: ok I'll take a look

19:03 dnolen: Bronsa: ^ this seems like it maybe a platform encoding issue w/ the reader? The provided file reports line numbers that are 2X greater than the number of lines present

19:03 Bronsa: If I create a file from scratch I don't see this issue.

19:04 TimMc: noonian: (-> foo.bar/baz quote namespace symbol) if you want to be a little naughty.

19:05 noonian: ,(-> foo.bar/baz quote namespace symbol)

19:05 clojurebot: foo.bar

19:06 noonian: heh, naughty because you might expect foo.bar/baz to be evaluated?

19:06 TimMc: Yep.

19:06 It's a good reminder that -> is a structural transform, not comp. :-)

19:06 noonian: in my case, 'foo.bar/baz in provided by the plugin settings so its actually in a var

19:07 bitemyapp: ,,,

19:07 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

19:07 noonian: and I need to quote it after, so doing (quote ~(-> my-var-var namespace symbol))

19:08 Bronsa: dnolen: yeah, there's a bug on \r\n

19:08 dnolen: Bronsa: k cool

19:09 TimMc: &((-> fact (fn [n] (if (zero? n) 1 (* (fact (dec n)) n)))) 5)

19:09 lazybot: ⇒ 120

19:09 dnolen: Bronsa: let me know when you cut a new release fixing that, I'll cut a corresponding CLJS release

19:10 noonian: i tried ~(-> my-var-var namespace symbol quote) first but that not what you want

19:10 Bronsa: dnolen: ok

19:12 rasmusto: how do I "reset" a previously memoized function?

19:13 noonian: memoize the original function again?

19:13 rasmusto: noonian: ah, that's what I thought. I had a problem elsewhere that was confusing me

19:26 Bronsa: dnolen: ok pushed a fix -- tested with core.cljs and it reports the correct line number now

19:26 releasing 0.7.9 now

19:27 *hello.cljs

19:34 TimMc: pomegranate doesn't seem to work. I do the add-dependencies things and it lists a bunch of transitive deps -- but then their namespaces don't seem to be available.

19:35 I haven't looked into this deeply, so maybe it's only an issue with some libs, but I'm 0/2.

19:36 hiredman: what kind of classloader environment are you in?

19:37 TimMc: lein repl

19:37 bitemyapp: TimMc: use Alembic.

19:37 TimMc: Clojure 1.4.0, lein 2.3.2

19:37 hiredman: huh

19:37 bitemyapp: TimMc: [alembic "0.2.0"] (require '[alembic.still :as alembic]) (alembic/load-project) or (alembic/distill '[org.clojure/tools.logging "0.2.0"])

19:38 load-project just loads the project.clj, whatever that is, if one is available. Otherwise use distill.

19:38 Why use Alembic? because it actually works. (for me anyway, pomegranate breaks for me sometimes)

19:39 hiredman: https://gist.github.com/hiredman/6664075#file-strangeloop-clj-L16-L25 is what I do, and I've never had it not work with namespaces or classes when I use the correct namespace and class (if I am looking at docs that don't match the version I pull it it fails of course)

19:39 TimMc: Thanks, I'll try this out.

19:42 hiredman: well, I guess I have never used it with a more current version of pomegranate, I always just use 0.0.13

19:45 technomancy: TimMc: pomegranate has an optional :add-classpath arg IIRC

19:45 default is to fetch

19:55 tieTYT2: hi, I have an interesting game design question for a game I'm making. I'd like to get some input from people familiar with FP: http://gamedev.stackexchange.com/questions/63353/how-can-i-design-lots-of-different-attack-types-that-can-be-combined

19:55 if this were OOP, I think the decorator pattern would be the way to go

19:56 not sure how to translate that into FP

19:58 noprompt: tieTYT2: i think you want a protocol.

19:59 bitemyapp: tieTYT2: I think you want a multimethod.

19:59 tieTYT2: how would I use either of those to combine effects?

20:00 noprompt: tieTYT2: how long have you been programming in clj?

20:01 tieTYT2: few months, but not recently

20:01 AimHere: tieTYT2, this looks like part of what the component-entity-system architecture does.

20:02 tieTYT2: yeah

20:02 mheld: if I tell you that I'm working on a product that's "Air traffic control for cargo" -- what do we do?

20:02 AimHere: The idea is that your game objects are 'entities', which have bundles of state, called components, and you just mix and match components - some of them are gameplay related, some components will be things like 'this object is to be rendered onscreen'

20:03 noprompt: bitemyapp: or that too.

20:06 AimHere: tieTYT2, https://github.com/ibdknox/ChromaShift <- there's a basic game written in clojure or clojurescript that uses a C-E-S system; the guy who wrote it is now working on light table, so presumably he knows a little clojure!

20:06 mlb-: I have coworkers learning clojure. Is there a reason they should use a let block rather than many def's?

20:07 hiredman: mlb-: they are completely different

20:07 coventry: There's no reliable way to tell by local static analysis whether a metadata :tag typehint refers to a java classname or a clojure name, right? Not even if I have access to the state of the context namespace at the time of evaluation?

20:07 hiredman: def creates globally visible vars, let is locally scoped

20:08 using (define ...) in a function body creating locals names is something scheme does that clojure does not

20:08 mlb-: hiredman: so.. at the very least, an obvious reason would be that the code wouldn't be thread safe?

20:08 hiredman: at the very least

20:09 you are not using lexical scoping anymore if you use def

20:09 AimHere: There's also the case of just not wanting your little loop iteration variables polluting other namespaces

20:09 technomancy: mlb-: it's tempting to use let, but it gets in the way of debugging IMO

20:10 hiredman: if you are at the top level the rule of thumb is use def

20:10 muhoo: $latest pomegranate

20:10 lazybot: No project by this name exists on clojars.

20:11 technomancy: also: let means putting defs in a nonzero column, and that's just weeeeeird

20:12 coventry: Gah, the dash/undescore//clojure/java dichotomy, it buuurns...

20:13 technomancy: coventry: solution: never put a dash in a namespace name

20:14 coventry: Trying to make a general tool, though.

20:14 technomancy: I recommend angry emails sent to early hotspot engineers?

20:14 IMO it's silly that clojure can't do the transform for you

20:14 tsantos: What's the easy way to get [[:a :b :c :d] [:e :f :g :h]] out of [:a :b :c :d :e :f :g :h]? It seems like it should be obvious but it's eluding me.

20:15 technomancy: you'd have a mismatch between .class files and .clj files, which would be 700% less annoying

20:15 mlb-: technomancy: if def creates global variables, then what's an alternative to using let? How does let interfere with debugging?

20:15 AimHere: tsantos, you mean partition it into two groups or partition it into groups of four or what?

20:15 Raynes: &(split-at 4 [:a :b :c :d :e :f :g :h])

20:15 lazybot: ⇒ [(:a :b :c :d) (:e :f :g :h)]

20:15 tsantos: groups of 4

20:15 Raynes: &(partition 4 [:a :b :c :d :e :f :g :h])

20:15 lazybot: ⇒ ((:a :b :c :d) (:e :f :g :h))

20:15 Raynes: tsantos: ^

20:16 AimHere: Partition-all if you need to keep the remainder

20:16 Bronsa: and mapv vec if you want to get back a vector of vectors.

20:16 technomancy: mlb-: if you close over something, there is literally no way to access it from outside the lexical scope. with a private def you can always cheat for debugging purposes

20:16 tsantos: split-at! Nice. thanks

20:16 Raynes: tsantos: You want partition if there are more than two groups.

20:16 See my second example.

20:17 hiredman: mlb-: he is talking about lets at the top level (let [a 1] (defn f [] a)) vs. (def a 1) (defn f [] a)

20:17 tsantos: Ah, ok. partition is what I need then.

20:17 mlb-: technomancy: ah, I see. I think my case is I have coworkers slowly transitioning to clojure, so a lot of code is transliterated imperative-style.

20:17 technomancy: oh, def *inside* a function body then?

20:17 hiredman: that is really bad

20:17 technomancy: ~guards

20:17 clojurebot: SEIZE HIM!

20:18 mlb-: yes, inside function bodies

20:19 TimMc: technomancy: The pomegranate docs don't mention add-classpath.

20:19 AimHere: mlb-, don't do that, unless you really really have to

20:19 technomancy: no, even if you really really have to, still don't

20:19 mlb-: AimHere: haha, no worries. I like my lexical scope. I'm just trying to help my coworkers transition form C/JavaScript...

20:20 s/form/from/

20:20 AimHere: I think defs inside macros are less unacceptable, depending on what you're up to

20:20 mlb-: unhygenic macros make me :(

20:21 AimHere: Well I was thinking of macros sugaring up the process of def'ing or defn'ing things

20:21 coventry: AimHere: defs inside macros are all through the clojure source code.

20:21 technomancy: AimHere: oh yeah, sure--as long as it emits non-runtime defs

20:22 egghead: unhygenic macros = macros w/ dynamic scope? :p

20:22 mlb-: Another question: Imperative programming often has fuctions with guard clauses that early exit the function, before finally reaching the "real" function body. What's an analagous idiom in clojure?

20:23 technomancy: mlb-: when-let is a good start

20:24 bitemyapp: mlb-: what technomancy said, also you can decorate function behavior through wrapping the guards aspect-style or short-circuit the let binding dependencies and spew a nil back out at any point in the process.

20:24 technomancy: it introduces a new level of indentation, but you shouldn't have functions much longer than 25 lines to begin with before breaking it out

20:24 bitemyapp: mlb-: if you follow the latter path far enough, you'll have a handy-dandy maybe monad!

20:27 coventry: mlb-: I wouldn't call it idiomatic, but synthread has tools for that.

20:28 mlb-: hmmm. I've been considering advocating the use of the -?> macro

20:29 llasram: Is that the old name of `some->` ?

20:30 mlb-: bitemyapp: Is there a way to have a maybe-log monad? That is, have a log message explain the first None, but still not break function composability?

20:30 bitemyapp: mlb-: there's a monad for everything, but I need a somewhat clearer notion of what you want to tell you how to get there.

20:31 Clojure is a nice enough language that you certainly don't need monads most of the time.

20:31 mlb-: Yes, I've noticed that =]

20:31 bitemyapp: Excessive monad use is the refuge of scoundrels and academics.

20:32 egghead: monads aren't too uncommon, calling them by that name is tho :p

20:32 you don't look at your list comprehension and say 'my monad'

20:32 mlb-: $DAYJOB is enterprise. Code needs to be heavily logged, as customers have security policies that limit access to systems. Therefore code that explains the first "exception" it arrives at, and how it arrived there is useful.

20:32 bitemyapp: egghead: well, the distinction is implicit vs. explicit monads.

20:33 llasram: I pull in algo.monads just for it's maybe monad implementation some times. You certainly could use it such that you logged the terminating `nil` reason pretty easily

20:33 bitemyapp: mlb-: I usually use function decoration and Timbre for what you're talking about.

20:33 mlb-: if I need logging 'in media res' I just explicitly call the logger.

20:33 llasram: getting closer to an Error Monad >:)

20:33 technomancy: also: maybe would be super useful even without treating it monadically

20:33 bitemyapp: maybe->

20:34 coventry: I'm still looking for an example of a computation whose expression is clarified by the monad abstraction.

20:34 bitemyapp: error-> with a [nil "Error message"] or [value nil] result

20:34 coventry: monads are primarily about making the nature of the computation explicit rather than implicit.

20:34 How "clear" that is depends on fluency with monads and how well the monad maps to the problem it is modelling.

20:35 coventry: That's just an argument from authority.

20:35 bitemyapp: A lot of the Prismatic and Pedestal "graph" stuff is basically crazy Continutation monads.

20:35 Continuation*

20:35 coventry: would it comfort you to know that I chose Clojure over Haskell, despite achieving relative fluency? I really wouldn't worry about it.

20:36 mlb-: bitemyapp: function decoration? I've found timbre and have started using it, but what's function decoration?

20:36 bitemyapp: I don't think everybody needs to learn monads. If they want to become a better programmer - fine go for it - but it's far from critical.

20:36 mlb-: wrapping functions

20:37 (defn log-wrapper [fn & args] (t/trace "fn " fn " was called with " args) (apply fn args))

20:37 Roughly that.

20:37 A lot of ways to skin that particular cat.

20:40 coventry: How does knowing monads make you a better programmer? I know monads, and I don't think it's improved my programming.

20:40 bitemyapp: coventry: makes computational patterns explicit, removes the false appearance of a problem being a special snowflake

20:40 technomancy: you can read a lot more excited haskell blogs

20:41 bitemyapp: lets you begin to structure those problems in terms of those sub-structures so you can make fewer mistakes through the abstraction of the problem.

20:42 coventry: I think domain-specific abstractions are very important. It's just that I've yet to see a useful abstraction which was more usefully/clearly expressed in terms of monads.

20:43 AimHere: Even if it doesn't improve the code you write, you can bamboozle your boss by dropping words like 'endofunctors' into conversation so he doesn't pry too closely into what you really *do* do at work.

20:45 coventry: (I'd love to see one.)

20:45 technomancy: AimHere: http://wondermark.com/481/

20:46 mlb-: iirc, composing functions in obj-c is implicitly a Maybe monad. Lots of obj-c programmers think this is a great feature without even knowing it's a monad

20:49 bitemyapp: coventry: monads are abstractions specific to computation

20:50 technomancy: you are way too good at that.

20:51 technomancy: bitemyapp: I practice every day

20:51 bitemyapp: cue 80s montage of technomancy drinking coffee and flipping through webcomics in an Emacs RSS reader

20:51 hiredman: http://www.youtube.com/watch?v=8zC2lWjpiH8

20:53 I meant to imply that technomancy is the karate kid, but now I just weired out by this non-english dub

20:53 I am

20:54 technomancy: http://wondermark.com/756/

21:16 muhoo: ,(map (juxt type identity) (let [x 1] `[~x x 'x '~x ~'x]))

21:16 clojurebot: ([java.lang.Long 1] [clojure.lang.Symbol sandbox/x] [clojure.lang.Cons (quote sandbox/x)] [clojure.lang.Cons (quote 1)] [clojure.lang.Symbol x])

21:16 muhoo: why a cons?

21:17 bitemyapp: muhoo: Lisp lists are made of cons cells.

21:17 I feel like a jackass for saying it, but I don't know what else you want.

21:17 Bronsa: bitemyapp: I guess he was wondering why not PersistentList

21:18 muhoo: no, why is 'x a cons?

21:18 bitemyapp: Just Cons cells rather than PersistentList because it's simpler? Code doesn

21:18 muhoo: oh, i see. it's not 'x, it's sugar for (quote x)

21:18 '(quote x) actually

21:19 bitemyapp: no, just (quote x)

21:19 gdev: '(quote x) => (quote (quote x))

21:19 muhoo: indeed, i see,

21:19 seangrove: Yo dawg, heard you like quote...

21:19 * muhoo notes ' == quote

21:20 muhoo: which is stupidly obvious now that i think about it

21:20 bitemyapp: muhoo: everybody goes through these little moments of ?_?

21:20 especially anything involving indirection.

21:20 muhoo: i go through them repeatedly, in a great big circle

21:20 coventry: @f == (deref f)

21:20 muhoo: then i go back through them again

21:20 bitemyapp: muhoo: if it makes you feel any better, I'm getting my sanity wrecked by #datum #datum #datum #datum #datum #datum #datum #datum #datum right now.

21:21 coventry: And the reader does not put position metadata on these two expansions.

21:21 muhoo: oh, datomic stuff? i tend to (into {} ) the datums

21:21 gdev: rectum? damned near killed em

21:21 muhoo: because java objects are ugly

21:21 gdev: that's the best punchline ever. doesnt' even need a jke

21:21 joke

21:21 just a free-floating punchline.

21:22 mlb-: How might I write the following to be more idiomatic clojure? https://gist.github.com/mlb-/6927986

21:22 bitemyapp: muhoo: I'm writing a migration for Datomic. Using the log API

21:22 muhoo: I just got done writing the query to translate the damned entity ids for the attributes to keywords.

21:22 muhoo: i just put that shit into {}'s so i can (:e foo) etc

21:22 bitemyapp: having to check the attribute to know the type is pretty annoying.

21:23 muhoo: it's not that simple, the log doesn't inline the keywords for attributes. They're already List[map]

21:23 muhoo: no the (:a's ) are numbers

21:23 bitemyapp: I know

21:23 muhoo: you have to look up the keyword of them

21:23 bitemyapp: that's my point

21:24 that's why I'm irritated :)

21:24 muhoo: i did this recently, it was annoying, but abstractable

21:24 bitemyapp: it is, but I'm still annoyed.

21:24 muhoo: i think i wrote somethign to "here, make me not want to kill you"

21:24 bitemyapp: I want to turn my pain into a library after I'm done.

21:24 muhoo: everyone who uses datomic does that :-)

21:24 coventry: mlb-: What is that (defn filestring) doing in there? Does the code function?

21:24 muhoo: there are like as many libraries of datomic utility functions as there are datomic users

21:25 often complete duplication of code too

21:25 it's kinda crazy actually

21:25 bitemyapp: muhoo: that's why I'm writing the library, it's insane how much copy-pasta happens with Datomic client code.

21:25 *insane*

21:26 mlb-: coventry: ah, my bad, that should be a def. I was trying to simplify the cruft in what I've to work with.

21:26 bitemyapp: muhoo: meanwhile, Stuart Halloway has a secret stash of Datomic client code that he's hoarding. He sleeps with the USB flash drive at night and cackles in the darkness.

21:27 muhoo: example: https://github.com/Datomic/day-of-datomic/blob/master/src/datomic/samples/query.clj , or https://github.com/kenrestivo/utilza/blob/master/src/utilza/datomic.clj ,

21:27 seangrove: bitemyapp: Drinks sometime this month in exchange for your thoughts on datomic

21:28 bitemyapp: seangrove: sooner is better than later. When are you avail?

21:28 muhoo: yes, but I think the motherlode is in Stuart Halloway's sock drawer.

21:28 muhoo: when you hire relevance to consult, you get that code as part of the deliverable :-)

21:29 it's not open source

21:29 bitemyapp: Actually I wouldn't be surprised, I talked to a guy that hired Cognitect/Relevance recently.

21:29 seangrove: bitemyapp: Wednesday?

21:29 Raynes: That was yesterday.

21:29 bitemyapp: seangrove: Sure. 6pm? Where?

21:29 muhoo: look, everybody's gotta eat somehow.

21:29 Raynes: He does not possess a time machine.

21:30 * Raynes thinks this contribution to the discussion was satisfying and carries on elsewhere.

21:30 bitemyapp: (clj-time.core/plus (clj-time.core/today) (clj-time.core/days 6))

21:30 Raynes: ^^

21:30 muhoo: haha

21:30 seangrove: Raynes: It has sufficed.

21:31 bitemyapp: seangrove: you had to schlep into my neck of the woods last time. Is there a place near you?

21:31 seangrove: I feel like you owe me for the pseudo-interview of the contractor though :P

21:32 seangrove: bitemyapp: Nothin' doin', you got a free attempt at pseudo-interviewing

21:32 Going to bring in a homeless tramp for the next round

21:32 uvtc: indigo: thanks for the help the other day (wrt base64 decoding). It turned out that the problem I was having with the original base64-encoded content was actually different from the one I got with the wikipedia example content.

21:33 seangrove: bitemyapp: Let's do somewhere nicer than LL though. Nihon Whiskey Lounge?

21:33 bitemyapp: oh cool, a legitimate use of juxt.

21:34 seangrove: sounds like my kind of place. Weds 6 pm NWL it is :)

21:34 seangrove: bitemyapp: Done.

21:38 technomancy: Met someone who idolized you last night

21:39 You're quite famous amongst the people who know you, it seems

21:41 gdev: I've never heard of anyone being famous among people that didn't know who they were

21:41 muhoo: phil is legit

21:44 technomancy: seangrove: heh, weird

21:44 bitemyapp: Not that surprising to me. technomancy wrote my favorite project...tool-dependency-jobber-thingy. That alone is worthy of praise.

21:44 No flaming hair!

21:45 Look at how many years it took for Common Lispers to get quicklisp. They're still just downloading stuff and clobbering a shared path.

21:46 At that rate, it'll be another 20-30 years before they get something like Leiningen.

21:46 seangrove: bitemyapp: What, asdf didn't do it for you?

21:46 TEttinger: technomancy is the karma king

21:46 bitemyapp: seangrove: *gag gag gag*

21:46 TEttinger: $karma technomancy

21:46 lazybot: technomancy has karma 83.

21:46 seangrove: Quicklisp was quite nice though

21:46 TEttinger: $karma TEttinger

21:46 lazybot: TEttinger has karma 5.

21:46 technomancy: I couldn't even figure out what asdf was supposed to be for

21:46 seangrove: Just nothing like lein...

21:46 technomancy: it's like dependency injection

21:47 you can read the description over and over again, and it imparts no new knowledge

21:47 bitemyapp: it's just a build system.

21:47 I ended up doing my CL builds with manually managed dependencies in the source path and Makefiles.

21:48 I might use Quicklisp these days though.

21:50 indigo: uvtc: No problem :)

22:00 nightfly: being able to build on top of maven kind of gave lein a serious advantage

22:01 * nightfly sincerely wishes quicklisp was less monolithic though

22:03 waf: hi, i'm trying to use ClojureCLR's interop, and can't figure out how to invoke a static method. see line 8 of https://www.refheap.com/19649

22:04 that line is trying to call this CLR method: http://msdn.microsoft.com/en-us/library/x53bfh67.aspx

22:04 but that's throwing the error "System.MissingMemberException: Member 'MD5.Create' not found."

22:57 jared314: On clojars, what is the promotion section on the your own lib's clojars page for?

23:06 technomancy: jared314: it's a work in progress; eventually it will be a way to get artifacts into a separate repo that ensures certain standards

23:07 jared314: technomancy: ok, because right now it just tells me it can't verify the signature

23:07 technomancy: but i have a public key

23:08 xeqi: jared314: I should sign it sometime

23:09 technomancy: jared314: a pgp key in your clojars profile?

23:09 jared314: just an ssh key

23:09 m00nlight: Does anyone use clojure to read a hdfs's file?

23:10 technomancy: jared314: gotcha; verifying signatures requires your clojars profile contain your pgp pubkey that was used during deployment

23:10 jared314: technomancy: ok, that makes more sense. thank you

23:10 technomancy: as long as the artifact is signed I wouldn't worry too much about making sure clojars can verify it at present; hope to get that sorted out sooner or later though

23:13 ddellacosta: xeqi: you told me at one point about your flow for doing iterative CLJS testing in emacs (I believe), would you mind giving me a summary again? i.e., write up test, send to repl, run via X, etc.?

23:17 xeqi: ddellacosta: for cljs stuff I've been using https://github.com/cemerick/austin to get initially setup

23:17 https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample is a sample project that is similar to what I use

23:18 so with that, I can start nrepl, run a server, and then start a brepl with the instructions in the readme

23:18 * start a brepl in the nrepl session, effectively making emacs able to send cljs to the browser

23:19 so C-c C-k will send a cljs file and it gets compiled through piggieback (which was setup right by austin)

23:20 and using something like https://github.com/cemerick/clojurescript.test will allow writing tests and then invoking them in the brepl using `test-ns`

23:21 talios: strange, I think I just found a clojure bug - "(deftype open-wave .....)" generates a .class file open-wave.class, not open_wave.class

23:23 coventry: Huh. (defmacro ns []) returns #'clojure.core/ns, no matter what the namespace, and #'ns continues to refer to clojure.core/ns. The new macro is still accessible by its FQ name, but it does not have {:macro true} in its metadata. I wonder where the logic for this is in the clojure source code.

23:30 bitemyapp: coventry: still doing perverse things wtih namespaces? :)

23:35 technomancy: coventry: ns is hard-coded in a bunch of places, presumably so you never get stuck in a broken namespace with no way out

23:35 coventry: bitemyapp: Yep. It's a good test of code-walking/transformation. I've found tons of bugs.

23:36 technomancy: Yeah, it's definitely a sensible special case.

23:36 The bit about "No, you don't even get to be a macro" is a bit shocking, though.

23:37 technomancy: yeah, that's nuts

23:37 it occurs to me that the secret of ns+ would really be to create a clojure.core/like function though, then you could use regular ns as ns+

23:38 since ns clauses aren't limited to just require/use/refer/import etc

23:58 ddellacosta: xeqi: sorry I didn't respond sooner. Thank you so much!

Logging service provided by n01se.net