Logs on 2024-07-30 (liberachat/#haskell)
| 00:01:52 | × | flounders quits (~flounders@24.246.176.178) (Quit: WeeChat 4.3.3) |
| 00:05:56 | → | hayk joins (~hayk@141.136.90.108) |
| 00:11:08 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 00:12:45 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 276 seconds) |
| 00:12:45 | Lord_of_Life_ | is now known as Lord_of_Life |
| 00:28:16 | × | _d0t quits (~{-d0t-}@user/-d0t-/x-7915216) (Ping timeout: 272 seconds) |
| 00:34:21 | → | _d0t joins (~{-d0t-}@user/-d0t-/x-7915216) |
| 00:36:41 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:36:49 | → | zmt00 joins (~zmt00@user/zmt00) |
| 00:38:59 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 244 seconds) |
| 00:52:25 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 00:53:52 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 252 seconds) |
| 01:00:35 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 01:01:06 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 01:15:33 | × | tabaqui quits (~root@87.200.123.114) (Ping timeout: 248 seconds) |
| 01:29:00 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 01:40:44 | → | hsw joins (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) |
| 01:45:18 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 01:51:27 | × | ystael quits (~ystael@user/ystael) (Ping timeout: 265 seconds) |
| 02:00:10 | × | CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer) |
| 02:01:34 | × | xff0x quits (~xff0x@2405:6580:b080:900:333f:570b:ae7a:3a3d) (Ping timeout: 260 seconds) |
| 02:02:42 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 02:04:07 | → | Inst_ joins (~Inst@user/Inst) |
| 02:05:48 | × | Inst quits (~Inst@user/Inst) (Ping timeout: 245 seconds) |
| 02:08:08 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 02:08:30 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 02:09:46 | × | td_ quits (~td@i5387090C.versanet.de) (Ping timeout: 252 seconds) |
| 02:10:00 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 02:10:13 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 02:11:31 | → | td_ joins (~td@i53870934.versanet.de) |
| 02:17:15 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 02:21:17 | × | abrar quits (~abrar@pool-72-78-199-167.phlapa.fios.verizon.net) (Quit: WeeChat 4.2.2) |
| 02:21:34 | → | abrar joins (~abrar@pool-72-78-199-167.phlapa.fios.verizon.net) |
| 02:40:16 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 265 seconds) |
| 02:42:20 | × | dostoyevsky2 quits (~sck@user/dostoyevsky2) (Quit: leaving) |
| 02:43:02 | → | dostoyevsky2 joins (~sck@user/dostoyevsky2) |
| 02:48:56 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 02:50:31 | Inst_ | is now known as Inst |
| 03:00:15 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 03:10:10 | × | zero quits (~z@user/zero) (Read error: Connection reset by peer) |
| 03:10:32 | → | zero joins (~z@user/zero) |
| 03:13:49 | → | aforemny_ joins (~aforemny@2001:9e8:6cfe:4d00:6761:b6ac:73fc:a888) |
| 03:14:30 | × | aforemny quits (~aforemny@2001:9e8:6cdc:9000:226:e6cc:3b9e:4c5f) (Ping timeout: 244 seconds) |
| 03:21:34 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 03:31:33 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 03:39:45 | → | rosco joins (~rosco@14.191.95.214) |
| 03:45:02 | × | rosco quits (~rosco@14.191.95.214) (Quit: Lost terminal) |
| 03:54:44 | × | tt123109783 quits (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) (Ping timeout: 260 seconds) |
| 04:09:07 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 04:09:31 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 04:22:56 | → | alexherbo2 joins (~alexherbo@2a01cb00864cea007098f908f925d108.ipv6.abo.wanadoo.fr) |
| 04:27:29 | × | alexherbo2 quits (~alexherbo@2a01cb00864cea007098f908f925d108.ipv6.abo.wanadoo.fr) (Ping timeout: 256 seconds) |
| 04:33:41 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 04:34:45 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:40:57 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 04:40:58 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 04:41:11 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 04:41:43 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 04:49:19 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 265 seconds) |
| 04:49:34 | → | tomku joins (~tomku@user/tomku) |
| 04:51:51 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:05:25 | → | misterfish joins (~misterfis@84.53.85.146) |
| 05:13:26 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 05:16:05 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 248 seconds) |
| 05:17:40 | → | jerg_ joins (~jerg@2001:a61:2510:4100::bb0) |
| 05:17:53 | × | jerg quits (~jerg@2001:a61:2510:4100::bb0) (Read error: Connection reset by peer) |
| 05:20:06 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 05:26:16 | × | hayk quits (~hayk@141.136.90.108) (Quit: hayk) |
| 05:30:03 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 05:39:33 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
| 05:40:09 | → | euleritian joins (~euleritia@dynamic-176-006-131-148.176.6.pool.telefonica.de) |
| 05:46:51 | → | tt123109783 joins (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) |
| 05:50:35 | → | hayk joins (~hayk@141.136.90.108) |
| 05:50:59 | × | euleritian quits (~euleritia@dynamic-176-006-131-148.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 05:54:56 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 05:55:17 | × | jerg_ quits (~jerg@2001:a61:2510:4100::bb0) (Remote host closed the connection) |
| 05:55:31 | → | jerg_ joins (~jerg@2001:a61:2510:4100::bb0) |
| 05:56:29 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
| 05:59:24 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 06:00:04 | → | CiaoSen joins (~Jura@2a05:5800:2de:5f00:e6b9:7aff:fe80:3d03) |
| 06:00:06 | → | euleritian joins (~euleritia@dynamic-176-006-131-148.176.6.pool.telefonica.de) |
| 06:00:50 | × | euleritian quits (~euleritia@dynamic-176-006-131-148.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 06:01:06 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 06:02:41 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 06:05:29 | → | madhavanmiui joins (~madhavanm@2409:40f4:1035:6eff:8000::) |
| 06:05:50 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds) |
| 06:06:44 | → | euleritian joins (~euleritia@dynamic-176-006-131-148.176.6.pool.telefonica.de) |
| 06:08:16 | × | madhavanmiui quits (~madhavanm@2409:40f4:1035:6eff:8000::) (Client Quit) |
| 06:14:56 | → | oo_miguel joins (~Thunderbi@78.10.207.46) |
| 06:15:06 | → | jerg__ joins (~jerg@2001:a61:2510:4100::bb0) |
| 06:15:36 | × | jerg_ quits (~jerg@2001:a61:2510:4100::bb0) (Read error: Connection reset by peer) |
| 06:20:28 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 06:21:56 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 06:22:53 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 245 seconds) |
| 06:29:40 | × | Inst quits (~Inst@user/Inst) (Remote host closed the connection) |
| 06:30:08 | → | Inst joins (~Inst@user/Inst) |
| 06:35:22 | → | meritamen joins (~user@user/meritamen) |
| 06:42:27 | → | acidjnk joins (~acidjnk@p200300d6e72cfb663100542eb9ff72dc.dip0.t-ipconnect.de) |
| 06:45:51 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 06:50:25 | × | hgolden quits (~hgolden@2603:8000:9d00:3ed1:1ee4:1b7c:94a7:8fa7) (Remote host closed the connection) |
| 06:50:48 | × | jerg__ quits (~jerg@2001:a61:2510:4100::bb0) (Ping timeout: 272 seconds) |
| 06:51:16 | × | hayk quits (~hayk@141.136.90.108) (Quit: hayk) |
| 06:52:23 | → | hgolden joins (~hgolden@2603:8000:9d00:3ed1:1ee4:1b7c:94a7:8fa7) |
| 06:52:55 | → | jerg joins (~jerg@2001:a61:254e:d000::bb0) |
| 06:57:10 | × | jerg quits (~jerg@2001:a61:254e:d000::bb0) (Read error: Connection reset by peer) |
| 06:57:41 | → | jerg joins (~jerg@2001:a61:254e:d000::bb0) |
| 07:03:29 | × | euleritian quits (~euleritia@dynamic-176-006-131-148.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 07:03:47 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 07:04:38 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 07:10:42 | × | cyphase quits (~cyphase@user/cyphase) (Ping timeout: 276 seconds) |
| 07:23:26 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 07:25:05 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 07:31:20 | → | michalz joins (~michalz@185.246.207.217) |
| 07:32:01 | <Unicorn_Princess> | suppose i have some simple tree type, something like data Tree a = Empty | Node a (Tree a) (Tree a). and i want to filter it with pred :: a -> Bool |
| 07:32:41 | <Unicorn_Princess> | but the catch is, i want to keep nodes if any node in its subtree satisfies the predicate |
| 07:33:36 | <Unicorn_Princess> | now i can just run the predicate on the whole subtree at each node but that's O(n^2) |
| 07:33:52 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 07:34:11 | <Unicorn_Princess> | or i can build a new tree, with (Bool, a) elements, that contain the result of the predicate |
| 07:34:35 | <Unicorn_Princess> | and propagate True values up the tree in O(n) time |
| 07:35:07 | <Unicorn_Princess> | and in another step do the filtering and turning it back from Tree (Bool, a) to Tree a |
| 07:35:29 | <Unicorn_Princess> | is there some elegant, wizardly third way that I'm missing? |
| 07:35:47 | <Unicorn_Princess> | that also avoids being O(n^2) |
| 07:36:12 | × | tt123109783 quits (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) (Ping timeout: 252 seconds) |
| 07:37:55 | → | cyphase joins (~cyphase@user/cyphase) |
| 07:42:02 | → | gmg joins (~user@user/gehmehgeh) |
| 07:44:43 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 07:51:25 | <probie> | Something like `paths p Empty = Empty; paths p (Node x l r) = case (paths p l, paths p r) of { (Empty, Empty) -> if p x then (Node x Empty Empty) else Empty; (l', r') -> Node x l' r' }`? |
| 07:54:00 | × | jerg quits (~jerg@2001:a61:254e:d000::bb0) (Read error: Connection reset by peer) |
| 07:54:46 | → | jerg joins (~jerg@2001:a61:254e:d000::bb0) |
| 07:54:54 | <probie> | % data Tree a = Empty | Node a (Tree a) (Tree a) deriving Show |
| 07:54:54 | <yahb2> | <no output> |
| 07:55:07 | <probie> | % paths p Empty = Empty; paths p (Node x l r) = case (paths p l, paths p r) of { (Empty, Empty) -> if p x then (Node x Empty Empty) else Empty; (l', r') -> Node x l' r' } |
| 07:55:07 | <yahb2> | <no output> |
| 07:55:17 | <Unicorn_Princess> | oooh, i like it, thanks! |
| 07:55:21 | <probie> | % paths (> 5) (Node 2 (Node 7 Empty Empty) (Node 4 Empty Empty)) |
| 07:55:21 | <yahb2> | Node 2 (Node 7 Empty Empty) Empty |
| 07:55:40 | <probie> | (assuming that's the sort of behaviour you want) |
| 07:56:25 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 08:00:44 | × | Square3 quits (~Square4@user/square) (Ping timeout: 255 seconds) |
| 08:05:17 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 08:07:38 | → | misterfish joins (~misterfis@094190207253.static.ipv4.heldenvannu.net) |
| 08:08:29 | → | alexherbo2 joins (~alexherbo@2a01cb00864cea007098f908f925d108.ipv6.abo.wanadoo.fr) |
| 08:10:29 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 248 seconds) |
| 08:12:28 | × | ft quits (~ft@p3e9bc4e7.dip0.t-ipconnect.de) (Quit: leaving) |
| 08:13:01 | × | alexherbo2 quits (~alexherbo@2a01cb00864cea007098f908f925d108.ipv6.abo.wanadoo.fr) (Ping timeout: 256 seconds) |
| 08:17:05 | → | jinsun joins (~jinsun@user/jinsun) |
| 08:17:39 | × | bliminse quits (~bliminse@user/bliminse) (Quit: leaving) |
| 08:22:40 | → | tabaqui joins (~root@87.200.123.114) |
| 08:23:18 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: on the move) |
| 08:28:54 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Ping timeout: 252 seconds) |
| 08:32:13 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 08:32:56 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:34:05 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 08:38:18 | → | paul_j joins (~user@8.190.187.81.in-addr.arpa) |
| 08:41:21 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 252 seconds) |
| 08:42:04 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 08:45:04 | × | tabaqui quits (~root@87.200.123.114) (Ping timeout: 260 seconds) |
| 08:45:52 | → | bliminse joins (~bliminse@user/bliminse) |
| 08:46:17 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:47:58 | → | jinsun joins (~jinsun@user/jinsun) |
| 08:50:57 | → | tt123109783 joins (~tt1231@2603:6010:8700:4a81:219f:50d3:618a:a6ee) |
| 08:56:02 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 09:02:18 | → | cpressey joins (~weechat@176.254.71.203) |
| 09:07:20 | → | __monty__ joins (~toonn@user/toonn) |
| 09:13:14 | → | chele joins (~chele@user/chele) |
| 09:19:44 | ← | meritamen parts (~user@user/meritamen) (ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.4)) |
| 09:26:36 | × | jerg quits (~jerg@2001:a61:254e:d000::bb0) (Ping timeout: 272 seconds) |
| 09:27:10 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 09:33:26 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Ping timeout: 252 seconds) |
| 09:34:47 | → | alexherbo2 joins (~alexherbo@2a02-8440-a10b-728f-d892-05f0-5485-abe4.rev.sfr.net) |
| 09:36:46 | → | cheater joins (~Username@user/cheater) |
| 09:38:33 | × | misterfish quits (~misterfis@094190207253.static.ipv4.heldenvannu.net) (Ping timeout: 252 seconds) |
| 09:43:52 | × | alexherbo2 quits (~alexherbo@2a02-8440-a10b-728f-d892-05f0-5485-abe4.rev.sfr.net) (Remote host closed the connection) |
| 09:52:30 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 252 seconds) |
| 09:59:09 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 260 seconds) |
| 10:08:09 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 276 seconds) |
| 10:11:44 | → | cfricke joins (~cfricke@user/cfricke) |
| 10:13:54 | × | CiaoSen quits (~Jura@2a05:5800:2de:5f00:e6b9:7aff:fe80:3d03) (Ping timeout: 260 seconds) |
| 10:15:54 | → | ZharMeny joins (~user@185.248.130.75) |
| 10:16:59 | × | ZharMeny quits (~user@185.248.130.75) (Changing host) |
| 10:16:59 | → | ZharMeny joins (~user@user/ZharMeny) |
| 10:19:34 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 10:20:46 | → | euleritian joins (~euleritia@dynamic-176-006-143-061.176.6.pool.telefonica.de) |
| 10:31:44 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 10:43:15 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 10:45:39 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 10:49:58 | × | euleritian quits (~euleritia@dynamic-176-006-143-061.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 10:50:15 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 10:51:46 | × | opqdonut quits (opqdonut@pseudo.fixme.fi) (Ping timeout: 258 seconds) |
| 10:51:46 | × | barrucadu quits (~barrucadu@carcosa.barrucadu.co.uk) (Ping timeout: 258 seconds) |
| 10:51:46 | × | s4msung quits (IALEQ8po1z@user/s4msung) (Ping timeout: 258 seconds) |
| 10:51:55 | → | opqdonut joins (opqdonut@pseudo.fixme.fi) |
| 10:52:01 | → | barrucadu joins (~barrucadu@carcosa.barrucadu.co.uk) |
| 10:52:04 | → | s4msung joins (u4jHfpaUni@user/s4msung) |
| 10:58:50 | → | tabaqui joins (~root@87.200.123.114) |
| 11:03:03 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 11:03:36 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 11:15:42 | → | mhatta joins (~mhatta@www21123ui.sakura.ne.jp) |
| 11:16:07 | → | xff0x joins (~xff0x@2405:6580:b080:900:9e38:497d:6793:e966) |
| 11:17:53 | → | CiaoSen joins (~Jura@2a05:5800:2de:5f00:e6b9:7aff:fe80:3d03) |
| 11:26:37 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 265 seconds) |
| 11:26:54 | → | euleritian joins (~euleritia@dynamic-176-006-143-061.176.6.pool.telefonica.de) |
| 11:27:27 | × | tabaqui quits (~root@87.200.123.114) (Ping timeout: 276 seconds) |
| 11:29:44 | → | dans22260 joins (~danse-nr3@user/danse-nr3) |
| 11:32:03 | × | dans22260 quits (~danse-nr3@user/danse-nr3) (Client Quit) |
| 11:32:04 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Ping timeout: 260 seconds) |
| 11:35:42 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 11:56:54 | × | cpressey quits (~weechat@176.254.71.203) (Ping timeout: 252 seconds) |
| 12:03:58 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 12:06:12 | <bwe> | how can I write a list of [MyDataType] to file? show and then trying `BL.writeFile fileName bs` is a mess, since Data.ByteString.Lazy.UTF8.fromString conflicts with BL and there is no BL.fromString. |
| 12:06:58 | <bwe> | BL.pack . show $ myData -- throws Couldn't match type ‘Char’ with ‘GHC.Word.Word8’ |
| 12:11:33 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:12:35 | <bwe> | bytestring-show seems to be outdated |
| 12:14:21 | → | jerg joins (~jerg@2001:a61:2553:4500::bb0) |
| 12:18:05 | <jackdk> | bwe: do you have a particular serialisation format that you need to conform to? |
| 12:18:28 | <bwe> | jackdk: no, I just want to dump it to file and be able to read it again. |
| 12:19:18 | <danse-nr3> | python has 'pickle' for that, it's handy. When i want something similar, i usually just write a show output |
| 12:19:47 | <jackdk> | My advice: don't use Read and Show for this. Treat Show as a class for debugging, and generally avoid Read unless you're interfacing with a library that needs it. I would probably just read/write JSON using the `aeson` library |
| 12:20:52 | <jackdk> | I prefer to manually write the necessary instances, but you could get by with `deriving stock (Generic)` (import GHC.Generics) and `deriving anyclass (FromJSON, ToJSON)` (import Data.Aeson) and enabling the extensions it asks for (`DerivingStrategies`, `DeriveGeneric`, and `DeriveAnyClass`) |
| 12:22:03 | <jackdk> | You can then use Data.Aeson.encodeFile and Data.Aeson.eitherDecodeFileStrict |
| 12:23:46 | <bwe> | jackdk: well, which alternatives do I have? |
| 12:24:44 | <bwe> | I mean why is the BS, text, String landscape so messed up that I can't simply write data constructors to file and need to resort to encode decode to JSON? |
| 12:25:25 | × | ddellacosta quits (~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 248 seconds) |
| 12:26:10 | <jackdk> | My personal experience is that Text.Read functions don't give you very good error information, so if you change something and get it wrong, it's not much fun |
| 12:26:26 | × | euleritian quits (~euleritia@dynamic-176-006-143-061.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 12:26:43 | <bwe> | so there we are, it's a complete mess and it's frustrating the developer experience. |
| 12:26:55 | <yushyin> | serialise (cbor) would be an alternative |
| 12:26:56 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 12:27:15 | <jackdk> | You could use `System.IO.writeFile` with `show` and `readMaybe` with `System.IO.readFile`; most of your problem is that you're using ByteString functions with read/show which work on String |
| 12:28:59 | <jackdk> | the String type is a historical error and rarely what you want. Use Text if you're working with real text and ByteString if you're working with bytes. Most languages make this distinction. In real code, I try to use a real streaming library instead of worrying overmuch about the lazy variants. |
| 12:29:00 | × | Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 272 seconds) |
| 12:29:11 | → | cpressey joins (~weechat@176.254.71.203) |
| 12:30:27 | <jackdk> | To convert between Text and ByteString, use the functions in `Data.Text.Encoding` from package `text` |
| 12:30:42 | <bwe> | yushyin: looks promising, I might need to ditch `https://hackage.haskell.org/package/Decimal` for there is no instance for serialising it… |
| 12:32:22 | <jackdk> | The usual idiom for "a type in another library doesn't provide the instance I want" is to wrap it in a `newtype` and put the instance on that. That said, https://hackage.haskell.org/package/scientific is the package I see most often to represent numbers beyond Float and Double |
| 12:32:59 | <bwe> | jackdk: yeah, it was recommended to me as the go to lib nowadays |
| 12:34:24 | <bwe> | jackdk: but Decimal can handle 1/3 while Scientific complains. |
| 12:34:49 | <Axman6> | How does Decimal handle 1/3? |
| 12:35:08 | <bwe> | Axman6: https://hackage.haskell.org/package/Decimal-0.5.2/docs/Data-Decimal.html |
| 12:35:25 | → | hayk joins (~hayk@141.136.90.108) |
| 12:35:58 | <Axman6> | Sure, but what does it do with 1/3? |
| 12:36:03 | <jackdk> | You could also use `Rational` from `base`. I don't know what your needs are |
| 12:36:26 | <jackdk> | I do know that I need to get up early, so I'll leave the conversation in a moment |
| 12:36:34 | <Axman6> | If that's something you need, Rational would be a better option (and IIRC is what safe-money does, which would be my goto if I need to do money things like in the Decimal examples) |
| 12:36:37 | <bwe> | jackdk: sweet dreams. |
| 12:36:55 | <jackdk> | thanks mate, good luck |
| 12:37:09 | <bwe> | thanks! |
| 12:37:12 | <Axman6> | bwe: what are you representing? |
| 12:37:51 | <bwe> | Axman6: different mass in different units and single currency, dividing them at some point |
| 12:38:35 | <bwe> | final user repr should be in decimal, however; it's easier to compare decimals instead of fractions. |
| 12:39:32 | <bwe> | Axman6: ah, great safe-money-serialise provides instances for serialise |
| 12:39:33 | <Axman6> | https://hackage.haskell.org/package/dimensional is where I'd start for units of anything other than currency |
| 12:40:55 | <probie> | Axman6: Something like `333...[255 times] / 10^255` I think |
| 12:41:49 | <Axman6> | :( |
| 12:42:13 | <bwe> | Axman6: I am careful: how would I interface dimensional with safe-money? |
| 12:42:18 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 12:42:20 | <Axman6> | I've worked in finance, and our approach was to be explicit about rounding |
| 12:42:31 | <Axman6> | bwe: not sure =) |
| 12:42:55 | <bwe> | Axman6: so, your go-to for anything repr money is safe-money, right? |
| 12:43:08 | → | Midjak joins (~MarciZ@82.66.147.146) |
| 12:43:16 | <Axman6> | But you can turn dimensional values into numbers, and do maths on the numbers you can get out of safe-money |
| 12:43:37 | <Axman6> | bwe: it would be in Haskell, I don't think I've seen anything else that's as careful |
| 12:44:10 | <bwe> | Axman6: yes, at its very foundation I'd need to be able to make calculations with dimensional and safe-money numbers |
| 12:45:44 | <Axman6> | dimensional is very much about physical quantities, and safe-money is about currency. At some point if you need to combine them you'll need to just get numbers out and do multiplication or division on them |
| 12:47:01 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 12:47:01 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 12:47:29 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 12:47:41 | → | euleritian joins (~euleritia@dynamic-176-006-143-061.176.6.pool.telefonica.de) |
| 12:48:33 | <Axman6> | (Unless you can find a fun way to combine them and maintain appropriate invariants in the type system) |
| 12:49:39 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: nap) |
| 12:50:14 | × | CiaoSen quits (~Jura@2a05:5800:2de:5f00:e6b9:7aff:fe80:3d03) (Ping timeout: 260 seconds) |
| 12:53:34 | <bwe> | it = (1.05 :: Dense "EUR") + (0.6 :: Dense "EUR") |
| 12:53:37 | × | jerg quits (~jerg@2001:a61:2553:4500::bb0) (Ping timeout: 252 seconds) |
| 12:53:48 | <bwe> | (1.05 :: Dense "EUR") + (0.6 :: Dense "EUR") |
| 12:54:04 | <bwe> | The Dense type is deliberately not an instance of Fractional |
| 12:56:27 | <bwe> | …simple addition is not straightforward. |
| 13:04:12 | × | cpressey quits (~weechat@176.254.71.203) (Quit: WeeChat 4.3.0) |
| 13:07:34 | × | euleritian quits (~euleritia@dynamic-176-006-143-061.176.6.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 13:08:56 | × | tinjamin quits (~tinjamin@banshee.h4x0r.space) (Remote host closed the connection) |
| 13:09:23 | → | tinjamin joins (~tinjamin@banshee.h4x0r.space) |
| 13:09:36 | × | tinjamin quits (~tinjamin@banshee.h4x0r.space) (Remote host closed the connection) |
| 13:10:46 | → | tinjamin joins (~tinjamin@banshee.h4x0r.space) |
| 13:12:47 | → | euleritian joins (~euleritia@dynamic-176-006-128-212.176.6.pool.telefonica.de) |
| 13:24:08 | × | sm quits (~znc@plaintextaccounting/sm) (Ping timeout: 245 seconds) |
| 13:25:42 | → | alexherbo2 joins (~alexherbo@149.148.22.93.rev.sfr.net) |
| 13:31:14 | → | sm joins (~znc@plaintextaccounting/sm) |
| 13:32:54 | × | euleritian quits (~euleritia@dynamic-176-006-128-212.176.6.pool.telefonica.de) (Ping timeout: 276 seconds) |
| 13:36:01 | → | euleritian joins (~euleritia@dynamic-176-003-073-210.176.3.pool.telefonica.de) |
| 13:46:23 | × | euleritian quits (~euleritia@dynamic-176-003-073-210.176.3.pool.telefonica.de) (Ping timeout: 244 seconds) |
| 13:47:04 | → | euleritian joins (~euleritia@77.22.252.56) |
| 14:03:02 | → | ystael joins (~ystael@user/ystael) |
| 14:05:50 | × | hayk quits (~hayk@141.136.90.108) (Quit: hayk) |
| 14:09:24 | → | hayk joins (~hayk@141.136.90.108) |
| 14:10:37 | → | misterfish joins (~misterfis@84.53.85.146) |
| 14:13:15 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 14:18:10 | × | Inst quits (~Inst@user/Inst) (Remote host closed the connection) |
| 14:18:37 | → | Inst joins (~Inst@user/Inst) |
| 14:21:57 | × | hayk quits (~hayk@141.136.90.108) (Quit: hayk) |
| 14:22:47 | → | hayk joins (~hayk@141.136.90.108) |
| 14:24:23 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2) |
| 14:26:24 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 252 seconds) |
| 14:32:54 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
| 14:32:57 | → | sp1ff joins (~user@c-73-11-70-111.hsd1.wa.comcast.net) |
| 14:33:38 | × | drdo quits (~drdo@bl5-29-74.dsl.telepac.pt) (Remote host closed the connection) |
| 14:38:37 | → | drdo joins (~drdo@bl5-29-74.dsl.telepac.pt) |
| 14:43:20 | → | CiaoSen joins (~Jura@2a05:5800:2de:5f00:e6b9:7aff:fe80:3d03) |
| 14:47:54 | × | CiaoSen quits (~Jura@2a05:5800:2de:5f00:e6b9:7aff:fe80:3d03) (Ping timeout: 260 seconds) |
| 14:48:57 | → | marko joins (~marko@APN-122-12-44-gprs.simobil.net) |
| 14:51:30 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 14:52:04 | × | alexherbo2 quits (~alexherbo@149.148.22.93.rev.sfr.net) (Remote host closed the connection) |
| 14:52:24 | → | alexherbo2 joins (~alexherbo@2a02-8440-3102-e563-fcec-792a-2025-8096.rev.sfr.net) |
| 14:55:12 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 14:56:20 | <raehik> | why do the Handle ops e.g. `System.IO.hSeek :: Handle -> SeekMode -> Integer -> IO ()` take an Integer over an Int? |
| 14:56:48 | <raehik> | I rummaged thru the Handle implementation before and forgot why this was a thing |
| 14:57:43 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 14:57:54 | <c_wraith> | that API has been around since Int was usually 32 bit, and they wanted to be able to seek in files bigger than 2GB |
| 14:58:34 | <raehik> | of course I realized as I asked..... |
| 14:59:06 | <raehik> | thanks. previously was upgrading my Ints to Integers but probably I should just go with slow bigints all the way |
| 15:01:44 | → | visilii joins (~visilii@188.254.110.186) |
| 15:02:01 | <Unicorn_Princess> | i've got a sum type similar to data Variants = First Int | Second Int | Third String ..; and i find myself writing a lot of asFirst :: Variants -> Maybe Int, asThird :: Variants -> Maybe String; -type functions, that are pattern-matching if the right thing is inside. ..is there a better way? |
| 15:03:14 | <c_wraith> | possibly, but it's hard to suggest something without a use case in mind |
| 15:03:28 | <Rembane> | Unicorn_Princess: Lenses/optics can help you, but also what c_wraith said. |
| 15:05:51 | <Unicorn_Princess> | hm. well in this case it's just that i have a xs :: [Variants], and various functions that each apply only to one sort of variant and if they happen to get the wrong sort I want a Nothing back. |
| 15:06:03 | <Unicorn_Princess> | (basically)) |
| 15:06:27 | <Unicorn_Princess> | lenses you say, hm |
| 15:06:44 | <Unicorn_Princess> | probably too heavy for this, but i'll keep them in mind for next time, thanks :)) |
| 15:06:49 | <Unicorn_Princess> | :)* |
| 15:07:43 | <c_wraith> | traversals are perfect for working with elements of a list with a particular constructor |
| 15:07:44 | × | tessier quits (~treed@ec2-184-72-149-67.compute-1.amazonaws.com) (Ping timeout: 260 seconds) |
| 15:08:08 | → | tessier joins (~treed@ec2-184-72-149-67.compute-1.amazonaws.com) |
| 15:08:25 | <Unicorn_Princess> | from Control.Lens.Traversal? |
| 15:09:14 | <c_wraith> | yes, but really it's one of the core ideas of the library. It's a slight generalization of lenses that allows them to focus in multiple spots |
| 15:12:06 | × | paul_j quits (~user@8.190.187.81.in-addr.arpa) (Remote host closed the connection) |
| 15:17:15 | → | tabaqui joins (~root@87.200.123.114) |
| 15:21:54 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 248 seconds) |
| 15:24:17 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2) |
| 15:25:33 | × | marko quits (~marko@APN-122-12-44-gprs.simobil.net) (Quit: marko) |
| 15:37:25 | × | itaipu quits (~itaipu@168.121.98.206) (Ping timeout: 248 seconds) |
| 15:38:18 | × | nschoe quits (~nschoe@2a01:e0a:8e:a190:d87a:f2c2:7e95:50b1) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:38:36 | → | nschoe joins (~nschoe@2a01:e0a:8e:a190:e958:8b05:e0fc:affd) |
| 15:40:06 | → | dans70875 joins (~danse-nr3@user/danse-nr3) |
| 15:40:10 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Read error: Connection reset by peer) |
| 15:40:21 | → | Guest|65 joins (~Guest|65@edge-nat128-197-28-160.bu.edu) |
| 15:40:44 | <Guest|65> | i keep getting the same error message every time i try to download through powershell |
| 15:41:33 | <Guest|65> | fullyqualifiederrorid write error exception? |
| 15:43:02 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 15:44:11 | <stefan-__> | Unicorn_Princess: if you dont need to modify the data structure, you can get away with a "Fold", which is basically a read-only "Traversal", e.g. https://gist.github.com/dozed/4cd2085c162dda45b17659c7d327a3f2 |
| 15:44:49 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 15:45:35 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:50:25 | → | itaipu joins (~itaipu@168.121.98.135) |
| 15:51:11 | → | bsima joins (~bsima@2604:a880:400:d0::19f1:7001) |
| 15:53:59 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 260 seconds) |
| 15:56:35 | → | jinsun_ joins (~jinsun@user/jinsun) |
| 15:56:35 | × | jinsun quits (~jinsun@user/jinsun) (Killed (platinum.libera.chat (Nickname regained by services))) |
| 15:56:36 | jinsun_ | is now known as jinsun |
| 15:58:08 | <probie> | Unicorn_Princess: Why do you want a `Nothing` back? Is your function actually `[Variants] -> [Maybe SomeTypeHere]`? |
| 15:58:30 | × | Guest|65 quits (~Guest|65@edge-nat128-197-28-160.bu.edu) (Quit: Connection closed) |
| 15:59:11 | × | dans70875 quits (~danse-nr3@user/danse-nr3) (Remote host closed the connection) |
| 15:59:25 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 16:00:41 | → | jerg joins (~jerg@2001:a61:2553:4500::bb0) |
| 16:00:44 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 16:01:41 | <Unicorn_Princess> | probie, Nothing is basically the error case. I expect a certain Variant, and if it's the wrong one, i just ignore it |
| 16:02:37 | <Unicorn_Princess> | e.g. howMuchMeatInHamburger <$> [Burger, Salad, Burger, Burger] |
| 16:03:14 | <danse-nr3> | i mean Sum -> Maybe Val is not that terrible |
| 16:03:44 | <Unicorn_Princess> | anyway don't worry about it, what i have now works fine |
| 16:06:15 | × | alexherbo2 quits (~alexherbo@2a02-8440-3102-e563-fcec-792a-2025-8096.rev.sfr.net) (Remote host closed the connection) |
| 16:07:36 | → | alexherbo2 joins (~alexherbo@2a02-8440-3102-e563-f442-f273-7a20-f8e2.rev.sfr.net) |
| 16:08:24 | × | krei-se quits (~krei-se@p5085de4b.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 16:09:21 | <probie> | Returning `Nothing` isn't exactly ignoring it. If it works and you're happy with it, stick with it. It's just that `howMuchMeatInHamburger <$> [Burger, Salad, Burger, Burger]` seems like a weird thing to ask; my intuition is that in most cases you want to just throw away the "invalid" ones |
| 16:09:52 | <probie> | unless you're generating a lot of these from the same "source" list and then zipping them together |
| 16:10:31 | <Unicorn_Princess> | throwing away the invalid ones is what the catMaybes that follows does |
| 16:10:43 | <danse-nr3> | :t mapMaybe |
| 16:10:44 | <lambdabot> | (a -> Maybe b) -> [a] -> [b] |
| 16:10:49 | <EvanR> | ^ |
| 16:10:55 | <EvanR> | mapMaybe goodness |
| 16:11:05 | <probie> | Or you can use a list comprehension and skip the Maybe entirely |
| 16:11:11 | × | alexherbo2 quits (~alexherbo@2a02-8440-3102-e563-f442-f273-7a20-f8e2.rev.sfr.net) (Remote host closed the connection) |
| 16:11:19 | <probie> | % data Variants = First Int | Second Int | Third String deriving Show |
| 16:11:19 | <yahb2> | <no output> |
| 16:11:23 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Remote host closed the connection) |
| 16:11:39 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 16:11:41 | → | krei-se joins (~krei-se@p5085de4b.dip0.t-ipconnect.de) |
| 16:11:43 | <probie> | % [n*2 | Second n <- [First 3, Second 5, Third "7", First 9, Second 11, Third "11"]] |
| 16:11:43 | <yahb2> | [10,22] |
| 16:11:47 | <Unicorn_Princess> | working on replacing it with mapMaybe, but yes :) |
| 16:13:58 | <EvanR> | that's a good one too |
| 16:20:48 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 16:25:02 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: on the move) |
| 16:26:11 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 16:28:32 | <ncf> | > [Just 1, Nothing, Just 2] ^.. _Just |
| 16:28:34 | <lambdabot> | error: |
| 16:28:34 | <lambdabot> | • Couldn't match type ‘Maybe a’ with ‘[Maybe a0]’ |
| 16:28:34 | <lambdabot> | Expected type: Getting (Endo [a]) [Maybe a0] a |
| 16:28:40 | <ncf> | > [Just 1, Nothing, Just 2] ^.. folded . _Just |
| 16:28:41 | <lambdabot> | [1,2] |
| 16:29:28 | <EvanR> | lens-pilled |
| 16:31:52 | <__monty__> | Is there something like an execState for a MonadState? If there's not I'd appreciate a stab at why my intuition that it's a reasonable thing is off. |
| 16:32:51 | <__monty__> | The use case is a test case where changes to the state are verified. |
| 16:33:36 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds) |
| 16:34:25 | <EvanR> | :t execState |
| 16:34:26 | <lambdabot> | State s a -> s -> s |
| 16:37:35 | <EvanR> | this is like asking for a generic runState for MonadState |
| 16:37:53 | <EvanR> | with the runFoo is specific to each monad |
| 16:38:11 | <EvanR> | s/with/but/ |
| 16:38:42 | <ncf> | __monty__: what type would it have? |
| 16:39:59 | <__monty__> | MonadState s m => m a -> s -> s ? |
| 16:40:00 | → | econo_ joins (uid147250@id-147250.tinside.irccloud.com) |
| 16:40:16 | <EvanR> | in the case of m = IO that wouldn't work |
| 16:40:47 | <ncf> | or rather m = StateT s IO |
| 16:40:53 | <EvanR> | er, yeah |
| 16:41:00 | <ncf> | (well i guess you could have a MonadState instance for IO that uses IORefs) |
| 16:42:46 | × | krei-se quits (~krei-se@p5085de4b.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 16:44:12 | <__monty__> | And there's no common subgroup of MonadState m's that it would work for? |
| 16:45:04 | → | danse-nr3 joins (~danse-nr3@user/danse-nr3) |
| 16:45:07 | <ncf> | i mean, it would work for the ones of the form StateT s m... and it's called execStateT |
| 16:45:20 | <EvanR> | :t execStateT |
| 16:45:21 | <lambdabot> | Monad m => StateT s m a -> s -> m s |
| 16:45:26 | → | krei-se joins (~krei-se@p5085de4b.dip0.t-ipconnect.de) |
| 16:48:38 | <EvanR> | m smasms |
| 16:56:44 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 17:17:02 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 17:28:52 | → | ft joins (~ft@p3e9bc4e7.dip0.t-ipconnect.de) |
| 17:29:04 | → | TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker) |
| 17:31:59 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 260 seconds) |
| 17:34:37 | × | barrucadu quits (~barrucadu@carcosa.barrucadu.co.uk) (Quit: Lost terminal) |
| 17:37:49 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
| 17:44:38 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:52:36 | → | barrucadu joins (~barrucadu@carcosa.barrucadu.co.uk) |
| 17:54:07 | × | motherfsck quits (~motherfsc@user/motherfsck) (Quit: quit) |
| 17:57:15 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 17:58:26 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 18:01:26 | → | Square2 joins (~Square@user/square) |
| 18:03:15 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 18:03:27 | → | euphores joins (~SASL_euph@user/euphores) |
| 18:08:32 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 18:13:00 | → | Guest85 joins (~Guest85@78.135.8.93) |
| 18:29:30 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 18:35:48 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 245 seconds) |
| 18:45:56 | → | misterfish joins (~misterfis@84.53.85.146) |
| 18:56:33 | × | jerg quits (~jerg@2001:a61:2553:4500::bb0) (Ping timeout: 252 seconds) |
| 18:57:50 | × | Guest85 quits (~Guest85@78.135.8.93) (Quit: Client closed) |
| 19:00:42 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 19:03:41 | → | kuribas joins (~user@ptr-17d51emnm92g51m299m.18120a2.ip6.access.telenet.be) |
| 19:06:06 | <kuribas> | How can I "rebuild" my package on hackage? |
| 19:06:10 | × | hayk quits (~hayk@141.136.90.108) (Quit: hayk) |
| 19:09:00 | → | jerg joins (~jerg@2001:a61:2553:4500::bb0) |
| 19:09:36 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 19:10:56 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Ping timeout: 252 seconds) |
| 19:11:16 | <kuribas> | nm, I found it. |
| 19:14:03 | <danse-nr3> | v |
| 19:15:11 | <kuribas> | I think... I pressed reset fail count, that didn't do anything so far, maybe I should wait half a day? |
| 19:15:39 | <danse-nr3> | not experienced about that, sorry |
| 19:16:54 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 252 seconds) |
| 19:22:02 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 19:23:33 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 19:27:56 | × | danse-nr3 quits (~danse-nr3@user/danse-nr3) (Quit: good night) |
| 19:33:17 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 19:35:46 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 19:38:56 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 19:44:05 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 19:46:43 | <geekosaur> | not only does it take time to get scheduled to build, but the CDN caches the page |
| 19:49:05 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 19:49:41 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 248 seconds) |
| 19:50:12 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:50:30 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 19:51:00 | × | jerg quits (~jerg@2001:a61:2553:4500::bb0) (Remote host closed the connection) |
| 19:51:17 | → | jerg joins (~jerg@2001:a61:2553:4500::bb0) |
| 19:53:38 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Ping timeout: 265 seconds) |
| 20:01:10 | × | Square2 quits (~Square@user/square) (Ping timeout: 252 seconds) |
| 20:04:31 | → | cipherrot joins (~znc-user@user/petrichor) |
| 20:04:37 | × | petrichor quits (~znc-user@user/petrichor) (Ping timeout: 248 seconds) |
| 20:14:13 | × | jerg quits (~jerg@2001:a61:2553:4500::bb0) (Ping timeout: 248 seconds) |
| 20:17:03 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 245 seconds) |
| 20:21:22 | → | nate_b joins (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) |
| 20:25:06 | <__monty__> | Coming back to my question from earlier. The test case was testing a function :: State -> State, however, because Brick dropped the Next type and changed the EventM type, I've changed the function to :: EventM w State (). So my problem is rewriting the test to make use of that MonadState State (EventM w State ()) but just check the state. I suppose I'm thinking of this wrongly as "Wrap a state, do the |
| 20:25:12 | <__monty__> | action, project the state to check," which wouldn't work for IO either. Should I rather be looking at a different test case constructor in Tasty? |
| 20:25:17 | × | sprout quits (~quassel@2a02-a448-3a80-0-414d-4612-f265-dc79.fixed6.kpn.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 20:25:21 | <nate_b> | Howdy. I'm having an issue with importing a module, and I'm hoping someone can help, since there are very few hits I could find. I am trying to start up xmonad with a custom config, and it gives me an error about "Could not find module 'XMonad'". What I did find was to try `cabal install --lib xmonad xmonad-contrib`, but that did not work, They are not shown in the output of `ghc-pkg list`. I don't |
| 20:25:27 | <nate_b> | know if it's significant, but I am running ghc/ghci inside Termux. |
| 20:26:21 | <nate_b> | Inside ghci, `:show paths` gives a module import search path of '.', so is that the issue? |
| 20:27:26 | <geekosaur> | they weon't be shown in ghc-pkg list |
| 20:27:36 | × | ThePenguin quits (~ThePengui@cust-95-80-24-166.csbnet.se) (Read error: Connection reset by peer) |
| 20:27:48 | → | sprout joins (~quassel@2a02-a448-3a80-0-f46a-b3d3-7735-3c78.fixed6.kpn.net) |
| 20:27:58 | <geekosaur> | you should run the "cabal install --lib" in the directory containing your xmonad config |
| 20:28:10 | → | ThePenguin joins (~ThePengui@cust-95-80-24-166.csbnet.se) |
| 20:28:40 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 252 seconds) |
| 20:29:13 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 20:29:14 | <nate_b> | Ah, so... there isn't some place I can install such packages across my system? I.e., if I want to import a package, I absolutely must install it in that directory? |
| 20:29:48 | <geekosaur> | things used to work that way. it caused horrible messes that often required you to nuke everything and start over. |
| 20:29:55 | <JuanDaugherty> | u wanna let ghcup oder handle it |
| 20:30:26 | <geekosaur> | just as pythin advises you to use venvs these days, with haskell you really want to use cabal or stack which automatically sandbox things |
| 20:30:57 | <geekosaur> | (also, termux? isn't that android? last I checked android wasn't based on x11) |
| 20:31:16 | <nate_b> | Normally I would, and in my own projects I have. I just didn't realize that extended to a systemwide install of something like xmonad. |
| 20:31:59 | <nate_b> | (yeah, there is an x-server app called termux-x11, it's pretty decent, and there are a bunch of gui apps, even firefox) |
| 20:33:14 | <nate_b> | (I am in fact running xmonad inside termux-x11 not on a phone, but on my Meta Quest, which is pretty awesome) |
| 20:34:09 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 20:34:59 | <geekosaur> | modern xmonad integrates with cabal via cabal install --lib, which must be done in your config directory, or with stack via a stack.yaml which likewise must be in your config directory |
| 20:35:29 | <nate_b> | Huh, cool! It's been a while since I've needed to install it... so thanks! |
| 20:36:58 | <nate_b> | hmm... I just tried to run cabal install --lib inside .xmonad, to no avail. It just said it was up to date. |
| 20:37:14 | <nate_b> | It's currently installed in ~/.cabal/ |
| 20:38:24 | <geekosaur> | yes, you won't see it updating the environment file (.ghc_environment*) |
| 20:38:35 | <geekosaur> | "up to date" is from the build part |
| 20:39:08 | <nate_b> | There are no new files under ~/.xmonad and `xmonad` still gives the same compilation errors. |
| 20:39:26 | <geekosaur> | um |
| 20:39:32 | <geekosaur> | what version of cabal do you have? |
| 20:39:43 | × | econo_ quits (uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
| 20:40:14 | <nate_b> | version 3.8.1.0 |
| 20:41:02 | <geekosaur> | hm, oldish but not so old that this shouldn't work |
| 20:41:18 | <geekosaur> | what version of xmonad? |
| 20:41:37 | <nate_b> | version 0.18.0 |
| 20:41:49 | <geekosaur> | that should be fine too |
| 20:44:25 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 20:45:13 | → | euphores joins (~SASL_euph@user/euphores) |
| 20:45:29 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 20:46:12 | <geekosaur> | oh |
| 20:46:27 | <geekosaur> | where did you get the cabal install --lib stuff from? |
| 20:47:03 | <geekosaur> | INSTALL.html tells you to use: cabal install --package-env=$HOME/.xmonad --lib base xmonad xmonad-contrib |
| 20:47:36 | <geekosaur> | (well, actually it tells you to use ~/.config/xmonad because we've switched to XDG paths, but ~/.xmonad is still supported for backward compatibility) |
| 20:47:44 | <nate_b> | Oh, I see. I got it from a reddit post about this problem with XMonad. |
| 20:47:47 | <nate_b> | Oh! |
| 20:48:10 | <nate_b> | Okay, lemme try that... |
| 20:48:12 | <nate_b> | 1m |
| 20:48:20 | <geekosaur> | the global one *should* work, though |
| 20:48:50 | <geekosaur> | it's just disrecommended because it can create the same problems as used to happen with global package installs |
| 20:50:51 | × | Midjak quits (~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep) |
| 20:51:31 | <nate_b> | The cabal line ran fine, then when I ran xmonad I got the same error as before. |
| 20:52:57 | <geekosaur> | hm. I just ran that in my sandbox here and it worked as expected |
| 20:53:43 | <geekosaur> | https://paste.tomsmeding.com/rZUrk6zV |
| 20:55:32 | → | tomku joins (~tomku@user/tomku) |
| 20:56:03 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 20:56:28 | <nate_b> | Hmm... here's mine: https://paste.tomsmeding.com/bNHnxcHP |
| 20:57:57 | → | Midjak joins (~MarciZ@82.66.147.146) |
| 20:58:13 | <geekosaur> | hm. can you run the ghc command on line 5, with -v0 replaced by -v1? (and no $ at the front) |
| 21:00:38 | <nate_b> | Exact same output |
| 21:01:14 | <geekosaur> | hm, wait. if you used ~/.xmonad in that cabal install --lib, you need to do it again with ~/.config/xmonad because that's where your config is |
| 21:01:34 | <nate_b> | Nah, I did it the right way. |
| 21:01:36 | <geekosaur> | also you might run ghci from your config directory and see if it says something about loading an environment file |
| 21:02:20 | <geekosaur> | and if it does, try `import XMonad` at the prompt |
| 21:02:47 | × | Midjak quits (~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep) |
| 21:03:05 | <geekosaur> | hm, -v1 should have gotten you some information about what it's doing, at the very least, and probably a list of where it looked for the import file (XMonad.hi) |
| 21:03:06 | <nate_b> | It does not. |
| 21:03:23 | <nate_b> | the ghci just goes to a prompt. |
| 21:03:34 | <geekosaur> | does `ls -a` show the environment file? |
| 21:04:38 | <nate_b> | Yes, and it includes xmonad and xmonad-config |
| 21:09:32 | <geekosaur> | but ghci isn't loading it, nor apparently ghc. this sounds like a problem with your ghc, I'm afraid |
| 21:10:38 | <geekosaur> | hm, what version of ghc is it? |
| 21:13:05 | <nate_b> | 1 sec |
| 21:14:24 | <geekosaur> | unless, hm. `echo $GHC_ENVIRONMENT` |
| 21:14:36 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 21:14:42 | <nate_b> | ghci 9.2.5 |
| 21:15:34 | <geekosaur> | that's recent enough to support them |
| 21:16:20 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:19:50 | <nate_b> | $GHC_ENVIRONMENT is empty |
| 21:22:04 | × | michalz quits (~michalz@185.246.207.217) (Remote host closed the connection) |
| 21:22:40 | → | harveypwca joins (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) |
| 21:23:58 | <nate_b> | Is there a productive way to half-split this? |
| 21:24:28 | <nate_b> | Like, to try a different package or something from scratch? Any suggestions? |
| 21:28:05 | <geekosaur> | you can try using cabal v1-install xmonad xmonad-xontrib |
| 21:28:14 | <geekosaur> | er, xmonad-contrib |
| 21:29:00 | <geekosaur> | or if stack is available, follow the stack install instructions https://xmonad.org/INSTALL.html#build-using-stack |
| 21:31:47 | <geekosaur> | v1-install is strongly disrecommended because it leads to "cabal hell", but if it's the only thing that works in termux you may be stuck |
| 21:41:51 | <nate_b> | Well, thanks for your help. If this doesn't work I guess I'll have to file a bug with... uh... someone. |
| 21:42:51 | → | MadeleineSydney joins (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) |
| 21:49:11 | × | euleritian quits (~euleritia@77.22.252.56) (Ping timeout: 255 seconds) |
| 21:51:35 | → | euleritian joins (~euleritia@dynamic-176-006-133-039.176.6.pool.telefonica.de) |
| 21:52:55 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 21:54:11 | → | hayk joins (~hayk@141.136.90.108) |
| 21:55:21 | × | euleritian quits (~euleritia@dynamic-176-006-133-039.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 21:55:40 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 21:57:14 | × | nate_b quits (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) (Ping timeout: 260 seconds) |
| 22:01:36 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 22:03:07 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 22:03:22 | zero | is now known as yin |
| 22:03:42 | <yin> | i made a pretty |
| 22:04:00 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 22:04:00 | <yin> | > take 7 $ iterate (recip . succ) 1 :: [Rational] |
| 22:04:01 | <lambdabot> | [1 % 1,1 % 2,2 % 3,3 % 5,5 % 8,8 % 13,13 % 21] |
| 22:04:37 | <xerox> | quite |
| 22:05:19 | <yin> | i call it the phi bonacci sequence |
| 22:07:11 | <yin> | i got the idea from the c |
| 22:07:37 | <ncf> | nice |
| 22:07:52 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Ping timeout: 272 seconds) |
| 22:08:03 | <yin> | *continued fraction expansion of phi |
| 22:08:37 | <yin> | it approximates phi as the list goes on |
| 22:09:30 | × | target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving) |
| 22:09:52 | <yin> | (recip . succ) being (\x -> 1 / (1 + x)) |
| 22:12:56 | × | MadeleineSydney quits (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) (Quit: MadeleineSydney) |
| 22:13:14 | → | MadeleineSydney joins (~Thunderbi@c-71-229-185-228.hsd1.co.comcast.net) |
| 22:13:42 | <monochrom> | Yeah that is beautiful :) |
| 22:14:32 | → | nate_b joins (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) |
| 22:17:12 | → | AlexNoo_ joins (~AlexNoo@94.233.241.125) |
| 22:18:14 | × | AlexZenon quits (~alzenon@94.233.241.102) (Ping timeout: 260 seconds) |
| 22:18:38 | × | AlexNoo quits (~AlexNoo@94.233.241.102) (Ping timeout: 265 seconds) |
| 22:18:50 | AlexNoo_ | is now known as AlexNoo |
| 22:19:10 | → | pavonia joins (~user@user/siracusa) |
| 22:22:38 | → | AlexNoo_ joins (~AlexNoo@94.233.241.125) |
| 22:23:04 | × | nate_b quits (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) (Ping timeout: 260 seconds) |
| 22:23:50 | × | AlexNoo quits (~AlexNoo@94.233.241.125) (Ping timeout: 255 seconds) |
| 22:24:31 | → | raehik joins (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) |
| 22:24:34 | → | nate_b joins (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) |
| 22:24:44 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:24:46 | → | Square2 joins (~Square@user/square) |
| 22:24:48 | AlexNoo_ | is now known as AlexNoo |
| 22:27:16 | <yin> | haskell makes it nice to look at |
| 22:31:45 | × | nate_b quits (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) (Ping timeout: 276 seconds) |
| 22:34:38 | → | nate_b joins (~u0_a123@pool-72-74-69-99.bstnma.fios.verizon.net) |
| 22:39:39 | → | Midjak joins (~MarciZ@82.66.147.146) |
| 22:46:08 | → | gioyik joins (~gioyik@gateway/tor-sasl/gioyik) |
| 22:51:01 | × | acidjnk quits (~acidjnk@p200300d6e72cfb663100542eb9ff72dc.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 22:53:33 | <int-e> | > fix ((1:) . (>>= sequence [id, recip] . succ)) :: [Rational] |
| 22:53:35 | <lambdabot> | [1 % 1,2 % 1,1 % 2,3 % 1,1 % 3,3 % 2,2 % 3,4 % 1,1 % 4,4 % 3,3 % 4,5 % 2,2 %... |
| 22:53:45 | → | AlexZenon joins (~alzenon@94.233.241.125) |
| 22:59:56 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Quit: Lost terminal) |
| 23:04:16 | → | skyesoss joins (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) |
| 23:04:19 | × | gawen quits (~gawen@user/gawen) (Quit: cya) |
| 23:05:41 | → | gawen joins (~gawen@user/gawen) |
| 23:05:50 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 23:08:19 | × | harveypwca quits (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) (Quit: Leaving) |
| 23:08:32 | × | skyesoss quits (~Thunderbi@c-73-208-45-119.hsd1.il.comcast.net) (Ping timeout: 252 seconds) |
| 23:23:15 | × | ZharMeny quits (~user@user/ZharMeny) (Quit: This space was intentionally left blank.) |
| 23:32:34 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 23:32:47 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 23:34:39 | → | Square3 joins (~Square4@user/square) |
| 23:34:59 | × | Midjak quits (~MarciZ@82.66.147.146) (Quit: This computer has gone to sleep) |
| 23:37:34 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 260 seconds) |
| 23:37:38 | × | Square2 quits (~Square@user/square) (Ping timeout: 255 seconds) |
| 23:38:37 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 23:50:06 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 23:54:37 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 23:54:56 | → | gentauro joins (~gentauro@user/gentauro) |
| 23:56:37 | × | Rodney- quits (~Rodney@90.201.223.82) (Ping timeout: 248 seconds) |
| 23:59:54 | × | raehik quits (~raehik@rdng-25-b2-v4wan-169990-cust1344.vm39.cable.virginm.net) (Ping timeout: 260 seconds) |
All times are in UTC on 2024-07-30.