#clojure log - Dec 03 2013

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

0:00 khaled: halorgium: just checked the plugin name, La Clojure

0:05 bitemyapp: khaled: don't use la clojure.

0:05 ~laclojure is not the IntelliJ plugin you want to use

0:05 clojurebot: Roger.

0:06 justin_smith: there is a preview intellij plugin called cursive, that looks good from afar

0:06 though I don't use such things myself

0:07 I think you need to sign up for the beta to get it

0:07 dnolen: when you compare Angular.js and Ember.js the usual combination of libs, CLJS + React comes out looks pretty damn good

0:07 khaled: bitemyapp: wich one should I use?

0:07 dnolen: "Angular.js Ember.js and the usual combination of JS libs"

0:07 in terms of final minified zipped size

0:09 technomancy: ~laclojure is the intellij plugin with a decent license

0:09 clojurebot: 'Sea, mhuise.

0:10 khaled: as long as laclojure qive me syntaxe color and kind of completion it's enough for me

0:10 logic_prog: https://gist.github.com/txrev319/7764167 <-- how do I debug something like this? a line number would be helpful, but I see no line number

0:11 patchwork: Helping a friend install clojure-mode in emacs, clojure mode not showing up in package-list-packages .. ?

0:11 Anybody know what that is about?

0:11 technomancy: patchwork: add marmalade to the package archives list and M-x package-refresh-contents

0:12 patchwork: Hmm… elpa seems reaallly slow right now

0:13 jarodzz: why not use lighttable?

0:13 for ide

0:13 technomancy: jarodzz: again, terrible license

0:13 patchwork: hm; I read about some connectivity issues. maybe try temporarily adding melpa as a workaround till they get resolved

0:14 or M-x package-install-file from a git checkout of clojure-mode

0:14 patchwork: Yeah having a really hard time connecting

0:14 justin_smith: patchwork: are you going to try to get them set up with cider, or nrepl?

0:15 patchwork: Okay, after M-x package-refresh-contents with marmalade still no clojure-mode listed

0:15 jarodzz: i'm learning clojure and typing tutorials only. never pay attention to license

0:15 let me do so

0:15 patchwork: justin_smith: Just clojure-mode would be nice!

0:15 justin_smith: fair enough

0:15 anyone I know?

0:15 patchwork: a good start at least

0:15 Have you met nifong?

0:15 jarodzz: i'll move back to emacs-live then

0:16 technomancy: patchwork: I don't recommend leaving melpa in your sources list, but adding it temporarily to do a package or two should be fine

0:16 * technomancy registers scalemarmalade.org

0:17 justin_smith: yeah, you'd think there were some marmalade users with the devop skills to make that thing rock solid

0:18 technomancy: justin_smith: the current site is written in node.js =(

0:18 so only one man is brave/crazy enough to touch the damn thing

0:18 patchwork: technomancy: Huh, yeah he's a newbie so I'd rather not leave melpa in his sources

0:18 I'll just have him install from source

0:19 justin_smith: patchwork: no, I don't think I know nifong

0:19 patchwork: He hung out at the space, back when that was a thing

0:20 justin_smith: ahh, may have met him briefly there

0:20 nifong: Yeah I may have met you once :)

0:21 technomancy: marmalade downtime is usually pretty brief, but this time the maintainer is flying from the UK to India

0:21 https://mobile.twitter.com/nicferrier/status/407737142228426752?p=v =\

0:21 justin_smith: (with the server as a carryon)

0:22 technomancy: hahaha

0:22 patchwork: Ah, bummer! bad time to show somebody clojure for the first time I guess

0:22 justin_smith: "please shut down all your node.js webservers while we prepare for takeoff"

0:22 technomancy: hehe

0:23 it is pretty amazing that clojars never has these kinds of problems

0:23 but I guess that's what happens when you use not-node.js

0:23 the maintainer is also working on a rewrite that uses static files

0:23 justin_smith: "in the event of an emergency water landing, the bloat in your grunt file config will serve as a floatation device"

0:24 technomancy: so unless the underlying hardware goes down, most issues should be limited to uploads

0:24 which is the not-completly-insane way to do it

0:24 (he didn't write the thing originally)

0:24 lol bloat

0:25 justin_smith: I tried to help with some grunt problems on a recent deploy

0:25 to be fair I am by no means a javascript buy, but still...

0:26 noprompt: dnolen: is delay planned to make it into cljs?

0:30 justin_smith: patchwork: I am working on that plugin protocol. An absolute neccessity for me is keeping it super simple / functional / stateless. I'll run it by you tomorrow for feedback.

0:32 patchwork: justin_smith: Cool, looking forward to seeing it

0:32 justin_smith: I keep defining this: (def nothing (constantly nil))

0:32 dnolen: noprompt: huh, weird - all the support is there

0:32 justin_smith: (def default-migrate nothing)

0:34 noprompt: dnolen: oh my mistake, it was promise i was looking for. ;)

0:34 ughh i'm tired.

0:34 frontend development is hard on the brain.

0:43 jarodzz: i thought it's hard for F5

0:53 dnolen: this is pretty damn cool - https://gist.github.com/swannodette/7763911

1:02 brainproxy: dnolen: it is!

1:03 my coworker and I working on something we hope will be even cooler, powered by cljs under the hood

1:03 repo will be open to the public asap

1:07 dnolen: brainproxy: looking forward to it!

1:09 brainproxy: dnolen: it's a very different take on the whole reactive thing though

1:10 I expect some people will like it, others may find it strange

1:10 dnolen: brainproxy: neat - my primary interest in React is really the rendering model

1:10 brainproxy: we got inspired several months ago by David Harel's work on statecharts

1:11 from back in the 1980s,90s

1:11 he built a systems for interpreting statecharts which was used to synthesize realtime programs

1:11 for avionics

1:12 so our interpretation is kind of a synthesis of google polymer, scxml and what we read in harel's big book on statecharts

1:12 the interpreter is powered by cljs and core.async

1:12 the takeaway is that two dimensional pics can't be a program just like s-exprs and curly brace langs

1:12 *can be

1:13 not can't, whoops

1:13 noprompt: dnolen: i love writing dsls!

1:13 brainproxy: and html is good for serializing/expressing the kinds of pics that make up statecharts

1:14 noprompt: ok. time to check out this reactjs nonsense. :)

1:15 brainproxy: longer term we'd like to apply the approach that Harel proposes w/ live sequence charts, for building reactive UIs in an interactive fashion which is used to fuel whole program synthesis

1:15 but one step at a time

1:19 dnolen: brainproxy: interesting stuff, I've seen a presentation about state charts before but never read Harel's work, saved for later reading

1:19 brainproxy: dnolen: this is the "big book"

1:19 j.mp/harel-statecharts-scribd

1:19 http://j.mp/harel-statecharts-scribd

1:20 dnolen: his full list of papers is here, he's written a ton about reactive programming, but again coming at it from a bit different perspective

1:20 http://www.wisdom.weizmann.ac.il/~harel/papers.html

1:20 I suggedsted to Alex that he should invite Prof. Harel to speak at Strange Loop :)

1:21 not sure if that will ever happen though

1:24 noprompt: brainproxy: doesn't ember use state charts?

1:33 Jarda: is there a reason to use uberjar vs. lein trampoline?

1:33 I don't mind having leiningen installed on my production servers

1:34 jph-: it'd be nice if there were a lein ppa so i could manage it via apt on my ubuntu boxes

1:35 actually maybe there is

1:35 yeh, only older versions

1:36 hiredman: Jarda: you should build an artifact once and deploy it everywhere, don't build it everywhere

1:37 Jarda: hiredman: yeah, I distribute the app bundled inside a docker container

1:37 hiredman: Jarda: so?

1:38 Jarda: I'm just curious if there are performance etc related differences

1:38 hiredman: lein is still doing al lthe dependency resolution bits everytime you run it

1:38 Jarda: ok

1:38 hiredman: Jarda: it can, lein tends to send it's own options to jvm, prioritizing start up time over jitted code quality

1:39 Jarda: ok

1:40 hiredman: I seem to have a problem where there is something missing from the uberjar

1:40 I have java classes generated by wsimport

1:41 and when I run 'lein ring uberjar' and try to run the -standalone.jar created by the command with 'java -jar' I can't use the classes

1:41 but with lein trampoline I don't have those issues

1:41 hiredman: Jarda: how are you depending on those classes?

1:41 Jarda: hiredman: importing them

1:42 and they get imported, I get weird WSDL-factory related errors

1:42 hiredman: Jarda: I mean how have you told lein you depend on them?

1:42 Jarda: hiredman: oh, I haven't

1:42 hiredman: are they actually in the jar?

1:42 Jarda: I don't know if they are

1:42 hiredman: how are you generating them?

1:43 Jarda: cd src && wsimport https://someservice/wsdl -p some_service

1:43 hiredman: ugh

1:44 does that generate java source or bytecode?

1:44 Jarda: .class files

1:44 and the .class files seem to be inside the jar

1:44 hiredman: and you are putting them in src?

1:44 Jarda: http://stackoverflow.com/questions/14407218/consuming-wsdl-in-clojure

1:45 hiredman: (next you'll be checking the .class files in to git...)

1:45 are the class files in the jar named correctly?

1:45 Jarda: yes they are

1:45 and I don't get errors on (import ...)

1:46 it's when I try to use them I get weird jax-ws nullpointerexceptions

1:46 and this only happens when running the standalone jar produced by uberjar

1:46 hiredman: what is the actual stacktrace?

1:48 Jarda: http://pastebin.com/tWUJjfbS

1:50 hiredman: Jarda: the way lein is creating the uberjar is overwriting some file wasdl needs

1:51 http://mail-archives.apache.org/mod_mbox/cxf-users/201305.mbox/%3C1B4AE0ED-2D3F-4974-AD4F-2DD8E5F6EF03@apache.org%3E

1:51 they advise people using maven to use some plugin to merge the stuff

1:52 Jarda: hiredman: ok thanks your google-fu is much better than mine

1:53 hiredman: Jarda: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L354 might let you do the merging with lein, if you can figure out what needs to be merged

1:58 Jarda: hiredman: ok thanks now I think I have enought information

2:04 glosoli: any ideas for lain plugin capable of minifying js, css, html on build ?

2:05 s/lain/Leiningen

2:06 sm0ke: oh wow now there are jna bindings for clojure!

2:06 https://github.com/Chouser/clojure-jna

2:15 oh thats like 6 years old :P

3:02 nones: hello

3:02 Can you tell me, what mean this string?

3:02 (File. ^File (as-file parent) ^String (as-relative-path child))

3:05 andyf: nones: The File. means that it is calling a Java constructor for class File, whose full name is java.io.File

3:05 zerokarmaleft: nones: it's just a clojure-y way of calling this specific constructor http://docs.oracle.com/javase/7/docs/api/java/io/File.html#File(java.io.File, java.lang.String) with type annotations

3:06 andyf: The constructor takes two arguments. In this case they are type-hinted to indicate that the first arg is an object with type File, and the second is an object of type String

3:06 zerokarmaleft: s/annotations/hints/

3:07 quesebifurcan: hi, i'm looking into doing gui development with clojure. personally, i'm quite fond of the qt-framework and would like to use it, if at all possible. is qt-jambi still the way to go? most of the info i found was from 2008/2009. i would be very grateful for any advice.

3:08 nones: zerokarmaleft, thanks, I understood this

3:13 andyf: quesebifurcan: There might not be many people with a combined interest in Clojure and Qt development, but if there are, the Clojure Google group will hit a wider audience than this channel. You will undoubtedly get a suggestion to look at Seesaw, which is a Clojure library based on Java Swing components, so likely not what you want.

3:18 quesebifurcan: andyf: well, i have nothing against swing, yet :-) will definitely check seesaw. thanks a lot.

3:52 sm0ke: wow i cant believe joc's chapter on clojure is so bad!

3:53 on macros*

3:58 i mean the first edition

3:58 dont know about new book

4:07 expez: what's wrong with it?

4:13 sm0ke: well may be its just me, but i dont understand shit

4:14 he has examples all over for macros explaining what it does, but nothing on how it works

4:26 wink: I found nurkiewicz.blogspot.com/2013/06/clojure-macros-for-beginners.html to be quite nice

4:27 ~explained. no clue if it's correct

4:27 clojurebot: It's greek to me.

4:31 jph-: stupid question, but what does an @ symbol mean in clojure

4:31 im looking at @(http/get "http://http-kit.org" {:keepalive 30000}) as an example

4:32 sritchie: it's a dereference;

4:32 http-kit returns a future,

4:32 and if you want to block and wait for its value you can use @<thecommand>

4:32 jph-: ahh

4:32 sritchie: it expands out to (deref <thecommand>)

4:32 if you want to poke at some docs

4:32 jph-: so @ will block, without it it, it'll return something to go back to

4:33 like a socket i can query

4:33 sorry if im using wrong terminology

4:33 c/ruby guy here

4:33 wink: sritchie: wow, I'd never heard of that. do you know if that's "new"?

4:34 sritchie: jph-: well, it returns a future

4:34 that you might pass to another function, for example

4:35 wink: nope, around since the beginning

4:35 other things implement IDeref, though

4:35 jph-: im now reading up on futures

4:35 sritchie: atoms, for example -

4:35 jph-: thanks for pointing me in right direction

4:35 sritchie: an atom is a mutable reference to an immutable thing

4:35 for sure

4:35 so when you call @some-atom,

4:35 you're peeking at the current value

4:36 inside the atom, by dereferencing the atomic reference

4:36 futures (as returned by http-kit) just have this extra property that they're async

4:36 wink: sritchie: hm, wait, I just didn't make the connections to futures, now that I think of it. thanks.

4:36 sm0ke: is that correct statement? "an atom is a mutable reference to an immutable thing"

4:36 sritchie: or is that a var :)

4:37 SegFaultAX: No, it isn't correct.

4:37 Because it implies something about the value, but an atom can also refer to a mutable thing.

4:37 sritchie: I thought that clojure's atoms need to contain immutable things, since with the STM implementation calls to swap! can retry

4:38 SegFaultAX: An atom is just a mutable reference, full stop.

4:38 ucb: hais

4:39 SegFaultAX: sritchie: I guess the difference is in what's correct and what's possible.

4:39 sm0ke: "An atom is just a mutable reference" is the converse true?

4:39 sritchie: yup, agreed

4:39 sm0ke: is every mutable reference ana atom?

4:39 SegFaultAX: It's clearly unsafe to have a) side-effecting mutations or b) mutable state when using atoms or refs.

4:39 sm0ke: No.

4:39 sm0ke: i mean ##(do (def a 1) (def a 2))

4:39 lazybot: java.lang.SecurityException: You tripped the alarm! def is bad!

4:40 glosoli: anyone using optimus ring middleware knows how could I prevent it from crashing when there is no resource referenced in css ?

4:40 sm0ke: then is that proper way to define an atom? a mere mutable reference

4:40 SegFaultAX: sm0ke: Vars are interesting in that they have a root binding and a thread local binding, and those can be different things at different times.

4:40 magnars: glosoli: are you referencing a resource in your css that you don't have?

4:40 SegFaultAX: Refs are similar to atoms, but provide coordination.

4:41 glosoli: magnars: well it's not me, but yeah that's the problem

4:41 It's jquery-ui.css which has some resources that are not on the server

4:42 magnars: glosoli: ahh, that's an interesting case. so you're happy to not serve those assets?

4:43 glosoli: magnars: Yeah, though it's entirely wrong (I do understand that)

4:43 Hmm I might as well try and find them, do you know if I can somehow set encoding for js minifier? it outputs minified JS with some symbols missing in strings (which are utf8 symbols)

4:45 magnars: glosoli: the utf8 issue sounds bad - could you open an issue and give me some example code that fails?

4:51 glosoli: magnars: I opened an issue, can you check it if I need to provide more info ?

4:52 magnars: Thank you, that seems sufficient. I'll make a test case and reproduce it.

4:53 glosoli: magnars: also there is other problem with css, if it has "/css/jquery-ui/data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP/yH5BAEAAAAALAAAAAABAAEAAAIBRAA7, compiling:(routing.clj:63:3)" it does not seem to handle data url(data:) uri

4:54 it tries to retrieve it as resource in file system

4:54 which it isnt

4:54 magnars: excellent point - I'll get on that as well. Thanks!

4:55 karls: guys, does anyone know what happened to the marmalade repo? it seems to be down.

4:57 glosoli: magnars ah lol I opened duplicate issue for css

4:57 can you delete it ?

4:57 magnars: glosoli: I'll keep yours open, since it has more information. Thanks :)

4:58 rcg: huzza, jvisualvm ftw :D

5:01 glosoli: magnars: ok, np :)

5:03 magnars: the weird thing with CSS minifier, it does not even respect comments, the same data uri line commented out, still tried to find that file in file system

5:04 magnars: glosoli: yeah, the code that tries to figure out the CSS dependencies isn't a full fledged css parser, so it stumbles over things like that.

5:07 glosoli: hmm

5:17 jarodzz: ,(+ 1 1)

5:17 clojurebot: 2

5:20 glosoli: hmm magnars , maybe it has something to do that I use optimize/all (for you not being able to reproduce the utf8 issue)

5:20 ?

5:35 magnars: glosoli: no, it works for optimize/all too. I'll dig deeper tho, just thought I'd fix your data-uri issue first.

5:35 glosoli: magnars: ok, I will check out that utf problem

5:36 maybe I can produce a test that fails

5:36 magnars: excellent

5:51 glosoli: magnars: Hmm is there some way I could safely transfer you the file I am having issues with ?

5:53 magnars: glosoli: is it ok with email? Then this username at gmail.

5:53 glosoli: ok sec

5:55 magnars: did you get it ?

5:55 magnars: aye

5:57 glosoli: magnars: I couldn't reproduce by copying out the function which consists of such chars, dunno maybe file encoding is wrong or smth ?

5:58 magnars: glosoli: I'll check it out and see. :)

5:58 sm0ke: hello i so not understand how this works (do (defmacro mcro [y] `~y) (macroexpand-1 '(mcro x)))

5:58 ,(do (defmacro mcro [y] `~y) (macroexpand-1 '(mcro x)))

5:58 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

5:59 sm0ke: hmm no macros in clojurebot?

5:59 ok so result is x

5:59 how is that?

6:03 hmm weird so y is actually holding a symbol inside the macro right?

6:04 ,(def y 'x)

6:04 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

6:04 sm0ke: what!

6:05 hyPiRion: sm0ke: try out this instead:

6:06 ,`x

6:06 clojurebot: sandbox/x

6:07 hyPiRion: the reason why you get back x is because values to a macro aren't evaluated

6:07 if you did (mcro (foo bar baz)) instead, that would return (foo bar baz), not the value returned by it

6:07 by it => the call (foo bar baz)

6:09 sm0ke: hyPiRion: (foo bar baz) return a reference to list

6:09 actually it returns the class

6:10 hmm no you are right

6:35 ucb: what's a good lib for decoding netty's ByteBuffers? I know of gloss, however I need to iteratively parse different bits of the data as I go along.

6:35 I've recently seen the ANN for buffy, but I can't figure out how to decode a buffer with a given structure (nor how to extract a value from a buffer with a type)

6:36 I'm now testing balabit.blobbity however I'm wondering whether anybody has an opinion regarding any other lib out there

6:40 * algernon is happy with balabit.blobbity, but he's the author of that O:)

6:41 algernon: Buffy is likely faster, though, but I have not looked at it yet.

6:41 ucb: heh

6:41 well, buffy looks good for creating ByteBuffers and manipulating them

6:41 Jarda: is there a way to find out where I might have a circular dependency

6:41 I can't find any cirular requires

6:41 ucb: it's not entirely clear to me whether you can decode a ByteBuffer that comes from a client though

6:42 algernon: ucb: should be, it says so in the README

6:42 Jarda: on another machine lein ring server-headless crashes with some problem with a circular dependency

6:42 can't find it

6:43 or it crashes with StackOverFlowException and stacktrace leads to dependency resolution

6:43 ucb: algernon: what did I miss?

6:43 algernon: ucb: looks like if you have a number of smaller specs, you can (decompose) the buffer iteratively

6:43 let me cook up an example.

6:44 ucb: algernon: that'd be great; from reading the README and the source code I couldn't find a function like (decode spec buffer) or something along those lines

6:45 sm0ke: what are all the fn*, list*, .. is see in clojure? where are thry documented?

6:47 amro: sm0ke: they are used by clojure itself before it is fully bootstrapped

6:47 algernon: hmm.

6:47 ucb: I may be mistaken here. I seem to have misunderstood decompose

6:48 ucb: algernon: phew! :)

6:48 for a moment there I was doubting many of my taken-for-granted skills

6:49 sm0ke: amro: is there some reason they are not documented?

6:49 algernon: hmmm

6:49 sm0ke: are they not accessible to some coding in clojure?

6:49 amro: sm0ke: I think they are considered internals and there's no reason for you to use them

6:49 algernon: ucb: maybe you need to use (compose-buffer), with :buffer-type :direct or something, to get the raw ByteBuffer under a Buffy governance

6:50 but I don't quite understand that part of the code yet

6:50 ucb: me neither

6:50 llasram: sm0ke: It depends on the function/macro/etc

6:50 ,(doc list*)

6:50 clojurebot: "([args] [a args] [a b args] [a b c args] [a b c d & ...]); Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence."

6:50 ucb: I quite like the idea of (decode-blob blob fmt) in blobbity mind you

6:51 algernon: yeah, the main motivation for blobbity was a nice API. speed and anything else came secondary at best.

6:51 sm0ke: ,(doc fn*)

6:51 clojurebot: Huh?

6:51 llasram: sm0ke: But `fn*` is the backing special form for `fn`, and isn't a var

6:52 sm0ke: what is 'backing' special form?

6:52 llasram: In that invocations of `fn` expand to code invoking `fn*`

6:53 ,(macroexpand-1 `(fn [{:keys [foo]}] foo))

6:53 clojurebot: (fn* ([p__85] (clojure.core/let [{:keys [sandbox/foo]} p__85] sandbox/foo)))

6:53 algernon: oooh, I think I understand Buffy.

6:54 llasram: sm0ke: Destructuring is implemented in macros. So to get destructuring functions, `fn` is a macro, and the actual compiler special form for defining a function is something else -- `fn*`

6:54 ucb: algernon: oh?

6:54 sm0ke: hmm weird! isnt fn a special form? how can you ecpand somthing which isnt macro?

6:55 oh!

6:56 if `fn` is indeed a macro is it defined in core ?

6:56 i dont seem to find so

6:57 oh got it

6:57 41 line

6:58 llasram: sm0ke: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4095

6:58 Oh, you'd found it

6:58 sm0ke: no this is weird, look at this https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L42

7:00 i am assuming ^{:macro true} is another way to define a macro

7:00 i think it is beyond me at this point

7:00 llasram: Implementation detail way, yeah. There's weird stuff in core like redefining functions because it's building the language as it goes

7:00 The version at line 41 doesn't do destructuring

7:01 Then ones everything necessary for destructuring exists, it defines it again with destructuring

7:01 s,ones,once,

7:01 algernon: ucb: nope, I have not managed to figure it out :(

7:02 ucb: algernon: sadtimes. I couldn't find a way of decoding an already existing BB either :(

7:02 algernon: seems odd that this functionality would not exist though

7:03 sm0ke: hmm i wonder if defmacro is itself a macro

7:04 hyPiRion: sm0ke: no, but it's rather close, actually. It's a function

7:04 ,(macroexpand-1 '(defmacro x [y] z))

7:04 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

7:04 hyPiRion: hrm.

7:05 ,(macroexpand-1 (list* (symbol "defmacro") '(x [y] z)))

7:05 clojurebot: (do (clojure.core/defn x ([&form &env y] z)) (. (var x) (setMacro)) (var x))

7:05 ordnungswidrig: sm0ke, at the time defmacro runs, there is no macros but it works like a macro

7:05 hyPiRion, is that from 1.5.1?

7:06 ,*clojure-version*

7:06 clojurebot: {:interim true, :major 1, :minor 6, :incremental 0, :qualifier "master"}

7:07 sm0ke: there is some black magic in code after defmacro defintion (. (var defmacro) (setMacro))

7:09 ordnungswidrig: sm0ke: that's what blesses "defmacro" from a function to a macro.

7:09 sm0ke: a macro _is_a function, but one evaluated at read time and working on sexps.

7:10 sm0ke: true story.

7:11 yea there is a lot there... hard to digest without reading the ugly java part in clojure

7:11 llasram: Well, macro-expansion time, not read time, but otherwise yeah

7:11 ordnungswidrig: sm0ke: there should be a book "clojure internals" or like that :)

7:12 sm0ke: i wonder if the major dev time for clojure goes in the java code base or core?

7:13 clojure code itself is slightly less than 50%

7:13 41.2%

7:13 thats impressive i would say

7:14 so 40% of clojure is written in clojure

7:14 glosoli: magnars: hmm, could it be that optimus is removing last modified header ?

7:15 ucb: huh, on a different issue, if I don't specify a frame in aleph's start-tcp-server, I get a BigEndianHeapChannelBuffer and not a ByteBuffer as the docs say. Is this correct? /cc amalloy_

7:15 in the handler*

7:15 sm0ke: oh wow clojure has included the whole asm library

7:16 considering nobody would every touch that

7:16 it reduces a lot of java code

7:17 haha clojure kicks java in the nuts by having it entry point as "main.java"

7:19 magnars: glosoli: it's not that it removes it - it's that it doesn't add it. I didn't think it was necessary, since the URLs change for every change - but please do open an issue and set me straight. :)

7:38 glosoli: magnars: I figured out the problem, the compiled file from response is of charset=usa-acsii there is no way it would represent UTF-8 chars correctly

7:39 though I am not quite sure if it's more js minifier output related, or some sort of response problem in middle ware

7:39 Because before adding optimus on top of it everything was just fine

7:57 logic_prog_: how does "next" and "rest" differ?

7:59 pisketti: logic_prog_: rest is lazier, next evaluates (the data structure) immediately, rest does not

8:04 philandstuff: ,(rest [1])

8:04 clojurebot: ()

8:04 philandstuff: ,(next [1])

8:04 clojurebot: nil

8:04 philandstuff: there's that as well

8:05 logic_prog_: pisketti, philandstuff: noted, thanks!

8:07 greywolve: assuming I have a function execute-tests which will throw a bunch of different exceptions, and i want to have another function which simply catches those exceptions and does something with them, what is the best naming convention for each of those? should i have execute-tests! for the main function, and execute-tests as the wrapper that catches the exceptions?

8:16 logic_prog_: https://github.com/swannodette/swannodette.github.com/blob/master/code/blog/src/blog/utils/reactive.cljs#L172-L183 <-- what does barrier & cyclic barrier do?

8:19 harja: Hi all! I'm trying the new LightTable build, but I cannot connect to the project since it cannot find the symbol *cljs-source-map*. Is there a fix for this?

8:20 logic_prog_: sounds like a problem with lein + project.clj + not having source maps turned on

8:21 harja: sounds about right. I have not enabled source maps.

8:21 logic_prog_: logic_prog_ ++

8:22 harja: actually, the default project.clj had :source-map true

8:23 hmm, it seems this is the same I guess: https://github.com/Kodowa/Light-Table-Playground/issues/890#issuecomment-29477706

8:39 ambrosebs: It would be helpful if defprotocol threw a compile-time exception if & is used the argslist. I might propose a patch.

8:40 mdrogalis: ambrosebs: What error gets raised? I never tried that.

8:40 ambrosebs: mdrogalis: nothing. [this a b] is the same as [this & b]

8:40 & is just another symbol

8:41 lazybot: java.lang.RuntimeException: Unable to resolve symbol: is in this context

8:41 mdrogalis: Seems patchable, even for this ecosystem.

8:42 ambrosebs: surely & is reserved, so it should fly

8:42 mdrogalis: Have you begun full time work on core.typed?

8:42 ambrosebs: mdrogalis: pretty much. Haven't changed very much because I've been pretty much doing that since mid-year :)

8:43 mdrogalis: ambrosebs: Must be fun working for yourself. :)

8:43 ambrosebs: mdrogalis: I'm having a ball :)

8:43 mdrogalis: Hah, good for you man. Live it up.

8:44 ambrosebs: Something interesting I've observed: hammock time makes me feel really guilty if people are paying for it

8:44 :/

8:45 mdrogalis: I came to that same conclusion privately.

8:45 I feel bad when I appear to be stacking Zs on the office couch.

8:46 Inter-company culture shift and awareness needed I guess. But for you, you just gotta convince yourself that the only way to do this is to produce concrete work in waves.

8:46 ambrosebs: :)

8:46 mdrogalis: yes, glad to hear that.

8:46 mdrogalis: I was just explaining this to my gf, she likened it to an artistic process.

8:47 mdrogalis: ambrosebs: Ah, go on.

8:47 ambrosebs: I certainly observe waves of productivity.

8:47 mdrogalis: The waves are a peculiar thing. Because there's the small waves (alternating between hammock and coding) and the big waves (alternating between working on anythng and completely relaxing).

8:47 ambrosebs: mdrogalis: Like composing music say. If you haven't got any good ideas, the last thing you should (probably) be doing is writing :)

8:48 HolyJak: "hammock time makes me feel really guilty" - ask yourself if you would still be taking the time off if it was your money you are using; if yes => no need to feel guilty :-) Productivity != typing

8:48 ambrosebs: HolyJak: I don't feel guilty after it pays off, and it always does ;)

8:49 mdrogalis: I'm sure ambrosebs is well aware of why it's needed, same with me. It's just a psychological wall, HolyJak :|

8:50 Eventually will be overcome :)

8:50 HolyJak: I know; the thought that you would do it even if you paid yourself should help to break that psychowall

8:50 ambrosebs: HolyJak: good point

8:50 HolyJak: Well, it is not from my head :-)

8:51 mdrogalis: HolyJak: A list of logical reasons about that would make a good talk. :)

8:51 hyPiRion: It is something you figured was valuable to remember, though :)

8:51 andyf: ambrosebs: Please have your next $50 worth of hammock time guilt-free, on me :)

8:52 ambrosebs: andyf: oh, thanks! :)

8:52 ordnungswidrig: ambrosebs: besides hammocking how do you judge the quality of your work and the velocity of process? Do you have similiar feelings about this?

8:53 ambrosebs: I have a lot to learn about working for myself.

8:53 noncom: ,(let [f (fn [& {:keys [a b c] :or {a 1 b 2 c 3} :as params}] (println params))] (f))

8:53 clojurebot: nil\n

8:53 noncom: why does not :or work here? why no default values are assinged?

8:54 ambrosebs: noncom: :or and or are different

8:54 noncom: :or is for missing entries only

8:54 noncom: but they are missing in the call

8:54 ambrosebs: noncom: oh, sorry. I guessed :)

8:55 ordnungswidrig: ,(let [f (fn [& {:keys [a b c] :or {a 1 b 2 c 3} :as params}] (println a b c))] (f))

8:55 clojurebot: 1 2 3\n

8:55 ambrosebs: ordnungswidrig: good question

8:55 noncom: so, turns out it does not affect the :as part ???

8:55 lazybot: noncom: Yes, 100% for sure.

8:55 ordnungswidrig: noncom: :or seems to act only in the individual bindings

8:55 hyPiRion: noncom: :as binds to the original value only

8:56 noncom: i see.. it is not mentioned anywhere in the docs however.. or i have missed it

8:56 clgv: noncom: yeah it does not

8:56 noncom: ":or" is just applied to the mentioned bindings

8:56 noncom: hmmm that sorta defeats the purpose to me...

8:57 how do i get a default map of parameters then?

8:57 clgv: noncom: what do you want? named parameteters?

8:57 noncom: i just want that the :as params map would contain default entries too

8:57 clgv: noncom: maybe with transitive documentation support?

8:57 ordnungswidrig: noncom: no, what your root problem?

8:58 clgv: noncom: yeah and passing the default parameters further on...

8:58 noncom: the problem is that i store the params map for later reference and it must contain default entries for absent params...

8:58 clgv: noncom: you might wana have a look at https://github.com/guv/clojure.options

8:59 noncom: clgv: interesting library, i'll take a look at that

8:59 clgv: noncom: or if that's too much you can just write your own defn-like macro that does just the small task you ask for

8:59 noncom: oh well..

8:59 clgv: noncom: if you encounter problems with it, let me know

9:00 it is pretty battle-tested throughout all of my projects

9:00 noncom: ok!

9:01 ambrosebs: ordnungswidrig: if I've scrapped several designs over a few months (or years), it seems the end result is better. So, lots of failed implementations/designs sometimes means I'm getting closer :)

9:01 ordnungswidrig: *g*

9:01 ambrosebs: that matches my experience.

9:07 ambrosebs: proving your income is via Indiegogo is slightly awkward when applying for a rental :)

9:08 mdrogalis: Hah

9:20 Does anyone have a recommendation on a library to use to send/receive heart beats for a distributed system?

9:20 Pretty basic "are you alive?" checks to my peers.

9:43 CookedGryphon: does anybody know if it's possible to retain original string begin/end positions in instaparse?

9:44 I know it tracks them for error output, but I would like to do source line mapping

9:51 ah, think I've found it, span

9:51 glosoli: magnars, you here ?

9:52 magnars: glosoli: yep

9:52 glosoli: magnars: hmm have you ever encountered js minifier used by optimus to remove vars defined outside functions ?

9:53 magnars: that would be a weird thing to do. It uses Uglify, which is widely used. Do you have a minimum example to reproduce it?

9:58 glosoli: magnars: sec

10:00 magnars: https://www.refheap.com/13a971cdd197670e25e463a6e

10:00 magnars: everything above function is gone once compiled

10:01 magnars: Maybe they're optimized away because uglify thinks we're in a node script, and it needs to be told that it's in a browser. Thanks for your effort and patience.

10:03 glosoli: magnars: ok, is this fixable ?

10:03 or this is something uglyfs has to fix ?

10:03 uglifyjs"

10:03 magnars: I'm hoping it's an option that has to be passed to uglify.

10:04 glosoli: ok I am heading home now, bbl :)

10:05 magnars: take care - and thanks for you input :)

10:10 jjl`: hi all. i'm using wrap-keyword-params with ring and i'm getting an IllegalArgumentException that key must be integer. everything i can find on google seems to point to it being a something to do with invalid arguments to some collection functions, but i've got no idea where in my code is causing it. any ideas?

10:13 mdrogalis: Well ambrosebs. Maaaaybe 1.7

10:13 D:

10:13 coventry`: ambrosebs: There is already a patch for that. I thought it was up for inclusion in 1.6. http://dev.clojure.org/jira/browse/CLJ-888

10:13 ambrosebs: coventry`: thanks. Sorry for the noise.

10:15 coventry`: NP, and you have nothing to apologize for. :-)

10:16 ambrosebs: coventry`: well, I could have done a *touch* more googling :)

11:10 clgv: coventry`: it's neither approved nor screened so the assumption of the patch being included in 1.6 is pretty adventurous, I'd say

11:22 gfredericks: is it surprising that core.async channels can't have metadata?

11:27 clgv: gfredericks: is the channel itself considered a value? probably not?

11:29 coventry`: clgv: Thanks, I misremembered, thought it was part of this list. https://groups.google.com/forum/#!searchin/clojure-dev/alex-miller%7Csort:date/clojure-dev/CKaB7J4gIa4/5_vKiFSAi_EJ

11:31 gfredericks: clgv: no, but reference types have metadata

11:31 alter-meta! vs vary-meta

11:31 coventry`: Also, I didn't realize Alex Miller had already responded to ambrosebs about 888 when I sent that IRC message, so I am the one who should be apologizing for the noise. :-)

11:31 ambrosebs: coventry`: I read your message first FWIW

11:34 gfredericks: I suppose channels aren't exactly references either

11:34 but still seems like metadata would be useful

12:07 silasdavis: does leiningen add a test specific classpaths when running lein test?

12:07 gfredericks: yeah

12:08 I think `lein with-profile test classpath` might show you what it is

12:17 Jarda: is there a reason _not_ to use openjdk?

12:17 hyPiRion: performance

12:18 And if you develop programs run on client machines, to check for compatibility

12:18 Jarda: I thought of hosting with openjdk too

12:19 technomancy: performance on ARM systems lacking hardware floats is the main reason

12:19 (raspberry pi)

12:19 Jarda: ok, well I'm hosting on normal linux amd64 boxes

12:19 dabd: I'd like to have something like a threading macro -> but where i can refer to the last threaded argument. For example (-> expr (f x) (f y last-arg)). Here last-arg would be the value of the value that was "threaded" into the last expression. Does this make sense?

12:19 hyPiRion: I wouldn't be concerned about performance unless you're doing something performance sensitive yet

12:20 dabd: check out as->

12:20 ,(as-> (+ 1 1) arg (* 3 arg) (- arg 1))

12:20 clojurebot: 5

12:20 dabd: hyPiRion: perfect! thanks

12:21 hyPiRion: np :)

12:32 yedi: +1! -- xeqi: dnolen, any plans to port your autocompleter? Would enjoy seeing an example of how core.async + protocols interact w/ react.js

12:33 dnolen: yedi: I need to see determine I think react.js integration is worthwhile first :) I just like the rendering approach ATM.

12:44 upwardindex: How to specify the debug flag whit cljsbuild ?

12:45 Morgawr: okay so.. I am developing a project that requires a .jar from a library that was discontinued and is not hosted on maven, what's the best way to provide that .jar to people using my lein project?

12:45 I know lein can be setup to work with local repos but it's a huge pain in the ass, is there a way so I can just ship the .jar file of that library with the whole leiningen project directory?

12:45 gtrak: Morgawr: have you considered publishing an artifact for that jar yourself?

12:46 coventry: Morgawr: I did what gtrak suggests. It seems to work well.

12:46 mdrogalis: Reasking from earlier: Anyone have a recommendation on a library to use for performing heart beats on a distributed system?

12:47 dnolen: upwardindex: debug flag? you mean enable source maps?

12:47 gtrak: Morgawr: you might change the group ID or something if you go that route

12:47 Morgawr: gtrak: mm.. I can consider it, I guess... would that clash with the original author or anything?

12:47 mdrogalis: Meh, I think I just need actors.

12:48 technomancy: Morgawr: you'd typically publish under the org.clojars.morgawr group-id

12:48 upwardindex: dnolen: the flag that makes variable names very long (so that you can figure out what they are) but still in advanced compilation

12:48 gtrak: yea, possibly, you could prefix it with com.morgawr, then it wouldn't

12:48 technomancy: that's the convention for "non-canonical, published for convenience"

12:48 Morgawr: technomancy: it's a java library, not a clojure one

12:48 dnolen: upwardindex: yeah that's not supported ATM, though I'm considering supporting more specific Closure flags

12:48 upwardindex: but source maps should work for you anyway

12:49 technomancy: Morgawr: clojars doesn't care

12:49 upwardindex: dnolen: ok, I'll look into them, thanks!

12:49 dnolen: upwardindex: well except for locals, those'll are still tricky to identify

12:49 Morgawr: technomancy: oh okay, so I can just take this old java .jar and put it up on maven under org.clojars.morgawr ?

12:50 doesn't matter if it isn' mine? (the source code is publicly available so it's not some hidden proprietary project or anything)

12:50 Raynes: If the license allows for it, it's fine.

12:50 You'll need to write a pom.xml for it.

12:51 Take a simple lein project and copy its pom over and modify it. That's what I always do.

12:51 technomancy: Morgawr: yeah, as long as the license permits it and it's clear about being unofficial

12:51 Raynes: Keeps me from ever having to remember a single thing about maven :P

12:52 Morgawr: alright, thanks guys, I'll see how it works and what I can do ;)

12:52 (and yes, license permits it)

12:52 https://clojars.org/ I just follow this guide, yes?

12:53 (just making sure I'm not reading into the wrong thing)

12:53 sm0ke: technomancy: why did you write grenchman in ocaml?

12:54 technomancy: Morgawr: I think the wiki covers it somewhere

12:55 sm0ke: well, I couldn't use clojure for it =)

12:55 I wanted an FP language with fast startup and small executables

12:55 sm0ke: does it have something to do with ffi too?

12:55 justin_smith: hard to beat OCaml for those criteria

12:55 hyPiRion: technomancy: you could've just made a Clojure compiler in C

12:55 technomancy: sm0ke: yeah, although I didn't really realize how important that would be until I was in the middle of it

12:56 hyPiRion: well you know me; always lazy

12:56 hyPiRion: Apparentl that's really easy, since there are like 0 working versions of them

12:56 justin_smith: technomancy: you use ffi for grenchman? where?

12:56 technomancy: sm0ke: basically my choices were racket, ocaml, and haskell

12:57 I am going to put off racket for a few years until my kids are a bit older, and ocaml is a lot easier to learn than haskell

12:57 hyPiRion: technomancy: heh, I've been playing with the thought, but it seems rather daunting

12:57 technomancy: justin_smith: for th ereadline integration

12:57 hyPiRion: with the idea, rather

12:58 technomancy: I learned a lot more from OCaml than I would have from Racket

12:58 I'm sure I would have learned even more with Haskell, but I wouldn't have been able to write it in two weeks =)

13:03 anyway it's super great and you should all use ocaml for things where you can't use clojure

13:04 except just be warned once you've used ML, seeing NPEs in clojure will drive you nuts =\

13:05 noncom: dnolen: a question on core.async: is it possible to catch messages from a pub that don't match any subscribed topic? i.e. don't let them get dropped and be able to parse them in some "else" or "default" function or such?

13:05 seangrove: technomancy: rewrite in haskell!

13:06 Curious to see if there are as many epiphanies behind it as haskell-ites always claim.

13:06 technomancy: seangrove: bitemyapp is supposedly porting it to haskell

13:07 apart from the FFI, the use of ocaml in grenchman is all super obvious and straightforward.

13:08 I got some pretty substantial patches from hugod to make it work with Pallet, and he didn't have any prior ocaml experience.

13:08 just a lot of "yell at me if I do something stupid, and get out of my way if not"

13:10 seangrove: also: cabal scares me

13:11 Raynes: technomancy: It's quite a bit better now than it was a few months ago.

13:11 They finally got the sandboxes finished.

13:11 You can even start up ghci inside of 'em.

13:11 seangrove: technomancy: Can't be any worse than go's 'dependency management'

13:11 technomancy: In fact, maybe they need your and your lein super-powers to fix cabal

13:11 hyPiRion: seangrove: what dependency management? =)

13:11 technomancy: https://github.com/bitemyapp/grom/blob/master/src/Main.hs#L34 haha what is this

13:12 Raynes: technomancy: The worst part of it is that Haskell's compiler is so bloody slow. it takes about 6 months to compile projects with even a few dependencies. :P

13:12 technomancy: seangrove: oh man, google go deps. I don't even...

13:12 such facepalm

13:12 Raynes: so dependency

13:12 arrdem: many conflicts

13:12 technomancy: git master

13:12 danneu: Has anyone run into the issue where your aot :genclass ns hangs at "Compiling myproj.bar...", but it indeed has compiled because you can ctrl-C it and then launch your app?

13:12 hyPiRion: much rage

13:12 arrdem: wow

13:12 Raynes: such sadness

13:13 danneu: damn, ruined the doge

13:13 technomancy: so is this [True, _, _, _, _, _] stuff from grom idiomatic or just trying to be cute?

13:13 * arrdem high fives Raynes and hyPiRion

13:14 * Raynes returns high five enthusiastically.

13:14 hiredman: so many commas

13:14 * hyPiRion high fives back

13:14 llasram: Huh. So in golang the default is to install dependencies by compiling source from `master` of dependency git repos?

13:15 hyPiRion: llasram: yeah

13:15 technomancy: llasram: yeah, the idea is that no one ever introduces any backwards-incompatible changes

13:15 it's fiiiiiiine

13:15 llasram: Cooooool

13:15 Raynes: Bahahaha

13:15 Woooow. I didn't know it automatically used master.

13:15 By default, that is.

13:16 technomancy: At least with mix I convinced folks that *that* was a horrible idea! I'm doing my part!

13:16 technomancy: Raynes: speaking the truth to power

13:16 hyPiRion: llasram: http://forums.thedailywtf.com/forums/t/27755.aspx

13:17 arrdem: hyPiRion: that's terifying to say the least.

13:17 hyPiRion: is there at least a way to force use of a tagged commit?

13:19 hyPiRion: arrdem: For the Go projects I have to work with, we have build scripts or submodules which downloads the repo and checkouts the correct commits

13:19 That's the only reasonable thing to do as of now

13:20 arrdem: I suppose I should add Go and Rust to my to-learn list once I've actually used Haskell for something...

13:20 hyPiRion: yeah that works.. pretty unfortunate tho.

13:21 hyPiRion: arrdem: yeah, it's not pretty

13:21 hiredman: you may as well use git for dependencies, because you have to rebuild from source for every architecture anyway

13:22 hyPiRion: well, that's assuming you only have to deal with git repositories, and never have to look out for mercurial ones

13:23 hiredman: well, you are using Go, you deserve it

13:25 OlegYch: anyone noticed that datomic docs page crashes firefox aurora?

13:27 sm0ke: with lein is uberjar the prefered method of deployment? Did anyone faced problems when different dependencies having common package structure get overwritten?

13:28 i used to have this problem with assembly in sbt while i was working with scala

13:28 a LOT of times

13:28 technomancy: sm0ke: uberjar is recommended

13:28 sritchie: magnars: hey man, about to jump into optimus

13:29 sm0ke: somehow i havent faced this problem with lein

13:29 sritchie: magnars: anything special I should look out for when integrating optimus and cloudfornt?

13:29 cloudfront*?

13:29 sm0ke: may be my projects arent big enough yet

13:29 technomancy: sm0ke: common files overwritten in an uberjar isn't substantially different from being shadowed during regular development

13:29 very rarely you'll have a "deep" classpath search that will work differently

13:31 danneu: kibit hates threading macros

13:32 but whatever kibit says must be right

13:32 jonasen: danneu: no

13:32 sm0ke: technomancy: that is true, i just had 80% of problem with log4j slf4j etc logging nuisance

13:32 danneu: too late, kibit'd

13:33 sm0ke: apart from that its not so common t have similar package structures

13:33 seangrove: danneu: It's definitely right on the if/when choice

13:33 When you only have one branch, use `when`

13:33 slpsys: i haven't had enough coffee this morning, there's gotta be something in clojure.core that just does this, right: (zipmap (map fn seq) seq) ?

13:33 seems like a super common form

13:33 technomancy: seangrove: http://p.hagelb.org/lies.gif

13:33 jonasen: seangrove: that has always been up for discussion

13:33 bruceadams: OlegYch: I don't see a problem with datomic docs in Aurora. any specific part of the docs?

13:34 technomancy: slpsys: there really should be!

13:34 * seangrove checks his stopwatch - roughly 25second

13:34 danneu: seangrove: yeah, i can't stand if used instead of when

13:34 technomancy: slpsys: sadly there is not

13:34 OlegYch: http://docs.datomic.com/tutorial.html

13:34 slpsys: ah, huh. i just didn't want to type it out if it existed in common libs

13:34 llasram: slpsys: What would happen in the case of duplicate keys?

13:35 slpsys: If you make everything a collection by mapped function result key, then you do get `group-by`

13:35 bruceadams: OlegYch: looks fine in Aurora 27.0a2 (2013-12-02) (on 64bit Linux)

13:35 dnolen: noncom: haven't tried the pub stuff yet

13:36 danneu: a place where threading macros almost always win for me is with arithmetic. (-> (float x) (quot 1.0e8))

13:36 noncom: dnolen: oh i though you're in it, so whom can i ask?

13:37 dnolen: noncom: anyone here or the mailing list :) I've been too busy to try the new core.async bits.

13:37 noncom: i see!

13:38 OlegYch: bruceadams: doh somehow firefox won't start with empty profile, i guess latest build is too unstable

14:02 magnars: sritchie: hey mate - I wrote a bit about CDN integration for optimus in the readme the other day - and it works nicely for our CDN scenario, but I haven't used Cloudfront. Please let me know if there are any stumbling blocks.

14:02 sritchie: okay, will do

14:03 magnars: looks like it should be easy, now that cloudfront is set up

14:03 zphds: If I have a map, how do I create a defrecord using it

14:03 magnars: I would be happy to know about that too. :)

14:03 sritchie: I'll write it up for sure

14:03 magnars: one more Q - as a best practice, if i have, say, bootstrap.css (from an external CDN) and my own css

14:03 zphds: assuming my record is something like

14:04 sritchie: should I bundle the remote asset and serve it via my CDN?

14:04 zphds: (defrecord foo [a b c])

14:04 sritchie: magnars: or just have two CSS entries, one from each CDN, assuming that they'll each deal with cache headers properly

14:04 zphds: and I have a map {:a "1" :b "2" :c "3" }

14:04 how do I create an instance of foo

14:04 magnars: sritchie: for very popular frameworks like bootstrap or jquery, I would recommend using central CDNs - just because the likelyhood of it already being in the users cache is so great.

14:05 sritchie: gotcha

14:05 seangrove: zphds: Be careful to conserve newlines, freenode is running low on 'em.

14:05 zphds: seangrove: heh... :)

14:06 seangrove: so got any hints for me?

14:06 sritchie: magnars: nice, thanks!

14:07 seangrove: zphds: (Foo. (:a my-map) (:b my-map) (:c my-map))

14:08 Or use destructuring (let [{:keys [a b c]} my-map] (Foo. a b c))

14:08 zphds: seangrove: yeah but destructuring?

14:08 ah the let, of course..

14:08 thanks

14:08 seangrove: No problem.

14:13 hyPiRion: if you have defined foo through defrecord, the utility function map->foo is also available

14:13 (map->foo {:a "1" :b "2" :c "3" }) -> #foo{:a "1", :b "2", :c "3"}

14:13 seangrove: hyPiRion: Ah, that's nicer

14:14 justin_smith: hey, before I start doing some benchmarking with criterium, how is the performance of domonad / state monad / lenses? is it out of the question for a server that needs to keep latencies low?

14:14 I like the semantics a lot, and want things to be that clean, but don't want to start changing things and find out I have to back out

14:15 this is re: https://github.com/cark/data.lenses

14:16 sritchie: magnars: so, optimus must let requests from a CDN through, correct/

14:16 ?

14:16 dumb question, nm :)

14:18 magnars: sritchie: :) the way our CDN is set up, is that if there is a cache miss, then it will ask the application for the asset. So the CDN needs to know how to map from its URL to our URL. But some other CDNs will have you upload the files yourself - and then you'll hopefully never see those requests in the app.

14:18 hiredman: justin_smith: lens are pretty much the point furthest away from the clojure's "everything is just data"

14:19 sritchie: magnars: as I was typing, it became clear that the urls you serve point to the CDN, not your app, there's no redirect

14:19 obviously :)

14:19 hiredman: justin_smith: "we have lots of custom types, so we cannot generically manipulate data, so let's come up with this crazy thing to let us do things on all the custom types"

14:19 justin_smith: so don't use lens in clojure, use update-in

14:19 magnars: sritchie: Indeed. :) You still need to link to the assets when rendering html tho, which is what :base-url is for on the assets.

14:20 sritchie: yup

14:20 awesome

14:20 justin_smith: hiredman: so for the second part, using the state monad ad do-monad syntax instead of a global atom or a ^:dynamic var

14:20 is that also a waste of time?

14:22 hiredman: justin_smith: the general state monad is almost certainly going to be slower

14:22 justin_smith: how would you replace the state monad with a global atom?

14:23 justin_smith: by accessing that atom to propagate state - that does nto do everything the state monad does

14:23 but the state monad replaces the need for that

14:24 sritchie: magnars: any advice on dynamically served images?

14:24 hiredman: but the state in a state monad is not global

14:24 sritchie: out of a database, for example

14:24 justin_smith: I think I garbled that. The state monad gives me an alternative for keeping state in a global atom, while also avoiding some of the drawbacks of dynamic vars.

14:25 hiredman: yes, but it is implicitly passed, rather than needing to add an extra arg to everything

14:26 aconbere: hey folks, I've been learning clojure this last week. And one of my pain points right now is just lein / clojure startup times. Currently running `lein test` on my very trivial set of tests for a small project takes ~ 21s.

14:26 is this normal? Or do I have a borked config? (hard to have perspective)

14:27 technomancy: clojurebot: faster lein?

14:27 clojurebot: faster lein is tricks for helping speed up start time for Leiningen: https://github.com/technomancy/leiningen/wiki/Faster

14:27 technomancy: aconbere: tl;dr: do everything in the repl, but that wiki page has more tips

14:29 magnars: sritchie: hmm, that's a case I haven't considered. Since they're not static, then freezing the asset list would be problematic. You could write a custom strategy to cope with that, tho. But I think I would serve those via varnish.

14:30 sritchie: the main reason is that you want to reduce the IO your application has to handle - and varnish is truly excellent at that job.

14:36 sritchie: magnars: gotcha -

14:36 aconbere: technomancy: so I'm currently using grench connected to a headless lein running in the background

14:36 sritchie: magnars: the typical way to do this is to upload to an S3 blob,

14:36 aconbere: technomancy: I'm really new to this stuff so it's hard to know if I should be doing something else

14:36 grench lein test 0.04s user 0.03s system 0% cpu 21.867 total

14:36 sritchie: then just point at cloudfront (which refreshes from S3)

14:36 magnars: sritchie: Not serving yourself at all is always a good option too. :)

14:36 sritchie: yeah

14:36 that's where I want to get

14:37 magnars: but yeah, you're right, it's obviously really hard to go calculate the hash for everything in the DB… better to just move everything over

14:38 technomancy: aconbere: cool; that should help. you can also keep a project JVM resident with `lein repl :headless` in another terminal; then you can run code without launching any new processes but grench

14:38 aconbere: technomancy: yeah, so I'm doing that :)

14:38 technomancy: still 21s to run :(

14:38 (sad face)

14:38 technomancy: ok, in that case it's not working

14:38 aconbere: technomancy: that's the ideal scenario!

14:39 magnars: sritchie: Yeah. If you were in a bind tho, you could have those hashes precaculated along with the images, and then write a custom asset loader. But far better the solution you're on.

14:39 sritchie: magnars: migration time

14:39 noprompt: dnolen: does cljsbuild allow configuration of warning messages at a granular level? when working with react the closure compiler was spewing warnings about invalid jsdoc tags.

14:40 dnolen: i definitely want warnings, just not *those* warnings.

14:40 dnolen: noprompt: old ticket, I changed the priority - we definitely want to be able to pass most Closure config options

14:40 technomancy: aconbere: you could try setting GRENCH_PORT manually if it can't figure out how to infer it

14:40 aconbere: technomancy: https://gist.github.com/aconbere/226a6f39c9dc74f5cc14

14:40 technomancy: I'll try that

14:41 dnolen: noprompt: the other one we need for React integration is prelude and / or setting a constant for the build to remove __DEV__ junk

14:41 bitemyapp: Raynes: it does not take that long to compile things in Haskell.

14:41 technomancy: aconbere: ah wait, that won't help with `grench lein` crap

14:41 bitemyapp: seangrove: yeah I'm working on grom as a comparative project, but I'm also holding onto it as something I can pair-program with somebody else on.

14:41 technomancy: aconbere: it's lein itself that can't find the repl server, not grench

14:41 aconbere: technomancy: I think in general I don't get how to use the repl

14:42 ahhhh

14:42 bitemyapp: seangrove: not much progress of late, because I haven't had anybody else to pair-program with me.

14:42 aconbere: innnnnteresting

14:42 Raynes: bitemyapp: Dunno what's wrong with my ghc on every system I've ever used then :(

14:43 noprompt: dnolen: __DEV__ junk?

14:43 mdrogalis: I know this sounds crazy terrible, but is it possible to add a jar at runtime and also remove it?

14:43 technomancy: aconbere: `grench lein ...` will try to use a project repl server if it can find one, but it will start a new JVM if it can't

14:43 bitemyapp: Raynes: Iuno. Compiling Haskell is slower than Go, but it's faster than most other languages I've compiled, including OCaml.

14:43 technomancy: mdrogalis: you can't remove it, but you can replace the classloader with a new classloader that doesn't reference it

14:44 dnolen: noprompt: React includes assertions/checks not intended for production, they should be stripped when compiling with :advanced

14:44 mdrogalis: technomancy: Hmm, that sounds tricky.

14:44 Then again, the premise is tricky.

14:44 seangrove: This is just horrendous looking https://github.com/cemerick/friend/blob/master/src/cemerick/friend/openid.clj#L98

14:45 aconbere: technomancy: the reason I was running headless from outside my project directory is that's what grench tells me to do

14:45 https://gist.github.com/aconbere/50388ab8258863b87ab0

14:45 seangrove: Java interop may be a practical thing, but it's often not a pretty thing.

14:45 slagyr: ,(with-redefs [+ *] (+ 3 4))

14:45 clojurebot: 7

14:45 aconbere: technomancy: so maybe I need to hint it to the port there?

14:45 slagyr: Why doesn't that return 12?

14:46 noprompt: dnolen: is the closure config ticket with cljsbuild or clojurescript?

14:46 dnolen: slagyr: because + gets inlined

14:46 technomancy: aconbere: you need two repls; on efor lein and one for your project

14:46 dnolen: noprompt: CLJS

14:46 seangrove: bitemyapp: I might be up to have an evening or two per week in haskell, assuming I can make the time elsewhere to review what I've learned so it doesn't fall away

14:47 dnolen: ,(with-redefs [+ *] (apply + [3 4]))

14:47 clojurebot: 12

14:47 noprompt: dnolen: i really need to get my CA in the mail.

14:47 slagyr: dnolan: whoa...

14:47 technomancy: aconbere: the lein one runs outside the project, the project one runs inside

14:47 aconbere: gotcha

14:48 slagyr: dnolan: cool... I see the the + fn is inline in clojure.core.... I gotta read up on inline again. Thanks!

14:48 aconbere: technomancy: okay, heh, so I have one repl in ~ and one in my project. But I'm getting the same run times. So it looks like lein still isn't finding the project repl?

14:48 * aconbere appologizes for this mess

14:49 noprompt: dnolen: by the way, react is pretty nice. it feels much more like a library than a framework.

14:50 technomancy: aconbere: yeah, not sure why. `grench lein version` is instantaneous, right?

14:50 aconbere: make sure you're on lein 2.3.4

14:50 aconbere: technomancy: yeah version is instant

14:50 2.3.3

14:51 dnolen: noprompt: yes this is why I'm gravitating towards, they also seem receptive to changes needed to make integration better

14:51 noprompt: dnolen: i did have some problems with austin though. (React/renderComponent ..) locks up the repl because i don't know why.

14:51 dnolen: noprompt: i.e. allowing Generator compatible objects appear where arrays must now

14:51 * aconbere tries upgrading

14:51 dnolen: noprompt: I've opened a ticket to make all Seqs ES6 Generator compatible

14:52 noprompt: huh interesting

14:52 noprompt: dnolen: that's just awesome. i saw on twitter someone said the React team has clojurescript fans on it.

14:53 aconbere: technomancy: upgraded to 2.3.4 still no dice :'(

14:54 technomancy: is there a way to execute lein commands direction in the running repl?

14:54 dnolen: noprompt: they also seem to be willing to lock down how they compute the DOM - which means you could use the same template client/server-side w/o needing to run React on the server - the template would just generate different code based on the environment.

14:56 noprompt: dnolen: right. that was a topic of the talk that got me really excited. it's cool they're trying to be as inclusive as possible.

14:56 technomancy: aconbere: no, leiningen is in a completely separate process

14:57 aconbere: you can run tests in the repl though; clojure.test/run-tests

15:10 s_kilk: hi, does anyone know of any actual documentation on how to use the dieter library?

15:15 gfredericks: when trying to control shutting down a core.async system via a control channel, is the normal practice to use a channel that gets closed on shutdown, i.e. never has any messages on it?

15:16 that seems useful to me because then I can use it for shutting down multiple components, without worrying about multiplexing a shutdown message

15:16 dnolen: gfredericks: the same reasoning behind timeout channels

15:17 gfredericks: oh interesting

15:28 seangrove: Ah, google support. Lovely.

15:28 On trying to update an app listing so I can get the openid realm set properly: http://dl.dropbox.com/u/412963/Screenshots/5j.png

15:32 bitemyapp: seangrove: I'd be up for some side-by-side Haskell.

15:33 seangrove: Oh, perfect: http://stackoverflow.com/questions/20276554/existing-listing-no-longer-editable-after-introduction-of-new-google-apps-market

15:34 bitemyapp: relying on Google? That's a paddlin'.

15:36 seangrove: bitemyapp: Necessary evil, 'm afraid.

15:37 bitemyapp: seangrove: ick.

15:41 seangrove: Hrm, pretty lame http://www.lispcast.com/how-to-use-new-relic-with-clojure-on-heroku

15:42 technomancy: Perhaps you can gently shame him a bit.

15:45 bitemyapp: seangrove: who?

15:45 seangrove: Eric Normand, I suppose.

15:45 arrdem: clojurebot: paddlin is http://i.imgur.com/0UChB.png

15:45 clojurebot: Ik begrijp

15:46 bitemyapp: (inc arrdem)

15:46 lazybot: ⇒ 8

15:46 pjstadig: what is the context for paddlin?

15:46 i mean i remember that Simpson's episode

15:46 hlship: I've got a core.async question

15:47 arrdem: bitemyapp: you missed Raynes and hyPiRion pulling off an in channel doge

15:47 hlship: should try work correctly inside a go block?

15:47 mdrogalis: arrdem: Surely you are Fake Rich Hickey on Twitter.

15:47 That's the last time I heard that joke. :P

15:48 arrdem: mdrogalis: dude I have't been writing clojure that long. wish I was witty enough to run that account tho, it's great.

15:48 mdrogalis: Fair enough. :P

15:48 hlship: Ah, as soon as I ask the question, I see the answer; I had code that was catching the exception before it bubbled up ...

15:50 bitemyapp: hlship: just be aware of thread-shuffling, everything else should otherwise work.

15:50 I'm pretty sure core.async doesn't make any thread affinity guarantees.

15:51 and if it does, it shouldn't, so the punters can stop using threadlocals.

15:51 arrdem: when was this?

15:51 arrdem: bitemyapp: about 12:15 I think.

15:51 bitemyapp: arrdem: what time zone? my server is set to UTC.

15:52 arrdem: bitemyapp: US-CENTRAL

15:52 bitemyapp: 12:15 UTC doesn't show any activity.

15:52 arrdem: you need to change your clocks man.

15:52 it's 2052.

15:52 arrdem: bitemyapp: Texas is best. why would I care about the time anywhere else?

15:52 coventry: bitemyapp: Search the logs for "doge." The term was used at the time.

15:52 bitemyapp: I see it now.

15:53 arrdem: true, but UTC is useful.

15:53 arrdem: bitemyapp: agreed.

15:53 * arrdem grumbles about monotonic clocks and other lies

15:53 coventry: bitemyapp: Are there any handy examples of use of thread locals which would be dangerous in a go block?

15:54 bitemyapp: arrdem: Dune: "we go forward, we go back."

15:54 clojurebot: I don't understand.

15:54 arrdem: clojurebot: that's ok, nobody does.

15:54 clojurebot: Gabh mo leithscéal?

15:54 bitemyapp: coventry: most global threadlocal vars in session libraries used in Ring (except for what I do) aren't async-safe.

15:55 coventry: bitemyapp: Oh, so (binding) dynamic vars? Makes sense. Thanks.

15:55 bitemyapp: coventry: it has nothing to do with Go blocks, any async environment in which threads are getting reassigned isn't going to play nice with threadlocals unless there's thread affinity.

15:55 and thread affinity is a bad idea.

15:56 stuartsierra: hlship: Regarding try/catch in a `go` block, it's supposed to work, but there were some bugs in the `go` macro's handling of nested try's. Don't know if that's been fixed.

16:14 technomancy: so, if we use content-type for nrepl responses, I wonder if it doesn't also make sense to use content-disposition

16:15 could control whether something gets placed in a new window vs dumped in the repl buffer vs saved to disk

16:25 noprompt: technomancy: is there anything built in to leiningen that can display meta data about project dependencies? (ie. the url, project description)

16:26 technomancy: noprompt: just https://github.com/technomancy/lein-licenses

16:27 URL/description would be easier to write though

16:28 oh nice; this is one of those codebases where the first line is a comment apologizing for what follows

16:28 noprompt: technomancy: awesome. i can use this as a starting point.

16:28 haha.

16:31 aconbere: technomancy: so I've been trying to figure out how to run my tests on the repl

16:31 :P

16:32 https://gist.github.com/aconbere/c6ba74fd91e658c1ba99

16:32 it can't seem to find my tests

16:32 but the tests run fine in lein test

16:33 and the core tests are just in the default file created by lein new

16:33 sorry to be a bother just ... wondering if you could help me out here :-/

16:34 technomancy: aconbere: not sure; that should work fine.

16:34 aconbere: :-/

16:34 * aconbere cries himself to sleep

16:34 justin_smith: aconbere: g and n switched

16:34 you misspelled

16:35 aconbere: omg

16:35 that would be amazing

16:35 arrdem: (inc justin_smith)

16:35 lazybot: ⇒ 16

16:36 technomancy: application/atomdeleted-xml is a registered mime type

16:36 whyyyy

16:36 justin_smith: did you want it?

16:37 technomancy: justin_smith: I just ... it seems like the wrong thing

16:37 aconbere: wow

16:37 I feel like an amazing idiot now

16:37 technomancy: the fact that it's deleted has nothing to do with its type

16:38 justin_smith: application/maybedeleted+xml

16:38 for the haskell user who is also using xml

16:38 technomancy: there's an application/mp21 and application/mp4

16:39 but no application/mp3

16:39 arrdem: technomancy: aren't mp21/mp4 open codecs tho?

16:39 *open(ish)

16:39 justin_smith: arrdem: containers, that hold encoded things

16:41 arrdem: justin_smith: you've lost me

16:41 technomancy: arrdem: oh geez; I didn't realize the mp3 patent was still active in the US

16:41 arrdem: technomancy: yerp.

16:41 technomancy: got another 22 months to hang on

16:42 justin_smith: arrdem: the file format is not a codec, a codec is a thing that encodes or decodes, the contents of a container are encoded/decoded, the file format is the container's format

16:42 arrdem: that little? I'll book a party...

16:42 technomancy: wikipedia says september of 2015

16:42 arrdem: wikipedia does not lie*

16:42 technomancy: of course in the civilised world it expired years ago

16:42 justin_smith: you can have open container with patent encumbered contents, but the file format is open because the container is

16:43 arrdem: technomancy: it's unfortunate that neither of us live there.

16:43 justin_smith: ah ok.

16:43 technomancy: justin_smith: the container is just mpeg though, right?

16:43 justin_smith: mpeg4 is a specific container

16:44 http://en.wikipedia.org/wiki/MPEG-4_Part_14

16:44 technomancy: huh

16:44 justin_smith: it can contain mp4 / mp3 / mp2 / mp1 encoded data

16:45 the fact that they give the same names to the encoders and containers and the encoded streams is a source of endless nuisance and confusion

16:45 it is as if we named edn, clojure, and leningen all "clojure"

16:45 which would make things so much simpler!

16:45 technomancy: justin_smith: "programming clojure" "clojure programming" "practical clojure"

16:46 justin_smith: heh

16:47 technomancy: so I feel like for nrepl to signal for the editor to display a message or alert, it should use content-type text/plain with content-disposition message or something

16:48 justin_smith: what if I want a structured interactible popup

16:48 stuartsierra: Content-disposition: "Your fault"

16:48 justin_smith: like say a schmetterling stack trace, to pick a random example

16:49 technomancy: justin_smith: if you need interactivity you should return HTML

16:49 I actually already have that part working

16:49 justin_smith: cool, makes sense

16:49 cool!

16:49 do you have a link to that?

16:49 technomancy: with relative hyperlinks that trigger further nrepl messages

16:50 it's still pretty proof-of-concept-y

16:50 https://groups.google.com/forum/#!topic/clojure-tools/rkmJ-5086RY

16:50 https://github.com/clojure-emacs/cider/tree/content-types

16:50 justin_smith: cool, I will keep an eye on it, thanks

16:51 technomancy: https://github.com/technomancy/nrepl-discover/blob/master/src/nrepl/discover.clj#L141 <- example op that returns HTML

16:51 justin_smith: officially watched that branch

16:51 technomancy: that one just increments a server-side counter, but I've gotten it working with cider

16:52 justin_smith: very cool, looks like with some legal stimulants and some uninterrupted time to think I could potentially integrate that into the debugger design

16:52 technomancy: justin_smith: driving use case for html responses is to make a hyperlinked inspector a la slime

16:52 but it might make sense for a debugger too

16:53 justin_smith: well this is a stack trace browser with inspection

16:53 not so much the stepping etc. right now

16:53 technomancy: sure

16:53 justin_smith: so that seems to fit that nicely

16:53 technomancy: is there really no mime type for ansi-colored text?

16:53 I find that difficult to believe

16:55 justin_smith: http://lists.freedesktop.org/archives/xdg/2006-March/006214.html I find this, but I don't think it is standard

16:56 but that is what x- is for, right?

16:56 technomancy: actually I think that's deprecated

16:56 the x- prefix I mean

16:56 justin_smith: yeah, now I see it is

16:57 technomancy: text/x-ansi looks related but is possibly a broader scope

16:57 "It is similar to ASCII art, but constructed from a larger set of 256 letters, numbers, and symbols — all codes found in IBM code page 437" seems to imply some insane encoding scheme

16:58 justin_smith: ahh yeah

16:58 llasram: CP-437 I believe was the original MS-DOS 8-bit character encoding

16:59 technomancy: would rather not go down that path =)

16:59 justin_smith: you would think there would be a mime type for "text with embedded vt100 compatible escape codes" which is what ansi colors are right?

16:59 technomancy: yeah

16:59 llasram: But you get box-drawing characters!

16:59 technomancy: llasram: application/ncurses =P

17:01 reading through the IANA pages is just an interesting picture of "who bothered to actually submit their stuff for standardization instead of just plowing ahead"

17:07 does vim call them buffers same as emacs?

17:08 arrdem: technomancy: 75% positive

17:09 steerio: technomancy: yes and no, the term might have a somewhat different definition

17:09 justin_smith: I dunno if vim has the concept of a buffer with no backing file

17:09 technomancy: oh hrm; that sucks

17:10 steerio: buffers are usually files; windows can contain buffers or other types of content

17:10 and a buffer is also not necessarily bound to a window (which means it is not necessarily presented to the user visually in a given moment)

17:10 justin_smith: oh, it does have the concept of a buffer with no file

17:10 just double checked

17:10 technomancy: steerio: would it work for an nrepl server to return a response that could result in a new buffer being created?

17:11 trinary: scratch buffers?

17:11 :set buftype=nofile I think

17:12 steerio: technomancy: definitely

17:12 but it'd be a piece of vimscript that would be doing it, i guess

17:13 technomancy: steerio: sure

17:13 steerio: technomancy: what's the plan? i guess i arrived in the middle of a discussion.

17:13 aconbere: ztellman: do you have a branch setup for aleph working on core.async channels?

17:13 ztellman: aconbere: not yet

17:13 * aconbere nods

17:14 aconbere: I half assed mirrored interfaces for udp and tcp that just bridge the two

17:14 in a not particularly impressive way

17:14 steerio: technomancy: repl in a buffer (had been done, not really usable) or a namespace browser, doc viewer?

17:14 aconbere: but it works really well :)

17:14 technomancy: steerio: I'm trying to design a system for rich nrepl interaction that could be editor-agnostic.

17:15 steerio: ideally it would be general-purpose

17:15 you could write clojure-side commands to drive editor behaviour

17:15 step 1: https://groups.google.com/forum/#!topic/clojure-tools/rkmJ-5086RY

17:16 justin_smith: technomancy: the problem I ran into playing with this stuff is elisp has no threading, unless you start OS processes and communicate via pipes

17:17 which makes communicating tightly back and forth annoying

17:17 but you are probably well past those issues already with nrepl

17:17 steerio: so this basically is an enriched communication protocol that the other side, the editor may choose to use or ignore

17:17 technomancy: justin_smith: yeah, nrepl is already fully async

17:17 coventry: Someone needs to port the go macro to elisp. :-)

17:18 technomancy: steerio: right; ideally you could always fall back to text/plain if the client declares that's the only thing it supports

17:19 * justin_smith is looking forward to the first multimedia extended nrepl middleware that rickrolls you when it catches exceptions.

17:19 coventry: If the goal is to be able to drive the editor from clojure, it might be worth borrowing from tools which already try to do something similar, like pymacs.

17:19 bitemyapp: justin_smith: bulwark kinda already does that, but for something else.

17:19 technomancy: justin_smith: what I really want to do is have a middleware that converts exceptions into jpegs with terrible rendering artifacts

17:19 justin_smith: nice

17:19 technomancy: coventry: hm; interesting

17:20 steerio: what's a use case for driving the editor from clojure?

17:20 like, any example

17:20 bitemyapp: coventry: probably be easiest to integrate JavaScript, then use CLJS + Node.js

17:20 coventry: steerio: integrated debugging and tracing.

17:20 bitemyapp: I don't see the JVM working nicely with something like Emacs. I could be wrong.

17:20 technomancy: steerio: everyone has to reinvent the wheel with stuff like jump-to-definition, docstrings, run tests, toggle tracing, etc

17:21 steerio: I have a proof-of-concept where each of those are done server-side, so you just need a small editor-side shim (less than 200LOC in the elisp case)

17:21 so improvements to a single implementation benefit everynoe

17:21 steerio: all these could be handled as actions that are initiated from the editor

17:22 technomancy: steerio: right; the editor is just a frontend

17:22 steerio: which fits the already existing request-response pattern

17:22 technomancy: the meat all happens server-side

17:22 bitemyapp: technomancy: an HTTP or socket API + callbacks that allowed generic language integration could be cool.

17:22 steerio: so clojure doesn't have to "push" events on its own to the editor

17:22 i'd certainly wouldn't like anything to happen in my editor that i haven't initiated there

17:22 technomancy: steerio: yeah, "drive" may have been the wrong word

17:22 steerio: -'d

17:22 technomancy: bitemyapp: technically nrepl is transport-agnostic

17:23 there's an HTTP transport for nrepl, but it only has one client

17:23 bitemyapp: technomancy: I'm thinking more like Pymacs-as-a-service than something like nrepl-discover.

17:23 gfredericks: even if nrepl doesn't believe in transport, transport believes in nrepl.

17:23 technomancy: reading up on pymacs now

17:24 bitemyapp: technomancy: Pymacs is how I use Rope and other IDE-esque features for Emacs.

17:24 Pymacs is a little janky though, which is why I vendored the dependency in my dotfiles.

17:24 technomancy: never understood the "I want to write python instead of elisp" motivation at all; sounds terrible

17:24 bitemyapp: realistically something like Pymacs could be a language-agnostic service provider.

17:24 technomancy: meh, it was needed to leverage rope.

17:24 technomancy: IMO having it be driven by editor portability makes way more sense

17:24 bitemyapp: technomancy: Rope is the most thorough open source way to analyze Python code.

17:25 * Bronsa is finally going to try cider over swank-clojure

17:25 bitemyapp: to reuse that in vim and Emacs meant pymacs and whatever the vim equivalent is.

17:25 technomancy: bitemyapp: sure, for hacking on python itself

17:25 bitemyapp: I think the vimmers actually just invoke command line stuff that runs rope.

17:25 technomancy: some of the docs seem to indicate it's a way to write python just to avoid writing elisp

17:25 bitemyapp: technomancy: right, but that's the point, the languages understand themselves and nobody had the good sense to do like Scala and Haskell and make "IDE as a service" providers.

17:25 technomancy: or maybe I was misreading things

17:26 bitemyapp: technomancy: it's so you can directly leverage Python libraries in talking to Emacs without shelling out.

17:27 technomancy: yeah makes sense

17:27 that's basically what I'm talking about for clojure, except without the whole crazy "hard-coded to a single editor" bit

17:27 nrepl-discover is just a small facet of that

17:28 bitemyapp: oh lawd, maintenance interval. Time to make myself scarce.

17:28 technomancy: what's a neutral way to say "buffer" (the emacs/vim definition)?

17:28 any eclipse users around? =)

17:28 steerio: so from what i'm gather (while packing for a trip, hence the intermittent attention) you'd want to implement as much on the clojure side as possible to avoid coding the same logic for each editor

17:29 "i'm", crap, i can't english today

17:29 coventry: bitemyapp: By "IDE as a service", do you mean something like what technomancy wants nrepl-discover to do?

17:29 technomancy: steerio: zactly

17:30 steerio: the discussion sparked my interest because i've been using vim for 14 years and use it actively for clojure development

17:30 coventry: bitemyapp: Because if some language has already done something similar, it would be really interesting to look at.

17:30 dsrx: http://www.mew.org/~kazu/proj/ghc-mod/en/

17:30 ^ for haskell

17:30 coventry: dsrx: Thanks.

17:31 technomancy: dsrx: huh; is this a command-line program?

17:32 looks like a nice place to steal ideas from

17:32 but they don't seem to care about non-textual responses

17:32 I think racket and factor are the only ones who do that

17:36 steerio: technomancy: can emacs display bitmaps? vim certainly cannot.

17:36 coventry: steerio: Yes it can.

17:36 technomancy: steerio: yeah, emacs can do most image types, svg, etc, but you would send an accept header with each request to indicate what you are capable of displaying

17:37 https://github.com/clojure-emacs/cider/blob/content-types/nrepl-client.el#L74 for instance

17:37 steerio: of course opening a separate app can still work with vim (could make sense if the nrepl server is remote)

17:37 technomancy: steerio: it is the Unix Way =)

17:38 bitemyapp: coventry: Haskell's ghc-mod, shime, ensime, etc are all examples of this.

17:38 coventry: they're APIs that you call from your editor to perform IDE functionality.

17:38 coventry: bitemyapp: Thanks.

17:38 steerio: technomancy: do you also consider loading non-textual content only on demand as a feature?

17:39 technomancy: steerio: not sure what that means

17:39 bitemyapp: coventry: this way, improving the service improves the faculties of all the editors simultaneously.

17:39 technomancy: huh; didn't realize ensime was editor-agnostic

17:39 steerio: technomancy: e.g. some response is a vector of 20 images, i don't necessarily want to display all of them, thus even downloading them is a waste of resources

17:39 technomancy: i click on element 2, gets downloaded and displayed

17:39 coventry: "shime" actually has "emacs" in the acronym. :-)

17:40 technomancy: steerio: ah... I see. that sorta makes me think of the mime-multipart spec

17:40 dsrx: nrepl can send non-textual information? what?

17:40 jtoy: i am building my own api layer on ring, typically how is the api key passed with the request, it shouldne be just a plain get param,otherwise everyone can see it

17:40 bitemyapp: coventry: meh.

17:40 technomancy: steerio: you still end up downloading the whole thing, but it's a way of putting many messages in a single response

17:41 steerio: technomancy: my company kinda specializes in software that's used in low-resource settings (for example medical software used in rural burkina faso, very scarce internet access), so this can be an issue

17:41 bitemyapp: coventry: http://www.mew.org/~kazu/proj/ghc-mod/en/

17:41 technomancy: steerio: if you need real laziness I think you need more roundtrips

17:41 steerio: technomancy: just as an example where such bottlenecks might count

17:41 dsrx: jtoy: everyone can see it just as much no matter where it is in the request, unless you mean you could inadvertedly include it in the logs or something

17:41 bitemyapp: coventry: ghc-mod replaced shime.

17:41 technomancy: steerio: responses can contain URLs that point to further nrepl calls

17:42 dsrx: nrepl can send anything! =) just a question of what the client knows how to display.

17:42 steerio: technomancy: question is, how long does the remote side actually hold those objects

17:42 bitemyapp: coventry: if you use Emacs, vim, or sublime, you're using ghc-mod. The Eclipse and FPComplete people have their own bullshit.

17:42 jtoy: dsrx: so just put it in get? how about the http headers ?

17:42 technomancy: dsrx: https://groups.google.com/forum/#!topic/clojure-tools/rkmJ-5086RY

17:42 dsrx: jtoy: i typically send api keys as basic authentication, and always use SSL

17:42 technomancy: steerio: right. I don't think that should necessarily be the job of the nrepl protocol to determine the scope of resources.

17:42 that's something you'd build on top of its session support

17:43 dsrx: technomancy: neat, thanks

17:43 steerio: technomancy: the only thing that concerns the protocol is that i need to be able to configure how much / what kind of stuff i'd like to eagerly get

17:44 technomancy: steerio: like an HTTP HEAD request?

17:44 steerio: technomancy: i do support image/png, but i might not eagerly want it

17:45 let's stick to an easy example, i make a repl request that results in a vector of 20 images

17:45 i need to receive that it's a vector of 20 images, but eagerly getting all the image data might be overkill

17:45 dsrx: the HTTP accept header accounts for that unless i'm misunderstanding you; you can attach a weight to each MIME type

17:45 technomancy: steerio: I think the best way to support that is to return a bunch of references to server-side data through further requests

17:45 steerio: same if it's a huge 24bit surround audio file, whatever that can be big

17:46 Guest2849: how would one go about reifying this interface signature: public interface Expression<T>

17:47 steerio: technomancy: and keep around the data for the scope of a couple of additional requests, *1 style?

17:47 gtrak: Guest2849: generics don't exist at runtime except as metadata

17:47 jtoy: dsrx: I am going to try setting http headers

17:48 technomancy: steerio: yeah, I feel like that stuff belongs in the application layer

17:48 steerio: technomancy: so then responses need a uuid or a sequence number so the editor can clearly address it

17:48 gtrak: clojure's comiple-time is within java's run-time

17:48 Guest2849: gtrak: thanks... so do I ignore the signature, or what i the syntax to specify the generic?

17:49 gtrak: ignore it, I believe

17:49 Guest2849: gtrak: okay, thanks, I will give it a try...

17:49 dsrx: boo type erasure

17:49 gtrak: Guest2849: http://stackoverflow.com/a/4004962/2559313

17:51 Guest2849: gtrak: thanks, that seemed appropriate... the issues I am getting now are unrelated, so I think that was an appropriate tack, thanks again

17:52 gtrak: and thanks for the SO confirmation

17:52 bitemyapp: Datomic's REST API might be the most half-assed thing I have ever seen.

17:52 Welp. Time for a custom peer.

17:56 dnolen: wow Cursive Clojure for IntelliJ is pretty fancy

17:57 bitemyapp: so I've heard. I didn't care for it myself.

17:57 it's what I recommend to people that want to stick with IntelliJ, since IntelliJ themselves are too lazy to maintain LaClojure.

17:58 gtrak: I just can't unlearn emacs.. even for java.

17:58 bitemyapp: Emacs uber alles.

17:59 scottj: where lazy = hard at work making solid IDEs for several of the most popular languages :)

17:59 arrdem: gtrak: is there a reasonable way to pull that off? I haven't tried yet

17:59 bitemyapp: thanks for ensime, dat package did work

18:00 bitemyapp: arrdem: I'm disappointed in you.

18:00 arrdem: bitemyapp: wat

18:00 bitemyapp: arrdem: ditch the pleb FP, use Haskell instead >:P

18:00 ~scala is pleb FP

18:00 clojurebot: Ack. Ack.

18:00 technomancy: doth it reek of the cubicle farm?

18:00 bitemyapp: ~scala is a good way to make people hate functional programming

18:00 clojurebot: Ok.

18:01 arrdem: technomancy: verily

18:01 bitemyapp: technomancy: the language is perversely designed.

18:01 ToxicFrog: ~scala is like haskell except I can actually get stuff done in it

18:01 clojurebot: In Ordnung

18:01 bitemyapp: if designed is even the word for it.

18:01 * ToxicFrog runs

18:01 bitemyapp: ToxicFrog: why are you even here?

18:01 technomancy: bitemyapp: axisofeval reference

18:01 arrdem: ToxicFrog: I'm comming fore you

18:01 bitemyapp: ToxicFrog: Clojure and Haskell both do a better job of representing FP than Scala, Scala is fake FP that forces you into OOP/imperative programming because of the mis-design.

18:02 technomancy: oh wait, it was loper-os, not axisofeval

18:02 dsrx: lol, axisofeval

18:02 technomancy: bitemyapp: http://www.loper-os.org/?p=42

18:02 arrdem: bitemyapp: scala's design makes perfect sense if you think about it as being Java with FP and implicits hacked ontop rather than considering it a real FP language.

18:02 that guy...

18:03 quizme: I'm parsing files about about 20k each. If I call (dorun (pmap parse-files (take-while (not (nil? file-seq))))) is it likely to overflow the memory if I call this "lein trampoline run" without any special java compiler options?

18:03 bitemyapp: arrdem: it's terrible. I'm digging up a post from Kmett, just give me a moment.

18:04 quizme: oops, i made a mistake with the take-while, but you know what i mean(?)

18:04 bitemyapp: technomancy: Edward Kmett (famous Haskell hacker, lens guy) wrote a ton of Scala at work for the first version of the Ermine language, he rewrote it in Haskell for reasons I will post in a moment.

18:04 arrdem: bitemyapp: I've written one program in scala because the prof insisted in scala. chill. I'm still a believer :P

18:04 ToxicFrog: bitemyapp: so, I really enjoyed using Scala, most of my scala work is state-light and HOF-heavy, and if not for my experience with scala I probably wouldn't have bothered looking at clojure

18:04 bitemyapp: ding ding ding, http://www.reddit.com/r/haskell/comments/1pjjy5/odersky_the_trouble_with_types_strange_loop_2013/cd3bgcu

18:05 ToxicFrog: the moment you need to write anything performant, FP in Scala falls apart.

18:05 ToxicFrog: read the post I just linked.

18:05 technomancy: bitemyapp: yeah the only reason I said anything is that you reminded me of the loper-os guy

18:05 bitemyapp: Scala makes true FP incredibly painful.

18:05 ToxicFrog: scala is also the language that convinced me that I don't hate static typing, I just hat emost statically typed languages

18:05 bitemyapp: technomancy: I hope not.

18:05 ToxicFrog: Fortunately nothing I write outside of work is performance-constrainted

18:05 bitemyapp: ToxicFrog: Scala convinces most people that they hate FP.

18:05 ToxicFrog: when there are no constraints or design goals, anything can work.

18:06 ToxicFrog: Yes, kessler would probably have been faster in another language, but those costs are completely dominated by the cost of sending and recieving 10+MB of data to a remote server

18:06 etc

18:06 arrdem: technomancy: ouch. that's harsh even for beating on bitemyapp

18:06 bitemyapp: ToxicFrog: read the post.

18:06 it's not just about speed.

18:06 ToxicFrog: bitemyapp: I am not arguing that scala is a perfect language for all or even most applications. I am just saying that I greatly enjoyed using it and it got me interested in languages and programming techniques I would not otherwise have played with.

18:06 bitemyapp: it's about how Scala punishes FP semantically.

18:06 ToxicFrog: read the post.

18:06 ToxicFrog: seriously, stop yapping at me. I've used Scala plenty.

18:07 I hate it because I know it, not because I don't.

18:07 I'd rather write Clojure than Scala and I *like* types.

18:08 ToxicFrog: bitemyapp: I have. None of those were problems for me except tail recursion. Maybe it would be different if I were using it for big performance-critical customer-facing production systems, but I wasn't because I don't find that enjoyable.

18:08 bitemyapp: technomancy: in particular, the absurd type signatures in Scala once you get into monads and the like really pissed me off.

18:08 "except TCO", implying that's somehow a small thing.

18:09 ToxicFrog: It was small enough that I opted to write a bunch of programs in scala instead of lua or python.

18:09 Or haskell.

18:09 These days I would probably use Clojure + core.typed for everything and just hold my nose at the awful error reporting

18:21 arrdem: how is it that there isn't a good treebeard hasty meme

18:22 just didn't search hard enough. failure is mine.

18:22 bitemyapp: arrdem: HOOOOM

19:28 kairn: I'm paying my monad dues right now (with algo.monads) and `domonad`'s use of nested function calls makes me wonder, if `Let` is an example of the identity monad, and every binding represents a nested function call, does that mean I can blow the stack if I bind enough variables?

19:33 brehaut: kairn: yes i believe so

19:33 (with the identity monad)

19:34 kairn: its a real problem for doing the monadic parser combinator approach in clojure with complex grammers and large inputs

19:35 kairn: algo.monads includes special case wrappers for things like state-m (and state-t) to do common things with macros rather than bind to avoid just that problem

19:35 kairn: brehaut: and is that generally a problem, or is the lack of TCO on the JV< the real culprit?

19:35 brehaut: lack of TCO

19:36 kairn: So, wouldn't it have been possible to rewrite at least some of the monads using recur?

19:36 brehaut: a bind recursion is a mutual recursion, so no

19:37 kairn: I don't recognize any mutual recursion in the macro expansion, how so?

19:38 brehaut: approximately (fn indentity-bind [m f] (f m))

19:38 bind calls f

19:38 justin_smith: should I extend my protocol to java.lang.Object, or is that intrusive?

19:39 brehaut: if f then calls bind again, they are doing a mutual recursion

19:39 so (identity-bind 1 (fn [x] (identity-bind 2 (fn [y] [x y]))))

19:40 ie (let [x 1 y 2] [x y]) using identity monad

19:41 justin_smith: rule of thumb that i got from i think joy of clojure: you can extend a protocol to a type if you own either the protocol or the type.

19:42 kairn: ah, that's right.

19:43 justin_smith: brehaut: cool, thanks

20:09 technomancy: there's no built-in way to get a file for a given namespace, right? you have to just pick a var and use that?

20:10 arrdem: technomancy: the backing source file of a ns? definitely not

20:13 technomancy: so actually it's easy; you just (comp :file meta val first ns-interns the-ns symbol)

20:14 drop-last 2 if you have an actual c.l.Namespace

20:15 arrdem: that's what I came up with... is :file guranteed? it should be trivial to come up with a case where :file is wrong or not meaningful.

20:15 technomancy: in this case I think I'm safe; it's unlikely people are entering deftests in the repl

20:16 arrdem: yeah unless someone's being silly and metaprogramming tests should work.

20:16 technomancy: then they can suck it up an run their tests manually =)

20:16 arrdem: =D

20:16 technomancy: even macro'd deftests will have :file though

20:18 arrdem: yeah any read or macro'd symbol that'll be OK for but if you do code generation via eval at runtime I think you could break :file.

20:20 technomancy: sure if you want to go out of your way to just ask things to break =)

20:22 argh; :file can be relative

20:25 classpath-relative too; not just pwd-relative

20:26 arrdem: yep ... are we having fun yet?

20:27 I think that they can even be inside jars... lemme see if I can get one...

20:30 dabd: is there a debugger i can use for stepping over forms?

20:30 currently using emacs + nrepl only

20:30 arrdem: technomancy: check this one out. (-> 'clojure.core.typed ns-interns first second meta :file) -> nil

20:31 technomancy: arrdem: I gave up; I have to pass a filename arg in from higher up

20:31 but feel free to continue to have fun with this problem =)

20:31 arrdem: surprisingly c.c has :file...

20:58 xpe: I just realized it is not easy to increase the precision of a BigDecimal! http://stackoverflow.com/a/20365270/109618

20:59 Long story short: You have to figure out what scale you want (by some adding and subtracting) then use `.setScale`. There is no single, simple way to change precision directly in such a way that will increase or decrease it.

20:59 with-precision will not do what you expect, but it isn't its fault. Java BigDecimal seems kindof crazytown to me

21:00 seancorfield: you've done work on Numeric Tower, right?

21:04 dbsr: evening all, im looking for a functional approach for this problem. I have a 2 dimensional grid which is a representation of a monochrome image (eg, pixels either are black (1) or white (0))

21:05 i would like to get every line in the image (both vertical and horizontal)

21:05 * arrdem grabs for his chips and slides them onto the box marked "map"

21:05 dbsr: i know I can use a while loop and simply iterate over the 2d grid

21:06 bitemyapp: arrdem: I love poker.

21:06 dbsr: im thinking takewhile?

21:06 bbloom: bitemyapp: that was a roulette or craps reference :-P

21:06 arrdem: bbloom: craps is what I was thinking

21:07 with one die having all the c.c/* symbols for sides

21:10 dbsr: seems like the concat of the map of (get-row n) and (get-col m) over the row and column ranges...

21:13 alandipert: dbsr: is your grid a vector of vectors?

21:31 buddywilliams: hello Clojure community

21:32 enjoying all the things I am learning from Clojure and the community, so thanks!

21:33 technomancy: ~group hug

21:33 clojurebot: Pardon?

21:35 hyPiRion: :D

21:36 gfredericks: (inc us)

21:36 lazybot: ⇒ 3

21:37 arrdem: wait wait since when do we have collective karma!

21:37 gfredericks: since three incs ago

21:37 hey we can inc/dec people in combinations

21:37 (inc hyPiRion+technomancy)

21:37 lazybot: ⇒ 1

21:38 * gfredericks doesn't know why that's useful

21:38 buddywilliams: I am writing a Chess program in Clojure, wahoo.

21:38 hyPiRion: gfredericks: but what if people inc the other way around?

21:38 arrdem: gfredericks: until (doseq [badass [hyPiRion technomancy]] (inc badass)) works I won't be impressed.

21:39 bbloom: clearly inc should be a polymorphic operation which is defined for sets

21:39 arrdem: (inc #{bbloom})

21:39 lazybot: ⇒ 1

21:39 gfredericks: (inc bbloom+polymorphic-operations)

21:39 lazybot: ⇒ 1

21:39 arrdem: seems feature complete

21:40 hyPiRion: hmm

21:40 dabd: when working with zippers if I call (z/children loc) I will get a seq of the children of node at loc but each element of the seq is a node and not a loc. I would like to get a seq of locs so I can test each children with z/branch? Is there any way to do it?

21:41 hyPiRion: (inc `([~@%&](+)))

21:41 lazybot: ⇒ 1

21:41 arrdem: $karma inc

21:41 lazybot: inc has karma 4.

21:41 bbloom: dabd: my experience has been that clojure.zip's API leaves a lot to be desired....

21:42 hyPiRion: (identity inc)

21:42 lazybot: inc has karma 4.

21:42 dabd: bbloom: i am having a hard time working with it too

21:42 arrdem: ~projects

21:42 clojurebot: Gabh mo leithscéal?

21:43 dabd: i am tryinig to write an algorithm to work over a tree zipper and it is a nightmare

21:43 arrdem: ~projects is 1. make karma vars in clojurebot

21:43 clojurebot: Alles klar

21:43 bbloom: dabd: describe your algorithm for me, maybe i can suggest a good approach

21:43 since we're playing with clojurebot...

21:43 ~bbloom

21:43 clojurebot: bbloom is a dendrologist

21:44 bbloom: yeah, that's it :-P

21:44 dabd: it is a recursive algorithm that performs a depth first traversal of a tree

21:44 bbloom: dabd: have you considered tree-seq ?

21:44 arrdem: bitemyapp: you unset your clojurebot entry, jerk

21:44 dabd: bbloom: i didn't. I have to read about it

21:45 bbloom: dabd: does your algorithm do a single pass over the tree?

21:45 dabd: or is there backtracking or other non-linear traversal?

21:45 dabd: yes it is a single pass

21:46 holo: hi

21:46 dabd: actually the algorithm is a similar to a minimax

21:46 bbloom: dabd: what order do you need to traverse it in? pre/post/infix or some combination thereof?

21:46 dabd: but it is for stochastic games, it is called miximax

21:46 dnolen: all the Google Closure warning knobs now exposed in CLJS master

21:47 bbloom: dabd: are you culling branches of the tree?

21:48 dabd: depth first traversal pre order

21:48 culling = pruning?

21:48 if it is no, i traverse the complete tree

21:49 bbloom: dabd: ok perfect. you want tree-seq + reduce :-)

21:49 dabd: dramatically less to think about than a zipper

21:49 (reduce initial-algorithm-state visit-node (tree-seq branch? children root))

21:49 dabd: bbloom: thanks for the tip, let me research tree-seq

21:50 bbloom: dabd: your program should boil down to that line of code ^^ :-)

21:50 holo: this question is maybe a little off-topic for #clojure, but I guess many of you encountered similar situation. a potential partner that also develops software is going to present me a business proposal. he needs me solve a problem. what basic questions should i ask? I had topics about this in college, but my intuition about it is kind of rusty now

21:50 dabd: initial-algorithm state is a function?

21:50 or you got the args to reduce in wrong order?

21:50 bbloom: dabd: oh yeah, sorry. swap the first 2 args

21:51 it's just whatever book keeping you need to do doing the algorithm

21:51 dabd: i think i need to reverse all 3 args :-P

21:51 bbloom: i use reduce like 100X a day, but i have to look up the arge order every time

21:52 nah, it's (reduce f val coll)

21:52 (:result (reduce f {:result {:some "initial value"}} xs)) ;; all my programs :-P

21:52 dabd: ok, i am so disappointed with the zippers. It seemed like a very nice data structure

21:53 maybe the api can be improved?

21:53 bbloom: dabd: clojure.zip is simultaneously too general and not general enough

22:01 dabd: maybe adding a fn children-locs that will return a seq of the children as locs would help

22:01 like 'down' will return the loc of the leftmost child of a node

22:02 all is working well except that the current 'children' fn loses navigational information by returning a seq of nodes

22:04 dnolen: Google Closure defines now supported in CLJS master https://github.com/clojure/clojurescript/commit/cb7e97f13ae6a03086f5d96ba58e5f3d5cba7dc3

22:12 brainproxy: dnolen: performance gain?

22:12 I spent all day hacking on goog/base.js ... brain hurts

22:13 dnolen: brainproxy: not at all, this just about exposing useful Closure knobs for those people who care

22:13 brainproxy: heh, why? are you trying to fake in a Node.js context or something?

22:13 brainproxy: dnolen: trying to hack in support for using it in the context of HTML Import polyfill

22:13 so close ... but no cigar

22:14 dnolen: w.r.t. to previous question, I was being roundabout in asking what @define is good for... any examples?

22:15 dnolen: brainproxy: I have no examples handy, but if you look at the original ticket people were interested in it for internationalization I think.

22:15 brainproxy: compile time parameterization of source code, is that the idea?

22:15 dnolen: brainproxy: yes

22:15 brainproxy: got it

22:15 sounds useful :D

22:33 dnolen: noprompt: if you build and install master you can use :closure-warnings {:non-standard-jsdoc :off}, to suppress those lame Closure warnings when building React under advanced

22:34 noprompt: dnolen: nice! did you just add this?

22:34 dnolen: noprompt: yep

22:34 noprompt: sweet :)

22:39 andyf_: There is nothing like trying to do static checks on a dynamic language that makes one appreciate the myriad possibilities inherent in the word 'dynamic'.

22:45 noprompt: dnolen: is it planned to show up in the next release?

22:45 dnolen: noprompt: yeah probably by this weekend, there's some other stuff I'd like to get in

22:48 noprompt: dnolen: that'll be great. i'm thinking of forking this pump project and seeing what i can do to help out.

22:51 dnolen: noprompt: cool, trying figure out a more functional approach sounds like a good problem to tackle - poking around more myself now to see what I can see

22:56 noprompt: dnolen: it sounded to me like they might be open to some contribution.

22:56 dnolen: noprompt: yes

23:18 andyf_: jonasen: I would recommend reading the discussion on this ticket, if you haven't already: http://dev.clojure.org/jira/browse/TANAL-22 Relevant to the question of whether you would like to use tools.analyzer(.jvm) as is, or write a customized set of phases.

23:23 I know that most often writing a def nested inside of another def is not a good idea, but are there any non-wizardly examples where it is needed, or at least more straightforward than not doing so?

23:24 nightfly: Not that I can think of. Since the inner function would get change every time the outer function is called.

23:26 hiredman: andyf_: no

23:29 jonasen: andyf_: I think its ok for eastwood to throw an exception on invalid arg count. An :invalid-arg-count linter would be even better since that would mean we could continue analysis.

23:33 andyf_: I couldn't think of any common good reasons for using def inside def either, but wanted to check. Was writing up some brief docs for a lint tool that warns about occurrences of that, among other things.

23:34 jonasen: Agreed. It isn't urgent to do the fancier thing now, except to make sure that the message that comes with the exception is easy to understand, which it isn't right now.

23:51 technomancy: I put def in a def for super lazy debugging, but I would never check it in except by accident.

23:53 in fact I would probably yell at anyone if they did check it in

Logging service provided by n01se.net