workspace
stringclasses 4
values | channel
stringclasses 4
values | text
stringlengths 1
3.93k
| ts
stringlengths 26
26
| user
stringlengths 2
11
|
---|---|---|---|---|
clojurians | clojure | oh god… | 2017-12-08T17:22:42.000333 | Deandrea |
clojurians | clojure | GIGO is such a punitive perspective. | 2017-12-08T17:23:09.000223 | Deandrea |
clojurians | clojure | Ah, you are right <@Kareen> | 2017-12-08T17:23:42.000299 | Guillermo |
clojurians | clojure | am I? and to think you just convinced me that you were right.. | 2017-12-08T17:24:18.000161 | Kareen |
clojurians | clojure | i am definitely wrong, it's 530PM EST on friday. | 2017-12-08T17:24:48.000253 | Guillermo |
clojurians | clojure | TIL `(merge)` works | 2017-12-08T17:25:21.000095 | Kareen |
clojurians | clojure | go home ghadi | 2017-12-08T17:25:26.000143 | Charity |
clojurians | clojure | (I think I confused myself with the metadata propagation, which only happens when the first arg is not nil) | 2017-12-08T17:25:33.000247 | Guillermo |
clojurians | clojure | But `:m0` should be `(s/nilable (s/keys))` | 2017-12-08T17:26:05.000501 | Guillermo |
clojurians | clojure | <@Kareen> the best parge is that `(merge)` returns nil | 2017-12-08T17:26:12.000107 | Margaret |
clojurians | clojure | haha yes ^ | 2017-12-08T17:26:18.000231 | Guillermo |
clojurians | clojure | yeah haha | 2017-12-08T17:26:18.000298 | Kareen |
clojurians | clojure | I have a feeling that part is definitely gigo | 2017-12-08T17:26:31.000456 | Kareen |
clojurians | clojure | it is a strange implementation | 2017-12-08T17:26:32.000277 | Guillermo |
clojurians | clojure | the `some identity` check at the beginning | 2017-12-08T17:26:45.000391 | Guillermo |
clojurians | clojure | and it's not really supposed to work | 2017-12-08T17:26:47.000259 | Kareen |
clojurians | clojure | oh | 2017-12-08T17:26:54.000257 | Kareen |
clojurians | clojure | ¯\_(ツ)_/¯ | 2017-12-08T17:26:57.000195 | Kareen |
clojurians | clojure | can someone explain to me what is attractive about the GIGO rationale? | 2017-12-08T17:27:19.000298 | Deandrea |
clojurians | clojure | I'll just write `nil` as `(merge nil nil nil nil nil)` from now on | 2017-12-08T17:27:27.000219 | Kareen |
clojurians | clojure | i’ve always found it punitive. | 2017-12-08T17:27:28.000168 | Deandrea |
clojurians | clojure | there's nothing particularly attractive about it, it's just reality in a dynamic langauge. spec is moving us towards Garbage In EXCEPTION | 2017-12-08T17:27:59.000255 | Aldo |
clojurians | clojure | <@Kareen> merge -> (merge nil nil nil nil) get -> (get get get get) | 2017-12-08T17:28:09.000449 | Margaret |
clojurians | clojure | it can be <@Deandrea>... I think spec will _really_ help with that. | 2017-12-08T17:28:13.000394 | Guillermo |
clojurians | clojure | hah | 2017-12-08T17:28:29.000385 | Kareen |
clojurians | clojure | ```
user=> (merge [] {})
[{}]
``` | 2017-12-08T17:28:35.000244 | Guillermo |
clojurians | clojure | no matter how many times I see that get over the years it always makes me chuckle | 2017-12-08T17:28:46.000157 | Kareen |
clojurians | clojure | it’s probably one of my greatest discoveries | 2017-12-08T17:29:07.000161 | Margaret |
clojurians | clojure | one of many | 2017-12-08T17:29:17.000254 | Kareen |
clojurians | clojure | <@Aldo> can you clarify your claim that it’s a “reality in dynamic languages”. it’s not clear to me how typing discipline plays a role here. | 2017-12-08T17:29:30.000003 | Deandrea |
clojurians | clojure | <@Guillermo> yes, that is one thing i find attractive about it (spec). | 2017-12-08T17:29:47.000351 | Deandrea |
clojurians | clojure | somebody should work on a dialect of swearjure that only uses weird stuff like this | 2017-12-08T17:29:55.000292 | Kareen |
clojurians | clojure | for those who are unfamiliar ```=> (= get ((get get get get) {get get} get))
true``` | 2017-12-08T17:30:13.000345 | Margaret |
clojurians | clojure | gigjure | 2017-12-08T17:30:18.000131 | Kareen |
clojurians | clojure | well, how would you prevent gigo in clojure? spec! what happens if you don't do something like that? gigo! ie, gigo is just the default case in a dynamic language where data is passed around in structures with uniform interfaces | 2017-12-08T17:31:59.000310 | Aldo |
clojurians | clojure | <@Aldo> that may be true from some cases but that has more to do with the programmer who wrote the source. it’s not inherently a problem in dynamic languages. | 2017-12-08T17:32:49.000359 | Deandrea |
clojurians | clojure | another option would be to sanity check all inputs manually. I'm glad no one took the time to do that seeing as spec exists now and that code would just be noise | 2017-12-08T17:33:15.000008 | Aldo |
clojurians | clojure | <@Aldo> i disagree. `:pre` and `:post` checks, which i use heavily, are useful. | 2017-12-08T17:33:58.000247 | Deandrea |
clojurians | clojure | but they're super noisy | 2017-12-08T17:34:09.000355 | Guillermo |
clojurians | clojure | and slow | 2017-12-08T17:34:15.000073 | Guillermo |
clojurians | clojure | for development. | 2017-12-08T17:34:19.000149 | Deandrea |
clojurians | clojure | and only when `*check-asserts*` is true. instrumentation with spec is extremely slow as well. | 2017-12-08T17:34:41.000440 | Deandrea |
clojurians | clojure | they're certainly useful. but they're noisy, and quite a lot of work. I think spec is a much more elegant solution because it gives you some sort of structural documentation and errors as well as validation | 2017-12-08T17:34:53.000373 | Aldo |
clojurians | clojure | if someone had gone through core and :pre'd every function then the current work of going through core and spec'ing every function would feel a bit redundant | 2017-12-08T17:35:46.000146 | Aldo |
clojurians | clojure | so basically, the argument in favor of GIGO is “i don’t want to write the sanity checks for my code because it’s noisy”? | 2017-12-08T17:35:53.000042 | Deandrea |
clojurians | clojure | pretty much | 2017-12-08T17:36:00.000287 | Charity |
clojurians | clojure | "I don't want to write the sanity checks because it's noisy and I have more important things to write" | 2017-12-08T17:36:18.000311 | Aldo |
clojurians | clojure | that seems like a weak argument against clearly expressing your domain, range, semantics, etc. | 2017-12-08T17:36:23.000137 | Deandrea |
clojurians | clojure | and that's why spec has been created? | 2017-12-08T17:36:32.000383 | Aldo |
clojurians | clojure | yes. | 2017-12-08T17:36:37.000267 | Deandrea |
clojurians | clojure | Leverage | 2017-12-08T17:36:40.000363 | Guillermo |
clojurians | clojure | not just that - overly strict preconditions can make later extensions tedious or incompatible | 2017-12-08T17:36:44.000335 | Margaret |
clojurians | clojure | <@Margaret> i can see that, although, i’ve never come up against that in practice. | 2017-12-08T17:37:09.000121 | Deandrea |
clojurians | clojure | <@Deandrea> simple example - imagine whitelisting the allowed keys in a hash-map - you now need to rewrite your code as soon as code around it is extended, even though it shouldn’t have to care | 2017-12-08T17:37:58.000132 | Margaret |
clojurians | clojure | other cases are more subtle but often just as tedious | 2017-12-08T17:38:12.000390 | Margaret |
clojurians | clojure | <@Aldo> i’ve seen that attitude fail catastrophically though, enough so that `:post (some? %)` has saved me hours of debugging. | 2017-12-08T17:38:19.000115 | Deandrea |
clojurians | clojure | you can get future proof code without a bunch of complex incantations by failing to validate, once you validate future proofing is more work, and adds complexity in which bugs can hide | 2017-12-08T17:39:38.000412 | Margaret |
clojurians | clojure | (unless the validating comes from the outside, eg. spec) | 2017-12-08T17:39:56.000075 | Margaret |
clojurians | clojure | I don't think anyone disagrees that some validation can be very useful. which is presumably why schema became so popular and why spec was created. I personally think on balance :pre and :post don't give enough extra value to go along with the validation to make them worth it the vast majority of the time. schema gave a bit more value and now spec gives even more to help tip the scales towards making it worth doing | 2017-12-08T17:40:12.000172 | Aldo |
clojurians | clojure | <@Margaret> i suppose my argument there would that, to your point, the constraint is too tight. spec doesn’t alleviate you from that either. | 2017-12-08T17:40:17.000253 | Deandrea |
clojurians | clojure | if only there were technologies for late-parameterizing specifications with additional requirements | 2017-12-08T17:40:49.000211 | Charity |
clojurians | clojure | <https://i.imgflip.com/20r5et.jpg> | 2017-12-08T17:41:19.000174 | Margaret |
clojurians | clojure | :joy: | 2017-12-08T17:41:24.000399 | Deandrea |
clojurians | clojure | lol | 2017-12-08T17:41:30.000171 | Deandrea |
clojurians | clojure | >.> | 2017-12-08T17:41:37.000239 | Charity |
clojurians | clojure | so GIGO is not salient when constraints are and vice-versa? | 2017-12-08T17:42:29.000223 | Deandrea |
clojurians | clojure | I don't understand what we're arguing about, clojure had a GIGO problem and now we have spec to avoid that | 2017-12-08T17:42:36.000232 | Kareen |
clojurians | clojure | I thought GIGO in Clojure was purely motivated by run-time efficiency ? | 2017-12-08T17:42:37.000432 | Micha |
clojurians | clojure | I wouldn't say purely but that's the biggest reason | 2017-12-08T17:43:05.000409 | Kareen |
clojurians | clojure | <@Kareen> i was simply trying to understand the attraction to the GIGO rationale. | 2017-12-08T17:43:07.000369 | Deandrea |
clojurians | clojure | And have any core Clojure developers ever called it GIGO, or is that something originated by others? | 2017-12-08T17:43:16.000272 | Micha |
clojurians | clojure | GIGO isn't a philosophy or a rationale, it's just a statement. if you pass nonsense in that there's no validation checks around you can expect to get nonsense out | 2017-12-08T17:43:19.000265 | Aldo |
clojurians | clojure | <@Micha> I'm sure I've seen alex call it GIGO more than once :) | 2017-12-08T17:43:38.000215 | Kareen |
clojurians | clojure | i’ve seen that too. | 2017-12-08T17:43:56.000143 | Deandrea |
clojurians | clojure | <@Aldo> in some cases it is a rationale. | 2017-12-08T17:44:15.000057 | Deandrea |
clojurians | clojure | I would like to see one of those cases | 2017-12-08T17:44:25.000233 | Aldo |
clojurians | clojure | while GIGO is just a fact, there’s a rationale to prefering code with GIGO behavior over defensive code - which does describe clojure code before spec | 2017-12-08T17:44:33.000260 | Margaret |
clojurians | clojure | yeah but that preference is because of "performance" or "cleaner code" or "whatever". it's not like anyone is specifically trying to write code to silently fail | 2017-12-08T17:45:17.000287 | Aldo |
clojurians | clojure | <@Aldo> <https://clojurians.slack.com/archives/C03S1KBA2/p1512771734000461> | 2017-12-08T17:45:42.000231 | Deandrea |
clojurians | clojure | meh, you make it sound like most GIGO in clojure was a *design decision* when in reality it is just lack of validation to avoid:
- runtime performance costs
- having to manually write explicit checks for everything | 2017-12-08T17:46:03.000415 | Kareen |
clojurians | clojure | <@Aldo> If you mean an example of GIGO being a rationale to avoid adding run-time type checks, the clojure.set operators are the biggest example in my mind, e.g. <https://dev.clojure.org/jira/browse/CLJ-1953> | 2017-12-08T17:46:13.000437 | Micha |
clojurians | clojure | <@Deandrea> ghadi isn't a core developer | 2017-12-08T17:46:21.000285 | Kareen |
clojurians | clojure | <@Kareen> what does that have to do with the discussion? | 2017-12-08T17:46:39.000299 | Deandrea |
clojurians | clojure | that's what andy asked | 2017-12-08T17:46:50.000089 | Kareen |
clojurians | clojure | they're using "gigo" to describe "that's a case where the function does something unintended because you passed in something unintended". I don't see anyone saying "it should be that way cuz gigo" | 2017-12-08T17:46:59.000442 | Aldo |
clojurians | clojure | i was merely interested in why GIGO is floated as an answer ever. | 2017-12-08T17:47:01.000099 | Deandrea |
clojurians | clojure | because it's a succinct and accurate one? | 2017-12-08T17:47:33.000023 | Aldo |
clojurians | clojure | look, s/GIGO/undefined behaviour/ | 2017-12-08T17:47:34.000179 | Kareen |
clojurians | clojure | gigo is just shorter to type | 2017-12-08T17:47:55.000147 | Kareen |
clojurians | clojure | <@Kareen> ah, okay. | 2017-12-08T17:48:13.000124 | Deandrea |
clojurians | clojure | <@Aldo> accurate? | 2017-12-08T17:48:23.000131 | Deandrea |
clojurians | clojure | :joy: | 2017-12-08T17:48:34.000156 | Deandrea |
clojurians | clojure | <@Micha> no one is saying they're not validating clojure.set "because gigo". If you were to specifically ask my guess would be "because performance and can't be bothered" | 2017-12-08T17:48:39.000230 | Aldo |
clojurians | clojure | <@Aldo> i’m pretty sure that’s been floated as a rationale in that discussion. | 2017-12-08T17:49:00.000235 | Deandrea |
clojurians | clojure | no | 2017-12-08T17:49:21.000242 | Kareen |
clojurians | clojure | core members have said in multiple forums that spec will "solve" the gigo issues of clojure.set | 2017-12-08T17:49:37.000374 | Kareen |
clojurians | clojure | so clearly gigo is not a rationale | 2017-12-08T17:49:46.000166 | Kareen |
clojurians | clojure | in one of the linked tickets "Now that `set` is faster for sets, I think we could actually add checking for sets in some places where we might not have before. " | 2017-12-08T17:49:54.000232 | Aldo |
clojurians | clojure | or that ^ | 2017-12-08T17:50:05.000401 | Kareen |
clojurians | clojure | so the previous reason was performance. and the current reason is "better things to do so far" | 2017-12-08T17:50:11.000408 | Aldo |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.