#clojure logs

2013-10-31

00:07davTimMc: thanks
00:09`cbpbitemyapp: Hi
00:09`cbpbitemyapp: got a minute?
00:15TimMc&((-> ! #(! [%])) []) ;; brehaut, this allocates but also uses (too much) stack
00:15lazybotjava.lang.StackOverflowError
00:16brehautTimMc: thats a mind bender
00:16TimMcAll it does is build up [[[[[[]]]]]]
00:17TimMcI might be able to make something that makes multiple subcalls that eventually return a larger data structure.
00:18TimMcI wonder if I can work the Ackermann function in here somehow?
00:22`cbp,(macroexpand '(-> ! #(! [%]))) ;; :-O
00:22clojurebot(fn* ! [p1__29#] (! [p1__29#]))
00:24TimMc...and while researching the Ackermann Function, I end up on gfredericks.com.
00:24TimMcIt's a small internet.
00:25amalloyTimMc: 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
00:25bitemyapp`cbp: yeah, what's up?
00:26`cbpbitemyapp: 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
00:27TimMcamalloy: Bounded stack and bounded heap allocation?
00:27amalloyno, of course it uses unbounded heap
00:27bitemyapp`cbp: I need the token to match promises with protobuf responses.
00:27bitemyapp`cbp: unless I've misunderstood something.
00:27`cbpbitemyapp: you send the token when you send a response though, rdb doesn't generate it
00:27TimMcamalloy: What I mean is, bounded number of objects.
00:27amalloysince (ack n) takes unbounded space just to represent, for large n, let alone compute
00:27`cbpso in theory you already have it
00:27TimMcBut I guess not that either.
00:28bitemyapp`cbp: uhm, no, I don't think you understand what I mean.
00:28`cbpbitemyapp: i mean when you send a query
00:28bitemyapp`cbp: I need the tokens to match the query results to the promises.
00:28bitemyapp`cbp: that's how I'm solving the race condition.
00:28`cbpbitemyapp oh I see
00:28bitemyapp`cbp: there's no guarantee what order the queries come back in.
00:28bitemyappif query A gets sent first, takes 100ms, query B gets sent second, takes 50 ms, you have a problem.
00:28bitemyapp`cbp: I wrote the test reproducing this.
00:29bitemyappthe race condition.
00:29bitemyappwhen I replace the conn mgmt machinery, it should make the connections thread-safe and free from race conditions.
00:30`cbpbitemyapp: so should the user be forced to (:response @promise)?
00:30bitemyapp`cbp: no, but *I* need it.
00:30bitemyapp`cbp: we can leave it out of the default user-facing API.
00:30bitemyappsend 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.
00:30bitemyapp`cbp: those are the semantics I have in mind ^^
00:31bitemyappI'll probably toss exceptions into the promise too.
00:32bitemyappbut ideally not in the agent itself.
00:32bitemyappor the thread-singleton pulling stuff down for the conn agent.
00:35`cbpI'll leave it as is and leave the second part of (is (= (run query) ..)) in todo mode till we have that part ready :-p
00:50rhg135WB
00:50rhg135WB
00:50Rayneswub wub wub
00:51rhg135WB
00:52uvtcWarner Bros? Writers block?
00:52uvtc*Writer's
00:52rhg135WB
00:52rhg135WB
00:53TimMcI didn't know stuttering came across in text as well.
00:54rhg135WB
00:55rhg135WB
00:59rhg135WB
00:59rhg135WB
00:59rhg135WB
01:01rhg135WB
01:01rhg135WB
01:01rhg135WB
01:02rhg135oh shit
01:02rhg135there, it's off
01:07nightflywrong buffer?
01:45Shiro-IchidaHi. Anybody here know how 4Clojure works?
01:45Shiro-IchidaI've written something that seems to work in the online REPL, but fails when I put it into 4Clojure.
02:10brand0;;last
02:13brand0Shiro-Ichida: u get help yet?
02:21MufasaaHi guys
02:21Mufasaaa late night question for the man who suddenly had the greatest urge to learn clojure
02:22MufasaaI've found several references on how to write specific functions/maps/hashes and other idioms of clojure
02:22Mufasaabut nothing that really shows you how a proper application/system written in clojure really works
02:22Mufasaaideas?
02:29MufasaaNo takers?
02:29epicheroTake up drinking, clojure isn't newbie friendly at all. *someone will think they are destined to prove me wrong so just wait*
02:34MufasaaLOL, programming, with the exception of basic, should not be user friendly
02:34MufasaaI'm wrapping my brains around the concepts of functional programming
02:37epicheroOkay, 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
02:38MufasaaThanks, I'll look that up. Currently looking at Mark Volkmann's Snake
02:42bitemyappMufasaa: do you want a full application, say a web app?
02:43MufasaaWell, 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
02:47epicheroPedestal has some good tutorials, but its opinionated and i'd only advise it if you have fullstack experience.
02:47winkMufasaa: 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
02:48epicheroNice
02:48winkit's working enough that I use my own instance instead of soup.io
02:48winkit even works well enough I haven't touched it in a while :(
02:48Mufasaathanks
02:49Mufasaacerainly a starting point
02:49Mufasaa*certainly
02:49winkyou 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
02:50shoshinping
02:50shoshinis there a library like SciKit available in Clojure?
02:50MufasaaI am using lein, but I certainly won't claim to have gained mastery
02:51Mufasaathis is my 2nd day/night
02:51winkshoshin: if you find something and it has scikit-audiolab, please tell me :)
02:51epicheroThere are example files you should read over 10 times on the lein gh page
02:52abaranoskyMufasaa: what are your questions?
02:52winkMufasaa: you could have a quick glance at https://pinboard.in/u:winks/t:clojure/ - it's basically all I used for learning clojure
02:52abaranoskyI've used lein for like 2 years or more, and still I don't have mastery :\
02:52Mufasaa@abaranosky: well, nothing specific as yet, just looking for an application/walkthrough
02:52winkMufasaa: should be a few examples and howtos in there as well
02:53abaranoskywink: what is pinboard? Looks like an interesting service
02:53winkI think http://thecomputersarewinning.com/post/clojure-heroku-noir-mongo got me hooked
02:53bitemyappabaranosky: just a way to save links.
02:53winkabaranosky: bookmarking service like delicious et al
02:53MufasaaNICE, now why did google not show me that?
02:53bitemyappMufasaa: http://github.com/bitemyapp/neubite/
02:53winkMufasaa: noir is deprecated nowadays
02:54bitemyappabaranosky: I would pay for a pinboard account just to support the hilarious founder.
02:54shoshinwink 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
02:54winkabaranosky: I am a huge fan of it. it's a one-time payment
02:54bitemyappit's one of those cool "pay once, use until I am out of business" services.
02:54winkshoshin: well I am not doing ML at all, just audio processing :P
02:54winkshoshin: but thanks :)
02:54abaranoskyisn't it just a spot to put my bookmarks? How's it better than Chrome bookmarks?
02:55abaranoskybitemyapp: that's a rad biz model
02:55bitemyappabaranosky: some people like the less ephemeral feeling of saving and organizing bookmarks to pinboard rather than Chrome-specific cloud-synched bookmarks.
02:56abaranoskyanyone here using Riemann?
02:56bitemyappabaranosky: for example, I have 4 different chrome profiles and google accounts.
02:56winkyeah. multi-device, multi-browser
02:56bitemyappchrome bookmark sync isn't super-duper practical for me.
02:56bitemyappeven though I don't really use non-Chrome browsers.
02:56winkI wrote my own bookmarking tool (yes, more than one) before chrome was even conceived
02:56winkpossibly before firefox
02:56bitemyappI've written a couple.
02:56abaranoskybitemyapp: I guess that sounds right. I pesonally have just accepted tht I'll always eventually lose all my bookmarks
02:57abaranosky23:16 *** tauntaun JOIN
02:57winkI put em online to share as reference (like I jsut did) anyway :)
02:57bitemyappabaranosky: that's where I'm at now. Non-attachment to bookmarks.
02:57abaranoskybut also... any more than 15-20 is essentially infinite bookmarks for me, and I won't read them anyhow
02:57winkso why not embrace a service that abstracts the details. I can backup a dump form time to time
02:57bitemyappI just don't care anymore. The important stuff are usually PDFs and I just save those.
02:57bitemyapptracking down white papers can be ANNOYING sometimes.
02:58winkabaranosky: I just dump a filtered list on http://f5n.org/stack/ anyway
02:58abaranoskyI am just inundated in a sea of cool information... if it is really special it will come back around again :D
02:58winkI'd love some more papers
02:59Mufasaahmmm
02:59abaranosky"Japanese politician banned for wearing wrestling mask to meetings"
02:59winktime for breakfast. coming to work at 6 am is.. unusual
03:00abaranoskywhere is it 6am?
03:00winkyeah, can't be all tech stuff :P
03:00winkGermany. 7:20 now
03:00Mufasaaso, I've cloned both, thanks guys
03:00MufasaaCanada (Calgary) 00:21
03:00abaranoskyMufasa: I'm always up for a code review
03:00Jarda.fi 8:21
03:00abaranosky... if that's your thing
03:01`cbpsounds kinky
03:01MufasaaI will hold you to that, but let me write something first in clojure :)
03:01MufasaaROFL
03:02Mufasaafor the time being, what do you guys think of this: http://java.ociweb.com/mark/clojure/ClojureSnake.html
03:02bitemyappMufasaa: you don't want me to review your code, pick abaranosky.
03:02abaranoskybest to ping me on Twitter @Baranosky
03:02MufasaaOK, will follow
03:03abaranosky1. defstruct is ancient, I think it essentially deprecated
03:03bitemyappMufasaa: sorta ick. I'm @bitemyapp on twitter. Follow me even though I'm not going to help you.
03:03bitemyappThere's not a good reason to use defstruct.
03:03bitemyappOTOH, I get irritated when people use defrecord for no reason too.
03:04MufasaaI'm new to clojure, don't know right from wrong, this is the stuff I found on the net
03:04bitemyappMufasaa: take a look at the web app I linked you.
03:04abaranoskythat is correct... don't use defrecord, as a beginner
03:05abaranoskythat's the safest way to use defrecord when you're still learning: never use it
03:05abaranosky(quot (.getWidth size) cell-size) construction seems weird
03:05abaranoskyMufasaa: in general that code looks a few years old
03:06bitemyappMufasaa: just use maps, vectors, and sets. See how far you get.
03:06bitemyappConstraint is the harsh foster-parent of creativity.
03:07MufasaaThis is my second day at it
03:07abaranoskyanyone use Riemann?
03:07MufasaaLooking at it, I've cloned it and will be disecting it
03:07abaranoskyWe're starting to use it at work... looks pretty nice
03:07bitemyappabaranosky: 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.
03:08bitemyappI personally despise statsd and graphite, so Riemann has a special place in my heart.
03:08`cbpit'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
03:08`cbpyou get from*
03:08bitemyappthis is true. plain old data and functions go a long way.
03:08abaranoskywe need some dissenting opinion though
03:09abaranoskywe're all a bunch of fanboys here ... no good arguments to be had :|
03:09bitemyappThe only real "evil" I use is alter-var-root.
03:09wink"legacy clojure code" - aka "first world problems"
03:10abaranoskywhat are your favorite non-party-line thoughts about clojure?
03:10MufasaaI'm curious, do you use clojure in your day to day work lives?
03:10bitemyappabaranosky: 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.
03:10winkI committed one leiningen project to our work repo, not more until now :P
03:10abaranoskyalter-var-root has its place... just not as often as *you* like to use it I think :D
03:10bitemyappabaranosky: the inability to make practical fast-starting binaries in Clojure cripples my ability to use it outside of server stuff.
03:10rhg135abaranosky: try #perl for arguments ;-)
03:11bitemyappabaranosky: Leiningen is probably one of the best things about Clojure.
03:11abaranoskybitemyapp: I wish keywords didnt'e xist, and we could have extended String to a Callable protocol
03:11bitemyappwhoa, I'm definitely going to disagree with you on that one.
03:11abaranoskythat's all Keywords are practically speaking
03:12bitemyappI would not want strings to be callable. it would proliferate the already annoying NPEs badly.
03:12abaranoskyunless there is some amazing performance boost you get fro them, which I 've never seen when profiling
03:12bitemyappabaranosky: the point is to indicate "intent" and separate things into a tighter and more focused fitness for purpose.
03:12bitemyappThey're also more visually distinct when you're got a map of keys to string values.
03:13abaranoskya 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
03:13bitemyapp{: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.
03:13bitemyappabaranosky: nah, it could've had IFn on it.
03:13bitemyappit just isn't a good idea.
03:13abaranoskyI bye the visual thing... but then we could have some minor sugar to make it moe distinct... or just use commas
03:13bitemyapp(apply "blah" *) should always be a type error / exception.
03:14abaranoskymostly my concern with keywords is that there can becomes a lot of mental overhead in remember when things are Strings vs Keywords.
03:14bitemyappcommas are antithetical to Lisp syntax.
03:14abaranoskyand sometimes its not easy to keep rack of
03:14bitemyappI don't find I run into that, but I'm also very consistent about what becomes a string vs. keyword.
03:14abaranoskythen of course you get the massive postwalking people do to keywordize json maps and such and it just begins to get ridiculous
03:14abaranoskyincidental complexity even
03:14bitemyappanything that crosses the barrier into the "system" gets keywordized.
03:15bitemyappwelp. lol.
03:15abaranoskythere's a point where you cant keywordize though, because of performance degredation
03:15bitemyappit depends on how much the outside stringly data will "infect" the interior codebase.
03:15bitemyappif it's going to proliferate stringly keys, I'll patch the data source origin to use keywords by default, no post-walking.
03:16bitemyappabaranosky: and the word I used up there, "patch"? That's alter-var-root >:)
03:16abaranoskyhehe
03:16bitemyappabaranosky: working on Revise right now. connection management is an interesting problem.
03:17abaranoskywhen preformance tuning our real time offer system over the last few months, keywordization of data structures was costing us WAYYYYYYYYY too much time.
03:17abaranoskyJSON -> EDN -> JSON was just a total performance sink
03:17bitemyappabaranosky: 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.
03:17bitemyappabaranosky: I don't doubt it, that's why I mentioned patching to avoid post-walk.
03:18abaranoskybitemyapp: can you bring that 2nd to last message into a more concreate example?
03:18Mufasaabitemyapp: 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
03:18bitemyappMufasaa: break things, make a mess, have fun.
03:18abaranoskyI really like schemas or types at the outer layers
03:18bitemyappabaranosky: well, if you don't mind the Haskell, Hoogle is a really good example.
03:18MufasaaOH I will
03:18Mufasaaonly way to learn
03:18abaranoskyMufasaa: mongo is ridiculously easy to install FYI
03:19bitemyappabaranosky: the blending of Monads into the type system allow it to be more expressive about what the computation is doing.
03:19bitemyappbut lets start with a simpler example
03:19Mufasaaabaranosky: 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
03:20Mufasaathanks all, I'll be back tomorrow, with a whole slew of questions
03:20RaynesFeel better, sir.
03:20MufasaaTa
03:20abaranoskyMufasaa: tomorrow when the painkillers wear off you may wonder what the hell you were thinking learning clojrue :P
03:20bitemyappabaranosky: lets say I want a function like interpose.
03:20bitemyapp,(apply str (interpose "," "abcde"))
03:20clojurebot"a,b,c,d,e"
03:20abaranoskyok intepose!
03:21bitemyappabaranosky: abstractly, the type signature is a -> [a] -> [a]
03:21bitemyapptakes two arguments, first one is a scalar, second one is a list of a, and the result is a list of a.
03:21bitemyappabaranosky: http://www.haskell.org/hoogle/?hoogle=a+-%3E+a+-%3E+%5Ba%5D
03:22bitemyappif I know that a particular type-class applies to my "a", I can use a qualifier like:
03:22bitemyappOrd a => a -> [a] -> [a]
03:22abaranoskyand you can effectively search for fns this way?
03:22bitemyappabaranosky: oh yes, I do so all the time.
03:23bitemyappso, 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.
03:23abaranoskybut haskell isn't homoiconic... not sur eI could go back to the dark side
03:23bitemyappabaranosky: 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.
03:23abaranoskybitemyapp: that *is* interesting..
03:24abaranoskythat's neat
03:24bitemyappso all documentation, abstract thought, and discovery is in terms of types as far as the "practical" experience of Haskell goes.
03:24bitemyappI find that, and the experience of a compiler that's actually useful, very pleasant.
03:24abaranoskywhat kinds of problems do you think Haskell is best suited for?
03:24bitemyappeven in Clojure, I think in types.
03:24bitemyappbecause of the time I've spent with Haskell.
03:24winkdoes that have anything to do with keywords or did I lose your discussion? :
03:25abaranoskylatter
03:25winkok, good
03:25bitemyappabaranosky: 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.
03:25bitemyapp"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.
03:25abaranoskyspecifically, I wonder if it is good for any of the types of projects we're getting into at work
03:26bitemyappso your inner loops can be pretty hot in Haskell if you want.
03:26bitemyappabaranosky: 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.
03:26abaranoskyjust found this project yesterday... i like it a bunch: https://github.com/koalaman/shellcheck
03:26bitemyappParsec being the great-grand-daddy of Instaparse.
03:27abaranoskyI should clone instaparse and get some scotch and an repl session going and see what becometh
03:27bitemyappthe 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.
03:28bitemyappincidentally, web and datomic are 90% of my day job....so I'm using Clojure...
03:28abaranoskyinterestingly we profiled HTTP KIT vs JEtty and JEtty ended up winning
03:28bitemyapphrm. I should write a Haskell Datomic client.
03:28abaranoskybut it was close
03:28bitemyappabaranosky: yeah, http-kit does better with many I/O heavy dumb threads
03:28Jardaif I'd need websockets is httpkit the way to go?
03:28abaranoskyyep
03:28bitemyappabaranosky: you guys are doing more analysis/CPU heavy stuff than most, aren't ya?
03:28bitemyappJarda: da.
03:29bitemyappif I write a Haskell datomic client, I will have worked on two Clojure database libraries and one Haskell one.
03:29bitemyappegads.
03:29abaranoskyactually, 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
03:30Jardabtw speaking of redis and rabbit
03:30abaranoskyJarda: yeah?
03:30Apage43throw riak in there, maybe some riemann
03:31Apage43see how many R's you can get in your stack
03:31Apage43in fact
03:31bitemyappRethinkDB
03:31Apage43use R to generate graphs out the other end
03:31JardaI 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'
03:31bitemyappI'm working on the db client for RethinkDB right now.
03:31bitemyappRethinkDB, R, Rabbit, Riak, Riemann, Redis.
03:31Jardabut should I use some real message queue for this stuff or just carmine?
03:31bitemyappand hire Relevance to slap it together.
03:31bitemyappJarda: job-queue right?
03:31Jardabitemyapp: yeah job-queue
03:32bitemyappJarda: just use carmine OR core.async
03:32bitemyappabaranosky: 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.
03:32JardaI don't want to make sub-sequent requests to the web service. The poor service just might die ;) :D
03:32bitemyapptheir bemusement tickled me.
03:32bitemyapp(I really like core.async, for the record)
03:32abaranoskyyou could also fetch the data and stick it on S3, and give them a url to S3
03:33Jardaabaranosky: nah, it's not just data. It's something I store to db and process for the users
03:33bitemyappabaranosky: I think my name for that is GFYA - "go fuck yourself async"
03:33abaranoskyI highy recommend Time Baldridges youtube videos on how the core.async code works
03:33bitemyappdeep macros *_*
03:33bitemyappabaranosky: macros is something Haskell is weak on for sure. Template Haskell is scurry.
03:33abaranoskyyeah I like that.... GFYS.
03:34bitemyapp"here's a URL, it's no longer my problem"
03:34JardaI really should dig into core.async and the theory underneath it. I'm writing my bachelor of science thesis on concurrency in web applications
03:34bitemyappJarda: you really want to dig into core.async and Pedestal then, yes.
03:34abaranoskyI was initially attracted to Shen because it is homoiconic but also has a nice type system
03:35abaranoskybut then I found out how its not used for realworld code and stopped being interested in it
03:35bitemyapptoo loopy for me. I'd rather use Haskell.
03:35epicheroEw haskell, its like a religion
03:36abaranoskyepichero: HWA??
03:36lazybotabaranosky: What are you, crazy? Of course not!
03:36winkJarda: in what form? comparing languages?
03:36bitemyappepichero: if core.typed proliferates I'll be pretty happy. It's more that I like types than that I like Haskell specifically.
03:36bitemyappI just like Haskell's implementation of a practical language with a nice type system.
03:36abaranoskyI like types alla carte... that's nice
03:36bitemyappabaranosky: ho damn, you read that paper?
03:37Jardawink: it might lean more towards 'web development with clojurescript' maybe I don't know. It's a bit unclear still
03:37abaranoskyanyone have any experience with protobufs
03:37bitemyappisn't that some cool stuff?
03:37bitemyappabaranosky: ...yes...me...right now.
03:37Apage43haha
03:37poppingtonichi
03:37bitemyappabaranosky: RethinkDB's protocol is protobufs.
03:37bitemyappand...I'm working on cbp's revival of Revise.
03:37abaranoskyso you like it?
03:37winkJarda: ah, I see :)
03:38bitemyappabaranosky: RethinkDB or protobufs?
03:38abaranoskybitemyapp: protobufs
03:38bitemyappThey're pretty solid. A little crazy/opaque at times but better than most options.
03:38abaranoskybitemyapp: I actually haven't read that paper, but I guess I my hve heard the term somewhere
03:39bitemyappabaranosky: the paper is about using things like monads to implement ACLs.
03:39abaranoskywe're looking for something both faster and more self-reinforcing for our external API calls
03:39bitemyappexternal?
03:39bitemyappyou'd expose protobufs to an external caller?
03:40abaranoskywhat does that have to do with types all carte though?
03:40abaranoskyexternal / internal
03:40abaranoskythey're in the same company, but a different division
03:40Apage43ah
03:41abaranoskyas opposed to giving them JSON, then getting stuck fixing all the times when they don't follow our spec properly
03:41bitemyappabaranosky: well, protobufs do a good job of telling the other guy to shove it if he gets the binary blob wrong.
03:41Apage43that's basically (as I read it) the intended use case
03:41abaranoskyalso, it'll make our services even faster, which is nice
03:41bitemyappabaranosky: yeah if it's cross-departmental but still "internal'ish", I'd use protobufs with a versioned API.
03:41abaranosky"protobufs do a good job of telling the
03:41abaranosky other guy to shove it if he gets the binary blob wrong." heck yeah
03:42bitemyappprotobufs handled RethinkDB's arbitarily recursive documents and lambdas pretty nicely.
03:42abaranoskybitemyapp: good, that seems to be what we're most likey to be doing
03:42bitemyappand trust me, nothing will gork your brain like trying to read recursive binary representations of higher order functions.
03:42Apage43if 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
03:42abaranoskybitemyapp: oh wow, so the data description language is pretty powerful then
03:42Apage43then you can deal with the *actual* problems
03:42bitemyappabaranosky: soorrrrrtaaaa
03:42Apage43ha
03:43Apage43actually most of that comes out of how protobufs are encoded
03:43abaranosky:'(
03:43Apage43the actual definition is sorta dumb
03:43Apage43if you have a protobuf in a protobuf
03:43bitemyapplet me just show you the proto file
03:43bitemyappabaranosky: https://github.com/bitemyapp/revise/blob/master/resources/proto/rethinkdb.proto
03:43Apage43it basically encodes that as an opaque blob, and the decoder because it knows the definition can do the right thing
03:44abaranoskyMaybe I can generate protobuf data descriptions with macros :)
03:44bitemyappabaranosky: it is worth noting here that these protobufs are serializing...JSON.
03:44bitemyappso the semantics of the API are still arbitrary documents
03:44Apage43but that's also nice, as it allows old decoders to ignore new fields they don't care about, always
03:44abaranosky(kidding btw)
03:44bitemyappeven if protobufs themselves aren't.
03:44bitemyappabaranosky: you definitely could.
03:44bitemyappyou shouldn't, but you could.
03:45bitemyappabaranosky: "message Term {" is where the lambda horror begins.
03:45abaranoskybitemyapp: macros are the crack cocaine of Lisp coding
03:45abaranosky... you shouldn't, but you could
03:45bitemyappabaranosky: and then the RQL lang itself looks like the example on here: http://rethinkdb.com/
03:45bitemyappbut again, because it's just protobufs, you can adapt it to the semantics of your language.
03:45Apage43the protobuf is a sort of AST-encoding on the wire
03:46abaranoskybitemyapp: I need to read that file more closely when its not as late
03:46Apage43so each client library builds that in a way that is semi-familiar to users of the host language
03:46bitemyapp^^ yep.
03:46bitemyappApage43: well, high level language users yes. Java users no.
03:47bitemyappthe Java client library stalled out when they got to the lambdas. This made me laugh more than it should've.
03:47Apage43Java always gets the short straw
03:47abaranoskythey like them though :\
03:47bitemyappbut OTOH, it means the Clojure library (revise) has a good excuse to work with a clean, zero-java library.
03:47Apage43I always feel a bit sad when I look at java-datomic or jcascalog
03:47Apage43writing your query as a bigass string
03:47bitemyappApage43: I feel a bit sad as a Clojure and Datomic user and everytime I check the docs they use Java to demonstrate something.
03:48abaranoskyI always feel like I do when I see people wearing bell bottoms, when I think of Java coders
03:48abaranoskybut the reality is some huge percentage of all programmers are C# or Java programmers
03:48Apage43but but that's.. data... why are you putting in in a string like that... stop :(
03:49bitemyappApage43: strings and Object are the dynamic types of Java-land.
03:49bitemyappand XML strings.
03:49Apage43C# has a few niceties that I would really not mind if java stole
03:49abaranoskybitemyapp: if only Java users had Keywords...
03:50abaranoskyC# is a better JAva... except for the VM
03:50bitemyappApage43: I want .NET VM's TCO support.
03:50bitemyappabaranosky: and the libraries...
03:50abaranoskyafter I said the VM part i realized I was full of shit
03:50bitemyappJava libraries are better and more plentiful even if the language is worse.
03:51abaranoskyit is more the libraries, and open source community around Java is better
03:51Apage43I try not to think about it
03:51abaranoskylike you said CLR has TCO, and also reified generics
03:51Apage43it's one of those things where part of me wants to shout "It didn't have to be this way!"
03:51Apage43but it is that way
03:51Apage43so
03:52abaranoskyApage43: what language do you work in?
03:52Apage43for money? C++ and Erlang mostly.
03:52Apage43or plain C, depending.
03:52bitemyapp^^ a more patient man than I
03:52bitemyappApage43: how prolific is the use of Dialyzer there?
03:53Apage43none of which by preference of course =P
03:53Apage43bitemyapp: the CI system runs it when the CI system isn't down.
03:53bitemyappLOL
03:53bitemyappsounds typical for CI.
03:53abaranoskyI'd say the market in the Bay Area is wide open for Clojure devs
03:53Apage43but basically we've all gotten really good at writing the sorts of bugs dialyzer doesn't catch
03:54abaranoskyevery clojure place I talk to has a tough time fidning good devs
03:54Apage43it probably has saved the erlang bits from getting too crufty though, since it is good about complaining when you have unreachable code
03:55bitemyappI wonder what the ratio of Haskell aspirants and open positions looks like in comparison?
03:55bitemyappApage43: that's pretty cool.
03:55abaranoskybitemyapp: I wonder... How many positions do you think there are open? I have no real feel for that
03:56Apage43the main gripe is that noone actually runs it on their laptops/before committing to review
03:56abaranoskybitemyapp: Haskell positions, I mean
03:56Apage43largely because if you don't have the stuff it caches handy
03:56bitemyappabaranosky: I don't know really, I know Galois is one of the more well known employers.
03:56Apage43a run from scratch takes a good 20-30 min
03:56bitemyappit seems like Haskell is getting increasing popular in finance. I seem to see a lot of funds and banks hiring for Haskell lately.
03:56bitemyappEspecially abroad.
03:56Apage43or it did last time I tried
03:56epicheroI'm still struggling to develop my clojure skillls. I like the challenge but the documentation for clojure libs is just horrid
03:57Apage43probably better now on my newer laptop
03:57bitemyappApage43: never going to complain about core.typed's runtime ever again.
03:58abaranoskyepichero: 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
03:58bitemyappabaranosky: the denser expression of intent enables this.
03:59bitemyappabaranosky: given that, imagine what types do for you?
03:59bitemyappwith types, you don't even need to read the code ^_^
03:59abaranosky... also since M-. is so common in Emacs, I don't feel the huge separation betwen *my* code and *their* code
03:59bitemyappabaranosky: yissss I love M-.
04:00bitemyappdancing in jars to understand code is a great feeling
04:00abaranoskybut
04:00Apage43I'm quite happy that the vim-fireplace equivalent works really well also
04:00Apage43C-] I think is the mapping there
04:00abaranoskybut I've already got the Clojure bug... so I'm pretty much not a good person to ask about that kind of stuff
04:00epicheroI have been using a heavily customized emacs with evil
04:02epicheroI 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
04:02abaranoskyI wish it was easier to get into
04:03abaranoskya 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
04:03abaranoskythere's a lot of stuff you pickup as you go... tooling and how to use leiningen and lcojars etc
04:03epicheroIts been the most difficult language to get into... The hardest workflow to set up and the most obtuse tooling
04:04epicheroIts not the language as much as everything else
04:04bitemyappinteresting. I found Leiningen refreshing.
04:04bitemyappgoing to say Apage43 knows real pain here.
04:04Apage43i still don't understand how any of it works
04:05Apage43we 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"
04:05abaranoskybitemyapp: i din't mean to say leiningen was hard... just that in general learning all the tools was hard for me
04:05Apage43by which he means actually read it cover to cover
04:05abaranoskyI was *not* an Emacs guy...
04:05Apage43not try to use it as reference
04:07epicheroEmacs is awful, i have it customized to the point i can't tell its emacs and therefore tolerate it. Everything gnu is a nightmare
04:07ddellacostaepichero: 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.
04:07abaranoskyEmacs is amazing
04:07Apage43gnightmare?
04:07abaranoskyhehe
04:07abaranoskyI used to hate it
04:07ddellacostaepichero: not an emacs lover? Huh, well, I'm biased as I've been using it for years, but I think it's fantastic.
04:07abaranoskybut I respect any dissenter's opinions there :)
04:07ddellacostaI think you'll find the Emacs love in the Clojure community is strong.
04:08ddellacostaabaranosky: yep, always good to hear dissenters.
04:08epicheroI use it, i have it super customized to overpower the awful
04:09Apage43I 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
04:09Apage43as it's very frustrating to have a thing I'm already reasonably competent with also handy
04:09ddellacostaepichero: 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.
04:09epicheroI have emacs evil so seamless it feels like vim
04:09Apage43it's the same problem as trying to learn a new keyboard layout
04:10abaranoskyepichero: some more specifics other than "the awful" would really help bring this home for us
04:10ddellacostawell, 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.
04:10abaranoskyFYI: I'm talking to you all right now via an Emacs buffer
04:11Apage43the 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
04:11epicheroYou 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
04:11Apage43ddellacosta: fireplace is quite nice, but if you really like having a REPL buffer you'll find it lacking
04:11poppingtonicwho's managed to upgrade from nrepl.el to cider?
04:11ddellacostaApage43: ah, okay. I am pretty ignorant of it since I am an emacs guy, but just have heard it's decent.
04:12abaranoskyI don't like the name, so haven't upgraded :P
04:12abaranoskywhat are CIDERs new features?
04:12Apage43it does most of the stuff you want, doc strings, jump to def, eval blocks, etc., it just doesn't have a repl buffer
04:12epicheroTheres also redl vim-redl i think its called
04:12ddellacostaepichero: so, anything still remaining in the clojure environment that bugs you? Leaving aside bitterness w/lein 1->2 transition
04:12scottjabaranosky: I don't think there are any big new features yet
04:13abaranoskyI'm craving apple cider now
04:14ddellacostaabaranosky: dammit, stop it, I'll want some too
04:14abaranoskyis the talk schedule for the conj up yet?
04:16abaranoskyit's friggin weird that the conference is in two weeks but no talk schedule up yet
04:49poppingtonicthere really isn't a talk schedule for the Conj?
04:51abaranoskydo you see one? http://clojure-conj.org/
05:07poppingtonichttp://lanyrd.com/2013/clojureconj/schedule/
05:21poppingtonicabranosky, http://lanyrd.com/2013/clojureconj/schedule/
05:27ddellacostaanyone set anything up in emacs nrepl where you can save a different history for cljs repl vs. clj repl?
05:27ddellacostahave no idea if it is even possible, but that would be so handy
05:27john2xis it possible to colorize the output of terminal `lein repl`?
05:28john2xor an alternative repl, like ipython/bpython
06:56bordatouecould 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.
06:59pyrtsa,(try (map + [1 [2] 3]) (catch ClassCastException e "oops."))
06:59clojurebotpyrtsa: Huh?
06:59pyrtsaDoh.
07:00bordatouepyrtsa: try catch doesn't seem to work
07:01pyrtsaInteresting.
07:02bordatoueI think it is wrapping RTE into something else
07:03pyrtsaNo, even finally fails to.
07:03pyrtsa...to evaluate.
07:03pyrtsa,(try (map + [1 [2] 3]) (finally "oops."))
07:03clojurebotpyrtsa: Titim gan éirí ort.
07:05bordatouenice, I would be interested to see a solution. I am using clojure 5
07:07pyrtsaOh, actually I was wrong. Finally works just fine (when you do a side effect in it.)
07:09bordatouepyrtsa: so is it the try catch not working , even with side effect
07:09pyrtsaHa! Now I know.
07:09pyrtsaIt's because map is lazy.
07:10pyrtsaThe function call is only evaluated after the (try ...) form.
07:10pyrtsa,(first (map + [1 [2] 3]))
07:10clojurebot#<ClassCastException java.lang.ClassCastException: Cannot cast clojure.lang.PersistentVector to java.lang.Number>
07:10pyrtsaAnd...
07:10pyrtsa,(try (first (map + [1 [2] 3])) (catch ClassCastException e "oops"))
07:10clojurebotpyrtsa: No entiendo
07:10pyrtsaDoh, again. X-)
07:11pyrtsa(try (first (map + [1 [2] 3])) (catch ClassCastException e "oops"))
07:11pyrtsa,(try (first (map + [1 [2] 3])) (catch ClassCastException e "oops"))
07:11clojurebotpyrtsa: No entiendo
07:12pyrtsaOk, clojurebot is not nice with this. It catches the exception just okay on the REPL.
07:12pyrtsabordatoue: 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.
07:13bordatouepyrtsa: I saw it, so do you think it is because of lazy eval
07:13pyrtsa,(let [_ (map + [1 [2] 3])] "this works because of lazy eval")
07:13clojurebot"this works because of lazy eval"
07:14pyrtsamap uses chunks of 32 by default, so that's why my example with (first ...) also threw the exception.
07:15bordatouewhen i added doall it seems to workk
07:15bordatouepyrtsa: thanks
07:15pyrtsaYeah, doall forces it to evaluate. Cool.
08:12poppingtonicwow...the clojuredocs blog is dead :( http://clojuredocs.wordpress.com/
09:19cemerickdnolen: 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. :-)
09:20dnolencemerick: I've added three blank test files for compiler, analyzer, and closure - largely because of my frustration with closure.clj
09:21dnolencemerick: we need tests, I honestly understand the design of closure.clj the least
09:21dnolenso that would be a good place to start
09:22cemerickdnolen: blank test files? You mean in the repo under /test?
09:23cemerickdnolen: closure.clj is...odd. :-) It's actually the bit I grok the most :-P
09:23cemerickended up picking through it pretty closely at one point for REPL stuff and the :libs change, etc
09:26dnolencemerick: yes, under test/.
09:30dnolencemerick: updated the wiki to mention running `lein test`, not sure what more there is to say at this point :)
10:07gfredericksif 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:15clgvgfredericks: if it is inlined yes
10:15clgvgfredericks: in other cases you can't use the primitive optimization with standard clojure anyway
10:16clgvgfredericks: I mean when you pass along the function as parameter
10:24devnyay for simple-check
10:24devnfinding yet another bug without making me "brane good"
10:34ubikationhey 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:35llasramubikation: Is the issue that evaluation of a form != execution of the function that form defines?
10:36ubikationllasram: yes, I believe so.
10:36llasramI usually just call functions from the REPL
10:37llasramIf 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:37llasram(the form in the `comment` form -- not the `comment` itself, obviously)
10:38ubikationI'm getting this: CompilerException java.lang.RuntimeException: Unable to resolve symbol: -main in this context, compiling:(/tmp/form-init6913950184920876258.clj:1:1)
10:44gfredericksclgv: right
10:45llasramubikation: Probably your REPL is still in the `user` namespace
10:45llasramYou need to either `require` your namespace into `user`, or just switch the REPL to the namespace you're working on
10:46llasramubikation: Easiest default bindings for the latter are C-c M-n w/in the file for the namespace you want to visit
10:46ubikationwhat tutorial would you recommend? I've been looking online and I can't seem to find a current one about cider.
10:47ubikationllasram: thank you!
10:49llasramnp. 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:49llasramI think the best suggestion I have is just cider's documented key bindings, which definitely isn't a great starting point :-/
10:59ubikationwhat does ->> mean? what is it's name?
10:59mdrogalisThread-last.
10:59mdrogalisTakes x and 'threads' it through the end of each form.
10:59mdrogalis,(->> 1 inc dec)
10:59clojurebot1
11:01joegallo_,(let [m {:foo 1}] (->> m (assoc :bar 2) (dissoc :foo)))
11:01clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to clojure.lang.Associative>
11:01joegallo_derp, that was a thread-first example
11:01joegallo_i'm a moron
11:01joegallo_thread-last is really good for stuff with seqs, let me redo that
11:01mdrogalis:)
11:02joegallo_,(let [s (range 10)] (->> s (map inc) (filter even?) (take 3)))
11:02clojurebot(2 4 6)
11:02joegallo_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:03joegallo_it allows you to take something like this (foo (bar (baz (quux blah)))) and flip it inside out (->> blah quux baz bar foo)
11:10mynomotoIs 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:10llasrammynomoto: What's your higher-level goal?
11:13mynomotollasram: 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:14llasramInteresting
11:14llasramWell, vars in the namespace have the source files they came from as `:file` metadata
11:15llasramWhich might be as good as you can get, since -- although uncommon -- a namespace may be implemented across multiple files
11:17mynomotoYes, 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:18llasrammynomoto: The `ns-map` function will return a map of all names to vars for the namespace
11:19llasram,(->> 'clojure.core the-ns ns-map vals (map (comp :file meta)) distinct)
11:19clojurebot("clojure/core.clj" nil "clojure/genclass.clj" "clojure/core_deftype.clj" "clojure/gvec.clj" ...)
11:20llasramHuh, `nil`
11:20llasramProbably because clojure.core
11:21mynomotollasram: Thank you. I think that will work. Unless the user has no vars in the ns :)
11:22mynomotoIs there a good reason to have clojure files outside src/ or test/?
11:22llasramI've got one project with source files in a top-level `examples` directory
11:23ddellacostamynomoto: I think leiningen lets you do whatever you want, doesn't it?
11:23llasramddellacosta: they did say "good reason" :-)
11:23joegallo_llasram: ns-map returns java imports and stuff, too, which ends being a lot of the nils
11:24llasramjoegallo_: Ahhh, didn't think of that
11:24llasram,(->> 'clojure.core the-ns ns-map vals (filter var?) (map (comp :file meta)) distinct)
11:24clojurebot("clojure/core.clj" "clojure/genclass.clj" "clojure/core_deftype.clj" "clojure/gvec.clj" nil ...)
11:24llasramnice
11:24llasramwait
11:24llasramstill there!
11:24llasramCrazy
11:24ddellacostallasram: 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:24joegallo_well, i mean, there's still some crazy stuff because of it being clojure.core, too :)
11:24llasramddellacosta: Oh, sure. Was just joking :-)
11:25llasramjoegallo_: So it would seem
11:26ddellacostallasram: yah, gotcha. ;-)
11:31mynomotoThank you guys. I will try the ns-map solution.
11:41hoangelosI'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:41hoangelos sorry clojure.java.shell/sh, but same issue
11:42TimMc"requires the password to be passed in via command-line" makes me want to strangle puppies
11:43TimMcDo you have any alternative? All command line arguments are visible to all users on the system, including reduced-permission accounts.
11:44TimMc(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:44hoangelosTimMc: you and me both...we have submitted this as bug to the library, but so far no
11:46hoangelosI 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:46jcromartiehoangelos: what does the logging?
11:47jcromartieand does it really show up in bash history?
11:47hoangelosjcromartie: Well the line is coming from clojure.java.shell
11:47jcromartiecan you rebind *out* or *err* if it's using those?
11:47jcromartiesorry, not familiar with the code
11:50hoangelosjcromartie: We are using :out, so even if we could we need it.
11:50jcromartieI don't understand this part: "If there's an error the command and the options get returned in the log."
11:52hoangelosso 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:53jcromartiewhat is "the log"
11:53jcromartiesorry, I might be dense
11:53hoangelosit's a log for the application
11:54jcromartieAFAIK 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:54jcromartieit's up to you to log it
11:54jcromartieor not
11:54jcromartieit doesn't print anything
11:55hoangeloswell this is clearly seen as an exception by clojure/java
11:55TimMchoangelos: Good on you for filing a bug, by the way.
11:57hoangelosbut 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:58jcromartiehuh
11:58jcromartieexample?
11:59muhoohoangelos: use conch maybe?
11:59muhoojcromartie: ^
11:59hoangelosI 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:00jcromartieI thought so
12:00hoangelosbefore my coffee everything is mysterious and full of paranoia
12:00TimMchoangelos: So the third-party app is doing th elogging?
12:00mdrogalisI keep forgetting and remembering that it's Halloween. I get happier every time I remember.
12:00TimMcOr were you not calling sh directly?
12:01TimMcmdrogalis: I'm just glad the Red Sox won last night and not tonight. It gets crazy around here...
12:01jcromartieI 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:01TimMc(I only follow sports enough to make sure I don't end up in the middle of a riot.)
12:02hoangelosTimMc: 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:02mdrogalisTimMc: Feeling lazy, who's winning the series?
12:02mdrogalisI saw that obstruction call, heh
12:02hoangelosSox already won
12:02mdrogalisOh, its totally done? Wow.
12:02mdrogalisThat was fast.
12:03TimMcI'm also glad not to be living near Fenway Stadium. :-P
12:03mdrogalisFact.
12:04TimMcLast time, people Flipped. The. Fuck. Out.
12:05teslanickLast 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:09mdrogalisteslanick: World series, maybe
12:13teslanickIt 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:14TimMc"We are so happy! Let us destroy everything!"
12:14TimMcSomeone was killed by a cop in Boston the last time the Sox won.
12:14TimMcRubber bullet.
12:15TimMcSo like I said, I'm glad it didn't coincide with Halloween.
12:22jcromartiehttp://en.wikipedia.org/wiki/Death_of_Victoria_Snelgrove
12:23jcromartieanyway
12:27TimMc(Oh, a pepper spray round, not a rubber bullet.)
12:36silasdavisThere's no way to destructure the first and last element of a list longer than 2 right?
12:37clgvsilasdavis: why not? if you now at compiletime how long it is...
12:37clgv,(let [[a b c d e f g h] (range)] h)
12:37clojurebot7
12:38silasdavissorry that is the key point, I don't
12:38clgvsilasdavis: destructuring always assumes you now the relevant part of the structure
12:38clgvsilasdavis: just use `last` then
12:39hlshipabaranosky: 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:44mikerodI 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:45mikerodso 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:46mikeroddoes 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:46justin_smithmikerod: wait, what would cause a symbol to be treated as a var? is this something that happens at macro-expansion?
12:47justin_smithif you construct it by calling (symbol "some-string") I think that would avoid implicit resolution
12:48erdoshello, 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:49justin_smitherdos: 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:50justin_smith(future (do-something (deref some-future)))
12:50justin_smithwhere some-future is the one that you want to trigger the event
12:50mikerodjustin_smith: I basically have a macro that takes an [defname othername] returns `(def ~defname {:name ~(symbol (str *ns*) (str othername))})
12:51justin_smiththe deref will block until the value is available, and the value is guaranteed to never change again
12:51mikerodlater on, I'd expect to see this map as a {:name some.ns/othername}
12:51justin_smithmikerod: move the call to symbol outside the ~
12:51justin_smithotherwise the macro sees the symbol, so tries to resolve it
12:52justin_smith`(def ~defname {:name (symvol ~(str *ns*) ~(str othername))})
12:52justin_smiths/v/b of course
12:53mikerodThat 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:53mikerodLets say it is more like:
12:53trptcolintbaldridge / 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:54mikerod(let [outmap (parse-map (symbol (str *ns*) (str othername))] `(def ~defname outmap))
12:54trptcolinlemme know if you want a jira ticket anyway
12:54tbaldridgetrptcolin: 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:54mikerod(defn parse-map [sym] {:name sym})
12:55trptcolinok
12:55mikerodforgot a ~ up there `(def ~defname ~outmap)
13:01justin_smithmikerod: ok, then I really don't know what isn't working there
13:01justin_smithsorry
13:03mikerodjustin_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:04TimMchyPiRion: In honor of Halloween, I might do a little work on the Clojure->Swearjure compiler tonight.
13:05TimMcI'd love to be able to mechanically convert something like this https://gist.github.com/timmc/7252229 into swj.
13:08hyPiRionTimMc: oh sweet
13:09hyPiRionTimMc: I was kind of tempted to write a Swearjure interpreter in C, just to see how bad it would be.
13:14TimMcyikes
13:15trptcolinuhhhh, does jira have a new feature where it automatically assigns tickets to Rich? I definitely didn't select him as the Assignee
13:16trptcolinrhickey please don't burn my house down, i don't expect you to necessarily handle this patch.
13:23whilotbaldridge: 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:28Jardaanyone have any idea why this happens:
13:28Jardahttp://pastie.org/8445945
13:28Jardafresh checkout of clojurescript from master
13:32timsgdnolen: I remember there's something sketchy about using recur in a core.match statement, how does that work again?
13:33BronsaJarda: you have an older version of tools.reader in your classpath
13:34dnolentimsg: you'll lose code size optimization
13:34JardaBronsa: aha
13:34timsgdnolen: how bad is that? I remember there's some exponential growth, but I forget what it's exponential on
13:35dnolentimsg: pattern matching will always generate exponential code, but it'll be worse
13:35timsgdnolen: hm, thanks
13:36dnolentimsg: I'll probably change core.match to a state machine a la core.async at some point but not in the near future.
13:36Jardahmm.. So I should be able to run clojurescript tests with lein test-all right?
13:36JardaI'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:37Jardaoops, paste fail
13:37Jardabut anyhow, 1.6.0-master-SNAPSHOT can't be found
13:38timsgdnolen: 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:46dobry-dentimsg: so there's an issue with this?: (loop [x 1] (match x [1] (recur (inc x))))
13:48dnolenJarda: are you trying to run the ClojureScript tests in the ClojureScript repo?
13:49timsgdobry-den: yeah, I think the expanded code size gets hairy as you add cases
13:50timsgdobry-den: I guess that has to be pretty extreme before it's worth caring about, but I hear it gets pretty extreme fast
13:52dobry-denive 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:53dobry-denim gonna give it a shot and see what code it generates because it looks much better than my daisychain of cond/else
13:53timsgdobry-den: cool, I'd be interested how that goes. yeah match is really pretty
13:54TimMcI can't wait for core.match to reach 1.0.
14:03patrkristhere's a quote attributed to Timothy Baldridge that says someting like "Test systems - not functions"... where does he say/write that?
14:03mdrogalisIn #datomic to me lol
14:03bbloompatrkris: tbaldridge hangs out in here
14:04mdrogalisChat logs are fair game to pick out brilliant quotes from. :)
14:04patrkrisah... I thought he called himself halgari here (like he does on github) :D
14:06patrkrismdrogalis: it's exactly your blogpost that makes me ask :) but cool
14:13patchworkIf 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:13bbloomwhen the code is compiled, it will create a java class. on subsequent runs, the function's class will be instantiated via new
14:13bbloomirrc
14:13bbloomiirc* rather
14:14bbloomeither way, don't worry about it :-)
14:14alsototal newbie question: what's wrong with (. (symbol "java.lang.System") nanoTime)
14:15patchworkbbloom: 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:15patchworkI don't know why I worry about this stuff
14:16bbloomalso: 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:17bbloompatchwork: 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:17bbloom,@#'clojure.core/inc
14:17clojurebot#<core$inc clojure.core$inc@1ac1b8f>
14:17bbloompatchwork: 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:18alsobbloom: so, given the signature (. Classname-symbol method-symbol args*), how do I satisfy the Classname-symbol argument?
14:18patchworkbbloom: cool, thanks!
14:18ToxicFrogalso: compare the value of (type java.lang.System) and (type (symbol "java.lang.System"))
14:19bbloomToxicFrog: the type function is kinda cruft, just use the clojure.core/class function
14:19bbloomalso: dot is a special form, so the compilar interprets it's arguments specially
14:19amalloypatchwork: fwiw, allocating the object is not substantially more expensive than loading an already-allocated version of it
14:19bbloomalso: you can just do (. java.lang.System nanotime)
14:20bbloomalso: however for static functions, there is also a shorthand: (java.lang.System/nanotime)
14:20alsobbloom: what about when the class name comes as a string?
14:20alsothat's what I'm trying to accomplish
14:20bbloomalso: if the class name comes as a string, you have to use eval or reflection
14:21bbloomthe interop forms are resolved at compile time
14:21alsohow am I supposed to interpret the docs that say that the dot special form takes a symbol?
14:22bbloomthe same was you interpret a macro which takes a symbol: quoted
14:22bbloom,(quote (symbol "omg"))
14:22clojurebot(symbol "omg")
14:22bbloom,(identity (symbol "omg"))
14:22clojurebotomg
14:23bbloom,(quote not-defined)
14:23clojurebotnot-defined
14:23bbloom,(identity not-defined)
14:23clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: not-defined in this context, compiling:(NO_SOURCE_PATH:0:0)>
14:23bbloomalso: does that help?
14:26dnolenalso: 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:27alsodnolen: yeah, sorry, it was just supposed to be a simple example
14:28justin_smithin 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:28patchworkjustin_smith: I just asked that question?
14:28patchworkI mean… !
14:28justin_smithoh
14:28justin_smithI didn't notice
14:28patchworkApparently it doesn't matter
14:29alsodnolen: 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:29alsobbloom: i think i just need to do a bit more reading on the basics
14:29alsothanks!
14:30bbloomalso: yup. if this is your first lisp, quoting/macros/etc need some time to get used to
14:30dnolenalso: there's no reason for that to work. it would return a symbol, a symbol won't have that method.
14:30dnolen,(symbol "foo")
14:30clojurebotfoo
14:30dnolen,(.bar (symbol "foo"))
14:30clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: bar for class clojure.lang.Symbol>
14:30amalloyjustin_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:31alsodnolen: right, i thought the Classname-symbol argument to dot was supposed to be a symbol
14:31alsoand that (symbol "xxx") was a symbol
14:31amalloyalso: a *literal* symbol
14:31amalloy(symbol "xxx") is a list which, when evaluated, produces a symbol
14:32amalloy. is a special form, so it chooses how and whether to evaluate its arguments
14:34alsoamalloy: thanks, that makes sense
14:34alsois that necessarily true of special forms?
14:35amalloyall 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:41alsoamalloy: is the way that . requires a literal symbol described in the documentation?
14:42alsoamalloy: if i were writing a function that required a symbol as an argument, Classname-symbol seems like an appropriate name.
14:42bbloom(doc .)
14:42clojurebotI don't understand.
14:42bbloom##(doc .)
14:42lazybot⇒ "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:42bbloomnotice it says "special"
14:42bbloom(doc defn)
14:42clojurebot"([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:42bbloom##(doc defn)
14:42lazybot⇒ "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:42bbloomnotice it says "macro"
14:42bbloom##(doc inc)
14:43lazybot⇒ "([x]); Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'"
14:43bbloomalso: notice it doesn't say anything
14:43bbloommacros and special forms treat their arugments as *unevaluated*
14:43bbloomthat's just standard lisp-isms, so it's a perfectly reasonable doc string for people who understand how the evaluation process works
14:43bbloomas 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:44alsobbloom: so the key would be that it doesn't actually say that it's evaluated
14:44bbloomalso: that's just a given though, it's a special form...
14:44alsobbloom: yeah, i assume the docs are good, but i just don't understand them
14:45bbloomalso: 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:47alsobbloom: 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:47alsoso i think that's what i was missing
14:47clgvhow is that possible? (def a (org.jfree.chart.axis.NumberAxis.)) (def b (org.jfree.chart.axis.NumberAxis.)) (= a b) => true
14:47bbloomalso: there are examples here: http://clojure.org/java_interop#dot
14:47llasramclgv: Clojure `=` is not Java `=`. The latter is Clojure's `identical?`
14:48alsobbloom: yeah, that's what i was reading. (doc .) points to there.
14:48dnolenclgv: = delegates to .equals
14:48bbloomalso: yup. and the extended documentation describes how that special form interprets it's arguments
14:48dnolenif not IEquiv
14:48clgvdnolen: but it seems they both have the same hash
14:49dnolenclgv: anyways like llasram said, = is not identical? aka Java ==
14:49clgvah ok. so I need access to the ref value
14:51llasramRef value?
14:52clgvI think I can go with System/identityHashCode
14:54llasramOOC, what are you trying to do?
14:55dnolenreiddraper: does simple-check desugar into function calls?
14:56reiddraperdnolen: in what sense? the for-all macro?
14:56dnolenreiddraper: yes
14:56clgvllasram: I have a WeakHashMap for GUI components to store metadata and blindly believed it would hash based on identity
14:56alsobbloom, amalloy, dnolen: thanks for the pointers, i understand the docs now :)
14:56reiddraperdnolen: yeah there's a for-all* that it desugars into
14:57reiddraperdnolen: https://github.com/reiddraper/simple-check/blob/bd18e434dd11ffda18b933615178e285c5ceef19/src/simple_check/properties.clj#L29-L65
15:03Jardayes dnolen I'm running in clojurescript directory of a fresh checkout after lein install
15:03dnolenreiddraper: sweet, the fact that simple-check has shrinking is awesome, most property based testing libs don't seem to do this?
15:04dnolenJarda: there are no lein tests to run as of yet, if you want to run the tests, just ./script/test from project root
15:04reiddraperdnolen: a few of the more mature ports do, but it's definitely not in all of them
15:04reiddraperdnolen: and yeah, imo, it's a really critical feature
15:05reiddrapersimple-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:07clgvllasram: I switched to guavas mapmaker for the map with weak keys
15:09dnolenreiddraper: that's pretty sweet. simple-check is very clean Clojure code, a ClojureScript port would be trivial ...
15:10reiddraperdnolen: thanks, cemerick actually has a cljx branch that I believe is working, https://github.com/cemerick/simple-check/tree/cljx
15:10bitemyappreiddraper: what's different about simple-check vs. test.generative?
15:10dnolenbitemyapp: pretty sure test.generative doesn't do shrinking
15:10bitemyappI must say, simple-check's API is pretty appealing if you've used Haskell before.
15:11dnolenreiddraper: oh, ok sweet!
15:11dnolencemerick: working ^ ?
15:11cemerickdnolen: quite, yes; that's how I found the rseq bug on cljs vectors and sorted sets
15:11dnolencemerick: *damn*
15:11bitemyapptoo cool :)
15:11reiddraperbitemyapp: the main two differences are that simple-check is based on the naming/shape of haskell/erlang quickcheck, and as dnolen said, shrinking
15:12cemerickreiddraper is being modest
15:12cemerickreiddraper: I think you could produce a year's worth of killer talks on the fact that there's no shrinkers
15:12hyPiRionoh, the conj schedule is up
15:12dnolenreiddraper: will cljx branch get merged in?
15:13dnolenreiddraper: hmm, I guess not necessary? it's just a config thing?
15:13dnolencemerick: yes?
15:14cemerickdnolen: which question are you asking me? :-P
15:14bitemyappManning Publications is having a sale right now. Hrm.
15:14dnolencemerick: oh actually I guess not, does require changes
15:15cemerickdnolen: oh, changes vs. config. Yeah, the former. Integrates with clojurescript.test, does the macro thing in a portable way, etc.
15:15cemerickSome of my recent cljs patches have been in service of the cljx-ing of simple-check.
15:16cemerickI plan on beating the snot out of the cljs collections once 643 is done. I suspect dragons await.
15:17reiddraper:D
15:17Jardadnolen: https://github.com/clojure/clojurescript/wiki/Running-the-tests states I could run with lein test
15:19dnolenJarda: only for the Compiler Infrastructure, which there are no tests for as of yet! all the main tests are against JS engines
15:19Jardadnolen: ok :)
15:21gfredericksdoes anybody know why the numeric-keyword-literal fix got reverted?
15:21gfredericksstuarthalloway just said "at rich's suggestion" on the ML
15:22gfredericksisn'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:22gfredericksjust curious
15:23hiredmangfredericks: seems like you are looking for information where there is only and opionfest
15:23hiredmanan
15:25gfrederickshiredman: I missed all opinions
15:25gfredericksonly discussion I've heard is that thread about java.jdbc which seemed devoid of opinions
15:25gfredericksunless you're just criticizing IRC in general
15:26hiredmangfredericks: I was joking
15:26hyPiRionoh right, the :1 keywords etc?
15:26gfrederickshyPiRion: yep
15:26hyPiRionso are they legal or not now?
15:26gfredericksthere was a commit to unallow them
15:26gfrederickswhich was just recently reverted
15:26hiredmangfredericks: 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:27technomancys/pronouncements/opinions/
15:27gfrederickshiredman: 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:28gfrederickspronouncement isn't a word ever used by the person doing the pronouncing, is it...
15:28gfredericks"Everybody listen, I have a pronouncement to make!"
15:28hiredman:)
15:29gfrederickswho has enough irc logs to find out how often hiredman makes a smiley?
15:29cemerickgfredericks: may I have a link, sir?
15:30gfrederickscemerick: yes you may
15:30hyPiRionThis one? https://github.com/clojure/clojure/commit/249479ecebcb0cfca9e6a1d528e3d7f0b3ca7dc6
15:30gfrederickscemerick: https://groups.google.com/forum/#!topic/clojure-dev/HeFr_jeuTnE
15:30gfrederickshyPiRion: yep
15:31cemerickgfredericks: many thanks
15:31cemerickI haven't looked at the main ML in many months.
15:31gfrederickscemerick: such an opinionfest
15:32cemerickI'd say, "CARN-E-VAL!", but no one would get that, either.
15:32brainproxyin cljs, proper way to use apply in conjunction with an object's method?
15:32brainproxynaive attempt (apply (.-log js/console) [...])
15:36dnolenbrainproxy: I would just use apply directly
15:36dnolen(.apply js/console.log js/console (into-array ...))
15:36dnolenbrainproxy: could easily be cleaned up with a macro
15:37dnolen(mapply js/console log some-seq)
15:37dnolenhopefully with a better name 'o course
15:38brainproxyoh right, forgot I could do .apply
15:38brainproxythanks
15:46TimMcgfredericks: 69 times since 2011-03-23
15:47gfredericksTimMc: that I did not expect
15:47TimMcIf you read the grep output he looks like Mr. Sunshine.
15:48TimMcOn closer inspection, however, many of the instances are in fact sarcastic. :-P
15:49hiredmanwhat? no way, I am a delightful person, full of smiles and affirmations of hope.
15:50TimMc:)
15:52gfredericksclojurebot: hiredman is a delightful person, full of smiles and affirmations of hope
15:52clojurebot'Sea, mhuise.
16:03dobry-denFor anyone using evil-mode, when you're in Replace mode (R), does semicolon get inserted instead of replacing a character?
16:05dobry-denWhen trying to turn ";; Hello ;;" into ";;;;;;;;;;", I can't just hit R and spam ";". Truly a sore spot in my life
16:09teslanickgfredericks: When you tell clojurebot something, does he remember it?
16:09llasramMan, that is not a lot of Lightning Talk time for Clojure/conj
16:09llasramI wonder how they're going to do sign-ups
16:09hiredmanclojurebot: clojurebot?
16:09clojurebotclojurebot has a lot of features
16:09teslanickclojurebot: hiredman?
16:09clojurebothiredman is what will save us all
16:10hiredmanI can only assume that was inferred somehow
16:11teslanickclojurebot: teslanick?
16:11clojurebotExcuse me?
16:11teslanick:c
16:11hiredmanhiredman is lazy => map is lazy => map is laziness => laziness is what will save us all => hiredman is what will save us all
16:12teslanickYour logic is unassailable.
16:12llasramVerified. The inferences work out.
16:13llasramIf I want a lightning talk slot, I suppose I'll just need to make sure I show up very first thing each day...
16:55dobry-denI can't believe people worked with Java bytebuffers before ztellman created Gloss
16:55dobry-denI tried coming up with my own abstraction and nearly died without even reaching the yaks i was trying to shave
16:56llasramWell, depends on what you're doing with it
16:56llasramwith them
16:56dobry-denconforming to some networking protocol defined in C datatypes and endian-swapping
16:57llasramOh sure, gloss is great for that :-) Just meant raw ByteBuffers aren't so bad if you do have a different problem to solve
16:58bitemyappucb: howdy
16:59ucbbitemyapp: heyo
17:06sritchietechnomancy: is there a way to specify custom prep tasks for production vs devel?
17:07technomancysritchie: sure; you can use profiles for that
17:07xeqillasram: 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:07sritchietechnomancy: does it default to "dev"? or do I always have to specify a profile?
17:07llasramxeqi: Hmmm. Might be worth e-mailing then...
17:07llasramxeqi: Thanks for mentioning it!
17:07sritchietechnomancy: I've got a bunch of base dependencies,
17:08sritchieand want to add a prep task for production mode only
17:08xeqillasram: thats what I did to make sure I had a slot, I think the others all contacted them during
17:08sritchiesince (or (System/getenv "RING_ENV") "dev") in my config failed to resolve
17:08xeqi* did last year
17:08sritchietechnomancy: on heroku
17:08sritchietechnomancy: sorry, meaning, it didn't pick up the proper config variable
17:08xeqibah, trying to use the clojurescript master as a checkout is breaking my sourcemaps
17:09technomancysritchie: you can put :prep-tasks in the :production or :dev profile
17:10sritchietechnomancy: if I have dependencies in there, when I run "lein with-profile dev repl", none of my deps are around
17:11technomancyright; yes
17:11sritchietechnomancy: we just upgraded to http-kit and uberjar, and are seeing some serious slowdown issues :)
17:11sritchiejust trying to debug
17:11sritchiethe app is hogging memory like crazy all of a sudden
17:12bitemyappucb: http://www.youtube.com/watch?v=g_LQYkSsR1s
17:14ucbbitemyapp: nice!
17:19Jardaoh yeah.
17:20Jardaspent 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:20Jardawell, now I find my way around the code
17:21bitemyappthis 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:24dnolenJarda: which problem around source maps?
17:24llasrambitemyapp: Is that in the sense of iterated reductions over a collection?
17:25Jardadnolen: 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:25bitemyappllasram: 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:26bitemyappllasram: it's a rule of thumb I use for figuring out how complicated the bullshit I'm dealing with is getting.
17:26dnolenJarda: oh right yes, that got fixed, it's relative to the file now
17:26Jardadnolen: yes
17:26Jardawell now I need to find some other clojurescript issue to fix, so that this didn't go in vain :D
17:27bitemyappfor 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:27bitemyappI 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:28sritchieoh boy...
17:28sritchiecljs compilation on heroku is taking like 5 minutes
17:28nooniananyone 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:28bitemyappsritchie: that's pretty funny actually.
17:28bitemyappnoonian: show code.
17:28sritchiebitemyapp: that it's hanging so hard?
17:29hiredmannoonian: rm -rf target/
17:29bitemyappnow I need to figure out how in the hell I'm supposed to map {:part :db.part/user, :idx -1000013} -> {-9223350046623220301 17592186045421
17:29bitemyappnoonian: lein clean
17:29sritchiebitemyapp: I wonder, is there some other recommended path,
17:29sritchielike compiling locally
17:29bitemyappsritchie: yeah, I'm just imagining how hammered the poor worker must be.
17:29sritchiehaha
17:30sritchieI mean, am I supposed to commit generated cljs?
17:30bitemyappsritchie: I would personally AOT and check in the compilation artifact into git.
17:30llasrambitemyapp: Going to be at Conj, to rant at them in person?
17:30JardaI commit them
17:30bitemyappsritchie: sure.
17:30bitemyappllasram: when is the conj again?
17:30sritchietechnomancy: concur with bitemyapp?
17:30llasrambitemyapp: Starts Nov 14th, so 2 weeks out
17:31bitemyappsritchie: the more "industrial" way to handle such compilation artifacts is to upload them to CDN and point URLs at the CDN.
17:31sritchieoh
17:31sritchieokay, yeah
17:31sritchiehave the CI server do that or something
17:31noonianbitemyapp: here is a code snippet, redirects fine and prints output from lein run: https://www.refheap.com/20339
17:31bitemyappsritchie: I do a lot of web dev, unless your compilation artifact is >30MB just push it.
17:31llasramSpeaking of Conj -- sritchie: any interest in a Hadoop unsession at the Conj?
17:31nooniani just tried after rm -rf'ing target and same thing
17:31sritchieyeah, I'd be interested
17:31bitemyappllasram: is there going to be a Datomic user support group where I can cry into my whiskey?
17:32llasrambitemyapp: I don't see that on the schedule yet...
17:32llasramYou should probably e-mail the organizers
17:32bitemyapptime-travelling tears unsession.
17:33llasramOh, man, only 4 unsession rooms. Crazy town
17:33bitemyappI'm considering going to the conj, I haven't made any plans or bought any tickets yet though.
17:34llasramThey'd entirely sold out for a bit, but I think add some more late reg tickets
17:34bitemyappSee, part of the reason I hadn't made any plans is because I got shanghai'd by this fucking project.
17:36bitemyappucb: http://radagast.bandcamp.com/
17:40myguidingstarhi all, I want to use opennlp.tools.stemmer to reduce a word to its stem, something like this (stem "goes") -> "go"
17:40myguidingstarthe API is here https://opennlp.apache.org/documentation/1.5.3/apidocs/opennlp-tools/opennlp/tools/stemmer/Stemmer.html
17:40llasramsritchie: Added you as hosting, if that wasn't presumptuous: https://github.com/relevance/clojure-conj/wiki/Clojure-conj-2013-Unsessions#clojure--hadoop
17:40klokbaskecemerick (and others): is it possible, using austin, to do REPL exploration of any webpage?
17:41klokbaskelike an alternative to the js repl of the browser
17:41myguidingstarhow can I call that? I don't get java =.=
17:43klokbaskemyguidingstar: java interop is described here: http://clojure.org/java_interop
17:43bitemyappmyguidingstar: java interop is more thoroughly explained here: http://clojure-doc.org/articles/language/interop.html
17:44klokbaskeso it would be something like (.stem my-stem my-char-sequence) i suppose
17:47sritchiellasram: haha, okay
17:50yeoj___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:52brehautstructmaps wow
17:53yeoj___hmm. i'm not sure what that means.
17:53brehautit means that were deprecated ages ago, and its surprising to see them in the wild
17:53yeoj___ah, ok. it's from a blog post.
17:53brehauteven if the wild is a function in core that was added in 1.0
17:54yeoj___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:55brehautim pretty sure the clojure.core.jdbc query functions provide you the contents lazily
17:55yeoj___yeah, i'm was using 2gb of memory before i canceled it.
17:55brehautyou just need to do all your processing within the query scope
17:57yeoj___brehaut: could you have a look here if you have a moment https://www.refheap.com/20342
17:58yeoj___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:58bitemyappthat's a good question.
17:59bitemyappyeoj___: whoa sonny, what's with the (rest ...)?
17:59bitemyappoh wait, n/m
17:59bitemyappyou got it right
17:59yeoj___yeah, i'm trying to skip the header row with :as-arrays? true
18:00yeoj___it's still using loads of memory... if i run it right now on my dev box it consumes everything.
18:00bitemyappyeoj___: there's a pretty straight-forward path to profiling this, fire it up with YourKit or JVisualVM
18:00bitemyappyeoj___: find out who is using all that memory
18:00yeoj___ok, i'll give that a try.
18:01bitemyappI suspect the JDBC stuff isn't being very lazy.
18:01bitemyappI could be wrong.
18:01yeoj___i think there is specific issues with some jdbc drivers too
18:01turbofailif you want to process stuff lazily in clojure.java.jdbc/query, you have to do it in a result-set fn
18:01turbofailthe default result-set function is doall
18:02amalloyyeah, isn't that what with-query-results is for?
18:02yeoj___turbofail: ahhhh that makes sense. so i can just set :result-set-fn to doseq ?
18:02gfredericksamalloy: deprecated because macromagical
18:02bitemyappyeoj___: I think resultset-seq got deprecated and removed, possibly in favor in result-set-seq.
18:02amalloygfredericks: man, i am never upgrading jdbc
18:02bitemyappamalloy: why do you think Korma hasn't?
18:03bitemyappwe're rebels!
18:03gfredericksamalloy: I like the new api better for the most part
18:03amalloybecause nobody upgrades korma either?
18:03bitemyapp :(
18:03turbofailyeoj___: yeah. you'll have to put all your doseq stuff inside a function
18:03gfredericksamalloy: I'm curious if whathisface's scopes lib could be combined with java.jdbc well
18:03yeoj___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:04bitemyapphttps://clojars.org/pjstadig/scopes https://clojars.org/pjstadig/scopes-magic
18:04gfredericksyes that
18:04amalloyi thought you hated ORMs and magic, bitemyapp. what are you doing maintaining korma?
18:04gfredericksI'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:05bitemyappHilarious: https://github.com/pjstadig/scopes-magic/blob/master/src/data_readers.clj
18:05gfredericksbitemyapp: yeah pjstadig and I got into a nasty spat about that and our friendship has never recovered
18:05bitemyappamalloy: Korma isn't that magical unless you use it in muggle-mode.
18:05bitemyappamalloy: also I understand how it works, so I'm comfortable with it.
18:06bitemyappit'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:06bitemyappI keep musing about a "micro-Korma"
18:06bitemyappno connection pooling built in, that sort of thing.
18:06myguidingstarbitemyapp, sorry but I still don't understand what they do on opennlp.tools.stemmer How can I call the method "stem"?
18:07bitemyappwell first, is it an instance method or static?
18:07gfredericksbitemyapp: honeysql?
18:07bitemyappgfredericks: not a fan. I like the automatic relationship traversal in Korma.
18:07bitemyappthat nice-ness is part of why I like Datomic and Datalog, incidentally.
18:08bitemyappalthough Datalog is much more powerful.
18:08myguidingstarhmm, it's not clear https://opennlp.apache.org/documentation/1.5.3/apidocs/opennlp-tools/opennlp/tools/stemmer/Stemmer.html
18:08bitemyappI should just write a Datalog->SQL bridge and be done with it.
18:08myguidingstarall I can see is "public interface Stemmer"
18:08bitemyappmyguidingstar: if the documentation sucks, read the code.
18:08bitemyappmyguidingstar: code don't lie.
18:08bitemyappuntil it does.
18:09muhoohmm lein repl :headless :port xxxx ignores :port?
18:09jkkramerbitemyapp: i've got a lib based on honeysql that does relationship traversal too. releasing soon
18:09myguidingstar:( I just want to call that method against a string
18:09muhooit seems to be insisting on the :port in the project.clj, not the one supplied on teh command line
18:10bitemyappjkkramer: I look forward to ripping off your work.
18:11amalloymyguidingstar: 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:11bitemyappAHHHHHHHHHHHH fuck.
18:12amalloyi don't see any particular implementation of Stemmer in that opennlp project's javadoc
18:14bitemyappmyguidingstar: http://mail-archives.apache.org/mod_mbox/opennlp-commits/201203.mbox/%3C20120326073356.B9F48238896F@eris.apache.org%3E
18:14amalloythere 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:14myguidingstarthanks, I'm reading it, too
18:15bitemyappmyguidingstar: http://stackoverflow.com/questions/5391840/stemming-english-words-with-lucene
18:15mbarbieriHi, can you pleas e check if this https://www.refheap.com/20314 is the correct translation of this https://www.refheap.com/20313 ?
18:15bitemyappmyguidingstar: good, I'll go back to raging at my own stupidity then.
18:15myguidingstaryou guys help me a lot
18:15bitemyappmbarbieri: don't use zkoss.
18:16bitemyappmbarbieri: don't translate shitty Java frameworks to Clojure.
18:16bitemyappmbarbieri: just write Clojure.
18:16bitemyappmbarbieri: behold, a fairly simple Clojure Ring web app! https://github.com/bitemyapp/neubite/
18:16bitemyappmbarbieri: you have been rescued from Java framework Hell. Go forth and sin no more.
18:16mbarbieribitemyapp: :) just testing some stuff, and have to use it for enterprisey apps
18:19bitemyappmbarbieri: http://i.imgur.com/IT4qgnf.jpg
18:19devnRaynes: you around?
18:19Raynesdevn: Yep.
18:19devnRaynes: how do i shot web?
18:20biggbear"java -jar <path to clojure.jar> script.clj" seems to execute slow. Around 5-6 secs
18:20RaynesI don't know how one can shot web.
18:20devnRaynes: but seriously, in conch -- i want the behavior from {:seq true} that I get with (programs ls), but with a proc
18:20devnlike (sh/proc "git" "diff" :dir "/foo/bar" {:seq true})
18:20bitemyappbiggbear: don't do that.
18:20devnwhat's the right way to do that?
18:21Raynesdevn: There are buckets and buckets of hax in place in conch.clj to make :seq true possible.
18:22RaynesYou're not going to be able to easily replicate that with proc.
18:22biggbear<bitemyapp>: installing clojure from apt-get and seems to lack dependencies. What could be the fastest way to execute scripts?
18:23noonianbiggbear: i would install leiningen and lein-exec
18:23yeoj___biggbear: are you usinging Leiningen ?
18:23devnRaynes: noted. I think I'll just use jgit. seems like the better option
18:24bitemyappbiggbear: you're not supposed to install Clojure, you install Leiningen.
18:24biggbear<noonian>, <yeoj___>: lein-exec. Ok good
18:24bitemyappbiggbear: Clojure is just a jar, a dependency. Leiningen is how you run, build, and setup Clojure projects.
18:25noonianbiggbear: and lein-exec uses leiningen to run one-off scripts
18:25yeoj___biggbear: http://leiningen.org/#install (also check your package manager)
18:25yeoj___although i've recently learned that uberjar sucks with multiple jdbc drivers.
18:26biggbearthanks mates. lets test lein
18:27technomancyerhm
18:27technomancylein-exec is kind of redundant these days
18:27biggbearredundant?
18:28nooniantechnomancy: can you use lein to run a script that has dependencies without creating a project?
18:28technomancylein can be configured to do the same thing out of the box
18:28technomancy:aliases {"exec" ["run" "-m" "clojure.main/main" "-i"]}
18:28bitemyapptechnomancy: lein-exec handles dependencies.
18:28bitemyapptechnomancy: you just put them at the top of the script.
18:28technomancyoh, gotcha
18:28Raynesdevn: 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:29technomancythat's more complicated then; you'd have to put calls to pomegranate at the top of the script
18:29technomancyor you could use the update-in task, but it gets messy
18:29bitemyapp.lein/profile.clj with pomegranate or lein-exec are pretty much the only way.
18:29bitemyappand lein-exec's syntax for the dependencies is nicer, albeit less powerful, than pomegranate.
18:30bitemyappI think realistcally, one should just live in a REPL, but you know, whatever.
18:30bitemyappbiggbear: you probably don't even need to run a script, but rather, just live in a REPL with some functions.
18:30yeoj___whats run with lein run ?
18:31bitemyappmain
18:33biggbear<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:33bitemyappbiggbear: it's not that fast, just convenient.
18:33bitemyappbiggbear: a REPL is fastest.
18:33bitemyappor a running service.
18:34hiredmanhttps://gist.github.com/hiredman/6664075
18:37technomancylol pomegranate 0.0.13-SNAPSHOT
18:37hiredmanworks for me
18:37hiredman~works on my machine
18:37clojurebothttp://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png
18:38hiredman10000% times funnier since it doesn't load completely on my machine any more
18:38technomancyscientifically proven to work on some machine in a closet in a fish processing plant south of Tacoma
18:39hiredmanI'm pretty sure that is all you need to get it published in a journal
18:40technomancyeditors these days... you submit files without ns forms at the top and they don't even blink an eye
18:41hiredmanI 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:42Jardaok 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:42Jardaany ideas?
18:43Jardait's doing java -server -cp "$CLJSC_CP" clojure.main "$CLOJURESCRIPT_HOME/bin/cljsc.clj" "$@"
18:43sritchietechnomancy: did you see my earlier comment about the lein profile not picking up en v variables resolved in project.clj?
18:43Jardamaybe it's that lain
18:44Jardaline
18:44Jardabut how the hell should I get java to find clojure.main globally
18:44BronsaJarda: just to make sure, did you run script/bootstrap?
18:45Jardano, sorry. How do I suck this much reading documentation today
18:45sritchietechnomancy: 92MB with uberjar, btw :)
18:45technomancysritchie: no, what's up?
18:45sritchiein my project.clj, I've got this call:
18:45sritchie(or (System/getenv "RING_ENV") "dev")
18:46Jardano, this page didn't state that was needed https://github.com/clojure/clojurescript/wiki/Running-the-tests
18:46sritchieto tune the lein cljsbuild once command
18:46sritchieand it resolves to "dev"
18:46BronsaJarda: it assumes you have the cljs repl already working, see https://github.com/clojure/clojurescript/wiki/Quick-Start
18:46JardaBronsa: oh, ok
18:46technomancysritchie: yeah, don't do that. put the values you want in the appropriate profile.
18:46sritchieokay
18:47sritchiedev profile's picked up automatically?
18:47JardaBronsa: I've always just used clojurescript inside another project
18:47JardaBronsa: thanks
18:47BronsaJarda: np
18:47technomancysritchie: dev profile is activated unless you specify otherwise (so not during git push)
18:48sritchie"not during git push" meaning, heroku overrides it?
18:49technomancysritchie: right; typically it would be `lein with-profile production compile :all` or the uberjar equivalent
18:50sritchieokay, cool
18:50sritchieI had added: LEIN_BUILD_TASK: compile :all
18:50sritchieoff of some old advice you had in a mailing list
18:51technomancyright now config vars are only visible at runtime unless you turn on a labs feature (which I advise against)
18:51sritchieokay, cool
18:52sritchieso setting that flag to "with-profile production compile :all" should be the way
18:54devnRaynes: got a dumb question for you
18:54Raynesdevn: I've got a mediocre answer for you.
18:54devnRaynes: how do I request all the pages for something like repos/commits?
18:54technomancysritchie: no, config vars are only visible at runtime unless you turn on a labs feature
18:55devnis that {:query "all_pages"}?
18:55devnor am i missing something?
18:55RaynesAre we suddenly talking about tentacles?
18:55devnhahaha yes sorry
18:55RaynesNo worries. :P
18:55devn(context-switch!)
18:55sritchietechnomancy: 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:55JardaBronsa: you don't happen to know how to fix this: http://o178.nor.fi/~jarda/test.out.txt
18:56technomancysritchie: oh right; I forgot you switched over to uberjars. The :uberjar profile is what gets activated if you've got :uberjar-name
18:56sritchieah! okay
18:57Raynesdevn: Theoretically you should just be able to pass the :all-pages true arg
18:57technomancyfor 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:57Raynes(user-repos "devn" {:all-pages true}) devn
18:58sritchietechnomancy: thanks! cljs compiling. Going to stick with compiling it on the worker, unless anyone else (bitemyapp?) has best practices
18:58sritchieit feels like checking in the generated code is just a recipe for me to forget about changes
18:58technomancyyou mean at dyno launch time?
18:59technomancyI haven't done cljs myself, but most people don't like that because they want dynos to launch quickly.
18:59technomancyfor 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:01sritchietechnomancy: so that's a vote for just checking the generated js into CI?
19:01technomancyymmv
19:01technomancyinto CI?
19:01technomancyunless there's a strong reason not to, doing it at deploy time is the way to go
19:01sritchietechnomancy: once I generate the JS from CLJS, I need to get the JS file into my project
19:02BronsaJarda: no idea, sorry
19:02JardaBronsa: ok, no problem
19:02sritchieat deploy time meaning, on my local machine -
19:02Jardamaybe I bug dnolen when he next time comes online
19:02technomancyno, I mean during git push
19:03devnRaynes: thanks dude
19:03Raynesdevn: No problem, sir.
19:03devnRaynes: will this work with :since, do you know?
19:03Raynesdevn: You're apparently using every lib I've ever made at the moment, so the least I can do is provide support.
19:03devnRaynes: haha -- i should be kind and add some docs for you
19:03Raynesdevn: I'm actually not entirely sure how :all-pages works at all, so...
19:04Raynes:P
19:04sritchietechnomancy: I guess I need to get some lunch, no idea why I'm finding this so confusing
19:04sritchieby during git push, you mean, on the heroku box, NOT during launch, but during git push
19:04sritchieright now, I'm doing it when the uberjar is created
19:04technomancyoh, ok; I misunderstood what "compiling it on the worker" meant
19:05technomancyon heroku "worker" typically means a dyno type that's hooked up to a queue
19:05sritchietechnomancy: it takes 295 seconds to compile the cljs as a prep task for lein uberjar
19:05technomancyso yeah, what you're doing is fine
19:05sritchietechnomancy: okay, so I'll just deal with the 5 minute launch time, I suppose
19:06sritchieperhaps it'd go faster if I :aot :all in this profile.
19:06technomancylaunch time or deploy time?
19:06sritchie295 seconds in the prep-task for lein uberjar
19:06sritchiewhich I suppose is at deploy time
19:07technomancyright; 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:07sritchieah, okay
19:07sritchieI see. so, this gets all the stuff ready, while I hang out in my terminal,
19:07sritchiethen the dyno's ready to go
19:08technomancyright; your old code will still be available until you see "restarting" at the end of your push
19:09sritchiegot it.
19:09sritchiethanks, makes sense now
19:09sritchiephew
19:09technomancywe could probably use better docs around cljs
19:09technomancyand the uberjar bit is hairy if you have an app already using lein run
19:11sritchiejust a little new
19:13sritchieokay, added :aot :all to the uberjar profile
19:13sritchietechnomancy: let's see what happens :)
19:13sritchieI finally set up a staging environment,
19:14sritchieso I'll be able to make more mistakes here
19:30ltwI'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:31mtpget the apps running individually under runit
19:31technomancyltw: use jetty unless you have a reason not to
19:31mtpthen use some other http disaggregator to front them
19:32technomancyif 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:32ltwtechnomancy: I was right about to ask that question. Nice, thanks.
19:33ltwmtp: not sure what you mean by http disaggregator?
19:33mtpwell
19:34mtpnginx takes an http request and delivers it to a backend
19:34mtpthat's sorta what i mean
19:34ltwmtp: ah, right. yeah, that's cool.
19:34geoffsHey, 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:35ltwmtp + technomancy: thanks, I'll head down that path.
19:35ltwwell, standing up the separate jetty services
19:35mtprunit is truly amazing, by the by
19:36ltwmtp: never heard of it, might have to dig into it
19:36ltwwhat's the big win?
19:36mtpyou never have to write an init script again
19:36mtpeverything comes up on boot and is respawned if it dies
19:36hiredmangeoffs: 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:37ieuremtp, Okay but like real talk, do you say it "ahr-unit" or "run-it"
19:37mtpthe latter :(
19:37ieureWell balls to that
19:37hiredmanbut I could be wrong
19:37ltwmtp: 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:37mtpi could see 'r init'
19:37technomancyieure: "gun-icorn"
19:37mtpltw maybe it could benefit from some runit :)
19:37geoffshiredman: hmmm, I hadn't even considered that might be an issue... I'll have to look into that!
19:37hiredmanhttp://www.oracle.com/technetwork/java/embedded/downloads/javase/javaseemeddedev3-1982511.html I guess I am?
19:38ieuretechnomancy, Yeah, I've been saying that for ages.
19:38ltwmtp: i think it could benefit from some gratuitous rm -rf, but that's besides the point
19:38mtp:)
19:38ltwI'll see if I can get it going though
19:38hiredmangeoffs: 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:39geoffshiredman: that sounds workable if not exactly fun :)
19:39geoffsit seems strange though that static initializers would get run during compilation... Any idea why that happens?
19:40technomancygeoffs: clojure compilation *is* runtime
19:40hiredmangeoffs: static inits run when classes are loaded, clojure runs code as it is compiled (a "same world" compiler), so classes will get loaded
19:41geoffstechnomancy: So that's true for AOT compilation as well then?
19:41technomancyit's much simpler but means you can't do crazy things like put file access in static initializers
19:41geoffsfair enough
19:41sritchieException in thread "main" java.lang.NoClassDefFoundError: clojure/tools/reader/reader_types/Reader
19:41sritchieoh boy...
19:41sritchieanother one,
19:41sritchieafter AOT compilation
19:42technomancygeoffs: 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:42hiredmangeoffs: 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:43geoffsInteresting. So if I could avoid the AOT compilation and just run my clojure directly on the EV3 I wouldn't have this problem...
19:43hiredmancorrect
19:44hiredmanaot compilation is not something you really do unless under duress
19:44Bronsasritchie: seangrov1 had the same exception while AOT compiling
19:44technomancywell, often you'd do it before "deployment" given that launch would take longer on an embedded system without AOT
19:44technomancybut in this case yeah, skip it
19:45geoffshiredman: so it seems like my next problem is to get leiningen on to the EV3... sounds like fun!
19:45Bronsasritchie: can you tell me what you're trying to AOT compile?
19:45technomancygeoffs: no, just ship an uberjar over
19:45hiredmangeoffs: woa, no, no reason to do that
19:45hiredmanyeah, uberjar and ship it
19:45technomancygeoffs: ideally you could embed nrepl and connect from your computor
19:46hiredmanlein is a build tool, like if you where using maven, why would you put that on the ev3?
19:46geoffsBut when I uberjar the static initializers get run and it fails...
19:46technomancygeoffs: get rid of :main
19:46sritchieBronsa: sure;
19:46sritchiesorry, had to put out one quick fire
19:46sritchieBronsa: you want the list of deps?
19:46technomancygeoffs: use clojure.main as your entry point
19:46Bronsasritchie: yeah, to see if I can reproduce
19:47geoffstechnomancy: Oh! And then I have a clojure repl?
19:47technomancyyeap
19:47technomancygeoffs: but hiredman raises a good point that it probably won't work with a 1.4 Java
19:47sritchiesure, one sec
19:47geoffscool
19:47geoffsit's actually 1.7 java
19:47technomancyoh rad
19:47technomancysounds like fun
19:47geoffssome oracle people are supporting the embedded stuff
19:48geoffsIf you could, I'd bring it down to Seajure next week :)
19:48geoffsMaybe I can work something out...
19:48technomancyoh, where are you?
19:48geoffsbellingham
19:48sritchieBronsa: here it is: https://gist.github.com/sritchie/7484bdb0b7cb5257725a
19:48technomancyah, bit of a hike =)
19:49Bronsasritchie: jesus christ.
19:49sritchiehaha
19:49technomancythat'd make a sweet demo though
19:49geoffsthat's why I only show up once every couple months :)
19:49sritchieBronsa: going some serious cleanup on an older app
19:50geoffshiredman: thanks for the help! I definitely learned something today
19:51Bronsasritchie: I'll try and see if I can reproduce && see if it's a bug in tools.reader
19:51geoffstechnomancy: 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:51sritchieBronsa: awesome, thanks. I'm trying to add that to exclusions now
19:51technomancygeoffs: if you can control the CLI invocation then yeah; best to specify it there
19:51sritchieBronsa: nope, adding that exclusion doesn't help
19:52geoffsyeah, that's easy. I'm gonna try it now!
19:53sritchieBronsa: removing AOT compilation for now
19:55Bronsasritchie: AOT compiling tools.reader seems to work fine for me
19:55sritchiewith those deps?
19:56sritchieBronsa: oh, well --
19:56sritchiethe aot compile works for me as well,
19:56sritchieit's when I run the uberjar after that
19:56sritchiethat I get a crash
19:56Bronsaweird
19:57Bronsasritchie: ubjerjar just worked for me w/ :aot :all
19:58sritchieBronsa: inside my jar,
19:58sritchieit's getting thrown at at clojure.tools.reader.edn__init.load(Unknown Source)
19:58sritchiewhen I actually try to run the jar w/
19:58sritchiejava -cp thejar.jar clojure.main -m mynamespace
19:58Bronsayeah, that's the same as the error that seangrov1 had
19:58Bronsammh
19:59Bronsasritchie: 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:02geoffstechnomancy: 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:03technomancygeoffs: very cool. would be interested in hearing what you do with it.
20:04geoffsI'll let you know :)
20:04hiredmanclojurebot: clojure is for robots
20:04clojurebotAlles klar
20:10Bronsasritchie: 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:11sritchieBronsa: oh, yeah
20:11sritchielooks like that's right near the top
20:11sritchieof the trace
20:12sritchieBronsa: nice find
20:13Bronsasritchie: that's actually what seangrov1 reported :P
20:14Bronsasritchie: I still cannot reproduce though
20:17technomancyclojurebot: erlang is for heaters
20:17clojurebotc'est bon!
20:22bitemyapptechnomancy: haha, what?
20:22technomancybitemyapp: https://github.com/technomancy/prometheus
20:23bitemyapptechnomancy: should've used Elixir >:P
20:23technomancybitemyapp: yeah, the lack of |> is actually suuuuper annoying
20:23Bronsasritchie: 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:24sritchiewell,
20:24bitemyapptechnomancy: the set_attribute/get_attribute stuff looks tedious.
20:24sritchiemaybe they're each depending on separate versions?
20:24sritchieand AOT compiling differently?
20:24sritchiehmm
20:24Raynestechnomancy: wtf traitor
20:24bitemyapplmfao.
20:24technomancybitemyapp: I don't have enough experience to know whether to blame the lib or not on that one
20:24Raynestechnomancy: Why would you not use Elixir? Monster.
20:24RaynesI
20:24Bronsasritchie: you should have only a t.r version on your classpath
20:24sritchieyeah
20:25technomancyRaynes: because of learnyousomeerlang.com
20:25technomancyprimarily
20:25Raynestechnomancy: You've got Raynes.
20:25technomancythe LYSE guy works at heroku
20:25RaynesYou have Raynes and José Valim.
20:25hyPiRionyay Erlang
20:26technomancyRaynes: we hang out on internal heroku chats and make fun of go together
20:26hiredman~erlang
20:26clojurebothttp://www.unlimitednovelty.com/2011/07/trouble-with-erlang-or-erlang-is-ghetto.html
20:26Raynestechnomancy: Oh yeah? Well I've had discussions with the guy who wrote LYAH. So there.
20:26technomancyhow do you do the thumbs up emoticon
20:27bitemyapptechnomancy: I am hella jealous of your ability to mock Go with the LYSE guy.
20:27technomancyhiredman: agreed on most of the points in that article, but lmao at "There's no nil" like that's a problem
20:28technomancyI mean, "
20:28technomancyErlang isn't general purpose" is hardly news
20:29RaynesThe biggest issues with Erlang that it willfully lacks functionality every other modern language has and nobody but me seemed to care at all.
20:30RaynesThat sentence was like 5 different sentences munged into one giant nonsensical sentence. Excuse me while I try again.
20:30RaynesThe 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:31RaynesWhich 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:32TimMcDid you know that you can rearrange the letters of "Erlangysroniswlo" to spell "Raynes is wrong, lol"?
20:32TimMcTrue fact.
20:32RaynesOne 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:33technomancyRaynes: is "sending EOF" here somehow distinct from "closing its input stream"?
20:33RaynesMy 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:33Raynestechnomancy: No.
20:33technomancyhuh
20:33technomancyso you're saying closing the input stream closes the output stream too or something?
20:34brainproxyinside 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:34RaynesYes.
20:34technomancylame
20:34brainproxyi came up w/ this helper: https://gist.github.com/michaelsbradleyjr/7258997
20:34brainproxythoughts?
20:34technomancywell it's a good fit for chat programs =)
20:34Raynestechnomancy: 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:34RaynesI pretty much checked out and gave up at that point.
20:35TimMcPretty wild.
20:35Raynestechnomancy: 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:35RaynesSo if they don't want change, there ain't gonna be no change.
20:36technomancyRaynes:right; it's not even something you can fix in a completely different language
20:47bitemyappRaynes: it doesn't help that Ericsson just gives zero fucks.
20:48Raynesbitemyapp: Negative 1 in my experience.
20:49xuserso that's an elixir issue too I guess
20:50brehautdidnt ericson stop using erlang in hte late 90s ?
20:51brehautoh i see, they unbanned it in 2004 and rehired armstrong
20:52xuserto be serious about elixir you need to know erlang, to be serious about clojure you need to know java ;)
20:52bitemyappxuser: not really.
20:52bitemyappI know fuck-all about Java and use Clojure happily.
20:52bitemyappI just know where to find what I want in java.util.*
20:52Foxboronxuser: thats like saying "to be serious about Python, you need to know C"
20:52Foxboronthats not correct at all
20:52bitemyapp^^ what he said.
20:53bitemyappClojure relies on its host, but it doesn't matter for Joe Average Developer.
20:53bitemyappOr Jill.
20:53Foxboron"To be serious about lang x, you need to have understanding of the underlying language"
20:53Foxboronthis applies to everything really
20:53Foxboron"To be serious about C; you'd need to know ASM"
20:54FoxboronIMO, it might be more relevant for Clojure.
20:54xusermaybe replace serious with pragmatic?
20:54FoxboronBut i think its just wrong.
20:54bitemyappknowing assembler can make C more, not less, confusing.
20:54bitemyappyou're better off studying the C standard and understanding the abstract C machine model.
20:54Foxboronxuser: why pragmatic?
20:54Foxboroni'd argue it would make a language less pragmatic if you need to know two languages to learn one
20:55Foxboronbitemyapp: well, that wasnt really the point of the statment :P
20:55brehautclojure is different to most languages because it expects you to use the host language's APIs directly via interop
20:55xuserFoxboron: because of the ecosystem, in your python examle you don't need to know C to create useful real world apps rapidly
20:55Foxboronxuser: you don't need to know java to do the same with Clojure
20:55xuserFoxboron: that's not the same for clojure or elixir
20:55brehautclojure doesnt ship with a concurrent threadsafe blocking queue because java provides a completely adequate one for example
20:56Foxboronbrehaut: but you go by fine using that without any knowledge about java
20:56brehautFoxboron: by analogy it would be the same as just ignoring a huge chunk of the standard library in python
20:57benkaypoor 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:57hyPiRionthere's a difference between a standard library and knowing how to develop good programs in a language
20:58brainproxybenkay: it gets better :)
20:58brainproxyjust stick with it
20:58FoxboronhyPiRion: i was struggling formulating just that.
20:58xuserFoxboron: I though Clojure success was the Java ecosystem, so see where I'm going to here
20:58Foxboronxuser: sure it is.
20:58xuser+you
20:58benkay8 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:58FoxboronBut it dosnt require any java knowledge to use an API provided to you.
20:59Foxboronxuser: you go by just fine using a C library in Python without C knowledge
20:59TimMctechnomancy: 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:59Foxboronsame applies to Clojure
20:59TimMcIt would require a little experimentation to determine what CPU temps correspond to what room temps.
20:59technomancybenkay: who told you that; let's sick the guards on em
20:59Foxboronxuser: you can argue it helps understand Clojure better. But not development.
20:59xuserFoxboron: yes, but Java APIs are not exposed as Clojure api
20:59technomancybenkay: which talk was that btw? =)
21:00technomancyTimMc: awesome
21:00Foxboronxuser: but that isnt really an argument. You get by fine using the tools clojure give you to work with the API.
21:00hyPiRionThe "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:00FoxboronNo java knowledge needed.
21:00TimMcI've already used an old laptop running F@H as a heating pad...
21:00technomancyTimMc: probably not a great fit for the beaglebone if it's CPU intensive, but I was really happy with it for this
21:00hiredmanhyPiRion: the wrappers are often very bad
21:00TimMcYeah, this is for beefier machines.
21:01llasramAlso, 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:01hyPiRionhiredman: Yeah, that's actually a bit of a problem: What is a good vs. bad wrapper is hard to find out.
21:01hiredmanllasram: yes
21:01hiredmanhyPiRion: it is easy, wrappers are bad
21:02hiredmanpeople tend to do them as "my first clojure" projects
21:02TimMcWrappers are good for bad APIs. -.-
21:02hiredmanthey hide what is being wrapped without adding value
21:03xuserFoxboron: won't you have a hard time using http://docs.oracle.com/javase/7/docs/api/ without java knowlegde?
21:03llasramI think a good wrapper can add value by providing actual integration
21:03bitemyappxuser: how much code have you written today?
21:03llasramMaking things seqable, reducible, etc
21:03xuserbitemyapp: not much really ;)
21:03brehauthiredman, llasram: and often they are written without full understanding of the decisions that went into the wrapped API
21:04bitemyappxuser: stop wasting yours and everybody else's time and just go write some Clojure code.
21:04hiredmanindeed
21:04Foxboronxuser: why would i? I see what types it uses. What goes where and what it returns.
21:04Foxboronxuser: where is the problem?
21:04bitemyappFoxboron: don't encourage him.
21:04bitemyappFoxboron: write code.
21:04hiredmanwrappers 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:04benkaytechnomancy http://www.infoq.com/presentations/Swarm-Coding
21:04xuserbitemyapp: I really deserved that
21:05Foxboronbitemyapp: i am a sucker for arguments
21:05bitemyappFoxboron: become a sucker for code.
21:05bitemyappFoxboron: if you need a task, I can provide one.
21:05Foxboronbitemyapp: Hahaha. It's way to late for me to produce any kind of useable code, but sure shoot.
21:06bitemyappFoxboron: 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:07bitemyappyou might want to ping him or I before launching any crusades though.
21:07Foxboronbitemyapp: i'm like "ohhey, i recognize that picture from somwhere...oh twitter!"
21:08Foxboronbitemyapp: gotta look at the code, might be above my level of skill
21:09bitemyappFoxboron: you reach that level of skill by rolling up your sleeves and doing the work.
21:10Foxboronbitemyapp: you don't just walk into Tour de France with a tricycle
21:11bitemyappFoxboron: code isn't like that. It's not a competition, it's just work.
21:11bitemyappFoxboron: 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:11bitemyappFoxboron: just get the work done.
21:12bitemyappdon't understand monoids? learn what monoids are. Don't understand transients? learn what transients are for.
21:12bitemyappit doesn't matter if that means things take a bit longer.
21:12RaynesHeh.
21:12FoxboronBut in reality, it is easier said then done. bitemyapp ill take a look. But anything thread related is my weak side really.
21:12amalloy(inc bitemyapp)
21:12lazybot⇒ 9
21:13brehautFoxboron: you wont get better at threads by thinking about it
21:13brehaut(thinking alone)
21:14Foxboronbrehaut: that is indeed true.
21:14amalloyFoxboron: 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:14xuserbitemyapp: so how does reql compare to sql? do like you like more?
21:14xuser+it
21:15Raynesbitemyapp: We basically roll out of bed like that every morning because we didn't do college.
21:15Raynesbitemyapp: "Hrm, monoids. Better read up on those."
21:16Foxboronamalloy: 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:16RaynesAs opposed to "Hrm, they didn't cover this in school."
21:16bitemyappxuser: 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:16brehautRaynes: you are making ridiculous generalisations
21:16FoxboronRaynes: hah, what do they cover in school except OO concepts?
21:16amalloybrehaut: they teach you not to do that in college
21:16amalloy(apparently)
21:16brehautamalloy: aha
21:16bitemyappRaynes: you might be right.
21:17bitemyappof course, I'm only agreeing because it makes brehaut butt-mad.
21:17brehautbitemyapp: im shaking my head, not frothing with rage
21:17RaynesI don't think he is angry at what I said but what he just made up that I said.
21:17bitemyappFoxboron: actually, xuser reminds me - i could use a datalog->SQL bridge.
21:17xuserbitemyapp: hmm k, I'll stick with postgres for now
21:18bitemyappxuser: rethinkdb is nice if you want a document store that isn't awful.
21:18Foxboronbitemyapp: i got no idea what that means.
21:18Raynesbrehaut: I certainly wasn't saying that people who go to college aren't capable or willing to learn things not taught in college.
21:18bitemyappFoxboron: I want to query SQL databases with datalog.
21:18RaynesSorry if it came off that way. :D
21:19brehautRaynes: no obviously.
21:19bitemyappPerhaps more that we just don't understand what's expected, so we learn whatever.
21:19bitemyappand that's how we learned everything we know anyway.
21:19bitemyappthat and getting brow-beaten on IRC.
21:19brehautRaynes: 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:19bitemyappgarbage people are garbage. News at 11
21:20brehautindeed
21:20hiredmancome now, I hear php has a type system now
21:20brehauthiredman: wait wat
21:20Foxboronbitemyapp: ahh, i see. Googled and it made more sense
21:20hiredmanthere was a strangeloop talk, one of the hiphop vm guys annonced a gradual typing extension to php
21:20benkay(+ 2 bitemyapp)
21:21bitemyappFoxboron: datalog is hella nice yo.
21:21brehauthiredman: O_O that sounds astoundingly brave
21:21muhoooften 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:21hiredmanthe video went viral or something
21:21Foxboronhiredman: looking at it. and it makes indeed sense
21:22Foxboronbitemyapp: 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:22Foxboronalso, lol at hilightning hiredman instead of bitemyapp
21:22Foxborontired indeed
21:23benkaymuhoo: i find that browbeating only works if the beater respects the beater
21:23benkaybeaten* respects the beater
21:24hiredmanhttps://twitter.com/puredanger/status/384124183308820480
21:24Apage43I 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:24brehauthiredman: thanks
21:24hiredmanthat talk video is available for preview with a code if you attended
21:25brehauti guess i'll have to wait for it like a schlep then
21:25benkaybrehaut: shlub
21:25hiredmanI dunno, I did end up watching it all
21:25bitemyappbrehaut: a schlep is a tiresome and tedious journey or task, not a person.
21:25hiredmandidn't
21:25brehautoh
21:25brehautsorry
21:25bitemyappyeah you want shlub.
21:26bitemyappit's fine, you're not a new yorker, don't know any better :)
21:26bitemyappI want Facebook to go whole-hog and make a PHP compiler target for Haskell.
21:26bitemyappGHC Core -> PHP
21:28muhoobenkay: 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:29bitemyappmuhoo: Common Lisp was like joining an abusive fraternity.
21:29bitemyappCoconutCrab: hi!
21:29muhoobitemyapp: exactly. i no longer think that attitude is necessary or healthy.
21:30bitemyappmuhoo: well I try to be nice, but give short shrift to people wasting others' time still. I think I've gotten substantially better.
21:30muhoo(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:30benkaymuhoo: 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:30benkayhighly context and recipient dependent in my experience
21:31rhg135bitemyapp: Oh God
21:31benkaythere is no One True Management philosophy, and junior engineers will always need Managing.
21:32benkaysome thrive under pressure to not fuck up
21:32bitemyapprhg135: hum?
21:32rhg135Nvm
21:32benkayother thrive only with zero pressure at all
21:32benkayi'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:32benkay(muahahahaha)
21:42bitemyappbenkay: 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:42bitemyappthey do their work, but are in some respects apprenticing over the course of multiple programs until they grow moe independent.
21:43TimMcCoconutCrab!
21:43bitemyappTimMc: I KNOW RIGHT?!
21:44TimMcSorry, I react to your name like https://xkcd.com/231/
21:44holois it OK to make a pun with clojure to name a java lib wrapper, like: clj-java-lib or java-lijure?
21:45bitemyappTimMc: me too :)
21:45bitemyappholo: dude no.
21:45bitemyappholo: don't...just...no.
21:45bitemyappgive it a nice name.
21:45holobut it's a wrapper..
21:45hyPiRionholo: You can try `lein new java-lijure` and see what we think about that idea
21:45holoomg, that name really exists?
21:46hyPiRionholo: try to run the command I gave you
21:46bitemyapp(it'll blow up your computer)
21:47holook, really no puns :) i got it
21:47bitemyapphyPiRion: GHC once had a bug where Haskell code that failed the type-checker got deleted.
21:47bitemyapphyPiRion: I would suggest that Leiningen could benefit from their example...
21:48benkaybitemyapp: i don't know if this trend in the US towards management-less organizations is an evolution or de-evolution
21:48hyPiRionbitemyapp: oh, include bugs into programs used in production? sure thing, I add bugs into Leiningen all the time
21:49benkaybitemyapp: 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:53TimMcholo: It's OK if it's ironic, e.g. swearjure.
21:56holoTimMc, 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:59holoprobably the correct spelling would be kurojuru
22:04akurilinDoes 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:17bitemyappakurilin: choosing select field names?
22:17bitemyappakurilin: might be easier if you have a before/after of "what I have to do now" and "how I'd rather express myself"
22:18akurilinbitemyapp, 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:19bitemyappakurilin: hrm, I would advise making first table a variable, but keeping it otherwise explicit.
22:20akurilinbitemyapp, not sure I'm following. When you say "first table a variable", are you suggesting I defentity it?
22:22`cbpIf I redefine / in another namespace
22:22`cbpand then try to use it I get stuff like "invalid token" or "unmatched delimiter )"
22:23`cbphowever clojure.core// works fine :-o
22:24`cbpDo I have to rename my /? :P
22:34bitemyappakurilin: yes, or join a string.
22:34amalloy`cbp: yes
22:35`cbpamalloy: aww
22:35amalloy/ and clojure.core// are special-cased into the reader, as the only two symbols in which / isn't (only) a namespace separator
22:36`cbpOh why didnt I think of that
22:36`cbpamalloy: thanks
22:57gfredericksis that fixed for 1.6?
22:57gfredericksI thought clojurescript needed it for something
22:57devnis anyone else not really surprised by the keyword reader patch being reverted?
22:58devnis there a good reason to not allow {:1234 "a"}?
22:58gfredericksdevn: clojure.org/reader says you can't do that?
22:58gfredericksyou might also argue that it's weird for a syntax to be valid as a keyword but not as a symbol
22:59devnwell sure, but there's been a longstanding "hey, so, we dont use % yet, but there's no guarantee"
22:59gfrederickswe don't use % yet?
23:00gfredericks,'#(% %2)
23:00clojurebot(fn* [p1__29# p2__30#] (p1__29# p2__30#))
23:00gfredericksI guess those aren't symbols exactly
23:01gfredericks,:%
23:01clojurebot:%
23:01devngfredericks: yeah, maybe a poor example
23:02devnim 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:02gfredericksI've always thought of keywords and symbols as being rather parallel
23:02gfredericksdevn: sure, and the patch that got reverted was an example of things not being there in the future
23:02devnin that respect i agree with you, but then again, i rather like the :1 thing
23:03devnfor SHAs and stuff
23:03gfredericksyou use keywords for SHAs?
23:03TimMc&:1
23:03lazybot⇒ :1
23:03TimMcTIL
23:03gfredericksTimMc: ?
23:03devngfredericks: not all the time or some shit
23:03TimMcNot something I'd rely on though.
23:03TimMcgfredericks: "Today I Learned"
23:03gfredericksTimMc: you've not been around for today's discussion I guess?
23:04TimMcI am vaguely aware of it.
23:04gfredericks"It is neither the case that I use keywords for SHAs all the time, nor is it the case that some shit."
23:05gfredericksdevn: yeah I don't have a strong case against it
23:05gfredericksyou don't often see rich flip-flopping like that I guess is the weird part
23:05gfredericksor at least I don't
23:18gfredericksI think alex's email clears it all up
23:19gfredericksI'm curious how much code-breakage will be tolerated for clojure 2.0
23:22muhoothere's a clojure 2.0 in the works?
23:22muhoonews to me
23:22gfrederickswell I imagine it's more an idea than a concrete thing at the moment
23:23gfredericksI think I heard rich suggest it would coincide with CinC
23:24tbaldridgethat's probably years off though
23:24gfredericksright
23:48muhoohmm, just upgraded to latest ring, and got this joy:
23:48muhooException in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest, compiling:(ring/middleware/multipart_params.clj:39:5)
23:49muhooam i correct in reading this to mean that ring-middleware is missing a dependency that it needs in order to work?
23:50muhooif so, why, and how can this be?
23:55amalloycould 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:57amalloy(ie, usually it means not that a library is missing, but that it's not the expected version)
23:58Bronsahttps://github.com/ring-clojure/ring/commit/c58e4912c9ab5228c247e558bd264b8e323a9e46 might be relevant