#clojure log - Oct 31 2013

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

0:07 dav: TimMc: thanks

0:09 `cbp: bitemyapp: Hi

0:09 bitemyapp: got a minute?

0:15 TimMc: &((-> ! #(! [%])) []) ;; brehaut, this allocates but also uses (too much) stack

0:15 lazybot: java.lang.StackOverflowError

0:16 brehaut: TimMc: thats a mind bender

0:16 TimMc: All it does is build up [[[[[[]]]]]]

0:17 I might be able to make something that makes multiple subcalls that eventually return a larger data structure.

0:18 I wonder if I can work the Ackermann function in here somehow?

0:22 `cbp: ,(macroexpand '(-> ! #(! [%]))) ;; :-O

0:22 clojurebot: (fn* ! [p1__29#] (! [p1__29#]))

0:24 TimMc: ...and while researching the Ackermann Function, I end up on gfredericks.com.

0:24 It's a small internet.

0:25 amalloy: TimMc: as an exercise in CPS i wrote a trampolining ackermann function in clojure that uses no stack; i've lost it now, but it's a fun exercise if you get tired of swearjure

0:25 bitemyapp: `cbp: yeah, what's up?

0:26 `cbp: bitemyapp: currently the response is parsed out as {:token ## :response (..)} is that ok or should we ignore the token? The official apis ignore the token in the response AFAIK

0:27 TimMc: amalloy: Bounded stack and bounded heap allocation?

0:27 amalloy: no, of course it uses unbounded heap

0:27 bitemyapp: `cbp: I need the token to match promises with protobuf responses.

0:27 `cbp: unless I've misunderstood something.

0:27 `cbp: bitemyapp: you send the token when you send a response though, rdb doesn't generate it

0:27 TimMc: amalloy: What I mean is, bounded number of objects.

0:27 amalloy: since (ack n) takes unbounded space just to represent, for large n, let alone compute

0:27 `cbp: so in theory you already have it

0:27 TimMc: But I guess not that either.

0:28 bitemyapp: `cbp: uhm, no, I don't think you understand what I mean.

0:28 `cbp: bitemyapp: i mean when you send a query

0:28 bitemyapp: `cbp: I need the tokens to match the query results to the promises.

0:28 `cbp: that's how I'm solving the race condition.

0:28 `cbp: bitemyapp oh I see

0:28 bitemyapp: `cbp: there's no guarantee what order the queries come back in.

0:28 if query A gets sent first, takes 100ms, query B gets sent second, takes 50 ms, you have a problem.

0:28 `cbp: I wrote the test reproducing this.

0:29 the race condition.

0:29 when I replace the conn mgmt machinery, it should make the connections thread-safe and free from race conditions.

0:30 `cbp: bitemyapp: so should the user be forced to (:response @promise)?

0:30 bitemyapp: `cbp: no, but *I* need it.

0:30 `cbp: we can leave it out of the default user-facing API.

0:30 send query with token 1, associate (promise) in agent with 1 such that (agent {1 (promise)}) - then, thread-singleton pulling down results sends results back to agent, delivers protobuf message with token 1 into the (promise) and dissocs it from the agent.

0:30 `cbp: those are the semantics I have in mind ^^

0:31 I'll probably toss exceptions into the promise too.

0:32 but ideally not in the agent itself.

0:32 or the thread-singleton pulling stuff down for the conn agent.

0:35 `cbp: I'll leave it as is and leave the second part of (is (= (run query) ..)) in todo mode till we have that part ready :-p

0:50 rhg135: WB

0:50 WB

0:50 Raynes: wub wub wub

0:51 rhg135: WB

0:52 uvtc: Warner Bros? Writers block?

0:52 *Writer's

0:52 rhg135: WB

0:52 WB

0:53 TimMc: I didn't know stuttering came across in text as well.

0:54 rhg135: WB

0:55 WB

0:59 WB

0:59 WB

0:59 WB

1:01 WB

1:01 WB

1:01 WB

1:02 oh shit

1:02 there, it's off

1:07 nightfly: wrong buffer?

1:45 Shiro-Ichida: Hi. Anybody here know how 4Clojure works?

1:45 I've written something that seems to work in the online REPL, but fails when I put it into 4Clojure.

2:10 brand0: ;;last

2:13 Shiro-Ichida: u get help yet?

2:21 Mufasaa: Hi guys

2:21 a late night question for the man who suddenly had the greatest urge to learn clojure

2:22 I've found several references on how to write specific functions/maps/hashes and other idioms of clojure

2:22 but nothing that really shows you how a proper application/system written in clojure really works

2:22 ideas?

2:29 No takers?

2:29 epichero: Take up drinking, clojure isn't newbie friendly at all. *someone will think they are destined to prove me wrong so just wait*

2:34 Mufasaa: LOL, programming, with the exception of basic, should not be user friendly

2:34 I'm wrapping my brains around the concepts of functional programming

2:37 epichero: Okay, you can search for iirc clojure community cookbook. Something like that will find the github project, i'm on mobile and its a chore to dig it up

2:38 Mufasaa: Thanks, I'll look that up. Currently looking at Mark Volkmann's Snake

2:42 bitemyapp: Mufasaa: do you want a full application, say a web app?

2:43 Mufasaa: Well, I'm happy to put my grubby hands on any full app now. I'm trying to make sense out of all that I'm learning

2:47 epichero: Pedestal has some good tutorials, but its opinionated and i'd only advise it if you have fullstack experience.

2:47 wink: Mufasaa: can't speak for its quality, as I'd put myself more in the beginner camp, but https://github.com/winks/multiplex is a relatively simple webapp, a tumble log on postgres. more than hello world, but not big

2:48 epichero: Nice

2:48 wink: it's working enough that I use my own instance instead of soup.io

2:48 it even works well enough I haven't touched it in a while :(

2:48 Mufasaa: thanks

2:49 cerainly a starting point

2:49 *certainly

2:49 wink: you could also have a look at leiningen, as you'll use it anyway. But I'd say it's a little meta and complicated for the first weeks

2:50 shoshin: ping

2:50 is there a library like SciKit available in Clojure?

2:50 Mufasaa: I am using lein, but I certainly won't claim to have gained mastery

2:51 this is my 2nd day/night

2:51 wink: shoshin: if you find something and it has scikit-audiolab, please tell me :)

2:51 epichero: There are example files you should read over 10 times on the lein gh page

2:52 abaranosky: Mufasaa: what are your questions?

2:52 wink: Mufasaa: you could have a quick glance at https://pinboard.in/u:winks/t:clojure/ - it's basically all I used for learning clojure

2:52 abaranosky: I've used lein for like 2 years or more, and still I don't have mastery :\

2:52 Mufasaa: @abaranosky: well, nothing specific as yet, just looking for an application/walkthrough

2:52 wink: Mufasaa: should be a few examples and howtos in there as well

2:53 abaranosky: wink: what is pinboard? Looks like an interesting service

2:53 wink: I think http://thecomputersarewinning.com/post/clojure-heroku-noir-mongo got me hooked

2:53 bitemyapp: abaranosky: just a way to save links.

2:53 wink: abaranosky: bookmarking service like delicious et al

2:53 Mufasaa: NICE, now why did google not show me that?

2:53 bitemyapp: Mufasaa: http://github.com/bitemyapp/neubite/

2:53 wink: Mufasaa: noir is deprecated nowadays

2:54 bitemyapp: abaranosky: I would pay for a pinboard account just to support the hilarious founder.

2:54 shoshin: wink a lot of folks who do work in machine learning use Incanter. That's the one library that keeps popping up every time i look for machine learning + clojure

2:54 wink: abaranosky: I am a huge fan of it. it's a one-time payment

2:54 bitemyapp: it's one of those cool "pay once, use until I am out of business" services.

2:54 wink: shoshin: well I am not doing ML at all, just audio processing :P

2:54 shoshin: but thanks :)

2:54 abaranosky: isn't it just a spot to put my bookmarks? How's it better than Chrome bookmarks?

2:55 bitemyapp: that's a rad biz model

2:55 bitemyapp: abaranosky: some people like the less ephemeral feeling of saving and organizing bookmarks to pinboard rather than Chrome-specific cloud-synched bookmarks.

2:56 abaranosky: anyone here using Riemann?

2:56 bitemyapp: abaranosky: for example, I have 4 different chrome profiles and google accounts.

2:56 wink: yeah. multi-device, multi-browser

2:56 bitemyapp: chrome bookmark sync isn't super-duper practical for me.

2:56 even though I don't really use non-Chrome browsers.

2:56 wink: I wrote my own bookmarking tool (yes, more than one) before chrome was even conceived

2:56 possibly before firefox

2:56 bitemyapp: I've written a couple.

2:56 abaranosky: bitemyapp: I guess that sounds right. I pesonally have just accepted tht I'll always eventually lose all my bookmarks

2:57 23:16 *** tauntaun JOIN

2:57 wink: I put em online to share as reference (like I jsut did) anyway :)

2:57 bitemyapp: abaranosky: that's where I'm at now. Non-attachment to bookmarks.

2:57 abaranosky: but also... any more than 15-20 is essentially infinite bookmarks for me, and I won't read them anyhow

2:57 wink: so why not embrace a service that abstracts the details. I can backup a dump form time to time

2:57 bitemyapp: I just don't care anymore. The important stuff are usually PDFs and I just save those.

2:57 tracking down white papers can be ANNOYING sometimes.

2:58 wink: abaranosky: I just dump a filtered list on http://f5n.org/stack/ anyway

2:58 abaranosky: I am just inundated in a sea of cool information... if it is really special it will come back around again :D

2:58 wink: I'd love some more papers

2:59 Mufasaa: hmmm

2:59 abaranosky: "Japanese politician banned for wearing wrestling mask to meetings"

2:59 wink: time for breakfast. coming to work at 6 am is.. unusual

3:00 abaranosky: where is it 6am?

3:00 wink: yeah, can't be all tech stuff :P

3:00 Germany. 7:20 now

3:00 Mufasaa: so, I've cloned both, thanks guys

3:00 Canada (Calgary) 00:21

3:00 abaranosky: Mufasa: I'm always up for a code review

3:00 Jarda: .fi 8:21

3:00 abaranosky: ... if that's your thing

3:01 `cbp: sounds kinky

3:01 Mufasaa: I will hold you to that, but let me write something first in clojure :)

3:01 ROFL

3:02 for the time being, what do you guys think of this: http://java.ociweb.com/mark/clojure/ClojureSnake.html

3:02 bitemyapp: Mufasaa: you don't want me to review your code, pick abaranosky.

3:02 abaranosky: best to ping me on Twitter @Baranosky

3:02 Mufasaa: OK, will follow

3:03 abaranosky: 1. defstruct is ancient, I think it essentially deprecated

3:03 bitemyapp: Mufasaa: sorta ick. I'm @bitemyapp on twitter. Follow me even though I'm not going to help you.

3:03 There's not a good reason to use defstruct.

3:03 OTOH, I get irritated when people use defrecord for no reason too.

3:04 Mufasaa: I'm new to clojure, don't know right from wrong, this is the stuff I found on the net

3:04 bitemyapp: Mufasaa: take a look at the web app I linked you.

3:04 abaranosky: that is correct... don't use defrecord, as a beginner

3:05 that's the safest way to use defrecord when you're still learning: never use it

3:05 (quot (.getWidth size) cell-size) construction seems weird

3:05 Mufasaa: in general that code looks a few years old

3:06 bitemyapp: Mufasaa: just use maps, vectors, and sets. See how far you get.

3:06 Constraint is the harsh foster-parent of creativity.

3:07 Mufasaa: This is my second day at it

3:07 abaranosky: anyone use Riemann?

3:07 Mufasaa: Looking at it, I've cloned it and will be disecting it

3:07 abaranosky: We're starting to use it at work... looks pretty nice

3:07 bitemyapp: abaranosky: I'd lazyweb it to Twitter to see if anybody speaks up. I don't think it has a ton of users, those that I've talked to that tried it said it was really cool but ended up rolling something more manual.

3:08 I personally despise statsd and graphite, so Riemann has a special place in my heart.

3:08 `cbp: it's not very constraining at all since everything you get to the outside world gets turned to maps, vectors and sets sooner or later anyway :p

3:08 you get from*

3:08 bitemyapp: this is true. plain old data and functions go a long way.

3:08 abaranosky: we need some dissenting opinion though

3:09 we're all a bunch of fanboys here ... no good arguments to be had :|

3:09 bitemyapp: The only real "evil" I use is alter-var-root.

3:09 wink: "legacy clojure code" - aka "first world problems"

3:10 abaranosky: what are your favorite non-party-line thoughts about clojure?

3:10 Mufasaa: I'm curious, do you use clojure in your day to day work lives?

3:10 bitemyapp: abaranosky: type systems are hella useful and typed clojure excites me but it won't end up quite as slick/fluid as a Haskell/ML's type system.

3:10 wink: I committed one leiningen project to our work repo, not more until now :P

3:10 abaranosky: alter-var-root has its place... just not as often as *you* like to use it I think :D

3:10 bitemyapp: abaranosky: the inability to make practical fast-starting binaries in Clojure cripples my ability to use it outside of server stuff.

3:10 rhg135: abaranosky: try #perl for arguments ;-)

3:11 bitemyapp: abaranosky: Leiningen is probably one of the best things about Clojure.

3:11 abaranosky: bitemyapp: I wish keywords didnt'e xist, and we could have extended String to a Callable protocol

3:11 bitemyapp: whoa, I'm definitely going to disagree with you on that one.

3:11 abaranosky: that's all Keywords are practically speaking

3:12 bitemyapp: I would not want strings to be callable. it would proliferate the already annoying NPEs badly.

3:12 abaranosky: unless there is some amazing performance boost you get fro them, which I 've never seen when profiling

3:12 bitemyapp: abaranosky: the point is to indicate "intent" and separate things into a tighter and more focused fitness for purpose.

3:12 They're also more visually distinct when you're got a map of keys to string values.

3:13 abaranosky: a coworker and I theorized that the only reason Keyword existed was because there was no callable protocol to extend to Srings... especially since protocols didnt' exist when Clojure was creaed

3:13 bitemyapp: {:a "blah" :b "woot"} vs. {"a" "blah" "b" "woot"} <--- when those strings and keys are longer, it becomes harder to see where it begins and ends.

3:13 abaranosky: nah, it could've had IFn on it.

3:13 it just isn't a good idea.

3:13 abaranosky: I bye the visual thing... but then we could have some minor sugar to make it moe distinct... or just use commas

3:13 bitemyapp: (apply "blah" *) should always be a type error / exception.

3:14 abaranosky: mostly my concern with keywords is that there can becomes a lot of mental overhead in remember when things are Strings vs Keywords.

3:14 bitemyapp: commas are antithetical to Lisp syntax.

3:14 abaranosky: and sometimes its not easy to keep rack of

3:14 bitemyapp: I don't find I run into that, but I'm also very consistent about what becomes a string vs. keyword.

3:14 abaranosky: then of course you get the massive postwalking people do to keywordize json maps and such and it just begins to get ridiculous

3:14 incidental complexity even

3:14 bitemyapp: anything that crosses the barrier into the "system" gets keywordized.

3:15 welp. lol.

3:15 abaranosky: there's a point where you cant keywordize though, because of performance degredation

3:15 bitemyapp: it depends on how much the outside stringly data will "infect" the interior codebase.

3:15 if it's going to proliferate stringly keys, I'll patch the data source origin to use keywords by default, no post-walking.

3:16 abaranosky: and the word I used up there, "patch"? That's alter-var-root >:)

3:16 abaranosky: hehe

3:16 * bitemyapp cackles evilly, in keeping with the holiday

3:16 bitemyapp: abaranosky: working on Revise right now. connection management is an interesting problem.

3:17 abaranosky: when preformance tuning our real time offer system over the last few months, keywordization of data structures was costing us WAYYYYYYYYY too much time.

3:17 JSON -> EDN -> JSON was just a total performance sink

3:17 bitemyapp: abaranosky: my main Clojure heresy is my insistence that types and categories form a very compressed and efficient way to think about programs at a high level, and that they can be harnessed to help you write/modify the program.

3:17 abaranosky: I don't doubt it, that's why I mentioned patching to avoid post-walk.

3:18 abaranosky: bitemyapp: can you bring that 2nd to last message into a more concreate example?

3:18 Mufasaa: bitemyapp: OK, so this needs mongo installed, and I don't feel like messing with that at 00:38, but I will get it up and running

3:18 bitemyapp: Mufasaa: break things, make a mess, have fun.

3:18 abaranosky: I really like schemas or types at the outer layers

3:18 bitemyapp: abaranosky: well, if you don't mind the Haskell, Hoogle is a really good example.

3:18 Mufasaa: OH I will

3:18 only way to learn

3:18 abaranosky: Mufasaa: mongo is ridiculously easy to install FYI

3:19 bitemyapp: abaranosky: the blending of Monads into the type system allow it to be more expressive about what the computation is doing.

3:19 but lets start with a simpler example

3:19 Mufasaa: abaranosky: yeah, but I don't feel like doing it. The only reason I'm off is because I had surgery day before yesterday and I was pepped up on pain-killers with caffeine. Now its time for bed

3:20 thanks all, I'll be back tomorrow, with a whole slew of questions

3:20 Raynes: Feel better, sir.

3:20 Mufasaa: Ta

3:20 abaranosky: Mufasaa: tomorrow when the painkillers wear off you may wonder what the hell you were thinking learning clojrue :P

3:20 bitemyapp: abaranosky: lets say I want a function like interpose.

3:20 ,(apply str (interpose "," "abcde"))

3:20 clojurebot: "a,b,c,d,e"

3:20 abaranosky: ok intepose!

3:21 bitemyapp: abaranosky: abstractly, the type signature is a -> [a] -> [a]

3:21 takes two arguments, first one is a scalar, second one is a list of a, and the result is a list of a.

3:21 abaranosky: http://www.haskell.org/hoogle/?hoogle=a+-%3E+a+-%3E+%5Ba%5D

3:22 if I know that a particular type-class applies to my "a", I can use a qualifier like:

3:22 Ord a => a -> [a] -> [a]

3:22 abaranosky: and you can effectively search for fns this way?

3:22 bitemyapp: abaranosky: oh yes, I do so all the time.

3:23 so, between types, typeclasses, and monads I can think about the problem I am solving and if I can't remember the function I want, I can try a plausible looking type signature and generally get what I want.

3:23 abaranosky: but haskell isn't homoiconic... not sur eI could go back to the dark side

3:23 bitemyapp: abaranosky: when my emacs cursor sits on a variable name in Haskell, it shows me the type signature, which as you've seen is often quite small. This is typically all I need to know.

3:23 abaranosky: bitemyapp: that *is* interesting..

3:24 that's neat

3:24 bitemyapp: so all documentation, abstract thought, and discovery is in terms of types as far as the "practical" experience of Haskell goes.

3:24 I find that, and the experience of a compiler that's actually useful, very pleasant.

3:24 abaranosky: what kinds of problems do you think Haskell is best suited for?

3:24 bitemyapp: even in Clojure, I think in types.

3:24 because of the time I've spent with Haskell.

3:24 wink: does that have anything to do with keywords or did I lose your discussion? :

3:25 abaranosky: latter

3:25 wink: ok, good

3:25 bitemyapp: abaranosky: high assurance, anytime you want a plain old binary, stuff where you want to optimize for the kinds of things the JVM can be bad at.

3:25 "things the JVM can be bad at" to that end, you can write Haskell that generates value-types that stay in registers or on the stack without becoming references on the heap.

3:25 abaranosky: specifically, I wonder if it is good for any of the types of projects we're getting into at work

3:26 bitemyapp: so your inner loops can be pretty hot in Haskell if you want.

3:26 abaranosky: it seems to get used a lot where complicated analysis is involved. Analysis of data, code, etc. Thanks to things like Parsec, it's great for parsing.

3:26 abaranosky: just found this project yesterday... i like it a bunch: https://github.com/koalaman/shellcheck

3:26 bitemyapp: Parsec being the great-grand-daddy of Instaparse.

3:27 abaranosky: I should clone instaparse and get some scotch and an repl session going and see what becometh

3:27 bitemyapp: the only two things I wouldn't plausibly use Haskell for right now are web (clojurescript, http-kit, etc are a big win here) and datomic.

3:28 incidentally, web and datomic are 90% of my day job....so I'm using Clojure...

3:28 abaranosky: interestingly we profiled HTTP KIT vs JEtty and JEtty ended up winning

3:28 bitemyapp: hrm. I should write a Haskell Datomic client.

3:28 abaranosky: but it was close

3:28 bitemyapp: abaranosky: yeah, http-kit does better with many I/O heavy dumb threads

3:28 Jarda: if I'd need websockets is httpkit the way to go?

3:28 abaranosky: yep

3:28 bitemyapp: abaranosky: you guys are doing more analysis/CPU heavy stuff than most, aren't ya?

3:28 Jarda: da.

3:29 if I write a Haskell datomic client, I will have worked on two Clojure database libraries and one Haskell one.

3:29 egads.

3:29 abaranosky: actually, most of the time is spent going to redis and rabbit... though some of our model evaluation can take up a bunch of CPU. Depends which model is being run

3:30 Jarda: btw speaking of redis and rabbit

3:30 abaranosky: Jarda: yeah?

3:30 Apage43: throw riak in there, maybe some riemann

3:31 see how many R's you can get in your stack

3:31 in fact

3:31 bitemyapp: RethinkDB

3:31 Apage43: use R to generate graphs out the other end

3:31 Jarda: I have some HTTP routes that are using a foreign web service to fetch data. The web service can be painly slow. I thought I'd just return something like 'check this url later for your results or listen to the websocket'

3:31 bitemyapp: I'm working on the db client for RethinkDB right now.

3:31 RethinkDB, R, Rabbit, Riak, Riemann, Redis.

3:31 Jarda: but should I use some real message queue for this stuff or just carmine?

3:31 bitemyapp: and hire Relevance to slap it together.

3:31 Jarda: job-queue right?

3:31 Jarda: bitemyapp: yeah job-queue

3:32 bitemyapp: Jarda: just use carmine OR core.async

3:32 abaranosky: most of the Haskell users I know were baffled by the enthusiasm for core.async - they've had pipe, conduit, and green threads for years.

3:32 Jarda: I don't want to make sub-sequent requests to the web service. The poor service just might die ;) :D

3:32 bitemyapp: their bemusement tickled me.

3:32 (I really like core.async, for the record)

3:32 abaranosky: you could also fetch the data and stick it on S3, and give them a url to S3

3:33 Jarda: abaranosky: nah, it's not just data. It's something I store to db and process for the users

3:33 bitemyapp: abaranosky: I think my name for that is GFYA - "go fuck yourself async"

3:33 abaranosky: I highy recommend Time Baldridges youtube videos on how the core.async code works

3:33 bitemyapp: deep macros *_*

3:33 abaranosky: macros is something Haskell is weak on for sure. Template Haskell is scurry.

3:33 abaranosky: yeah I like that.... GFYS.

3:34 bitemyapp: "here's a URL, it's no longer my problem"

3:34 Jarda: I really should dig into core.async and the theory underneath it. I'm writing my bachelor of science thesis on concurrency in web applications

3:34 bitemyapp: Jarda: you really want to dig into core.async and Pedestal then, yes.

3:34 abaranosky: I was initially attracted to Shen because it is homoiconic but also has a nice type system

3:35 but then I found out how its not used for realworld code and stopped being interested in it

3:35 bitemyapp: too loopy for me. I'd rather use Haskell.

3:35 epichero: Ew haskell, its like a religion

3:36 abaranosky: epichero: HWA??

3:36 lazybot: abaranosky: What are you, crazy? Of course not!

3:36 wink: Jarda: in what form? comparing languages?

3:36 bitemyapp: epichero: if core.typed proliferates I'll be pretty happy. It's more that I like types than that I like Haskell specifically.

3:36 I just like Haskell's implementation of a practical language with a nice type system.

3:36 abaranosky: I like types alla carte... that's nice

3:36 bitemyapp: abaranosky: ho damn, you read that paper?

3:37 Jarda: wink: it might lean more towards 'web development with clojurescript' maybe I don't know. It's a bit unclear still

3:37 abaranosky: anyone have any experience with protobufs

3:37 bitemyapp: isn't that some cool stuff?

3:37 abaranosky: ...yes...me...right now.

3:37 Apage43: haha

3:37 poppingtonic: hi

3:37 bitemyapp: abaranosky: RethinkDB's protocol is protobufs.

3:37 and...I'm working on cbp's revival of Revise.

3:37 abaranosky: so you like it?

3:37 wink: Jarda: ah, I see :)

3:38 bitemyapp: abaranosky: RethinkDB or protobufs?

3:38 abaranosky: bitemyapp: protobufs

3:38 bitemyapp: They're pretty solid. A little crazy/opaque at times but better than most options.

3:38 abaranosky: bitemyapp: I actually haven't read that paper, but I guess I my hve heard the term somewhere

3:39 bitemyapp: abaranosky: the paper is about using things like monads to implement ACLs.

3:39 abaranosky: we're looking for something both faster and more self-reinforcing for our external API calls

3:39 bitemyapp: external?

3:39 you'd expose protobufs to an external caller?

3:40 abaranosky: what does that have to do with types all carte though?

3:40 external / internal

3:40 they're in the same company, but a different division

3:40 Apage43: ah

3:41 abaranosky: as opposed to giving them JSON, then getting stuck fixing all the times when they don't follow our spec properly

3:41 bitemyapp: abaranosky: well, protobufs do a good job of telling the other guy to shove it if he gets the binary blob wrong.

3:41 Apage43: that's basically (as I read it) the intended use case

3:41 abaranosky: also, it'll make our services even faster, which is nice

3:41 bitemyapp: abaranosky: yeah if it's cross-departmental but still "internal'ish", I'd use protobufs with a versioned API.

3:41 abaranosky: "protobufs do a good job of telling the

3:41 other guy to shove it if he gets the binary blob wrong." heck yeah

3:42 bitemyapp: protobufs handled RethinkDB's arbitarily recursive documents and lambdas pretty nicely.

3:42 abaranosky: bitemyapp: good, that seems to be what we're most likey to be doing

3:42 bitemyapp: and trust me, nothing will gork your brain like trying to read recursive binary representations of higher order functions.

3:42 Apage43: if you follow the rules (you only ever *add* stuff to the definitions) you at least get past the point of message encoding/decoding pretty quick and don't have to worry about that

3:42 abaranosky: bitemyapp: oh wow, so the data description language is pretty powerful then

3:42 Apage43: then you can deal with the *actual* problems

3:42 bitemyapp: abaranosky: soorrrrrtaaaa

3:42 Apage43: ha

3:43 actually most of that comes out of how protobufs are encoded

3:43 abaranosky: :'(

3:43 Apage43: the actual definition is sorta dumb

3:43 if you have a protobuf in a protobuf

3:43 bitemyapp: let me just show you the proto file

3:43 abaranosky: https://github.com/bitemyapp/revise/blob/master/resources/proto/rethinkdb.proto

3:43 Apage43: it basically encodes that as an opaque blob, and the decoder because it knows the definition can do the right thing

3:44 abaranosky: Maybe I can generate protobuf data descriptions with macros :)

3:44 bitemyapp: abaranosky: it is worth noting here that these protobufs are serializing...JSON.

3:44 so the semantics of the API are still arbitrary documents

3:44 Apage43: but that's also nice, as it allows old decoders to ignore new fields they don't care about, always

3:44 abaranosky: (kidding btw)

3:44 bitemyapp: even if protobufs themselves aren't.

3:44 abaranosky: you definitely could.

3:44 you shouldn't, but you could.

3:45 abaranosky: "message Term {" is where the lambda horror begins.

3:45 abaranosky: bitemyapp: macros are the crack cocaine of Lisp coding

3:45 ... you shouldn't, but you could

3:45 bitemyapp: abaranosky: and then the RQL lang itself looks like the example on here: http://rethinkdb.com/

3:45 but again, because it's just protobufs, you can adapt it to the semantics of your language.

3:45 Apage43: the protobuf is a sort of AST-encoding on the wire

3:46 abaranosky: bitemyapp: I need to read that file more closely when its not as late

3:46 Apage43: so each client library builds that in a way that is semi-familiar to users of the host language

3:46 bitemyapp: ^^ yep.

3:46 Apage43: well, high level language users yes. Java users no.

3:47 the Java client library stalled out when they got to the lambdas. This made me laugh more than it should've.

3:47 Apage43: Java always gets the short straw

3:47 abaranosky: they like them though :\

3:47 bitemyapp: but OTOH, it means the Clojure library (revise) has a good excuse to work with a clean, zero-java library.

3:47 Apage43: I always feel a bit sad when I look at java-datomic or jcascalog

3:47 writing your query as a bigass string

3:47 bitemyapp: Apage43: I feel a bit sad as a Clojure and Datomic user and everytime I check the docs they use Java to demonstrate something.

3:48 abaranosky: I always feel like I do when I see people wearing bell bottoms, when I think of Java coders

3:48 but the reality is some huge percentage of all programmers are C# or Java programmers

3:48 Apage43: but but that's.. data... why are you putting in in a string like that... stop :(

3:49 bitemyapp: Apage43: strings and Object are the dynamic types of Java-land.

3:49 and XML strings.

3:49 Apage43: C# has a few niceties that I would really not mind if java stole

3:49 abaranosky: bitemyapp: if only Java users had Keywords...

3:50 C# is a better JAva... except for the VM

3:50 bitemyapp: Apage43: I want .NET VM's TCO support.

3:50 abaranosky: and the libraries...

3:50 abaranosky: after I said the VM part i realized I was full of shit

3:50 bitemyapp: Java libraries are better and more plentiful even if the language is worse.

3:51 abaranosky: it is more the libraries, and open source community around Java is better

3:51 Apage43: I try not to think about it

3:51 abaranosky: like you said CLR has TCO, and also reified generics

3:51 Apage43: it's one of those things where part of me wants to shout "It didn't have to be this way!"

3:51 but it is that way

3:51 so

3:52 abaranosky: Apage43: what language do you work in?

3:52 Apage43: for money? C++ and Erlang mostly.

3:52 or plain C, depending.

3:52 bitemyapp: ^^ a more patient man than I

3:52 Apage43: how prolific is the use of Dialyzer there?

3:53 Apage43: none of which by preference of course =P

3:53 bitemyapp: the CI system runs it when the CI system isn't down.

3:53 bitemyapp: LOL

3:53 sounds typical for CI.

3:53 abaranosky: I'd say the market in the Bay Area is wide open for Clojure devs

3:53 Apage43: but basically we've all gotten really good at writing the sorts of bugs dialyzer doesn't catch

3:54 abaranosky: every clojure place I talk to has a tough time fidning good devs

3:54 Apage43: it probably has saved the erlang bits from getting too crufty though, since it is good about complaining when you have unreachable code

3:55 bitemyapp: I wonder what the ratio of Haskell aspirants and open positions looks like in comparison?

3:55 Apage43: that's pretty cool.

3:55 abaranosky: bitemyapp: I wonder... How many positions do you think there are open? I have no real feel for that

3:56 Apage43: the main gripe is that noone actually runs it on their laptops/before committing to review

3:56 abaranosky: bitemyapp: Haskell positions, I mean

3:56 Apage43: largely because if you don't have the stuff it caches handy

3:56 bitemyapp: abaranosky: I don't know really, I know Galois is one of the more well known employers.

3:56 Apage43: a run from scratch takes a good 20-30 min

3:56 bitemyapp: it seems like Haskell is getting increasing popular in finance. I seem to see a lot of funds and banks hiring for Haskell lately.

3:56 Especially abroad.

3:56 Apage43: or it did last time I tried

3:56 epichero: I'm still struggling to develop my clojure skillls. I like the challenge but the documentation for clojure libs is just horrid

3:57 Apage43: probably better now on my newer laptop

3:57 bitemyapp: Apage43: never going to complain about core.typed's runtime ever again.

3:58 abaranosky: epichero: I never thought I'd say something like this, but in some sense it is true: ... you don't need quite as good docs in Clojure as you would in Java, because the code is usually very easy to peer into and see what it is doing

3:58 bitemyapp: abaranosky: the denser expression of intent enables this.

3:59 abaranosky: given that, imagine what types do for you?

3:59 with types, you don't even need to read the code ^_^

3:59 abaranosky: ... also since M-. is so common in Emacs, I don't feel the huge separation betwen *my* code and *their* code

3:59 bitemyapp: abaranosky: yissss I love M-.

4:00 dancing in jars to understand code is a great feeling

4:00 abaranosky: but

4:00 Apage43: I'm quite happy that the vim-fireplace equivalent works really well also

4:00 C-] I think is the mapping there

4:00 abaranosky: but I've already got the Clojure bug... so I'm pretty much not a good person to ask about that kind of stuff

4:00 epichero: I have been using a heavily customized emacs with evil

4:02 I like clojure, i'm still trash at it but i'm learning. I like the community a lot and i just wish the docs were better

4:02 abaranosky: I wish it was easier to get into

4:03 a lot of what I know is from a ton of experience, and then also working closely with other Clojure devs with a bunch of experience

4:03 there's a lot of stuff you pickup as you go... tooling and how to use leiningen and lcojars etc

4:03 epichero: Its been the most difficult language to get into... The hardest workflow to set up and the most obtuse tooling

4:04 Its not the language as much as everything else

4:04 * Apage43 setup autotools once

4:04 bitemyapp: interesting. I found Leiningen refreshing.

4:04 going to say Apage43 knows real pain here.

4:04 Apage43: i still don't understand how any of it works

4:05 we have a guy at the office who knows autotools front to back but will only answer questions with some variant of "you should just read the manual"

4:05 abaranosky: bitemyapp: i din't mean to say leiningen was hard... just that in general learning all the tools was hard for me

4:05 Apage43: by which he means actually read it cover to cover

4:05 abaranosky: I was *not* an Emacs guy...

4:05 Apage43: not try to use it as reference

4:07 epichero: Emacs is awful, i have it customized to the point i can't tell its emacs and therefore tolerate it. Everything gnu is a nightmare

4:07 ddellacosta: epichero: I find that really strange because I got up and running with lein really quickly. That + 4clojure got me up and running pretty quickly. I have never found the tools too challenging.

4:07 abaranosky: Emacs is amazing

4:07 Apage43: gnightmare?

4:07 abaranosky: hehe

4:07 I used to hate it

4:07 ddellacosta: epichero: not an emacs lover? Huh, well, I'm biased as I've been using it for years, but I think it's fantastic.

4:07 abaranosky: but I respect any dissenter's opinions there :)

4:07 ddellacosta: I think you'll find the Emacs love in the Clojure community is strong.

4:08 abaranosky: yep, always good to hear dissenters.

4:08 epichero: I use it, i have it super customized to overpower the awful

4:09 Apage43: I manage to get into it when I actually have the chance to do nothing but Clojure for a while, but I have so much vim in my muscle memory (and so much custom configuration there) that it's hard to try and learn a new thing when I actually need to get stuff done

4:09 as it's very frustrating to have a thing I'm already reasonably competent with also handy

4:09 ddellacosta: epichero: so, I'm curious about what you find is awful about emacs, but I'm more curious about what you find challenging about the clojure environment. Is it leiningen? Is it stacktraces? Etc.

4:09 epichero: I have emacs evil so seamless it feels like vim

4:09 Apage43: it's the same problem as trying to learn a new keyboard layout

4:10 abaranosky: epichero: some more specifics other than "the awful" would really help bring this home for us

4:10 ddellacosta: well, if vim is your tool of choice, there's no getting around it. But there is also pretty good Clojure/nrepl integration with vim I thought.

4:10 abaranosky: FYI: I'm talking to you all right now via an Emacs buffer

4:11 Apage43: the main thing that stops me using emacs/clj once I've gotten back into the groove is when I manage to hang it, usually by doing something stupid in a repl =P

4:11 epichero: You can name all these things you know what is awful is having to learn all of it just to get code to run, its not one thing. And having to change to lein2 when i was a month in is probably why i am so bitter about it

4:11 Apage43: ddellacosta: fireplace is quite nice, but if you really like having a REPL buffer you'll find it lacking

4:11 poppingtonic: who's managed to upgrade from nrepl.el to cider?

4:11 ddellacosta: Apage43: ah, okay. I am pretty ignorant of it since I am an emacs guy, but just have heard it's decent.

4:12 abaranosky: I don't like the name, so haven't upgraded :P

4:12 what are CIDERs new features?

4:12 Apage43: it does most of the stuff you want, doc strings, jump to def, eval blocks, etc., it just doesn't have a repl buffer

4:12 epichero: Theres also redl vim-redl i think its called

4:12 ddellacosta: epichero: so, anything still remaining in the clojure environment that bugs you? Leaving aside bitterness w/lein 1->2 transition

4:12 scottj: abaranosky: I don't think there are any big new features yet

4:13 abaranosky: I'm craving apple cider now

4:14 ddellacosta: abaranosky: dammit, stop it, I'll want some too

4:14 abaranosky: is the talk schedule for the conj up yet?

4:16 it's friggin weird that the conference is in two weeks but no talk schedule up yet

4:49 poppingtonic: there really isn't a talk schedule for the Conj?

4:51 abaranosky: do you see one? http://clojure-conj.org/

5:07 poppingtonic: http://lanyrd.com/2013/clojureconj/schedule/

5:21 abranosky, http://lanyrd.com/2013/clojureconj/schedule/

5:27 ddellacosta: anyone set anything up in emacs nrepl where you can save a different history for cljs repl vs. clj repl?

5:27 have no idea if it is even possible, but that would be so handy

5:27 john2x: is it possible to colorize the output of terminal `lein repl`?

5:28 or an alternative repl, like ipython/bpython

6:56 bordatoue: could anyone tell me how to catch clojure runtime exception; for example if type something like (map + [1 [2] 3]) I need to catch ClassCastException thrown when map is evaluated.

6:59 pyrtsa: ,(try (map + [1 [2] 3]) (catch ClassCastException e "oops."))

6:59 clojurebot: pyrtsa: Huh?

6:59 pyrtsa: Doh.

7:00 bordatoue: pyrtsa: try catch doesn't seem to work

7:01 pyrtsa: Interesting.

7:02 bordatoue: I think it is wrapping RTE into something else

7:03 pyrtsa: No, even finally fails to.

7:03 ...to evaluate.

7:03 ,(try (map + [1 [2] 3]) (finally "oops."))

7:03 clojurebot: pyrtsa: Titim gan éirí ort.

7:05 bordatoue: nice, I would be interested to see a solution. I am using clojure 5

7:07 pyrtsa: Oh, actually I was wrong. Finally works just fine (when you do a side effect in it.)

7:09 bordatoue: pyrtsa: so is it the try catch not working , even with side effect

7:09 pyrtsa: Ha! Now I know.

7:09 It's because map is lazy.

7:10 The function call is only evaluated after the (try ...) form.

7:10 ,(first (map + [1 [2] 3]))

7:10 clojurebot: #<ClassCastException java.lang.ClassCastException: Cannot cast clojure.lang.PersistentVector to java.lang.Number>

7:10 pyrtsa: And...

7:10 ,(try (first (map + [1 [2] 3])) (catch ClassCastException e "oops"))

7:10 clojurebot: pyrtsa: No entiendo

7:10 pyrtsa: Doh, again. X-)

7:11 (try (first (map + [1 [2] 3])) (catch ClassCastException e "oops"))

7:11 ,(try (first (map + [1 [2] 3])) (catch ClassCastException e "oops"))

7:11 clojurebot: pyrtsa: No entiendo

7:12 pyrtsa: Ok, clojurebot is not nice with this. It catches the exception just okay on the REPL.

7:12 bordatoue: So the reason is, the result of (map ...) is only evaluated when being printed. And that's too late for the try block to handle.

7:13 bordatoue: pyrtsa: I saw it, so do you think it is because of lazy eval

7:13 pyrtsa: ,(let [_ (map + [1 [2] 3])] "this works because of lazy eval")

7:13 clojurebot: "this works because of lazy eval"

7:14 pyrtsa: map uses chunks of 32 by default, so that's why my example with (first ...) also threw the exception.

7:15 bordatoue: when i added doall it seems to workk

7:15 pyrtsa: thanks

7:15 pyrtsa: Yeah, doall forces it to evaluate. Cool.

8:12 poppingtonic: wow...the clojuredocs blog is dead :( http://clojuredocs.wordpress.com/

9:19 cemerick: dnolen: we've already talked about how source maps / incr compilation are difficult to test in an automated way, but I wonder if you could e.g. update https://github.com/clojure/clojurescript/wiki/Running-the-tests at some point to include an old-school test plan for those features? I still think you're the only one that knows how they're actually supposed to work. :-)

9:20 dnolen: cemerick: I've added three blank test files for compiler, analyzer, and closure - largely because of my frustration with closure.clj

9:21 cemerick: we need tests, I honestly understand the design of closure.clj the least

9:21 so that would be a good place to start

9:22 cemerick: dnolen: blank test files? You mean in the repo under /test?

9:23 dnolen: closure.clj is...odd. :-) It's actually the bit I grok the most :-P

9:23 ended up picking through it pretty closely at one point for REPL stuff and the :libs change, etc

9:26 dnolen: cemerick: yes, under test/.

9:30 cemerick: updated the wiki to mention running `lein test`, not sure what more there is to say at this point :)

10:07 gfredericks: if I'm trying to optimize by working with primitives, using definline should make in unnecessary to typehint the args/return-value of the inline functions, correct?

10:15 clgv: gfredericks: if it is inlined yes

10:15 gfredericks: in other cases you can't use the primitive optimization with standard clojure anyway

10:16 gfredericks: I mean when you pass along the function as parameter

10:24 devn: yay for simple-check

10:24 finding yet another bug without making me "brane good"

10:34 ubikation: hey I'm having a lot of trouble getting used to the emacs/cider workflow. specifically I can't even seem to get C-M-x to execute the pregenerated -main function... what am I doing wrong?

10:35 llasram: ubikation: Is the issue that evaluation of a form != execution of the function that form defines?

10:36 ubikation: llasram: yes, I believe so.

10:36 llasram: I usually just call functions from the REPL

10:37 If there's a block of things I have just for dev, I might put it in a `comment` form, and which then lets you use C-M-x etc to evaluate the form

10:37 (the form in the `comment` form -- not the `comment` itself, obviously)

10:38 ubikation: I'm getting this: CompilerException java.lang.RuntimeException: Unable to resolve symbol: -main in this context, compiling:(/tmp/form-init6913950184920876258.clj:1:1)

10:44 gfredericks: clgv: right

10:45 llasram: ubikation: Probably your REPL is still in the `user` namespace

10:45 You need to either `require` your namespace into `user`, or just switch the REPL to the namespace you're working on

10:46 ubikation: Easiest default bindings for the latter are C-c M-n w/in the file for the namespace you want to visit

10:46 ubikation: what tutorial would you recommend? I've been looking online and I can't seem to find a current one about cider.

10:47 llasram: thank you!

10:49 llasram: np. Tutorials though -- good question. I'd have thought clojure-doc.org would have a good one, but I don't see anything which seems like the right level

10:49 I think the best suggestion I have is just cider's documented key bindings, which definitely isn't a great starting point :-/

10:59 ubikation: what does ->> mean? what is it's name?

10:59 mdrogalis: Thread-last.

10:59 Takes x and 'threads' it through the end of each form.

10:59 ,(->> 1 inc dec)

10:59 clojurebot: 1

11:01 joegallo_: ,(let [m {:foo 1}] (->> m (assoc :bar 2) (dissoc :foo)))

11:01 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to clojure.lang.Associative>

11:01 joegallo_: derp, that was a thread-first example

11:01 i'm a moron

11:01 thread-last is really good for stuff with seqs, let me redo that

11:01 mdrogalis: :)

11:02 joegallo_: ,(let [s (range 10)] (->> s (map inc) (filter even?) (take 3)))

11:02 clojurebot: (2 4 6)

11:02 joegallo_: you can imagine that the result from each expression is being inserted (threaded, you might say!) as the last argument into the next expression...

11:03 it allows you to take something like this (foo (bar (baz (quux blah)))) and flip it inside out (->> blah quux baz bar foo)

11:10 mynomoto: Is there an easy way to get the file name from a namespace? I know that I could use bultitude to get a list of files and find a match, but I would like to know if there is another way.

11:10 llasram: mynomoto: What's your higher-level goal?

11:13 mynomoto: llasram: I have a library that finds repetitions in code: https://github.com/mynomoto/repetition-hunter and it needs to read the source file. But it only finds the source if it is under src/ in the way I wrote it. I want to make it more generic.

11:14 llasram: Interesting

11:14 Well, vars in the namespace have the source files they came from as `:file` metadata

11:15 Which might be as good as you can get, since -- although uncommon -- a namespace may be implemented across multiple files

11:17 mynomoto: Yes, I saw this http://stackoverflow.com/questions/13955580/in-clojure-how-do-i-get-the-file-name-of-the-current-namespace But, then I would need to find a var in the namespace to find the file. Or ask the user to provide it.

11:18 llasram: mynomoto: The `ns-map` function will return a map of all names to vars for the namespace

11:19 ,(->> 'clojure.core the-ns ns-map vals (map (comp :file meta)) distinct)

11:19 clojurebot: ("clojure/core.clj" nil "clojure/genclass.clj" "clojure/core_deftype.clj" "clojure/gvec.clj" ...)

11:20 llasram: Huh, `nil`

11:20 Probably because clojure.core

11:21 mynomoto: llasram: Thank you. I think that will work. Unless the user has no vars in the ns :)

11:22 Is there a good reason to have clojure files outside src/ or test/?

11:22 llasram: I've got one project with source files in a top-level `examples` directory

11:23 ddellacosta: mynomoto: I think leiningen lets you do whatever you want, doesn't it?

11:23 llasram: ddellacosta: they did say "good reason" :-)

11:23 joegallo_: llasram: ns-map returns java imports and stuff, too, which ends being a lot of the nils

11:24 llasram: joegallo_: Ahhh, didn't think of that

11:24 ,(->> 'clojure.core the-ns ns-map vals (filter var?) (map (comp :file meta)) distinct)

11:24 clojurebot: ("clojure/core.clj" "clojure/genclass.clj" "clojure/core_deftype.clj" "clojure/gvec.clj" nil ...)

11:24 llasram: nice

11:24 wait

11:24 still there!

11:24 Crazy

11:24 ddellacosta: llasram: I mean, I guess what I'm saying is, it's a convention, so you adhere to conventions for...all the reasons one adheres to conventions. Otherwise, you have to figure out the "good reasons."

11:24 joegallo_: well, i mean, there's still some crazy stuff because of it being clojure.core, too :)

11:24 llasram: ddellacosta: Oh, sure. Was just joking :-)

11:25 joegallo_: So it would seem

11:26 ddellacosta: llasram: yah, gotcha. ;-)

11:31 mynomoto: Thank you guys. I will try the ns-map solution.

11:41 hoangelos: I'm using clojure.java.sh/shell and calling a 3rd party command-line application that requires the password to be passed in via command-line. If there's an error the command and the options get returned in the log. I'm trying to figure out how to stop the library from doing that.

11:41 sorry clojure.java.shell/sh, but same issue

11:42 TimMc: "requires the password to be passed in via command-line" makes me want to strangle puppies

11:43 Do you have any alternative? All command line arguments are visible to all users on the system, including reduced-permission accounts.

11:44 (I've had an intrusion on my system that only compromised a guest account, but it still could have seen command line arguments and potentially used that to escalate privileges.)

11:44 hoangelos: TimMc: you and me both...we have submitted this as bug to the library, but so far no

11:46 I understand why this is bad, but need that script. and so what I'm trying to do is squelch the logging at least so it's not in the logs. I realize that anyone with access to the account could see it in the bash history

11:46 jcromartie: hoangelos: what does the logging?

11:47 and does it really show up in bash history?

11:47 hoangelos: jcromartie: Well the line is coming from clojure.java.shell

11:47 jcromartie: can you rebind *out* or *err* if it's using those?

11:47 sorry, not familiar with the code

11:50 hoangelos: jcromartie: We are using :out, so even if we could we need it.

11:50 jcromartie: I don't understand this part: "If there's an error the command and the options get returned in the log."

11:52 hoangelos: so let's say there's a coding error. (I haven't tested this with password wrong case) and the command line arg is wrong. It will print the full command-line including this password and print it to the log and/or the output depending on the situation.

11:53 jcromartie: what is "the log"

11:53 sorry, I might be dense

11:53 hoangelos: it's a log for the application

11:54 jcromartie: AFAIK clojure.java.shell/sh either throws an exception (thrown by the underlying Java lib) if the command doesn't exist, or else returns stdout and stderr as :out and :err keys in the result

11:54 it's up to you to log it

11:54 or not

11:54 it doesn't print anything

11:55 hoangelos: well this is clearly seen as an exception by clojure/java

11:55 TimMc: hoangelos: Good on you for filing a bug, by the way.

11:57 hoangelos: but this is a clearly ending up in the log, and my application isn't logging it. And there's a lot of stdout activity that isn't ending up in the log, but this one is.

11:58 jcromartie: huh

11:58 example?

11:59 muhoo: hoangelos: use conch maybe?

11:59 jcromartie: ^

11:59 hoangelos: I am wrong. wow. they have created a wrapper that logs this. So this his another developers fault. And apparently I need more coffee. Well this suddenly is easier to solve.

12:00 jcromartie: I thought so

12:00 hoangelos: before my coffee everything is mysterious and full of paranoia

12:00 * jcromartie finished his coffee

12:00 TimMc: hoangelos: So the third-party app is doing th elogging?

12:00 mdrogalis: I keep forgetting and remembering that it's Halloween. I get happier every time I remember.

12:00 TimMc: Or were you not calling sh directly?

12:01 mdrogalis: I'm just glad the Red Sox won last night and not tonight. It gets crazy around here...

12:01 jcromartie: I was gonna say… I just basically wrote the same thing (before I realized clojure.java.shell existed) and have no idea how it would be possible

12:01 TimMc: (I only follow sports enough to make sure I don't end up in the middle of a riot.)

12:02 hoangelos: TimMc: no, the application was. they created an app that the developer said only caught the error, but also does logging, which I didn't notice before.

12:02 mdrogalis: TimMc: Feeling lazy, who's winning the series?

12:02 I saw that obstruction call, heh

12:02 hoangelos: Sox already won

12:02 mdrogalis: Oh, its totally done? Wow.

12:02 That was fast.

12:03 TimMc: I'm also glad not to be living near Fenway Stadium. :-P

12:03 mdrogalis: Fact.

12:04 TimMc: Last time, people Flipped. The. Fuck. Out.

12:05 teslanick: Last time, there was a riot at the college I went to when the Sox won the last game of the… playoffs? Is that what it's called?

12:09 mdrogalis: teslanick: World series, maybe

12:13 teslanick: It was after the last game of the American League Championship Series. The Red Sox and Yankees; the Sox lost the first three and won the last four, making it a dead heat until the end. Winning that put them in the world series. So the students decided to have a riot.

12:14 TimMc: "We are so happy! Let us destroy everything!"

12:14 Someone was killed by a cop in Boston the last time the Sox won.

12:14 Rubber bullet.

12:15 So like I said, I'm glad it didn't coincide with Halloween.

12:22 jcromartie: http://en.wikipedia.org/wiki/Death_of_Victoria_Snelgrove

12:23 anyway

12:27 TimMc: (Oh, a pepper spray round, not a rubber bullet.)

12:36 silasdavis: There's no way to destructure the first and last element of a list longer than 2 right?

12:37 clgv: silasdavis: why not? if you now at compiletime how long it is...

12:37 ,(let [[a b c d e f g h] (range)] h)

12:37 clojurebot: 7

12:38 silasdavis: sorry that is the key point, I don't

12:38 clgv: silasdavis: destructuring always assumes you now the relevant part of the structure

12:38 silasdavis: just use `last` then

12:39 hlship: abaranosky: counterbalanced by the lack of types meaning you need to do more to specify what is passed in and returned. And in any language you don't need describe how your code works, you need to describe when and why you would call it.

12:44 mikerod: I have a map that I create at macro-expansion time. The map has a :name key that holds a symbol that is intended to be resolved later on when explicitly passed to `resolve`. This generally works, however, I have noticed at runtime, sometimes the symbol within the map is resolved already, when I was expected it to still be a symbol.

12:45 so this would cause a failure if I expected a symbol, and call `resolve` on it obviously. Now, the suspect I have for this behavior is that I wrap an access to this map in a `filter` call, which is lazy.

12:46 does any of that make any sense? I am surprised at the behavior of explicitly defining a map with a value that is a symbol at macro-expansion time, but then it "auto" resolving later, before I ever try to resolve it.

12:46 justin_smith: mikerod: wait, what would cause a symbol to be treated as a var? is this something that happens at macro-expansion?

12:47 if you construct it by calling (symbol "some-string") I think that would avoid implicit resolution

12:48 erdos: hello, i see that add-watch works with iref types agent/atom/var/ref, but does not work for delay/future/promise. They have 'realized? in return. Do you have an idea on simulating add-watch for them? I would like to do it without wrapping or timed polling. thanks.

12:49 justin_smith: erdos: they only get a value once, so you can create a thread that calls deref, then does what you want as soon as the deref completes

12:50 (future (do-something (deref some-future)))

12:50 where some-future is the one that you want to trigger the event

12:50 mikerod: justin_smith: I basically have a macro that takes an [defname othername] returns `(def ~defname {:name ~(symbol (str *ns*) (str othername))})

12:51 justin_smith: the deref will block until the value is available, and the value is guaranteed to never change again

12:51 mikerod: later on, I'd expect to see this map as a {:name some.ns/othername}

12:51 justin_smith: mikerod: move the call to symbol outside the ~

12:51 otherwise the macro sees the symbol, so tries to resolve it

12:52 `(def ~defname {:name (symvol ~(str *ns*) ~(str othername))})

12:52 s/v/b of course

12:53 mikerod: That makes sense, I didn't clearly write it I think though. During the macro-expansion time, this thing remains a symbol. It is runtime that it is getting implicitly resolved.

12:53 Lets say it is more like:

12:53 trptcolin: tbaldridge / other core.async devs: i've got a patch to fix some cljs breakage on master. i can submit through jira if you want, but i'm assuming it's more expedient to just have you folks do it given the tiny-ness: https://gist.github.com/trptcolin/3e63ac0e9b9ec797b388

12:54 mikerod: (let [outmap (parse-map (symbol (str *ns*) (str othername))] `(def ~defname outmap))

12:54 trptcolin: lemme know if you want a jira ticket anyway

12:54 tbaldridge: trptcolin: yeah a simple post of this gist to a JIRA ticket would be nice. I work through as many bugs as I can each Friday, so I can get this fixed in the morning.

12:54 mikerod: (defn parse-map [sym] {:name sym})

12:55 trptcolin: ok

12:55 mikerod: forgot a ~ up there `(def ~defname ~outmap)

13:01 justin_smith: mikerod: ok, then I really don't know what isn't working there

13:01 sorry

13:03 mikerod: justin_smith: *most* of the time, when I look at the map later, I see an unresolved symbol. I think it was when I switched one statement from `filterv` to `filter` (being called on a collection involving this map at macro-expansion time) I started seeing it implicitly resolved.

13:04 TimMc: hyPiRion: In honor of Halloween, I might do a little work on the Clojure->Swearjure compiler tonight.

13:05 I'd love to be able to mechanically convert something like this https://gist.github.com/timmc/7252229 into swj.

13:08 hyPiRion: TimMc: oh sweet

13:09 TimMc: I was kind of tempted to write a Swearjure interpreter in C, just to see how bad it would be.

13:14 TimMc: yikes

13:15 trptcolin: uhhhh, does jira have a new feature where it automatically assigns tickets to Rich? I definitely didn't select him as the Assignee

13:16 rhickey please don't burn my house down, i don't expect you to necessarily handle this patch.

13:23 whilo: tbaldridge: what is the proper way to send input to clojure-py? i am using the send to interpreter command from python-mode in emacs, but it seems to break with line-breaks, i have to put all expressions on one line

13:28 Jarda: anyone have any idea why this happens:

13:28 http://pastie.org/8445945

13:28 fresh checkout of clojurescript from master

13:32 timsg: dnolen: I remember there's something sketchy about using recur in a core.match statement, how does that work again?

13:33 Bronsa: Jarda: you have an older version of tools.reader in your classpath

13:34 dnolen: timsg: you'll lose code size optimization

13:34 Jarda: Bronsa: aha

13:34 timsg: dnolen: how bad is that? I remember there's some exponential growth, but I forget what it's exponential on

13:35 dnolen: timsg: pattern matching will always generate exponential code, but it'll be worse

13:35 timsg: dnolen: hm, thanks

13:36 dnolen: timsg: I'll probably change core.match to a state machine a la core.async at some point but not in the near future.

13:36 Jarda: hmm.. So I should be able to run clojurescript tests with lein test-all right?

13:36 I'm getting Could not find artifact org.clojure:clojure:jar:1.6.0-master-SNAPSHOT in cloja at clojure.lang.Compiler.analyzeSeq(Compiler.java:6548) │rs (https://clojars.org/repo/)

13:37 oops, paste fail

13:37 but anyhow, 1.6.0-master-SNAPSHOT can't be found

13:38 timsg: dnolen: yeah, I'm trying to think of a way to do moderately complicated low-level loops without going crazy; core.match seems like it might meet many cases because it lays out the logic in a matrix-ish way that's easy on the eyes. Since you mentioned it I've really been missing named loops

13:46 dobry-den: timsg: so there's an issue with this?: (loop [x 1] (match x [1] (recur (inc x))))

13:48 dnolen: Jarda: are you trying to run the ClojureScript tests in the ClojureScript repo?

13:49 timsg: dobry-den: yeah, I think the expanded code size gets hairy as you add cases

13:50 dobry-den: I guess that has to be pretty extreme before it's worth caring about, but I hear it gets pretty extreme fast

13:52 dobry-den: ive built a few complicated state machines with go-loop/recur and nested conds this week. i never looked into core.match until i read yalls convo.

13:53 im gonna give it a shot and see what code it generates because it looks much better than my daisychain of cond/else

13:53 timsg: dobry-den: cool, I'd be interested how that goes. yeah match is really pretty

13:54 TimMc: I can't wait for core.match to reach 1.0.

14:03 patrkris: there's a quote attributed to Timothy Baldridge that says someting like "Test systems - not functions"... where does he say/write that?

14:03 mdrogalis: In #datomic to me lol

14:03 bbloom: patrkris: tbaldridge hangs out in here

14:04 mdrogalis: Chat logs are fair game to pick out brilliant quotes from. :)

14:04 patrkris: ah... I thought he called himself halgari here (like he does on github) :D

14:06 mdrogalis: it's exactly your blogpost that makes me ask :) but cool

14:13 patchwork: If I declare a function inside a defn in a (letfn …) does that function get created every time I call the function? Or is there some optimization for that?

14:13 bbloom: when the code is compiled, it will create a java class. on subsequent runs, the function's class will be instantiated via new

14:13 irrc

14:13 iirc* rather

14:14 either way, don't worry about it :-)

14:14 also: total newbie question: what's wrong with (. (symbol "java.lang.System") nanoTime)

14:15 patchwork: bbloom: So isn't that creating an object each time the function is called, whereas if it was defn'd on its own it would not?

14:15 I don't know why I worry about this stuff

14:16 bbloom: also: the symbol 'java.lang.System and the actual System class in the java.lang namespace, both have the same printed representation, but one is of type clojure.lang.Symbol and the other is of type java.lang.Class

14:17 patchwork: except that if it was defn-ed on it's own, every reference to the symbol name is actually resolved via an extra indirection. something like this:

14:17 ,@#'clojure.core/inc

14:17 clojurebot: #<core$inc clojure.core$inc@1ac1b8f>

14:17 bbloom: patchwork: the bottom line is that there is overhead for referring to names & the JIT is pretty good about eliminating that overhead, so don't worry about it

14:18 also: bbloom: so, given the signature (. Classname-symbol method-symbol args*), how do I satisfy the Classname-symbol argument?

14:18 patchwork: bbloom: cool, thanks!

14:18 ToxicFrog: also: compare the value of (type java.lang.System) and (type (symbol "java.lang.System"))

14:19 bbloom: ToxicFrog: the type function is kinda cruft, just use the clojure.core/class function

14:19 also: dot is a special form, so the compilar interprets it's arguments specially

14:19 amalloy: patchwork: fwiw, allocating the object is not substantially more expensive than loading an already-allocated version of it

14:19 bbloom: also: you can just do (. java.lang.System nanotime)

14:20 also: however for static functions, there is also a shorthand: (java.lang.System/nanotime)

14:20 also: bbloom: what about when the class name comes as a string?

14:20 that's what I'm trying to accomplish

14:20 bbloom: also: if the class name comes as a string, you have to use eval or reflection

14:21 the interop forms are resolved at compile time

14:21 also: how am I supposed to interpret the docs that say that the dot special form takes a symbol?

14:22 bbloom: the same was you interpret a macro which takes a symbol: quoted

14:22 ,(quote (symbol "omg"))

14:22 clojurebot: (symbol "omg")

14:22 bbloom: ,(identity (symbol "omg"))

14:22 clojurebot: omg

14:23 bbloom: ,(quote not-defined)

14:23 clojurebot: not-defined

14:23 bbloom: ,(identity not-defined)

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

14:23 bbloom: also: does that help?

14:26 dnolen: also: your question is a bit vague, there's no reason to use a string in your particular example. If you really want to work with strings to do interop best to use existing Java reflection methods.

14:27 also: dnolen: yeah, sorry, it was just supposed to be a simple example

14:28 justin_smith: in a letfn inside a defn, if a function I create in the letfn does not reference any of the parameters of the defn, does it get re-evaluated on each run, or is it created once and reused?

14:28 patchwork: justin_smith: I just asked that question?

14:28 I mean… !

14:28 justin_smith: oh

14:28 I didn't notice

14:28 patchwork: Apparently it doesn't matter

14:29 also: dnolen: i guess my real question was why (symbol "java.lang.System") wasn't used as a symbol when passed to the dot special form

14:29 bbloom: i think i just need to do a bit more reading on the basics

14:29 thanks!

14:30 bbloom: also: yup. if this is your first lisp, quoting/macros/etc need some time to get used to

14:30 dnolen: also: there's no reason for that to work. it would return a symbol, a symbol won't have that method.

14:30 ,(symbol "foo")

14:30 clojurebot: foo

14:30 dnolen: ,(.bar (symbol "foo"))

14:30 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: bar for class clojure.lang.Symbol>

14:30 amalloy: justin_smith: it would be created each time, but that's not expensive. *compiling* it is expensive, but it only happens once; when the function is run it's just a call like: new my$fn()

14:31 also: dnolen: right, i thought the Classname-symbol argument to dot was supposed to be a symbol

14:31 and that (symbol "xxx") was a symbol

14:31 amalloy: also: a *literal* symbol

14:31 (symbol "xxx") is a list which, when evaluated, produces a symbol

14:32 . is a special form, so it chooses how and whether to evaluate its arguments

14:34 also: amalloy: thanks, that makes sense

14:34 is that necessarily true of special forms?

14:35 amalloy: all special forms may choose how to evaluate their arguments, yes. for example, fn is a special form - it wouldn't be much use if (fn [x] x) attempted to *evaluate* [x] instead of creating a new function!

14:41 also: amalloy: is the way that . requires a literal symbol described in the documentation?

14:42 amalloy: if i were writing a function that required a symbol as an argument, Classname-symbol seems like an appropriate name.

14:42 bbloom: (doc .)

14:42 clojurebot: I don't understand.

14:42 bbloom: ##(doc .)

14:42 lazybot: ⇒ "Special: .; The instance member form works for both fields and methods.\n They all expand into calls to the dot operator at macroexpansion time."

14:42 bbloom: notice it says "special"

14:42 (doc defn)

14:42 clojurebot: "([name doc-string? attr-map? [params*] prepost-map? ...] [name doc-string? attr-map? ([params*] prepost-map? body) + ...]); Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys :pre and :post that contain collections of pre or post conditions."

14:42 bbloom: ##(doc defn)

14:42 lazybot: ⇒ "Macro ([name doc-string? attr-map? [params*] prepost-map? body] [name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?]); Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var m... https://www.refheap.com/20328

14:42 bbloom: notice it says "macro"

14:42 ##(doc inc)

14:43 lazybot: ⇒ "([x]); Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'"

14:43 bbloom: also: notice it doesn't say anything

14:43 macros and special forms treat their arugments as *unevaluated*

14:43 that's just standard lisp-isms, so it's a perfectly reasonable doc string for people who understand how the evaluation process works

14:43 as a general rule, clojure assumes the people reading the doc strings understand the fundamentals & doesn't try to cover every topic in every docstring

14:44 also: bbloom: so the key would be that it doesn't actually say that it's evaluated

14:44 bbloom: also: that's just a given though, it's a special form...

14:44 also: bbloom: yeah, i assume the docs are good, but i just don't understand them

14:45 bbloom: also: i understand that you don't understand them :-P i'm just trying to point out that you need a better foundation before those docs make perfect sense

14:47 also: bbloom: and i now notice that it seems to be pretty clear when the forms actually are evaluated, like the bodies of if and let

14:47 so i think that's what i was missing

14:47 clgv: how is that possible? (def a (org.jfree.chart.axis.NumberAxis.)) (def b (org.jfree.chart.axis.NumberAxis.)) (= a b) => true

14:47 bbloom: also: there are examples here: http://clojure.org/java_interop#dot

14:47 llasram: clgv: Clojure `=` is not Java `=`. The latter is Clojure's `identical?`

14:48 also: bbloom: yeah, that's what i was reading. (doc .) points to there.

14:48 dnolen: clgv: = delegates to .equals

14:48 bbloom: also: yup. and the extended documentation describes how that special form interprets it's arguments

14:48 dnolen: if not IEquiv

14:48 clgv: dnolen: but it seems they both have the same hash

14:49 dnolen: clgv: anyways like llasram said, = is not identical? aka Java ==

14:49 clgv: ah ok. so I need access to the ref value

14:51 llasram: Ref value?

14:52 clgv: I think I can go with System/identityHashCode

14:54 llasram: OOC, what are you trying to do?

14:55 dnolen: reiddraper: does simple-check desugar into function calls?

14:56 reiddraper: dnolen: in what sense? the for-all macro?

14:56 dnolen: reiddraper: yes

14:56 clgv: llasram: I have a WeakHashMap for GUI components to store metadata and blindly believed it would hash based on identity

14:56 also: bbloom, amalloy, dnolen: thanks for the pointers, i understand the docs now :)

14:56 reiddraper: dnolen: yeah there's a for-all* that it desugars into

14:57 dnolen: https://github.com/reiddraper/simple-check/blob/bd18e434dd11ffda18b933615178e285c5ceef19/src/simple_check/properties.clj#L29-L65

15:03 Jarda: yes dnolen I'm running in clojurescript directory of a fresh checkout after lein install

15:03 dnolen: reiddraper: sweet, the fact that simple-check has shrinking is awesome, most property based testing libs don't seem to do this?

15:04 Jarda: there are no lein tests to run as of yet, if you want to run the tests, just ./script/test from project root

15:04 reiddraper: dnolen: a few of the more mature ports do, but it's definitely not in all of them

15:04 dnolen: and yeah, imo, it's a really critical feature

15:05 simple-check actually does srhinking in a way that i think only the erlang library does, which allows shrinking to compose, which is really neat

15:07 clgv: llasram: I switched to guavas mapmaker for the map with weak keys

15:09 dnolen: reiddraper: that's pretty sweet. simple-check is very clean Clojure code, a ClojureScript port would be trivial ...

15:10 reiddraper: dnolen: thanks, cemerick actually has a cljx branch that I believe is working, https://github.com/cemerick/simple-check/tree/cljx

15:10 bitemyapp: reiddraper: what's different about simple-check vs. test.generative?

15:10 dnolen: bitemyapp: pretty sure test.generative doesn't do shrinking

15:10 bitemyapp: I must say, simple-check's API is pretty appealing if you've used Haskell before.

15:11 dnolen: reiddraper: oh, ok sweet!

15:11 cemerick: working ^ ?

15:11 cemerick: dnolen: quite, yes; that's how I found the rseq bug on cljs vectors and sorted sets

15:11 dnolen: cemerick: *damn*

15:11 bitemyapp: too cool :)

15:11 reiddraper: bitemyapp: the main two differences are that simple-check is based on the naming/shape of haskell/erlang quickcheck, and as dnolen said, shrinking

15:12 cemerick: reiddraper is being modest

15:12 reiddraper: I think you could produce a year's worth of killer talks on the fact that there's no shrinkers

15:12 hyPiRion: oh, the conj schedule is up

15:12 dnolen: reiddraper: will cljx branch get merged in?

15:13 reiddraper: hmm, I guess not necessary? it's just a config thing?

15:13 cemerick: yes?

15:14 cemerick: dnolen: which question are you asking me? :-P

15:14 bitemyapp: Manning Publications is having a sale right now. Hrm.

15:14 dnolen: cemerick: oh actually I guess not, does require changes

15:15 cemerick: dnolen: oh, changes vs. config. Yeah, the former. Integrates with clojurescript.test, does the macro thing in a portable way, etc.

15:15 Some of my recent cljs patches have been in service of the cljx-ing of simple-check.

15:16 I plan on beating the snot out of the cljs collections once 643 is done. I suspect dragons await.

15:17 reiddraper: :D

15:17 Jarda: dnolen: https://github.com/clojure/clojurescript/wiki/Running-the-tests states I could run with lein test

15:19 dnolen: Jarda: only for the Compiler Infrastructure, which there are no tests for as of yet! all the main tests are against JS engines

15:19 Jarda: dnolen: ok :)

15:21 gfredericks: does anybody know why the numeric-keyword-literal fix got reverted?

15:21 stuarthalloway just said "at rich's suggestion" on the ML

15:22 isn't clear if that means the intention is now to be able to read such things, or if it might be fixed some other time/way

15:22 just curious

15:23 hiredman: gfredericks: seems like you are looking for information where there is only and opionfest

15:23 an

15:25 gfredericks: hiredman: I missed all opinions

15:25 only discussion I've heard is that thread about java.jdbc which seemed devoid of opinions

15:25 unless you're just criticizing IRC in general

15:26 hiredman: gfredericks: I was joking

15:26 hyPiRion: oh right, the :1 keywords etc?

15:26 gfredericks: hyPiRion: yep

15:26 hyPiRion: so are they legal or not now?

15:26 gfredericks: there was a commit to unallow them

15:26 which was just recently reverted

15:26 hiredman: gfredericks: rich famously decried irc as an opionfest, which I imagine is why he doesn't spend much time here? so trying to get more information about his pronouncements on irc is kind of funny

15:27 technomancy: s/pronouncements/opinions/

15:27 gfredericks: hiredman: to be perfectly literal I have not laughed out loud at your joke, but I now have an appreciation for it that I didn't prior to your explanation. thank you.

15:28 pronouncement isn't a word ever used by the person doing the pronouncing, is it...

15:28 "Everybody listen, I have a pronouncement to make!"

15:28 hiredman: :)

15:29 gfredericks: who has enough irc logs to find out how often hiredman makes a smiley?

15:29 cemerick: gfredericks: may I have a link, sir?

15:30 gfredericks: cemerick: yes you may

15:30 hyPiRion: This one? https://github.com/clojure/clojure/commit/249479ecebcb0cfca9e6a1d528e3d7f0b3ca7dc6

15:30 gfredericks: cemerick: https://groups.google.com/forum/#!topic/clojure-dev/HeFr_jeuTnE

15:30 hyPiRion: yep

15:31 cemerick: gfredericks: many thanks

15:31 I haven't looked at the main ML in many months.

15:31 gfredericks: cemerick: such an opinionfest

15:32 cemerick: I'd say, "CARN-E-VAL!", but no one would get that, either.

15:32 brainproxy: in cljs, proper way to use apply in conjunction with an object's method?

15:32 naive attempt (apply (.-log js/console) [...])

15:36 dnolen: brainproxy: I would just use apply directly

15:36 (.apply js/console.log js/console (into-array ...))

15:36 brainproxy: could easily be cleaned up with a macro

15:37 (mapply js/console log some-seq)

15:37 hopefully with a better name 'o course

15:38 brainproxy: oh right, forgot I could do .apply

15:38 thanks

15:46 TimMc: gfredericks: 69 times since 2011-03-23

15:47 gfredericks: TimMc: that I did not expect

15:47 TimMc: If you read the grep output he looks like Mr. Sunshine.

15:48 On closer inspection, however, many of the instances are in fact sarcastic. :-P

15:49 hiredman: what? no way, I am a delightful person, full of smiles and affirmations of hope.

15:50 TimMc: :)

15:52 gfredericks: clojurebot: hiredman is a delightful person, full of smiles and affirmations of hope

15:52 clojurebot: 'Sea, mhuise.

16:03 dobry-den: For anyone using evil-mode, when you're in Replace mode (R), does semicolon get inserted instead of replacing a character?

16:05 When trying to turn ";; Hello ;;" into ";;;;;;;;;;", I can't just hit R and spam ";". Truly a sore spot in my life

16:09 teslanick: gfredericks: When you tell clojurebot something, does he remember it?

16:09 llasram: Man, that is not a lot of Lightning Talk time for Clojure/conj

16:09 I wonder how they're going to do sign-ups

16:09 hiredman: clojurebot: clojurebot?

16:09 clojurebot: clojurebot has a lot of features

16:09 teslanick: clojurebot: hiredman?

16:09 clojurebot: hiredman is what will save us all

16:10 hiredman: I can only assume that was inferred somehow

16:11 teslanick: clojurebot: teslanick?

16:11 clojurebot: Excuse me?

16:11 teslanick: :c

16:11 hiredman: hiredman is lazy => map is lazy => map is laziness => laziness is what will save us all => hiredman is what will save us all

16:12 teslanick: Your logic is unassailable.

16:12 llasram: Verified. The inferences work out.

16:13 If I want a lightning talk slot, I suppose I'll just need to make sure I show up very first thing each day...

16:55 dobry-den: I can't believe people worked with Java bytebuffers before ztellman created Gloss

16:55 I tried coming up with my own abstraction and nearly died without even reaching the yaks i was trying to shave

16:56 llasram: Well, depends on what you're doing with it

16:56 with them

16:56 dobry-den: conforming to some networking protocol defined in C datatypes and endian-swapping

16:57 * ucb waves

16:57 llasram: Oh sure, gloss is great for that :-) Just meant raw ByteBuffers aren't so bad if you do have a different problem to solve

16:58 bitemyapp: ucb: howdy

16:59 ucb: bitemyapp: heyo

17:06 sritchie: technomancy: is there a way to specify custom prep tasks for production vs devel?

17:07 technomancy: sritchie: sure; you can use profiles for that

17:07 xeqi: llasram: last year you could email them to signup for lightenting talks before the conj, and then they mentioned it again at the beginning of the conj

17:07 sritchie: technomancy: does it default to "dev"? or do I always have to specify a profile?

17:07 llasram: xeqi: Hmmm. Might be worth e-mailing then...

17:07 xeqi: Thanks for mentioning it!

17:07 sritchie: technomancy: I've got a bunch of base dependencies,

17:08 and want to add a prep task for production mode only

17:08 xeqi: llasram: thats what I did to make sure I had a slot, I think the others all contacted them during

17:08 sritchie: since (or (System/getenv "RING_ENV") "dev") in my config failed to resolve

17:08 xeqi: * did last year

17:08 sritchie: technomancy: on heroku

17:08 technomancy: sorry, meaning, it didn't pick up the proper config variable

17:08 xeqi: bah, trying to use the clojurescript master as a checkout is breaking my sourcemaps

17:09 technomancy: sritchie: you can put :prep-tasks in the :production or :dev profile

17:10 sritchie: technomancy: if I have dependencies in there, when I run "lein with-profile dev repl", none of my deps are around

17:11 technomancy: right; yes

17:11 sritchie: technomancy: we just upgraded to http-kit and uberjar, and are seeing some serious slowdown issues :)

17:11 just trying to debug

17:11 the app is hogging memory like crazy all of a sudden

17:12 bitemyapp: ucb: http://www.youtube.com/watch?v=g_LQYkSsR1s

17:12 * ucb clicks

17:14 ucb: bitemyapp: nice!

17:19 Jarda: oh yeah.

17:20 spent some time digging around clojurescript codebase to fix source map output without checking it was already fixed between the version I was using and HEAD master :D

17:20 well, now I find my way around the code

17:21 bitemyapp: this problem just changed from a 2-reduce problem to a 4 or 5 reduce problem. This is getting close to the earlier 7-reduce problem I was working on.

17:24 dnolen: Jarda: which problem around source maps?

17:24 llasram: bitemyapp: Is that in the sense of iterated reductions over a collection?

17:25 Jarda: dnolen: if I specified full path for source map in project.clj it also specified the full filesystem path in the .js file (in the comment telling where source map is to be found)

17:25 bitemyapp: llasram: That's how many functions with a reduce in them that are in the call stack at its maximum depth that are involved in the problem.

17:26 llasram: it's a rule of thumb I use for figuring out how complicated the bullshit I'm dealing with is getting.

17:26 dnolen: Jarda: oh right yes, that got fixed, it's relative to the file now

17:26 Jarda: dnolen: yes

17:26 well now I need to find some other clojurescript issue to fix, so that this didn't go in vain :D

17:27 bitemyapp: for any curious, I'm working on migrations in Datomic. Apparently Cognitect assumes the rest of the world are ubermenschen like them and have no problem writing obnoxiously complicated Clojure code to reduce across the entire transaction log just to change your schema a little bit.

17:27 I get that you can't avoid translating the entire history, but an API function that let you pass mapper/reducer functions and then automatically handled running through the tx-log and retransacting, preserving identity, would've saved me many hours of raging.

17:28 sritchie: oh boy...

17:28 cljs compilation on heroku is taking like 5 minutes

17:28 noonian: anyone know why compojure routing might act differently from an uberjar as from lein run? I have a route that redirects on "/" that is hit from lein run but not from a running uberjar :/

17:28 bitemyapp: sritchie: that's pretty funny actually.

17:28 noonian: show code.

17:28 sritchie: bitemyapp: that it's hanging so hard?

17:29 hiredman: noonian: rm -rf target/

17:29 bitemyapp: now I need to figure out how in the hell I'm supposed to map {:part :db.part/user, :idx -1000013} -> {-9223350046623220301 17592186045421

17:29 noonian: lein clean

17:29 sritchie: bitemyapp: I wonder, is there some other recommended path,

17:29 like compiling locally

17:29 bitemyapp: sritchie: yeah, I'm just imagining how hammered the poor worker must be.

17:29 sritchie: haha

17:30 I mean, am I supposed to commit generated cljs?

17:30 bitemyapp: sritchie: I would personally AOT and check in the compilation artifact into git.

17:30 llasram: bitemyapp: Going to be at Conj, to rant at them in person?

17:30 Jarda: I commit them

17:30 bitemyapp: sritchie: sure.

17:30 llasram: when is the conj again?

17:30 sritchie: technomancy: concur with bitemyapp?

17:30 llasram: bitemyapp: Starts Nov 14th, so 2 weeks out

17:31 bitemyapp: sritchie: the more "industrial" way to handle such compilation artifacts is to upload them to CDN and point URLs at the CDN.

17:31 sritchie: oh

17:31 okay, yeah

17:31 have the CI server do that or something

17:31 noonian: bitemyapp: here is a code snippet, redirects fine and prints output from lein run: https://www.refheap.com/20339

17:31 bitemyapp: sritchie: I do a lot of web dev, unless your compilation artifact is >30MB just push it.

17:31 llasram: Speaking of Conj -- sritchie: any interest in a Hadoop unsession at the Conj?

17:31 noonian: i just tried after rm -rf'ing target and same thing

17:31 sritchie: yeah, I'd be interested

17:31 bitemyapp: llasram: is there going to be a Datomic user support group where I can cry into my whiskey?

17:32 llasram: bitemyapp: I don't see that on the schedule yet...

17:32 You should probably e-mail the organizers

17:32 bitemyapp: time-travelling tears unsession.

17:33 llasram: Oh, man, only 4 unsession rooms. Crazy town

17:33 bitemyapp: I'm considering going to the conj, I haven't made any plans or bought any tickets yet though.

17:34 llasram: They'd entirely sold out for a bit, but I think add some more late reg tickets

17:34 bitemyapp: See, part of the reason I hadn't made any plans is because I got shanghai'd by this fucking project.

17:36 ucb: http://radagast.bandcamp.com/

17:37 * ucb listens

17:40 myguidingstar: hi all, I want to use opennlp.tools.stemmer to reduce a word to its stem, something like this (stem "goes") -> "go"

17:40 the API is here https://opennlp.apache.org/documentation/1.5.3/apidocs/opennlp-tools/opennlp/tools/stemmer/Stemmer.html

17:40 llasram: sritchie: Added you as hosting, if that wasn't presumptuous: https://github.com/relevance/clojure-conj/wiki/Clojure-conj-2013-Unsessions#clojure--hadoop

17:40 klokbaske: cemerick (and others): is it possible, using austin, to do REPL exploration of any webpage?

17:41 like an alternative to the js repl of the browser

17:41 myguidingstar: how can I call that? I don't get java =.=

17:43 klokbaske: myguidingstar: java interop is described here: http://clojure.org/java_interop

17:43 bitemyapp: myguidingstar: java interop is more thoroughly explained here: http://clojure-doc.org/articles/language/interop.html

17:44 klokbaske: so it would be something like (.stem my-stem my-char-sequence) i suppose

17:47 sritchie: llasram: haha, okay

17:50 yeoj___: i'm working with resultset-seq, it returns a sequence of structmaps. is there anyway to make it return a sequence of arrays like clojure.java.jdbc/query with :as-arrays? true ?

17:52 brehaut: structmaps wow

17:53 yeoj___: hmm. i'm not sure what that means.

17:53 brehaut: it means that were deprecated ages ago, and its surprising to see them in the wild

17:53 yeoj___: ah, ok. it's from a blog post.

17:53 brehaut: even if the wild is a function in core that was added in 1.0

17:54 yeoj___: i'm trying to write a massive database table to a text file, and i want to have everything lazy so i don't consume loads of memory.

17:55 brehaut: im pretty sure the clojure.core.jdbc query functions provide you the contents lazily

17:55 yeoj___: yeah, i'm was using 2gb of memory before i canceled it.

17:55 brehaut: you just need to do all your processing within the query scope

17:57 yeoj___: brehaut: could you have a look here if you have a moment https://www.refheap.com/20342

17:58 i'm not sure why it was using 2gb of memory... it's about a 6gb table but i'm trying to write it for any type of input table. I really want to be conscious of mem usage.

17:58 bitemyapp: that's a good question.

17:59 yeoj___: whoa sonny, what's with the (rest ...)?

17:59 oh wait, n/m

17:59 you got it right

17:59 yeoj___: yeah, i'm trying to skip the header row with :as-arrays? true

18:00 it's still using loads of memory... if i run it right now on my dev box it consumes everything.

18:00 bitemyapp: yeoj___: there's a pretty straight-forward path to profiling this, fire it up with YourKit or JVisualVM

18:00 yeoj___: find out who is using all that memory

18:00 yeoj___: ok, i'll give that a try.

18:01 bitemyapp: I suspect the JDBC stuff isn't being very lazy.

18:01 I could be wrong.

18:01 yeoj___: i think there is specific issues with some jdbc drivers too

18:01 turbofail: if you want to process stuff lazily in clojure.java.jdbc/query, you have to do it in a result-set fn

18:01 the default result-set function is doall

18:02 amalloy: yeah, isn't that what with-query-results is for?

18:02 yeoj___: turbofail: ahhhh that makes sense. so i can just set :result-set-fn to doseq ?

18:02 gfredericks: amalloy: deprecated because macromagical

18:02 bitemyapp: yeoj___: I think resultset-seq got deprecated and removed, possibly in favor in result-set-seq.

18:02 amalloy: gfredericks: man, i am never upgrading jdbc

18:02 bitemyapp: amalloy: why do you think Korma hasn't?

18:03 we're rebels!

18:03 gfredericks: amalloy: I like the new api better for the most part

18:03 amalloy: because nobody upgrades korma either?

18:03 bitemyapp: :(

18:03 turbofail: yeoj___: yeah. you'll have to put all your doseq stuff inside a function

18:03 gfredericks: amalloy: I'm curious if whathisface's scopes lib could be combined with java.jdbc well

18:03 yeoj___: turbofail: ok i'll try that for a bit. would make sense to learn a bit about profiling too rathre than crashing my dev box every run.

18:04 bitemyapp: https://clojars.org/pjstadig/scopes https://clojars.org/pjstadig/scopes-magic

18:04 gfredericks: yes that

18:04 amalloy: i thought you hated ORMs and magic, bitemyapp. what are you doing maintaining korma?

18:04 gfredericks: I'd like to be able to open whatever resources I want during an http request and have them auto-closed when the response finishes

18:05 bitemyapp: Hilarious: https://github.com/pjstadig/scopes-magic/blob/master/src/data_readers.clj

18:05 gfredericks: bitemyapp: yeah pjstadig and I got into a nasty spat about that and our friendship has never recovered

18:05 bitemyapp: amalloy: Korma isn't that magical unless you use it in muggle-mode.

18:05 amalloy: also I understand how it works, so I'm comfortable with it.

18:06 it's just transforming a map that gets spat out into SQL at the end. No big. I'd definitely strip it down given my druthers though.

18:06 I keep musing about a "micro-Korma"

18:06 no connection pooling built in, that sort of thing.

18:06 myguidingstar: bitemyapp, sorry but I still don't understand what they do on opennlp.tools.stemmer How can I call the method "stem"?

18:07 bitemyapp: well first, is it an instance method or static?

18:07 gfredericks: bitemyapp: honeysql?

18:07 bitemyapp: gfredericks: not a fan. I like the automatic relationship traversal in Korma.

18:07 that nice-ness is part of why I like Datomic and Datalog, incidentally.

18:08 although Datalog is much more powerful.

18:08 myguidingstar: hmm, it's not clear https://opennlp.apache.org/documentation/1.5.3/apidocs/opennlp-tools/opennlp/tools/stemmer/Stemmer.html

18:08 bitemyapp: I should just write a Datalog->SQL bridge and be done with it.

18:08 myguidingstar: all I can see is "public interface Stemmer"

18:08 bitemyapp: myguidingstar: if the documentation sucks, read the code.

18:08 myguidingstar: code don't lie.

18:08 until it does.

18:09 muhoo: hmm lein repl :headless :port xxxx ignores :port?

18:09 jkkramer: bitemyapp: i've got a lib based on honeysql that does relationship traversal too. releasing soon

18:09 myguidingstar: :( I just want to call that method against a string

18:09 muhoo: it seems to be insisting on the :port in the project.clj, not the one supplied on teh command line

18:10 bitemyapp: jkkramer: I look forward to ripping off your work.

18:11 amalloy: myguidingstar: Stemmer is an interface definition, not an implementation. it's saying "in order to count as a Stemmer, something must define how it does .stem()". you need an actual implementation of that contract in order to use its stemming

18:11 bitemyapp: AHHHHHHHHHHHH fuck.

18:12 amalloy: i don't see any particular implementation of Stemmer in that opennlp project's javadoc

18:14 bitemyapp: myguidingstar: http://mail-archives.apache.org/mod_mbox/opennlp-commits/201203.mbox/%3C20120326073356.B9F48238896F@eris.apache.org%3E

18:14 amalloy: there seems to be one at http://code.google.com/p/relevance-based-on-parse-trees/source/browse/src/main/java/opennlp/tools/stemmer/PorterStemmer.java?r=1

18:14 myguidingstar: thanks, I'm reading it, too

18:15 bitemyapp: myguidingstar: http://stackoverflow.com/questions/5391840/stemming-english-words-with-lucene

18:15 mbarbieri: Hi, can you pleas e check if this https://www.refheap.com/20314 is the correct translation of this https://www.refheap.com/20313 ?

18:15 bitemyapp: myguidingstar: good, I'll go back to raging at my own stupidity then.

18:15 myguidingstar: you guys help me a lot

18:15 bitemyapp: mbarbieri: don't use zkoss.

18:16 mbarbieri: don't translate shitty Java frameworks to Clojure.

18:16 mbarbieri: just write Clojure.

18:16 mbarbieri: behold, a fairly simple Clojure Ring web app! https://github.com/bitemyapp/neubite/

18:16 mbarbieri: you have been rescued from Java framework Hell. Go forth and sin no more.

18:16 mbarbieri: bitemyapp: :) just testing some stuff, and have to use it for enterprisey apps

18:19 bitemyapp: mbarbieri: http://i.imgur.com/IT4qgnf.jpg

18:19 devn: Raynes: you around?

18:19 Raynes: devn: Yep.

18:19 devn: Raynes: how do i shot web?

18:20 biggbear: "java -jar <path to clojure.jar> script.clj" seems to execute slow. Around 5-6 secs

18:20 Raynes: I don't know how one can shot web.

18:20 devn: Raynes: but seriously, in conch -- i want the behavior from {:seq true} that I get with (programs ls), but with a proc

18:20 like (sh/proc "git" "diff" :dir "/foo/bar" {:seq true})

18:20 bitemyapp: biggbear: don't do that.

18:20 devn: what's the right way to do that?

18:21 Raynes: devn: There are buckets and buckets of hax in place in conch.clj to make :seq true possible.

18:22 You're not going to be able to easily replicate that with proc.

18:22 biggbear: <bitemyapp>: installing clojure from apt-get and seems to lack dependencies. What could be the fastest way to execute scripts?

18:23 noonian: biggbear: i would install leiningen and lein-exec

18:23 yeoj___: biggbear: are you usinging Leiningen ?

18:23 devn: Raynes: noted. I think I'll just use jgit. seems like the better option

18:24 bitemyapp: biggbear: you're not supposed to install Clojure, you install Leiningen.

18:24 biggbear: <noonian>, <yeoj___>: lein-exec. Ok good

18:24 bitemyapp: biggbear: Clojure is just a jar, a dependency. Leiningen is how you run, build, and setup Clojure projects.

18:25 noonian: biggbear: and lein-exec uses leiningen to run one-off scripts

18:25 yeoj___: biggbear: http://leiningen.org/#install (also check your package manager)

18:25 although i've recently learned that uberjar sucks with multiple jdbc drivers.

18:26 biggbear: thanks mates. lets test lein

18:27 technomancy: erhm

18:27 lein-exec is kind of redundant these days

18:27 biggbear: redundant?

18:28 noonian: technomancy: can you use lein to run a script that has dependencies without creating a project?

18:28 technomancy: lein can be configured to do the same thing out of the box

18:28 :aliases {"exec" ["run" "-m" "clojure.main/main" "-i"]}

18:28 bitemyapp: technomancy: lein-exec handles dependencies.

18:28 technomancy: you just put them at the top of the script.

18:28 technomancy: oh, gotcha

18:28 Raynes: devn: Conch does fancy stuff to allow for lazy seqs of output. It constantly takes output and pipes it into a queue and the lazy seq reads from that queue. There is a lot of indirection because conch supports timing out a process and the only way to get stdout from a process that has already been killed is to have already read its stdout prior to killing it. As such, there is no way to just wait, timeout a process, and *then* read its stdout.

18:29 technomancy: that's more complicated then; you'd have to put calls to pomegranate at the top of the script

18:29 or you could use the update-in task, but it gets messy

18:29 bitemyapp: .lein/profile.clj with pomegranate or lein-exec are pretty much the only way.

18:29 and lein-exec's syntax for the dependencies is nicer, albeit less powerful, than pomegranate.

18:30 I think realistcally, one should just live in a REPL, but you know, whatever.

18:30 biggbear: you probably don't even need to run a script, but rather, just live in a REPL with some functions.

18:30 yeoj___: whats run with lein run ?

18:31 bitemyapp: main

18:33 biggbear: <bitemyapp>: yes a REPL open. im just doing some script to solve a problem. A very isolated problem, so i guess it is fast to just invoke lein-exec.

18:33 bitemyapp: biggbear: it's not that fast, just convenient.

18:33 biggbear: a REPL is fastest.

18:33 or a running service.

18:34 hiredman: https://gist.github.com/hiredman/6664075

18:36 * bitemyapp gags at hiredman

18:37 technomancy: lol pomegranate 0.0.13-SNAPSHOT

18:37 hiredman: works for me

18:37 ~works on my machine

18:37 clojurebot: http://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png

18:38 hiredman: 10000% times funnier since it doesn't load completely on my machine any more

18:38 technomancy: scientifically proven to work on some machine in a closet in a fish processing plant south of Tacoma

18:39 hiredman: I'm pretty sure that is all you need to get it published in a journal

18:40 technomancy: editors these days... you submit files without ns forms at the top and they don't even blink an eye

18:41 hiredman: I saw a clojure library today that did the think like clojure.core, where it had parts broken out in to different files, but all the same namespace, I sighed real hard

18:42 Jarda: ok guys I finally got v8 compiled on my computer, now clojurescripts ./script/test says Error: Could not find or load main class clojure.main

18:42 any ideas?

18:43 it's doing java -server -cp "$CLJSC_CP" clojure.main "$CLOJURESCRIPT_HOME/bin/cljsc.clj" "$@"

18:43 sritchie: technomancy: did you see my earlier comment about the lein profile not picking up en v variables resolved in project.clj?

18:43 Jarda: maybe it's that lain

18:44 line

18:44 but how the hell should I get java to find clojure.main globally

18:44 Bronsa: Jarda: just to make sure, did you run script/bootstrap?

18:45 Jarda: no, sorry. How do I suck this much reading documentation today

18:45 sritchie: technomancy: 92MB with uberjar, btw :)

18:45 technomancy: sritchie: no, what's up?

18:45 sritchie: in my project.clj, I've got this call:

18:45 (or (System/getenv "RING_ENV") "dev")

18:46 Jarda: no, this page didn't state that was needed https://github.com/clojure/clojurescript/wiki/Running-the-tests

18:46 sritchie: to tune the lein cljsbuild once command

18:46 and it resolves to "dev"

18:46 Bronsa: Jarda: it assumes you have the cljs repl already working, see https://github.com/clojure/clojurescript/wiki/Quick-Start

18:46 Jarda: Bronsa: oh, ok

18:46 technomancy: sritchie: yeah, don't do that. put the values you want in the appropriate profile.

18:46 sritchie: okay

18:47 dev profile's picked up automatically?

18:47 Jarda: Bronsa: I've always just used clojurescript inside another project

18:47 Bronsa: thanks

18:47 Bronsa: Jarda: np

18:47 technomancy: sritchie: dev profile is activated unless you specify otherwise (so not during git push)

18:48 sritchie: "not during git push" meaning, heroku overrides it?

18:49 technomancy: sritchie: right; typically it would be `lein with-profile production compile :all` or the uberjar equivalent

18:50 sritchie: okay, cool

18:50 I had added: LEIN_BUILD_TASK: compile :all

18:50 off of some old advice you had in a mailing list

18:51 technomancy: right now config vars are only visible at runtime unless you turn on a labs feature (which I advise against)

18:51 sritchie: okay, cool

18:52 so setting that flag to "with-profile production compile :all" should be the way

18:54 devn: Raynes: got a dumb question for you

18:54 Raynes: devn: I've got a mediocre answer for you.

18:54 devn: Raynes: how do I request all the pages for something like repos/commits?

18:54 technomancy: sritchie: no, config vars are only visible at runtime unless you turn on a labs feature

18:55 devn: is that {:query "all_pages"}?

18:55 or am i missing something?

18:55 Raynes: Are we suddenly talking about tentacles?

18:55 devn: hahaha yes sorry

18:55 Raynes: No worries. :P

18:55 devn: (context-switch!)

18:55 sritchie: technomancy: sorry to be so slow today - the thing I'm missing is, how can I flag the production profile for the default uberjar task?

18:55 Jarda: Bronsa: you don't happen to know how to fix this: http://o178.nor.fi/~jarda/test.out.txt

18:56 technomancy: sritchie: oh right; I forgot you switched over to uberjars. The :uberjar profile is what gets activated if you've got :uberjar-name

18:56 sritchie: ah! okay

18:57 Raynes: devn: Theoretically you should just be able to pass the :all-pages true arg

18:57 technomancy: for some of these things the docs are a bit weird because that's not really a heroku-specific thing; lein just does that automatically. but I don't know how often it's used outside heroku

18:57 Raynes: (user-repos "devn" {:all-pages true}) devn

18:58 sritchie: technomancy: thanks! cljs compiling. Going to stick with compiling it on the worker, unless anyone else (bitemyapp?) has best practices

18:58 it feels like checking in the generated code is just a recipe for me to forget about changes

18:58 technomancy: you mean at dyno launch time?

18:59 I haven't done cljs myself, but most people don't like that because they want dynos to launch quickly.

18:59 for the typical app it makes sense to trade some deploy time for reduced launch time since launches happen more often and are sometimes user-facing

19:01 sritchie: technomancy: so that's a vote for just checking the generated js into CI?

19:01 technomancy: ymmv

19:01 into CI?

19:01 unless there's a strong reason not to, doing it at deploy time is the way to go

19:01 sritchie: technomancy: once I generate the JS from CLJS, I need to get the JS file into my project

19:02 Bronsa: Jarda: no idea, sorry

19:02 Jarda: Bronsa: ok, no problem

19:02 sritchie: at deploy time meaning, on my local machine -

19:02 Jarda: maybe I bug dnolen when he next time comes online

19:02 technomancy: no, I mean during git push

19:03 devn: Raynes: thanks dude

19:03 Raynes: devn: No problem, sir.

19:03 devn: Raynes: will this work with :since, do you know?

19:03 Raynes: devn: You're apparently using every lib I've ever made at the moment, so the least I can do is provide support.

19:03 devn: Raynes: haha -- i should be kind and add some docs for you

19:03 Raynes: devn: I'm actually not entirely sure how :all-pages works at all, so...

19:04 :P

19:04 sritchie: technomancy: I guess I need to get some lunch, no idea why I'm finding this so confusing

19:04 by during git push, you mean, on the heroku box, NOT during launch, but during git push

19:04 right now, I'm doing it when the uberjar is created

19:04 technomancy: oh, ok; I misunderstood what "compiling it on the worker" meant

19:05 on heroku "worker" typically means a dyno type that's hooked up to a queue

19:05 sritchie: technomancy: it takes 295 seconds to compile the cljs as a prep task for lein uberjar

19:05 technomancy: so yeah, what you're doing is fine

19:05 sritchie: technomancy: okay, so I'll just deal with the 5 minute launch time, I suppose

19:06 perhaps it'd go faster if I :aot :all in this profile.

19:06 technomancy: launch time or deploy time?

19:06 sritchie: 295 seconds in the prep-task for lein uberjar

19:06 which I suppose is at deploy time

19:07 technomancy: right; the idea is better you stuck waiting than your users, which is what you'd get if you did it when the dyno launched

19:07 sritchie: ah, okay

19:07 I see. so, this gets all the stuff ready, while I hang out in my terminal,

19:07 then the dyno's ready to go

19:08 technomancy: right; your old code will still be available until you see "restarting" at the end of your push

19:09 sritchie: got it.

19:09 thanks, makes sense now

19:09 phew

19:09 technomancy: we could probably use better docs around cljs

19:09 and the uberjar bit is hairy if you have an app already using lein run

19:11 sritchie: just a little new

19:13 okay, added :aot :all to the uberjar profile

19:13 technomancy: let's see what happens :)

19:13 I finally set up a staging environment,

19:14 so I'll be able to make more mistakes here

19:30 ltw: I'm on a team trying to build a micro-service architecture with Clojure and JRuby web apps, and other non-web Clojure applications. I'm trying to sort out what I could use for deployment of all of these things (Jetty / JBoss / Tomcat / ???). Can anyone steer me in the right direction on this please?

19:31 mtp: get the apps running individually under runit

19:31 technomancy: ltw: use jetty unless you have a reason not to

19:31 mtp: then use some other http disaggregator to front them

19:32 technomancy: if you want to get fancy later on and collapse them into one JVM you can do it, but don't bother until you know you have a memory shortage

19:32 ltw: technomancy: I was right about to ask that question. Nice, thanks.

19:33 mtp: not sure what you mean by http disaggregator?

19:33 mtp: well

19:34 nginx takes an http request and delivers it to a backend

19:34 that's sorta what i mean

19:34 ltw: mtp: ah, right. yeah, that's cool.

19:34 geoffs: Hey, I'm trying to compile a clojure program with a java library that expects to be running on a lego mindstorms device. The compilation fails because the static initializers for some classes in the java library are getting run, and they're looking for devices in /dev that don't exist. Is there any way around this?

19:35 ltw: mtp + technomancy: thanks, I'll head down that path.

19:35 well, standing up the separate jetty services

19:35 mtp: runit is truly amazing, by the by

19:36 ltw: mtp: never heard of it, might have to dig into it

19:36 what's the big win?

19:36 mtp: you never have to write an init script again

19:36 everything comes up on boot and is respawned if it dies

19:36 hiredman: geoffs: while you'll be able to get around that issue by reflectively loading the class, I doubt you will ever have a good experience there, my understanding is the "java" environment for mindstorms is 1.4 while clojure requires at least 1.5 or 5

19:37 ieure: mtp, Okay but like real talk, do you say it "ahr-unit" or "run-it"

19:37 mtp: the latter :(

19:37 ieure: Well balls to that

19:37 hiredman: but I could be wrong

19:37 ltw: mtp: oh, that does sound nice. Unfortunately we've got this sort-of homegrown system for initializing all our production boxes that is truly bloody awful

19:37 mtp: i could see 'r init'

19:37 technomancy: ieure: "gun-icorn"

19:37 mtp: ltw maybe it could benefit from some runit :)

19:37 geoffs: hiredman: hmmm, I hadn't even considered that might be an issue... I'll have to look into that!

19:37 hiredman: http://www.oracle.com/technetwork/java/embedded/downloads/javase/javaseemeddedev3-1982511.html I guess I am?

19:38 ieure: technomancy, Yeah, I've been saying that for ages.

19:38 ltw: mtp: i think it could benefit from some gratuitous rm -rf, but that's besides the point

19:38 mtp: :)

19:38 ltw: I'll see if I can get it going though

19:38 hiredman: geoffs: basically you'll need to not include direct references to the classes, use Class/forName to load the class at runtime, use reflection to invoke stuff

19:39 geoffs: hiredman: that sounds workable if not exactly fun :)

19:39 it seems strange though that static initializers would get run during compilation... Any idea why that happens?

19:40 technomancy: geoffs: clojure compilation *is* runtime

19:40 hiredman: geoffs: static inits run when classes are loaded, clojure runs code as it is compiled (a "same world" compiler), so classes will get loaded

19:41 geoffs: technomancy: So that's true for AOT compilation as well then?

19:41 technomancy: it's much simpler but means you can't do crazy things like put file access in static initializers

19:41 geoffs: fair enough

19:41 sritchie: Exception in thread "main" java.lang.NoClassDefFoundError: clojure/tools/reader/reader_types/Reader

19:41 oh boy...

19:41 another one,

19:41 after AOT compilation

19:42 technomancy: geoffs: AOT compilation is just running the defs with *compile-files* bound to true, which causes .class files to get written to disk instead of just loaded into memory

19:42 hiredman: geoffs: yes, aot compilation is the same as other ways of running clojure code (repl, what have you) it just writes the class files to disk

19:43 geoffs: Interesting. So if I could avoid the AOT compilation and just run my clojure directly on the EV3 I wouldn't have this problem...

19:43 hiredman: correct

19:44 aot compilation is not something you really do unless under duress

19:44 Bronsa: sritchie: seangrov1 had the same exception while AOT compiling

19:44 technomancy: well, often you'd do it before "deployment" given that launch would take longer on an embedded system without AOT

19:44 but in this case yeah, skip it

19:45 geoffs: hiredman: so it seems like my next problem is to get leiningen on to the EV3... sounds like fun!

19:45 Bronsa: sritchie: can you tell me what you're trying to AOT compile?

19:45 technomancy: geoffs: no, just ship an uberjar over

19:45 hiredman: geoffs: woa, no, no reason to do that

19:45 yeah, uberjar and ship it

19:45 technomancy: geoffs: ideally you could embed nrepl and connect from your computor

19:46 hiredman: lein is a build tool, like if you where using maven, why would you put that on the ev3?

19:46 geoffs: But when I uberjar the static initializers get run and it fails...

19:46 technomancy: geoffs: get rid of :main

19:46 sritchie: Bronsa: sure;

19:46 sorry, had to put out one quick fire

19:46 Bronsa: you want the list of deps?

19:46 technomancy: geoffs: use clojure.main as your entry point

19:46 Bronsa: sritchie: yeah, to see if I can reproduce

19:47 geoffs: technomancy: Oh! And then I have a clojure repl?

19:47 technomancy: yeap

19:47 geoffs: but hiredman raises a good point that it probably won't work with a 1.4 Java

19:47 sritchie: sure, one sec

19:47 geoffs: cool

19:47 it's actually 1.7 java

19:47 technomancy: oh rad

19:47 sounds like fun

19:47 geoffs: some oracle people are supporting the embedded stuff

19:48 If you could, I'd bring it down to Seajure next week :)

19:48 Maybe I can work something out...

19:48 technomancy: oh, where are you?

19:48 geoffs: bellingham

19:48 sritchie: Bronsa: here it is: https://gist.github.com/sritchie/7484bdb0b7cb5257725a

19:48 technomancy: ah, bit of a hike =)

19:49 Bronsa: sritchie: jesus christ.

19:49 sritchie: haha

19:49 technomancy: that'd make a sweet demo though

19:49 geoffs: that's why I only show up once every couple months :)

19:49 sritchie: Bronsa: going some serious cleanup on an older app

19:50 geoffs: hiredman: thanks for the help! I definitely learned something today

19:51 Bronsa: sritchie: I'll try and see if I can reproduce && see if it's a bug in tools.reader

19:51 geoffs: technomancy: so I wouldn't specify clojure.main as my main in the lein project.clj, I just specify it on the command line to invoke the uberjar, right?

19:51 sritchie: Bronsa: awesome, thanks. I'm trying to add that to exclusions now

19:51 technomancy: geoffs: if you can control the CLI invocation then yeah; best to specify it there

19:51 sritchie: Bronsa: nope, adding that exclusion doesn't help

19:52 geoffs: yeah, that's easy. I'm gonna try it now!

19:53 sritchie: Bronsa: removing AOT compilation for now

19:55 Bronsa: sritchie: AOT compiling tools.reader seems to work fine for me

19:55 sritchie: with those deps?

19:56 Bronsa: oh, well --

19:56 the aot compile works for me as well,

19:56 it's when I run the uberjar after that

19:56 that I get a crash

19:56 Bronsa: weird

19:57 sritchie: ubjerjar just worked for me w/ :aot :all

19:58 sritchie: Bronsa: inside my jar,

19:58 it's getting thrown at at clojure.tools.reader.edn__init.load(Unknown Source)

19:58 when I actually try to run the jar w/

19:58 java -cp thejar.jar clojure.main -m mynamespace

19:58 Bronsa: yeah, that's the same as the error that seangrov1 had

19:58 mmh

19:59 sritchie: I'm compiling a dummy core.clj with (:require [clojure.tools.reader.edn]), maybe that error manifests when tools.reader is being required from another library I guess

20:02 geoffs: technomancy: works like a charm!! It took about 2 minutes to start up, and it's a bit sluggish (i.e. not instantaneous) in the REPL, but it works! thanks a lot!

20:03 technomancy: geoffs: very cool. would be interested in hearing what you do with it.

20:04 geoffs: I'll let you know :)

20:04 hiredman: clojurebot: clojure is for robots

20:04 clojurebot: Alles klar

20:10 Bronsa: sritchie: is it possible that the exception is being thrown by https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/cookies.clj#L4 ?

20:11 sritchie: Bronsa: oh, yeah

20:11 looks like that's right near the top

20:11 of the trace

20:12 Bronsa: nice find

20:13 Bronsa: sritchie: that's actually what seangrov1 reported :P

20:14 sritchie: I still cannot reproduce though

20:17 technomancy: clojurebot: erlang is for heaters

20:17 clojurebot: c'est bon!

20:22 bitemyapp: technomancy: haha, what?

20:22 technomancy: bitemyapp: https://github.com/technomancy/prometheus

20:23 bitemyapp: technomancy: should've used Elixir >:P

20:23 technomancy: bitemyapp: yeah, the lack of |> is actually suuuuper annoying

20:23 Bronsa: sritchie: I really have no idea what's going on there, I don't think it's a bug with tools.reader, Reader is just a regular clojure protocol

20:24 sritchie: well,

20:24 bitemyapp: technomancy: the set_attribute/get_attribute stuff looks tedious.

20:24 sritchie: maybe they're each depending on separate versions?

20:24 and AOT compiling differently?

20:24 hmm

20:24 Raynes: technomancy: wtf traitor

20:24 bitemyapp: lmfao.

20:24 technomancy: bitemyapp: I don't have enough experience to know whether to blame the lib or not on that one

20:24 Raynes: technomancy: Why would you not use Elixir? Monster.

20:24 I

20:24 Bronsa: sritchie: you should have only a t.r version on your classpath

20:24 sritchie: yeah

20:25 technomancy: Raynes: because of learnyousomeerlang.com

20:25 primarily

20:25 Raynes: technomancy: You've got Raynes.

20:25 technomancy: the LYSE guy works at heroku

20:25 Raynes: You have Raynes and José Valim.

20:25 hyPiRion: yay Erlang

20:26 technomancy: Raynes: we hang out on internal heroku chats and make fun of go together

20:26 hiredman: ~erlang

20:26 clojurebot: http://www.unlimitednovelty.com/2011/07/trouble-with-erlang-or-erlang-is-ghetto.html

20:26 Raynes: technomancy: Oh yeah? Well I've had discussions with the guy who wrote LYAH. So there.

20:26 technomancy: how do you do the thumbs up emoticon

20:27 bitemyapp: technomancy: I am hella jealous of your ability to mock Go with the LYSE guy.

20:27 technomancy: hiredman: agreed on most of the points in that article, but lmao at "There's no nil" like that's a problem

20:28 I mean, "

20:28 Erlang isn't general purpose" is hardly news

20:29 Raynes: The biggest issues with Erlang that it willfully lacks functionality every other modern language has and nobody but me seemed to care at all.

20:30 That sentence was like 5 different sentences munged into one giant nonsensical sentence. Excuse me while I try again.

20:30 The biggest issue with Erlang, imo of course, is that it willfully lacks functionality every other modern language has and nobody but me seems to care at all.

20:31 Which means 1 of 2 things: lots of Erlang people think that Erlang is perfect and never needs new things, or I expect more out of languages than I should.

20:32 TimMc: Did you know that you can rearrange the letters of "Erlangysroniswlo" to spell "Raynes is wrong, lol"?

20:32 True fact.

20:32 Raynes: One specific instance that I've talked about at length: ya can't execute an external program, pipe data to its stdin, tell it you're finished by sending EOF, and then read data.

20:33 technomancy: Raynes: is "sending EOF" here somehow distinct from "closing its input stream"?

20:33 Raynes: My post on the mailing list received mostly replies about how this is a horrible thing to do, tinged with responses to those people asking them for samples of what they were smoking.

20:33 technomancy: No.

20:33 technomancy: huh

20:33 so you're saying closing the input stream closes the output stream too or something?

20:34 brainproxy: inside a go-loop in a cljs app, i have some "subroutines" (i.e. fn calls) that should yield back a bit of time to the cpu in order for the overall app to feel more responsive

20:34 Raynes: Yes.

20:34 technomancy: lame

20:34 brainproxy: i came up w/ this helper: https://gist.github.com/michaelsbradleyjr/7258997

20:34 thoughts?

20:34 technomancy: well it's a good fit for chat programs =)

20:34 Raynes: technomancy: Solution proposed by well known member of the community: write data to file, shell out to bash and pipe file into program, read output.

20:34 I pretty much checked out and gave up at that point.

20:35 TimMc: Pretty wild.

20:35 Raynes: technomancy: What bothers me is that this isn't just something you write a library for. The fundamental low-level API to do this isn't there in Erlang. You use what they've got or you write C to do it instead.

20:35 So if they don't want change, there ain't gonna be no change.

20:36 technomancy: Raynes:right; it's not even something you can fix in a completely different language

20:47 bitemyapp: Raynes: it doesn't help that Ericsson just gives zero fucks.

20:48 Raynes: bitemyapp: Negative 1 in my experience.

20:49 xuser: so that's an elixir issue too I guess

20:50 brehaut: didnt ericson stop using erlang in hte late 90s ?

20:51 oh i see, they unbanned it in 2004 and rehired armstrong

20:52 xuser: to be serious about elixir you need to know erlang, to be serious about clojure you need to know java ;)

20:52 bitemyapp: xuser: not really.

20:52 I know fuck-all about Java and use Clojure happily.

20:52 I just know where to find what I want in java.util.*

20:52 Foxboron: xuser: thats like saying "to be serious about Python, you need to know C"

20:52 thats not correct at all

20:52 bitemyapp: ^^ what he said.

20:53 Clojure relies on its host, but it doesn't matter for Joe Average Developer.

20:53 Or Jill.

20:53 Foxboron: "To be serious about lang x, you need to have understanding of the underlying language"

20:53 this applies to everything really

20:53 "To be serious about C; you'd need to know ASM"

20:54 IMO, it might be more relevant for Clojure.

20:54 xuser: maybe replace serious with pragmatic?

20:54 Foxboron: But i think its just wrong.

20:54 bitemyapp: knowing assembler can make C more, not less, confusing.

20:54 you're better off studying the C standard and understanding the abstract C machine model.

20:54 Foxboron: xuser: why pragmatic?

20:54 i'd argue it would make a language less pragmatic if you need to know two languages to learn one

20:55 bitemyapp: well, that wasnt really the point of the statment :P

20:55 brehaut: clojure is different to most languages because it expects you to use the host language's APIs directly via interop

20:55 xuser: Foxboron: because of the ecosystem, in your python examle you don't need to know C to create useful real world apps rapidly

20:55 Foxboron: xuser: you don't need to know java to do the same with Clojure

20:55 xuser: Foxboron: that's not the same for clojure or elixir

20:55 brehaut: clojure doesnt ship with a concurrent threadsafe blocking queue because java provides a completely adequate one for example

20:56 Foxboron: brehaut: but you go by fine using that without any knowledge about java

20:56 brehaut: Foxboron: by analogy it would be the same as just ignoring a huge chunk of the standard library in python

20:57 benkay: poor me, i decided to learn emacs and clojure at the same time because i believed the troll who told me that i'd need to in order to really grok the environment

20:57 hyPiRion: there's a difference between a standard library and knowing how to develop good programs in a language

20:58 brainproxy: benkay: it gets better :)

20:58 just stick with it

20:58 Foxboron: hyPiRion: i was struggling formulating just that.

20:58 xuser: Foxboron: I though Clojure success was the Java ecosystem, so see where I'm going to here

20:58 Foxboron: xuser: sure it is.

20:58 xuser: +you

20:58 benkay: 8 months later i'm baseline competent at both, and to rub salt in the wounds i just watched the hagleberg talk where he says "yeah don't learn clojure and emacs at the same time"

20:58 Foxboron: But it dosnt require any java knowledge to use an API provided to you.

20:59 xuser: you go by just fine using a C library in Python without C knowledge

20:59 TimMc: technomancy: Looking at Prometheus... I'm thinking of writing a daemon that runs Folding@Home at different CPU intensity levels depending on the temperature and a "thermostat" setting.

20:59 Foxboron: same applies to Clojure

20:59 TimMc: It would require a little experimentation to determine what CPU temps correspond to what room temps.

20:59 technomancy: benkay: who told you that; let's sick the guards on em

20:59 Foxboron: xuser: you can argue it helps understand Clojure better. But not development.

20:59 xuser: Foxboron: yes, but Java APIs are not exposed as Clojure api

20:59 technomancy: benkay: which talk was that btw? =)

21:00 TimMc: awesome

21:00 Foxboron: xuser: but that isnt really an argument. You get by fine using the tools clojure give you to work with the API.

21:00 hyPiRion: The "need" for java interop was mostly to bootstrap the chicken and egg problem with a language: You'd need a lot of libraries to get users to use it, but only the users can generate those. These days you can get usually along fine by using Clojure wrappers for what you need.

21:00 Foxboron: No java knowledge needed.

21:00 TimMc: I've already used an old laptop running F@H as a heating pad...

21:00 technomancy: TimMc: probably not a great fit for the beaglebone if it's CPU intensive, but I was really happy with it for this

21:00 hiredman: hyPiRion: the wrappers are often very bad

21:00 TimMc: Yeah, this is for beefier machines.

21:01 llasram: Also, one thing I *love* about Clojure is how thin a layer it can be over the JVM. Even thinner than Java at times IMHO

21:01 hyPiRion: hiredman: Yeah, that's actually a bit of a problem: What is a good vs. bad wrapper is hard to find out.

21:01 hiredman: llasram: yes

21:01 hyPiRion: it is easy, wrappers are bad

21:02 people tend to do them as "my first clojure" projects

21:02 TimMc: Wrappers are good for bad APIs. -.-

21:02 hiredman: they hide what is being wrapped without adding value

21:03 xuser: Foxboron: won't you have a hard time using http://docs.oracle.com/javase/7/docs/api/ without java knowlegde?

21:03 llasram: I think a good wrapper can add value by providing actual integration

21:03 bitemyapp: xuser: how much code have you written today?

21:03 llasram: Making things seqable, reducible, etc

21:03 xuser: bitemyapp: not much really ;)

21:03 brehaut: hiredman, llasram: and often they are written without full understanding of the decisions that went into the wrapped API

21:04 bitemyapp: xuser: stop wasting yours and everybody else's time and just go write some Clojure code.

21:04 hiredman: indeed

21:04 Foxboron: xuser: why would i? I see what types it uses. What goes where and what it returns.

21:04 xuser: where is the problem?

21:04 bitemyapp: Foxboron: don't encourage him.

21:04 Foxboron: write code.

21:04 hiredman: wrappers are the most direct way to add complexity, you had an api X with X's semantics, how you have to worry about wrapper W and how it's semantics are mapped on to X

21:04 benkay: technomancy http://www.infoq.com/presentations/Swarm-Coding

21:04 xuser: bitemyapp: I really deserved that

21:05 Foxboron: bitemyapp: i am a sucker for arguments

21:05 bitemyapp: Foxboron: become a sucker for code.

21:05 Foxboron: if you need a task, I can provide one.

21:05 Foxboron: bitemyapp: Hahaha. It's way to late for me to produce any kind of useable code, but sure shoot.

21:06 bitemyapp: Foxboron: github.com/bitemyapp/revise cbp got the rethinkdb client driver pretty close to being releasable, I'm working on making the connection management thread-safe. You could poke around and see what could be done with it if it interests you.

21:07 you might want to ping him or I before launching any crusades though.

21:07 Foxboron: bitemyapp: i'm like "ohhey, i recognize that picture from somwhere...oh twitter!"

21:08 bitemyapp: gotta look at the code, might be above my level of skill

21:09 bitemyapp: Foxboron: you reach that level of skill by rolling up your sleeves and doing the work.

21:10 Foxboron: bitemyapp: you don't just walk into Tour de France with a tricycle

21:11 bitemyapp: Foxboron: code isn't like that. It's not a competition, it's just work.

21:11 Foxboron: all you have to do is get the work done and continually refine and improve. It'll take less experienced people more time than more experienced people...but it's not a race. It shouldn't be.

21:11 Foxboron: just get the work done.

21:12 don't understand monoids? learn what monoids are. Don't understand transients? learn what transients are for.

21:12 it doesn't matter if that means things take a bit longer.

21:12 Raynes: Heh.

21:12 Foxboron: But in reality, it is easier said then done. bitemyapp ill take a look. But anything thread related is my weak side really.

21:12 amalloy: (inc bitemyapp)

21:12 lazybot: ⇒ 9

21:13 brehaut: Foxboron: you wont get better at threads by thinking about it

21:13 (thinking alone)

21:14 Foxboron: brehaut: that is indeed true.

21:14 amalloy: Foxboron: for years i felt the same way about databases - it was this big scary thing that i *knew* i didn't know how to do, and so i avoided it. but like threading, it's...just not that hard, once you decide to learn it

21:14 xuser: bitemyapp: so how does reql compare to sql? do like you like more?

21:14 +it

21:15 Raynes: bitemyapp: We basically roll out of bed like that every morning because we didn't do college.

21:15 bitemyapp: "Hrm, monoids. Better read up on those."

21:16 Foxboron: amalloy: hah. I attended an AI competition with no knowledge and a week at my disposal. got into the finals and knocked out because of 1/2 simple mistakes :3

21:16 Raynes: As opposed to "Hrm, they didn't cover this in school."

21:16 bitemyapp: xuser: REQL is neat, I don't have a strong opinion on it. I think it leads to somewhat more native semantics in the querying but I think SQL and Datalog are both better in the long run.

21:16 brehaut: Raynes: you are making ridiculous generalisations

21:16 Foxboron: Raynes: hah, what do they cover in school except OO concepts?

21:16 amalloy: brehaut: they teach you not to do that in college

21:16 (apparently)

21:16 brehaut: amalloy: aha

21:16 bitemyapp: Raynes: you might be right.

21:17 of course, I'm only agreeing because it makes brehaut butt-mad.

21:17 brehaut: bitemyapp: im shaking my head, not frothing with rage

21:17 Raynes: I don't think he is angry at what I said but what he just made up that I said.

21:17 bitemyapp: Foxboron: actually, xuser reminds me - i could use a datalog->SQL bridge.

21:17 xuser: bitemyapp: hmm k, I'll stick with postgres for now

21:18 bitemyapp: xuser: rethinkdb is nice if you want a document store that isn't awful.

21:18 Foxboron: bitemyapp: i got no idea what that means.

21:18 Raynes: brehaut: I certainly wasn't saying that people who go to college aren't capable or willing to learn things not taught in college.

21:18 bitemyapp: Foxboron: I want to query SQL databases with datalog.

21:18 Raynes: Sorry if it came off that way. :D

21:19 brehaut: Raynes: no obviously.

21:19 bitemyapp: Perhaps more that we just don't understand what's expected, so we learn whatever.

21:19 and that's how we learned everything we know anyway.

21:19 that and getting brow-beaten on IRC.

21:19 brehaut: Raynes: but likewise, ive known a lot of non-college educated programmers who would see 'monoid' and go 'programming isnt math. what do i need that for, PHP!'

21:19 bitemyapp: garbage people are garbage. News at 11

21:20 brehaut: indeed

21:20 hiredman: come now, I hear php has a type system now

21:20 brehaut: hiredman: wait wat

21:20 Foxboron: bitemyapp: ahh, i see. Googled and it made more sense

21:20 hiredman: there was a strangeloop talk, one of the hiphop vm guys annonced a gradual typing extension to php

21:20 benkay: (+ 2 bitemyapp)

21:21 bitemyapp: Foxboron: datalog is hella nice yo.

21:21 brehaut: hiredman: O_O that sounds astoundingly brave

21:21 muhoo: often the only thing learned from being browbeaten is to hate the browbeater. doesn't always get the message through, and often obscures or invalidates it.

21:21 hiredman: the video went viral or something

21:21 Foxboron: hiredman: looking at it. and it makes indeed sense

21:22 bitemyapp: i'd really love to have a project to work on, and i'll take a look at it. I am tho not home and kinda busy over the weekend, so nothing from me before a few days

21:22 also, lol at hilightning hiredman instead of bitemyapp

21:22 tired indeed

21:23 benkay: muhoo: i find that browbeating only works if the beater respects the beater

21:23 beaten* respects the beater

21:24 hiredman: https://twitter.com/puredanger/status/384124183308820480

21:24 Apage43: I have a queue of maths to try and grasp, as every once in a while I encounter something that really builds on something that I don't know, which builds on more stuff I don't know, but that is still really interesting :/

21:24 brehaut: hiredman: thanks

21:24 hiredman: that talk video is available for preview with a code if you attended

21:25 brehaut: i guess i'll have to wait for it like a schlep then

21:25 benkay: brehaut: shlub

21:25 hiredman: I dunno, I did end up watching it all

21:25 bitemyapp: brehaut: a schlep is a tiresome and tedious journey or task, not a person.

21:25 hiredman: didn't

21:25 brehaut: oh

21:25 sorry

21:25 bitemyapp: yeah you want shlub.

21:26 it's fine, you're not a new yorker, don't know any better :)

21:26 I want Facebook to go whole-hog and make a PHP compiler target for Haskell.

21:26 GHC Core -> PHP

21:28 muhoo: benkay: i grew up in an era where learning many technical things meant willingly and eagerly subjecting yourself to abuse. it was like a hazing, but it was easy for someone with low self-esteem to tolerate, even welcome. i was happily surprised to see over the last decade a trend towards more respectful, openminded, less-judgemental, genteel mentoring. saw it in many areas. the clojure community has usually been exemplary in that area, em

21:29 bitemyapp: muhoo: Common Lisp was like joining an abusive fraternity.

21:29 CoconutCrab: hi!

21:29 muhoo: bitemyapp: exactly. i no longer think that attitude is necessary or healthy.

21:30 bitemyapp: muhoo: well I try to be nice, but give short shrift to people wasting others' time still. I think I've gotten substantially better.

21:30 muhoo: (early linux was like that too, which is where i cut my teeth. i've been called an idiot more times than i can count)

21:30 benkay: muhoo: I waffle on the topic. some days the right approach is to throw a human into a problem way beyond their abilities, and some days the right approach is to ask "now precisely what the fuck were you thinking when you trashed our production keys?"

21:30 highly context and recipient dependent in my experience

21:31 rhg135: bitemyapp: Oh God

21:31 benkay: there is no One True Management philosophy, and junior engineers will always need Managing.

21:32 some thrive under pressure to not fuck up

21:32 bitemyapp: rhg135: hum?

21:32 rhg135: Nvm

21:32 benkay: other thrive only with zero pressure at all

21:32 i've been blessed to work at both kinds of shops and see both styles of management in practice, and have begun my own experiments

21:32 (muahahahaha)

21:33 * rhg135 looksforlogs

21:42 bitemyapp: benkay: I work at a company where there's no management or bosses, the younguns just end up under some more experienced person's wing.

21:42 they do their work, but are in some respects apprenticing over the course of multiple programs until they grow moe independent.

21:43 TimMc: CoconutCrab!

21:43 bitemyapp: TimMc: I KNOW RIGHT?!

21:44 TimMc: Sorry, I react to your name like https://xkcd.com/231/

21:44 holo: is it OK to make a pun with clojure to name a java lib wrapper, like: clj-java-lib or java-lijure?

21:45 bitemyapp: TimMc: me too :)

21:45 holo: dude no.

21:45 holo: don't...just...no.

21:45 give it a nice name.

21:45 holo: but it's a wrapper..

21:45 hyPiRion: holo: You can try `lein new java-lijure` and see what we think about that idea

21:45 holo: omg, that name really exists?

21:46 hyPiRion: holo: try to run the command I gave you

21:46 bitemyapp: (it'll blow up your computer)

21:47 holo: ok, really no puns :) i got it

21:47 bitemyapp: hyPiRion: GHC once had a bug where Haskell code that failed the type-checker got deleted.

21:47 hyPiRion: I would suggest that Leiningen could benefit from their example...

21:48 benkay: bitemyapp: i don't know if this trend in the US towards management-less organizations is an evolution or de-evolution

21:48 hyPiRion: bitemyapp: oh, include bugs into programs used in production? sure thing, I add bugs into Leiningen all the time

21:49 benkay: bitemyapp: with the right leadership, it certainly seems to work while the VC bucks flow. with the wrong leadership, it turns into a clusterfuck of finger-pointing.

21:53 TimMc: holo: It's OK if it's ironic, e.g. swearjure.

21:56 holo: TimMc, it's kuromoji java lib. if i name it kuromojure, and take "mo", it's clojure spelled in japanese - kurojure. but yeah, probably it's a bad idea

21:59 probably the correct spelling would be kurojuru

22:04 akurilin: Does Korma support choosing select field names without the first table's prefix? I think that's possible if you define a relationship in defentity, but I'm wondering if that's possible without it

22:17 bitemyapp: akurilin: choosing select field names?

22:17 akurilin: might be easier if you have a before/after of "what I have to do now" and "how I'd rather express myself"

22:18 akurilin: bitemyapp, as in, I'm joining 2 tables, I can only select columns from the first table if (fields) prepends "first_table". to every column name

22:19 bitemyapp: akurilin: hrm, I would advise making first table a variable, but keeping it otherwise explicit.

22:20 akurilin: bitemyapp, not sure I'm following. When you say "first table a variable", are you suggesting I defentity it?

22:22 `cbp: If I redefine / in another namespace

22:22 and then try to use it I get stuff like "invalid token" or "unmatched delimiter )"

22:23 however clojure.core// works fine :-o

22:24 Do I have to rename my /? :P

22:34 bitemyapp: akurilin: yes, or join a string.

22:34 amalloy: `cbp: yes

22:35 `cbp: amalloy: aww

22:35 amalloy: / and clojure.core// are special-cased into the reader, as the only two symbols in which / isn't (only) a namespace separator

22:36 `cbp: Oh why didnt I think of that

22:36 amalloy: thanks

22:57 gfredericks: is that fixed for 1.6?

22:57 I thought clojurescript needed it for something

22:57 devn: is anyone else not really surprised by the keyword reader patch being reverted?

22:58 is there a good reason to not allow {:1234 "a"}?

22:58 gfredericks: devn: clojure.org/reader says you can't do that?

22:58 you might also argue that it's weird for a syntax to be valid as a keyword but not as a symbol

22:59 devn: well sure, but there's been a longstanding "hey, so, we dont use % yet, but there's no guarantee"

22:59 gfredericks: we don't use % yet?

23:00 ,'#(% %2)

23:00 clojurebot: (fn* [p1__29# p2__30#] (p1__29# p2__30#))

23:00 gfredericks: I guess those aren't symbols exactly

23:01 ,:%

23:01 clojurebot: :%

23:01 devn: gfredericks: yeah, maybe a poor example

23:02 im just saying, no one ever made guarantees about what will or won't be a reader macro, so there are things allowed in symbols that might not be in the future

23:02 gfredericks: I've always thought of keywords and symbols as being rather parallel

23:02 devn: sure, and the patch that got reverted was an example of things not being there in the future

23:02 devn: in that respect i agree with you, but then again, i rather like the :1 thing

23:03 for SHAs and stuff

23:03 gfredericks: you use keywords for SHAs?

23:03 TimMc: &:1

23:03 lazybot: ⇒ :1

23:03 TimMc: TIL

23:03 gfredericks: TimMc: ?

23:03 devn: gfredericks: not all the time or some shit

23:03 TimMc: Not something I'd rely on though.

23:03 gfredericks: "Today I Learned"

23:03 gfredericks: TimMc: you've not been around for today's discussion I guess?

23:04 TimMc: I am vaguely aware of it.

23:04 gfredericks: "It is neither the case that I use keywords for SHAs all the time, nor is it the case that some shit."

23:05 devn: yeah I don't have a strong case against it

23:05 you don't often see rich flip-flopping like that I guess is the weird part

23:05 or at least I don't

23:18 I think alex's email clears it all up

23:19 I'm curious how much code-breakage will be tolerated for clojure 2.0

23:22 muhoo: there's a clojure 2.0 in the works?

23:22 news to me

23:22 gfredericks: well I imagine it's more an idea than a concrete thing at the moment

23:23 I think I heard rich suggest it would coincide with CinC

23:24 tbaldridge: that's probably years off though

23:24 gfredericks: right

23:48 muhoo: hmm, just upgraded to latest ring, and got this joy:

23:48 Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest, compiling:(ring/middleware/multipart_params.clj:39:5)

23:49 am i correct in reading this to mean that ring-middleware is missing a dependency that it needs in order to work?

23:50 if so, why, and how can this be?

23:55 amalloy: could be you're getting version X of one of the ring libs, and a conflicting version Y of another because multiple libraries depend on ring. or similarly for whoever depends on the servlet stuff

23:57 (ie, usually it means not that a library is missing, but that it's not the expected version)

23:58 Bronsa: https://github.com/ring-clojure/ring/commit/c58e4912c9ab5228c247e558bd264b8e323a9e46 might be relevant

Logging service provided by n01se.net