#clojure log - Oct 23 2013

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

0:08 cddr: In the guide for the clojurescript repl, it says "open the html page by going to http://localhost:9000". That seems like you need a server to serve an html page but later on in the docs, it implies that the repl code uses an iframe to work around the browser's cross-domain policy. Which is correct?

0:08 https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments

0:16 xeqi: cddr: both

0:17 browsers don't run javascript from local files

0:18 so a http server is required, and it does some iframe stuff to talk to the repl server on another port

0:28 coventry: bhenry: I would try printlns on either side of the read-string. If they both succeed, the ring-is-swallowing-your-exception theory is wrong.

0:33 bhenry: Never mind, that doesn't apply to your new code.

1:01 Irkalla: So, I'm looking for an easy to use IDE with -modern- standards

1:01 Also hello, clojure :v

1:02 Fact of the matter is, I basically have to re-learn what an interface is to make effective use of emacs

1:02 I'm just not a fan

1:02 technomancy: too late; we've moved on to postmodern IDEs

1:02 dripping with existential angst in every key binding

1:02 * Raynes highfives technomancy

1:03 technomancy: Raynes: M-x explore-futility-of-all-creative-endeavour

1:04 Irkalla: But

1:04 technomancy

1:04 your postmodern IDEs are pretty meaningless

1:04 xuser: :h theRightWay

1:05 technomancy: Irkalla: Emacs invites the user to find their own meaning through bringing their unique experiences to the text

1:06 it's presumptive to say that the author of any given program is the final authority on what that program means

1:06 (hm; I didn't expect this metaphor to actually work)

1:07 Irkalla: Can we stop with postmodernism now? :V

1:07 AndChat|367796: "There is nothing but the text" - technomancy on postmodernism c. 20131022T2130:44

1:08 Irkalla: The way they use their jargon instead of coming out and saying what they mean bothers me

1:08 technomancy: ~rectification of names

1:08 clojurebot: No entiendo

1:08 technomancy: =(

1:09 clojurebot: 正名

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

1:09 technomancy: aw come on

1:09 Irkalla: I've actually never really used IDE's

1:09 technomancy: clojurebot: do I have to spell everything out for you?

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

1:10 Irkalla: The first one I actually used was visual studio and it's the only I've ever used

1:10 I'm used to just using n++ and then running stuff.

1:10 Also I'm extremely new to clojure

1:11 So I have no idea how utilizing it works

1:11 technomancy: clojurebot: 正名 is <reply>If language is not correct, then what is said is not what is meant; if what is said is not what is meant, then what must be done remains undone; if this remains undone, morals and art will deteriorate; if justice goes astray, the people will stand about in helpless confusion. Hence there must be no arbitrariness in what is said. This matters above everything.

1:11 clojurebot: Ok.

1:11 technomancy: clojurebot: rectification of names is 正名

1:11 clojurebot: Roger.

1:11 Irkalla: clojurebot, inventory

1:11 clojurebot: Cool story bro.

1:11 Irkalla: wow give clojurebot an inventory

1:11 0/10 worst bot ever

1:12 technomancy: Irkalla: so what you want is something familiar

1:12 Irkalla: I think so

1:12 familiar keyboard shortcuts at least

1:12 afaik emacs predates a lot of the standards I'm familiar with

1:13 technomancy: so if you're already pretty handy with some existing editor you should stick with that

1:13 and just send code to Clojure with `lein repl`

1:13 if you're not, maybe counterclockwise would be up your alley

1:14 hrm; I wonder if my factoid got truncated

1:14 clojurebot: rectification of names?

1:14 clojurebot: rectification of names is 正名

1:15 technomancy: inference is hard

1:15 clojurebot: what is 正名?

1:15 clojurebot: Pardon?

1:15 technomancy: uuuugh

1:15 ~正名?

1:15 clojurebot: If language is not correct, then what is said is not what is meant; if what is said is not what is meant, then what must be done remains undone; if this remains undone, morals and art will deteriorate; if justice goes astray, the people will stand about in helpless confusion. Hence there must be no arbitrariness in what is said. This matters above everything.

1:15 technomancy: there we go

1:15 ~botsnack

1:15 clojurebot: Thanks! Can I have chocolate next time

1:16 technomancy: but RELUCTANTLY

1:17 m00nlight: how can I get all keys in a hash-map in a simple way?

1:17 technomancy: clojurebot: inventory is <reply> I am carrying 0) a poorly-calibrated inference engine, currently leaking 1) a well-worn copy of clojure 1.2 tucked deep away inside a classloader 2) the last shreds of what was once my sanity

1:17 clojurebot: Ik begrijp

1:18 technomancy: clojurebot: inventory?

1:18 clojurebot: I am carrying 0) a poorly-calibrated inference engine, currently leaking 1) a well-worn copy of clojure 1.2 tucked deep away inside a classloader 2) the last shreds of what was once my sanity

1:19 jared314: ,(keys {:a 1 :b 2})

1:19 clojurebot: (:a :b)

2:55 logic_prog: Is there a way with lein to run "lein repl :headless" and "lein cljsbuild auto" with one command uwing lein trampoline?

3:15 ta479: confuciusbot

3:27 ambrosebs: is js-obj used often in Clojurescript?

3:28 ddellacosta: ambrosebs: I use it a fair amount, especially when passing arguments to JS libs (especially Google Closure libs)

3:28 ambrosebs: I think it's unavoidable if you are doing a lot of inter-op

3:29 logic_prog: is there a way to tell "lein cljsbuild auto" to also load up main.clj?

3:29 ambrosebs: ddellacosta: I'm still learning the object system in Javascript so you'll have to bear with me.

3:29 ddellacosta: do you use it to build named objects like HTMLElement?

3:29 ddellacosta: ambrosebs: not at all! Anything I can help with just ask.

3:30 ambrosebs: no, for that you'll usually call a function.

3:30 ambrosebs: like, (HTMLElement .) (or whatever the args are, dunno)

3:31 ambrosebs: ddellacosta: ok.

3:31 ddellacosta: ambrosebs: it is probably more helpful to think of a JS obj, in some ways, as an associative array.

3:32 bitemyapp: ambrosebs: arrays in JS are objects (hash-maps) indexed by integers.

3:33 ambrosebs: ddellacosta: how does `type` work? what's the difference between something created with HTMLElement. and a js-obj that has the same shape?

3:33 ddellacosta: ambrosebs: CLJS's type uses JS's typeof, I'm pretty sure... https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof

3:34 (let me confirm for you, unless someone else knows for sure)

3:35 bitemyapp: (defn type [x]

3:35 (when-not (nil? x)

3:35 (.-constructor x)))

3:35 sorry for the spam.

3:35 ambrosebs: ^^

3:35 ddellacosta: ambrosebs: huh, no, looks like it uses the .-constructor property

3:35 bitemyapp: the constructor is the JS object prototype.

3:35 ddellacosta: ah, right, what bitemyapp says

3:36 ambrosebs: makes sense

3:36 ddellacosta: what I'm curious about now is what the connection between typeof and constructor are...hmm

3:36 * ddellacosta peers down the rabbit hole

3:36 ambrosebs: typeof doesn't seem very useful compared to -constructor

3:37 bitemyapp: ambrosebs: an example here would be: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype

3:37 ddellacosta: I could swear, actually, at some point in the past I looked at the CLJS code and it was using typeof, but I could be misremembering

3:38 but, now that I think of it, from time memorial when calling type in the CLJS console, I would get back a constructor function, so I must be wrong. Hmm.

3:39 ambrosebs: bitemyapp: ok thanks.

3:39 so is js/Array the prototype of Array?

3:39 bitemyapp: ambrosebs: god I hope so.

3:39 if not, that's going to break a lot of code for people :)

3:39 ddellacosta: ambrosebs: yes

3:39 haha

3:40 ambrosebs: :)

3:40 bitemyapp: ambrosebs: new Array(); is ostensibly calling Array.prototype.constructor

3:41 new Object() => Object.prototype.constructor, etc etc

3:41 ambrosebs: the tricksy part here is that this stuff isn't static like Java classes, people can mutate the prototypes at runtime.

3:41 so you can do Ruby style monkey patching and all kinds of stuff if you want to.

3:42 not with precisely the same semantics though

3:42 ambrosebs: bitemyapp: right. Is that usually avoided?

3:43 bitemyapp: ambrosebs: by sane people, yes, but a prototype that gets mutated affects everything created from its constructor, even objects created before the prototype was changed because it's reference semantics.

3:43 ambrosebs: ok

3:44 Is that something we need to worry about in CLJS?

3:44 bitemyapp: ambrosebs: since I assume we're talking about core.typed's clojurescript support, I would be comfortable saying that trying to accommodate the sort of people that do things like that in a static type system is probably not worthwhile.

3:44 probably not, but I don't know how protocols and multimethods are implemented in CLJS atm.

3:44 but if we continue this conversation, I might find out.

3:45 ambrosebs: I'm only really interested in modelling a "sane" usage of clojurescript

3:45 bitemyapp: ambrosebs: I think this is reasonable and a good idea.

3:45 ambrosebs: if you want to completely break everything, all bets are off anyway it seems

3:45 bitemyapp: ambrosebs: dude, you can mutate and replace the "undefined" object.

3:46 ambrosebs: god

3:46 bitemyapp: you can't actually use the undefined object safely for boolean checks, you have to *generate* it from void(0) to get a value that couldn't have been mutated.

3:46 ambrosebs: I can ignore that in Clojurescript though right?

3:46 bitemyapp: please do.

3:46 SegFaultAX: That's why you'll see a lot of modules of the form (function(a,b,c,undefined) {})(1,2,3)

3:47 bitemyapp: no reason to do that, just use void(0)

3:47 SegFaultAX: That way you have a stable value of undefined to work woith.

3:47 bitemyapp: or is void 0? either way. you get my meaning.

3:47 SegFaultAX: It's a common module pattern.

3:47 bitemyapp: the void constructor offends people that much?

3:48 ambrosebs is now regretting having committed to core.typed cljs support, we should stop scaring him with horror stories :)

3:48 ddellacosta: haha

3:48 SegFaultAX: No? It's just easier that way.

3:48 bitemyapp: I was talking about core.typed at the Clojure Dojo today, exciting stuff.

3:48 I actually find JavaScript's many depths of horribleness morbidly fascinating.

3:49 I should've gone to med school and become a pathologist.

3:49 ddellacosta: I think the reality is that there are a lot of different patterns in JS, depending on whether you want to try some sort of "Classical OO," use the prototypal constructs JS has by default, try something more functional, or just..."willy-nilly style"

3:49 bitemyapp: SegFaultAX: btw, RethinkDB client for Clojure coming very very soon.

3:49 query API is already like 80% done.

3:49 ddellacosta: I've seen all kinds of stuff in JS so not sure what is "standard"

3:49 bitemyapp: ambrosebs: the straight-forward way to handle

3:49 SegFaultAX: I'm careful not to use the word "standard" in js, since it isn't a thing.

3:50 Just common.

3:50 clojurebot: Cool story bro.

3:50 ddellacosta: SegFaultAX: yeah, fair enough

3:50 bitemyapp: "prototypes as type definitions" would be to rely on a classical pattern that is assumed static and if they write code that smashes it at runtime, then they're off reservation.

3:50 it seems fairly straightforward that people could annotate the fact that they extended a prototype as well.

3:51 ambrosebs: bitemyapp: right. treating javascript objects like class instances seems easy enough.

3:51 bitemyapp: although that'll happen at runtime anyway.

3:52 SegFaultAX: ambrosebs: Frankly I wouldn't waste too much time on it. You absolutely cannot and will not be able to cover even the majority of cases here. People/libraries frequently patch and improve the standard library.

3:52 ddellacosta: agreed

3:52 bitemyapp: Array.prototype.maybeMonad = function(trololol...) {...}

3:52 Hell is other people's JavaScript.

3:52 SegFaultAX: Furthermore js doesn't do any validation whatsoever around matching, for example, the number of arguments given vs number of parameters.

3:53 So for example (function() { ... })(1,2,3) is perfectly valid (and common)

3:53 ddellacosta: bitemyapp: haha

3:53 ambrosebs: I'm most interested in harvesting the DOM and Closure specs to give basic type checking for interop.

3:54 I'm definitely not jumping down the rabbit hole of js semantics :)

3:54 I just don't know them very well yet

3:54 SegFaultAX: ambrosebs: I would say only focus on the cljs side for now. You'll go insane if you try to extend that over js itself.

3:54 bitemyapp: ambrosebs: it would have to be a union of all the different DOM implementations though right?

3:54 ddellacosta: ambrosebs: DOM is a problem, as different browsers have different implementations, not sure how you would handle that

3:54 bitemyapp: right, what ddellacosta said.

3:55 ddellacosta: yeah. :-(

3:55 ambrosebs: the cljs side easily leverages most of the current core.typed infrastructure

3:55 bitemyapp: for example "click" for addEventListener on Chrome is "onclick" and attachEvent in Internet Explorer.

3:55 ddellacosta: jQuery codebase is a good place to look to see what kind of hoops must be jumped through to get DOM consistency. Same with google closure, for that matter

3:55 ambrosebs: interop is the different bit for CLJS

3:55 ddellacosta: bitemyapp: yeah, the Event stuff in particular is hairy

3:56 bitemyapp: ddellacosta: I don't think the type system has to care that much though, right?

3:56 the type system just needs Number, String, Array, Object, null, undefined, function (arity)

3:56 ddellacosta: bitemyapp: yeah, I think you're absolutely right

3:56 ambrosebs: So the DOM spec doesn't help with cross-browser things?

3:56 bitemyapp: and it just needs to know when an object matches a particular "spec"

3:57 ddellacosta: ambrosebs: the problem is each vendor implements what they feel like

3:57 bitemyapp: ambrosebs: lowest common denominator that not everybody implements.

3:57 ddellacosta: ambrosebs: short answer, sadly, no. :-(

3:57 bitemyapp: IE took awhile to implement addEventListener. Now they have like three different APIs for the same thing with different names for the same events.

3:57 tl;dr this is why I prefer backend.

3:57 * ddellacosta starts shivering hearing bitemyapp talk about IE event handling

3:58 bitemyapp: I'll take my ivory tower of Clojure and Datomic over being in the trenches with JavaScript.

3:58 with trench foot. and bad coffee. and cursing british soldiers.

3:58 ddellacosta: bitemyapp: sadly, I can't avoid it...but CLJS definitely makes things nicer to deal with. Doesn't hide the horrors, but lets you ignore them until you can't avoid them any more.

3:58 bitemyapp: ddellacosta: don't forget, IE doesn't implement event capture!

3:58 SegFaultAX: The ecmascript spec is more of what you might call a guideline.

3:58 bitemyapp: so if you need capture...you're simply fucked!

3:58 SegFaultAX: said like a real pirate.

3:58 ddellacosta: bitemyapp: NOT LISTENING NANANA CAN'T HEAR YOU

3:59 bitemyapp: this was a good night for going to bed with beer.

3:59 * ddellacosta goes and hides in the closet

3:59 bitemyapp: ambrosebs: you should ask questions in here more often, this is fun.

3:59 ddellacosta: hahaa

3:59 ambrosebs: :)

3:59 ddellacosta: man, I want a beer, but I got to do some work. In CLJS now that you mention it.

3:59 bitemyapp: double-fist beer and a mug of coffee.

3:59 or tea. Best way to code.

4:00 ddellacosta: nice. :-)

4:00 bitemyapp: SegFaultAX: Clojure Dojo was fun tonight, you missed out.

4:00 ddellacosta: I'll consider it.

4:00 SegFaultAX: I was at Ansible Fest.

4:00 bitemyapp: we refactored the Gilded Rose problem

4:00 ddellacosta: lucky bastards, with your so-called "community"

4:00 bitemyapp: I'm going to finish debugging mine then move onto getting the RethinkDB client driver releasable.

4:00 yay server-side yay

4:01 ddellacosta: I'm luckier still for doing mostly backend lately :P

4:01 I ran screaming from web when the data warehouse project popped onto my radar.

4:01 ddellacosta: bitemyapp: yes, you are. Actually, I can't complain since I just spent a week writing a mini-query language using Instaparse and propositional logic. SUPER fun.

4:01 bitemyapp: ddellacosta: I AM SO JELLY

4:02 ddellacosta: bitemyapp: it was pretty fucking awesome. I love Instaparse like, so much. :-D

4:02 bitemyapp: ddellacosta: I'm considering writing a mini-query language for wrapping Datalog for the data warehouse, but haven't gotten around to it. That sounds SO cool.

4:02 ddellacosta: god I want to do something, anything, with Instaparse so badly.

4:02 you know what I *could* do?

4:02 ddellacosta: bitemyapp: yeah, I was stoked to have an excuse to use it.

4:02 bitemyapp: I could be an asshole and write a SQL wrapper for RethinkDB. lol.

4:03 equally fun would be a datalog interface to RethinkDB.

4:03 ddellacosta: bitemyapp: oh, that would be nifty.

4:03 not that I know much about rethinkDB

4:03 bitemyapp: I should just make datalog wrappers for everything on the planet.

4:03 ddellacosta: hahaha

4:04 bitemyapp: I'm only half joking.

4:04 ddellacosta: RethinkDB is like MongoDB, except implemented by serious, honest, competent people.

4:04 also, head of the company is a fellow ex-Common-Lisper.

4:04 ddellacosta: bitemyapp: oh, wow, I will take a look then.

4:04 bitemyapp: so, he's part of the Common Lisp illuminati we don't talk about among muggles.

4:04 ddellacosta: hahaha

4:05 alright, I hate to cut it short, but I really do have to get back to work...fixing CLJS front-ends.

4:05 bitemyapp: ddellacosta: rethinkdb, notably, has a real clustering stack with nice sharding and replication (sync and async).

4:05 ddellacosta: cheers, good luck with the work. :)

4:05 SegFaultAX: how was the ansible stuff?

4:05 ddellacosta: bitemyapp: talk soon. Cheers. :-)

4:05 bitemyapp: SegFaultAX: anything exciting?

4:05 ambrosebs: the most common feedback on nathanic's (awesome) core.typed post seems to be concern about the large ugly types for "second" and "map". Complicated semantics call for complicated types, plus you'd never write anything like that yourself.

4:07 bitemyapp: ambrosebs: the spec is partly that complicated because it's trying to be smart and break out the cases beyond the (Option x) anyway, right?

4:07 so it's being more specific/smart than what the equivalent Haskell type would be.

4:08 ambrosebs: right, a less useful type would be (All [x] [(NilableSeqable x) -> (U nil x)])

4:09 bitemyapp: the equivalent Haskell would be either [a] -> a or [a] -> Maybe a, but it's not being nearly as specific about what's going on is the latter type is isomorphic with (Seqable x) -> (Option x)

4:09 Not sure why the Seqable is wrapped in an Option.

4:09 ambrosebs: ,(second nil)

4:09 clojurebot: nil

4:09 bitemyapp: ambrosebs: right. I think that aspect of the type system is missed by people that haven't used something nicer.

4:09 ambrosebs: perhaps

4:10 bitemyapp: so, the Option around the Seqable is because you're not excluding anything Clojure generally allows.

4:10 that makes sense, given how much people like to bounce nils off the wall.

4:10 ambrosebs: well, not excluding common idioms

4:10 bitemyapp: to technomancy's eternal chagrin.

4:13 ambrosebs: what's an example of something browser-dependent that wouldn't type check if I was just going by the DOM spec?

4:13 a link would be appreciated also :)

4:15 bitemyapp: ambrosebs: addEventListener has different possible arities depending on what browser it is.

4:16 ambrosebs: it supports a final argument "wantsUntrusted" if it's a gecko/firefox browser.

4:16 https://developer.mozilla.org/en-US/docs/Web/API/EventTarget.addEventListener

4:16 ambrosebs: bitemyapp: thanks

4:17 bitemyapp: ambrosebs: this is why I asked if this would lead to a type spec that was roughly a "union" of what different vendors offer.

4:18 ambrosebs: bitemyapp: ah, I understand

4:18 I wonder how TypeScript deals with this

4:19 bitemyapp: ambrosebs: http://typescript.codeplex.com/SourceControl/changeset/view/fe3bc0bfce1f#bin/lib.d.ts

4:19 https://github.com/borisyankov/DefinitelyTyped

4:20 ambrosebs: bitemyapp: thx!

4:20 bitemyapp: attachEvent(event: string, listener: EventListener): bool;

4:20 declare function addEventListener(type: string, listener: EventListener, useCapture?: bool): void;

4:20 they choose to ignore the existence of the Mozilla variant.

4:21 but they recognize the existence of their bastard rendition of addEventListener.

4:21 the point of Mozilla's fourth argument is so you can distinguish between events emitted by typical browser DOM events versus events that might've been faked or emitted by custom JS code.

4:21 IIRC

4:22 * ucb waves

4:22 bitemyapp: ucb: hi!

4:22 notofi: Hi, can somebody explain this: http://pastebin.com/3RQZGWGL

4:22 ucb: bitemyapp: hey!

4:22 ambrosebs: I'm starting to think I should follow the DOM spec, then invite people to turn the type checker off for uglier things

4:23 bitemyapp: ucb: I'm complaining at ambrosebs about javascript :)

4:23 SegFaultAX: I hate our current managed hosting provider. Fucking dreadful...

4:23 bitemyapp: ambrosebs: I would tend to agree.

4:23 SegFaultAX: "10 minute site upgrade" == 2 hours of downtime and counting.

4:23 ucb: I think most of the world would agree

4:23 bitemyapp: with the hope that entropy is moving people towards, rather than away from, the DOM spec.

4:23 ucb: SegFaultAX: /D:\

4:23 ambrosebs: notofi: def is only for top levels

4:23 bitemyapp: SegFaultAX: can you say who?

4:23 ambrosebs: notofi: use let for locals

4:23 notofi: ambrosebs: Can you explain why Z is def'd ?

4:24 ucb: SegFaultAX: was it you whom I spoke to about graphite and things?

4:24 notofi: ambrosebs: I am aware that def is for top levels

4:24 SegFaultAX: ucb: Probably.

4:24 ambrosebs: notofi: it should only be used at the top level also

4:24 SegFaultAX: In fact yes, definitely.

4:25 ucb: SegFaultAX: cool. Have you heard/considered kairosdb as a relacement for carbon?

4:25 ambrosebs: notofi: the compiler does strange things otherwise

4:25 ucb: I'm currently pondering on that

4:25 SegFaultAX: No, I haven't. What do you like about it?

4:25 ambrosebs: notofi: basically the analyzer makes any vars during analysis

4:26 notofi: Z is created as an unbound var

4:26 notofi: ambrosebs: thx

4:26 ucb: bitemyapp: not your cup of tea probably, but this is what right now in my headphones: http://www.youtube.com/watch?v=dw1K823RHoQ

4:26 SegFaultAX: the promise of scalability mostly as well as the greener grass

4:26 SegFaultAX: bitemyapp: Peer1

4:27 bitemyapp: ucb: http://www.youtube.com/watch?v=x8UcffWuDG4

4:27 ucb: "Conifer" <- how nordic

4:27 enqueued

4:28 bitemyapp: ucb: http://www.youtube.com/watch?v=8vpE9XvPSzE

4:28 ucb: enqueued

4:28 bitemyapp: this MoR isn't bad, this would be good for driving.

4:28 nice vocals.

4:28 ucb: MoR is awesome

4:29 that particular album is A++++++

4:29 bitemyapp: ucb: what are your feelings on post-metal / post-punk / hardcorey stuff?

4:29 ucb: one of those rock bands where the mean age is ~50, they never "made it" despite being great, etc.

4:30 bitemyapp: I need examples to be able to comment. I stopped listening to "new music" in the 90s. I hate anything by metallica after their fourth album, same with Pantera and you can see where this is going.

4:30 * ucb curses mobile internet

4:30 bitemyapp: post-punk/hardcore isn't anything like the two bands you mentioned.

4:30 ucb: I know

4:31 I was just exemplifying how I hate new things

4:31 bitemyapp: ucb: most of the music I've sent you is after the 90s.

4:31 in particular, the blackgaze stuff I've been kicking over is usually quite new.

4:31 ucb: counter-example detected. Brain melt sequence initiated.

4:31 all beliefs challenged.

4:34 bitemyapp: in any case, give me a few band names as examples please?

4:35 bitemyapp: ho damn. post-punk and post-hardcore are both really hard to pin down. Shonen Knife, Gallows, Pallbearer, Letlive, Polar.

4:35 ucb: to offset the utter devastation of the first two songs I sent, here's some hyper-indie happy post-metal: https://soundcloud.com/mynameisjonjo/a-weekend-at-the-end-of

4:36 ucb: I've listened to Gallows. They were ok.

4:36 bitemyapp: k, Gallows is post-hardcore, to give you an idea of where they are in the rainbow.

4:36 ucb: oh, in other rock-related news, I saw Mark Lanegan live 2 weeks ago

4:36 bitemyapp: Post-punk is very eclectic though, anything from Joy Division to new-wave applies.

4:36 ucb: joy division is good in my book

4:37 The Editors were heading in the right direction before they cocked it up

4:37 Morgawr: since we're talking about music, I'll just do my advertising job and link this http://www.youtube.com/watch?v=WfiX7PHYKo4 :P It's from my own band, just dropping it here in case anybody likes it

4:37 * ucb checks

4:37 Morgawr: probably not your genre but still worth a try haha

4:38 bitemyapp: Morgawr: I love metal like this, thanks for sharing!

4:38 this reminds me of Sabaton and Forefather.

4:38 ucb: Morgawr: sounds good so far

4:38 Morgawr: bitemyapp: check out the whole EP if you feel like it, we only released one so far (and I had to leave the band unfortunately because I'm studying abroad now :( )

4:38 bitemyapp: Morgawr: what do you play?

4:38 Morgawr: lead guitar

4:39 ucb: bitemyapp: anyway, my comment about lanegan is that the support act were Sean&Zander. Had never heard of them before this gig, but they are pretty good: http://www.youtube.com/watch?v=DhxsTugRDVY

4:39 Morgawr: <3 this type of metal

4:39 Morgawr: ucb: <3 :D

4:39 ucb: Morgawr: is this Italian?

4:40 Morgawr: ucb: yeah, we're Italian

4:40 ucb: nice

4:40 bitemyapp: Morgawr: so awesome :)

4:40 Morgawr: we sing mostly in English with Italian parts in-between

4:40 (mostly for lyrical voice)

4:41 ucb: for lyrical awesome you mean

4:41 Morgawr: haha

4:41 bitemyapp: I love #clojure so much.

4:41 I just want to hug it to death.

4:41 but now I must sleep. G'night all :)

4:41 Morgawr: night :)

4:42 ucb: night bitemyapp

4:42 sorry I couldn't be more opinionated

4:43 ambrosebs: bitemyapp: night

5:07 mindbender1: why is ring.middleware.file-info/wrap-file-info and few others marked deprecated. What's next?

5:20 clgv: mindbender1: from the HISTORY.md I'd guess `file-response` might be the replacement mechanism

5:20 logic_prog: is there a nice way to store an object that is simultaneously a sexp and a file? i.e. I have a symbolic clojure expression. HOwever, I also want to remember what line / what column each character came from (and the preserving of white space + newlines)

5:21 clgv: logic_prog: from the second part I'd say just store clojure source. but the first question seems contradictory

6:54 t_hash: dn

8:46 maku__: Can anyone help me merge many vectors into one? (into [] []) works for two, but I would like to merge several.

8:48 AimHere: You could use (vec (concat ...)) or wrap a series of (into [] ) calls with reduce, or loop

8:48 If concatenating vectors is something you're doing a lot of, I'd consider using just a list instead, for performance reasons

8:51 maku__: AimHere: Thanks!

8:51 llasram: maku__: (reduce into [] other-vectors)

8:52 Morgawr: llasram: that only works if "other-vectors" is a sequence of vectors

8:52 llasram: Oh, you did mention `reduce`, AimHere

8:52 Morgawr: but yeah

8:52 llasram: Morgawr: That was the intended implication, yes :-)

8:52 Morgawr: just clarifying it :P

8:52 llasram: kk

8:53 Morgawr: although in that case you can just do

8:53 (flatten other-vectors)

8:53 llasram: NOOOOOOO

8:54 Morgawr: &(reduce into [] [[1 2 3] [4 5 6] [7 8 9]])

8:54 lazybot: ⇒ [1 2 3 4 5 6 7 8 9]

8:54 Morgawr: &(flatten [[1 2 3] [4 5 6] [7 8 9]])

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

8:54 Morgawr: :D

8:58 hyPiRion: ~flatten

8:58 clojurebot: flatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.

9:09 clgv: Morgawr: hyPiRion meant you should use apply concat instead of flatten there. or (apply into [] [[1 2 3] [4 5 6] [7 8 9]]) works good as well ;)

9:10 hyPiRion: I meant to say that you rarely need flatten

9:11 If you have a list of vector, why do you have said list? Could you use mapcat at some point to avoid the overhead?

9:31 ngw: hi *

9:31 hyPiRion: hi there

9:38 ngw: I'm trying to figure out pedestal and how to serve different content with something like the :format variable in rails

9:38 for example a route like '/home.:format' will respond to /home.html putting html in the format parameter and home.json will put json in the format parameter

9:39 this way I can serve different data through the same action/route

9:39 is this possible_

9:39 ?

9:39 daemian: ngw: https://github.com/ToBeReplaced/pedestal-content-negotiation served my purposes.

9:48 mercwithamouth: hrmm does anyone feel that emacs-live is 'too much'?

9:48 tim__: mercwithamouth: yes, it is

9:49 tbaldrige: sadly, I'm not versed enough in emacs to go and make my own config. Someday perhaps. Until then, I live with the bloat that is emacs live.

9:49 I wouldn't recommend it to anyone else, however.

9:50 chronno: tbaldrige: Of all the bloat, what bothers you most?

9:51 tbaldrige: chronno: it's just heavy in general. I have a 2012 MBP, and yet it still hiccups when doing symbol look-up for intelisense for instance.

9:53 chronno: chronno: yep, I tried if for a while and found it slow and hard to take apart. In the end I decided to start a clojure config from scratch.

9:54 chronno: I decided that when I found out it changed some of the standard bindings...

9:58 mercwithamouth: funny i just set up sublime text and it's not bad AT ALL

9:59 i still think emacs-live is king ....i'll be give a more informed rant later most likely

10:01 mikerod: Does anyone have any successful experience with using maven-shade-plugin for a Clojure (mixed with Java) project where you want the Clojure to be AOT compiled?

10:02 I was experiencing slow load times and I noticed that all of the Clojure files were being compiled dynamically during JVM start up. I was confused for a while, then I realized that maven-shade-plugin alters the timestamps of all the files in the uber-jar.

10:02 So, the effect of this was, all of the clojure-ns.clj files were the same date as the clojure-ns.class files.

10:02 When this happens, the Clojure compiler recompiles the .clj file.

10:03 I know that lein uberjar doesn't cause this issue. Currently, we must use Maven for our uber-jarring though.

10:04 chronno: tbaldrige: btw, I just finished watching your macros/core.async videos. Very nice job :-)

10:08 tbaldrige: thanks!

10:09 silasdavis: how can I access values in my profiles.clj from a repl?

10:10 clgv: silasdavis: you can't by default. you need to read or load that file to do that

10:11 coventry: It'd be nice if there was a plugin/dependency which let the project jvm communicate out to the lein jvm.

10:15 silasdavis: I've got my aws credentials in there for lein beanstalk

10:15 hyPiRion: coventry: We're trying to avoid that at all cost. Is there any reason you'd like to communicate BACK to the lein jvm?

10:15 * hyPiRion reads a bit higher up in the log.

10:15 silasdavis: and I'm using AmazonS3Client and I was looking for a way to hook them up so I don't have to repeat myself

10:16 coventry: hyPiRion: Just that a couple of people have asked similar questions to silasdavis's recently, and that seems like an obvious solution. What are the drawbacks?

10:17 hyPiRion: coventry: Suddenly your project depends on a version of Leiningen to work correctly, and may crash if you attempt to run the project standalone. If there are tighter coupling, there would be dependency issues too.

10:17 coventry: hyPiRion: Makes sense.

10:18 hyPiRion: silasdavis: you've got aws credentials in your project.clj?

10:20 silasdavis: hyPiRion: yes..

10:20 as per https://github.com/weavejester/lein-beanstalk

10:21 hyPiRion: silasdavis: ah, profiles.clj, not project.clj. I misread. I was wondering whether you checked out the aws credentials

10:22 silasdavis: oh sorry

10:24 coventry: hyPiRion: Would a middleware which dropped the project map into a lein-project-map namespace of the project jvm be a bad idea?

10:24 hyPiRion: silasdavis: well, for what it's worth, you may make a plugin for that as it's only data from leiningen to the project jvm, not vice versa. But I'm not sure whether that's safe or not.

10:24 xeqi: silasdavis: most people have a config file that is loaded form the resource path, and then use profiles to choose the right one. Take a look at https://github.com/sonian/carica or https://github.com/weavejester/environ

10:25 silasdavis: xeqi: yeah I'm using carica, I just thought it might be nice to reuse the :aws {

10:25 :access-key ... } section I already hav

10:25 in profiles.clj

10:26 hyPiRion: coventry: Not if it's well-written. But profiles are merged into the project map, and a poor implementation may leak personal data/setup.

10:27 coventry: Hmm, I can see how that would be a bad idea when testing 3rd party projects out. Thanks.

10:30 xeqi: coventry: well, testing third part projects already runs arbitrary code :p

10:45 arrdem: clojurebot: ping

10:45 clojurebot: PONG!

10:50 clgv: lazybot: ping

10:50 lazybot: clgv: Ping completed in 0 seconds.

10:57 jagaj: I was looking at this http://www.ohloh.net/p/clojure and I was wondering what caused the clojure codebase to be eviscerated around oct/nov 2007?

10:59 technomancy: probably dropping CLR support

11:02 silasdavis: can you set jvm-opts in profiles.clj?

11:13 ddellacosta: anyone, perchance, used stefon on heroku?

11:14 cannot figure out why it claims to be compiling assets, yet utterly fails to do so

11:24 cmajor7: never looked at it before, so I'll just ask: does clojurescript (maybe by gclosure proxy) does anything cool with a browser local storage (e.g. fall back for "supported storage" (e.g. sqllite for safary, indexeddb for …))?

11:24 *does clojurescript do

11:27 dnolen: cmajor7: http://docs.closure-library.googlecode.com/git/namespace_goog_storage.html

11:31 cmajor7: dnolen: cool, so this: https://code.google.com/p/closure-library/source/browse/closure/goog/storage/mechanism/ defines all the supported mechanisms?

11:31 dnolen: cmajor7: no iea

11:31 cmajor7: no idea

11:33 cmajor7: dnolen: just curious, but thanks for the right direction :)

12:01 ToBeReplaced: oh... the conj sold out? bummer

12:02 xeqi: or really good news about the interest in clojure

12:02 llasram: Oh, wow

12:03 I was feeling bad for getting a late reg ticket. Now I can just feel good for getting one at all :-)

12:10 silasdavis: how can I do (map .javaInstanceMethod java-object-list)

12:10 without having to do

12:10 (map (fn [x] (.javaInstanceMethod x)) java-object-list)?

12:10 `cbp: Well you can always use #() notation :P

12:11 llasram: silasdavis: What `cbp said, or if you feel like being non-standard check out: https://github.com/llasram/method-fn

12:12 tbaldrige: silasdavis: http://blog.jayfields.com/2011/08/clojure-memfn.html

12:12 silasdavis: thanks

12:12 tbaldrige: but yeah, most people use #()

12:15 bhenry: hiredman: bitemyapp: coventry: if any of you are interested, i found out that the `lein ring server` command had a different classpath than the nrepl. for some reason, it was using clojure 1.2.1 instead of the 1.5.1 from the other dependency.

12:15 i have no clue why that would be

12:36 glosoli: Anyone familiar with bouncer preconditions? I am wondering why would :pre (seq :country) fail, and :pre (comp seq country) wouldn't at the times when country returns nil

12:37 justin_smith: how would :country be a seq?

12:38 it is a keyword

12:38 glosoli: justin_smith: it's from Bouncer, :country is invoked on a map

12:38 justin_smith: oh, sorry, I missed that, don't mind me

12:39 glosoli: justin_smith: the value it gets is (:country {})

12:39 Hmm thats seems to be the thing with Clojure pre-conditions, not bouncers explicitly

12:39 llasram: glosoli: Do you mean (comp seq :country) instead of (seq :country)

12:39 ?

12:40 Not that either makes sense, actually

12:40 glosoli: llasram: why wouldn't ? if I want to check if the string is empty, wouldn't (seq "") do the trick ?

12:41 llasram: glosoli: If we're talking normal Clojure :pre and :post conditions, they're *expressions*, not functions

12:41 so (comp seq :country) evaluates to a function, which is always truthy

12:41 glosoli: and seq ?

12:41 aaaa

12:42 llasram: nvm thanks! :) I understand it now

12:44 Bouncers pre seems to work a bit different

12:44 justin_smith: glosoli: also:

12:44 ,((fn [] {:pre (seq {})} 1))

12:44 clojurebot: 1

12:44 justin_smith: ,((fn [] {:pre (seq nil)} 1))

12:44 clojurebot: #<AssertionError java.lang.AssertionError: Assert failed: nil>

12:44 justin_smith: notice that {} does not make that pre fail

12:45 glosoli: justin_smith: well it shouldn't hmm all I am doing it just looking for a proper way to check in pre-condition if the string is empty hmm

12:45 * glosoli feels confused

12:45 justin_smith: it could be I was the one confused - I thought you indicated above it would get {} as the value for :country

12:45 llasram: That's because the :pre and :post values should be *collections* of condition expressions

12:45 ((fn [] {:pre [(seq {})]} 1))

12:45 ,((fn [] {:pre [(seq {})]} 1))

12:45 clojurebot: #<AssertionError java.lang.AssertionError: Assert failed: (seq {})>

12:46 `cbp: justin_smith: isnt (seq {}) supposed to be surrounded by []?

12:46 justin_smith: llasram: oh! thanks

12:46 llasram: ,((fn [] {:pre [(seq #{:whatever})]} 1))

12:46 clojurebot: 1

12:46 `cbp: oh :P

12:46 * `cbp is too slow on his fingers

12:46 justin_smith: so I thought it was checking (seq nil) but really it was checking seq, then nil

12:47 glosoli: Ok, that's totally confusing, so what's the idiomatic way to check if string is empty

12:47 ?

12:47 llasram: `cbp: Better luck next, old timer

12:47 justin_smith: glosoli emty? or #(= "" %)

12:47 rasmusto: ,(= "" "")

12:47 clojurebot: true

12:47 justin_smith: *empty

12:47 seangrove: ,((fn [s] {:pre [(not (empty? s))]} 1) "")

12:47 clojurebot: #<AssertionError java.lang.AssertionError: Assert failed: (not (empty? s))>

12:48 justin_smith: ,(empty? "")

12:48 clojurebot: true

12:48 seangrove: ,((fn [s] {:pre [(not (empty? s))]} 1) "look")

12:48 clojurebot: 1

12:48 rasmusto: ,((fn [s] {:pre [(not (empty? s))]} 1) [1 2 3])

12:48 clojurebot: 1

12:48 justin_smith: but (seq "") also returns nil, so it works in this case too

12:48 rasmusto: depends if you want it to fail on non-strings

12:49 glosoli: ..

12:49 rasmusto: I want it to

12:49 seangrove: ,((fn [s] {:pre [(not (empty? s)) (string? s]} 1) [1])

12:49 clojurebot: #<RuntimeException java.lang.RuntimeException: Unmatched delimiter: ]>

12:49 seangrove: Erm, you get the idea

12:50 bordatoue: could anyone please tell me how to specify java file with a package structure under lein , so that I can use compile it using lein javac. I have managed to get the classfiles compiled with out package structure, however with the package structure I am getting compilation errors

12:50 rasmusto: ,((fn [s] {:pre [(string? s) (not= "" s)]} s) "abc")

12:50 clojurebot: "abc"

12:50 justin_smith: seangrove: why use (not (empty ...)) instead of (seq ...)?

12:50 glosoli: yeah why

12:51 `(seq "")

12:51 ,(seq "")

12:51 clojurebot: nil

12:51 seangrove: justin_smith: Actually, there was a point somewhere (maybe by hickey?) that people should always use (seq ...) insted of (not (empty? ...))

12:51 dgrnbrg: I'm having trouble using java.sql.Timestamp in clojure.java.jdbc 0.2.3 queries, in that when I pass the Timestamp into the ? slot in the query, I get a SQLServerException The conversion from UNKNOWN to UNKNOWN is unsupported. com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError (SQLServerException.java:190)

12:51 technomancy: seangrove: I don't buy that

12:51 glosoli: seangrove: yeah it's in sources docs :)

12:51 seangrove: So, my bad!

12:51 `cbp: empty? is pretty much (not (seq ..))

12:51 dgrnbrg: does anyone know what's going on in jdbc

12:51 ?

12:51 rasmusto: why are you using seq instead of checking its equality w/ "" ?

12:51 `cbp: so not empty is (not (not (seq))) !

12:51 glosoli: seangrove: Part of the empty? documentation :) That's what made me confusing

12:51 justin_smith: ,(doc empty?)

12:51 clojurebot: "([coll]); Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))"

12:52 glosoli: rasmusto: seems more clean

12:52 technomancy: the fact that you can call seq on something that's a seq and get something back that's not a seq is just bonkers

12:52 `cbp: is this about nil? :P

12:52 rasmusto: if you're constraining the input to be a string anyways, wouldn't an inequality check be more clear?

12:52 technomancy: `cpb: heh, no this is a weirdness specific t oclojure

12:54 llasram: In ClojureScript, is the ISeq protocol implemented for `nil`?

12:54 Because if so, then I think you could argue that `nil` is a seq :-)

12:54 Morgawr: llasram: I'm not sure but I know that (seq? nil) -> false

12:54 &(seq? nil)

12:54 lazybot: ⇒ false

12:55 llasram: In JVM Clojure, sure, because it's not an object which implements the JVM interface ISeq

12:56 But the Clojure abstractions have never been entirely bounded by their JVM interfaces, and the ClojureScript re-expression of those abstractions in protocols goes a lot further

12:56 If ClojureScript extends ISeq to nil, then I' would argue that nil is a seq, despite JVM Clojure's (seq? nil) => false

12:56 xuser: dgrnbrg: maybe its related: https://groups.google.com/forum/#!topic/clojure/H1gWA9CQ3S0

12:57 Morgawr: llasram: oh you said ClojureScript, sorry! I didn't see it

12:57 bordatoue: has anyone compiled java class using lein javac that has a package structure????

12:57 llasram: bordatoue: yes? if I understand your question.

12:57 seangrove: bordatoue: I have not.

12:58 bordatoue: llasram: how did you specify package structure ,

12:58 seangrove: Stack Overflow would probably be a good place to ask, if you can't find enough information on it - should help the next poor soul who comes along.

12:58 dgrnbrg: xuser: this isn't about timestamps, but appears to be that the `with-query-results` is setting every param to object, where my param is actually a Timestamp

12:59 bordatoue: llasram: when I am adding .java files under my java directory if it has a package structure for example abc.efg.myclass then the compilation fails

12:59 llasram: did you have to provide any additional entries in the project.clj file

12:59 llasram: bordatoue: Just create the same directory structure you would for Java. So if your :java-source-paths is ["src/java"], then

12:59 you'd have src/java/abc/efg/MyClass.java

13:00 bordatoue: llasram: ok, that makes sense . Thanks

13:03 llasram: how do i specify libraries in the javac classpath , currently I have listed all my exteranl jars under resource-paths

13:04 llasram: bordatoue: Same way you do for any other dependency -- they should be in an artifact repository and listed under :dependencies

13:04 xuser: dgrnbrg: no idea sorry, was just watching the lists and saw that ;)

13:05 bordatoue: llasram: why can I add my local jar to resource-paths, won't that work

13:05 llasram: It'll "work", but you're left with a non-reproducible build

13:06 bordatoue: llasram: the problem i'm having is that that it is not finding the reference to package that is specified under reource-paths

13:08 llasram: Are you listing each individual JAR in :resource-paths ?

13:10 bordatoue: yes

13:11 llasram: Hmm. Then I don't know. Check for types? You can try `lein classpath` to see exactly how the classpath is ending up

13:11 s,types,typos, <- ha!

13:11 bordatoue: the classpath that lien show during lein classpath is it the one that will be used during javac

13:12 llasram: yes

13:12 bordatoue: llasram: thanks very much for your help

13:13 llasram: np, and good luck!

13:49 TimMc: Is Michael Klishin here?

13:49 bitemyapp: TimMc: no, he's antares.

13:49 TimMc: what do you need help with?

13:49 TimMc: I started writing a URL library in Java ("johnny"), but now I wonder if I should be contributing to Urly.

13:50 bitemyapp: does it do anything that Urly does not?

13:50 TimMc: Urly has some really nice design choices, but I don't like that it accepts sloppy inputs.

13:50 bitemyapp: maybe a "strict" mode?

13:50 TimMc: Yeah.

13:50 bitemyapp: Nifty. You could ping him on Twatter

13:50 TimMc: https://github.com/timmc/johnny is what I was writing for my employer's Hack Week.

13:51 OK, I'll see if I have an intertwubs account...

13:58 OK, I sent up a twitsignal.

14:03 antares_: TimMc: hey

14:04 TimMc: Hey there.

14:04 antares_: So I've slapped together this thing: https://github.com/timmc/johnny

14:05 pandeiro: is lein 2.3.4 in the pipes?

14:05 TimMc: It does successive parsing of URLs, querystrings, paths with path parameters... although I'm still working out the API.

14:05 antares_: TimMc: looks nice

14:06 TimMc: Do you think there's room in Urly for a strict mode? I agree wit the general philosophy of a fluent API using persistent data structures, but automatically fixing things like http://http:// gives me the willies. :-P

14:06 antares_: TimMc: we can drop some of that for Urly 2.0

14:07 TimMc: I'd be happy to base Urly 2.0 on a solid Java library

14:07 pandeiro: lein repl :connect is broken for me on 2.3.3 and it seems like the issue was fixed already (issue 1344)

14:10 TimMc: antares_: johnny is mostly a thin wrapper around java.net and Google Guava classes, but I'm working to find the corner cases. E.g. IPv6 hosts that specify a zone ID need percent-encoding, which destroys the notion that the host component doesn't get decoded. :-/

14:11 So I'm trying to present a really structured view, where you can get either the raw string for each component or a parsed value.

14:12 antares_: TimMc: sounds good

14:12 TimMc: ping me when you flesh out at least some key API parts, I will be happy to see if I can contribute something from/for Urly

14:12 TimMc: I'm also trying to strike a balance between the way that *most* people use URLs and the full flexibility of the specs. One place that's tricky is querystrings; most apps only care about ordering of values per-key, at most, but some apps might care about total key-value pair order.

14:13 antares_: TimMc: right. Using sorted maps may be a good idea.

14:13 TimMc: antares_: Oh, just continnue working on johnny, then see where to go from there on either project? Sounds good.

14:13 antares_: TimMc: I think there should be a Java library that does what Urly wants to do

14:13 TimMc: antares_: https://github.com/timmc/johnny/blob/master/src/main/java/com/brightcove/johnny/parts/PersistentOrderedParams.java

14:14 antares_: and Urly should be based on it. Bonus points for making Johhny use immutable data structures (hm, maybe even Clojure's)

14:14 TimMc: ^ Persistent multimap with total key-value ordering.

14:14 antares_: cool

14:14 TimMc: I'm actually kind of proud of that one.

14:14 (Mind you, I haven't perf-tested *any* of this.)

14:15 antares_: poor Scala/Groovy people should not have to deal with URI parsing problems!

14:15 TimMc: Yeah, that's why I'm bothering to write it in plain Java.

14:15 (even though I'm sneaking some Clojure in for the query representations)

14:16 `cbp: :3

14:18 bitemyapp: antares_: can I ask a favor of you?

14:18 pandeiro: hm guess i will just switch to running lein snapshots

14:18 technomancy: pandeiro: can you set LEIN_REPL_PORT with 2.3.3?

14:18 nollidj: anyone know if there's any way to make core.typed signatures available at runtime, so that i can reason about them? i'm interested in doing what amounts to function composition at runtime, and it would be great to use core.typed signatures to constrain the space of what can be composed and to validate composition before it happens

14:18 pandeiro: technomancy: i had not tried that, want me to?

14:19 i'm content using snapshots

14:19 unless you think that's a bad idea

14:19 since i would like to try to contribute something

14:19 (that :stop task we talked about the other day)

14:19 nollidj: doing that is also contingent on the existence of predicates that operate over the types that core.typed produces...

14:19 antares_: bitemyapp: ?

14:20 bitemyapp: antares_: please don't RT Twitter drama llamas :(

14:20 antares_: I like following your Twitter but I've had to axe a bunch of people on my following list because there was a huge wave of tears and caremad going around.

14:20 technomancy: pandeiro: if the LEIN_REPL_PORT workaround doesn't work, that means we should consider 2.3.4 sooner rather than later

14:21 antares_: bitemyapp: do I usually participate in dramas?

14:21 bitemyapp: antares_: no, but you RT some of them. Not a big deal, just figured I'd ask.

14:21 I also follow zedshaw, so, he's currently King on that Hill.

14:21 antares_: well, sometimes it's just wrong to stay completely silent

14:22 edw: Anyone get problems jacking in to lein from Emacs in Mavericks? I'm getting a security exception. Odd.

14:22 gtrak: where's a good place to eval this snippet on nrepl startup? Useful for threads not taken care of by binding-conveyor-fn. (alter-var-root #'*out* (constantly *out*))

14:24 bitemyapp: edw: no problems here, but I don't use nrepl jack in, I use a proper lein repl instance.

14:24 pandeiro: technomancy: that fix works with 2.3.3

14:25 edw: pandeiro: On invocation got a security exception just typing 'lein repl' from the command line from within *shell* in Cocoa Emacs.

14:25 pandeiro: edw: security exception from where?

14:26 i've never seen that but i'm guessing maybe lein was not installed properly

14:26 dobry-den: What would be a nice way to do something like (merge [0 0 0] [1]) -> [0 0 1]?

14:27 edw: Connection refused in Cocoa Emacs.

14:27 When connecting to the port where I have `lein repl` running in a terminal window.

14:27 llasram: dobry-den: It's not clear quite what's happening in your example. Why is the last element the one being "merge"d into?

14:27 dobry-den: more specifically, (merge (byte-array 4) [(byte 1)]) -> 00000001

14:28 llasram: i'm trying to pad an array

14:28 pandeiro: edw: my error was different; and i don't use OS X so no way to test that here, sorry

14:28 edw: Also, got a security exception when running `lein repl` inside `M-x shell` in Coca Emacs. I'm installing Xcode 5.0.1 and will be re-building Homebrew Emacs as soon as that happens.

14:28 Seems to be some sort of sandboxing.

14:31 dobry-den: i guess a naive solution would be (take-last padcount (concat (byte-array 4) [(byte 1)]))) -> 00000001.

14:31 edw: Hmm, there's already a Java update for Mavericks. Yay?

14:32 dobry-den: i'm too scared to upgrade OS anymore

14:32 my monkeyball daisychain of hacks might fall apart

14:33 it's a lot of yak shaving

14:34 `cbp: dobry-den: maybe you wanna use java.nio?

14:38 pandeiro: is there a reply option for injecting forms?

14:38 technomancy: pandeiro: you can put :injections in the :repl profile and they should get picked up

14:39 pandeiro: technomancy: this would be in the context of the lein repl :stop task, so i'd basically want to do what :connect does, but inject (System/exit 0)

14:41 technomancy: pandeiro: you can do that by running (eval-in-project (assoc project :eval-in :nrepl) '(System/exit 0))

14:41 you don't need injections

14:42 though that has the port as being hard-coded in :target-path/repl-port so it might not be suitable

14:43 pandeiro: i suppose shelling out to echo and piping to lein repl :connect is not an option

14:43 i mean, for including in lein

14:44 technomancy: no, but rebinding *in* isn't out of the question

14:45 pandeiro: do you know the java class i'd need to use to rebind *in*?

14:46 technomancy: probably a java.io.StringReader?

14:46 might need to be wrapped in a pushback reader?

14:51 amalloy: yes, needs pbr of stringreader

14:52 or, well, pbr of *any* reader

14:53 pandeiro: this is something that can't really be tested at the repl, the rebinding of *in*, yeah?

14:54 but i am wondering how i even can test other repl ns functions (client) from the repl, if possible... generating a project like the one the function sees

14:55 bitemyapp: who's up for a riddle? https://www.refheap.com/20104 https://www.refheap.com/20106 <- wtf is going on?

14:55 the only deftrace that prints is for the top-level fn that gets invoked.

14:55 coventry: You're running in the lein jvm, right? Why not connect the same way lein repl :connect does?

14:57 llasram: bitemyapp: Is this for a logic puzzle or the start of the best computer game ever?

14:57 rasmusto: bitemyapp: Backstage passes to a TAFKAL80ETC concert

14:57 pandeiro: coventry: yes i wanted to just add another case clause that would do what connect does, and then eval the (System/exit 0) form

14:57 bitemyapp: llasram: it was a refactoring thingy from Clojure Dojo last night

14:57 I'm pretty happy with my solution's design, but I have this weird bug that is baffling me.

14:58 technomancy: pandeiro: you can test it from a repl inside lein itself

14:58 amalloy: bitemyapp: looks like you're expecting map to be eager, but it's lazy?

14:59 bitemyapp: amalloy: but where is the error coming from if things aren't getting evaluated?

14:59 amalloy: i don't know, because you have not yet said anything about an error

15:00 bitemyapp: I pasted two links.

15:00 The error is in the second.

15:00 Raynes: gf3: Am I insane or do you have two different snapchat usernames?

15:00 bitemyapp: I can paste a more complete error + trace because I removed the laziness.

15:00 amalloy: ugh. missed the second one, since it blended into the first. sorry

15:00 pandeiro: technomancy: running a repl instead a lein repl? sorry for my density

15:00 bitemyapp: https://www.refheap.com/20107

15:00 coventry: bitemyapp: stacktrace refers to line 89 core.clj, but the first refheap has only 62 lines. Can you post the complete thing?

15:01 bitemyapp: https://www.refheap.com/20108

15:01 coventry: 107 and 108 are the more complete error and the full code, respectively.

15:01 https://www.refheap.com/20107 https://www.refheap.com/20108

15:01 technomancy: pandeiro: if you launch a repl inside the lein checkout and one inside a project you want to shut down, you can test your changes to the repl task in the first one

15:01 gf3: Raynes: You're insane

15:01 Raynes: I'm only LOLgianni

15:02 Raynes: gf3: Then who the shit is lolreduce?

15:02 gf3: Raynes: bitemyapp

15:02 coventry: bitemyapp: trace the binding to rule-fn

15:02 bitemyapp: amalloy: coventry I think I found the error.

15:02 gf3: Raynes: (Chris)

15:02 clojurebot: Pardon?

15:02 bitemyapp: coventry: It's trying to "get" a vector

15:02 instead of the key

15:02 I need to destructure the key and the bool.

15:02 Raynes: gf3, bitemyapp: Which one of you sent me dancing snaps last night?

15:02 gf3: Raynes: We both did, but bitemyapp did ones later

15:03 bitemyapp: gf3: sssshhh we should just confuse him

15:03 Raynes: That was a hell of a confusing night.

15:03 amalloy: oh good. i thought it might be that, bitemyapp, but i convinced myself you were handling that correctly. prove me right/wrong!

15:03 bitemyapp: amalloy: it was harder to debug because the laziness meant the traces weren't popping up

15:03 now that my deftrace is behaving properly with the mapv's, I see what I did wrong now. :)

15:05 yeah, my code works now!

15:05 sweet.

15:05 now I just need a juxt and reduce :)

15:08 amalloy: bitemyapp: a little plug for useful: flatland.useful.debug/? is kinda like deftrace, but more focused (print particular expressions, not all args to each invocation of a function), and apparently more robust: if the thing you're printing throws an exception, it catches that, prints it, and rethrows

15:09 Raynes: My life would be much better if I had more flatland.useful.debug in my life.

15:09 pandeiro: technomancy: right sorry where i'm confused is how i construct the project argument in the lein checkout repl?

15:09 Raynes: Not that it'd help me much with the pool of Ruby I'm drowning in. :P

15:09 technomancy: pandeiro: use leiningen.core.project/read

15:10 amalloy: s/pool/ocean - when you metaphor, gotta go big

15:10 pandeiro: technomancy: i promise i'll read leiningen core soon, thanks a lot for the patience :)

15:11 coventry: amalloy: Thanks, will try it next time.

15:12 bitemyapp: amalloy: I already knew of flatland/useful, didn't know of that particular thing, thank you!

15:13 I'm a little mad that most of the errors I've had lately would've been caught by a type system.

15:13 maybe even...caremad.

15:14 amalloy: man. i am in the middle of a big refactor that involves changing the type of a concept used all throughout the system

15:14 and it's like...change one function, some other functions throw exceptions, dunno why. finally fix, change another function, more exceptions

15:14 bitemyapp: amalloy: time for core.typed?

15:15 amalloy: if only i could flip a switch somewhere from `type Id String` to `type Id (Type Number)` and have every relevant piece of code light up like a christmas tree

15:15 bitemyapp: i doubt the ROI is high enough for that, but i suppose i could be wrong

15:16 bitemyapp: amalloy: it's easier to pay the cost incrementally, but you can spread the core.typed-ness one namespace at a time.

15:16 amalloy: it *can* validate waht you want.

15:18 amalloy: if I were in the middle of a "change the type of this thing that is everywhere"-Hell, I would've started adding core.typed at that point to assist the refactor.

15:19 coventry: Doesn't that force you to specify types for a whole lot of stuff unrelated to the current problem, though?

15:21 bitemyapp: coventry: not necessarily, you can specify ^:no-check on external stuff you don't care about.

15:21 MaFINaR: Hello Guys

15:21 bitemyapp: MaFINaR: hi!

15:22 coventry: Would a tool to decorate everything in a module with catchall type make sense, if you wanted to bleed in type constraints gradually?

15:22 seangrove: core.async is lovely.

15:22 rhg135: to whomever recomended hy to me: it has an unholy blend of python semantics with cl syntax and a dash of clojure

15:22 MaFINaR: Has anyone tried the Luminus web framework here ?

15:23 rhg135: i suppose eventually python gets as weird

15:23 bitemyapp: coventry: if you want to, sure. That's what Any is for.

15:23 MaFINaR: plenty of people. I'm one of the people that works with yogthos, do you need something?

15:24 MaFINaR: I was thinking, Luminus doesn't seem to be discussed about much in the net compared to others

15:24 bitemyapp: Luminus isn't really a "thing in itself"

15:24 MaFINaR: is there anything wrong with it as a framework?

15:24 bitemyapp: it's a best practices ready-to-go template for Ring based applications.

15:24 It's not a framework in any real sense.

15:24 using Luminus is just a way to learn how to use Ring, conceptually.

15:24 MaFINaR: okay. How's your experience with it?

15:25 bitemyapp: there aren't many actual frameworks in Clojure-land, they're anathema to most of us.

15:25 MaFINaR: well I designed some of it, so obviously I'm okay with how Luminus works.

15:25 you should probably just start using it and poke around.

15:25 MaFINaR: hehe

15:25 bitemyapp: it'll take less time to start using it than to ask vague questions on IRC :)

15:25 MaFINaR: Yeah. I found it pretty accessible. Especially the documentation's pretty good

15:25 * znDuff is sure there's a talk somewhere where Rich discusses libraries-vs-frameworks directly.

15:26 seangrove: bitemyapp: Sure, but pedestal seems pretty framework-y to me

15:27 MaFINaR: Hmmm.. I'll start using it right away

15:27 seangrove: Not sure it could be any other way, and you get a lot out of it, but still has a lot of baked-in assumptions

15:27 MaFINaR: Thanks

15:27 bitemyapp: seangrove: I've promised the hard-working individuals that work on Pedestal that I would stop talking about Pedestal in public. :P

15:27 Suffice it to say, I would be quite happy if Pedestal got componentized.

15:28 amalloy: bitemyapp, you sound like an awful street musician, being paid not to play. not a bad deal

15:29 bitemyapp: amalloy: I like the clojure community, I don't want people to ever hesitate pushing out code just because they think some people might disagree with the design.

15:29 llasram: (inc bitemyapp)

15:29 lazybot: ⇒ 4

15:30 bitemyapp: A rising Github tide lifts all Clojure tugboats.

15:33 TimMc: bitemyapp: Oh good, now I don't feel bad about releasing 5 slightly differing HTML templating libraries!

15:33 I will get on that. :-P

15:38 yogthos: TimMc: we definitely have no lack of those ;P

15:49 technomancy: no no no, we need more validation libs

15:50 bitemyapp: TimMc: nice try, but now that Selmer exists, that wound in my soul was healed.

16:10 edw: Ugh, after upgrading packages I get an 'Autoloading failed to define function nrepl-jack-in' error in Emacs; any thoughts?

16:21 pandeiro: edw: i think all the functions got renamed to cider-*?

16:22 edw: Yeah, just noticed that. In upgrade hell right now.

16:24 After doing a refresh of the package list, I see only cider-decompile and cider-tracing at melpa.

16:26 pandeiro: edw: what happens if you package-install nrepl?

16:26 i thought it automatically installs 'cider'

16:28 edw: Ah. Let me check…

16:36 pandeiro: technomancy: tried using a (binding ...) form with *in* bound to a (PushbackReader. (StringReader. "(System/exit 0)")) but to no effect... Where would that have to be done for the lein repl :connect functions to see it? or am i doing it wrong with the binding somehow?

16:38 technomancy: pandeiro: that was just a guess; possibly reply is being too clever

16:38 oh... it's probably accessing the underlying tty directly for jline

16:42 edw: Is some magic necessary to get an unsigned package installed?

16:42 technomancy: pandeiro: probably :eval-in :nrepl is the easiest way to go

16:43 edw: there's no signed packages in emacs yet, sadly

16:44 edw: technomancy: When I'm in the package list, typing 'i' doesn't select the package, nor can I M-x package-install it.

16:44 technomancy: cider, that is.

16:44 technomancy: hm; I haven't tried cider yet. does nrepl.el work?

16:45 edw: nrepl is no longer in the package list.

16:45 technomancy: whaaaaat

16:45 oh, you're using melpa?

16:45 yeah, don't do that

16:46 melpa is "just give me whatever's on git master; don't care if it works or whatever"

16:47 llasram: I've noticed a few packages which only host via melpa :-/

16:47 bitemyapp: llasram: that is horrific.

16:47 llasram: Easy enough to manually download when there's no dependencies, but...

16:47 Yes

16:47 coventry: melpa has actually worked great for me, hasn't triggered a single yak shave. But I am staying away from cider for now. :-)

16:48 technomancy: I wouldn't mind melpa so much except it encourages package authors not to bother with proper stable releases, which is depressing.

16:49 llasram: Or does it encourage package authors to make sure everything which touches `master` is stable?

16:49 I guess if you're doing the `develop` is rubish, `master` is gold thing, it could work. Ish.

16:49 technomancy: llasram: that's just as annoying

16:50 I don't want my dev workflow to be dictated by a third-party site

16:50 llasram: Oh, agreed

16:55 scizo: If I have a lazy seq of strings, is there a simple way to keep the laziness and pass it to java as a Reader?

16:55 An iostream would work as well.

16:58 llasram: scizo: I don't know of anything off the top of my head. You could probably `proxy` `Reader` relatively easily though

16:58 scizo: llasram: Alright, I'll look into it. Thanks.

17:00 llasram: Actually, `ring` has something in it which translates from a seq of strings to an input stream consuming that seq

17:00 edw: technomancy: The answer seems to be to add melpa and marmalade to package-unsigned-archives and not package-archives.

17:00 llasram: I don't remember how it does, but if you poke around, you should at least have an existing example

17:00 :scizo

17:00 technomancy: edw: oh, I missed that you are on head emacs

17:01 that's cool that they are working on signed packages, but incredibly crappy that they've broken the install instructions for 95% of all elisp packages out there

17:01 scizo: I'll poke around ring for some ideas.

17:01 edw: technomancy: Yes. This was a very new change. My last build was a week or so ago.

17:02 amalloy: llasram, scizo: for InputStream, there's a SequenceInputStream class, which takes a list of InputStreams and produces a concatenation of them. gallingly, no such thing seems to exist for Reader

17:02 technomancy: I guess I should catch up with emacs-devel

17:03 edw: technomancy: Problem solved-ish.

17:04 scizo: amalloy: Where can SequenceInputStream be found?

17:05 coventry: $google java SequenceInputStream

17:05 lazybot: [SequenceInputStream (Java Platform SE 7 ) - Oracle Documentation] http://docs.oracle.com/javase/7/docs/api/java/io/SequenceInputStream.html

17:05 edw: http://docs.oracle.com/javase/7/docs/api/java/io/SequenceInputStream.html

17:05 Damn, beat me.

17:06 scizo: I was googling poorly

17:06 bitemyapp: I need to start using that bot.

17:20 TimMc: &(= (java.net.URL. "http://brainonfire.net/&quot;) (java.net.URL. "http://geohash.info/&quot;))

17:20 lazybot: ⇒ false

17:21 TimMc: Oh, it won't demonstrate it here, I guess -- lazybot isn't allowed to make network calls.

17:21 Anyhow, I have recently learned that java.net.URL apparently *dereferences the host name* to decide whether two URLs are equal, based on whether their IP addresses match.

17:22 llasram: TimMc: The old "java.net.URL resolves the URL host in it's hashCode() method" thing?

17:22 TimMc: Yeah...

17:22 Sad panda.

17:22 ToxicFrog: user=> (= (java.net.URL. "http://brainonfire.net/&quot;) (java.net.URL. "http://geohash.info/&quot;))

17:22 true

17:22 WHAT

17:22 llasram: It's pretty lolercopters

17:22 ToxicFrog: That's insane

17:22 I mean, first of all, those aren't the same URL even if they're both served from the same machine, and secondly, THAT'S INSANE

17:23 llasram: TimMc: I too will one day write a URL! The libraries can go out for beers some evenings

17:23 er, URL library even

17:24 TimMc: We can arrange playdates!

17:25 and give them toys like http://[fe80::1%25eth0]/ to play with

17:26 llasram: As long as they don't start cutting each other on edge cases...

17:26 coventry: TimMc: How do you parse that?

17:27 TimMc: coventry: With great care.

17:27 It's an IPv6 hostname with a scope identifier.

17:28 The link-local address fe80:0:0:0:0:0:0:1 with scope eth0

17:28 coventry: Interesting. Thanks.

17:28 TimMc: aka fe80::1%eth0, but of course % has to be encoded...

17:29 llasram: Actually, a shared test file would be cool.

17:29 coventry: Oh, yuck.

17:29 llasram: TimMc: Well, if I end up doing it, I'll steal yours :-) I do need an ultra-liberal-but-correct URL parser, but not as much as I need other things I'm working on

17:29 TimMc: I don't actually understand how scope IDs are supposed to be used, and there's poor support for them, but... they're there.

17:30 bitemyapp: TimMc: have you tried Frak?

17:30 TimMc: llasram: Urly is pretty good, but make sure to feed it java.net.URL directly to avoid the fixups it does with Strings.

17:31 bitemyapp: https://github.com/noprompt/frak ?

17:32 In any case, no.

17:39 dobry-den: What's a surrogate for the things Ruby's Eventmachine would be used for? Perhaps sockets + clojure.async?

17:39 llasram: I just call methods on `nil` all over my code

17:39 Gives me pretty similar results

17:40 amalloy: dobry-den: core.async, or lamina+aleph, as i understand what EM is

17:40 TimMc: llasram: Haha, ouch.

17:40 llasram: Yeah, too mean and unhelpful. Apololgize

17:40 (inc amalloy)

17:40 lazybot: ⇒ 74

17:41 llasram: Man, typing: apologies even

17:47 pandeiro: how do i turn a string into an InputStream ?

17:47 patchwork: Hmm, in brepl (require …) is not defined?

17:47 pandeiro: patchwork: only the :require macro within an ns works

17:48 bitemyapp: llasram: I enjoyed it anyway.

17:49 patchwork: pandeiro: So can I define a ns inside the repl, or just not require anything and refer to all symbols by their full path?

17:49 amalloy: pandeiro: you can do it, but usually you shouldn't because converting from char[] -> byte[] makes it easy to use the wrong string encoding

17:52 pandeiro: reply/launch-repl has a special option called :input-stream, which lein repl :connect binds to System/in for example, but it doesn't accept my (PushbackReader. ...)

17:53 patchwork: yeah this is one of my pet peeves in the brepl too

17:53 bitemyapp: llasram: shouldn't be too haughty about nil errors in Ruby, I get NPEs in Clojure too :)

17:53 pandeiro: you are forced to think in ns

17:53 technomancy: pandeiro: in this case a ByteInputStream on (.getBytes "(System/exit 0")) would be ok

17:53 pandeiro: technomancy: ah great let me try that

17:53 technomancy: not something I'd recommend for general use, but it's OK here

17:53 pandeiro: k

17:54 llasram: bitemyapp: Oh sure, I just had some bad experience with EventMachine :-)

17:57 noonian: i like null pointer exceptions in clojure; it usually just means i'm trying to get something from a map and using the wrong key

17:58 TimMc: amalloy: Eh, just assume everything's in UTF-8, because it *damn well should be*.

17:59 brehaut: TimMc: my favorite recent mysql thing: which UTF-8 do you want http://mathiasbynens.be/notes/mysql-utf8mb4

18:00 llasram: wat

18:00 bitemyapp: noonian: sigh, usually what happens to me too ;_;

18:00 jjttjj: what's the current reccommeded way to use emacs from windows? cygwin or just emacs for windows

18:01 bitemyapp: llasram: I assume that anybody that says EventMachine or Twisted are good/effective have stockholm syndrome.

18:01 jjttjj: format C:, install something else.

18:03 jjttjj: bitemyapp: :( I was using ubuntu for the longest time, then went to OSX which I loath worse than windows so I just got a new windows comp

18:03 llasram: jjttjj: Everything should* work just fine natively under windows

18:03 * Claims not verified

18:03 turbofail: i wouldn't say "everything," but back when i used emacs on windows, most stuff just worked

18:04 bitemyapp: jjttjj: llasram is right, but you should find a way to make yourself happy on Linux just so you're using the same unix tooling as everybody else. (I'm on Mac OS X most of the time recently, but I've used Linux for a long time)

18:04 jjttjj: plus, package management!

18:04 apt is my happy place.

18:05 this test-string might be a bit of a copout: (testing "Can call API" ...)

18:05 jjttjj: I've used Emacs on Windows before, albeit not for development. Seemed fine. I can't speak to how well nrepl will work.

18:05 I assume it works because nobody complains about it. But that also might mean nobody is trying it.

18:06 jjttjj: Yeah linux is the best unfortunately I need postage printing software on my main OS

18:07 TimMc: brehaut: Lovely.

18:08 jjttjj: Does it run under Wine? :-)

18:08 brehaut: TimMc: but who would ever use higher thingimy utf-9, lets sweep it under the rug. oh wait Emoji

18:08 💩

18:08 jjttjj: TimMc: not really brave enough to try

18:08 coventry: If that's the main reason, I would run windows in a VM and call into it for the postage printing.

18:09 TimMc: coventry: If it needs access to the printer, that could get ugly quickly.

18:09 bitemyapp: TimMc: sssshhhh let him be brave

18:10 coventry: I guess I don't know what to compare against, since I don't know how ugly it is to develop on windows.

18:11 TIL there is a unicode character PILE OF POO.

18:12 brehaut: coventry: unicode also prefers cats over dogs

18:17 bitemyapp: 0 failures, 0 errors. Yeaaaahhhhh baby.

18:19 seangrove: bitemyapp: This for a simonides update?

18:24 ndp: TimMc: I sometimes use a Windows VM to drive a small CNC mill via USB - it's not /that/ ugly in VirtualBox.

18:24 bitemyapp: seangrove: 9-5 stuff. Just expanded my API tests.

18:25 seangrove: it's for a Datomic querying dashboard.

18:45 TimMc: ndp: Oh right. USB makes everything better. :-)

19:18 staafl: ok, total newbie here

19:19 trying to run a simple example that uses the prxml library

19:19 can't get leiningen to find it

19:19 technomancy: tanstaafl!

19:20 znDuff: staafl: hmm; it's there in clojars. How are you declaring it?

19:20 staafl: znDuff, http://pastebin.com/gz7ZTUhE

19:20 znDuff: staafl: not pastebin.com, please, it's full of ads.

19:20 staafl: technomancy, of course not

19:20 znDuff, sorry

19:20 I'm using an adblocker and hadn't really noticed

19:21 znDuff: (we're somewhat fans of refheap.com, as it's written in Clojure, but anything that's ad-free is fine).

19:21 staafl: gist ok?

19:21 znDuff: sure.

19:21 staafl: https://gist.github.com/staafl/7128171

19:21 i'll make a point to check refheap out

19:22 znDuff: staafl: it's just [prxml "1.3.1"]

19:22 staafl: ...no weissjeffm namespace.

19:22 staafl: znDuff, I saw it from here: https://clojars.org/weissjeffm/clojure.prxml

19:23 znDuff: Hmm. I found it at https://clojars.org/prxml

19:23 Ahh.

19:23 The weissjeffm version doesn't have a 1.3.1 yet.

19:23 ...it's quite literally _only_ published as 1.3.0-SNAPSHOT.

19:24 staafl: znDuff, ok, i've changed it to just prxml

19:25 but "lein run" fails with FNF

19:25 znDuff: staafl: ''lein try prxml 1.3.1'' works for me.

19:25 amalloy: prxml is like super duper old and deprecated. clojure.data.xml contains (afaik) all the prxml features

19:26 staafl: Caused by: java.io.FileNotFoundException: Could not locate clojure/contrib/prx ml__init.class or clojure/contrib/prxml.clj on classpath:

19:26 i may be missing a step, but i don't know what it is

19:26 znDuff: Ahh.

19:27 Not so sure it's still clojure.contrib.

19:27 In fact, I'd be surprised if it were.

19:27 ...huh; I was wrong on that.

19:27 (use 'clojure.contrib.prxml) works fine for me given that lein try command.

19:28 I'll try with your exact project.clj.

19:28 staafl: znDuff, I appreciate that

19:28 algal: Hello all. I'm wondering about authenticating a ring-based web API endpoint in Clojure. Is there any obvious choice besides cemerick.friend ?

19:29 brehaut: lib-noir might have something

19:30 noonian: i use friend

19:30 gtrak_: friend's the most comprehensive thing

19:30 znDuff: staafl: your src/test/core.clj needs fixing.

19:30 staafl: give it a ns declaration, create a foo fn in it, and it's fine.

19:31 algal: Okay, thanks. I'm finding friend a bit hard to dive into. I'm not sure if that's because I'm being thick, or friend is a bit unpolished at this point, or what.

19:31 gtrak_: algal: the examples demos are helpful

19:31 http://friend-demo.herokuapp.com/

19:31 algal: gtrak_: Yes, they are!

19:31 noonian: just googling, theres clj-oauth for oauth and ring-basic-authentication which is a middleware i guess

19:31 staafl: znDuff, I seem to have that

19:32 znDuff: staafl: it's not reflected in your gist, if so.

19:32 staafl: znDuff, https://www.refheap.com/20121

19:32 noonian: algal: my biggest stumbling block using friend was actually a misunderstanding of how routing middleware works, if you use wrap-authorize around compojure GET macro's for instance it will lock down routes declared later, so you either need to use it in a compojure context or just use authorize instead

19:33 staafl: znDuff, am I missing something here? sorry for being such a noob right now, but it's getting late I just want to follow the damn tutorial

19:33 so any help is highly appreciated

19:34 algal: noonian: Yes, this is part of what's confusing me. I want to apply the same authorization constraints to a set of routes, but evidently the way to do that is not to just wrap handler built from all those routes.

19:34 znDuff: staafl: https://gist.github.com/charles-dyfis-net/7128287

19:35 staafl: it's forked from your own earlier gist, so you can ask for the diffs.

19:35 gtrak_: algal: I think it's likely that you're breaking the compojure routing contract, ie each route returns a value or nil.

19:36 if wrap-authorize builds responses that might be alright.

19:37 from the code, it looks like it throws an exception in the bad case.

19:37 something will need to catch it.

19:37 staafl: znDuff, that... worked

19:37 znDuff, thank you

19:38 znDuff, could you please explain what happened and where I can look to learn more about this configuration business?

19:39 znDuff: staafl: well, your project.clj was asking to run a function "foo" inside of the tst.core namespace, but you weren't defining a tst.core namespace at all, and didn't have a function called "foo" inside of it either.

19:40 staafl: znDuff, hmm, makes sense

19:40 serves me right for cargo-culting

19:50 bitemyapp: algal: just write a function.

19:50 algal: don't use Friend if it doesn't make sense to you.

19:51 algal: bitemyapp: I may end up doing that. It feels like overkill for just enforcing HTTP Basic, but maybe that's because the README.md is a bit unwieldy.

19:57 does anyone happen to know what the largest (e.g., users, traffic, etc.) installation of clojure is to run a web app ?

20:01 znDuff: algal: most of the big uses of Clojure I know of aren't web sites.

20:12 muhoo: a while back i saw a post in one of the clojure blogs, about a clojure library for writing tests backed by phantomjs headless browser. now i can't find it.

20:14 seangrove: muhoo: We use cljsbuild + cljs.test + a small phantom script

20:14 bitemyapp: muhoo: http://engineering.versal.com/testing/2013/03/07/shuttle-js-jvm-testing/ https://github.com/kumarshantanu/clip-test

20:15 muhoo: bitemyapp: it wasn't those, but thanks

20:15 seangrove: thanks. it was a specific library, it was very straightforward too.

20:16 bitemyapp: muhoo: https://github.com/dustingetz/cljs-bootstrap

20:16 muhoo: https://github.com/BirdseyeSoftware/buster-cljs

20:17 muhoo: naw, man. i'm pretty sure it was something i saw on planet.clojure.in. will to peruse its archives and see if i can find it now.

20:18 solussd: muhoo: https://github.com/cemerick/clojurescript.test talks about using phantomjs

20:18 muhoo: shit, stuff scrolls off of that blog :-/

20:19 bitemyapp: Imma bout to get mad. I usually win with the first two guesses.

20:19 muhoo: i. will. find. this. .... and when i do i'll post it here

20:19 bitemyapp: I never miss this hard.

20:19 I think muhoo is being too picky anyway.

20:19 muhoo: heh, you're mad? i've been trying to remember this for a half hour, looked through my notes.

20:20 bitemyapp: muhoo: lawd. Well if you find it, let us know. Sounds nifty.

20:21 muhoo: https://github.com/xeqi/kerodon

20:21 wasn't phantomjs, was ring :-/

20:22 so, your suggestions (clojure.test + cljs, shuttle, etc) are what i actually need.

20:22 * bitemyapp shakes fist angrily in muhoo's direction

20:22 bitemyapp: way to trick me.

20:23 TEttinger: https://github.com/cemerick/clojurescript.test/ yses phantom

20:24 muhoo: the dsl of kerodon looked very sweet. but in this case, yeah, i'll go with cljs.test or similar, since i need headless browser

20:44 seangrove: dnolen: dbasch and I are playing around with an implmentation of conway's game of life in cljs and canvas, and seeing a huge overhead from gc - curious how you track down these cases?

20:45 dnolen: And also, in your experience with chrome, if we're updating a 40x40 matrix every 50ms, should that cause ~7MB of GC every ~80ms? It seems unlikely

20:47 coventry: How do you measure the GC rate? That sounds useful.

20:48 seangrove: coventry: In the dev tools, you can profile over the timeline and see how long/often the GC is running in the frames section

20:48 coventry: seangrove: Thanks.

20:49 seangrove: No worries!

20:49 If it gave you more details about *what* it was GC'ing, it'd be nice though

21:21 `cbp: bitemyapp: hello!

21:22 bitemyapp: `cbp: hai

21:23 `cbp: bitemyapp: I believe I can run 10 out of 10 now :-D, just giving it some finishing touches then ill push

21:29 cldwalker__: muhoo: https://github.com/semperos/clj-webdriver is quite nice for integration testing js apps

21:39 bitemyapp: `cbp: awesome. :)

21:39 `cbp: I'll probably be looking to get a test harness together and then check for any release-ready finishing touches

21:40 `cbp: itll prolly need a refactoring

21:40 bitemyapp: `cbp: do you mind if I push it to clojars and inform the founder of RethinkDB to add Revise to their client drivers list?

21:40 when it's ready, that is.

21:40 `cbp: undoubtedly. Particularly to make it nicely testable. The connection stuff looked messy.

21:40 Not a big deal though.

21:40 `cbp: that's ok

21:40 Yeah i'll change the connection stuff to a deftype at least

21:41 bitemyapp: `cbp: awesome. You're a hero for just going ahead and writing the entire library :)

21:41 `cbp: heh it was not easy

21:41 I was basing it on the python/ruby drivers and that was a mistake

21:41 had to redesign a couple of times :P

21:42 bitemyapp: heh. That means a lot of learning happened.

21:43 `cbp: I don't think the connection needs to be a deftype though, couldn't it just be a map or a record?

21:43 `cbp: yeah im not very sure how to handle that

21:43 bitemyapp: `cbp: np, I'll take a look.

21:43 `cbp: and make it thread safe

21:44 bitemyapp: I can help with that too.

21:45 `cbp: yeah 10 out of 10

21:45 you can basically just run all of the commands in there and it should work

21:45 (pushed now)

21:46 https://github.com/bitemyapp/revise/blob/master/src/bitemyapp/revise/core.clj#L23

21:47 bitemyapp: `cbp: thooooose can be test cases :P

21:47 I like the way the API composes. Seems nice.

21:47 `cbp: yeah the only bad part is all the r/

21:47 bitemyapp: `cbp: macros >:)

21:48 `cbp: But I guess we can always just add a helper macro or something

21:48 bitemyapp: I'm waiting on that though. yeah.

21:48 `cbp: yeah

21:48 bitemyapp: `cbp: I'm heading home, I'll check in with you later.

21:48 `cbp: bye

21:52 xeqi: muhoo, bitemyapp: I think you can run clj-webdriver with a phantomjs browser backing

21:53 http://blog.zolotko.me/2012/12/clojure-selenium-webdriver-and-phantomjs.html

22:12 lrenn: when using :refer, with refer, what's the difference between putting the symbols in a list vs a vector? I see both used. Have I been missing something?

22:12 with require*

22:18 coventry: lrenn: It shouldn't make any difference.

22:18 cespare: I usually see a vector.

22:20 dobry-den: is there any drawback to this num->hex function that return hex-string for any number by using biginteger? https://www.refheap.com/20126

22:21 besides being slow

22:25 llasram: dobry-den: Aside from there being a more obvious way to do it?

22:31 dobry-den: llasram: what's the obvious way

22:33 bring it on smartguy. got something to say?

22:33 jk

22:33 llasram: haha

22:34 You know, `bit-or` with 0xff, then `bit-shift-right` by 8. Rinse, repeate

22:34 repeat even

22:34 er, bit-and even

22:35 I need to mix in some "odd"s, just for variety

22:35 dobry-den: i guess i should finally look up how bit shift works

22:35 llasram: You know what, actually your way might be best

22:36 I just remembered that the `bit-`* operations are not (yet?) defined for BigInt{,eger}s

22:36 So your way will actually work for any integral input

22:36 Whereas my way is in practice no better than just using (format "%x" number)

22:37 Oh, which may also be an option for you: ##(format "%x" 123456)

22:37 lazybot: ⇒ "1e240"

22:38 dobry-den: dang, this is easy

22:38 that

22:39 llasram: Ok :-) Keep in mind that it won't work for anything too big for a `long`, if that matters

22:39 ,(format "%x" 123N)

22:39 clojurebot: #<IllegalFormatConversionException java.util.IllegalFormatConversionException: x != clojure.lang.BigInt>

22:40 dobry-den: seems to work for bigintegers though

22:40 llasram: really?

22:40 Huh

22:40 You're right

22:40 Cool

22:40 You learn something new every day!

22:59 lrenn: coventry: i've seen both used. Sometimes in the same project. Is there an "official" way?

23:05 bitemyapp: arrdem: recover your damn computer.

23:05 arrdem: Anyone use literate programming beyond lein-marg?

23:05 bitemyapp: marginalia is the main one

23:05 tbaldridge: arrdem: my code is self-documenting

23:05 bitemyapp: I think I prefer codox (less literate)

23:06 tbaldridge: arrdem: :-P

23:06 bitemyapp: says the author of the go macro. Right.

23:06 arrdem: the sarcasm is string with this one (tbaldridge)

23:06 * arrdem gives up

23:17 pandeiro: muhoo: casperjs?

23:22 ToBeReplaced: Raynes: feel free to PM if you have any questions re: my fs PR when you get around to it

23:35 gfredericks: has anybody written a version of with-redefs for testing that does thread-local stuff, via tricks?

23:40 (to allow parallelized tests)

Logging service provided by n01se.net