#clojure log - Jun 17 2014

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

0:04 hellofunk: ddellacosta i'm curious, if something like

0:04 if something like ClientMsg. is a fn, then using apply on it should work fne?

0:04 *fine

0:13 Fare: extend question: if a same function is present in multiple protocols (that may extend each other), do I need to specify it only once? In any protocol?

0:23 amalloy: protocols don't/can't extend each other, so what does your question mean?

0:28 ddellacosta: hellofunk: I think that JS interop stuff is special and that you cannot use apply with it. I believe it is a special form rather than a function.

1:06 amalloy: hellofunk: javascript doesn't really give you a way to apply constructors

1:06 see http://stackoverflow.com/questions/3362471/how-can-i-call-a-javascript-constructor-using-call-or-apply, for example, to see what kind of nonsense people get up to

1:19 hellofunk: ddellacosta amalloy ah ok

1:19 ddellacosta: ah, didn't realize it was on the JS level. Thanks amalloy.

1:19 hellofunk: Fare: you should clarify if you are talking about extending a type to use protocols, or extending a protocol to certain types since "extend" doesn't mean much by itself

1:42 wow i am getting a reader error from inside a defn form that has #_ at the front; shouldn't the reader skip the entire form at that point rather than look inside it?

1:42 if I get rid of the offending code inside the defn that has #_ prepended, the file compiles fine.

1:45 brainproxy: i know there are a few people in #clojure that in the past have offered some sound advice re: encryption,hashing

1:45 any comments as to whether this is a sound way to generate password,hash pairs: https://gist.github.com/anonymous/e168a8b46b9a8a5c7d24

1:50 ambrosebs: hellofunk: the reader still needs to read till the end of the form.

1:51 hellofunk: ambrosebs interesting, i knew that with (comment...) you would still get reading inside the form, but i thought #_ did zero reading inside the form.

1:57 ambrosebs: I assume #_ means "read the next form and then drop it"

1:58 not sure how it could possibly work otherwise.

1:58 hellofunk: ambrosebs well that must be how it works since you can get reader errors inside the #_ form

1:58 learn something today (actually a few things)

1:59 :)

1:59 ambrosebs: nice

2:02 amalloy: hellofunk: how could it possibly skip a whole form, if the thing inside weren't required to be a valid form?

2:03 ambrosebs: magic

2:03 (I used to assume similar magic from #_)

2:04 hellofunk: amalloy i see what you mean. in this case i was trying to generate what follows #js and learned that i don't think you can, since it must be part of the literal. so having #js (whatever..) instead of a #js {...} breaks compilation even inside a #_(defn ...)

2:13 amalloy: yeah, reader literals are literals

Logging service provided by n01se.net