Home freenode/#haskell: Logs Calendar

Logs on 2020-12-11 (freenode/#haskell)

00:00:27 × lyxia quits (~lyxia@poisson.chat) (Quit: WeeChat 2.9)
00:02:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:06:30 × Gurkenglas_ quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 256 seconds)
00:09:20 × puffnfresh quits (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) (Ping timeout: 256 seconds)
00:09:57 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.29.209)
00:10:49 × dopplergange quits (~dop@195.158.249.47) (Ping timeout: 260 seconds)
00:11:37 × columbarius quits (~columbari@87.123.198.202) (Ping timeout: 264 seconds)
00:12:09 tromp joins (~tromp@dhcp-077-249-230-040.chello.nl)
00:12:12 × Benzi-Junior quits (~BenziJuni@88-149-65-135.du.xdsl.is) (Quit: gone)
00:12:52 columbarius joins (~columbari@mue-88-130-54-091.dsl.tropolys.de)
00:15:03 × gxt__ quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
00:15:03 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Ping timeout: 240 seconds)
00:15:03 × xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 240 seconds)
00:15:03 × cantstanya quits (~chatting@gateway/tor-sasl/cantstanya) (Ping timeout: 240 seconds)
00:15:19 dopplergange joins (~dop@195.158.249.47)
00:15:23 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 240 seconds)
00:15:24 × srk quits (~sorki@gateway/tor-sasl/sorki) (Ping timeout: 240 seconds)
00:15:24 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
00:15:24 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
00:15:43 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
00:15:44 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Ping timeout: 240 seconds)
00:15:44 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
00:15:44 × skiold quits (~skiold@gateway/tor-sasl/skiold) (Ping timeout: 240 seconds)
00:15:44 × tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Ping timeout: 240 seconds)
00:15:44 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
00:16:03 × hexo quits (~hexo@gateway/tor-sasl/hexo) (Ping timeout: 240 seconds)
00:16:03 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 240 seconds)
00:16:28 <Squarism> Thought I was down with function composition. But apparently not
00:16:36 <Squarism> :t _1
00:16:38 <lambdabot> (Field1 s t a b, Functor f) => (a -> f b) -> s -> f t
00:16:54 <Squarism> :t (.)
00:16:57 <lambdabot> (b -> c) -> (a -> b) -> a -> c
00:17:08 <Squarism> :t _1 . _2
00:17:10 <lambdabot> (Field1 s t a1 b1, Functor f, Field2 a1 b1 a2 b2) => (a2 -> f b2) -> s -> f t
00:17:51 <Squarism> I cannot really see how that result is achieved
00:18:14 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 265 seconds)
00:19:13 × mounty quits (~mounty@2001:8000:2f59:0:55c2:3b2f:d5d6:95de) (Read error: Connection reset by peer)
00:19:23 <Squarism> g . f assumes g takes a result f produces, but however I move the parantheses I cannot make _2 deliver something _1 consumes?
00:20:00 <dminuoso> Squarism: As a rough intuition, think of traverse.
00:20:25 <dminuoso> traverse f -- will traverse over a given list, right?
00:20:47 <Squarism> yes
00:21:01 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Quit: Lost terminal)
00:21:35 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
00:21:52 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
00:21:54 <dminuoso> Squarism: And equivalently, how would you traverse over the Int in a `Tree [Int]`?
00:22:41 <dminuoso> Or rather, without going that far
00:22:43 <dminuoso> look at
00:22:45 <dminuoso> % :t traverse
00:22:45 <yahb> dminuoso: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
00:22:46 hexo joins (~hexo@gateway/tor-sasl/hexo)
00:22:47 srk joins (~sorki@gateway/tor-sasl/sorki)
00:22:48 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
00:22:56 xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar)
00:23:01 gxt__ joins (~gxt@gateway/tor-sasl/gxt)
00:23:06 <Squarism> ive not used traverse a ton (directly). Im just thinking in type terms here, looking at the signature
00:23:14 jpds joins (~jpds@gateway/tor-sasl/jpds)
00:23:15 tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64)
00:23:16 skiold joins (~skiold@gateway/tor-sasl/skiold)
00:23:24 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
00:23:59 jb55 joins (~jb55@gateway/tor-sasl/jb55)
00:24:13 <dminuoso> Squarism: Ah well, lets continue anyway. So?
00:24:20 <Squarism> Sure
00:24:42 mounty joins (~mounty@2001:8000:2f59:0:1862:62b5:e626:9d64)
00:24:43 cantstanya joins (~chatting@gateway/tor-sasl/cantstanya)
00:25:20 <dminuoso> Just to avoid confusion, Im awaiting your response here. :)
00:25:43 <dminuoso> Oh, maybe that was your response.
00:25:58 <dminuoso> So you'd just go `traverse (traverse f)`
00:26:05 <dminuoso> Similar to how you'd go `fmap (fmap f)` right?
00:26:05 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
00:26:07 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
00:26:14 <Squarism> yeah i mean, im glad for any help understanding. So im down with your approach
00:26:27 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 260 seconds)
00:26:40 <dminuoso> Or say, you have a Tree [Int], and you want to fmap over the Int with (+1), how would you do that?
00:26:55 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds)
00:27:07 <dminuoso> (for extra points, use map for the list mapping, and fmap for the tree)
00:27:10 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
00:27:35 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
00:27:52 × MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection)
00:28:15 teardown joins (~user@gateway/tor-sasl/mrush)
00:28:17 MOSCOS joins (~MOSCOS@122.54.107.175)
00:29:19 jamm_ joins (~jamm@unaffiliated/jamm)
00:29:25 <Squarism> fmap (fmap (+1)) tree ?
00:29:34 <dminuoso> looks good
00:29:43 <dminuoso> Now replace the correct fmap with `map` for the one that acts on the list
00:30:35 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
00:30:37 <Squarism> fmap (map (+1)) tree ?
00:30:49 Tesseraction joins (~Tesseract@unaffiliated/tesseraction)
00:30:52 <dminuoso> Good. Can you refactor that into using function composition?
00:30:56 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
00:31:05 × drincruz_ quits (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 240 seconds)
00:31:32 Kronic joins (~Kronic___@84.203.98.133)
00:33:01 <Squarism> not sure how
00:33:27 <dminuoso> Oh well, Im just looking for:
00:33:35 <dminuoso> (fmap . map) (+1) tree
00:33:39 <dminuoso> Make sense so far?
00:34:19 <Squarism> oh ok. Sure
00:34:23 <dminuoso> If I renamed those mapping functions further, we might get
00:34:25 <dminuoso> (treeMap . listMap) (+1) tree
00:34:36 <dminuoso> Let's toss everything to the right away, and focus on just this part:
00:34:39 <dminuoso> (treeMap . listMap)
00:35:11 <dminuoso> Alright, so far so good?
00:35:21 <Squarism> yep
00:35:31 <dminuoso> Great.
00:35:39 <dminuoso> So, traverse works exactly the same
00:35:41 <dminuoso> We could have
00:35:53 <dminuoso> (treeTraverse . listTraverse) f tree
00:36:22 <dminuoso> And then for some choice of `f`, we would map each element to an action, and sequence the actions and write the results back in
00:36:29 <dminuoso> For instance:
00:36:48 × nhs quits (~nhs@c-67-180-177-103.hsd1.ca.comcast.net) (Quit: leaving)
00:37:02 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
00:37:11 <dminuoso> % (traverse . traverse) Just [[1,2], [2,3]]
00:37:11 <yahb> dminuoso: Just [[1,2],[2,3]]
00:37:17 <dminuoso> Squarism: So far so good?
00:37:48 <dminuoso> Do you see the theme here? You first specify the thing acting on the "outer layer" first, and on the "inner layer" second in the composition.
00:37:53 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
00:38:13 <Squarism> yeah
00:39:02 <dminuoso> Here comes the cool trick. `traverse . traverse` is the relevant part here. Lens picks what goes in afterwards, and then comes your data structure
00:39:17 <dminuoso> So `traverse . traverse` is not just a similar example, it's actually a valid lensy thing, namely a Traversal
00:39:28 nhs joins (~nhs@c-67-180-177-103.hsd1.ca.comcast.net)
00:39:29 <dminuoso> % [[1,2,3], [2,3,4]] ^.. (traverse.traverse)
00:39:29 <yahb> dminuoso: [1,2,3,2,3,4]
00:39:37 <Squarism> i know about those view/over
00:40:06 <dminuoso> Squarism: What view/over etc does, is it takes this `traverse.traverse`-like construction and then runs it with some functor
00:40:23 × teardown quits (~user@gateway/tor-sasl/mrush) (Remote host closed the connection)
00:40:24 <dminuoso> except, you have:
00:40:49 <dminuoso> type Lens s t a b = forall f . Functor f => (a -> f b) -> s -> f t
00:40:52 <dminuoso> % :t traverse
00:40:52 <yahb> dminuoso: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
00:41:19 <dminuoso> Squarism: Ignore the Traversable constraint here. The important difference is that the constraints.
00:41:29 <Squarism> ah ok. Im just surprise (.) did something more than I expected to. Like it could see a pattern or simplified the expression?!
00:41:46 <dminuoso> What do you think did it simplify?
00:42:02 <dminuoso> (Field1 s t a b, Functor f) => (a -> f b) -> s -> f t
00:42:14 <dminuoso> Is a function from `(a -> f b)` to `s -> f t`
00:43:04 <dminuoso> If we set s ~ t and a ~ b for simplicity, we have:
00:43:15 <Squarism> ah ok
00:43:18 <dminuoso> (Field1 s s a a, Functor f) => (a -> f a) -> s -> f s
00:43:28 <dminuoso> Do you see how you can compose with, say, itself?
00:44:17 <dminuoso> It's for the same reason
00:44:18 <dminuoso> % :t map
00:44:18 <yahb> dminuoso: (a -> b) -> [a] -> [b]
00:44:23 <dminuoso> composes with itself
00:44:24 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
00:44:26 <dminuoso> % :t map . map
00:44:26 <yahb> dminuoso: (a -> b) -> [[a]] -> [[b]]
00:44:31 teardown joins (~user@gateway/tor-sasl/mrush)
00:44:45 <Squarism> it become M a -> M b and M b -> M c
00:44:50 <Squarism> So to speak
00:45:05 × da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.29.209) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:45:45 <Squarism> i mean how you structured the functions
00:46:06 <dminuoso> I dont understand
00:46:18 <Squarism> type M x = k -> j x
00:47:16 <Squarism> or no.. =/
00:48:27 × falafel_ quits (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) (Remote host closed the connection)
00:48:53 falafel_ joins (~falafel@pool-108-31-243-192.washdc.fios.verizon.net)
00:49:12 <Squarism> ill save this conversation and look through it when im less tired. Im sure it will come to me then
00:49:19 <Squarism> dminuoso, thanks for helping
00:49:23 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
00:49:40 teardown_ joins (~user@gateway/tor-sasl/mrush)
00:49:57 <Squarism> but yes, i see how it composes with itself
00:50:44 × Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving)
00:55:00 Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net)
00:55:44 <Squarism> atleast if you think of it in terms of (a -> f a) -> (s -> f s)
00:58:03 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 260 seconds)
00:59:51 × dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 258 seconds)
01:01:27 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
01:03:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:04:04 × iqubic quits (~user@2601:602:9500:4870:4825:944d:5fe3:72b9) (Remote host closed the connection)
01:05:21 heatsink_ joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
01:05:41 iqubic joins (~user@2601:602:9500:4870:32f4:54f1:a1b5:83b8)
01:07:01 × Amras quits (~Amras@unaffiliated/amras) (Ping timeout: 272 seconds)
01:08:17 × heatsink quits (~heatsink@2600:1700:bef1:5e10:e85f:7c7d:b6c9:7820) (Ping timeout: 258 seconds)
01:09:02 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
01:10:58 × plutoniix quits (~q@node-uk9.pool-125-24.dynamic.totinternet.net) (Quit: Leaving)
01:13:45 × alx741 quits (~alx741@181.196.69.91) (Ping timeout: 240 seconds)
01:14:05 CMCDragonkai2 joins (~Thunderbi@120.17.47.66)
01:17:25 machinedgod joins (~machinedg@24.105.81.50)
01:17:57 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Read error: Connection reset by peer)
01:18:42 urodna joins (~urodna@unaffiliated/urodna)
01:18:58 da39a3ee5e6b4b0d joins (~da39a3ee5@mx-ll-171.5.29-209.dynamic.3bb.co.th)
01:20:16 <Axman6> :t \x -> (uncurry x `asAppliedTo` (traverse, traverse)) (.)
01:20:19 <lambdabot> error:
01:20:19 <lambdabot> • Couldn't match expected type ‘((a -> f b) -> t a -> f (t b),
01:20:19 <lambdabot> (a1 -> f1 b1) -> t1 a1 -> f1 (t1 b1))’
01:20:31 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
01:21:13 <Axman6> :t (\x -> (uncurry x `asAppliedTo` (traverse, traverse))) `asAppliedTo` (.)
01:21:15 <lambdabot> (Applicative f, Traversable t1, Traversable t2) => (((t2 a -> f (t2 b)) -> t1 (t2 a) -> f (t1 (t2 b))) -> ((a -> f b) -> t2 a -> f (t2 b)) -> (a -> f b) -> t1 (t2 a) -> f (t1 (t2 b))) -> ((t2 a -> f
01:21:15 <lambdabot> (t2 b)) -> t1 (t2 a) -> f (t1 (t2 b)), (a -> f b) -> t2 a -> f (t2 b)) -> (a -> f b) -> t1 (t2 a) -> f (t1 (t2 b))
01:21:44 <Axman6> hmm, yep, that'd definitely what I wanted...
01:22:04 <Axman6> :t (\x -> (x traverse traverse)) `asAppliedTo` (.)
01:22:06 <lambdabot> (Applicative f, Traversable t1, Traversable t2) => (((t2 a -> f (t2 b)) -> t1 (t2 a) -> f (t1 (t2 b))) -> ((a -> f b) -> t2 a -> f (t2 b)) -> (a -> f b) -> t1 (t2 a) -> f (t1 (t2 b))) -> (a -> f b) -
01:22:06 <lambdabot> > t1 (t2 a) -> f (t1 (t2 b))
01:24:01 × xsarnik0 quits (xsarnik@gateway/shell/fi.muni.cz/x-siyupapsmlttvhqm) (Quit: Ping timeout (120 seconds))
01:24:01 × Jajik quits (xchlup2@gateway/shell/fi.muni.cz/x-qznwsywzudvjynms) (Quit: Ping timeout (120 seconds))
01:24:52 Jajik joins (xchlup2@gateway/shell/fi.muni.cz/x-iogrzypdphdyrmwo)
01:25:49 × iqubic quits (~user@2601:602:9500:4870:32f4:54f1:a1b5:83b8) (Remote host closed the connection)
01:28:09 × Feuermagier quits (~Feuermagi@213.178.26.41) (Remote host closed the connection)
01:28:11 alx741 joins (~alx741@181.196.69.196)
01:28:12 Feuermagier_ joins (~Feuermagi@213.178.26.41)
01:29:18 <ep1ctetus> Is there a way to do something like `map` on a list, but remember and use some state in between each value it runs on?
01:29:41 <Clint> yes
01:29:49 <ep1ctetus> please enlighten me!
01:30:04 <Axman6> :t scanr
01:30:06 <Axman6> :t scanl
01:30:06 <lambdabot> (a -> b -> b) -> b -> [a] -> [b]
01:30:09 <lambdabot> (b -> a -> b) -> b -> [a] -> [b]
01:30:13 lyxia joins (~lyxia@poisson.chat)
01:30:18 <Axman6> hmm, not the one I was after
01:30:23 iqubic joins (~user@2601:602:9500:4870:bec7:122b:1c06:a2d0)
01:30:54 × columbarius quits (~columbari@mue-88-130-54-091.dsl.tropolys.de) (Ping timeout: 258 seconds)
01:31:19 <Clint> :t mapAccumL
01:31:22 <lambdabot> Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
01:31:22 <Clint> :t mapAccumR
01:31:24 <lambdabot> Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
01:31:40 × whatisRT quits (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de) (Ping timeout: 258 seconds)
01:31:43 <Axman6> % :t mapAccumL @[]
01:31:43 <yahb> Axman6: (a -> b -> (a, c)) -> a -> [b] -> (a, [c])
01:32:16 ransom joins (c4264035@gateway/vpn/protonvpn/c4264035)
01:33:07 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:33:13 columbarius joins (~columbari@mue-88-130-54-162.dsl.tropolys.de)
01:33:21 whatisRT joins (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de)
01:34:15 <ep1ctetus> ah very cool! thanks so much
01:34:16 <Squarism> Axman6, thanks. I guess the above was for me. Ill decipher it later
01:35:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:35:12 × st8less quits (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9)
01:35:50 <Axman6> I'm not sure it made things any clearer - I was hoping for: ((a -> f b) -> s -> f t) -> ((s -> f t) -> p -> f q) -> (a -> f b) -> (p -> f q)
01:36:01 × Kem36 quits (cfac55db@207.172.85.219) (Remote host closed the connection)
01:37:29 <dminuoso> mmm, mapAccumR is just traverse with State, isnt it?
01:37:40 × ransom quits (c4264035@gateway/vpn/protonvpn/c4264035) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:38:50 × CMCDragonkai2 quits (~Thunderbi@120.17.47.66) (Remote host closed the connection)
01:42:56 × Kronic quits (~Kronic___@84.203.98.133) (Read error: Connection reset by peer)
01:42:58 × m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 260 seconds)
01:43:29 ransom joins (c4264035@gateway/vpn/protonvpn/c4264035)
01:43:30 xsarnik0 joins (xsarnik@gateway/shell/fi.muni.cz/x-ctybhcsimuoygovq)
01:47:16 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 240 seconds)
01:47:30 Lord_of_Life joins (~Lord@46.217.219.165)
01:47:54 × shailangsa quits (~shailangs@host86-186-177-155.range86-186.btcentralplus.com) ()
01:50:05 <ep1ctetus> Clint dminuoso haha! It works perfectly! Thanks very again
01:50:23 <ep1ctetus> Haskell is so satisfying to me once it works
01:50:31 × da39a3ee5e6b4b0d quits (~da39a3ee5@mx-ll-171.5.29-209.dynamic.3bb.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:50:49 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 246 seconds)
01:50:51 vonfry joins (~user@2001:da8:801b:1010:c0c3:e71d:a844:2faf)
01:51:16 × jmchael quits (~jmchael@87.112.60.168) (Ping timeout: 240 seconds)
01:53:16 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
01:53:37 × ransom quits (c4264035@gateway/vpn/protonvpn/c4264035) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:54:43 ransom joins (c4264035@gateway/vpn/protonvpn/c4264035)
01:55:44 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
01:57:08 × ransom quits (c4264035@gateway/vpn/protonvpn/c4264035) (Client Quit)
01:58:25 puffnfresh joins (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net)
02:00:13 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 265 seconds)
02:02:37 jespada joins (~jespada@90.254.245.49)
02:03:55 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
02:04:56 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.29.209)
02:05:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds)
02:06:13 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
02:07:04 conal joins (~conal@64.71.133.70)
02:07:23 × conal quits (~conal@64.71.133.70) (Client Quit)
02:07:49 × ep1ctetus quits (b8bba2a3@gateway/web/cgi-irc/kiwiirc.com/ip.184.187.162.163) (Quit: Connection closed)
02:08:37 conal joins (~conal@64.71.133.70)
02:08:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
02:08:57 × conal quits (~conal@64.71.133.70) (Client Quit)
02:09:49 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
02:12:10 <koz_> > mapAccumL (\acc x -> (acc + 1, acc + x)) 0 [1, 2, 3, 4, 5]
02:12:12 <lambdabot> (5,[1,3,5,7,9])
02:12:24 <koz_> > mapAccumR (\acc x -> (acc + 1, acc + x)) 0 [1, 2, 3, 4, 5]
02:12:26 <lambdabot> (5,[5,5,5,5,5])
02:12:46 <koz_> Wait wat.
02:14:50 guest1211 joins (~user@49.5.6.87)
02:14:54 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 272 seconds)
02:15:22 <Squarism> Axman that in itself is pretty clear. Im thinking its made possible because of functional dependencies FieldN?
02:16:48 <Squarism> ..or if thats irrelevant?
02:17:19 × xff0x quits (~fox@2001:1a81:530c:8200:b602:4be0:ca24:7260) (Ping timeout: 272 seconds)
02:18:27 × maop quits (~maop@185.204.1.185) (Remote host closed the connection)
02:18:42 xff0x joins (~fox@2001:1a81:5221:8f00:f974:7952:c764:dde1)
02:24:24 × jlamothe quits (~jlamothe@198.251.55.207) (Ping timeout: 272 seconds)
02:25:07 jlamothe joins (~jlamothe@198.251.55.207)
02:25:27 × sagax quits (~sagax_nb@213.138.71.146) (Ping timeout: 260 seconds)
02:26:23 × elliott__ quits (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
02:27:28 elliott__ joins (~elliott@pool-108-45-178-3.washdc.fios.verizon.net)
02:28:25 × Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 264 seconds)
02:28:43 × Wuzzy quits (~Wuzzy@p549c9bc8.dip0.t-ipconnect.de) (Remote host closed the connection)
02:29:10 conal joins (~conal@64.71.133.70)
02:32:17 klawx3 joins (~klawx3@190.5.32.196)
02:33:14 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:34:58 × yahb quits (xsbot@haskell/bot/yahb) (Ping timeout: 256 seconds)
02:37:10 × hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.)
02:37:58 bstarr joins (~bstarr@139.28.218.148)
02:38:22 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
02:39:05 yahb joins (xsbot@haskell/bot/yahb)
02:44:33 <jle`> :t mapAccumR
02:44:35 <lambdabot> Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c)
02:44:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:45:11 <jle`> :t \f x xs -> runState (traverse (state . flip f) xs) x
02:45:13 <lambdabot> Traversable t => (s -> b1 -> (b2, s)) -> s -> t b1 -> (t b2, s)
02:45:35 <jle`> little but shuffled around, but yeah
02:46:23 <jle`> :t [mapAccumR, \f x xs -> runState (traverse (state . flip f) xs) x]
02:46:25 <lambdabot> error:
02:46:25 <lambdabot> • Occurs check: cannot construct the infinite type: s ~ t s
02:46:25 <lambdabot> Expected type: (s, t s)
02:46:30 <jle`> oh yeah, darn
02:50:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
02:52:41 × olligobber quits (~olligobbe@unaffiliated/olligobber) (Remote host closed the connection)
02:53:17 <MarcelineVQ> koz_: come back, so jle` can explain how StateL and StateR differen in which side of <*> you pass your initial (and thus subsequent) state to
02:55:50 shailangsa joins (~shailangs@host86-186-177-155.range86-186.btcentralplus.com)
02:55:51 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
02:58:59 × leothrix quits (~leothrix@elastic/staff/leothrix) (Quit: ZNC 1.7.5 - https://znc.in)
03:00:22 leothrix joins (~leothrix@elastic/staff/leothrix)
03:04:18 × jlamothe quits (~jlamothe@198.251.55.207) (Quit: leaving)
03:06:12 × shailangsa quits (~shailangs@host86-186-177-155.range86-186.btcentralplus.com) ()
03:07:09 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
03:08:16 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 258 seconds)
03:09:25 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 258 seconds)
03:16:52 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:68eb:cd6f:e65f:336b) (Ping timeout: 260 seconds)
03:17:08 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
03:17:51 × darjeeling_ quits (~darjeelin@122.245.123.202) (Ping timeout: 258 seconds)
03:20:12 drincruz_ joins (~adriancru@ool-44c748be.dyn.optonline.net)
03:20:40 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
03:22:40 jlamothe joins (~jlamothe@198.251.55.207)
03:23:52 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:24:44 ransom joins (c4264035@gateway/vpn/protonvpn/c4264035)
03:25:51 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003) (Remote host closed the connection)
03:25:58 × alexelcu quits (~alexelcu@142.93.180.198) (Quit: ZNC 1.8.2 - https://znc.in)
03:26:20 alexelcu joins (~alexelcu@142.93.180.198)
03:26:32 Vulfe joins (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003)
03:26:36 × theDon quits (~td@muedsl-82-207-238-079.citykom.de) (Ping timeout: 240 seconds)
03:26:46 drbean joins (~drbean@TC210-63-209-30.static.apol.com.tw)
03:28:04 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003) (Remote host closed the connection)
03:28:11 Vulfe joins (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003)
03:28:44 theDon joins (~td@muedsl-82-207-238-169.citykom.de)
03:28:45 lagothrix is now known as Guest16180
03:28:45 xirhtogal joins (~lagothrix@unaffiliated/lagothrix)
03:28:45 × Guest16180 quits (~lagothrix@unaffiliated/lagothrix) (Killed (orwell.freenode.net (Nickname regained by services)))
03:28:45 xirhtogal is now known as lagothrix
03:29:05 ericsagn1 joins (~ericsagne@2405:6580:0:5100:1672:eb44:5f35:5514)
03:33:54 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
03:34:40 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
03:35:58 jedws joins (~jedws@121.209.189.201)
03:38:27 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003) (Remote host closed the connection)
03:40:54 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
03:44:02 × hvr quits (~hvr@haskell/developer/hvr) (Ping timeout: 256 seconds)
03:44:05 shailangsa joins (~shailangs@host86-186-177-155.range86-186.btcentralplus.com)
03:44:50 × carlomagno quits (~cararell@148.87.23.8) (Ping timeout: 272 seconds)
03:45:44 hvr joins (~hvr@haskell/developer/hvr)
03:45:44 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 256 seconds)
03:47:52 Stanley00 joins (~stanley00@unaffiliated/stanley00)
03:50:24 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection)
03:50:39 plutoniix joins (~q@ppp-223-24-94-125.revip6.asianet.co.th)
03:50:47 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
03:54:56 Vulfe joins (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003)
03:55:22 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
03:55:38 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
03:58:19 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
03:59:26 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:d070:4174:c9a4:1003) (Ping timeout: 264 seconds)
03:59:53 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
04:00:08 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
04:01:11 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
04:08:31 × johnw quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in)
04:08:54 × ransom quits (c4264035@gateway/vpn/protonvpn/c4264035) (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:09:49 × hvr quits (~hvr@haskell/developer/hvr) (Ping timeout: 264 seconds)
04:10:35 hvr joins (~hvr@haskell/developer/hvr)
04:13:39 × cgfuh quits (~cgfuh@181.167.191.58) (Quit: WeeChat 2.9)
04:15:22 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
04:15:36 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
04:19:53 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
04:20:04 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
04:20:07 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
04:21:10 rcdilorenzo parts (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) ()
04:21:39 × notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection)
04:23:04 teardown joins (~user@gateway/tor-sasl/mrush)
04:24:15 aev joins (~Admin@pool-108-5-152-94.nwrknj.fios.verizon.net)
04:25:19 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
04:26:03 × teardown_ quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
04:26:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:27:12 × shatriff_ quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
04:27:46 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
04:31:28 Vulfe joins (~vulfe@2600:1702:31b0:34e0:6435:e070:2755:fa1e)
04:31:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
04:32:59 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
04:33:13 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds)
04:35:03 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
04:35:09 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
04:36:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:6435:e070:2755:fa1e) (Ping timeout: 264 seconds)
04:37:20 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
04:39:31 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 246 seconds)
04:42:26 argento joins (~argent0@168.227.97.29)
04:43:49 essem joins (essem@gateway/vpn/privateinternetaccess/essem)
04:44:35 <essem> DDDDD=
04:44:48 essem parts (essem@gateway/vpn/privateinternetaccess/essem) ()
04:47:55 essem joins (essem@gateway/vpn/privateinternetaccess/essem)
04:49:26 × plutoniix quits (~q@ppp-223-24-94-125.revip6.asianet.co.th) (Quit: Leaving)
04:52:51 Vulfe joins (~vulfe@2600:1702:31b0:34e0:6435:e070:2755:fa1e)
04:52:55 × essem quits (essem@gateway/vpn/privateinternetaccess/essem) (Quit: leaving)
04:53:05 essem joins (essem@gateway/vpn/privateinternetaccess/essem)
04:54:35 vonfry` joins (~user@23.234.199.184)
04:55:58 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:56:19 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 246 seconds)
04:56:22 × vonfry quits (~user@2001:da8:801b:1010:c0c3:e71d:a844:2faf) (Ping timeout: 258 seconds)
04:56:46 × essem quits (essem@gateway/vpn/privateinternetaccess/essem) (Client Quit)
04:56:57 essem joins (essem@gateway/vpn/privateinternetaccess/essem)
04:57:10 × essem quits (essem@gateway/vpn/privateinternetaccess/essem) (Client Quit)
04:57:21 essem joins (essem@gateway/vpn/privateinternetaccess/essem)
04:57:31 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:6435:e070:2755:fa1e) (Ping timeout: 258 seconds)
04:57:43 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 240 seconds)
04:57:54 bitmagie joins (~Thunderbi@200116b80638310001d2823cf2ef2077.dip.versatel-1u1.de)
04:59:14 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
04:59:44 vonfry` parts (~user@23.234.199.184) ("ERC (IRC client for Emacs 27.1)")
05:01:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:04:36 × StoneToad quits (~StoneToad@199-167-119-150.ppp.storm.ca) (Ping timeout: 240 seconds)
05:04:44 × Cthalupa quits (~cthulhu@47.186.47.75) (Ping timeout: 256 seconds)
05:05:09 Cthalupa joins (~cthulhu@47.186.47.75)
05:05:32 p8m_ joins (p8m@gateway/vpn/protonvpn/p8m)
05:05:33 StoneToad joins (~StoneToad@199-167-119-150.ppp.storm.ca)
05:05:34 × p8m quits (p8m@gateway/vpn/protonvpn/p8m) (Ping timeout: 258 seconds)
05:06:04 × falafel_ quits (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) (Remote host closed the connection)
05:06:26 nfd joins (~nfd9001@c-67-183-38-33.hsd1.wa.comcast.net)
05:07:45 × aev quits (~Admin@pool-108-5-152-94.nwrknj.fios.verizon.net) (Ping timeout: 265 seconds)
05:13:38 × drincruz_ quits (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 256 seconds)
05:14:52 conal joins (~conal@64.71.133.70)
05:15:41 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Quit: ERC (IRC client for Emacs 27.1))
05:16:07 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
05:19:02 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Client Quit)
05:19:28 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
05:19:46 SanchayanMaity joins (~Sanchayan@122.178.233.231)
05:21:23 × conal quits (~conal@64.71.133.70) (Ping timeout: 260 seconds)
05:22:28 × unlink2 quits (~unlink2@p200300ebcf259600971664e9499d7db7.dip0.t-ipconnect.de) (Remote host closed the connection)
05:23:55 unlink2 joins (~unlink2@p5dc0acf8.dip0.t-ipconnect.de)
05:28:03 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
05:28:11 × elliott__ quits (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Ping timeout: 258 seconds)
05:28:20 <ezzieyguywuf> is it safe to skip ~/.cabal/store in my backup snapshots?
05:28:40 <ezzieyguywuf> i.e. will I still be able to use cabal, or am I better off just skipping ~/.cabal entirely?
05:29:16 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
05:32:03 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
05:33:02 sagax joins (~sagax_nb@213.138.71.146)
05:33:59 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 260 seconds)
05:34:05 × joeyh_ quits (joeyh@kitenet.net) (Quit: ZNC 1.8.1+deb1 - https://znc.in)
05:34:44 × bandali quits (znc@fsf/interns/bandali) (Quit: ZNC - https://znc.in)
05:34:45 × PlasmaStar quits (plasma@unaffiliated/plasmastar) (Quit: ZNC 1.7.3 - https://znc.in)
05:35:18 bandali joins (znc@fsf/interns/bandali)
05:35:21 × da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.29.209) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:35:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
05:36:53 × drbean quits (~drbean@TC210-63-209-30.static.apol.com.tw) (Ping timeout: 260 seconds)
05:37:28 × nshepperd quits (nshepperd@2600:3c03::f03c:92ff:fe28:92c9) (Ping timeout: 260 seconds)
05:38:11 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
05:39:11 nshepperd joins (~nshepperd@li364-218.members.linode.com)
05:39:39 × agrif quits (agrif@overviewer/dev/agrif) (Remote host closed the connection)
05:39:59 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
05:40:02 agrif joins (agrif@rakeri.net)
05:40:02 × agrif quits (agrif@rakeri.net) (Changing host)
05:40:02 agrif joins (agrif@overviewer/dev/agrif)
05:40:20 <monochrom> .cabal/store can be skipped. This just means rebuilding libraries later.
05:40:23 joeyh joins (~joeyh@kitenet.net)
05:40:54 <monochrom> .cabal/packages can also be skipped. This just means re-downloading Hackage packages later.
05:41:15 <monochrom> If you have customized .cabal/config, you will want to save it.
05:41:23 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
05:41:43 <ezzieyguywuf> monochrom: thanks for the input!
05:42:12 <monochrom> Also, .cabal/packages has the stuff you got from "cabal update". So just run it again.
05:42:25 PlasmaStar joins (plasma@unaffiliated/plasmastar)
05:42:28 <ezzieyguywuf> gotcha
05:43:17 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
05:43:42 <ddellacosta> "randomly glanced at latest comments in #haskell immediately after signing in and learned something" count now at 53
05:45:24 Vulfe joins (~vulfe@2600:1702:31b0:34e0:2c68:32a0:f62b:f449)
05:45:57 acidjnk_new joins (~acidjnk@p200300d0c719ff053d8846c1390abdcb.dip0.t-ipconnect.de)
05:50:17 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:2c68:32a0:f62b:f449) (Ping timeout: 260 seconds)
05:51:22 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
05:51:30 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 272 seconds)
05:52:43 × klawx3 quits (~klawx3@190.5.32.196) (Remote host closed the connection)
05:53:28 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds)
05:55:07 boxscape joins (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8)
05:57:01 cfricke joins (~cfricke@unaffiliated/cfricke)
05:57:59 monochrom joins (trebla@216.138.220.146)
06:00:31 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
06:00:54 jb55 joins (~jb55@gateway/tor-sasl/jb55)
06:02:21 × russruss84 quits (~russruss@my.russellmcc.com) (Quit: The Lounge - https://thelounge.chat)
06:04:39 perry69420 joins (7aa1d004@122.161.208.4)
06:05:04 russruss84 joins (~russruss@my.russellmcc.com)
06:05:26 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d)
06:06:13 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:06:18 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit)
06:08:18 jpcooper joins (~user@unaffiliated/jpcooper)
06:08:32 <jpcooper> Hello. Have there been any attempts at making an equivalent of the C++ STL for the ST monad?
06:09:31 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:09:32 sord937 joins (~sord937@gateway/tor-sasl/sord937)
06:09:44 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit)
06:10:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:11:08 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:11:09 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit)
06:11:26 hololeap joins (~hololeap@unaffiliated/hololeap)
06:11:37 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:11:56 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit)
06:12:17 nineonine joins (~nineonine@50.216.62.2)
06:12:21 <hyiltiz> jpcooper: not quite sure what u mean by "an equivalent of C++ STL"
06:12:56 <hyiltiz> seems to be Prelude and elsewhere provides lots of those, and you can lift those into ST or any monad of your choice
06:13:03 <jpcooper> I'm thinking mostly of implementations of the containers like unordered_map, unorderdd_set, map, the <algorithm> library
06:14:14 <hyiltiz> haskell has a lot of containers, and you can lift them into any monad, hence the benefit of abstracting away the monad interface so containers don't have to deal with IO or ST or whatnot
06:14:24 <jpcooper> Although for a lot of functionality, you would probably need pointers, which might be unsafe
06:15:17 <jpcooper> hyiltiz: My point is to have efficient implementations. For instance, replace a node in a linked list is O(N), as far as I understand with a normal non-mutable implementation
06:15:54 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
06:16:06 <hyiltiz> well now we are talking about efficient implementation of (functional) data structures, some of which is theoretically impossible without mutability
06:16:19 <jpcooper> Yes. This is why I'm interested in the ST monad
06:16:22 <hyiltiz> maybe you'd be interested to learn about fingertrees
06:16:32 × mounty quits (~mounty@2001:8000:2f59:0:1862:62b5:e626:9d64) (Ping timeout: 260 seconds)
06:17:08 <hyiltiz> functional data structures have quite different "mindset"; without giving away mutability, you simply cannot do a few things
06:17:18 <perry69420> jpcooper This might be helpful https://hackage.haskell.org/package/hashtables
06:18:21 <hyiltiz> Ahah now I understand why specify the ST constrain
06:18:48 <hyiltiz> You'd rather be stateful to be efficient
06:18:49 <jpcooper> Finger trees would be interesting. I'm quite well acquainted with Haskell, by the way. I'm simply interested in getting various things done in Haskell without worrying too much about trying to bend the functional paradigm, and I'm also interested in performance. With the ST monad, who cares if it is mutating state under the bonnet. The interface itself is referentially transparent
06:18:53 <jpcooper> Yes
06:19:16 <jpcooper> Thanks, perry69420
06:21:45 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:23:27 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
06:25:28 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:25:31 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit)
06:27:00 Vulfe joins (~vulfe@2600:1702:31b0:34e0:2c68:32a0:f62b:f449)
06:27:39 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:27:41 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit)
06:27:56 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 240 seconds)
06:29:51 AwesomeRigg parts (awesomerig@45.15.143.179) ()
06:29:59 × perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 260 seconds)
06:30:21 <hololeap> i've been looking at edwardk's work on propagators and i don't really understand what a join-semilattice would look like in haskell
06:30:30 <hololeap> can anyone give me a simple example?
06:31:42 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:2c68:32a0:f62b:f449) (Ping timeout: 260 seconds)
06:33:01 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
06:34:48 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
06:36:02 <perry69420> hololeap Would you like a mathematical example?
06:36:16 <hololeap> i know of the one involving natural numbers off wikipedia
06:36:31 <hololeap> perry69420: but sure
06:39:01 <perry69420> Consider any set of objects, call it S. Consider the power set of S without the empty subset. Then this power set is a join semilattice wrt inclusion
06:39:18 <perry69420> Notice that it is NOT a meet semilattice
06:39:45 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Ping timeout: 240 seconds)
06:40:12 jpcooper parts (~user@unaffiliated/jpcooper) ("ERC (IRC client for Emacs 26.1)")
06:40:29 <perry69420> So for example, if S = {1,2,3}, then the power set I'm considering is {{1},{2},{3},{1,2},{2,3},{1,3},{1,2,3}}. Notice that the empty set {} is not in this set
06:41:02 × mrchampion quits (~mrchampio@38.18.109.23) (Read error: Connection reset by peer)
06:41:22 <hololeap> so then {1,2,3} would be the maximum meet
06:41:24 <perry69420> The "join" operation is given by union of sets
06:41:27 <perry69420> yes exactly
06:41:47 <hololeap> ok, sorry i'm getting a lot of this off wikipedia
06:41:48 <perry69420> hololeap maximum join, not meet
06:42:10 × orzo quits (joe@lasker.childrenofmay.org) (Ping timeout: 272 seconds)
06:42:20 perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
06:42:26 <hololeap> right...
06:43:04 <hololeap> i was reading the part about meet-semilattice accidentally
06:43:16 × Kaivo quits (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) (Ping timeout: 240 seconds)
06:43:18 <perry69420> so meet is defined as greatest lower bound, and join is the lowest upper bound.
06:43:39 <perry69420> Note that we already have a partial order on the "power" set i defined via inclusion.
06:45:17 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
06:45:27 <hololeap> so, what would be an example of a join-semilattice that isn't also a power set?
06:46:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:47:21 <perry69420> hololeap That example I gave isn't a power set
06:47:29 <perry69420> It is a subset of a powerset
06:47:33 <hololeap> right, sans the empty set
06:48:24 <iqubic> Data.Array array? I.E. return Maybe e to indicate an out of bounds error?
06:49:45 × boxscape quits (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed)
06:49:55 <hololeap> i assume that any power set sans its "maximum" set is a meet-semilattice?
06:49:57 boxscape joins (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8)
06:50:19 <perry69420> yes. Obviously, the empty set is the GLB here
06:50:38 <perry69420> but again, the partial order on the set has to be defined via inclusion
06:52:24 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 260 seconds)
06:53:32 <jchia> My program has 1~2GB of resident memory even when it's doing no work. Can a heap profile help me identify where all that memory is going? E.g. maybe it can tell me allocation amount minus deallocation amount so the outstanding amount is from memory leaks?
06:54:43 × cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 272 seconds)
06:55:55 <hololeap> perry69420: i think i thought of a trivial example, a power set, sans empty, where there are two diffenet "maxima", and a ^ b yields a different result than a ^ c and b ^ c
06:56:58 <perry69420> How can there be two different maximas in a power set? Can you expand the example a bit?
06:57:08 <perry69420> is your partial order still inclusion?
06:57:34 <hololeap> oh, you're right because the two different "maximal" results wouldn't have a join
06:58:44 <hololeap> but, if they _did_ have a join, that would be a different shape than the power set for three elements
06:58:52 Vulfe joins (~vulfe@2600:1702:31b0:34e0:d14e:1637:1ed1:f68e)
06:59:15 <hololeap> so there's the answer to my question
06:59:16 × phasespace quits (~sar@89-162-33-21.fiber.signal.no) (Ping timeout: 240 seconds)
06:59:41 <perry69420> I'm not quite sure what you mean by shape here. But if they did have a join, both of them cannot be maximal
07:00:06 <hololeap> i'm thinking of it as a directed graph
07:00:33 <hololeap> so i can pull away from the example we had earlier and get more abstract
07:00:47 <perry69420> x \le y iff directed edge x to y?
07:01:50 <perry69420> iff x meet y = x
07:02:28 <hololeap> that would require inclusion of identity arrows?
07:03:05 <perry69420> right.. every node will have a edge to itself
07:03:12 scasc joins (~szabi@213142096072.public.telering.at)
07:03:47 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:d14e:1637:1ed1:f68e) (Ping timeout: 260 seconds)
07:04:04 <hololeap> i understand what a dag looks like. is a join-semilattice any different?
07:04:18 cfricke joins (~cfricke@unaffiliated/cfricke)
07:04:57 <hololeap> oh, yes it is
07:05:01 <perry69420> yes! A DAG is always a meet-semilattice
07:05:09 <perry69420> it needn't be join-semilattice
07:05:18 × Lord_of_Life quits (~Lord@46.217.219.165) (Changing host)
07:05:18 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
07:05:19 <perry69420> Consider any tree as an example
07:05:26 <hololeap> i see
07:06:09 <perry69420> You can take the dual of the graph to make a join semilattice
07:06:28 <perry69420> dual of a DAG is DAG with all edges reversed
07:06:46 <hololeap> that's very interesting
07:06:57 Fractalis joins (~Fractalis@2601:987:280:8d40:406e:6ad8:9d0d:835)
07:07:29 × cfricke quits (~cfricke@unaffiliated/cfricke) (Client Quit)
07:07:32 <hololeap> i'm looking at the image here: https://en.wikipedia.org/wiki/Directed_acyclic_graph
07:07:55 <hololeap> and i can see how that if you reverse the arrows you get a join-semilattice
07:08:30 <hololeap> and it's a good example of what i was asking for earlier
07:09:28 <perry69420> I have absolutely no idea about uses/implementations of Join/Meet Semilattice in Haskell yet :P
07:09:35 plutoniix joins (~q@ppp-223-24-62-231.revip6.asianet.co.th)
07:10:16 <hololeap> but wait... the semilattice has a structure that's based off a binary function...
07:10:42 <perry69420> that is correct
07:11:00 <hololeap> so how can a dag be a meet-semilattice?
07:11:43 <perry69420> I define x meet y as the "maximal" node from which you can reach both x and y
07:12:32 × Fractalis quits (~Fractalis@2601:987:280:8d40:406e:6ad8:9d0d:835) (Ping timeout: 260 seconds)
07:12:42 <hololeap> ok, yeah that makes sense
07:12:42 × leothrix quits (~leothrix@elastic/staff/leothrix) (Quit: ZNC 1.7.5 - https://znc.in)
07:12:47 <perry69420> Ahh I see a little problem. Every DAG isn't a meet semilattice
07:13:10 leothrix joins (~leothrix@elastic/staff/leothrix)
07:13:55 <perry69420> Consider 4 nodes. a,b,c,d. The available edges are (a,b),(a,c),(d,b),(d,c). Then there is no GLB here
07:14:36 <perry69420> We will need to restrict ourselves to tree rather than DAGs
07:16:13 <hololeap> what does tree mean here?
07:16:51 <perry69420> A directed tree*. So we have a root node and exactly one path from root node to every other node
07:17:26 <hololeap> ok
07:18:16 <hololeap> thanks. that definitely gives me some room for thought on the propogators idea
07:18:55 cfricke joins (~cfricke@unaffiliated/cfricke)
07:19:30 <hololeap> perry69420: can there be more than one root node?
07:19:55 phasespace joins (~sar@80-89-47-117.inet.signal.no)
07:19:55 <perry69420> hololeap I think it'll be better to think of a Partial Order with GLB. Note that while every tree is meet lattice, I'm not sure if every meet lattice is a tree
07:20:08 chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
07:20:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
07:20:21 <perry69420> hololeap We cannot have a GLB then, can we?
07:20:59 <hololeap> i was thinking of it in reverse, as a join-SL
07:21:22 <perry69420> You'll need to take the dual of the directed tree then
07:21:32 <hololeap> right, sorry :)
07:21:39 <perry69420> In which case, it is no more a tree, but it does represent a join SL
07:22:20 pavonia joins (~user@unaffiliated/siracusa)
07:23:45 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Quit: Leaving)
07:23:51 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:1672:eb44:5f35:5514) (Ping timeout: 272 seconds)
07:26:16 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
07:30:57 aqd joins (~aqd@87-92-163-238.rev.dnainternet.fi)
07:33:59 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
07:35:55 ericsagn1 joins (~ericsagne@2405:6580:0:5100:6393:9860:d118:b25)
07:38:38 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:43:08 × sgibber2018 quits (~arch-gibb@208.85.237.137) (Quit: WeeChat 2.9)
07:43:47 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d)
07:45:30 × scasc quits (~szabi@213142096072.public.telering.at) (Ping timeout: 256 seconds)
07:48:55 × SanchayanMaity quits (~Sanchayan@122.178.233.231) (Quit: SanchayanMaity)
07:49:22 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:49:29 SanchayanMaity joins (~Sanchayan@122.178.233.231)
07:53:48 Gurkenglas_ joins (~Gurkengla@unaffiliated/gurkenglas)
07:54:59 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
07:55:23 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 258 seconds)
07:57:09 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
08:00:22 nineonine_ joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
08:01:03 infosec_yo joins (sid476935@gateway/web/irccloud.com/x-ezccxoibyygulirl)
08:01:08 <infosec_yo> haskell is bloated.
08:01:52 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 256 seconds)
08:01:53 nineonine_ is now known as nineonine
08:03:03 knupfer joins (~Thunderbi@200116b82c2b4200586bd9fffe42074d.dip.versatel-1u1.de)
08:03:03 × knupfer quits (~Thunderbi@200116b82c2b4200586bd9fffe42074d.dip.versatel-1u1.de) (Client Quit)
08:03:17 knupfer joins (~Thunderbi@i5E86B444.versanet.de)
08:03:30 × knupfer quits (~Thunderbi@i5E86B444.versanet.de) (Client Quit)
08:03:48 knupfer joins (~Thunderbi@200116b82c2b4200e010a8af79e2986c.dip.versatel-1u1.de)
08:04:32 vilpan joins (~0@212.117.1.172)
08:05:01 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 264 seconds)
08:06:18 <jle`> nice
08:06:57 <infosec_yo> its also insecure.
08:08:21 Varis joins (~Tadas@unaffiliated/varis)
08:10:10 <jle`> not nice D:
08:10:54 wonko7 joins (~wonko7@2a01:e35:2ffb:7040:14a1:46f4:68f7:2133)
08:11:25 <infosec_yo> ?
08:11:54 × Feuermagier_ quits (~Feuermagi@213.178.26.41) (Quit: Leaving)
08:12:06 Feuermagier joins (~Feuermagi@213.178.26.41)
08:12:51 <int-e> infosec_yo: your mom is just bloated and insecure
08:13:22 Vulfe joins (~vulfe@2600:1702:31b0:34e0:4dab:dca0:5971:aa33)
08:14:06 <infosec_yo> what?
08:14:18 <MarcelineVQ> I'm bloated and insecure
08:14:31 <infosec_yo> how come ?
08:14:33 <tomsmeding> people are, in general
08:14:44 <MarcelineVQ> All the haskell I ate earlier I think
08:15:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:15:15 <infosec_yo> 💩
08:15:32 <int-e> infosec_yo: do you have any specific insecurity in mind?
08:15:38 <infosec_yo> yea
08:15:44 <int-e> infosec_yo: or are you just throwing around negative adjectives?
08:15:56 <infosec_yo> no
08:16:06 <int-e> so what is it?
08:16:08 <perry69420> int-e yea, did she ever love me?
08:16:13 <infosec_yo> general insecurities
08:16:17 <infosec_yo> e.g. sandbox etc
08:16:37 <int-e> so... that's not specific
08:16:47 <infosec_yo> like ESCAPE
08:17:14 <MarcelineVQ> with the wig, you remind me, of julia...
08:17:18 <boxscape> > ESCAPE
08:17:20 <lambdabot> error: Data constructor not in scope: ESCAPE
08:17:26 toorevitimirp joins (~tooreviti@117.182.180.221)
08:17:26 <int-e> There isn't much of a sandbox in Haskell.
08:18:02 sakirious joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net)
08:18:02 <perry69420> oh how we used to play in the sandbox
08:18:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:4dab:dca0:5971:aa33) (Ping timeout: 264 seconds)
08:18:13 <int-e> There's SafeHaskell which tries to contain effects in IO and is probably flawed, though demonstrating that isn't exactly easy.
08:18:58 <infosec_yo> well that can easily be bypassed.
08:19:25 <int-e> Show us how.
08:19:39 <infosec_yo> all the exploits i have for haskell are private.
08:19:46 <int-e> Then stfu
08:19:55 <infosec_yo> why
08:20:02 <MarcelineVQ> the ladies love my day-zero haskell exploits
08:20:23 <int-e> infosec_yo: because there's obviously nothing to talk about
08:20:45 <infosec_yo> i got TONS of haskell.
08:20:50 <infosec_yo> ready to be deployed.
08:21:05 <MarcelineVQ> int-e: we could talk about puyo puyo 2
08:21:41 ADG1089_ joins (~androirc@122.163.174.248)
08:22:51 <infosec_yo> i think that haskell can be redone better.
08:23:01 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 264 seconds)
08:24:11 Yumasi joins (~guillaume@176-172-89-74.abo.bbox.fr)
08:24:12 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
08:24:32 <perry69420> MarcelineVQ is that .... Candy Crush Tetris?
08:25:21 <jle`> pretty much every haskeller can think of some improvements to haskell they'd like to see, though
08:25:23 <MarcelineVQ> it's so much more
08:25:33 <infosec_yo> whos a haskeller in here ?
08:26:50 <boxscape> Any haskellers in #haskell?
08:27:07 <infosec_yo> ?
08:28:08 <tomsmeding> no
08:28:21 <dminuoso> As for security, I've been wondering about TH for a while. Considering how easy it is to upload a malicious package on hackage, or even straight up replace it without changing versions...
08:28:31 <dminuoso> TH has full unbounded access to IO, doesn't it?
08:28:38 <infosec_yo> yea hackage with the package.
08:28:53 × MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection)
08:29:01 <tomsmeding> well safehaskell will certainly forbid TH
08:29:20 MOSCOS joins (~MOSCOS@122.54.107.175)
08:29:20 <boxscape> oh I didn't know you could do that, I thought you could only change metadata without updating versions
08:29:27 <infosec_yo> i can easily bypass safehaskel..
08:29:45 <boxscape> do it
08:29:47 <dminuoso> tomsmeding: Sure, but maybe I do want some TH..
08:29:55 <tomsmeding> boxscape: keeping the same version isn't really a requirement for this being an issue I think
08:30:02 <dminuoso> Say, I trust well typed's optics TH code, but nothing else
08:30:04 <tomsmeding> who will notice if you do a patch upgrade
08:30:05 <boxscape> yeah that's fair
08:30:17 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 256 seconds)
08:30:36 <dminuoso> tomsmeding: keeping the same version means people who maintain strict bounds dont even have the chance to audit the bump.
08:30:37 <int-e> dminuoso: I didn't think you can replace a package without bumping the version on Hackage? (You can modify dependency versions though which is bound to have security implications.)
08:30:55 <dminuoso> int-e: Mmm. Im convinced you could.. perhaps Im wrong?
08:31:15 <int-e> dminuoso: Of course uploading a new minor version will probably go unnoticed anyway.
08:31:20 <dminuoso> Right
08:31:32 <infosec_yo> why minor?
08:32:03 <int-e> Because uploading a major version will be caught by diligent use of the package versioning policy.
08:32:10 <boxscape> Isn't there a security issue here even without TH though? The difference being you'd have problems when running the code rather than when compiling it
08:32:31 johnw joins (~johnw@haskell/developer/johnw)
08:32:45 <nfd> may've been a bit too cheeky in my solution to 11-2
08:32:48 <dminuoso> boxscape: When you compromise the compiler, you can hijack it to ruin your life completely
08:32:52 <infosec_yo> i still feel that haskell is a bit cheeky.
08:33:02 <nfd> wish i could solve my halting problem real fast here
08:33:10 <dminuoso> boxscape: Say I get to hijack your build server, then I can infest *all* resulting build artifacts.
08:33:11 <int-e> infosec_yo: There's little doubt that there's a lot of insecurities to find in Haskell and in particular its ecosystem. But if you're not willing to discuss *what* specifically is insecure, you're not contributing anything, you're just bragging.
08:33:15 <dminuoso> As opposed to just your machine
08:33:18 <boxscape> dminuoso hm I see
08:33:23 <int-e> infosec_yo: Which is worthless to the rest of us.
08:33:29 infosec_yo parts (sid476935@gateway/web/irccloud.com/x-ezccxoibyygulirl) ()
08:34:38 <int-e> @bot
08:34:38 <lambdabot> :)
08:34:46 <dminuoso> Mmm, perhaps SafeHaskell is the right answer after all
08:34:47 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Quit: nineonine)
08:35:17 <tomsmeding> couldn't you manually trust certain modules with safehaskell? I believe you could
08:35:24 <dminuoso> Right, modules or packages
08:35:26 <int-e> tomsmeding: you can trust packages
08:35:28 <dminuoso> You could do a safe import
08:35:32 <int-e> (not modules, I think)
08:35:43 <dminuoso> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/safe_haskell.html
08:35:48 <dminuoso> int-e: You can do a safe import on a module.
08:36:06 <int-e> You mark a module Trustworthy, and then if you trust the package containing that module you can import it "safely".
08:36:18 <int-e> But this isn't a bypass, this is by design.
08:37:14 mastarija joins (~mastarija@93-136-96-125.adsl.net.t-com.hr)
08:38:17 <int-e> Any Trustworthy module in a trusted package is part of your trusted codebase. Which means that the TCB is usually pretty big.
08:38:43 <int-e> (And then there's the compiler, as usual.)
08:39:20 <dminuoso> The compiler we kind of have to take for granted..
08:39:40 <dminuoso> Unless you're well-typed or facebook, it's not like you have any reasonable insight into the compiler..
08:40:16 <int-e> . o O ( MSR knows a thing or two? )
08:40:23 <dminuoso> Who is MSR?
08:40:38 <int-e> Microsoft Research
08:41:16 <dminuoso> Ah yeah, it was not a comprehensive list.
08:41:32 <int-e> Well, logically it was. :P
08:42:27 bliminse joins (~bliminse@host86-134-63-68.range86-134.btcentralplus.com)
08:42:53 <dminuoso> The main problem with hackage is just that through transitive dependencies, it gets very hard to track changes. I'd _love_ it if cabal had an `update bounds` feature, that sends me through a pager, displaying the diff of the source code behind the versions.
08:43:08 <dminuoso> Hunk wise, like say `git add -p`, where I can simply audit the changes
08:43:16 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
08:43:24 <dminuoso> That I would definitely use
08:48:38 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
08:51:25 × mastarija quits (~mastarija@93-136-96-125.adsl.net.t-com.hr) (Quit: Leaving)
08:52:56 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 240 seconds)
08:58:38 darjeeling_ joins (~darjeelin@112.16.171.8)
08:59:00 m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
09:00:14 × ADG1089_ quits (~androirc@122.163.174.248) (Ping timeout: 265 seconds)
09:00:45 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
09:01:54 ADG1089_ joins (~androirc@122.163.174.248)
09:02:58 solonarv joins (~solonarv@astrasbourg-552-1-28-212.w90-13.abo.wanadoo.fr)
09:03:00 × boxscape quits (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed)
09:03:10 boxscape joins (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8)
09:05:41 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
09:06:35 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
09:10:29 × zebrag quits (~inkbottle@aaubervilliers-654-1-115-108.w86-198.abo.wanadoo.fr) (Read error: Connection reset by peer)
09:10:50 zebrag joins (~inkbottle@aaubervilliers-654-1-115-108.w86-198.abo.wanadoo.fr)
09:12:27 × boxscape quits (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed)
09:13:03 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d) (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:13:54 × hlysig quits (~hlysig@mobile-194-144-46-247.3G.internet.is) (Remote host closed the connection)
09:15:13 boxscape joins (86ab2c53@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.83)
09:16:45 × argento quits (~argent0@168.227.97.29) (Quit: leaving)
09:17:36 __monty__ joins (~toonn@unaffiliated/toonn)
09:19:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
09:19:14 kuribas joins (~user@ptr-25vy0i9ovuvi4dmg8ha.18120a2.ip6.access.telenet.be)
09:22:07 × heatsink_ quits (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Remote host closed the connection)
09:24:19 × SanchayanMaity quits (~Sanchayan@122.178.233.231) (Quit: SanchayanMaity)
09:25:43 SanchayanMaity joins (~Sanchayan@122.178.233.231)
09:26:11 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-bdwcxdgjdouaybsg) (Quit: Connection closed for inactivity)
09:28:28 dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de)
09:29:38 × Cthalupa quits (~cthulhu@47.186.47.75) (Ping timeout: 260 seconds)
09:30:01 Cthalupa joins (~cthulhu@47.186.47.75)
09:30:37 zaquest joins (~notzaques@5.128.210.178)
09:33:51 ubert joins (~Thunderbi@p200300ecdf1e538de6b318fffe838f33.dip0.t-ipconnect.de)
09:34:03 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)
09:34:12 × hololeap quits (~hololeap@unaffiliated/hololeap) (Quit: KVIrc 5.0.1 Aria http://www.kvirc.net/)
09:34:53 fendor joins (~fendor@77.119.131.193.wireless.dyn.drei.com)
09:35:54 Lurkki joins (54f048f5@esm-84-240-72-245.netplaza.fi)
09:36:58 × zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection)
09:37:14 sord937 joins (~sord937@gateway/tor-sasl/sord937)
09:37:42 <maerwald> dminuoso: it would be so massive that I doubt it's useful
09:37:42 × wwwww quits (~wwwww@unaffiliated/wwwww) (Ping timeout: 256 seconds)
09:37:55 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
09:38:43 <dminuoso> maerwald: If your software is mission critical, would you not want to know how your dependencies changed every time you update? :0
09:38:57 <maerwald> not sure who would pay me for that...
09:39:14 <maerwald> also, reviewing GHC would be much more important than your deps...
09:39:20 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection)
09:39:37 wwwww joins (~wwwww@unaffiliated/wwwww)
09:39:42 <dminuoso> It's much easier to sneak malicious changes into hackage than into GHC.
09:39:51 <maerwald> I guess
09:41:06 <dminuoso> Dunno about you, but I generally look through a libraries implementatoin before I use it. I sadly don't do it transitively, but at least I do that much
09:42:38 <dminuoso> Eh by transitively I mean I dont check its dependencies transitively.
09:42:58 × darjeeling_ quits (~darjeelin@112.16.171.8) (Ping timeout: 256 seconds)
09:43:07 ggole joins (~ggole@2001:8003:8119:7200:cdad:14fe:9dc3:f21)
09:43:30 <dminuoso> Though at the very least I verify dependency trees regularly to prevent my packages from blowing up
09:45:57 kenran joins (~kenran@i59F67BE7.versanet.de)
09:47:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:48:16 × Moyst quits (~moyst@212-149-213-144.bb.dnainternet.fi) (Ping timeout: 240 seconds)
09:49:29 × ADG1089_ quits (~androirc@122.163.174.248) (Ping timeout: 260 seconds)
09:51:25 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Quit: Nice weekend)
09:53:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
09:53:42 zaquest joins (~notzaques@5.128.210.178)
09:56:43 LKoen joins (~LKoen@214.175.9.109.rev.sfr.net)
09:57:12 × zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection)
09:59:57 chewb joins (~chewb@abhz34.neoplus.adsl.tpnet.pl)
10:00:03 × gxt__ quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
10:04:39 × knupfer quits (~Thunderbi@200116b82c2b4200e010a8af79e2986c.dip.versatel-1u1.de) (Remote host closed the connection)
10:04:47 knupfer joins (~Thunderbi@200116b82c2b420031fa514480f2150c.dip.versatel-1u1.de)
10:06:15 thc202 joins (~thc202@unaffiliated/thc202)
10:06:24 × essem quits (essem@gateway/vpn/privateinternetaccess/essem) (Ping timeout: 260 seconds)
10:09:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:13:49 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
10:15:00 Vulfe joins (~vulfe@2600:1702:31b0:34e0:4dab:dca0:5971:aa33)
10:19:23 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)
10:19:31 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:4dab:dca0:5971:aa33) (Ping timeout: 258 seconds)
10:21:55 × bitmagie quits (~Thunderbi@200116b80638310001d2823cf2ef2077.dip.versatel-1u1.de) (Quit: bitmagie)
10:22:14 sord937 joins (~sord937@gateway/tor-sasl/sord937)
10:22:32 heatsink joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
10:24:41 coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl)
10:25:40 Vulfe joins (~vulfe@2600:1702:31b0:34e0:931:406a:be08:5300)
10:25:54 × perry69420 quits (7aa1d004@122.161.208.4) (Ping timeout: 245 seconds)
10:26:01 × hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
10:27:11 × heatsink quits (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 258 seconds)
10:30:00 kritzefitz joins (~kritzefit@212.86.56.80)
10:30:15 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:931:406a:be08:5300) (Ping timeout: 258 seconds)
10:30:29 × Lurkki quits (54f048f5@esm-84-240-72-245.netplaza.fi) (Remote host closed the connection)
10:30:33 × kritzefitz quits (~kritzefit@212.86.56.80) (Client Quit)
10:36:08 livvy joins (~livvy@gateway/tor-sasl/livvy)
10:38:30 jamm_ joins (~jamm@unaffiliated/jamm)
10:40:02 hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de)
10:41:45 × guest1211 quits (~user@49.5.6.87) (Remote host closed the connection)
10:43:52 × bstarr quits (~bstarr@139.28.218.148) (Remote host closed the connection)
10:44:20 Lurkki[m] joins (lurkkipriv@gateway/shell/matrix.org/x-djvldaecobwrcdeg)
10:51:58 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
10:58:07 vilpan parts (~0@212.117.1.172) ()
10:59:54 × SanchayanMaity quits (~Sanchayan@122.178.233.231) (Quit: SanchayanMaity)
11:00:04 × lassulus quits (~lassulus@NixOS/user/lassulus) (Ping timeout: 260 seconds)
11:01:08 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
11:03:31 SchwarzeLocke joins (~SchwarzeL@185.163.110.125)
11:04:58 SanchayanMaity joins (~Sanchayan@122.178.245.223)
11:04:59 lassulus joins (~lassulus@NixOS/user/lassulus)
11:07:03 wtw joins (~wtw@unaffiliated/wtw)
11:07:09 wtw parts (~wtw@unaffiliated/wtw) ()
11:07:24 Vulfe joins (~vulfe@2600:1702:31b0:34e0:931:406a:be08:5300)
11:08:26 × daGrevis quits (~daGrevis@unaffiliated/dagrevis) (Remote host closed the connection)
11:09:38 daGrevis joins (~daGrevis@unaffiliated/dagrevis)
11:11:10 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Remote host closed the connection)
11:12:13 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:931:406a:be08:5300) (Ping timeout: 268 seconds)
11:13:44 × SanchayanMaity quits (~Sanchayan@122.178.245.223) (Quit: SanchayanMaity)
11:15:03 SanchayanMaity joins (~Sanchayan@122.178.245.223)
11:15:17 × SanchayanMaity quits (~Sanchayan@122.178.245.223) (Client Quit)
11:20:27 SanchayanMaity joins (~Sanchayan@122.178.245.223)
11:20:58 × lassulus quits (~lassulus@NixOS/user/lassulus) (Ping timeout: 246 seconds)
11:21:54 × rprije quits (~rprije@14-201-170-17.tpgi.com.au) (Ping timeout: 256 seconds)
11:23:25 livvy joins (~livvy@gateway/tor-sasl/livvy)
11:24:01 heatsink joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
11:25:54 × SolarAquarion quits (SolarAquar@gateway/shell/panicbnc/x-kjhphkgroirlqpvp) (Ping timeout: 244 seconds)
11:26:26 × Klumben quits (Nsaiswatch@gateway/shell/panicbnc/x-mkcnlvblwjhyiwoj) (Ping timeout: 264 seconds)
11:26:52 × dax quits (dax@bitbot/dax) (Ping timeout: 260 seconds)
11:26:53 × SegFaultAX quits (SegFaultAX@unaffiliated/segfaultax) (Ping timeout: 260 seconds)
11:26:53 × entropygain quits (levitate@unaffiliated/entropygain) (Ping timeout: 260 seconds)
11:28:50 × heatsink quits (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 264 seconds)
11:30:29 entropygain joins (levitate@unaffiliated/entropygain)
11:31:45 darjeeling_ joins (~darjeelin@122.245.123.202)
11:32:26 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:6393:9860:d118:b25) (Ping timeout: 264 seconds)
11:32:39 <kuribas> is Control.Category used somewhere else in Base?
11:32:57 <kuribas> while it's nice to have the operators (>>>), it doesn't seem to have much use...
11:33:08 <Taneb> kuribas: it's used by Control.Arrow
11:33:24 <Taneb> Which has a bunch of subclasses of Category of varying utility
11:34:23 <kuribas> I've never really got into Arrows
11:34:33 × joehillen quits (joehillen@unaffiliated/joehillen) (Ping timeout: 246 seconds)
11:34:37 <xerox_> nobody did
11:34:50 × xacktm quits (xacktm@gateway/shell/panicbnc/x-fxbrslxxjjorsbbu) (Ping timeout: 264 seconds)
11:34:50 <Taneb> Only whoever wrote that one xml library did
11:34:54 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
11:35:51 <kuribas> hxt?
11:36:03 <Taneb> That's the one
11:36:32 <Taneb> (I think it turned out that Applicatives are about as powerful as Arrows and a lot easier to understand)
11:36:33 × entropygain quits (levitate@unaffiliated/entropygain) (Ping timeout: 272 seconds)
11:37:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:38:30 dax joins (dax@bitbot/dax)
11:38:58 joehillen joins (joehillen@unaffiliated/joehillen)
11:39:33 SegFaultAX joins (SegFaultAX@unaffiliated/segfaultax)
11:39:38 entropygain joins (levitate@unaffiliated/entropygain)
11:39:59 lassulus joins (~lassulus@NixOS/user/lassulus)
11:40:19 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
11:40:38 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
11:41:29 <kuribas> yeah, I find applicative/monadic processing of xml much easier
11:44:48 ericsagn1 joins (~ericsagne@2405:6580:0:5100:c504:28ef:2ca:d7c2)
11:45:25 × plutoniix quits (~q@ppp-223-24-62-231.revip6.asianet.co.th) (Ping timeout: 240 seconds)
11:46:07 Lycurgus joins (~niemand@cpe-45-46-137-210.buffalo.res.rr.com)
11:48:00 pokid joins (~pokid@unaffiliated/pokid)
11:48:14 drbean joins (~drbean@TC210-63-209-80.static.apol.com.tw)
11:49:12 Vulfe joins (~vulfe@2600:1702:31b0:34e0:931:406a:be08:5300)
11:49:52 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
11:50:03 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
11:50:34 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
11:51:54 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
11:53:49 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:931:406a:be08:5300) (Ping timeout: 258 seconds)
11:54:27 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Quit: WeeChat 2.9)
11:54:51 watt678 joins (~watt678@124.123.105.254)
11:54:59 z0 joins (~z0@188.251.86.84)
11:55:23 z0 is now known as Guest81293
11:55:40 × watt678 quits (~watt678@124.123.105.254) (Read error: Connection reset by peer)
11:56:21 jamm joins (~jamm@unaffiliated/jamm)
11:57:08 × troydm quits (~troydm@unaffiliated/troydm) (Ping timeout: 260 seconds)
11:58:06 × z0_ quits (~z0@188.251.72.233) (Ping timeout: 265 seconds)
11:58:26 plutoniix joins (~q@184.82.200.118)
12:00:26 Amras joins (~Amras@unaffiliated/amras)
12:00:44 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
12:01:15 cgfbee joins (~bot@oc1.itim-cj.ro)
12:04:21 Vulfe joins (~vulfe@2600:1702:31b0:34e0:d32:ddb0:59ad:e779)
12:09:00 × kenran quits (~kenran@i59F67BE7.versanet.de) (Ping timeout: 256 seconds)
12:09:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:d32:ddb0:59ad:e779) (Ping timeout: 264 seconds)
12:09:55 × dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 258 seconds)
12:10:26 xacktm joins (xacktm@gateway/shell/panicbnc/x-jvtlirfmskjbwohd)
12:10:36 kenran joins (~kenran@i59F67BD5.versanet.de)
12:11:40 scasc joins (~szabi@213142096072.public.telering.at)
12:11:47 dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de)
12:11:49 machinedgod joins (~machinedg@24.105.81.50)
12:12:02 fendor_ joins (~fendor@178.165.131.83.wireless.dyn.drei.com)
12:12:55 <scasc> Do you know of a good summary / lookup of the module namespaces used across Hackage?
12:13:28 × fendor quits (~fendor@77.119.131.193.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
12:13:38 <scasc> ... / analysis
12:14:15 inkbottle joins (~inkbottle@aaubervilliers-654-1-76-48.w86-212.abo.wanadoo.fr)
12:14:16 × zebrag quits (~inkbottle@aaubervilliers-654-1-115-108.w86-198.abo.wanadoo.fr) (Ping timeout: 256 seconds)
12:14:28 × coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
12:15:09 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d)
12:15:55 <merijn> scasc: Depends what you wanna use it for?
12:17:02 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d) (Remote host closed the connection)
12:17:50 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d)
12:18:30 × loller_ quits (uid358106@gateway/web/irccloud.com/x-rqmoabancwauhdqz) (Quit: Connection closed for inactivity)
12:18:35 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
12:19:00 × scasc quits (~szabi@213142096072.public.telering.at) (Remote host closed the connection)
12:21:02 scasc joins (~szabi@213142096072.public.telering.at)
12:21:02 <scasc> Sorry, I got disconnected. Did anyone give a pointer re used namespaces while I was gone?
12:21:02 jonathanx_ joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
12:22:03 <Taneb> scasc: merijn asked what you want to use it for
12:22:10 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Read error: Connection reset by peer)
12:22:25 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 240 seconds)
12:23:15 <scasc> Just a general overview. I was toying with a little package, and was trying to figure out where to put its modules.
12:24:45 <scasc> It provides functionality which can be useful in CLI and TUI "semigraphical" representation.
12:25:20 <merijn> There's no real organisation, tbh
12:25:32 × SchwarzeLocke quits (~SchwarzeL@185.163.110.125) (Remote host closed the connection)
12:25:56 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
12:26:07 <scasc> I know, that's why I wanted to look for inspiration / examples, should a collection / analysis exist.
12:26:27 <merijn> What's the name of the package?
12:26:51 <scasc> I mean, "brick" is a very popular TUI, and these could be arguably used in some custom Brick widgets, but I won't put it under "Brick." as it is more general.
12:26:58 <merijn> If the name isn't super generic, I'd just use the name as root for you module hierarchy
12:27:09 Entertainment joins (~entertain@104.246.132.210)
12:27:16 jmchael joins (~jmchael@87.112.60.168)
12:27:39 × Entertainment quits (~entertain@104.246.132.210) (Client Quit)
12:28:06 <scasc> "What's the name of the package" -- none yet. Well, none settled yet. I have an absolutely unrepresentative WIP-name. Naming is the hardest thing in CS :o)
12:28:33 Entertainment joins (~entertain@104.246.132.210)
12:29:51 <scasc> Even though it's String/Text related, "Data.Text." seems to be an overkill, as it's not really about "data".
12:30:04 <merijn> Data and Control are historical mistakes, imo
12:30:36 <scasc> Some packages use just "Text."
12:30:54 <merijn> When hierarchical modules were introduced a bunch of stuff got put under Data or Control, but none of these have a clear argument for why they're under Data or under Control and they just add useless noise
12:30:54 <scasc> Then I saw "Console."
12:31:18 st8less joins (~st8less@2603:a060:11fd:0:841d:e9ad:74f7:93f9)
12:32:23 <scasc> Maybe I'll go for "Text." (without Data). It's for console / TUI usage, so that seems fair.
12:32:23 Klumben joins (Nsaiswatch@gateway/shell/panicbnc/x-fomxhgfovyvqanep)
12:32:29 <scasc> And There's https://hackage.haskell.org/package/ascii-art-to-unicode-0.1.0.1/docs/Text-AsciiArt.html as a precedent.
12:33:13 <merijn> Keep in mind modules are expected to be unique, so don't pick any overly general names
12:35:40 <scasc> "Keep in mind modules are expected to be unique" -- I had to utilize `-XPackageImports` myself.
12:35:47 Tario joins (~Tario@201.192.165.173)
12:36:05 <scasc> To be fair, that should be part of a new standard anyway.
12:36:10 <scasc> IMO
12:36:30 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
12:36:41 <merijn> scasc: I would not assume a new standard will happen any time soon
12:37:10 <merijn> and "I had to utilise PackageImports too" is a poor reason to inflict it upon everybody else...
12:41:41 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
12:42:20 <scasc> I was not implying I was going to willfully create a conflict. I was just trying to express I was feeling your pain.
12:45:13 SolarAquarion joins (SolarAquar@gateway/shell/panicbnc/x-vaxxzctuxkewousu)
12:52:12 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
12:56:09 troydm joins (~troydm@unaffiliated/troydm)
12:58:20 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:00:14 × forell quits (~forell@unaffiliated/forell) (Ping timeout: 260 seconds)
13:01:49 theodorc joins (theodorc@cassarossa.samfundet.no)
13:02:05 forell joins (~forell@unaffiliated/forell)
13:03:01 × shatriff quits (~vitaliish@176-52-216-242.irishtelecom.com) (Remote host closed the connection)
13:03:54 wei2912 joins (~wei2912@unaffiliated/wei2912)
13:04:36 × plutoniix quits (~q@184.82.200.118) (Quit: Leaving)
13:05:57 <phaazon> I have to say that, writing some Haskell for AoC is a pure joy
13:06:01 <phaazon> I missed writing Haskell too much :D
13:06:15 <phaazon> today’s exercise was super simple in Haskell, just, pure $ Joy
13:06:16 <phaazon> :)
13:06:17 theodorc is now known as teddyc
13:06:34 Benzi-Junior joins (~BenziJuni@dsl-149-65-135.hive.is)
13:08:58 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds)
13:09:23 × Benzi-Junior quits (~BenziJuni@dsl-149-65-135.hive.is) (Client Quit)
13:09:30 <boxscape> funny, today's exercise is the one that I wouldn't have minded writing in another language
13:09:50 todda7 joins (~torstein@ppp-2-84-17-53.home.otenet.gr)
13:10:08 × scasc quits (~szabi@213142096072.public.telering.at) (Ping timeout: 256 seconds)
13:10:38 Kronic joins (~Kronic___@84.203.98.133)
13:10:56 × Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 256 seconds)
13:11:39 <Kronic> A design question: If I have a type that I defined as having say, 5 or 6 strings -- is there a pattern I can use to apply a function to all of them? Seems like it would be a functor or something but I'm not sure
13:11:54 <dminuoso> Kronic: You could make it MonoFoldable
13:12:03 ces joins (~ces@fsf/member/ces)
13:12:16 <dminuoso> It would require either boilerplating this, or you could use Generics for it
13:12:56 <dminuoso> Oh, MonoFunctor of course, not MonoFoldable. but the latter would also exist :)
13:13:47 <Kronic> Hm, I did find search results for MonoFoldable but not MonoFunctor, could you point me in the right direction?
13:14:06 <dminuoso> https://hackage.haskell.org/package/mono-traversable-1.0.15.1/docs/Data-MonoTraversable.html#t:MonoFunctor
13:14:32 <dminuoso> This is largely only useful when you write stuff that works over generic mono* things.
13:15:28 Benzi-Junior joins (~BenziJuni@88-149-65-135.du.xdsl.is)
13:15:53 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
13:16:41 <dminuoso> Say you yourself are writing some `lowerCase :: MonoFunctor f => f Char -> f Char` that you intend to use on various textual containers. If its just a one-off, you're best off just writing some `fooMap :: (Text -> Text) -> T -> T`
13:17:09 <dminuoso> Err, the example of lowerCase is wrong.
13:17:43 <solonarv> dminuoso: wouldn't that actually be lowerCase :: (Element t ~ Char, MonoFunctor t) => t -> t
13:17:43 <Kronic> you're probably right but perhaps I should learn how to use this, it looks a little bit above me at the moment but it seems very useful
13:17:50 <dminuoso> solonarv: Was just about to write that, yeah
13:18:11 <dminuoso> Mmm, I have yet to find a use for mono-traversable.. dunno..
13:18:19 × drbean quits (~drbean@TC210-63-209-80.static.apol.com.tw) (Ping timeout: 260 seconds)
13:18:28 <dminuoso> Out of the package, MonoTraversable and MonoFoldable seem most useful, MonoFunctor not so much
13:18:58 <Kronic> My use case is I have a type that represents some user data and all of it is Maybe, so I want to filter out users who have any one field that is Nothing
13:19:19 Vulfe joins (~vulfe@2600:1702:31b0:34e0:5d40:3eb5:dfbe:a235)
13:21:14 × deu quits (de@uio.re) (Ping timeout: 265 seconds)
13:23:19 scasc joins (~szabi@213142096072.public.telering.at)
13:23:41 <solonarv> I would usually just go straight to lens, tbh
13:24:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:5d40:3eb5:dfbe:a235) (Ping timeout: 264 seconds)
13:24:32 <solonarv> :t each %~ toLower
13:24:34 <lambdabot> Each s t Char Char => s -> t
13:25:23 <solonarv> > let tlc = each %~ toLower in (tlc "Hello World!", tld (Data.Text.pack "Good Bye!"))
13:25:25 <lambdabot> error:
13:25:26 <lambdabot> Not in scope: ‘Data.Text.pack’
13:25:26 <lambdabot> No module named ‘Data.Text’ is imported.
13:25:26 × xff0x quits (~fox@2001:1a81:5221:8f00:f974:7952:c764:dde1) (Ping timeout: 258 seconds)
13:25:35 <solonarv> @let import qualified Data.Text
13:25:35 <Kronic> I've never used lens before, if this is a good use case for learning Lens I'm open to doing that
13:25:38 <lambdabot> Defined.
13:25:38 heatsink joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
13:25:40 <solonarv> > let tlc = each %~ toLower in (tlc "Hello World!", tld (Data.Text.pack "Good Bye!"))
13:25:42 <lambdabot> error:
13:25:43 <lambdabot> • Variable not in scope: tld :: Data.Text.Text -> b
13:25:43 <lambdabot> • Perhaps you meant ‘tlc’ (line 1)
13:25:51 <solonarv> > let tlc = each %~ toLower in (tlc "Hello World!", tlc (Data.Text.pack "Good Bye!"))
13:25:53 <lambdabot> ("hello world!","good bye!")
13:26:01 <solonarv> there! sorry for the spam, dang typos
13:26:02 <dminuoso> lens is definitely not a bad idea
13:26:04 xff0x joins (~fox@2001:1a81:5221:8f00:c3d7:cf86:7125:4808)
13:26:19 <solonarv> lens is a large library that can do many things, so there are many use cases
13:26:36 <dminuoso> but, Im not sure whether something will generate a traversal for uniform types for you
13:26:44 <solonarv> this same large size also makes it somewhat hard to learn, however
13:26:55 <solonarv> dminuoso: generic-lens can!
13:27:16 <dminuoso> solonarv: Can generi-lens generate a `Traversal' T Text` for `data T = T { f1 :: Text, f2 :: Text }` ?
13:27:34 × Lycurgus quits (~niemand@cpe-45-46-137-210.buffalo.res.rr.com) (Quit: Exeunt)
13:28:40 <solonarv> dminuoso: yes: types @Text --; that does a "deep" traversal, whcih is fine in this case
13:29:03 <Kronic> That looks pretty powerful
13:30:38 × heatsink quits (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 264 seconds)
13:30:39 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d)
13:30:42 <Kronic> which library would you guys recommend? I heard microlens is a good starting place but I'm honestly not sure. I could start out with the main lens lib but that looks a little bit intimidating lol
13:31:01 <solonarv> surprsingly there doesn't seem to be a shallow-traversal variant of 'typed' in generic-lens
13:31:12 Vulfe joins (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b)
13:31:16 <solonarv> Kronic: I jumped straight into 'lens' and simply ignored most of the library, lol
13:32:37 <Kronic> I guess I'll give it a whirl
13:33:25 <dminuoso> Kronic: For beginners, I'd recommend `optics` over `lens`
13:33:34 <dminuoso> (There's also an equivalent `generic-optics` library)
13:35:10 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
13:35:57 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
13:35:58 <Kronic> Hm... well would I be able to accomplish the same thing that I wanted the lens lib for?
13:36:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b) (Ping timeout: 264 seconds)
13:36:05 <dminuoso> Yes.
13:36:09 <solonarv> oh yes, that might be a good idea. 'optics' didn't exist yet when I learned this.
13:36:24 <dminuoso> `optics` is a newer version of `lens` that has, mostly, the same operators and functions
13:36:56 <dminuoso> To you, it differs mainly by hiding its implementation behind newtypes and using type machinery to generate custom error message if you mis-use it
13:37:07 <Kronic> Oh okay, sounds good. Thanks so much for your help. I'll see where I can get to with that
13:37:27 <solonarv> oh yes, 'lens' type errors are famously impenetrable
13:38:12 <phaazon> boxscape: what did you write it in?
13:38:21 <boxscape> haskell
13:38:34 <phaazon> I’ve AoC in Lua this year… I wanted to test Lua and… I’ve had enough, switching back to Haskell :D
13:38:42 <phaazon> I’ve been doing*
13:39:03 <solonarv> I also wrote it in Haskell; fortunately I already had a little "2D grid" library left from day 3
13:39:13 <solonarv> so it was fairly painless overall
13:39:17 <phaazon> :)
13:39:28 <phaazon> yeah, from scratch, it’s ~50 lines on my side
13:39:36 <phaazon> I could compress it a bit more I guess, but it’s well enough
13:39:58 <phaazon> I liked recognizing an anamorphism :)
13:40:22 <solonarv> mine is 82sloc apparently: https://github.com/Solonarv/adventofcode-2020/blob/main/haskell/solutions/Day11.hs
13:40:42 <solonarv> a bunch of that is boilerplate, tests, and generous newlines, though
13:40:53 <phaazon> https://github.com/phaazon/advent-of-code-2020/blob/master/day11/Main.hs mine
13:41:19 <phaazon> oh I need to remove part1, it’s not used
13:41:32 <tomjaguarpaw> Who is responsible for the haskell.org website and/or where can I file tickets for issues on it?
13:42:08 <dminuoso> tomjaguarpaw: #haskell-infrastructure is one place
13:42:20 <tomjaguarpaw> Thanks, I shall try there
13:42:23 <dminuoso> https://www.haskell.org/haskell-org-committee/
13:42:25 <dminuoso> Is the proper place
13:42:31 <Kronic> https://github.com/haskell-infra/www.haskell.org/ is the github repo
13:42:42 Ariakenom joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se)
13:42:53 × shf quits (~sheaf@2a01:cb19:80cc:7e00:8914:36aa:fb38:e6af) (Read error: Connection reset by peer)
13:44:42 mrchampion joins (~mrchampio@38.18.109.23)
13:44:51 unfo- joins (~unfo-@185.103.96.147)
13:45:51 × ces quits (~ces@fsf/member/ces) (Read error: Connection reset by peer)
13:45:52 × Yumasi quits (~guillaume@176-172-89-74.abo.bbox.fr) (Ping timeout: 272 seconds)
13:45:54 Vulfe joins (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b)
13:46:50 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:bbcd:f950:50c:999:2b9d) (Ping timeout: 264 seconds)
13:47:18 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
13:47:41 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
13:47:42 Tario joins (~Tario@201.192.165.173)
13:49:25 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 240 seconds)
13:50:03 orzo joins (joe@lasker.childrenofmay.org)
13:52:38 × LKoen quits (~LKoen@214.175.9.109.rev.sfr.net) (Read error: Connection reset by peer)
13:53:15 LKoen joins (~LKoen@214.175.9.109.rev.sfr.net)
13:56:17 gxt__ joins (~gxt@gateway/tor-sasl/gxt)
13:58:07 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 246 seconds)
13:58:30 <Kronic> There's a lot in this optics lib, but from the looks of things I'll need to build a Traversal
13:59:24 <dminuoso> Kronic: If you check solonarv' example above you dont need to do it yourself.
13:59:33 <dminuoso> If you use generics-optics, it will do this out of the box
13:59:44 <dminuoso> You just need to derive your type from Generic, and then you can just use `types` and voila
14:00:48 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
14:01:25 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds)
14:03:08 jespada joins (~jespada@90.254.245.49)
14:08:33 <solonarv> hm. does anyone here have library recommendations for email access (read-only is fine)?
14:09:13 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Ping timeout: 264 seconds)
14:10:01 carlomagno joins (~cararell@148.87.23.4)
14:11:19 <solonarv> specifically, I'm looking to write a program that looks through my incoming emails, and if a particular email notification is found it does something else
14:17:06 SanchayanM joins (~Sanchayan@171.76.122.153)
14:18:35 daaaamien joins (~damien@2a01:e34:ef93:9a60:1adb:f2ff:fe40:717b)
14:18:46 × SanchayanMaity quits (~Sanchayan@122.178.245.223) (Ping timeout: 256 seconds)
14:19:07 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
14:19:35 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
14:20:02 daaaamien parts (~damien@2a01:e34:ef93:9a60:1adb:f2ff:fe40:717b) ()
14:23:47 elliott__ joins (~elliott@pool-108-45-178-3.washdc.fios.verizon.net)
14:24:26 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
14:27:08 heatsink joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
14:28:41 × LKoen quits (~LKoen@214.175.9.109.rev.sfr.net) (Remote host closed the connection)
14:29:58 × elliott__ quits (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
14:31:50 × heatsink quits (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 264 seconds)
14:33:17 × xsperry quits (~as@unaffiliated/xsperry) (Ping timeout: 258 seconds)
14:34:19 <tomsmeding> is there a tool that lets me automatically find functions that are transitively unused in my haskell code?
14:34:57 <tomsmeding> I don't particularly care what it does with functions that are exported from public modules of the library, though if it considers those unused I'd need to be able to set custom "used" roots
14:35:33 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
14:35:57 <merijn> tomsmeding: GHC already does that at the module level?
14:36:07 <tomsmeding> I know, and I explicitly want it across modules
14:36:19 <tomsmeding> I think I'm exporting stuff that I'm not actually using anywhere
14:36:20 <merijn> Not that I'm aware off?
14:36:31 <tomsmeding> I thought so, but I wanted to ask before assuming
14:38:31 <solonarv> the closest I can think of is -split-sections which allows for eliminating these unused functions at link time
14:38:36 × darjeeling_ quits (~darjeelin@122.245.123.202) (Ping timeout: 260 seconds)
14:39:46 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
14:40:00 fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
14:40:54 s00pcan joins (~chris@075-133-056-178.res.spectrum.com)
14:41:21 <tomsmeding> thanks; while relevant, it's not what I'm looking for here :)
14:43:28 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Client Quit)
14:47:46 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b) (Remote host closed the connection)
14:47:53 Vulfe_ joins (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b)
14:48:42 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.0)
14:49:18 LKoen joins (~LKoen@214.175.9.109.rev.sfr.net)
14:51:36 Moyst joins (~moyst@212-149-213-144.bb.dnainternet.fi)
14:52:03 bitmagie joins (~Thunderbi@200116b80638310001d2823cf2ef2077.dip.versatel-1u1.de)
14:52:36 darjeeling_ joins (~darjeelin@115.215.43.136)
14:55:12 × aqd quits (~aqd@87-92-163-238.rev.dnainternet.fi) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:55:43 × atraii quits (~atraii@c-98-32-64-84.hsd1.ut.comcast.net) (Quit: ZNC 1.7.5 - https://znc.in)
14:56:50 urodna joins (~urodna@unaffiliated/urodna)
14:59:34 atraii joins (~atraii@c-98-32-64-84.hsd1.ut.comcast.net)
14:59:42 × SanchayanM quits (~Sanchayan@171.76.122.153) (Quit: SanchayanM)
15:03:38 × jamm quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
15:04:59 jamm joins (~jamm@unaffiliated/jamm)
15:06:13 shf joins (~sheaf@2a01:cb19:80cc:7e00:159e:9ac:2ff5:a704)
15:08:46 deu joins (de@uio.re)
15:11:21 × jamm quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
15:13:17 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
15:13:35 elliott__ joins (~elliott@pool-108-45-178-3.washdc.fios.verizon.net)
15:15:17 <tomjaguarpaw> Perhaps I shouldn't have compiled Pandoc
15:16:08 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
15:16:10 × phasespace quits (~sar@80-89-47-117.inet.signal.no) (Ping timeout: 246 seconds)
15:17:15 × Vulfe_ quits (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b) (Remote host closed the connection)
15:22:33 Vulfe joins (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b)
15:29:17 <sm[m]> tomjaguarpaw: yes that's almost always a mistake :-)
15:30:14 <sm[m]> who would think a simple markdown reading module would humble our powerful machines
15:31:58 jamm joins (~jamm@unaffiliated/jamm)
15:33:51 Entertainment parts (~entertain@104.246.132.210) ()
15:34:44 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
15:36:38 × jamm quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
15:37:50 × st8less quits (~st8less@2603:a060:11fd:0:841d:e9ad:74f7:93f9) (Ping timeout: 264 seconds)
15:40:57 phasespace joins (~sar@89-162-33-21.fiber.signal.no)
15:42:09 st8less joins (~st8less@inet-167-224-197-181.isp.ozarksgo.net)
15:45:28 <dminuoso> solonarv: HaskellNet?
15:45:29 <exarkun> do "simple" and "markdown" belong in the same sentence?
15:46:48 <dminuoso> solonarv: Im using the SMTP portion of it, and aside from some oddities, it seemed fine.
15:49:13 <dminuoso> tomsmeding: https://github.com/ocharles/weeder
15:49:45 <sm[m]> I would think so!
15:50:13 <sm[m]> We're not parsing Perl or Haskell here
15:50:21 codeAlways joins (uid272474@gateway/web/irccloud.com/x-kqsckzxfcmyupltw)
15:50:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
15:51:29 × acidjnk_new quits (~acidjnk@p200300d0c719ff053d8846c1390abdcb.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
15:54:24 <merijn> sm[m]: Yeah, Haskell isn't ambiguous :p
15:54:29 <merijn> (Not sure about Perl)
15:54:30 <solonarv> dminuoso: I did find that one, it gave me pause due to being currently unmaintained; but I suppose email protocols don't exactly innovate very often
15:55:10 <merijn> sm[m]: Markdown is one of those things that seems superficially simple, but when you look into it you realise it's so underspecified there's tons of ambiguity in both possible syntax and what it should mean
15:55:34 <dminuoso> solonarv: Indeed, especially the older protocols are well designed that you can write a stable implementation around it very easily
15:55:38 <merijn> Which is also why we have like 15 billion markdown "flavours", rather than a single "correct" markdown parser
15:55:45 <dminuoso> fsvo "well designed"
15:55:58 <merijn> Restructured Text > Markdown for that reason alone
15:56:13 <justsomeguy> I like ReStructuredText, which is like a standardized alternative to markdown with a proper spec and rendering software.
15:56:19 <justsomeguy> Ah, beat me to it.
15:56:26 <merijn> justsomeguy: :p
15:56:45 × kuribas quits (~user@ptr-25vy0i9ovuvi4dmg8ha.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
15:59:03 × gxt__ quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
16:00:31 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
16:00:31 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host)
16:00:31 neiluj joins (~jco@unaffiliated/neiluj)
16:01:34 _linker_ joins (~linker@2a02:a31a:a041:9a80:1df2:d4df:88af:3980)
16:05:05 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection)
16:06:03 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:c504:28ef:2ca:d7c2) (Ping timeout: 258 seconds)
16:10:12 notzmv joins (~user@unaffiliated/zmv)
16:10:53 × scasc quits (~szabi@213142096072.public.telering.at) (Ping timeout: 265 seconds)
16:12:48 Rudd0 joins (~Rudd0@185.189.115.98)
16:17:01 acidjnk_new joins (~acidjnk@p200300d0c719ff72385a765c3f0a7348.dip0.t-ipconnect.de)
16:17:13 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
16:18:31 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
16:18:42 ericsagn1 joins (~ericsagne@2405:6580:0:5100:e26e:cf9:1dd6:9615)
16:18:47 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Client Quit)
16:19:16 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
16:20:43 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
16:23:11 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
16:24:23 scasc joins (~szabi@213142096072.public.telering.at)
16:25:03 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
16:25:37 conal joins (~conal@107.181.166.103)
16:25:47 × unlink2 quits (~unlink2@p5dc0acf8.dip0.t-ipconnect.de) (Remote host closed the connection)
16:25:47 <shapr> Wow, I love this paper https://www.microsoft.com/en-us/research/uploads/prod/2020/11/perceus-tr-v1.pdf
16:25:52 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Ping timeout: 265 seconds)
16:25:55 <shapr> It's a whole language inside the ST monad
16:26:11 fresheyeball joins (~isaac@ec2-35-155-97-88.us-west-2.compute.amazonaws.com)
16:27:07 <Uniaika> my gawd
16:27:24 unlink2 joins (~unlink2@p200300ebcf259600971664e9499d7db7.dip0.t-ipconnect.de)
16:27:57 <Uniaika> oh yeah that's Koka
16:28:01 <Uniaika> *used in Koka
16:28:03 <Uniaika> very neat
16:28:41 heatsink joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
16:30:38 <Geekingfrog> I'm using amazonka and I have a bunch of lens setters like so: x & foo . bar . set1 .~ val1 & foo . bar .set2 .~ val2 Is there a way to group together the prefix? Something like x & (foo . bar) & set1 .~ val1 & set2 .~ val2
16:30:44 <Ariakenom> reads abstract. is confused. ctrl-f cycles. feels betrayed
16:30:58 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
16:31:43 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
16:32:10 × Amras quits (~Amras@unaffiliated/amras) (Remote host closed the connection)
16:32:20 <c_wraith> Geekingfrog: how do you feel about using &~ and zoom?
16:33:14 <Geekingfrog> Never used that, but why not
16:33:34 <Geekingfrog> zoom seems straightforward, &~ though…
16:33:38 × heatsink quits (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 264 seconds)
16:35:30 <aplainzetakind> My referential transparency is broken: https://dpaste.com/4DFLERT3B
16:36:02 <aplainzetakind> What's going on I have no idea
16:36:50 pokid parts (~pokid@unaffiliated/pokid) ()
16:38:11 <c_wraith> > ("string", (([1, 2, 3], True), ())) &~ zoom (_2 . _1 . _1) (do ix 0 += 5 ; ix 2 %= negate) -- Geekingfrog: this would be a lot cleaner if it wasn't all on one line
16:38:14 <lambdabot> ("string",(([6,2,-3],True),()))
16:38:22 × ubert quits (~Thunderbi@p200300ecdf1e538de6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
16:38:40 <ski> aplainzetakind> :t foo
16:38:46 ubert joins (~Thunderbi@p200300ecdf1e530fe6b318fffe838f33.dip0.t-ipconnect.de)
16:39:12 <aplainzetakind> ski: foo :: (Num a, Num b, Enum a, Enum b, Ord a, Ord b) => [(a, b)]
16:39:36 <Geekingfrog> c_wraith, thanks. Indeed, it's fine with multilines
16:39:47 × knupfer quits (~Thunderbi@200116b82c2b420031fa514480f2150c.dip.versatel-1u1.de) (Ping timeout: 258 seconds)
16:40:18 <ski> aplainzetakind> :t m0
16:40:43 <aplainzetakind> ski: m0 :: M.Map (GHC.Word.Word32, GHC.Word.Word32) GHC.Word.Word32
16:41:59 <solonarv> you can also write it without zoom and &~, like so: x & foo . bar %~ (set1 .~ val1) . (set2 .~ val2)
16:42:01 <ski> > [-1 .. 1] :: [Word32]
16:42:04 <lambdabot> []
16:42:24 <aplainzetakind> Ah of course.
16:42:26 <aplainzetakind> Thanks.
16:44:05 <aplainzetakind> It's interesting though.
16:44:22 × toorevitimirp quits (~tooreviti@117.182.180.221) (Remote host closed the connection)
16:44:37 <aplainzetakind> So when foo is defined, how it's generated is still relevant or what?
16:44:54 <aplainzetakind> After all no negative values survive that list comprehension.
16:44:56 <aplainzetakind> Hmm.
16:45:01 <aplainzetakind> OK.
16:45:01 <ski> `foo' is overloaded
16:45:21 <ski> it's presumably recomputed, each time you use it
16:45:27 <aplainzetakind> foo isn't evaluated until it's called.
16:46:08 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
16:46:08 <ski> it's most probably not even cached, even after its value has been demanded (at some particular type)
16:47:04 × inkbottle quits (~inkbottle@aaubervilliers-654-1-76-48.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
16:48:51 × conal quits (~conal@107.181.166.103) (Quit: Computer has gone to sleep.)
16:49:30 zebrag joins (~inkbottle@aaubervilliers-654-1-76-48.w86-212.abo.wanadoo.fr)
16:51:39 × notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection)
16:52:30 notzmv joins (~user@unaffiliated/zmv)
16:52:50 × boxscape quits (86ab2c53@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.83) (Ping timeout: 256 seconds)
16:52:56 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 240 seconds)
16:54:31 Lowl3v3l joins (~Lowl3v3l@dslb-002-203-233-025.002.203.pools.vodafone-ip.de)
16:54:36 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
16:54:46 × hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds)
16:55:00 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
16:55:03 plutoniix joins (~q@ppp-223-24-188-231.revip6.asianet.co.th)
16:57:18 heatsink joins (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97)
17:02:31 hexfive joins (~hexfive@50-47-142-195.evrt.wa.frontiernet.net)
17:04:03 × elliott__ quits (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Ping timeout: 265 seconds)
17:04:32 christo joins (~chris@81.96.113.213)
17:09:16 × shadowdaemon quits (~user@unaffiliated/shadowdaemon) (Quit: ERC Version 5.3 (IRC client for Emacs))
17:09:21 son0p joins (~son0p@181.58.39.182)
17:09:54 ransom_ joins (c4264035@gateway/vpn/protonvpn/c4264035)
17:10:03 fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
17:10:36 qoppa joins (1842826a@S0106283b8265e5fa.cg.shawcable.net)
17:12:17 × qoppa quits (1842826a@S0106283b8265e5fa.cg.shawcable.net) (Remote host closed the connection)
17:13:02 ransom__ joins (c4264035@gateway/vpn/protonvpn/c4264035)
17:14:41 × ransom_ quits (c4264035@gateway/vpn/protonvpn/c4264035) (Ping timeout: 265 seconds)
17:19:47 drincruz_ joins (~adriancru@ool-44c748be.dyn.optonline.net)
17:22:56 <phaazon> https://github.com/phaazon/advent-of-code-2020/blob/master/day11/Main.hs
17:23:12 <phaazon> I think I cannot compress more without losing type signatures or yielding ugly where clauses :D
17:23:24 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Quit: WeeChat 2.9)
17:23:35 <glguy> phaazon, You'll also find a lot of Haskell AoC chat on ##adventofcode-spoilers
17:24:08 × _linker_ quits (~linker@2a02:a31a:a041:9a80:1df2:d4df:88af:3980) (Remote host closed the connection)
17:24:22 <phaazon> glguy: neat :)
17:25:13 <glguy> phaazon, we're also hammering on that one https://github.com/glguy/advent2020/blob/master/execs/Day11.hs
17:25:54 enedil joins (~enedil@d101-29.icpnet.pl)
17:26:05 <phaazon> Data.Array
17:26:08 <phaazon> interesting
17:26:39 <phaazon> hm your stable anamorphism is fun
17:26:39 conal joins (~conal@64.71.133.70)
17:26:43 <phaazon> it’s my “coFind” function
17:28:02 enedil parts (~enedil@d101-29.icpnet.pl) ()
17:28:15 <glguy> phaazon, I think ti's a rule that you aren't allowed to shadow 'map' :)
17:28:28 <phaazon> meh
17:28:34 <phaazon> I’ll call it m4p then!
17:28:51 <phaazon> shadowing should be allowed, I like shadowing.
17:29:29 <glguy> Shadowing common names like that means I got very confused when I was reading out of order and found 'print $ solve <$> [rule1, rule2] <*> pure map'
17:29:46 <phaazon> eheh
17:29:52 <phaazon> yeah, you have a point
17:29:55 × MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection)
17:30:21 MOSCOS joins (~MOSCOS@122.54.107.175)
17:30:53 <glguy> print (solve map <$> [rule1, rule2])
17:32:25 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
17:33:13 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
17:33:45 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
17:34:20 <phaazon> I need to flip it if I do this
17:34:23 × ubert quits (~Thunderbi@p200300ecdf1e530fe6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
17:35:44 <phaazon> yeah, rewrote it with just fmap
17:37:36 × scasc quits (~szabi@213142096072.public.telering.at) (Ping timeout: 240 seconds)
17:38:12 <glguy> phaazon, just reorder the parameters to solve so you don't have to flip it
17:38:38 <ski> i guess it was more expedient to the definition of `go' to have the parameters in that order
17:38:49 <phaazon> yep already done :)
17:38:50 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
17:38:59 tb6 joins (239b6158@ec2-35-155-97-88.us-west-2.compute.amazonaws.com)
17:39:24 <glguy> ski, sounds right
17:39:53 <glguy> I like prioritizing the order for users rather than the implementation if I have to pick
17:40:02 <ski> yes
17:40:13 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Client Quit)
17:40:15 × tb6 quits (239b6158@ec2-35-155-97-88.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
17:41:03 <tomsmeding> dminuoso: Maybe I should've done slightly more research myself. Weeder looks exactly like what I was looking for. Thanks!
17:41:11 ski . o O ( `flip solve rule = go where ...' )
17:41:19 qoppa joins (1842826a@S0106283b8265e5fa.cg.shawcable.net)
17:41:20 × jonathanx_ quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Read error: Connection reset by peer)
17:41:23 <dminuoso> tomsmeding: Oh I just know about it because it was mentioned about a week ago. ;)
17:41:50 tab40 joins (239b6158@ec2-35-155-97-88.us-west-2.compute.amazonaws.com)
17:41:51 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
17:42:09 <phaazon> ski: haha
17:42:27 <pja> Weirdly, my solution for today’s AoC ran /faster/ if I generated adjacent co-ords on the fly in a list comprehension (ok, actually a do .. return) than if I explicitly wrote the 8 entry list of pairs in the source file.
17:42:48 <pja> List fusion looking inside the comprehension? Maybe?
17:43:13 <dminuoso> ski: Do you know of languages that let you define equalities like `flip solve rule = go` in the sense that they have no direction?
17:43:27 <pja> Doing it the comprehension way chomped 20% off the runtime of Part1.
17:43:44 × Lowl3v3l quits (~Lowl3v3l@dslb-002-203-233-025.002.203.pools.vodafone-ip.de) (Ping timeout: 260 seconds)
17:43:46 <qoppa> If I want to dive into lenses for the first time, should I take a look at the lens package or the optics package? Or does it even matter?
17:43:50 <dminuoso> That is, languages that have = as meaning an equation, rather than a declaration/binding
17:44:07 <dminuoso> qoppa: They are functionally equivalent, but optics has better diagnostics.
17:44:23 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)
17:44:31 <dminuoso> lens has a few more exotic combinators, and optics is a little safer and more conservative, but it brings AffineTraversal/AffineFold to the game.
17:44:33 × chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
17:44:45 <ski> @type let (flip -> mele) = \x0 -> fix (\loop -> \case [] -> False; x:xs -> x0 == x || loop xs) in mele
17:44:47 <lambdabot> Eq a => [a] -> a -> Bool
17:45:23 <ski> dminuoso : not quite sure what you mean by "they have no direction"
17:46:03 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
17:46:57 <ski> can you clarify "languages that have = as meaning an equation, rather than a declaration/binding" ?
17:47:19 <dminuoso> qoppa: Another consideration is, lens has a rather hefty dependency footprint, whereas optics-core is very light. You might think of microlens now, but that doesn't bring Prisms or Isos.
17:47:55 × tab40 quits (239b6158@ec2-35-155-97-88.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
17:47:58 <dminuoso> The ergonomics and names are mostly the same, so you can switch one for the other later on with relatively little work.
17:47:58 <koz_> AffineTraversals are indeed very cool.
17:48:14 <koz_> (also, what does the word 'affine' even mean?)
17:48:18 <koz_> (I keep seeing it everywhere)
17:48:39 sord937 joins (~sord937@gateway/tor-sasl/sord937)
17:49:32 <dminuoso> ski: Sure, so in Haskell (=) does not properly denote an equation, but rather a binding. The left side gets bound to the right hand side (with variable binders for function arguments), and you get to have multiple definitions, that sort of thing.
17:49:51 <ski> (i think i played around a little with goal_expansion/2 in Prolog, to make a fact `maplist(foo,[a,b,c])).' be a shorthand for facts `foo(a). foo(b). foo(c).'. it would be interesting to have a principled way to be able to do something like that, though ..)
17:50:05 <dminuoso> ski: So what I was wondering about, whether there were languages where you could just write `f = foldr (+) 0` or `foldr (+) 0 = f` either way, and have it declare an equivalence of expressions that can be used
17:50:21 <dminuoso> Am I making any sense?
17:50:29 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
17:51:22 <ski> equality in Prolog is used symmetrically, doesn't matter if you go `[X|Xs] = List' or `List = [X|Xs]', means the same thing
17:52:46 <dminuoso> Ah interesting, I keep getting back to Prolog. Perhaps I should really learn it.
17:52:48 <ski> and in Mercury, it doesn't matter if you type `Z = f(X,Y)' or `f(X,Y) = Z', when calling the function f/2. however, when defining it, i'm pretty sure you have to go either `f(X,Y) = ..X..Y..' or `f(X,Y) = Z :- ..X..Y..Z..' (you can have multiple defining equations, with pattern-matching, of course)
17:52:56 Saukk joins (~Saukk@2001:998:ec:944:a00f:6382:4f0:3e7e)
17:53:15 × qoppa quits (1842826a@S0106283b8265e5fa.cg.shawcable.net) (Remote host closed the connection)
17:54:21 <dolio> koz_: Comes from geometry. It's a relaxation of linear maps.
17:55:29 <ski> koz_ : linear maps include scaling,rotation,reflection,shear -- affine further includes translations among those
17:55:53 <koz_> ski and dolio both: So how does this relate to 'AffineTraversal'?
17:56:49 <dolio> There, linear means stuff like `f(a*x + b*y) = a*f(x) + b*f(y)`, and affine allows you to also have a term that doesn't depend on the function argument. So it kind of preserves sizes.
17:58:23 <pjb> /whoami
17:58:24 <Kronic> Does anyone run into any issues with the haskell package just not detecting certain imports? I´m importing a library and it just cannot seem to find it despite stack build/ghci being able to see it. I restarted the LSP a few times and still nothing
17:58:36 <Kronic> Haskell package in VSCode I should say
17:58:41 × Saukk quits (~Saukk@2001:998:ec:944:a00f:6382:4f0:3e7e) (Remote host closed the connection)
17:59:16 <ski> consider an affine function like `x |-> A*x + b'. `A',`x',`b' may be real numbers (say). or perhaps `x' and `b' are vectors, and `A' a matrix. now consider e.g. `type F x = Either (A,x) B'. a value of type `F x' contains at most one `x', hence `F' is affine. otoh with `type G x = (A,x)', a value of type `G x' contains exactly one `x', so `G' is linear
17:59:43 Lowl3v3l joins (~Lowl3v3l@2001:638:1558:99f8::1)
18:00:30 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds)
18:00:41 × conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
18:01:02 <dolio> There's a relationship between linear maps and logical functions that use their variable exactly once. Adding translation is like adding building blocks that can ignore the argument, so the variables are used at most once.
18:02:29 <ski> the presense of the "constant term", not involving `x', makes it affine. if there was any term (/ alternative) involving more than one value of type `x', then it would not be linear. e.g. i guess you could call `H', where `type H x = Either (x,x) (Either (Bool,x) C)', "quadratic" (cf. `x |-> x^2 + 2*x + C')
18:02:30 ransom_ joins (~c4264035@undergraduate-jvossen-9690.mines.edu)
18:02:43 phaul joins (~phaul@ruby/staff/phaul)
18:03:20 <koz_> OK, I think I get the idea now.
18:03:27 <koz_> Thanks!
18:03:43 <dolio> Then an affine traversal visits at most 1 location.
18:04:05 × ransom__ quits (c4264035@gateway/vpn/protonvpn/c4264035) (Ping timeout: 240 seconds)
18:04:09 <dolio> A lens is a linear traversal.
18:04:49 <ski> it (the affine traversal) either refers to a single location, or it fails to refer (the location doesn't exist, in the given data structure that we're traversing in search for the location in question)
18:04:59 <koz_> dolio: In this case, linear means 'exactly 1 location'?
18:05:05 <dolio> Yes.
18:06:28 <koz_> Oh, neat.
18:06:40 <koz_> But yeah, big fan of the opticsverse, and also TIL!
18:07:28 <ski> dminuoso : anyway, imho, having some familiarity of logic programming is worthwhile, at least as general background knowledge, for a programmer, so that one can recognize when applying it may be worthwhile. "another toolset in your toolbox"
18:07:30 <solonarv> a Lens' s a is a witness that s ≃ a * x, for some x; this is linear!
18:07:58 <ski> hm, so it is a witness of a divisibility relation ?
18:08:17 conal joins (~conal@64.71.133.70)
18:08:28 <solonarv> a Traversal' s a is a witness that s ≃ sum_{i from 0 to infinity} a^i x_i, for some set of x_i
18:08:35 <solonarv> (i.e. a power series / polynomial)
18:08:48 <ski> (could we have called it `Divides a s' ?)
18:09:29 <solonarv> an AffineTraversal' s a, then, says that actually, this power series / polynomial is an affine function: s ≃ x_0 + a * x_1
18:10:22 <solonarv> ski: sure! there might even be a paper on that somewhere
18:11:50 <koz_> solonarv: I think jle` did a writeup saying something similar?
18:12:34 × ystael quits (~ystael@209.6.50.55) (Quit: Lost terminal)
18:12:54 ystael joins (~ystael@209.6.50.55)
18:13:00 <solonarv> quite likely; if so then I probably read it at some point and just regurgitated what I remembered
18:13:05 ski . o O ( ⌜s ≃ ⌊s ∕ a⌋ + (s % a) ⋅ a⌝ )
18:13:10 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
18:13:59 <solonarv> I think you meant to place that "⋅ a" next to the other term?
18:14:01 <ski> (er .. sorry, meant ⌜s ≃ s % a + ⌊s ∕ a⌋ ⋅ a⌝, actually)
18:14:01 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 264 seconds)
18:14:13 <ski> yea
18:15:24 <ski> (this reminds me of numeral systems, and arithmetic operations on finite prefices of naturals, that i've been thinking about recently)
18:15:39 enedil joins (~enedil@d101-29.icpnet.pl)
18:16:04 remby joins (~remby@2607:fea8:2c40:a3::56de)
18:16:19 <enedil> Hey, is it possible to use guards inside anonymous functions? Something like \x -> | x<3 = 2 | otherwise 5
18:16:29 <jle`> enedil: you can use -XMultiWayIf
18:17:09 <jle`> \x -> if | x < 2 -> 2 | otherwise -> 5
18:17:21 <ski> % :t \x -> if | x<3 -> 2 | otherwise -> 5
18:17:21 <solonarv> or a 'case' expression (possibly merged into the lambda using LambdaCase)
18:17:22 <yahb> ski: (Ord a, Num a, Num p) => a -> p
18:17:23 <jle`> but since you only have two branches it might be better to use just a normal if
18:17:35 <solonarv> % :t \case x | x<3 -> 2; _ -> 5
18:17:35 <yahb> solonarv: (Ord a, Num a, Num p) => a -> p
18:17:45 <ski> % :t \x -> case () of () | x<3 -> 2 | otherwise -> 5
18:17:45 <yahb> ski: (Ord a, Num a, Num p) => a -> p
18:17:46 <jle`> ooh fancy
18:18:29 nuncanada joins (~dude@179.235.160.168)
18:18:47 <enedil> oo, cool
18:19:05 <enedil> I fear using language extensions because when I use some, everything starts falling apart
18:19:50 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-sljyysfpgmayjhiw)
18:20:05 <solonarv> LambdaCase and MultiWayIf are both harmless syntax extensions, enabling them will never break existing code and they work straightforwardly
18:20:19 <ski> the last version doesn't use any extensions
18:20:47 <solonarv> it's also definitely not something I"d recommend, tbh
18:21:18 <ski> `MultiWayIf' ?
18:24:24 <solonarv> sure, that one's fine; I meant that I wouldn't recommend your (ski's) last version
18:25:42 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
18:26:57 <ski> ah :)
18:27:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Quit: Reconnecting)
18:27:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:27:28 × ralejs quits (~ralejs@2620:10d:c093:400::5:9f2) (Read error: Connection reset by peer)
18:27:33 <ski> i wasn't necessarily recommending it, either. just pointing out the possibility
18:27:45 <enedil> what's wrong with that case?
18:28:11 <ski> nothing wrong with it, really, i'd say
18:28:16 <enedil> solonarv: ^
18:28:25 <ski> but the other two may be clearer, more to the point
18:28:39 <enedil> ah, ok
18:29:17 <ski> (but if you didn't want to use those extensions, then you could use the latter. i have, occasionally, used it)
18:30:00 bollu2 joins (~bollu@139.59.46.74)
18:30:26 solonarv_ joins (~solonarv@astrasbourg-157-1-27-135.w90-40.abo.wanadoo.fr)
18:30:34 × solonarv quits (~solonarv@astrasbourg-552-1-28-212.w90-13.abo.wanadoo.fr) (Ping timeout: 265 seconds)
18:30:46 × bollu quits (~bollu@139.59.46.74) (Read error: Connection reset by peer)
18:30:46 bollu2 is now known as bollu
18:32:49 ralejs joins (~ralejs@2620:10d:c093:400::5:9f2)
18:33:00 mbomba joins (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca)
18:33:41 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
18:34:33 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Ping timeout: 272 seconds)
18:35:34 <enedil> thanks <3
18:35:48 <carbolymer> I have `foo :: STM ()` and `bar :: STM b`, how can I enforce that foo is executed before bar?
18:36:07 Fractalis joins (~Fractalis@2601:987:280:8d40:406e:6ad8:9d0d:835)
18:36:16 <koz_> carbolymer: 'foo >> bar'?
18:36:47 × Fractalis quits (~Fractalis@2601:987:280:8d40:406e:6ad8:9d0d:835) (Remote host closed the connection)
18:36:56 × columbarius quits (~columbari@mue-88-130-54-162.dsl.tropolys.de) (Ping timeout: 240 seconds)
18:37:26 <carbolymer> koz_, you sure about that? because I'm having weird issues with lazines
18:37:36 <koz_> carbolymer: What manner of issues?
18:37:38 o1lo01ol1o joins (~o1lo01ol1@46.50.88.242)
18:37:44 <carbolymer> i.e. foo doesn't modify mutable collection as it should
18:38:31 <koz_> Could you pastebin a small example of what you've got?
18:38:40 <koz_> It's a bit hard to say what the cause or solution are just on that.
18:39:30 <carbolymer> hmm, I might try
18:39:35 columbarius joins (~columbari@i5E86B3A7.versanet.de)
18:39:44 <carbolymer> because I need to retype code from remote desktop....
18:39:45 matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
18:39:46 <dolio> solonarv_: The problem with that explanation is that Haskell has infinite traversals that can actually work. :)
18:40:13 <solonarv_> dolio: eh?what's that referring to?
18:40:31 <dolio> The power series explanation of a traversal.
18:40:43 <dolio> That only includes finite powers.
18:41:14 <solonarv_> oh, right
18:41:23 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit)
18:41:53 <solonarv_> make the sum up-to-infinity-inclusive, then, I guess :p
18:42:12 × o1lo01ol1o quits (~o1lo01ol1@46.50.88.242) (Ping timeout: 256 seconds)
18:42:20 matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
18:42:50 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit)
18:42:50 × shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:f4bb:54f5:d69c:a304) (Ping timeout: 258 seconds)
18:43:36 jonasm joins (~jonasm@78-56-197-192.static.zebra.lt)
18:43:43 matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
18:43:44 fendor joins (~fendor@178.165.131.83.wireless.dyn.drei.com)
18:44:07 × jonasm quits (~jonasm@78-56-197-192.static.zebra.lt) (Read error: Connection reset by peer)
18:44:27 × fendor_ quits (~fendor@178.165.131.83.wireless.dyn.drei.com) (Read error: Connection reset by peer)
18:45:08 × jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
18:45:37 jonasm joins (~jonasm@78-56-197-192.static.zebra.lt)
18:45:56 jb55 joins (~jb55@gateway/tor-sasl/jb55)
18:46:37 × jonasm quits (~jonasm@78-56-197-192.static.zebra.lt) (Read error: Connection reset by peer)
18:48:00 ski thought it was already intended to be inclusive
18:50:04 ADG1089_ joins (~androirc@122.163.174.248)
18:51:29 errst joins (~errst@unaffiliated/tirej)
18:52:15 × ralejs quits (~ralejs@2620:10d:c093:400::5:9f2) (Read error: Connection reset by peer)
18:53:24 <dolio> The problem is that just saying 'inclusive' doesn't make a whole lot of sense. There are a lot of infinities that aren't reducible to a linear order or something.
18:54:52 nineonine_ joins (~nineonine@50.216.62.2)
18:55:33 <dolio> The weirder your infinites get, though, the fewer functors are going to work, I guess.
18:55:56 <monochrom> Yikes, it really comes down to explicating the ordinal ω then! I was going to say a few words on that but refrained.
18:56:09 hiroaki joins (~hiroaki@2a02:908:4b1b:20a0::6874)
18:56:11 <dolio> No, I mean ω is not sufficient.
18:56:14 × shf quits (~sheaf@2a01:cb19:80cc:7e00:159e:9ac:2ff5:a704) (Read error: Connection reset by peer)
18:56:33 knupfer joins (~Thunderbi@200116b82c2b420054afd2fffe7dc17c.dip.versatel-1u1.de)
18:56:34 × knupfer quits (~Thunderbi@200116b82c2b420054afd2fffe7dc17c.dip.versatel-1u1.de) (Client Quit)
18:56:47 knupfer joins (~Thunderbi@i5E86B444.versanet.de)
18:56:51 × thc202 quits (~thc202@unaffiliated/thc202) (Quit: thc202)
18:56:56 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 256 seconds)
18:56:57 nineonine_ is now known as nineonine
18:57:19 <monochrom> OK, explicating all necessary ordinals.
18:57:25 ralejs joins (~ralejs@2620:10d:c093:400::5:9f2)
18:58:19 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:b4bc:f6c9:c430:776f)
18:58:26 ski idly ponders having the sequence of coefficients being convergent
18:59:17 <dolio> E.G. it's similar to how 'the free monad' isn't possibly-infinite-lists in Haskell, because you can't flatten every tree to a linearized list without destroying some information.
18:59:18 <monochrom> OK, confound it all! Maybe generally well-foundedness (i.e., not inflicting a total order) if you don't want to shoehorn tree structures to total orders.
18:59:27 <dolio> Even an infnite list.
19:00:11 <dolio> Free monoid, even.
19:00:29 ski . o O ( "The intrinsic topology of Martin-Löf universes" by Martín Hötzel Escardó,Thomas Streicher in 2016-02-12 at <http://www.cs.bham.ac.uk/~mhe/papers/universe-indiscrete.pdf> )
19:02:39 <dolio> Because directed limits of the binary operation + unit presentation of monoids are not reducible to the list presentation, or something. Only finite limits.
19:04:01 <solonarv_> I was playing around with loeb and type-tetris'd my way into loebM :: (Traversable t, Monad m) => t (t a -> m a) -> m (t a)
19:04:07 <solonarv_> https://gist.github.com/Solonarv/16e2c3d1301a99b6c26f59d6a261884b
19:04:27 <solonarv_> does this have any merit? I have trouble wrapping my head around exactly what it does
19:06:48 × bliminse quits (~bliminse@host86-134-63-68.range86-134.btcentralplus.com) (Ping timeout: 256 seconds)
19:07:45 × drincruz_ quits (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 240 seconds)
19:08:23 bliminse joins (~bliminse@host86-140-186-196.range86-140.btcentralplus.com)
19:08:32 <dolio> Actually, maybe the problem is not the presentations. But the presentations only say that you can do finite amounts of associativity, and that doesn't let you reassociate all trees into a stream.
19:11:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
19:11:49 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
19:13:52 × ransom_ quits (~c4264035@undergraduate-jvossen-9690.mines.edu) (Quit: Textual IRC Client: www.textualapp.com)
19:14:13 <carbolymer> koz_, well, I can't give you code as I'm unable to reproduce that on my machine :|
19:14:52 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Ping timeout: 260 seconds)
19:17:01 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
19:17:04 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds)
19:17:48 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
19:17:51 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
19:21:19 <ski> > let loeb = fix . sequence; loebM = sequenceA . loeb . fmap (<=< sequenceA) in loebM [\xs -> [0],\xs -> [1]]
19:21:22 <lambdabot> *Exception: <<loop>>
19:24:40 × filwisher quits (~filwisher@78.141.201.45) (Ping timeout: 260 seconds)
19:26:57 o1lo01ol1o joins (~o1lo01ol1@31.22.250.118)
19:27:28 <tomsmeding> carbolymer: I assume you can't take a photograph?
19:28:31 × fresheyeball quits (~isaac@ec2-35-155-97-88.us-west-2.compute.amazonaws.com) (Ping timeout: 246 seconds)
19:28:41 shf joins (~sheaf@2a01:cb19:80cc:7e00:159e:9ac:2ff5:a704)
19:29:05 Tario joins (~Tario@201.192.165.173)
19:30:32 fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net)
19:31:13 <ski> > let loebM = mfix . runReaderT . traverse ReaderT in loebM [\xs -> [0,1],\xs -> [2,3,4]]
19:31:15 <lambdabot> [[0,2],[0,3],[0,4],[1,2],[1,3],[1,4]]
19:31:41 filwisher joins (~filwisher@78.141.201.45)
19:32:50 <dsal> solonarv_: If you make a monadic möb, you can call it a mönad
19:33:31 luke joins (~luke@bitnomial/staff/luke)
19:34:35 × bitmagie quits (~Thunderbi@200116b80638310001d2823cf2ef2077.dip.versatel-1u1.de) (Quit: bitmagie)
19:34:59 kupi joins (uid212005@gateway/web/irccloud.com/x-zcsljpeaozocdwya)
19:35:18 <ski> > let loebM = mfix . runReaderT . traverse ReaderT in loebM [\xs -> [(f . tail) xs | f <- [sum,product]],\xs -> [xs !! 2 + 3],\xs -> [2,4],\xs -> [length xs]]
19:35:21 <lambdabot> [[11,5,2,4],[15,7,4,4],[40,5,2,4],[112,7,4,4]]
19:36:13 × unfo- quits (~unfo-@185.103.96.147) (Ping timeout: 264 seconds)
19:40:56 × o1lo01ol1o quits (~o1lo01ol1@31.22.250.118) (Remote host closed the connection)
19:41:44 sunetoft joins (~sunetoft@s91904426.blix.com)
19:42:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:42:56 × notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection)
19:43:22 christo joins (~chris@81.96.113.213)
19:43:29 × urodna quits (~urodna@unaffiliated/urodna) (Ping timeout: 256 seconds)
19:44:23 ambidextrose joins (~fut-learn@107.72.99.138)
19:44:25 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
19:45:53 ski glances at solonarv_
19:46:20 notzmv joins (~user@unaffiliated/zmv)
19:47:25 urodna joins (~urodna@unaffiliated/urodna)
19:47:54 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
19:50:02 jneira joins (501e6453@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.83)
19:50:07 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
19:52:10 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
19:52:16 nineonin_ joins (~nineonine@50.216.62.2)
19:52:16 × nineonine quits (~nineonine@50.216.62.2) (Quit: nineonine)
19:53:13 blissful- joins (~blissful@unaffiliated/azuline)
19:53:24 Ariakenom_ joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se)
19:53:47 × blissful quits (~azuline@unaffiliated/azuline) (Quit: The Lounge - https://thelounge.chat)
19:53:47 blissful- is now known as blissful
19:54:26 × nineonin_ quits (~nineonine@50.216.62.2) (Remote host closed the connection)
19:54:48 nineonine joins (~nineonine@50.216.62.2)
19:55:13 remby parts (~remby@2607:fea8:2c40:a3::56de) ("Good Bye")
19:57:00 × Ariakenom quits (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Ping timeout: 256 seconds)
19:57:44 ubert joins (~Thunderbi@p200300ecdf1e530fe6b318fffe838f33.dip0.t-ipconnect.de)
19:59:41 <Unhammer> With QuickCheck, how do I label a test so that it shows *when it fails* ? If I do
19:59:44 <Unhammer> let (lots of vars) in QC.label "prop1" x>y .&&. QC.label "prop2" z>y+x
19:59:46 <Unhammer> then it only shows the label when both labels pass, which is the opposite of helpful :)
19:59:58 × ggole quits (~ggole@2001:8003:8119:7200:cdad:14fe:9dc3:f21) (Quit: Leaving)
20:01:44 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
20:02:28 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
20:02:40 argento joins (~argent0@168.227.97.34)
20:03:19 jpcooper joins (~user@unaffiliated/jpcooper)
20:03:57 Tario joins (~Tario@201.192.165.173)
20:04:02 <jpcooper> Hello. What's the name of the extension the associates data types to specific constructors by adding an apostrophe to the name of the constructor?
20:06:46 <monochrom> I'll just answer "DataKinds" and secretly expect that you're barking up the wrong tree.
20:08:19 × wonko7 quits (~wonko7@2a01:e35:2ffb:7040:14a1:46f4:68f7:2133) (Ping timeout: 258 seconds)
20:12:11 christo joins (~chris@81.96.113.213)
20:14:05 × mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 240 seconds)
20:15:48 shadowdaemon joins (~user@unaffiliated/shadowdaemon)
20:15:51 <jpcooper> monochrom: It's not DataKinds. I seem to remember there being a way to get a type which is all values constructed with a chosen constructor
20:15:59 × ralejs quits (~ralejs@2620:10d:c093:400::5:9f2) (Read error: Connection reset by peer)
20:16:40 mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl)
20:16:40 × mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host)
20:16:41 mouseghost joins (~draco@wikipedia/desperek)
20:16:54 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds)
20:17:22 <monochrom> There are only two extensions that adds apostrophes to data constructors. DataKinds and TemplateHaskell. Neither fits your wording.
20:17:33 <jpcooper> Or does DataKinds support that as well
20:18:37 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
20:19:00 <jpcooper> It seems I am barking up the wrong tree. Is there any way to do this?
20:19:11 actuallybatman parts (~sam@S010664777dafd303.cg.shawcable.net) ()
20:19:16 mrchampion joins (~mrchampio@38.18.109.23)
20:19:16 <jpcooper> (without splitting the data type up)
20:19:18 <monochrom> No.
20:19:29 <jpcooper> That's a shame
20:20:23 ralejs joins (~ralejs@2620:10d:c093:400::5:9f2)
20:20:24 <Unhammer> and wtf is a Rose in QuickCheck https://hackage.haskell.org/package/QuickCheck-2.8.2/docs/Test-QuickCheck-Property.html#g:4 this tells me nothing except that a rose is a rose is a rose
20:21:22 Sheilong joins (uid293653@gateway/web/irccloud.com/x-zbtjtxhgvedwatkk)
20:21:22 × ralejs quits (~ralejs@2620:10d:c093:400::5:9f2) (Read error: Connection reset by peer)
20:21:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
20:21:28 <jpcooper> Unhammer: roses are trees
20:21:49 <jpcooper> With varying numbers of branches at each node
20:22:24 <monochrom> No, the doc tells you there are two cases.
20:22:35 <Unhammer> I got that part, but I still don't know what it's doing in QC.Property
20:22:44 <monochrom> And the first case has two fields. Those fields have types written there.
20:22:49 <monochrom> And the second case etc etc
20:23:05 <monochrom> And overall this is a recursive type, too.
20:23:18 <Kronic> Question: what is the appropriate way to take all of the getters for a Record and apply them to a value typed as such?
20:23:31 <Kronic> getters generated through makelenses, I should say
20:23:35 <monochrom> So don't worry about it?
20:23:45 wonko7 joins (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net)
20:25:24 <jpcooper> Unhammer: aren't properties rose trees?
20:25:48 <jpcooper> or the group things
20:26:21 sgibber2018 joins (~arch-gibb@208.85.237.137)
20:26:43 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
20:27:22 <solonarv_> ski: sorry, was off eating dinner; looks like that is indeed a sensible thing!
20:27:31 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
20:27:40 × knupfer quits (~Thunderbi@i5E86B444.versanet.de) (Ping timeout: 256 seconds)
20:28:39 conal joins (~conal@64.71.133.70)
20:28:39 × conal quits (~conal@64.71.133.70) (Client Quit)
20:29:13 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
20:29:22 jpcooper parts (~user@unaffiliated/jpcooper) ("ERC (IRC client for Emacs 26.1)")
20:29:54 conal joins (~conal@64.71.133.70)
20:30:10 <mouseghost> hemlo, here to bother again; is arrow notation that popular?
20:30:14 × conal quits (~conal@64.71.133.70) (Client Quit)
20:30:23 <monochrom> Not popular.
20:30:24 <dolio> No.
20:30:40 conal joins (~conal@64.71.133.70)
20:30:49 <Rembane> It's generally seen as a dead end.
20:30:49 <monochrom> It had two major use cases, both waned. hxt and lava.
20:31:01 × conal quits (~conal@64.71.133.70) (Client Quit)
20:31:03 knupfer joins (~Thunderbi@i5E86B444.versanet.de)
20:31:20 <mouseghost> 👀
20:33:45 <monochrom> I think a version of functional reactive programming uses it too? But Cale will explain to you why the arr method is an obstacle, not a help.
20:34:15 <solonarv_> yes, there are one or two arrow-based FRP libraries
20:34:26 <koz_> solonarv_: More than one or two, I think.
20:34:39 <solonarv_> so I'm still right, technically? :p
20:34:55 × son0p quits (~son0p@181.58.39.182) (Quit: leaving)
20:35:06 ralejs joins (~ralejs@2620:10d:c093:400::5:9f2)
20:35:09 <ski> solonarv_ : note that my version behaves differently
20:35:12 <monochrom> I played safe by wording "version" so it's always right FSVO "version" :)
20:35:16 <solonarv_> I've never managed to wrap my head around them, but I understand reflex (which is monadic, not arrow-based) well enough that I can write working programs with it
20:35:34 fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
20:36:11 remby joins (~remby@2607:fea8:2c40:a3::56de)
20:36:36 <monochrom> IMO modeling digital circuits is a great application of arrows, so Lava would be the champion use case. But Lava left Haskell entirely.
20:37:18 <monochrom> As for hxt, that's just being cute (more seriously, an MSc project) by being a Kleisli arrow, i.e., you may as well go monadic.
20:37:44 <geekosaur> ad iirc later versions did so
20:37:49 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in)
20:37:52 <monochrom> But you can see how if it's good for digital circuits, then it's good for reactive things, same idea.
20:38:07 <fuzzypixelz> hello. I am very new to Haskell and funcctional programming in general. How would you write a number generator in Haskell? One that each time you call it returns the next integer in line? Or does one simple use an expression like [1, 2 ..]?
20:38:21 <koz_> fuzzypixelz: What do you plan to do with it?
20:39:01 <fuzzypixelz> no I'm just wondering how an experienced person would do it
20:39:04 <monochrom> Simply [1..]
20:39:13 × Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection)
20:39:14 <solonarv_> fuzzypixelz: a basic fact of Haskell is that a function must return the same thing each time you call it; so instead you will need some sort of data structure that lets you keep track of what number should come next; an infinite list like [1..] is a simple way to do that
20:39:22 <fuzzypixelz> koz_: because I have no idea how to do it just using pure functions
20:39:28 Kaiepi joins (~Kaiepi@47.54.252.148)
20:39:47 <monochrom> Python generators dream to be lazy lists. Haskell has real lazy lists.
20:39:48 <koz_> I would say that [1..] unless you have something specific in mind?
20:39:59 × sgibber2018 quits (~arch-gibb@208.85.237.137) (Quit: WeeChat 2.9)
20:40:32 <monochrom> The generator is going to be [1..] regardless. The real question is how to write the consumer.
20:40:44 <monochrom> Beware that programmers never mean what they say.
20:41:06 <fuzzypixelz> not really, I thought asking this question would reveal some black magic about functional programming but it turns out haskell people already a convinient solution implemented
20:41:35 <exarkun> Do Conduits have to be lists? What if have two separate functions that can produce elements? Can I merge them into one producer that produces elements from each as soon as they are available?
20:41:41 <monochrom> But laziness is black magic.
20:42:03 <exarkun> Do I leave the Conduit abstraction when things get that complex?
20:42:08 remby parts (~remby@2607:fea8:2c40:a3::56de) ("Good Bye")
20:42:11 <monochrom> Convenient at the same time just because the language gives it to you.
20:42:47 <monochrom> I have seen how Scheme students emulate it with much confusion and pain, and it is still missing one feature that Haskell has.
20:42:51 <fuzzypixelz> maybe what I really ought to ask is how you implement it in the functional paragigm
20:43:10 <monochrom> from i = i : from (i+1) ?
20:43:17 <Cale> monochrom: I'd say it's not so much arr's fault (although it does belong in its own class), but that because arr was included, Arrow left out a bunch of structural details that are usually part of the definition of a monoidal category, and once those details were included, the abstraction served its purpose a lot better.
20:43:22 <monochrom> then from 0 = 0 : 1 : 2 : ...
20:43:51 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
20:44:00 <fuzzypixelz> from is a kayword?
20:44:07 <monochrom> No, it's my function name.
20:44:19 mastarija joins (~mastarija@93-136-86-23.adsl.net.t-com.hr)
20:44:25 <tomsmeding> > let cheese i = i : cheese (i + 1) in take 10 (cheese 0)
20:44:28 <lambdabot> [0,1,2,3,4,5,6,7,8,9]
20:44:29 <Cale> i.e. the maps which explicitly re-associate tuples, which introduce or eliminate units on one or the other side of a pair, and which swap the pair components (for a symmetric monoidal category)
20:45:36 × argento quits (~argent0@168.227.97.34) (Ping timeout: 240 seconds)
20:45:54 × Gurkenglas_ quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 265 seconds)
20:45:59 Varis joins (~Tadas@unaffiliated/varis)
20:46:01 <monochrom> Ah, one can use arr for that, but should be specific methods to explicate the structure.
20:46:13 <Uniaika> arr!
20:46:57 <ski> @arr
20:46:57 <lambdabot> I'll keel haul ya fer that!
20:47:05 <koz_> Arr!
20:47:08 <mouseghost> yarrr
20:47:11 <tomsmeding> are there more people using ghcide or HLS using neovim+ALE and running into this issue where all diagnostics randomly disappear when doing stuff?
20:47:20 <tomsmeding> if so, please upvote: https://github.com/haskell/ghcide/issues/949
20:47:30 <monochrom> Yes, I really had the temptation to write "Arr, one can use arr for that, ..."
20:48:26 <Kronic> God my solution to the day 4 AOC is really disgusting
20:49:27 <Cale> monochrom: Yeah, if you have those explicit methods, it becomes possible to figure out before running an arrow where most values are being wired to
20:49:42 <fuzzypixelz> monochrom: what is the ":" syntax?
20:49:50 <monochrom> List syntax.
20:49:51 × codeAlways quits (uid272474@gateway/web/irccloud.com/x-kqsckzxfcmyupltw) (Quit: Connection closed for inactivity)
20:49:53 <Cale> Any "arr" is still a black box, but you're not forced to put black boxes in between every pair of computations any longer
20:50:15 <monochrom> I trust that you survived the first few Haskell lessons and know that already.
20:51:20 × unlink2 quits (~unlink2@p200300ebcf259600971664e9499d7db7.dip0.t-ipconnect.de) (Remote host closed the connection)
20:51:38 × ralejs quits (~ralejs@2620:10d:c093:400::5:9f2) (Read error: Connection reset by peer)
20:52:13 <Kronic> Would anyone be interested in suggesting ways I can improve this code? It is for day 4 of the AOC, part 1 only; https://dpaste.org/9ts8
20:52:39 <ski> fuzzypixelz : `2 : [3,5,7]' adds `2' in front of the list `[3,5,7]', giving back the list `[2,3,5,7]'. so it combines a single element, and a list of additional elements, into a new list
20:52:59 unlink2 joins (~unlink2@p200300ebcf259600971664e9499d7db7.dip0.t-ipconnect.de)
20:53:11 <fuzzypixelz> Oh so it's like Scheme's "cons"
20:53:41 <ski> (so `2 : 3 : 5 : 7 : []', which means `2 : (3 : (5 : (7 : [])))', is the same as `[2,3,5,7]')
20:53:44 <ski> yes
20:53:54 gxt__ joins (~gxt@gateway/tor-sasl/gxt)
20:54:48 <ski> (in fact, the latter is syntactic sugar for the former. just like in the Lisps, `(2 3 5 7)' is syntactic sugar for `(2 . (3 . (5 . (7 . ()))))')
20:55:20 × mastarija quits (~mastarija@93-136-86-23.adsl.net.t-com.hr) (Read error: Connection reset by peer)
20:55:22 × LKoen quits (~LKoen@214.175.9.109.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
20:56:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
20:56:05 <monochrom> Kronic: I wonder if, for example, you can define "foo s = parseDataPoint chunks s", then you just have to say foo "byr", foo "iyr", etc.
20:56:10 <exarkun> Maybe `mergeSource` is what I was looking for
20:56:33 <exarkun> But I dunno ... the docs don't actually say what "merge" means ... anyone know?
20:57:12 ralejs joins (~ralejs@2620:10d:c093:400::5:9f2)
20:57:29 <Kronic> oh I see what you mean I think
20:58:33 argento joins (~argent0@168.227.97.34)
20:59:19 <Kronic> Yea that does make it less repetitive, thank you
21:00:32 <dolio> Cale: So, the issue is that you can't actually see the context structure of the monoidal category. There are just arbitrary functions inserted at various places?
21:00:45 hlysig joins (~hlysig@mobile-194-144-46-247.3G.internet.is)
21:01:08 × ambidextrose quits (~fut-learn@107.72.99.138) (Quit: leaving)
21:02:19 <Kronic> By the way, on a completely different note, how many people are using rio, the base replacement? Is that moving towards a standard or is that just an alternative option?
21:02:35 <koz_> Kronic: It's _definitely_ in the 'just an alternative' camp.
21:02:38 <Cale> dolio: Well, you can see some of it, but e.g. when desugaring proc/do notation, there will be an arr between literally every pair of lines, so that will obscure everything
21:02:40 × mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 260 seconds)
21:02:47 <ski> @type isJust
21:02:49 <lambdabot> Maybe a -> Bool
21:03:39 <Kronic> koz_, thank you, I figured as much
21:03:56 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 240 seconds)
21:04:09 <ski> @type all isJust :: [Maybe a] -> Bool
21:04:11 <lambdabot> [Maybe a] -> Bool
21:04:34 <Kronic> woah, didn know about that function
21:05:33 <ski> instead of having a guard `length res == 1', and then using `head res', match the `res' input with `[r]' (rename `r' to whatever you prefer), then use `r'
21:06:20 <ski> oh, right, it's not an input, but locally defined. you can use `case'-`of' to match on it
21:06:26 mrchampion joins (~mrchampio@38.18.109.23)
21:06:44 <Kronic> the isJust/isNothing thing was very helpful, i should have known something like that already existed
21:07:02 <ski> > words =<< lines "foo bar\nbaz quux"
21:07:05 <lambdabot> ["foo","bar","baz","quux"]
21:07:15 <Cale> You might also be interested in sequence here
21:07:23 <Cale> > sequence [Just 1, Just 2, Just 3]
21:07:26 <lambdabot> Just [1,2,3]
21:07:32 <Cale> > sequence [Just 1, Just 2, Nothing]
21:07:34 <lambdabot> Nothing
21:07:55 <Kronic> that is useful
21:09:45 <ski> [byr,iyr,eyr,hgt,hcl,ecl,pid,cid] = [parseDataPoint chunks x | x <- ["byr","iyr","eyr","hgt","hcl","ecl","pid","cid"]]
21:10:30 <ski> i would probably not bother with defining `parsePassports' (as opposed to `parsePassport')
21:11:52 <Kronic> nice I was able to wittle down isValidPassport p to = isJust $ sequence res
21:12:23 <Kronic> Let me see what I can do with the case comment from before
21:12:48 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
21:13:14 × luke quits (~luke@bitnomial/staff/luke) (Quit: sleep)
21:13:19 <ski> perhaps you could define `validatePassport :: Passport -> Maybe ValidPassport', where `ValidPassport' doesn't involve `Maybe's (apart from country ?) ?
21:14:08 × mrchampion quits (~mrchampio@38.18.109.23) (Ping timeout: 256 seconds)
21:14:16 ski would just write `isJust (sequence_ res)' there (alternatively `all isJust res')
21:15:04 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
21:15:38 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
21:16:12 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
21:16:56 × argento quits (~argent0@168.227.97.34) (Ping timeout: 258 seconds)
21:17:54 mrchampion joins (~mrchampio@38.18.109.23)
21:17:56 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 240 seconds)
21:18:14 × knupfer quits (~Thunderbi@i5E86B444.versanet.de) (Quit: knupfer)
21:18:18 knupfer1 joins (~Thunderbi@200116b82c2b4200a4bfc96be48f5e57.dip.versatel-1u1.de)
21:18:28 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
21:20:14 × carlomagno quits (~cararell@148.87.23.4) (Remote host closed the connection)
21:20:40 knupfer1 is now known as knupfer
21:21:05 <Kronic> Thanks for all of the suggestions, that helped a lot
21:22:34 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
21:23:05 conal joins (~conal@64.71.133.70)
21:23:45 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:26:47 mounty joins (~mounty@210.1.196.133)
21:28:40 carlomagno joins (~cararell@148.87.23.4)
21:28:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
21:29:19 son0p joins (~son0p@181.136.122.143)
21:33:05 × carlomagno quits (~cararell@148.87.23.4) (Ping timeout: 240 seconds)
21:36:04 carlomagno joins (~cararell@148.87.23.4)
21:38:31 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
21:39:31 <dminuoso> ski: Do you think the value extends curiosity and broadening your horizon? Are there real-world problems worthwhile solving in Prolog?
21:41:27 o1lo01ol1o joins (~o1lo01ol1@31.22.250.118)
21:41:55 <monochrom> I recently wrote pseudocode for type inference for my students. It felt like Prolog.
21:42:39 xiinotulp joins (~q@ppp-27-55-90-169.revip3.asianet.co.th)
21:44:42 <monochrom> "\x -> body" has type U->V under type environment E :- "body" has type V under type environment E∪{x::U}. U and V are unknowns to be solved.
21:44:44 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
21:45:08 × carlomagno quits (~cararell@148.87.23.4) (Ping timeout: 260 seconds)
21:45:43 <monochrom> "f e" has type V :- "e" has type U, "f" has type U->V
21:46:04 <monochrom> (all under the same type environment, omitted)
21:46:25 × o1lo01ol1o quits (~o1lo01ol1@31.22.250.118) (Ping timeout: 264 seconds)
21:46:25 × plutoniix quits (~q@ppp-223-24-188-231.revip6.asianet.co.th) (Ping timeout: 264 seconds)
21:46:51 <monochrom> I don't need backtracking, but it's certainly unification all the way down.
21:47:02 carlomagno joins (~cararell@148.87.23.8)
21:47:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:47:36 <monochrom> http://www.vex.net/~trebla/haskell/type-inference.html
21:53:09 <monochrom> Actually there are also presentations of type inference that benefits from backtracking. :)
21:53:18 <lortabac> dminuoso: learning Prolog is a bit like learning Haskell for an imperative programmer, it's a different paradigm
21:54:08 <dolio> If your type inference uses backtracking you should probably get different type inference, though. :þ
21:55:15 <lortabac> monochrom: do you have examples of type inference with backtracking?
21:56:59 <dolio> Some systems can be inferred, but only by trying a bunch of different possibilities, because there is no "principal" choice for certain terms.
21:58:07 <dolio> Although stuff like that easily degenerates into just not being decidable at all.
21:59:29 <monochrom> The "practical type Inference for arbitrary rank" paper presents, for each of rank-1 and rank-n (I guess more so for rank-n), both a non-deterministic rule and a deterministic rule.
21:59:57 drincruz_ joins (~adriancru@ool-44c748be.dyn.optonline.net)
22:00:23 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
22:01:19 <lortabac> I need to read that paper again, I don't remember that part
22:02:14 <monochrom> Their wording is "non-syntax-directed" and "syntax-directed".
22:04:04 <AWizzArd> Anyone here using the IHP web framework?
22:04:29 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 260 seconds)
22:04:41 cybai_ joins (~cybai@2400:4050:3122:900:8422:f0e8:f906:32e1)
22:05:02 Tario joins (~Tario@201.192.165.173)
22:06:45 <lortabac> monochrom: ok thanks, I understand what you mean now
22:06:53 elliott__ joins (~elliott@pool-108-45-178-3.washdc.fios.verizon.net)
22:07:21 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:08:26 × cybai quits (~cybai@2400:4050:3122:900:45a6:8125:8bb4:dbed) (Ping timeout: 264 seconds)
22:09:53 Deide joins (~Deide@217.155.19.23)
22:10:05 × Kronic quits (~Kronic___@84.203.98.133) (Ping timeout: 240 seconds)
22:10:30 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
22:11:14 quantumvatican joins (~private@lfbn-idf2-1-504-211.w86-246.abo.wanadoo.fr)
22:13:29 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
22:13:45 × son0p quits (~son0p@181.136.122.143) (Ping timeout: 240 seconds)
22:14:40 × ADG1089_ quits (~androirc@122.163.174.248) (Read error: Connection reset by peer)
22:16:03 scasc joins (~szabi@213142096072.public.telering.at)
22:16:03 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
22:16:28 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
22:16:32 drincruz_ is now known as drincruz
22:17:07 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 258 seconds)
22:17:17 zenbamboo joins (~zen@cpe2-14-242.cable.triera.net)
22:17:37 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 264 seconds)
22:17:53 brodie_ joins (~brodie@207.53.253.137)
22:18:24 brodie_ is now known as brodie
22:20:43 denisse_ joins (~spaceCat@gateway/tor-sasl/alephzer0)
22:20:58 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov)
22:21:10 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
22:22:04 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Ping timeout: 256 seconds)
22:22:22 fresheyeball joins (~isaac@ec2-35-155-97-88.us-west-2.compute.amazonaws.com)
22:23:52 × conal quits (~conal@64.71.133.70) (Ping timeout: 246 seconds)
22:25:02 conal joins (~conal@66.115.157.156)
22:27:18 aev joins (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net)
22:27:51 × knupfer quits (~Thunderbi@200116b82c2b4200a4bfc96be48f5e57.dip.versatel-1u1.de) (Ping timeout: 258 seconds)
22:29:11 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
22:30:31 × ubert quits (~Thunderbi@p200300ecdf1e530fe6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
22:33:27 × MidAutumnHotaru quits (~MidAutumn@154.91.197.93) (Quit: Ping timeout (120 seconds))
22:34:22 × neiluj quits (~jco@unaffiliated/neiluj) (Ping timeout: 258 seconds)
22:34:47 × zenbamboo quits (~zen@cpe2-14-242.cable.triera.net) (Remote host closed the connection)
22:35:36 × StoneToad quits (~StoneToad@199-167-119-150.ppp.storm.ca) (Ping timeout: 240 seconds)
22:36:40 StoneToad joins (~StoneToad@199-167-119-150.ppp.storm.ca)
22:42:26 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
22:43:08 Kronic joins (~Kronic___@84.203.98.133)
22:43:22 <quantumvatican> Hello, big frustration, tiny annoying and non original question. I know this must have been asked a thousand times, especially now (advent of code and all that) but I really and honestly can't find any satisfying answer. The question is : "how the hell I am expected to model and manipulate 2d arrays of values?" (aoc day #11). I know about 846 ways to do it. The array package deprived of safe
22:43:28 <quantumvatican> access functions that nobody seems to use. Two nested Vector from the vector package. A Map (Int, Int) value. Or... maybe an IntMap (IntMap value). And I have even seen people using [[value]]. This is level 9000 of frustration: there are so many documented libs and types out there but I find myself stuck trying to find which one to use. For now I have settled on (Vector (Vector value)), at least
22:43:34 <quantumvatican> there are safe functions and it is easy to construct with fromList when parsing the input file of advent of code day 11. Are there any pseudo-official "current state of the art" recommandations on which libs or types to choose in general ?
22:44:07 <glguy> quantumvatican: I liked array best for that problem
22:45:51 <mouseghost> Matrix?
22:47:18 <glguy> quantumvatican: My array version: https://github.com/glguy/advent2020/blob/master/execs/Day11.hs
22:47:46 <glguy> quantumvatican: I think Map/IntMap works well for cases of sparse keys or small incremental changes
22:49:53 <aev> I'd make a list of pairs. Wouldn't use a map unless one of the dimensions is a key.
22:50:01 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Remote host closed the connection)
22:50:37 × seanparsons quits (~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net) (Ping timeout: 264 seconds)
22:50:39 <quantumvatican> Thank you for your help. How do you choose one lib/type over another? I mean in general. There are always so many options. For example here, how would I choose between array, matrix, and vector?
22:51:52 <glguy> array is my choice when I need configurable indexes. In this case I wanted coordinate indexes
22:51:55 × gxt__ quits (~gxt@gateway/tor-sasl/gxt) (Quit: WeeChat 2.9)
22:52:10 <glguy> Map/IntMap when I need sparse mapping
22:52:23 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
22:52:23 <glguy> vector works better as a fast list
22:52:28 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
22:52:33 <glguy> with some of its fusion optimizations
22:53:21 <quantumvatican> Ok I see
22:53:25 <quantumvatican> thank you
22:53:45 <quantumvatican> Do you know if there are safe functions in array?
22:55:56 seanparsons joins (~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net)
22:55:56 <glguy> They're all "safe", but they raise exceptions if you wander out of bounds. The "unsafe" operations are the ones that read outside of valid memory when things go wrong
22:56:16 <glguy> but I don't think the package has an indexing operation that returns a Maybe built in. I just defined one when I needed it
22:57:44 <quantumvatican> Oh ok. I thought there were only exception in IO. In that case I was thinking it would come in handy to check neighboring cells without bothering about the edges.
22:58:06 <glguy> I wrote this for myself: https://github.com/glguy/advent2020/blob/master/common/Advent.hs#L176-L180
22:58:29 <Kronic> you can have exceptions in anything, e.g. head []
22:58:47 <glguy> pure code can throw exceptions, but those exceptions are trickier to catch reliably because when they are thrown is driven by evaluation
22:58:59 argento joins (~argent0@168.227.97.34)
22:59:59 MidAutumnHotaru joins (~MidAutumn@154.91.197.93)
23:00:43 <iqubic> I just dove into lens, and wrote this for myself: "arrIx a i = a ^? ix i"
23:01:03 <iqubic> It does the same thing as glguy's arrIx.
23:01:13 <aev> Michael Snoyman wrote about how head, tail, and !! are a problem due to laziness and in production code should be replaced by something that returns a Maybe. What do you think about that? Valid? And do such solutions exist already?
23:02:07 <iqubic> aev: If you want safe functions, I recommend using this: https://hackage.haskell.org/package/safe-0.3.19/docs/Safe.html
23:02:30 <iqubic> findJust :: (a -> Bool) -> [a] -> a
23:02:37 <iqubic> findJust op = fromJust . find op
23:02:40 <iqubic> That's not safe.
23:02:49 <glguy> aev: sweeping generalizations aren't too useful
23:03:10 <aev> iqubic: thank you!
23:03:14 <glguy> aev: if you're doing a lot of indexing into your lists you probably just have the wrong type
23:03:36 <monochrom> I don't have a reason to use head, tail, !! unless I know I'm using them correctly.
23:03:41 <glguy> replacing things with Maybe when there's no reasonable case for a Nothing to be returned creates cases that have to be ignored anyway
23:04:14 × juri_ quits (~juri@178.63.35.222) (Ping timeout: 256 seconds)
23:04:45 <monochrom> No, scratch that. Unless both I'm using them correctly and I really need them. The latter is rare.
23:04:48 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds)
23:05:08 <aev> OK. So for instance you expect someone to input some characters in a console. And you don't expect them to not enter anything. Then using head or !!0 will break.
23:05:32 <merijn> I think any use of !! is almost certainly wrong anyway
23:05:38 <aev> Of course that happens only once and after that you learned and never do that again.
23:05:44 <merijn> head and tail have their uses, but are incredibly limited
23:06:21 <phaazon> !? all the way!
23:06:33 <monochrom> No, a better example is "map head (group xxx)" so I know my head is fed non-empty lists, always.
23:06:50 <monochrom> User input? Use a proper parser already.
23:06:51 <aev> phaazon: !? ? Interesting. I'll look that up.
23:06:51 <iqubic> I've legit seen someone pattern match on [] and on xs, and proceed to use head xs and tail xs there, instead of just pattern matching on the ":" constructor.
23:06:57 <merijn> Also, I can already preemptively answer "does everyone agree with Snoyman?" with "no"
23:07:03 <phaazon> aev: it’s defined on Vector
23:07:08 <merijn> iqubic: Sure, so have I
23:07:19 <phaazon> (!?) :: Vector a -> Int -> Maybe a
23:07:28 <monochrom> head, tail, !! are very low priority issues.
23:07:33 <aev> merijn: I didn't think so! :)
23:07:34 <iqubic> And in that case, once you fail to match on the empty list, you know head and tail will be safe.
23:07:43 <Kronic> what would you say is a high priority issue
23:07:50 × scasc quits (~szabi@213142096072.public.telering.at) (Quit: Leaving)
23:08:00 <monochrom> In addition, every effort in "fixing" the issue is missing the point.
23:08:26 × kenran quits (~kenran@i59F67BD5.versanet.de) (Quit: leaving)
23:08:49 <monochrom> Apart from unwashed beginners, realistic use cases of head don't benefit from Maybe.
23:09:06 <merijn> monochrom: pfft, nuance is for losers
23:09:12 <merijn> Black and white opinions only!
23:09:35 <monochrom> Instead of policing them (and not policing really important things), they should be either left alone or recommended to change over to Data.Nonempty.
23:10:00 <Kronic> I think it would be nice if there was some kind of indicator that a function is partial like head
23:10:19 <phaazon> well, a safe “head” and a safe “tail” is super easy to get at once by simply pattern matching
23:10:25 <phaazon> I think I almost never call those functions
23:10:31 o1lo01ol1o joins (~o1lo01ol1@31.22.250.118)
23:10:46 <monochrom> Snoyman is talented but that head-tail-!! blog is one unit of blog time wasted on an inconsequential trivia pursuit.
23:10:56 son0p joins (~son0p@181.136.122.143)
23:11:10 <merijn> Kronic: See...suggesting a new type of haddock notion that indicates partiality *that* is a much less controversial *and* more productive suggestion
23:11:11 <exarkun> How bad is this idea? https://gist.github.com/exarkun/e1b0c67e409c3223206d60256fe31b5e
23:11:16 <exarkun> (Conduit)
23:11:23 <jle`> merijn: there's Data.List.NonEmpty.group :)
23:11:23 <monochrom> Right, what phaazon said. You should be using pattern matching already 99.99% of the time.
23:11:34 <jle`> erm ^ monochrom
23:11:43 <phaazon> exarkun: oh I saw that in Idris
23:11:44 xsperry joins (~as@unaffiliated/xsperry)
23:11:46 <phaazon> your unwrap
23:11:51 <monochrom> I did say Data.Nonempty. Just call it a typo.
23:11:51 <phaazon> I think it’s called useless in Idris
23:11:55 <phaazon> or boring
23:11:58 <phaazon> I don’t recall exactly
23:12:03 <phaazon> it should be in base in Haskell :)
23:12:04 <merijn> exarkun: It's ok, but you might wanna consider using STM instead
23:12:33 <jle`> monochrom: oh, i missed that message, my bad
23:13:19 chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com)
23:13:20 <Kronic> It is probably an operator that is in use elsewhere, but I thought when I first learned about partial stuff it would be cool if the type was head :: [a] ?> a -- Was that what you meant by haddock notion merijn ?
23:14:35 <jle`> % type a -!> b = a -> Maybe b
23:14:36 <yahb> jle`:
23:14:41 <jle`> whoops typo
23:14:46 <jle`> % type a -?> b = a -> Maybe b
23:14:47 <yahb> jle`:
23:14:59 <merijn> Kronic: Haddock is the doc generator that's being used on Hackage, so I meant some kinda of indicator for partial functions in Haddock might be useful. otoh, you end up wondering "should functions that potentially don't terminate be marked as partial?" and then you've got a whole new rabbit hole!
23:15:19 <jle`> % safeHead :: [a] -?> a; safeHead [] = Nothing; safeHead (x:_) = Just x
23:15:20 <yahb> jle`:
23:15:22 <jle`> % :t safeHead
23:15:22 <yahb> jle`: [a] -?> a
23:15:50 <Kronic> That is really what I mean, I am not sure what kind of implications it would have, it would just be nice to see in an unintrusive way that something is partial by the type
23:16:12 <glguy> If anyone's doing adventofcode.com this year and isn't on the Haskell leaderboard, grab the code from /topic !
23:16:13 <jle`> there is a way to do it manually, by using an empty constraint
23:16:16 <Kronic> I got what you mean about haddock now though, I had forgotten about it, only recently returned to haskell :)
23:16:31 <jle`> some people use it to deal with IO exceptions
23:16:37 <merijn> Kronic: You might be interested in Liquid Haskell too :)
23:16:45 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
23:16:46 <jle`> oh i think actually purescript has this Partial typeclass constraint
23:16:52 <monochrom> @quote monochrom safefromjust
23:16:53 <lambdabot> monochrom says: I use safeFromJust :: Maybe a -> Maybe a
23:16:58 <jle`> and it automatically adds it to incomplete pattern matches
23:17:14 <jle`> so if you defined head (x:_) = x, its type will be inferred as head :: Partial => [a] -> a
23:17:25 <jle`> and so any code that uses 'head' will also have that typeclass constraint
23:17:38 <jle`> it's possible in Haskell too I think, but you have to manually add the constraint whenever you have a partial function
23:17:44 <jle`> % class Partial
23:17:44 <yahb> jle`:
23:18:07 <jle`> % partialHead :: Partial => [a] -> a; partialHead (x:_) = x
23:18:07 <yahb> jle`:
23:18:16 <dolio> It did at least used to be in purescript. I wouldn't describe it as useful.
23:18:20 <jle`> % :t \xs -> head xs + 3
23:18:20 <yahb> jle`: Num a => [a] -> a
23:18:31 <jle`> % :t \xs -> partialHead xs + 3
23:18:31 <yahb> jle`: ; <interactive>:1:8: error:; * Could not deduce Partial arising from a use of `partialHead'; from the context: Num a bound by the inferred type of it :: Num a => [a] -> a at <interactive>:1:1; Possible fix: add Partial to the context of the inferred type of it :: Num a => [a] -> a; * In the first argument of `(+)', namely `partialHead xs'; In the expression: partialHead xs + 3
23:18:39 <Kronic> Seems cool but I think I should stick to just regular Haskell for now, it is not surprising that someone else already has something like this though haha. Thank you for pointing it out merijn
23:18:45 <jle`> hm.
23:19:28 <merijn> Kronic: Liquid Haskell are just special annotations + a GHC plugin on top of regular Haskell
23:19:51 <monochrom> I think it's the same phenomenon as: Just because you use "error :: HasCallBack => String -> a" doesn't mean callers automatically inherit that constraint.
23:20:34 CMCDragonkai1 joins (~Thunderbi@120.17.176.90)
23:21:05 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
23:21:23 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
23:22:05 × fendor quits (~fendor@178.165.131.83.wireless.dyn.drei.com) (Remote host closed the connection)
23:22:18 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:22:49 wagle joins (~wagle@quassel.wagle.io)
23:23:11 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
23:23:14 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:24:10 × son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal)
23:26:05 <Kronic> ah I see
23:26:05 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Read error: Connection reset by peer)
23:26:36 × argento quits (~argent0@168.227.97.34) (Ping timeout: 240 seconds)
23:26:38 <dolio> The reasons are basically what monochrom said above. If I'm using `head`, it's because I know something the compiler can't figure out, and the null class thing just makes it a big pain to actually use.
23:26:59 <dolio> And on something like incomplete matching, a warning is probably better.
23:28:53 olligobber joins (~olligobbe@unaffiliated/olligobber)
23:28:53 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
23:31:09 <phaazon> dolio: can’t you pattern-match the list instead?
23:31:09 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
23:31:15 <phaazon> so that your compiler knows
23:31:31 <dolio> And put what in the null case?
23:31:37 Tario joins (~Tario@201.192.165.173)
23:31:39 <dolio> Something equally inconvenient to use.
23:31:55 × o1lo01ol1o quits (~o1lo01ol1@31.22.250.118) (Remote host closed the connection)
23:32:25 × darjeeling_ quits (~darjeelin@115.215.43.136) (Ping timeout: 256 seconds)
23:33:10 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
23:33:19 darjeeling_ joins (~darjeelin@115.215.43.136)
23:34:27 <monochrom> When I was younger I looked at all these freedoms offered by various languages and made doomsday speeches about how programmers would be reckless and stupid and malicious and abused those freedoms to produce completely broken code 24/7/365.
23:34:42 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:34:50 <dolio> Well, they do do that.
23:34:53 <monochrom> No, it didn't happen, and never will. Programmers turn out to use that freedom wisely, in reality.
23:35:40 <monochrom> Or rather, statistical vast majority. We all make mistakes, yes.
23:35:42 <koala_man> generally, most of the time
23:36:06 monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net)
23:38:42 sgibber2018 joins (~arch-gibb@208.85.237.137)
23:39:07 × conal quits (~conal@66.115.157.156) (Quit: Computer has gone to sleep.)
23:39:25 × sgibber2018 quits (~arch-gibb@208.85.237.137) (Client Quit)
23:40:36 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 240 seconds)
23:42:22 sgibber2018 joins (~arch-gibb@208.85.237.137)
23:42:39 <dolio> The point is that it doesn't stop me from writing the 'unsafe' thing that I happen to know is safe, it just makes me waste time. Because adding time wasting to 'incorrect' code is an easier way to make it more expensive than 'correct' code than actually improving the ability to write the latter.
23:42:51 × sgibber2018 quits (~arch-gibb@208.85.237.137) (Client Quit)
23:43:49 <jle`> i do agree with you dolio . plus having to thread that Partial constraint up through your entire codebase for something at the low level...is pretty inconvenient
23:43:59 conal joins (~conal@64.71.133.70)
23:44:16 <Kronic> C++ programmers probably say the same thing about many of the things available in C++
23:45:21 × sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: The Lounge - https://thelounge.chat)
23:45:21 <jle`> maybe something useful (for my specific announce) would be `yesIKnow :: (Partial => a) -> a`
23:45:54 <dolio> I think that was how you actually were supposed to use partial stuff in purescript.
23:46:07 <jle`> D:
23:46:16 <dolio> But that's just clutter.
23:46:40 sakirious joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net)
23:46:49 <jle`> maybe better would be demanding a blood sacrifice every time you use a partial function
23:46:53 <jle`> same sort of cost
23:46:55 × sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Client Quit)
23:47:21 <jle`> the idea is to slightly punish you for using it until you pay the pennance
23:47:33 <jle`> but that feels like an odd form of Boolean Blindness
23:47:43 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 260 seconds)
23:47:48 <jle`> it doesn't really do anything meaningful other than require some sort of token
23:48:05 random-jellyfish joins (524c366d@unaffiliated/random-jellyfish)
23:48:21 × chewb quits (~chewb@abhz34.neoplus.adsl.tpnet.pl) (Ping timeout: 258 seconds)
23:48:39 × acidjnk_new quits (~acidjnk@p200300d0c719ff72385a765c3f0a7348.dip0.t-ipconnect.de) (Remote host closed the connection)
23:48:43 × quantumvatican quits (~private@lfbn-idf2-1-504-211.w86-246.abo.wanadoo.fr) (Quit: Lost terminal)
23:48:44 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 258 seconds)
23:48:47 <random-jellyfish> are there any real world projects that use parsec
23:48:51 <random-jellyfish> ?
23:49:01 acidjnk_new joins (~acidjnk@p200300d0c719ff72385a765c3f0a7348.dip0.t-ipconnect.de)
23:49:03 <dolio> I guess the real crux is: I don't need the compiler to punish me for using partial functions. I already don't want to use them. But sometimes they're better than the alternative, and I don't want to jump through hoops in those cases.
23:49:05 <jle`> isn't parsec a real world project?
23:49:34 <random-jellyfish> yeah but I mean some language parsers built on parsec
23:49:48 <random-jellyfish> that are used in production
23:49:49 <jle`> oh sorry, i thought you wrote pandoc
23:50:01 × CMCDragonkai1 quits (~Thunderbi@120.17.176.90) (Quit: CMCDragonkai1)
23:50:04 <jle`> hm, parsec in specific, or parser combinators?
23:50:15 <merijn> random-jellyfish: There's about 998 reverse dependencies of parsec, so..."yes"
23:50:16 <random-jellyfish> parsec in specific
23:50:20 <jle`> generally i see megaparsec, attoparsec, etc. used in the wild
23:50:24 <merijn> https://packdeps.haskellers.com/reverse/parsec
23:50:41 <jle`> megaprasec being a 'modern' fork of parsec, even though parsec is pretty modern now
23:51:05 <mouseghost> >acme-lolcat
23:51:07 Tario joins (~Tario@201.192.165.173)
23:51:10 juri_ joins (~juri@178.63.35.222)
23:51:20 <random-jellyfish> would it be possible to parse a language like c++ in parsec?
23:51:35 <jle`> the idris language implementation uses megaparsec
23:52:00 <MarcelineVQ> idris1 does yes
23:52:08 <jle`> lm uses parsec
23:52:10 <jle`> *elm
23:52:50 <jle`> pandoc uses both parsec and attoparsec (attoparsec presumably for the binary encodings)
23:52:53 <MarcelineVQ> speaking of which, re the last convo branc, you simply annotate just above your function whether it's partial, covering, or total in idris.
23:52:57 × monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 258 seconds)
23:54:29 maroloccio joins (~marolocci@pousada3ja.mma.com.br)
23:56:14 <aev> I'm pretty new to haskell. How do I recognize whether a function is partial? And why would I want to avoid it?
23:56:36 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
23:58:02 <monochrom> 1. can't. 2. wouldn't.
23:58:12 × random-jellyfish quits (524c366d@unaffiliated/random-jellyfish) (Remote host closed the connection)
23:58:17 <MarcelineVQ> Something like head is partial in that given an empty list it crashes because it can't give you an element from the front of an empty list. avoiding crashes is usually a good thing to want to do, but not always
23:58:32 <jle`> aev: one of the major strengths in Haskell is how the compiler can help you with avoiding a major class of bugs by handling all cases of an ADT...it can be your friend in writing code. using partial (non-total matching) functions sort of dismisses a lot of the advantages you'd get over other languages
23:58:35 <monochrom> 3. spend your time on a more worthy issue, such as learning pattern matching and evangelizing it.
23:58:53 <jle`> at least when learning haskell, relying on partial functions steers you away from things like pattern matching, which give more robust solutions
23:59:06 <monochrom> and equational reasoning.
23:59:19 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:59:45 o1lo01ol1o joins (~o1lo01ol1@92.250.17.1)
23:59:46 <dminuoso> aev: Sadly there's no good way to recognize partial functions. If you gain experience, you'll not only learn the common partial functions, you'll also learn to see whether a function is partial based on the type signature and the description..
23:59:52 <jle`> a simple mistake would be something like `head xs + 3`, which would crash if xs was empty. but if you wrote `case xs of x:_ -> 3; [] -> ???`, it makes you thiunk about what you'd really want to do in that case

All times are in UTC on 2020-12-11.