#clojure logs

2014-06-17

00:04hellofunkddellacosta i'm curious, if something like
00:04hellofunkif something like ClientMsg. is a fn, then using apply on it should work fne?
00:04hellofunk*fine
00:13Fareextend 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?
00:23amalloyprotocols don't/can't extend each other, so what does your question mean?
00:28ddellacostahellofunk: 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.
01:06amalloyhellofunk: javascript doesn't really give you a way to apply constructors
01:06amalloysee 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
01:19hellofunkddellacosta amalloy ah ok
01:19ddellacostaah, didn't realize it was on the JS level. Thanks amalloy.
01:19hellofunkFare: 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
01:42hellofunkwow 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?
01:42hellofunkif I get rid of the offending code inside the defn that has #_ prepended, the file compiles fine.
01:45brainproxyi know there are a few people in #clojure that in the past have offered some sound advice re: encryption,hashing
01:45brainproxyany comments as to whether this is a sound way to generate password,hash pairs: https://gist.github.com/anonymous/e168a8b46b9a8a5c7d24
01:50ambrosebshellofunk: the reader still needs to read till the end of the form.
01:51hellofunkambrosebs interesting, i knew that with (comment...) you would still get reading inside the form, but i thought #_ did zero reading inside the form.
01:57ambrosebsI assume #_ means "read the next form and then drop it"
01:58ambrosebsnot sure how it could possibly work otherwise.
01:58hellofunkambrosebs well that must be how it works since you can get reader errors inside the #_ form
01:58hellofunklearn something today (actually a few things)
01:59hellofunk:)
01:59ambrosebsnice
02:02amalloyhellofunk: how could it possibly skip a whole form, if the thing inside weren't required to be a valid form?
02:03ambrosebsmagic
02:03ambrosebs(I used to assume similar magic from #_)
02:04hellofunkamalloy 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 ...)
02:13amalloyyeah, reader literals are literals