Logs on 2022-01-24 (liberachat/#haskell)
| 00:02:22 | × | max22- quits (~maxime@2a01cb0883359800e05a099bb642ef66.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 00:02:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5d8e:db89:f241:b6e3) (Ping timeout: 240 seconds) |
| 00:10:17 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 00:10:42 | × | burnsidesLlama quits (~burnsides@dhcp168-027.wadham.ox.ac.uk) (Remote host closed the connection) |
| 00:12:13 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 00:13:37 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 240 seconds) |
| 00:15:59 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 00:16:16 | → | alx741 joins (~alx741@157.100.93.160) |
| 00:24:08 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 00:24:17 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Ping timeout: 256 seconds) |
| 00:31:08 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 00:33:48 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 00:37:21 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 00:37:21 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 00:37:21 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:37:30 | × | vglfr quits (~vglfr@88.155.24.103) (Ping timeout: 268 seconds) |
| 00:38:26 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5d8e:db89:f241:b6e3) |
| 00:41:59 | → | alx741 joins (~alx741@157.100.93.160) |
| 00:43:39 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 00:45:20 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:45:53 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 00:46:28 | → | alx741 joins (~alx741@157.100.93.160) |
| 00:49:23 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 00:49:32 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 240 seconds) |
| 00:50:33 | → | burnsidesLlama joins (~burnsides@dhcp168-027.wadham.ox.ac.uk) |
| 00:50:54 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 00:57:21 | × | burnsidesLlama quits (~burnsides@dhcp168-027.wadham.ox.ac.uk) (Ping timeout: 256 seconds) |
| 00:58:51 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 256 seconds) |
| 01:00:35 | → | ystael joins (~ystael@user/ystael) |
| 01:01:58 | × | DNH quits (~DNH@2a02:8108:1100:16d8:554b:fd6:4afe:d593) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 01:02:55 | → | burnsidesLlama joins (~burnsides@dhcp168-027.wadham.ox.ac.uk) |
| 01:03:04 | × | jespada quits (~jespada@87.74.36.188) (Ping timeout: 250 seconds) |
| 01:03:57 | <sshine> | would it be better if it were StateKeeper? |
| 01:07:14 | → | jespada joins (~jespada@87.74.36.188) |
| 01:07:41 | → | alx741 joins (~alx741@157.100.93.160) |
| 01:07:50 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
| 01:08:16 | <dsal> | MuTator |
| 01:08:38 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 01:09:28 | → | boxscape_ joins (~boxscape_@p4ff0b9d5.dip0.t-ipconnect.de) |
| 01:10:32 | <boxscape_> | Why don't Tuples have Storable instances in base? There is storable-tuple, but the fact that that package exists and seems to work without problems makes it even stranger that base doesn't have those instances |
| 01:10:33 | <EvanR> | random-jellyfish, the state is encoded in the Mealy value itself, hidden in a closure |
| 01:11:06 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 01:11:19 | × | random-jellyfish quits (~random-je@user/random-jellyfish) (Ping timeout: 256 seconds) |
| 01:12:29 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 01:16:38 | → | cheater joins (~Username@user/cheater) |
| 01:16:45 | <sshine> | boxscape_, the author seems to agree: https://hackage.haskell.org/package/storable-tuple-0.0.3.3/docs/src/Foreign-Storable-Tuple.html (line 2) |
| 01:18:34 | <sshine> | boxscape_, it seems like Storable a => Storable (Complex a) is in base. data Complex a = !a :+ !a, that's almost a tuple. :P |
| 01:19:10 | <energizer> | how does this syntax work https://i.imgur.com/6Ab4BJq.png what are `s` and `b` supposed to be? |
| 01:20:04 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 01:20:30 | <energizer> | like, are they allowed to be just any old type? |
| 01:20:44 | <Axman6> | yep |
| 01:20:50 | <energizer> | ok |
| 01:21:00 | <boxscape_> | sshine yeah, good point |
| 01:21:01 | <Axman6> | Value lets you make something of type FunC a, for any a |
| 01:21:39 | <Axman6> | and the combining constructors like If don't care what types the branches have, as long as they're the same |
| 01:22:45 | <Axman6> | energizer: The name of this syntax is GADT, or Generalised Algebraic Data Types |
| 01:23:05 | <energizer> | thanks |
| 01:23:46 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 01:23:48 | → | vglfr joins (~vglfr@46.96.147.122) |
| 01:24:27 | <boxscape_> | energizer note btw that the "a" in "data FunC a where" has nothing to do with the "a"s everywhere else, that type variable name is completely decoupled from the rest. It's only purpose is to say that FunC takes one argument |
| 01:24:40 | <energizer> | oh |
| 01:24:53 | <Axman6> | yeah good point |
| 01:24:58 | <boxscape_> | s/It's/Its |
| 01:25:06 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 01:25:46 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 01:25:51 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit) |
| 01:25:55 | <sshine> | energizer, the "a" in "Fst :: FunC (a, b) -> FunC a" isn't the same as the "a" in "Snd :: FunC (a, b) -> FunC b", either. |
| 01:26:34 | <energizer> | yea i guessed that one |
| 01:26:39 | <sshine> | energizer, that's how each line gets away with an arbitrary choice of variable names. |
| 01:27:15 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 01:27:38 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 01:27:57 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Ping timeout: 240 seconds) |
| 01:27:58 | → | vicfred joins (~vicfred@user/vicfred) |
| 01:28:43 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 01:30:13 | → | alx741 joins (~alx741@157.100.93.160) |
| 01:32:55 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 01:33:03 | → | benin joins (~benin@183.82.31.24) |
| 01:36:03 | → | Guest|60 joins (~Guest|60@109.175.155.97) |
| 01:38:14 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 01:38:19 | <Sqaure> | how does one make a Word8 form a Char, if at all possible? |
| 01:38:47 | <EvanR> | > fromIntegral (ord 'c') :: Word8 |
| 01:38:48 | <lambdabot> | 99 |
| 01:39:00 | <EvanR> | (ord returns an Int) |
| 01:39:45 | <EvanR> | (also I answered a more specific question, how to encode Char with something like ASCII) |
| 01:40:09 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 01:40:32 | <Sqaure> | thanks! |
| 01:41:35 | <EvanR> | for general technically sloppy operations treating Char as bytes, there's Data.ByteString.Char8 |
| 01:43:03 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 01:44:14 | × | WingTillDie quits (~quassel@2001-b400-e2db-1da8-4062-cd4e-8589-7aec.emome-ip6.hinet.net) (Ping timeout: 250 seconds) |
| 01:45:06 | → | WingTillDie joins (~quassel@2001-b400-e2db-1da8-f9e5-e949-9fe0-1fb9.emome-ip6.hinet.net) |
| 01:45:52 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 01:46:46 | × | Guest|60 quits (~Guest|60@109.175.155.97) (Quit: Connection closed) |
| 01:47:11 | × | CiaoSen quits (~Jura@p200300c95737a2002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 01:50:42 | → | alx741 joins (~alx741@157.100.93.160) |
| 01:51:02 | <albet70> | does String have encoding? |
| 01:51:10 | → | leungbk joins (~user@2603-8000-1201-2dd2-79c6-a2ee-55d6-42c7.res6.spectrum.com) |
| 01:51:36 | × | WingTillDie quits (~quassel@2001-b400-e2db-1da8-f9e5-e949-9fe0-1fb9.emome-ip6.hinet.net) (Ping timeout: 250 seconds) |
| 01:53:47 | <EvanR> | each Char is just the unicode number for that character |
| 01:53:59 | <EvanR> | even if it's technically "not a character" |
| 01:54:21 | <EvanR> | String = [Char] |
| 01:54:55 | → | vysn joins (~vysn@user/vysn) |
| 01:55:17 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 01:56:01 | <EvanR> | so String is a thing you encode rather than decode, as far as text processing goes |
| 01:58:41 | <EvanR> | > succ '\1114110' |
| 01:58:42 | <lambdabot> | '\1114111' |
| 01:58:45 | <EvanR> | > succ '\1114111' |
| 01:58:47 | <lambdabot> | *Exception: Prelude.Enum.Char.succ: bad argument |
| 01:59:19 | <boxscape_> | > pred '\0' |
| 01:59:20 | <lambdabot> | *Exception: Prelude.Enum.Char.pred: bad argument |
| 01:59:44 | <EvanR> | no (ab)using the extra space in the Char for fun and profit |
| 02:01:54 | → | WingTillDie joins (~quassel@2001-b400-e2db-1da8-f9e5-e949-9fe0-1fb9.emome-ip6.hinet.net) |
| 02:12:23 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 02:12:37 | × | mmhat quits (~mmh@55d4124f.access.ecotel.net) (Ping timeout: 240 seconds) |
| 02:13:14 | → | alx741 joins (~alx741@157.100.93.160) |
| 02:16:36 | × | Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep) |
| 02:17:34 | → | deadmarshal joins (~deadmarsh@95.38.118.201) |
| 02:17:34 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 02:19:20 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 250 seconds) |
| 02:20:37 | → | tomku joins (~tomku@user/tomku) |
| 02:21:47 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 02:21:47 | × | neurocyte0917090 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds) |
| 02:21:48 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 02:22:09 | × | deadmarshal quits (~deadmarsh@95.38.118.201) (Ping timeout: 256 seconds) |
| 02:23:32 | × | xff0x quits (~xff0x@2001:1a81:5332:3500:b49d:8e28:9fba:6720) (Ping timeout: 240 seconds) |
| 02:24:33 | → | juhp joins (~juhp@128.106.188.82) |
| 02:24:49 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 02:25:23 | → | xff0x joins (~xff0x@2001:1a81:5370:cd00:aa5:136f:1b20:712a) |
| 02:26:03 | <albet70> | String to ByteString is encooding or decoding |
| 02:26:15 | <EvanR> | encoding |
| 02:26:57 | → | mmhat joins (~mmh@55d400c1.access.ecotel.net) |
| 02:27:08 | × | ridcully_ quits (~ridcully@p508ac987.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 02:27:23 | × | leungbk quits (~user@2603-8000-1201-2dd2-79c6-a2ee-55d6-42c7.res6.spectrum.com) (Remote host closed the connection) |
| 02:28:28 | × | mmhat quits (~mmh@55d400c1.access.ecotel.net) (Client Quit) |
| 02:28:48 | → | ridcully_ joins (~ridcully@p508acc81.dip0.t-ipconnect.de) |
| 02:29:39 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 02:36:14 | → | ensyde joins (~ensyde@2600:1700:2050:1040:bdf9:ef99:b73e:7a0a) |
| 02:37:26 | × | lispy quits (~lispy4@84.69.59.93) (Quit: Leaving) |
| 02:40:14 | → | razetime joins (~quassel@49.207.209.26) |
| 02:41:46 | → | vicfred_ joins (~vicfred@user/vicfred) |
| 02:44:02 | × | vicfred quits (~vicfred@user/vicfred) (Ping timeout: 250 seconds) |
| 02:45:14 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 02:47:48 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:52:23 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 02:56:54 | → | califax- joins (~califax@user/califx) |
| 03:00:48 | × | califax quits (~califax@user/califx) (Ping timeout: 276 seconds) |
| 03:00:48 | califax- | is now known as califax |
| 03:01:24 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 03:02:13 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 250 seconds) |
| 03:04:23 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 03:04:46 | × | lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:06:18 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 03:07:05 | → | dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com) |
| 03:07:05 | × | dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host) |
| 03:07:05 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 03:07:08 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:9c57:17b6:65b6:b182) |
| 03:09:08 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4) |
| 03:09:12 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 03:11:41 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Excess Flood) |
| 03:11:54 | → | dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com) |
| 03:11:54 | × | dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host) |
| 03:11:54 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 03:15:03 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 03:16:29 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:16:29 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:16:29 | finn_elija | is now known as FinnElija |
| 03:17:06 | → | lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
| 03:17:55 | × | burnsidesLlama quits (~burnsides@dhcp168-027.wadham.ox.ac.uk) (Remote host closed the connection) |
| 03:18:57 | × | myShoggoth quits (~myShoggot@97-120-67-120.ptld.qwest.net) (Ping timeout: 240 seconds) |
| 03:19:00 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 03:20:40 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 03:22:57 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds) |
| 03:27:24 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 03:30:21 | × | td_ quits (~td@94.134.91.105) (Ping timeout: 256 seconds) |
| 03:31:52 | → | td_ joins (~td@94.134.91.163) |
| 03:34:18 | × | johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Ping timeout: 250 seconds) |
| 03:35:10 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 250 seconds) |
| 03:36:18 | → | johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) |
| 03:38:17 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 03:38:20 | × | vysn quits (~vysn@user/vysn) (Remote host closed the connection) |
| 03:40:24 | → | cyphase joins (~cyphase@user/cyphase) |
| 03:46:30 | <Axman6> | EvanR: not with that attitude |
| 03:47:31 | <Axman6> | % fromIntegral (maxBound :: Word64) `divMod` (fromIntegral $ ord maxBound) |
| 03:47:31 | <yahb> | Axman6: (16557366432706,1037249) |
| 03:47:40 | × | Hao quits (~Hao@222-154-98-23-fibre.sparkbb.co.nz) (Quit: Client closed) |
| 03:48:36 | <EvanR> | you can fit 2 Chars in 1 |
| 03:48:39 | <EvanR> | (at least) |
| 03:48:58 | → | log101 joins (~log101@212.125.22.146) |
| 03:49:04 | <EvanR> | > 64 / 21 |
| 03:49:06 | <lambdabot> | 3.0476190476190474 |
| 03:49:17 | × | cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds) |
| 03:51:00 | <EvanR> | UTF-3 |
| 03:51:32 | → | cynomys joins (~cynomys@user/cynomys) |
| 03:53:49 | <Axman6> | % fromIntegral (maxBound :: Word32) `divMod` (fromIntegral $ ord maxBound) -- what I should've written |
| 03:53:50 | <yahb> | Axman6: (3855,69390) |
| 03:54:06 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 03:55:26 | <EvanR> | apparently a unichar needs 20.08 bits to encode, what the hell were they thinking |
| 03:55:38 | → | Hao joins (~Hao@222-154-98-23-fibre.sparkbb.co.nz) |
| 03:56:04 | <EvanR> | a random char |
| 03:57:02 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds) |
| 03:58:05 | <energizer> | https://i.imgur.com/FbUZSdN.png What is `type Internal a`? i dont see anything like that in https://en.wikibooks.org/wiki/Haskell/Classes_and_types |
| 03:58:25 | <EvanR> | nice font |
| 03:58:38 | <EvanR> | Internal a is an associated type synonym family |
| 03:58:42 | <EvanR> | filed under type families |
| 03:59:27 | <energizer> | ok |
| 04:00:17 | <EvanR> | sometimes they are used instead of multi-param type class + fundeps |
| 04:01:13 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 04:01:36 | <Axman6> | and often nicer to work with IMO |
| 04:04:39 | × | Hao quits (~Hao@222-154-98-23-fibre.sparkbb.co.nz) (Quit: Client closed) |
| 04:04:46 | <jackdk> | can associated type families have injectivity annotations? |
| 04:05:03 | × | flukiluke quits (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) (Remote host closed the connection) |
| 04:06:04 | → | flukiluke joins (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) |
| 04:07:23 | bravespear|2 | is now known as Ranhir |
| 04:13:32 | <EvanR> | I think the latest ghc doc implies yes, but I'd try it |
| 04:13:58 | <EvanR> | >For open and closed type families it is OK to name the result but skip the injectivity annotation. This is not the case for associated type synonyms, where the named result without injectivity annotation will be interpreted as associated type synonym default. |
| 04:15:07 | × | Ranhir quits (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
| 04:15:40 | × | razetime quits (~quassel@49.207.209.26) (Read error: No route to host) |
| 04:15:41 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 04:16:25 | Ranhir | is now known as Ranhir|NotHere |
| 04:16:33 | Ranhir|NotHere | is now known as Ranhir |
| 04:17:07 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 04:17:17 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 04:19:16 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 04:20:23 | <Axman6> | Anyone ever wanted ... or patterns? case boorOrBarOrBaz of (Foo{} | Bar{}) -> one thing; Baz a b -> another; binding variables would be prohibited |
| 04:20:40 | <dolio> | Yes, they have been wanted. |
| 04:21:09 | <Axman6> | More specifically, anyone who isn't me =) |
| 04:21:32 | <boxscape_> | Axman6 https://github.com/ghc-proposals/ghc-proposals/pull/43 |
| 04:21:37 | × | log101 quits (~log101@212.125.22.146) (Ping timeout: 240 seconds) |
| 04:21:43 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 04:22:00 | <dolio> | I've definitely wanted the no-variables version. |
| 04:22:13 | <dolio> | Some people want one with variables, but that's a little harder to make sense of. |
| 04:22:22 | <boxscape_> | I think java is introducing them with variables |
| 04:22:24 | <boxscape_> | so |
| 04:22:36 | <boxscape_> | you know, not good to be behind java as a language that praised itself on features that java is copying |
| 04:23:01 | <boxscape_> | (I guess it's only "behind" if you're in favor of the variable version) |
| 04:23:01 | <energizer> | does `type Internal a` have to be inside the `where` or can it be outside? |
| 04:23:14 | <Axman6> | inside |
| 04:23:25 | <energizer> | what is the difference? |
| 04:23:35 | <Axman6> | but it can be defined as a type defined elsewhere |
| 04:24:25 | <dibblego> | is _Foo || is _Bar |
| 04:24:46 | <Axman6> | every instance of Syntactic must have an associated instance of Internal, and only instances can have definitions for Internal |
| 04:24:48 | <boxscape_> | Axman6 Anyway, I think variables are actually pretty straightforward if you just require that every pattern binds the same variables, with the same type |
| 04:25:21 | <Axman6> | yeah - the example binging the same name twoce to call show on makes me unhappy |
| 04:25:29 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 04:25:54 | <boxscape_> | at different types? Yeah that could be confusing |
| 04:27:07 | <Axman6> | "233 hidden items" - well, that proposal must have been exciting! |
| 04:28:13 | <boxscape_> | ...I wish github had a "load all comments" feature |
| 04:28:20 | <EvanR> | energizer, type families can be defined on their own. But yours is in a class, so it's associated with a class and intended to map every type that's an instance to some type (and not be left undefined) |
| 04:29:08 | <EvanR> | moving it out makes it a regular type family with nothing to do with that class |
| 04:29:42 | × | vicfred_ quits (~vicfred@user/vicfred) (Quit: Leaving) |
| 04:35:24 | × | euandreh quits (~euandreh@2804:14c:33:9fe5:c17:d8ca:f795:73f0) (Ping timeout: 250 seconds) |
| 04:35:27 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 04:35:32 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 04:36:04 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 04:38:14 | → | Hao joins (~Hao@222-154-98-23-fibre.sparkbb.co.nz) |
| 04:40:17 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Ping timeout: 240 seconds) |
| 04:41:10 | → | log101 joins (~log101@212.125.22.146) |
| 04:44:04 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 250 seconds) |
| 04:46:37 | → | mbuf joins (~Shakthi@171.61.206.147) |
| 04:48:41 | × | Hao quits (~Hao@222-154-98-23-fibre.sparkbb.co.nz) (Quit: Client closed) |
| 04:50:57 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 05:00:26 | → | deadmarshal joins (~deadmarsh@95.38.118.201) |
| 05:04:32 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 05:06:04 | → | lavaman joins (~lavaman@98.38.249.169) |
| 05:06:37 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 05:07:15 | × | log101 quits (~log101@212.125.22.146) (Ping timeout: 256 seconds) |
| 05:11:17 | × | cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds) |
| 05:11:38 | × | zebrag quits (~chris@user/zebrag) (Remote host closed the connection) |
| 05:17:38 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 05:18:18 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 250 seconds) |
| 05:18:36 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 05:24:08 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 05:30:08 | → | rusrushal13 joins (~rusrushal@2401:4900:43a3:616e:36cb:f750:4e6b:4367) |
| 05:35:07 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 05:37:12 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 05:38:29 | → | cynomys joins (~cynomys@user/cynomys) |
| 05:40:36 | → | log101 joins (~log101@88.255.77.33) |
| 05:42:11 | × | rusrushal13 quits (~rusrushal@2401:4900:43a3:616e:36cb:f750:4e6b:4367) (Ping timeout: 256 seconds) |
| 05:56:02 | × | WingTillDie quits (~quassel@2001-b400-e2db-1da8-f9e5-e949-9fe0-1fb9.emome-ip6.hinet.net) (Ping timeout: 240 seconds) |
| 05:58:55 | → | rusrushal13 joins (~rusrushal@2409:4056:15:9212:92a3:69cd:5ace:e40a) |
| 05:59:41 | → | leibniz joins (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) |
| 06:00:29 | <leibniz> | hi, i was wondering if anyone had any ideas about the idea about the monadic traversal? |
| 06:01:27 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 06:02:56 | × | deadmarshal quits (~deadmarsh@95.38.118.201) (Ping timeout: 250 seconds) |
| 06:03:57 | <leibniz> | specifically, about the choice between 1. considering all applicatives, as per the usual traverse function, or 2. restricting to StateL to give the "scanner" class encapsulating the functionality of mapAccumL |
| 06:05:13 | <leibniz> | im not sure if offering that functionality (via the specification of the applicative) is "overly" restrictive, or actually beneficial |
| 06:06:03 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:06:53 | <leibniz> | iv never seen it done usefully with any other applicative, in terms of preserving lazyness, so the travsersals compose as if there were a "per element" rewrite, kind of factoring through the pattern matching on the constructor |
| 06:07:52 | <leibniz> | im not even sure if it works for anything other than StateL, since i dont really understand why the lazyness works in that case, other than it just not being StateR, which certainly wouldnt work for an infinite stream, or a blocking monadic tail call |
| 06:07:56 | <leibniz> | ... |
| 06:08:57 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 06:10:39 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 06:14:57 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 06:16:02 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 240 seconds) |
| 06:24:37 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds) |
| 06:27:44 | × | leibniz quits (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) (Quit: Connection closed) |
| 06:28:17 | × | cynomys quits (~cynomys@user/cynomys) (Ping timeout: 256 seconds) |
| 06:28:19 | → | Constraintegic joins (~thomasbul@2001:a61:130d:ed01:d880:8422:69cf:e05c) |
| 06:31:05 | → | deadmarshal joins (~deadmarsh@95.38.118.201) |
| 06:32:37 | → | cynomys joins (~cynomys@user/cynomys) |
| 06:32:50 | × | Constraintegic quits (~thomasbul@2001:a61:130d:ed01:d880:8422:69cf:e05c) (Ping timeout: 250 seconds) |
| 06:33:02 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 06:33:15 | → | califax joins (~califax@user/califx) |
| 06:36:47 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 06:40:02 | <SrPx> | what is the right way to install GHC on a new OSX Monteray Macbook? is `brew install ghc` still a terrible idea? |
| 06:40:18 | → | ekai joins (~xusr@bl18-111-231.dsl.telepac.pt) |
| 06:40:45 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 06:42:56 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 06:43:26 | <dsal> | I use nix. |
| 06:43:33 | <dsal> | I've not used homebrew in a year or two. :) |
| 06:43:57 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds) |
| 06:44:46 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 06:44:46 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 06:44:46 | → | wroathe joins (~wroathe@user/wroathe) |
| 06:45:33 | <boxscape_> | ghcup is supposed to be the universal installer, but I don't know if there are any issues on Monteray |
| 06:48:19 | <dsal> | I've not successfully used it for M1, but I think it's otherwise OK. |
| 06:48:53 | × | boxscape_ quits (~boxscape_@p4ff0b9d5.dip0.t-ipconnect.de) (Quit: Connection closed) |
| 06:49:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 06:50:37 | → | chomwitt joins (~chomwitt@2a02:587:dc06:be00:12c3:7bff:fe6d:d374) |
| 06:52:53 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 06:54:34 | → | zaquest joins (~notzaques@5.130.79.72) |
| 06:57:34 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 06:59:36 | → | _ht joins (~quassel@2a02:a468:b619:1:b7fa:be1e:6eb0:5ee1) |
| 07:06:27 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 07:06:42 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Client Quit) |
| 07:06:44 | → | michalz joins (~michalz@185.246.204.58) |
| 07:07:30 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 250 seconds) |
| 07:13:04 | → | ardell joins (~ardell@user/ardell) |
| 07:13:30 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 07:14:52 | × | cheater quits (~Username@user/cheater) (Ping timeout: 250 seconds) |
| 07:15:25 | → | cheater joins (~Username@user/cheater) |
| 07:17:23 | × | rusrushal13 quits (~rusrushal@2409:4056:15:9212:92a3:69cd:5ace:e40a) (Ping timeout: 256 seconds) |
| 07:17:42 | → | lavaman joins (~lavaman@98.38.249.169) |
| 07:34:27 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 07:37:45 | → | prasad joins (~user@c-73-170-49-136.hsd1.ca.comcast.net) |
| 07:38:17 | × | yaroot quits (~yaroot@2409:12:ac0:2300:680e:dbff:fe1e:4953) (Ping timeout: 240 seconds) |
| 07:39:09 | → | yaroot joins (~yaroot@2409:12:ac0:2300:680e:dbff:fe1e:4953) |
| 07:45:35 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 07:47:01 | <SrPx> | ty |
| 07:52:38 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 07:55:05 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Client Quit) |
| 07:55:37 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 07:56:29 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 07:57:41 | × | prasad quits (~user@c-73-170-49-136.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 07:58:15 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:25bb:89ab:830f:7e39) |
| 08:01:44 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 08:01:45 | → | Constraintegic joins (~thomasbul@2001:a61:130d:ed01:8875:784f:ca4f:d8a2) |
| 08:03:38 | <hololeap> | should there be a wiki for running ghc on mac somewhere? I see a lot of questions on that |
| 08:03:49 | → | alp joins (~alp@user/alp) |
| 08:04:22 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 08:04:24 | → | chele joins (~chele@user/chele) |
| 08:06:02 | × | Constraintegic quits (~thomasbul@2001:a61:130d:ed01:8875:784f:ca4f:d8a2) (Ping timeout: 240 seconds) |
| 08:09:58 | → | akegalj joins (~akegalj@89-172-25-196.adsl.net.t-com.hr) |
| 08:10:21 | × | akegalj quits (~akegalj@89-172-25-196.adsl.net.t-com.hr) (Client Quit) |
| 08:10:41 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 08:11:14 | × | Sgeo quits (~Sgeo@ool-18b9875e.dyn.optonline.net) (Read error: Connection reset by peer) |
| 08:11:59 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 08:12:56 | × | ekai quits (~xusr@bl18-111-231.dsl.telepac.pt) (Ping timeout: 250 seconds) |
| 08:14:12 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 08:16:56 | → | kuribas joins (~user@ptr-25vy0i9v7xwr83cod1i.18120a2.ip6.access.telenet.be) |
| 08:22:50 | → | jacoo joins (~jacoo@121.131.39.82) |
| 08:23:03 | jacoo | is now known as lionhairdino |
| 08:28:01 | × | m4lvin quits (~m4lvin@w4eg.de) (Quit: m4lvin) |
| 08:28:25 | → | m4lvin joins (~m4lvin@w4eg.de) |
| 08:36:11 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 08:39:32 | <lionhairdino> | Haskell betrayed me. I thought there was no pointer, no memory leak. but now I met space leak. |
| 08:40:07 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 08:40:17 | <lionhairdino> | eventlog2html show too short label. so I can't find exact point |
| 08:43:18 | → | max22- joins (~maxime@2a01cb0883359800a4d68ab29ac6e773.ipv6.abo.wanadoo.fr) |
| 08:43:27 | × | log101 quits (~log101@88.255.77.33) (Remote host closed the connection) |
| 08:43:44 | → | log101 joins (~log101@88.255.77.33) |
| 08:49:21 | × | log101 quits (~log101@88.255.77.33) (Remote host closed the connection) |
| 08:49:38 | → | log101 joins (~log101@88.255.77.33) |
| 08:50:30 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 08:51:15 | → | DNH joins (~DNH@2a02:8108:1100:16d8:d0b2:5a76:adf7:9a5a) |
| 08:53:09 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 08:54:17 | × | log101 quits (~log101@88.255.77.33) (Ping timeout: 256 seconds) |
| 08:55:13 | <polyphem> | lionhairdino: enable profiling , and look at the .prof file , it has a column on memory usage per costcenter, look for the highest numbers to get a cle where to look for your mem leak |
| 08:55:36 | <polyphem> | *clue |
| 08:58:49 | <lionhairdino> | thanks for replying. I already did. but If leaking slowly, It's not helpful. |
| 09:00:27 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 09:00:50 | → | fef joins (~thedawn@user/thedawn) |
| 09:01:19 | → | neurocyte0917090 joins (~neurocyte@45.93.108.138) |
| 09:01:19 | × | neurocyte0917090 quits (~neurocyte@45.93.108.138) (Changing host) |
| 09:01:19 | → | neurocyte0917090 joins (~neurocyte@user/neurocyte) |
| 09:04:56 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:05:21 | <lionhairdino> | If I even find suspect at linechart tab, too short label is not helpful. |
| 09:05:50 | <polyphem> | lionhairdino: you could sprinkle BangPatters around "candidates" or use {-# LANGUAGE Strict #-} and {-# LANGUAHE StrictData #-} on suspect modules and see if it changes somthing to narrow down the spot |
| 09:07:04 | → | zincy joins (~zincy@host86-151-99-97.range86-151.btcentralplus.com) |
| 09:07:14 | × | DNH quits (~DNH@2a02:8108:1100:16d8:d0b2:5a76:adf7:9a5a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:08:30 | → | DNH joins (~DNH@2a02:8108:1100:16d8:d0b2:5a76:adf7:9a5a) |
| 09:08:50 | <lionhairdino> | thanks, I haven't use StrictData yet. good idea!. and...is there option to add detail to the label of eventlog2html? |
| 09:09:35 | <polyphem> | about eventlog i dont' know , sorry |
| 09:11:37 | <lionhairdino> | You are my first contact in this channel. nice to meet you. |
| 09:12:33 | <polyphem> | its quite right now, usually there are more experienced people around that will give good advice :) |
| 09:13:38 | <oak-> | By the way, is the Strict language extension still experimental, or could it be considered usable for production code? |
| 09:13:45 | <polyphem> | i havent used eventlog2html , but maybe if you open web-console in browser and tinker with fontsizes of labels or so , you'd get more information ? |
| 09:14:16 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds) |
| 09:16:30 | <lionhairdino> | It's plausible? idea, but raw eventlog has short label too. |
| 09:16:58 | <lortabac> | oak-: it's not experimental, all it does is adding bang patterns to all the arguments in the module |
| 09:17:09 | <merijn> | oak-: Define "usable" |
| 09:17:09 | <lionhairdino> | eventlog2html is tool to convert raw eventlog to html |
| 09:17:15 | <polyphem> | oak-: ghc docs say they exist since ghc 8.0.1 , i dont see any statement that they are experimental , https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/strict.html |
| 09:17:44 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
| 09:17:44 | → | allbery_b joins (~geekosaur@xmonad/geekosaur) |
| 09:17:47 | allbery_b | is now known as geekosaur |
| 09:17:54 | <merijn> | lionhairdino: Have you looked at speedscope yet? |
| 09:17:56 | <merijn> | lionhairdino: https://mpickering.github.io/posts/2019-11-07-hs-speedscope.html |
| 09:18:23 | <lortabac> | if you find yourself adding too many bang patterns, enabling Strict can save you some typing |
| 09:18:37 | × | ensyde quits (~ensyde@2600:1700:2050:1040:bdf9:ef99:b73e:7a0a) (Ping timeout: 240 seconds) |
| 09:18:45 | → | razetime joins (~quassel@49.207.209.26) |
| 09:19:17 | <oak-> | https://gitlab.haskell.org/ghc/ghc/-/wikis/language-strict This says "It's an experimental extension". But the page has been last modified 2 years ago, this is why I asked is it still experimental :) |
| 09:19:19 | <merijn> | tbh, most people treat Strict/StrictData as "I no longer have to think about strictness". Which at even the most casual consideration is wrong, since strict is wrong about as often (if not more so) than lazy. |
| 09:19:20 | <lionhairdino> | yes. I Have looked. but I can't get detail position. thanks to merijn |
| 09:20:00 | <merijn> | You still have to think *exactly* as much about strictness with Strict and StrictData as you do otherwise, all you've done is flipped the defaults |
| 09:20:27 | <merijn> | Which, honestly, might be harder, since I find it much easier to predict what I *definitely* want strict then what I definitely want lazy |
| 09:21:31 | <maerwald[m]> | Strict is a saner default for many applications |
| 09:22:19 | <kuribas> | I think lazyness is overrated. |
| 09:22:43 | <polyphem> | but the original problem that lionhairdino has was he couldnt use the output of eventlog2html , because the label are truncated , this is a bug , isn't it ? |
| 09:22:45 | <kuribas> | Some kind of optional lazyness is nice though. |
| 09:23:00 | <kuribas> | like infinite streams instead of infinite lists. |
| 09:23:34 | <lionhairdino> | I thought that if I crossed the Monad Mountain, the road would open up. but space leaks are nasty. |
| 09:24:04 | <lionhairdino> | polyphem understand me exactly.! |
| 09:24:21 | <maerwald[m]> | https://github.com/yesodweb/wai/pull/752#issuecomment-501531386 |
| 09:24:23 | <merijn> | lionhairdino: tbh, I've never used the eventlog stuff too much, I usually generate graphs of heap usage |
| 09:25:46 | <maerwald[m]> | "For experience of 10-years network programming in Haskell, I don't see any benefits of lazy evaluation except..." |
| 09:26:57 | <lionhairdino> | I could find what module has leaks using tool like heap prof, eventlog.. but I couldn't find detail location. |
| 09:27:48 | <lionhairdino> | So now, I will try to use cachegrind, can it be a solution? |
| 09:29:36 | <lortabac> | lionhairdino: I know some people here don't agree, but IMHO enabling StrictData is a good default for many applications |
| 09:30:10 | <lionhairdino> | oh, I respect maerwald. 10 years network programming in "Haskell" |
| 09:30:34 | <lortabac> | if your data types are strict and you avoid tuples, I'm pretty sure you will never have leaks |
| 09:30:53 | <merijn> | lortabac: Thats's just replacing one form of "not thinking about strictness" with another form of "not thinking about strictness". IMO any form of "trying to avoid thinking about strictness" is doomed to failure |
| 09:30:57 | <polyphem> | lortabac: i only suggested strictness annotations to help lionhairdino narrow down the spot where his code leaks , cause eventlog2html isnt usefull in his case |
| 09:31:01 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5d8e:db89:f241:b6e3) (Remote host closed the connection) |
| 09:31:05 | <lionhairdino> | lortabac: thanks for the advice |
| 09:31:19 | <merijn> | lionhairdino: Do you have any of the heap profiling plots? |
| 09:31:33 | <merijn> | (and is the code in question public somewhere?) |
| 09:31:38 | → | Constraintegic joins (~thomasbul@2001:a61:130d:ed01:3ec8:65f2:fd2c:9b7e) |
| 09:31:50 | <lortabac> | merijn: it depends on the context, in an industrial setting you don't want to spend time chasing hard-to-spot bugs |
| 09:32:31 | <lortabac> | I'd rather sacrifice some performance than precious developer time |
| 09:33:23 | <lionhairdino> | No, I don't open yet. plz wait some minutes. I will upload |
| 09:33:30 | <lionhairdino> | eventlog |
| 09:35:31 | <lortabac> | in my toy projects I have the time and freedom to think about laziness carefully, I don't need the StrictData sledgehammer |
| 09:38:24 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 09:38:27 | <lionhairdino> | http://yearit.com/eventlog.png |
| 09:38:57 | <lionhairdino> | I uploaded eventlog2html screen capture |
| 09:40:01 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:9c57:17b6:65b6:b182) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:40:45 | <lionhairdino> | original html page is 200MB, It't could be too large.. http://yearit.com/eventlog.html |
| 09:41:03 | → | fendor joins (~fendor@91.141.65.21.wireless.dyn.drei.com) |
| 09:42:04 | <merijn> | lionhairdino: What does the heap view look like? |
| 09:42:12 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 250 seconds) |
| 09:42:19 | × | DNH quits (~DNH@2a02:8108:1100:16d8:d0b2:5a76:adf7:9a5a) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:42:19 | <lionhairdino> | I have seen many articles about eventlog2html, but nobody say about finding detail source location. |
| 09:43:44 | <merijn> | lionhairdino: The crucial first thing would be: "*what* are you leaking?" not where, but that's hard to see with the linechart view |
| 09:45:45 | <lionhairdino> | from some moment, it doesn't export heap tab. i don't know.. |
| 09:46:29 | <merijn> | lionhairdino: https://ro-che.info/articles/2020-05-14-visualize-haskell-heap-profiles |
| 09:46:57 | <lionhairdino> | yellow line, pap. it grows slowly |
| 09:48:14 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 09:49:35 | → | polyphem_ joins (~rod@2a02:810d:840:8754:a778:fc55:137:3e0) |
| 09:49:44 | <lionhairdino> | thanks for advice. hp2ps can be helpful leak large, but leaks slowly.. |
| 09:51:18 | × | polyphem quits (~rod@2a02:810d:840:8754:f8cc:a01b:29d5:d0e1) (Ping timeout: 250 seconds) |
| 09:52:03 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 09:52:03 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 09:52:03 | → | wroathe joins (~wroathe@user/wroathe) |
| 09:52:59 | <lionhairdino> | why would people wonder that eventlog doesn't show detail position... |
| 09:53:01 | × | shriekingnoise quits (~shrieking@201.231.16.156) (Quit: Quit) |
| 09:53:02 | × | zincy quits (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Remote host closed the connection) |
| 09:54:13 | <lionhairdino> | merijn: If you can see detailed |
| 09:54:20 | <lionhairdino> | "detailed tab" |
| 09:54:29 | <lionhairdino> | in http://yearit.com/eventlog.html |
| 09:54:38 | <maerwald> | lortabac: StrictData is a sane default, yes. I think it's rather uncontroversial in industry settings. |
| 09:54:45 | <merijn> | tbh, I've never really used the eventlog/eventlog2html |
| 09:54:57 | <merijn> | I can check if the full log loads |
| 09:55:07 | <lionhairdino> | you can align using slope |
| 09:55:16 | <maerwald> | especially since not all your laziness problems are actually space leak issues... they can also be allocation issues in hot loops due to unnecessary laziness in data types |
| 09:55:37 | <maerwald> | so even forcing at the call site as merijn frequently suggests doesn't fix it |
| 09:55:51 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 09:55:56 | <maerwald> | you have to force earlier |
| 09:56:34 | → | MajorBiscuit joins (~MajorBisc@c-001-025-008.client.tudelft.eduvpn.nl) |
| 09:56:49 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 09:57:09 | <lionhairdino> | a gentle slope say that there is little memory or space leaks.. |
| 09:57:40 | <merijn> | lionhairdino: What's the max residency? |
| 09:58:04 | <lionhairdino> | label says about position in intermediate language core, |
| 09:58:06 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:41f6:c43f:4ee1:b9fb) |
| 09:58:18 | <maerwald> | and finding these very short temporary thunk buildups in hot loops is impossible to manually reason about and also pretty hard to debug |
| 09:58:33 | <lionhairdino> | about 85MB.. |
| 09:58:50 | <merijn> | 85MB max residency hardly seems worth worrying about? |
| 09:58:59 | <merijn> | Unless you have some reason to believe it should be much less? |
| 10:00:03 | <merijn> | I'm not sure what the code is doing, so it's hard to say if 85MB is the right ballpark |
| 10:00:06 | <lionhairdino> | but it up slowly.. |
| 10:01:19 | <lionhairdino> | I am making torrent client and tracker for prototype of some project. |
| 10:02:53 | <lionhairdino> | Server app should not have 0.1kB leak.. |
| 10:03:54 | → | mmhat joins (~mmh@55d400c1.access.ecotel.net) |
| 10:04:27 | <merijn> | I'm not completely convinced there is a leak in these graphs, tbh |
| 10:04:41 | → | cfricke joins (~cfricke@user/cfricke) |
| 10:05:08 | <merijn> | (also not convinced there isn't one) |
| 10:05:10 | × | Akiva quits (~Akiva@user/Akiva) (Ping timeout: 250 seconds) |
| 10:05:46 | <lionhairdino> | merijn: thanks very much! now I will try to use "haskell code spot" and cachegrind, have you used it? |
| 10:08:55 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 10:09:10 | × | Constraintegic quits (~thomasbul@2001:a61:130d:ed01:3ec8:65f2:fd2c:9b7e) (Quit: Leaving) |
| 10:12:06 | → | SummerSonw joins (~The_viole@203.77.49.232) |
| 10:15:29 | × | razetime quits (~quassel@49.207.209.26) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 10:17:40 | <maerwald> | lionhairdino: did you try speedscope? |
| 10:18:37 | × | cynomys quits (~cynomys@user/cynomys) (Ping timeout: 240 seconds) |
| 10:20:33 | <lionhairdino> | merijn: https://github.com/well-typed/memory-usage-zurihac-2021 do you know hi new profiling? |
| 10:21:20 | <lionhairdino> | maerwald: yes, thank for advice! |
| 10:21:39 | <maerwald> | https://mpickering.github.io/posts/2019-11-07-hs-speedscope.html |
| 10:21:55 | <lionhairdino> | merijn: https://github.com/well-typed/memory-usage-zurihac-2021/raw/master/assets/eventlog2html-detailed-info.png this image has detail location! |
| 10:22:51 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 10:22:51 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 10:22:51 | → | wroathe joins (~wroathe@user/wroathe) |
| 10:24:13 | <lionhairdino> | maerwald: thanks for good paper. |
| 10:24:17 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
| 10:27:47 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 10:29:52 | × | vglfr quits (~vglfr@46.96.147.122) (Ping timeout: 250 seconds) |
| 10:29:57 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 10:31:25 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) |
| 10:35:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) (Ping timeout: 240 seconds) |
| 10:42:17 | → | __monty__ joins (~toonn@user/toonn) |
| 10:45:39 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 10:46:02 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds) |
| 10:48:01 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 10:50:59 | → | vglfr joins (~vglfr@46.96.147.122) |
| 10:53:38 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 10:53:38 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 10:53:38 | → | wroathe joins (~wroathe@user/wroathe) |
| 10:57:13 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:58:35 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 11:01:08 | → | alx741 joins (~alx741@157.100.93.160) |
| 11:02:43 | × | fef quits (~thedawn@user/thedawn) (Quit: Leaving) |
| 11:02:53 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 11:03:06 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
| 11:10:00 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 11:14:17 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 11:20:16 | <lionhairdino> | polyphem, merijn, maerwald, lortabac thanks for advice! my original question is "why would not haskeller wonder that why eventlog has too short label". too short label doesn't help... |
| 11:21:03 | <lionhairdino> | but no article says about short label. |
| 11:21:37 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 11:23:32 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:24:25 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 11:24:25 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 11:24:25 | → | wroathe joins (~wroathe@user/wroathe) |
| 11:26:25 | <polyphem_> | lionhairdino: you could still ask in #ghc why eventlog only generates "short labels" |
| 11:26:43 | → | akegalj joins (~akegalj@89-172-25-196.adsl.net.t-com.hr) |
| 11:28:27 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.4) |
| 11:29:04 | <kitzman> | is there a concatMap for all traversables? |
| 11:29:11 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 11:29:36 | <kitzman> | I was thinking to do a ((Int -> Maybe Int) `concatMap` [Int] ) :: [Int] |
| 11:29:48 | <kitzman> | i don't know if it's possible/makes sense |
| 11:32:11 | <jackdk> | :t concatMap |
| 11:32:12 | <lambdabot> | Foldable t => (a -> [b]) -> t a -> [b] |
| 11:32:34 | <jackdk> | :t (=<<) |
| 11:32:35 | <lambdabot> | Monad m => (a -> m b) -> m a -> m b |
| 11:32:50 | <jackdk> | kinda? |
| 11:33:53 | × | bjobjo quits (~bjobjo@user/bjobjo) (Quit: Lost terminal) |
| 11:34:24 | <lionhairdino> | polyphem: ;-) my question is "why would not haskeller wonder that" |
| 11:37:31 | <lionhairdino> | I thought that I am not the only one who wonder "short label"! . but many articles doesn't says that. it's very strange thing. |
| 11:37:37 | → | DNH joins (~DNH@2a02:8108:1100:16d8:d0b2:5a76:adf7:9a5a) |
| 11:38:13 | → | jackson99 joins (~bc8147f2@cerf.good1.com) |
| 11:39:27 | <kitzman> | jackdk: hm, I was thinking something like, Foldable t, Foldable r => (a -> t b) -> r b -> r b . But either way, I can always just fold or match the Maybe |
| 11:39:55 | <lionhairdino> | I thought that profiling tool saying about source's location is important. |
| 11:41:32 | <kitzman> | ( i meant -> r a -> r b not -> r b -> r b , sorry ) |
| 11:42:47 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 11:43:53 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 11:44:00 | → | leibniz joins (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) |
| 11:44:45 | <leibniz> | hi, i was wondering if anyone could help me with an example of a "monadic traversal" other than with StateL as the applicative, which is still lazy |
| 11:44:50 | <leibniz> | ? |
| 11:45:46 | <leibniz> | it has something to do with the applicatives sequencing in a way that is lazy, which i dont understand |
| 11:46:24 | <leibniz> | the only other example i have so far, is with StateR as the applicative, which is no lazy |
| 11:46:33 | <leibniz> | not lazy* |
| 11:47:11 | <leibniz> | could anyone suggest a different Applicative, and how it works in terms of lazy monadic traversals? |
| 11:47:48 | <leibniz> | or help me understand this idea more generally? |
| 11:49:18 | <leibniz> | kitzman: it looks like what your doing is almost like using the fold to implement bind |
| 11:50:30 | <leibniz> | not sure if there is a bind implementation for all traversals. certainly for a subset of them there is |
| 11:50:40 | <leibniz> | eg. listlike things |
| 11:51:31 | <leibniz> | basically your using (++) right? |
| 11:51:47 | <leibniz> | i guess for monoids more generally |
| 11:52:06 | <leibniz> | so yeah, for traversable monoids there is a bind implementation |
| 11:52:56 | <leibniz> | and you can get the monoid for listlike things with (++) usually implemented by folding with the constructor with the second list as the basecase of the fold |
| 11:53:45 | <leibniz> | i guess you can even relax traversable to foldable and say something like "foldable monoids are monads" |
| 11:54:18 | <leibniz> | though you might get mixed up with the return implementation |
| 11:54:31 | <leibniz> | certainly they have concatMap though |
| 11:54:58 | <leibniz> | the abstraction is usually thought of in terms of lenses |
| 11:55:10 | <leibniz> | somehow encoding pattern matching on the constructor |
| 11:55:12 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 11:55:12 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 11:55:12 | → | wroathe joins (~wroathe@user/wroathe) |
| 11:55:47 | <leibniz> | this can even be generalised slightly to work for trees that require an (Int,Int) structure directing index as an extra argument to the constructor |
| 12:00:21 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 12:01:00 | <leibniz> | sorry, i slightly obscured my question by answering another |
| 12:01:36 | <leibniz> | could anyone give an example of a "monadic traversal" other than with StateL as the applicative which is still lazy |
| 12:01:41 | <leibniz> | ? |
| 12:11:12 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 12:13:12 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 12:13:15 | × | jackson99 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC) |
| 12:16:32 | <[exa]> | leibniz: well you can try a strict State right? |
| 12:17:10 | <[exa]> | I get it that you are searching for some examples of using `traverse` in a way that differs significantly from what can be achieved with lazy State ? |
| 12:18:12 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:41f6:c43f:4ee1:b9fb) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:22:45 | <dminuoso> | Is there a kind of concatMap for map that I'm not seeing? Map k a -> (k -> a -> Map k a) -> Map k a |
| 12:23:46 | <dminuoso> | Background is I want to do `Map (A, B) V -> Map A (B, V)` elegantly |
| 12:24:09 | <dminuoso> | Or should I just roundtrip through list and use concatMap there? |
| 12:26:04 | <dminuoso> | Mmm, given that information it wouldnt work actually. |
| 12:26:28 | <[exa]> | you might get key collisions on shrinking (A,B) to A right? |
| 12:27:28 | <dminuoso> | Yeah, come to think of it I want rather something like: |
| 12:27:33 | × | ardell quits (~ardell@user/ardell) (Quit: Konversation terminated!) |
| 12:27:41 | <[exa]> | anyway even in that case you may get the stuff sorted by (A,B), which should allow you to construct the stuff from sorted (and nubbed) list in O(n) |
| 12:27:51 | <tomsmeding> | \m f -> Map.unionsWith yourCombinationFunction (map (uncurry f) (Map.toList m)) |
| 12:27:57 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 12:28:08 | <tomsmeding> | probably can't get that much better asymptotically |
| 12:28:12 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 12:28:12 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 12:28:12 | → | wroathe joins (~wroathe@user/wroathe) |
| 12:28:22 | <tomsmeding> | unless the keys in the produced maps are very related to the input keys somehow |
| 12:28:38 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 12:28:49 | <tomsmeding> | s/toList/assocs/ probably |
| 12:28:53 | <dminuoso> | Ah yes, I think this has expressivity that I was looking for. |
| 12:28:55 | <dminuoso> | Thanks tomsmeding. |
| 12:31:40 | <dminuoso> | unionsWith is neat :) |
| 12:32:38 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 12:32:52 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:33:01 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 12:33:37 | → | jackson99 joins (~bc8147f2@cerf.good1.com) |
| 12:34:38 | → | fef joins (~thedawn@user/thedawn) |
| 12:35:06 | × | leibniz quits (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) (Quit: Connection closed) |
| 12:39:20 | → | slack1256 joins (~slack1256@191.126.99.84) |
| 12:39:57 | × | mcgroin quits (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 12:41:47 | <Gurkenglas> | note that the f should come before the m in the argument order |
| 12:45:01 | <Gurkenglas> | to first order, because then you can say \f -> M.unionsWith foo . map (uncurry f) . M.toList |
| 12:45:10 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 12:45:37 | <Gurkenglas> | which can by the way be written as \f -> M.unionsWith foo . M.mapWithKey f |
| 12:46:28 | <dminuoso> | Oh that looks very nice indeed |
| 12:46:52 | <Gurkenglas> | tfw M.fromListWith only takes lists rather than any Foldable |
| 12:47:06 | × | wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds) |
| 12:47:23 | <dminuoso> | Though Im pondering whether I can actually get away with losing information, enabling me to write: shrinkWith f s = foldr go m.empty . map (first s) . m.tolist where go (k, v) = m.insertWith f k v |
| 12:47:40 | <dminuoso> | That would avoid intermediate maps |
| 12:47:41 | → | wyrd joins (~wyrd@gateway/tor-sasl/wyrd) |
| 12:47:42 | → | Guest|65 joins (~Guest|65@203.192.207.134) |
| 12:47:50 | × | Guest|65 quits (~Guest|65@203.192.207.134) (Client Quit) |
| 12:47:57 | <dminuoso> | (Not entirely sure whether that would make a difference, Id have to inspect unionsWith) |
| 12:48:09 | <Gurkenglas> | else it could have been "\f -> M.fromListWith foo . M.mapWithKey djinn", where djinn can be automatically derived using @djinn, which is beautiful |
| 12:48:44 | <Gurkenglas> | @djinn (a,b) -> c -> (a, (b,c)) |
| 12:48:44 | <lambdabot> | f (a, b) c = (a, (b, c)) |
| 12:49:47 | <dminuoso> | Gurkenglas: why is it monomorphized to lists though? |
| 12:50:30 | <Gurkenglas> | dminuoso, I'd *guess* because someone felt it'd be confusing to newbies if the name, which they feel should stay the same, implied a monomorphicity that isn't there |
| 12:50:39 | <dminuoso> | Fair |
| 12:50:57 | <Gurkenglas> | :( |
| 12:51:35 | <Gurkenglas> | at least make a new definition that doesn't have the name issue, then! |
| 12:52:17 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 240 seconds) |
| 12:52:18 | <dminuoso> | This is a fundamental problem really. I wish we had uniform automatic monomorphization support in both GHC and haddock. |
| 12:52:42 | <Gurkenglas> | Aka, let newbies work with simplified types until they're ready? |
| 12:52:46 | <dminuoso> | Yes. |
| 12:53:10 | <dminuoso> | Endless bikeshedding would ensue which primitives would receive that treatment. |
| 12:53:40 | <dminuoso> | And interaction with class methods. That is, would you have fmap monomorphized to lists? |
| 12:53:51 | <Gurkenglas> | I agree, I've previously wished this. The failed website https://arbital.com/ tried to have its math posts at multiple difficulty levels. |
| 12:54:06 | <Gurkenglas> | lens would benefit. |
| 12:54:25 | <[exa]> | what about extra "show me a less polymorphic example of this variable mess" button? |
| 12:54:25 | <dminuoso> | I think the better solution to the lens design space is what optics does. |
| 12:55:28 | <Gurkenglas> | Fortunately language model advances look like we'll get a fully general solution to "show me a less incomprehensible variant of this" one of these years. |
| 12:55:50 | <dminuoso> | GHC and haddock do this in a hardcoded fashion for levity polymorphism already |
| 12:56:26 | <dminuoso> | Gurkenglas: Dunno, with linear types things appear to be moving in the opposite direction. |
| 12:56:57 | <dminuoso> | So now you have levity polymorphism, multiciplity polymorphism, type polymorphism.. all interleaved. |
| 12:57:03 | <Gurkenglas> | dminuoso, linear types are an O(1) step in the wrong direction, the autocomplete engine wizardry that's coming about should solve the entire problem. |
| 12:57:40 | <dminuoso> | What autocomplete engine are you referring to? |
| 12:58:31 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 256 seconds) |
| 12:59:05 | <Gurkenglas> | imagine style transfer https://miro.medium.com/max/767/1*B5zSHvNBUP6gaoOtaIy4wg.jpeg but for text! dminuoso, GPT-3. Train a predict-the-next-word network on ~the entire internet and get magic tools like https://vimeo.com/427943407/98fe5258a7 for free |
| 13:00:33 | <dminuoso> | Okay, I so didn't get the sarcasm there before. :-) |
| 13:00:43 | <Gurkenglas> | no sarcasm :( where do you see any? |
| 13:01:57 | <dminuoso> | Maybe my detector is off, but I dont think throwing more AI is realistically a solution. |
| 13:02:05 | <dminuoso> | https://news.ycombinator.com/item?id=30015810 |
| 13:02:09 | <Gurkenglas> | dminuoso, https://twitter.com/michaeltefula/status/1285505897108832257/photo/2 legalese->english |
| 13:02:13 | <dminuoso> | Fun recent related bit |
| 13:02:15 | <dminuoso> | :-) |
| 13:03:07 | <dminuoso> | Gurkenglas: It's funny, you always get these n=1 stories on twitter. What if GPT-3 gives you an inaccurate or plainly wrong summary? |
| 13:03:26 | <dminuoso> | But these dont generate as much social media attention I suppose |
| 13:03:44 | <Gurkenglas> | dminuoso, i suppose the output type signature will have a small chance of being incorrectly translated. But it seems easy enough for a compiler to verify whether it's right? |
| 13:04:23 | <dminuoso> | I prefer freely available, mechanical, verifiable systems. |
| 13:04:29 | <dminuoso> | GPT-3 is none of the above. |
| 13:05:00 | <[exa]> | +1 ^ |
| 13:05:30 | <Gurkenglas> | I agree that it's a bad sign that not one human knows how GPT-3 makes its decisions. I predict anyway that the tools will appear, and be used, and work well. |
| 13:05:44 | <dminuoso> | My main beef is, when the features become so complex, that you need extreme powertools like GPT-3 to even make sense of them, perhaps the fault lies in making these complicated things. |
| 13:05:53 | <merijn> | I agree with the first two of your claims |
| 13:06:13 | <merijn> | I question whether they will indeed work well |
| 13:06:21 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 13:06:37 | <merijn> | To me it sounds like "throwing even more complicated shit we don't understand on top of the already existing shit pile" |
| 13:06:54 | <dminuoso> | 13:54:25 [exa] | what about extra "show me a less polymorphic example of this variable mess" button? |
| 13:06:56 | <merijn> | There lies no hope in that direction |
| 13:06:59 | <dminuoso> | Perhaps this is the most pragmatic solution at the end. |
| 13:07:03 | <Gurkenglas> | merijn, does it count as working well if there's no compiler verification but the translation is wrong one in a hundred times? (which sounds like a higher success rate than when humans translate it in their head!) |
| 13:07:18 | <dminuoso> | Extra haddock (or even special type annotations) that provide multiple alternative monomorphized types, and beginners just need to learn about this. |
| 13:07:40 | <merijn> | Gurkenglas: If humans consistently get something wrong, the solution isn't "build a process that is slightly more accurate" |
| 13:07:46 | <dminuoso> | Then the author of a polymorphic thing can conceive one or more likely choices for a type variable of their type, and then just put them in |
| 13:07:55 | <merijn> | Gurkenglas: The solution is: fix the tools and process to prevent humans from making predictable fuck ups |
| 13:08:04 | <Gurkenglas> | merijn, self-driving cars. |
| 13:08:49 | <merijn> | Gurkenglas: I will go ahead that the Dutch "Sustainable Safety" policy for road design has saved *many* more lives thant self-driving cars ever will in a less principled road system |
| 13:08:59 | <int-e> | Gurkenglas: a million accidents waiting to happen |
| 13:09:27 | <hpc> | not just a million accidents |
| 13:09:31 | <hpc> | the same accident a million times |
| 13:09:59 | <merijn> | The guiding principle for road design is: "People will fuck up" and therefore two things should be done: 1) possibility of fuckups should be minimised and 2) negative outcomes of fuckups should be minimised |
| 13:10:02 | → | polezaivsani joins (~polezaivs@orangeshoelaces.net) |
| 13:10:08 | <Gurkenglas> | merijn, I will happily claim that if self-driving cars gets widely adopted they'll probably save even more lives. |
| 13:10:08 | <hpc> | there's a few roads that tesla owners know to just avoid because the sensors get confused and it consistently steers into oncoming traffic and such |
| 13:10:11 | <merijn> | Which, tbh, perfectly summarises my attitude to programming too |
| 13:10:25 | × | DNH quits (~DNH@2a02:8108:1100:16d8:d0b2:5a76:adf7:9a5a) (Read error: Connection reset by peer) |
| 13:10:28 | <merijn> | Gurkenglas: Not with the way Tesla is producing them :) |
| 13:10:48 | <dminuoso> | Heck, even on airplanes (which generally dont encounter other airplanes) with extremely uniform landing strips over the world, there's mostly no autopilot landing. |
| 13:10:49 | <merijn> | Gurkenglas: And the thing is, safer road design benefits self-driving cars too |
| 13:10:52 | <Gurkenglas> | I do admit it's plausible that it'll work fine and then one day some accident hits everyone at once. |
| 13:11:13 | → | fendor_ joins (~fendor@91.141.44.222.wireless.dyn.drei.com) |
| 13:11:13 | <Gurkenglas> | That might even make it not be worth it in average lives saved on net. |
| 13:11:16 | <merijn> | Gurkenglas: Since the same things that prevent/reduce human fuckups and minimise damage of fuckup will have the same effect for self-driving cars |
| 13:11:21 | <dminuoso> | I find it curious why people are so eager for self driving cars before planes and trains have become widely completely automated.. |
| 13:11:25 | × | jackson99 quits (~bc8147f2@cerf.good1.com) (Quit: CGI:IRC (Ping timeout)) |
| 13:11:39 | <dminuoso> | It's really a recipe for disaster. :) |
| 13:12:01 | <int-e> | dminuoso: are they, really, or is it mostly marketing? |
| 13:12:06 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:12:11 | <merijn> | My main objection to self-driving cars is: We haven't sorted out liability yet |
| 13:12:33 | <dminuoso> | merijn: Socialism to the rescue. |
| 13:12:52 | <merijn> | I don't think self-driving cars are massively more risky than some humans. But I feel manufacturers would be...let's say...more invested in safety if they were liable for errors by their self-driving cars |
| 13:12:53 | <dminuoso> | If society itself wants self driving cars, have the society be liable for its decisions. |
| 13:13:05 | <maerwald> | dminuoso: there's no autopilot that has ever saved lives in an airplane... |
| 13:13:06 | <merijn> | dminuoso: I'd prefer the manufacturer was |
| 13:13:14 | × | dsrt^ quits (~dsrt@207.182.73.202) (Remote host closed the connection) |
| 13:13:18 | <Gurkenglas> | <dminuoso> Extra haddock (or even special type annotations) <- compromise: GPT-3-generated alternative haddock files, uploaded to hackage and verified by authors or the test of time |
| 13:13:25 | <nshepperd2> | aren't both planes and trains almost completely automated? |
| 13:13:32 | <dminuoso> | maerwald: Conceivably there were accidents that could have been saved by autopilots though? |
| 13:13:39 | <maerwald> | dminuoso: I don't think so |
| 13:13:40 | <dminuoso> | nshepperd2: Landings and startups on planes? No. |
| 13:13:47 | <int-e> | nshepperd2: they have humans in the loop at all times |
| 13:13:49 | × | fendor quits (~fendor@91.141.65.21.wireless.dyn.drei.com) (Ping timeout: 256 seconds) |
| 13:13:54 | <dminuoso> | nshepperd2: almost all airlines mandate their pilots land and takeoff by hand. |
| 13:14:02 | <nshepperd2> | the NYC train system still has drivers, mostly for hysterical raisins and it sometimes kills people |
| 13:14:11 | <Gurkenglas> | merijn, Tesla stock would crash if there was a serious series of accidents, isn't that plenty incentive? |
| 13:14:33 | <dminuoso> | Gurkenglas: Out of curiosity, do you happen to be working on GPT-3 related projects at the moment? |
| 13:14:51 | <dminuoso> | Trying to understand why you're pushing for it this hard. |
| 13:15:00 | <merijn> | Gurkenglas: Oh, no, I want manufacturers terrified of a *single* accident that's their fault, not just "massive worldwide failures" |
| 13:15:23 | × | akegalj quits (~akegalj@89-172-25-196.adsl.net.t-com.hr) (Ping timeout: 268 seconds) |
| 13:15:31 | <nshepperd2> | it's cost effective for airlines to have pilots "just in case" though |
| 13:15:36 | <merijn> | If companies are going to make life&death decisions I want them to have *serious* skin in the game |
| 13:15:38 | <dminuoso> | It's definitely not, nshepperd2. |
| 13:15:43 | → | lavaman joins (~lavaman@98.38.249.169) |
| 13:15:44 | <Gurkenglas> | merijn, that sounds like liability wouldn't do it but the PR-stockprice-hype angle could |
| 13:16:32 | <nshepperd2> | dminuoso: one salary vs however much profit tens of thousands of passengers bring in per year? |
| 13:16:36 | <merijn> | Gurkenglas: I mean, Tesla has already had several fuckups where their self-driving shit fucked up. Same with ubers experiments and their bottomline seems unaffected, so I have no faith in that |
| 13:16:48 | <maerwald> | nshepperd2: I don't think an autopilot could have done the landing on the Hudson River... because it was never done before |
| 13:16:59 | <Gurkenglas> | dminuoso, not quite? I'm working on math that'd let me measure and train for the readability of neural networks, because I do expect them to become really important and I worry what happens if we still can't read them by then. |
| 13:17:11 | <merijn> | If your company produces software that (potentially) makes life & death decisions the company being financially liable is the bare minimum |
| 13:17:19 | <nshepperd2> | maerwald: sure |
| 13:17:23 | <dminuoso> | nshepperd2: Its actually a curious case, because planes *can* takeoff, fly and land all by themselves with minimal intervention. In principle all the interaction on planes could happen remotely with a bunch of pilots sitting on their couch. |
| 13:17:28 | <nshepperd2> | planes having autopilot definitely saves lives though |
| 13:17:36 | <nshepperd2> | less pilot fatigue, etc |
| 13:17:45 | <merijn> | I don't think we should rule out criminal liability for people in charge of software like this |
| 13:18:29 | <dminuoso> | liability for software. |
| 13:18:31 | <dminuoso> | haha! |
| 13:18:36 | <dminuoso> | That'd be the day. |
| 13:18:39 | <merijn> | If your code provably (in a court of law) killed someone due to criminally negligent decisions, your company should be toast |
| 13:19:13 | <Gurkenglas> | We might want them to be required to buy insurance. Because a million crashes at once would bankrupt Tesla, and so would 10 million, so there's no reason for them to guard harder against 10 million than 1 million... |
| 13:19:17 | <merijn> | dminuoso: I'm not going to argue for industry wide software liability (although I sometimes think I should, maybe people would take this shit seriously, then...). But certainlty for control systems of cars/planes/trains/etc. |
| 13:19:22 | <dminuoso> | merijn: Germany had a woman die 1-2 years ago due to gross negligence in IT security, after some cryptoware infested the hospital and she couldn't receive urgent care. |
| 13:19:23 | <maerwald> | dminuoso: mixing concrete incorrectly in germany can get you into jail, so |
| 13:19:54 | <dminuoso> | merijn: But of course no criminal prosecution, blame was all put on "evil hackers". |
| 13:20:00 | <merijn> | Gurkenglas: I mean, you realise that "putting the CEO and other officers in jail" is something you can legally do, yeah? |
| 13:20:03 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 13:20:14 | <dminuoso> | maerwald: Yes, that's the funny bit. |
| 13:20:16 | <merijn> | Gurkenglas: It's not just about financial blowback |
| 13:20:30 | → | euandreh joins (~euandreh@2804:14c:33:9fe5:aa5f:93ea:3b88:5ff5) |
| 13:20:32 | <Gurkenglas> | merijn, we can include them being put in jail in the one-million-crashes-bankruptcy |
| 13:20:55 | <Gurkenglas> | aka, we still want them to guard harder against 10 million. |
| 13:21:30 | <int-e> | Gurkenglas: we *need* the jail part. bankruptcies largely don't hit management very hard... they just need to find a new job |
| 13:21:33 | <Gurkenglas> | and the insurance helps because then ten million would bankrupt the entire insurance industry when one million wouldn't |
| 13:21:33 | <maerwald> | and in automotive and related industries, there's already functional safety engineers overseeing every single software project |
| 13:21:41 | <merijn> | Gurkenglas: 10 million crashes due to the same error is not what I'm worried about |
| 13:21:49 | <maerwald> | so it wouldn't change that much |
| 13:22:01 | <merijn> | Gurkenglas: It's thousands of one-offs due to shitty engineering I worry about |
| 13:22:16 | <merijn> | And *nothing* I've heard about the software engineering at Tesla gives me *any* faith in them |
| 13:22:20 | <maerwald> | Daimler would just pour more money into formal methods |
| 13:22:34 | <merijn> | I wouldn't trust their software engineering process to run my laptop, let alone my car... |
| 13:22:57 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 240 seconds) |
| 13:23:18 | <nshepperd2> | int-e: that's why you require the company to buy insurance against it, so the ongoing insurance premiums are a blight on the CEO's bonuses each year |
| 13:23:29 | <maerwald> | the funny thing is... ISO 26262 already says your projects should use formal methods... but because it's "should", not one does it |
| 13:23:29 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 13:23:34 | <dminuoso> | merijn: Would you trust Intel's process to design secure processors to execute code on your laptop? They have a stellar record of optimized silicon and super safe management engines... |
| 13:23:40 | <nshepperd2> | people are bad an assessing risk of rare events like going to jail and tend to discount it |
| 13:24:08 | <merijn> | dminuoso: I don't trust *anybody* in this goddamn industry >.< |
| 13:24:41 | <merijn> | The whole industry is *at best* wildly negligent |
| 13:24:45 | <Gurkenglas> | merijn, why do you think (afaic) they should be punished for accidents even when they have less accidents than there would be in the absence of self driving? |
| 13:24:50 | <int-e> | nshepperd2: *can* you insure that? The worst case scenario is, as hpc said, "the same accident a million times" (around the same time). |
| 13:24:51 | <merijn> | At worst it's criminally incompetent |
| 13:25:32 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 240 seconds) |
| 13:25:34 | <dminuoso> | If only incompetence was criminal |
| 13:25:37 | <merijn> | Gurkenglas: I don't think they should be punished for accidents. I think accidents should be investigated and they should be punished when investigation shows the accident happened due to negligent safety measures |
| 13:25:39 | <maerwald> | well, we're in a crisis, because we have no idea of what software engineering really is... and Haskell didn't fix it :p |
| 13:25:43 | <int-e> | dminuoso: ouch |
| 13:26:05 | <merijn> | dminuoso: Well, I don't know about Germany, but "gross negligence" is criminal in most jurisdictions :p |
| 13:26:08 | <int-e> | dminuoso: I mean, have you thought that through? :) |
| 13:26:20 | <nshepperd2> | hmm the insurance company would need to have deep pockets |
| 13:27:02 | <merijn> | I would argue most of the tech industry is maybe not outright in that section, but certainly "consistently skirting the edges of gross negligence" |
| 13:27:10 | <Gurkenglas> | the entire point of insurance companies is that they deepen your hypothetical pockets. if it were only about 1-1000 accidents they could be their own insurance |
| 13:28:02 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 240 seconds) |
| 13:28:20 | <merijn> | Gurkenglas: The point of liability legislation is to figure out who is responsible and punish them. Currently if you have a self-driving cars manufacturers can blindly shove blame to the driver (unless manufacturing defect/failure). If we get self-driving cars, clearly we can't hold the *driver* liable, it is a computer program |
| 13:28:25 | <int-e> | But insurance companies aren't bottomless either. |
| 13:28:33 | <merijn> | So who *should* be liable? The owner? The creator of said program? |
| 13:29:06 | <maerwald> | my manager |
| 13:29:13 | <maerwald> | =) |
| 13:31:49 | <Gurkenglas> | merijn, i suppose it should be specified in the contract that the owner signed when he bought the vehicle from the employer of the creator of the program. if it's not, a judge would have to extrapolate what it would have said... which shouldn't be a deterministic decision, so in that case I'd hope both parties must pay a portion of the damages corresponding to the probabilities of how the contract would have |
| 13:31:49 | <Gurkenglas> | looked. |
| 13:32:12 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 13:32:38 | <merijn> | You seem to only worry about money, which is in itself worrying, tbh |
| 13:32:57 | <Gurkenglas> | Money is the unit of caring! |
| 13:33:23 | <merijn> | Gurkenglas: Sure, but also a poor deterrent against crime |
| 13:33:30 | <merijn> | There's a reason we don't punish murder with a fine |
| 13:33:31 | <geekosaur> | merijn, if it doesn't come down to money, it doesn't happen in this world |
| 13:33:48 | <merijn> | geekosaur: I mean...criminal liability is generally not about money :) |
| 13:33:58 | <merijn> | Well, depending on how corrupt your country is... |
| 13:34:12 | <Gurkenglas> | Some countries used to. But sure, we can also proportionally split up the non-monetary punishment. |
| 13:34:22 | <geekosaur> | you can generally assume maximum corruption, it just takes different shapes |
| 13:34:30 | <maerwald> | merijn: hmm... pharma companies get fined all the time for things that might be actual crimes :p |
| 13:34:30 | <Gurkenglas> | 3 whip lashes for the driver, 7 for the CEO. |
| 13:35:10 | <geekosaur> | ahah. assume that gets reversed |
| 13:35:43 | <dminuoso> | And the CEO can also spend portions of CO2 certificates as a subsitute for lashes. |
| 13:36:13 | <dminuoso> | Deductible in his or her annual tax report |
| 13:36:14 | <Gurkenglas> | those can be bought with money. if the CEO thinks the programmer was responsible, he can lash the programmer in turn. |
| 13:36:55 | <dminuoso> | It's a good thing that the question of guilt is not decided by each individual then. |
| 13:37:08 | <Gurkenglas> | the programmer should have read the employment contract fine print. |
| 13:37:17 | <dminuoso> | Gurkenglas: Though amusingly, what you just described is exactly what happened at Volswagen. |
| 13:37:18 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 13:37:25 | <nshepperd2> | let's all lash each other preemptively |
| 13:37:42 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 13:37:53 | <dminuoso> | "We didn't know anything about the emission scandal. It was some evil mid level programmers" |
| 13:39:38 | <maerwald> | dminuoso: it's usually something in between... increased deadline pressure to the point that programmers can't deliver without cutting on e.g. safety processes. I've been in such a meeting, no one said directly "yes, cut on the safety process", but everyone knew that's what we have to do |
| 13:40:35 | <Gurkenglas> | if only we could whip the coordination problem. |
| 13:40:39 | <dminuoso> | maerwald: I specifically meant the official statements from VW leadership that "the management was completely unaware, and that it was petty criminal software people who came up with it" |
| 13:40:58 | <dminuoso> | That did happen at some point. |
| 13:41:23 | <maerwald> | dminuoso: well, you could say management told them to do something that isn't possible and the employees came up with a criminal solution that management didn't WANT to know about :p |
| 13:41:44 | <maerwald> | now the question is... did they really know the specifics? Maybe not |
| 13:42:07 | <maerwald> | But they knew something unorthodox was gonna happen |
| 13:42:48 | <dminuoso> | maerwald: Considering that seemingly half the other producers in the world came up with the same idea... it seems very unconvincing. |
| 13:43:59 | → | davros joins (~davros@host86-184-180-214.range86-184.btcentralplus.com) |
| 13:44:35 | <Gurkenglas> | when you always take the cheapest of three offers you will select for people willing to be criminal in order to be cheaper. maybe that itself should make you more liable. |
| 13:48:40 | <merijn> | btw |
| 13:49:16 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 13:49:54 | <merijn> | Anyone know where Gabriella got the name Dhall from? |
| 13:50:55 | <Taneb> | It's a kind of curry I think |
| 13:51:17 | <maerwald> | Dal bhat? :o |
| 13:53:58 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 250 seconds) |
| 13:56:26 | → | unmanbearpig joins (~unmanbear@user/unmanbearpig) |
| 13:58:18 | → | lavaman joins (~lavaman@98.38.249.169) |
| 14:02:38 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
| 14:05:39 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 14:05:45 | × | slack1256 quits (~slack1256@191.126.99.84) (Remote host closed the connection) |
| 14:09:39 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 14:10:17 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 240 seconds) |
| 14:11:51 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 14:14:57 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Ping timeout: 240 seconds) |
| 14:18:36 | → | imalsogreg joins (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) |
| 14:21:51 | × | imalsogreg quits (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) (Remote host closed the connection) |
| 14:24:06 | → | ksqsf joins (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) |
| 14:25:36 | <texasmynsted> | naming is difficult |
| 14:26:32 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 14:26:32 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 14:26:32 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:28:37 | × | ksqsf quits (~user@2001:da8:d800:604:9875:4b6c:862:bfd4) (Ping timeout: 240 seconds) |
| 14:29:10 | → | timCF joins (~timCF@200-149-20-81.sta.estpak.ee) |
| 14:29:10 | × | timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Client Quit) |
| 14:29:38 | → | timCF joins (~timCF@200-149-20-81.sta.estpak.ee) |
| 14:30:07 | <timCF> | Hello! Any ideas why it's like this? I don't see why this is logical or correct https://gist.github.com/tim2CF/e63c7ff792e26362f356e71c47319494 |
| 14:30:32 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41) |
| 14:31:06 | <merijn> | interesting |
| 14:31:21 | <merijn> | @hoogle round |
| 14:31:21 | <lambdabot> | Prelude round :: (RealFrac a, Integral b) => a -> b |
| 14:31:21 | <lambdabot> | GHC.Real round :: (RealFrac a, Integral b) => a -> b |
| 14:31:21 | <lambdabot> | Test.Hspec.Discover round :: (RealFrac a, Integral b) => a -> b |
| 14:31:57 | <merijn> | oh |
| 14:32:40 | → | leibniz joins (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) |
| 14:32:43 | <merijn> | round's default implementation uses - the denominator |
| 14:32:46 | → | cfricke joins (~cfricke@user/cfricke) |
| 14:33:07 | <leibniz> | [exe] sorry i was afk, yes, not really used to doing traversals that are not mapAccumL |
| 14:33:09 | <merijn> | I suspect that underflows, since it results in a negative numerator/denominator, which you can't have with Natural |
| 14:33:29 | <leibniz> | not really sure how else traversals are actually used... |
| 14:33:32 | <merijn> | Rational works, because Rational is "Ratio Integer" and thus does allow negative numerators/denominators |
| 14:34:31 | <leibniz> | at least its the Applicative that in question, rather than the traversable itself, which is a "monadic list" (you could have ambiguity in terms of what that means, but for now lets just consider it to be a list where the tail is wrapped in a monda) |
| 14:34:32 | <merijn> | timCF: The only way to fix that would be to change the RealFrac instance of Ratio to not use signum |
| 14:34:43 | <merijn> | timCF: Which seems like a lot of work |
| 14:35:27 | <leibniz> | the point is that for IO, the blocking tail call, eg doing a stream of server requests, should not be used with strict State |
| 14:35:31 | <merijn> | timCF: Anyway, this is why Natural is generally considered a pretty bad type to use in "real" code |
| 14:35:32 | <dminuoso> | merijn: But round has a specific implementation for `instance (Integral a) => RealFrac (Ratio a) where` which does not use signum |
| 14:35:40 | <dminuoso> | Am I not seeing something here? |
| 14:35:53 | <merijn> | oh, I didn't check that far |
| 14:35:57 | <merijn> | But what does it use? |
| 14:36:05 | <dminuoso> | https://hackage.haskell.org/package/base-4.16.0.0/docs/src/GHC.Real.html#line-522 |
| 14:36:23 | <merijn> | dminuoso: Yeah, that has an obvious underflow |
| 14:36:42 | <timCF> | merijn: yeah. Spent couple of hours wondering round why my code (pure part) is blowing up |
| 14:36:52 | <merijn> | ah, wait, no, it depends on how it gets evaluated |
| 14:37:02 | <dminuoso> | merijn: What line are you looking at in particular? |
| 14:37:14 | <leibniz> | i mean, what other applicatives do people even used during a traversal? |
| 14:37:19 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds) |
| 14:37:24 | <lortabac> | merijn: https://github.com/dhall-lang/dhall-lang#name |
| 14:37:55 | <timCF> | merijn: I actually like to use Natural. What is bad is not Natural itself, but Num instance of Natural.. |
| 14:38:03 | <dminuoso> | leibniz: Can you restate that question? |
| 14:38:07 | <merijn> | dminuoso: I was thinking the -1 but that should be lazy |
| 14:38:07 | → | ph88^ joins (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) |
| 14:38:16 | <leibniz> | i guess i want input since i dont want my lack of experience to lead me to think that mapAccumL is the only use case for monadic traversals, which is the current conclusion, and motivates the presentation as via "scanners" rather than the commuting constructor/monad issue |
| 14:38:43 | <merijn> | timCF: You *inevitably* want to subtract from Natural and then you're in Partialsville, population: bottom |
| 14:38:45 | <leibniz> | dminuoso: im not sure which part your referring too |
| 14:39:22 | <leibniz> | how else people coomonly use traversals? |
| 14:39:23 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Ping timeout: 256 seconds) |
| 14:40:08 | <leibniz> | commonly* |
| 14:40:33 | <dminuoso> | leibniz: Dunno, the entire question is confusing and unclear to me. |
| 14:41:06 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 14:41:14 | <leibniz> | i want to know what other applicatives people use, other than StateL in mapAccumL, which is the only thing *I* use |
| 14:41:34 | <leibniz> | im not sure if there is a reason for that, based on the lazy consumption of monadic lists |
| 14:41:39 | <leibniz> | or if there is another example |
| 14:41:58 | <lortabac> | leibniz: what is StateL? |
| 14:42:00 | <timCF> | merijn: and there is no way to have simple (without Maybe/Either) subtract action over Naturals? Compiler just need to know that "a" is proven to be not less than "b" |
| 14:42:01 | <dminuoso> | Const, Identity, IO, State, List, plenty of monad transformer stacks.. |
| 14:42:24 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 14:42:32 | <leibniz> | ok, but those dont all lazily commute with the constructor |
| 14:42:42 | <dminuoso> | What does that even mean? |
| 14:42:44 | <leibniz> | so dont cout as "lazy applicatives" or something... |
| 14:43:05 | <leibniz> | leibniz: imagine your tail is wrapped in IO, because its a server call |
| 14:43:13 | <leibniz> | then the tail call is blocking |
| 14:43:28 | <leibniz> | so you need the constructor to commute with the applicative for it to be lazy |
| 14:43:33 | <dminuoso> | I do not understand what that means. |
| 14:43:35 | <leibniz> | otherwise it tries to traverse the whole list |
| 14:43:37 | <leibniz> | which blocks |
| 14:44:02 | <leibniz> | the "tail is on a server" ? basically its that you have a "get" request, which is like head |
| 14:44:12 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 14:44:25 | <leibniz> | this is the whole use case for IO monadically wrapped tail lists that im working with with the scanners |
| 14:45:10 | <leibniz> | as you deconstruct it, because the tail is wrapped in IO, it captures this, since matching the tails head obviously has an IO |
| 14:45:26 | <merijn> | timCF: Just is doing *a lot* of work in that sentence ;) |
| 14:45:42 | <dminuoso> | leibniz: I give up, I can't make heads or tails (heh, that pun) of what you're sayiing. |
| 14:45:56 | → | shriekingnoise joins (~shrieking@201.231.16.156) |
| 14:45:57 | <dminuoso> | I dont mean this offensively, but to me this reads as gibberish. |
| 14:45:59 | <leibniz> | it would be a whole lot more useful if you could at least try to explain why |
| 14:46:12 | <dminuoso> | leibniz: The entirety of what you're saying reads gibberish. |
| 14:46:24 | <dminuoso> | I feel like Im being pranked by a markov chain. |
| 14:46:24 | <leibniz> | dminuoso: its not offensive, just unhelpful. |
| 14:46:37 | <dminuoso> | leibniz: Can you give a concrete example perhaps? |
| 14:46:50 | × | iteratee quits (~kyle@162.218.222.107) (Ping timeout: 250 seconds) |
| 14:47:05 | <leibniz> | well what i said before wasnt clear to you, which i think could be because you dont specify what your asking |
| 14:47:10 | <merijn> | leibniz: eh...*which* mapAccumL? |
| 14:47:19 | <leibniz> | so, a concrete example of *what*? |
| 14:47:26 | <merijn> | leibniz: Because the mapAccumL *I* look at doesn't even use Applicative? |
| 14:47:28 | <dminuoso> | Of anything amounting to your questions? |
| 14:47:44 | <leibniz> | yeah, im sorry that your not helping |
| 14:47:57 | <leibniz> | merijn: sure it does |
| 14:48:01 | <merijn> | leibniz: No? |
| 14:48:15 | <leibniz> | its implementation is in terms of StateL, right? ill find the source hang on |
| 14:48:22 | <merijn> | "Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)" |
| 14:48:33 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 14:48:57 | <leibniz> | https://hackage.haskell.org/package/base-4.16.0.0/docs/src/Data.Traversable.html#mapAccumL |
| 14:49:04 | <leibniz> | mapAccumL f s t = coerce (traverse @t @(StateL s) @a @b) (flip f) t s |
| 14:49:20 | <merijn> | leibniz: Which applicative do you see in that type? |
| 14:49:25 | <leibniz> | StateL |
| 14:49:40 | <leibniz> | er, or `StateL s' |
| 14:49:55 | <merijn> | That's the implementation of mapAccumL, not something you use *with* mapAccumL? |
| 14:50:00 | <leibniz> | StateR wouldnt work with the blocking tail call |
| 14:50:22 | <leibniz> | mapAccumL is a traversable using the StateL Applicative |
| 14:50:27 | <leibniz> | a traversal* |
| 14:50:32 | <merijn> | Ok, sure |
| 14:50:33 | <merijn> | And? |
| 14:50:39 | <leibniz> | and StateR isnt Lazy |
| 14:50:50 | <merijn> | These are statements, not really questions? |
| 14:50:51 | <leibniz> | and i need examples of other useful applicatives that are |
| 14:50:52 | <dminuoso> | First lets address accuracy of the language. |
| 14:50:56 | <dminuoso> | mapAccumL is not a traversable |
| 14:51:17 | <leibniz> | this wasnt implied |
| 14:51:17 | × | deadmarshal quits (~deadmarsh@95.38.118.201) (Ping timeout: 240 seconds) |
| 14:51:17 | <dminuoso> | It's `* -> *` kinded typed that can be traversable, not value level identifiers. |
| 14:51:27 | <leibniz> | im aware |
| 14:51:39 | <dminuoso> | I just want to raise some points to avoid potential confusoin down the line here. |
| 14:51:44 | <leibniz> | sure |
| 14:52:08 | <leibniz> | do you understand the question now? |
| 14:52:11 | <merijn> | leibniz: Are you asking "which Applicatives do people use with 'traverse'?", because then dminuoso already answered |
| 14:52:13 | → | sha296 joins (~shakil@2409:4060:2e1a:fe17:1c57:6d0d:de58:2ca6) |
| 14:52:21 | <merijn> | i.e. "literally all of them" |
| 14:52:28 | <leibniz> | those ones arent lazy with blocking IO tails |
| 14:52:31 | <merijn> | Maybe, Either, IO, Const, State, etc. |
| 14:52:42 | → | iteratee joins (~kyle@162.218.222.107) |
| 14:52:44 | <leibniz> | right, im aware other applicatives exist |
| 14:52:46 | <dminuoso> | leibniz: The expression "blocking IO tails" still confuses the heck out of me. |
| 14:52:47 | <merijn> | What is "a blocking IO tail"? |
| 14:53:02 | <leibniz> | this was "where the tail is on a server" |
| 14:53:10 | <merijn> | What tail, what server |
| 14:53:22 | <leibniz> | thats an IO opperation, server communication |
| 14:53:28 | <merijn> | You seem to be skipping a whole lot of context that just exists in your brain? |
| 14:53:33 | <leibniz> | so eg it could issue values each second |
| 14:53:46 | <merijn> | leibniz: I have no clue how those things relate to traverse, tbh |
| 14:53:59 | <leibniz> | well because if its blocking you cant traverse from the right |
| 14:54:13 | <leibniz> | thats this lazyness ~ comuting the constructor with the applicative issue |
| 14:54:14 | <merijn> | If *what* is blocking? |
| 14:54:18 | <leibniz> | the tail call! |
| 14:54:23 | <merijn> | What tail call? |
| 14:54:33 | <leibniz> | implementing traverse matching on the head |
| 14:54:41 | <merijn> | ?? |
| 14:54:44 | <leibniz> | which gets the next value from the server |
| 14:54:44 | <dminuoso> | leibniz: I urge you to start anew, you're using a lot of non-conforming terminology that seems bizarre without context. |
| 14:55:15 | <merijn> | leibniz: traverse is a method implemented for types that are Traversable. Whether there is a sensible interpretation depends on the type you implement Traversable for... |
| 14:55:17 | <dminuoso> | Present a code example of what you mean by "blocking IO tails" |
| 14:55:28 | <lortabac> | leibniz: I don't understand what you are saying, but are you sure you are not reinventing conduit/pipes/streaming? |
| 14:55:29 | <dminuoso> | And what problems you conceive |
| 14:55:36 | <merijn> | leibniz: You are mentioning things that aren't related to Traversable at all |
| 14:55:42 | <dminuoso> | lortabac: Interesting. |
| 14:55:43 | <leibniz> | well, currently the question being asked is "why have monadic lists in practice, when are they blocking, when do we need lazyness" |
| 14:55:44 | <lortabac> | this "blocking IO" thing makes me think of streaming |
| 14:55:50 | <dminuoso> | lortabac: What is a "monadic list"? |
| 14:55:54 | <dminuoso> | Err leibniz ^- |
| 14:56:01 | <dminuoso> | But yes |
| 14:56:05 | <leibniz> | you just wrap the tail in a monad |
| 14:56:11 | <dminuoso> | Sorry |
| 14:56:17 | <dminuoso> | This is too much gibberish for me now. |
| 14:56:27 | <maerwald> | "wrap the tail inn a monad" |
| 14:56:49 | <merijn> | Again, what tail? what monad? |
| 14:56:51 | <dminuoso> | I do believe you dont have bad intentions, but you're throwing so much gibberish intermixed with random haskell words around - I can literally feel the confusion in your head. |
| 14:56:53 | <leibniz> | data MList' m a = MNil | a `MCons` MList m a |
| 14:56:53 | <leibniz> | type MList m a = m (MList' m a) |
| 14:56:54 | <leibniz> | newtype ListT m a = ListT { runListT :: MList m a } |
| 14:57:00 | <leibniz> | https://wiki.haskell.org/ListT_done_right |
| 14:57:05 | → | Jing joins (~hedgehog@240e:390:7c53:a7e1:4860:ab29:df65:d349) |
| 14:57:10 | <leibniz> | the archetypal monadic list implementation |
| 14:57:21 | <merijn> | leibniz: If you are asking about ListT, you should probably mention that at the start |
| 14:57:31 | <dminuoso> | But yes, I do think lortabac is on a right track |
| 14:57:41 | <leibniz> | last time i did that people suggested many other equivalent implementations |
| 14:57:46 | <dminuoso> | If I put together all the fragments I did understand from leibniz, I think they are looking for streaming libraries. |
| 14:58:05 | <leibniz> | what i mean is any one of those, these are easily described as lists where the tail is wrapped in a monad |
| 14:58:21 | <dminuoso> | leibniz: You should stop using the term "tail" here. |
| 14:58:22 | <leibniz> | dminuoso: it would be misleading to suggest that |
| 14:58:28 | <dminuoso> | I dont know. |
| 14:58:30 | <dminuoso> | You're misleading. |
| 14:58:47 | <maerwald> | leibniz: https://github.com/composewell/streamly/blob/master/docs/streamly-vs-lists.md |
| 14:58:55 | <leibniz> | im asking for examples of lazy states... not streaming libraries, which would be "why does he not need his question answered" |
| 14:59:10 | <leibniz> | and promotes comments like maerwalds |
| 14:59:20 | <leibniz> | declining which makes me seem rude |
| 14:59:23 | <leibniz> | i appologise |
| 14:59:47 | <leibniz> | ill read the link, but i think its an asside |
| 15:00:03 | <maerwald> | you asked for lists |
| 15:00:27 | <leibniz> | i didnt! i specifically asked not to have alternative implementations, ListTdone right is fine |
| 15:00:48 | <leibniz> | we are talking about a class all such things would instantiate |
| 15:00:53 | <leibniz> | im not after other instances |
| 15:01:06 | shapr | gets the spray bottle |
| 15:01:07 | <leibniz> | its about how to express the *class* |
| 15:01:35 | <maerwald> | a class that wraps tails in a Monad? |
| 15:01:43 | <shapr> | be nice peoples |
| 15:01:46 | <dminuoso> | leibniz: Mind my asking, what is your primary language? |
| 15:01:53 | <dminuoso> | I have a feeling we have a language barrier issue at work. |
| 15:02:05 | <leibniz> | english! |
| 15:02:08 | <dminuoso> | Interesting. |
| 15:02:17 | <leibniz> | no worries |
| 15:02:37 | <leibniz> | i think this article uses a different term for what is meant for "stream" |
| 15:02:41 | × | max22- quits (~maxime@2a01cb0883359800a4d68ab29ac6e773.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
| 15:03:00 | <leibniz> | which i have also seen used to mean "strictly infinite lists" |
| 15:03:20 | <leibniz> | which are actually a good example if you dont want to consider IO tails |
| 15:03:55 | <leibniz> | ie, it needs a "lazy applicative" (the thing im asking for other examples of other than StateL) |
| 15:04:02 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 240 seconds) |
| 15:04:06 | <leibniz> | since it also cannot be traversed from the right |
| 15:04:13 | <leibniz> | which is the common issue |
| 15:04:23 | <leibniz> | it not having a basecase if its strictly infinite |
| 15:04:34 | <leibniz> | similar to if the tail call is blocking |
| 15:04:50 | <leibniz> | so the constructor needs to commute with the applicative |
| 15:04:53 | <leibniz> | basically... |
| 15:05:12 | <leibniz> | im not even really sure why it works with StateL |
| 15:05:39 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 256 seconds) |
| 15:06:01 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:06:19 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 15:06:41 | <lortabac> | leibniz: when you say "traversing from the right", do you mean applying a right-associative operation as foldr does, or traversing the sequence backwards? |
| 15:07:38 | <leibniz> | i think actually im cheating when i say that, by failing to phrase this issue to do with not having access to the tail. basically what you want is that it doesnt try to traverse the whole thing |
| 15:08:21 | <dminuoso> | "access to the tail" |
| 15:08:22 | <leibniz> | for a strictly infinite list, the right associative operation would fail, right? |
| 15:08:44 | <leibniz> | dminuoso: yes, since its wrapped in a monad, it might block |
| 15:08:48 | <leibniz> | if that monad is IO |
| 15:08:49 | <dminuoso> | leibniz: No, it would not. In fact we can foldr over infinite lists just fine. |
| 15:08:57 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 15:09:05 | <dminuoso> | leibniz: What's wrong with blocking? |
| 15:09:17 | <dminuoso> | Seriously, can you present a concrete example? |
| 15:09:19 | <dminuoso> | Some data structure, some code |
| 15:09:26 | <leibniz> | thats what i was worried about, its not actually the right associative thing, its the "having to reach the basecase" |
| 15:09:38 | <dminuoso> | Whose basecase? |
| 15:09:56 | <dminuoso> | Let's make things less polymorphic, lets pick a particular traversable |
| 15:09:59 | <dminuoso> | Is lists okay? |
| 15:10:01 | <leibniz> | https://github.com/fog-hs/streaming-binary-files-take2 |
| 15:10:24 | <leibniz> | lists is certainly not ok |
| 15:10:29 | <leibniz> | it doesnt have the issue |
| 15:10:52 | <leibniz> | if you dont like this "blocking" issue, with the IO monad, then just use a "strictly infinite list" |
| 15:11:17 | <leibniz> | data Infinite a = Cons a (Infinite a) |
| 15:11:39 | <leibniz> | the "lack of basecase" here is what i meant |
| 15:11:46 | <leibniz> | lack of empty list |
| 15:12:02 | <leibniz> | for the inductive recusion in the datatype definition, has no basecase |
| 15:12:29 | <leibniz> | sorry, i kind of assume things like that are obvious |
| 15:12:36 | <leibniz> | haskell being my first language |
| 15:13:07 | <shapr> | I'm slightly envious |
| 15:13:39 | <merijn> | Slight interlude: What's my best option for fixed-length containers with length in the type? sized-vector? |
| 15:13:49 | <dminuoso> | sized-vector is a good pick, yes |
| 15:14:10 | → | akegalj joins (~akegalj@89-172-25-196.adsl.net.t-com.hr) |
| 15:14:18 | <dminuoso> | merijn: Though ideally Id also ask what kind of library support you expect from functions interacting with that. |
| 15:14:22 | <merijn> | dminuoso: Ah, wrong package...I was thinking of a different one, but forget the name |
| 15:15:00 | <dminuoso> | vector-sized? |
| 15:15:12 | <merijn> | dminuoso: I am writing a data structure that needs to handle N-dimensional indices/vectors. I would like to statically enforce that a data structure operating on 3-dimensional points only accepts 3-dimensional arguments |
| 15:15:21 | <dminuoso> | Also fixed-vector |
| 15:15:38 | <dminuoso> | could be that I confused vector-sized with sized-vector as well |
| 15:15:46 | <merijn> | So I don't really need any inconvenient resizing operations |
| 15:16:42 | <dminuoso> | merijn: is this math heavy? Or could you just use a Map polymorphic over a key? |
| 15:17:12 | <merijn> | dminuoso: Map is a pain, need lots of pointwise numerics |
| 15:17:32 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds) |
| 15:17:37 | × | n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds) |
| 15:18:18 | <dminuoso> | merijn: What about https://hackage.haskell.org/package/tensor ? |
| 15:18:31 | <dminuoso> | havent taken a closer look, but it seems to match your description |
| 15:18:53 | <merijn> | dminuoso: vector-sized covers pretty much all I need and seems easier, though? |
| 15:19:19 | <dminuoso> | merijn: If that works, then great! :) |
| 15:19:59 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 15:21:07 | × | fendor_ quits (~fendor@91.141.44.222.wireless.dyn.drei.com) (Remote host closed the connection) |
| 15:21:48 | <leibniz> | the thing i dont understand is about which applicatives commute with the constructor like StateL does |
| 15:22:16 | <leibniz> | this is the reason for presenting it as scanners, basically just a monadic version of mapAccumL |
| 15:22:28 | <leibniz> | instead of with this commutation condition via a superclass |
| 15:22:39 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 15:22:40 | <leibniz> | if i had other examples, it might motivate the more general approach |
| 15:23:13 | <leibniz> | otherwise you basically lose Traversable, and just end up with Scannable (implement the monadic version of mapAccumL) |
| 15:24:11 | <leibniz> | the "proposal", if i cant find any other examples, then just uses this StateL/Scanner thing |
| 15:24:32 | × | akegalj quits (~akegalj@89-172-25-196.adsl.net.t-com.hr) (Ping timeout: 240 seconds) |
| 15:24:35 | <leibniz> | and says something like "you dont traverse monadic tailed lists, you scanner them" |
| 15:25:16 | <leibniz> | "unless something something applicative commutes with the constructor" (which i havent quite developed - not having the examples im asking for) |
| 15:26:07 | → | mmalter joins (~mmalter@88.126.10.237) |
| 15:26:22 | <leibniz> | obviously for something simple like Identity, you can write the commutation relation no bother |
| 15:26:32 | <leibniz> | but thats not a useful example |
| 15:27:20 | × | sha296 quits (~shakil@2409:4060:2e1a:fe17:1c57:6d0d:de58:2ca6) (Quit: Leaving) |
| 15:27:46 | <leibniz> | https://github.com/fog-hs/streaming-binary-files-take2/blob/master/Stream/StackM.hs#L116 |
| 15:28:52 | → | Henson joins (~kvirc@107-179-133-201.cpe.teksavvy.com) |
| 15:29:54 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 15:30:36 | → | n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293) |
| 15:32:36 | <leibniz> | i guess thats strictly infinite as well as monadic, since it requires (s -> a -> m ( b, s)), not (s -> a -> m (Maybe (b, s))) |
| 15:32:48 | <leibniz> | i think... |
| 15:33:21 | <leibniz> | no wait thats wrong nvm |
| 15:34:04 | × | polezaivsani quits (~polezaivs@orangeshoelaces.net) (Ping timeout: 250 seconds) |
| 15:34:16 | → | razetime joins (~quassel@49.207.209.26) |
| 15:34:17 | → | CHUD joins (~CHUD@edu7895.kent.ac.uk) |
| 15:34:33 | <leibniz> | basically i think the point is that its given f :: (s -> a -> m (b, s)), instead of phrasing this using the Applicative StateL |
| 15:35:25 | <leibniz> | and it maps into the monad on line 119, and does the get + set just fine using the function g, which uses f |
| 15:36:31 | <leibniz> | the problem would be if it were some other thing, not an f of this form, which i guess is that of the applicative function in StateL |
| 15:36:48 | <leibniz> | not sure if anyone is following at this point so ill hold back for a minute |
| 15:48:15 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 15:49:05 | → | ubert1 joins (~Thunderbi@p200300ecdf0994d82e117d25e75bd889.dip0.t-ipconnect.de) |
| 15:49:29 | → | ezyang joins (~ezyang@ool-18b820e3.dyn.optonline.net) |
| 15:49:39 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:49:45 | <ezyang> | hey everyone, for a "modern" installation of haskell, should I expect mtl to be visible |
| 15:50:03 | <ezyang> | as in, if someone takes a hs file and just runs ghci on it |
| 15:50:37 | <dminuoso> | ezyang: Mmm, in my modern installation I assume nix-style cabal projects for everything. |
| 15:51:06 | <ezyang> | trying hard not to force my students to use cabal ^^" |
| 15:52:08 | <dminuoso> | The tooling for v2- is very inadequate for this basic exploration style of "make a hs file and run it through ghci" :( |
| 15:52:28 | <ezyang> | stepping back a moment: modern installation is using ghcup, right? |
| 15:52:37 | <dminuoso> | ezyang: Id expect boot libraries to be visible as a minimum |
| 15:52:52 | <ezyang> | yeah, I thought mtl was a boot library, but maybe not anymore? |
| 15:52:58 | <lortabac> | ezyang: on GHC 8.10.7 I don't need cabal to use mtl |
| 15:52:58 | <dminuoso> | ghcup seems to be the currently preferred method based on my highly based observational skills |
| 15:53:10 | <ezyang> | hmm ok |
| 15:53:14 | <ezyang> | useful data point |
| 15:53:19 | <dminuoso> | *highly biased |
| 15:53:21 | <maerwald> | even for ghc 9.2.1, mtl is still packaged with GHC |
| 15:53:33 | <ezyang> | on my jank ghcup install mtl was hidden |
| 15:53:40 | <ezyang> | but I had an environment file smh |
| 15:53:56 | <ezyang> | so maybe that was just self inflicted |
| 15:53:58 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 15:54:04 | <ezyang> | I also managed to install quickcheck twice into the environment file T.T |
| 15:54:26 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 15:55:40 | <ezyang> | oh nooo my template haskell code needs updating lol |
| 15:55:43 | × | xff0x quits (~xff0x@2001:1a81:5370:cd00:aa5:136f:1b20:712a) (Ping timeout: 268 seconds) |
| 15:56:16 | → | xff0x joins (~xff0x@port-92-193-184-123.dynamic.as20676.net) |
| 15:57:06 | → | myShoggoth joins (~myShoggot@97-120-67-120.ptld.qwest.net) |
| 15:57:34 | × | jgeerds quits (~jgeerds@55d4a547.access.ecotel.net) (Ping timeout: 268 seconds) |
| 15:58:36 | <merijn> | ezyang: There's a compat library that's fairly easy |
| 15:58:43 | × | CHUD quits (~CHUD@edu7895.kent.ac.uk) (Ping timeout: 256 seconds) |
| 15:58:51 | <merijn> | @hackage th-compat |
| 15:58:51 | <lambdabot> | https://hackage.haskell.org/package/th-compat |
| 15:59:57 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 240 seconds) |
| 16:00:02 | × | leibniz quits (~leibniz@cpc101088-sgyl37-2-0-cust22.18-2.cable.virginm.net) (Quit: Connection closed) |
| 16:01:18 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 16:03:43 | <SrPx> | Can I configure Rust to just show the panic message when it panics on release, instead of a long: << thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "PANIC_MESSAGE"', src/file.rs:xx:yy >> |
| 16:04:18 | <ezyang> | wrong channel |
| 16:04:33 | <SrPx> | ops, sorry |
| 16:05:01 | → | alp joins (~alp@user/alp) |
| 16:06:46 | → | alx741 joins (~alx741@157.100.93.160) |
| 16:08:15 | → | max22- joins (~maxime@2a01cb0883359800fbaebbbb888c1e29.ipv6.abo.wanadoo.fr) |
| 16:09:54 | <ezyang> | is there an easy way to tell what template-haskell version corresponds to what ghc version |
| 16:10:00 | → | akegalj joins (~akegalj@89-172-25-196.adsl.net.t-com.hr) |
| 16:10:06 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 16:10:46 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:25bb:89ab:830f:7e39) (Quit: WeeChat 2.8) |
| 16:11:08 | <maerwald> | ezyang: https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history |
| 16:11:10 | <ezyang> | ah the changelog |
| 16:11:13 | <ezyang> | thx! |
| 16:11:37 | <maerwald> | ghcup shows the corresponding base version only |
| 16:12:27 | × | akegalj quits (~akegalj@89-172-25-196.adsl.net.t-com.hr) (Client Quit) |
| 16:13:57 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 16:14:09 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 16:14:28 | → | romesrf joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 16:14:35 | <romesrf> | hey everyone |
| 16:16:14 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 16:16:26 | → | nattiestnate joins (~nate@2001:448a:20a0:2d74:df0e:2d0:816:6977) |
| 16:17:26 | <romesrf> | I was just now thinking about how my dad was saying haskell wasn't readable for programmers without functional experience, and he was looking at some program that in between some other things did: addValue x \n updateValue id y |
| 16:18:02 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 16:18:10 | <romesrf> | then i wrote updateValue' = uncurry updateValue (out of sight) |
| 16:18:27 | <romesrf> | and rewrote addValue(x) \n updateValue(id, y), and he said "oh that's much better" |
| 16:18:34 | <romesrf> | :p |
| 16:20:00 | × | fef quits (~thedawn@user/thedawn) (Quit: Leaving) |
| 16:21:57 | × | razetime quits (~quassel@49.207.209.26) (Ping timeout: 256 seconds) |
| 16:22:21 | → | CHUD joins (~CHUD@edu7895.kent.ac.uk) |
| 16:24:15 | <ezyang> | merijn: actually, turns out I hadn't even gotten here yet lol |
| 16:24:36 | <ezyang> | now I'm at ghc 9 compat and ... I kind of don't wanna do it haha |
| 16:25:30 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 16:25:38 | → | lispy joins (~lispy4@84.69.59.93) |
| 16:25:41 | → | khanred joins (~khanred@user/khanred) |
| 16:26:47 | → | alx741 joins (~alx741@157.100.93.160) |
| 16:28:40 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:29:19 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:29:32 | × | emf_ quits (~emf@2620:10d:c090:400::5:2d26) (Ping timeout: 250 seconds) |
| 16:29:38 | ← | khanred parts (~khanred@user/khanred) (Leaving) |
| 16:29:50 | → | lavaman joins (~lavaman@98.38.249.169) |
| 16:30:33 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 16:31:48 | <merijn> | ezyang: It was fairly painless for me, but I only had fairly simple code |
| 16:32:22 | <merijn> | ezyang: Mostly adding the th-compat dependency and sprinkle a handful of type synonyms/lift functions throughout |
| 16:34:37 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 16:36:17 | <Hecate> | https://twitter.com/jckarter/status/1485651876825559041 |
| 16:36:18 | <Hecate> | hahahaha |
| 16:36:19 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) |
| 16:40:03 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 16:40:11 | <ezyang> | ok it turns out |
| 16:40:16 | <ezyang> | I was not broken by typed splice changes |
| 16:40:24 | <ezyang> | but by the generalization of quasiquote monad signature |
| 16:40:37 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) (Ping timeout: 240 seconds) |
| 16:41:08 | <Hecate> | oh hey ezyang :) |
| 16:41:20 | <ezyang> | sup |
| 16:42:06 | × | lionhairdino quits (~jacoo@121.131.39.82) (Ping timeout: 250 seconds) |
| 16:43:00 | <merijn> | ezyang: That's what I was assuming :p |
| 16:43:02 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 16:43:15 | <merijn> | th-compat should make that easy to fix, though |
| 16:44:28 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 16:46:02 | × | SummerSonw quits (~The_viole@203.77.49.232) (Ping timeout: 240 seconds) |
| 16:48:24 | → | alx741 joins (~alx741@157.100.93.160) |
| 16:50:04 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 16:51:15 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) |
| 16:53:41 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 268 seconds) |
| 16:54:15 | × | CHUD quits (~CHUD@edu7895.kent.ac.uk) (Ping timeout: 256 seconds) |
| 16:54:26 | → | razetime joins (~quassel@49.207.209.26) |
| 16:57:13 | → | provorny_compsog joins (~provornyc@2001:470:69fc:105::1:74df) |
| 16:58:17 | <EvanR> | romesrf, actually i have similar experience, before they even get to laziness, type systems, purely functionalism, immutable algebraic data types, etc etc etc etc, they can't get past the fact that foo(x,y,z) is written f x y z |
| 16:58:27 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 16:58:45 | <EvanR> | *if you think that's bad, don't try lisp* |
| 16:59:46 | → | lbseale joins (~ep1ctetus@user/ep1ctetus) |
| 16:59:57 | × | nattiestnate quits (~nate@2001:448a:20a0:2d74:df0e:2d0:816:6977) (Quit: WeeChat 3.4) |
| 17:00:18 | × | razetime quits (~quassel@49.207.209.26) (Ping timeout: 250 seconds) |
| 17:00:44 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
| 17:01:14 | provorny_compsog | is now known as Sixto[m] |
| 17:01:42 | <EvanR> | I there was some backlash in recent years at how ruby lets you write f x, y, z OR f(x,y,z) and now people demand the second one for there's one way to do it sake |
| 17:01:53 | → | CHUD joins (~CHUD@edu7895.kent.ac.uk) |
| 17:02:05 | → | zmt00 joins (~zmt00@user/zmt00) |
| 17:02:16 | <maerwald> | at least you can have a decent formatter then |
| 17:02:34 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 17:03:01 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 17:05:10 | × | lispy quits (~lispy4@84.69.59.93) (Quit: Leaving) |
| 17:05:38 | → | lispy joins (~lispy4@84.69.59.93) |
| 17:06:36 | → | alx741 joins (~alx741@157.100.93.160) |
| 17:08:02 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 240 seconds) |
| 17:08:41 | → | bjobjo joins (~bjobjo@user/bjobjo) |
| 17:09:06 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 17:10:54 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 17:11:07 | <dsal> | I thought the "no parens" thing was kind of silly as well until I realized you could also write `g = f x` and then later do stuff like `map g zs` -- the sort of thing you can' sensibly do in the languages that were more "comfortable" due to parentheses. |
| 17:12:47 | <c_wraith> | you mean in that automatic currying is weirder in languages that require parens on function calls? |
| 17:13:10 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:13:42 | <EvanR> | function f(x,y,z){...}, f.pleaseAutomaticallyCurry(x,y)... |
| 17:13:51 | <EvanR> | since f(x,y) makes z undefined |
| 17:14:12 | → | log101 joins (~log101@212.125.22.146) |
| 17:14:39 | × | ezyang quits (~ezyang@ool-18b820e3.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 17:15:49 | <dsal> | c_wraith: Yeah. Like, purescript does it, but you end up writing f(x)(y)(z) which is… better? |
| 17:16:24 | <dsal> | (not purescript the language, just the way it compiles to javascript so your JS code calling PS looks like that) |
| 17:16:52 | <EvanR> | that can't be a good way to implement curried functions in js... |
| 17:16:58 | <EvanR> | efficiency wise |
| 17:18:07 | <dsal> | The translation seems to be really straightforward. The JS code looks a lot like how you'd imagine the PS code looking, just with more ()s and {}s. But it did seem weird. |
| 17:21:32 | <c_wraith> | EvanR: in the case of compiling to JS, it seems like the approach that would keep your code the smallest. Otherwise you'd need different wrappers for each arity |
| 17:22:11 | <EvanR> | each arity and the eventual "unknown arity arity" like ghc |
| 17:23:20 | <c_wraith> | unknown arity gets taken care of by the 1-arity case |
| 17:24:25 | → | SwarmCollective joins (~joseph@2603-6011-bc02-b600-b88c-5e22-9d18-391e.res6.spectrum.com) |
| 17:26:37 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
| 17:27:02 | → | Hanicef joins (~gustaf@81-229-9-108-no92.tbcn.telia.com) |
| 17:27:11 | × | Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Read error: Connection reset by peer) |
| 17:28:51 | → | raym_ joins (~raym@user/raym) |
| 17:28:58 | → | Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
| 17:29:01 | × | raym quits (~raym@user/raym) (Ping timeout: 256 seconds) |
| 17:29:08 | → | alx741 joins (~alx741@157.100.93.160) |
| 17:32:02 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 17:33:18 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 17:34:23 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 17:35:16 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 17:35:54 | → | cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) |
| 17:37:11 | → | ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) |
| 17:40:17 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 17:45:22 | × | cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection) |
| 17:47:05 | → | deadmarshal joins (~deadmarsh@95.38.118.201) |
| 17:49:50 | → | alx741 joins (~alx741@157.100.93.160) |
| 17:51:07 | → | econo joins (uid147250@user/econo) |
| 17:51:37 | × | MajorBiscuit quits (~MajorBisc@c-001-025-008.client.tudelft.eduvpn.nl) (Ping timeout: 240 seconds) |
| 17:53:25 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 17:53:30 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 268 seconds) |
| 17:53:51 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 17:53:51 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 17:53:51 | → | wroathe joins (~wroathe@user/wroathe) |
| 17:57:57 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 17:58:51 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 18:00:33 | × | CHUD quits (~CHUD@edu7895.kent.ac.uk) (Ping timeout: 256 seconds) |
| 18:00:39 | × | Jing quits (~hedgehog@240e:390:7c53:a7e1:4860:ab29:df65:d349) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:00:57 | × | raym_ quits (~raym@user/raym) (Ping timeout: 240 seconds) |
| 18:01:56 | → | raym joins (~raym@user/raym) |
| 18:04:17 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 18:05:20 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 18:08:01 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 18:08:01 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 18:08:01 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:09:36 | → | geranim0 joins (~geranim0@d-132-204-221-88.res.umontreal.ca) |
| 18:10:32 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 18:10:43 | → | mikoto-chan joins (~mikoto-ch@213.177.151.239) |
| 18:11:31 | × | log101 quits (~log101@212.125.22.146) (Ping timeout: 256 seconds) |
| 18:12:30 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 18:13:05 | → | hololeap joins (~hololeap@user/hololeap) |
| 18:13:25 | → | tom__ joins (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) |
| 18:15:32 | → | yauhsien joins (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) |
| 18:16:28 | → | alx741 joins (~alx741@157.100.93.160) |
| 18:17:26 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 250 seconds) |
| 18:17:33 | × | tom_ quits (~tom@host86-151-99-97.range86-151.btcentralplus.com) (Ping timeout: 256 seconds) |
| 18:18:55 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 18:19:49 | × | yauhsien quits (~yauhsien@61-231-58-250.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 18:22:27 | → | Akiva joins (~Akiva@user/Akiva) |
| 18:22:37 | → | neceve joins (~quassel@2.26.93.228) |
| 18:23:07 | → | log101 joins (~log101@212.125.22.146) |
| 18:23:31 | × | ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec) |
| 18:24:24 | polyphem_ | is now known as polyphem |
| 18:26:02 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 18:27:28 | → | mcgroin joins (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 18:27:43 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::5d55) |
| 18:30:28 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 18:30:35 | × | CHUD quits (~CHUD@host-80-41-89-108.as13285.net) (Ping timeout: 256 seconds) |
| 18:31:55 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 18:32:35 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 18:33:00 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 18:34:28 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::5d55) (Remote host closed the connection) |
| 18:35:34 | → | alx741 joins (~alx741@157.100.93.160) |
| 18:35:47 | × | iteratee quits (~kyle@162.218.222.107) (Read error: Connection reset by peer) |
| 18:37:01 | × | log101 quits (~log101@212.125.22.146) (Read error: Connection reset by peer) |
| 18:37:35 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 18:38:27 | × | mbuf quits (~Shakthi@171.61.206.147) (Quit: Leaving) |
| 18:39:44 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 18:43:50 | × | Hanicef quits (~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving) |
| 18:44:33 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 18:44:41 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 18:44:49 | → | imalsogreg joins (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) |
| 18:45:46 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 18:45:46 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 18:45:46 | → | wroathe joins (~wroathe@user/wroathe) |
| 18:47:17 | × | imalsogreg quits (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) (Remote host closed the connection) |
| 18:47:30 | → | imalsogreg joins (~imalsogre@2601:147:300:f930:5437:e43a:e44a:1d0d) |
| 18:47:50 | <polyphem> | i have this code, how could one improve it ? https://paste.tomsmeding.com/eJrHywZc |
| 18:49:57 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 240 seconds) |
| 18:49:59 | × | imalsogreg quits (~imalsogre@2601:147:300:f930:5437:e43a:e44a:1d0d) (Remote host closed the connection) |
| 18:50:09 | <lagash> | Rewrite it in Rust! /s |
| 18:50:13 | × | eruditass quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:50:17 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 18:50:18 | → | iteratee joins (~kyle@162.218.222.107) |
| 18:50:37 | <[exa]> | polyphem: you may remove BangPatterns by using 'det () `seq` pure ()` but well, why improve? |
| 18:52:12 | → | imalsogreg joins (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) |
| 18:52:17 | <[exa]> | also the \()-> is const |
| 18:53:13 | <polyphem> | ok improve, was wrong wording , maybe "extend" ... ? |
| 18:53:13 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 18:53:51 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 18:54:57 | × | iteratee quits (~kyle@162.218.222.107) (Ping timeout: 256 seconds) |
| 18:55:14 | → | iteratee joins (~kyle@162.218.222.107) |
| 18:55:57 | <tomsmeding> | polyphem: why produce a function taking () ? |
| 18:56:11 | <maerwald> | could GHC rewrite all function of the form `f x y = ...` to `f = \x -> \y -> ...`? |
| 18:56:24 | <monochrom> | Each "\()" can be replaced by "\_" for both generality and non-strictness. |
| 18:56:38 | <tomsmeding> | maerwald: iirc that difference has an influence on inlining behaviour |
| 18:56:44 | <maerwald> | tomsmeding: yes |
| 18:56:44 | → | alx741 joins (~alx741@157.100.93.160) |
| 18:56:46 | <maerwald> | that's why I ask |
| 18:57:27 | <[exa]> | polyphem: extend in what direction? (you might autoderive Enum for the fail cases and autoselect a random one, but still, why) |
| 18:57:35 | <geekosaur> | also the monomorphism restriction |
| 18:57:36 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
| 18:58:10 | <monochrom> | You can also delete all of the "`seq` ()", and instead, in explode, use "evaluate (arm d)". |
| 18:58:42 | × | zaquest quits (~notzaques@5.130.79.72) (Read error: Connection reset by peer) |
| 18:58:46 | → | gentauro joins (~gentauro@user/gentauro) |
| 18:58:59 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 18:59:15 | <monochrom> | Or rather, "evaluate (arm d ())" |
| 18:59:17 | → | polezaivsani joins (~polezaivs@orangeshoelaces.net) |
| 18:59:31 | <geekosaur> | anyway I think currently ghc is careful *not* to do such rewriting |
| 18:59:41 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 18:59:47 | <geekosaur> | you might ask in #ghc about why/what you might do about it |
| 19:00:13 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 19:00:24 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 19:01:09 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 19:01:09 | → | Brandon_IX joins (~brandon@178-79-138-117.ip.linodeusercontent.com) |
| 19:01:44 | <polyphem> | geekosaur: monomorphism restriction ? |
| 19:02:23 | × | riatre quits (~quassel@2001:310:6000:f::5198:1) (Quit: No Ping reply in 180 seconds.) |
| 19:03:14 | <geekosaur> | if a binding has no parameters it will be forced to be monomorphic instead of polymorphic by default, so that sharing works |
| 19:03:30 | <tomsmeding> | % :set -XMonomorphismRestriction |
| 19:03:30 | <yahb> | tomsmeding: |
| 19:03:35 | <tomsmeding> | % f x = x + 1 |
| 19:03:35 | <yahb> | tomsmeding: |
| 19:03:39 | <tomsmeding> | % g = \x -> x + 1 |
| 19:03:39 | <yahb> | tomsmeding: |
| 19:03:40 | <geekosaur> | https://wiki.haskell.org/Monomorphism_restriction |
| 19:03:40 | → | riatre joins (~quassel@2001:310:6000:f::5198:1) |
| 19:03:41 | <tomsmeding> | % :t f |
| 19:03:41 | <yahb> | tomsmeding: Num a => a -> a |
| 19:03:42 | <tomsmeding> | % :t g |
| 19:03:42 | <yahb> | tomsmeding: Integer -> Integer |
| 19:04:00 | <tomsmeding> | (the monomorphism restriction is off by default in ghci, but on by default in a source file) |
| 19:08:44 | × | benin quits (~benin@183.82.31.24) (Quit: The Lounge - https://thelounge.chat) |
| 19:09:00 | <polyphem> | https://paste.tomsmeding.com/yBWgK3C0 |
| 19:09:37 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 19:10:00 | <polyphem> | monomorphism restriction is "default typing" ?! |
| 19:10:32 | <geekosaur> | defaulting is default typing. it helps ghc when it wants to monomorphize and can't do so otherwise |
| 19:10:56 | <geekosaur> | `default (Integer, Double)` is the "default default" |
| 19:11:21 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 19:11:44 | <geekosaur> | ghci adds () so the empty list typechecks as *something* when it'd otherwise be ambiguous (see ExtendedDefaultRules) |
| 19:12:07 | <polyphem> | ok i see ghc does default typing becase monomorphism restriction has to monomorphize to a concrete type and if none can be infered ghc defaults , right ? |
| 19:12:28 | <geekosaur> | there are also some rules as to which typeclasses defaulting will operate through, which are relaxed under ExtendedDefaultRules |
| 19:12:33 | <geekosaur> | yes |
| 19:12:45 | → | soxen joins (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) |
| 19:13:16 | <polyphem> | i had an vague intuition already, no it has come clear |
| 19:13:22 | <polyphem> | now |
| 19:13:23 | → | alp joins (~alp@user/alp) |
| 19:16:13 | → | zaquest joins (~notzaques@5.130.79.72) |
| 19:17:14 | → | alx741 joins (~alx741@157.100.93.160) |
| 19:17:39 | → | burnsidesLlama joins (~burnsides@dhcp168-037.wadham.ox.ac.uk) |
| 19:17:53 | <geekosaur> | defaulting is also used when ghc or ghci needs to assign *some* type and can't for some reason, e.g. a simple program that does math but never specifies any type signature will get inferred as Integer or Double depending on whether it does division (Double) or not (Integer) |
| 19:18:25 | <geekosaur> | since ghc usually can't proceed without assigning some type to an expression |
| 19:18:47 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 19:19:19 | <polyphem> | geekosaur: yeah , once in a while it has to stick to concrete types |
| 19:19:42 | → | cynomys joins (~cynomys@user/cynomys) |
| 19:20:02 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 19:20:05 | × | deadmarshal quits (~deadmarsh@95.38.118.201) (Ping timeout: 256 seconds) |
| 19:21:17 | <geekosaur> | ultimately it has to resolve to a concrete type. for example (+) for Integer is different from (+) for Int is different from (+) for Float is different from (+) for Double. so defaulting helps it resolve the type(s) down to something concrete there is a dictionary for |
| 19:21:47 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 19:22:10 | <geekosaur> | very rarely you will see situations where it doesn't actually need a concrete type, and a weird "type" called Any will pop up |
| 19:22:11 | <polyphem> | i had a map of exitential values with some typeclass constraints , and wanted to return the values and pass it on to a polymorphic function with the same constraints , but it didn't let me do it i had to coerce it to a concrete type first .... |
| 19:23:15 | <polyphem> | :t Any |
| 19:23:16 | <lambdabot> | Bool -> Any |
| 19:23:47 | <geekosaur> | not the same Any, that one is a newtype wrapper for a monoid iirc |
| 19:24:02 | <geekosaur> | GHC.Types.Any is a magic type family these days, but used to be even mroe magical |
| 19:24:08 | <polyphem> | ok , i wondered for a moment |
| 19:24:12 | <polyphem> | :9 |
| 19:26:15 | <geekosaur> | it's not supposed to be exposed, but every so often it leaks out |
| 19:26:34 | × | SwarmCollective quits (~joseph@2603-6011-bc02-b600-b88c-5e22-9d18-391e.res6.spectrum.com) (Remote host closed the connection) |
| 19:26:57 | → | SwarmCollective joins (~joseph@2603-6011-bc02-b600-40df-b781-ef29-193a.res6.spectrum.com) |
| 19:27:41 | <geekosaur> | https://downloads.haskell.org/ghc/latest/docs/html/libraries/ghc-prim-0.8.0/GHC-Types.html#t:Any |
| 19:27:59 | <polyphem> | i am reading the documentation, right now with hdc : unsafeCoerce (unsafeCoerce x :: Any) :: t is equivalent to x. |
| 19:28:56 | <polyphem> | do you know hdc , https://lazamar.github.io/haskell-documentation-in-the-command-line/ its fantastic |
| 19:30:14 | <[exa]> | ok that's cute |
| 19:30:56 | <polyphem> | tmux 3 panes vim/ghcid/hdc ... best ide ever :) |
| 19:34:41 | <xerox> | polyphem: what's hdc? |
| 19:35:19 | <polyphem> | xerox: haskell-documentation-in-the-command-line ^ |
| 19:35:35 | × | ubert1 quits (~Thunderbi@p200300ecdf0994d82e117d25e75bd889.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 19:36:14 | <xerox> | ah very nice, gonna try it out |
| 19:37:01 | → | alx741 joins (~alx741@157.100.93.160) |
| 19:37:02 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds) |
| 19:37:05 | <monochrom> | Ugh "solving" the window-switching problem by the terminal-switching "solution". |
| 19:37:17 | <polyphem> | one can pich up its usage , quite easy .. |
| 19:37:48 | <polyphem> | monochrom: hmm |
| 19:37:59 | <monochrom> | I say that https://hackage.haskell.org/package/manatee is the only thing that comes close to being a solution. |
| 19:38:04 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 19:38:31 | <monochrom> | One single environment that has an editor, a browser, and an IRC client so you can talk to #haskell. |
| 19:38:54 | <xerox> | cute! |
| 19:39:32 | × | cynomys quits (~cynomys@user/cynomys) (Quit: leaving) |
| 19:39:47 | → | cynomys joins (~cynomys@user/cynomys) |
| 19:39:53 | <monochrom> | It has probably bitrotted. The author landed a real-world job. |
| 19:40:30 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 19:40:36 | <xerox> | 🪦 |
| 19:41:06 | → | Hildegunst joins (~luc@80.248.12.109.rev.sfr.net) |
| 19:41:07 | <maerwald> | monochrom: that's usually the worst that can happen to hackers, yes |
| 19:41:47 | <monochrom> | But anyone today who want to solve the too-much-switching problem should be doing something similar to manatee, not shoehorning more things into 1960s terminals. |
| 19:41:54 | <monochrom> | Think outside the terminal. |
| 19:42:00 | <maerwald> | but honestly... it's kinda pointless when using a good tiling wm |
| 19:42:05 | <sm> | vs code + hoogle extension + terminal pane running emacs, erc or whatever can also work well, even if not maximally integrated |
| 19:43:04 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 19:43:35 | <sm> | (the gtoolkit thing I posted on reddit goes further away from terminals) |
| 19:44:25 | <sm> | maybe manatee should be revived ? |
| 19:44:55 | <polyphem> | whats also nice is GOYO for vim : https://github.com/junegunn/goyo.vim |
| 19:45:41 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:46:58 | × | romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 268 seconds) |
| 19:48:38 | → | cyphase joins (~cyphase@user/cyphase) |
| 19:50:36 | × | imalsogreg quits (~imalsogre@c-73-172-114-3.hsd1.md.comcast.net) (Remote host closed the connection) |
| 19:51:34 | <polyphem> | i have no mouse only touchpad, i like not switching mouse/keyboard |
| 19:52:04 | → | imalsogreg joins (~imalsogre@2601:147:300:f930:40c5:3263:848f:5ae1) |
| 19:53:19 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 19:54:10 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 19:54:10 | <maerwald> | sm: too much work for something that a window manager does better |
| 19:54:29 | <geekosaur> | yes, it's bitrotted. I tried to build it a year ago |
| 19:54:44 | <geekosaur> | looked really neat, but sadly… |
| 19:55:08 | <maerwald> | polyphem: and mouse use is really unhealthy |
| 19:55:48 | <sm> | I'm talking about a highly integrated environment, not just managing windows |
| 19:56:15 | <maerwald> | well, that's the same problem |
| 19:56:21 | <sm> | the haskell version of smalltalk or a lisp machine or emacs |
| 19:56:32 | <maerwald> | emacs is a window manager |
| 19:56:51 | <geekosaur> | pretty lousy one imo |
| 19:56:54 | <polyphem> | https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar |
| 19:57:16 | → | alx741 joins (~alx741@157.100.93.160) |
| 20:02:35 | <sm> | I find it a pretty useful one! in the specific situation of remote shells. Combined with workgroups2 for saving layouts and dtach/mosh for |
| 20:02:35 | <sm> | connecting |
| 20:04:27 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 20:05:20 | × | juhp quits (~juhp@128.106.188.82) (Ping timeout: 250 seconds) |
| 20:06:46 | → | juhp joins (~juhp@128.106.188.82) |
| 20:11:53 | → | o-90 joins (~o-90@gateway/tor-sasl/o-90) |
| 20:12:18 | → | romesrf joins (~romes@44.190.189.46.rev.vodafone.pt) |
| 20:13:24 | <maerwald> | hmm... I think I need a GHC 7.2.2 for manatee |
| 20:14:06 | <monochrom> | Yeah it's pretty old. cabal-v2 didn't exist. |
| 20:14:14 | <monochrom> | (for example) |
| 20:14:32 | <monochrom> | and gtk2hs was all the rage, as another example. |
| 20:18:10 | <EvanR> | what's the current state of the art for gtk in haskell? |
| 20:18:27 | <geekosaur> | gi? |
| 20:18:55 | × | finsternis quits (~X@23.226.237.192) (Quit: Changing server) |
| 20:19:00 | <geekosaur> | https://hackage.haskell.org/package/gi-gtk |
| 20:19:19 | → | finsternis joins (~X@23.226.237.192) |
| 20:19:35 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 20:19:45 | → | jgeerds joins (~jgeerds@55d4a547.access.ecotel.net) |
| 20:20:14 | <EvanR> | gnarly |
| 20:21:58 | <maerwald> | I like gtk2hs better |
| 20:22:07 | <maerwald> | there are some API differences |
| 20:22:45 | → | alx741 joins (~alx741@157.100.93.160) |
| 20:24:00 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 20:24:30 | → | zincy joins (~zincy@2a00:23c8:970c:4801:f0bc:c4cb:1665:1c67) |
| 20:24:35 | × | Hildegunst quits (~luc@80.248.12.109.rev.sfr.net) (Ping timeout: 268 seconds) |
| 20:25:45 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 20:26:10 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 20:26:38 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) (Remote host closed the connection) |
| 20:26:56 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 20:26:57 | → | Hildegunst joins (~luc@80.248.12.109.rev.sfr.net) |
| 20:27:35 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 20:27:35 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 20:27:35 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:27:46 | <monochrom> | Haha nice https://github.com/haskell-gi/haskell-gi/wiki/Using-threads-in-Gdk-and-Gtk--programs references my threading-and-FFI article |
| 20:28:26 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) |
| 20:29:21 | <EvanR> | "gdk and by extension gtk+ are not thread safe" good to know |
| 20:30:12 | <monochrom> | The GUI community has basically given up on concurrency. |
| 20:31:02 | <monochrom> | They began with caring a lot yes. So they added a lot of locking and mutexes. Then they found that it was too slow. |
| 20:31:07 | <EvanR> | isn't GUI a thing that necessarily must be concurrent |
| 20:31:11 | × | imalsogreg quits (~imalsogre@2601:147:300:f930:40c5:3263:848f:5ae1) (Remote host closed the connection) |
| 20:31:11 | <geekosaur> | that's only part of it |
| 20:31:46 | <geekosaur> | you can lock/mutex the data structures all you want, or go the xcb route and put it all on the programmer |
| 20:31:52 | → | imalsogreg joins (~imalsogre@2601:147:300:f930:40c5:3263:848f:5ae1) |
| 20:31:59 | <geekosaur> | the connectionb to the X server can't be shared between threads |
| 20:32:25 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 20:32:33 | <geekosaur> | it's a unix socket. if two threads read from the socket for X server events, who wins? |
| 20:32:56 | <tomsmeding> | if two threads _write_ to the socket, what happens? |
| 20:33:01 | <geekosaur> | that too |
| 20:33:40 | <geekosaur> | in any case the point is you still lose when it comes to concurrency, so there's really no point in trying |
| 20:33:57 | <monochrom> | Concurrency was "solved" in the 1970s unix by select-loops. So that's what GUIs do today. |
| 20:34:06 | <EvanR> | I'm mildly flabbergasted |
| 20:34:47 | <EvanR> | access to some socket needs to be synchronized, so the entire field of research must be single threaded |
| 20:35:04 | × | Hildegunst quits (~luc@80.248.12.109.rev.sfr.net) (Ping timeout: 268 seconds) |
| 20:35:31 | <tomsmeding> | I guess it also just... works like this |
| 20:35:43 | <tomsmeding> | no one had a pressing enough need for concurrent UI access |
| 20:35:57 | <myShoggoth> | I'm very excited to announce that the Haskell Foundation has a DevOps position available, supporting GHC and core open source Haskell projects! |
| 20:35:57 | <myShoggoth> | Please take a look at https://haskell.foundation/careers/devops.html and spread it around. This position is central in the Haskell ecosystem and is an opportunity to make a huge impact. |
| 20:36:07 | <geekosaur> | EvanR, at some point you get a server response that mustr be directed to a particular thread |
| 20:36:13 | <geekosaur> | which is why I used the read example |
| 20:36:15 | <EvanR> | particular files that are open shouldn't be wildly accessed by various threads, but we still have multi-threaded programs that use files? |
| 20:36:20 | <geekosaur> | it doesn't happen by magic |
| 20:36:37 | → | yauhsien_ joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 20:37:22 | <monochrom> | Ugh unix presents a lot of non-file things with file-like interfaces, so yeah... |
| 20:37:51 | <EvanR> | it's just that gtk+ is a huge thing, and a unix socket is a small thing. So the small thing dictacts the entire nature of the huge thing, is what I'm hearing |
| 20:37:57 | → | vicfred joins (~vicfred@user/vicfred) |
| 20:38:21 | <monochrom> | The precise wording is stream interfaces but you get what I mean, it talks of reading and writing a handle. |
| 20:39:11 | <tomsmeding> | EvanR: I invite you to submit a proposal to change the interface of the X server :p |
| 20:39:21 | <EvanR> | I doubt that matters at this point |
| 20:39:24 | <maerwald> | O.o |
| 20:39:24 | <tomsmeding> | yeah |
| 20:39:41 | <tomsmeding> | maybe people began caring when it was too late |
| 20:39:51 | tomsmeding | wonders if wayland does this differently |
| 20:39:56 | tomsmeding | knows ~nothing about wayland |
| 20:40:36 | <maerwald> | wayland is great... unless you use nvidia... or use voice control desktop software... or want properly working window icons in your WM, or... |
| 20:40:56 | <tomsmeding> | yeah I tried sway, then it wouldn't start because I have nvidia, then I went back to i3 |
| 20:40:57 | × | yauhsien_ quits (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 20:41:13 | <monochrom> | A select-loop has its convenience. Namely, nothing to lock because until you call select next time, you have monopoly. |
| 20:41:16 | <tomsmeding> | (yes, also wouldn't start with the --fuck-you-start-please flag) |
| 20:41:30 | <monochrom> | Or rather, no need to think what needs to be locked. |
| 20:41:51 | <tomsmeding> | monochrom: isn't that the whole deal with single-threaded concurrency? Not having to deal with two things running at the same time? |
| 20:41:51 | <monochrom> | (As usual, the hardest part of programming is to have to think.) |
| 20:41:59 | <monochrom> | Yeah! |
| 20:42:05 | <monochrom> | Royally convenient. |
| 20:42:14 | × | ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Remote host closed the connection) |
| 20:42:18 | <tomsmeding> | part of why nodejs is so nice to program in (if you don't dislike js as a language) |
| 20:42:32 | → | ProfSimm joins (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) |
| 20:42:50 | <monochrom> | For the price of very contorted logics, in those cases when multi-threading is easier to follow. |
| 20:43:55 | → | alx741 joins (~alx741@157.100.93.160) |
| 20:45:21 | <sm> | myShoggoth++ |
| 20:46:17 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 20:46:49 | → | cosimone joins (~user@93-34-132-251.ip49.fastwebnet.it) |
| 20:47:09 | × | ProfSimm quits (~ProfSimm@176-12-60-137.pon.spectrumnet.bg) (Ping timeout: 256 seconds) |
| 20:49:15 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 20:55:01 | <geekosaur> | sigh. I wish… |
| 20:55:14 | <geekosaur> | a decade ago I would have jumped at that |
| 20:56:16 | <EvanR> | similarly in lambdamoo only 1 object runs at a given time, blocking the server from doing anything else. A timer kills the instance if it takes too long, leaving whatever effects half finished xD. Concurrency! |
| 20:57:55 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 20:57:55 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 20:57:55 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:59:41 | × | _ht quits (~quassel@2a02:a468:b619:1:b7fa:be1e:6eb0:5ee1) (Remote host closed the connection) |
| 21:00:06 | <janus> | geekosaur: what would you have jumped onto? the devops role? |
| 21:00:46 | → | polyphem_ joins (~rod@2a02:810d:840:8754:9996:52da:e8ad:1d27) |
| 21:00:48 | × | polyphem quits (~rod@2a02:810d:840:8754:a778:fc55:137:3e0) (Ping timeout: 250 seconds) |
| 21:01:00 | polyphem_ | is now known as polyphem |
| 21:01:53 | <geekosaur> | yeh |
| 21:01:53 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
| 21:03:44 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 21:04:18 | <geekosaur> | sadly I can no longer guarantee availability, becuase while I'm in treatment it's not doing enough :( |
| 21:04:34 | <geekosaur> | \(also I "love" the timing of my router falling over) |
| 21:04:37 | → | alx741 joins (~alx741@157.100.93.160) |
| 21:04:43 | × | o-90 quits (~o-90@gateway/tor-sasl/o-90) (Quit: Leaving) |
| 21:06:34 | <polyphem> | geekosaur: did your router fall over or did you type at the shell prompt :(){:|:&};: |
| 21:06:37 | <janus> | i hope the treatment will work better soon! |
| 21:07:00 | <janus> | > :(){:|:&};: |
| 21:07:01 | <lambdabot> | <hint>:1:1: error: parse error on input ‘:’ |
| 21:07:16 | <monochrom> | I think it was +++ATH >:) |
| 21:07:23 | <monochrom> | err, s/think/thought/ ! |
| 21:08:59 | × | SwarmCollective quits (~joseph@2603-6011-bc02-b600-40df-b781-ef29-193a.res6.spectrum.com) (Remote host closed the connection) |
| 21:09:22 | → | SwarmCollective joins (~joseph@2603-6011-bc02-b600-3c68-95a2-3c50-c518.res6.spectrum.com) |
| 21:10:21 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 21:10:30 | → | ensyde joins (~ensyde@2600:1700:2050:1040:505d:6d63:cb2e:fb52) |
| 21:11:36 | <polyphem> | monochrom: thats modem AT Command AT HangUp iirc |
| 21:11:46 | <monochrom> | Yeah! |
| 21:12:13 | <monochrom> | So, "did your router fall over, or did you accidentally tell it to hang up" :) |
| 21:12:42 | × | zincy quits (~zincy@2a00:23c8:970c:4801:f0bc:c4cb:1665:1c67) (Remote host closed the connection) |
| 21:12:42 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 21:12:43 | <polyphem> | i did the fork bomb :) |
| 21:13:09 | <monochrom> | Oh! |
| 21:16:37 | → | imalsogr_ joins (~imalsogre@2601:147:300:f930::b46b) |
| 21:18:45 | <polyphem> | i also rebootet my android phone with the fork bomb on termux right now , hehehe |
| 21:19:16 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) (Remote host closed the connection) |
| 21:19:36 | → | pavonia joins (~user@user/siracusa) |
| 21:20:18 | × | imalsogreg quits (~imalsogre@2601:147:300:f930:40c5:3263:848f:5ae1) (Ping timeout: 250 seconds) |
| 21:20:51 | <geekosaur> | no, my router failed to survive a couple of years in storage and occasionally locks up |
| 21:21:26 | <geekosaur> | someday I'll save up enough money to replace it (I do have one in reserve but it's 2.4 only so I'd have to be pretty desperate to use it) |
| 21:21:39 | <polyphem> | ATZ ATDT 0800-.... |
| 21:22:12 | → | coot joins (~coot@89-64-85-93.dynamic.chello.pl) |
| 21:22:53 | × | greenbourne277 quits (~greenbour@2001:4b98:dc2:45:216:3eff:fe8a:bbf0) (Ping timeout: 250 seconds) |
| 21:23:07 | → | haskellberryfinn joins (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 21:24:28 | <haskellberryfinn> | how to understand data definition where there is forall x . on the right hand side |
| 21:24:44 | <haskellberryfinn> | and x is not on the left hand side |
| 21:25:03 | <EvanR> | one way is via existential quantification, or another way which can be easier is GADT syntax |
| 21:25:10 | <haskellberryfinn> | data Fold a b = forall x . Fold a b |
| 21:25:23 | <haskellberryfinn> | data Fold a b = forall x . Fold (x->a) b |
| 21:25:23 | <EvanR> | e.g. data Fold :: * -> * -> * where |
| 21:25:42 | <davean> | geekosaur: Why don't you use the reliable router as a router and your unreliable one mearly as an AP for anything that isn't wired? |
| 21:25:53 | <EvanR> | Fold :: (x -> a) -> b -> Fold a b |
| 21:26:02 | × | mikoto-chan quits (~mikoto-ch@213.177.151.239) (Ping timeout: 240 seconds) |
| 21:26:33 | <EvanR> | that x doesn't appear in the type constructor is fine, you just can't rely on it later |
| 21:26:35 | <haskellberryfinn> | EvanR: so semantically it is meaningful |
| 21:27:00 | <EvanR> | the x becomes an unknown type |
| 21:27:03 | <geekosaur> | (1) out of outlets on the power strip (2) wouldn't really solve this problem since this computer is also on wifi (can't run a cable across the room) |
| 21:27:26 | <haskellberryfinn> | EvanR: and I have to use forall on all type variables that are not on the left hand side |
| 21:27:41 | <davean> | Oh I just usually shove a fiber under the baseboard. |
| 21:27:46 | <geekosaur> | at some point I'll probably become annoyed enough to switch to the 2.4 router/AP |
| 21:27:55 | <EvanR> | the type variables need to be introduced somewhere |
| 21:28:09 | <EvanR> | often there's an implicit forall on the very outside |
| 21:28:15 | <EvanR> | when you put your own, it takes priority |
| 21:28:16 | <geekosaur> | I'm in an apartment, don't get to do things like that |
| 21:28:21 | <geekosaur> | sadly |
| 21:28:26 | <haskellberryfinn> | EvanR: i see |
| 21:28:30 | <davean> | geekosaur: oh, I do it *because* I'm in an appartment |
| 21:28:48 | <davean> | I just take a fiber and a spatula and push it under the wall joint, pull it out when I leave |
| 21:29:17 | <ProfSimm> | Is implicit returns sometimes more inconvenient than explicit returns |
| 21:29:32 | <geekosaur> | at one point I had a long enough cable to run around the room but it wasn't long enough for this room. |
| 21:29:34 | <davean> | ProfSimm: what are you talking about? |
| 21:29:46 | <davean> | geekosaur: Oh, I just have a 100m long OM5 cable |
| 21:29:57 | <geekosaur> | don't I wish |
| 21:30:17 | <ProfSimm> | davros: I'm comparing FP to imperative languages with "return" statements |
| 21:31:15 | → | alx741 joins (~alx741@157.100.93.160) |
| 21:31:18 | <EvanR> | haskell doesn't have return statements implicit or explicit |
| 21:31:34 | <EvanR> | the thing called return is something else |
| 21:31:36 | × | ystael quits (~ystael@user/ystael) (Read error: Connection reset by peer) |
| 21:31:40 | <ProfSimm> | Well it has implicit return semantics doesn't |
| 21:31:41 | <ProfSimm> | it |
| 21:31:46 | <EvanR> | no |
| 21:31:47 | → | CHUD joins (~CHUD@host-80-41-89-108.as13285.net) |
| 21:31:49 | <davean> | This doesn't make conceptual sense |
| 21:32:02 | <ProfSimm> | :/ |
| 21:32:05 | <davean> | This shows a deep missunderstanding |
| 21:32:15 | <ProfSimm> | All right, please teach me |
| 21:32:34 | <davean> | ProfSimm: Ok, why do you think it would have that? |
| 21:32:36 | → | ystael joins (~ystael@user/ystael) |
| 21:32:54 | <hololeap> | where can I find the docs for cabal-3.2? |
| 21:33:14 | <hololeap> | oh, nvm |
| 21:33:23 | <EvanR> | ProfSimm, in haskell you like to think you are holding an expression that is being evaluated, lazily |
| 21:33:24 | <davean> | https://cabal.readthedocs.io/en/3.2/ |
| 21:33:40 | <EvanR> | ProfSimm, i.e. 2 + 2 becomes 4, rather than returning 4 |
| 21:33:54 | <EvanR> | fst (2,2) becomes 2 rather than returning 2 |
| 21:34:14 | <davean> | its a definition of a value |
| 21:34:33 | <davean> | Theres nothing about how its computed, etc |
| 21:34:48 | <EvanR> | on some level yes |
| 21:34:57 | <ProfSimm> | Well, becomes, returns... |
| 21:34:57 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 21:35:02 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 21:35:03 | <EvanR> | operationally holding a value that is being evaluated helps sometimes |
| 21:35:17 | <davean> | ProfSimm: No, no return. The value doesn't "go" anywhere |
| 21:35:19 | <EvanR> | the point is that returning from a function is not really related to this |
| 21:35:24 | <davean> | it may never even exit |
| 21:35:26 | <davean> | *exist |
| 21:35:27 | <EvanR> | we're not even talking about functions |
| 21:35:30 | <davean> | or exit for that matter |
| 21:35:32 | <polyphem> | ProfSimm: f p = fst p <=> f p is fst p |
| 21:35:35 | → | greenbourne277 joins (~greenbour@2001:4b98:dc2:45:216:3eff:fe8a:bbf0) |
| 21:35:57 | <davean> | You could use it to rewrite, you could ... whatever |
| 21:36:05 | <davean> | they're mathematical definitions |
| 21:36:05 | <geekosaur> | is this where I point them to graph reduction? |
| 21:36:10 | <EvanR> | implicit or explicit return from a subroutine implies some kind of call stack |
| 21:36:20 | <davean> | EvanR: it implies a subroutine |
| 21:36:35 | <EvanR> | yeah none of which is happening here |
| 21:36:58 | → | merijn joins (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) |
| 21:37:54 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:cceb:625b:cb9d:590d) |
| 21:37:54 | <davean> | ProfSimm: so |
| 21:38:03 | <davean> | ProfSimm: You're familiar with inlining for example? |
| 21:38:20 | → | lrngystdlted^ joins (~lrngystdl@50-207-160-170-static.hfc.comcastbusiness.net) |
| 21:38:20 | <davean> | Whats the return sematnics when we inline a function and reduce instead of actually running it>? |
| 21:38:30 | <davean> | what if we never evalaute it? |
| 21:39:40 | <davean> | ProfSimm: What are the return semantics of the algebraic law of associativity? |
| 21:39:49 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds) |
| 21:39:54 | → | thyriaen joins (~thyriaen@dynamic-078-055-124-059.78.55.pool.telefonica.de) |
| 21:40:04 | <davean> | The question doesn't make sense, does it? |
| 21:40:08 | <[exa]> | "implicit return" is the thing from Scheme and R? |
| 21:40:19 | <[exa]> | (and julia) |
| 21:40:22 | <EvanR> | ruby |
| 21:40:38 | <haskellberryfinn> | EvanR: why not add the left-handed variable also on the right-hand side? |
| 21:41:04 | <EvanR> | haskellberryfinn, you mean like data Hmm = forall a b . Hmm a b ? |
| 21:41:04 | <haskellberryfinn> | EvanR: since it's used by the data constructor anyway |
| 21:41:23 | <EvanR> | so if you have a value of type Hmm, you won't know what types are in it |
| 21:41:40 | <haskellberryfinn> | EvanR: I mean data F a b = forall x . F (x->b) a |
| 21:41:58 | <[exa]> | haskellberryfinn: you want the type to be "complete" and usable (be in kind *) without specifying the `x`, but still valid for many different choices of `x`. |
| 21:42:20 | <EvanR> | F a b = forall x a b . F (x -> b) a would be introducing the same variables twice |
| 21:42:37 | <EvanR> | F = forall x a b . F (x -> b) a would work but cripple F, kind of |
| 21:43:06 | <haskellberryfinn> | data FoldShell a b = forall x . FoldShell (x -> a -> IO x) x (x -> IO b) |
| 21:43:16 | <EvanR> | cool |
| 21:43:28 | → | analognoise joins (~analognoi@2600:8801:8c26:9e00:985c:5a64:faa:5347) |
| 21:43:28 | <EvanR> | everything is accounted for somewhere |
| 21:44:04 | <EvanR> | again, try writing that definition with GADT syntax to maybe see if it makes more sense |
| 21:44:08 | × | waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 250 seconds) |
| 21:44:15 | <haskellberryfinn> | Ok |
| 21:44:27 | <EvanR> | it doesn't involve a weird forall |
| 21:44:32 | <EvanR> | (necessarily) |
| 21:45:03 | → | analognoise1 joins (~analognoi@185.202.221.105) |
| 21:45:21 | <haskellberryfinn> | the forall doesn't bother me. What's weird for me is x doesn't appear on the right hand side |
| 21:45:41 | <EvanR> | it does appear on the right |
| 21:45:50 | <haskellberryfinn> | i mean on the left |
| 21:45:58 | <EvanR> | yes, that's the whole point |
| 21:46:11 | → | waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) |
| 21:46:26 | <EvanR> | two values of FoldShell A B could have used different x and then placed in the same list for example |
| 21:46:28 | <haskellberryfinn> | anyway [exa] comment makes some sense to me |
| 21:46:38 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 21:46:44 | <EvanR> | which is impossible if x were also in the type constructor |
| 21:46:56 | <haskellberryfinn> | i see |
| 21:47:05 | <haskellberryfinn> | that's quite flexible |
| 21:47:10 | <EvanR> | yeah |
| 21:47:17 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 21:47:32 | × | analognoise1 quits (~analognoi@185.202.221.105) (Client Quit) |
| 21:47:49 | → | analognoise1 joins (~analognoi@185.202.221.105) |
| 21:48:37 | × | analognoise quits (~analognoi@2600:8801:8c26:9e00:985c:5a64:faa:5347) (Ping timeout: 240 seconds) |
| 21:48:48 | → | Pickchea joins (~private@user/pickchea) |
| 21:50:07 | analognoise1 | is now known as analognoise |
| 21:50:57 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 21:52:52 | → | alx741 joins (~alx741@157.100.93.160) |
| 21:53:37 | → | JoseC[m] joins (~jmcardonm@2001:470:69fc:105::1:7539) |
| 21:55:17 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 21:56:28 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 21:57:03 | × | iteratee quits (~kyle@162.218.222.107) (Ping timeout: 256 seconds) |
| 21:57:04 | × | imalsogr_ quits (~imalsogre@2601:147:300:f930::b46b) (Remote host closed the connection) |
| 21:57:23 | → | iteratee joins (~kyle@162.218.222.107) |
| 21:57:36 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::b46b) |
| 21:59:28 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 21:59:28 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 21:59:28 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:01:54 | × | imalsogreg quits (~imalsogre@2601:147:300:f930::b46b) (Ping timeout: 250 seconds) |
| 22:02:23 | → | yassernasc joins (~yassernas@2804:29b8:505a:f33d:65bb:7e4c:2cd0:965) |
| 22:03:03 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:04:25 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 22:04:29 | × | iteratee quits (~kyle@162.218.222.107) (Ping timeout: 268 seconds) |
| 22:06:14 | × | merijn quits (~merijn@c-001-001-018.client.esciencecenter.eduvpn.nl) (Ping timeout: 250 seconds) |
| 22:06:35 | <ph88> | https://www.stackage.org/ down ? |
| 22:07:15 | <maerwald> | finally they shut down |
| 22:07:22 | <ph88> | haha |
| 22:07:39 | × | burnsidesLlama quits (~burnsides@dhcp168-037.wadham.ox.ac.uk) (Remote host closed the connection) |
| 22:07:41 | × | Pickchea quits (~private@user/pickchea) (Quit: Leaving) |
| 22:08:01 | <EvanR> | the page loads for me |
| 22:08:24 | <ph88> | ok thanks, maybe slow load on my side |
| 22:08:30 | → | son0p joins (~ff@2800:484:1d81:b700::5) |
| 22:10:35 | → | iteratee joins (~kyle@162.218.222.107) |
| 22:11:30 | × | coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot) |
| 22:14:29 | → | alx741 joins (~alx741@157.100.93.160) |
| 22:15:18 | → | imalsogreg joins (~imalsogre@2601:147:300:f930::b46b) |
| 22:19:57 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 22:24:39 | × | wombat875 quits (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) (Quit: WeeChat 2.2-dev) |
| 22:27:36 | → | burnsidesLlama joins (~burnsides@dhcp168-037.wadham.ox.ac.uk) |
| 22:29:29 | <Henson> | is there a pipes library to be able to do processing in parallel? Not concurrently with threads, but in parallel using functions in the "parallel" library. |
| 22:30:12 | × | michalz quits (~michalz@185.246.204.58) (Remote host closed the connection) |
| 22:32:22 | × | max22- quits (~maxime@2a01cb0883359800fbaebbbb888c1e29.ipv6.abo.wanadoo.fr) (Quit: Leaving) |
| 22:36:30 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Quit: Lost terminal) |
| 22:36:33 | → | alx741 joins (~alx741@157.100.93.160) |
| 22:38:00 | → | vysn joins (~vysn@user/vysn) |
| 22:38:23 | × | SwarmCollective quits (~joseph@2603-6011-bc02-b600-3c68-95a2-3c50-c518.res6.spectrum.com) (Remote host closed the connection) |
| 22:38:46 | → | SwarmCollective joins (~joseph@2603-6011-bc02-b600-b296-221b-2190-d11e.res6.spectrum.com) |
| 22:40:06 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 22:40:37 | × | lispy quits (~lispy4@84.69.59.93) (Quit: Leaving) |
| 22:41:13 | <ph88> | how can i have allow more of the same option in optparse-applicative ? like myprogram --input file1.txt --input file2.txt |
| 22:41:32 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 22:41:59 | <maerwald> | `many` |
| 22:42:44 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 22:45:42 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:45:57 | × | kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 240 seconds) |
| 22:46:02 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds) |
| 22:47:09 | → | wroathe joins (~wroathe@user/wroathe) |
| 22:48:53 | × | romesrf quits (~romes@44.190.189.46.rev.vodafone.pt) (Ping timeout: 268 seconds) |
| 22:49:14 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 22:51:32 | × | iteratee quits (~kyle@162.218.222.107) (Ping timeout: 240 seconds) |
| 22:52:15 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:52:29 | <ph88> | thanks |
| 22:52:57 | <maerwald> | there's also `some` (0 or more) |
| 22:53:04 | <maerwald> | eh, one or more |
| 22:58:10 | → | alx741 joins (~alx741@157.100.93.160) |
| 23:02:15 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 23:03:18 | × | hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
| 23:05:36 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 23:05:49 | → | califax joins (~califax@user/califx) |
| 23:07:17 | × | haskellberryfinn quits (~nut@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 23:09:14 | × | neceve quits (~quassel@2.26.93.228) (Ping timeout: 268 seconds) |
| 23:12:37 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds) |
| 23:14:14 | → | hololeap joins (~hololeap@user/hololeap) |
| 23:17:15 | × | alp quits (~alp@user/alp) (Ping timeout: 268 seconds) |
| 23:18:52 | → | wombat875 joins (~wombat875@pool-72-89-24-154.nycmny.fios.verizon.net) |
| 23:19:05 | <Axman6> | I've wondered for a while if there's a way to change foldl (the library) so that the step function can be replaced - there are many folds which are implemented by passing around some state which at some point becomes redundant, for example drop (drop :: Natural -> Fold a b -> Fold a b) continues to pass around a Natural after finishing counting down - it would be nice if it could just swap its step function and state to the one it's wrapping |
| 23:19:39 | <Axman6> | maybe that would break a lot of the benefits of the composability of foldl |
| 23:20:32 | → | iteratee joins (~kyle@162.218.222.107) |
| 23:20:42 | → | alx741 joins (~alx741@157.100.93.160) |
| 23:21:34 | → | wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com) |
| 23:21:34 | × | wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
| 23:21:34 | → | wroathe joins (~wroathe@user/wroathe) |
| 23:24:02 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 23:24:07 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
| 23:24:24 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 23:26:00 | <Axman6> | The way I'd been thinking about it was more in terms of stream fucion's Step type data Step s a = Yield a s | Skip s | Done. The change I was thinking of would be something like: data Step a s b = Yield b s | Skip s | Done | Update (Fold a b) |
| 23:26:04 | <Axman6> | I should play with this... |
| 23:26:30 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 23:26:46 | geekosaur | wonders how long before you've reinvented conduit or pipes |
| 23:28:30 | → | lispy joins (~lispy4@84.69.59.93) |
| 23:30:22 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:30:26 | <Axman6> | well, there's a FoldM too, so I guess that's not too far off |
| 23:31:07 | × | polezaivsani quits (~polezaivs@orangeshoelaces.net) (Ping timeout: 256 seconds) |
| 23:33:10 | × | ix quits (~ix@2a02:8010:674f:0:cda6:d05:f0d7:4922) (Quit: WeeChat 3.4) |
| 23:33:36 | × | chomwitt quits (~chomwitt@2a02:587:dc06:be00:12c3:7bff:fe6d:d374) (Remote host closed the connection) |
| 23:33:38 | → | ix joins (~ix@2a02:8010:674f:0:cda6:d05:f0d7:4922) |
| 23:34:31 | × | cosimone quits (~user@93-34-132-251.ip49.fastwebnet.it) (Ping timeout: 256 seconds) |
| 23:36:16 | <Axman6> | I guess you could fake it by using the state variable which contains the function to call, which can be updated |
| 23:36:22 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 250 seconds) |
| 23:40:05 | <EvanR> | if the state becomes useless and should be dropped, why is there an exposed s type variable |
| 23:41:15 | <EvanR> | this is reminding me of KSP / rocketry where you need stages to begin then you need to discard at some point |
| 23:41:25 | → | yauhsien_ joins (~yauhsien@61-231-17-3.dynamic-ip.hinet.net) |
| 23:42:19 | → | alx741 joins (~alx741@157.100.93.160) |
| 23:43:51 | <monochrom> | I thought Haskell was not rocket science >:) |
| 23:44:37 | <monochrom> | There is an exposed type variable, but you still can't change it in the middle. |
| 23:44:54 | <EvanR> | I mean why is it there in the first place |
| 23:45:15 | <EvanR> | and not existential, or just not in the type |
| 23:45:40 | × | alx741 quits (~alx741@157.100.93.160) (Read error: Connection reset by peer) |
| 23:46:02 | × | soxen quits (~bob@pool-173-54-217-168.nwrknj.fios.verizon.net) (Ping timeout: 240 seconds) |
| 23:46:33 | <EvanR> | imagine an OOP type system where each class must declare the type of its internal state |
| 23:47:00 | <EvanR> | i.e. why is it anyone's business |
| 23:53:05 | <monochrom> | If the Fold type exposes s, then the programmer who uses Fold has the flexibility of controlling in which scope s is known, outside which scope s is unknown. I.e., where to put the existential quantifier. |
| 23:53:38 | <hpc> | s isn't really the state type |
| 23:53:46 | <hpc> | if you go all the way down, it ends up being a phantom type |
| 23:53:56 | <EvanR> | tricky |
| 23:54:00 | <hpc> | maybe it's better to say s is the scope of the statefulness |
| 23:55:00 | <hpc> | with RealWorld meaning global state |
| 23:55:04 | <monochrom> | In OOP, I thought I had to declare the types of fields in my class, too. Here: class Complex { private double realpart; private double imagpart; } |
| 23:55:56 | <hpc> | "state" and "scope" both start with s, and s is used in "State s a" too, so that's a bit unfortunate |
| 23:55:59 | <hpc> | but there you go |
| 23:56:05 | <EvanR> | but is a circle in the complex plane also an ellipse in the complex plane |
| 23:56:27 | <monochrom> | haha |
| 23:57:00 | <hpc> | it's actually just a rectangle in a hyperbolic complex geometry :D |
| 23:57:06 | <hpc> | there are no circles |
| 23:58:41 | <monochrom> | Oh yeah let me relate a story. |
| 23:59:08 | × | vgtw quits (~vgtw@c-2359205c.07-348-756d651.bbcust.telenor.se) (Changing host) |
| 23:59:08 | → | vgtw joins (~vgtw@user/vgtw) |
All times are in UTC on 2022-01-24.