#clojure log - Aug 29 2013

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

0:00 xeqi: ddellacosta: ah, I let emacs + austin/piggieback handle that for me

0:00 ddellacosta: the solution presented on clojurescript.test's github page is quite vague in terms of how it suggests tests get loaded into the repl.

0:01 xeqi: see, that's what I was looking for. How does that work?

0:01 xeqi: that is, you write a test in emacs, and it gets written to a file, compiled, and sent to the browser repl…?

0:01 xeqi: piggieback is a nrepl middleware that you can make take over the clj repl and turn into a cljs repl.

0:02 then C-c C-k will send the buffer to the repl

0:02 ddellacosta: xeqi: yes, I've already got piggieback loaded, and running

0:03 xeqi: hmm…interesting, so there is no file compilation step, it gets loaded directly from emacs, huh? interesting.

0:03 xeqi: so you can write a test in a file, C-c C-k, and then (t/test-ns 'some-namespace)

0:03 piggieback handles the compilation

0:04 same way it translates things entered in the repl

0:04 ddellacosta: xeqi: okay. That is the bit I'm missing--so, what do you need in emacs to get this all hooked up? I've been avoiding using emacs w/nrepl for a while, for no good reason

0:04 callen: ddellacosta: "I've been avoiding using emacs" - I don't think we can be friends.

0:04 xeqi: I think any nrepl frontend would work.. do you already use one of emacs,vim,or ccw?

0:05 ddellacosta: callen: you read into it incorrectly: I've been avoiding using nrepl with emacs, emphasis on nrepl. I'll stop using emacs when you rip it from my cold, dead hands

0:05 xeqi: yah, see above, heh

0:06 xeqi: M-x package-install nrepl-mode

0:06 C-x C-f some/path/to/file/in/lein/project

0:06 C-c C-j

0:07 to start an nrepl server for that project. piggieback setup is a bit more work, but basically is copy paste from its readme

0:07 ddellacosta: xeqi: okay, this is awesome, should be more than enough to get me going. Thank you so much, this is *exactly* what I wanted to know!

0:07 * ddellacosta sticks tongue out at callen

0:09 xeqi: ddellacosta: ack, C-c M-j to start nrepl

0:10 ddellacosta: ah, that's why that didn't work...

0:10 xeqi: ddellacosta: at which point https://github.com/clojure-emacs/nrepl.el#clojure-buffer-commands might be useful

0:10 ddellacosta: xeqi: the one thing I wish I could do is send it to a repl I have already open, *not* (standard cmdline lein repl) in emacs…is that crazy/unpossible?

0:11 gdev: emacs live for the win

0:11 xeqi: note that somethings don't work in a cljs-repl, like tab completion, M-.

0:11 ddellacosta: M-x nrepl will let you specify an already running nrepl instance, though I've only done that with `lein repl :headless`

0:11 ddellacosta: xeqi: yah, I've used a cljs-repl a fair amount, I'm familiar with that part of it

0:11 gdev: during boring meetings M-x zone...dance for me emacs

0:12 ddellacosta: xeqi: gotcha, thanks--excellent

0:16 xeqi: ddellacosta: feel free to ask if you run into any problems

0:16 ddellacosta: xeqi: thanks, much appreciated!

0:31 futile: If anyone needs a good smile right now, look no further: http://www.reddit.com/r/PHP/comments/1l7baq/creating_a_user_from_the_web_problem/

0:36 tbaldridge: futile: obligatory response : http://xkcd.com/327/

0:37 futile: :)

0:38 muhoo: i vaguely remember there being a function to swap keys and vals in a map, but i can't for the life of me remember what it was

0:38 probably something in clojure.set i'd guess

0:39 xeqi: ,(doc clojure.set/map-invert)

0:39 clojurebot: I don't understand.

0:39 muhoo: ah, thanks

0:39 futile: Why is that in clojure.set?

0:59 dissipate: can someone explain what exactly replaces object oriented design in clojure? is it really just immutable data being passed through pure functions and that's it?

1:00 brehaut: replaces what aspect of OO

1:00 callen: so. who's interested in discussing my problem with making an idempotent alter-var-root? :P

1:01 gdev: callen, I am for a little bit

1:01 brehaut: dissipate: data modelling? just use maps etc. polymorphism? first class and higher order functions, multimethods, protocols all do kinds of polymorphism, identity? reference types. etc etc

1:02 dissipate: brehaut, replaces objects

1:02 callen: gdev: I have to wrap the inner behavior (AOP style) of functions in c.j.j and potentially also Korma. It's for a SQL logging library.

1:02 gdev: I'm ripping into the args passed to said functions and logging the queries, then timing the function I wrapped.

1:02 brehaut: dissipate: objects are _everything_ in an object orient system. the have many responsibilites. particular facilities of objects responsiblities are handled via different mechanisms in clojure

1:03 callen: gdev: I could ask users to obey a contract of, "don't run the same wrapper fn more than once!", but I'd rather it "just work" and be idempotent (otherwise it'll just keep adding duplicate log lines)

1:03 brehaut: dissipate: if you mean things to hold pieces of data, then use data structures

1:03 noidi: dissipate, in Clojure the API design mostly focuses on the data, not the operations

1:03 dissipate: brehaut, so why does common lisp have an object system? CLOS

1:03 jlongster: so how does core.async handle errors? are you supposed to manually check for error objects? (@dnolen if you're around)

1:04 noidi: dissipate, you might find this helpful http://www.infoq.com/presentations/Thinking-in-Data

1:04 brehaut: dissipate: because common lisp decided to have an object system. however im pretty sure this is #clojure

1:04 callen: gdev: my initial thought was metadata but this is problematic for several reasons specific to how alter-var-root works.

1:04 gdev: help me obi-wan-kenobi, you're my only hope.

1:04 brehaut: dissipate: and fwiw, CLOS doesnt resemble anything much like you'd find in most 'OO' languages

1:04 dissipate: noidi, thanks

1:05 gdev: callen, this is not the clojurian you are looking for 0_o

1:05 dissipate: brehaut, that's probably just because it hasn't been ported yet

1:05 callen: gdev: why not? :(

1:05 dilzio: @noidi gr8 link...thx

1:05 brehaut: dissipate: or, because it doesn't fit with clojures philosphy

1:05 xeqi: callen: I believe robert.hooke has a way to be idempotent for named hooks, might be worth checking out

1:06 brehaut: is cheshire still the preferred clojure json lib?

1:06 dissipate: brehaut, BTW, i'm no fan of OOP, just curious how clojure gets things done without objects.

1:06 noidi: dissipate, is there a particular problem you think object orientation solves for which you can't find a solution in clojure?

1:06 callen: xeqi: whoa. I need to see this. Thanks.

1:06 xeqi: I actually know of the library, but forgot it existed.

1:06 gdev: callen, see? told you

1:06 brehaut: dissipate: you still havent specified which features of objects you want to know about.

1:06 callen: I need a bot that reminds me of various technomancy, ztellman etc libraries at intervals.

1:07 brehaut: yes.

1:07 brehaut: callen: thanks

1:07 dissipate: noidi, no. i've just been 'forced' to do OOP in industry, and that's what i'm used to thinking about things in

1:07 noidi: according to some definitions of OO, Clojure does support it: http://wcook.blogspot.fi/2012/07/proposal-for-simplified-modern.html

1:08 it doesn't have classes, but it does have type-based polymorphism in the form of protocols

1:08 dissipate: brehaut, bundling state and data with methods

1:08 callen: yeah...this is good...

1:08 brehaut: dissipate ok then. the answer is dont do that

1:08 just pass data through functions

1:09 dissipate: brehaut, that's what i asked initially, if it's all just immutable data and pure functions

1:09 seems too good to be true

1:09 brehaut: thats the basics yes

1:10 but in the same way objects arent _just_ data and methods living together

1:10 in particular theres late bound polymorphism typically oing in there

1:10 as well as the namespacing

1:10 and you deal with a crap ton of identitys rather than values

1:11 Apage43: Man I needed this talk link a week ago

1:11 callen: Apage43: which?

1:11 dissipate: Apage43, which one?

1:11 Apage43: the thinking in data one above

1:12 xeqi: I feel like I saw a Stuart Halloway recording from a user group where he walks through all the properties in some OOP systems and how they are done in clojure

1:12 dissipate: BTW, does anyone know when/where the next clojure west conference is?

1:12 Apage43: Working with a coworker on a checkers game. I did an implementation of the rules as functions of boards and moves.

1:12 dissipate: xeqi, please linky link to that

1:12 xeqi: dissipate: trying to find it

1:12 callen: xeqi: WHOA. link.

1:13 xeqi: the ravenous hordes are upon you. With the linky-ness, quickly!

1:13 Apage43: Then the in the data model I have to actually work with, each game piece is an object, with its own identity that has to be preserved as stuff moved around.

1:13 dissipate: does anyone have any info about the next clojure west conference?

1:14 Apage43, objects in clojure? the blasphemy!

1:14 Apage43: well my bit is in clojure

1:14 the other bit is obj-c

1:14 hence the disconnect

1:14 brehaut: dissipate: well actually, clojure does support objects as a first class thing: its part of the interop model with java. however, objects as objects are only used as an implementation concern and arent something you need to know about as a beginner

1:15 dissipate: i think OOD sucks bad. the real world doesn't fit into nice taxonomies of inheritance. it just doesn't.

1:15 Apage43: (and the app itself exists largely as a showcase for a third thing written in go)

1:16 brehaut: dissipate: to be fair, best practise in OO for 15+ years has been not to use inheritance if you can help it

1:17 dissipate: brehaut, a lot of the 'objects' i run into in industry are not really objects. they are just controllers for other stuff, loosely organized data and methods to interact with something else, like the database.

1:18 brehaut: dissipate: there is bad code everywhere in every paradigm. FP and clojure is no silver bullet

1:18 noidi: I don't think Clojure's notion of objects is just for interop

1:19 Protocols, Types and Records are much more than just interop features

1:19 brehaut: noidi: no its not. its also an implementation detail

1:19 noidi: right. all of those are objects due to the host system making objects the natural way to implement them performantly. they are however, not intrinsically objects

1:19 dissipate: brehaut, you got that right. bad code everywhere. an entire industry built on crap.

1:20 some of the crap makes money some of the time

1:22 noidi: objects as "an instance of a class" are an interop feature / implementation detail. but I think objects as "a thing that implements an certain interfaces/protocols" are core to Clojure.

1:23 -an

1:23 gdev: dissipate, you've seen this? http://www.infoq.com/presentations/Clojure-Java-Interop

1:23 dissipate: noidi, so a good portion of Java made it's way into Clojure?

1:24 outside of interop

1:24 gdev: dissipate, also this flowchart is pretty nice http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/

1:25 dissipate, Clojure took the good parts from a lot of languages

1:25 xeqi: dissipate, callen: https://www.youtube.com/watch?feature=player_detailpage&v=cidchWg74Y4#t=1141 is the closest I can find atm, but I thought I had seen a longer talk of that section

1:26 noidi: dissipate, not directly, no. protocols fill the same need as Java interfaces, but they're designed to avoid their shortcomings. http://clojure.org/protocols

1:26 callen: t=1141 isn't working for me I think. hrm.

1:26 technomancy: thank you for robert.hooke

1:27 xeqi: callen: jump to ~19m in

1:28 callen: xeqi: thanks.

1:29 dissipate: gdev, not much good from java in terms of language features.

1:30 gdev: dissipate, yes, but it runs on the jvm, so that's enough

1:30 dissipate: as far as i know, java was a big step backwards. only thing going for it is the JVM.

1:31 gdev, how does someone write a book about java and actually praise the language? that i can't understand

1:31 callen: xeqi: oh man, robert.hooke really cleaned up my code. Thanks for reminding me it exists. Also this Halloway video is relevant because I will be explaining Clojure in further detail to my coworkers soon.

1:33 dissipate: callen, what are your coworkers using now?

1:33 gdev: there are also two videos on ClojureTV's YouTube channel about clojure data structures by Rich himself

1:33 also two Clojure for Java developers videos

1:34 clj_newb_2345: someone needs to write a simple editor in pedestal

1:34 have it process scripts server side in clojure

1:34 and call it cljmacs

1:34 glosoli: lol

1:35 clj_newb_2345: i was going to say climacs, but I think there's already a common lisp gui library named that

1:35 xeqi: dissipate: it did add a memory model which still seems rare. Not sure if that should be considered a java feature or a jvm feature

1:36 dissipate: why not make clojure into something like haxe that just compiles to almost anything?

1:36 clj_newb_2345: why can't everyoe just support the jvm

1:37 xeqi: dissipate: there are several forks, https://github.com/halgari/clojure-py, https://github.com/takeoutweight/clojure-scheme (which can then go to c), clojurescript

1:38 dissipate: xeqi, right, but those are separate projects. i just want 1 command line executable that will turn my clojure code into almost any language.

1:38 glosoli: clj_newb_2345: that would be boring ;/

1:39 gdev: don't forget clj-tran clojure to fortran compiler

1:40 clj_newb_2345: i'm not happy

1:40 until there is a clojure to scala compiler

1:41 gdev: i just throwed up in my mouth

1:41 clj_newb_2345: what would you rather do, be forced to switch from emacs to vim, or from clojure to scala?

1:41 callen: 95% of the complaining about Clojure not supporting a particular platform or compiler target is done by people that haven't pushed anything to clojars.

1:41 I'll let the implication stand on its own.

1:41 * callen mic drop and walks off the stage

1:42 dissipate: callen, clojars?

1:42 callen: (cemerick is the other 5%. Singlehandedly)

1:43 dissipate: callen, what does clojars have to do with compiler targets? seems to be a general repository

1:44 clj_newb_2345: the point is

1:44 those people don't contribute

1:44 cemerick: callen: I don't recall ever complaining about compilation targets?

1:44 gdev: I am the 95% ;0

1:44 clj_newb_2345: anything to clojrue besides arguments on irc

1:44 callen: cemerick: it was an oblique tease about CLR.

1:44 dissipate: callen, are you in a java shop?

1:45 cemerick: callen: very, I don't grok

1:45 gdev: cemerick, ignore the peanut gallery =)

1:45 callen: cemerick: I wouldn't take it personally, it was intended playfully. I was referencing you mourning the quasi-death of Clojure CLR.

1:45 dissipate: writing code, bug me later.

1:46 cemerick: callen: I barely took it at all :-)

1:46 gdev: indeed, back to bed for me

1:46 clj_newb_2345: I have a simple question.

1:46 dissipate: hehe, sounds like someone is in a java shop.

1:46 clj_newb_2345: Would you say clojure makes you 10x more produce than java ?

1:46 dissipate: clj_newb_2345, many languages will make you 10x more productive than java

1:47 gdev: not only 10 times more but also fresher produce

1:47 dissipate: java is a terribly verbose language

1:47 clj_newb_2345: http://jemacs.sourceforge.net/ <-- why is there a java emacs, but noclojure emacs?

1:47 gdev: clj_newb_2345, deuce

1:47 dissipate: java is all about classes. it's verbose class hell. don't even get me started on generics.

1:47 gdev: https://github.com/hraberg/deuce

1:48 seangrov`: 10x is pretty big though

1:48 callen: clj_newb_2345: pop culture is people talking about other people but never creating anything themselves.

1:48 clj_newb_2345: resist the urge and just go make something.

1:48 xeqi: jlongster: core.async is agnostic about errors. It will properly handle try/catch blocks, but then you have to decide what to do (such as sending the error to a error reporting go block and then recuring in a go/loop)

1:50 gdev: callen, I've been trying to create something all night, IRC is where I end up with more questions than answers

1:50 dissipate: seangrov`, 10x sounds plausible to me

1:50 callen: gdev: I'm having a good night, hammered out like 2 or 3 iterations of my library, trying to finish the home-stretch for Korma support.

1:50 if I finish korma support, I'm fucking #shipping and celebrating with a trip to the pub.

1:50 jlongster: xeqi: yeah, that's what I've noticed. Go seems to encourage having a separate error channel, but still playing around with that

1:51 callen: jlongster: to be fair, that's because Golang is derpy and only has one hammer.

1:51 jlongster: no exceptions, no nuttin' save for err binding from function return and channels.

1:51 I remember reading a statistic that 30-40% of Golang code was part of err handling.

1:52 jlongster: callen: I've heard that. But suddenly there's an outpouring of admiration for it :)

1:52 callen: jlongster: that's because people were dying for a static, compiled language that was reasonably practical for writing a web app in.

1:52 clj_newb_2345: http://pedestal.io/documentation/service-context-reference/ <-- is this using core.async ?

1:52 callen: jlongster: the alternatives up to that point were...what? C++? Haskell?

1:53 jlongster: TypeScript!

1:53 callen: I said static, compiled.

1:53 clj_newb_2345: Coq

1:53 Coq

1:53 gdev: callen did you fix your issue with impotent alter-var-root?

1:53 * callen snorts loudly

1:53 xeqi: clj_newb_2345: pedestal predates core.async, but there is a branch using it. Supposedly is simplified the server side significantly

1:53 callen: gdev: was that intentional? because I'm beet red from laughing now.

1:54 gdev: callen, yes ;0

1:54 xeqi: clj_newb_2345: https://github.com/pedestal/pedestal/tree/with-core-async

1:57 callen: gdev: but yes, xeqi's suggestion to use robert-hooke solved my problem precisely.

1:57 robert-hooke is like micro-AOP. It's awesome.

1:57 I...am kinda sad technomancy didn't mention it when I was bitching about this earlier or yesterday.

1:58 gdev: is it possible to write so many libraries you forget you've written one for a problem someone is having?

1:59 xeqi: gdev: with how quick technomancy will remember random webcomic / references / video links?

1:59 callen: xeqi: yeah I'm not buying it either.

1:59 gdev: the brain is funny like that

1:59 callen: and I'm pretty sure robert.hooke he was proud of.

2:00 gdev: I can remember obscure 80s references, but my wife's birthday or my kids ages? not so much

2:00 callen: gdev: priorities. you have them.

2:00 Nothing wrong with that.

2:01 gdev: still, don't assign malice where there is only forgetfulness

2:01 or something like that

2:01 dissipate: data oriented programming? hmm

2:03 gdev: yes, POJOs were a good idea, take it even further with PODS

2:04 callen, is your stuff on the hub of git?

2:04 callen: gdev: yurs.

2:06 gdev: bitemyapp

2:08 gdev: great, now I have that Doobie Brothers song stuck in my head 0_o

2:09 callen: gdev: bwahahaha. it's actually named after a thing to do with lumberjacks. "logging"

2:11 gdev: blackwater ben?

2:11 callen: gdev: yeah

2:15 okay so the query is clearly working. what the fuck gives.

2:15 gdev: callen,

2:16 i'll try it out on my Granny's Addressbook app tomorrow

2:17 callen: gdev: ...errr....blackwater?

2:17 gdev: what database library are you using?

2:17 gdev: callen, yes, korma

2:17 callen: I haven't gotten Korma working yet, only c.j.j works atm.

2:17 gdev: fix ur sh*t plx

2:17 callen: my uni-func-integration tests should confirm as much.

2:18 gdev: I'm not any happier about it than you are, I'm a fucking Korma user.

2:18 I told you I'd #ship if I got Korma working.

2:18 gdev: i just #shipped my pants

2:18 callen: there's no documentation yet either. which I'll probably write drunk.

2:19 gdev: use marginalia

2:20 callen: there are no doc strings either.

2:20 you...don't seem to be familiar with what sort of establishment this is sir.

2:21 This here is a bawdy house run by a nihilist. We serve single-malt scotch and syphilis, not documentation.

2:23 gdev: nihilist? eff me. i mean, say what you like about the tenets of National Socialism, Dude, at least it's an ethos

2:25 fkey: Hey there, I am getting a "to much recursion" error message for clojurescript. here is a test case (def myMap { :foo (fn []) :bar (fn [] ((myMap :foo))) }) ((myMap :bar))

2:25 callen: yisssssssss

2:25 VICTOLY

2:26 gdev: basic Korma select queries are working now. expanding test-cases now.

2:27 fkey: (myMap :bar) returns "return myMap.call(null,"\uFDD0'foo").call(null);" ..this seems a bit odd

2:27 i am usign clojurescript.net, not sure if this page is using the most recent clojurescript build

2:28 seangrov`: fkey: Does look weird

2:29 Sadly, I'm off to bed, can't look at it now

2:29 fkey: seangrov: tanks, i'm going to pick and it for a few more minutes, about to do the same

2:30 *thanks

2:31 gdev: callen, cool, I forked it in case I'm feeling froggy tomorrow

2:32 I can at least add doc strings?

2:32 callen: gdev: you can do anything you want, but wait for me to do this latest push.

2:33 gdev: I'd be grateful just to get a user, let alone a PR.

2:34 oh man, I am just knocking out the test cases now :)

2:37 gdev: sweet, I'm going to bed before I turn into a pumpkin. I can't keep up with you guys on that pacific time zone

2:37 callen: gdev: cheers. Ping me tomorrow. :)

2:38 gdev: callen will do

2:47 callen: Boom. Time to hit the pub. https://clojars.org/blackwater

2:53 seangrov`: nice callen, enjoy your drinks

2:53 callen: seangrov`: actually just shipped another version with custom colors and better docs. *now* I'm getting drinks.

2:53 * callen parts

2:56 ddellacosta: callen : jealous! Enjoy.

2:56 * ddellacosta downloads blackwater

3:05 notsonerdysunny: is core.async going to just launch a new thread for every new go-block? I tried to find this on the web but couldn't find enough information. Is it also going to switch to running a different go-block when one of them blocks on some socket-io ?

3:12 noncom: notsonerdysunny: idk, but why not look in the sources?

3:21 callen: ddellacosta: hullo from the pub. why jealous?

3:22 so-rude: سمَـَّوُوُحخ ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ

3:22 ddellacosta: callen: 'cause I'd rather be having a drink. ;-)

3:22 noncom: so-rude: there appears to be a problem with encoding, i cant read your text

3:22 ddellacosta: callen: although, I'm close to completing something so that is satisfying.

3:23 callen: ddellacosta: oh you probably indulge more an' i do :) - what are you completing?

3:23 noncom: ddellacosta: callen: you drink alcohol?

3:23 ddellacosta: callen: I suspect I do…heh. noncom: I definitely do.

3:23 callen: so-rude: text worked for me

3:24 ddellacosta: what are you completing?

3:25 noncom: pretty sure it is not unusual to drink.

3:25 ddellacosta: callen: oh, sorry, didn't answer your question. I've been working on a rbac/dac system along with some basic front-end features, and I'm putting some finishing touches (on the first draft, which I'm sure will need some tweaks).

3:25 noncom: yeah, sure, just interesting..

3:27 ddellacosta: callen: …it's a web app, I didn't say that.

3:27 callen: so, building out authorization features, basically.

3:27 callen: ddellacosta: interesting. built on top of friend or custom? did you see bulwark?

3:29 ddellacosta: callen: yeah, I've checked out bulwark, but unfortunately it is orthogonal to our needs now. What we have is basically a wrapper around the authorization functionality of Apache Shiro (http://shiro.apache.org). We have a custom solution in our system for authentication, and we pass authorization off to a Shiro wrapper (with what I've built).

3:30 callen: i know it is orthogonal - just figured i would ask. that sounds interesting. will it be OSS?

3:30 ddellacosta: callen: although, bulwark could come in handy at some point. Our authorization policies are still pretty rough.

3:30 noidi: ddellacosta, is the wrapper open source?

3:30 ddellacosta: noidi: not at this stage, not sure if/when we'll break it out, but I'll definitely post something if so.

3:31 callen: yeah, what I said to noidi re: OSS

3:31 callen: ddellacosta: fair warning - the main problem bulwark is intended to solve is throttling, blacklist and whitelist were just easy wins.

3:31 ddellacosta: I dunno, I'd like to, but it's just one sub-section of Shiro, which truly encompasses a lot of functionality.

3:32 callen: gotcha, I'll keep it in mind. This is an area that clojure needs some more comprehensive solutions. And I think Shiro solves a lot of problems that aren't covered in anything I've seen yet, certainly not Friend

3:32 callen: ddellacosta: so ping me if you start eyeballing bulwark. more intended for securing public apis.

3:33 ddellacosta: callen: most definitely, I will!

3:45 paomian: clojure.lang.Var$Unbound cannot be cast to clojure.lang.Atom

3:46 why i get it when i ues sessiom/put! in lib-noir

3:48 hello?

3:48 clojurebot: BUENOS DING DONG DIDDLY DIOS, fRaUline paomian

3:49 callen: lol

3:49 ordnungswidrig: *g*

3:50 paomian: what?

3:50 clojurebot: what is http://gist.github.com/306174

3:51 paomian: who can tell me how to fix it

3:53 0.0

3:53 noidi: paomian, your missing a (binding [*some-var* some-value] ...) around your code

3:54 *you're

3:55 paomian: noidi: I think it is right,but the lib-noir have a api is put!,when I use it .it will be wrong

3:56 noidi: `Var$Unbound` means that you have a var (probably created with `(def ^:dynamic *some-var*)`) without an associated value

3:57 callen: that session stuff needs to be made async safe.

3:58 noidi: paomian, you need to provide a http://sscce.org/ if you want a better answer.

3:58 paomian: noidi: yes .i read source at github,it https://github.com/noir-clojure/lib-noir/blob/master/src/noir/session.clj#L12

3:59 noidi: but i did not what should i do can fix it

4:00 noidi: I don't know Noir, but it seems that you need to wrap your Ring handler with wrap-noir-session

4:00 because that's what establishes the binding for *noir-session*

4:02 paomian: noidi: the source of 4clojure it used at this line https://github.com/4clojure/4clojure/blob/develop/src/foreclojure/core.clj#L58

4:03 noidi: thank you! i will try it:-S

4:08 fredyr: btw what is that gist that clojurebot posted?

4:18 callen: noidi: it's not Noir, Noir is deprecated. It's lib-noir.

4:18 noidi: the nomenclature is important, we abandoned the framework intentionally.

4:18 I even went to the trouble of stalking ibdknox until he finally put the deprecation notice on Noir's website.

4:20 that having been said, while lib-noir is definitely better designed and works as a proper library, it's not async/http-kit safe yet.

4:20 the sessions stuff relies on thread-local global mutable state and it's quite gnarly.

4:20 I figured out a solution in neubite but it requires obeying a contract.

4:22 noidi: callen, OK. Well, I don't know lib-noir either :)

4:23 callen: Sure, I'm just trying to make certain people understand Noir is dead, long live lib-noir.

4:23 because too many trip over the old website.

4:23 paomian: callen:but how to fix it ?

4:23 * ucb waves at callen

4:24 callen: paomian: dude already told you.

4:24 ucb: hai hai. I just shipped a new library!

4:24 ucb: ohai! awesome! which one?

4:24 callen: https://github.com/bitemyapp/blackwater/ I'm about to add a pretty-pretty screenshot.

4:25 paomian: callen: what is dude?

4:25 ucb: callen: you'll be delighted to hear that after the hiatus and much deliberation, I've decided to go the postgis route for clojunauts

4:25 callen: ucb: very cool. I've done GIS stuff with MongoDB and ElasticSearch in the past.

4:25 ucb: callen: this is right up my alley. I've been meaning to ask you about a recommendation for SQL libs, but I see your thing already mentions korma

4:26 callen: I want minimal hassle really

4:26 callen: paomian: dude is a colloquialism. Uhm, it's just a casual way of referring to somebody.

4:26 ucb: I'm pretty happy with Korma. c.j.j is in a really weird state.

4:26 c.j.j has this quasi higher level DSL, but it's incomplete, can't even do 'limit', but is still "lower level" than Korma, and is worse designed than Korma

4:26 ucb: callen: how about clojureql? oh, and while we're on the subject, do you do migrations at all? I've looked at ragtime and others (including lobos) but I'm not sure.

4:26 callen: but has a lower level substrate layer than allows arbitrary queries.

4:27 I prefer Korma + the occasional raw query.

4:27 ucb: I recommend migratus for migrations, generally.

4:27 * ucb checks whether he checked it already

4:28 * ucb speaks in third person

4:28 paomian: callen: I can not understand clearly

4:29 ucb: callen: yeah, looked at it. What initially drove me away (same for ragtime) was SQL files, but I've come to terms with that and I think I'll have to go down that route anyway.

4:29 paomian: 'dude' as well as 'man' is just a generic word to refer to a person. It can sometimes even be used instead of 'hey', e.g. 'dude, pass the salt' vs. 'hey, pass the salt'

4:31 callen: cooool. we has screenshots now.

4:31 ucb: https://github.com/bitemyapp/blackwater/

4:31 nifty eh? :)

4:31 this was also a good exploration of AOP-esque style in Clojure. I came away from the experience reasonably satisfied.

4:32 ucb: nice!

4:32 callen: but yeah, I was already a primarily Korma user, but after being elbow-deep in Korma and c.j.j both for the last couple days, my opinions are closer to dearly held beliefs now :P

4:32 ucb: oh, remember my pickle thing?

4:32 callen: ucb: yeah, what of it?

4:33 ucb: well, there's pyrolite which has a near complete implementation of the protocol

4:33 clgv: any datomic experienced developers around? Is it possible to store double arrays efficiently in datomic? i.e. does :db.type/doubles exist?

4:33 ucb: (pyrolite is a java thing, but w/e)

4:33 so I'll probably rewrite my one to be a wrapper around it

4:34 so here's the question: I've spoken to the guy who develops pyrolite about getting his jars into sonatype or somewhere and he was all "nah, too much effort". Would it be rude for me to build a jar and put it in clojars?

4:34 callen: clgv: efficiently?

4:34 ucb: no, just do it.

4:34 ucb: happens *all* the time in the Clojure community.

4:34 ucb: yeah, thought so.

4:34 callen: a version bump sometimes comes with the fork + deploy.

4:35 with a note that you forked to get it live.

4:35 clgv: callen: I mean building a table/entities from array id and array position to value would not be efficient

4:35 ucb: good idea

4:35 callen: "nah too much effort" - lol flake.

4:35 lein deploy is hard :((((( ;_;

4:35 clgv: ucb: you can use a private group for it

4:35 callen: clgv: vectorize it?

4:35 ucb: callen: https://github.com/irmen/Pyrolite/issues/3

4:35 Ember-: btw, we found this yesterday with Christophe Grand https://www.refheap.com/18137

4:35 ucb: lein deply is hard?

4:35 deploy

4:36 callen: ucb: I...don't need more enemies on github.

4:36 ucb: I've had some issues in the past, but they're mostly gone

4:36 heh

4:36 callen: but you're followed now. so. there's that.

4:36 I'M WATCHING YOU

4:36 ucb: lein search otoh is botched for me :/

4:36 wat. /D:\

4:36 callen: ucb: (it's 0113 here and I just got back from the pub)

4:36 ucb: I trust you had a healthy dose of real ales

4:36 Ember-: cgrand made a fix for that already, hope it'll end up in the next version of Clojure

4:37 callen: ucb: guinness and glenfiddich.

4:37 ucb: -1 on former, +1 on latter

4:37 * callen shrug

4:37 clgv: callen: I am just starting out with datomic. just completed the tutorial yesterday. if I vectorize the array it would be a "many" relation which has probably a lot of overhead, right?

4:37 ucb: -1 only because stouts are not my thing

4:37 callen: ucb: it's an irish republican pub. you win some, you lose some.

4:37 ucb: heh

4:37 callen: ucb: guinness is an uncommon good stout though.

4:37 ucb: callen: it's drinkable

4:37 callen: clgv: don't make it a relation?

4:38 ucb: oh, bbc news shows the scan of a brain with a penis delineated on it

4:38 have they found the penis area already?

4:38 fuz: i'm going to the home of guiness sunday

4:38 callen: ucb: this pub is known for having fresh and creamy guinness for some reason. the rumors weren't lying.

4:38 ucb: I'm otherwise ambivalent to guinness in a retail context.

4:38 fuz: proper.

4:38 ucb: callen: did you get the shamrock done on the neck?

4:38 callen: naw.

4:38 ucb: good.

4:39 callen: clgv: store them opaquely as native value types, scalars pointing to the coll vector of doubles.

4:39 clgv: there isn't a particular well documented shake-n-bake recipe for this, but it's doable.

4:40 clgv: callen: oh right clojure values should work

4:40 callen: clgv: also I'm semi-tipsy, so you're not going to get much that is helpful further out of me. #datomic is likely asleep since the bastids are all in my timezone.

4:40 so...you're stuck with me.

4:40 clgv: callen: maybe arrays do as well. I thought I had to specify the type for it

4:41 callen: clgv: I'm a strong proponent of experimentation.

4:41 know what should happen, have expectations, but just try stuff too.

4:41 or not. you know. whatever.

4:41 clgv: callen: well I like to read first and then experiment to avoid unneccessary spent time ;)

4:43 * ucb sighs

4:43 callen: clgv: by all means. sadly with datomic the option of reading the source isn't available, so experimentation becomes a more valid-than-usual tactic.

4:43 clgv: callen: yeah. it would be easy to spot if the documentation was just out of sync if I could look up the type keywords in source

4:43 ucb: so how do you like this? customer says "lol cluster is too slow. We compared the performance of your commodity cluster with our 7M USD Oracle cluster and it came up worse. Plsfix kthxbai"

4:44 callen: ucb: "plz 2 send cluster benchmark test harness code"

4:44 * ucb goes badger culling

4:44 callen: ucb: "plz 2 fuck yourself, kthxbai"

4:44 ucb: it's not even that

4:44 it's the fact that they're comparing 2 different beasts

4:45 callen: ucb: is the benchmark even remotely likely to be credible even ignoring the "two different beasts" part?

4:45 ucb: these guys are so incompetent it's not even funny any more

4:45 callen: meh. It's generic tsung load. So it could well be.

4:46 it's the whole "I ran a test on my newest laptop and it outperformed your run on your PC XT. WHAT!" thing that rubs me the wrong way

4:46 and it's not even testing the same software, it's testing different software as well (couchdb vs. oracle)

4:46 callen: ucb: what manner of cluster is this? full-stack hive-mind shit, application layer, persistence layer, or something else?

4:46 ucb: just DB layer

4:46 no app, no nothing

4:47 it's about the sustained load in terms of concurrent connections, throughput of operations, etc.

4:47 callen: oh right, just remembered your employer.

4:47 herp de derp

4:47 ucb: but again, it's testing 2 different pieces of software on 2 different (very) hardware specs

4:47 callen: well you can't directly compare "transactions per second" between Oracle and your product anyway, yes

4:48 even given roughly comparable hardware and workloads.

4:48 ucb: thanks for confirming my sanity

4:48 callen: if their true, representative workload is simple enough to be 100% transferable between such disparate systems, then they aren't solving real problems I'm sorry to say.

4:48 in which case, anything will do.

4:49 ucb: heh

4:49 callen: including flushing loglines to an NFS share in cambodia.

4:49 gg, go home happy guys.

4:49 ucb: the relationship's been tainted already for so long that anything they say, even if it's reasonable, will come across as a big wth

4:49 enjoy

4:50 callen: I'm on a 19 day github streak and I moved between two different cities in that intervening time.

4:51 #FeelsGoodMan

4:51 clgv: btw. is there any higher level layer (library) for datomic, yet?

4:51 callen: clgv: tons.

4:51 clgv: writing your own higher-level datomic client is a rite of passage at this point.

4:52 clgv: callen: so nothing established so far?

4:52 callen: clgv: there hasn't been a winner that ate all the other puppies in the nursery yet, no.

4:53 clgv: buuuut datomico is close.

4:53 paomian: noidi: yes it work!!!Thank you

4:53 clgv: callen: thx for that hint

4:53 callen: clgv: I'm in an ornery mood, you're lucky you got anything remotely useful out of me.

4:54 clgv: callen: sending you a glass of glenn fiddich over the wire wont work I guess ;)

4:55 callen: clgv: I have a 10 am meeting tomorrow (today) :(

4:56 clgv: callen: what time is it now in your zone?

4:56 callen: 0133

4:56 clgv: so 7hours of sleep in case you start soon ^^

4:57 ucb: 10am meeting? slacker. That's already late.

4:58 callen: ucb: I work for a startup that doesn't really care about the minutiae of my day-to-day hours.

4:58 ucb: me too :)

4:58 callen: that a coworker very inconsiderately requested to speak with me at 10 am is...not a regular thing, but a not entirely happy event when it happens.

4:58 ucb: I just get up REALLY early because of the tiny human inhabiting my household

4:58 callen: ucb: baby?!

4:58 ucb: yup

4:59 callen: ucb: I have a coworker that constantly talks about her toddler, thus reminding me how very much I don't want kids right now.

4:59 ucb: "right now" is key

4:59 i.e. I am of the position that EVERYONE wants kids (sooner or later).

5:00 * ucb generalises based on own experience

5:00 ucb: extrapolation ftw

5:02 fredyr: oh those were the days

5:02 :)

5:03 now im reminded of being an oldie

5:04 :o

5:04 ucb: join the club

5:04 noncom: ucb: +1 for kids, i got one recently

5:04 ucb: noncom: congrats!

5:04 fredyr: +1 on the congrats

5:05 noncom: thanks, you too, guys! :)

5:11 ucb: :)

5:14 clgv: huh clojars search result page displays wrong versions as the recent version

5:15 e.g. for datomico it shows 0.1.0 but when you click the details it shows the correct 0.2.0

5:21 noncom: clgv: can it be because the creators did not push the last version to clojars?

5:22 clgv: noncom: no it is a bug as described above. clojars reports two different versions as most recent on the search result page and the project detail page

5:23 noncom: oh

5:23 clgv: issue filed ^^

5:42 ucb: clgv: did you search on clojar's website or via lein?

5:43 clgv: ucb: I am talking about the clojars.org website only

5:43 ucb: clgv: ok

5:43 clgv: usb: try the above search for "datomico"

5:50 ro_st: is it possible to add metadata to defmethods?

5:51 Anderkent]away: ro_st: not that easily, and it wouldn't be easy to access.

5:51 ucb: clgv: 0.1.0 comes up

5:51 ro_st: ok. thanks

5:59 how do i deal with a multi-method not having a valid dispatch function? is there a way to ignore these?

5:59 i guess :default with a no-op defmethod

6:02 that seems to do the trick

6:26 learner_: Hello All, a newbie question here. I am going through set of IRC logs looking for a word, I have written the script. But I don't think it's idiomatic. Could you please take a look and suggest me how I can improve it. The actual code is here @ https://www.refheap.com/2b7cca31b3912c85c7e650641 Thanks for your time

6:30 Anderkent: learner_: two space indent is the usual - your code will look much better with it already. Tabs are evil :)

6:30 hyPiRion: -> or ->> may help with readability here

6:31 Anderkent: yes, but in general I'd recommend pulling out some functionality into fns

6:31 sveri: hi there, i am currently trying clojure just out of curiosity, i grabbed lumines with the korma plugin and added a table with a text column, now when i retrieve the entries from that table and display them with entry.content is the output: clob1: 'some content', how can i access the text in that content

6:33 learner_: Anderkent: True, I will consider this. thanks

6:34 hyPiRion: Yes, with lot of maps and stuff, it's looking bit confusing. May be I should use ->> . But the overall approach of using (remove nil? & applying map is alright? or is it naivy?

6:34 Anderkent: learner_: you want `doall`

6:34 hyPiRion: learner_: well, remove nil? will remove every element there, because println returns nil

6:36 learner_: Anderkent: hmm, doall in place of?

6:36 Anderkent: the `remove nil?`

6:36 you just want the entire collection to be evaluated, right?

6:38 hyPiRion: I would've probably done something like this: https://www.refheap.com/4bafc148ff94f6b896a1bf51c

6:38 Anderkent: learner_: https://www.refheap.com/18141 is how I'd do it.

6:38 get-log-urls can still be improved

6:38 hyPiRion: not sure if it works, but that's the idea at least

6:39 the rest is there to avoid printing the first url

6:39 Anderkent: oh yeah, as-> is nice, I'm still not up to date with new clojure

6:40 ah, because it's ../

6:40 right

6:49 learner_: Anderkent: hyPiRion: Yes, (rest is there to avoid first link ("../").. Thanks for taking time and modifying the code to show the better approach. Really appreciate it.

6:54 clgv: does anyone know how a datomic schema atrribute definition for a vector of doubles has to look like?

7:42 sveri: hi there, i am currently trying clojure just out of curiosity, i grabbed lumines with the korma plugin and added a table with a text column, now when i retrieve the entries from that table and display them with entry.content is the output: clob1: 'some content', how can i access the text in that content

7:52 ordnungswidrig: sveri: https://groups.google.com/d/msg/sqlkorma/SoMAteoUpug/4I7HrqmsmSAJ

7:52 sveri: does this help?

7:53 jowag: ambrosebs: I suppose core.typed works only when .clj sources are present on a classpath, not with just AOTed classes?

7:53 ambrosebs: jowag: yes it works with ASTs of clojure code.

7:54 jowag: ambrosebs: and does it look and analyze dependencies automatically, e.g. parse ns declaration?

7:55 ambrosebs: yes it tries its best. It seems to work, but see clojure.core.typed/typed-deps for manual deps.

7:55 0.2.0 is quite chatty about which namespaces it is checking so it will be clear if something isn't checked.

7:56 It uses tools.namespace to infer deps.

7:56 jowag: thanks, and one last thing, how much is evaled during the analysis? I see that you are doing macro expansion to at least macros are evaled when checking for types, am I right? Any other things are evaled, top level forms maybe?

7:57 ambrosebs: unfortunately *every form* is evaluated at the moment.

7:57 bit of a wart!

7:57 jowag: ah

7:58 ambrosebs: jowag: every top form is fully macroexpanded, evaluated, then checked.

7:59 jowag: but you check the macro expanded form, not the evaled result

7:59 ambrosebs: jowag: yes.

8:00 it's evaluated for side effects, like require/use.

8:00 kmicu: Is any core.typed-mode for emacs yet? ;]

8:00 ambrosebs: kmicu: How do I plug it in?

8:00 I'm a vimmer

8:01 although I haven't written a plugin for vim either.

8:01 kmicu: "C-u C-c C-t inserts a type annotation, for symbol at point, on the line above"

8:01 I only asking. It will be neat thing.

8:01 Anderkent: > 3 keystrikes with a modifier

8:01 >neat

8:01 :D

8:01 sorry, my vim is showing :P

8:01 kmicu: I can bind it to ,t

8:02 ambrosebs: ah. I'm more interested in highlighting type errors.

8:02 that would be cool.

8:02 kmicu: And highlighting type errors with flycheck.

8:02 Yes.

8:02 ambrosebs: I have the line numbers! I'll have a look.

8:03 kmicu: Any support for core.typed in tools will be awesome.

8:04 Anderkent: It was an example from haskell-mode, you can set a keybinding whatever you want.

8:05 jowag: ambrosebs: if you must eval everything, it is not a static type checking anymore, is it? :) creeping side effect may hinder the usage of type checking on the fly e.g. in IDEs

8:06 noncom: can i somehow receive the result of (concat) in the form of a [], without (into []) ?

8:07 jowag: noncom: concat returns lazy seq, so no, either use into, or reduce

8:07 ambrosebs: jowag: yes it's a valid concern. But it's a product of Clojure's compiler/nature. In CLJS we don't have this problem.

8:08 jowag: There's probably a solution, I just used a hammer to fix this particular problem ;)

8:11 Anderkent: I'd say having top level forms that cannot be safely evaluated is a bad codesmell anyway

8:11 esp. since that means your code can't be AOT compiled

8:12 ambrosebs: Anderkent: yes. we could probably get away with just evaluating the first form in every ns.

8:14 jowag: Anderkent: it has it's valid uses though, e.g. creating defs programatically

8:15 ambrosebs: you need also to eval each defmacro so you can use it to macroexpand later forms

8:15 Anderkent: ambrosebs: not really. You can't even read a file in without evaluating each form if you want to be sure you're looking at the same thing the compiler looks at

8:16 ambrosebs: to be clear, I run the full file through the Compiler's analyzer, *then* I call the .eval method on each AST object.

8:17 Anderkent: hm. from my understanding of the compiler, that shouldn't work. Unless the analyzer evals already?

8:18 ambrosebs: See jvm.tools.analyzer for exactly what happens.

8:19 hhenkel: Hi all, I'm currently trying to "understand" clojure. As I did python and java stuff my mind is polluted with object oriented programming.

8:19 ambrosebs: hhenkel: I think you're in good company :)

8:20 Anderkent: no time right now to look at it really, but the one thing I'm sure doesn't work is something like: (doseq [form (read-all file)] (eval form)), where read-all is not lazy.

8:20 hhenkel: I currently try to understand how someone would do something like a shared queue - shared as in in shared between threads.

8:20 Anderkent: I'm not sure about what the java interface is, but you certainly can't call (read file-stream true nil) before evaling previous form

8:20 ambrosebs: it's more like (doseq [ast (analyze-file file)] (.eval ast))

8:20 Anderkent: yeah, that doesn't tell me anything :(

8:20 hhenkel: ambrosebs: ;)

8:20 cored: hello

8:21 Anderkent: hhenkel: if you need synchronous access, you want a `ref` to a vector, and all threads accessing it in `dosync` blocks

8:21 (or if it's just a queue you want, you might use java.util.concurrent queues :P)

8:21 clgv: Anderkent: vectors are stacks not queues ;)

8:21 jowag: ambrosebs: Anderkent: but there is a difference between analyzing a file and analyzing one form. In order to analyze next form, you have to eval the previous. what if previous form switches a current namespace for example...

8:22 Anderkent: yes, soryr. list.

8:22 jowag: see https://github.com/clojure/jvm.tools.analyzer/blob/master/src/main/clojure/clojure/tools/analyzer.clj#L840

8:22 clgv: Anderkent: clojure.lang.PersistentQueue ^^ list can also only be modified at one end (the head)

8:23 hhenkel: Anderkent: hmm, okay. It would be a priority queue in my case and there is a java class for that. I looked a bit around and found: http://stackoverflow.com/questions/671706/how-do-i-make-a-java-class-immutable-in-clojure

8:23 ambrosebs: ok, I got it wrong. I analyze, then eval each form sequentially.

8:23 https://github.com/clojure/jvm.tools.analyzer/blob/master/src/main/clojure/clojure/tools/analyzer.clj#L929

8:23 clgv: hhenkel: but for communication between threads the Queue implementations in java.util.concurrent might be useful as well

8:23 ambrosebs: precisely for side effects like ns changing.

8:24 hhenkel: What I currently not getting is the use of "pqueue-add", as the queue I created gets not altered.

8:25 clgv: hhenkel: how do you want to use the queue? producer-consumer-scenario?

8:25 hhenkel: clgv: okay. So the recommondation would be to stick to the java stuff?

8:25 Anderkent: hhenkel: the java stuff is ok if all you need is a queue

8:25 but if you need something more complex (say a shared datastructure that includes a queue)

8:25 hhenkel: clgv: Yes, I was thinking about writing a little client that consumes data from jolokia and sends it to riemann.

8:25 Anderkent: then you want refs

8:25 clgv: hhenkel: if you want the producer-consumer-scenario with priorities you can use java.util.concurrent.PriorityBlockingQueue

8:26 jowag: you can use core.async too :)

8:26 Anderkent: core.async is nice but maybe not as in the first clojure project? :D

8:26 unless one just takes it for what it says and doesnt try to parse its internals, I guess.

8:27 jowag: only for former golang programmers :)

8:27 hhenkel: clgv: okay and for threads I would use agents or plain java threads?

8:27 Anderkent: hhenkel: that depends if they're worker threads or task-management threads

8:28 you shouldnt put 'work' (anyhting that blocks, for example) into an agent

8:28 agents are more like dispatchers. Any real work should either happen in a plain java thread or in the non-agent threadpool (using `send-off`)

8:28 clgv: hhenkel: not agents -> futures

8:29 jowag: hhenkel: you also have a "future" function, it really depends on what do you want to achieve with another thread

8:29 Anderkent: my usual agent usage is: you submit a task, agent looks at it and decides if it should be done, if so it uses send-off to execute it, and the task submits a 'done' task back onto the agent

8:29 clgv: hhenkel: e.g. (let [q (create-the-queue)] (future (producer)) (future (consumer)))

8:29 hhenkel: Anderkent: okay, so a http request/ messages are a don't for agents.

8:30 Anderkent: in general, between futures, promises, agents and send-off you rarely have to think of the jvm threads.

8:30 hhenkel: the network reading is not ok in the agent, but deciding what kind of response should go there is fine

8:30 clgv: hhenkel: depends - use agents when you want to handle those requests sequentially in a different thread

8:31 hhenkel: you got a clojure book where you can read about the concurrency principles built into clojure?

8:32 hhenkel: clgv: I got Programming Clojure - second Edition

8:33 Okay, I think I have to get back to reading...a lot of information to process.

8:34 Anderkent: clgv: jowag: Thanks for all the input!

8:39 Anderkent: jowag: ambrosebs: a jvm.tools.analyzer question - does it make it easier to do full recursive macroexpansion / transformation than just working on sexps? It looks like it might, with the additional information like where a symbol is bound, but it's not clear to me.

8:39 ambrosebs: Anderkent: yes a sexp has no contextual information. AST's are rich with it.

8:39 Anderkent: or does clojure.tools.analyzer/macroexpand already do recursive macroexpansion?

8:40 ambrosebs: Anderkent: it delegates it to clojure.lang.Compiler/analyze, and then pretty prints the AST to simulate macroexpansion :)

8:41 Anderkent: right, but that results in the top form being macroexpanded, or a full recursive macroexpansion?

8:41 eh, guess i'll just `lein try` it and see for myself

8:41 ambrosebs: It's quite rigid, I can *only* get back a fully expanded AST for clojure.lang.Compiler/analyze.

8:41 *from

8:43 Anderkent: oh nice

8:43 it does it already

8:43 I guess I need to start using it for cloverage

8:44 Gah. Or I can't. damn.

8:44 ambrosebs: ?

8:45 Anderkent: well, this might be going into too much detail

8:45 ambrosebs: :)

8:45 Anderkent: but basically what I do is: take a sexp, look at the first element, if it's a known form that I know how to instrument, do it manually and recurse on some children, otherwise macroexpand.

8:45 ambrosebs: jvm.tools.analyzer is too blunt an instrument to do that.

8:46 Anderkent: I don't always want to macroexpand because some macroes expand into really stupid forms :P

8:46 ambrosebs: I'm eagerly awaiting CinC to be completed.

8:46 Anderkent: yeah, my problem is

8:46 when i get something like

8:46 (letfn [(loop [x] x)] (loop 1))

8:46 Bronsa: ambrosebs: working on it :P

8:46 ambrosebs: Bronsa: <3 <3

8:46 Anderkent: cloverage happily instruments the letfn, then recurses on the loop

8:47 but it loses track of lexical scope, so it thinks it's clojure.core/loop

8:47 which it knows of and special cases, but this is not a legal loop form, so it fails.

8:47 I guess I have to track the lexical scope myself, but that's a pain

8:48 ambrosebs: Anderkent: yes, a pain.

8:48 Anderkent: and error prone.

8:49 Anderkent: yeah.

8:49 ambrosebs: at least I would screw it up :)

8:49 there's quite a few forms where bindings are introduced.

8:49 Anderkent: ambrosebs: most of them expand to let* though.

8:49 on the other hand

8:50 ,(do (defn loop [x] x) (loop 1))

8:50 ;(((

8:50 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

8:50 Anderkent: yea shut up clojurebot

8:50 ambrosebs: I think deftype*, try/catch, letfn* are the exceptions.

8:50 probably more.

8:51 Anderkent: yeah. it's not a small job

8:52 so for now I just decided that anyone who redefines loop is a fool and doesnt deserve test coverage!

8:53 jowag: ambrosebs: is CinC still being worked on? I though the focus is now shifted on CLJS compiler/analyzer, and use that as CinC eventually

8:53 ambrosebs: Anderkent: oh fn*, and NewInstanceMethod :)

8:54 so 6 ways of introducing locals :O

8:54 Anderkent: newinstancemethod?

8:54 ambrosebs: IIRC it's what methods in a deftype compile to.

8:54 jowag: Bronsa is hard at work on it.

8:55 jowag: CLJS was a successful experiment showing how to write a compiler in CLJ and has spawned several similar compilers.

8:56 Anderkent: ah, yes, the methods under deftypes have their own silly syntax too. I guess they're not fns for efficiency?

8:57 man, this is hard... Still easier than writing a clojure-aware byte code instrumenter, I guess, but it's sad it's this hard

8:57 it's a lisp, it's supposed to be easy! :P

8:58 ambrosebs: I assume it compiles directly to methods on the class compiled by deftype.

9:05 jowag: https://github.com/Bronsa/CinC

9:05 Anderkent: ^ apparently the analyzer is written. You could probably customise it.

9:06 https://github.com/Bronsa/CinC/blob/compiler-WIP/src/cinc/analyzer.clj

9:06 Anderkent: the WIP is scary :P

9:07 ambrosebs: I think the emission is WIP, the analyzer is done.

9:07 (apparently)

9:07 you only want the analyzer.

9:07 Anderkent: hm, well, I need to be able to go from analyzed code (ast, I guess?) to s-exp so that I can ask clojure to compile it

9:08 Bronsa: ambrosebs: Anderkent the analyzer is done, you probably want to use https://github.com/Bronsa/CinC/blob/compiler-WIP/src/cinc/analyzer/jvm.clj by the way

9:08 Anderkent: just need to write a emit-form pass and you're ok to go :P

9:09 ambrosebs: Anderkent: see clojure.tools.analyzer.emit-form for an idea of what's involved.

9:09 Bronsa: Anderkent: the jvm analyzer has a pass that does alpha-conversion so you should have no problem regarding locals shadowing

9:09 Anderkent: skimming through the two files doesn't really give me a very good idea of what's actually going on, I'm afraid

9:10 i'd have to read through to see what all the passes do to see where I'd want to hook in, I guess.

9:12 but working on asts actually solves another problem I have

9:12 Bronsa: Anderkent: there are the tests and some documentation, even though it's somewhat outdated

9:12 Anderkent: which is that strings/numbers/etc. don't have metadata

9:12 Bronsa: I'm sorry, I'll write extensive documentation once everything is stable

9:13 Anderkent: haha don't worry

9:13 I won't get to trying it any time soon anyway

9:13 ambrosebs: Anderkent: you probably want to hook in at macroexpand-1 or -analyze :seq.

9:15 Bronsa: you're doing awesome work! feels like a sneak preview of CLojure 2.0

9:17 Anderkent: ambrosebs: it's probably not that simple - f.e. when I see a defn, I want to do some modification to its body (probably before analysis), then let the analysis continue without doing anything until I actually enter the body. It's not obvious how to achieve that - perhaps putting some metadata on each body expr that says 'ok start instrumenting again'

9:18 so I need to hook in every time something is about to be macroexpanded, and every time something is being -analyzed

9:18 Bronsa: ambrosebs: thanks! unfortunately right now it's really slow :(

9:18 Anderkent: and keep track of the relation between macroexpanded and original forms

9:18 ambrosebs: Bronsa: sounds like my work.

9:18 Bronsa: ambrosebs: heh, I'll first get it to work, then focus on performance enhancements

9:19 ambrosebs: amen.

9:19 Anderkent: pff, who cares if it's correct when it's fast? :P

9:20 ambrosebs: Anderkent: interesting.

9:31 clgv: Anderkent: you can intercept `defn` easily via robert.hooke or plain `alter-var-root` then modify the body since the analysis is said to expand the macros that should work

9:34 Anderkent: clgv: as in change defn itself instead of recognizing when it's called? You know, that might work and generalize to everything except non-namespaced specials...

9:34 didn't think of that!

9:34 (of course I'd want a thread local binding not alter-var-root)

9:35 Hm. no, I still want to recurse into arguments to functions (not macroes), so I have to look at the sexp and not just let it evaluate.

9:41 silasdavis: If i have a zipper zp and I apply down enough times I get a NullPointerException:

9:41 (-> zp down down down node)

9:41 using this example: http://clojuredocs.org/clojure_core/clojure.zip/zipper

9:41 but according to the docs I think I should get nil

9:42 Anderkent: silasdavis: (node nil) gives NPE

9:42 the examples do not call node on the result

9:42 silasdavis: that'll be why then

9:43 thanks

9:43 Anderkent: np

10:23 futile: Right now I spawn up a short-lived thread for each message I want to send, and throw it over a concurrent-queue to a central thread that communicates over a unix socket. Would it be more efficient to use core.async instead?

10:23 mdrogalis: How many threads are you making?

10:24 futile: Let's say that in one small burst it's about 10 to 20, and the bursts happen only every few minutes, but they usually come in 3-5 bursts at a time.

10:24 So, maybe about 30-60 all at once every few minutes.

10:24 mdrogalis: futile: You could try with go-blocks. JVM gives you about 1,000 threads. So profile & found out :)

10:37 Anderkent: futile: are oyu making an actual thread or using a threadpool?

10:39 tbaldridge: futile: I just created 1mil go blocks in about 2sec it's quite possible to do what want in core.async

10:46 clgv: tbaldridge: according from what I read and tested it seems not to be possible to store double arrays compactly in datomic. did I miss something?

10:47 jowag: anyb knows what's the purpose of :once metadata in fn* ?

10:48 tbaldridge: clgv: you can store it in a column of :db.type/bytes, in that case, the storage structure for a datom would basically be [int int byte-array]. So that'd be quite compact.

10:49 clgv: tbaldridge: yes I considered that. It is unfortunate that they do not support double arrays...

10:49 Anderkent: jowag: look at Compiler$ObjExpr.compile, the oneTimeUse arg comes from the :once meta

10:50 (and it seems it's not used haha)

10:50 jowag: I've looked, this arg is not used at all in compile() method

10:50 noncom: jowag: does it relate to (defonce) somehow?

10:50 Anderkent: yeah, I guess it's just legacy crap

10:51 jowag: it is used

10:51 in emitlocal

10:51 look for onceOnly field

10:52 in Compiler.clj, but my knowledge of compiler stops there :)

10:52 Compiler.java of course :)

10:53 noncom: i think it simply makes the function defined only once

10:53 in case if you have some closures inside it i guess

10:53 Anderkent: jowag: compiler.clj haha wishful thinking

10:53 noncom: that you no want to redefine

10:53 jowag: noncom: or maybe a function that gets GCed after called just once?

10:54 noncom: jowag: although that might be, but i think that such a behavior is not very good... esp with the clojures accent on immutability

10:54 jowag: Anderkent: got carried away by CinC

10:55 Anderkent: jowag: I believe it's for clojure clearing

10:55 noncom: jowag: such use-once-then-destroy fns would probably be better created in a datastruct that is destroyed later

10:55 Anderkent: *closure

10:55 jowag: noncom: seems to have valid use in future, delay and lazy-seq

10:56 Anderkent: if you know a function will only be called once

10:56 then you can kill its closure after it runs

10:56 otherwise you must wait for the fn to be gced

10:57 tbaldridge: bbloom: ping

10:57 bbloom: tbaldridge: pong

10:58 jowag: Anderkent: seems reasonable explanation, thanks

10:59 tbaldridge: bbloom: so I was reading that eff papaer again last night, and I'm still confused by something. What is the point of resources? They don't get a continuation, they simply do IO. If all the runtime does is act like they are normal function calls, why not use the IO function instead?

10:59 bbloom: I mean I see the point of "everything is functional" but what does that buy you?

10:59 bbloom: tbaldridge: the point of resources is that they are attached to effects, so that they have dynamic extent

10:59 tbaldridge: you don't ever raise a resource

11:00 tbaldridge: let's say you have an Output effect that has one function: "println"

11:00 tbaldridge: you'd need a Consult too, which implements the println operation

11:01 er i mean Console

11:01 not consult

11:01 tbaldridge: bbloom: right

11:01 bbloom: tbaldridge: anyway, you could create a Output effect built on StringBuilder which doesn't have a resource that just soaks up printing, like with-out-str

11:01 tbaldridge: same idea

11:04 tbaldridge: Eff is a stylized (and typed) use of the effects/resources thing

11:05 tbaldridge: bbloom: okay, I'll read the papers again and see if that helps

11:06 bbloom: tbaldridge: under the hood, effects with resources DO get a continuation, they just always return precisely once, since otherwise you could give a continuation to a resource, which would be problematic

11:07 tbaldridge: Eff is using it's type system to prevent you from calling the continuation multiple times, etc. it realizes when you hvae a resourceful effect & then changes the signature of operations to not get the continuation, wrapping your operation in the obvious/trivial destructuring of the return pair (result, new-resource-state) and calling the continuation with result

11:08 tbaldridge: bbloom: ah, that makes more sense, so it doesn't allow you to store the continuation off somewhere. That explains why resources != effects

11:08 bbloom: tbaldridge: yeah! took me a bit to wrap my head around it too until i started implementing it

11:10 jowag: Anderkent: I've found it "The new lazy branch contains a compiler enhancement for this and similar scenarios. lazy-seq and delay both perform closed-over local clearing on the tail call of their body, ensuring no references remain in the closure itself when the tail-call executes."

11:10 http://clojure.org/lazy

11:11 bbloom: tbaldridge: the other confusing bit is that there are really two categories of resources: magic top-level ones, and arbitrary values

11:12 tbaldridge: the former make sense: they're the outside world you can communicate with. the later was a little less clear to me

11:12 tbaldridge: they use the later in the second part of the state example. the resource they provide is just the state value. it can have any type

11:13 tbaldridge: bbloom: so like the clojure atom

11:13 bbloom: tbaldridge: yeah, but it's more like a Var b/c it's gonna have thread local scope

11:13 Anderkent: jowag: so kind of what I guessed, I think?

11:13 bbloom: tbaldridge: but it's a var that you can give a custom interface to

11:14 jowag: Anderkent: yeah but seems specific to TCO

11:14 noncom: how do i iterate over two or more collections simultaneously? i would use a (map) but i really need only side-effects, so maybe there is a way which is preferred for side-effects?

11:14 Anderkent: well, that's probably more of a 'when do we set :once' rather than 'whta does :once do'

11:15 noncom: like doseq, but able to iterate over multiple collections llike map

11:15 bbloom: tbaldridge: yeah, that's a good way to think about it: as a dynamic "object" which is built out of several ^:dynamic vars: one state atom + several functions that swap! that atom :-)

11:16 Anderkent: noncom: any particular order? (doall (interleave coll1 coll2)) is my instinct

11:16 (make that dorun if you don't care about results)

11:17 noncom: the order matters yes. i think (dorun) then is what i want

11:17 arkh: what's a way to iterate over 2 or more sequences like 'for', but do so in a simultaneous fashion (not rightmost fastest)? So the first iteration would consume the first item on all sequences, etc.

11:17 bbloom: tbaldridge: another cool thing about this is that your default top-level handler might support like a "dbg" function for printing during development, but wouldn't support normal printing or other IO effects or the like. so if you created a lazy thunk or lazy-seq like they do in the paper, and you accidentally had IO in there, then the IO occurs outside of the lazy dynamic extent, you'll get a runtime error about the operation not being

11:17 available when you try to force the lazy thunk

11:17 noncom: arkh: haha, same quaestion.. but do you need side-efefcts or the results?

11:18 Anderkent: arkh: (for [[x .... ] (map list c1 c2 c3)])

11:18 noncom: heh

11:18 arkh: noncom: oh - weird : )

11:18 tbaldridge: bbloom: interesting.

11:19 Anderkent: arkh: basically (map list ...) will join the respective elements together, until one of them runs out

11:19 noncom: Anderkent: but in your example (doall (interleave coll1 coll2)) where is the function?

11:19 arkh: Anderkent: neat! Thank you

11:20 bbloom: tbaldridge: yeah, it's cool b/c you can basically say "well, laziness is available here… and IO is available here" and split them up so that you can't fuck it up :-)

11:20 Anderkent: noncom: ah, I thought you just needed to evaluate the collections, not run something over them?

11:20 noncom: Anderkent: i think that what you adviced to arkh - is closer. yeah, i deen a func to exec side-effects on paralleled colls

11:20 s/deen/need (to much coca-cola)

11:21 Anderkent: ah, I thought it was the collection evaluation that side effects

11:22 then yes you want something like (map my-side-effect-fn c1 c2 c3 c4) if it takes one element from each each, or (map my-side-effect (interleave c1 c2 c3 c4)) if it takes one at a time

11:22 bbloom: tbaldridge: for example, you'll notice people are discussing doall & side effects and whatnot around us :-)

11:23 Anderkent: bbloom: what? who?

11:23 noncom: the first one is the best.. so i like force them with (dorun)? will it be idiomatic?

11:23 tbaldridge: bbloom: when you said "run time error" above did you mean compile time error?

11:23 bbloom: Anderkent: you guys :-)

11:23 Anderkent: no way.

11:23 tbaldridge: bbloom: because we have runtime errors with lazy-seqs right now.

11:23 Anderkent: noncom: yes, that shuold be fine

11:23 noncom: thanks! :)

11:24 bbloom: tbaldridge: i'm saying you'd get a run time error if you try to realize a lazy seq outside of an IO handler

11:24 tbaldridge: er i mean outside of a laziness handler

11:24 noncom: i need side-effects coz i iterate with java graphics lib, that makes a usecase :)

11:25 tbaldridge: noncom: if you need better performance, consider using loop/recur. But yes, doall will work fine for most cases

11:25 bbloom: tbaldridge: also, Eff explicitly disallows you from having effects inside your effect handlers, which i'm still wrapping my head around why, but it seems like a reasonable restriction. so you'd get a runtime error if you tried to execute an effect during lazy realization

11:26 tbaldridge: there's this line in there too: "It would be even better if deferred effectful computations were prevented by a typing discipline, but for that we would need an effect system." <-- they have runtime errors now & they want to move to compile time errors in future work

11:27 Anderkent: tbaldridge: dorun not doall if he just needs the sideeffects!

11:27 but still :p

11:27 tbaldridge: bbloom: agreed, that seems like the better approach

11:28 bbloom: tbaldridge: what seems like a better approach? doing it at compile time?

11:29 tbaldridge: to do it at compile time, you'd need to do effect inference. just like how there are static type systems, there are static effect systems. the same ideas apply: inference, effect checking, etc.

11:30 tbaldridge: types describe *what* something computes and effects describe *how* it computes. static type systems *prove* what and static effect systems *prove* how in such a way as to prevent common errors :-)

11:30 tbaldridge: bbloom: yeah, compile time. It seems that it would have interesting uses during optimization as well.

11:30 nDuff: ..."package level" meaning protected?

11:30 ...oh, wow, I was scrolled up.

11:30 bbloom: tbaldridge: yes, absolutely. there's probably some kind of clojure-type-hints level minimal inference that could provide perf benefits. things like ^:once or whatever on a continuation

11:31 akyte: What are we doing at compile time?

11:31 tbaldridge: bbloom: well in this case I'm actually thinking of how this would look in a statically typed language.

11:32 bbloom: tbaldridge: ah! well spare your imagination some trouble & check out this thing from MSR:

11:32 tbaldridge: bbloom: I have the odd position that I don't really care about types for "correctness" I think that's a bit pointless. Using types to drive better optimizations, now that's something that interests me.

11:32 bbloom: tbaldridge: http://www.rise4fun.com/koka/tutorial

11:33 tbaldridge: that's not that odd of a position! i'm with you completely. i'm a huge believer in partial evaluation and the like

11:33 tbaldridge: Koka is a language with a type & effect system

11:33 tbaldridge: the tutorial is interactive & has awesome hover tooltips

11:33 tbaldridge: bbloom: cool, I'll check it out. (after work, lol)

11:33 bbloom: tbaldridge: i'm experimenting with an interpreter for a clojure-like language that is designed to be more amenable to static analysis & partial evaluation

11:34 tbaldridge: while still remaining dynamic by default

11:37 tbaldridge: bbloom: nice!

11:57 futile: Anderkent: Actually I'm only creating very few new threads, most of the time I'm just communicating with an existing thread over an ArrayBlockingQueue

11:57 seangrov`: core.typed really looks cool

11:58 core.typed, source maps, clojurescript, and core.async - should be a pretty robust system to work with

12:00 ka__: Why does this code "(def f Character/isUpperCase)" make an error "... Unable to find static field: isUpperCase in..."? Why dosen't clojure search static methods?

12:00 seangrov`: ,(def f #(Character/isUpperCase %))

12:00 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

12:00 seangrov`: Damn sanbox

12:00 ToxicFrog: seangrov`: that doesn't seem like it should be necessary

12:03 bbloom: ToxicFrog: it's necessary because java methods are not clojure functions

12:03 futile: Does anyone foresee the ClojureScript tooling improving over the next few years? It feels a bit raw to use at this stage.

12:04 bbloom: ToxicFrog: you could coerce them with a wrapper like mem-fn, but note the signature of mem-fn:

12:04 (doc mem-fn)

12:04 clojurebot: It's greek to me.

12:04 bbloom: (doc memfn) ; rather

12:04 clojurebot: "([name & args]); Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args. Use when you want to treat a Java method as a first-class fn. name may be type-hinted with the method receiver's type in order to avoid reflective calls."

12:05 seangrov`: futile: Only you can improve cljs tooling

12:05 bbloom: ToxicFrog: java methods aren't first-class, clojure fns are. but you give type hints to memfn to eliminate reflection, since java methods can be overloaded by type

12:05 ToxicFrog: bbloom: aah.

12:05 futile: seangrov`: improving cljs tooling, fighting forest fires.. man the world is laying tons of responsibility on just me

12:05 bbloom: ToxicFrog: #() will at lease resolve the arity, which is usually enough to narrow down the choice & eliminate reflection

12:06 * seangrov` thanks cory the clojure tooling coyote for his informational message

12:06 bbloom: ToxicFrog: but we have syntax for type hints, that's our syntax for arity hints

12:07 seangrov`: futile: But of course it should get better. Source maps, cemerick's work on pushing lein-cljsbuild forward, austin, cljs.test (which is *awesome*), etc.

12:07 futile: yay

12:07 tbaldridge: futile: I use "lein cljsbuild auto", now I actually love working in CLJS more than CLJ at times.

12:07 seangrov`: tbaldridge: I've never had incremental builds work for me

12:08 tbaldridge: seangrov`: macros seem to mess with things a bit, but besides that I don't have many problems.

12:08 seangrov`: Most of the time I prefer repl-based dev

12:09 But there are times (especially with cljs' fn-reference semantics) that it's impossible to debug or tweak a feature without recompiling... incremental builds would be great there

12:12 ddellacosta: about to go to bed, but just popping in to say, CLJS tooling is improving constantly. thanks to people like seangrov` among many…

12:12 if we want it to improve we have to take matters into our own hands, at the moment. But it's totally usable now.

12:12 sandbags: i asked this a while back in #clojurescript but i'm not sure anyone there is talking. I've just setup a new CLJS project and it's not including the core CLJS stuff in the compiled JS file, just my code & the Google Clojure stuff. I've had this work in the past so I guess I've done something daft. Anyone see something wrong in my project.clj (https://gist.github.com/mmower/513299b84c1e57d86d82)? I am using le

12:12 in cljsbuild auto.

12:12 ddellacosta: what timing

12:13 sandbags: the obvious thing to check first is that your code is in src/cljs, as it says there

12:14 sandbags: ddellacosta: yes, the code i put in my CLJS files is getting included in compiled.js

12:14 ddellacosta: sandbags: oh, wait, it *does* include your code, but not some other libs?

12:14 sorry, misunderstood

12:14 sandbags: what is it not including?

12:14 sandbags: it's the CLJS code itself

12:14 i.e. Clojure in JS

12:14 ddellacosta: sandbags: …what do you mean?

12:15 seangrov`: ddellacosta: cljs.core isn't being output into his file

12:15 sandbags: seangrov`: yes, that's what i was trying & failing to say

12:15 seangrov`: sandbags: try :optimizations :simple

12:15 sandbags: i think i tried that already but i will try again now

12:15 seangrov`: do a lein clean first

12:15 err, lein cljsbuild clean

12:15 And then change the optimization to :simple

12:16 ddellacosta: sandbags: huh, weird, never had that kind of issue. Yeah, ditto what seangrov` is saying

12:17 clgv: another datomic question: can I create attributes with ordered many relations?

12:17 ddellacosta: and on that note, I'ma let ya'll handle this one and gonna go get some sleep. 'night folks.

12:17 * seangrov` is regretting using domina at all in his project

12:17 tbaldridge: clgv: no, but you can have each attribute point to an entity with a :index attribute

12:17 seangrov`: 'night ddellacosta

12:18 * ddellacosta salutes

12:18 sandbags: okay i did a cljsbuild clean & cljsbuild auto after changing optimization to :simple

12:18 https://gist.github.com/mmower/50fd08d3850482723bff

12:18 ddellacosta: seangrov`: g'night. And don't get too depressed about domina…I know where you're coming from though…heh

12:18 clgv: tbaldridge: I really miss the ability to use clojure collections as values...

12:19 seangrov`: sandbags: I've had this problem sometimes as well, and it always turns out to be something very simple I've forgotten

12:19 sandbags: i feel like i'm missing something obvious, i've been following along the instructions from CLJS Up & Running

12:19 seangrov`: Does a cljsbuild once work?

12:20 tbaldridge: clgv: yeah, that'll be a common problem with DBs, you loose that but gain performance, query abilities, etc. And Datomic entities are basically hashmaps, so you can use many of the clojure functions with them

12:20 sandbags: seangrov`: same error trying 'once'

12:21 clgv: tbaldridge: hmm right from sql dbs I know that...

12:21 seangrov`: sandbags: what does ls out/ look like? Is there a cljs folder? Is there a core.cljs inside of that?

12:24 sandbags: seangrov`: okay i've solved it, it was a pathing issue with my source file

12:24 seangrov`: sandbags: What was the issue?

12:24 Would be good to make a note somewhere

12:25 sandbags: seangrov`: so i created src/cljs/core.cljs rather than src/cljs/jsa/core.cljs (for ns jsa.core)

12:25 seangrov`: once i moved my source file into a cljs/jsa folder

12:25 seangrov`: Hrm, frustrating

12:25 sandbags: the cljs.core stuff got compiled in.... it's possibly related to using the name "core.cljs"

12:26 and being in, essentially, the root folder

12:26 seangrov`: Yeah, makes sense, but the error doesn't make it clear at all

12:26 Not sure what we could do in that case

12:26 sandbags: so maybe some path collecting thing thinks "I already have the core.cljs file"

12:26 seangrov`: yes it's not obvious

12:27 oh, an ancilliary Q

12:27 how do you find out what value to specify for the build number in the project.clj :dependencies for org.clojure/clojurescript?

12:27 the one in the book is pretty old

12:27 the only clojurescript i could find in clojars was one of Chris Grangers versions

12:27 clgv: tbaldridge: does :unique work on :db.type/bytes attributes?

12:28 sandbags: and looking at the Clojurescript repo in github didn't obviously tell me how to figure it out

12:28 seangrov`: sandbags: Follow the mailing list, for now

12:28 sandbags: ah :)

12:28 i've found this to be a problem clojure-wide

12:28 seangrov`: Maybe dnolen can add a lein project section to the clojure/clojurescript readme with the latest version

12:28 sandbags: i'm constantly wondering

12:29 i think that would be really helpful

12:29 xeqi: sandbags: cljs is hosted in maven, so http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.clojure%22%20a%3A%22clojurescript%22

12:29 seangrov`: dnolen: Any reason that wouldn't be possible?

12:29 dnolen: seangrov`: anybody can do that when the patch lands, it's part of the wiki.

12:29 xeqi: sorry, hosted in central

12:29 clgv: sandbags: http://search.maven.org/

12:30 sandbags: xeqi, clgv thanks ... i'm not sure how I (or any other relative newbie) would have known to search there

12:30 i find stuff using the clojars.org search (although sometimes i seem to find the wrong thing)

12:30 clgv: sandbags: well, now you can remember that all the official clojure projects are over there

12:33 sandbags: the info is actually on the libraries page of the clojure.org site

12:33 but the maven link is not, i think, very well described

12:34 since, for example, when looking for CLJS I wouldn't be thinking "JVM libraries"

12:34 i don't know who has editing rights for those pages

12:47 clgv: is there any authentication/authorization to access the transactor of datomic? otherwise it cant be run on our remote server which is publically accessible...

12:56 tbaldridge: clgv: I'd argue that you probably shouldn't have any DB facing the internet anyways

12:56 clgv: use SSH tunnels or VPNs

13:16 TimMc: I just made a little lein plugin to create a graph of your project's namespaces: https://github.com/timmc/nephila

13:16 Needs a bunch of work, but it may be useful as is.

13:17 hyPiRion: TimMc: Can you show an example in the docs?

13:17 TimMc: Probably a good idea!

13:18 It should also do things like, I dunno, actually use the :sources info in your project.clj.

13:18 Here's an example: clojurewerkz/cassaforte http://i.imgur.com/yBvlxiL.png

13:19 hyPiRion: hmm, lush

13:20 TimMc: The abbreviation code was hard!

13:20 hyPiRion: TimMc: oh, I thought you specified that manually or so

13:20 neat.

13:21 langmartin: I'm sure this is a FAQ, but I'm having some trouble executing a large number of blocking procedures at once. I don't need the results

13:21 TimMc: This would all be better as an interactive web page.

13:22 coventry: ,(do (defn tst [] (let [f (transient {})] (assoc! f :2 1) (persistent! f))) (tst))

13:22 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

13:22 langmartin: I'm currently using send-off to an agent, is it sufficient to call (release-pending-sends) to get the send-offs to actually execute in parallel?

13:22 coventry: Well, what does http://clojure.org/transients mean when it says "...transients are not designed to be bashed in-place. You must capture and use the return value in the next call." In that code I just tried, for instance?

13:22 TimMc: Right, that code uses transients incorrectly.

13:23 hyPiRion: TimMc: I had an idea like that for Codeq, but it's a bit far away for me to be able to create something like that yet

13:23 coventry: TimMc: But it works outside the sandbox. Is it only incorrect by convention?

13:23 TimMc: langmartin: Clojure fns are Runnables, so you could .start Threads on each one and .join them all.

13:23 clgv: coventry: try to assoc a lot of k-v-pairs to that transient map and you'll see why it is incorrect

13:23 TimMc: coventry: I think it works by chance.

13:25 hyPiRion: coventry: it would only return new versions if there's no space in the current transient, otherwise it'll place it in the current transient

13:25 riley526: has anyone read an early version of "Web Development with Clojure" and can vouch for its usefulness? http://pragprog.com/book/dswdcloj/web-development-with-clojure

13:25 langmartin: TimMc: and If I wanted to use a thread pool like like the send-off pool...

13:26 coventry: TimMc, hyPiRion: Thanks, I see. Sticking the assoc in a (dotimes [i 1000]) gives a result with only eight keys.

13:26 technomancy: riley526: I think it was just announced yesterday, so probably no one =)

13:26 riley526: technomancy: fair :)

13:28 schmir: riley526: I've got one.

13:28 coventry: riley526: Have you read the excerpts? I found them pretty informative.

13:29 riley526: coventry: not yet, I will shortly

13:29 schmir: what are your thoughts on it?

13:29 schmir: it gives at least an good overview if you have no clue about web development...just skimmed through it..

13:30 srruby: Is there a way to control the order that keys are displayed when printing maps ?

13:30 bbloom: srruby: no

13:31 hiredman: you might know the answer to this...

13:31 is there someway to exclude java imports like you can do with refer-clojure :exclude ?

13:31 minimal repro, try to (deftype Void [])

13:32 coventry: srruby: You might want an array-map. http://clojuredocs.org/clojure_core/clojure.core/array-map

13:32 bbloom: get IllegalStateException Void already refers to: class java.lang.Void ...

13:32 riley526: schmir: as someone who has a clue about web development, I'm looking for a solid source on how organize a clojure webapp.

13:32 TimMc: hyPiRion: It quickly becomes useless for projects the size of Midje: http://i.imgur.com/C182izv.jpg

13:32 technomancy: scared_kitty.gif

13:32 hiredman: bbloom: no, you may be able to unmap Void from the namespace, the map of imports is in the namespace object

13:33 bbloom: hiredman: heh, i tried that… but: (ns-unmap 'Void) yields the same IllegalStateException

13:33 Ph_D: Hey, all. I'm finally compiling my personal CLJS project as production ready code, and I'm noticing the filesize is around 175kb with {:optimizations :advanced :pretty-print false}. Is this normal?

13:33 Bronsa: bbloom: (ns-unmap *ns* 'Void)

13:33 bbloom: hiredman: oh never mind. i'm an idiot

13:34 haha yeah

13:34 hyPiRion: TimMc: oh whaa

13:34 bbloom: Bronsa: fireplace was eval-ing my file that had the deftype still in it

13:34 riley526: schmir: clojure gives me almost too much freedom. I spend too much time trying to figure out where to put something, and still end up with an unorganized mess of functions. My fault entirely, of course :)

13:34 hiredman: I'm not sure if ns-unmap will unmap the right bits

13:34 tbaldridge: Ph_D: are you thinking that sounds big, or small?

13:34 coventry: riley526: I don't know if the excerpts will answer that question for you.

13:34 justin_smith: why is the type of m in (def m {:a 1}) different from the type of m in (let [m {:a 1}] m)

13:34 bbloom: hiredman: Bronsa: ok ns-unmap seems to have worked. thanks guys!

13:35 tbaldridge: Ph_D: remember that includes the entire clojure runtime, any libs you included, etc.

13:35 Bronsa: hiredman: class imports are just put in .mappings

13:36 hiredman: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Namespace.java#L34

13:37 bbloom: Bronsa: since you're a reader pro… what's the best approach if i have a zero-payload custom type that i want to be readable? for example, consider such a Void type :-)

13:37 in scheme land, you'd have something like #void

13:38 i guess the best i can do is: #void []

13:38 which feels ugly

13:38 Ph_D: tbaldridge: It's a bit large for my liking, but that does make sense as it includes the libs I've added to the project. It was ~200kb until I removed some unnecessary namespace requires.

13:38 Bronsa: bbloom: #void nil? :P

13:38 tbaldridge: Ph_D: gzip it, and see what happens.

13:38 bbloom: Bronsa: can i do that? :-) heh

13:38 Bronsa: bbloom: I can't think of anything simpler than #void [] btw

13:39 bbloom: sure you can

13:39 bbloom: Bronsa: seems like a small oversight in EDN

13:39 Ph_D: tbaldrige: Yeah, that was my next step. I've read some articles on how to gzip in Compojure, but it seems fuzzy. Should I be using Jetty's gzip feature or Ring middleware?

13:39 bbloom: Bronsa: i feel similarly about `true` and `false` vs the more traditional #t and #f

13:39 or #true and #false

13:39 Bronsa: annoying as hell if you actually want to have a 'true symbol

13:40 Bronsa: yeah, but then again, you can make the same argument for rebinding special forms

13:40 like it or not, you need some special symbols that don't behave like everything else

13:40 bbloom: i disagree :-P the primitive symbols really should be namespaced

13:41 Bronsa: but they don't bind to vars

13:42 bbloom: Bronsa: (defprotocol IVar …) (deftype PrimitiveVar …) (deftype Var …) :-)

13:43 tbaldridge: Ph_D: I'd use the ring middleware, but you can gzip it from the commandline to get an idea of what ball park you'll be in

13:48 Ph_D: tbaldrige: Oh, right. Gzipped it's ~50kb. I can manage that. :P

13:50 dnolen: Ph_D: ;) CLJS produces a pretty optimal amount of code.

13:57 asteve: ,(try (read-string (str "4932") (catch Exception e 0)))

13:57 clojurebot: asteve: I don't understand.

13:58 Ph_D: dnolen: Definitely. Did some heavy reading on core.async last night, and I'm beginning to implement it in my UI design. Words can't describe the power...

13:58 bbloom: Ph_D: cue maniacal laughter

14:02 silasdavis: !(str (map hash-map [:bar] (repeatedly hash-map)))

14:02 _(str (map hash-map [:bar] (repeatedly hash-map)))

14:02 clojurebot,

14:02 clojurebot: Excuse me?

14:02 silasdavis: clojurebot, help

14:02 clojurebot: Nobody can help with "X doesn't work". Please provide context: what you did, what you hoped would happen, and what happened instead. A stack trace is especially helpful, if applicable.

14:02 silasdavis: clojurebot, execute

14:02 clojurebot: Cool story bro.

14:02 silasdavis: bah

14:03 can someone tell me how to get the above to print what it does in the repl, not somethign like "clojure.lang.LazySeq@3ccf1b46"

14:03 Ph_D: bbloom & dnolen: I also read this article from Keming Labs: http://keminglabs.com/blog/core-async-ui-first-questions/ — I'm specifically interested in his question on using go blocks for simple (Angular-like) data-binding. Thoughts?

14:04 coventry: silasdavis: ,(pr-str (map hash-map [:bar] (repeatedly hash-map))) ?

14:04 dnolen: Ph_D: I don't yet, working on some stuff.

14:04 coventry: ,(pr-str (map hash-map [:bar] (repeatedly hash-map)))

14:05 clojurebot: "({:bar {}})"

14:05 bbloom: Ph_D: the only thoughts i can offer you are either A) already covered in what we linked you to or B) would probably just confuse you more

14:05 Ph_D: like i said, it's a bit of an open research problem right now

14:07 silasdavis: coventry, thanks

14:08 Ph_D: dnolen: Gotcha, I'll be sure to keep an eye out on your blog.

14:08 bbloom: Hah, that's fair. Once I really sink my teeth in it, I look forward to contributing some of my own experiments.

14:13 pandeiro: anyone installed lighttable 5.x on archlinux successfully?

14:23 futile: What are some signs of poor health in a Clojure project?

14:27 bja: futile: poor health in what context? code quality? support? active development? validated test cases?

14:27 futile: Code quality.

14:29 bja: difficult to test and explain code has been a quick indicator for me in the past. It's not that difficult to test is necessarily bad code, but code that is hard to test and/or hard to explain tends to be sketchy in the commercial projects I've worked on

14:30 tbaldridge: futile: I try to look for, global dynamic vars, and global mutable state. For instance, I consider DB clients that keep the connection in a single var to be very bad form.

14:30 futile: DSLs, esp those not backed by a data interface.

14:31 futile: Hmm.

14:31 Very interesting, thank you gentle men.

14:32 bja: fwiw, the difficult to test and explain thing has held true regardless of the language and platform I've worked on. It was just as true doing C and Python as it has been doing Clojure

14:33 futile: bja: that makes sense. If it's difficult to test and explain, it's probably doing too many things at once, which coudl easily lead to fragility, rigidity, and homoiconicity.

14:35 What do you think about heavy use of macros?

14:35 tbaldridge: futile: that kindof falls into the DSL side of things

14:37 justin_smith: coventry: in the pr-str example, is pr-str acting like (comp str doall) ?

14:38 cored: hello

14:38 is this a good starting point for learning Clojure http://cemerick.com/2012/05/02/starting-clojure/

14:38 ?

14:39 pbostrom: tbaldridge: do you have any good examples of a "proper" DSL/data interface?

14:39 amalloy: cored: i don't konw anything about the particular link, but anything by cemerick is unlikely to do actual harm, and likely to do good

14:39 justin_smith: cored: cemerick knows his shit, but counterclockwise as an editor may be a slightly controversial choice (more folks use emacs I think, and it is something you will never see unanimity about)

14:40 editor choice is something you will never see unanimity about, that is

14:40 tbaldridge: pbostrom: the key is to have it backed by data, so write your program to take data as its input, then write a DSL that outputs data. That way if I don't like your DSL I can write my own, or I can generate data for your library from some other source (like a DB).

14:40 vijaykiran: cored: Clojure Programming book will help too

14:41 futile: Some people I know say they nevr use macros. They say it's just gnnda lead to un-managable code and gove others on your team a hard time evolving the code over time, and that that's even true for the future-yiou. They suggest coming upp with a DSL that builds on composable functions instead, but sometimes that can get a bit cumbersome too.

14:41 cored: justin_smith: I'm a vim user myself, will have to learn emacs then

14:41 vijaykiran: bought Clojure Made Simple right now

14:41 justin_smith: vijaykiran: which, handily enough, is written by the same guy who did that blog post

14:41 tbaldridge: pbostrom: that and try not to break the Clojure semantics. e.g., don't write a macro that evaluates (foo a b) in reverse order, a, b then call foo. This is totally backwards, and would just confuse people.

14:41 justin_smith: cored: clojure in vim is doable, there are people here that do it

14:41 cored: justin_smith: sounds good to me, I will check emacs either way. I've heard good things about Light Table for Clojure

14:41 justin_smith: cored: seconding recommendation about the book btw

14:42 vijaykiran: cored: didn;t read that one though

14:42 tbaldridge: futile: there's a point to each side. Build the data interface for the code to interact with, and the DSL for people to interact with.

14:42 futile: wait for it...

14:42 vijaykiran: cored: and don't worry too much about the editors

14:43 * vijaykiran typing this in Emacs though ;)

14:43 cored: vijaykiran: :-)

14:43 technomancy: cored: don't learn a new editor at the same time as learning a new language

14:43 cored: 67 pages clojure made simple :-/

14:44 futile: *never

14:44 technomancy: (unless the language is racket)

14:44 futile: *gonna

14:44 vijaykiran: cored: also practicing on 4clojure.com and looking at how others solved the problems helps too

14:44 cored: technomancy: I want to check racket also :-) the people in the channel told me to use DrRacket

14:44 vijaykiran: got it

14:44 wow, never thought this channel would be this friendly

14:44 bja: cored: I open up a lein repl inside vim using Conque

14:45 coventry: justin_smith: No, it's (applying) its arguments to (pr)

14:45 ,(source pr-str)

14:45 clojurebot: Source not found\n

14:45 vijaykiran: cored: if you are interested in DrRacket -- book mark this ;) https://www.coursera.org/course/programdesign

14:45 bbloom: cored: clojure is kinda like the anti-lisp community :-)

14:45 coventry: (well, source is in clojure.repl)

14:45 technomancy: cored: I think that's the only place where learning a new editor is justified

14:45 futile: *give

14:45 bja: and just use normal vim stuff for moving code back and forth. It's not as fancy as slimv or fireplace's integration, but I also don't have to think about it much

14:45 bbloom: we accomplish things and are nice to each other & have a shared vision for computing, rather than sit in our recluse lisp dens

14:45 futile: man i made a lot of typos in that reply

14:45 *you

14:46 cored: I've been hearing some nasty stuff about Clojure community, I felt that all people using Clojure were a bunch of grumpy bearded math wiz's "no offense"

14:46 Bronsa: futile: i was expecting *up

14:46 futile: *up

14:46 bbloom: cored: curious. where did you hear what nasty stuff?

14:46 futile: Bronsa: yep looks like I mistyped that one too

14:46 cored: bbloom: a couple of friends which were trying to learn it, they told me they asked in some mailing list

14:46 futile: Bronsa: see my message in here about 6 minutes ago

14:46 vijaykiran: cored: Wow .. that's new :) that's exactly opposite to the experience I've

14:47 justin_smith: coventry: I know what it does, but I was just suggesting that in that case it is mostly useful for the side effect of forcing the lazy seq (which str will not force)

14:47 cored: bbloom: I heard Relevance podcast from time to time, one of the people that got interviewed said something similar, not nasty stuff but that Clojure's community wasn't open to beginners

14:47 coventry: justin_smith: Oh, of course. Sorry for the misunderstanding.

14:48 cored: vijaykiran: I saw that course yesterday, but it's says that they will use Python/Javascript

14:48 pbostrom: tbaldridge: thanks, I think I understand, so something like hiccup, where you use data like [:div [:span "foo"]] to describe html, would be a good example of a data interface

14:48 cored: vijaykiran: I can see the racket logo in the video though, I got myself into the functional programming course with Scala, which is the only thing that I found talking about functional programming in there

14:49 justin_smith: coventry: np, I didn't take offense

14:51 amalloy: justin_smith: fwiw, (comp str doall) never prints anything different from just str

14:52 justin_smith: amalloy: oh, I had no idea

14:52 thanks

14:52 amalloy: &(str (doall (range 10)))

14:52 lazybot: ⇒ "clojure.lang.LazySeq@9ebadac6"

15:08 functionform: cored

15:08 i can gaurantee i'm not a math wiz :)

15:08 futile: cored: yeah, I'm just a Ruby programmer, they brought me here to do Clojure against my will, help!

15:09 :)

15:10 rigger: futile: sounds like someone has your best interest at heart

15:10 futile: :P

15:10 rigger: hehe

15:10 alexeberts: hi everyone - noobie question: what's the current best practice for personal helper libraries that I want to make available to every clojure project? Are people setting up a local repository and then importing it as a local dependency?

15:10 futile: I'm getting close to ready to just do a start-up.

15:11 alexeberts: If they're done right, they're probably good enough to go on clojars

15:11 technomancy: alexeberts: pull request to useful =)

15:11 alexeberts: futile: mine are certainly not ready to put on clojars at this point! :-)

15:12 technomancy: where's "useful" hosted? github?

15:12 Apage43: I just put mine on clojars anyway

15:12 technomancy: yeah

15:13 mabes: when you need to do blocking io in go-blocks is it better to delegate to `future` w/clojure's unbounded thread pool or async's `thread` which is a fixed cached pool?

15:13 alexeberts: ok, thanks for the suggestions - I'll checkout useful.

15:13 Apage43: 0.0.x == I'm messing around here, you *can* use this but don't expect it to be good

15:13 cored: futile: hehe, I'm also a Ruby programmer, but curious about programming languages in general

15:13 functionform: at least do you have a beard?

15:13 futile: cored: then you've come to the right place.

15:14 cored: because Clojure is "Ruby done right", or "what Ruby was trying to be", or "a better Ruby"

15:14 cored: basically, 99% of the problems that Ruby was created to solve, Clojure solves and does a better job.

15:14 nDuff: ...?

15:14 cored: futile: to be honest I have mixed feelings about Clojure/Scala

15:14 futile: before Ruby I did a lot of Java

15:14 futile: cored: the one problem Ruby solves better is being command-line-friendly

15:15 * nDuff doesn't particularly share futile's positions here.

15:15 futile: And Leiningen does some to help this, and possibly helps it fully.

15:15 rigger: eh, jvm startup time for utility scripts is crazy

15:15 futile: Right on.

15:15 cored: futile: well, I normally work as a web developer, I did some command line stuff with Ruby but not big things

15:15 futile: cored: then Clojure is better than Ruby for what you do :)

15:15 * nDuff is not really sure that Clojure and Ruby have the same design goals at all.

15:16 futile: nDuff: a main goal of both is to increase developer productivity in a predictable way.

15:16 technomancy: I realized the other day that the thing about the JVM ecosystem is that it's easy to pull in "random java lib for X" as long as X isn't a web-based thing typically

15:16 nDuff: futile: one could argue that that's the goal of *every* high-level programming language.

15:16 technomancy: probably because web-based libs need to make a lot of assumptions about your stack?

15:17 futile: nDuff: it's explicitly stated though by Matz and Rich, no?

15:17 vijaykiran: technomancy: isn't it similar to CPAN :) ?

15:17 technomancy: anyway, ruby still trounces clojure on "availability of $RANDOM_WEB_TASK" libs

15:17 futile: technomancy: not that they have to but that they thought they had to.

15:17 nDuff: futile: Can you find a major programming language whose designers *didn't* explicitly state that productivity was a goal?

15:17 technomancy: futile: quite

15:17 cored: futile: also, it's seems like Scala is getting more attention at least from companies; saw a lot of companies using Scala in the typesafe site

15:17 futile: technomancy: like servlets, that's not strictly necessary right? But many things are built around them.

15:17 technomancy: vijaykiran: can't say I've had the pleasure

15:18 where "pleasure" needs quotation marks

15:18 nDuff: s/programming language/high-level programming language/

15:18 yazirian: CPAN is a four letter word

15:18 bja: small companies seem to not really care what I write their code with

15:18 provided that the rest of the team can understand it

15:18 arcatan: nDuff: haskell's goals do not include programmer productivity :P (ref: http://www.haskell.org/onlinereport/preface-jfp.html)

15:19 nDuff: arcatan: I thought I said "major". :)

15:19 vijaykiran: technomancy: :) well I'd - but then hanging out on perlmonks trying put of fires on the head

15:19 arcatan: nDuff: :P

15:19 nDuff: cored: Scala is indeed easier to sell in traditional corporate settings. Not nearly as much as a pleasure to work with, though.

15:20 cored: nDuff: I'm trying to swim in both waters for that same reason, job oportunities and having fun

15:21 futile: cored: Many companies have moved from C++ to Python, or from Java to Ruby, or from Ruby to Scala. And I think they all do it for the same reason: they were only really competent at language A, found language B, found that it fixes a lot of problems in language A, and jump to it without examining languages C-Z.

15:21 nDuff: cored: Do you know any LISPs presently? Do you know any functional languages?

15:22 futile: It's really hard to see why Dropbox chose Python for instance, over some alternatives, aside from "it's all I know well." Python is probably not the best tool for that job.

15:22 cored: nDuff: I started the programming languages class from coursera, but just learned a bit of SML I had to stop before starting racket, so nope starting at the moment with Clojure

15:22 futile: And honestly, maybe I fall in that category too. Maybe Clojure is far worse than, say, Erlang or Haskell or Elixir for web development, and I just haven't given them a fair look. Who knows?

15:23 cored: futile: well I remember what happend to yammer, they went to Scala and I think now they went back to Java

15:23 futile: yeap, I heard some comments like that before, like Clojure is not too into web development

15:24 futile: And I bet you heard that from Ruby people?

15:24 nDuff: *shrug*. Depends; Pedestal, for instance, gives you some capabilities that aren't really available elsewhere at all. It's not the right tool for every project, and grokking it isn't an easy task, but I haven't seen anything of comparable power elsewhere.

15:25 futile: It's easy to judge another language without having sufficient knowledge about the given domain to know what trade-offs that domain needs.

15:25 nDuff: cored: Personally, I'd suggest using Clojure for at least a project or two even if you then go on to Scala. The work you need to do to retrain yourself to think in a functional way will benefit you even if you aren't using Clojure itself later on.

15:25 bbloom: cored: Clojure's user base is simply broader b/c it helps you tackle problems harder than serving some HTML

15:25 futile: nDuff: I've had people say that to me about Haskell too.

15:25 bbloom: cored: quite honestly, nobody has anything as nice as Rails for get-some-CRUD-shit-done-quick

15:26 futile: And I just can't feel comfortable with Haskell because of how strict it is about types. You can't have variadic functions like what's in clojure.core, on account of each one needing to specify the number of arguments.

15:26 nDuff: futile: Sure. Haskell and Clojure are at different points along the practicality/purity spectrum.

15:26 bbloom: cored: but quite a few clojure folks would actually recommend Rails for quick little sites & the like, but if you've got a bigger badder tougher problem to solve, you wind up throwing your framework out over time anyway, so the community hasn't really bothered to solve that problem: rails already fills the nitch

15:26 futile: And is that really a good reason to reject Haskell and prefer Clojure? Maybe not. Maybe I'm doing the same thing Rubyists do to avoid looking into Clojure.

15:29 I can't help but feel like feature-expressions are the downfall of Clojure. They remind me of #if kind of things in C. Makes code extremely ugly just to become portable.

15:29 arcatan: what's feature expression?

15:30 nDuff: futile: ...well, they don't exist yet anyhow. :)

15:30 tbaldridge: futile: and that's exactly why they don't exist yet

15:30 futile: yeah but they're looming and I haven't heard complaints yet

15:30 nDuff: arcatan: a proposed compiler macro for allowing code specific to different implementations (or, rather, their features) to exist in the same file.

15:31 futile: there are lots of complaints. Otherwise they'd exist.

15:31 ...which is a damned shame, I want them sooner rather than later.

15:31 amalloy: futile: incidentally, have you looked at how haskell implements printf? it is pretty ingenious

15:31 arcatan: nDuff: ah, okay

15:31 tbaldridge: futile: tons of arguments here: http://dev.clojure.org/display/design/Feature+Expressions

15:31 nDuff: s/compiler macro/reader macro/

15:32 futile: Personally I don't see why Clojure wants to keep embrace-the-platform as a goal. It might have been good for bootstrapping, but if it takes the Ruby approach of add-on extensions, it gets a whole lot simpler, and it hasn't been a problem for Ruby in practice.

15:32 cored: bbloom: regarding the Rails comment, I said yesterday in here that probably Clojure needs that but somebody said that they don't want a Rails in Clojure

15:32 tbaldridge: futile: try writing a language that wraps everything then get back to me

15:32 futile: tbaldridge: I'm just one person!

15:32 tbaldridge: futile: Ruby took about 10 years before anyone used it seriously. Clojure was invented 5 years ago.

15:32 futile: Rich Hickey is like 8 people.

15:33 tbaldridge: futile: nah, he just knows how to leverage existing code. If you embrace the platform you can port clojure to a different platform in a matter of months.

15:33 futile: tbaldridge: that's what I mean by bootstrapping. But if something like this is added in as an opt-in feature right now, we can slowly build it up and migrate to it over time.

15:33 bbloom: cored: i kinda don't want a Rails in the community either. the ONE TRUE WAY mentality is poisonous

15:33 rbxbx: (inc bbloom)

15:33 lazybot: ⇒ 14

15:34 bbloom: i'm totally fine with "THE ONE BEST WAY WE KNOW OF"

15:34 futile: bbloom: I don't think "the one true way" mentality is bad, as long as it's correct.

15:34 bbloom: and i'm also fine with "YOUR WAY SEEMS INTERESTING, BUT YOU MUST PROVE IT IS BETTER"

15:34 :-)

15:34 futile: bbloom: the problem with rails isn't that it's opinionated, it's all the design flaws it has

15:34 bbloom: futile: that's like, your opinion, man

15:34 rhg135: hey, (take-while #(not= -1 %) (repeatedly #(.read in))) is this the ebst way to read an inputstream?

15:34 futile: bbloom: whereas I'm fine with Ring and Compojure etc. being the One True Way™

15:35 nDuff: futile: Complecting a lot of unrelated concerns *is* a design flaw

15:35 tbaldridge: futile: I'm not, because I can't so async code with ring

15:35 bbloom: futile: Skeptical Of Ways That Challenge The Best We Know Now != One True Way

15:35 futile: nDuff: yes, that's what makes Rails suck

15:35 tbaldridge: oh

15:35 nDuff: futile: but it's also the whole point of being opinionated (in a web framework) -- trying to integrate everything tightly.

15:35 tbaldridge: futile: hence the reason Pedestal doesn't use ring, but uses a "ring like" interface

15:36 bbloom: skepticism > scripture

15:36 futile: nDuff: oh. I've always looked at "opinionated" as meaning "we're going to make a few decisions that simplify things for us and for you, although it reduces a little bit of your flexibility"

15:36 and where that flexibility doesn't matter, it can be an improvement over existing options that still hold on to it

15:37 bbloom: sure, except in religion ;)

15:37 callen: futile: that's a pretty fair description, but I don't think it's unreasonable to believe that most of the people implementing what they call "opinionated" libraries/frameworks are going too far down that local maxima.

15:37 and in response, reject that philosophy and try to find a better way to manage complexity, reuse code, etc.

15:37 cored: oh

15:37 find an article

15:37 looks like a flame

15:37 http://matt.aimonetti.net/posts/2013/08/27/what-technology-should-my-startup-use/

15:37 callen: trying to use a Ruby library in pretty much any manner other than was originally intended is a sisphyean effort far too often.

15:37 cored: there's a clojure part in there

15:38 supersym: I don't mind people making my decissions, as long as I agree with them ;)

15:38 nDuff: cored: if you'd like to see an article from someone whose startup went through Rails and Scala and ended up on a Clojure stack (before a successful exit), there's a recent one of those too. :)

15:38 futile: callen: I look at Rails as being "opinionated" in the way I described, but as having the wrong understanding of what does or doesn't matter

15:39 callen: futile: the fiddling with coffeescript tells me all I need to know about Rails core.

15:39 nDuff: cored: ...ahh: http://www.colinsteele.org/post/23103789647/against-the-grain-aws-clojure-startup

15:39 futile: callen: Rails core fiddles with CS?

15:39 cored: nDuff: great, thanks

15:39 callen: futile: the flipping around of the asset pipeline and frontend defaults.

15:39 tbaldridge: cored: yes, please read that article. The RoomKey people have done some awesome stuff with Clojure

15:39 cored: callen: hello

15:39 futile: oh

15:39 callen: cored: bye

15:40 futile: waste of time.

15:40 cored: :-(

15:40 callen: cored: what? :(

15:40 arcatan: rhg135: i guess reading more than one byte at a time would be more efficient, but that's kinda neat

15:40 rhg135: thx

15:40 cored: callen: I'm just saying "hi" and you are already leaving, what a shame

15:40 futile: callen: oh, a good example, Rails holds the opinion that it's important to have convention over configuration, but in practice I've found that's unrealistic on larger projects

15:40 rhg135: the normal way is way too long

15:41 bja: playing with go-loops in cljs browser seems way less dangerous than doing so in a normal clj repl

15:41 futile: cored: ignore callen he's super rude, and not representative of the rest of Clojure community

15:41 nDuff: *snerk*

15:41 futile: cored: it's likely your friends (who did not like the Clojure community) just interacted with callen once or twice.

15:41 bja: whenever I mess up my logic, reloading the browser is way faster than killing and reloading my jvm

15:41 cored: futile: hehehe, he was quite informative yesterday

15:41 dnolen: bja: heh

15:41 futile: cored: not mutually exclusive traits

15:42 tbaldridge: bja: +1 to that, I actually enjoy writing core.async code in the browser more. Plus "threads" in the browser is just way too much fun.

15:43 bja: tbaldridge: yeah. it's wild having every UI component in its own little event loop

15:43 rhg135: now as soon as we have sockets we can forget the jvm

15:43 (mostly)

15:43 bja: tbaldridge: and keeping the code readable

15:44 mabes: nevermind my previous question about future and core.async/thread.. I thought the thread pool was fixed like the go block tp

15:45 bja: I think the biggest plus for cljs+core.async for me so far is that it lets me largely forget I'm writing a browser app. Outside of the small bit of actual dom manipulation, it's just normal code

15:45 mabes: tbaldridge: what was the motivation behind making the thread pool larger for the go-blocks? https://github.com/clojure/core.async/commit/7b64bd8a22c2b6df69c23dce34eb66d705f5bf1a

15:45 bja: which is handy, as my experience in javascript land has thus far been limited to hacking stuff together just well enough to ship it

15:46 tbaldridge: mabes: we're trying to strike a balance there, we don't want people to do IO inside a go block, but if they have to we'd don't want it to totally stall out.

15:48 mabes: tbaldridge: async's new thread tp uses an unbounded tp just like clojure's future... why not just use future?

15:49 tbaldridge: mabes: no technical reason I'm aware of, but the answer might be "why not"?

15:50 mabes: tbaldridge: yeah, it seems like a good idea in case you want to treat it differently. I was just curious if there was another less-apparent reason

15:54 mdrogalis: tbaldridge: take! confuses me a bit. Can you give me an example of draining a channel and getting the elements in a seq?

15:56 tbaldridge: mdrogalis: https://gist.github.com/halgari/6382422

15:59 futile: The past few months, I've been wishing Clojure was written in something like C.

15:59 I started asking myself why I wish that.

16:00 And mainly because I'd love to use it for embedding into other applications as a scripting language.

16:00 The closest I can get to that right now is to compile some CljS, and embed a V8 interpreter that loads it up.

16:01 Maybe I have too much of a niche need for it to ever make a difference. But I think Clojure as an embedded scripting language (instead of on the JVM) would be great.

16:03 TimMc: futile: Well, there are other backends in development by various folks.

16:03 nDuff: ...and very much other LISPs built to be used as embedded extension languages from the ground up.

16:04 futile: nDuff: any of them with the same built-in immutability and sequence-favoring core lib as Clojure?

16:04 (and destructuring and rich type-literals syntax)

16:07 nathanic: futile: http://www.infoq.com/presentations/clojure-scheme

16:09 futile: But is it production-reday? It does not appear so.

16:11 nDuff: futile: ...well, if you want to work on *making* it production-ready, patches will doubtless be welcome. :)

16:11 bja: futile: production-ready is largely a decision to be made by your own team

16:12 futile: nDuff: as if I'm capable or qualified for that

16:12 nDuff: What better way to get qualified than to try to work on it?

16:12 muhoo: production-ready depends on what you mean by production

16:12 bja: e.g. I'm going to be putting core.async into a production capacity soonish

16:12 muhoo: and what things specifically you need for production.

16:12 futile: nDuff: many

16:12 bja: as I built a dashboarding system using it

16:13 it's one of those things that, without a large team around it, you just have to decide if you're willing to support it yourself.

16:14 futile: nDuff: in the same words as that feminist lady on twitter who talked shit about me for no good reason: "I don't owe you an answer to that question! Why you think you have the privilege to demand I give you such answers when you could figure it out yourself is beyond me."

16:14 * futile sighs, what a crazy lady

16:14 llasram: *blink*

16:23 tbaldridge: well that killed the room....

16:25 amacdougall: Speaking of feminism and open-source contributions*, I found out yesterday how handy Enlive is.

16:25 *not actually

16:26 I was trying to get cemerick's Austin CLJS REPL to work, and when the concepts finally clicked, I was able to use Enlive to inject the REPL connect script into my Liberator system.

16:26 llasram: OOC, anyone know of "computation graph" libraries other than prismatic/plumbing, stuartsierra/flow, and ReadyForZero/babbage ?

16:26 amacdougall: Coming from the larger webdev world, I kept thinking of templating as being this all-consuming thing that dominates your app structure… nope. Clojure philosophy.

16:27 It's still crazy being able to drop just a pinch of a library into a working app.

16:28 schmir: why must the function passed to clojure.core/keep be free of side effects? I tried to look at keep's implementation and now my head hurts...

16:30 Bronsa: schmir: probably because it returns a lazy-seq

16:31 llasram: schmir: I believe just because it is chunked-seq-aware, and thus may be called for some implementation-defined number of additional values beyond what has been intentionally realized

16:32 schmir: llasram: being chunked-seq-aware is an optimization?

16:34 TimMc: Allegedly.

16:35 nathanic: llasram: re: computation graph libs, perhaps https://github.com/ztellman/lamina ?

16:35 schmir: ok, thanks everyone for the explanation

16:35 pjstadig: maybe its ok to have side effects as long as your prepared to have 32 of those side effects happen when you only pull one item off the seq

16:39 dnolen: does the expresso maintainer hang out here?

16:40 llasram: nathanic: Not quite... Well, hmm. Maybe? I hadn't thought about it that way, but maybe lamina and core.async would be so-construed

16:40 s,would be,could be,

16:40 nathanic: llasram: yeah, hence my question mark :-)

16:41 ztellman: llasram nathanic: I'd say https://github.com/ztellman/narrator is more like the other libraries

16:43 llasram: ztellman: Cool -- I'd been meaning to take a closer look at narrator

16:43 ztellman: still hasn't been formally released

16:44 I need to add a few bells and whistles, write some more tests

16:44 but you could also look at, say, javelin

16:47 llasram: Huh, interesting

16:47 I've been falling behind in my knowledge of the Clojuresphere!

16:48 ztellman: dataflow is the proper streaming generalization of prismatic's graph

16:48 most of the other stuff is just some special case

16:48 including narrator, lamina, et al

16:51 matthavener: what does the :shared metadata on a clojure namespace mean?

16:52 mdrogalis: tbaldridge: Thank you!

16:52 matthavener: for example, this namespace: https://github.com/pedestal/app-tutorial/blob/master/tutorial-client/app/src/tutorial_client/behavior.clj

16:52 llasram: Interesting... I'd been thinking of things in terms of kind of a Makefile-like DAG of computations. I want <x>, so compute the dependencies of <x>. But maybe the other direction is more obvious in cases where you actually need to compute everything

17:02 matthavener: nevermind, its a special feature of pedestal.app-tools

17:03 callen: cored: oh I was just teasing, but I was in fact leaving for lunch. :)

17:17 kyled: Is this the right channel to ask clojure script questions?

17:18 bbloom: yup

17:19 kyled: at clojurescript.net i am getting "wrong number of args (1) passed to foo at line 1" when running (def foo {:a (fn [] ) :b (fn [] (foo :a))}) 

17:20 further more, ((foo :b)) returns "#<InternalError: too much recursion> at line 1"

17:20 why is this?

17:20 bbloom: kyled: hmmm looks like you found a bug. dnolen?

17:20 kyled: the reason is that you're trying to use foo in the definition of foo

17:21 kyled: that works for functions b/c there is a level of indirection, but in cljs, there are no Var objects, so that indirection doesn't exist

17:21 on clojure (def foo xxx) will create a var called foo, then eval xxx and set the value of foo

17:21 in cljs, (def foo xxx) will evaluate xxx then create a field called foo

17:21 and set foo to xxx

17:22 ToxicFrog: bbloom: but the only reference to foo is inside the fn, right? So surely it shouldn't be resolved until the function is actually called, by which time foo is already defined.

17:22 bbloom: ToxicFrog: right, but clojurescript has some baked in optimizations for arity dispatch

17:23 kyled: bbloom: i assume its like trying to "var foo = {a: function() {} , b: foo.a};"..in javascript land it dosen't work obvisouly...not sure if the above is supped to work in clojurescript..i guess it should of because of late evulation?

17:23 well , not "should", but was expecting it to work

17:23 Bronsa: bbloom: ToxicFrog looks like (def foo (fn [] (foo :a))) actually does (def foo (fn foo [] (foo :a)))

17:24 dnolen: bbloom: only if you turn those optimizations on

17:24 bbloom: or advanced compile

17:24 bbloom: kyled: yeah that `var foo =` analogy is a good one, but it's a side effect of the cljs implementation. that works on jvm clj

17:24 kyled: bbloom: ah, i assumed it work work on the jvm =)

17:24 hm, well thanks for looking at it

17:25 bbloom: should be easy to work around

17:25 robink: How do you select an HTML element that contains another element matching some spec in Laser?

17:25 i.e. I want child-of that returns the node matched by the first selector, not the last, but returns anything iif all three selectors match (implicit and)

17:25 sorry, all n selectors

17:25 (and I only need to use two)

17:26 So I want to match, for example, a <td> element iif it contains a <b> element as a direct descendant.

17:27 and I *only* want the <td> (in some cases I don't even need the :content key, but it would be nice to always have it)

17:30 dnolen: bbloom: kyled: http://dev.clojure.org/jira/browse/CLJS-580, it's a bug around def + fn

17:31 bbloom: dnolen: yup :-) thx for logging it

17:32 ToBeReplaced: amalloy: what would you think about breaking up flatland/useful? -- i don't like that "map-keys" involves clojure.tools.macro as a dependency

17:32 kyled: dnoley: thanks for reporting. First bug in a programming language rather then an application that i found =p haha

17:34 ToBeReplaced: amalloy: plus it would let those parts evolve independently... for example, i'd be more inclined to make recommendations for "contains-keys?" if there was a dedicated map-utils library people cared about

17:34 technomancy: [useful-core "1.1.0"]

17:36 clojurenewb_: hey guys, I've got a list of vectors where the first item in the vector is an #inst, I'd like to filter keeping anything in the last day, how do I do it ?

17:36 ToBeReplaced: technomancy: is that a real thing? or what you'd rather see?

17:37 technomancy: not a real thing and probably not a great idea

17:37 callen: ToBeReplaced: usually he makes fun of things with 'core' in the name.

17:38 ToBeReplaced: having a "misc" bucket is usually a bad idea.

17:38 ToBeReplaced: hence breaking it up

17:38 callen: `cbp: I think you're done: http://hugoduncan.org/post/alembic_reloads_your_project_clj_dependencies/

17:39 ToBeReplaced: actually, is there a good reason why "contains?" only accepts two arguments? I'd think that (contains? key1 key2 ...) would make sense.

17:40 i really hate writing (every? #(contains m %) ks)

17:41 justin_smith: clojurenewb_: ,(filter #(< (- (.getTime (java.util.Date.)) (.getTime (first %))) (* 1000 60 60 24)) [[(java.util.Date.) :data]])

17:41 ,(filter #(< (- (.getTime (java.util.Date.)) (.getTime (first %))) (* 1000 60 60 24)) [[(java.util.Date.) :data]])

17:41 clojurebot: ([#inst "2013-08-29T21:18:33.324-00:00" :data])

17:42 hyPiRion: ToBeReplaced: You want contains? to be vararg?

17:43 callen: I had a similar reaction ^^

17:43 ToBeReplaced: you know how slow apply is...right?

17:43 ToBeReplaced: hyPiRion: yes (not necessarily "wants", more like wondering)

17:43 hyPiRion: ToBeReplaced: what would (contains? m) be?

17:43 clojurenewb_: justin_smith: thanks, I'll give it a go

17:43 callen: hyPiRion: if this was haskell, a partial function >:)

17:43 ToBeReplaced: bad number of args exception

17:43 hyPiRion: callen: heh

17:44 ToBeReplaced: you wouldn't have to use apply to implement it

17:44 futile: To shuffle your playlists, iTunes just shuffles the whole thing when it starts, and when it reaches the end and has to start over, it just shuffles it again. And it shuffles when you overflow in the reverse direction too. Which means if you just started the cycle over and hit previous-song, it'll be a brand new song.

17:44 justin_smith: clojurenewb_: (defn days->ms [days] (* 1000 60 60 24 days)) would make the code more readable

17:44 then you could insert (days->ms 1) instead of the inline multiply

17:44 * ucb waves

17:45 futile: I think a combination of mapcat, shuffle, and cycle would work better.

17:45 holo1: hi

17:46 futile: Then again it's a little foggy on what exactly should happen when you remove a song from a playlist that's already been played.

17:46 callen: ucb: hai

17:46 futile: Clojure has corrupted my thinking.

17:46 callen: hyPiRion: I am envious at times of the automatic partial application.

17:47 ucb: callen: haibak

17:47 hyPiRion: callen: Yeah, one of the "issues" with clojure is that identity and partial are too verbose

17:48 ToBeReplaced: (defn contains2? "contains? with varargs" ([coll key] (. clojure.lang.RT (contains coll key))) ([coll key & more] (every? #(contains? coll %) (cons key more))))

17:48 hyPiRion: I wouldn't mind explicit partial application if it was shorter

17:49 ToBeReplaced: no apply, only works with 2+ args, returns true if (get coll k) works for all k in ks

17:49 futile: hyPiRion: like #() ?

17:49 hyPiRion: futile: no, that's not partial application sadly

17:49 futile: hyPiRion: is (partial ...)?

17:49 * futile wonders of corrupt and interrupt are related

17:50 callen: hyPiRion: verbose and in the latter case, slow.

17:50 hyPiRion: futile: yes. See the difference when doing (let [f (partial max-key identity)] (f 1 2 3) (f 4 2) (f 5))

17:50 * futile wonders about rupture too

17:50 callen: hyPiRion: I need a macro that rewrites fn and defn in terms of partial closures.

17:50 holo: how to convert from "[a-z]" into #"[a-z]" ?

17:50 futile: hyPiRion: that just need %& right?

17:51 metellus: holo: re-pattern

17:51 hyPiRion: futile: no

17:51 futile: oh

17:51 well ok then

17:51 hyPiRion: Then you'd have to add in apply too

17:51 and then suddently partial is shorter again

17:51 futile: ahh

17:51 Bronsa: just (def p partial) and you're good to go :P

17:52 holo: (inc metellus)

17:52 lazybot: ⇒ 4

17:53 metellus: holo: also if you're doing any escaping, you need to double-escape

17:53 ex. (re-pattern "\\d") becomes #"\d"

17:53 futile: (inc Bronsa)

17:53 lazybot: ⇒ 9

17:53 futile: $karma futile

17:53 lazybot: futile has karma 2.

17:54 futile: yay ive helped 2 people

17:54 holo: metellus, thanks

17:54 hyPiRion: Bronsa: Hm, I'm tempted to make a library containing two functions: `p` and `id`. Guess what they do

17:55 Bronsa: hyPiRion: you'd already have a user.

17:56 hyPiRion: I'll call the library "p-and-id", then you can (:use p-and-id)

17:56 futile: hyPiRion: what would id do?

17:56 oh

17:56 Bronsa: hyPiRion: I currently cheat a bit and let emacs display "partial" as "Ƥ" and "comp" as "·"

17:57 futile: i tried that and it got so annoying i had to remove it

17:57 hyPiRion: Bronsa: Oh, that's smart. I just convert fn to lambda.

17:57 Bronsa: let me figure out a good greek letter for identity

17:57 hyPiRion: that too

17:58 also "contains?" to "∈", "nil" to "∅" and a few others

17:58 saves some space and looks better

17:59 brehaut: Bronsa: how do you set those up? I want to do stuff like that for core.typed

18:00 bbloom: *cringe*

18:00 hyPiRion: Bronsa: I wouldn't be surprised if you display "not=" as "≠", "<=" as "≤", "Math/sqrt" as "√", "every?" as "∀" and "some" as "∃"

18:00 Bronsa: brehaut: disclaimer: it's ugly and I don't know any elisp but: https://github.com/Bronsa/.emacs.d/blob/master/config/hooks.el#L32

18:00 hyPiRion: some of those.

18:01 brehaut: Bronsa: i can handle ugly. i dont know elisp either

18:01 callen: Bronsa: standard font lock stuff.

18:01 hyPiRion: Bronsa: Obviously you'd have 1500 lines of code to convert core.typed to formal math definitions.

18:02 bbloom: i understand that mathematical notation is nice and terse … but let's all remember that it was designed by people who had to write it by hand on paper....

18:02 :-)

18:02 callen: bbloom: haskellers are far worse about it.

18:03 brehaut: bbloom: thats the wonder of views, we can both have it our own ways

18:04 Bronsa: bbloom: i still write "not=", i just find it faster/easier/prettier to read it as "≠" for instance

18:04 ToBeReplaced: Bronsa: how does that affect things like indent-region?

18:05 Bronsa: ToBeReplaced: it messes it up unfortunately.

18:06 hiredman: Bronsa: you should pull that out in to a minor mode

18:06 Bronsa: hiredman: so i can disable&reindent?

18:07 hiredman: yeah

18:07 Bronsa: yeah, I'll probably do that, thanks

18:08 hiredman: I'll steal your gist as payment

18:09 ToBeReplaced: Bronsa: that would make me use it -- i'd setup a hook to run an indentation function on toggle -- i use prelude, so for me prelude-indent-region-or-buffer

18:10 Bronsa: hiredman: ToBeReplaced I'll have it done by tomorrow, I'm going to bed now

18:10 brehaut: Bronsa: awesome

18:11 hyPiRion: Emacs, turning your favourite language into APL since 1976

18:13 brehaut: hyPiRion: and for extra fun, turning APL into your favorite programming language

18:13 hyPiRion: Better start making that APL->Clojure translator then

18:17 kmicu: https://github.com/drothlis/pretty-symbols

18:17 https://github.com/hackscience/purty-mode

18:18 And of course http://www.emacswiki.org/emacs/PrettySymbol

18:20 hyPiRion: I need one of those for latex mode

18:21 purty-mode is close on that.

18:24 kmicu: It looks cool, but it can be a pain for haskell indentations modes ;]

18:25 futile: has Clojure been ported to Erlang's VM yet?

18:32 Raynes: futile: Joxa is reasonable.

18:32 Not Clojure though.

18:32 futile: neat

18:34 http://docs.joxa.org/en/latest/quick-start.html :)

18:35 srruby: How do I get pprint to print new lines rather than \n\n ?

18:37 amalloy: the printer wouldn't be very pretty if random newlines in your strings misaligned everything

18:41 callen: Raynes: at least with Joxa you get TCO, lol.

18:42 Raynes: Oooh, sick burn callen. Sick burn.

18:43 cgag: what do we miss out on having to use recur vs having real TCO?

18:44 `cbp: writing code like schemers

18:45 cgag: is it just the elegance of actually reusing hte function name or are there bigger issues?

18:46 technomancy: all non-recursive tail-calls are marginally more efficient

18:47 ozzloy: i'm trying to convert lines 11 through 17 to more idiomatic clojure and failing. is there a way i can put the imports into the ns form with :import ?

18:47 http://goo.gl/ZIST9y here

18:48 short of having a (:import ...) for every. single. class... i really like the shorthand notation afforded by the (import ..) form

18:49 AimHere: Something like (ns <wibble> (:import [foo.bar baz.Wibble fred.Barney stadtler.Waldorf] [pugh.pugh barney.Mcgrew])) works for me

18:50 Basically a bunch of vectors of the form [prefix suffix1 suffix2 etc] for each class denoted by prefix.suffix

18:51 ozzloy: cool. i'll give that a shot. can i nest those?

18:51 AimHere: I don't know, offhand. Never tried!

18:52 It still cuts down on your typing even without nesting

18:52 technomancy: nesting works but messes with your ability to grep; not recommended

18:52 ozzloy: like a.b.c a.b.d a.e.f imported by (import [a [b c d] e.f])

18:52 o ok

18:52 AimHere: Clojure is too powerful for our own good

18:53 `cbp: ozzloy maybe you're forgetting to remove the quotes?

18:57 callen: AimHere: maybe for you.

18:57 AimHere: I could do with some more power.

18:58 technomancy: oh, btw, I used robert.hooke to great effect recently. Why didn't you mention it when I was having trouble?

18:58 ozzloy: `cbp, nah, just didn't know it needed to be a vector

19:00 i'm in the process of making that more idiomatic to clojure, let me know if you have suggestions. i'm new to clojure, so i wouldn't be surprised if there were lots

19:00 AimHere: I think other collections work, but vector is my default collection when I don't know any better!

19:03 `cbp: ozzloy: it doesnt need a vector though

19:03 cgag: those chains of java calls could probably be one with ->, or maybe it has to be doto since it's interop stuff

19:19 ozzloy: technomancy, i know you said not to, but i wanted to try it and see. i get a compile error though https://www.refheap.com/18163 what's the right syntax? my googling shows nothing

19:20 AimHere, cgag, thanks for looking!

19:22 `cbp: damn it! no websockets on ios safari ;_;

19:25 callen: `cbp: welcome to the jungle. You might consider Google's BrowserChannel - which works in CLJS too.

19:27 ozzloy: http://clojuredocs.org/clojure_core/clojure.core/doto in the first example, the comment says "doto still returns the date object". what date object?

19:27 maybe that's a holdover from a prior example?

19:27 hyPiRion: ozzloy: they mean the hashmap

19:28 ozzloy: cool, thought so

19:40 fixed it. that's ok, right?

19:41 also, is it the case that there is no doc source code repo somewhere with pull requests and stuff?

19:42 or maybe this webterface is backed by something like that?

19:49 pandeiro: how can i tell which port an nrepl server is listening in (i started it with nrepl-jack-in from emacs)?

19:50 technomancy: pandeiro: cat target/repl-port

19:50 llasram: ozzloy: IIRC, the current clojuredocs.org is backed by a Rails application nobody wants to deal with, but an in-Clojure replacement is in the works. I believe by some of the ClojureWerkz people?

19:50 callen: llasram: the CLJWRKZ thing has been long coming and doesn't seem to be materializing.

19:50 llasram: I am probably going to proceed with the wiki so that an alternative is out there.

19:51 I'm really...really tired of using clojuredocs.

19:52 technomancy: does the in-repl clojuredocs client work?

19:52 pandeiro: technomancy: no such file in the project directory

19:52 technomancy: pandeiro: either you need to update lein or you don't have a repl running

19:53 (or you started another repl and exited it, which overwrote the first repl's state)

19:53 pandeiro: 2.3.1?

19:53 technomancy: yeah, you want 2.3.2

19:53 that version has zarro boogs

19:53 pandeiro: man i gotta get with the times

19:53 :)

19:54 callen: technomancy: ...the what?

19:54 how do I never know of these things ;_;

19:55 technomancy: oh... it might have been dropped from the default lein repl due to a preponderance of apache httpcilent conflicts

19:55 https://github.com/dakrone/clojuredocs-client <- put this in your user profile or something

19:56 (never used it myself)

19:56 pandeiro: technomancy: the *nrepl-server* buffer had the info btw, dunno why i didn't look there first

19:56 callen: technomancy: I'd rather allocate the time to the wiki.

19:56 technomancy: but thanks for mentioning it, I'll keep it in mind in case anybody asks.

19:57 technomancy: callen: just curious if it works actually

19:57 I personally don't understand why people like to look that kind of stuff up in a browser

19:58 callen: What I have in mind for a wiki is a bit more expansive than an alternative to (doc ...)

19:58 and would entail reading content longer than a function signature.

19:58 technomancy: I thought the point of clojuredocs was user-submitted examples

19:58 (says the guy who has never used it)

19:59 callen: technomancy: the point of a wiki is to make contribution straightforward and pain-free.

19:59 technomancy: so user submitted examples are part of it.

20:00 technomancy: do people actually use clojuredocs just for docstring lookup?

20:00 callen: technomancy: some do.

20:00 but stuff closer to EmacsWiki and c2 is also what I have in mind for the wiki.

20:00 technomancy: the young people these days

20:00 * callen shrugs

20:00 technomancy: I do not understand them

20:00 what with their rock music, their long hair, and their dope

20:01 callen: my repl suffices for docstrings, but I'll use clojuredocs for idioms/examples sometimes.

20:01 but I'd really like longer form discussion.

20:01 when it makes sense.

20:01 in particular for things like atoms.

20:01 or binding.

20:02 pandeiro: hm, can i make a have an nrepl server not bind to just one specific address?

20:04 llasram: pandeiro: You mean like bind to 0.0.0.0 ?

20:04 callen: llasram: he might mean ports.

20:05 pandeiro: llasram: yeah so i could do something like lein repl :host 0.0.0.0 :port 8765 ?

20:05 ugh no :host, thought i had read that

20:06 llasram: pandeiro: You can specify it in your project-map :repl-options

20:06 pandeiro: ah ok that's good to know

20:06 but what i needed was :start i think

20:07 llasram: Ah, cool

20:08 pandeiro: 0.0.0.0 means any host, eg both 127.0.0.1 and 192.168.x.x ?

20:08 llasram: pandeiro: Yes. It means all available host addresses

20:09 (for binding purposes, specifically, that is)

20:09 pandeiro: huh, still refusing connections

20:10 ozzloy: what's the rationale behind not having multi-line comments? (comment ...) doesn't count

20:11 llasram: ozzloy: What would be the rationale behind having them? I'd say the trend is against

20:11 ddellacosta: ozzloy: ,(comment you can it with this)

20:11 ,(comment test test test)

20:11 clojurebot: nil

20:11 ddellacosta: well, should have expected that I suppose

20:12 ozzloy: llasram,

20:12 er...

20:12 ddellacosta: oh, sorry, I saw you said that doesn't count, my bad

20:12 llasram: pandeiro: Works for me. Hmm. What OS are you running?

20:12 ozzloy: http://goo.gl/ZIST9y so at the beginning of this document i wanted multiline comments

20:12 * ddellacosta goes to make coffee to wake up

20:12 callen: ozzloy: that doesn't make any sense. Why doesn't (comment ...) count?

20:13 llasram: pandeiro: (not that this would matter for working, but affects my ability to troubleshoot :-) )

20:13 callen: ozzloy: (comment ...), single line comments, and docstrings all solve different problems.

20:13 ozzloy: ddellacosta, i know about (comment ...) but that requires well formed expressions, so the & messed it up

20:13 and :

20:13 callen: ozzloy: the general philosophy in Clojure is to make something solve one problem.

20:13 pandeiro: llasram: nvm, just got it

20:13 callen: or as Halloway calls it in cult-speak, "simples"

20:14 llasram: pandeiro: Awesome

20:14 hyPiRion: The comment macro won't stop the reader from crashing

20:14 Steve973: wow, there are a lot of people in here!

20:14 ozzloy: callen, ok, the problem i'm having is that i have multiple lines of text and i'd like to put them in the code as a comment without worrying about if they're well formed s-expressions

20:14 hyPiRion: ,(comment 5-/12 <- won't work)

20:14 clojurebot: #<NumberFormatException java.lang.NumberFormatException: Invalid number: 5-/12>

20:14 ozzloy: is there one thing that solves that problem

20:15 seems like "no"

20:15 callen: ozzloy: make a big string.

20:15 llasram: ozzloy: Ok, then just make each line a comment, like you've done, right? I'm not sure what an explicit multiline comment gets you outside of the ability to forget to terminate it

20:15 callen: ," (broke ass code lel "

20:15 clojurebot: " (broke ass code lel "

20:15 callen: ozzloy: also use a real text editor that lets you comment blocks of code at a time.

20:16 ozzloy: yeah, that's what i ended up doing

20:16 callen: then single line vs. multi-line is a meaningless distinction.

20:16 ddellacosta: yeah, I solve it my tying a key command to comments, easy-peasy

20:16 callen: `C-c c m` for me.

20:16 hyPiRion: Usually, if I need to write prose inside the codeblock, it seems more sensible to put it outside of the codebase and into documentation

20:16 ozzloy: callen, M-; already does it

20:16 ddellacosta: !

20:16 ozzloy: er... assuming emacs

20:17 callen: ozzloy: old weird habits, don't ask.

20:17 ddellacosta: ozzloy: it does. Didn't know that, hot damn. And I went through all that work…well, 30 seconds of work

20:17 callen: and yes, it's Emacs.

20:18 * ddellacosta sobs a little and checks on coffee

20:18 llasram: "I can't believe it's Emacs!"

20:18 callen: ddellacosta: "Emacs: we've already got it"

20:18 "It's too late, we've seen everything."

20:18 hyPiRion: C-x r t ;; RET also works, and is a bit more, hm, flexible in cases

20:18 ddellacosta: callen: seriously. I need to read the docs more, rather than open up .emacs I suppose

20:18 callen: ddellacosta: probably yes.

20:18 ddellacosta: let me know if you end up using blackwater btw.

20:19 llasram: "I'm taking the Emacs challenge, and have replaced my wife's regular text editor with Emacs. Let's see if she notices!"

20:19 ddellacosta: callen: oh, yeah, will do, but probably won't be any time in the next week or so. Lotsa front-endy kinda fiddling ta do.

20:19 ozzloy: callen, man, that was the first time i'd seen patrick stewart do something funny. i laughed for quite a while

20:19 ddellacosta: llasram: *snort*

20:20 callen: ddellacosta: sure sure. I just like seeing the queries stream past in my terminal. :)

20:20 (and the times, so I know when to add an index)

20:20 ddellacosta: haha, gotcha.

20:21 callen: ozzloy: Patrick Stewart is great. You should follow his twitter.

20:21 also if I didn't have Nose integrated into my Emacs, I would go mad.

20:21 this Python code is like following a mangled ball of yarn a kitten attacked.

20:22 brehaut: callen: explicit is better than implicit, but we dont like functional ideas

20:23 callen: brehaut: apparently implicit is okay if you slap a Class on it or it's mutation inside a method.

20:23 brehaut: too bad Guido is an ignoramus.

20:23 brehaut: callen: but reduce just makes ugly code or is used to write sum, and we already have sum!!

20:23 callen: brehaut: derpiest shit I'd ever heard from a language designer.

20:23 pandeiro: ok so if lein repl :headless is called, the host defaults to "127.0.0.1", but in lein's sample.project.clj under [:repl-options :host], it shows "0.0.0.0" - is that not the default value?

20:23 callen: Even the Golang people are savvier than that.

20:23 brehaut: some wise guy sent him SICP in the mail :P

20:24 callen: brehaut: if he's too lazy to have tried to learn anything from other languages by now, he won't change from having a book sent.

20:24 hyPiRion: Python: We don't have TCO because recursion is bad.

20:24 brehaut: callen: theres quite a lot of savvy in the go people. they arent solving problems i care about, or producing a language im interested in, but i think they are doing interesting things

20:24 callen: indeed. he just tweeted grumpily about it

20:25 callen: Golang is awfully weak and imperative though.

20:25 technomancy: pandeiro: sample.project.clj isn't about defaults

20:25 callen: Yuck.

20:25 brehaut: I'm fighting a Django app with class-based views. It's like somebody was intentionally trying to write Ravioli code.

20:25 hyPiRion: callen: weak as in?

20:25 callen: brehaut: http://c2.com/cgi/wiki?RavioliCode

20:25 brehaut: callen: i want to take an axe to django class based views every time i use them. also the way they do views in general

20:25 callen: hyPiRion: weak in terms of semantic power and type system.

20:26 pandeiro: technomancy: yeah i read that into it i guess; so the default with lein repl :headless is 127.0.0.1 i assume?

20:26 hyPiRion: callen: hah, agreed

20:26 callen: hyPiRion: the bullshit interface type casting to work around the useless type system makes it less safe than most dynamic/strong type systems.

20:26 ridiculous.

20:26 technomancy: pandeiro: yeah, defaulting to 0.0.0.0 would be disastrous

20:26 pandeiro: sure, ok

20:26 callen: brehaut: I can at least work with FBVs, but CBVs make me want to commit murder.

20:26 pandeiro: technomancy: it would probably increase repl usage however

20:26 callen: brehaut: I would seriously be bereft if I didn't have smart IDE functionality in my Emacs.

20:27 brehaut: callen: haha :(

20:27 callen: "Welcome to Ravioli code, where you need 10 buffers open to know what one endpoint is doing"

20:28 brehaut: callen: https://gist.github.com/brehaut/6384870

20:28 i use the hell out of that

20:28 callen: its adapted from steve losh's django annoying

20:29 callen: brehaut: out of spite I use FBVs even in apps that use CBVs. Just to poke them in the fucking eye.

20:29 brehaut: callen: haha likewise. i never use CBVs by choice

20:29 ddellacosta: why is there Python popping popping up on #clojure, ya'll trying to make me cry

20:29 hyPiRion: callen: the worst is probably the fact that if a struct Foo implements interface Bar, then I can return Foo whenever I expect a Bar. But a func() Foo is obviously not a func() Bar, which makes me wrap the code like this: func() Bar { return originalFunc() }

20:29 ddellacosta: I typed popping twice, probably Freudian slip somehow

20:30 hyPiRion: Well, except for the generics part.

20:30 callen: hyPiRion: I'm not convinced they knew what covariance and contravariance was when they built the language.

20:30 ozzloy: https://www.refheap.com/18164 is this acceptable, or would you break lines 2-4 into one line for each form?

20:31 callen: ddellacosta: sorry, just bitching about the 9-5 ick.

20:31 ddellacosta: interacting with Django class-based views makes me really irritable.

20:31 ddellacosta: callen: oh, I don't really mind. Just wanted to make a snarky comment about Python. Also, https://twitter.com/gvanrossum/status/352085842140991489

20:31 hyPiRion: callen: I'm not convinced they know much about types in general, really.

20:32 hiredman: the lack of dynamic code loading is annoying

20:32 callen: ddellacosta: oh fuck him. he made a language halfway to Lisp from Java.

20:32 ddellacosta: and Java was halfway to Lisp from C.

20:32 technomancy: hiredman: "please don't do anything interesting with our runtime; kthxbai"

20:32 callen: they're all just Zeno's paradoxing their way to Lisp.

20:32 hiredman: :)

20:33 ddellacosta: callen: I have SO much I could say but I will leave it off. ;-)

20:33 also, note what that tweet was a response to.

20:33 callen: ddellacosta: well now I'm curious. privchat it if you must.

20:34 ddellacosta: I noticed. He's forever and always lazy.

20:35 ddellacosta: callen: I will say only this, a programming language should not come with a sheet of commandments that acolytes can point to whenever you do something their little minds don't approve of with their precious holy language. NOT THAT I'VE HAD BAD EXPERIENCES WORKING WITH PYTHON DEVS OR ANYTHING

20:35 technomancy: um

20:35 ,(doc contains?)

20:35 clojurebot: "([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'."

20:35 ddellacosta: sorry, that was over the top. Apologies, #clojure

20:36 anyways, back to CLJS

20:36 callen: ddellacosta: lol. it's okay. I know how you feel.

20:36 gdev: I'm glad Rich took the opposite approach of Guido and said, here's macros add whatever you want

20:36 ddellacosta: I mean, there are community themes in Clojure so to speak, don't get me wrong.

20:37 callen: gdev: ish? we're more conservative than Common Lispers are.

20:37 ddellacosta: but, number one seems to be, "think about it"

20:37 callen: I'm sure you're right, I don't know much about CL community. Although I think the Steve Yegge post from a year or so ago about that was really off-base.

20:37 hyPiRion: We're super conservative, just ask Steve Yegge.

20:38 oh, ddellacosta beat me to it.

20:38 callen: ddellacosta: I'm speaking from experience, not Yegge.

20:38 ddellacosta: callen: yah, I can't speak to that, like I said don't know CL community.

20:38 gdev: callen, how liberal are CLispers?

20:38 ddellacosta: maybe a little conservatism is good when you are building shit for people to use. Dunno (seriously)

20:39 callen: ddellacosta: prolly.

20:39 gdev: depends on the individual, but generally - very.

20:39 gdev: that's why I'm ruthless about doing whatever I want in Clojure. I tip-toe'd more in CL.

20:39 hyPiRion: callen: the problem is that you're attaching the labels "conservative" and "liberal" as if those are the only datapoints you can measure languages and communities with. It's very, very dangerous to say "oh, we can place languages on a line and get 100% information out of it"

20:40 callen: hyPiRion: no I'm not.

20:40 It's just one of many descriptors.

20:40 hyPiRion: *is that if

20:40 callen: CL is more liberal as a community. I'm not describing anything but that particular axis.

20:40 ddellacosta: I kind of agree with hyPiRion and now see that hyPiRion and callen don't really seem to be disagreeing.

20:40 callen: I would describe Haskell as being more liberal culturally than Clojure as well.

20:41 ozzloy: vigorous agreement all around

20:41 callen: because they spend as much time exploring *how* to program in new and otherwise unheard of ways than actually programming.

20:41 ddellacosta: heh

20:41 hyPiRion: I have problems understanding what a liberal and a conservative language is

20:41 gdev: me too

20:41 ozzloy: i was vigorously agreeing with someone in here yesterday

20:41 hyPiRion: It's much more than just "oh, we won't implement this feature" and "oh, we'll implement ALL the features!"

20:42 ddellacosta: callen: again, aren't we talking about meaning of liberal/conservative? That was the biggest irritation I had about that Yegge article. It was so damn prescriptive. Conservative thinking, if you will

20:42 yeah, what hyPiRion sez

20:42 callen: hyPiRion: I'm speaking to a variety of factors

20:42 such as the average risk tolerance of a user in the community

20:43 the willingness/proclivity to explore, hack, fuck with the implementation itself

20:43 bend/break the implementation to match desired semantics

20:43 practicality of how the language is used

20:43 technomancy: I'd place CL as more of an anarchist/survivalist community

20:43 callen: degree to which the language represents the bleeding edge.

20:43 gdev: I was just describing how Guido is a BDFL and Java has that whole JSR process...we have macros and extendtype

20:43 technomancy: limiting the power of the programmer is the one unforgivable sin

20:43 ddellacosta: I don't think that is an unreasonable definition

20:43 callen: technomancy: sounds about right.

20:43 ddellacosta: technomancy: interesting framing.

20:43 technomancy: meanwhile you have all these isolated individuals trying really hard to build their own utopia

20:43 callen: so when I say CL is more liberal than Clojure, I'm accounting for everything I just said.

20:44 technomancy: hahahaha. so true.

20:44 technomancy: *cough*axisofeval*cough

20:44 ddellacosta: callen: alright, that + technomancy's description make it easier to grasp.

20:44 callen: technomancy: "IN MY DOMAIN, WE SHALL HAVE LAZY SEMANTICS!"

20:44 ddellacosta: haha

20:44 hyPiRion: "Look at this beatiful type system I build on top of CLOS"

20:44 gdev: you're complecting my mellow man

20:47 callen: Choice quote from Axis of Eval, "I enjoyed meeting Pascal Costanza and Charlotte Herzeel. Pascal shares my disdain for the aberration that is Lisp-1 and doesn't tire of telling Schemers so."

20:47 lol, k

20:49 gdev: in other news at our joy of clojure book club we try some 4clojure problems. "Gary what did I do wrong?" (fn [x] str("Hello, " x "!")) "...put that function *inside* the parens" "omg it works!" *tear* it's so beautiful

20:50 technomancy: "Sorry, I can't hear you over the sound of how awesome having to keep functions in a separate namespace from all other values is."

20:51 hyPiRion: Those enlightening moments are very dangerous. It's like "Oh, this is so amazing! I can use this for everything!", and you're in this euphoria where you actually do use it for everything.

20:51 ddellacosta: Woah, Axis of Eval is a thing

20:52 so, the thing is, criticizing other ways of doing things in that fashion is rather conservative, IMHO

20:53 callen: dnolen: bad news, Common Lispers beat you guys to the whole async thing: http://axisofeval.blogspot.com/2013/05/green-threads-in-browser-in-20-lines-of.html

20:53 ddellacosta: although, they mention Perl in the next post, so maybe it's just bad first impressions

20:53 callen: ddellacosta: it's not conservative or liberal to hate other things, just narrow.

20:54 dnolen: callen: heh, an abomination

20:54 callen: I see both types criticizing other languages.

20:54 dnolen: that's everything that comes out of CL though.

20:54 ddellacosta: callen: fair enough!

20:54 is that Wat thing like Lisp but with arrays + strings? wacky

20:54 callen: liberal CLers will complain about not having eval, conservative Java ERP coders will complain about...I'm not really sure what they complain about. I'm not sure they even know what they're missing out on.

20:55 rigger: hahaa

20:55 dnolen: ddellacosta: Manuel Simoni is a funny a guy, I differ with most of his opinions.

20:56 this is a pretty awesome tumblr though, http://this-plt-life.tumblr.com

20:56 callen: time to commit some mutable evil with a setInterval.

20:56 ddellacosta: dnolen: I figured you would be aware of his work…seems like he's got a crazy approach though. But don't know enough about his work yet

20:56 dnolen: oh, I love that tumblr!

20:56 dnolen: ddellacosta: I don't like his work at all

20:56 ddellacosta: I appreciate his sense of humor is about it

20:57 hyPiRion: http://thisotplife.tumblr.com/ is also good

20:57 ddellacosta: dnolen: Love this one: http://this-plt-life.tumblr.com/post/55420560033/when-somebody-offers-me-promises-as-a-replacement-for

20:57 dnolen: ddellacosta: haha yeah that's a good one

21:00 callen: hyPiRion: the "string or list of integers?" speaks to me.

21:01 hyPiRion: speaks to pain...and lost sanity...and cursing myself for not learning to speak Dialyzer.

21:02 ddellacosta: cemerick: I would like to help with lein-cljsbuild, btw, let me know if you want to throw anything at me. One big thing I really want is being able to easily specific build profiles when testing...

21:02 callen: ddellacosta: I think cemerick merged a really old PR or something I had for cljsbuild. He might be in the mood for contributions.

21:02 like...last night.

21:03 hyPiRion: callen: yeah, Dialyzer is one of the things you should understand after you've grokked OTP

21:03 ddellacosta: callen: yah, I should put my money where my mouth is and just start tweaking shit and sending PRs

21:03 hyPiRion: also http://thisotplife.tumblr.com/post/52897638378/when-you-went-full-speed-ahead-with-iso-latin-1-encoded

21:03 cemerick: ddellacosta: Noted, thanks. Though, it's going to be more of careful pruning and triage for a while, at least until a 1.0.0 is out.

21:04 ddellacosta: but, can't you use lein profiles for particular cljsbuild configs/profiles?

21:04 callen: hyPiRion: that OTP life tumblr is AMAZING

21:04 ddellacosta: cemerick: okay, that makes sense. re build profiles--not while testing, not last time I checked. I end up commenting out build profiles in project.clj (uber-yuck)

21:04 callen: ddellacosta: I just break shit. works great for me.

21:04 ddellacosta: cemerick: at least, with testing using lein cljsbuild test

21:05 callen: ddellacosta: when you've broken something, you feel obligated to fix it. then you do. now you've contributed.

21:05 cemerick: ddellacosta: If that's still the case, then something's badly broken. File an issue, if you can put together a reproducable project.clj that exhibits the behaviour.

21:05 ddellacosta: callen: haha, yeah

21:05 cemerick: okay, let me make sure I'm not crazy…could be running something outdated.

21:06 cemerick: will need to put together an example project that shows the behavior too

21:07 er, like you said. really need more coffee

21:10 brainproxy: OH: "pretty much the only thing you can't do in Emacs is go to the bathroom..."

21:11 gdev: brainproxy, M-x port-o-potty

21:12 it searches the file system and opens the first java file it finds for you to pewp on

21:12 dnolen: love that core.async, http://gist.github.com/swannodette/6385166

21:22 ddellacosta: dnolen: nice. About to integrate core.async with a production app shortly

21:23 dnolen: ddellacosta: cool! I think this pattern could be much improved ... thinking ...

21:26 ddellacosta: dnolen: would be nice to be able to pass a channel to the task, methinks

21:27 dnolen: ddellacosta: yes ... but also I think you want a more flexible relationship between supervisor and the task ... current task is an opaque fn

21:27 s/current/currently

21:31 bbloom: dnolen: https://news.ycombinator.com/item?id=6297680 <-- i got your back :-)

21:32 dnolen: bbloom: hehe nice

21:44 xeqi: ddellacosta: have you had any luck w/ an improved cljs workflow?

21:45 dnolen: getting warmer - http://gist.github.com/swannodette/6385166

21:45 ddellacosta: xeqi: unfortunately, I haven't had time to refine it yet…but probably will dig into it further today. Thank you for asking! I have to get into the flow with emacs + cljs.

21:53 robink: Is there way to get the immediate parent of a node in Laser?

22:14 callen: gdev: M-x port [No match]

22:14 gdev: you're a liar :(

22:15 well, at least M-x butterfly works.

22:17 `cbp: successfully flipped one bit!

22:20 brehaut: `cbp: black triangle achieved!

22:27 callen: The deep deep evil I commit in the name of capricious decisions...

22:40 gdev: callen, are you using Emacs Live from the Muddy Banks of the Wishkah configuration?

22:50 callen: gdev: I use a custom setup.

22:52 gdev: then just add port-o-potty.el to it

22:52 callen: gdev: I'd been using artisanal Emacs for years. I didn't even start using package management until recently because clojure-mode and nrepl were getting updated too frequently.

22:52 gdev: I don't like junking up github.com/bitemyapp/dotfiles :|

22:54 gdev: callen, you calling my port-o-potty junk?

23:44 futile: wat

23:46 I think rewriting things from scratch isn't given enough credit as a viable solution.

23:47 Sometimes a specific need can only be met perfectly when it's engineered from top to bottom.

23:48 But everyone seems to say "No don't do that, that's crazy! Just take the existing solution and tweak it to fit your need."

23:48 But it seems like I'm the only one who sees it this way.

23:49 ... which gives me a huge advantage.

Logging service provided by n01se.net