Home freenode/#haskell: Logs Calendar

Logs on 2020-10-21 (freenode/#haskell)

00:00:00 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) (Ping timeout: 246 seconds)
00:00:02 × cassier quits (~cassier@195.206.169.184) ()
00:00:31 dansho joins (~dansho@ip68-108-167-185.lv.lv.cox.net)
00:00:59 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds)
00:01:51 × ulidtko quits (~ulidtko@193.111.48.79) (Remote host closed the connection)
00:02:09 ulidtko joins (~ulidtko@193.111.48.79)
00:05:58 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
00:07:05 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
00:10:25 p8m joins (p8m@gateway/vpn/protonvpn/p8m)
00:10:26 × perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 2.9)
00:10:52 × nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving)
00:12:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:13:24 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
00:15:01 <koz_> @pl \x -> (x, x)
00:15:02 <lambdabot> join (,)
00:17:20 polyrain joins (~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5)
00:17:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
00:18:16 nullheroes joins (~danielvu@168.235.66.22)
00:19:20 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:23:27 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
00:25:37 <MarcelineVQ> dup
00:26:24 nbloomf joins (~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24)
00:28:18 conal joins (~conal@ip-66-115-176-174.creativelink.net)
00:29:22 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
00:29:52 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
00:32:42 jedws joins (~jedws@121.209.161.98)
00:33:38 × arw quits (~arw@impulse.informatik.uni-erlangen.de) (Ping timeout: 260 seconds)
00:33:40 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
00:34:25 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 264 seconds)
00:38:25 reppertj joins (~textual@pool-96-246-209-59.nycmny.fios.verizon.net)
00:39:49 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
00:40:22 conal joins (~conal@ip-66-115-176-174.creativelink.net)
00:42:57 × ensyde quits (~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd) (Quit: WeeChat 2.9)
00:43:28 × jedws quits (~jedws@121.209.161.98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:43:30 falafel joins (~falafel@71-34-132-121.clsp.qwest.net)
00:44:07 jedws joins (~jedws@121.209.161.98)
00:44:22 × howdoi quits (uid224@gateway/web/irccloud.com/x-jhjfudcxbbzyovpj) (Quit: Connection closed for inactivity)
00:44:52 × jedws quits (~jedws@121.209.161.98) (Client Quit)
00:45:40 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
00:46:52 maerwald_ joins (~maerwald@5.45.98.221)
00:47:27 jedws joins (~jedws@121.209.161.98)
00:47:45 × maerwald quits (~maerwald@mail.hasufell.de) (Ping timeout: 240 seconds)
00:49:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:50:02 × jedws quits (~jedws@121.209.161.98) (Client Quit)
00:50:02 × codygman quits (~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
00:50:33 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
00:50:47 codygman joins (~codygman@47-184-107-46.dlls.tx.frontiernet.net)
00:53:01 ukari joins (~ukari@unaffiliated/ukari)
00:55:23 howdoi joins (uid224@gateway/web/irccloud.com/x-tsohuehqbugpkvfg)
00:56:56 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
00:57:25 × dhil quits (~dhil@195.213.192.122) (Ping timeout: 240 seconds)
00:59:22 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
01:02:00 supercoven_ joins (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi)
01:02:33 thir joins (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
01:04:05 × supercoven quits (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 240 seconds)
01:05:45 shatriff_ joins (~vitaliish@176.52.219.10)
01:05:51 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
01:06:29 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
01:06:43 × thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
01:08:33 christo joins (~chris@81.96.113.213)
01:08:39 × shatriff quits (~vitaliish@176.52.219.10) (Ping timeout: 260 seconds)
01:09:58 plutoniix joins (~q@ppp-27-55-76-45.revip3.asianet.co.th)
01:10:25 × Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 240 seconds)
01:10:32 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
01:10:45 × worc3131 quits (~quassel@2a02:c7f:c026:9500:a0d2:b9d1:42a4:69b4) (Ping timeout: 272 seconds)
01:10:57 × ericsagnes quits (~ericsagne@2405:6580:0:5100:1c6c:f39a:cdd0:9852) (Ping timeout: 260 seconds)
01:11:01 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
01:11:51 puffnfresh joins (~puffnfres@180-150-38-83.b49626.bne.nbn.aussiebb.net)
01:13:12 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
01:13:18 × Chi1thangoo quits (~Chi1thang@87.112.60.168) (Remote host closed the connection)
01:13:42 Chi1thangoo joins (~Chi1thang@87.112.60.168)
01:14:51 xiinotulp joins (~q@ppp-27-55-74-146.revip3.asianet.co.th)
01:14:53 conal joins (~conal@ip-66-115-176-174.creativelink.net)
01:17:51 × plutoniix quits (~q@ppp-27-55-76-45.revip3.asianet.co.th) (Read error: Connection reset by peer)
01:19:43 × Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 260 seconds)
01:20:36 perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
01:21:16 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 258 seconds)
01:22:25 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 240 seconds)
01:22:45 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 240 seconds)
01:23:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
01:23:27 christo joins (~chris@81.96.113.213)
01:23:49 ericsagnes joins (~ericsagne@2405:6580:0:5100:5d5:9ab8:7a96:b021)
01:23:59 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
01:24:30 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
01:26:55 texasmynsted joins (~texasmyns@62.182.99.148)
01:28:34 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 260 seconds)
01:32:10 <texasmynsted> hello
01:32:13 × oisdk quits (~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f) (Ping timeout: 244 seconds)
01:33:07 × elliott_ quits (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Read error: Connection reset by peer)
01:33:44 elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net)
01:34:03 oisdk joins (~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f)
01:35:45 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
01:38:42 × darjeeli1 quits (~darjeelin@122.245.211.155) (Ping timeout: 260 seconds)
01:38:51 × nineonin_ quits (~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:43:08 <ghoulguy> hi
01:45:02 wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:46:18 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
01:47:47 <koz_> Sup?
01:47:53 <koz_> :t dup
01:47:54 <lambdabot> error: Variable not in scope: dup
01:54:51 xff0x_ joins (~fox@2001:1a81:529c:a900:bce5:4c81:f65e:145e)
01:56:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:57:02 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 260 seconds)
01:58:04 × xff0x quits (~fox@port-92-195-83-98.dynamic.as20676.net) (Ping timeout: 258 seconds)
02:00:16 <texasmynsted> anybody up for making a suggestion on improving a small block of simple code?
02:00:49 × taurux quits (~taurux@net-93-146-7-193.cust.vodafonedsl.it) (Ping timeout: 246 seconds)
02:01:33 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
02:01:40 <texasmynsted> heh
02:01:43 taurux joins (~taurux@net-188-152-111-153.cust.dsl.teletu.it)
02:03:46 <texasmynsted> The lets look like something I should be able to remove. https://gist.github.com/mmynsted/b6df6c87056ab5582f82b8b329e39cac
02:04:48 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
02:07:43 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (tepper.freenode.net (Nickname regained by services)))
02:07:48 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
02:09:06 × shatriff_ quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
02:09:23 shatriff joins (~vitaliish@176.52.219.10)
02:09:31 <dsal> `(,) bad good` is a funny way to write `(bad, good)`
02:09:54 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
02:10:12 shatriff joins (~vitaliish@176.52.219.10)
02:10:43 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
02:11:02 shatriff joins (~vitaliish@176.52.219.10)
02:11:15 <dsal> `f (_, v) = V.toList $ V.map redirectMapToPair v` looks a lot like `V.toList . map redirectrMapToPair . snd`
02:11:28 <dsal> But why are you making a pair if you just want the second part? Just don't make the tuple.
02:11:31 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
02:11:51 shatriff joins (~vitaliish@176.52.219.10)
02:12:19 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
02:13:37 <dsal> Something like: `loadUrlMap bs = V.toList . V.map f <$> decodeByNameWith myOptions bs where f (RedirectMap _ good) = good`
02:13:42 <dsal> But I don't know what all that stuff does.
02:15:21 <texasmynsted> ah well. because I am applying f to the Right of an Either. The Right of the Either has a tuple where I only want the snd bit, which is a vector...
02:15:54 <texasmynsted> I will try your suggestions. I think they are more readable in any case
02:17:39 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
02:17:53 × alp quits (~alp@2a01:e0a:58b:4920:b909:f1ee:7d69:ad6b) (Ping timeout: 272 seconds)
02:18:01 Stanley00 joins (~stanley00@unaffiliated/stanley00)
02:18:08 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
02:18:25 <texasmynsted> THank you
02:18:30 × theDon quits (~td@94.134.91.48) (Ping timeout: 265 seconds)
02:18:33 etherealemb joins (602910b8@096-041-016-184.res.spectrum.com)
02:19:46 <dsal> > let f (_, v) = show v in f <$> Right (1,2)
02:19:48 <lambdabot> Right "2"
02:19:54 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
02:19:58 <dsal> > show . snd <$> Right (1,2)
02:20:01 <lambdabot> Right "2"
02:20:08 theDon joins (~td@94.134.91.5)
02:20:28 <dsal> (of course if you don't want the tuple, it's easier to just never have one)
02:20:37 <etherealemb> Which Haskell GraphQL framework would you guys suggest?
02:21:23 <dsal> > fmap show <$> Right (1,2)
02:21:25 <lambdabot> Right (1,"2")
02:22:25 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds)
02:25:10 conal joins (~conal@ip-66-115-176-174.creativelink.net)
02:25:46 <texasmynsted> Okay I updated the gist with a comment, taking your suggestions. The ones I undestood.
02:26:04 <dsal> Oh, if that's vector, V.map is just fmap. And V.toList is in Foldable. You don't need the V. My brain keeps trying to remove stuff you don't need there. You may not even need Either. heh
02:26:36 <dsal> IMO, you should really use `where` instead of `let`. I don't think `let` is helping you here.
02:26:52 <texasmynsted> okay
02:27:10 <dsal> What is `decodeByNameWith` ? I think that's part of what's confusing me. I'm making assumptions.
02:27:22 × xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 260 seconds)
02:27:43 burg_philo joins (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
02:27:53 × burg_philo quits (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Client Quit)
02:28:01 × etherealemb quits (602910b8@096-041-016-184.res.spectrum.com) (Remote host closed the connection)
02:28:15 burg_philo joins (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
02:30:28 hackage eve 0.1.9.0 - An extensible event framework https://hackage.haskell.org/package/eve-0.1.9.0 (ChrisPenner)
02:30:48 emb joins (602910b8@096-041-016-184.res.spectrum.com)
02:31:49 <texasmynsted> oh that is from cassava
02:31:52 <texasmynsted> decodeByNameWith :: FromNamedRecord a => DecodeOptions -> ByteString -> Either String (Header, Vector a)
02:32:05 jedws joins (~jedws@121.209.161.98)
02:32:40 <texasmynsted> it gives me the pair on the happy path and I do do not need the Header
02:33:08 <dsal> Ah, OK. Yeah. I thought something like that was happening, but it was kind of weird with the pair you were processing.
02:33:34 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
02:33:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:34:13 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
02:34:27 <dsal> `fmap.fmap` will let you give an `(a -> b)` to make that a `Either String (Header, Vector a) -> Either String (Header, Vector b)`
02:34:39 <dsal> But you might as well throw away the header.
02:35:03 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Remote host closed the connection)
02:35:48 falafel joins (~falafel@71-34-132-121.clsp.qwest.net)
02:36:25 × burg_philo quits (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Ping timeout: 240 seconds)
02:36:29 <dsal> You could also write: `good :: RedirectMap -> String; good (RedirectMap _ g) = g` and then `loadUrlMap = toList . ((fmap.fmap) good) . decodeByNameWith myOptions`
02:37:11 <dsal> I probalby missed something there, but that might be a bit easier to read. Unless you don't like doublefmaps, but (I put too many parens in). In either case, separating out the function for getting goodness from RedirectMap makes it a good deal cleaner.
02:38:20 <dsal> This would be easier if I started up a GHCI
02:39:14 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
02:39:18 × emb quits (602910b8@096-041-016-184.res.spectrum.com) (Remote host closed the connection)
02:39:33 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
02:39:47 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
02:39:54 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
02:40:41 crestfallen joins (~jvw@135-180-15-188.fiber.dynamic.sonic.net)
02:41:41 christo joins (~chris@81.96.113.213)
02:44:19 <dsal> You could also avoid having to write `decodeByNameWith myOptions` and then worrying about the `snd`ing by making `decode :: FromNamedRecord a => ByteString -> Either String (Vector a); decode = fmap snd . decodeByNameWith myOptions`.
02:45:00 × crestfallen quits (~jvw@135-180-15-188.fiber.dynamic.sonic.net) (Client Quit)
02:45:46 burg_philo joins (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
02:48:47 <sm[m]> how best to configure stack ghci --ghci-options "-interactive-print=Text.Pretty.Simple.pPrint" --package pretty-simple as my default ?
02:49:42 <sm[m]> I can put :set -package pretty-simple and :set -interactive-print=Text.Pretty.Simple.pPrint in ~/.ghci, but it only works in projects where I have installed the pretty-simple package, unlike stack's --package which installs it if missing
02:50:12 × ddellacosta quits (~dd@86.106.121.168) (Ping timeout: 256 seconds)
02:50:34 <sm[m]> I wondered if there's a way other than alias stack-ghci='stack ghci --ghci-options "-interactive-print=Text.Pretty.Simple.pPrint" --package pretty-simple'
02:53:08 <sm[m]> by the way, this is from https://github.com/cdepillabout/pretty-simple readme and seems pretty great - auto pretty printing of values in ghci
02:54:00 × wroathe_ quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
02:54:19 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:56:28 hackage selections 0.3.0.0 - Combinators for operating with selections over an underlying functor https://hackage.haskell.org/package/selections-0.3.0.0 (ChrisPenner)
02:57:14 × burg_philo quits (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
03:00:28 hackage lens-filesystem 0.1.0.0 - Lens interface for your filesystem; still a bit experimental https://hackage.haskell.org/package/lens-filesystem-0.1.0.0 (ChrisPenner)
03:00:50 <texasmynsted> actually what I need is a mapping of bad url to good url. So the (bad, good) pair is what I am after. A list of them.
03:01:45 <texasmynsted> The strange part is that cassava is giving me (Header, Vector), I then drop the Header, and parse out the Vector to get the bad/good pair.
03:02:26 <texasmynsted> :-) Lots of good advice. Thank you so much dsal!
03:02:54 <dsal> Oh. That's just `Map.fromList`
03:04:20 thiross joins (~user@161.129.40.8)
03:05:12 × dansho quits (~dansho@ip68-108-167-185.lv.lv.cox.net) (Quit: Leaving)
03:06:33 thiross parts (~user@161.129.40.8) ()
03:08:00 <dsal> I got super distracted by a twitch stream...
03:08:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
03:10:59 <dsal> So if you have `(a -> (k,v))` and you want `(Either String (Header, Vector a)` -> `Either String (Map k v))` then that's something like `fmap (Map.fromList . toList . fmap convert)` (But, again, I don't have a ghci so my faulty brain is guessing.
03:11:00 <dsal> )
03:12:07 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
03:14:44 × AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Ping timeout: 258 seconds)
03:16:50 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
03:17:25 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
03:18:21 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:19:24 × dwt quits (~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 265 seconds)
03:20:27 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
03:21:36 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 246 seconds)
03:29:30 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
03:30:58 <dsal> texasmynsted: finally got my ghci running and can confirm: https://www.irccloud.com/pastebin/IV3jl2bc/conv.hs
03:31:57 × oisdk quits (~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f) (Quit: oisdk)
03:32:23 <dsal> texasmynsted: with decode as mentioned above: https://www.irccloud.com/pastebin/w46VHMk2/
03:32:45 <texasmynsted> :-)
03:32:53 oisdk joins (~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f)
03:33:40 christo joins (~chris@81.96.113.213)
03:34:58 <dsal> Does that make sense?
03:35:13 <dsal> (my brain is feeling kind of sluggish tonight, so I'm surprised that typechecked)
03:35:19 Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
03:35:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:36:22 × polyrain quits (~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:40:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
03:42:53 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
03:43:25 × jespada quits (~jespada@90.254.245.15) (Ping timeout: 240 seconds)
03:43:34 × m0rphism quits (~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 265 seconds)
03:45:59 <dsal> The one in the middle might look a little complicated, but it works with all Foldables, not just Vector. Partially confusing because I didn't apply it to the `got` variable that I'd defined for that purpose: https://www.irccloud.com/pastebin/0Gcm62uR/got.hs
03:46:21 jespada joins (~jespada@90.254.245.15)
03:49:10 dwt joins (~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
03:52:16 <Squarism> Someimes i feel ghci ":info class" gets too much with all instances listed. Isnt there just a command showing the class?
03:52:44 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
03:52:45 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 246 seconds)
03:54:56 bitmagie joins (~Thunderbi@200116b806c15c00bd70654fe0e81318.dip.versatel-1u1.de)
03:56:06 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-ftxlshtfjorkikim) ()
03:58:52 PotatoHatsue[Q] is now known as PotatoHatsue|T
04:00:10 × ph88 quits (~ph88@ip5f5af0cc.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
04:01:11 <ghoulguy> Not that I know of
04:01:28 hackage lens-filesystem 0.1.0.1 - Lens interface for your filesystem; still a bit experimental https://hackage.haskell.org/package/lens-filesystem-0.1.0.1 (ChrisPenner)
04:04:59 polyrain joins (~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5)
04:05:04 jsomedon joins (~jsomedon@111.197.237.160)
04:05:13 × nek0 quits (~nek0@2a01:4f8:222:2b41::12) (Quit: ZNC 1.7.5 - https://znc.in)
04:05:40 nek0 joins (~nek0@mail.nek0.eu)
04:06:21 × irc_user quits (uid423822@gateway/web/irccloud.com/x-ccinjvlcbfblsfxt) (Quit: Connection closed for inactivity)
04:06:29 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
04:06:39 burg_philo joins (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net)
04:06:41 × Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
04:06:54 bartemius joins (~bartemius@109.252.19.142)
04:08:22 × burg_philo quits (~igloo@pool-100-33-61-227.nycmny.fios.verizon.net) (Client Quit)
04:08:48 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:10:21 Rudd0 joins (~Rudd0@185.189.115.103)
04:10:43 × polyrain quits (~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:10:54 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 256 seconds)
04:11:19 × gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Read error: Connection reset by peer)
04:14:58 huluobo joins (8024078d@128.36.7.141)
04:15:42 × huluobo quits (8024078d@128.36.7.141) (Remote host closed the connection)
04:16:00 × evanjs quits (~evanjs@075-129-188-019.res.spectrum.com) (Quit: ZNC 1.8.1 - https://znc.in)
04:16:27 hackage dhall-lsp-server 1.0.11 - Language Server Protocol (LSP) server for Dhall https://hackage.haskell.org/package/dhall-lsp-server-1.0.11 (GabrielGonzalez)
04:17:11 × texasmynsted quits (~texasmyns@62.182.99.148) (Remote host closed the connection)
04:17:25 evanjs joins (~evanjs@075-129-188-019.res.spectrum.com)
04:17:28 hackage dhall-json 1.7.3 - Convert between Dhall and JSON or YAML https://hackage.haskell.org/package/dhall-json-1.7.3 (GabrielGonzalez)
04:18:27 hackage dhall-yaml 1.2.3 - Convert between Dhall and YAML https://hackage.haskell.org/package/dhall-yaml-1.2.3 (GabrielGonzalez)
04:19:28 hackage dhall-bash 1.0.34 - Compile Dhall to Bash https://hackage.haskell.org/package/dhall-bash-1.0.34 (GabrielGonzalez)
04:21:08 × xff0x_ quits (~fox@2001:1a81:529c:a900:bce5:4c81:f65e:145e) (Ping timeout: 260 seconds)
04:22:01 xff0x_ joins (~fox@2001:1a81:529c:a900:9ed:6089:168f:4946)
04:23:44 × jsomedon quits (~jsomedon@111.197.237.160) (Quit: jsomedon)
04:24:16 × solonarv quits (~solonarv@astrasbourg-552-1-23-6.w90-13.abo.wanadoo.fr) (Ping timeout: 256 seconds)
04:24:58 hackage dhall-nix 1.1.18 - Dhall to Nix compiler https://hackage.haskell.org/package/dhall-nix-1.1.18 (GabrielGonzalez)
04:25:57 hackage dhall-nixpkgs 1.0.2 - Convert Dhall projects to Nix packages https://hackage.haskell.org/package/dhall-nixpkgs-1.0.2 (GabrielGonzalez)
04:26:04 jamm_ joins (~jamm@unaffiliated/jamm)
04:26:29 × xiinotulp quits (~q@ppp-27-55-74-146.revip3.asianet.co.th) (Quit: Leaving)
04:26:57 hackage dhall 1.36.0 - A configuration language guaranteed to terminate https://hackage.haskell.org/package/dhall-1.36.0 (GabrielGonzalez)
04:27:57 hackage dhall-docs 1.0.2 - Generate HTML docs from a dhall package https://hackage.haskell.org/package/dhall-docs-1.0.2 (GabrielGonzalez)
04:31:13 scar451 joins (~scar45@185.163.110.116)
04:32:21 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
04:43:01 day_ joins (~Unknown@unaffiliated/day)
04:44:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
04:44:41 × nek0 quits (~nek0@mail.nek0.eu) (Quit: ZNC 1.7.5 - https://znc.in)
04:46:50 × day quits (~Unknown@unaffiliated/day) (Ping timeout: 272 seconds)
04:46:50 day_ is now known as day
04:50:11 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 258 seconds)
04:51:33 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
04:52:28 Tario joins (~Tario@201.192.165.173)
04:54:13 × avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:58:43 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
04:59:38 × dwt quits (~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 256 seconds)
05:00:25 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
05:02:25 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 240 seconds)
05:02:36 × thunderrd quits (~thunderrd@183.182.110.178) (Remote host closed the connection)
05:02:54 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
05:04:06 thir joins (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
05:04:16 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
05:04:34 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds)
05:04:34 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
05:05:12 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 272 seconds)
05:06:32 × bartemius quits (~bartemius@109.252.19.142) (Remote host closed the connection)
05:06:49 × bergsans quits (~bergsans@c80-217-8-29.bredband.comhem.se) (Ping timeout: 264 seconds)
05:06:51 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
05:07:16 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Remote host closed the connection)
05:07:18 bergsans joins (~bergsans@c80-217-8-29.bredband.comhem.se)
05:07:40 dwt joins (~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
05:07:53 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
05:08:57 × thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
05:09:41 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
05:10:06 jamm_ joins (~jamm@unaffiliated/jamm)
05:11:08 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:13:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:18:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
05:20:23 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
05:20:56 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
05:23:03 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
05:24:27 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
05:35:47 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
05:37:53 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
05:39:10 shafox joins (~shafox@106.51.234.111)
05:41:35 ggole joins (~ggole@2001:8003:8119:7200:b1ad:260c:cc33:2a8d)
05:41:51 bartemius joins (~bartemius@109.252.19.142)
05:42:25 × reppertj quits (~textual@pool-96-246-209-59.nycmny.fios.verizon.net) (Quit: Textual IRC Client: www.textualapp.com)
05:45:28 polyrain joins (~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5)
05:50:49 avoandmayo joins (~textual@122-58-158-238-adsl.sparkbb.co.nz)
05:51:53 <sim590> I have this code: https://paste.debian.net/1168059/ and I'm getting this error: https://paste.debian.net/1168060/. Why ?
05:52:09 <sim590> I don't understand what I'm missing nor what the message tries to tell me.
05:52:12 polyrain_ joins (~polyrain@2001:8003:e501:6901:900f:a04:c6e9:3caa)
05:52:35 × avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Client Quit)
05:53:03 <sim590> The message is related to DHComputable, but I don't understand why I don't get any error for the usage of dhEchange and I get a message about exponentiate..
05:53:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:54:26 × polyrain quits (~polyrain@2001:8003:e501:6901:d502:fff6:715b:77f5) (Ping timeout: 240 seconds)
05:54:33 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
05:54:37 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 246 seconds)
05:55:20 <shafox> I am on ghcup, with ghc-8.10.2, cabal 3.2, and this is my xmonad project that I am creating. https://github.com/shadow-fox/foxmonad however when i do cabal build, i get this error: https://gist.github.com/shadow-fox/3cb1d3639395548dc091b0b2c73df8ac
05:55:23 chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
05:56:14 jsynacek joins (~jsynacek@ip-185-149-130-112.kmenet.cz)
05:57:28 asheshambasta joins (~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be)
05:57:51 <sim590> (The issue is about the line 24 in the pastebin)
05:59:04 isovector1 joins (~isovector@172.103.216.166.cable.tpia.cipherkey.com)
05:59:06 <shafox> Don't know what is wrong.
05:59:23 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 265 seconds)
05:59:57 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
05:59:58 × Foritus quits (~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net) (Read error: Connection reset by peer)
06:00:02 × scar451 quits (~scar45@185.163.110.116) ()
06:00:32 Foritus joins (~buggery@cpc91334-watf11-2-0-cust153.15-2.cable.virginm.net)
06:00:42 <c_wraith> sim590: well, that error is referring to a line number not in the paste....
06:01:54 <sim590> c_wraith: yes. I didn't want to include confusing content.
06:02:13 <c_wraith> sim590: anyway... the problem is that it can't tell what instance of DHComputable you want
06:02:46 <c_wraith> sim590: an indicator comment on line 24 saying that it was the line the error was talking about would have been kind
06:02:51 phaul joins (~phaul@ruby/staff/phaul)
06:03:10 <sim590> Yes. True. Sorry about that.
06:03:15 Sanchayan joins (~Sanchayan@171.61.92.239)
06:03:22 <sim590> So, I'm not using classes correctly here.
06:03:37 <sim590> Is that it?
06:03:51 <c_wraith> sim590: the DHComputable instance is chosen based on both v and b. It can infer v from the input to exponentiate, but it has no idea what to pick for b
06:04:08 <sim590> Oh
06:04:19 × nurupo quits (~nurupo.ga@unaffiliated/nurupo) (Ping timeout: 244 seconds)
06:04:33 <c_wraith> sim590: if you used parent_pk, it might be able to infer the type
06:04:57 <c_wraith> sim590: otherwise you could use the ScopedTypeVariables to talk about types from the signature.
06:05:18 <shafox> the xmonad-extras I believe what is failing to build.
06:05:31 <sim590> "talk about types from the signature". I assumed it was the case by default? I'm very surprised.
06:05:50 <c_wraith> by default, type variables in expressions are considered to be fresh types.
06:06:14 <c_wraith> So it will rename them internally by sticking numbers on to them
06:08:47 <sim590> OK, but in practice, it seems to me that it's infeasible for dhExchange to take variables v and b while exponentiate would take v0 as a type. Is it?
06:09:21 <c_wraith> sim590: one other thought - I'm not sure v and b should be independent in the class. Does it make sense that the two types can be chosen independently?
06:09:49 <c_wraith> Or will the choice of one always require a particular choice for the other?
06:10:34 <sim590> Yes, I think that it makes sense since v stands for "private key" and b stands for "public key" and it could be implemented with this function for example: https://hackage.haskell.org/package/cryptonite-0.27/docs/Crypto-PubKey-DH.html#v:getShared
06:10:36 nurupo joins (~nurupo.ga@unaffiliated/nurupo)
06:11:08 fxg joins (~fxg@unaffiliated/fxg)
06:11:13 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
06:11:22 <c_wraith> That sounds like it doesn't make sense to select them independently. It makes no sense to choose a ECDH public key and an RSA private key
06:11:23 <sim590> c_wraith: Well. Yes, the choice of one implies the other type.
06:11:41 <c_wraith> ok, good
06:11:44 <sim590> Yeah. So, I should change the signature?
06:11:51 <c_wraith> Then you can modify the class definition a little bit
06:12:24 <c_wraith> If you enable the FunctionalDependencies extension, you can tell ghc that choices of one type determine the other type.
06:12:39 <sim590> Interesting.
06:12:42 SanchayanM joins (~Sanchayan@122.181.211.206)
06:12:45 × SanchayanM quits (~Sanchayan@122.181.211.206) (Remote host closed the connection)
06:12:48 <c_wraith> I think in this particular case, they only come in pairs, right? Either type specifies the other one?
06:13:29 <c_wraith> In that case, you would change it to class DHComputable v b | v -> b, b -> v where ...
06:13:45 shatriff joins (~vitaliish@176.52.219.10)
06:13:47 <c_wraith> that extra part from | to the where are the functional dependency
06:14:06 <c_wraith> It says that for any particular choice of type v, there can only be one b, and vice versa
06:14:10 × Sanchayan quits (~Sanchayan@171.61.92.239) (Ping timeout: 260 seconds)
06:14:29 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:14:51 <c_wraith> The combination of those things tells ghc not to allow instances that would violate that rule, and that it can use that rule to infer types
06:15:01 <sim590> c_wraith: Yeah, so if you specify the private key type, then a public key type would correspond and vice versa I guess.
06:15:04 alp joins (~alp@2a01:e0a:58b:4920:214e:c6f7:dc70:92ac)
06:15:44 <sim590> That's very nice.
06:16:34 <c_wraith> That should solve the issue you're running into, and be safer (it can catch cases where you mix things up while writing instances)
06:17:47 × raoulb quits (~weechat@stateless.vsos.ethz.ch) (Ping timeout: 260 seconds)
06:17:48 <sim590> I'm continuously learning. I have never really created classes for concrete use cases. I must admit that I don't master the technique for defining classes properly. Would you say that FunctionalDependencies is quite common pattern ?
06:17:53 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
06:18:09 <c_wraith> It is relatively common with multiparameter classes
06:18:22 <sim590> c_wraith: I guess that this is a good benefit for the library I'm writing.
06:18:23 christo joins (~chris@81.96.113.213)
06:18:54 <sim590> Right. This is the first time I use multiparameter classes so that's why I discover this now.
06:19:26 <c_wraith> like, you're using MonadState there. class Monad m => MonadState s m | m -> s where ...
06:19:34 × fxg quits (~fxg@unaffiliated/fxg) (Quit: Leaving)
06:19:59 <c_wraith> That only goes one direction. The monad type must always specify the state type, but you can have multiple different monad types specify the same state type
06:20:05 <sim590> Ohhh. So that's what that part (m -> s) meant in the documentation.
06:20:11 raoulb joins (~weechat@stateless.vsos.ethz.ch)
06:20:14 <c_wraith> yep!
06:20:21 <sim590> Nice
06:20:30 Andy2011Zoe joins (~Andy2011Z@217.146.82.202)
06:20:51 <sim590> Thanks for all those explanations!
06:20:55 <c_wraith> you're welcome
06:22:01 × bitmagie quits (~Thunderbi@200116b806c15c00bd70654fe0e81318.dip.versatel-1u1.de) (Quit: bitmagie)
06:22:25 × christo quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
06:24:22 × howdoi quits (uid224@gateway/web/irccloud.com/x-tsohuehqbugpkvfg) (Quit: Connection closed for inactivity)
06:26:22 × echoreply quits (~echoreply@unaffiliated/echoreply) (Quit: WeeChat 1.9.1)
06:26:47 dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
06:26:49 echoreply joins (~echoreply@unaffiliated/echoreply)
06:29:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
06:30:02 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
06:30:18 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
06:32:10 xerox_ joins (~xerox@unaffiliated/xerox)
06:34:49 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
06:35:31 × andyo quits (~andyo@63.228.117.102) (Quit: ZNC 1.7.2 - https://znc.in)
06:39:00 lep-delete is now known as Guest88073
06:39:28 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
06:41:25 britva joins (~britva@2a02:aa13:7240:2980:95f4:54f7:5f3d:8d9b)
06:43:48 andyo joins (~andyo@63.228.117.102)
06:46:45 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
06:46:45 × taurux quits (~taurux@net-188-152-111-153.cust.dsl.teletu.it) (Ping timeout: 265 seconds)
06:48:38 taurux joins (~taurux@net-188-216-37-204.cust.vodafonedsl.it)
06:48:45 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
06:49:23 × britva quits (~britva@2a02:aa13:7240:2980:95f4:54f7:5f3d:8d9b) (Quit: This computer has gone to sleep)
06:50:58 mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com)
06:53:22 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 260 seconds)
06:55:00 × polyrain_ quits (~polyrain@2001:8003:e501:6901:900f:a04:c6e9:3caa) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:56:17 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
06:56:27 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
06:56:37 ph88 joins (~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140)
06:58:27 × xff0x_ quits (~fox@2001:1a81:529c:a900:9ed:6089:168f:4946) (Ping timeout: 272 seconds)
06:59:12 xff0x_ joins (~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d)
07:00:18 Varis joins (~Tadas@unaffiliated/varis)
07:00:55 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:01:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
07:01:41 × int-e quits (~noone@int-e.eu) (Remote host closed the connection)
07:02:37 int-e joins (~noone@int-e.eu)
07:03:56 ffviewer joins (3dded63f@61-222-214-63.HINET-IP.hinet.net)
07:04:44 <dminuoso> % :t indexed
07:04:44 <yahb> dminuoso: Indexable i p => p a b -> i -> a -> b
07:04:46 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
07:05:15 lambdabot joins (~lambdabot@silicon.int-e.eu)
07:05:15 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
07:05:15 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
07:05:51 <dminuoso> "Build a function from an indexed function."
07:05:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
07:06:22 <dminuoso> I've been staring at this for a while now, can someone give me a hint how to make sense of this?
07:07:00 <dminuoso> Given the instances, this seems to be an overloading for both `const` or `runIndexed`, how is const an indexed function?
07:07:41 <c_wraith> it returns a function that ignores the index
07:08:17 <c_wraith> Don't worry about that class much. treat it as internal to how indexed optics work
07:08:42 <dminuoso> Heh, Im intentionally worrying about the internals, since Ive been diving in to port some functionality over to optics
07:08:54 <c_wraith> It's just how it provides a uniform interface between Indexed i a b and (a -> b)
07:09:27 × ph88 quits (~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140) (Ping timeout: 246 seconds)
07:09:58 <dminuoso> Perhaps I should rephrase the question then.
07:10:03 <dminuoso> withIndex :: (Indexable i p, Functor f) => p (i, s) (f (j, t)) -> Indexed i s (f t)
07:10:11 <dminuoso> withIndex f = Indexed $ \i a -> snd <$> indexed f i (i, a)
07:10:30 <dminuoso> In what instance is this called with a function rather than Indexed?
07:10:34 <dminuoso> (This is sort of hard to grep for)
07:10:58 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
07:11:04 <dminuoso> (I guess the question applies to any Indexable optic, not just withIndex)
07:13:13 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
07:13:19 <dminuoso> Phrased differently, when would you eliminate an Indexable optic with a function?
07:13:29 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
07:13:29 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
07:13:29 GyroW joins (~GyroW@unaffiliated/gyrow)
07:13:34 <c_wraith> you can use it to fake an index, I suppose.
07:14:47 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
07:15:09 raichoo joins (~raichoo@213.240.178.58)
07:16:29 danvet_ joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
07:17:07 × unlink2 quits (~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de) (Remote host closed the connection)
07:17:27 unlink2 joins (~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de)
07:18:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:19:09 berberman_t joins (berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx)
07:21:06 cfricke joins (~cfricke@unaffiliated/cfricke)
07:21:11 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
07:21:27 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
07:21:27 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
07:21:27 GyroW joins (~GyroW@unaffiliated/gyrow)
07:24:48 kuribas joins (~user@ptr-25vy0i9s82bgras1pw6.18120a2.ip6.access.telenet.be)
07:25:34 borne joins (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
07:25:36 <dminuoso> c_wraith: How would that even work?
07:25:51 <dminuoso> I mean if I look at const, Id rather think its about *dropping* the index
07:26:04 × isovector1 quits (~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Remote host closed the connection)
07:26:12 <dminuoso> maybe this is for allowing indexable optics as a non-indexed optics?
07:26:14 × tzh quits (~tzh@2601:448:c500:5300::19b0) (Quit: zzz)
07:28:18 <dminuoso> Because the choice of whether f is Indexed or (->) is done at the elimination site, not the optics definition
07:28:45 <c_wraith> actually, if you chase the arrows around enough... *most* uses of withIndex will be using the (->) instance
07:29:04 <dminuoso> Do you have an example? Im chasing ghosts here in lens.
07:30:27 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:32:50 × jedws quits (~jedws@121.209.161.98) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:34:01 <dminuoso> Aha, I think Im getting somewhere
07:34:29 <dminuoso> % let v l = getConst . l Const
07:34:29 <yahb> dminuoso: ; <interactive>:123:5: warning: [-Wname-shadowing] This binding for `v' shadows the existing binding defined at <interactive>:122:5
07:35:08 <c_wraith> I mean, the first example in the docs...
07:35:23 <c_wraith> > [10, 20, 30] ^.. ifolded . withIndex @_ @(->) [(0,10),(1,20),(2,30)]
07:35:26 <lambdabot> <hint>:1:28: error:
07:35:26 <lambdabot> <hint>:1:28: error:
07:35:26 <lambdabot> Pattern syntax in expression context: withIndex@_
07:35:32 <c_wraith> hah. oops.
07:35:39 <dminuoso> % :set -XTypeApplications
07:35:40 <yahb> dminuoso:
07:35:44 <dminuoso> % [10, 20, 30] ^.. ifolded . withIndex @_ @(->)
07:35:45 <yahb> dminuoso: ; <interactive>:127:1: warning: [-Wtype-defaults]; * Defaulting the following constraints to type `Integer'; (Show a0) arising from a use of `print' at <interactive>:127:1-45; (Num a0) arising from a use of `it' at <interactive>:127:1-45; * In a stmt of an interactive GHCi command: print it; [(0,10),(1,20),(2,30)]
07:35:52 <c_wraith> anyway.
07:36:14 <c_wraith> The first example in the docs is using the (->) instance for Indexable
07:36:53 <dminuoso> c_wraith: Right! So Im right after all.
07:36:56 britva joins (~britva@51.154.14.117)
07:37:07 <dminuoso> It's (^..) that demands (->) here
07:37:19 × britva quits (~britva@51.154.14.117) (Client Quit)
07:37:28 <c_wraith> yes.
07:37:44 <c_wraith> compare to... [10, 20, 30] ^.. ifolded . withIndex @_ @(Indexed Int) . withIndex @_ @(->)
07:37:47 <dminuoso> So itoListOf would pick Indexed, and toListOf would just force a regular van laarhoven functor arrow in there
07:37:57 britva joins (~britva@51.154.14.117)
07:38:11 Sanchayan joins (~Sanchayan@122.181.211.206)
07:39:02 <dminuoso> ifoldrOf l f z = flip appEndo z . getConst #. l (Const #. Endo #. Indexed f)
07:39:17 <dminuoso> foldrOf l f z = flip appEndo z . foldMapOf l (Endo #. f)
07:39:32 × whald quits (~trem@2a02:810a:8100:11a6:a51d:28a2:1c9:853d) (Remote host closed the connection)
07:39:59 <dminuoso> err
07:40:01 <dminuoso> foldMapOf l f = getConst #. l (Const #. f)
07:40:03 <dminuoso> There.
07:40:50 <dminuoso> c_wraith: My difficulty was just chasing the code with all these coerces in place. :(
07:40:59 <dminuoso> Thanks, I think this helped
07:41:56 <kuribas> couldn't coerce make an invalid datatype? For example, of you change the Ord instance in a Map, the Map could become invalid?
07:42:33 <merijn> kuribas: Not if you set roles correctly
07:42:38 × xff0x_ quits (~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d) (Quit: xff0x_)
07:42:38 <dminuoso> kuribas: That's not coerces fault, if you rewrapped manually with newtype the same thing would happen.
07:42:47 xff0x joins (~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d)
07:42:59 <merijn> dminuoso: Coerce handes that correctly if you set roles correctly
07:43:00 <kuribas> merijn: so you cannot coerce a Map?
07:43:30 <merijn> kuribas: If the key type is nominal(not 100% I got that role right) as it should be, that's right?
07:43:40 <merijn> kuribas: Or rather, you can only coerce the values, not the keys
07:43:54 <merijn> Although they fucked it up by making the default role unsafe
07:44:05 <kuribas> merijn: right. Does ghc infer it, or do you need to manually specify roles?
07:44:16 × xerox_ quits (~xerox@unaffiliated/xerox) (Quit: leaving)
07:44:27 × bliminse quits (~bliminse@host109-158-54-87.range109-158.btcentralplus.com) (Quit: leaving)
07:45:03 <merijn> You need to manually specify them to be safe
07:45:09 <merijn> The inferred roles are unsafe
07:45:13 <merijn> https://downloads.haskell.org/ghc/latest/docs/html/users_guide/glasgow_exts.html#roles
07:45:14 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
07:45:33 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
07:45:33 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
07:45:33 GyroW joins (~GyroW@unaffiliated/gyrow)
07:45:36 <kuribas> right, thanks
07:47:07 bliminse joins (~bliminse@host109-158-54-87.range109-158.btcentralplus.com)
07:47:08 × bergsans quits (~bergsans@c80-217-8-29.bredband.comhem.se) (Ping timeout: 256 seconds)
07:47:20 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
07:51:50 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
07:53:31 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
07:53:39 bergsans joins (~bergsans@c80-217-8-29.bredband.comhem.se)
07:56:39 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
07:56:56 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
07:56:56 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
07:56:56 GyroW joins (~GyroW@unaffiliated/gyrow)
08:00:51 xerox_ joins (~xerox@unaffiliated/xerox)
08:01:35 avoandmayo joins (~textual@122-58-158-238-adsl.sparkbb.co.nz)
08:03:23 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
08:03:48 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
08:06:13 × Iwawa quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
08:06:15 berberman joins (~berberman@unaffiliated/berberman)
08:09:44 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
08:13:01 kritzefitz joins (~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de)
08:14:12 × mirrorbird quits (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Quit: Leaving)
08:16:28 × shafox quits (~shafox@106.51.234.111) (Remote host closed the connection)
08:16:53 shafox joins (~shafox@106.51.234.111)
08:18:15 redeemed joins (~rd@79.115.163.113)
08:19:37 polyrain joins (~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c)
08:20:48 Franciman joins (~francesco@host-82-48-166-25.retail.telecomitalia.it)
08:24:11 × cods quits (~fred@unaffiliated/cods) (Ping timeout: 240 seconds)
08:24:24 × MarcelineVQ quits (~anja@198.254.202.72) (Ping timeout: 260 seconds)
08:25:25 <Cale> If it helps any, that is entirely equivalent to replicate 100 (product (map (*3) (zipWith max [1,2,3,4,5] [4,5,6,7,8])))
08:25:32 × ericsagnes quits (~ericsagne@2405:6580:0:5100:5d5:9ab8:7a96:b021) (Ping timeout: 260 seconds)
08:25:33 <Cale> oops
08:25:44 <Cale> Apparently I was scrolled all the way to the top of my buffer
08:25:50 <merijn> Cale: Can I buy your time machine? :D
08:26:26 thunderrd joins (~thunderrd@183.182.115.160)
08:27:33 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:27:45 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
08:28:49 babygnu joins (~robert@gateway/tor-sasl/babygnu)
08:29:40 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
08:30:47 invaser joins (~Thunderbi@31.148.23.125)
08:30:49 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 264 seconds)
08:32:51 <dminuoso> merijn: Wrong tense. Will I have bought your time machine? Cale can find out.
08:33:42 <merijn> ;)
08:33:53 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
08:34:01 Lycurgus joins (~niemand@98.4.96.235)
08:34:51 cristi_ joins (~cristi@82.76.158.82)
08:35:23 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
08:37:08 Lycurgus deplores the apparent disappearance of configurable pc vendors
08:37:29 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
08:37:32 ericsagnes joins (~ericsagne@2405:6580:0:5100:a175:4dc7:93af:b055)
08:37:52 <Cale> "One of the major problems encountered in time travel is not that of becoming your own father or mother. There is no problem in becoming your own father or mother that a broad-minded and well-adjusted family can't cope with. There is no problem with changing the course of history—the course of history does not change because it all fits together like a jigsaw. All the important changes have happened before th
08:37:52 <Cale> e things they were supposed to change and it all sorts itself out in the end.
08:37:52 <Cale> The major problem is simply one of grammar, and the main work to consult in this matter is Dr. Dan Streetmentioner's Time Traveler's Handbook of 1001 Tense Formations. It will tell you, for instance, how to describe something that was about to happen to you in the past before you avoided it by time-jumping forward two days in order to avoid it. The event will be descibed differently according to whether you are
08:37:55 <Cale> talking about it from the standpoint of your own natural time, from a time in the further future, or a time in the further past and is futher complicated by the possibility of conducting conversations while you are actually traveling from one time to another with the intention of becoming your own mother or father.
08:38:01 <Cale> Most readers get as far as the Future Semiconditionally Modified Subinverted Plagal Past Subjunctive Intentional before giving up; and in fact in later aditions of the book all pages beyond this point have been left blank to save on printing costs."
08:38:06 <int-e> Hitchhiker :)
08:38:49 whald joins (~trem@2a02:810a:8100:11a6:7c7b:3b69:546:296f)
08:39:49 <Lycurgus> the problem with time travel per se is its nonsense (literally) because time as a concept is just one thing AFTER another
08:39:58 <Lycurgus> *it's
08:40:38 <Lycurgus> events running backward makes sense in the mind due to its facility with concepts
08:41:03 <Lycurgus> but the notion of actually doing it is an abuse of thought
08:41:45 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
08:41:45 <Lycurgus> another case (like truth) of important concepts fuddled
08:41:49 Chi1thangoo joins (~Chi1thang@87.112.60.168)
08:42:31 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-uufhwubdezwfmvks) (Quit: Connection closed for inactivity)
08:42:59 <Lycurgus> because goedel in one case, einstein/GR/SR in the other
08:43:23 <Rembane> So good
08:44:01 francesco_ joins (~francesco@host-82-54-10-114.retail.telecomitalia.it)
08:44:24 × Franciman quits (~francesco@host-82-48-166-25.retail.telecomitalia.it) (Disconnected by services)
08:44:28 francesco_ is now known as Franciman
08:50:28 <Lycurgus> (in contrast to differential forward time travel at relativistic speeds, which makes perfect sense)
08:51:19 × ishutin_ quits (~Ishutin@80-95-94-59.pool.digikabel.hu) (Remote host closed the connection)
08:51:26 ishutin joins (~Ishutin@80-95-94-59.pool.digikabel.hu)
08:51:42 jedws joins (~jedws@121.209.161.98)
08:52:05 <Lycurgus> any opinions on Control.Monad.Logic as a (pure) prolog?
08:52:34 × Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 272 seconds)
08:52:40 MarcelineVQ joins (~anja@198.254.202.72)
08:55:16 Echosolace joins (~Echosolac@p790105-ipngn4101hiraide.tochigi.ocn.ne.jp)
08:55:27 Chi1thangoo joins (~Chi1thang@87.112.60.168)
08:55:45 fendor joins (~fendor@91.141.2.147.wireless.dyn.drei.com)
08:56:21 × jedws quits (~jedws@121.209.161.98) (Ping timeout: 256 seconds)
08:56:23 <Echosolace> I'm having some trouble with basic level understanding. Can someone check my thought process here?
08:56:29 <Echosolace> Function in question:
08:56:31 <Echosolace> search :: (Eq a) => [a] -> [a] -> Bool
08:56:32 <Echosolace> search needle haystack =
08:56:32 <Echosolace> let nlen = length needle
08:56:32 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
08:56:46 <lortabac> Lycurgus: I am not too familiar with Control.Monad.Logic, but I suppose you also need something like unification-fd to make a Prolog
08:57:13 <Echosolace> So, from the top... We define the typeclass of the function we just named, search.
08:57:23 <Lycurgus> it has unification i believe but just getting acquainted
08:57:42 <Echosolace> It has typeclass of equateable. It takes two lists as parameters and returns a boolean.
08:57:49 <Echosolace> Is that a fair enough understanding so far?
08:57:50 <Lycurgus> just breaks a lot of commonly used stuff
08:58:18 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
08:58:32 × ishutin quits (~Ishutin@80-95-94-59.pool.digikabel.hu) (Ping timeout: 256 seconds)
08:58:48 <Lycurgus> but i'm guessing you were referring to dependent types
08:59:17 <lortabac> Echosolace: 'Eq a =>' is not a type class definition. It is a constraint on type 'a'
09:00:01 × Andy2011Zoe quits (~Andy2011Z@217.146.82.202) ()
09:00:03 <Echosolace> Interesting. Ok.
09:00:16 <lortabac> Echosolace: you can read this type as: '[a] -> [a] -> Bool' where 'a' is an instance of 'Eq'
09:00:30 <Echosolace> Thank you thank you.
09:01:00 <ski> Echosolace : you can use a logical operation, instead of the `if'-`then'-`else'
09:01:04 <Echosolace> Moving down, search needle haystack =
09:01:19 ph88 joins (~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140)
09:01:26 <Echosolace> search then parameter 1 and then parameter 2 =
09:01:39 <Echosolace> I hear "and then" is a bad way to phrase it..
09:02:11 <Echosolace> Anyways, I believe I'm correct in that we are just naming the parameters there..
09:02:18 <ski> yes
09:02:22 × dyniec[m] quits (dyniecmatr@gateway/shell/matrix.org/x-gjzsseikahzwfhmv) (Quit: Idle for 30+ days)
09:02:24 × vaibhavsagar quits (vaibhavsag@gateway/shell/matrix.org/x-ynipythrsvdyajlm) (Quit: Idle for 30+ days)
09:02:25 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
09:02:30 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
09:03:33 <Echosolace> let nlen = length needle - This is predefining a function before an in call I guess. Taking the length of the predefined needle variable.
09:03:39 berberman_t parts (berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx) ("User left")
09:03:48 <merijn> Echosolace: You can think of typeclass constraints as conditional/prerequisites of types. So "foo :: Eq a => a -> a -> Bool" can be read as "IF 'a' is an instance of Eq THEN 'foo :: a -> a -> Bool' ELSE type error"
09:04:22 <ski> Echosolace : not defining a function, but a integer (in this case). yes, it's locally defined
09:04:32 thc202 joins (~thc202@unaffiliated/thc202)
09:04:50 × Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 256 seconds)
09:04:52 <Echosolace> And now the meat:
09:04:53 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
09:05:13 berberman_t joins (berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx)
09:05:27 hackage ngx-export-tools 0.4.9.0 - Extra tools for Nginx haskell module https://hackage.haskell.org/package/ngx-export-tools-0.4.9.0 (lyokha)
09:05:36 ishutin joins (~Ishutin@91-83-11-216.pool.digikabel.hu)
09:05:43 × cristi_ quits (~cristi@82.76.158.82) (Quit: cristi_)
09:06:03 <Echosolace> in foldl (moving from left of the array.., adding to an accumulator..., needs a first instance which is defined as False after the )
09:06:34 <Echosolace> I'm having trouble verbalizing ->
09:06:50 cristi_ joins (~cristi@82.76.158.82)
09:07:21 <Echosolace> x is the head of the list in this situation?
09:07:28 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 246 seconds)
09:07:51 <ski> `x' stands for each element of the list, in turn
09:08:00 <Echosolace> Thank you.
09:08:37 <ski> you can read `->' here as "maps to". so `\acc x -> ..acc..x..' is "the function that, when given two parameters, call them `acc' and `x', maps them to `..acc..x..'"
09:08:50 whatisRT joins (~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699)
09:09:06 <Echosolace> I'll run that through my head a bit, thanks.
09:09:19 karanlikmadde joins (~karanlikm@2a01:c22:b046:2a00:715c:4cac:e6ca:b78)
09:09:37 <ski> (`acc' is the "current result so far" (before taking `x' into account). `..acc.x..' is the "updated result (having taken `x' into account)")
09:10:18 berberman_t parts (berberma_4@gateway/shell/matrix.org/x-cgdaaoawojkzwzyx) ("User left")
09:11:20 knupfer joins (~Thunderbi@dynamic-046-114-151-226.46.114.pool.telefonica.de)
09:12:53 <ski> > foldl (\str n -> "(" ++ str ++ " * " ++ showsPrec 10 n "" ++ ")") "1" [2,3,5,7]
09:12:55 <lambdabot> "((((1 * 2) * 3) * 5) * 7)"
09:12:58 jamm_ joins (~jamm@unaffiliated/jamm)
09:14:20 ishutin_ joins (~Ishutin@94-21-82-21.pool.digikabel.hu)
09:14:25 × ishutin quits (~Ishutin@91-83-11-216.pool.digikabel.hu) (Ping timeout: 240 seconds)
09:14:28 × StoneToad quits (~StoneToad@199-167-119-239.ppp.storm.ca) (Ping timeout: 256 seconds)
09:14:48 × Lycurgus quits (~niemand@98.4.96.235) (Quit: Exeunt)
09:14:48 × knupfer quits (~Thunderbi@dynamic-046-114-151-226.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
09:15:04 × bergsans quits (~bergsans@c80-217-8-29.bredband.comhem.se) (Ping timeout: 258 seconds)
09:15:34 StoneToad joins (~StoneToad@199-167-119-239.ppp.storm.ca)
09:15:48 CourtneyNZ joins (~CourtneyN@ec2-52-63-156-37.ap-southeast-2.compute.amazonaws.com)
09:16:04 × dexterfoo quits (dexter@2a01:7e00::f03c:91ff:fe86:59ec) (K-Lined)
09:16:04 × nh quits (NextHendri@unaffiliated/nexthendrix) (K-Lined)
09:16:04 × Jon quits (jon@dow.land) (K-Lined)
09:16:04 × Takumo quits (takumo@unaffiliated/takumokatekari) (K-Lined)
09:17:29 nh joins (~NextHendr@finickitively.co.uk)
09:17:53 nh is now known as Guest73576
09:18:03 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) (Quit: ZNC 1.7.5 - https://znc.in)
09:18:13 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
09:18:24 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:18:53 Takumo joins (takumo@unaffiliated/takumokatekari)
09:19:21 dexterfoo joins (dexter@2a01:7e00::f03c:91ff:fe86:59ec)
09:19:52 Guest73576 is now known as NextHendrix
09:19:52 × NextHendrix quits (~NextHendr@finickitively.co.uk) (Changing host)
09:19:52 NextHendrix joins (~NextHendr@unaffiliated/nexthendrix)
09:21:11 jmtd joins (jon@dow.land)
09:21:42 bergsans joins (~bergsans@c80-217-8-29.bredband.comhem.se)
09:21:43 tlockney joins (~tlockney@185.204.1.185)
09:22:13 × alp quits (~alp@2a01:e0a:58b:4920:214e:c6f7:dc70:92ac) (Ping timeout: 272 seconds)
09:23:36 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
09:24:22 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
09:25:01 jmtd is now known as Jon
09:27:07 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
09:27:17 GyroW joins (~GyroW@d54C03E98.access.telenet.be)
09:27:17 × GyroW quits (~GyroW@d54C03E98.access.telenet.be) (Changing host)
09:27:17 GyroW joins (~GyroW@unaffiliated/gyrow)
09:27:31 ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
09:28:26 Chi1thangoo joins (~Chi1thang@87.112.60.168)
09:28:29 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:32:01 <Echosolace> I can't get this code to (compile? Is that even the right word?) compile. From LYAH:
09:32:02 <Echosolace> search :: (Eq a) => [a] -> [a] -> Bool
09:32:03 <Echosolace> search needle haystack =
09:32:03 <Echosolace> let nlen = length needle
09:32:03 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
09:32:05 arw joins (~arw@impulse.informatik.uni-erlangen.de)
09:32:18 <Echosolace> First error suggesting that I change tails to tail...
09:32:25 <Echosolace> When I do that, more errors.
09:32:43 <Echosolace> Just wanting to play with that function so I can try to get a better understanding of how it works.
09:33:30 <Echosolace> Anybody have a suggestion?
09:33:44 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
09:34:27 <ski> @type let search :: Eq a => [a] -> [a] -> Bool; search needle haystack = let nlen = length needle in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack) in search
09:34:28 <lambdabot> Eq a => [a] -> [a] -> Bool
09:34:41 <ski> what's the (first) error you get ?
09:34:58 <Echosolace> <interactive>:7:78: error:
09:34:58 <Echosolace> * Variable not in scope: tails :: [a] -> t0 [a]
09:34:58 <Echosolace> * Perhaps you meant `tail' (imported from Prelude)
09:35:04 <ski> @index tails
09:35:05 <lambdabot> GHC.OldList, Data.List, Data.ByteString.Lazy, Data.ByteString.Lazy.Char8, Data.ByteString, Data.ByteString.Char8, Data.Sequence
09:35:09 <Echosolace> After fixing this is the second error:
09:35:12 <ski> use
09:35:15 <int-e> import Data.List
09:35:15 <ski> import Data.List
09:35:23 <Echosolace> Oohhhhhh
09:35:27 <Echosolace> Yeah that makes sense...
09:35:30 __monty__ joins (~toonn@unaffiliated/toonn)
09:35:38 <int-e> Don't follow ghc's suggestions blindly, it has almost no clue.
09:36:16 <int-e> > tails "abc"
09:36:18 <lambdabot> ["abc","bc","c",""]
09:36:23 <int-e> > tail "abc"
09:36:25 <lambdabot> "bc"
09:36:56 <int-e> (that's a huge difference)
09:36:58 <Echosolace> Domo
09:38:07 <Echosolace> I'm attempting this...
09:38:08 <Echosolace> Prelude> :{
09:38:08 <Echosolace> Prelude| import Data.list
09:38:08 <Echosolace> Prelude| search :: (Eq a) => [a] -> [a] -> Bool
09:38:08 <Echosolace> Prelude| search needle haystack =
09:38:08 <Echosolace> Prelude| let nlen = length needle
09:38:09 <Echosolace> Prelude| in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
09:38:11 <Echosolace> Prelude| :}
09:38:22 <ski> Echosolace : anyway, you should use a logical operator, instead of an `if'-`then'-`else' with `True' or `False' as one (or both) branches
09:38:48 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:39:04 <Echosolace> Just trying to still wrap my head around this stuff. I'm still working on understanding the in part of that function.
09:39:16 <Echosolace> But I still can't run it. Getting a parse error on input 'Data.list'
09:39:20 <Echosolace> Did I import wrong?
09:39:29 <ski> Echosolace : it might also be nice to put definitions in a source file (using your favorite text editor), and then (after saving) (re)load that file into the interactor
09:39:33 <ski> should be `Data.List'
09:39:43 <Echosolace> Ok thanks.
09:39:43 <merijn> Echosolace: tbh, I would recommend not trying to write large definitions in ghci, just write it in a file and ":load" it
09:40:01 <Echosolace> Ok, I'll do that.
09:41:52 × st8less quits (~st8less@2603:a060:11fd:0:149e:8518:62e1:ca1b) (Quit: WeeChat 2.7.1)
09:42:38 nlhowell joins (~nlhowell@89.20.140.186)
09:42:39 × lemmih quits (~lemmih@2406:3003:2072:44:508f:7862:5b0d:296) (Read error: Connection reset by peer)
09:42:47 <ski> > "abc" `isPrefixOf` "abdef"
09:42:49 <lambdabot> False
09:42:59 lemmih joins (~lemmih@2406:3003:2072:44:b4a2:1d9:b4d8:a595)
09:43:01 <Echosolace> Ok, now that I've got the search function loaded in my new sandbox.hs file into GHCI, I figure I could run search of "apple" over a list of fruits.
09:43:03 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
09:43:26 <ski> > "abc" `isPrefixOf` "abcdef"
09:43:28 <lambdabot> True
09:44:22 <Echosolace> The meat of this function is:
09:44:23 <Echosolace> foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
09:45:12 <Echosolace> nlen is the length of the word apple, which is why I wonder if this search function could apply...
09:45:28 × CourtneyNZ quits (~CourtneyN@ec2-52-63-156-37.ap-southeast-2.compute.amazonaws.com) (Quit: Leaving)
09:45:35 × shatriff quits (~vitaliish@176.52.219.10) (Ping timeout: 265 seconds)
09:45:49 <ski> if `take nlen x == needle' is true, then we give `True', else we give `acc'
09:46:14 <int-e> any (needle `isPrefixOf`) (tails haystack) <-- what I might write if I didn't know about `isInfixOf`.
09:46:22 shatriff joins (~vitaliish@176.52.219.10)
09:46:28 <ski> so `if take nlen x == needle then True else acc' is true if (and only if) ... ? (something about `take nlen x == needle' and `acc')
09:46:37 <ski> Echosolace : can you fill in the "..." ?
09:47:03 <Echosolace> ... to the search function.
09:47:12 <Echosolace> Err wait... disregard
09:47:42 <Echosolace> nlen of apple is 5.
09:48:50 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:48:58 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
09:49:08 <Echosolace> Oh man, I need some more time... Nevermind.
09:49:56 alp joins (~alp@2a01:e0a:58b:4920:785c:23a0:93c6:f784)
09:53:09 × ffviewer quits (3dded63f@61-222-214-63.HINET-IP.hinet.net) (Remote host closed the connection)
09:53:34 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
09:56:46 × scav quits (sid309693@gateway/web/irccloud.com/x-thdromwvanysldso) ()
09:57:07 scav joins (sid309693@gateway/web/irccloud.com/x-zlttbvsvkfeaapza)
09:57:11 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 265 seconds)
09:57:21 <Echosolace> My search of my fruit over my fruitlist was successful, but my understanding about how the meat of the function progresses is where I am confused... For reference again:
09:57:23 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
09:57:37 <Echosolace> So, foldl is a binomial function.
09:58:03 Tario joins (~Tario@201.192.165.173)
09:58:43 <Echosolace> From LYAH: The binary function is applied between the starting value and the head of the list.
09:59:04 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:59:13 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection)
09:59:15 <Echosolace> So foldl is applying this function to the head of the list:
09:59:16 <Echosolace> (\acc x -> if take nlen x == needle then True else acc
09:59:25 <Echosolace> )
09:59:38 <Echosolace> is that correct?
10:00:01 <ski> Echosolace : not "binomial". you could say "binary", yes
10:00:09 <Echosolace> Oops
10:00:11 <Echosolace> Binary.
10:00:23 coot joins (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl)
10:00:27 <ski> yes, it's first applied to the initial accumulator, and the first element of the list. producing the next version of the accumulator
10:00:56 <ski> then it's applied again, to that accumulator, and the next element of the list, and so on. final version/value of the accumulator is the overall result
10:01:10 Lord_of_Life_ joins (~Lord@46.217.218.115)
10:01:14 dhil joins (~dhil@195.213.192.122)
10:01:27 <Echosolace> Ok... so at first the function is applied to the initial value of False?
10:01:29 <ski> (a binomial is a kind of polynomial)
10:01:41 <ski> yes
10:01:47 <Echosolace> Huh... ok.
10:02:06 ffviewer joins (1bf6c255@27-246-194-85.adsl.fetnet.net)
10:02:46 <ski> take this example
10:02:55 <Echosolace> O god.
10:03:00 <Echosolace> Be gentle.
10:03:25 <ski> you can compare with the implementation of `foldl'
10:03:28 <ski> @src foldl
10:03:28 <lambdabot> foldl f z [] = z
10:03:28 <lambdabot> foldl f z (x:xs) = foldl f (f z x) xs
10:03:47 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
10:04:06 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 246 seconds)
10:04:10 Lord_of_Life_ is now known as Lord_of_Life
10:04:19 <ski> and remember that `[2,3,5,7]' is syntactic sugar for `2:3:5:7:[]' (which means / is parsed as `2:(3:(5:(7:[])))', because `:' is specified as an "right-associative" infix operator)
10:04:37 <Echosolace> I got that last bit at least.
10:04:39 <ski> so, consider a definition like
10:04:50 jamm_ joins (~jamm@unaffiliated/jamm)
10:04:50 × rprije quits (~rprije@110-175-117-18.tpgi.com.au) (Ping timeout: 256 seconds)
10:04:54 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
10:04:56 <ski> sum = foldl (\acc n -> acc + n) 0
10:05:01 <ski> which could even be abbreviated as
10:05:04 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds)
10:05:06 <ski> sum = foldl (+) 0
10:05:16 <ski> now, the example
10:05:21 <Echosolace> Following.
10:05:34 <ski> sum [2,3,5,7]
10:05:45 <ski> = sum (2:3:5:7:[])
10:05:54 <ski> = foldl (+) 0 (2:3:5:7:[])
10:06:04 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
10:06:08 <ski> = foldl (+) (0 + 2) (3:5:7:[])
10:06:17 Tario joins (~Tario@201.192.165.173)
10:06:23 <ski> = foldl (+) 2 (3:5:7:[])
10:06:31 <ski> = foldl (+) (2 + 3) (5:7:[])
10:06:33 <Echosolace> Then 2 + 3 and then the next iteration
10:06:35 <Echosolace> Yep
10:06:36 <ski> = foldl (+) 5 (5:7:[])
10:06:43 <ski> = foldl (+) (5 + 5) (7:[])
10:06:49 <ski> = foldl (+) 10 (7:[])
10:06:56 <ski> = foldl (+) (10 + 7) []
10:07:01 <ski> = foldl (+) 17 []
10:07:04 <ski> = 17
10:07:15 zaquest joins (~notzaques@5.128.210.178)
10:07:20 <Echosolace> Thanks. Although what's tripping me up is involving False as the accumulator.
10:07:28 <Echosolace> (\acc x -> if take nlen x == needle then True else acc)
10:07:44 <ski> so, you're working your way, from the left to the right, combining the initial "seed" / accumulator, with one element at a time, until you've gone through them all
10:07:48 <ski> well
10:08:13 <ski> <ski> if `take nlen x == needle' is true, then we give `True', else we give `acc'
10:08:16 <ski> <ski> so `if take nlen x == needle then True else acc' is true if (and only if) ... ? (something about `take nlen x == needle' and `acc')
10:08:19 <ski> ski> Echosolace : can you fill in the "..." ?
10:08:58 <Echosolace> ?
10:09:05 <Echosolace> Oh
10:09:09 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
10:09:12 <ski> there is a relatively simple way to express it
10:09:30 <Echosolace> I know there's probably a better way to do it, but I'm trying to follow LYAH.
10:10:38 × arguapacha quits (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-133.dsl.bell.ca) (Read error: Connection reset by peer)
10:10:59 <ski> well .. i was intending to try to show what happens with the accumulator, in your case
10:11:05 arguapacha joins (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-133.dsl.bell.ca)
10:11:13 <Echosolace> I think I am approaching an understanding.
10:11:19 <ski> but i think it's be easier to follow, with a more concise expression of the accumulating function
10:11:31 × waskell quits (~quassel@d66-183-124-7.bchsia.telus.net) (Read error: Connection reset by peer)
10:11:47 waskell joins (~quassel@d66-183-124-7.bchsia.telus.net)
10:11:52 <idnar> does something like `[Async a] -> IO (Async a)` exist?
10:11:59 <idnar> err
10:12:08 × ambiso9 quits (~ambiso@209.182.239.205) (Quit: Ping timeout (120 seconds))
10:12:14 <idnar> I mean `[Async a] -> IO (Async [a])`
10:12:26 <ski> you could still do the above "reduction/evaluation trace", for your `if'-`then'-`else' case .. but it'll be a little bit more cluttered
10:12:26 ambiso9 joins (~ambiso@209.182.239.205)
10:12:46 conal_ joins (~conal@ip-66-115-176-174.creativelink.net)
10:13:07 <idnar> `traverse wait` is close but I'd like to fail fast
10:13:16 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
10:14:28 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Ping timeout: 256 seconds)
10:15:24 Guest88073 is now known as lep-delete
10:15:26 lep-delete is now known as Guest88073
10:15:27 Guest88073 is now known as lep-delete
10:15:28 lep-delete is now known as Guest88073
10:17:23 <Echosolace> Ok ok I think I've got it. My only wonder is why tails haystack gets called?
10:17:26 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
10:17:53 <ski> it produces a list of successive tails of the hay stack
10:17:57 <merijn> > tails [1..5]
10:17:59 <lambdabot> [[1,2,3,4,5],[2,3,4,5],[3,4,5],[4,5],[5],[]]
10:18:00 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
10:18:00 <ski> > tails "haystack"
10:18:04 <lambdabot> ["haystack","aystack","ystack","stack","tack","ack","ck","k",""]
10:18:25 <merijn> It is, tbh, a rather inefficient way of doing things, but hey
10:18:42 <ski> then, checking whether such a tail starts with the needle, amounts to checking whether they hay stack contains the needle somewhere
10:19:55 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
10:22:25 <Echosolace> I need to play around some more.
10:24:44 × michalrus quits (m@michalrus.com) (Ping timeout: 265 seconds)
10:25:33 <Echosolace> If I have fruitlist = ["strawberry","green apple","red apple","apple granny"]
10:25:45 <Echosolace> and I search for ["apple"]
10:25:52 <Echosolace> I get False.
10:26:13 <Echosolace> I think this is because:
10:26:17 <Echosolace> take nlen x == needle
10:26:37 <Echosolace> We are taking the length of needle's worth of element x...
10:26:50 <Echosolace> But... I'm kinda surprised.
10:27:07 <Echosolace> nlen of apple is 5.
10:27:09 <merijn> Echosolace: That does a different thing
10:27:13 <merijn> Echosolace: no
10:27:16 <Echosolace> Oh...
10:27:22 <merijn> Echosolace: Or rather, yes, but that's not what you're doing
10:27:33 <merijn> You're taking the length of ["apple"], which is 1
10:27:42 <Echosolace> Ah.
10:27:48 <merijn> It's a list containing one string
10:27:48 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
10:27:56 <Echosolace> Ok I need to go back and rethink a lot one sec.
10:28:08 <merijn> and then you're checking if any of the strings in your other list match "apple" (to which the answer is "no")
10:28:11 stefan-__ joins (~cri@42dots.de)
10:28:19 × jol quits (~jol@jol.dev) (Ping timeout: 246 seconds)
10:28:25 <merijn> Echosolace: Consider the type of search
10:28:37 <merijn> "Eq a => [a] -> [a] -> Bool"
10:28:50 <ski> @let search :: Eq a => [a] -> [a] -> Bool; search needle haystack = foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack) where nlen = length needle
10:28:50 <merijn> it's checking whether the first list appears inside the second one
10:28:51 <lambdabot> Defined.
10:28:53 × cristi_ quits (~cristi@82.76.158.82) (Quit: cristi_)
10:28:58 × bartemius quits (~bartemius@109.252.19.142) (Remote host closed the connection)
10:29:03 <merijn> Does the list ["apple"] occur inside your second list? No
10:29:11 <ski> > search ["apple"] ["strawberry","green apple","red apple","apple granny"]
10:29:12 × cyberlard quits (~cyberlard@unaffiliated/jludwig) (Ping timeout: 256 seconds)
10:29:13 <lambdabot> False
10:29:23 <ski> > search ["green apple"] ["strawberry","green apple","red apple","apple granny"]
10:29:24 <Echosolace> I see that. Thanks.
10:29:26 <lambdabot> True
10:29:27 <merijn> Echosolace: 'search "apple" "apple granny"' otoh should work
10:29:34 michalrus joins (m@michalrus.com)
10:29:36 <ski> > search ["green apple","red apple"] ["strawberry","green apple","red apple","apple granny"]
10:29:37 <lambdabot> True
10:29:57 <ski> > search "apple" "apple granny"
10:30:00 <lambdabot> True
10:30:29 cyberlard joins (~cyberlard@unaffiliated/jludwig)
10:30:43 <lortabac> idnar: if your purpose is running multiple actions concurrently you can use the Applicative instance of Concurrently
10:30:58 m0rphism joins (~m0rphism@HSI-KBW-046-005-177-122.hsi8.kabel-badenwuerttemberg.de)
10:31:44 nicknick joins (75d746c7@117.215.70.199)
10:34:40 worc3131 joins (~quassel@2a02:c7f:c026:9500:a0d2:b9d1:42a4:69b4)
10:34:49 jol joins (~jol@jol.dev)
10:34:52 <Echosolace> Ok I've got that main function body figured out, but in the case of fruitlist = ["strawberry","apple","orange","banana"], I wonder if I search for apple why it wouldn't eventually return false, because after iterating to orange or banana, the accumulator would turn False.
10:35:21 <Echosolace> Right?
10:35:53 <Echosolace> Or wait...
10:36:01 <Echosolace> Once it turns true it's always true.
10:37:06 <Echosolace> I still don't see where tails haystack is called.
10:37:12 <Echosolace> in foldl (\acc x -> if take nlen x == needle then True else acc) False (tails haystack)
10:37:28 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
10:37:38 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
10:38:30 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Remote host closed the connection)
10:38:51 × Lord_of_Life quits (~Lord@46.217.218.115) (Read error: Connection reset by peer)
10:39:03 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
10:39:18 Lord_of_Life joins (~Lord@46.217.218.115)
10:39:18 × Lord_of_Life quits (~Lord@46.217.218.115) (Changing host)
10:39:18 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
10:40:31 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Remote host closed the connection)
10:40:52 × bliminse quits (~bliminse@host109-158-54-87.range109-158.btcentralplus.com) (Ping timeout: 272 seconds)
10:40:52 <nicknick> Is there any bot here who can solve this?
10:40:54 <nicknick> f :: Num a => a -> a -> a
10:41:01 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
10:41:11 <nicknick> I need to convert f :: Num a => a -> a -> a to function.
10:41:23 × alp quits (~alp@2a01:e0a:58b:4920:785c:23a0:93c6:f784) (Ping timeout: 272 seconds)
10:41:36 <ski> f x y = x
10:41:39 <ski> how about that ?
10:42:06 <nicknick> What if it is more complex?
10:42:07 <nicknick> f :: Num a => (a -> a -> a) -> a -> [a] -> [a]
10:42:18 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
10:42:25 <ski> f _ _ _ = []
10:42:52 <nicknick> Ikea rocks :)
10:42:58 <nicknick> Are you God or a bot?
10:43:05 <Echosolace> That's exactly what I was thinking.
10:43:10 <ski> Echosolace : `tails haystack' is called in the last actual parameter of that `foldl' call
10:43:26 <Echosolace> Right, I got that from my most recent error after deleting that segment.
10:43:36 <Echosolace> Thanks.
10:43:39 × babygnu quits (~robert@gateway/tor-sasl/babygnu) (Quit: Leaving)
10:43:42 <ski> (it literally says `tails haystack', there)
10:43:46 <Echosolace> >:t foldl
10:43:52 <ski> @type foldl
10:43:53 <lambdabot> Foldable t => (b -> a -> b) -> b -> t a -> b
10:44:13 <Echosolace> Ok that I have major trouble understanding.
10:44:14 <ski> @type foldl :: (s -> a -> s) -> s -> [a] -> s
10:44:15 <lambdabot> (s -> a -> s) -> s -> [a] -> s
10:44:34 <ski> `s' is the type of the accumulator state. `a' is the element type of the list
10:45:00 <ski> (the version with `Foldable' is more general, in that it can also work over other ordered collections than lists)
10:45:23 × sleepingisfun quits (~sleepingi@168.235.93.188) (Quit: hewwo)
10:45:47 <nicknick> How can I use lambdabot to solve this? f :: Num a => (a -> a -> a) -> a -> [a] -> [a]
10:46:31 <ski> no
10:46:42 bliminse joins (~bliminse@host109-158-26-29.range109-158.btcentralplus.com)
10:46:49 <nicknick> Sad :(
10:47:00 <ski> @djinn (a -> (b,c)) -> (a -> b,a -> c)
10:47:01 <lambdabot> f a =
10:47:01 <lambdabot> (\ b ->
10:47:01 <lambdabot> case a b of
10:47:01 <lambdabot> (c, _) -> c,
10:47:01 <lambdabot> \ d ->
10:47:03 <lambdabot> case a d of
10:47:05 <lambdabot> (_, e) -> e)
10:47:29 <ski> but Djinn doesn't know `Num', nor does it understand recursive data types like `[]'
10:47:39 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
10:48:07 <ski> @djinn (a -> a -> a) -> Maybe a -> Maybe a
10:48:07 <lambdabot> f a b =
10:48:07 <lambdabot> case b of
10:48:08 <lambdabot> Nothing -> Nothing
10:48:10 <lambdabot> Just c -> Just (a c c)
10:48:33 <nicknick> I see.
10:48:34 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
10:48:52 stefan-__ joins (~cri@42dots.de)
10:49:23 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
10:49:56 <nicknick> How can I solve f :: Num a => (a -> a -> c) -> [a] -> [a] -> [c] ? Is that hard?
10:50:12 <olligobber> :t zip
10:50:13 <lambdabot> [a] -> [b] -> [(a, b)]
10:50:18 <olligobber> :t zipWith
10:50:19 <lambdabot> (a -> b -> c) -> [a] -> [b] -> [c]
10:50:39 <nicknick> :t zip or :t zipWith
10:50:40 <lambdabot> error:
10:50:40 <lambdabot> • Couldn't match expected type ‘[a]’
10:50:40 <lambdabot> with actual type ‘t0 Bool -> Bool’
10:50:47 <nicknick> Which is better?
10:50:57 <olligobber> zipWith does what you asked for
10:51:00 <ski> better for what ?
10:51:04 <olligobber> I just forgot that zip doesn't
10:51:45 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
10:51:53 <Echosolace> @type foldl
10:51:54 <lambdabot> Foldable t => (b -> a -> b) -> b -> t a -> b
10:52:20 <Echosolace> Breaking this down, how many parameters are here?
10:52:23 <ski> > zipWith (+) [0,1,2] [30,40,50]
10:52:25 <lambdabot> [30,41,52]
10:52:34 <Echosolace> Is (b -> a -> b) a parameter?
10:52:35 <ski> > liftA2 (+) [0,1,2] [30,40,50]
10:52:36 <lambdabot> [30,40,50,31,41,51,32,42,52]
10:52:44 <ski> Echosolace : it's the type of the first parameter, yes
10:52:53 × Sanchayan quits (~Sanchayan@122.181.211.206) (Quit: leaving)
10:53:00 <olligobber> oh yeah, liftA2 also works
10:53:17 <Echosolace> but b is the first parameter, no?
10:53:22 <ski> no
10:53:26 <Echosolace> Crap.
10:53:26 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
10:53:34 <Echosolace> Where do you see the first parameter?
10:53:39 <nicknick> I think guys didn't understand :) I need a function which satisfies this type signature f :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:53:40 stefan-__ joins (~cri@42dots.de)
10:53:46 <ski> consider
10:53:50 <ski> foldl (+) 0 (2:3:5:7:[])
10:54:03 <Echosolace> Yep.
10:54:11 <olligobber> nicknick, zipWith and liftA2 both have that type signature
10:54:16 <Echosolace> Oh.
10:54:22 <olligobber> well, a supertype of that type signature
10:54:36 <ski> `(+)' has type corrersponding to `b -> a -> b', `0' has type corresponding to `b', and `2:3:5:7:[]' has type corresponding to `t a' (or `[a]' more specifically). result has type `b'
10:55:02 <ski> @type zipWith :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:55:03 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:55:07 <ski> @type liftA2 :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:55:08 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:55:25 <olligobber> but there are other functions with that type signature
10:55:27 <ski> nicknick : both of the offered functions does satisfy that signature
10:55:45 <ski> (but they're more general, does also satisfy other signatures, as well)
10:55:56 <nicknick> What if I have to write |custom| function?
10:55:58 <olligobber> @type (\_ _ _->[]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:55:59 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:56:06 <ski> nicknick : then write a custom function ?
10:56:13 <ski> e.g. the one olligobber suggested
10:57:01 <olligobber> @type (\f x y -> f (sum x) (sum y))
10:57:02 <lambdabot> (Foldable t1, Foldable t2, Num t3, Num t4) => (t3 -> t4 -> t5) -> t1 t3 -> t2 t4 -> t5
10:57:20 alp joins (~alp@2a01:e0a:58b:4920:f968:6025:1be8:4fb9)
10:57:20 <ski> @type let customFunction :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]; customFunction f xs ys = zipWith f ys xs in customFunction
10:57:22 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:57:29 <olligobber> ^
10:57:47 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
10:58:08 <ski> nicknick : there's many different such functions, having the given signature
10:58:08 <olligobber> @type (\f x y -> [f (sum x) (sum y)]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:58:09 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:58:30 <olligobber> there are infinitely many functions with that type
10:58:41 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
10:58:42 × avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:59:04 <ski> Echosolace : in that example, `b' would be `Integer', and `a' would also be `Integer'. in your earlier example, however, `b' would be `Bool'
10:59:39 <olligobber> @type (\f _ _ -> [f 0 0]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:59:40 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
10:59:47 <Echosolace> Ski: Got an ADA address I can tip?
11:00:13 <ski> dunno what that is
11:00:13 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:00:48 <Echosolace> It's a crypto thing. Based on haskell. Big player in the space.
11:00:54 <ski> i see
11:01:04 avoandmayo joins (~textual@122-58-158-238-adsl.sparkbb.co.nz)
11:01:11 <Echosolace> daedaluswallet.io
11:01:55 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
11:02:51 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:03:31 <olligobber> @type (\f _ _ -> f <$> [0..] <*> [0..]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
11:03:33 <lambdabot> error:
11:03:33 <lambdabot> • Could not deduce (Enum a1)
11:03:33 <lambdabot> arising from the arithmetic sequence ‘0 .. ’
11:03:37 <olligobber> -_-
11:03:57 <olligobber> @type (\f _ _ -> f <$> fromInteger [0..] <*> fromInteger [0..]) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
11:03:58 hackage haskoin-core 0.17.0 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.0 (jprupp)
11:03:58 <lambdabot> error:
11:03:58 <lambdabot> • Couldn't match expected type ‘Integer’ with actual type ‘[a0]’
11:03:58 <lambdabot> • In the first argument of ‘fromInteger’, namely ‘[0 .. ]’
11:04:00 <siraben> Are there haskell packages that can help me write an LLVM backend?
11:04:20 Amras joins (~Amras@unaffiliated/amras0000)
11:04:28 <olligobber> @type (\f _ _ -> f <$> (fromInteger <$> [0..]) <*> (fromInteger <$> [0..])) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c]
11:04:29 <lambdabot> Num a => (a -> a -> c) -> [a] -> [a] -> [c]
11:05:11 <nicknick> Okay okay :D
11:05:16 <nicknick> You guys rock
11:05:26 × Velpoman quits (~Velpoman@159.65.76.124) (Remote host closed the connection)
11:05:34 <dminuoso> siraben: What exactly are your intentions?
11:06:03 × avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:06:19 <nicknick> But what is things are simple? Like what is I need a function implementation for type signature f :: Num a => a -> [a] -> a
11:06:31 <nicknick> is = if
11:06:34 <nicknick> if = is
11:06:36 <siraben> dminuoso: I'd like to create an LLVM backend for the https://trigraph.net/powdertoy/R216/manual.md computer
11:06:36 <siraben> Or a simpler arch, just to learn
11:06:46 <olligobber> :t const :: Num a => a -> [a] -> a
11:06:47 <lambdabot> Num a => a -> [a] -> a
11:06:50 thir joins (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
11:07:05 <olligobber> :t const (const 0) :: Num a => a -> [a] -> a
11:07:06 <lambdabot> Num a => a -> [a] -> a
11:07:23 <siraben> nicknick: you can easily find functions that exhibit a given type (provided it's possible to do so), but these functions may not be equivalent
11:07:34 random joins (~random@185.219.70.106)
11:07:35 <olligobber> :t (\_ -> sum) :: Num a => a -> [a] -> a
11:07:36 <lambdabot> Num a => a -> [a] -> a
11:07:57 <olligobber> siraben, it's always possible to
11:08:03 <olligobber> :t undefined :: a -> b
11:08:04 <lambdabot> a -> b
11:08:11 <siraben> lol
11:08:12 × raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal)
11:08:26 <random> hey guys
11:08:31 <random> what was the name of that monad tutorial
11:08:39 mirrorbird joins (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
11:08:39 <random> where you did like 5 examples
11:08:45 <random> and eventually you arrived at monads in the end
11:08:54 × alx741 quits (~alx741@186.178.110.244) (Ping timeout: 260 seconds)
11:09:23 <nicknick> Can we do better than onst (const 0)
11:09:33 <nicknick> Better than const (const 0)
11:09:38 Clint squints.
11:09:54 <siraben> nicknick: what is your intention here? you just want any function that has that type?
11:09:56 <olligobber> what makes one function better than another?
11:09:56 <ski> can you qualify "better" more ?
11:10:04 <nicknick> Any fucntion
11:10:12 <nicknick> Should look like a gentleman
11:10:19 <siraben> ?
11:10:26 <siraben> :t undefined :: Num a => a → [a] → a
11:10:28 <lambdabot> Num a => a -> [a] -> a
11:10:29 <ski> then `const (const undefined)' should suffice, right ?
11:10:33 <olligobber> :t (\_ _ -> sum $ fromInteger <$> [0..]) :: Num a => a -> [a] -> a
11:10:34 <lambdabot> Num a => a -> [a] -> a
11:10:34 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 256 seconds)
11:10:38 Wuzzy joins (~Wuzzy@p5790ef06.dip0.t-ipconnect.de)
11:10:56 <siraben> dminuoso: did that clarify my intentions?
11:11:18 × thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
11:11:36 <siraben> :t (\x y → x <$ y) :: Num a => a → [a] → a
11:11:37 <lambdabot> error:
11:11:37 <lambdabot> • Occurs check: cannot construct the infinite type: a1 ~ [a1]
11:11:37 <lambdabot> • In the expression: x <$ y
11:11:54 × xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 272 seconds)
11:12:06 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
11:12:19 <olligobber> :t (\x y -> sum $ x <$ y) :: Num a => a -> [a] -> a
11:12:21 <lambdabot> Num a => a -> [a] -> a
11:12:25 <siraben> Of course.
11:13:28 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 246 seconds)
11:14:23 Tario joins (~Tario@201.192.165.173)
11:14:37 <nicknick> How can I get a step-by-step solution for \f x y -> [f (sum x) (sum y)]
11:14:51 <ski> what do you mean ?
11:15:04 × ffviewer quits (1bf6c255@27-246-194-85.adsl.fetnet.net) (Ping timeout: 245 seconds)
11:15:30 <olligobber> what is a solution?
11:15:40 <nicknick> Like
11:15:45 <nicknick> How we arrived at this?
11:16:07 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
11:16:58 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 272 seconds)
11:17:01 <ski> we have two lists of numbers of type `a'. we want a list of `c's. `f' can turn two `a's into a `c'. if we sum the two lists, and pass the sums to `f', we get a `c', which we can put in a list so that we get something of the appropriate/expected result type
11:18:23 <ski> of course, we could have taken the product instead, or something else entirely ..
11:18:28 hackage haskoin-node 0.17.0 - P2P library for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-node-0.17.0 (jprupp)
11:19:22 × kritzefitz quits (~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
11:23:20 <nicknick> How can we justify that const (const undefined) satisfies Num a => a -> [a] -> a?
11:24:15 × polyrain quits (~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:24:34 <ski> `const' has type `a -> ([a] -> a)' and `undefined' has type `a', so `const undefined' has type `[a] -> a'
11:25:09 × Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 265 seconds)
11:25:11 <ski> `const' also has type `([a] -> a) -> (a -> [a] -> a)', so `const (const undefined)' has type `a -> [a] -> a'
11:25:45 <ski> further, we can always add more (unused/useless) constraints on type variables, so `const (const undefined)' also has type `Num a => a -> [a] -> a'
11:27:15 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
11:27:38 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds)
11:28:01 Tario joins (~Tario@201.192.165.173)
11:28:11 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:29:53 × karanlikmadde quits (~karanlikm@2a01:c22:b046:2a00:715c:4cac:e6ca:b78) (Quit: karanlikmadde)
11:31:34 whatisRT joins (~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699)
11:32:26 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds)
11:32:40 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
11:32:55 kritzefitz joins (~kritzefit@2003:5b:203b:200::10:49)
11:33:50 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
11:33:57 <nicknick> If we apply some (but not all)of the arguments to a function, what kind of function do we get as a result?
11:34:55 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
11:35:04 <ski> all functions in Haskell take exactly one input parameter/argument
11:35:54 <nicknick> What if it is a custom function?
11:35:58 hackage dirichlet 0.1.0.0 - Multivariate dirichlet distribution https://hackage.haskell.org/package/dirichlet-0.1.0.0 (dschrempf)
11:36:08 <ski> so e.g. `take :: Int -> [a] -> [a]' really means `take :: Int -> ([a] -> [a])', and `take 3 "abcdefgh"' really means `(take 3) "abcdefgh"'
11:36:14 <ski> doesn't matter
11:36:27 <ski> > take 3 "abcdefgh"
11:36:29 <lambdabot> "abc"
11:36:35 <ski> > map (take 3) (tails "abcdefgh")
11:36:38 <lambdabot> ["abc","bcd","cde","def","efg","fgh","gh","h",""]
11:36:45 machinedgod joins (~machinedg@24.105.81.50)
11:37:16 <ski> `take 3' is a function that, when given a list as input, will give the list of the first three elements of that list (or less, if there wasn't three elements available)
11:37:16 <nicknick> If we apply some (but not all)of the arguments to a function, what kind of function do we get as a result? ONE WORD ANSWER?
11:37:39 <nicknick> what kind of function?
11:38:12 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:38:22 <ski> one sometimes says that one gets a "partially applied" function. but that's not a property of the function itself, but rather of the way one arrived at it
11:39:38 <ski> > elem 'c' "abcd"
11:39:40 <lambdabot> True
11:39:42 <ski> > elem 'e' "abcd"
11:39:45 <lambdabot> False
11:40:08 <ski> @let elemAbcd x = elem x "abcd"
11:40:09 <lambdabot> Defined.
11:40:16 <ski> > elemAbcd 'b'
11:40:19 <lambdabot> True
11:40:33 <ski> one could claim that `elemAbcd' is a partial application of `elem'
11:42:56 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
11:46:15 polyrain joins (~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c)
11:46:51 × nicknick quits (75d746c7@117.215.70.199) (Remote host closed the connection)
11:48:32 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:51:24 totallynotnate is now known as notnatebtw
11:51:27 × borne quits (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
11:51:49 borne joins (~fritjof@muedsl-82-207-207-196.citykom.de)
11:51:59 danvet joins (~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453)
11:52:11 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
11:52:35 × danvet quits (~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453) (Client Quit)
11:52:35 bartemius joins (~bartemius@109-252-19-142.nat.spd-mgts.ru)
11:53:00 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
11:57:38 × haasn quits (~nand@mpv/developer/haasn) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
11:57:59 haasn joins (~nand@mpv/developer/haasn)
11:58:42 cristi_ joins (~cristi@82.76.158.82)
11:58:43 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:59:03 nbloomf joins (~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24)
11:59:25 geekosaur joins (ac3a3eb0@172.58.62.176)
11:59:34 × cristi_ quits (~cristi@82.76.158.82) (Remote host closed the connection)
12:00:02 × tlockney quits (~tlockney@185.204.1.185) ()
12:01:00 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) (Ping timeout: 246 seconds)
12:01:27 × mirrorbird quits (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Quit: Leaving)
12:02:07 × Echosolace quits (~Echosolac@p790105-ipngn4101hiraide.tochigi.ocn.ne.jp) (Ping timeout: 246 seconds)
12:03:13 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
12:04:40 urodna joins (~urodna@unaffiliated/urodna)
12:06:49 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
12:06:49 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
12:06:49 GyroW_ joins (~GyroW@unaffiliated/gyrow)
12:08:01 darjeeli1 joins (~darjeelin@122.245.123.118)
12:08:16 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds)
12:08:29 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
12:09:15 ixlun joins (~matthew@213.205.241.94)
12:10:26 <ixlun> Hi all, I was wondering if anyone knew of a way of making an equivalent of swapMVar, swapMVar_ :: MVar a -> a -> IO ()
12:10:37 <ixlun> I tried `void . swapMVar'
12:10:58 <ixlun> but that ends up somehow getting rid of the IO monad
12:11:10 <ixlun> :t void . swapMVar
12:11:11 <lambdabot> error:
12:11:11 <lambdabot> Variable not in scope: swapMVar :: a -> f a0
12:11:15 <merijn> ixlun: Yes, because swapMVar takes two arguments, not 1
12:11:25 nicknick joins (75d746c7@117.215.70.199)
12:11:28 <[exa]> ixlun: you need the magical (.).(.) operator
12:11:32 <merijn> ixlun: So it's inferring that you're using the Monad instance of functions
12:11:40 iMonad joins (1bf6c255@27-246-194-85.adsl.fetnet.net)
12:11:46 <nicknick> I need an explanation for a0 n xs = foldr (^) n xs
12:11:48 <merijn> or just, you know, using a variable name
12:12:07 <[exa]> merijn: so pointful
12:12:17 <merijn> nicknick: You should probably start by saying where you get confused :)
12:12:24 <nicknick> What is a0 n xs = foldr (^) n xs doing?
12:12:50 <ski> @type ((() <$) .) . Control.Concurrent.MVar.swapMVar
12:12:51 <lambdabot> GHC.MVar.MVar b -> b -> IO ()
12:13:13 <ixlun> merijn: What's the magical operator you mention above? I can't seem to hoogle that one
12:13:32 <nicknick> Please tell me: What is a0 n xs = foldr (^) n xs doing?
12:13:42 raichoo joins (~raichoo@dslb-084-062-114-218.084.062.pools.vodafone-ip.de)
12:13:49 <ski> nicknick : `a0 2 [3,4,5] = 3 ^ (4 ^ (5 ^ 2))'
12:14:16 × random quits (~random@185.219.70.106) (Quit: Leaving)
12:14:23 coot_ joins (~coot@37.30.49.141.nat.umts.dynamic.t-mobile.pl)
12:14:29 <ski> @let infixr 9 .:; (.:) :: (c0 -> c1) -> (a -> b -> c0) -> (a -> b -> c1); (.:) = (.) . (.)
12:14:31 <lambdabot> Defined.
12:14:43 <merijn> ixlun: I didn't mention it and you shouldn't use it, tbh
12:14:47 <ski> @type (() <$) .: Control.Concurrent.MVar.swapMVar
12:14:48 <lambdabot> GHC.MVar.MVar b -> b -> IO ()
12:15:41 <[exa]> ixlun: take a look at type of (.) and compare with (.).(.) (or with the one that ski just defined)
12:15:50 × coot quits (~coot@37.30.49.255.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds)
12:15:51 coot_ is now known as coot
12:17:46 <ixlun> :t (.) . (.)
12:17:47 <lambdabot> (b -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c
12:17:56 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
12:18:13 <iMonad> hi, guys. I have a trouble with monad transformer.
12:18:23 karanlikmadde joins (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9)
12:18:34 <iMonad> I am following the wikibook MaybeT example
12:18:42 <iMonad> newtype MaybeT m a = MaybeT { runMaybeT :: m (Maybe a) }
12:18:49 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
12:18:57 <iMonad> instance Monad m => Monad (MaybeT m) where return = MaybeT . return . Just
12:18:59 coot_ joins (~coot@37.30.51.114.nat.umts.dynamic.t-mobile.pl)
12:19:12 <iMonad> but it can't compile
12:19:39 <iMonad> it says
12:19:40 <iMonad> • Could not deduce (Applicative (MaybeT m)) arising from the superclasses of an instance declaration from the context: Monad m bound by the instance declaration at main.hs:4:10-36 • In the instance declaration for ‘Monad (MaybeT m)’ |4 | instance Monad m => Monad (MaybeT m) where
12:19:53 <[exa]> iMonad: please pastebin the longer messages
12:20:13 <ski> you need to make an `Applicative' (and a `Functor') instance, as well
12:20:14 × Stanley00 quits (~stanley00@unaffiliated/stanley00) ()
12:20:41 <[exa]> ixlun: anyway, your composed function has 2 parameters, which in the type here have types 'a1' and 'a2'.
12:20:45 ski thought that wasn't too bad
12:20:46 <geekosaur> this is a ghc-specific chaneg from standard Haskell, which is why the wikibook doesn't tlk about it
12:22:02 kyprizel joins (~kyprizel@185.204.1.185)
12:22:14 <ski> iMonad : for the time being, if you don't want to bother with it right now, you could just make empty instances
12:22:22 × coot quits (~coot@37.30.49.141.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 260 seconds)
12:23:02 <ski> instance Monad m => Functor (MaybeT m)
12:23:04 <ski> where
12:23:11 <ski> fmap = liftM
12:23:23 <ski> instance Monad m => Applicative (MaybeT m)
12:23:25 <ski> where
12:23:29 <ski> pure = return
12:23:34 <ski> (<*>) = ap
12:23:38 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
12:23:49 <ski> would also work, as default implementations, in terms of your `Monad' instance
12:24:36 × coot_ quits (~coot@37.30.51.114.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 265 seconds)
12:24:55 <ski> (however, it would be better to have `Functor f => Functor (MaybeT f)' and `Applicative i => Applicative (MaybeT i)'. but that requires you to do the work of actually implementing those instances "properly", rather than just deferring to the `Monad' instance)
12:24:59 <ski> iMonad ^
12:25:43 <ski> (to clarify, by "empty instances", i mean just skipping the `where', and the method implementation(s) after it)
12:27:09 <iMonad> @ski what is "ap" comes from ?
12:27:09 <lambdabot> Maybe you meant: wiki src ask
12:27:23 × nicknick quits (75d746c7@117.215.70.199) (Remote host closed the connection)
12:27:30 <iMonad> My ghc complain that is not in scope
12:27:34 <ski> @index ap
12:27:35 <lambdabot> Control.Monad
12:27:56 <ski> it (and `liftM') is defined in terms of `return' and `(>>=)'
12:27:58 hackage haskoin-store-data 0.38.0 - Data for Haskoin Store https://hackage.haskell.org/package/haskoin-store-data-0.38.0 (jprupp)
12:28:09 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
12:28:28 <ski> so, by defining `(<*>)' as `ap', that makes it call your `return' and `(>>=)' implementations, in your `Monad (MaybeT m)' instance
12:28:37 <iMonad> Oh, it works
12:28:57 hackage haskoin-store 0.38.0 - Storage and index for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-store-0.38.0 (jprupp)
12:29:01 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:6cd0:22a:1738:5d24) (Quit: Textual IRC Client: www.textualapp.com)
12:29:07 <ski> iMonad : now for `(>>=)' ?
12:29:26 × taurux quits (~taurux@net-188-216-37-204.cust.vodafonedsl.it) (Ping timeout: 265 seconds)
12:30:19 <iMonad> wiki example works
12:30:24 <ixlun> Out of interest, what's people's opinion on what's better: `foo . bar . baz $ a' or `foo $ bar $ baz a'?
12:30:51 cods joins (~fred@tuxee.net)
12:30:57 <merijn> ixlun: THe former is better
12:30:58 <ski> ixlun : the former
12:30:58 <geekosaur> the former
12:31:08 <merijn> Because repeated . is more easily refactored
12:31:12 × cods quits (~fred@tuxee.net) (Changing host)
12:31:12 cods joins (~fred@unaffiliated/cods)
12:31:16 <ski> ixlun : or `(foo . bar . baz) a' or `foo (bar (baz a))'
12:31:24 taurux joins (~taurux@net-188-218-229-119.cust.vodafonedsl.it)
12:31:36 <ski> (i'd prefer any of those three, to the latter you mentioned)
12:31:41 <iMonad> if i understand correctly, monad transformer is just combine multiple monad into single one
12:32:15 <ski> iMonad : it takes a(ny) monad and adds another (specific) "monad capability" to it
12:32:40 <ski> (it does not combine any two arbitrary monads)
12:33:03 <ixlun> Cool, I'll start to write in that method - coming from an imperative background it takes a while to rewire the brain!
12:33:19 <ski> it does, but it's worth it :)
12:34:00 <ski> it's only to expected that learning a new programming paradigm takes more time than learning yet another language in a paradigm one knows. it's a bit more like learning to program from scratch all over again
12:35:03 <iMonad> @ski thanks for you explanation
12:35:03 <lambdabot> Maybe you meant: wiki src ask
12:35:03 <ski> (imho it helps to set aside what you know abour programming, so far. you can compare later, when you have some more solid foundations under your belt. unlearning old habits and trains of thought can take time / be tricky)
12:36:15 <ski> iMonad : no problem :)
12:36:19 <iMonad> but why we need to instance other types here ? it is not enouth to just instance a monad ?
12:36:21 Iwawa joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
12:36:35 <ixlun> ski: agreed - that's why I think so far I've enjoyed learning Haskell more than another language. It's a completely new way to think about things
12:36:58 <ski> because the type class `Monad' was changed to have `Applicative' as superclass. so every instance of `Monad' is required to already be an instance of `Applicative' (which in turn requires `Functor')
12:37:25 <ski> however (as you saw), it's possible to use default implementations of `Applicative' (and `Functor') in terms of the `Monad' instance you're writing
12:38:08 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds)
12:38:16 <ski> (if one only wants to write an `Applicative' instance, where `Monad' is undesirable or not sensible, one can use `fmap = liftA' for the `Functor' instance, to make it defer to the `Applicative' instance, instead)
12:38:28 xerox_ joins (~xerox@unaffiliated/xerox)
12:39:54 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
12:40:04 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
12:40:31 <ixlun> I've always found that the best way to learn something new is to write it too, I'm not one for reading a whole book and then diving in.
12:40:42 <ixlun> I like to learn as I go
12:40:45 Guest88073 is now known as lep-delete
12:41:18 <ski> iMonad : btw, fwiw, it's not IRC convention/custom to adorn nicknames by sigils (like `@'). if you want to refer to, or address, someone, simply mention their nickname. in the latter case, e.g. by starting the message with the nickname, followed by a comma or a colon, and then the bulk of the message
12:42:18 <iMonad> oh, sorry about that
12:42:24 <iMonad> I am every new to irc
12:42:33 <iMonad> *very*
12:42:54 mirrorbird joins (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1)
12:42:56 <ski> many IRC clients will highlight/alert the user, in case their nickname is mentioned, first thing in a message. (not as many will, i think, highlight when it's mentioned anywhere else in a message). so, if you place `@' in front, then the nickname is not the first thing, and highlight might not happen
12:43:27 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
12:43:40 <ski> (also, `@' means something else, on IRC, namely that someone is a channel operator. however, i'd not suggest referring to operators by prefixing their names by `@', either)
12:43:48 <ski> iMonad : no worry, just informing you
12:44:24 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
12:44:32 × ericsagnes quits (~ericsagne@2405:6580:0:5100:a175:4dc7:93af:b055) (Ping timeout: 260 seconds)
12:44:44 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
12:45:19 <ixlun> Where would people suggest is the best place to look for critique on a project that I'm writing?
12:46:41 <[exa]> ixlun: users! :D
12:46:42 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
12:47:35 <[exa]> ixlun: nevermind users, if you can extract something short enough, kindof self-contained, and pastebin it, you can get a lot of feedback from #haskell
12:47:36 cristi joins (~cristi@82.76.158.82)
12:48:30 × ski quits (~ski@nc-2504-30.studat.chalmers.se) (Ping timeout: 260 seconds)
12:48:51 × cristi quits (~cristi@82.76.158.82) (Remote host closed the connection)
12:49:14 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
12:49:43 × nlhowell quits (~nlhowell@89.20.140.186) (Ping timeout: 246 seconds)
12:50:27 ski joins (~ski@nc-2504-30.studat.chalmers.se)
12:51:00 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
12:51:24 notnatebtw joins (~nate@110.138.18.157)
12:53:24 × notnatebtw quits (~nate@110.138.18.157) (Client Quit)
12:53:48 notnatebtw joins (~nate@110.138.18.157)
12:53:48 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
12:54:11 stefan-__ joins (~cri@42dots.de)
12:56:35 ericsagnes joins (~ericsagne@2405:6580:0:5100:3856:125a:3130:f979)
12:56:37 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
12:56:47 GyroW joins (~GyroW@d54C03E98.access.telenet.be)
12:56:47 × GyroW quits (~GyroW@d54C03E98.access.telenet.be) (Changing host)
12:56:48 GyroW joins (~GyroW@unaffiliated/gyrow)
12:57:01 × notnatebtw quits (~nate@110.138.18.157) (Client Quit)
12:57:23 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
12:57:28 notnatebtw joins (~nate@110.138.18.157)
13:04:12 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
13:04:33 notnatebtw joins (~nate@110.138.18.157)
13:08:29 Sanchayan joins (~Sanchayan@122.181.211.206)
13:09:38 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
13:11:33 Deide joins (~Deide@217.155.19.23)
13:11:55 <hyperisco> wher am I supposed to put my cradle config? I have it in the root of my project and the IDE does not find it
13:12:04 × shafox quits (~shafox@106.51.234.111) (Ping timeout: 256 seconds)
13:13:04 <Uniaika> ah well that's a proble
13:13:06 <Uniaika> *problem
13:13:25 <Uniaika> hyperisco: note that if you don't require anything fancy/weird, the new HLS uses implicit-hie to generate a cradle config for you
13:14:12 <hyperisco> I keep getting warnings over and over that it is using implicit cradle
13:14:16 <hyperisco> I just want those warnings to go away
13:17:48 shafox joins (~shafox@106.51.234.111)
13:19:14 × carlomagno1 quits (~cararell@148.87.23.6) (Remote host closed the connection)
13:22:31 <ixlun> [exa]: Yeah I may paste it on here at some point when it's ready. It probably won't fit into a paste bin though; I've got it up on GitHub
13:23:57 × Buntspecht quits (~user@unaffiliated/siracusa) (Quit: Bye!)
13:24:31 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
13:24:39 <[exa]> even links to github projects got good comments (biased by the readme&docs though :] )
13:24:53 <[exa]> btw what's the project about?
13:25:34 <ixlun> It's a chess engine - I've been working on it for about a month
13:25:58 <ixlun> I've just got it to the point where I can now play against it
13:26:18 <ixlun> I'm now looking at trying to improve it's strength
13:26:27 × kritzefitz quits (~kritzefit@2003:5b:203b:200::10:49) (Remote host closed the connection)
13:28:19 <hyperisco> just had the thought this morning that programs have more interesting terms than types because programs are more interested in how than what
13:28:45 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
13:28:47 <[exa]> hyperisco: you need how-types
13:29:04 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds)
13:29:09 <[exa]> ixlun: that's cool, what kind of AI is there?
13:29:23 × nyaomi quits (~naomi@cpe-74-75-6-125.maine.res.rr.com) (Excess Flood)
13:29:40 <[exa]> (need to disappear for ~2 hours, teaching)
13:29:52 knupfer joins (~Thunderbi@200116b82c30ba006c535bfffe9504ba.dip.versatel-1u1.de)
13:29:53 × knupfer quits (~Thunderbi@200116b82c30ba006c535bfffe9504ba.dip.versatel-1u1.de) (Client Quit)
13:30:00 <ixlun> For now just alpha-beta search
13:30:08 <ixlun> cool, have fun!
13:30:09 knupfer joins (~Thunderbi@i59F7FF96.versanet.de)
13:31:27 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
13:31:27 <hyperisco> we need what-programs
13:31:48 <hyperisco> though they wouldn't really be programs
13:31:57 kaychaks_riot joins (kaychaksma@gateway/shell/matrix.org/x-ytbtoyjbxfietmdi)
13:32:49 nyaomi joins (~naomi@cpe-74-75-6-125.maine.res.rr.com)
13:35:09 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
13:36:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
13:36:56 × kish quits (~oracle@unaffiliated/oracle) (Remote host closed the connection)
13:39:25 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
13:39:45 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 240 seconds)
13:39:56 alx741 joins (~alx741@181.196.68.73)
13:40:34 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
13:41:29 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 258 seconds)
13:46:59 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
13:46:59 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
13:46:59 GyroW_ joins (~GyroW@unaffiliated/gyrow)
13:47:14 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 258 seconds)
13:48:28 fendor_ joins (~fendor@91.141.3.69.wireless.dyn.drei.com)
13:49:33 <jophish> Why doesn't Setup.hs seem to support v2 commands?
13:50:14 <jophish> (using defaultMain from Distribution.Simple)
13:50:28 <merijn> jophish: Because v2- is part of cabal-install, Setup.hs is not
13:50:36 <merijn> Setup.hs is part of Cabal
13:50:58 × fendor quits (~fendor@91.141.2.147.wireless.dyn.drei.com) (Ping timeout: 246 seconds)
13:51:00 ystael joins (~ystael@209.6.50.55)
13:51:13 <merijn> IOW, that's "working as intended"
13:51:38 <merijn> jophish: Setup.hs commands don't do the same thing as the (pre-v2) cabal-install commands either
13:52:29 waterquarks joins (b306d9a1@179.6.217.161)
13:52:40 × geekosaur quits (ac3a3eb0@172.58.62.176) (Remote host closed the connection)
13:52:56 × elliott_ quits (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Read error: Connection reset by peer)
13:53:16 elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net)
13:53:24 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds)
13:53:45 × waterquarks quits (b306d9a1@179.6.217.161) (Remote host closed the connection)
13:54:58 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
13:55:28 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
13:56:55 jamm_ joins (~jamm@unaffiliated/jamm)
13:56:57 hackage effet 0.3.0.2 - An Effect System based on Type Classes https://hackage.haskell.org/package/effet-0.3.0.2 (MichaelSzvetits)
13:57:41 carlomagno joins (~cararell@148.87.23.9)
13:59:37 × xff0x quits (~fox@2001:1a81:529c:a900:daf5:f598:3241:4d8d) (Ping timeout: 272 seconds)
13:59:44 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
14:00:04 xff0x joins (~fox@2001:1a81:529c:a900:6b08:6f66:959:4c93)
14:01:17 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
14:01:59 <jophish> so I'm finding out!
14:02:04 <jophish> thanks, merijn
14:03:42 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
14:03:47 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
14:05:08 <merijn> jophish: You should probably just use cabal-install unless you have a very good reason not too :p
14:05:30 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
14:05:33 coot joins (~coot@37.30.52.15.nat.umts.dynamic.t-mobile.pl)
14:06:49 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
14:06:56 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
14:07:10 × Iwawa quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 258 seconds)
14:07:14 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-vawwmlggjqdnzjxh) (Quit: Connection closed for inactivity)
14:07:22 <jophish> merijn: this is taking place inside a nix derivation, where cabal-install is not available
14:08:57 texasmynsted joins (~texasmyns@104.140.52.83)
14:09:16 <merijn> ah
14:09:16 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
14:09:32 texasmyn_ joins (~texasmyns@104.140.52.83)
14:09:40 stefan-__ joins (~cri@42dots.de)
14:09:41 × texasmynsted quits (~texasmyns@104.140.52.83) (Read error: Connection reset by peer)
14:09:42 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
14:09:52 <merijn> You'd have to reverse engineer how v2-build calls Setup.hs
14:09:59 <merijn> (because that's what's happening)
14:10:04 × iMonad quits (1bf6c255@27-246-194-85.adsl.fetnet.net) (Remote host closed the connection)
14:10:06 <merijn> But...uh...good luck with that :p
14:10:52 <jophish> yeah :) O
14:11:06 <jophish> I'm not gonna do that, I'll make do with the commands here :)
14:11:35 christo joins (~chris@81.96.113.213)
14:12:27 <merijn> jophish: Naah, my point was that (eventually) v2- commands end up just calling into the Setup.hs with specific arguments
14:12:40 <merijn> So you should be able to mimic the v2- commands
14:13:11 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
14:14:21 × conal_ quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
14:16:30 × knupfer quits (~Thunderbi@i59F7FF96.versanet.de) (Quit: knupfer)
14:16:33 knupfer1 joins (~Thunderbi@200116b82c30ba00dc0ee51bcc5b4ee2.dip.versatel-1u1.de)
14:16:49 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
14:16:55 × ulidtko quits (~ulidtko@193.111.48.79) (Remote host closed the connection)
14:17:20 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
14:17:32 conal joins (~conal@ip-66-115-176-174.creativelink.net)
14:18:56 knupfer1 is now known as knupfer
14:19:30 polyrain_ joins (~polyrain@58.161.83.164)
14:19:47 × deadk quits (e@freenode/staff/spy.edk) (Quit: edk)
14:20:09 × polyrain_ quits (~polyrain@58.161.83.164) (Read error: Connection reset by peer)
14:20:49 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
14:21:47 × Klumben quits (Nsaiswatch@gateway/shell/panicbnc/x-qfyvvmfvccqnqxdf) (Ping timeout: 272 seconds)
14:22:25 × polyrain quits (~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c) (Ping timeout: 240 seconds)
14:22:54 × xacktm quits (xacktm@gateway/shell/panicbnc/x-rthkywgvxahgrnnf) (Ping timeout: 244 seconds)
14:23:08 × SolarAquarion quits (SolarAquar@gateway/shell/panicbnc/x-wdutgpsghohoucfq) (Ping timeout: 260 seconds)
14:23:45 knupfer1 joins (~Thunderbi@i59F7FF96.versanet.de)
14:23:51 st8less joins (~st8less@2603:a060:11fd:0:dd24:d259:2e39:f97e)
14:25:07 polyrain joins (~polyrain@2001:8003:e501:6901:5473:8418:3e33:a31a)
14:28:20 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
14:28:23 × knupfer quits (~Thunderbi@200116b82c30ba00dc0ee51bcc5b4ee2.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
14:28:23 knupfer1 is now known as knupfer
14:29:06 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
14:31:24 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
14:31:51 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
14:32:21 <texasmyn_> Maybe I am misremembering or perhaps wishful thinking, but I thought there was a way to tell hlint to give more advice. Is there?
14:32:26 shatriff joins (~vitaliish@176.52.219.10)
14:33:52 × texasmyn_ quits (~texasmyns@104.140.52.83) ()
14:34:11 texasmynsted joins (~texasmyns@104.140.52.83)
14:34:34 × shafox quits (~shafox@106.51.234.111) (Ping timeout: 256 seconds)
14:35:11 <texasmynsted> Hmm I think my message was killed by the server because of my nick.
14:35:46 <texasmynsted> Is there a way to get more help from hlint? Example: Maybe somebody has a list of extra rules the apply?
14:36:41 <texasmynsted> I would like it to say "snd <$> is the same as snds", if it actually is. Heh
14:39:48 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:40:08 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
14:40:28 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Client Quit)
14:41:11 berberman_ joins (~berberman@unaffiliated/berberman)
14:41:17 christo joins (~chris@81.96.113.213)
14:42:03 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
14:42:39 × berberman_ quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded)
14:43:47 berberman joins (~berberman@unaffiliated/berberman)
14:45:15 × berberman quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded)
14:45:21 × Lowl3v3l quits (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de) (Remote host closed the connection)
14:45:37 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:45:43 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
14:45:47 berberman joins (~berberman@unaffiliated/berberman)
14:45:55 shafox joins (~shafox@106.51.234.111)
14:47:16 deadk joins (e@freenode/staff/spy.edk)
14:47:18 × berberman quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded)
14:47:44 berberman joins (~berberman@unaffiliated/berberman)
14:48:04 × Lowl3v3l quits (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de) (Read error: Connection reset by peer)
14:48:50 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de)
14:51:17 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
14:51:32 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 265 seconds)
14:53:28 invaser joins (~Thunderbi@31.148.23.125)
14:54:07 __skn- joins (~sunil@2001:19f0:5:701:5400:ff:fe7c:4e5c)
14:56:00 ddellacosta joins (~dd@86.106.121.168)
14:56:37 × __skn quits (~sunil@sec.nimmagadda.net) (Ping timeout: 264 seconds)
14:58:14 × kori quits (~kori@arrowheads/kori) (Read error: Connection reset by peer)
15:00:02 × kyprizel quits (~kyprizel@185.204.1.185) ()
15:02:33 × jlamothe quits (~jlamothe@dev.jlamothe.net) (Quit: leaving)
15:02:35 kori joins (~kori@arrowheads/kori)
15:04:33 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
15:06:38 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit)
15:07:00 × __skn- quits (~sunil@2001:19f0:5:701:5400:ff:fe7c:4e5c) (Quit: ZNC 1.8.2 - https://znc.in)
15:07:05 z0 joins (~z0@bl15-167-204.dsl.telepac.pt)
15:07:42 __skn joins (~sunil@sec.nimmagadda.net)
15:07:46 mananamenos_ joins (~mananamen@84.122.202.215.dyn.user.ono.com)
15:08:21 thir joins (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de)
15:08:23 DavidEichmann joins (~david@43.240.198.146.dyn.plus.net)
15:09:21 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
15:10:09 <z0> does haskell optimize something like (last . takeWhile) not to traverse a list twice?
15:11:43 × __skn quits (~sunil@sec.nimmagadda.net) (Client Quit)
15:11:56 × mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 272 seconds)
15:12:02 __skn joins (~sunil@2001:19f0:5:701:5400:ff:fe7c:4e5c)
15:12:27 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
15:12:30 × thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
15:12:43 × karanlikmadde quits (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9) (Quit: karanlikmadde)
15:13:27 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
15:14:03 <merijn> z0: That's not even really optimisation, that happens automatically from laziness
15:15:00 <z0> thanks. just making sure
15:15:13 × bind quits (~bind@unaffiliated/bind) (Ping timeout: 264 seconds)
15:15:26 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
15:17:34 bind joins (~bind@unaffiliated/bind)
15:18:07 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
15:19:28 Iwawa joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
15:20:08 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
15:20:46 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
15:21:02 erolm_a joins (~erolm_a@62.19.60.223)
15:21:15 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection)
15:22:05 × dwt quits (~dwt@c-98-200-58-177.hsd1.tx.comcast.net) (Ping timeout: 240 seconds)
15:22:42 <Cheery> Realising monads are constructing some sort of linear logic.
15:22:52 <sarahzrf> how so?
15:22:58 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
15:23:04 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 258 seconds)
15:23:43 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
15:24:07 × Sanchayan quits (~Sanchayan@122.181.211.206) (Quit: leaving)
15:24:24 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
15:24:40 shatriff joins (~vitaliish@176.52.219.10)
15:24:44 × chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
15:25:04 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds)
15:25:59 <Cheery> sarahzrf: how to explain it depends a bit on how you view at linear logic and linear types.
15:26:51 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
15:27:02 × polyrain quits (~polyrain@2001:8003:e501:6901:5473:8418:3e33:a31a) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:27:10 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
15:27:10 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
15:27:10 GyroW joins (~GyroW@unaffiliated/gyrow)
15:27:16 <sarahzrf> i view them in many different ways
15:27:32 Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
15:27:55 Klumben joins (Nsaiswatch@gateway/shell/panicbnc/x-dhcfdjwdfkfdqaso)
15:28:18 <Cheery> well lets say you consider that you look it from linear logic, and think that intuitionistic types are represented through !x, a construct that explicitly represents discarding/copying/instantiation.
15:28:28 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
15:29:05 <Cheery> then if you look at monads, they do prevent you from copying things in arbitrary ways.
15:29:14 <merijn> They do?
15:29:14 karanlikmadde joins (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9)
15:29:16 <merijn> How so?
15:31:15 nados joins (~dan@69-165-210-185.cable.teksavvy.com)
15:31:54 <Cheery> Well you can supply some monad m, or then bind to it. Given that the linear parts stay inside the monad, then it stays "linear".
15:32:15 <sarahzrf> what if i `fmap (\x -> (x, x))'
15:32:34 <Cheery> the 'x' is never a linear type in such construct.
15:32:34 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
15:32:43 <Cheery> You can make this obvious with indexed monads.
15:32:50 SolarAquarion joins (SolarAquar@gateway/shell/panicbnc/x-twsqpddkakzbghtr)
15:33:05 <Cheery> But I think the property is already present in the use of IO monad.
15:33:12 <[exa]> Cheery: what if someone copies the whole monad and continues it in 2 different places?
15:33:46 solonarv joins (~solonarv@astrasbourg-552-1-23-6.w90-13.abo.wanadoo.fr)
15:34:05 <Cheery> [exa]: as long as you can copy it, it's more like a plan to do something.
15:36:22 <[exa]> well that's kinda "linearity by being very careful", you'd ideally want that typechecked
15:36:48 nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net)
15:37:02 <Cheery> I think you can model linear logic with indexed monads and it's just equivalent to other implementations.
15:37:09 <Cheery> at least right now I think so.
15:37:25 × arguapacha quits (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-133.dsl.bell.ca) (Ping timeout: 240 seconds)
15:37:58 <Cheery> I can try to illustrate this a bit.. so if you take the ireturn and ibind
15:38:07 <Cheery> ireturn :: a -> m i i a
15:38:15 <Cheery> ibind :: (a -> m j k b) -> m i j a -> m i k b
15:38:37 <Cheery> I dunno why they've flipped that one.
15:39:54 <Cheery> for an example, lets take additive product, this is kind of a construct that provides two options, and then later either one can be selected.
15:39:56 arguapacha joins (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca)
15:40:52 × Iwawa quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
15:40:58 <Cheery> opt :: m c a _ -> m c b _ -> m c (a & b) _
15:41:16 <Cheery> exl :: m (a & b) a _
15:41:21 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
15:41:22 <Cheery> exr :: m (a & b) b
15:41:42 <Cheery> now I'm wondering what would go to the _, the place of parameter.
15:42:26 jlamothe joins (~jlamothe@dev.jlamothe.net)
15:42:30 Lycurgus joins (~niemand@98.4.96.235)
15:42:37 arguapacha_ joins (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca)
15:42:45 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
15:42:55 babygnu joins (~robert@gateway/tor-sasl/babygnu)
15:43:28 <Cheery> You can do the same thing with multiplicatives, the multiplicative disjunction (that ear symbol) is a bit like function but you can choose which side you treat as a parameter.
15:44:00 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
15:44:27 <Cheery> the conjunction resembles a pair, but you can't do fst/snd on it unless the item on another side is exponential.
15:44:30 × arguapacha quits (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca) (Ping timeout: 256 seconds)
15:46:30 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
15:46:41 NextHendrix is now known as nh
15:46:59 × kuribas quits (~user@ptr-25vy0i9s82bgras1pw6.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
15:49:57 <[exa]> Cheery: would some kind of Either work as _ there? (also kindof provides a way to do the final choice)
15:50:00 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
15:50:25 xacktm joins (xacktm@gateway/shell/panicbnc/x-wtuwnbsvfqpgvaqk)
15:53:35 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
15:54:04 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-widejiobrxcglhbz)
15:54:29 <Cheery> [exa]: well I think it's bit of confusing because it is maybe not needed, indexed monoid might be enough as well.
15:54:51 <Cheery> or category
15:55:45 <Cheery> but since the parts that can be duplicated behave the same way as haskell, it'd remain as a language around these constructs.
15:55:59 × unlink2 quits (~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de) (Remote host closed the connection)
15:56:14 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
15:56:18 × borne quits (~fritjof@muedsl-82-207-207-196.citykom.de) (Ping timeout: 265 seconds)
15:56:36 Hande joins (~Hande@195.206.169.184)
15:56:47 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
15:57:04 <Cheery> the "linear" parts would remain in the place where the IO monad is these days.
15:57:28 unlink2 joins (~unlink2@p200300ebcf3c54001b9e8be0a8d0c9c4.dip0.t-ipconnect.de)
15:58:20 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
15:58:22 × tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 246 seconds)
15:58:41 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Client Quit)
15:58:55 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
16:00:27 Rudd0 joins (~Rudd0@185.189.115.108)
16:02:20 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
16:05:46 × caubert quits (~mrbentari@207.246.80.112) (Ping timeout: 272 seconds)
16:05:54 × Deide quits (~Deide@217.155.19.23) (Read error: Connection reset by peer)
16:05:58 maerwald_ is now known as maerwald
16:06:02 <Cheery> If you like to give it some sort of linear lambda vibes, you turn the "input" into a scope.
16:06:03 mrbentarikau joins (~mrbentari@207.246.80.112)
16:06:21 nlhowell joins (~nlhowell@don28-11.ln.rinet.ru)
16:06:42 mrbentarikau is now known as caubert
16:06:59 × daGrevis quits (~daGrevis@unaffiliated/dagrevis) (Ping timeout: 260 seconds)
16:07:18 × redeemed quits (~rd@79.115.163.113) (Ping timeout: 260 seconds)
16:07:39 × jlamothe quits (~jlamothe@dev.jlamothe.net) (Quit: leaving)
16:08:06 <Cheery> exl :: m (C r (a&b)) a, and likewise you'd get vs/vz to access and "pull" an item down.. oh moment I think I'll try to model those.
16:09:43 <sarahzrf> it sounds like youre really just talking about categories, not monads
16:09:46 × mnrmnaugh quits (~mnrmnaugh@unaffiliated/mnrmnaugh) (Read error: Connection reset by peer)
16:09:59 × Benzi-Junior quits (~BenziJuni@88-149-67-198.du.xdsl.is) (Quit: gone)
16:10:09 <sarahzrf> and yes, closed monoidal categories model multiplicative intuitionistic linear logic iirc
16:10:18 mnrmnaugh joins (~mnrmnaugh@unaffiliated/mnrmnaugh)
16:10:34 <Cheery> vs :: m x (C y z) -> m (C x w) (C (C y w) z)
16:10:46 × ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
16:10:56 <Cheery> vz :: m (C x y) (C x y)
16:11:33 ClaudiusMaximus joins (~claude@198.123.199.146.dyn.plus.net)
16:11:36 <sarahzrf> i suppose that in fairness a category is a kind of monad, if you pick the right bicategory—but i assumed you meant monads in the bicategory Cat :p
16:11:46 × ClaudiusMaximus quits (~claude@198.123.199.146.dyn.plus.net) (Changing host)
16:11:46 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
16:12:32 <Cheery> Yeah I think it's just categories. I'm just thinking of how these things fit together.
16:12:34 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
16:12:58 <sarahzrf> also sorry i misspoke, you want closed *symmetric* monoidal categories, for MILL
16:13:27 × ystael quits (~ystael@209.6.50.55) (Read error: Connection reset by peer)
16:14:21 daGrevis joins (~daGrevis@unaffiliated/dagrevis)
16:14:42 <sarahzrf> for the record, the categorical semantics of linear logic's additives are usually ordinary products and coproducts
16:15:25 <Cheery> yup. the linear logic builds linear implication around the tensor product.
16:15:40 <sarahzrf> the opt, exl, exr you wrote above are exactly the data of a product
16:15:57 <sarahzrf> assuming they satisfy the right equations
16:16:09 <sarahzrf> and are natural
16:16:13 jlamothe joins (~jlamothe@dev.jlamothe.net)
16:16:20 Benzi-Junior joins (~BenziJuni@88-149-67-198.du.xdsl.is)
16:16:22 LKoen joins (~LKoen@81.255.219.130)
16:16:45 <sarahzrf> actually sorry naturality is only a concern for opt and it drops out of satisfying the right equations with exl and exr
16:16:54 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
16:17:04 GyroW joins (~GyroW@d54C03E98.access.telenet.be)
16:17:05 × GyroW quits (~GyroW@d54C03E98.access.telenet.be) (Changing host)
16:17:05 GyroW joins (~GyroW@unaffiliated/gyrow)
16:18:18 Iwawa joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
16:18:33 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
16:18:43 stefan-__ joins (~cri@42dots.de)
16:19:58 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
16:20:08 × britva quits (~britva@51.154.14.117) (Quit: This computer has gone to sleep)
16:20:22 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:20:25 <Cale> Over the last couple decades, I've run into a few too many cases where the symmetric monoidal category abstraction was appropriate for being able to get control over whether substructural operations are present and how they're implemented. It's too bad that I don't think Linear Haskell solves any of the same problems (because it restricts you to something which is a restriction of (->))
16:20:48 <Cale> Conal's constrained categories thing gives you a really general view of it though.
16:21:22 × nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:21:28 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
16:21:31 <sarahzrf> oh? whats constrained categories
16:21:49 <Cale> https://github.com/conal/concat
16:21:55 <Cale> http://conal.net/papers/compiling-to-categories/
16:21:56 <sarahzrf> i thought that was "compiling to categories"
16:21:59 <sarahzrf> oh
16:22:06 <Cheery> is this conal's recent stuff he talked about on summer?
16:22:20 <Cheery> well the compiling to categories is older.
16:22:21 <sarahzrf> you know i probably shouldve questioned why it was "con" and not "com" in the repo name
16:22:27 <sarahzrf> lol
16:22:47 <Cheery> yeah maybe I should look at that a bit.
16:23:09 <Cheery> He's been progressing on that though.
16:23:23 × ericsagnes quits (~ericsagne@2405:6580:0:5100:3856:125a:3130:f979) (Ping timeout: 272 seconds)
16:23:24 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
16:24:06 <sarahzrf> im on record as wanting "basically like concat, but baked into the language in a principled and typed way"
16:24:10 nbloomf joins (~nbloomf@2600:1700:ad14:3020:c4b2:ae08:d967:f34e)
16:24:42 <sarahzrf> also for my foundations of math
16:24:46 <Cale> sarahzrf: If you have ideas about how to make the user experience of that language good, I'd really like to hear about it
16:25:04 <sarahzrf> haha i wish!
16:25:22 <sarahzrf> mostly i start daydreaming about being able to have something like that every so often when i get mad at setoid hell
16:25:42 dsiypl4 joins (~dsiypl4@41.251.199.43)
16:25:43 <sarahzrf> or whatever other "why the fuck cant i just work internally" thing comes up
16:25:54 <sarahzrf> have you seen beluga and/or the work on cocon
16:26:02 <Cale> No, I haven't
16:26:02 <sarahzrf> i think that's a promising direction for that sort of thing
16:26:10 <sarahzrf> it's only half related, but
16:26:18 × bergsans quits (~bergsans@c80-217-8-29.bredband.comhem.se) (Remote host closed the connection)
16:26:25 <sarahzrf> umm let's take this to ##dependent or sth
16:27:02 <Cheery> Ok. :) it started as haskell, now this is going..
16:28:50 buckworst joins (~nate@110.138.18.157)
16:31:06 × MattMareo quits (~mattl@unaffiliated/mattmareo) (Ping timeout: 265 seconds)
16:31:11 × raichoo quits (~raichoo@dslb-084-062-114-218.084.062.pools.vodafone-ip.de) (Quit: Lost terminal)
16:31:35 nineonin_ joins (~textual@216.81.48.202)
16:31:44 MattMareo joins (~mattl@unaffiliated/mattmareo)
16:34:55 ericsagnes joins (~ericsagne@2405:6580:0:5100:edb7:2e5e:75c7:865c)
16:35:27 × coot quits (~coot@37.30.52.15.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 265 seconds)
16:36:41 × xff0x quits (~fox@2001:1a81:529c:a900:6b08:6f66:959:4c93) (Ping timeout: 272 seconds)
16:37:15 xff0x joins (~fox@2001:1a81:529c:a900:2bcb:163b:75a7:c7de)
16:37:19 × MattMareo quits (~mattl@unaffiliated/mattmareo) (Ping timeout: 260 seconds)
16:37:59 MattMareo joins (~mattl@unaffiliated/mattmareo)
16:38:27 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
16:44:54 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 260 seconds)
16:45:05 kritzefitz joins (~kritzefit@212.86.56.80)
16:45:18 × nineonine quits (~nineonine@216.81.48.202) ()
16:47:27 × alp quits (~alp@2a01:e0a:58b:4920:f968:6025:1be8:4fb9) (Ping timeout: 272 seconds)
16:48:25 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
16:48:36 nineonine joins (~nineonine@216.81.48.202)
16:48:50 × dsiypl4 quits (~dsiypl4@41.251.199.43) (Ping timeout: 260 seconds)
16:49:21 × asheshambasta quits (~user@ptr-e1lysawl9rr13i61o92.18120a2.ip6.access.telenet.be) (Ping timeout: 272 seconds)
16:53:23 × nineonine quits (~nineonine@216.81.48.202) (Client Quit)
16:53:56 × Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
16:54:10 × ggole quits (~ggole@2001:8003:8119:7200:b1ad:260c:cc33:2a8d) (Quit: Leaving)
16:54:18 × erolm_a quits (~erolm_a@62.19.60.223) (Ping timeout: 265 seconds)
16:54:29 × Lycurgus quits (~niemand@98.4.96.235) (Quit: Exeunt)
16:56:05 × elliott_ quits (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
16:56:59 × z0 quits (~z0@bl15-167-204.dsl.telepac.pt) (Quit: Lost terminal)
16:57:40 ystael joins (~ystael@209.6.50.55)
16:58:37 Deide joins (~Deide@217.155.19.23)
16:58:42 erolm_a joins (~erolm_a@62.19.60.223)
16:58:42 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
16:58:51 stefan-__ joins (~cri@42dots.de)
17:00:49 elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net)
17:01:46 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
17:02:10 bitmapper joins (uid464869@gateway/web/irccloud.com/x-fjkcgpxmhvapxtfm)
17:03:15 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
17:05:16 × caubert quits (~mrbentari@207.246.80.112) (Quit: WeeChat 2.9)
17:05:27 mrbentarikau joins (~mrbentari@207.246.80.112)
17:05:35 mrbentarikau is now known as caubert
17:06:31 dyniec[m] joins (dyniecmatr@gateway/shell/matrix.org/x-pvfhaoakrmoprspz)
17:07:20 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
17:07:20 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
17:07:20 GyroW_ joins (~GyroW@unaffiliated/gyrow)
17:07:39 britva joins (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
17:08:26 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 260 seconds)
17:09:29 dsiypl4 joins (~dsiypl4@41.251.199.43)
17:09:45 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
17:14:46 × Sigyn quits (sigyn@freenode/utility-bot/sigyn) (Quit: i've seen things you people wouldn't believe. spam bots on fire off the shoulder of sigyn. i watched k-line beams glitter in the dark near the Tannhäuser Gate. all these moments will be lost in time, like tears in rain. time to /die)
17:15:19 Sigyn joins (sigyn@freenode/utility-bot/sigyn)
17:15:19 ChanServ sets mode +o Sigyn
17:20:40 × britva quits (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1) (Quit: This computer has gone to sleep)
17:20:41 falafel joins (~falafel@71-34-132-121.clsp.qwest.net)
17:24:18 <texasmynsted> how do I know what "base" to use?
17:24:34 redeemed joins (~rd@2a02:2f0b:b20a:d200:75cb:8151:518a:825f)
17:24:47 Ariakenom joins (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se)
17:25:34 <texasmynsted> Example: I did cabal init, and got "build-depends: base ^>=4.12.0.0". I do not recall why I thought that was the right base. I also do not recall what the ^ is for.
17:26:00 Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
17:26:15 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer)
17:26:16 <koz_> ^>= says 'at least this version works, but a higher minor version might too'.
17:26:18 × erolm_a quits (~erolm_a@62.19.60.223) (Ping timeout: 260 seconds)
17:26:29 <koz_> What's your GHC version?
17:26:36 <koz_> Base version and GHC version are closely connected.
17:26:46 <texasmynsted> 8.8.4
17:26:58 <koz_> I think you want 4.13 then?
17:27:01 <texasmynsted> I just upgraded it today.
17:27:05 <texasmynsted> okay
17:27:13 <texasmynsted> how would I know that?
17:27:24 <koz_> Because each GHC version comes with a base version.
17:27:30 <koz_> There's a list somewhere.
17:27:34 koz_ can't remember where.
17:27:42 <merijn> https://wiki.haskell.org/Base_package
17:28:23 <koz_> Yeah, that one.
17:28:55 <texasmynsted> Nice! thank you
17:28:58 <koz_> Pity we're not getting base 5 to go with GHC 9.
17:28:58 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
17:29:09 <koz_> (although the degree of breakage that would induce would be legendary)
17:29:24 <merijn> Well, technically that wouldn't break anything
17:29:25 erolm_a joins (~erolm_a@62.19.60.223)
17:29:25 <texasmynsted> too bad ghc does not have a flag for "--base"
17:29:35 × Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
17:29:44 <merijn> It'd require manual intervention to get things to compile with the new GHC, but that's different from "breaking things"
17:29:47 <monochrom> You can use "cabal gen-bounds"
17:29:53 Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
17:30:02 <merijn> The entire point of upperbounds is that new releases can't break things >.>
17:30:30 × GyroW_ quits (~GyroW@unaffiliated/gyrow) (Remote host closed the connection)
17:30:31 <texasmynsted> ist that what ^ does?
17:30:47 GyroW joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
17:30:47 × GyroW quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
17:30:47 GyroW joins (~GyroW@unaffiliated/gyrow)
17:30:53 <texasmynsted> oh
17:30:58 <texasmynsted> /me facepalm
17:31:00 <monochrom> No, merijn means that GHC new versions also changes language syntax and semantics and type checking.
17:31:05 <texasmynsted> I see that answered above
17:31:45 <merijn> "break" implies "used to work", but that's not the case for new versions
17:32:00 invaser joins (~Thunderbi@31.148.23.125)
17:32:12 <merijn> texasmynsted: "^>= 4.12" says "this is compatible with everything that is PVP compatible with version 4.12"
17:32:16 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:32:17 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
17:32:28 <merijn> texasmynsted: Where "PVP compatible" is explained here: https://pvp.haskell.org/
17:32:42 stefan-__ joins (~cri@42dots.de)
17:34:06 × is_null quits (~jpic@pdpc/supporter/professional/is-null) (Ping timeout: 260 seconds)
17:35:05 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
17:35:20 tzh joins (~tzh@2601:448:c500:5300::19b0)
17:36:51 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
17:37:10 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Remote host closed the connection)
17:38:34 × jneira quits (501e64fa@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.250) (Ping timeout: 260 seconds)
17:39:18 <texasmynsted> :-)
17:39:23 <texasmynsted> Thank you
17:39:25 × Iwawa quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 240 seconds)
17:39:32 × MindlessDrone quits (~MindlessD@unaffiliated/mindlessdrone) (Ping timeout: 258 seconds)
17:42:14 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
17:42:15 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
17:43:35 MindlessDrone joins (~MindlessD@unaffiliated/mindlessdrone)
17:44:34 × erolm_a quits (~erolm_a@62.19.60.223) (Ping timeout: 272 seconds)
17:44:57 erolm_a joins (~erolm_a@62.19.60.223)
17:47:19 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
17:47:50 × oisdk quits (~oisdk@2001:bb6:3329:d100:c8f6:1bbe:8153:581f) (Ping timeout: 246 seconds)
17:48:53 × mirrorbird quits (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) (Ping timeout: 272 seconds)
17:50:22 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 265 seconds)
17:50:59 oisdk joins (~oisdk@2001:bb6:3329:d100:110c:4b45:443f:14f0)
17:51:13 × karanlikmadde quits (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9) (Quit: karanlikmadde)
17:52:49 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
17:53:58 karanlikmadde joins (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9)
17:55:06 × mananamenos_ quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 260 seconds)
17:55:51 is_null joins (~jpic@pdpc/supporter/professional/is-null)
17:57:37 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
17:59:46 × jespada quits (~jespada@90.254.245.15) (Ping timeout: 260 seconds)
18:00:00 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
18:00:02 × Hande quits (~Hande@195.206.169.184) ()
18:00:37 × jlamothe quits (~jlamothe@dev.jlamothe.net) (Ping timeout: 258 seconds)
18:01:36 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
18:02:05 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
18:02:15 GyroW joins (~GyroW@d54C03E98.access.telenet.be)
18:02:16 × GyroW quits (~GyroW@d54C03E98.access.telenet.be) (Changing host)
18:02:16 GyroW joins (~GyroW@unaffiliated/gyrow)
18:02:18 jespada joins (~jespada@90.254.245.15)
18:03:00 Kolkrabe joins (~user@unaffiliated/siracusa)
18:03:04 conal joins (~conal@ip-66-115-176-174.creativelink.net)
18:03:09 borne joins (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
18:04:14 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
18:04:47 × xff0x quits (~fox@2001:1a81:529c:a900:2bcb:163b:75a7:c7de) (Ping timeout: 260 seconds)
18:05:46 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 246 seconds)
18:05:51 alp joins (~alp@2a01:e0a:58b:4920:5496:1877:65f3:df3d)
18:06:10 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 256 seconds)
18:06:12 howdoi joins (uid224@gateway/web/irccloud.com/x-qkgpowqaqjtdktyy)
18:06:25 xff0x joins (~fox@141.98.255.143)
18:06:33 hiroaki joins (~hiroaki@ip4d176049.dynamic.kabel-deutschland.de)
18:11:06 takuan joins (~takuan@178-116-218-225.access.telenet.be)
18:11:28 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
18:11:36 × xff0x quits (~fox@141.98.255.143) (Ping timeout: 256 seconds)
18:12:35 notnatebtw joins (~nate@110.138.18.157)
18:13:08 <hyperisco> tsc: createProcess: does not exist (No such file or directory) I know tsc is on my PATH, why might it not be found? Other executables are found… I am on Windows
18:13:36 xff0x joins (~fox@2001:1a81:529c:a900:2bcb:163b:75a7:c7de)
18:13:44 <hyperisco> or am I reading this error wrong? I am reading it as tsc does not exist
18:13:46 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 260 seconds)
18:14:13 × lep-delete quits (~lep@94.31.83.149) (Read error: Connection reset by peer)
18:14:38 falafel joins (~falafel@71-34-132-121.clsp.qwest.net)
18:15:16 lep-delete joins (~lep@94.31.83.149)
18:16:10 <geekosaur> does createProcess search %PATH% as you are invoking it? (there are two modes, one searches the PATH and the other wants a full pathname)
18:18:54 <geekosaur> nemmind, I see it currently does PATH search if there's no slash in the name
18:19:58 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
18:20:00 <geekosaur> proc on windows has some extra behaviors but it should try %PATH% eventually
18:20:22 <hyperisco> it says it uses whatever the system's resolution is
18:21:06 <hyperisco> "on Windows systems the Win32 CreateProcess semantics is used"
18:21:20 isovector1 joins (~isovector@172.103.216.166.cable.tpia.cipherkey.com)
18:21:35 <hyperisco> wait... " An .exe extension is added if the filename does not already have an extension. " what?!
18:21:51 <koz_> hyperisco: Gotta love dem Windows conventions.
18:21:56 <monochrom> That should be harmless IME.
18:22:05 <koz_> Although I think your Windows executable already has a .exe?
18:22:08 zigapeda1 joins (~zigapeda@195.140.213.38)
18:22:09 <hyperisco> but tsc.exe does not exist
18:22:13 <hyperisco> no it is called tsc lol
18:22:18 <hyperisco> it works fine in cmd.exe
18:22:20 <geekosaur> glwt
18:22:47 <hyperisco> shoot me
18:22:50 <monochrom> Oh, then make your own alias tsc.exe
18:22:51 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
18:23:04 <hyperisco> it isn't that simple…
18:23:08 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
18:23:14 <monochrom> Or make the builder of tsc name it tsc.exe in the first place.
18:23:16 notnatebtw joins (~nate@110.138.18.157)
18:23:46 <monochrom> Windows symlink is different from Linux symlink, but such a thing exists since 15 years go, no?
18:23:47 lep-delete is now known as Guest88073
18:23:48 <hyperisco> is it because cmd.exe will look for tsc.cmd
18:24:04 Guest88073 is now known as lep-delete
18:24:15 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
18:24:21 <hyperisco> well whatever this stopped being a Haskell question
18:24:32 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
18:24:38 <hyperisco> unless it is Haskell that is adding ".exe"
18:24:44 <hyperisco> in which case… why… why do this
18:25:32 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 258 seconds)
18:25:50 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 256 seconds)
18:25:51 <monochrom> I don't know but I'm sure it's explained in some changelog or commit/PR comment.
18:25:55 <monochrom> or source code
18:26:31 <monochrom> and most likely it's "breaks some other vocal minority if not added"
18:26:46 jneira joins (501e64fa@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.250)
18:27:13 <geekosaur> for grins and giggles, try it as "tsc."
18:27:56 <hyperisco> I am attempting to not create this twice because I need a dot on one platform and not another
18:28:18 <geekosaur> this is not going to end well, I suspect
18:28:28 <hyperisco> I stopped using shelly because of this weirdness lol
18:28:35 <hyperisco> apparently it goes deeper than I expected
18:29:13 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
18:29:25 × alp quits (~alp@2a01:e0a:58b:4920:5496:1877:65f3:df3d) (Ping timeout: 272 seconds)
18:29:37 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
18:29:39 <geekosaur> windows likes its extensions. but in this case I did not mean naming the file with a dot, just specifying the filepath that way. then again, depending on what you're doing, that may still not be what you intend
18:29:53 ishutin joins (~Ishutin@80-95-82-226.pool.digikabel.hu)
18:30:42 <geekosaur> you may just have to call it "tsc." everywhere to make both platforms happy
18:31:08 <hyperisco> stop making me cry
18:31:09 <geekosaur> (unix won't care if the name happens to contain a dot)
18:31:19 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 246 seconds)
18:31:30 <geekosaur> you're trying to do crossplatform, you _will_ cry
18:31:31 <hyperisco> why wouldn't it?
18:32:42 × ishutin_ quits (~Ishutin@94-21-82-21.pool.digikabel.hu) (Ping timeout: 272 seconds)
18:33:09 × isovector1 quits (~isovector@172.103.216.166.cable.tpia.cipherkey.com) (Quit: Leaving)
18:33:21 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
18:33:59 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
18:34:07 × bartemius quits (~bartemius@109-252-19-142.nat.spd-mgts.ru) (Remote host closed the connection)
18:34:10 stefan-__ joins (~cri@42dots.de)
18:34:39 alp joins (~alp@88.126.45.36)
18:37:10 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
18:38:01 conal joins (~conal@ip-66-115-176-174.creativelink.net)
18:39:58 fendor_ is now known as fendor
18:40:30 <hyperisco> it seems like it is Haskell that adds this "exe" thing
18:40:52 <hyperisco> though I can't trace down where in the source it does it
18:41:30 <hyperisco> I am floored… that seems pretty ridiculous
18:46:02 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
18:46:50 <monochrom> unix has the executable bit already.
18:49:09 <hyperisco> it doesn't say tsc. = tsc though
18:49:23 <monochrom> Oh, no.
18:49:42 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 260 seconds)
18:49:45 <monochrom> The hope is that "tsc." helps Windows.
18:50:45 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 240 seconds)
18:50:51 wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:51:42 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
18:52:02 <hyperisco> I don't know what I missed in the code repo for process but I cannot see anywhere it adds on ".exe"
18:52:27 <hyperisco> and CreateProcess in win32 makes no mention of adding this implicitly, in fact it features optional extension
18:53:14 <hyperisco> and the call to CreateProcess leaves the extension arg NULL, so it could only be part of the command path
18:53:20 <hyperisco> but nowhere do I see .exe being added to that path
18:53:42 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
18:54:22 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
18:59:56 tnm joins (~tnm@dslb-084-056-234-071.084.056.pools.vodafone-ip.de)
19:00:50 × LKoen quits (~LKoen@81.255.219.130) (Remote host closed the connection)
19:01:39 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
19:02:16 × tv quits (~tv@unaffiliated/tv) (Ping timeout: 256 seconds)
19:02:35 <hyperisco> the original issue seems to be gone https://github.com/haskell/process/commit/270e43a2138898967da904e3d61a6e2589cb7b1a
19:03:33 berberman_ joins (~berberman@unaffiliated/berberman)
19:04:02 <hyperisco> adding .exe is part of https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa ie CreateProcessA not CreateProcess
19:04:15 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
19:05:28 <monochrom> Does "documentation for the Windows SearchPath API" say something about this?
19:05:40 <hyperisco> I mean not part of SearchPathA https://docs.microsoft.com/en-us/windows/win32/api/processenv/nf-processenv-searchpatha which is what the process docs link to
19:05:57 thir joins (~thir@p4febc651.dip0.t-ipconnect.de)
19:06:49 justsomeguy joins (~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b)
19:06:49 × justsomeguy quits (~justsomeg@2603:9000:960a:fc00:c4d2:5b73:c7b7:3a2b) (Changing host)
19:06:49 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
19:07:28 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Client Quit)
19:07:40 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
19:07:41 <monochrom> I still think it's simplest to find a way to ensure that "tsc.exe" exists.
19:08:05 <hyperisco> it really isn't
19:08:35 <hyperisco> tsc.cmd exists and I can use that if createProcess on tsc throws
19:08:49 <hyperisco> I just wanted to know where this .exe thing is coming from
19:09:16 <hyperisco> sstill unclear because process called CreateProcess I assume from windows.h but why do the docs call it CreateProcessA
19:09:47 <monochrom> Does Windows have some kind of strace? That can speed up the search.
19:09:54 <hyperisco> https://stackoverflow.com/questions/3060991/what-is-the-difference-between-createprocess-and-createprocessa it is just a macro for unicode vs ascii
19:10:20 <hyperisco> so that's the end of that… Windows just puts .exe on if there is no extension, thanks Windows… I absolve you process package
19:10:45 geekosaur suspected as much, because windows
19:10:58 acidjnk_new2 joins (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de)
19:11:16 <hyperisco> I guess that is why npm gives you both tsc and tsc.cmd lol
19:11:51 <monochrom> It is a legacy thing that traces all the day back to DOS.
19:12:31 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
19:12:33 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
19:12:40 × thir quits (~thir@p4febc651.dip0.t-ipconnect.de) (Remote host closed the connection)
19:12:58 seanvert joins (~user@177.84.244.242)
19:13:00 conal joins (~conal@ip-66-115-176-174.creativelink.net)
19:13:01 <monochrom> and CP/M. DOS took this idea from CP/M
19:13:02 <Chousuke> Meaningful file extensions are probably one of those "eh, good enough" choices made way back in the past that you just can't undo.
19:13:04 <hyperisco> the docs really are linking to the wrong doc page though
19:13:27 × codygman quits (~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
19:13:57 thir joins (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de)
19:14:04 <monochrom> On this note actually we suffer a bit from "the victor wrote the history".
19:14:12 codygman joins (~codygman@47-184-107-46.dlls.tx.frontiernet.net)
19:15:35 britva joins (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
19:15:50 tv joins (~tv@unaffiliated/tv)
19:16:04 <monochrom> There was two viable philosophies back then. Unix philosophy was "a file is a sequence of bytes, minimal metadata and semantics from the OS's POV". That was a singular, minority philosophy actually, all other OSes at the time said "a file is the bytes plus a lot of metadata to tell the OS what the file is intended for".
19:16:23 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
19:16:31 <monochrom> Then all other OSes lost and Unix won.
19:16:50 <geekosaur> tell that to Windows
19:16:52 notnatebtw joins (~nate@110.138.18.157)
19:16:53 <Chousuke> the latter turned out to be a bad idea because you can lie to the OS and it can't trust the metadata anyway.
19:16:55 × borne quits (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
19:16:57 <hyperisco> sigh but the .cmd depends on knowing its own directory which doesn't seem to work with CreateProcess
19:17:02 <Chousuke> so the sane thing to do is to ignore it entirely.
19:17:07 × Athas quits (athas@sigkill.dk) (Quit: ZNC - http://znc.sourceforge.net)
19:17:49 × thir quits (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de) (Remote host closed the connection)
19:17:59 <monochrom> geekosaur, I mean the philosophy won, even Windows programmers now assume the Unix philosophy and consider extensions to be merely UI.
19:18:01 thir joins (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de)
19:18:39 <geekosaur> but the OS doesn't quite, as witness it adding ".exe" here. plus the hack I suggested which should have told it to use a null extension
19:19:04 <geekosaur> (and "tsc" should have matched it as a result)
19:19:23 <monochrom> And yet we actually know, when we're honest, that the Unix philosophy is wrong. Look at how Linux desktop systems have to add back an MIME type system, confessing that metadata about "file types" is right.
19:19:54 <geekosaur> ^
19:19:56 × arguapacha_ quits (~arguapach@bras-base-mtrlpq02hsy-grc-04-174-93-252-2.dsl.bell.ca) (Read error: Connection reset by peer)
19:20:30 <hyperisco> tsc.: createProcess: invalid argument (Exec format error)
19:20:37 × DavidEichmann quits (~david@43.240.198.146.dyn.plus.net) (Ping timeout: 264 seconds)
19:21:00 <geekosaur> lovely. so it found it and tried to treat it as something other than an exe?
19:21:01 thir_ joins (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de)
19:22:52 <hyperisco> If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not appended.
19:23:09 <Chousuke> monochrom: isn't MIME mostly about giving names to file types rather than accompanying each file with a declared type? Unless you're encoding it somehow, I suppose.
19:23:30 <hyperisco> I don't know what the problem is
19:23:46 <Chousuke> but even if something claims to be a jpeg image you'd still best not treat it as one until it's been successfully parsed and verified :P
19:23:53 <hyperisco> SearchPathA doesn't seem to care about trailing periods
19:24:33 <geekosaur> Chousuke, it's a mapping from extension to file type and utilities that can operate on files of that type. It can also include or work with magic(5) data (that is, identofying files by contents; see the "file" command)
19:24:43 × thir quits (~thir@p200300f27f19c100d4ed0bea92cc522d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
19:25:05 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
19:26:04 <hyperisco> geekosaur, oh, I see, it is saying the exe is not recognised by Windows, it did find it… ah ha… so presumably the extensionless file is intended for unix systems
19:27:34 ircbrowse_tom joins (~ircbrowse@64.225.78.177)
19:27:34 Server sets mode +CLnt
19:28:26 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
19:28:48 <geekosaur> ilegal to create such a file but if you specify one for an existing file it means "no extension". extensions are baked in pretty deep
19:28:52 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
19:28:58 <Chousuke> geekosaur: right, so it's a mechanism for mapping identified types to applications that can work with those types, and you can use the filename extension to "identify" a file type if you want to. I suppose you'd need such a mapping even if you had the type built-in to the data.
19:29:11 <monochrom> I don't know and won't be pedantic about whether the MIME RFCs are only about naming file types or more ambitiously promoting attaching such named file types to files.
19:30:11 <monochrom> But the way Linux desktops do it is in lieu of an OS-sanctioned metadata system, let's look at filenames and a prefix of file contents to reverse-engineer-guess-approximate the real thing.
19:30:54 <monochrom> And certainly naming/IDing file types is a prerequisite of attaching file types to files in an organized way.
19:31:09 <geekosaur> also Macs, with an OS-sanctioned way but it's a layer above the core OS
19:31:22 <geekosaur> and not available to e.g. ghc if it wanted to use it
19:31:24 <monochrom> The other, most popular file system illustrates what I mean. That file system is widely known as HTTP.
19:31:43 <hyperisco> okay, so if I use a shell process the .cmd works right… the puzzle pieces are coming together
19:31:46 Amras is now known as Sarma
19:31:47 <geekosaur> (it's part of the Cocoa API)
19:32:02 <hyperisco> annoyingly though I have to construct a shell expression instead of just passing an array of arguments
19:32:19 <hyperisco> and last I checked that is nigh impossible to do correctly
19:32:26 <monochrom> I can have an URL that goes "http://foo.com/xyz.pdf", and if the HTTP response header says that the file type of that file is text/html, then it's HTML, not PDF.
19:33:03 <geekosaur> hyperisco: or portably
19:33:22 <hyperisco> well it should work on unix because I try calling the executable directly first
19:33:34 <hyperisco> doesn't have to go through a shell
19:37:35 <hololeap> % import Control.Monad.Logic
19:37:36 <yahb> hololeap: ; <no location info>: error:; Could not find module `Control.Monad.Logic'; Perhaps you meant; Control.Monad.Co (from kan-extensions-5.2); Control.Monad.Cont (from mtl-2.2.2); Control.Monad.Fail (from base-4.14.0.0)
19:38:03 <[exa]> no prolog today
19:38:21 <monochrom> yahb probably doesn't have logict installed
19:38:36 <Chousuke> monochrom: I guess I'm more a fan of the simple and stupid approach of just treating everything as bytes. for HTTP, the header is a type hint, but you still can't trust that the data is anything other than a stream of bytes.
19:38:52 <monochrom> "become a galaxy-level patron so you can instruct yahb to install one more package!"
19:39:05 <geekosaur> but you have to have some idea of what parser to use to validate it, at minimum
19:39:17 <Chousuke> yeah
19:39:29 <Chousuke> I'm not sure that that's useful on the filesystem level though
19:39:46 <geekosaur> it's useful at the level of apps getting data from the filesystem
19:39:50 <monochrom> You are right that a receiver still has to parse, and to expect parse error. But the receiver also expects to not bother trying other parsers.
19:40:24 <monochrom> If you say "text/html" I'm not going to try gunzip it.
19:40:47 <geekosaur> unless the compression header says to
19:40:50 <monochrom> even if the bytes scream "I'm gzip"
19:40:59 <monochrom> Yeah, that.
19:41:38 <monochrom> If you say "text/html" I'm not going to run objdump on it, even if the bytes scream "ELF"
19:41:50 <hololeap> i'm confused as to how you use ListT
19:41:57 <hololeap> *LogicT
19:42:17 <[exa]> hololeap: any short example / confusing snippet?
19:42:18 <monochrom> For the most part you can use it like you use a list monad.
19:42:25 <hololeap> i know it has some kind of similarities to ListT, but i don't see how
19:42:49 <monochrom> There is just one addition command to learn if you want the search to be BFS instead of DFS.
19:43:12 <monochrom> Perhaps start with Logic instead of LogicT?
19:43:58 <hololeap> i've played around with Logic a bit, but simply constructing a `Logic a` value is weird
19:44:35 × Franciman quits (~francesco@host-82-54-10-114.retail.telecomitalia.it) (Quit: Leaving)
19:44:46 <[exa]> hololeap: how weird? (can't you construct `Logic a` using just `pure` ?
19:44:58 hackage ukrainian-phonetics-basic 0.1.0.0 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.1.0.0 (OleksandrZhabenko)
19:44:58 <Chousuke> monochrom: the other side of the coin is that if the metadata claims the file to be something and it looks like something else, it might get opened by an application you didn't expect which has a long history of causing problems. So I guess file extensions aren't completely awful for deciding the application to open, as long as they're visible to the user.
19:45:45 <hololeap> odds = pure 1 `mplus` (odds >>= \i -> if i >= 100 then mzero else pure (i+2))
19:46:01 <hololeap> is this roughly equivalent to [1,3..100]?
19:46:07 <Chousuke> come to think of it, hashbangs are basically file metadata to decide the opening program. :P
19:46:50 × knupfer quits (~Thunderbi@i59F7FF96.versanet.de) (Quit: knupfer)
19:46:54 knupfer1 joins (~Thunderbi@200116b82c30ba0001bfef634072ae05.dip.versatel-1u1.de)
19:47:25 <[exa]> monochrom, Chousuke: btw sorry to jump into discussion, but the golden rule says that if the user/operator/etc is unable to instruct the programs to use correct data access methods, so he will fail at maintaining the metadata...unless the metadata becomes inseparable part of data, as it once had already, with file magic numbers
19:47:27 <geekosaur> to decide the interpreter, to be specific (and the dynamic loader is treated as an interpreter)
19:47:43 <monochrom> You can instantiate that to [] and get: odds = [1] ++ (odds >>= \i -> if i>=100 then [] else [i+2])
19:49:18 knupfer1 is now known as knupfer
19:49:43 <hololeap> ok, but i'm trying to construct something similar to [1,3..100], except i want it to be `Logic Int`
19:49:54 <[exa]> (that said, I'd welcome if all file formats would have extensible magic, just like #!)
19:50:00 <Chousuke> geekosaur: yeah. and if you're putting +x on any random file and running it, I don't think you can expect to stay secure. :P
19:50:04 <hololeap> `observeAll odds` doesn't terminate
19:50:08 <monochrom> Just add "odds :: Logic Int"
19:51:18 <geekosaur> because if you try to observe all of it, it just keeps going through values after it hits the limit (empty list doesn't mean "stop", any more than it does for the list comprehension example)
19:51:24 <monochrom> Probably the [] instantiation won't either.
19:51:28 chaosmasttter joins (~chaosmast@p200300c4a70942015d50de0935368812.dip0.t-ipconnect.de)
19:51:40 <geekosaur> Chousuke, yet it's common for scripts to work that way
19:51:47 <monochrom> > let odds = pure 1 `mplus` (odds >>= \i -> if i >= 100 then mzero else pure (i+2)) in odds :: [Int]
19:51:50 <lambdabot> [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53...
19:51:54 <hololeap> your right, it doesn't
19:51:58 <monochrom> actually need a smaller test
19:52:02 <monochrom> > let odds = pure 1 `mplus` (odds >>= \i -> if i >= 10 then mzero else pure (i+2)) in odds :: [Int]
19:52:05 <lambdabot> [1,3,5,7,9,11*Exception: <<loop>>
19:52:23 <monochrom> Not a good program in the first place IMO
19:52:30 <geekosaur> huh, I expected a timeout, not <<loop>>
19:52:53 <monochrom> You don't do left recursion like that (odds = odds >>= ...)
19:53:14 <geekosaur> oh, hm, I guess it does do that, yeh
19:53:56 <hololeap> so, does a Logic computation by default not terminate, but requires observeMany to terminate it?
19:54:14 <geekosaur> it's just the way this one was constructed
19:54:16 <Chousuke> geekosaur: it is. I read most scripts before I run them, though of course I have to trust some things. Generally whatever is installed from OS package management is auto-trusted.
19:54:34 <monochrom> I would rather code up a forward constraint propagation algorithm for learning logict.
19:54:58 <Chousuke> geekosaur: I am very uncomfortable every time I have to use pip or gem or whatnot for whatever purpose.
19:55:11 <hololeap> well, how would i write a `Logic Int` computation that would evaluate to [1,3,5,7,9] when used with observeAll?
19:55:12 × shafox quits (~shafox@106.51.234.111) (Remote host closed the connection)
19:55:45 × errst quits (~tirej@unaffiliated/tirej) (Quit: Lost terminal)
19:56:36 <monochrom> odds i | i < 100 = pure i <|> odds (i+2)
19:56:50 <monochrom> | otherwise = empty
19:56:54 Athas joins (athas@2a01:7c8:aaac:1cf:9a0:fad3:fdf2:2ed)
19:57:03 × ech quits (~user@gateway/tor-sasl/ech) (Ping timeout: 240 seconds)
19:57:11 <monochrom> change to mplus/mzero if Logic doesn't support Applicative
19:58:26 <monochrom> May the odds be ever in your favour.
19:58:30 <hololeap> hold on, i thought mzero/empty wouldn't stop the computation
19:58:50 Sheilong joins (uid293653@gateway/web/irccloud.com/x-zkmqxnjkmjnikczm)
19:59:30 <hololeap> oh, i see. it never calls `odds` on the second branch. in my original example it calls it no matter what.
19:59:54 ZarTek joins (znc@static.138.236.76.144.clients.your-server.de)
19:59:57 hackage ordinal 0.3.0.0 - Convert numbers to words in different languages. https://hackage.haskell.org/package/ordinal-0.3.0.0 (wvanonsem90)
20:00:00 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
20:00:17 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 260 seconds)
20:00:37 rprije joins (~rprije@110-175-117-18.tpgi.com.au)
20:01:23 <monochrom> Oddly enough, "odds = pure 1 <|> fmap (+ 2) odds" is much more well defined that adding "if i>=100 then empty"
20:01:25 × supercoven_ quits (~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 240 seconds)
20:02:08 <hololeap> ok, i see now. it looks like i was over-complicating things, although i still don't have an intuition for this. the type signature `forall r. (a -> r -> r) -> r -> r` is not intuitive to me
20:02:09 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
20:02:18 tabaqui joins (~tabaqui@2604:a880:800:c1::21b:3001)
20:02:19 <hololeap> monochrom: how is it more well defined?
20:03:07 <tabaqui> Allright, I'm using simple recusion to implement my dsl
20:03:15 <tabaqui> Now I have another issue
20:03:24 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
20:03:46 <tabaqui> type family VarType (a :: Symbol) :: *
20:03:50 <monochrom> The different between "an infinite 'loop' that actually is productive in giving you an infinite list" and "an infinite loop that doesn't accomplish anything"
20:04:11 <tabaqui> f :: Sing a -> VarType a
20:04:29 <tabaqui> How can I write any function with such signature?
20:04:48 <hololeap> monochrom: oh, i see what you mean
20:05:04 ech joins (~user@gateway/tor-sasl/ech)
20:05:07 z0 joins (~z0@bl15-167-204.dsl.telepac.pt)
20:05:13 <monochrom> If you're going to do an infinite "x0 ++ x1 ++ x2 ++ x3 ++ ...", you would rather each xi be a non-empty list, so that the whole thing is an infinite list, rather than...
20:05:16 <tabaqui> I've tried to compare singletons with %==, but Haskell doesn't accept it as a proof
20:05:30 z0 is now known as Guest46583
20:05:53 <monochrom> rather than from x50 onwards it's all xi=[] so the list should end but the computer doesn't know and chases gooses.
20:06:10 Franciman joins (~francesco@host-82-54-10-114.retail.telecomitalia.it)
20:06:26 Iwawa joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
20:07:53 coot joins (~coot@37.30.51.94.nat.umts.dynamic.t-mobile.pl)
20:08:54 <tabaqui> Oh, probably I could replace TypeFamilies
20:09:41 <ski> (or at least, infinitely many of them being non-empty)
20:09:49 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 264 seconds)
20:10:19 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
20:10:31 kritzefitz joins (~kritzefit@212.86.56.80)
20:10:50 <ski> hololeap : `forall r. (a -> r -> r) -> r -> r' is (doubly) CPS (success, and failure, continuation)
20:11:27 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
20:12:07 <hololeap> ski: i don't have much of an intuition for cps, so that doesn't help much
20:12:27 avoandmayo joins (~textual@122-58-158-238-adsl.sparkbb.co.nz)
20:12:40 <hololeap> i can see how (a -> r -> r) is roughly equal to (:) and r is roughly equal to []
20:13:11 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:13:13 conal joins (~conal@ip-66-115-176-174.creativelink.net)
20:13:57 <hololeap> % :t runContT
20:13:57 <yahb> hololeap: ContT r m a -> (a -> m r) -> m r
20:14:23 <hololeap> % :t ContT
20:14:24 <yahb> hololeap: ((a -> m r) -> m r) -> ContT r m a
20:14:59 ZarTek parts (znc@static.138.236.76.144.clients.your-server.de) ()
20:15:12 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
20:15:39 notnatebtw joins (~nate@110.138.18.157)
20:15:52 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
20:16:13 × notnatebtw quits (~nate@110.138.18.157) (Client Quit)
20:17:10 notnatebtw joins (~nate@110.138.18.157)
20:18:38 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
20:19:08 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
20:19:25 × wroathe_ quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
20:19:29 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
20:19:31 ukari joins (~ukari@unaffiliated/ukari)
20:21:18 × britva quits (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1) (Quit: This computer has gone to sleep)
20:24:14 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
20:26:32 <ski> @unmtl ContT () (Cont r) a
20:26:32 <lambdabot> (a -> (() -> r) -> r) -> (() -> r) -> r
20:26:37 <ski> hololeap ^
20:27:38 <hololeap> huh, ok
20:28:00 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
20:28:27 notnatebtw joins (~nate@110.138.18.157)
20:28:44 <ski> (that's what i meant by "doubly". there's two CPS "levels", one on top of the other one)
20:29:00 <ski> hololeap : happen to know any Prolog ?
20:30:01 <hololeap> unfortunately, no. and i don't have a specific use-case needing Logic(T). i was just trying to understand another tool
20:30:27 hackage ordinal 0.3.1.0 - Convert numbers to words in different languages. https://hackage.haskell.org/package/ordinal-0.3.1.0 (wvanonsem90)
20:31:25 <ski> well, consider using lists as "multiple alternative successes"
20:31:42 <ski> what the `Applicative' and `Monad' instance of `[]' gives you
20:32:26 britva joins (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1)
20:33:01 z0_ joins (~z0@bl15-167-204.dsl.telepac.pt)
20:33:20 × z0_ quits (~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
20:33:21 <ski> you can think of `child :: Person -> [] Person' as computing for you "an arbitrary child" of a person (given some family relations database / knowledge base that this queries)
20:33:40 × Franciman quits (~francesco@host-82-54-10-114.retail.telecomitalia.it) (Quit: Leaving)
20:33:46 × buckworst quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
20:33:57 <ski> (well, let's rename that function to `childOf')
20:34:12 z0_ joins (~z0@bl15-167-204.dsl.telepac.pt)
20:34:28 <hololeap> interesting that you're not naming it "childrenOf", but i think i see where you're going
20:34:41 bartemius joins (~bartemius@109-252-19-142.nat.spd-mgts.ru)
20:34:47 <ski> then you could define `grandChildOf :: Person -> [] Person; grandChild person = do child <- childOf person; grandChild <- childOf child; return grandChild'
20:34:54 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
20:34:59 <ski> the point is to "think in the singular", so to speak
20:35:28 z0__ joins (~z0@bl15-167-204.dsl.telepac.pt)
20:35:28 <ski> it just so happens that it'll actually try all the children, so sequencing `;' here in `do' acts like nested loops
20:35:28 × erolm_a quits (~erolm_a@62.19.60.223) (Read error: Connection reset by peer)
20:35:41 erolm_a joins (~erolm_a@82.24.185.133)
20:35:44 × z0__ quits (~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
20:36:02 × z0_ quits (~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
20:36:05 × Iwawa quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 240 seconds)
20:37:05 <hololeap> grandChildOf = childOf >=> childOf
20:37:14 <ski> in Prolog, you'd write this as `grand_child_of(Person,GrandChild) :- child_of(Person,Child),child_of(Child,GrandChild).' (where you can read `:-' as "if")
20:38:32 <ski> ("`GrandChild' is a grand-child of `Person', if `Child' is a child of `Person', and `GrandChild' is a child of `Child'." is how you could read it out aloud)
20:38:44 × Guest46583 quits (~z0@bl15-167-204.dsl.telepac.pt) (Quit: Lost terminal)
20:39:13 × bartemius quits (~bartemius@109-252-19-142.nat.spd-mgts.ru) (Ping timeout: 264 seconds)
20:40:07 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
20:40:18 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
20:40:22 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Read error: Connection reset by peer)
20:40:33 <ski> consider `between(1,5,N),N > 2,M is N*N,M < 10'
20:40:41 stefan-__ joins (~cri@42dots.de)
20:41:01 <ski> `between(1,5,N)' will have five solutions for `N', being the integers between `1' and `5' (inclusive)
20:42:05 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:42:19 <ski> at first, `N = 1' is tried (first solution of that between/3 call). then `N > 1' is tried, but this fails (no solutions / "empty list of solutions"). this causes "backtracking" (the program "executing backwards"), going back to the last point where we had an alternative choice, which here was the between/3 call
20:43:31 <ski> so, the next solution of that call is tries, which is `N = 2', so execution resumes going forward again. but this solution also fails the test `N > 2', so we backtrack again, getting `N = 3' as solution from between/3, this time, finally passing the `N > 2' test
20:44:24 <ski> next, we compute `M' to be the square of `N', so now `M = 9'. and this passes `M < 10', so we have an overall solution to the whole query : `N = 3,M = 9' (`,' means "and")
20:44:30 <ski> hololeap : making any sense ?
20:44:54 z0 joins (~z0@bl15-167-204.dsl.telepac.pt)
20:44:58 × z0 quits (~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
20:45:00 <ski> > [(m,n) | n <- [1 .. 5],n > 2,let m = n*n,m < 10]
20:45:03 <lambdabot> [(9,3)]
20:45:04 <ski> is the Haskell version of this
20:45:37 <ski> > do n <- [1 .. 5]; guard (n > 2); let {m = n*n}; guard (m < 10); return (m,n) -- or, with `do'-notation
20:45:39 <lambdabot> [(9,3)]
20:47:24 <dminuoso> phadej: Hi! I recall you had a nice diagram of profunctor optics and their hierarchy, along with their profunctor constraints (Strong, Choice, etc). Was that up on the Glassery.md? If so, the images there are broken. :(
20:47:37 z0 joins (~z0@bl15-167-204.dsl.telepac.pt)
20:47:53 <ski> anyway ..
20:48:31 z0_ joins (~z0@bl15-167-204.dsl.telepac.pt)
20:49:08 <hololeap> dminuoso: this? http://i.imgur.com/ALlbPRa.png
20:49:16 <ski> .. after getting the first solution `N = 3,M = 9', we can ask the Prolog interactor to check if it can find any other/more. (usually by pressing `;', which means "or"). conceptually, this acts as we telling Prolog we're not satisfied with the solution it found, so that it should try to find another
20:49:31 <hololeap> dminuoso: sorry, that's lens not profunctors
20:49:40 × z0_ quits (~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
20:49:50 × texasmynsted quits (~texasmyns@104.140.52.83) (Remote host closed the connection)
20:50:06 <ski> (similar to how the `N > 2' test "told" the between/3 call that the first two solutions of it were no good, by starting backtracking ("backward execution"), so control returned back, "unreturned into", that between/3 call)
20:50:31 texasmynsted joins (~texasmyns@104.140.52.83)
20:51:26 <ski> in this case, the last choice-point was still in between/3 (none of the other goals after it had alternative solutions). so we'll then try `N = 4', which passes the `N > 2' test, but then the `M < 10' test fails (since `M = 16' then). and similarly the `N = 5' solution also fails, so we try to backtrack to the left of the first call (to between/3), and "hit the wall"
20:51:32 <ski> meaning, there are no (more) solutions
20:52:03 <ski> hololeap : that's a very quick intro to backtracking in Prolog
20:52:27 <hololeap> ski: so how would this look using the Logic monad?
20:52:44 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
20:53:19 <ski> well
20:53:26 <ski> first a little detour
20:53:51 <ski> consider how ordinary functions or procedures, in a strict programming language (like e.g. C) can be implemented
20:54:18 <ski> when calling a function, we will need to tell it where execution is to continue, after it has done its work
20:55:10 × texasmynsted quits (~texasmyns@104.140.52.83) (Ping timeout: 246 seconds)
20:55:38 <ski> in assembler, there's commonly an `rts' instruction, for returning, and a `jsr' or `call' instruction, for calling. the latter will e.g. put the address of the next instruction in a register, or on the stack. and the former will jump to that address, resuming control to the caller
20:55:40 × z0 quits (~z0@bl15-167-204.dsl.telepac.pt) (Quit: leaving)
20:55:51 <ski> the return address is a continuation
20:56:35 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Quit: Lost terminal)
20:56:51 z0 joins (~z0@bl15-167-204.dsl.telepac.pt)
20:56:52 × knupfer quits (~Thunderbi@200116b82c30ba0001bfef634072ae05.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
20:56:54 <ski> conceptually, it's an extra parameter that we pass, when calling a "function" (really, jumping to a memory address, with the expectation that parameters are passed in some standard locations, usually either in registers, or at some position relative to a current stack pointer)
20:57:34 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
20:57:50 × z0 quits (~z0@bl15-167-204.dsl.telepac.pt) (Client Quit)
20:58:25 <ski> in Haskell, a type `T' is equivalent to `forall o. (T -> o) -> o' (aka `forall o. Cont o T'). here the callback argument of type `T -> o' plays the same role as "what to do after"
20:59:15 <ski> but, to (efficiently) implement the Prolog execution, we need some way to be able to resume execution inside a call, e.g. to between/3, after it has already returned successfully !
21:00:02 × zigapeda1 quits (~zigapeda@195.140.213.38) ()
21:00:19 <ski> so, when between/3 returns, having succeeded in finding a solution, it will tell us a "redo" address, which we can jump to, if/when we're not satisfied with the current solution, would like the call to try to find another one, the next one
21:01:13 <ski> similarly, since a call may fail to have any solutions, and we may also run out of all the solutions it has, we need some way to tell it what to do (where to jump), if case it fails to find any (more) solutions. this is the "failure continuation"
21:01:28 texasmyn_ joins (~texasmyns@104.140.52.83)
21:01:54 <ski> so, instead of passing a single "return address", when calling a function, we're to pass two addresses. one being a "success continuation", and one being a "failure continuation"
21:02:18 <ski> in case there's no (more) solutions, it'll continue using the latter
21:02:18 × ixlun quits (~matthew@213.205.241.94) (Read error: Connection reset by peer)
21:02:36 × nineonin_ quits (~textual@216.81.48.202) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:03:14 <ski> in case there's one (more) solution, it'll continue, using the former. also passing to the former the "redo", which is what we'll pass as "failure continuation" to the next call, so it knows where to "backtrack to", if it fails (runs out of solutions)
21:03:23 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
21:03:36 <ski> so, consider a function of type `T -> [] U'
21:03:52 <ski> we'll replace `[] U' by continuation-passing
21:04:42 <ski> first we'll say `T -> (U -> ...) -> ...', where `U -> ...' is the (type of the) success continuation, that will be passed an `U' result/solution (if any is found)
21:05:20 <ski> but we also need a failure continuation, a separate parameter, so `T -> (U -> ...) -> (...) -> (...)'
21:05:58 <ski> if we were in a strict language, we'd need to model the failure continuation as a function (to delay computation of it)
21:06:08 × kori quits (~kori@arrowheads/kori) (Read error: Connection reset by peer)
21:06:25 <ski> we'd have `T -> (U -> ...) -> (() -> o) -> o'
21:07:52 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
21:07:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
21:08:00 <ski> e.g. consider a definition of `between :: Integer -> Integer -> Logic Integer', where `Logic a' means something like `(a -> ...) -> (() -> o) -> o'
21:08:04 <ski> base case is
21:08:37 <ski> between lo hi succeess failure | lo > hi = failure ()
21:08:50 × thir_ quits (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de) (Remote host closed the connection)
21:09:22 <ski> so, if there's no integers within the given bounds, we (tail-)call the failure continuation
21:09:50 <ski> (and this forces the return type of the failure continuation to be the same as the overall return type. the "final result/answer" type `o')
21:10:20 <ski> next, we need to elaborate the type of the success continuation
21:10:55 hekkaidekapus} joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
21:10:55 <ski> i said that it should be passed (by `between', in this case), a "redo", where to continue, if we want to search for more solutions
21:11:10 × noteness_ quits (noteness@unaffiliated/nessessary129) (Quit: I'LL BE BACK)
21:11:35 noteness joins (noteness@unaffiliated/nessessary129)
21:11:43 <ski> and i mentioned that that "redo" is actually also a failure continuation (which could be passed to further calls, down the line, to let them know where to go (back, where to backtrack to), if they fail to find any solution)
21:12:23 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
21:12:41 <ski> so, we refine `T -> (U -> ...) -> (() -> o) -> o' further to `T -> (U -> (() -> o) -> o) -> (() -> o) -> o' (so `Logic a' is `(a -> (() -> o) -> o) -> (() -> o) -> o', or actually `forall o. (a -> (() -> o) -> o) -> (() -> o) -> o')
21:13:01 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
21:13:08 <ski> so, the successful case of `between' now becomes
21:13:17 × jud quits (~jud@unaffiliated/jud) (Read error: Connection reset by peer)
21:13:20 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
21:13:34 × tnm quits (~tnm@dslb-084-056-234-071.084.056.pools.vodafone-ip.de) (Quit: leaving)
21:13:52 × ph88 quits (~ph88@2a02:8109:9e40:2704:4db:e8f1:c91e:6140) (Quit: Leaving)
21:13:54 <ski> between lo hi success failure = success lo redo
21:13:56 <ski> where
21:14:14 <ski> redo () = between (lo + 1) hi success failure
21:14:45 <ski> however, in a non-strict language, we can drop the `()' argument types, so we have just
21:15:13 <ski> between :: Integer -> Integer -> ((Integer -> o -> o) -> o -> o)
21:16:37 <ski> hololeap : so .. this is more or less what `Logic' does. next, you'd go on to define conjunction (which is basically `(>>=)'), and also disjunction
21:17:35 × coot quits (~coot@37.30.51.94.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
21:17:36 <ski> what the CPS does, in Haskell, is it makes the "list of successes/solutions" virtual, passed directly to consumers
21:17:53 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
21:18:22 falafel joins (~falafel@71-34-132-121.clsp.qwest.net)
21:22:16 borne joins (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de)
21:22:27 irc_user joins (uid423822@gateway/web/irccloud.com/x-ozudxpdqqqotmvjh)
21:23:47 Pitaya joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
21:24:18 × Plantain quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 260 seconds)
21:24:32 christo joins (~chris@81.96.113.213)
21:25:16 <hololeap> but we also need a continuation of sorts, that ignores its argument, to be used in the case of failure
21:25:21 <hololeap> i'm with you so far
21:26:31 <ski> (some of that may have been a bit unclear. do yell if you wonder about something)
21:27:13 × jsynacek quits (~jsynacek@ip-185-149-130-112.kmenet.cz) (Ping timeout: 260 seconds)
21:28:11 <ski> (btw, `between' is just a version of `enumFromTo', which is what `\lo hi -> [lo .. hi]' amounts to)
21:28:22 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 260 seconds)
21:29:24 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
21:30:12 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
21:30:39 <tomsmeding> this is a new one: 'variance introduced by outliers: -9223372036854775808% (severely inflated)'
21:30:46 notnatebtw joins (~nate@110.138.18.157)
21:31:15 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
21:31:34 nexya joins (2eef64c3@marwin.brg.sgsnet.se)
21:31:35 <koz_> Uhh...
21:31:47 <koz_> That's an oddly specific number there.
21:31:51 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:32:00 <ski> negative variance ?
21:32:07 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
21:32:24 <tomsmeding> unsure
21:32:30 <tomsmeding> it _is_ an oddly specific number
21:32:57 <ski> criterion ?
21:33:01 <tomsmeding> yeah
21:33:21 <tomsmeding> > printf "%x" 9223372036854775808
21:33:23 <lambdabot> error:
21:33:23 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M315352001722...
21:33:23 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
21:33:30 <tomsmeding> > printf "%x" (9223372036854775808 :: Integer)
21:33:32 <lambdabot> error:
21:33:32 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M830512809473...
21:33:32 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
21:33:39 <ski> > printf "%x" 9223372036854775808 :: String
21:33:41 <lambdabot> "8000000000000000"
21:33:46 <ski> ooh
21:33:47 <tomsmeding> OverloadedStrings?
21:33:53 × nexya quits (2eef64c3@marwin.brg.sgsnet.se) (Remote host closed the connection)
21:33:56 <tomsmeding> but yeah INT64_MIN
21:34:14 <ski> @type "abc"
21:34:15 <lambdabot> [Char]
21:34:16 <ski> @type printf
21:34:17 <lambdabot> PrintfType r => String -> r
21:34:25 tomsmeding is confused
21:34:42 nineonine joins (~textual@216.81.48.202)
21:34:51 <tomsmeding> oh PrintfType is the thing as always with printf
21:35:05 <ski> it's the vararg trick thing, yea
21:35:23 <tomsmeding> the only reason I used printf is that I failed to remember showIntAtBase
21:35:34 <tomsmeding> I floundered between showBase, showAtBase, showIntBase
21:36:25 <tomsmeding> but I'm not sure what criterion is up to
21:37:23 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
21:38:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:38:33 conal joins (~conal@ip-66-115-176-174.creativelink.net)
21:38:45 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
21:39:06 <monochrom> 9223372036854775808 looks like an invalid file descriptor we ran into a week or two ago.
21:39:20 <monochrom> Now it is negated and presented as an illegal variance? :)
21:43:45 niko is now known as nuka
21:43:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
21:44:18 <tomsmeding> well an invalid file descriptor it certainly is, though I'm curious how you got a file descriptor in a 64-bit int
21:46:16 × Ariakenom quits (~Ariakenom@h-82-196-111-63.NA.cust.bahnhof.se) (Quit: Leaving)
21:46:35 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Remote host closed the connection)
21:46:43 <dolio> > minBound :: Int
21:46:44 <lambdabot> -9223372036854775808
21:47:45 × acidjnk_new2 quits (~acidjnk@p200300d0c7237831d40d0866fc0488e0.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
21:49:21 thir joins (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de)
21:50:11 × danvet_ quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
21:51:59 <tomsmeding> ah apparently criterion gets confused when you pass it a benchmark that takes <1ms until you repeat it 14 times, then it takes 3 seconds
21:52:16 <monochrom> Oddly enough, -9223372036854775808 is an even number, not an odd number. >:)
21:52:21 <tomsmeding> how my function gets that behaviour is yet unknown, but at least that's an interesting factoid
21:52:34 <tomsmeding> monochrom: is that odd?
21:54:56 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds)
21:56:32 vicfred joins (~vicfred@unaffiliated/vicfred)
21:56:33 crestfallen joins (~john@128.32.176.159)
21:57:52 × ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection)
21:58:07 × thir quits (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
21:58:16 × notnatebtw quits (~nate@110.138.18.157) (Quit: WeeChat 2.9)
21:58:27 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
21:59:00 × arw quits (~arw@impulse.informatik.uni-erlangen.de) (Remote host closed the connection)
22:00:07 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:01:00 jedws joins (~jedws@101.184.148.229)
22:01:13 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
22:01:40 stefan-__ joins (~cri@42dots.de)
22:02:43 <AWizzArd> Are there implementations of `sequence` that are not `sequence = sequenceA`?
22:02:43 × ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Ping timeout: 246 seconds)
22:03:26 × aidecoe quits (~aidecoe@unaffiliated/aidecoe) (Remote host closed the connection)
22:04:18 <ghoulguy> There are two trivial cases of that in http://hackage.haskell.org/package/base-4.14.0.0/docs/src/Data.Traversable.html#sequence
22:04:28 <ghoulguy> I don't know of any interesting cases off the top of my head though
22:05:33 × britva quits (~britva@2a02:aa13:7240:2980:b1bf:9c31:7687:bea1) (Quit: This computer has gone to sleep)
22:06:19 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
22:07:28 <crestfallen> hi does each line of a do block (after the first line) end up initially with essentially m(m a) .. thus requiring join ? i.e. is (>>= id) applied on each line?
22:10:25 kori joins (~kori@2804:14c:85a3:9105::1000)
22:10:25 × kori quits (~kori@2804:14c:85a3:9105::1000) (Changing host)
22:10:25 kori joins (~kori@arrowheads/kori)
22:10:25 × dhouthoo quits (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
22:10:40 phadej parts (phadej@tiku.daug.net) ()
22:11:57 hackage b9 3.2.0 - A tool and library for building virtual machine images. https://hackage.haskell.org/package/b9-3.2.0 (SvenHeyll)
22:12:21 × redeemed quits (~rd@2a02:2f0b:b20a:d200:75cb:8151:518a:825f) (Ping timeout: 272 seconds)
22:12:24 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Remote host closed the connection)
22:12:30 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
22:12:34 × AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Read error: Connection reset by peer)
22:12:48 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:12:50 falafel joins (~falafel@71-34-132-121.clsp.qwest.net)
22:14:03 <crestfallen> because in kleisli composition we have this: https://termbin.com/xnxfu where the result is m(m c) , requiring join to make it behave like bind
22:14:36 <crestfallen> if I understand correctly
22:17:22 <dolio> AWizzArd: There is an implementation that is operationally different in ways that usually wouldn't matter much.
22:18:10 × texasmyn_ quits (~texasmyns@104.140.52.83) ()
22:18:16 <dolio> Although it used to matter more when GHC treated stack as a more limited resource than heap.
22:18:25 texasmynsted joins (~texasmyns@104.140.52.83)
22:18:35 <texasmynsted> hello
22:20:13 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
22:21:01 notnatebtw joins (~nate@110.138.18.157)
22:21:13 <crestfallen> I ask because I saw this notation do; ma <- mma so that must indicate join is applied. is that correct?
22:22:21 <koz_> texasmynsted: Sup?
22:23:21 <crestfallen> koz_, hi are my ramblings above correct?
22:23:30 <koz_> crestfallen: Your ramblings above are unclear.
22:23:40 <crestfallen> hmm
22:23:44 <koz_> At this point, I would say 'just write the do-notation desugaring by hand'.
22:23:49 <koz_> And also 'stop getting hung up on syntax'.
22:23:54 <koz_> There is nothing special about that naming.
22:24:06 <koz_> I could have written the above snippet as do; foo <- bar.
22:24:16 <koz_> How you name variables doesn't change semantics.
22:25:16 <crestfallen> yeah, I was thinking about join and (>>= id) if that operates for every action in a do block.
22:25:27 arw joins (~arw@impulse.informatik.uni-erlangen.de)
22:25:45 <koz_> If you are unclear how any given do-block operates, seriously, break out a whiteboard (or pen and paper, or whatever), and do the desugaring by hand.
22:25:59 thir joins (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de)
22:25:59 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
22:26:08 <crestfallen> for purposes of flattening the left side of bar <- foo
22:26:12 <koz_> Do this a few times, and you'll see it without having to do that step.
22:26:57 hackage ukrainian-phonetics-basic 0.1.1.0 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.1.1.0 (OleksandrZhabenko)
22:27:46 <texasmynsted> not much
22:29:09 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!)
22:29:12 <crestfallen> koz_, thank you - the thing is I believe I understand bind best from understand the type unification of (<<= id). so I'm thinking in those terms (yes, at the type level :/ )
22:29:24 <crestfallen> from understanding*
22:29:33 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:29:36 <koz_> crestfallen: I would argue that, for understanding do-notation, this is a _terrible_ plan.
22:29:43 <koz_> Do-notation is syntactic sugar.
22:29:55 <koz_> If you want the semantics of a particular piece of do-notation, desugar it.
22:30:07 × thir quits (~thir@p200300f27f19de00eca173dc7e5d6773.dip0.t-ipconnect.de) (Ping timeout: 244 seconds)
22:30:12 <koz_> That is 100% of the issue, and tying yourself in knots about it like this impedes your own understanding.
22:30:42 aidecoe joins (~aidecoe@unaffiliated/aidecoe)
22:31:01 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:31:25 Tops2 joins (~Tobias@dyndsl-095-033-090-095.ewe-ip-backbone.de)
22:32:16 × Pitaya quits (~mdomin45@cpe-24-211-129-187.nc.res.rr.com) (Ping timeout: 256 seconds)
22:32:31 <crestfallen> wow, ok thanks. like this I get: Just (Just a) >>= id ==> Just a
22:32:48 <texasmynsted> wow. stan is working for me now. :-) It is really helpful
22:33:02 <koz_> OK, then your only issue is that you have to stop thinking about do-notation as _anything_ other than syntactic sugar.
22:33:17 <koz_> Literally, just go 'right, this is do-notation, let's manually desugar'.
22:33:21 <koz_> And do this until it sticks.
22:33:24 Plantain joins (~mdomin45@cpe-24-211-129-187.nc.res.rr.com)
22:34:20 × karanlikmadde quits (~karanlikm@2a01:c22:b046:2a00:218a:97bb:be49:dab9) (Quit: karanlikmadde)
22:34:30 whatisRT joins (~whatisRT@2002:5b41:6a33:0:61c5:a3a1:1437:ebe5)
22:34:39 <crestfallen> koz_, while learning, I need to take any angle I can get. (>>= id) brought a lot of insight. so yeah I'm hung up on it presently :)
22:35:05 <koz_> crestfallen: And I'm telling you that your attempt at angling is getting you _more_ confused.
22:35:06 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
22:35:20 <koz_> Literally, do-notation is syntax sugar. Nothing more, nothing less. Approach it as such, nothing else.
22:35:40 <monochrom> do-notation doesn't desugar to join or >>=id.
22:36:15 <crestfallen> someone on the channel told me to use >>= instead. not sure of the context of that chat, but I do prefer it somehow.
22:36:28 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!)
22:36:40 <koz_> crestfallen: Nobody's holding a gun to your head and forcing you to use do-notation.
22:36:52 <crestfallen> !! thanks
22:36:54 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:36:57 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
22:37:09 <monochrom> Preference is irrelevant. do-notation desugars to >>=. Not join, not >>=id.
22:37:23 × p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 258 seconds)
22:38:21 <crestfallen> well, if I could ask differently: is (>=>) just like bind, sans join?
22:38:29 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
22:38:46 <davean> sans join?
22:38:47 <crestfallen> meaning >=> sans join
22:39:11 <crestfallen> >=> doesn't implement join
22:39:11 <monochrom> I refuse to talk about "like". Everything is like everything. Everything is also unlike everything else.
22:40:57 <davean> Hum, in this case we're talking about something precise. We can say "A can be implimented with the same code as B, except lacking exactly the inclusion of a join"
22:41:29 <koz_> monochrom is like koz_.
22:41:50 <monochrom> http://www.vex.net/~trebla/humour/tautologies.html #0
22:41:50 × chaosmasttter quits (~chaosmast@p200300c4a70942015d50de0935368812.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
22:42:33 <crestfallen> for example, this is lost on me:
22:42:40 × tzh quits (~tzh@2601:448:c500:5300::19b0) (Quit: jsdkj)
22:42:59 <crestfallen> λ > :t (>=> join)
22:43:03 <crestfallen> (>=> join) :: Monad m => (a -> m (m (m c))) -> a -> m c
22:43:19 <davean> monochrom: perhaps you'd prefer the question "What is the relation of (>>=) and (>=>) in regards to 'join'?"?
22:43:27 <monochrom> Fortunately (>=> join) seldom comes up at all.
22:43:44 <davean> I don't know why that would come up - thats a weird structure
22:43:45 <crestfallen> davean thanks I need that terminology!
22:44:08 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!)
22:44:25 p8m joins (p8m@gateway/vpn/protonvpn/p8m)
22:44:35 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:47:18 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit)
22:47:23 <crestfallen> davean, if you care to look, this is from a bartosz tutorial: https://termbin.com/xnxfu
22:47:23 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
22:47:41 stefan-__ joins (~cri@42dots.de)
22:47:44 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:47:48 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
22:47:50 <crestfallen> https://www.schoolofhaskell.com/user/Lkey/kleisli
22:48:07 <davean> crestfallen: right and join takes 'm (m a) -> m a'
22:48:58 <crestfallen> yeah that was helpful, I thought anyway :)
22:49:01 <davean> Because of a property of m
22:49:17 <davean> Its not helpful for me, and I'm unclear why its helpful for you which worries me but :)
22:49:18 <koz_> Is there such a thing as mapMaybeM?
22:49:34 <davean> koz_: yes?
22:49:42 <davean> in a few packages
22:49:49 <koz_> @hoogle mapMaybeM
22:49:50 <lambdabot> Data.Conduit.List mapMaybeM :: Monad m => (a -> m (Maybe b)) -> ConduitT a b m ()
22:49:50 <lambdabot> Control.Monad.Extra mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
22:49:50 <lambdabot> Extra mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
22:50:05 × xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 240 seconds)
22:50:13 <davean> You can easily compose it from base with catMaybes and mapM of course
22:50:28 <davean> Which is generally what I do ... repeatedly
22:50:33 <koz_> davean: Rofl.
22:50:38 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit)
22:51:01 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:51:41 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
22:51:51 <koz_> :t catMaybes
22:51:52 <lambdabot> [Maybe a] -> [a]
22:51:57 <koz_> (miaow)
22:52:15 <davean> I just grepped, the occurencies of the obvious definition currently in my projects on this computer is depressing.
22:52:20 <crestfallen> davean, helpful because m(m a) needs a flatten. so it led me to think if flatten is implicit in >>= alone. also because of seeing this notation which implies that: do; ma <- mma
22:52:28 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit)
22:52:47 ukari joins (~ukari@unaffiliated/ukari)
22:52:49 × babygnu quits (~robert@gateway/tor-sasl/babygnu) (Remote host closed the connection)
22:52:53 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
22:53:11 dansho joins (~dansho@ip68-108-167-185.lv.lv.cox.net)
22:53:30 <davean> er ...
22:53:42 <davean> So try desuggering what actually happens there.
22:54:09 <crestfallen> thanks ko*z suggested that but I'm not sure what to do..
22:54:22 <davean> Also, if you think of it as "flattening" its one *very* specific notion of that at best.
22:54:48 <crestfallen> thanks that's helpful
22:54:50 <davean> Not saying you're entirely off base, but I think that conceptualization will lead you astray
22:55:22 <davean> crestfallen: so you've never seen how "do" desugars?
22:56:08 <crestfallen> davean I'm reviewing some stuff after a long and difficult absence from learning. not sure
22:56:48 <crestfallen> pretty straightforward, I guess?
22:56:52 <davean> EXTREMELY
22:56:57 <davean> crestfallen: you might want to look at the Haskell Report
22:57:05 <davean> it isn't very long and its very clear and covers all the sugar
22:57:13 <davean> which is *just* sugar and really only has one rule.
22:57:25 <crestfallen> excellent thanks.. looking now
22:57:46 <monochrom> Nah, the whole Haskell Report is pretty long. But don't worry, the section on do-notation is short, as promised.
22:58:40 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
22:58:44 <davean> Ok, right
22:58:58 <crestfallen> cool
22:59:29 <MarcelineVQ> monochrom: I saw a tutorial once by some unknown author that covered the sugar quite well, also covered IO at the same time amazingly
22:59:34 <davean> It has a lot of (mostly irrelivent) code also, for the basic libraries for example - ignore all that of course
22:59:44 <monochrom> haha
23:00:43 <davean> "do" is less than a page
23:00:54 <davean> (and most of it is the grammar for it)
23:01:30 <monochrom> Oh, right, the Haskell Report includes treating "general_pattern <- foo" using "fail", that's going to be distracting.
23:01:42 × borne quits (~fritjof@200116b864c00d0000dd0a7f6ac41015.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
23:01:51 <davean> Oh damn it is out of date on that
23:02:23 <MarcelineVQ> fret not
23:02:30 bitmagie joins (~Thunderbi@200116b806c15c0034a3f18e66d83a15.dip.versatel-1u1.de)
23:02:36 <crestfallen> yeah I get that pretty much
23:02:45 <davean> Its MonadFail instead of Monad, but thats kinda minor
23:02:48 <davean> still, annoying.
23:02:52 × ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection)
23:02:55 × ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Ping timeout: 246 seconds)
23:03:29 ukari joins (~ukari@unaffiliated/ukari)
23:03:46 × dcoutts_ quits (~duncan@33.14.75.194.dyn.plus.net) (Ping timeout: 272 seconds)
23:04:48 <crestfallen> but id changes things in far more interesting ways than I would have expected
23:04:59 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!)
23:05:03 <davean> id changes things? What do you mean?
23:05:18 <crestfallen> one moment
23:05:24 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
23:05:30 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Client Quit)
23:05:54 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
23:08:12 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
23:09:20 <crestfallen> davean, I'm still looking for a study I did, but i.e. when it's determined the g :: id here https://termbin.com/m3z6
23:10:27 <crestfallen> finding the type of f
23:10:30 <crestfallen> f g h x y = g (g x) (h y)
23:11:57 <davean> What do you tihnk 'id' is "changing" there?
23:12:04 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
23:12:13 × dxld quits (~dxld@80-109-136-248.cable.dynamic.surfer.at) (Ping timeout: 264 seconds)
23:12:14 <davean> If g can only *be* 'id' in what sense has anything changed?
23:13:19 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
23:14:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:14:02 × Ferdiran1 quits (~max@2001:4c78:2012:5000::2) (Ping timeout: 244 seconds)
23:14:10 Ferdirand joins (~max@2001:4c78:2012:5000::2)
23:14:44 <crestfallen> in that case I meant that seeing how g resolves to id was quite surprising. davean
23:15:23 <davean> Ah, sure. Not sure the relation to 'do' notation, but ow I understand what you meant at least.
23:15:38 <davean> f is a very weird function
23:15:58 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Quit: Konversation terminated!)
23:16:23 oisdk_ joins (~oisdk@2001:bb6:3329:d100:110c:4b45:443f:14f0)
23:16:24 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
23:16:32 dxld joins (~dxld@2a01:4f8:201:89ff:7479:df6a:7ab8:8305)
23:17:20 conal joins (~conal@ip-66-115-176-174.creativelink.net)
23:17:27 × oisdk quits (~oisdk@2001:bb6:3329:d100:110c:4b45:443f:14f0) (Ping timeout: 260 seconds)
23:18:35 <ski> crestfallen : "does each line of a do block (after the first line) end up initially with essentially m(m a) .. thus requiring join" -- yes, essentially. that is, each implicit use of `(>>=)' (connecting lines, more or less) could be thought of as `fmap' and `join'
23:19:18 <davean> Specificly we can implikent join and (>>=) via each other basicly.
23:19:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
23:19:37 <crestfallen> ski thanks! you have an uncanny ability to decipher my rambling!
23:20:30 <ski> (you could think of the collapsing of `m (m (m (..(m (m a))..)))' (as many `m's, as there's commands in the `do', minus one) into `m a', as effecting the (dynamic) sequencing of effects)
23:20:33 ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
23:21:00 <crestfallen> I thought so ski , because of this little ditty from kleisli composition: https://termbin.com/xnxfu
23:21:12 <ski> yes
23:21:54 <crestfallen> yeah that's what I thought. each action would produce a nested layer
23:22:59 <ski> (for an idiom `i' (that is `i' an instance of `Applicative'), you instead collapse `(i a,i b,i c,...,i y,i z)' to `i (a,b,c,...,y,z)', the combination of the multiple `i's here into a single one is what i sometimes refer to as "static sequencing")
23:24:25 × dhil quits (~dhil@195.213.192.122) (Ping timeout: 240 seconds)
23:25:03 klixto joins (~klixto@130.220.8.131)
23:25:19 <crestfallen> is that why the monad keeps the nested function 'pure' ? because the structure of the 'outer' monad is immutable? ski
23:25:23 <ski> for a monad `m', you can decide what to do next, depending on the results of the effect interaction you do first. so, to read a line in `IO', and then to output that line, you can do `fmap putStrLn getLine', which has type `IO (IO ())'. but to get this into a single `IO ()' that will first input a line, then output it, you use `join'
23:25:41 <ski> (the "first .., then .." is the (dynamic) sequencing here)
23:26:00 <ski> i don't understand the question
23:26:04 hekkaidekapus} is now known as hekkaidekapus
23:26:44 <sshine> crestfallen, "the monad keeps the nested function 'pure'" does not parse here, either.
23:26:52 <ski> `join' can be thought of as combining the effects described by two `m'-layers, one nested inside the other. combining them into a single `m'-layer, that does the effects of both the original layers
23:26:57 <sshine> crestfallen, maybe you could simplify
23:27:21 <ski> `pure'/`return', on the other hand, introduces a "dummy" layer, which doesn't actually do any effect
23:27:50 <crestfallen> ski yeah the single 'm' layer gains complexity as you go through each action
23:28:07 <ski> (hm .. but on second reading, possibly you weren't talking about the operation `pure', belonging to the type class `Applicative' ..)
23:28:41 <crestfallen> ski is my last post correct?
23:29:10 <ski> i don't know what you mean by ".. layer gains complexity"
23:29:20 <ski> (also "each action" -- each of which actions ?)
23:29:32 <davean> waht is complexity?
23:29:47 <crestfallen> there are more effects in the single m (a) layer ultimately I guess?
23:30:03 <ski> after you've used `join', yes
23:30:11 <davean> I'm weirded out here crestfallen because you seem to be taking a rigorous approach with some things, yet your thinking seems entirely fuzzy so I feel like I'm missing something large in this convesation
23:30:17 <crestfallen> that's what I meant by complexity
23:30:40 <crestfallen> davean, I have a screw loose :)
23:30:50 × ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection)
23:31:31 wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:31:33 <sshine> > join [[1,2,3],[4,5,6],[7,8,9]]
23:31:34 <lambdabot> [1,2,3,4,5,6,7,8,9]
23:31:40 <sshine> > join (Just (Just 5))
23:31:42 <lambdabot> Just 5
23:32:08 <crestfallen> a monad gains complexity because structure is added every time >>= is applied.
23:32:16 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
23:32:36 <davean> Uh, "cocks head for a different view of that statement"
23:32:37 <ski> > [join actionYieldingAction | actionYieldingAction <- [Nothing,Just Nothing,Just (Just 5)]]
23:32:39 <lambdabot> [Nothing,Nothing,Just 5]
23:32:56 <ski> crestfallen : "a monad" -- no, a monadic action. not a monad
23:33:52 <sshine> > Just 42 >>= pure >>= pure >>= pure -- more complex?
23:33:55 <lambdabot> Just 42
23:33:58 <crestfallen> so at the math level, the object is gaining complexity from each morphism that is applied
23:34:14 <ski> yes, "more" in the lax sense, as `>=', not as `>'
23:35:01 <crestfallen> isn't that what it is in the math?
23:35:19 <sshine> > (2 + 2) `mod` 3 -- more complex at the math level?
23:35:21 <lambdabot> 1
23:35:24 <ski> crestfallen : consider `[0,1,2] >>= \x -> [x^2,-x^2] >>= \y -> []'
23:35:54 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
23:35:55 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
23:35:55 GyroW_ joins (~GyroW@unaffiliated/gyrow)
23:36:25 × wroathe_ quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds)
23:36:47 × Tops2 quits (~Tobias@dyndsl-095-033-090-095.ewe-ip-backbone.de) (Read error: Connection reset by peer)
23:36:55 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 265 seconds)
23:37:00 <ski> (aka `map (\x -> map (\y -> []) [x^2,-x^2]) [0,1,2]'. or `[z | x <- [0,1,2],y <- [x^2,-x^2],z <- []')
23:37:08 <sshine> crestfallen, I'm not really an expert at the math level, but I'd think that monoidal composition just yields another member. so if there's any complexity added, it's at the computational level, since you have a bigger expression that needs to be resolved.
23:37:58 <ski> crestfallen : after we've added the `>>= \y -> []' at the end, we get an empty list. if we add some further `>>= \z -> ..z..', we'll still have an empty list
23:38:09 <crestfallen> sshine but I thought that the object.. the monad structure, is increased upon, but ski just illustrated that it's not always the case [0,1,2] >>= \x -> [x^2,-x^2] >>= \y -> []
23:38:49 <ski> so, in this case, adding `>>= \y -> []' makes things "simple" in the sense of getting a plain empty list (that no further use of `>>=' can change to a non-empty list)
23:38:59 <sshine> crestfallen, at the syntactic level, many >>=s chained together is more complex. upon evaluation, it really depends.
23:39:02 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:39:06 <crestfallen> the list is unchanged.. but in the intermediary steps, it "takes on" complexity, I thought
23:39:30 <ski> compare with multiplying numbers. if you have `a * b * c * ... * y * z'
23:39:55 <ski> as you multiply `a' by `b', then the result of that by `c', and so on, you'd generally say you get something more complex
23:40:26 <ski> but if one of the factors happen to be zero, then regardless of what the latter factors you multiply in are, you'll still always get zero
23:40:45 <crestfallen> exactly. adding 2 + 3 gives us five, which has unique properties
23:41:01 × AceNovo quits (~chris@67-42-33-191.phnx.qwest.net) (Ping timeout: 264 seconds)
23:41:02 <crestfallen> exactly two posts back ski
23:41:04 × alp quits (~alp@88.126.45.36) (Ping timeout: 246 seconds)
23:41:26 <crestfallen> compare with multiplying numbers ....
23:41:47 <ski> so, you could say, that in general, you get more complexity (where "more" really means "more, or else the same" (that is "not less")). but in special cases, you could get something simpler
23:41:53 dwt joins (~dwt@c-98-200-58-177.hsd1.tx.comcast.net)
23:44:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
23:44:01 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
23:44:22 AceNovo joins (~chris@67-42-33-191.phnx.qwest.net)
23:44:23 stefan-__ joins (~cri@42dots.de)
23:44:49 <crestfallen> yeah. so ski in category theory, I've read that the object can literally expand, change dimension, once morphisms are applied. isn't what this is about?
23:45:10 <ski> i don't know what you mean by that
23:45:11 <crestfallen> in the case where they become more complex..
23:45:26 <ski> in category theory, morphisms are not applied to objects
23:45:40 <crestfallen> they are applied to sets, right?
23:45:48 <ski> what's called "objects", there, is the possible domains and codomains of morphisms
23:45:51 <ski> no
23:45:55 <ski> they aren't applied at all
23:45:58 <ski> they're composed
23:46:09 <crestfallen> right, actually I meant that..
23:46:30 <crestfallen> so monad is a composition, because the structure changes
23:46:39 <ski> in category theory, if you have `f : A >---> B' and `g : B >---> C', you can compose them as `g . f : A >---> C'
23:46:52 <ski> but there is no application like `f(x)'/`f x'
23:47:04 <ski> objects, like `A', doesn't have "elements"
23:47:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:47:23 <crestfallen> no, but 'A' has structure, right?
23:47:30 <ski> "so monad is a composition, because the structure changes" -- sorry, dunno what this means
23:47:43 alp joins (~alp@2a01:e0a:58b:4920:b176:4a05:144c:cd70)
23:47:54 <crestfallen> (>>=) is a form of composition is what I meant
23:48:28 <ski> from the point of view of category theory, the "structure" of an object like `A' is given in terms of knowing which morphisms compose to which morphisms
23:48:47 <crestfallen> yes!
23:49:27 <ski> but when you "implement" a category, you can choose to implement the objects as some sort of set/type, commonly with some extra "structure" (like having a binary operation, and a neutral element, which could give us a monoid)
23:49:31 <crestfallen> category theory applies to monadic actions, because the object is changing
23:49:33 × darjeeli1 quits (~darjeelin@122.245.123.118) (Ping timeout: 260 seconds)
23:49:33 × falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 256 seconds)
23:49:57 <crestfallen> the structure of the object, is what I was led to believe.
23:50:02 <ski> `(>=>)' corresponds to composition (in "the Kleisli category"), `(>>=)' does not
23:50:25 LKoen joins (~LKoen@lstlambert-657-1-123-43.w92-154.abo.wanadoo.fr)
23:50:30 <crestfallen> one moment pls
23:50:30 darjeeli1 joins (~darjeelin@122.245.123.118)
23:50:34 <ski> i don't understand "category theory applies to monadic actions, because the object is changing" either
23:51:10 <monochrom> I'm pretty sure this word game is getting nowhere.
23:51:17 × deadk quits (e@freenode/staff/spy.edk) (Quit: edk)
23:51:30 × conal quits (~conal@ip-66-115-176-174.creativelink.net) (Quit: Computer has gone to sleep.)
23:51:35 <MarcelineVQ> lol deadk
23:51:43 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:52:07 <MarcelineVQ> ghoulguy: your good natured antics have gone too far!
23:52:11 <crestfallen> buzz wreckers enter
23:52:14 × stefan-__ quits (~cri@42dots.de) (Read error: Connection reset by peer)
23:52:41 stefan-__ joins (~cri@42dots.de)
23:52:43 <ski> crestfallen : fancy moving to #haskell-overflow ?
23:52:45 <ghoulguy> MarcelineVQ: I'm just a willing participant; edk got me into it
23:53:14 <MarcelineVQ> man, what am I supposed to do, I'm intrinsicly themed already
23:53:25 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
23:53:35 <monochrom> I want to participate too, but can't think of a spooky mutation of my nick.
23:53:49 <MarcelineVQ> spookochrom
23:54:15 <crestfallen> sure ski.
23:54:15 <MarcelineVQ> monomoooaaannnn
23:54:24 <monochrom> Apart from "joseph" which is an obscure reference to "joseph and the technocolor dream coat" which is the opposite of "monochrome".
23:54:59 × crestfallen quits (~john@128.32.176.159) (Quit: Leaving)
23:55:45 × darjeeli1 quits (~darjeelin@122.245.123.118) (Ping timeout: 240 seconds)
23:55:45 <MarcelineVQ> heartbreak boy, you can just type /join #haskell-overflow :(
23:55:47 crestfallen joins (~john@128.32.176.159)
23:56:00 <monochrom> or "monodome" or "thunderchrom" in reference to "mad max ... thunderdome"
23:56:13 <MarcelineVQ> monomax: beyond the thunderchrome
23:56:39 darjeeli1 joins (~darjeelin@122.245.123.118)
23:57:31 × veverak quits (~squirrel@ip-89-102-98-161.net.upcbroadband.cz) (Ping timeout: 246 seconds)

All times are in UTC on 2020-10-21.