2014-06-17
| 00:04 | hellofunk | ddellacosta i'm curious, if something like |
| 00:04 | hellofunk | if something like ClientMsg. is a fn, then using apply on it should work fne? |
| 00:04 | hellofunk | *fine |
| 00: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? |
| 00:23 | amalloy | protocols don't/can't extend each other, so what does your question mean? |
| 00: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. |
| 01:06 | amalloy | hellofunk: javascript doesn't really give you a way to apply constructors |
| 01:06 | amalloy | 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 |
| 01:19 | hellofunk | ddellacosta amalloy ah ok |
| 01:19 | ddellacosta | ah, didn't realize it was on the JS level. Thanks amalloy. |
| 01: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 |
| 01:42 | hellofunk | 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? |
| 01:42 | hellofunk | if I get rid of the offending code inside the defn that has #_ prepended, the file compiles fine. |
| 01:45 | brainproxy | i know there are a few people in #clojure that in the past have offered some sound advice re: encryption,hashing |
| 01:45 | brainproxy | any comments as to whether this is a sound way to generate password,hash pairs: https://gist.github.com/anonymous/e168a8b46b9a8a5c7d24 |
| 01:50 | ambrosebs | hellofunk: the reader still needs to read till the end of the form. |
| 01: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. |
| 01:57 | ambrosebs | I assume #_ means "read the next form and then drop it" |
| 01:58 | ambrosebs | not sure how it could possibly work otherwise. |
| 01:58 | hellofunk | ambrosebs well that must be how it works since you can get reader errors inside the #_ form |
| 01:58 | hellofunk | learn something today (actually a few things) |
| 01:59 | hellofunk | :) |
| 01:59 | ambrosebs | nice |
| 02:02 | amalloy | hellofunk: how could it possibly skip a whole form, if the thing inside weren't required to be a valid form? |
| 02:03 | ambrosebs | magic |
| 02:03 | ambrosebs | (I used to assume similar magic from #_) |
| 02: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 ...) |
| 02:13 | amalloy | yeah, reader literals are literals |