#clojure logs

2013-10-10

00:00coventryWell, 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.
00:10muhooisn't eval evil?
00:11coventryI was just using it to make a one-liner.
00:11arrdem(dec muhoo) ; not fully
00:11lazybot⇒ 2
00:12arrdem*funny
00:14muhoomeanie
00:14muhoohmm wonder if those ccan go negative
00:14muhoo(dec muhoo)
00:14lazybotYou can't adjust your own karma.
00:15muhoowell fine
00:15arrdemmuhoo: first no we tried that, second off we have a real eval and I'm greatful for it.
00:15muhoo(kill muhoo)
00:17coventryAttached a multi-file example. http://dev.clojure.org/jira/secure/attachment/12308/unbound-eg.tgz
00:21wtfwtf(dec muhoo)
00:21lazybot⇒ 1
00:22wtfwtf(dec muhoo)
00:22lazybot⇒ 0
00:22wtfwtf(dec muhoo)
00:22lazybot⇒ -1
00:22clojurebotIt's greek to me.
00:22muhoocool it can go negative
00:22Raynes(inc muhoo)
00:22lazybot⇒ 0
00:26JulienFantin_How can I handle a BytesInputStream returned as the :body of an http-kit response?
00:32arrdem(inc muhoo)
00:32lazybot⇒ 1
00:32arrdem(inc muhoo)
00:32lazybot⇒ 2
00:33coventry##(doseq [i (range 100)] (inc muhoo))
00:33lazybotjava.lang.RuntimeException: Unable to resolve symbol: muhoo in this context
00:33arrdemcoventry: the bots ignore each-other and themselves :/ that sort of thing isn't possible anymore
00:36rhg135hello 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
00:39arrdemwould 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 :/
00:41logic_progis 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"
00:42jared314arrdem: he is looking for a more task specific name. :ignored could refer to anything
00:42arrdemlogic_prog: data.edn may, but the core reader only keeps line info for top level forms.
00:42arrdemjared314: ah. ok thanks.
00:43coventrylogic_prog: clojure.tools.reader
00:43logic_progcoventry: you're starting to become among my favorite people in #clojure
00:44coventryNo worries. :-)
00:45akurilinIs 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"
00:46akurilinI can thread a map through a few function literals, but it doesn't look very elegant
00:46akurilinI bet Haskell has a monad for this :P
00:46logic_progyeah
00:47logic_progbut Clojure has a macro for this
00:47logic_progI actually wrote one two years ago.
00:47TEttingerlogic_prog: does this work? https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LineNumberingPushbackReader.java ?
00:48akurilinlogic_prog, nothing out of the box, right?
00:48TEttingerif ?
00:49logic_progTEttinger: that looks like it shoudl work, but I'm currently studying coventry's link
00:49TEttinger,(let [m {:a 1}] (if true (assoc m :b 2) m))
00:49clojurebot{:b 2, :a 1}
00:49TEttingerakurilin, I really don't see how that gets any simpler than if
00:50logic_progcoventry: I don't think that works, the IndexingPushbackReader is basically a char reader it doens't seem to read clojure forms
00:52coventrylogic_prog: clojure.tools.reader/read gives you back forms with metadata on all symbols.
00:52coventry(position metadata)
00:53akurilinTEttinger, 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
00:53akurilinsounds like something logic_prog was talking about
00:53TEttingerif-let may do it
00:54ddellacostahmm, how do I get the nrepl port of currently running nrepl server?
00:54ddellacostain repl
00:54rhg135im 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
00:55logic_prog(. (Runtime/getRuntime) exec "netstat -ln")) :-)
00:56coventryddellacosta: It's in .nrepl-port of the project you ran "lein repl" in.
00:56coventry*in the top directory of the project
00:56ddellacostacoventry: ah, found it--thanks. Assumed for some reason it would be stored in dynamic var or something.
00:59technomancyyou can probably find it by spelunking around in nrepl's guts, but the file is much easier
01:01logic_progcoventry: (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
01:01logic_progi.e. for (+ 1 2 3)
01:01logic_progthe meta for "+", "1", "2", and "3" are all nil
01:01namccartyWelp, 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.
01:02logic_progwhereas the nmeta for "(+ 1 2 3)" has the actual correct data
01:03coventrylogic_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 '+.
01:04logic_progcoventry: my bad, it picked up on the "+" also
01:04logic_progcoventry: nice, thanks
01:05logic_proghmm, maybe I should just roll my own parser
01:05logic_proghow hard can parsing a scheme like be, besides dealing with the crap dealing with comments and strings
01:07coventrylogic_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.
01:07logic_proghttps://github.com/clojure/tools.reader/blob/54546edff7566c544e2aad5b225617b2a557b1c7/src/main/clojure/clojure/tools/reader.clj#L677
01:07logic_proglooks simple enough indeed
01:08logic_progoh shit it exapnds macros too?
01:08logic_progdamn
01:09coventrylogic_prog: No.
01:09coventryThose are reader macros.
01:09logic_progah
01:09logic_progthanks for clarifying
01:10rhg135sigh python
01:13coventrylogic_prog: If you do make it wrap non-IObj's, can you let me know? I would have use for it.
01:14logic_progcoventry: seems fair enough given all your help
01:15logic_progis there a pr-with-meta ?
01:15logic_progwhich takes a clojure data structure, and prints it out, but along with the meta data too
01:18coventry,(binding [*print-dup* true] (print-dup (with-meta 'a {:foo true}) *out*)) (See ztellman's sleight.reader for an interesting use of this.)
01:18clojurebot^#=(clojure.lang.PersistentArrayMap/create {:foo true}) a
01:18TEttingernamccarty:
01:18coventry*poof*
01:19TEttinger(inc namccarty)
01:19lazybot⇒ 1
01:22muhooakurilin: i think (cond-> ...) is it?
01:22namccartyI have only some idea what just happened, but I like it
01:22muhooalso (cond->>)
01:23arrdemnamccarty: you just won internet point!
01:23arrdem*points
01:24muhootoo bad they're not bitcoins
01:24metellus(inc internetpoints)
01:24lazybot⇒ 1
01:27patrickodanyone 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
01:28akurilinmuhoo, 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
01:28akurilinmuhoo, thanks for reminding me :)
01:29akurilinmuhoo, the one downside is that cond-> forces you to use the entire threading flow for conditionals
01:29akurilinwhereas if you make an (assoc-if) function, you can use a regular ->
01:29akurilinexcept now you can only do assoc
01:29akurilinso one way or another you're picking what to pivot on
01:30TEttingerassoc can take multiple args
01:31muhoo,(doc assoc-if)
01:31clojurebotIt's greek to me.
01:31muhoo?
01:31akurilinmuhoo, as in, you write one yourself :P
01:31muhoooh
01:32muhoocond-> helped me a lot. at least my let's weren't so huge
01:33muhoo(inc inc)
01:33lazybot⇒ 4
01:33muhoo(dec dec)
01:33lazybot⇒ 0
01:33muhoo(inc dec)
01:33lazybotYou want me to leave karma the same? Fine, I will.
01:33muhoo~botsnack
01:33clojurebotthanks; that was delicious. (nom nom nom)
01:33technomancyclojurebot: moar whuffie plz
01:33clojurebotGabh mo leithscéal?
01:40TimMcI still need to read that.
01:40TEttingerpatrickod: do you have :aot for the main class?
01:41patrickodnope I have :main instead
01:41TEttingerso if your ns was pat.core, you would have in project.clj both :aot and :main specify pat.core .
01:41TEttingerit is a change in lein 2.2 I think
01:41patrickodah ok. :) I've been reading out of date docs so
01:41TEttinger:main no longer implicitly :aots, it throws everyone off.
01:41TEttingertechnomancy...
01:42TEttinger:)
01:46patrickodTEttinger mind if I ask you a follow on ? getting a cryptic error message now running lein ring uberjar
01:46TEttingercryptic error eh?
01:46TEttingerpastebin?
01:46patrickodhttps://gist.github.com/patrickod/b231e9ab4649ada4b635
01:47TEttingercan you put project.clj in there?
01:47TEttingerpatrickod: ^
01:47patrickodsure.
01:48patrickodhttps://gist.github.com/99faff34335e4643ca92
01:48TEttinger:aot needs a vector of namespaces
01:48TEttinger:main only can do one, so it only needs one namespace not in a vector, but :aot can do the whole lot
01:49TEttingeryou can also do :aot :all
01:49patrickodah ok. :)
01:49patrickodthanks!
01:50TEttingernp, I've hit my head against the wall on similar issues before
01:52patrickodbleh still getting the same issue. most weird
01:56TEttingersame line number?
01:56TEttingerpastebin both?
01:57patrickodhttps://gist.github.com/patrickod/b346ed0e0f2cb768c20e
02:01TEttingerpatrickod, is your main method named -main ?
02:02patrickodyep one second here's the core.clj https://gist.github.com/1ccda719fbdb47e8e65a
02:04TEttinger...uh oh then. this could be that unpleasant bug regarding hyphens in namespace paths.
02:04TEttingersee how in the error it has underscores after clj ?
02:04TEttingerbut the ns has hyphens?
02:04patrickodoh my :(
02:05patrickodhadn't crossed my mind.
02:05TEttingertry taking out "clj-" or giving it some dash-free name
02:05patrickodare underscores a suitable replacement?
02:05TEttingerI think they should be?
02:06TEttingerI've seen them in prismatic's stuff
02:06TEttingerthat's not likely to be it, but I am unsure of what else it could be
02:06TEttinger(I thought the -/_ thing was fixed or worked around)
02:07patrickodit would seem that isn't it
02:07patrickodyep changed all references to use underscores and still seeing the same
02:08TEttingerok.
02:09TEttingertry lein compile
02:09TEttingerthat may give an interesting error
02:09TEttinger^ patrickod
02:10patrickodran without issue
02:10patrickodyep with 0 exit code
02:10patrickodtrust me to hit this sort of issue with a tiny first project
02:10patrickodjumping in the deep end
02:11TEttingerhaha I know, it's a weird one
02:11TEttingerok, look in... hang on a sec
02:12TEttingertarget\classes in the project root, file explorer
02:12TEttingerthere should be some subfolders
02:12TEttingerat least one
02:12patrickodyep there's quite a few
02:13TEttingeris one clj-geoip, or the version you renamed it to?
02:14patrickodthere's a geoip_clj directory yeah
02:14TEttingerok, in there, is there a core$_main.class ?
02:15patrickodyep
02:16TEttingerdouble-check project.clj :aot and :main refer to the same clj_geoip.core ?
02:17TEttingeralso the folder needs to be renamed
02:17patrickodoh ok
02:17TEttingerjava inherited junk...
02:17patrickodthat's the one thing I didn't do
02:18patrickodboth :aot and :main point to the smae
02:18patrickodsame*
02:18patrickodthere are no folders with dashes left. yet getting the same error.
02:18TEttingerlein clean, then lein uberjar >
02:18TEttinger?
02:19patrickodyay!
02:19TEttingerhaha did that work?
02:19patrickodyep
02:19patrickodI was running lein ring uberjar before
02:20TEttingerfantastic!
02:20patrickodso I'm wondering if lein uberjar is the fix, or lein clean
02:20TEttingerohhhh
02:20patrickodis that a nono?
02:20TEttingerI don't know much about ring
02:20TEttingerI don't think they have their own uberjar, it may need to have lein uberjar run first
02:22patrickodmaybe. lein ring uberjar is still broken
02:22patrickodno matter if lein uberjar works
02:22TEttingeryay
02:22TEttingercan you run it?
02:22patrickodyep
02:22patrickodworking perfectly
02:23patrickodalthough it's throwing a *lot* of errors due to NullPointerExceptions
02:24TEttingerI 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!
02:24patrickodI've graduated :)
02:24patrickodit runs fine in the development server, now to make this thing work as a jar
02:28TEttingerI'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
02:28TEttinger^([^\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)
02:28patrickodI thought that was ASCII art gone wrong for a second
02:28TEttingerI'm doing this to transform the line into clojure code, so it can be sorted etc
02:29TEttingerthat's only the search, the replace is gnarly
02:41namccartyQuick 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
02:42namccartyI tought myself clojure from the docs, so I don't realy have the benefit of inheriting someone else's style
02:45namccartyI should probably get around to teaching myself spelling. Well, I'm an enginner, don't really need that
03:30namccartyOh sweet mother of god, y u do dis clojure? I am getting a null pointer with a missing stack trace.
03:31namccartyAnyone know anything that can cause a null pointer exception with a missing stack trace?
03:36namccartyNever mind my last statements, clojure suddenly decdided to behave
03:51TEttingernamccarty, what kind of game did you say you were going to program in clojure>
03:51namccartyTEttinger: We are currently planning on making a tower defense thing, and then to make a 4x-ish game
03:54TEttingercool. 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.
03:57namccartyAlright, so while I am sitting here fighting with virtual vm
03:57TEttingeralso, hiphip makes array handling easier https://github.com/Prismatic/hiphip , and I've been meaning to learn plumbing. https://github.com/Prismatic/plumbing
03:57namccartydoes anyone know a better way to profile clojure code?
03:57TEttingeryou mean visualVM? there are commercial ways for java code that work just as well for clojure
03:58TEttingerthere may be some free ones
03:58namccartyyeah, visualvm
03:58namccartyi cant get it to do profiling
03:58andyfingerhutI've heard good things about YourKit, but haven't tried it myself. It is free for use on open source projects.
04:00TEttingerhttp://www.fatvat.co.uk/2009/05/jvisualvm-and-clojure.html?m=0
04:01namccartywat
04:01namccartyit randomly started working
04:05TEttingernamccarty: https://groups.google.com/d/msg/clojure/TYNWRlspTkQ/2itdV_YTs3oJ
04:05TEttingertips for how to use visualvm with clojure
04:05TEttingerand other profilers
04:06namccartyThank you
04:08TEttingerno 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
04:08namccartyhmm
04:08namccartyi got it working
04:09namccartyim still derping around in my little sudoku solver, looks like most of my time is spent in hash table comparisons
04:10namccartyequality comparisions that is
04:10namccartyi need to figure out how values works in clojure so i can get past that
04:10TEttingerwant to put it on github?
04:12namccartyIt started as a project euler sloution, and now I plan on keeping going through it until i get clojure idioms down
04:12namccartyhttps://gist.github.com/nmccarty-school/6914491
04:13namccartyI 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
04:14namccartyand by pretty sure, i mean I should quit computers if that isnt where they are
04:15namccartyI need to find an efficent way to signal if attempt-deduction made any changes
04:16namccartythe 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?
04:17TEttingeris the sudoku.txt available?
04:19namccartyyou 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
04:19namccartyunless you are wanting to solve the problem, that file is useless
04:20TEttingerok
04:21namccartyif you want to see it in action: (pprint (deparse-board (solve example-board)))
04:22namccartyit 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
04:24namccartyactually, i lied, the actual solve and then converting to nested vectors only takes ~25 ms for the built in example on my system
04:24namccartythat is not a typical example though
04:25namccartythe built in example just happens to be one that can be solved really eaisly by my code
04:25namccartylet me see if i can find a hard one
04:29namccartyTEttinger: I updated the gist to include a sudoku.txt with a few random puzzles
04:30TEttingerthanks
04:30namccartyThe first one takes a few orders of magnitude longer to solve than the example in the code
04:41TEttingernamccarty, 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
04:41TEttingerjust operate on 2d vectors
04:43namccartyTEtringer: thanks, ill look into it
04:55namccartyOops, sorry TEttinger, totally mispelt your name there
05:00TEttingerhaha
05:00TEttingernp
05:00TEttingerit's common.
05:08mercwithamouthhrmm 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
05:08mercwithamouthhttps://www.refheap.com/19598
05:09mercwithamouthhere's my code....i suspect my fridge-ingredients definition??? but i believe i've followed the tutorial correctly
05:09mercwithamouthalso is it common for clojure to change the order of values in a set?
05:10ianeslickYou can't rely on it not doing so (changing order in a set)
05:10mercwithamouthwell duh i guess it put them in order =P
05:10mercwithamouthahhh i see
05:10mercwithamouthdef ...not defn. thanx mercwithamouth
05:10ianeslickThus the definition of 'set'. I think there is an unexposed ordered set data structure somewhere?
05:11ianeslick(sorted-set :a :b :c)
05:13mercwithamouthhrmm funny that's fixed. now i'm getting a vaguer error..i'll spend a few more min looking over =P
05:14mercwithamouth'if should be a vector'
05:17instilledhi. 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!
05:17ianeslickYou have a sequence of sequences?
05:18instilledyes.
05:18instilledit's a seq of seqs.
05:18ianeslickYou want to get back a seq of seqs?
05:18ianeslickOr flatten?
05:18instilledflatten.
05:18ianeslick(mapcat #(map fn %) seq-of-seqs)
05:19instilledi'll try! cheers for that quick response!
05:19ianeslickReturns a flattened list applying fn to all the elements of the inner seqs
05:19mercwithamouthha! found it! =P
05:41mercwithamouth,(println "hello")
05:41clojurebothello\n
08:07sm0kehey guys anyone using postal?
08:07sm0kei dont seem to find where the smtp config like server, port and password goes?
08:09vijaykiransm0ke: you can pass the settings as map to send-message fn
08:10sm0kevijaykiran: oh yes..as a meta map ? ^{}
08:10sm0kethanks
08:10clgvsm0ke: well the desing choice to have it as metadata is at least debatable...
08:11vijaykiransm0ke: yup
08:12vijaykiranyeah meta-map is an odd choice indeed.
08:12sm0kehmm..are there some other libraries for mailing? i see it is not developed actively
08:13vijaykiranclojurewerkz has one to AFAIR
08:13vijaykiranhttps://github.com/clojurewerkz/mailer
08:14vijaykiranwhich is also built on top of Postal - it seems
08:14sm0ke:D yes
08:14vijaykiranlast commit 2 months ago - seems healthy to me
08:15vijaykiranbesides not much would change too frequently in JavaMail world :)
08:15sm0keyep postal should do i think
08:16clgvthe decision to use any of these depends on how much money is at stake in your project
08:16sm0ke:P
08:18sm0keAny software in this world expands until it can send a mail.
08:18sm0keeverything is at stake
08:19clgvI disagree. there is at least as much software that does not expand to need to send mails
08:19sm0keclgv: they are not fully exapnded yet
08:20clgvsm0ke: no. why should an optimization algorithm ever send an email? :P
08:20sm0keclgv: thats not a software anyways
08:20clgvI already guessed that you have a very limited scope that you call software ;)
08:20sm0ke:/
08:22sm0keclgv: thats is because your "optimization algortihm software" didnt send me any mails yet
10:47degWow, quiet for a few hours! Has the US gov't shut down IRC, or is just my connection?
10:49CookedGryphonHey, I'm doing some java interop and overriding a class with gen-class for which I need to call super
10:50CookedGryphonfollowing the docs for gen-class I have :exposes-methods {methodName superMethodName} and then i'm calling (.superMethodName this) in my overridden method
10:50CookedGryphonbut I'm getting no matching field found. Any clues?
11:12llasramCookedGryphon: 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:16CookedGryphonllasram: I'm half way through doing that as we speak :)
11:17llasramCookedGryphon: Cool :-)
11:17CookedGryphonI'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:19john2xhow do I explode a map {:foo "bar" :fizz "buzz"} => [{:foo "bar"} {:fizz "buzz"}]?
11:19CookedGryphonjohn2x: would [[:foo "bar"] [:fizz "buzz"]] suffice?
11:20mdrogalis,(map (partial apply hash-map) (map vec {:foo "bar" :fizz "buzz"}))
11:20clojurebot({:fizz "buzz"} {:foo "bar"})
11:21CookedGryphon,(seq {:foo "bar" :fizz "buzz"})
11:21clojurebot([:fizz "buzz"] [:foo "bar"])
11:21john2xthanks both :)
11:21xeqi,(for [[k v] {:foo "bar" :fizz "buzz"}] {k v})
11:21clojurebot({:fizz "buzz"} {:foo "bar"})
11:24jcromart_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:25jcromart_eh, I dunno
11:25jcromart_I could also just have namespaced functions on the raw LDAP entry hash map
11:28degWhat's the best workflow to build a deploy a project that includes a libray, where the library includes clojurescript?
11:29degI'm splitting an existing project into pieces, and my current use of lein-cljsbuild doesn't seem to do the trick.
11:58arrdemclojurebot: ping
11:58clojurebotPONG!
12:03replWhy 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:03replLazy sequence returned only when list is passed to the map?
12:04replBy return different results, I mean different printing behaviour, Both return the same value.
12:07`cbpcan a transient be safely counted?
12:07hyPiRionrepl: because lists are not chunked by default
12:09replhyPiRion: Ah, chunking. OK.
12:12replhyPiRion: 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:23edwYo guys, we're hiring a Clojure programmer in NYC.
12:26edwThat said, I just read the first paragraph of this, and it's basically 100% accurate: <http://bit.ly/1aq4ovm&gt;
12:28ThePawnBreakI'm trying to use rayner's file system library, but with-cwd gives the error No implementation of method: :as-file of protocol:
12:28nDuffThePawnBreak: How are you invoking it?
12:29ThePawnBreak(fs/with-cwd path (fs/rename x y))
12:29nDuffThePawnBreak: the first argument needs to be something you can call (file) on.
12:29nDuffThePawnBreak: what *is* path?
12:29ThePawnBreakpath to a dir
12:29ThePawnBreak/home/cristi/folder/
12:29nDuffwhat _exact_ object type?
12:29nDuffPrint it.
12:29ThePawnBreakstring
12:30dobry-denWhen 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:30dobry-denWhat's responsible for that behavior?
12:30ThePawnBreak"/home/cristi/folder/"
12:30dobry-denreload as in f5
12:31ThePawnBreaknDuff: any suggestions?
12:32nDuffThePawnBreak: Give me a minute. Installing the library.
12:32ThePawnBreaksure
12:34nDuffThePawnBreak: I can't reproduce that when genuinely using a java.lang.String
12:34nDuffThePawnBreak: I suggest instrumenting to be sure you aren't getting a nil in there by mistake.
12:34ThePawnBreakthere's no nil, I'm sure
12:35nDuff(or a Byte[], or something else)
12:35ThePawnBreakpath, x and y are string literals
12:35nDuffCannot reproduce, then.
12:35ThePawnBreak:(
12:35ThePawnBreakthanks, anyway
12:35nDuff(Which version of the library?)
12:35bordatoueis 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:36ThePawnBreaknDuff: how do I tell?
12:36nDuffThePawnBreak: well, what version did you put in your project.clj?
12:36ThePawnBreakoh, sorry, im stupid
12:36ThePawnBreak1.4.4
12:36nDuffThePawnBreak: If you can provide a standalone reproducer, by the way, that might help.
12:37nDuff...yeah, I don't see anything here that would make sense for the behavior given.
12:37nDuffNeed a reproducer.
12:37ThePawnBreakI'll try to make one now
12:38ThePawnBreakit worked :(
12:38ThePawnBreakthat means I have a mistake someplace else
12:38dobry-denbordatoue: yeah, you could just line-seq both files and alternate
12:39dobry-denjust like you'd alternate from [:a :b :c] and [1 2 3]
12:40bordatouedobry-den: please can you provide an example
12:40ThePawnBreaknDuff: 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:40nDuffThePawnBreak: ...that *is* why I asked you to print the actual object.
12:40nDuffThePawnBreak: (which, err, you said that you did).
12:41ThePawnBreakI did, I just didn't notice the parens (it's a longish string)
12:41nDuffAhh. Anyhow, glad to hear it's tracked down.
12:41dobry-denbordatoue: (doseq [lineA (line-seq fileA), lineB (line-seq fileB)] ...)
12:41dobry-denwait
12:41dobry-dennvm
12:42bordatouedobry-den: that doesn't alternate
12:42dobry-den(map func (line-seq fileA) (line-seq fileB)) was what i was thining of
12:43bordatouedobry-den: thanks very much, i will try that
12:43nDuffThePawnBreak: You might use (first list) instead, btw.
12:45dobry-denbordatoue: (map vector ...) would return a lazy seq of [line1A line1B] [line2A line2B] ...
12:49dobry-denclojure's laziness and seq interface makes working with files so easy
12:49dobry-denthe naive code you write to handle a 2kb file often handles 12gb files
12:52mycelloandiin java.jdbc 0.3.0-alpha5 it looks like with-connection is deprecated - what should be used instead though?
12:56joegallomycelloandi: http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html
12:58bordatouedobry-den: its not working using map, it is only iterating through one file not alternating between files
13:05nathanicbordatoue: 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:05nathanic,(map vector [1 2 3] [:one :two :three])
13:05clojurebot([1 :one] [2 :two] [3 :three])
13:08nathanic,(interleave [1 2 3] [:one :two :three])
13:08clojurebot(1 :one 2 :two 3 ...)
13:10bitemyapp,(mapcat concat (map vector [1 2 3] [:one :two :three]))
13:10clojurebot(1 :one 2 :two 3 ...)
13:10AimHere,(interleave [1 2 3] [:one :two :three])
13:10clojurebot(1 :one 2 :two 3 ...)
13:14dobry-denbordatoue: (map vector (line-seq file) (line-seq file2)) isn't iterating through them both line-by-line?
13:15dobry-denthat doesn't sound consistent with map's doc
13:16nathanici think it'll stop whenever the either file runs out of lines, and you miss the remainder of the longer file
13:18dobry-dennathanic: yeah, that's true. you could have a third seq (repeat ":)")
13:20nathanic,(map vector [1 2 3 4] [:one :two] (repeat ":-)"))
13:20clojurebot([1 :one ":-)"] [2 :two ":-)"])
13:20dobry-den:-)
13:20dobry-denim really good in interviews
13:21dobry-denoh, this is what i was thinking: partition-all
13:22dobry-denpartition-all with a (repeat ":-)") pad collection
13:26dobry-dennot that it helps
13:26bordatouedobry-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:29dobry-denso this doesnt work for you: (doseq [[a b] (map vector (line-seq fa) (line-seq fb))] (println a b))
13:29nDuffbordatoue: map returns a lazy sequence
13:30nDuffbordatoue: so that return should be, well, immediate.
13:30bordatouenDuff: oh, thanks
13:30upwardindexI'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:30bordatouedobry-den: thanks very much that should work
13:32dobry-denbordatoue: 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:35mdeboardvagrant ssh dev
13:35mdeboardfeh
13:35dobry-denas 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:36dobry-denlike maybe i find some `map-but-pad-with-nil` function one day
13:41xeqiupwardindex: I use austin, and something similar to the https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample
13:41xeqipiggieback is the nrepl-middleware that takes over an nrepl connection and makes it a cljsrepl
13:42upwardindexxeqi: do you also serve pages using hiccup? this seems to be the breaking point for me as my pages are static
13:42xeqiaustin is some setup that makes it very easy to embed it in a browser
13:43xeqiupwardindex: nope, as part of the setup I run a development server that takes my static html and embeds the browser repl connection call
13:44xeqirelevant 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:44upwardindexxeqi: ahh that is what I'm missing
13:45cemerickupwardindex: 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:45cemerickWould love to have a sample project along those lines...
13:45dnolenok multimethods in JS I'm down with, would fix CLJS numerics http://2013.jsconf.eu/speakers/brendan-eich-js-responsibilities.html
13:45upwardindexcemerick: oh, I had seen how to do the static port but not the static session id
13:48dobry-denI 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:50bjais there a way to do the equivalent of (apply (partial new SomeClass) args)?
13:50bjawell, not the equivalent, but what that code snippet is trying to do if new wasn't a special form
13:51Bronsa(clojure.lang.Reflector/invokeConstructor class (object-array args))
13:52metellusbja: I think that would just be (SomeClass. args here)
13:53metellusoh, yeah ignore me
13:54bjaBronsa: thanks
13:54Bronsabja: np
14:06TimMcdobry-den: The Markdown converter should be doing that for you. I think.
14:11dobry-denTimMc: youre supposed to be able to embed html in markdown. but i figured it out.
14:11dobry-denWhat's generally the problem is cljs-generated js throws TypeError: clojure.lang is undefined?
14:12dobry-denthrows it on `clojure.lang.PersistentHashMap.create.call(...`
14:17coventrymsg dobry-den So is it definitely safe if you escape <>?
14:17coventrybah.
14:18dobry-denThe js error is caused by this line https://github.com/yogthos/markdown-clj/blob/master/src-cljs/markdown/core.cljs#L5
14:18dobry-dencoventry: yeah, apparently <>&
14:31tufflax,(.name (the-ns 'clojure.core))
14:31clojurebotclojure.core
14:31tufflax,((memfn name) (the-ns 'clojure.core))
14:31clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching method found: name for class clojure.lang.Namespace>
14:31tufflaxwhat's going on there?
14:33pjstadig,((memfn getName) (the-ns 'clojure.core))
14:33clojurebotclojure.core
14:33pjstadigname is a field
14:33tufflaxoh
14:34tufflaxthanks :P
14:34pjstadignp
14:35dobry-denHow 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:40dnolendobry-den: not sure what you are asking?
14:43dobry-dendnolen: 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:43dobry-denhowever, i can't seem to get reproduce clojure.lang in a cljsfiddle
14:43dnolendobry-den: still not understanding what you are saying
14:44dnolendobry-den: is there a bug in your own code and your can't replicate on cljsfiddle?
14:44dnolens/your/you
14:45dobry-denYes. I guess my first question is: should clojure.lang be defined in clojurescript-compiled javascript?
14:45dnolendobry-den: no
14:49dobry-denBasically, 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:49dobry-dencould it be because init-transformer is also defined in the Clojure source?
14:53dnolendobry-den: hrm, I don't know. what version of ClojureScript are you using?
14:56jonasendobry-den: dnolen: this could maybe be a cljsbuild crossovers issue?
14:57jonasenhttps://github.com/yogthos/markdown-clj/blob/master/project.clj#L16
14:59dobry-denThanks. Yeah, I manually added latest Clojurescript version just now and it works
14:59dnolendobry-den: you always need to specify a CLJS version
14:59dobry-denI have warning-message blindness it seems.
15:00dobry-denProbably from working on a Rails 2.x app on Ruby 1.9.3 for so long
15:13jcfhello 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:14jcfI 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:42TimMcjcf: You have to use the =contains=> arrow.
15:43TimMcErr, wait... I'm actually not sure what you're trying to do there.
15:43jcf@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:44jcf@TimMc at the moment I'm having to write code like this: https://gist.github.com/jcf/d6b09419effb973423f8#file-repetition-clj
15:44TimMcjcf: I think you want (provided ..a.. =contains=> {:key 1})
15:44jcf@TimMc that amount of repetition bugs me
15:46mlb-Given a running uberjar, is it possible to update a library it depends on?
15:48mdrogalismlb-: Under what circumstances would you want to do that?
15:48nDuffmlb-: the _easy_ answer is "no".
15:48nDuffmlb-: the comprehensive answer involves noting that one can construct new classloaders at runtime.
15:49nDuffmlb-: ...but it's painful. Potentially, very painful.
15:49mlb-$DAYJOB has interest in using clojure. The likely deployment would be sending a customer some installer, then later sending them updates
15:49mdrogalisYou're almost definitely better off putting a queue or a wire between the component and anyone who depends on it.
15:49mdrogalisInstallers. D:
15:49mlb-I shoould say, it's a very, very, enterprise $DAYJOB
15:49mdrogalisSo you're trying to achieve no downtime?
15:50mlb-not no downtime (otherwise I'd've pushed them more towards Erlang), but ability to upgrade
15:50nDuffmlb-: I'd tend to (very, very) strongly agree with mdrogalis
15:51nDuffmlb-: ...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:51mlb-JVM in-place upgrades are painful?
15:51nDuffmlb-: 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:51mdrogalisIndeed - it will leave you blistered.
15:52nDuffmlb-: Yes. Very yes. Also, Clojure is hard to fit into the OSGi model.
15:52nDuffmlb-: ...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:52TimMcjcf: No, that replaces your existing provided line.
15:53nDuff(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:53mlb-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:54nDuffmlb-: 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:54mdrogalismlb-: I'd take a step back and look at it at a higher level than library support.
15:55mdrogalisIf you need tolerance in terms of new types or data or messages, there are formats that can do that for you, like Avro.
15:55nDuffmlb-: ...running multiple JVMs attached to a bus should be a much less painful thing.
15:56mdrogalisSorry, 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:57nDuffmlb-: there are some places where you can get very, very unexpected errors from the JVM in the multiple-classloader case
15:58jcf@TimMc I appreciate you're help, but I'm still stumped… https://gist.github.com/jcf/d6b09419effb973423f8#file-repetition-clj
15:58nDuffmlb-: things like "com.me.IFoo does not implement com.me.IFoo", when they're coming from different classloaders.
15:58mdrogalisSeen that before. >_>
15:59nDuffmlb-: 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:59nDuffmlb-: ...because of the way Clojure does classloading, for instance, clojure.core.* libraries need to be bundled in with clojure.core itself.
16:00nDuff(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:00nDuff^^ that's in terms of OSGi packaging, btw, to be clear, not classloading in general.
16:02jstewGreetings. 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:03TimMcjcf: 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:03jcf@TimMc I'm only updating the repetition file (I'm copying and pasting the contents of my actual tests in to the gist :)
16:15mlb-nDuff: Okay, thanks for the thorough explanations =]
16:22nathanicjstew: it's not clojure, but at work (a java enterprise shop) we use http://flywaydb.org/ and are pretty happy with it.
16:26RaynesThat moment when you realize you've been listening to the LOTR soundtrack for 15 minutes.
16:26TimMcThat moment when you realize you accidentally put an ambient track on loop 45 minutes ago.
16:26Raynes$last
16:26lazybotRaynes is listening to: Muse - Uprising [The Resistance]
16:27TimMcwtfhax
16:27Raynes$botsnack
16:27lazybotRaynes: Thanks! Om nom nom!!
16:27scriptorRaynes: I try to save that for Friday
16:27RaynesTimMc: $last is connected to last.fm.
16:27TimMctechnomancy: Big Giant Circles has a kickstarter for his next album.
16:27RaynesAnd I scrobble everything I listen to to it.
16:28Scriptorion$last
16:28lazybotScriptorion last listened to: The Album Leaf - Another Day (Revised) [In A Safe Place]
16:28TimMcIt knows when you are sleeping, it knows when you're awake.
16:28tbaldrid_$last
16:28lazybotCouldn't find that user.
16:28tbaldrid_HAH! you can't catch me, NSA!!!!
16:28Scriptor\/nick to your last.fm username
16:28TimMc$last phyzome
16:28RaynesSo 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:28lazybotphyzome last listened to: Big Giant Circles - Katana Blaster [Impostor Nostalgia]
16:28RaynesScriptor: Yes, you can also pass it an argument.
16:29Raynes$last Scriptor
16:29lazybotScriptor last listened to: Roy Gates - Come Alive [Trancemaster 6000 (Jubilee Edition)]
16:29ScriptorI think I forgot the password for Scriptor
16:29Scriptoror that's someone else
16:29llasramThere's a service a large number of people tell what music they're listening too?
16:29RaynesScriptor: You can change back to your nick and do $lfmassoc Scriptor and it'll remember who you are from then on.
16:30Scriptorooh
16:30Scriptor$lfmassoc Scriptorion
16:30lazybotAssociated your username.
16:30Scriptor$last
16:30lazybotScriptor is listening to: The Album Leaf - Eastern Glow [In A Safe Place]
16:30Scriptorsweet
16:30RaynesOh, I had it backwards. Thought the other nick was your usual one. :P
16:30llasramScriptor: Great album
16:31Scriptorllasram: it is
16:31leo_33if you go to an interview and there is no response after 3 weeks is it a no for sure?
16:31Scriptordepends on the company
16:32Scriptorbig company, startup?
16:33`cbpleo_33: you can try asking them? :P
16:35nopromptughh. wtf.
16:35leo_33very big company
16:35noprompti just wanna go ape shit on github right now.
16:35technomancyTimMc: backed it 2 days ago. can't wait =D
16:35noprompthaven't we all agreed that implicit is bad?
16:35mercwith1mouthi had a dream last night....and...this might sound odd but does anyone want to make a starcraft clone with me? =)
16:35noprompt:(
16:36Scriptor…in clojure?
16:36mercwith1mouthScriptor: absolutely
16:36coventryWhat is the suppress-read var intended for? Looks like if it were true it would stop LispReader.read in its tracks. Why?
16:36nopromptScriptor: he's a troll.
16:36Scriptorthanks
16:36mercwith1mouthi'm jk ...haven't heard/seen that guy in a while
16:36nopromptlol
16:37mercwith1mouthnoprompt: lol i'm not 'that' troll...just figured i'd keep his memory alive
16:37mtpi think we collectively ran him off
16:37mercwith1mouthlol it would be funny if we actually did make one 'after he left'
16:37noprompti'm writing a comment on gh and i feel like i want to use ### in front of everything to get my point across.
16:37TimMcHaven't seen lajla in a while for that matter.
16:38LajjlaTimMc I am the finest programmer in the world safe the microsoft chief software architect
16:38LajjlaChousuke, is this not true?
16:38Bronsa`coventry: there's no such thing
16:40coventryBronsa: No, but it's mentioned in RT/suppressRead as a potential future feature.
16:41coventryhttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L1720
16:41Bronsa`coventry: yeah, I think that's just a leftover
17:13johndoHi - can I download the Clojure API HTML docs anywhere? The ones on the website.
17:14mtpyou can probably download them from the website
17:14technomancyjohndo: the API docs are all there in the repl
17:14coventryjohndo: I think they're generated with autodoc from the source: http://tomfaulhaber.github.io/autodoc/
17:15johndoYeah, I understand the great REPL doc tools, but I also like the HTML format
17:16bitemyapparohner: safe to say you're using keen.io for your analytics?
17:16arohnerbitemyapp: actually, no
17:16arohnerwe just work in the same building
17:17arohnerI use mixpanel and datomic
17:18bitemyapparohner: 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:18dnolenIf anyone has time to confirm this one would be super helpful - http://dev.clojure.org/jira/browse/CLJS-606
17:18arohneryeah
17:18arohnerhave you seen https://heapanalytics.com/ ?
17:18arohnerwe experimented with them a little
17:19bitemyapparohner: yup. What worked and what didn't?
17:19seangrovednolen: This need to be tested on anything other than windows?
17:19arohnerbut in general, the hard part is figuring out what you want to measure
17:19dnolenseangrove: yeah I just want more information, if replicable outside of windows
17:20arohneralso, 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:20seangroveWill test out
17:20arohnerw/ mixpanel, there's a clear separation between webapp implementation and the conceptual thing you care about
17:20arohneralso, we do a ton backend events
17:20bitemyapparohner: backend generated event "annotations" is one of the elaborations I wanted to explore.
17:20cemerickdnolen: yeah, same behaviour with the warnings I see when using piggieback/austin with cljs > 1847
17:20clojurebotAlles klar
17:21cemerickobviously more going on there, but the line numbers are off in the warnings I see
17:21mheldam 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:21arohneralso, all major products completely fail at funnel analysis, and A/B testing
17:21mheldI'm getting a "Unable to resolve symbol: everything in this context"
17:21bitemyapparohner: 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:21dnolencemerick: 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:21arohnerso 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:22cemerickdnolen: oh sweet, you got the same warnings with the stock brepl?
17:22arohnerbitemyapp: yes, implicit dom information was a problem. there's nothing that says "don't mess with this, because it will hose analytics"
17:22dnolencemerick: yes
17:22cemerickexcellent
17:22cemerickthanks :-)
17:22mheldoh ha
17:22bitemyapparohner: I'm considering explicit DOM annotation for event tracking. (attrs)
17:23mheldmissed a level of ()s
17:23arohnerbitemyapp: that's cool, but then how is that different from 'mainstream' analytics?
17:23bitemyapparohner: still no manual JS event emitters, you're just rendering DOM. Still collect everything, but added layer for more specific querying if desired.
17:24bitemyapparohner: given my druthers, I'd prefer a DOM tag attr to JS code emitting the event.
17:24arohnertrue
17:24bitemyappso you can still select by CSS selectors, but you can cherry-pick the explicit DOM attrs if you want
17:24arohneresp. if you don't have to deal with e.g. page clicks
17:25bitemyappA-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:26bitemyapparohner: the drop-off funnels thing is doable.
17:27arohnerbitemyapp: it's a minor thing, but nobody includes an A/B calculator in the actual comparison page
17:27bitemyapparohner: 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:27arohnerand if you want to be super-scientific, an explicit "don't show me the results until I have N samples"
17:27bitemyappThen it just queries for people whose sessions included 1, but not 2 in the session scope.
17:28bitemyapparohner: (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:28bitemyapppeople are too eager to make n=1 decisions based on that.
17:29arohnermeh. they can make bad decisions today
17:29arohnerbut you can add tools to make it easier to make good decisions
17:29bitemyappI get your meaning, I'd just rather focus on the more constructive parts initially.
17:30nopromptcemerick: thanks for merging that! :)
17:30bitemyapparohner: the explicit DOM attrs aren't just for nominative event tracking, they're for adding arbitrarily queryable metadata to the events.
17:30bitemyappthe backend event annotation is that plus de novo event emit
17:31bitemyappThere'll be higher level patterns layered on top of this so people don't really have to think about my data model.
17:32bitemyapparohner: 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:32arohnernp
17:33seangrovednolen: Repro'd here on osx
17:33TEttingermheld: the line [{:keys [longitude latitude k] :as everything}] doesn't do anything
17:33dnolenseangrove: huh ok
17:34TEttingertry putting that in a let, mheld
17:34dnolenseangrove: so has it always been off or is there something specific here?
17:35TEttingeroh did you solve it already, mheld?
17:46TimMcmheld: Oh, is this for the project you were mentioning in ccs?
17:49mheldTimMc!
17:49mheldprobably not?
17:49mheldI'm not sure
17:49TimMcOh, OK.
17:49TimMcStartup thingy.
17:49mheldTimMc: http://weft.io
17:50TimMcYeah, that. :-) Wasn't sure if it was public.
17:52bitemyappTimMc: CCS?
17:52bitemyappmheld: I didn't know you were doing that in Clojure - pretty cool.
17:54mheldbitemyapp: yeah!
17:55mheldbitemyapp: was originally RoR but then SAP happened and jruby wasn't playing nice with their stuff
17:55mheldso I said fuck it and took what I had into clojure/compojure
17:55mheldgotta say, enlive + middleman and hiccup together make a great team
17:57mheldplus, it doesn't matter what we're using anyway -- lots of fun SOA stuff ;-)
18:08TimMcbitemyapp: The first rule of ccs is that you don't talk about ccs.
18:08TimMc(An IRC channel for the College of Computer (and Information) Science at Northeastern University.)
18:28noonian,'(foo 'bar ~foo)
18:28clojurebot(foo (quote bar) (clojure.core/unquote foo))
18:28noonianhow can I get the value of a var unquoted into a quoted form?
18:30nooniani.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:31arohnernoonian: `(require ~foo)
18:31arohnerbacktick, not single quote
18:31arohneralso, require takes a namespace, not a var
18:31arohnerso (require 'foo.bar), not (require 'foo.bar/baz)
18:32noonianyeah, sorry
18:32noonianthanks
18:32noonianI'm actually doing (-> 'foo.bar/baz namespace symbol) to take care of that heh
19:02dnolenBronsa: ping
19:02Bronsadnolen: pong
19:02dnolenhttp://dev.clojure.org/jira/browse/CLJS-606
19:03Bronsaok I'll take a look
19:03dnolenBronsa: ^ 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:03dnolenBronsa: If I create a file from scratch I don't see this issue.
19:04TimMcnoonian: (-> foo.bar/baz quote namespace symbol) if you want to be a little naughty.
19:05noonian,(-> foo.bar/baz quote namespace symbol)
19:05clojurebotfoo.bar
19:06noonianheh, naughty because you might expect foo.bar/baz to be evaluated?
19:06TimMcYep.
19:06TimMcIt's a good reminder that -> is a structural transform, not comp. :-)
19:06noonianin my case, 'foo.bar/baz in provided by the plugin settings so its actually in a var
19:07bitemyapp,,,
19:07clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
19:07noonianand I need to quote it after, so doing (quote ~(-> my-var-var namespace symbol))
19:08Bronsadnolen: yeah, there's a bug on \r\n
19:08dnolenBronsa: k cool
19:09TimMc&((-> fact (fn [n] (if (zero? n) 1 (* (fact (dec n)) n)))) 5)
19:09lazybot⇒ 120
19:09dnolenBronsa: let me know when you cut a new release fixing that, I'll cut a corresponding CLJS release
19:10nooniani tried ~(-> my-var-var namespace symbol quote) first but that not what you want
19:10Bronsadnolen: ok
19:12rasmustohow do I "reset" a previously memoized function?
19:13noonianmemoize the original function again?
19:13rasmustonoonian: ah, that's what I thought. I had a problem elsewhere that was confusing me
19:26Bronsadnolen: ok pushed a fix -- tested with core.cljs and it reports the correct line number now
19:26Bronsareleasing 0.7.9 now
19:27Bronsa*hello.cljs
19:34TimMcpomegranate 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:35TimMcI haven't looked into this deeply, so maybe it's only an issue with some libs, but I'm 0/2.
19:36hiredmanwhat kind of classloader environment are you in?
19:37TimMclein repl
19:37bitemyappTimMc: use Alembic.
19:37TimMcClojure 1.4.0, lein 2.3.2
19:37hiredmanhuh
19:37bitemyappTimMc: [alembic "0.2.0"] (require '[alembic.still :as alembic]) (alembic/load-project) or (alembic/distill '[org.clojure/tools.logging "0.2.0"])
19:38bitemyappload-project just loads the project.clj, whatever that is, if one is available. Otherwise use distill.
19:38bitemyappWhy use Alembic? because it actually works. (for me anyway, pomegranate breaks for me sometimes)
19:39hiredmanhttps://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:39TimMcThanks, I'll try this out.
19:42hiredmanwell, I guess I have never used it with a more current version of pomegranate, I always just use 0.0.13
19:45technomancyTimMc: pomegranate has an optional :add-classpath arg IIRC
19:45technomancydefault is to fetch
19:55tieTYT2hi, 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:55tieTYT2if this were OOP, I think the decorator pattern would be the way to go
19:56tieTYT2not sure how to translate that into FP
19:58noprompttieTYT2: i think you want a protocol.
19:59bitemyapptieTYT2: I think you want a multimethod.
19:59tieTYT2how would I use either of those to combine effects?
20:00noprompttieTYT2: how long have you been programming in clj?
20:01tieTYT2few months, but not recently
20:01AimHeretieTYT2, this looks like part of what the component-entity-system architecture does.
20:02tieTYT2yeah
20:02mheldif I tell you that I'm working on a product that's "Air traffic control for cargo" -- what do we do?
20:02AimHereThe 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:03nopromptbitemyapp: or that too.
20:06AimHeretieTYT2, 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:06mlb-I have coworkers learning clojure. Is there a reason they should use a let block rather than many def's?
20:07hiredmanmlb-: they are completely different
20:07coventryThere'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:07hiredmandef creates globally visible vars, let is locally scoped
20:08hiredmanusing (define ...) in a function body creating locals names is something scheme does that clojure does not
20:08mlb-hiredman: so.. at the very least, an obvious reason would be that the code wouldn't be thread safe?
20:08hiredmanat the very least
20:09hiredmanyou are not using lexical scoping anymore if you use def
20:09AimHereThere's also the case of just not wanting your little loop iteration variables polluting other namespaces
20:09technomancymlb-: it's tempting to use let, but it gets in the way of debugging IMO
20:10hiredmanif you are at the top level the rule of thumb is use def
20:10muhoo$latest pomegranate
20:10lazybotNo project by this name exists on clojars.
20:11technomancyalso: let means putting defs in a nonzero column, and that's just weeeeeird
20:12coventryGah, the dash/undescore//clojure/java dichotomy, it buuurns...
20:13technomancycoventry: solution: never put a dash in a namespace name
20:14coventryTrying to make a general tool, though.
20:14technomancyI recommend angry emails sent to early hotspot engineers?
20:14technomancyIMO it's silly that clojure can't do the transform for you
20:14tsantosWhat'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:15technomancyyou'd have a mismatch between .class files and .clj files, which would be 700% less annoying
20:15mlb-technomancy: if def creates global variables, then what's an alternative to using let? How does let interfere with debugging?
20:15AimHeretsantos, you mean partition it into two groups or partition it into groups of four or what?
20:15Raynes&(split-at 4 [:a :b :c :d :e :f :g :h])
20:15lazybot⇒ [(:a :b :c :d) (:e :f :g :h)]
20:15tsantosgroups of 4
20:15Raynes&(partition 4 [:a :b :c :d :e :f :g :h])
20:15lazybot⇒ ((:a :b :c :d) (:e :f :g :h))
20:15Raynestsantos: ^
20:16AimHerePartition-all if you need to keep the remainder
20:16Bronsaand mapv vec if you want to get back a vector of vectors.
20:16technomancymlb-: 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:16tsantossplit-at! Nice. thanks
20:16Raynestsantos: You want partition if there are more than two groups.
20:16RaynesSee my second example.
20:17hiredmanmlb-: he is talking about lets at the top level (let [a 1] (defn f [] a)) vs. (def a 1) (defn f [] a)
20:17tsantosAh, ok. partition is what I need then.
20:17mlb-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:17technomancyoh, def *inside* a function body then?
20:17hiredmanthat is really bad
20:17technomancy~guards
20:17clojurebotSEIZE HIM!
20:18mlb-yes, inside function bodies
20:19TimMctechnomancy: The pomegranate docs don't mention add-classpath.
20:19AimHeremlb-, don't do that, unless you really really have to
20:19technomancyno, even if you really really have to, still don't
20:19mlb-AimHere: haha, no worries. I like my lexical scope. I'm just trying to help my coworkers transition form C/JavaScript...
20:20mlb-s/form/from/
20:20AimHereI think defs inside macros are less unacceptable, depending on what you're up to
20:20mlb-unhygenic macros make me :(
20:21AimHereWell I was thinking of macros sugaring up the process of def'ing or defn'ing things
20:21coventryAimHere: defs inside macros are all through the clojure source code.
20:21technomancyAimHere: oh yeah, sure--as long as it emits non-runtime defs
20:22eggheadunhygenic macros = macros w/ dynamic scope? :p
20:22mlb-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:23technomancymlb-: when-let is a good start
20:24bitemyappmlb-: 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:24technomancyit 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:24bitemyappmlb-: if you follow the latter path far enough, you'll have a handy-dandy maybe monad!
20:27coventrymlb-: I wouldn't call it idiomatic, but synthread has tools for that.
20:28mlb-hmmm. I've been considering advocating the use of the -?> macro
20:29llasramIs that the old name of `some->` ?
20:30mlb-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:30bitemyappmlb-: 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:31bitemyappClojure is a nice enough language that you certainly don't need monads most of the time.
20:31mlb-Yes, I've noticed that =]
20:31bitemyappExcessive monad use is the refuge of scoundrels and academics.
20:32eggheadmonads aren't too uncommon, calling them by that name is tho :p
20:32eggheadyou don't look at your list comprehension and say 'my monad'
20:32mlb-$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:32bitemyappegghead: well, the distinction is implicit vs. explicit monads.
20:33llasramI 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:33bitemyappmlb-: I usually use function decoration and Timbre for what you're talking about.
20:33bitemyappmlb-: if I need logging 'in media res' I just explicitly call the logger.
20:33bitemyappllasram: getting closer to an Error Monad >:)
20:33technomancyalso: maybe would be super useful even without treating it monadically
20:33bitemyappmaybe->
20:34coventryI'm still looking for an example of a computation whose expression is clarified by the monad abstraction.
20:34bitemyapperror-> with a [nil "Error message"] or [value nil] result
20:34bitemyappcoventry: monads are primarily about making the nature of the computation explicit rather than implicit.
20:34bitemyappHow "clear" that is depends on fluency with monads and how well the monad maps to the problem it is modelling.
20:35coventryThat's just an argument from authority.
20:35bitemyappA lot of the Prismatic and Pedestal "graph" stuff is basically crazy Continutation monads.
20:35bitemyappContinuation*
20:35bitemyappcoventry: would it comfort you to know that I chose Clojure over Haskell, despite achieving relative fluency? I really wouldn't worry about it.
20:36mlb-bitemyapp: function decoration? I've found timbre and have started using it, but what's function decoration?
20:36bitemyappI 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:36bitemyappmlb-: wrapping functions
20:37bitemyapp(defn log-wrapper [fn & args] (t/trace "fn " fn " was called with " args) (apply fn args))
20:37bitemyappRoughly that.
20:37bitemyappA lot of ways to skin that particular cat.
20:40coventryHow does knowing monads make you a better programmer? I know monads, and I don't think it's improved my programming.
20:40bitemyappcoventry: makes computational patterns explicit, removes the false appearance of a problem being a special snowflake
20:40technomancyyou can read a lot more excited haskell blogs
20:41bitemyapplets 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:42coventryI 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:43AimHereEven 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:45coventry(I'd love to see one.)
20:45technomancyAimHere: http://wondermark.com/481/
20:46mlb-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:49bitemyappcoventry: monads are abstractions specific to computation
20:50bitemyapptechnomancy: you are way too good at that.
20:51technomancybitemyapp: I practice every day
20:51bitemyappcue 80s montage of technomancy drinking coffee and flipping through webcomics in an Emacs RSS reader
20:51hiredmanhttp://www.youtube.com/watch?v=8zC2lWjpiH8
20:53hiredmanI meant to imply that technomancy is the karate kid, but now I just weired out by this non-english dub
20:53hiredmanI am
20:54technomancyhttp://wondermark.com/756/
21:16muhoo,(map (juxt type identity) (let [x 1] `[~x x 'x '~x ~'x]))
21:16clojurebot([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:16muhoowhy a cons?
21:17bitemyappmuhoo: Lisp lists are made of cons cells.
21:17bitemyappI feel like a jackass for saying it, but I don't know what else you want.
21:17Bronsabitemyapp: I guess he was wondering why not PersistentList
21:18muhoono, why is 'x a cons?
21:18bitemyappJust Cons cells rather than PersistentList because it's simpler? Code doesn
21:18muhoooh, i see. it's not 'x, it's sugar for (quote x)
21:18muhoo'(quote x) actually
21:19bitemyappno, just (quote x)
21:19gdev'(quote x) => (quote (quote x))
21:19muhooindeed, i see,
21:19seangroveYo dawg, heard you like quote...
21:20muhoowhich is stupidly obvious now that i think about it
21:20bitemyappmuhoo: everybody goes through these little moments of ?_?
21:20bitemyappespecially anything involving indirection.
21:20muhooi go through them repeatedly, in a great big circle
21:20coventry@f == (deref f)
21:20muhoothen i go back through them again
21:20bitemyappmuhoo: 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:21coventryAnd the reader does not put position metadata on these two expansions.
21:21muhoooh, datomic stuff? i tend to (into {} ) the datums
21:21gdevrectum? damned near killed em
21:21muhoobecause java objects are ugly
21:21muhoogdev: that's the best punchline ever. doesnt' even need a jke
21:21muhoojoke
21:21muhoojust a free-floating punchline.
21:22mlb-How might I write the following to be more idiomatic clojure? https://gist.github.com/mlb-/6927986
21:22bitemyappmuhoo: I'm writing a migration for Datomic. Using the log API
21:22bitemyappmuhoo: I just got done writing the query to translate the damned entity ids for the attributes to keywords.
21:22muhooi just put that shit into {}'s so i can (:e foo) etc
21:22bitemyapphaving to check the attribute to know the type is pretty annoying.
21:23bitemyappmuhoo: it's not that simple, the log doesn't inline the keywords for attributes. They're already List[map]
21:23muhoono the (:a's ) are numbers
21:23bitemyappI know
21:23muhooyou have to look up the keyword of them
21:23bitemyappthat's my point
21:24bitemyappthat's why I'm irritated :)
21:24muhooi did this recently, it was annoying, but abstractable
21:24bitemyappit is, but I'm still annoyed.
21:24muhooi think i wrote somethign to "here, make me not want to kill you"
21:24bitemyappI want to turn my pain into a library after I'm done.
21:24muhooeveryone who uses datomic does that :-)
21:24coventrymlb-: What is that (defn filestring) doing in there? Does the code function?
21:24muhoothere are like as many libraries of datomic utility functions as there are datomic users
21:25muhoooften complete duplication of code too
21:25muhooit's kinda crazy actually
21:25bitemyappmuhoo: that's why I'm writing the library, it's insane how much copy-pasta happens with Datomic client code.
21:25bitemyapp*insane*
21:26mlb-coventry: ah, my bad, that should be a def. I was trying to simplify the cruft in what I've to work with.
21:26bitemyappmuhoo: 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:27muhooexample: 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:27seangrovebitemyapp: Drinks sometime this month in exchange for your thoughts on datomic
21:28bitemyappseangrove: sooner is better than later. When are you avail?
21:28bitemyappmuhoo: yes, but I think the motherlode is in Stuart Halloway's sock drawer.
21:28muhoowhen you hire relevance to consult, you get that code as part of the deliverable :-)
21:29muhooit's not open source
21:29bitemyappActually I wouldn't be surprised, I talked to a guy that hired Cognitect/Relevance recently.
21:29seangrovebitemyapp: Wednesday?
21:29RaynesThat was yesterday.
21:29bitemyappseangrove: Sure. 6pm? Where?
21:29muhoolook, everybody's gotta eat somehow.
21:29RaynesHe does not possess a time machine.
21:30bitemyapp(clj-time.core/plus (clj-time.core/today) (clj-time.core/days 6))
21:30bitemyappRaynes: ^^
21:30muhoohaha
21:30seangroveRaynes: It has sufficed.
21:31bitemyappseangrove: you had to schlep into my neck of the woods last time. Is there a place near you?
21:31bitemyappseangrove: I feel like you owe me for the pseudo-interview of the contractor though :P
21:32seangrovebitemyapp: Nothin' doin', you got a free attempt at pseudo-interviewing
21:32seangroveGoing to bring in a homeless tramp for the next round
21:32uvtcindigo: 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:33seangrovebitemyapp: Let's do somewhere nicer than LL though. Nihon Whiskey Lounge?
21:33bitemyappoh cool, a legitimate use of juxt.
21:34bitemyappseangrove: sounds like my kind of place. Weds 6 pm NWL it is :)
21:34seangrovebitemyapp: Done.
21:38seangrovetechnomancy: Met someone who idolized you last night
21:39seangroveYou're quite famous amongst the people who know you, it seems
21:41gdevI've never heard of anyone being famous among people that didn't know who they were
21:41muhoophil is legit
21:44technomancyseangrove: heh, weird
21:44bitemyappNot that surprising to me. technomancy wrote my favorite project...tool-dependency-jobber-thingy. That alone is worthy of praise.
21:44bitemyappNo flaming hair!
21:45bitemyappLook at how many years it took for Common Lispers to get quicklisp. They're still just downloading stuff and clobbering a shared path.
21:46bitemyappAt that rate, it'll be another 20-30 years before they get something like Leiningen.
21:46seangrovebitemyapp: What, asdf didn't do it for you?
21:46TEttingertechnomancy is the karma king
21:46bitemyappseangrove: *gag gag gag*
21:46TEttinger$karma technomancy
21:46lazybottechnomancy has karma 83.
21:46seangroveQuicklisp was quite nice though
21:46TEttinger$karma TEttinger
21:46lazybotTEttinger has karma 5.
21:46technomancyI couldn't even figure out what asdf was supposed to be for
21:46seangroveJust nothing like lein...
21:46technomancyit's like dependency injection
21:47technomancyyou can read the description over and over again, and it imparts no new knowledge
21:47bitemyappit's just a build system.
21:47bitemyappI ended up doing my CL builds with manually managed dependencies in the source path and Makefiles.
21:48bitemyappI might use Quicklisp these days though.
21:50indigouvtc: No problem :)
22:00nightflybeing able to build on top of maven kind of gave lein a serious advantage
22:03wafhi, 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:04wafthat line is trying to call this CLR method: http://msdn.microsoft.com/en-us/library/x53bfh67.aspx
22:04wafbut that's throwing the error "System.MissingMemberException: Member 'MD5.Create' not found."
22:57jared314On clojars, what is the promotion section on the your own lib's clojars page for?
23:06technomancyjared314: it's a work in progress; eventually it will be a way to get artifacts into a separate repo that ensures certain standards
23:07jared314technomancy: ok, because right now it just tells me it can't verify the signature
23:07jared314technomancy: but i have a public key
23:08xeqijared314: I should sign it sometime
23:09technomancyjared314: a pgp key in your clojars profile?
23:09jared314just an ssh key
23:09m00nlightDoes anyone use clojure to read a hdfs's file?
23:10technomancyjared314: gotcha; verifying signatures requires your clojars profile contain your pgp pubkey that was used during deployment
23:10jared314technomancy: ok, that makes more sense. thank you
23:10technomancyas 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:13ddellacostaxeqi: 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:17xeqiddellacosta: for cljs stuff I've been using https://github.com/cemerick/austin to get initially setup
23:17xeqihttps://github.com/cemerick/austin/tree/master/browser-connected-repl-sample is a sample project that is similar to what I use
23:18xeqiso with that, I can start nrepl, run a server, and then start a brepl with the instructions in the readme
23:18xeqi* start a brepl in the nrepl session, effectively making emacs able to send cljs to the browser
23:19xeqiso C-c C-k will send a cljs file and it gets compiled through piggieback (which was setup right by austin)
23:20xeqiand using something like https://github.com/cemerick/clojurescript.test will allow writing tests and then invoking them in the brepl using `test-ns`
23:21taliosstrange, I think I just found a clojure bug - "(deftype open-wave .....)" generates a .class file open-wave.class, not open_wave.class
23:23coventryHuh. (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:30bitemyappcoventry: still doing perverse things wtih namespaces? :)
23:35technomancycoventry: ns is hard-coded in a bunch of places, presumably so you never get stuck in a broken namespace with no way out
23:35coventrybitemyapp: Yep. It's a good test of code-walking/transformation. I've found tons of bugs.
23:36coventrytechnomancy: Yeah, it's definitely a sensible special case.
23:36coventryThe bit about "No, you don't even get to be a macro" is a bit shocking, though.
23:37technomancyyeah, that's nuts
23:37technomancyit 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:38technomancysince ns clauses aren't limited to just require/use/refer/import etc
23:58ddellacostaxeqi: sorry I didn't respond sooner. Thank you so much!