Logs: liberachat/#haskell
| 2021-05-31 18:57:40 | <Guest81> | positive and covariant are the same thing? |
| 2021-05-31 18:57:45 | <monochrom> | I don't know what that is. |
| 2021-05-31 18:58:21 | → | __monty__ joins (~toonn@user/toonn) |
| 2021-05-31 18:58:39 | × | pbrisbin quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (Ping timeout: 272 seconds) |
| 2021-05-31 18:58:48 | → | favonia joins (~favonia@user/favonia) |
| 2021-05-31 18:59:08 | <monochrom> | Since you put "positive" in quotes I take it that you acknowledge you only have a feeling not a rigorous definition so I filled in the closest widely-known rigorous definition which is covariant. |
| 2021-05-31 18:59:50 | × | hololeap quits (~hololeap@user/hololeap) (Read error: Connection reset by peer) |
| 2021-05-31 19:00:50 | × | favonia quits (~favonia@user/favonia) (Client Quit) |
| 2021-05-31 19:01:34 | → | favonia joins (~favonia@user/favonia) |
| 2021-05-31 19:01:37 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 2021-05-31 19:01:46 | × | schuelermine quits (~anselmsch@user/schuelermine) (Quit: WeeChat 3.1) |
| 2021-05-31 19:01:49 | → | cheater joins (~Username@user/cheater) |
| 2021-05-31 19:01:52 | <Guest81> | I see |
| 2021-05-31 19:05:38 | → | eggplant_ joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-05-31 19:05:45 | × | favonia quits (~favonia@user/favonia) (Client Quit) |
| 2021-05-31 19:06:13 | × | boioioing quits (~boioioing@cpe-76-84-141-127.neb.res.rr.com) (Ping timeout: 268 seconds) |
| 2021-05-31 19:06:20 | → | raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-05-31 19:07:03 | → | favonia joins (~favonia@user/favonia) |
| 2021-05-31 19:07:49 | → | chaosite joins (~chaosite@user/chaosite) |
| 2021-05-31 19:08:06 | → | zebrag joins (~chris@user/zebrag) |
| 2021-05-31 19:09:13 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3866:f955:de69:46b2) (Ping timeout: 272 seconds) |
| 2021-05-31 19:11:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-31 19:12:47 | → | eightball joins (~eight@86.106.121.164) |
| 2021-05-31 19:13:27 | × | favonia quits (~favonia@user/favonia) (Quit: The Lounge - https://thelounge.chat) |
| 2021-05-31 19:17:50 | → | favonia joins (~favonia@user/favonia) |
| 2021-05-31 19:21:49 | <dmj`> | Guest81: positive just means the type variable is in the codomain (input / arg), negative means its in the domain (output / return type) |
| 2021-05-31 19:21:51 | → | sedeki joins (~textual@user/sedeki) |
| 2021-05-31 19:21:56 | <dmj`> | :t fmap |
| 2021-05-31 19:21:57 | <lambdabot> | Functor f => (a -> b) -> f a -> f b |
| 2021-05-31 19:21:58 | <dmj`> | :t contramap |
| 2021-05-31 19:21:59 | <lambdabot> | Contravariant f => (a -> b) -> f b -> f a |
| 2021-05-31 19:22:24 | <dmj`> | er, I flipped them, positive is output, negative is input |
| 2021-05-31 19:22:28 | × | favonia quits (~favonia@user/favonia) (Client Quit) |
| 2021-05-31 19:23:24 | → | favonia joins (~favonia@user/favonia) |
| 2021-05-31 19:25:53 | → | boioioing joins (~boioioing@cpe-76-84-141-127.neb.res.rr.com) |
| 2021-05-31 19:26:34 | × | nerdypepper quits (znc@user/nerdypepper) (Ping timeout: 268 seconds) |
| 2021-05-31 19:27:25 | × | rahguzar quits (~rahguzar@dynamic-adsl-84-220-228-254.clienti.tiscali.it) (Ping timeout: 265 seconds) |
| 2021-05-31 19:27:59 | → | nerdypepper joins (znc@152.67.162.71) |
| 2021-05-31 19:28:39 | nf | is now known as nii |
| 2021-05-31 19:28:54 | × | Guest8311 quits (~Guest83@187.83.249.216.dyn.smithville.net) (Quit: Client closed) |
| 2021-05-31 19:29:01 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 2021-05-31 19:30:10 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Client Quit) |
| 2021-05-31 19:30:52 | nii | is now known as nf |
| 2021-05-31 19:31:06 | × | eggplant_ quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-05-31 19:31:37 | × | chaosite quits (~chaosite@user/chaosite) (Read error: Connection reset by peer) |
| 2021-05-31 19:32:32 | <dmwit> | That's... sort of right. |
| 2021-05-31 19:32:34 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-133-134.cust.tzulo.com) (Ping timeout: 264 seconds) |
| 2021-05-31 19:32:37 | <dmwit> | And sort of not. |
| 2021-05-31 19:32:37 | → | jneira joins (~jneira@166.red-81-39-172.dynamicip.rima-tde.net) |
| 2021-05-31 19:33:03 | <dmwit> | I have some writing on positive vs. negative here: https://stackoverflow.com/a/9243982/791604 |
| 2021-05-31 19:33:23 | → | schuelermine joins (~schuelerm@user/schuelermine) |
| 2021-05-31 19:33:28 | <dmwit> | (There's some other stuff about MonadIO in there that you can ignore.) |
| 2021-05-31 19:33:46 | <schuelermine> | hi |
| 2021-05-31 19:36:51 | <schuelermine> | one thing that baffles me about Haskell's design is why the syntax sugar for enumFromTo isn't an infix operator |
| 2021-05-31 19:37:03 | <schuelermine> | why isn't (..) just an alias for it |
| 2021-05-31 19:37:14 | <schuelermine> | Why is it [a..b]? |
| 2021-05-31 19:37:17 | × | holy_ quits (~h01y_b4z0@2400:adc1:178:c800:9e45:76a9:57f2:1665) (Ping timeout: 272 seconds) |
| 2021-05-31 19:37:35 | → | shapr joins (~user@pool-108-28-144-11.washdc.fios.verizon.net) |
| 2021-05-31 19:37:53 | <ski> | how to do `enumFromThenTo', then ? |
| 2021-05-31 19:38:08 | <ski> | (and `enumFromThen') |
| 2021-05-31 19:38:10 | <schuelermine> | you could even make |
| 2021-05-31 19:38:10 | <schuelermine> | (x1, x2) ... xi = enumFromThenTo x1 x2 xi |
| 2021-05-31 19:38:28 | <cdsmith> | schuelermine: It sort of fits into a bunch of other sugar around list comprehensions, lists with step, etc. There may be a simpler for that one case, but it would stick out from the rest |
| 2021-05-31 19:38:40 | <schuelermine> | true |
| 2021-05-31 19:39:16 | ski | idly notes `@undo' doesn't undo enumerations |
| 2021-05-31 19:40:12 | → | brandonh joins (~brandonh@151.38.169.228) |
| 2021-05-31 19:41:33 | × | danidiaz quits (~ESDPC@148.3.54.112) (Quit: Leaving.) |
| 2021-05-31 19:41:34 | <monochrom> | "x .. y" being sometimes enumFromTo and some other times enumFromThenTo, depending on the type of x, is very complicating to implement. |
| 2021-05-31 19:42:07 | <schuelermine> | monochrom my suggestion had three dots for enumFromThenTo |
| 2021-05-31 19:42:08 | <ski> | i suppose mixfix could possibly do it |
| 2021-05-31 19:42:16 | <monochrom> | Fine. |
| 2021-05-31 19:42:19 | <monochrom> | "x ... y" being sometimes enumFromTo and some other times enumFromThenTo, depending on the type of x, is very complicating to implement. |
| 2021-05-31 19:42:43 | <ski> | heh |
| 2021-05-31 19:42:46 | × | cheater quits (~Username@user/cheater) (Ping timeout: 264 seconds) |
| 2021-05-31 19:42:52 | <schuelermine> | No, .. vs ... distinguishes them |
| 2021-05-31 19:42:59 | <monochrom> | Ah sorry. |
| 2021-05-31 19:43:03 | → | cheater joins (~Username@user/cheater) |
| 2021-05-31 19:43:25 | <ski> | any corresponding suggestion for `enumFrom' and `enumFromThen' ? |
| 2021-05-31 19:43:29 | <schuelermine> | no |
| 2021-05-31 19:44:23 | dmj` | reads dmwit's SO post |
| 2021-05-31 19:44:42 | <monochrom> | I don't care either way, but my impression is that more people like [x .. y] and [x, x2 .. y] |
| 2021-05-31 19:45:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 2021-05-31 19:45:50 | <monochrom> | As for the real "why", some committee wanted it this way, and they had the final say. |
| 2021-05-31 19:46:35 | <c_wraith> | the committee got the Enum instance for Float and Double completely wrong, though. There were two useful things it could have done, they chose neither. |
| 2021-05-31 19:47:07 | <monochrom> | In fact my recollection is that they had this exact rule against spending infinite time on syntax hairsplitting: on syntactic matters, the first proposal passes automatically. |
| 2021-05-31 19:47:23 | × | Guest81 quits (~Guest81@040-194-158-163.dynamic.caiway.nl) (Quit: Client closed) |
| 2021-05-31 19:47:36 | <monochrom> | So yes it is supposed to be arbitary. |
| 2021-05-31 19:47:49 | × | sedeki quits (~textual@user/sedeki) (Quit: Textual IRC Client: www.textualapp.com) |
| 2021-05-31 19:49:40 | <monochrom> | Where is the Wadler quote about "programmers spend all days picking on syntax and no time thinking about semantics"? |
| 2021-05-31 19:50:05 | <monochrom> | Anyway one more data point for that. |
| 2021-05-31 19:50:16 | <yushyin> | https://wiki.haskell.org/Wadler%27s_Law ? |
| 2021-05-31 19:50:30 | → | chaosite joins (~chaosite@user/chaosite) |
| 2021-05-31 19:51:00 | <monochrom> | Yeah that thanks :) |
| 2021-05-31 19:52:07 | <monochrom> | I need to bookmark it so next time it is my answer to every syntactic why question. |
| 2021-05-31 19:52:20 | <monochrom> | To bad there isn't one for library why question. |
| 2021-05-31 19:52:32 | <monochrom> | But really the same nature. |
| 2021-05-31 19:52:52 | → | GIANTWORLDKEEPER joins (~pjetcetal@2.95.204.25) |
| 2021-05-31 19:53:07 | <yushyin> | you can see that law in actions in various ghc proposal threads :D |
| 2021-05-31 19:53:50 | <monochrom> | Very encouraging to those who have high hopes for human nature. |
| 2021-05-31 19:54:30 | × | UpstreamSalmon quits (uid12077@id-12077.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
All times are in UTC.