Home freenode/#haskell: Logs Calendar

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

00:01:12 × falafel quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
00:02:08 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 272 seconds)
00:03:16 jedws joins (~jedws@101.184.150.93)
00:07:17 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
00:08:32 Varis joins (~Tadas@unaffiliated/varis)
00:10:24 × borne quits (~fritjof@200116b864eda200f1dc39039d201adf.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
00:12:36 borne joins (~fritjof@200116b8640a4d0024e67d79d03c01ac.dip.versatel-1u1.de)
00:13:39 × jedws quits (~jedws@101.184.150.93) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:14:04 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
00:14:31 hackage yi-core 0.19.0 - Yi editor core library https://hackage.haskell.org/package/yi-core-0.19.0 (TomMurphy)
00:14:41 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
00:14:42 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
00:15:02 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
00:15:34 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
00:15:57 jedws joins (~jedws@101.184.150.93)
00:16:27 Sarma joins (~Amras@unaffiliated/amras0000)
00:17:28 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
00:18:37 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
00:18:37 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
00:18:42 nbloomf joins (~nbloomf@2600:1700:ad14:3020:7958:7d8e:4908:c843)
00:20:03 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
00:22:47 × Tracerneo1 quits (~Tracerneo@193.56.252.12) (Remote host closed the connection)
00:29:22 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
00:32:31 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16)
00:34:57 × jess quits (jess@freenode/staff/jess) (Quit: Leaving)
00:36:05 × enoq quits (~textual@194-208-146-143.lampert.tv) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:36:38 leungbk joins (~user@2605:e000:1315:706:925b:594a:9503:ee10)
00:36:39 nullheroes joins (~danielvu@168.235.66.22)
00:43:20 DJWillis joins (~DJWillis@217.146.82.202)
00:44:45 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 240 seconds)
00:46:23 ph88 joins (~ph88@2a02:8109:9e00:7e5c:f073:c081:c2ef:433b)
00:48:05 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds)
00:55:38 × solonarv quits (~solonarv@astrasbourg-653-1-156-4.w90-6.abo.wanadoo.fr) (Ping timeout: 256 seconds)
00:56:53 × Benzi-Junior quits (~BenziJuni@88-149-67-198.du.xdsl.is) (Ping timeout: 260 seconds)
00:57:00 B-J joins (~BenziJuni@88-149-65-135.du.xdsl.is)
00:57:58 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
00:59:49 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:00:07 × leungbk quits (~user@2605:e000:1315:706:925b:594a:9503:ee10) (Ping timeout: 260 seconds)
01:00:30 hackage yi-core 0.19.1 - Yi editor core library https://hackage.haskell.org/package/yi-core-0.19.1 (TomMurphy)
01:00:31 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
01:00:47 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
01:00:49 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
01:00:55 × alp quits (~alp@2a01:e0a:58b:4920:8196:f1ff:e993:87c3) (Ping timeout: 272 seconds)
01:01:33 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:f073:c081:c2ef:433b) (Ping timeout: 272 seconds)
01:05:22 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
01:05:25 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
01:06:00 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
01:06:31 acidjnk_new2 joins (~acidjnk@p200300d0c719ff356dc4eeabe79b61ea.dip0.t-ipconnect.de)
01:07:22 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 272 seconds)
01:08:21 livvy joins (~livvy@gateway/tor-sasl/livvy)
01:09:24 × acidjnk_new quits (~acidjnk@p200300d0c719ff356dc4eeabe79b61ea.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
01:09:24 × gentauro quits (~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer)
01:10:10 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
01:10:16 gentauro joins (~gentauro@unaffiliated/gentauro)
01:10:17 christo joins (~chris@81.96.113.213)
01:11:24 <dolio> Someone's working on yi?
01:11:37 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:12:38 alp joins (~alp@2a01:e0a:58b:4920:a9d4:25a5:c24f:25ed)
01:13:04 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-lviokxjrzjjmnlqh) (Ping timeout: 240 seconds)
01:14:01 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Ping timeout: 264 seconds)
01:14:16 leungbk joins (~user@cpe-104-33-52-83.socal.res.rr.com)
01:14:37 × christo quits (~chris@81.96.113.213) (Read error: No route to host)
01:15:14 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-itluyvgbrrzsqlpm)
01:15:16 christo joins (~chris@81.96.113.213)
01:16:00 hackage yi-core 0.19.2 - Yi editor core library https://hackage.haskell.org/package/yi-core-0.19.2 (TomMurphy)
01:16:52 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
01:19:07 <glguy> Maybe someone could tell Tom Murphy about package candidates
01:20:45 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Quit: Leaving)
01:21:46 ShinyPants joins (~user@2604:3d09:207f:f650:1c53:faca:fa1d:35d3)
01:22:35 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
01:24:16 iqubic joins (~user@2601:602:9500:4870:d13a:6a31:cf0a:f017)
01:25:49 <iqubic> Well, I'm struggling right now. I want to write a function with the type [[a]] -> M.Map (V2 Int), where the first element of the first list is associated with (V2 0 0), and the rest follows from there. I'm not sure how to do that.
01:27:35 <iqubic> Can I get some help on how to do that?
01:27:50 <dsal> I don't understand how you get from `a` to whatever V2 is.
01:27:57 <dsal> Is `V2 Int` a type?
01:28:40 <iqubic> dsal: data V2 a = V2 a a.
01:28:58 <iqubic> It's from the Data.Linear package, but you can just use that definite.
01:29:03 <dsal> So something like this? > fmap (\(x:xs) -> (x, xs)) ["abc", "def"]
01:29:14 <dsal> > fmap (\(x:xs) -> (x, xs)) ["abc", "def"] -- -> M.fromList
01:29:16 <lambdabot> [('a',"bc"),('d',"ef")]
01:30:01 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 265 seconds)
01:30:15 <dsal> Oh, I think I understand.
01:30:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:30:46 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:7958:7d8e:4908:c843) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:32:23 <dsal> > fmap (\(y,l) -> zipWith (\x a -> (x,y,a)) [0..] l) $ zip [0..] ["abc", "def"] -- something like this?
01:32:25 <lambdabot> [[(0,0,'a'),(1,0,'b'),(2,0,'c')],[(0,1,'d'),(1,1,'e'),(2,1,'f')]]
01:34:05 <iqubic> Basically something like this:
01:34:07 <iqubic> https://dpaste.com/AVYCK9ULA
01:34:22 <iqubic> If that makes any sense.
01:34:43 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
01:34:48 <iqubic> I see what you've given me.
01:34:48 Lord_of_Life_ joins (~Lord@46.217.218.71)
01:34:51 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 265 seconds)
01:34:51 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
01:35:03 <iqubic> dsal: Does my paste make sense?
01:35:16 × roconnor quits (~roconnor@host-104-157-230-3.dyn.295.ca) (Ping timeout: 260 seconds)
01:35:21 nbloomf joins (~nbloomf@2600:1700:ad14:3020:7958:7d8e:4908:c843)
01:35:35 <dsal> Yeah, completely. I just sketched that thing in lambdabot, but I think it gets you pretty close to what you want.
01:35:42 <iqubic> Yes. It does.
01:36:05 <iqubic> I just need to change the data types used, and feed the result into M.fromList.
01:38:03 <dsal> Cool... There's probably a better way to do that, and I should probably come up with a nice way to do that. Sort of a two dimensional zip.
01:38:19 avoandmayo joins (~textual@122-58-109-105-adsl.sparkbb.co.nz)
01:38:55 × p-core quits (~Thunderbi@2a0e:1c80:4:1023::1004) (Ping timeout: 272 seconds)
01:39:14 <iqubic> For now, that's the least of my worries.
01:42:34 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
01:44:18 × ShinyPants quits (~user@2604:3d09:207f:f650:1c53:faca:fa1d:35d3) (Remote host closed the connection)
01:44:59 × remby quits (~rg@2607:fea8:2c40:307::1ef6) (Quit: Konversation terminated!)
01:45:13 <iqubic> Can I use zip when the first argument is [0..]?
01:46:38 <dsal> :t zip
01:46:39 <lambdabot> [a] -> [b] -> [(a, b)]
01:46:49 <dsal> Oh, you mean will it terminate?
01:46:59 <dsal> zip ends when either input ends
01:47:19 <iqubic> :t zipWith
01:47:20 <lambdabot> (a -> b -> c) -> [a] -> [b] -> [c]
01:47:27 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
01:49:03 <dsal> `zip` is just `zipWith (,)`
01:50:30 hackage yi-frontend-pango 0.19.0 - Pango frontend for Yi editor https://hackage.haskell.org/package/yi-frontend-pango-0.19.0 (TomMurphy)
01:50:34 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
01:50:46 <dsal> Oh, I didn't notice a thing I did.
01:50:47 Tario joins (~Tario@201.192.165.173)
01:50:53 <dsal> `zipWith2D :: (a -> b -> c -> d) -> [a] -> [b] -> [[c]] -> [d]; zipWith2D f xs ys = foldMap (\(y, l) -> zipWith (\x -> f x y) xs l) . zip ys`
01:50:57 <dsal> That's a slightly better version.
01:51:02 × LKoen quits (~LKoen@169.244.88.92.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.”)
01:51:30 hackage yi-frontend-vty 0.19.0 - Vty frontend for Yi editor https://hackage.haskell.org/package/yi-frontend-vty-0.19.0 (TomMurphy)
01:52:04 <dsal> using fmap meant you got a `[[d]]` back, which was confusing me when I tried doing it with a declared type.
01:56:00 hackage yi-keymap-vim 0.19.0 - Vim keymap for Yi editor https://hackage.haskell.org/package/yi-keymap-vim-0.19.0 (TomMurphy)
01:57:01 hackage yi-misc-modes 0.19.0 - Yi editor miscellaneous modes https://hackage.haskell.org/package/yi-misc-modes-0.19.0 (TomMurphy)
01:57:26 <dsal> I need to add that to my aoc toolkit. I end up inventing something like that regularly.
02:00:04 <dsal> Oh cool, I had a function that was slightly related that could be built on that, and it already had tests, so I can wedge it in there.
02:00:41 <iqubic> dsal: I'm actually preparing my AOC toolkit as we speak.
02:01:01 <dsal> I should do more of that. I always feel like it would've been a great idea after the fact.
02:01:03 <iqubic> I have a file literally called Grid.hs, for doing grid based stuff.
02:02:01 <dsal> I've got `parseGrid :: (Char -> a) -> String -> Map (Int,Int) a` which is pretty common for those map things for me. And a bunch of `around` and distance functions.
02:02:56 <dsal> And stuff that takes those grid things and spits out text or png visualizations.
02:04:05 <dsal> Mostly just use this text one: `draw :: Bounded2D a => FilePath -> a -> PixelFun -> IO ()`
02:05:11 × crdrost quits (~crdrost@2601:646:8280:85f0:90f7:1b03:f01f:afae) (Quit: This computer has gone to sleep)
02:05:22 roconnor joins (~roconnor@host-104-157-230-3.dyn.295.ca)
02:07:25 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds)
02:08:28 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16)
02:09:53 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
02:11:09 guest1120 joins (~user@49.5.6.87)
02:11:38 <MarcelineVQ> I always think aoc is a really great idea until problem 3 or 4
02:11:57 <MarcelineVQ> Then I feel less and less sure about that until the curve becomes eliptical
02:12:22 <monochrom> haha
02:13:12 <monochrom> This proves that your sentiment is under Newtonian gravitation >:)
02:13:37 <MarcelineVQ> this explains why I'm always in free fall
02:13:42 × Entertainment quits (~entertain@104.246.132.210) ()
02:14:24 × codeAlways quits (uid272474@gateway/web/irccloud.com/x-zbflumxjrtygmhzc) (Quit: Connection closed for inactivity)
02:15:32 <iqubic> What is Bounded2D?
02:15:44 <iqubic> My drawing function is quite primative.
02:16:24 christo joins (~chris@81.96.113.213)
02:16:43 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
02:20:37 × leungbk quits (~user@cpe-104-33-52-83.socal.res.rr.com) (Remote host closed the connection)
02:20:54 × benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-aztrejkfdpbhytuo) (Quit: Connection closed for inactivity)
02:21:47 × macrover quits (~macrover@ip70-189-231-35.lv.lv.cox.net) (Ping timeout: 260 seconds)
02:22:49 <dsal> iqubic: Bounded2D gives me `bounds2d :: a -> ((Int,Int), (Int,Int))`-- (min x, min y), (max x, max y)
02:23:05 toorevitimirp joins (~tooreviti@117.182.180.118)
02:23:10 <iqubic> I see.
02:23:12 <iqubic> Nice.
02:23:25 <iqubic> I don't have any functions for dealing with Rectangles.
02:24:15 Tario joins (~Tario@201.192.165.173)
02:24:30 hackage mprelude 0.2.1 - A minimalish prelude. https://hackage.haskell.org/package/mprelude-0.2.1 (mbj)
02:24:39 × falafel_ quits (~falafel@c-73-79-82-198.hsd1.pa.comcast.net) (Remote host closed the connection)
02:25:03 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
02:25:20 <MarcelineVQ> you should steal conal's drawing stuff http://conal.net/papers/functional-images/
02:28:04 <dsal> I end up drawing a lot of the stuff while I'm trying to understand it. This junk helps. Also that thing that translates my arbitrary bounds to 0-based bounds. I get that wrong so much.
02:28:29 <dsal> I ended up with a data type that represents the size and has translation functions for each direction.
02:29:19 <dsal> I'm not trying to do super fancy drawing stuff, mainly just "take grid from memory and put on screen"
02:29:20 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Read error: Connection reset by peer)
02:29:35 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
02:30:01 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
02:30:38 hidedagger joins (~nate@unaffiliated/hidedagger)
02:31:04 × conal quits (~conal@ip-66-115-176-195.creativelink.net) (Quit: Computer has gone to sleep.)
02:31:27 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:7958:7d8e:4908:c843) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:31:36 <dsal> e.g., this is about as fancy as I get: https://asciinema.org/a/288366
02:32:17 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
02:32:38 <MarcelineVQ> Urist Akinhumor has drowned
02:38:04 × xff0x quits (~fox@2001:1a81:534b:a000:65df:cebc:ef3d:70f7) (Ping timeout: 240 seconds)
02:38:09 nbloomf joins (~nbloomf@2600:1700:ad14:3020:7958:7d8e:4908:c843)
02:39:39 conal joins (~conal@ip-66-115-176-195.creativelink.net)
02:40:00 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
02:40:28 xff0x joins (~fox@2001:1a81:5385:e100:f695:2019:7725:a87d)
02:42:13 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
02:42:49 shatriff joins (~vitaliish@176.52.219.10)
02:47:16 <ski> dsal : seems to be missing an `o', just beside the start ?
02:49:01 hackage devtools 0.1.0 - Haskell development tool agregate https://hackage.haskell.org/package/devtools-0.1.0 (mbj)
02:50:04 <ski> MarcelineVQ : who ?
02:52:12 <MarcelineVQ> Urist is the generic surname for dwarfs when telling dwarf fortress stories, dsal's art was reminiscent of flooding water in dwarf fortress
02:53:18 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
02:53:53 christo joins (~chris@81.96.113.213)
02:54:26 × alp quits (~alp@2a01:e0a:58b:4920:a9d4:25a5:c24f:25ed) (Remote host closed the connection)
02:55:08 × jedws quits (~jedws@101.184.150.93) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:55:08 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
02:55:19 christo joins (~chris@81.96.113.213)
02:58:03 hidedagger joins (~nate@unaffiliated/hidedagger)
03:01:52 <dsal> I don't remember the puzzle. Something about flooding with air.
03:02:18 CMCDragonkai1 joins (~Thunderbi@124.19.3.250)
03:02:59 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16) (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:03:08 <dsal> Yeah, I don't remember what that gap was. Probably should've painted it something that didn't make it look like an accident.
03:06:45 × CMCDragonkai1 quits (~Thunderbi@124.19.3.250) (Ping timeout: 240 seconds)
03:07:30 drbean joins (~drbean@TC210-63-209-219.static.apol.com.tw)
03:08:56 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
03:11:05 <ski> mhm
03:13:25 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds)
03:15:55 jespada joins (~jespada@90.254.245.49)
03:17:24 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16)
03:17:39 × renzhi quits (~renzhi@2607:fa49:655f:e600::28da) (Quit: WeeChat 2.3)
03:18:42 <magicman> I must be missing something. Is there a way in esqueleto to turn an SqlExpr (Entity x) into an SqlExpr (Maybe (Entity x))?
03:19:05 <magicman> The 'just' function works on SqlExpr (Value x) -> SqlExpr (Value (Maybe x)), so that's not what I want.
03:21:26 didymos is now known as oats
03:24:02 × acidjnk_new2 quits (~acidjnk@p200300d0c719ff356dc4eeabe79b61ea.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
03:24:35 <magicman> I have a function that chooses between two queries, depending on if I want "Only those X that have some related Y, and their Y", or "All X, and possibly their related Y".
03:25:45 <magicman> So that translates to an inner join VS outer join, except esqueleto says no, because outer join gives Maybe. For good reason. So I want to wrap the result of the inner join in Maybe as well.
03:27:36 <magicman> And I kinda want to still be on the query-level. I could do the select $ from $ blah for both queries, and map Just where relevant, but that feels a bit off.
03:30:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:34:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
03:35:33 nados joins (~dan@69-165-210-185.cable.teksavvy.com)
03:35:36 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
03:37:40 × conal quits (~conal@ip-66-115-176-195.creativelink.net) (Quit: Computer has gone to sleep.)
03:38:00 acidjnk_new2 joins (~acidjnk@p200300d0c719ff356dc4eeabe79b61ea.dip0.t-ipconnect.de)
03:42:35 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
03:43:31 hackage yi-mode-haskell 0.19.0 - Yi editor haskell mode https://hackage.haskell.org/package/yi-mode-haskell-0.19.0 (TomMurphy)
03:44:31 hackage yi-mode-javascript 0.19.0 - Yi editor javascript mode https://hackage.haskell.org/package/yi-mode-javascript-0.19.0 (TomMurphy)
03:44:39 × lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (hitchcock.freenode.net (Nickname regained by services)))
03:44:47 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
03:45:31 hackage yi-fuzzy-open 0.19.0 - Fuzzy open plugin for yi https://hackage.haskell.org/package/yi-fuzzy-open-0.19.0 (TomMurphy)
03:46:30 hackage yi-ireader 0.19.0 - Yi editor incremental reader https://hackage.haskell.org/package/yi-ireader-0.19.0 (TomMurphy)
03:47:31 hackage yi-snippet 0.19.0, yi-keymap-emacs 0.19.0 (TomMurphy): https://qbin.io/weak-ratios-hjy8
03:51:02 × theDon quits (~td@muedsl-82-207-238-104.citykom.de) (Ping timeout: 260 seconds)
03:51:48 <magicman> Hrm. Looks like I can maybe possibly use the EMaybe function from the Internal module. This probably will not break anything ever, because directly using datatype constructors from modules named Internal never breaks things... *knocks on wood*.
03:52:01 hackage yi-dynamic-configuration 0.19.0 - Dynamic configuration support for Yi https://hackage.haskell.org/package/yi-dynamic-configuration-0.19.0 (TomMurphy)
03:52:31 <magicman> (also, whoa, didn't know people still worked on Yi. It's been a while since I've seen that name show up!)
03:52:41 theDon joins (~td@94.134.91.165)
03:53:20 × northman_ quits (~northman@204.111.252.124) (Quit: Textual IRC Client: www.textualapp.com)
03:57:03 falafel__ joins (~falafel@c-73-79-82-198.hsd1.pa.comcast.net)
03:57:30 hackage conversions 0.0.4 - Injective explicit total and partial conversions https://hackage.haskell.org/package/conversions-0.0.4 (mbj)
03:59:47 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
04:00:45 jedws joins (~jedws@101.184.150.93)
04:08:56 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds)
04:09:36 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
04:12:12 × falafel__ quits (~falafel@c-73-79-82-198.hsd1.pa.comcast.net) (Ping timeout: 256 seconds)
04:13:17 Feuermagier_ joins (~Feuermagi@213.178.26.41)
04:15:16 × Feuermagier quits (~Feuermagi@213.178.26.41) (Ping timeout: 240 seconds)
04:18:42 × nf quits (~n@monade.li) (Ping timeout: 260 seconds)
04:19:01 nf joins (~n@monade.li)
04:19:54 × m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 272 seconds)
04:20:18 <koz_> If I'm reading type judgments, should I read 'Gamma, x : A |- x : A' as something like, 'given the fact that x types as A (plus possibly other facts), it follows that x types as A'?
04:21:00 quarters joins (~quarters@unaffiliated/quarters)
04:21:37 <monochrom> Yes.
04:22:40 <koz_> So basically, if I have '[above horizontal line] Gamma |- A : s [below horizontal line] Gamma, x : A |- x : A', this basically says 'if A is really a type, and we know that x types as A, then x types as A'?
04:22:47 iqubic parts (~user@2601:602:9500:4870:d13a:6a31:cf0a:f017) ("ERC (IRC client for Emacs 28.0.50)")
04:22:55 <koz_> I guess I'm confused at the difference between the horizontal line and the turnstile.
04:24:03 <monochrom> But the left of a turnstile is a very special kind of "assumptions".
04:24:38 <monochrom> The left can only list the variables in scope, and their types.
04:24:54 <koz_> Ah, so in a way, to the left of the turnstile we have a 'typing environment' basically?
04:25:05 <monochrom> Yes, that's exactly it.
04:25:13 <koz_> So what's with the big horizontal line?
04:25:25 <monochrom> That one is really general implication.
04:26:10 <koz_> Ah! I think I see it.
04:26:32 <koz_> Since we have Gamma on the left of the top turnstile, with no mention of x, it means 'we can assume that every type has a kind'?
04:26:46 <monochrom> or dividing a proof step into "before" and "after"
04:27:56 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 260 seconds)
04:27:56 <koz_> I guess I'm asking why this wasn't written as something like 'Gamma, x : A |- A : s, x : A'.
04:28:30 <monochrom> Instead of "assume that a type has a kind", I think this rules is saying "in this system, a type has a kind".
04:29:25 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
04:29:46 × hololeap quits (~hololeap@unaffiliated/hololeap) (Ping timeout: 256 seconds)
04:30:15 <koz_> The rule is called 'var' if that helps any.
04:30:32 hololeap joins (~hololeap@unaffiliated/hololeap)
04:35:30 hackage yi-keymap-cua 0.19.0 - Cua keymap for Yi editor https://hackage.haskell.org/package/yi-keymap-cua-0.19.0 (TomMurphy)
04:36:37 <monochrom> A:s in a conclusion position is very different, in some sense opposite, of A:s in a prerequisite position.
04:37:03 <koz_> Could you elaborate on that?
04:38:43 <monochrom> I was hoping that you could use what you already know about the difference between "G implies P and Q" and "G and P implies Q"
04:40:10 <monochrom> If you have a rule that says: "conclusion: x:monochrom |- monochrom is a legal type, and x:monochrom", then it defines that monochrom is a legal type.
04:40:23 <monochrom> But if you don't have rule...
04:40:46 conal joins (~conal@ip-66-115-176-195.creativelink.net)
04:40:48 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
04:40:53 <monochrom> If you have, instead, "premise: monochrom is a type; conclusion: x:monochrom |- x:monochrom"
04:41:17 <monochrom> now you still don't know whether monochrom is a type, and generally "expr : monochrom" has any chance of being legal at all.
04:41:39 <monochrom> You will have to look for other rules to see if you can prove "monochrom is a type" or not.
04:42:06 <koz_> Ah, I think I see what you're saying.
04:42:15 <monochrom> If there is no, this means the system is trying to say "monochrom is not a legal type, you will never have anything of the form expr : monochrom"
04:42:17 × howdoi quits (uid224@gateway/web/irccloud.com/x-dgisunxwmcstbixs) (Quit: Connection closed for inactivity)
04:42:36 <koz_> Alright, thanks, that helps.
04:42:49 <koz_> I keep forgetting that I need to become ten times stupider than I am as a human to properly read logic. :P
04:42:55 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
04:43:05 <koz_> It's the optimist in me. 'Of course this is a type, what else could it possibly be?'.
04:44:29 <monochrom> Some authors write a separate CFG to define legal types, and don't include this in the type checking rules.
04:44:38 <koz_> These ones clearly didn't do that.
04:44:58 <monochrom> Other authors use the type rules to define both legal types and type checking at the same time.
04:44:58 <nshepperd> i think i would read that as saying that a typing environment containing x:A emits/proves that judgement (eg. so you can use it in other rules), but only if it also proves that A is a type
04:45:01 hackage yi-dynamic-configuration 0.19.1 - Dynamic configuration support for Yi https://hackage.haskell.org/package/yi-dynamic-configuration-0.19.1 (TomMurphy)
04:45:25 × quarters quits (~quarters@unaffiliated/quarters) (Ping timeout: 240 seconds)
04:45:30 rekahsoft joins (~rekahsoft@fitz10681.telemetry.esentire.com)
04:47:31 <monochrom> Dependent typing is likely to mean legal types don't match any CFG, so it may be better to merge type forming rules with type checking rules, because the format allows you to add more restrictions.
04:47:31 hackage yi-frontend-pango 0.19.1 - Pango frontend for Yi editor https://hackage.haskell.org/package/yi-frontend-pango-0.19.1 (TomMurphy)
04:47:37 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Remote host closed the connection)
04:47:39 <nshepperd> if A is not a type, but instead instead a potato, then "Gamma, x:A" does not let you use x:A in further rules
04:47:59 <nshepperd> (unless there's a separate rules that says so)
04:48:12 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
04:49:15 <koz_> Propositions as potatoes.
04:49:23 <dolio> Proper variable scoping isn't context free, I believe.
04:49:42 <dolio> So you're already screwed once you have variables.
04:49:57 <monochrom> Oh heh yeah.
04:51:06 <monochrom> http://www.vex.net/~trebla/weblog/declare-before-use.xhtml is my proof, at least of a related theorem.
04:51:57 <monochrom> If it's just a few issues such as proper scoping standing in the way, we can make do with "fits this CFG plus has scoping requirements". Many authors do.
04:52:11 <dolio> I worked on a project that tried to resolve variable scoping during parsing. I recommend not doing that.
04:52:43 <monochrom> But dependent typing can have so many more unwiedly restrictions that you can't scale that style.
04:53:07 <koz_> monochrom: That's a really cute proof using a technique I spent a lot of time with.
04:53:18 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
04:53:21 <koz_> (our whole ToC class consisted of assignments pumping damn near everything)
04:57:16 <dolio> Yeah. Now I remember almost nothing about that part. :)
04:58:10 <koz_> dolio: One particularly gory (non-pumping) question was about CE languages.
04:58:22 <koz_> Like, all the questions around CE-ness were unpleasant, honestly.
05:02:32 × avoandmayo quits (~textual@122-58-109-105-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:04:32 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
05:04:56 × texasmynsted quits (~texasmyns@212.102.45.112) (Ping timeout: 240 seconds)
05:07:35 avoandmayo joins (~textual@122-58-109-105-adsl.sparkbb.co.nz)
05:10:16 × avoandmayo quits (~textual@122-58-109-105-adsl.sparkbb.co.nz) (Client Quit)
05:13:30 hackage yi 0.19.0 - Yi editor https://hackage.haskell.org/package/yi-0.19.0 (TomMurphy)
05:23:27 day_ joins (~Unknown@unaffiliated/day)
05:23:45 × conal quits (~conal@ip-66-115-176-195.creativelink.net) (Quit: Computer has gone to sleep.)
05:26:44 × day quits (~Unknown@unaffiliated/day) (Ping timeout: 260 seconds)
05:26:44 day_ is now known as day
05:28:04 quarters joins (~quarters@38-73-246-124.starry-inc.net)
05:31:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:31:41 × Sarma quits (~Amras@unaffiliated/amras0000) (Remote host closed the connection)
05:35:17 Amras joins (~Amras@unaffiliated/amras0000)
05:35:34 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
05:38:57 × borne quits (~fritjof@200116b8640a4d0024e67d79d03c01ac.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
05:40:53 borne joins (~fritjof@200116b86455d000feb15fd2865dc87d.dip.versatel-1u1.de)
05:40:58 × Codaraxis_ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Ping timeout: 260 seconds)
05:42:14 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
05:42:52 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 272 seconds)
05:46:05 × alx741 quits (~alx741@181.196.68.156) (Ping timeout: 240 seconds)
05:47:07 × acidjnk_new2 quits (~acidjnk@p200300d0c719ff356dc4eeabe79b61ea.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
05:47:12 ggole joins (~ggole@2001:8003:8119:7200:3080:9a4e:22db:fd6d)
05:47:22 hooper joins (2fe3e53b@047-227-229-059.res.spectrum.com)
05:50:01 <hooper> hi! i have a design question: so I want to have shapes like triangles and squares. they should both share some common attributes like having a number of sides and functions like computing the area, but would have different functions specific to each class as well
05:50:05 × rekahsoft quits (~rekahsoft@fitz10681.telemetry.esentire.com) (Ping timeout: 260 seconds)
05:50:08 <hooper> what is the best way to structure this?
05:50:20 <hooper> I'm thinking a shape typeclass
05:51:36 <hooper> but then not sure how to handle methods unique to one class
05:51:39 <glguy> hooper, you can make a record like: data Polygon = Polygon { sides :: Int, Area :: Double, etc }
05:52:22 <hooper> hm but i only want triangles and squares
05:52:39 <glguy> OK, then: data Shape = Triangle | Square
05:53:26 <hooper> so then lets say i declare like data Triangle = { a, b, c }
05:53:35 <hooper> where a b c are Double type
05:53:46 <hooper> how would I write an area function then
05:54:40 <hooper> i need area to be polymorphic for square and triangle
05:55:42 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:58:03 sord937 joins (~sord937@gateway/tor-sasl/sord937)
06:03:10 SanchayanMaity joins (~Sanchayan@223.226.123.235)
06:04:25 × luigy quits (~luigy@104.236.106.229) (Ping timeout: 240 seconds)
06:05:25 × lukelau quits (~lukelau@46.101.13.214) (Quit: Bye)
06:05:41 lukelau joins (~lukelau@46.101.13.214)
06:05:59 Amras is now known as Sarma
06:07:40 <dsal> hooper: what is the type of the area function?
06:09:12 luigy joins (~luigy@104.236.106.229)
06:14:36 × zebrag quits (~inkbottle@aaubervilliers-654-1-104-55.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
06:21:25 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 240 seconds)
06:22:37 <koz_> If you need a _closed_ set of shapes, your best bet as per glguy would be something like 'data Shape = Triangle Double Double Double | Square Double', then defining 'area :: Shape -> Double' and case-matching.
06:23:07 × aarvar quits (~foewfoiew@50.35.43.33) (Ping timeout: 246 seconds)
06:26:14 <koz_> If you need things that work for only one shape variety, you can either return Maybes, or you can do something like 'data Triangle = Triangle Double Double Double', 'data Square = Square Double', 'data Shape = ATriangle Triangle | ASquare Square', so then you can write functions that work only on triangles, only on squares, or on both.
06:27:53 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
06:29:17 bitmagie joins (~Thunderbi@200116b8063a3200b470a8e4f2a94e1e.dip.versatel-1u1.de)
06:30:01 wei2912 joins (~wei2912@unaffiliated/wei2912)
06:30:27 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
06:30:53 alx741 joins (~alx741@181.196.68.156)
06:31:00 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
06:31:44 × hooper quits (2fe3e53b@047-227-229-059.res.spectrum.com) (Ping timeout: 245 seconds)
06:32:08 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:33:55 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Client Quit)
06:34:14 Fractalis joins (~Fractalis@2601:987:280:8d40:9de1:6445:b757:a1c4)
06:34:35 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
06:34:51 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Client Quit)
06:35:13 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
06:36:09 avoandmayo joins (~textual@122-58-109-105-adsl.sparkbb.co.nz)
06:36:48 BarleyMo joins (2a02d45a@42-2-212-090.static.netvigator.com)
06:38:16 alp joins (~alp@2a01:e0a:58b:4920:954a:8bbd:83ff:d679)
06:47:18 × nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving)
06:47:30 mi23523523 joins (~Aman33333@85.253.192.47.cable.starman.ee)
06:47:49 mi23523523 is now known as Kr23523523
06:49:38 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:50:11 × DJWillis quits (~DJWillis@217.146.82.202) (Remote host closed the connection)
06:53:01 × Kr23523523 quits (~Aman33333@85.253.192.47.cable.starman.ee) (Quit: Leaving)
06:54:23 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:7958:7d8e:4908:c843) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:55:54 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
06:59:35 × quarters quits (~quarters@38-73-246-124.starry-inc.net) (Ping timeout: 256 seconds)
07:01:25 × bliminse quits (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) (Ping timeout: 264 seconds)
07:01:32 quarters joins (~quarters@38-73-246-124.starry-inc.net)
07:01:50 bliminse joins (~bliminse@host109-156-197-211.range109-156.btcentralplus.com)
07:02:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:03:31 × electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
07:04:26 × roconnor quits (~roconnor@host-104-157-230-3.dyn.295.ca) (Remote host closed the connection)
07:04:51 roconnor joins (~roconnor@host-104-157-230-3.dyn.295.ca)
07:05:45 × quarters quits (~quarters@38-73-246-124.starry-inc.net) (Ping timeout: 240 seconds)
07:06:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
07:09:30 daim2k5 joins (~daim2k5@185.204.1.185)
07:09:53 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds)
07:10:34 coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
07:18:20 <idnar> so I ran `cabal build` in my project and now if I run `cabal install` it wants to rebuild everything; how do I see why?
07:18:21 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
07:18:55 Varis joins (~Tadas@unaffiliated/varis)
07:22:53 mananamenos joins (~mananamen@84.122.202.215.dyn.user.ono.com)
07:24:18 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16)
07:25:05 <glguy> Install bundles up the source and does a build and install fresh from that sdist
07:25:38 <glguy> It won't rebuild libraries installed from hackage though
07:28:11 vicfred_ joins (~vicfred@unaffiliated/vicfred)
07:28:26 × Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer)
07:29:56 Kaeipi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
07:30:01 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
07:30:25 × alp quits (~alp@2a01:e0a:58b:4920:954a:8bbd:83ff:d679) (Ping timeout: 272 seconds)
07:31:04 × vicfred quits (~vicfred@unaffiliated/vicfred) (Ping timeout: 265 seconds)
07:32:15 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
07:32:34 dhouthoo joins (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be)
07:32:38 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
07:34:19 plutoniix joins (~q@ppp-223-24-158-101.revip6.asianet.co.th)
07:34:38 × bitmagie quits (~Thunderbi@200116b8063a3200b470a8e4f2a94e1e.dip.versatel-1u1.de) (Quit: bitmagie)
07:34:50 × borne quits (~fritjof@200116b86455d000feb15fd2865dc87d.dip.versatel-1u1.de) (Ping timeout: 264 seconds)
07:35:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:38:56 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds)
07:40:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
07:40:31 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
07:41:10 × Sgeo_ quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
07:41:46 jespada joins (~jespada@90.254.245.49)
07:42:51 <Martinsos> glguy, hooper: While I would also probably go with the approach you described, what is argument against not going with the typeclass approach? I was doing something similar recently and I had really hard time making this decision, it was mostly about trying to guess how I might extend this code later. With data types, adding a new function should be simple, but that function needs to know internals of all the shapes and has to be
07:42:51 <Martinsos> obviously in a separate module, so there is no encapsualtion there. Also, if I add a new shape, I have to modify all of these functions. With type class, I can have the `area` logic encapsualted together with the each shape, which sounds cool. If I add new shape, I don't need to modify any of the previous shapes or their logic. However if I add new method, I have to modify all of their type classes. Which actually sounds not so bad to
07:42:51 <Martinsos> me. Ok, one thing I can't do it put all these shapes in an array together, since they are different types, but I could create another data type that is just a box for them `data Shape = ShapeSquare Square | ShapeTriangle Triangle` and then make it also an instance of `IsShape` type class and I solved that problem.
07:44:18 vilpan joins (~0@212.117.1.172)
07:45:05 <Martinsos> If I am correct this is officially called "expression problem"?
07:45:59 <Martinsos> I saw some solutions in Haskell for making it extendable in both types and functions direction, but all of them were pretty complicated and it seemed to me they were not really needed in pratice often. I would rather just go with simple, pragmatic solution that does not use complicated Haskell features, at least for the moment.
07:46:16 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
07:47:05 <dminuoso> Martinsos: There's roughly two opposing properties of a language. Adding new operations and adding new data.
07:48:28 <dminuoso> In Haskell it is easy to add new operations/functions for a data type, but like you put it, adding more constructors (that is extending the data type) is hard.
07:51:54 <idnar> glguy: well, I'm seeing all the deps "needs build"; but if I rerun `cabal build` it doesn't build anything
07:52:57 <idnar> glguy: my guess is some flag like --enable-tests is changing
07:54:04 <idnar> err, "requires build"
07:56:16 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
07:56:43 raichoo joins (~raichoo@213.240.178.58)
07:59:35 invaser joins (~Thunderbi@31.148.23.125)
08:04:32 zaquest joins (~notzaques@5.128.210.178)
08:08:17 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
08:09:18 cloudster joins (~cloudster@124.123.105.47)
08:09:24 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Quit: hyiltiz)
08:09:26 cfricke joins (~cfricke@unaffiliated/cfricke)
08:09:58 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:10:02 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
08:11:32 × hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.)
08:11:53 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
08:12:17 chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
08:12:55 cloudster joins (~cloudster@124.123.105.47)
08:13:15 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
08:13:19 alp joins (~alp@2a01:e0a:58b:4920:c533:3fa3:3963:3f02)
08:13:32 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
08:14:41 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
08:14:44 cloudster joins (~cloudster@124.123.105.47)
08:14:58 × plutoniix quits (~q@ppp-223-24-158-101.revip6.asianet.co.th) (Ping timeout: 260 seconds)
08:15:30 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
08:16:36 mikevdg joins (73bd5248@115-189-82-72.mobile.spark.co.nz)
08:17:36 <mikevdg> I've got a Monad question regarding https://github.com/opqdonut/haskell-exercises/blob/master/templ/W6B.hs
08:17:50 <mikevdg> Excuse the CCPP stuff in that file. Line 676
08:17:55 <mikevdg> *CPP
08:18:24 <mikevdg> you have `where g state = let (v, state1, log) = runSL op state0`
08:18:48 <mikevdg> How is that possible? How can you say `where f x = ...` if x doesn't have a value?
08:19:05 <mikevdg> I understand you can do it for pattern matching with tuples and lists. (a, b) = f x...
08:19:17 <mikevdg> But is that possible with functions too?
08:19:40 <mikevdg> (g is (Int -> (a, Int, [String])
08:21:13 × drbean quits (~drbean@TC210-63-209-219.static.apol.com.tw) (Ping timeout: 264 seconds)
08:22:57 <koz_> mikevdg: 'where g state = ...' is basically 'where g = \state -> ...'.
08:23:02 <koz_> Is that what threw you?
08:23:08 <merijn> mikevdg: That's just defining a function
08:23:21 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
08:23:23 <mikevdg> I've been staring at this exercise for an hour.
08:23:51 <merijn> "where f x = ..." is just "defining a local function 'f' with a single argument 'x'"
08:24:08 <mikevdg> yea, that makes sense now. Now that I think about it, I do it all the time.
08:24:13 <mikevdg> double x = x * x
08:24:29 <koz_> mikevdg: Yeah - you can write that as 'double = \x -> x * x'
08:24:35 <mikevdg> f x = ... where f is some anonymous function... same pattern.
08:24:57 <mikevdg> well... it's not anonymous if you call it f.
08:25:02 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
08:25:22 <mikevdg> foo = MyMonad f where f arg = ...
08:26:54 <mikevdg> It threw me because I was defining a function that was being used as a variable.
08:27:18 plutoniix joins (~q@node-ufe.pool-125-24.dynamic.totinternet.net)
08:27:20 × Fractalis quits (~Fractalis@2601:987:280:8d40:9de1:6445:b757:a1c4) (Quit: Leaving)
08:28:29 <mikevdg> you guys are awesome.
08:28:42 <koz_> mikevdg: We try.
08:31:51 borne joins (~fritjof@200116b86455d000f1dc39039d201adf.dip.versatel-1u1.de)
08:31:52 <opqdonut> mikevdg: I hope you like the exercises! Check out https://haskell.mooc.fi which is based on the same exercises, but also contains reading material
08:32:09 <merijn> mikevdg: Well, technically it *is* defining a variable. It's just a variable that happens to be a function :)
08:32:13 <mikevdg> hey, it's the author! Sure, will do.
08:32:15 <opqdonut> mikevdg: part 1 is out, but it doesn't cover monads, part 2 will come soon(tm)
08:33:11 <guest1120> what's diffrent with <|> and >> ?
08:33:19 <merijn> guest1120: Eh, lots :p
08:33:30 <guest1120> simply?
08:33:47 <[exa]> guest1120: if you asked for *> and >> the answer would be simple, but <|> and >> differ even in type signature
08:33:49 <koz_> :t (<|>)
08:33:50 <lambdabot> Alternative f => f a -> f a -> f a
08:33:54 <koz_> :t (>>)
08:33:55 <lambdabot> Monad m => m a -> m b -> m b
08:33:58 <koz_> Simply. :P
08:33:58 <merijn> guest1120: <|> is a choice combinator, exact meaning but in, for example, parsers it's usually "left *or* right"
08:33:59 cloudster joins (~cloudster@124.123.105.47)
08:34:25 <merijn> > Just 2 <|> Just 3
08:34:27 <lambdabot> Just 2
08:34:34 <merijn> > Nothing <|> Just 3
08:34:36 <lambdabot> Just 3
08:34:40 <merijn> > Just 2 >> Just 3
08:34:42 <lambdabot> Just 3
08:34:46 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
08:34:46 <guest1120> ok
08:34:46 <merijn> > Nothing >> Just 3
08:34:48 <lambdabot> Nothing
08:34:58 <dminuoso> guest1120: Note that the "or" should be taken with a grain of salt.
08:35:00 kritzefitz joins (~kritzefit@fw-front.credativ.com)
08:36:55 <merijn> Yes
08:37:03 <merijn> > [1,2] >> [3,4]
08:37:05 <lambdabot> [3,4,3,4]
08:37:10 <merijn> > [1,2] <|> [3,4]
08:37:12 <lambdabot> [1,2,3,4]
08:37:29 <guest1120> what?
08:37:32 <koz_> merijn: I had never considered >> in a list context before.
08:38:11 <merijn> koz_: :)
08:38:15 <dminuoso> guest1120: Roughly, if you build a parser: `string "foobar" <|> string "fooquux"` and throw it against "fooquux" then depending on the parser library it might not parse.
08:38:41 <koz_> Like, upon thought it makes sense, but I guess I hardly ever use lists for their monad properties.
08:39:02 <merijn> guest1120: Alternative has <|> and empty, with the definition that "<|> is associative" and "empty is the left and right identity for <|>" so "x <|> empty = x = empty <|> x"
08:39:07 christo joins (~chris@81.96.113.213)
08:40:23 <merijn> guest1120: The exact meaning of the associative operation depends on the instance. For parsers it's usually "try left, then on failure try right", and empty is "a failing parser", but for lists it's "concatenate" with empty being the empty list
08:42:22 mikevdg reads about Data.Semigroup
08:42:56 <merijn> Semigroups are great, we should to more of those :D
08:43:41 <guest1120> dminuoso: merijn to combinate parsers, >> or <|> I should use?
08:43:45 <guest1120> I'm confused now
08:43:59 <tdammers> merijn: I propose adding that to the Zen Of Python, just to mess with Python cultists
08:44:02 <guest1120> parse (spaces >> symbol) "lisp" input
08:44:07 <merijn> guest1120: Well, that depends on what you want :)
08:44:22 <guest1120> parseExpr = parseAtom <|> parseString
08:44:25 <merijn> guest1120: "a >> b" is "a, then b", "a <|> b" is "a or b"
08:44:38 <merijn> tdammers: :)
08:44:50 <merijn> tdammers: I have more important business
08:45:02 <guest1120> merijn: ok
08:45:12 <tdammers> merijn: yeah, but would be fun, wouldn't it
08:45:13 <merijn> tdammers: Like, figure out a good name for "Monoid m => Bool -> m -> m" so I can *finally* get it into base
08:45:16 <[exa]> the kids today don't even start their first python tutorial with `import this`.
08:45:41 <mikevdg> import turtle;
08:45:57 <tdammers> [exa]: just yesterday I've seen someone argue that "oneThing if condition else otherThing" is great syntax
08:46:02 <kritzefitz> merijn, That type doesn't seem familiar to me. What would that operator do?
08:46:03 <merijn> tdammers: I'm using mif in my code now, but I'm not happy with it
08:46:25 <merijn> kritzefitz: "\b x -> if b then x else mempty"
08:46:31 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
08:46:41 <merijn> kritzefitz: It's amazing how astonishingly useful that is
08:46:45 <tdammers> if anything, I'd go with mwhen rather than mif
08:46:48 <guest1120> lex, happy, parsec, they're same?
08:47:09 <tdammers> mif suggests Monoid m => Bool -> m -> m -> m, or maybe even Monoid m => Bool -> m -> m -> m -> m
08:47:16 <merijn> tdammers: Yeah, but that leads to confusion with monad's and whenM, etc.
08:47:37 <tdammers> it's very similar to when from Control.Monad though, isn't it
08:48:04 <merijn> yeah
08:48:12 Yumasi joins (~guillaume@2a01cb09b06b29eabd8cf63c98e88a0f.ipv6.abo.wanadoo.fr)
08:48:15 <tdammers> in fact, if Monad could have the Monoid instance it deserves, it would be the exact same thing
08:48:46 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
08:49:15 hyiltiz joins (~quassel@82.118.227.47)
08:49:15 × hyiltiz quits (~quassel@82.118.227.47) (Changing host)
08:49:15 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
08:49:32 <dminuoso> guest1120: Presumably by lex you meant alex?
08:49:46 <dminuoso> guest1120: At any rate, they are all parsing/lexing libraries but with different ergonomics and properties.
08:50:03 <guest1120> dminuoso: which one is easier?
08:50:22 <dminuoso> "easier" is hard to answer in general
08:50:23 <merijn> kritzefitz: Some example uses: https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Simple/Program/GHC.hs#L203-L209 also note that from/to in the surrounding code https://github.com/haskell/cabal/blob/master/Cabal/src/Distribution/Simple/Program/GHC.hs#L174-L199 are just slightly specialised versions of that function
08:50:48 <guest1120> I'm learing parsec by write yourself a scheme with 48 hours
08:50:52 <merijn> kritzefitz: It's great for selectively including bits and pieces in complex compound structures
08:50:58 <guest1120> but some codes are old
08:50:59 <dminuoso> But `megaparsec` is a safe default for a parsing library
08:51:22 × plutoniix quits (~q@node-ufe.pool-125-24.dynamic.totinternet.net) (Quit: Leaving)
08:51:26 <dminuoso> That is, if you want a tl;dr for "which parsing library should I use", you generally cant go wrong with megaparsec.
08:51:44 <tdammers> also megaparsec > parsec in 99.9% of cases these days
08:52:08 <guest1120> but parsec comes with ghc?
08:52:20 <tdammers> does it? I don't think it does
08:52:28 <koz_> tdammers: Isn't parsec a boot library?
08:52:41 <tdammers> I thought it wasn't, but maybe it is by now
08:52:53 <guest1120> Text.Parsec?
08:53:03 <kritzefitz> merijn, It does seem useful. But I just realised thta I rarely use a lot of Monoids and now I'm wondering if I'm missing out.
08:53:18 <koz_> kritzefitz: You definitely are.
08:53:28 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
08:53:35 <koz_> You can get a remarkable range of behaviour out of foldMap by varying up your Monoids.
08:54:08 <dminuoso> guest1120: The boot libraries should not be a relevant factor for what you should use.
08:54:24 <merijn> kritzefitz: You are :p
08:54:29 <dminuoso> The fact that GHC comes with them is not for your convenience.
08:54:45 <merijn> kritzefitz: Note that the entire surrounding 150-200 lines of code I just linked is basically all composing a bunch of monoids together :p
08:55:07 <mikevdg> Haskell: A new way to break your brain every day. `mempty :: Sum Int` --> Sum {getSum = 0}
08:55:45 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-itluyvgbrrzsqlpm) (Quit: Connection closed for inactivity)
08:56:10 cloudster joins (~cloudster@124.123.105.47)
08:56:15 <merijn> mikevdg: Don't forget Dual
08:56:18 <guest1120> ok
08:56:28 <mikevdg> merijn: Dual?
08:56:28 <dminuoso> Mmm, why exactly does GHC ship with these boot packages at all? Is ghc linked dynamically?
08:56:40 <mikevdg> :t Dual
08:56:41 <lambdabot> a -> Dual a
08:56:47 <koz_> dminuoso: I think they're needed to build GHC itself?
08:57:02 <mikevdg> Is there a thing in, e.g. ghci, to also get a bit of documentation on a type?
08:57:04 <koz_> There's also Down.
08:57:09 <merijn> mikevdg: "newtype Dual a = Dual a" where "mempty = Dual mempty" and "mappend (Dual x) (Dual y) = Dual (mappend y x)"
08:57:09 <koz_> @hoogle Dual
08:57:10 <lambdabot> Data.Monoid newtype Dual a
08:57:10 <lambdabot> Data.Monoid Dual :: a -> Dual a
08:57:10 <lambdabot> Data.Semigroup newtype Dual a
08:57:10 <kritzefitz> The first thing that comes to minds, when I think about monoids, is that WriterT uses Monoids for the written things. So if I want to collect elements into a list it degrades (:) to (++) and that bother me. But I guess I'm just thinking about this the wrong way.
08:57:13 <mikevdg> Or do I have to go to Hoogle?
08:57:28 <merijn> > [1,2,3] <> [4,5,6]
08:57:30 <lambdabot> [1,2,3,4,5,6]
08:57:34 <merijn> > Dual [1,2,3] <> Dual [4,5,6]
08:57:37 <lambdabot> Dual {getDual = [4,5,6,1,2,3]}
08:57:41 <koz_> :D
08:57:56 <koz_> Another cool Monoid: Ordering.
08:58:00 <merijn> kritzefitz: There's more monoids than lists, though
08:58:11 <merijn> koz_: You're forgetting the *best* Monoid
08:58:15 <koz_> Lists are actually a very uninteresting monoid.
08:58:18 <dminuoso> koz_: Oh mmm. I was somehow under the impression that a GHC installation somehow came with these packages
08:58:22 <koz_> merijn: (Monoid b) => a -> b?
08:58:29 <merijn> koz_: Of course
08:58:56 <koz_> newtype MonoidInjection a b :P
08:59:02 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
08:59:12 <guest1120> why there're <> and ++ two ways to do the same thing?
08:59:24 <merijn> :t (++)
08:59:25 <dminuoso> guest1120: (<>) is more general than ++
08:59:25 <lambdabot> [a] -> [a] -> [a]
08:59:27 <kritzefitz> merijn, sure there are. But I guess I'm missing the familiarity with Monoids to recognize when their properties would actually be useful to me.
08:59:29 <merijn> :t (<>)
08:59:29 <koz_> guest1120: (++) is list-only, while <> will work for any Semigroup.
08:59:30 <lambdabot> Semigroup a => a -> a -> a
08:59:40 <Martinsos> dminuoso: So specifically for that example with shapes, which one do you think is a better approach? Data types or type classes? And why?
09:00:00 <merijn> kritzefitz: Note that the monoid that koz_ mentioned "instance Monoid m => Monoid (r -> m)" applies recursively :)
09:00:05 × micahsovereign[m quits (micahsover@gateway/shell/matrix.org/x-pdyvnptozmxbustx) (Quit: Idle for 30+ days)
09:00:08 × hnOsmium0001[m] quits (hnosmium00@gateway/shell/matrix.org/x-uzbrsqhjgvjvnext) (Quit: Idle for 30+ days)
09:00:09 <merijn> :t comparing fst
09:00:10 <lambdabot> Ord a => (a, b) -> (a, b) -> Ordering
09:00:20 <merijn> :t comparing snd <> comparing fst
09:00:22 <lambdabot> (Ord a1, Ord a2) => (a2, a1) -> (a2, a1) -> Ordering
09:00:27 <dminuoso> Martinsos: It's hard to say with that little information.
09:00:34 <koz_> It's quite context-specific.
09:01:06 <merijn> > sortBy (comparing fst) [(1,2), (2,2), (1,1), (2,1)]
09:01:08 <lambdabot> [(1,2),(1,1),(2,2),(2,1)]
09:01:19 <Martinsos> dminuoso: you mean to say it depends on which extension is important for us, what we might need in the future?
09:01:30 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
09:01:40 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
09:01:47 <merijn> > sortBy (comparing snd) [(1,2), (2,2), (1,1), (2,1)]
09:01:47 <merijn> > sortBy (comparing <> comparing snd) [(1,2), (2,2), (1,1), (2,1)]
09:01:47 <merijn> eh, whoops
09:01:47 <merijn> > sortBy (comparing fst <> comparing snd) [(1,2), (2,2), (1,1), (2,1)]
09:01:50 <lambdabot> [(1,1),(1,2),(2,1),(2,2)]
09:01:50 <lambdabot> [(1,1),(2,1),(1,2),(2,2)]
09:01:50 <lambdabot> error:
09:01:50 <lambdabot> • Couldn't match type ‘(a, a1) -> Ordering’ with ‘Ordering’
09:01:50 <lambdabot> Expected type: (a, a1) -> (a, a1) -> Ordering
09:01:58 <dminuoso> Martinsos: In general, if you want something extensible covering the expression problem, then tagless final or datatypes a la carte are common approaches in Haskell
09:02:15 <merijn> > sortBy (comparing snd <> comparing fst) [(1,2), (2,2), (1,1), (2,1)]
09:02:17 <lambdabot> [(1,1),(2,1),(1,2),(2,2)]
09:02:22 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
09:02:28 <koz_> Those are _very_ nuclear hammers.
09:03:19 <Martinsos> dminuoso: hmmm thanks, I will have to investigate those! I think I was reading datatypes a la carte but concluded I don't need that complexity right now. I guess what I am wondering, when somebody asks "should I do this with data types or type classes", and information is relatively simple (like that example with shapes), what is the correct answer? Probably: do it with data types since that is the simplest / least code, and let's see
09:03:19 <Martinsos> how it evolves?
09:03:41 <merijn> kritzefitz: Note how the monoid for functions lets you monoidally combine functions, regardless of number of arguments, which is especially neat with Ordering allowing for arbitrarily complex sorting criteria
09:04:24 <dminuoso> Martinsos: So Im in a similar spot, I've solved the expression problem in this particular project with "have a code generator" and if people want to extend my data type, they have to make a PR and Ill rerun the code generator. :p
09:04:24 Chi1thangoo joins (~Chi1thang@87.112.60.168)
09:04:51 <dminuoso> For this particular project.
09:04:52 <kritzefitz> merijn, indeed, that is a very nice Monoid. I wasn't aware it existed.
09:05:02 <dminuoso> There is no correct answer really
09:05:13 <dminuoso> But roughly I'd avoid typeclasses if you are not sure they will help you
09:05:32 <dminuoso> Often, the expression problem is not as bad as it seems
09:06:00 Feuermagier joins (~Feuermagi@213.178.26.41)
09:06:22 comerijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:07:13 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Remote host closed the connection)
09:07:33 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
09:07:57 <Martinsos> dminuoso: thanks! I think that sounds like a good rule, avoid typeclass if not needed, and in most cases the problem will not actually be problematic. Cool, thank you
09:08:12 <koz_> Yeah - the reality is that All The Extensibility All The Time isn't helpful, and in some cases, it'll even slow you down.
09:08:17 ph88 joins (~ph88@2a02:8109:9e00:7e5c:f073:c081:c2ef:433b)
09:08:19 <koz_> Over-generalizing early can be pretty bad.
09:08:32 <hololeap> is Show1 derivable in GHC 8.8.4?
09:08:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
09:08:52 <koz_> hololeap: I don't think *1 is derivable for any * in any version?
09:08:56 <[exa]> kritzefitz: btw, my favorite example with function semigroup is `rotList = drop <> take` (even with multiple parameters)
09:09:09 acidjnk_new2 joins (~acidjnk@p200300d0c719ff35956387e811e01df5.dip0.t-ipconnect.de)
09:09:15 <dminuoso> [exa]: That example was pretty cool :)
09:09:34 <koz_> kritzefitz: For a recent Real Job For Real Money example from me - I used Monoid to implement 'find exactly one' with error handling.
09:09:42 <hololeap> koz_, ok i ask because it is listed here: https://github.com/haskell-compat/deriving-compat
09:09:47 comerijn is now known as merijn
09:09:52 × BarleyMo quits (2a02d45a@42-2-212-090.static.netvigator.com) (Remote host closed the connection)
09:09:57 <hololeap> "Provides Template Haskell functions that mimic deriving extensions that were introduced or modified in recent versions of GHC."
09:10:08 supercoven joins (~Supercove@dsl-hkibng31-54fae2-36.dhcp.inet.fi)
09:10:13 <koz_> The Monoid in question is something like 'data FindExactlyOne a = NoneFound | OneFound a | TooManyFound'.
09:10:20 × Kaeipi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
09:10:26 Merfont joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
09:10:38 <koz_> (the instances of Semigroup and Monoid are left as an exercise to the reader)
09:11:03 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
09:12:01 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
09:12:17 <merijn> the more you use Semigroup/Monoid/foldMap, the more use you see for them :)
09:12:25 cfricke joins (~cfricke@unaffiliated/cfricke)
09:12:29 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
09:12:40 <koz_> Realistically, it's {M,m}onoids all the way down?
09:12:40 <merijn> koz_: Did you see the glorious addition of foldMap' ? (*finally*)
09:12:46 <koz_> merijn: Where?
09:12:46 <kritzefitz> koz_, I think I remember having a similar problem. Now I realize that, semantically I also implemented a Monoid but didn't really use the typeclass for that. So I guess those are the kinds of opportunities I should look out for.
09:12:52 <merijn> koz_: In base :)
09:12:57 <koz_> kritzefitz: It gets easier with practice.
09:13:05 <koz_> merijn: No I did not. Indeed, *finally*.
09:13:06 <mikevdg> opqdonut: I've just read through some parts of your MOOC. If I earn 5 ECTS, what can I use them for?
09:13:07 <merijn> koz_: GHC 8.8 or 8.10 added it?
09:13:28 <koz_> hololeap: I wasn't aware *1 could be derived automagically at all.
09:14:16 <hololeap> well, deriving Show1 with that GHC version not working for me
09:14:19 <mikevdg> opqdonut: and is there a fancy certificate at the end? :-)
09:14:39 <koz_> hololeap: I don't even know how it would work with any version. I'm pretty sure that's not stock derivable at least.
09:14:40 jess joins (jess@freenode/staff/jess)
09:17:01 benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-fmpqsizgoykkkpyq)
09:17:53 <idnar> :t foldMap'
09:17:54 <lambdabot> (Foldable t, Monoid m) => (a -> m) -> t a -> m
09:18:03 <idnar> :t foldMap
09:18:04 <lambdabot> (Foldable t, Monoid m) => (a -> m) -> t a -> m
09:18:12 <idnar> wut
09:18:17 <koz_> idnar: The type sig won't tell you the difference.
09:18:23 <merijn> idnar: foldMap' is strict
09:18:59 <idnar> ohhh right, I was thinking foldMap_
09:19:10 <dminuoso> Also, foldMap' by default associates differently internaly
09:19:14 <dminuoso> By default
09:19:25 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
09:19:27 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
09:19:30 <merijn> koz_: Now I just need a strict tuple to go with that :p
09:20:26 <kritzefitz> Strict tuples would be so great.
09:20:42 <koz_> merijn: So like, 'data StrictTuple a b = StrictTuple !a !b'?
09:21:27 cloudster joins (~cloudster@124.123.105.47)
09:22:09 <kritzefitz> I guess you could use it to break the internals of lots of types, but it seems like it could be nice, if you could provide strictness as part of type parameters.
09:23:01 <kritzefitz> e.g. `[!Int]` would be a list, where the elements would be evaluated with the spine.
09:24:33 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
09:24:42 × Merfont quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
09:25:01 Merfont joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
09:25:20 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
09:26:47 cloudster joins (~cloudster@124.123.105.47)
09:27:24 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
09:27:26 × mikevdg quits (73bd5248@115-189-82-72.mobile.spark.co.nz) (Remote host closed the connection)
09:28:03 × Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 256 seconds)
09:29:04 thc202 joins (~thc202@unaffiliated/thc202)
09:29:58 <dminuoso> kritzefitz: Indeed it would be cool, we could then write strictness polymorphic code akin to levity polymorphism.
09:30:19 christo joins (~chris@81.96.113.213)
09:30:25 <merijn> dminuoso: I've already floated that idea a bunch of times :p
09:30:34 × cloudster quits (~cloudster@124.123.105.47) (Remote host closed the connection)
09:30:48 <dminuoso> Any plans after your M.Sc? :>
09:30:55 <dminuoso> Seems like the perfect PhD thesis.
09:30:57 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
09:31:08 <merijn> dminuoso: My M.Sc. was finished literal *years* ago
09:31:11 <dminuoso> Oh
09:31:14 <dminuoso> Hold on
09:31:33 <merijn> It's my PhD thesis I'm procrastinating on :p
09:32:03 <dminuoso> Well, what about a second PhD then!
09:32:08 <merijn> hah
09:32:10 oish joins (~charlie@228.25.169.217.in-addr.arpa)
09:32:12 <merijn> never >.>
09:32:37 dminuoso wonders whether a second doctor entitles you to being called "Doctor Doctor"
09:32:47 <koz_> dminuoso: Doctor Squared.
09:32:55 <dminuoso> heh
09:32:56 <merijn> I'm already drs. :p
09:33:14 <dminuoso> merijn: This is honestly so confusing. Why are you already dr?
09:33:21 <merijn> Which sadly, is not the plural of dr
09:33:25 <dminuoso> oh
09:33:27 <dminuoso> haha
09:33:29 <dminuoso> what is drs then?
09:33:51 <merijn> dminuoso: drs is doctorandus, it's roughly equivalent to MSc. from the time before EU standardized on bachelor/master
09:34:07 <dminuoso> Ah, presumably its similar to Dipl. in Germany
09:34:19 vsiddharth joins (~user@135-180-144-154.fiber.dynamic.sonic.net)
09:34:29 <merijn> But since I started university before that switch I'm entitled to use either drs or MSc. as I see fit
09:34:38 <pjb> dminuoso: IMO, doctor titles sum, not multiply.
09:34:49 <merijn> Anyway
09:35:08 <merijn> Only morons do a phd, I'm not sure what kinda idiot you gotta be to do *two* of the damn things
09:35:37 <dminuoso> pjb: addition/multiplication are relative. In fact, there are fields in math in which b^2 and 2*b denote the same thing
09:35:46 <merijn> otoh, if your dumb and stubborn enough to start a 2nd phd, I guess you'd be dumb and stubborn enough to make it
09:35:52 <pjb> merijn: when you want to advance two fields. For example, Elon Musk could be doctor in car batteries, and doctor in rocket engines.
09:35:53 <merijn> s/your/you're
09:36:18 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
09:36:38 <dminuoso> pjb: PhDs dont advance you.
09:36:56 <pjb> merijn: no, it advances science.
09:37:00 <merijn> hah
09:37:03 <dminuoso> "advances science"
09:37:07 <merijn> I like your optimism :)
09:37:32 Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se)
09:37:32 × hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds)
09:38:05 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
09:38:16 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 240 seconds)
09:38:42 oish joins (~charlie@228.25.169.217.in-addr.arpa)
09:39:03 <dminuoso> Much of academia follows "publication creep" where you're pushed to publish as often as possible in magazines with high impact factors.
09:39:16 <dminuoso> The primary motivation is not science, it's just money.
09:40:08 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
09:40:21 <dminuoso> It's getting increasingly difficult to filter out the useless, irrelevant or (semi-)plagiarized publications if you want to do some work in a field
09:40:23 × avoandmayo quits (~textual@122-58-109-105-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:40:30 hackage Z-IO 0.1.8.0 - Simple and high performance IO toolkit for Haskell https://hackage.haskell.org/package/Z-IO-0.1.8.0 (winterland)
09:40:40 <merijn> dminuoso: Oh, I got a simple hack for that
09:41:04 <merijn> dminuoso: I just assume it's irrelevant and don't read it ;)
09:42:55 <hololeap> the TH generated Show1 instance from deriving-compat seems to work fine
09:43:52 <hololeap> although i have to put the `$(deriveShow1 ''Foo)` line at the very bottom... template haskell is weird
09:49:52 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 272 seconds)
09:50:13 Ariakenom joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
09:51:01 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
09:51:37 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
09:52:39 <c_wraith> a top-level TH splice separates the file into what's sort of multiple compilation units. It resolves names from before the splice, then does the splice with only those names in context, then looks at the rest of the file.
09:53:20 oish joins (~charlie@228.25.169.217.in-addr.arpa)
09:55:46 Aquazi joins (uid312403@gateway/web/irccloud.com/x-kwmvlnupagfhstlw)
09:59:11 ubert joins (~Thunderbi@p200300ecdf1e5355e6b318fffe838f33.dip0.t-ipconnect.de)
10:00:35 Rudd0 joins (~Rudd0@185.189.115.98)
10:03:08 ph88^ joins (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de)
10:03:10 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 272 seconds)
10:03:10 knupfer joins (~Thunderbi@200116b824bb7e005406fbfffe2fdbcc.dip.versatel-1u1.de)
10:03:12 × knupfer quits (~Thunderbi@200116b824bb7e005406fbfffe2fdbcc.dip.versatel-1u1.de) (Client Quit)
10:03:25 knupfer joins (~Thunderbi@i5E86B41D.versanet.de)
10:04:57 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
10:05:16 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
10:05:42 hidedagger joins (~nate@unaffiliated/hidedagger)
10:05:56 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
10:06:21 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
10:07:14 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:f073:c081:c2ef:433b) (Ping timeout: 264 seconds)
10:07:19 × Feuermagier_ quits (~Feuermagi@213.178.26.41) (Quit: Leaving)
10:11:22 DavidEichmann joins (~david@62.110.198.146.dyn.plus.net)
10:12:33 jpds joins (~jpds@gateway/tor-sasl/jpds)
10:16:18 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
10:19:35 × guest1120 quits (~user@49.5.6.87) (Quit: ERC (IRC client for Emacs 27.1))
10:20:36 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 256 seconds)
10:22:36 × vsiddharth quits (~user@135-180-144-154.fiber.dynamic.sonic.net) (Ping timeout: 240 seconds)
10:25:55 gienah joins (~mwright@gentoo/developer/gienah)
10:30:56 kuribas joins (~user@ptr-25vy0i7lmmi4jlxzmxu.18120a2.ip6.access.telenet.be)
10:34:22 <merijn> c_wraith: Except a bug made it work for several years with classes >.>
10:34:57 fendor_ joins (~fendor@77.119.129.57.wireless.dyn.drei.com)
10:36:09 × Zetagon quits (~leo@c151-177-52-233.bredband.comhem.se) (Ping timeout: 260 seconds)
10:36:49 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
10:37:37 × fendor quits (~fendor@178.165.131.185.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
10:39:03 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
10:39:19 shatriff joins (~vitaliish@176.52.219.10)
10:41:22 × pong quits (chiya@2406:3003:2077:2341::babe) (Ping timeout: 260 seconds)
10:41:58 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
10:42:34 pong joins (chiya@2406:3003:2077:2341::babe)
10:46:24 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
10:47:47 × darjeeling_ quits (~darjeelin@122.245.211.11) (Ping timeout: 265 seconds)
10:50:26 __monty__ joins (~toonn@unaffiliated/toonn)
10:51:56 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds)
10:53:21 hidedagger joins (~nate@unaffiliated/hidedagger)
10:54:24 × alp quits (~alp@2a01:e0a:58b:4920:c533:3fa3:3963:3f02) (Ping timeout: 240 seconds)
10:57:16 × knupfer quits (~Thunderbi@i5E86B41D.versanet.de) (Ping timeout: 240 seconds)
10:57:23 ClaudiusMaximus joins (~claude@198.123.199.146.dyn.plus.net)
10:57:58 × ClaudiusMaximus quits (~claude@198.123.199.146.dyn.plus.net) (Changing host)
10:57:58 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
11:00:16 × jwynn6 quits (~jwynn6@050-088-122-078.res.spectrum.com) (Ping timeout: 240 seconds)
11:02:02 darjeeling_ joins (~darjeelin@122.245.211.11)
11:04:46 jwynn6 joins (~jwynn6@050-088-122-078.res.spectrum.com)
11:08:02 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
11:09:02 × prez quits (~prez@unaffiliated/prez) (Quit: znc)
11:10:04 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
11:12:53 solonarv joins (~solonarv@astrasbourg-653-1-156-4.w90-6.abo.wanadoo.fr)
11:13:50 × Alleria_ quits (~AllahuAkb@2604:2000:1484:26:ef:21ba:eb1b:b066) (Ping timeout: 264 seconds)
11:14:25 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
11:17:15 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
11:18:24 Franciman joins (~francesco@host-79-27-199-238.retail.telecomitalia.it)
11:19:46 × solonarv quits (~solonarv@astrasbourg-653-1-156-4.w90-6.abo.wanadoo.fr) (Quit: Lost terminal)
11:21:37 × rprije quits (~rprije@124.148.131.132) (Ping timeout: 265 seconds)
11:22:58 solonarv joins (~solonarv@astrasbourg-653-1-156-4.w90-6.abo.wanadoo.fr)
11:23:47 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
11:25:04 gproto23 joins (~gproto23@unaffiliated/gproto23)
11:27:56 cosimone joins (~cosimone@2001:b07:ae5:db26:d821:4868:b9f6:2909)
11:28:14 sszark joins (~sszark@h-213-180.A392.priv.bahnhof.se)
11:28:25 invaser joins (~Thunderbi@31.148.23.125)
11:28:43 vilpan parts (~0@212.117.1.172) ()
11:29:44 <sszark> I'm extending an existing module by re-exporting it along with my own additions. Is there a way to export the whole scope in a module instead of declaring everything?
11:30:17 <tdammers> yes. you can do whole-module reexports
11:30:28 <tdammers> module Foo where (module Bar); import Bar
11:31:46 × cosimone quits (~cosimone@2001:b07:ae5:db26:d821:4868:b9f6:2909) (Client Quit)
11:32:27 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
11:33:00 cosimone joins (~cosimone@2001:b07:ae5:db26:d821:4868:b9f6:2909)
11:33:16 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 240 seconds)
11:33:38 <ClaudiusMaximus> can you do module Foo where (module Bar, module Foo) ; import Bar ; foo = 3 -- to export everything from Foo too? i haven't tested...
11:35:05 climber joins (3d044c81@61.4.76.129)
11:35:35 × cosimone quits (~cosimone@2001:b07:ae5:db26:d821:4868:b9f6:2909) (Client Quit)
11:35:38 <tdammers> IIRC yes
11:35:54 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
11:36:00 <ski> Martinsos : i think it's good to think of it as first considering sum/variant types (with pattern-matching) ("FP") vs. product/record types (with "message-dispatching") ("OO"), these two being more directly comparable
11:37:25 × pong quits (chiya@2406:3003:2077:2341::babe) (Ping timeout: 272 seconds)
11:38:07 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:39:17 alp joins (~alp@2a01:e0a:58b:4920:d884:ceaa:fae:7708)
11:40:02 × Yumasi quits (~guillaume@2a01cb09b06b29eabd8cf63c98e88a0f.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
11:42:16 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
11:43:50 pong joins (chiya@2406:3003:2077:2341::babe)
11:44:26 × pong quits (chiya@2406:3003:2077:2341::babe) (Max SendQ exceeded)
11:45:29 pong joins (chiya@2406:3003:2077:2341::babe)
11:46:08 × pong quits (chiya@2406:3003:2077:2341::babe) (Max SendQ exceeded)
11:47:36 Guest31037 joins (chiya@2406:3003:2077:2341::babe)
11:47:58 Guest31037 is now known as cawfee
11:49:21 m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de)
11:49:32 <sszark> thank you tdammers ClaudiusMaximus
11:51:05 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
11:55:19 × In0perable quits (~PLAYER_1@fancydata.science) (Quit: All your buffer are belong to us!)
11:55:25 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
11:59:06 Alleria_ joins (~AllahuAkb@69.202.254.168)
12:00:23 sMuNiX joins (~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca)
12:01:56 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
12:07:51 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
12:11:26 <merijn> sszark, ClaudiusMaximus: In fact you can even import only *part* of Foo and re-export that part
12:11:54 bitmagie joins (~Thunderbi@200116b8063a3200b470a8e4f2a94e1e.dip.versatel-1u1.de)
12:13:48 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection)
12:15:18 <Martinsos> ski: I didn't quite get where you are getting with this, would you mind giving me more details/context? How would that fit into deciding how to represent those Shapes / expressin problem?
12:15:46 <dexterfoo> Is "ViewPatterns" GHC extension good?
12:16:25 <ski> dexterfoo : it can be useful, sometimes
12:16:47 jrm joins (~jrm@freebsd/developer/jrm)
12:17:01 gxt joins (~gxt@gateway/tor-sasl/gxt)
12:17:28 <ski> (avoiding an explicit `case'. being able to fall-through to a later defining equation, if the "secondary" match fails)
12:18:59 × bitmagie quits (~Thunderbi@200116b8063a3200b470a8e4f2a94e1e.dip.versatel-1u1.de) (Quit: bitmagie)
12:19:53 <ski> Martinsos : consider your type `Shape'. you want shapes to come in different alternative variants, such as circle,rectangle,&c. and you also want shapes to have various properties like perimeter,area,&c.
12:21:08 <Martinsos> ski: exactly, we want them to have some common interface, but also to be able to work with them individually. I think we can add that we also want to be able to put them all together in a list.
12:21:25 <ski> so, for each alternative kind of shape, you need to have an implementation of each property. imagine schematically displaying this in a table. the rows are your different alternatives, the columns are your different properties
12:22:15 <Martinsos> ski: sure, makes sense
12:24:12 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
12:24:34 <ski> the "OO" approach, the product/record types approach, is to slice your table into separate rows. each row becomes a function (a "constructor" in OO terms), that takes whatever parameters the alternative requires (like radius, or width & height), and returns a record with one implementation for each property (each "method"). in OO terminology, this is a class (with a class constructor taking tha parameters)
12:24:40 <ski> that implements the `Shape' interface (or inherits from the (hopefully abstract) base class `Shape', if you must)
12:25:26 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
12:25:42 × climber quits (3d044c81@61.4.76.129) (Remote host closed the connection)
12:25:57 <Martinsos> ski: Sure, still following! Sorry I will stop writing, if I don't write anything it means I am following :D
12:25:59 <ski> the "FP" approach, the sum/variant types approach, is to slice your table into separate columns. each column (each property) becomes a pattern-matching function that checks which alternative kind of shape it's given, and computes the property for that case
12:26:41 <Martinsos> Aha got it
12:27:03 <ski> the alternatives becomes the data constructors of your sum / variant / algebraic data type
12:27:11 <Martinsos> And while product approach is more natural / nicer for OO, sum/variatns approach is more natural/nicer for FP?
12:27:43 <Martinsos> We could say that first one groups logic by variant, whiel second one groups logic by operation?
12:28:25 <ski> now, in the "OO" approach, if you want to add another kind of alternative, that's easy, just define a new record-producing operation / define a new OO class. but if you want to add another property, now you must edit all the existing classes
12:28:40 pjb parts (~t@2a01cb04063ec500fcb709f072569e15.ipv6.abo.wanadoo.fr) ("ERC (IRC client for Emacs 27.1)")
12:29:13 <ski> while, in the "FP" approach, if you want to add another property, that's easy, you just define a new pattern-matching function. but if you want to add another alternative, you now have to edit all the existing pattern-matching functions
12:30:48 <Martinsos> ski: I knew about the extendibility perspective, but what I didn't know is that one is considered OO approach while another is considered FP approach. I get it that that is also incorrect, to call them like that, but it does give an interesting perspective.
12:30:52 FreeBirdLjj joins (~freebirdl@101.228.42.108)
12:31:38 <Martinsos> ski: But to me implementing "OO" approach in Haskell doesn't seem much harder, we can do it with type classes right? Although it does require more code so I guess that makes it less elegant and therefore the variant approach is more of a "FP" approach?
12:31:38 <ski> Martinsos : exercise : define (FP) a sum type `ShapeS' with alternatives `CircleS',`RectangleS', and pattern-matching functions `perimeterS',`areaS'. then define (OO) a product type `ShapeP' with fields `perimeterP',`areaP' and record-consatructing operations `circleP',`rectangleP'
12:32:15 <ski> note that if you want a property/method that takes additional parameters, that's just a field that's a function
12:32:37 <Martinsos> ski: Ok here you are basically implementing type classes manually right?
12:33:28 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:6c06:f0fd:283a:1f37:de16) (Read error: Connection reset by peer)
12:33:44 <Martinsos> ski: Thanks, I get the examples! I have been playing with both examples previously so I did try them in practice, but I was still wondering is, which one is better, if one does not have a ton of information on how the codebase will evolve? I guess the "FP" is simpler and therefore maybe preferred as the first try.
12:33:51 <ski> also note that pattern-matching allows you to match on nested patterns, and on multiple parallel patterns, not just a single level of alternatives. also, if you throw recursive types into the mix, it can get more interesting/complicated. but the above should hopefully showoff the basic duality between sum types and product types
12:34:09 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
12:34:16 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
12:34:50 <ski> it's not about either one or the other, you want to have both available to you. sometimes one is more appropriate, sometimes the other. sometimes you can envisage alternatives being changed or added to (or removed from) more often than properties. sometimes the other way around
12:35:10 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 246 seconds)
12:35:33 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
12:36:18 <Martinsos> ski: Thanks for detailed explanation, it is clearer now!
12:36:46 Entertainment joins (~entertain@104.246.132.210)
12:37:03 <Martinsos> ski: for the Shape problem, which one would you use? If you don't know in which direction you will be adding more (operations or variants)? Probably with sum type since it is simpler and we don't have info for either?
12:37:25 <ski> Martinsos : "And while product approach is more natural / nicer for OO, sum/variatns approach is more natural/nicer for FP?" -- FP languages have tended to emphasize sum types more. it seems it's only now that sum types with pattern-matching are starting to seep out into more mainstream languages. for a long time, there's been an OO dogma that using `switch' or `instanceof' is bad (and the latter is bad, i'd
12:37:31 <ski> argue. but the motivation for wanting to use it is valid, the problem people want to address is real)
12:38:25 Tario joins (~Tario@201.192.165.173)
12:39:55 <ski> and so, you've gotten the VisitorPattern for (clumsily & verbosily) simulating/encoding sum types with pattern-matching, in OO. it's basically just a CPS / Church encoding of sum types. `A + B' being encoded as `forall o. (A -> o) * (B -> o) -> o'. `(A -> o) * (B -> o)' is the visitor, it's the branches of a `case'-`of', packaged up together
12:40:11 × daim2k5 quits (~daim2k5@185.204.1.185) (Remote host closed the connection)
12:41:20 enoq joins (~textual@194-208-146-143.lampert.tv)
12:41:30 <ski> Martinsos : "We could say that first one groups logic by variant, whiel second one groups logic by operation?" -- yes (although the way i'm using the term "operation" is more like in the Abstract Data Type sense. so i'd probably say "property"/"method" instead of "operation", in your characterization)
12:43:59 <ski> "one is considered OO approach while another is considered FP approach. I get it that that is also incorrect, to call them like that, but it does give an interesting perspective." -- they're crude terms, there's more to FP and OO than this. but it does place the finger on some important differences between how both tends to be used, and it's a quick way to get the point across. if someone already understands
12:44:05 <ski> what are product/record types, and what are sum/variant types, then i'd probably prefer using those terms instead of "OO" and "FP"
12:44:27 <joel135> . o O (interaction laws https://youtu.be/LHIKGC_oxFA?t=801)
12:44:28 mlugg joins (c3c2162d@195.194.22.45)
12:44:45 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 240 seconds)
12:45:53 <ski> Martinsos : "But to me implementing \"OO\" approach in Haskell doesn't seem much harder, we can do it with type classes right?" -- you may note that i haven't mentioned type classes at all. (and the main reason i started talking about this now was to steer you away from comparing with type classes right away). if you do the exercise i suggested, you should not be defining any type classes at all, nor making
12:45:59 <ski> any instances of any such
12:46:52 <cads> hey would anyone be willing to pair program with me and show me how they set up and deploy a haskell based microservice?
12:47:09 <cads> say, something that I can send a string to, and it'll send me back the Sha3-512
12:47:17 <cads> asking a lot
12:47:23 <cads> whadda say?
12:48:06 <ski> Martinsos : and yes, doing the product/record types approach in Haskell is not that hard (but perhaps it must be pointed out to someone that it's possible, if it doesn't occur immediately as an alternative). which is another reason the "FP" term is crude. as is the "OO" term, since OO tends to also include things like implementation inheritance, and open recursion. you can do those in Haskell as well, but
12:48:12 <ski> you have to do a little bit more work (especially for open recursion)
12:48:41 gproto023 joins (~gproto23@unaffiliated/gproto23)
12:49:02 <ski> Martinsos : "Ok here you are basically implementing type classes manually right?" -- emphatically no
12:49:16 <cads> in return, I can offer to close a bug report in a python script of your choice (within 1 to 2 hours of labor)
12:49:43 mlugg76 joins (68eeaaef@104.238.170.239)
12:49:49 <absence> why can i pass a (forall a. IsString a => a) to a function that expects String?
12:49:51 niko joins (~niko@freenode/staff/ubuntu.member.niko)
12:50:09 <merijn> absence: Because "instance IsString String"? :)
12:50:17 <merijn> :t fromString "foo"
12:50:19 <lambdabot> IsString a => a
12:50:25 <merijn> > fromString "foo" :: String
12:50:27 <lambdabot> "foo"
12:50:31 <ski> absence : because it has type `a', for every type `a' that is an instance of `IsString'. and since `String' is such a type, your input (also) has type `String'
12:50:38 <mlugg76> (the other mlugg is a timed-out me, sorry!) Can you define a typeclass instance for a type family? E.g. if I have a type family like https://termbin.com/o4le, since every instance of the family has a `Show` instance, can I make `show :: Foo a -> String` valid?
12:50:54 × mlugg quits (c3c2162d@195.194.22.45) (Ping timeout: 245 seconds)
12:50:58 <merijn> mlugg76: "no"
12:51:12 mlugg76 is now known as mlugg
12:51:14 <merijn> mlugg76: Because a type family is basically a type level function
12:51:16 <ski> if
12:51:21 <ski> foo :: forall a. IsString a => a
12:51:23 da39a3ee5e6b4b0d joins (~da39a3ee5@mx-ll-171.5.161-165.dynamic.3bb.co.th)
12:51:23 <ski> then also
12:51:29 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds)
12:51:32 <absence> merijn, ski: ah, so the fact that the function expects String forces the a to be String via the instance, that makes sence. thanks!
12:51:33 <ski> foo :: IsString String => String
12:51:37 <mlugg> merijn: okay, ty
12:51:45 <ski> and since `IsString String' holds, we further have
12:51:49 <ski> foo :: String
12:52:00 <merijn> mlugg: Basically "Foo a" is not a parameteric type, it's "the result of the Foo type family applied to 'a'"
12:52:19 <ski> absence : so, you're specializing your (overloaded) polymorphic value, to type `String', before passing it to the function. you're passing a `String'
12:52:34 <merijn> mlugg: So if you have "type instance Foo Bool = Int" (or whatever the right syntax is, then "Foo Bool" isn't 'Foo' (with it's instance) it's "Int"
12:52:52 <ski> absence, yep
12:54:55 <ski> Martinsos : btw, you might note that with `Circle = Double',`Rectangle = Double * Double', you have `ShapeS = Circle + Rectangle'. similarly, with `Perimeter = Double',`Area = Double', you have `ShapeP = Perimeter * Area'
12:56:05 ski . o O ( <https://en.wikipedia.org/wiki/Additive_category#Matrix_representation_of_morphisms> )
12:56:45 Chi1thangoo joins (~Chi1thang@87.112.60.168)
12:57:08 kritzefitz joins (~kritzefit@fw-front.credativ.com)
12:58:36 <ski> MarcelineVQ : "which one is better, if one does not have a ton of information on how the codebase will evolve?" -- i'm not sure there's a good general answer to this. "it depends"
12:58:40 <ski> er, sorry
12:58:44 <ski> Martinsos ^
13:00:02 directhex1 joins (~directhex@195.206.169.184)
13:00:59 <Martinsos> ski: Thanks for all these explanations, this is great! Hm hm hm. I will try to play with the example more later, but I think I do get the concept. I don't quite understand the problem with recursion, but I can tackle that once I encounter it. And thanks for that link, I will check it in more depth.
13:01:50 <ski> Martinsos : you can also compare sum/variant/"FP" vs. product/record/"OO" with Deep vs. Shallow embedding, see <https://wiki.haskell.org/Embedded_domain_specific_language>. in this comparision, think of the record version as usually having just one field, but there's nothing stopping someone from doing a shallow embedding with "multiple alternative interpretations" (perhaps a "main/intended" one, and some
13:01:56 <ski> auxilary ones)
13:02:20 gproto0023 joins (~gproto23@unaffiliated/gproto23)
13:02:20 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
13:02:27 <Martinsos> ski++
13:02:30 texasmynsted joins (~texasmyns@212.102.45.109)
13:02:39 ski twitches
13:03:24 × acidjnk_new2 quits (~acidjnk@p200300d0c719ff35956387e811e01df5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
13:04:25 × gproto023 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds)
13:05:04 urodna joins (~urodna@unaffiliated/urodna)
13:06:10 <ski> e.g. for an idiomatic/applicative parser, you could both compute the main parsing action, that is fed parsing input, and does its work. but also compute, "on the side" ("statically", before parsing even starts), `NULLABLE' (can it succeed, consuming no input),`FIRST' (what are the possible tokens that could start an input that is accepted by the parser), for efficiency purposes
13:08:27 <ski> or, i once did a CGI monad thing, that contained a "play" and a "replay" part. when it emits a form, it generates a page. then when the form is filled in and replied, the computation starts over, but replaying the already done parts, until it gets to the point where it stopped last
13:08:31 <dminuoso> I finally it, a use for unsafeCatchPure :: Exception e => a -> (e -> a) -> a
13:08:34 <dminuoso> An evil one ontop!
13:08:56 <merijn> Is there a non-evil one?
13:09:25 <dminuoso> No idea, but it's either that or invest a lot of work in phadej's tree-diff
13:09:28 zariuq joins (~zar@fw1.ciirc.cvut.cz)
13:09:35 <Martinsos> ski: You slightly lost me there :D, I am afraid this is beyond my current Haskell knowledge, but I stored these more advanced things you said for later reading once I am more knowleagdable :D!
13:09:39 <dminuoso> Im gonna use pure exceptions to modify control flow!
13:09:40 <merijn> tree-diif is some fantastic stuff
13:09:53 <dminuoso> Indeed, it just lacks one thing we sorely miss
13:09:56 <merijn> dminuoso: I will haunt you until your death
13:10:08 <ski> (the category theory link is related, but will require some mbackground. and it's not too essential, it's just an "in case you know about CT, this might be interesting to compare to")
13:11:08 drbean joins (~drbean@TC210-63-209-197.static.apol.com.tw)
13:11:36 <dminuoso> merijn: No but seriously. The main issue with tree-diff is if you have Rec "foo" (M.fromList [("keyA", 1), ("keyB", 2)]) vs Rec "foo" (M.fromList [("keyA", 1)])
13:11:54 <dminuoso> There's sadly no way to represent deletion of keys
13:12:00 <dminuoso> Which causes a lot of ugliness
13:12:16 <dminuoso> or uh
13:12:23 <dminuoso> Rec "foo" (M.fromList [("keyA", ...), ("keyB", ...)])
13:12:33 <dminuoso> Rec "foo" (M.fromList [("keyA", ...)])
13:12:58 <dminuoso> Instead, you get a Swp operation on the record, and del/add operations on the value pointed by the key
13:13:12 fendor_ is now known as fendor
13:13:19 <dminuoso> Im trying really hard to hack this into the Pretty dictionary
13:14:07 <dminuoso> (or actually, I think its even a Cpy on the record?)
13:14:57 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
13:16:44 hlisp joins (~hlisp@223.71.166.151)
13:18:11 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
13:18:39 × hlisp quits (~hlisp@223.71.166.151) (Remote host closed the connection)
13:19:39 cfricke joins (~cfricke@unaffiliated/cfricke)
13:21:38 <ski> Martinsos : anyway .. OO can also be related to lexical/static scoping (in particular non-local variable references. commonly implemented as "closures"), but alternatively also in terms of existential types. Abstract Data Types can also be related to existential types, but in a different way (leading to different ways of and issues with, structuring code)
13:21:45 <ski> @where on-understanding
13:21:45 <lambdabot> "On Understanding Types, Data Abstraction, and Polymorphism" by Luca Cardelli,Peter Wegner in 1985-12 at <http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf>
13:21:48 <ski> @where on-understanding-revisited
13:21:48 <lambdabot> "On Understanding Data Abstraction, Revisited" by William R. Cook in 2009-10 at <http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf>
13:23:33 <ski> the latter talks about this. the former talks about different senses of "polymorphism", and also about ADTs as existentials
13:24:39 × mlugg quits (68eeaaef@104.238.170.239) (Ping timeout: 245 seconds)
13:26:34 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Read error: Connection reset by peer)
13:26:55 <ski> "Polymorphic Type Inference" by Michael I. Schwartzbach in 1995-03 at <https://cs.au.dk/~amoeller/mis/typeinf.p(sdf|df)>,<https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.1493> might be interesting to learn more basics of type systems, type inference, also mentioning universals and existentials
13:27:05 <ski> .. but all this is probably a discussion for another day
13:27:19 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Quit: WeeChat 2.9)
13:28:54 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
13:29:09 <dminuoso> [exa]: Btw, I decided to go with indents+parsec. The subtle edge cases of building up that tree kept building up.
13:30:04 <dminuoso> `I.withBlock mkTree node tree` is much simpler to write, I was already at 150 lines and started to write an evaluator to build up my tree.
13:32:51 knupfer joins (~Thunderbi@200116b824bb7e0064810ffffed5e86a.dip.versatel-1u1.de)
13:34:03 jonatanb_ joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
13:35:15 × knupfer quits (~Thunderbi@200116b824bb7e0064810ffffed5e86a.dip.versatel-1u1.de) (Remote host closed the connection)
13:35:25 knupfer joins (~Thunderbi@200116b824bb7e00edb32aa10920b88c.dip.versatel-1u1.de)
13:37:28 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 246 seconds)
13:39:47 rotty joins (rotty@ghost.xx.vu)
13:42:52 <reactormonk> I've got a recursive datastructure with a Plated instance - How can I create a Lens where I have the already transformed children available in the transformation as well?
13:43:19 × directhex1 quits (~directhex@195.206.169.184) (Remote host closed the connection)
13:48:03 × drbean quits (~drbean@TC210-63-209-197.static.apol.com.tw) (Ping timeout: 260 seconds)
13:48:49 × Lowl3v3l quits (~Lowl3v3l@dslb-002-203-195-108.002.203.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
13:50:40 theorbtwo joins (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net)
13:55:59 <[exa]> dminuoso: I always failed using the parsec/megaparsec indent blocks properly
13:56:03 <[exa]> perhaps I should retry.
13:56:16 <dminuoso> [exa]: Did you try by hands or using the indents library?
13:56:26 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
13:56:56 <[exa]> there's an extra library for that, aha.
13:57:06 <[exa]> is there a megaparsec variant?
13:57:51 <dminuoso> No, although one could write it. The implementation is fairly simple and straight forward.
13:58:05 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Read error: Connection reset by peer)
13:58:40 <[exa]> I always failed to make it work with parse items that span multiple lines
13:58:58 <dminuoso> Well this is working just fine for me
13:59:00 <[exa]> hm gonna retry. :]
13:59:06 bitmagie joins (~Thunderbi@200116b8063a3200b470a8e4f2a94e1e.dip.versatel-1u1.de)
13:59:07 <[exa]> you don't have multiline tokens right?
13:59:35 <dminuoso> Right
13:59:35 × bitmagie quits (~Thunderbi@200116b8063a3200b470a8e4f2a94e1e.dip.versatel-1u1.de) (Client Quit)
13:59:43 <dminuoso> Im just parsing the cisco ios configuration language
13:59:51 <Uniaika> dminuoso: RIP
13:59:58 <[exa]> route in peace?
14:00:01 <dminuoso> haha
14:00:12 <dminuoso> That's not a bad one, I can see myself printing a shirt with that
14:00:43 <[exa]> with cisco it may also be
14:01:27 <[exa]> 'Reset without warning upon receiving an ASN >= 64k In Peace'
14:01:43 <[exa]> (nah they already fixed that)
14:02:10 <dminuoso> Wait. Received via BGP?
14:02:25 <[exa]> you didn't hear the czech routing vs. cisco story?
14:02:29 <dminuoso> Good thing we dont use Cisco for our external eBGP...
14:02:31 <dminuoso> No did not
14:02:39 <dminuoso> Peering is not my department
14:02:40 <[exa]> I'll try to dig that up
14:03:27 Lowl3v3l joins (~Lowl3v3l@dslb-090-186-186-201.090.186.pools.vodafone-ip.de)
14:04:56 <[exa]> basically this https://www.ciscozine.com/cisco-ios-causes-internet-disruption/ but there's a mailinglist post somewhere with the initial reaction of the administrators
14:05:03 [exa] ---> #offtopic
14:07:21 carlomagno1 joins (~cararell@148.87.23.6)
14:08:06 zebrag joins (~inkbottle@aaubervilliers-654-1-104-55.w86-212.abo.wanadoo.fr)
14:08:29 × vicfred_ quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
14:09:41 × carlomagno quits (~cararell@148.87.23.5) (Ping timeout: 256 seconds)
14:10:12 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:11:17 × supercoven quits (~Supercove@dsl-hkibng31-54fae2-36.dhcp.inet.fi) (Ping timeout: 260 seconds)
14:11:44 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
14:11:44 × denisse_ quits (~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection)
14:12:15 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
14:12:33 denisse joins (~spaceCat@gateway/tor-sasl/alephzer0)
14:13:41 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 265 seconds)
14:14:47 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
14:16:21 machinedgod joins (~machinedg@24.105.81.50)
14:17:29 acidjnk_new2 joins (~acidjnk@p200300d0c719ff68956387e811e01df5.dip0.t-ipconnect.de)
14:19:56 vicfred joins (~vicfred@unaffiliated/vicfred)
14:25:33 gproto0023 is now known as gproto23
14:26:37 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
14:28:44 × todda7 quits (~torstein@ppp-2-84-17-169.home.otenet.gr) (Ping timeout: 256 seconds)
14:28:59 oish joins (~charlie@228.25.169.217.in-addr.arpa)
14:29:13 todda7 joins (~torstein@ppp-2-84-17-53.home.otenet.gr)
14:32:06 Yumasi joins (~guillaume@2a01cb09b06b29eabd8cf63c98e88a0f.ipv6.abo.wanadoo.fr)
14:32:56 × todda7 quits (~torstein@ppp-2-84-17-53.home.otenet.gr) (Excess Flood)
14:33:44 todda7 joins (~torstein@ppp-2-84-17-53.home.otenet.gr)
14:34:07 Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se)
14:34:46 nbloomf joins (~nbloomf@2600:1700:ad14:3020:a955:27bd:b45b:9122)
14:35:31 <ski> joel135 : hah, the state example on slide 8 made me think of Dialectica,PV,Chu, and now Uustalu, when talking about functor-functor interaction map (which looks suspiciously related to a dinatural transformation) mentions Chu :)
14:35:32 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 256 seconds)
14:35:37 × solonarv quits (~solonarv@astrasbourg-653-1-156-4.w90-6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
14:35:38 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
14:36:27 ski . o O ( "Questions and Answers -- A Category Arising in Linear Logic, Complexity Theory, and Set Theory" by Andreas Blass in 1993-09-16 at <https://arxiv.org/pdf/math/9309208v1.pdf> )
14:38:24 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
14:38:51 beng-nl1 joins (~beng-nl@217.146.82.202)
14:39:57 thc202 joins (~thc202@unaffiliated/thc202)
14:41:27 aarvar joins (~foewfoiew@50.35.43.33)
14:42:46 × toorevitimirp quits (~tooreviti@117.182.180.118) (Remote host closed the connection)
14:42:58 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds)
14:43:20 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Read error: Connection reset by peer)
14:44:01 × enoq quits (~textual@194-208-146-143.lampert.tv) (Read error: Connection reset by peer)
14:44:21 toorevitimirp joins (~tooreviti@117.182.180.118)
14:44:31 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
14:44:31 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host)
14:44:31 neiluj joins (~jco@unaffiliated/neiluj)
14:45:01 infinity0 joins (~infinity0@freenet/developer/infinity0)
14:45:09 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
14:45:22 enoq joins (~textual@194-208-146-143.lampert.tv)
14:45:41 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
14:46:16 × darjeeling_ quits (~darjeelin@122.245.211.11) (Ping timeout: 272 seconds)
14:47:49 p-core1 joins (~Thunderbi@2a0e:1c80:4:1024::1007)
14:49:04 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Ping timeout: 240 seconds)
14:49:06 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
14:51:19 p-core1 is now known as p-core
14:51:19 × p-core quits (~Thunderbi@2a0e:1c80:4:1024::1007) (Remote host closed the connection)
14:51:40 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:a955:27bd:b45b:9122) (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:54:12 p-core joins (~Thunderbi@2a0e:1c80:4:1023::1004)
14:56:52 FreeBirdLjj joins (~freebirdl@101.228.42.108)
14:58:53 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds)
14:59:36 Lycurgus joins (~niemand@cpe-45-46-142-188.buffalo.res.rr.com)
15:00:13 <dminuoso> % Foo { foo = const 1, bar = foo 10 }
15:00:13 <yahb> dminuoso: ; <interactive>:61:28: error:; * Couldn't match expected type `Int' with actual type `String -> Int'; * Probable cause: `foo' is applied to too few arguments; In the `bar' field of a record; In the expression: Foo {foo = const 1, bar = foo 10}; In an equation for `it': it = Foo {foo = const 1, bar = foo 10}
15:00:38 <dminuoso> Mmm, what is the idiomatic way to define a recursive data value?
15:00:54 <dminuoso> Manually with fix?
15:02:07 <merijn> or just a recursive binding
15:02:25 × jonatanb_ quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection)
15:02:37 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 260 seconds)
15:03:09 <dminuoso> merijn: Oh you mean some `let f = Foo { foo = const 1, bar = foo f 10 } in f` ?
15:03:33 conal joins (~conal@ip-66-115-176-195.creativelink.net)
15:03:33 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
15:03:33 × conal quits (~conal@ip-66-115-176-195.creativelink.net) (Client Quit)
15:03:35 <merijn> yeah
15:03:43 <merijn> Like the classis
15:03:51 <merijn> > let ones = 1 : ones in ones
15:03:53 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
15:03:57 × martin02 quits (silas@hund.fs.lmu.de) (Ping timeout: 244 seconds)
15:04:03 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
15:04:20 <merijn> Anyone happen to know how to set the default value of a UTCTime column to the epoch in persistent?
15:04:24 darjeeling_ joins (~darjeelin@122.245.211.11)
15:04:51 conal joins (~conal@ip-66-115-176-195.creativelink.net)
15:05:46 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
15:05:58 <dminuoso> merijn: Mmm, cant you set default=CURRENT_TIME?
15:06:15 <merijn> How is CURRENT_TIME the epoch?
15:06:19 <dminuoso> Oh
15:06:39 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Read error: Connection reset by peer)
15:06:55 × mstruebing quits (~mstruebin@2001:41d0:8:93c7::1) (Ping timeout: 240 seconds)
15:07:17 <dminuoso> Curious, you say UTCTime but epoch
15:07:25 oish joins (~charlie@228.25.169.217.in-addr.arpa)
15:07:33 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
15:07:35 <dminuoso> What kind of column does persistent map UTCTime to?
15:08:34 <merijn> TIMESTAMP (in sqlite)
15:08:54 mstruebing joins (~mstruebin@2001:41d0:8:93c7::1)
15:09:37 hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de)
15:09:59 × connrs- quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
15:09:59 × connrs quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
15:10:19 <dminuoso> TIMESTAMP? Huh?
15:10:21 <dminuoso> What's that?
15:10:52 <dminuoso> Is that an alias for INTEGER?
15:11:29 <merijn> TEXT
15:11:41 <merijn> but as ISO8601 string
15:12:22 martin02 joins (silas@hund.fs.lmu.de)
15:12:40 × cheater quits (~user@unaffiliated/cheater) (Remote host closed the connection)
15:12:51 connrs joins (~connrs@runciter.connrs.uk)
15:13:26 connrs_ joins (~connrs@runciter.connrs.uk)
15:14:50 cheater joins (~user@unaffiliated/cheater)
15:15:10 <dminuoso> I wonder, does persistent accept `foo UTCTime default=(cast(strftime('%s','now') as int)` as a column?
15:15:28 <dminuoso> Is that sort of what you meant?
15:15:32 <merijn> No clue what it accepts, hence why I ask :p
15:15:39 <dminuoso> heh
15:15:56 <dminuoso> 68:You can use a @default=${sql expression}@ clause to set a default for a field.
15:16:03 <dminuoso> So the above should work
15:16:31 hackage leb128-cereal 1.2 - LEB128 and SLEB128 encoding https://hackage.haskell.org/package/leb128-cereal-1.2 (JoachimBreitner)
15:16:36 <dminuoso> (possibly without the cast if this goes into a text column)
15:18:36 × texasmynsted quits (~texasmyns@212.102.45.109) ()
15:18:43 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:19:06 dyeplexer joins (~lol@unaffiliated/terpin)
15:19:06 × p-core quits (~Thunderbi@2a0e:1c80:4:1023::1004) (Remote host closed the connection)
15:19:26 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
15:20:07 texasmynsted joins (~texasmyns@212.102.45.109)
15:20:11 solonarv joins (~solonarv@astrasbourg-653-1-156-4.w90-6.abo.wanadoo.fr)
15:23:01 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 264 seconds)
15:23:11 oish joins (~charlie@185.107.80.85)
15:25:05 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
15:25:28 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
15:26:52 wh0 joins (~wh0000@cpc152777-shef18-2-0-cust223.17-1.cable.virginm.net)
15:27:24 × knupfer quits (~Thunderbi@200116b824bb7e00edb32aa10920b88c.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
15:27:26 nados joins (~dan@69-165-210-185.cable.teksavvy.com)
15:27:57 × alp quits (~alp@2a01:e0a:58b:4920:d884:ceaa:fae:7708) (Ping timeout: 272 seconds)
15:28:04 × oish quits (~charlie@185.107.80.85) (Ping timeout: 272 seconds)
15:28:12 coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
15:28:51 igghibu joins (~igghibu@91.193.5.30)
15:29:20 × igghibu quits (~igghibu@91.193.5.30) (Client Quit)
15:29:26 oish joins (~charlie@228.25.169.217.in-addr.arpa)
15:29:32 × acidjnk_new2 quits (~acidjnk@p200300d0c719ff68956387e811e01df5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
15:29:58 × aarvar quits (~foewfoiew@50.35.43.33) (Ping timeout: 272 seconds)
15:31:33 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 260 seconds)
15:32:44 × borne quits (~fritjof@200116b86455d000f1dc39039d201adf.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
15:33:22 s00pcan joins (~chris@107.181.165.217)
15:33:36 × connrs_ quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
15:33:37 × connrs quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
15:34:50 connrs joins (~connrs@runciter.connrs.uk)
15:35:26 connrs_ joins (~connrs@runciter.connrs.uk)
15:37:08 hlisp joins (~hlisp@114.246.35.11)
15:37:44 × whatisRT quits (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de) (Quit: ZNC 1.7.5 - https://znc.in)
15:38:30 hackage phonetic-languages-permutations 0.2.0.0 - Commonly used versions of the phonetic-languages-common package https://hackage.haskell.org/package/phonetic-languages-permutations-0.2.0.0 (OleksandrZhabenko)
15:39:45 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 240 seconds)
15:41:01 × mrchampion quits (~mrchampio@216-26-218-246.dynamic.tbaytel.net) (Ping timeout: 264 seconds)
15:41:48 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
15:42:07 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
15:44:07 mrchampion joins (~mrchampio@216-26-218-246.dynamic.tbaytel.net)
15:47:56 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
15:48:30 hackage phonetic-languages-simplified-common 0.2.0.0 - A simplified version of the phonetic-languages-functionality https://hackage.haskell.org/package/phonetic-languages-simplified-common-0.2.0.0 (OleksandrZhabenko)
15:50:07 × Merfont quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Ping timeout: 246 seconds)
15:50:14 × ubert quits (~Thunderbi@p200300ecdf1e5355e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
15:50:34 ubert joins (~Thunderbi@p200300ecdf1e5355e6b318fffe838f33.dip0.t-ipconnect.de)
15:53:25 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection)
15:54:58 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
15:54:59 × SanchayanMaity quits (~Sanchayan@223.226.123.235) (Quit: SanchayanMaity)
15:55:01 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 246 seconds)
15:56:45 × _deepfire quits (~user@80.92.100.69) (Ping timeout: 240 seconds)
15:57:41 × meck quits (~meck@li1809-18.members.linode.com) (Quit: ZNC 1.8.2 - https://znc.in)
15:58:18 _deepfire joins (~user@80.92.100.69)
15:59:40 borne joins (~fritjof@200116b86455d000f1dc39039d201adf.dip.versatel-1u1.de)
15:59:40 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
16:00:04 × PotatoHatsue|T quits (berbermanm@gateway/shell/matrix.org/x-uhyqtdfvkudrmunh) (Quit: Idle for 30+ days)
16:00:06 × kaychaks_riot quits (kaychaksma@gateway/shell/matrix.org/x-mkllmseyzgoebiyk) (Quit: Idle for 30+ days)
16:00:59 × conal quits (~conal@ip-66-115-176-195.creativelink.net) (Quit: Computer has gone to sleep.)
16:02:51 × connrs quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
16:02:52 × connrs_ quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
16:03:03 alp joins (~alp@2a01:e0a:58b:4920:e473:db5a:5f8a:8d59)
16:03:55 <merijn> If I have a working ghcide, is there some way to dump out it's cradle config?
16:04:05 connrs joins (~connrs@runciter.connrs.uk)
16:04:41 connrs_ joins (~connrs@runciter.connrs.uk)
16:04:48 × toorevitimirp quits (~tooreviti@117.182.180.118) (Remote host closed the connection)
16:05:27 knupfer joins (~Thunderbi@200116b824bb7e002856a5fffe28fbf5.dip.versatel-1u1.de)
16:05:56 × knupfer quits (~Thunderbi@200116b824bb7e002856a5fffe28fbf5.dip.versatel-1u1.de) (Remote host closed the connection)
16:06:04 knupfer joins (~Thunderbi@200116b824bb7e00d8226e797ccf94db.dip.versatel-1u1.de)
16:06:40 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
16:06:50 conal joins (~conal@64.71.133.70)
16:08:09 hlisp joins (~hlisp@114.246.35.11)
16:08:42 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection)
16:09:11 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
16:09:36 × dyeplexer quits (~lol@unaffiliated/terpin) (Ping timeout: 240 seconds)
16:10:37 whatisRT joins (~whatisRT@2002:5b41:6a33:0:b44f:bf96:fd3:56a8)
16:12:16 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection)
16:12:27 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
16:12:28 renzhi joins (~renzhi@2607:fa49:655f:e600::28da)
16:12:29 gproto23 joins (~gproto23@unaffiliated/gproto23)
16:12:36 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
16:13:55 × darjeeling_ quits (~darjeelin@122.245.211.11) (Ping timeout: 246 seconds)
16:16:27 × kuribas quits (~user@ptr-25vy0i7lmmi4jlxzmxu.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
16:17:15 meck joins (~meck@li1809-18.members.linode.com)
16:18:53 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 256 seconds)
16:19:22 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
16:20:41 dyeplexer joins (~lol@unaffiliated/terpin)
16:21:30 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection)
16:21:59 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
16:23:10 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
16:25:14 <dexterfoo> why does Map have both foldl and foldr? isn't it supposed to be unordered?
16:25:30 <merijn> dexterfoo: eh, no?
16:25:36 <merijn> Why would it be unordered
16:26:02 <merijn> In fact, containers guarantees Foldable and Traversable are "least to greatest" order of keys/elements
16:26:16 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 240 seconds)
16:26:39 <dexterfoo> i see. but the performance of foldl and foldr are the same, right?
16:26:50 <merijn> "Yes, no, maybe, it depends"
16:26:53 × Lycurgus quits (~niemand@cpe-45-46-142-188.buffalo.res.rr.com) (Quit: Exeunt)
16:28:13 acidjnk_new2 joins (~acidjnk@p200300d0c719ff6800925201c24f6260.dip0.t-ipconnect.de)
16:30:35 darjeeling_ joins (~darjeelin@122.245.211.11)
16:32:37 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
16:33:01 <maerwald> The general answer is "no", unless you can be more explicit
16:34:17 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:36:40 christo joins (~chris@81.96.113.213)
16:37:17 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
16:38:07 nbloomf joins (~nbloomf@2600:1700:ad14:3020:4914:be02:68a7:933e)
16:40:04 christo joins (~chris@81.96.113.213)
16:40:20 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:b44f:bf96:fd3:56a8) (Quit: ZNC 1.7.5 - https://znc.in)
16:41:33 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
16:44:32 × acidjnk_new2 quits (~acidjnk@p200300d0c719ff6800925201c24f6260.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
16:47:23 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 265 seconds)
16:47:46 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
16:49:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
16:50:19 × Ariakenom quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 246 seconds)
16:50:44 noumenon joins (~daemon@113.51-175-156.customer.lyse.net)
16:51:49 × Zetagon quits (~leo@c151-177-52-233.bredband.comhem.se) (Ping timeout: 264 seconds)
16:51:49 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
16:51:58 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
16:53:15 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
16:53:17 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-eizsscpohqhxizqc)
16:55:21 × Yumasi quits (~guillaume@2a01cb09b06b29eabd8cf63c98e88a0f.ipv6.abo.wanadoo.fr) (Ping timeout: 272 seconds)
16:55:32 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
16:58:01 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
17:00:20 × noumenon quits (~daemon@113.51-175-156.customer.lyse.net) (Quit: Leaving)
17:01:14 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Ping timeout: 256 seconds)
17:01:26 geekosaur joins (ac3a56ed@172.58.86.237)
17:03:31 invaser joins (~Thunderbi@31.148.23.125)
17:03:39 Ariakenom joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
17:03:42 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
17:04:35 electricityZZZZ joins (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net)
17:04:51 Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
17:05:20 crdrost joins (~crdrost@2601:646:8280:85f0:90f7:1b03:f01f:afae)
17:05:44 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Read error: Connection reset by peer)
17:05:59 kritzefitz joins (~kritzefit@212.86.56.80)
17:06:45 × alp quits (~alp@2a01:e0a:58b:4920:e473:db5a:5f8a:8d59) (Ping timeout: 272 seconds)
17:11:35 ubert1 joins (~Thunderbi@p200300ecdf1e5361e6b318fffe838f33.dip0.t-ipconnect.de)
17:12:32 × ubert quits (~Thunderbi@p200300ecdf1e5355e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
17:12:32 ubert1 is now known as ubert
17:15:10 × dan64- quits (~dan64@dannyadam.com) (Quit: ZNC - http://znc.in)
17:16:51 × Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
17:17:00 × adamwespiser quits (~adamwespi@107.181.19.30) ()
17:17:51 dan64 joins (~dan64@dannyadam.com)
17:18:38 <sszark> I'm working on a module extension that adds new logic and re-exports the old one. but i can't figure out how to only import the things i'm using for the extension, while at the same time exporting everything the rest. https://termbin.com/0y6u
17:18:54 <sszark> It seems like my local import for the extension part is overriding the full export in the module
17:22:27 × s00pcan quits (~chris@107.181.165.217) (Ping timeout: 260 seconds)
17:23:53 s00pcan joins (~chris@075-133-056-178.res.spectrum.com)
17:24:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:25:01 jonatanb joins (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl)
17:27:51 livvy joins (~livvy@gateway/tor-sasl/livvy)
17:27:59 <geekosaur> you basically can't; if yiu're going to re-export the whole module, you need to import the whole module
17:29:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:29:12 <sszark> Yeah, i figured as much. thanks
17:29:15 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
17:30:00 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:31:19 hlisp joins (~hlisp@114.246.35.11)
17:31:26 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
17:32:09 christo joins (~chris@81.96.113.213)
17:35:36 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
17:36:16 × christo quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
17:37:17 × knupfer quits (~Thunderbi@200116b824bb7e00d8226e797ccf94db.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
17:39:59 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
17:40:24 DataComputist parts (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) ()
17:41:18 × jonatanb quits (~jonatanb@83.24.155.27.ipv4.supernova.orange.pl) (Remote host closed the connection)
17:49:38 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
17:51:25 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
17:51:44 × connrs_ quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
17:51:44 × connrs quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
17:52:01 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 260 seconds)
17:52:37 hlisp joins (~hlisp@114.246.35.11)
17:53:02 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Ping timeout: 260 seconds)
17:55:07 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 260 seconds)
17:55:32 gproto23 joins (~gproto23@unaffiliated/gproto23)
17:55:38 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 272 seconds)
17:55:56 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
17:56:42 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
17:58:12 connrs joins (~connrs@runciter.connrs.uk)
17:58:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:58:50 connrs_ joins (~connrs@runciter.connrs.uk)
17:59:06 christo joins (~chris@81.96.113.213)
17:59:12 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
18:00:34 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
18:00:53 FreeBirdLjj joins (~freebirdl@101.228.42.108)
18:00:53 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Read error: Connection reset by peer)
18:01:10 FreeBirdLjj joins (~freebirdl@101.228.42.108)
18:01:14 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
18:01:32 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 260 seconds)
18:01:34 FreeBirdLjj joins (~freebirdl@101.228.42.108)
18:01:36 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Read error: Connection reset by peer)
18:01:53 FreeBirdLjj joins (~freebirdl@101.228.42.108)
18:01:57 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
18:02:54 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
18:03:46 ClaudiusMaximus joins (~claude@198.123.199.146.dyn.plus.net)
18:03:46 × ClaudiusMaximus quits (~claude@198.123.199.146.dyn.plus.net) (Changing host)
18:03:46 ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus)
18:03:48 <tdammers> if the problem is that the full import clashes with names you define locally, you can do a qualified re-export
18:04:17 <tdammers> module Foo (module Bar, overriddenStuff) where import qualified Bar
18:04:36 × jespada quits (~jespada@90.254.245.49) (Quit: Leaving)
18:04:57 cosimone joins (~cosimone@2001:b07:ae5:db26:d821:4868:b9f6:2909)
18:05:08 qiu3344 joins (~qiu3344@91.246.215.182)
18:06:28 Guest38767 joins (~luke@24.148.52.186)
18:06:34 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
18:06:42 × Guest38767 quits (~luke@24.148.52.186) (Client Quit)
18:08:58 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
18:10:39 × cosimone quits (~cosimone@2001:b07:ae5:db26:d821:4868:b9f6:2909) (Quit: cosimone)
18:10:41 × Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Ping timeout: 260 seconds)
18:11:00 whatisRT joins (~whatisRT@2002:5b41:6a33:0:b44f:bf96:fd3:56a8)
18:11:07 × connrs quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
18:11:07 × connrs_ quits (~connrs@runciter.connrs.uk) (Quit: ZNC 1.7.1 - https://znc.in)
18:12:03 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
18:12:21 connrs joins (~connrs@runciter.connrs.uk)
18:12:29 × Entertainment quits (~entertain@104.246.132.210) ()
18:12:58 connrs_ joins (~connrs@runciter.connrs.uk)
18:13:03 sondr3 joins (54d33884@cm-84.211.56.132.getinternet.no)
18:13:26 hlisp joins (~hlisp@114.246.35.11)
18:14:01 Entertainment joins (~entertain@104.246.132.210)
18:14:12 christo joins (~chris@81.96.113.213)
18:14:29 <sondr3> I'm tryng to get cabal repl to load a project local .ghci file but I can't get it to work, all I want to do is set OverloadedStrings by default and load another module as well
18:14:34 <sondr3> No dice so far
18:15:13 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 264 seconds)
18:15:50 × qiu3344 quits (~qiu3344@91.246.215.182) (Quit: WeeChat 2.9)
18:15:55 <sondr3> I'm on Cabal 3.2.0.0, and my .ghci file is :set -XOverloadedStrings\n:load Other.Thing
18:16:00 hidedagger joins (~nate@unaffiliated/hidedagger)
18:16:15 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
18:17:54 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 256 seconds)
18:18:41 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
18:18:49 × christo quits (~chris@81.96.113.213) (Ping timeout: 264 seconds)
18:19:04 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
18:20:08 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
18:20:24 <sondr3> Oh, it actually sets OverloadedStrings but don't load the other module
18:20:48 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
18:20:57 × raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal)
18:23:24 × mstruebing quits (~mstruebin@2001:41d0:8:93c7::1) (Ping timeout: 240 seconds)
18:25:38 mstruebing joins (~mstruebin@ns399634.ip-5-39-81.eu)
18:26:40 × conal quits (~conal@64.71.133.70) (Ping timeout: 272 seconds)
18:27:54 hlisp joins (~hlisp@114.246.35.11)
18:29:42 conal joins (~conal@66.115.157.112)
18:30:44 <electricityZZZZ> so in 1990, designing novel chips was "too expensive", and this was also true in 2000, 2010,... but people have built a lot of fancy fab equipment now, and surely that equipment must last. can one do dirt cheap fabrication of ASICs on "outdated" nodes?
18:30:47 chaosmasttter joins (~chaosmast@p200300c4a70b2a01f05e932a21001b8c.dip0.t-ipconnect.de)
18:31:41 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds)
18:32:16 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
18:32:43 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
18:32:55 × conal quits (~conal@66.115.157.112) (Client Quit)
18:34:39 aarvar joins (~foewfoiew@50.35.43.33)
18:35:42 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Quit: nineonine)
18:36:01 × jedai42 quits (~jedai@lfbn-dij-1-708-251.w90-100.abo.wanadoo.fr) (Ping timeout: 246 seconds)
18:36:18 × rawles quits (~r@unaffiliated/rawles) (Ping timeout: 244 seconds)
18:36:32 Zetagon joins (~leo@c151-177-52-233.bredband.comhem.se)
18:37:30 rawles joins (~r@unaffiliated/rawles)
18:38:41 christo joins (~chris@81.96.113.213)
18:39:12 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
18:42:17 hlisp joins (~hlisp@114.246.35.11)
18:43:24 × geekosaur quits (ac3a56ed@172.58.86.237) (Ping timeout: 245 seconds)
18:45:08 hexfive joins (~hexfive@50-47-142-195.evrt.wa.frontiernet.net)
18:45:13 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
18:45:47 turion joins (~turion@2a02:810d:8abf:c4a8:f450:eee7:f9b2:e5e6)
18:46:20 revprez_stg joins (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net)
18:46:46 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 265 seconds)
18:53:00 <int-e> https://electronics.stackexchange.com/questions/7042/how-much-does-it-cost-to-have-a-custom-asic-made hmm. interesting niche: turn working FPGAs into ASICs that have an FPGA-like fabric in the bottom layers, thereby saving on mask costs
18:54:51 jedai42 joins (~jedai@lfbn-dij-1-708-251.w90-100.abo.wanadoo.fr)
18:56:48 hlisp joins (~hlisp@114.246.35.11)
18:58:09 geekosaur joins (ac3a56ed@172.58.86.237)
19:01:02 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:b44f:bf96:fd3:56a8) (Ping timeout: 260 seconds)
19:01:16 × sondr3 quits (54d33884@cm-84.211.56.132.getinternet.no) (Remote host closed the connection)
19:01:25 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 264 seconds)
19:01:50 <electricityZZZZ> right,... i'm saying that today, this might become more valuable than historically,...
19:02:03 <electricityZZZZ> there also is https://www.intel.com/content/www/us/en/products/programmable/asic/easic-devices.html
19:02:40 <electricityZZZZ> cloud services mean that if you make a special chip you can make it available to everybody pretty easily,...
19:03:07 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:03:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:03:33 berberman_ joins (~berberman@unaffiliated/berberman)
19:03:36 <geekosaur> but every time you turn around they come up with faster or more capable but more expensive fab, and people want to use that more capable
19:03:58 <davean> electricityZZZZ: You can do cheap fabrication on old nodes - its common to do that. Its just that for computation its not useful.
19:04:09 <electricityZZZZ> well it's a competition between what you can do in software on a CPU today and those gains
19:04:12 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
19:04:25 <electricityZZZZ> vs an FPGA or an ASIC (fabricated on an old node, at least to begin with)
19:04:32 <davean> electricityZZZZ: so they're used for non-computational things usually, or microcontrolers, etc.
19:05:08 alp joins (~alp@2a01:e0a:58b:4920:c40b:63d1:e6b8:9277)
19:05:54 <electricityZZZZ> furthermore if your software can be programmed so that the process from CPU all the way to ASIC was smooth, that would be pretty great
19:07:10 tom__ joins (~tom@2a00:23c8:970a:3501:38a6:4546:df42:c1cb)
19:08:01 salumu joins (~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca)
19:08:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
19:10:38 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
19:11:12 × zincy__ quits (~tom@2a00:23c8:970a:3501:9884:7ab1:3658:f1fb) (Ping timeout: 260 seconds)
19:11:13 hlisp joins (~hlisp@114.246.35.11)
19:11:25 × sMuNiX quits (~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca) (Ping timeout: 265 seconds)
19:11:54 <davean> electricityZZZZ: I find your tautology compelling.
19:12:53 <electricityZZZZ> what are you referring to when you say my tautology
19:13:00 <electricityZZZZ> the "smooth process from CPU to ASIC"?
19:14:07 <davean> yes
19:14:16 <electricityZZZZ> yeah
19:14:42 <electricityZZZZ> furthermore, the ASIC aspect of things can help with revenue models
19:15:35 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:15:54 howdoi joins (uid224@gateway/web/irccloud.com/x-mmsjxvzuqvfjlnly)
19:16:01 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
19:16:21 <int-e> ASIC for computation... I guess the famous examples where this has been done are ASIC bitcoin miners (sigh...) and Google's TPUs?
19:16:41 <electricityZZZZ> yeah but wouldn't redis-as-an-ASIC make sense?
19:16:59 <int-e> no
19:17:07 <davean> int-e: thats the famous example vs. like network controllers?
19:17:12 <int-e> too specific, and it's memory
19:17:25 <electricityZZZZ> there might also be security advantages to having a firewall etched into an ASIC
19:17:27 <int-e> davean: do those count as computation?
19:17:29 <davean> electricityZZZZ: also a lot of NVMe drives?
19:18:31 <davean> int-e: They run offload, application specific offload, packet routing, delivery, firewalls, etc? Its how we can manage multi 100Gb connections usefully to single systems and VMs.
19:18:41 luke joins (~luke@24.148.52.186)
19:18:43 <davean> They run bytecode interpriters
19:18:46 <electricityZZZZ> davean: are you saying that NVMe drives already have hardware key-value stores onboard?
19:19:03 <davean> electricityZZZZ: No, but thats true. What I'm saying is higher end NVMe drives are run by FPGAs.
19:19:05 luke is now known as Guest69432
19:19:36 <electricityZZZZ> davean: yeah so that's "equivalent to an ASIC", mostly
19:19:47 <davean> what?
19:20:22 <int-e> FPGAs have a far lower one-time cost. That's basically their point.
19:20:24 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:20:35 × Guest69432 quits (~luke@24.148.52.186) (Client Quit)
19:20:41 christo joins (~chris@81.96.113.213)
19:20:57 <davean> int-e: no, also reprogrammability. Which is why you see them in any non-low-end NIC
19:21:04 <electricityZZZZ> i'm saying perhaps your FPGA-on-NVMe device sufficienly covers more efficient CPU offloading to the point that it isn't worth moving to ASIC in many/most applications
19:21:10 <int-e> davean: Obviously there are tons of ASICs around. They are cheap *if* you buy them in the 100s of thousands or millions.
19:21:13 <davean> Its not FPGA-on-NVMe
19:21:30 <davean> Its FPGA-is-what-makes-it-NVMe
19:21:36 <electricityZZZZ> oh wow really?
19:21:52 <davean> int-e: Except they're not flexable.
19:22:04 <davean> int-e: so their cheapness is moot in a lot of applications - like NICs
19:22:05 <int-e> (And I do distinguish between FPGAs and ASICs)
19:22:21 luke_ joins (~luke@bitnomial/staff/luke)
19:22:34 <int-e> davean: I don't disagree.
19:23:14 <electricityZZZZ> davean: but you said the FPGA applies to high end NVMe (i.e. lower end NVMe drives don't have the FPGA), so what you are saying isn't self-consistent
19:23:29 <davean> No, it is, I think you're just lost.
19:23:42 <davean> There has to be a controller to turn flash into NVMe
19:23:50 lambuf joins (~lambuf@95.164.72.231)
19:23:59 × lambuf quits (~lambuf@95.164.72.231) (Remote host closed the connection)
19:24:03 <davean> that controller on lower end devices is a small CPU. On higher end devices its a medium size FPGA.
19:24:08 <electricityZZZZ> but my application doesn't distribute its program to that controller
19:24:20 <davean> Some do
19:24:46 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
19:25:25 <davean> And the POINT of smartnics, etc is specificly to bake stuff the OS would be doing in software into the data plane of the NIC.
19:25:26 hlisp joins (~hlisp@114.246.35.11)
19:26:20 × stree quits (~stree@50-108-97-52.adr01.mskg.mi.frontiernet.net) (Quit: Caught exception)
19:26:20 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
19:26:38 stree joins (~stree@50-108-97-52.adr01.mskg.mi.frontiernet.net)
19:26:45 <electricityZZZZ> yeah,...
19:26:52 <davean> And some NVMe is run as a KV store
19:26:55 <davean> also some HDs
19:27:04 <davean> there are NVMe modes
19:27:06 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:27:10 cosimone joins (~cosimone@5.171.24.75)
19:27:35 <electricityZZZZ> ...and i guess some intel CPUs are going to be shipping with integrated FPGAs. ... shouldn't we have a way of programming that in a productive manner? that would be sort of the first step in this logical chain
19:27:45 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
19:28:15 knupfer joins (~Thunderbi@i5E86B41D.versanet.de)
19:28:37 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
19:28:51 <davean> Oh are Intel CPUs still relivent?
19:28:53 acidjnk_new2 joins (~acidjnk@p200300d0c719ff68f4d20d2f20034438.dip0.t-ipconnect.de)
19:29:41 <monochrom> Is it true that on Windows 64-bit, 64-bit GHC #defines mingw32_HOST_OS, and it's stlll "32" there?
19:29:43 <int-e> davean: apart from wishful thinking, why would they go away...
19:29:55 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 246 seconds)
19:29:56 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:30:05 <davean> int-e: Because they've been pretty terrible for years and mostly uneconomical buys.
19:30:30 <davean> Its sad
19:31:04 <davean> They were still relivent in laptops, but recently that doesn't even seem true.
19:31:25 <int-e> "relevant"
19:31:50 Wolperting joins (~Wolpertin@95.164.72.231)
19:31:54 × dhouthoo quits (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
19:31:56 <monochrom> Actually I should hop over to #ghc for that.
19:31:56 vsiddharth joins (~user@135-180-144-154.fiber.dynamic.sonic.net)
19:31:59 <electricityZZZZ> but they have so much fab infrastructure and so many people
19:32:00 christo joins (~chris@81.96.113.213)
19:32:13 <geekosaur> so did itanium
19:32:19 <electricityZZZZ> and they aren't that far behind
19:32:24 <davean> electricityZZZZ: Uh, they aren't?
19:32:33 <merijn> geekosaur: You misspelled the Itanic ;)
19:32:33 Wol joins (5fa448e7@95.164.72.231)
19:32:51 <int-e> geekosaur: Even Itanium somehow took off for a while... I never understood why.
19:33:03 <merijn> int-e: Because it's a super cool architecture
19:33:21 <merijn> int-e: Itanium wasn't bad, it was just severely lacking in software support (i.e. compilers)
19:33:22 <davean> int-e: I saw a big push to get it into places - I even ran some code on like I think it was a 32-way one? It was fun! But I certainly didn't have to pay for that ...
19:33:24 <int-e> Larrabee is the only project that failed completely
19:33:30 <merijn> int-e: Itanium taught is one thing
19:33:32 × Wol quits (5fa448e7@95.164.72.231) (Remote host closed the connection)
19:33:39 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 265 seconds)
19:34:00 <electricityZZZZ> merijn: yeah lack of software support for itanium is partially why i am asking about programming cpus with integrated FPGAs
19:34:05 <int-e> merijn: at least two things... a) VLIW takes too much memory bandwidth b) VLIW and backward compatibility don't mix
19:34:09 Wol joins (5fa448e7@95.164.72.231)
19:34:10 <merijn> "No one will buy shit if it can't run x86" :p ARM might stand a chance because they've built up software support via mobile and the big guys are interested to low server power
19:34:29 electricityZZZZ will be back later
19:34:34 <merijn> electricityZZZZ: Man, the software for dedicated FPGAs is already shite :p
19:34:40 <davean> merijn: Yah, I mean mobile is the main platform these days, so ...
19:34:43 <merijn> How would you even reasonably use said FPGA :)
19:34:46 <davean> Though x86 isn't going anywhere soon.
19:35:07 × Wolperting quits (~Wolpertin@95.164.72.231) (Remote host closed the connection)
19:35:13 <merijn> Oracle had integrated FPGA and was working on some cool hardware before they killed SPARC
19:35:57 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
19:36:00 × Wol quits (5fa448e7@95.164.72.231) (Remote host closed the connection)
19:36:02 <int-e> (b)... AIUI, the second generation Itaniums had pretty much all the superscalar architecture complexity that EPIC was supposed to do away with.)
19:36:58 × christo quits (~chris@81.96.113.213) (Ping timeout: 272 seconds)
19:38:36 × Rudd0 quits (~Rudd0@185.189.115.98) (Ping timeout: 240 seconds)
19:38:57 × dustypacer quits (~pi@2600:6c50:80:2f4a:e9d0:6569:1cea:d1d4) (Ping timeout: 260 seconds)
19:39:48 × cosimone quits (~cosimone@5.171.24.75) (Quit: cosimone)
19:39:52 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:39:54 hlisp joins (~hlisp@114.246.35.11)
19:40:45 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 240 seconds)
19:42:25 christo joins (~chris@81.96.113.213)
19:42:35 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
19:44:16 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
19:46:05 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
19:46:32 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Ping timeout: 260 seconds)
19:46:37 oish joins (~charlie@228.25.169.217.in-addr.arpa)
19:49:31 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
19:49:42 × zariuq quits (~zar@fw1.ciirc.cvut.cz) (Quit: Leaving)
19:49:55 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:52:30 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:53:36 christo joins (~chris@81.96.113.213)
19:54:15 hlisp joins (~hlisp@114.246.35.11)
19:55:36 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
19:56:05 gproto23 joins (~gproto23@unaffiliated/gproto23)
19:56:31 hackage discord-haskell 1.8.1 - Write bots for Discord in Haskell https://hackage.haskell.org/package/discord-haskell-1.8.1 (Aquarial)
19:56:34 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
19:57:45 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 240 seconds)
19:58:28 × wh0 quits (~wh0000@cpc152777-shef18-2-0-cust223.17-1.cable.virginm.net) (Ping timeout: 260 seconds)
19:58:47 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
19:59:16 × MasseR quits (~MasseR@51.15.143.128) (Quit: The Lounge - https://thelounge.chat)
19:59:51 <Sose> anyone had an issue with haskell LSP server where they can't use programs like "hlint" or a formatter? happens when I try from either Emacs or VSCode so it's probably not an editor integration issue...? here is a fresh log from VSCode doing clear log, restart server and format file... the weird bit is at the very end https://gist.github.com/Sose/dec29fa3781f2b3df1eab91fadf5f4df
19:59:51 MasseR joins (~MasseR@51.15.143.128)
20:00:32 <Sose> it's looking for a file called "/opt/ghc/8.8.4/lib/ghc-8.8.4/settings" but there's not even a /opt/ghc directory on my system and rest of the server and integration seems to work okay
20:00:40 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
20:04:53 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
20:07:06 <maerwald> does someone know what happens if the parser in Aesons fromJSONKey fails? It appears it still parses the json and defaults to something weird
20:08:30 hlisp joins (~hlisp@114.246.35.11)
20:11:24 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
20:13:17 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 265 seconds)
20:14:37 × ronbrz quits (~ronbrz@207.229.174.134) (Ping timeout: 264 seconds)
20:15:43 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
20:18:42 <Sose> regarding my issue, apparently it's known and there's a workaround for now. you always end up finding the solution 15 minutes after asking... https://github.com/haskell/haskell-language-server/issues/412
20:18:58 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Quit: offline for the weekend)
20:19:21 <texasmynsted> Beyond this (https://github.com/joelburget/easytest) any recommendations for testing tutorials for Haskell?
20:22:54 hlisp joins (~hlisp@114.246.35.11)
20:25:16 × yahb quits (xsbot@haskell/bot/yahb) (Ping timeout: 268 seconds)
20:27:16 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
20:27:36 × ggole quits (~ggole@2001:8003:8119:7200:3080:9a4e:22db:fd6d) (Quit: Leaving)
20:27:54 yahb joins (xsbot@178.219.36.155)
20:27:54 × yahb quits (xsbot@178.219.36.155) (Changing host)
20:27:54 yahb joins (xsbot@haskell/bot/yahb)
20:29:26 × turion quits (~turion@2a02:810d:8abf:c4a8:f450:eee7:f9b2:e5e6) (Quit: Leaving.)
20:30:45 luke_ is now known as luke
20:30:55 <maerwald> https://github.com/bos/aeson/blob/8579faf30e0f977425fbf330038fb1d5c2c34727/Data/Aeson/Types/FromJSON.hs#L1981 hmm
20:33:06 × bliminse quits (~bliminse@host109-156-197-211.range109-156.btcentralplus.com) (Ping timeout: 256 seconds)
20:34:49 bliminse joins (~bliminse@host109-156-197-211.range109-156.btcentralplus.com)
20:36:26 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
20:37:23 hlisp joins (~hlisp@114.246.35.11)
20:40:02 pavonia joins (~user@unaffiliated/siracusa)
20:40:27 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
20:40:27 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection)
20:40:36 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds)
20:41:30 Sheilong joins (uid293653@gateway/web/irccloud.com/x-fgwigxpmxrbdsiil)
20:41:45 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
20:44:56 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
20:45:36 yummy joins (2fe3e53b@047-227-229-059.res.spectrum.com)
20:45:38 × sulu quits (~sulu@unaffiliated/sulu) (Quit: goodbye)
20:45:49 <yummy> what does the +d mean in :t +d (+)?
20:46:30 <glguy> it looks like it defaults the type
20:46:32 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
20:46:49 <glguy> :t +d (+)
20:46:50 <lambdabot> Integer -> Integer -> Integer
20:46:50 <glguy> :t (+)
20:46:51 <lambdabot> Num a => a -> a -> a
20:47:22 <yummy> is there documentation on this somewhere?
20:47:33 <sm[m]> texasmynsted: check out tasty and hspec's docs, they are the big two
20:47:41 <glguy> I'd guess it's in the GHC User's Guide
20:47:52 <texasmynsted> okay.
20:47:59 <texasmynsted> Switching to Tasty
20:48:08 <glguy> https://downloads.haskell.org/ghc/latest/docs/html/users_guide/ghci.html#ghci-cmd-:type
20:48:14 <texasmynsted> EasyTest was not compiling
20:51:03 × aldum quits (~vishera@aldum.pw) (Quit: Lost terminal)
20:51:20 aldum joins (~vishera@aldum.pw)
20:51:49 hlisp joins (~hlisp@114.246.35.11)
20:52:01 Deide joins (~Deide@217.155.19.23)
20:53:52 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 260 seconds)
20:54:10 sulu joins (~sulu@unaffiliated/sulu)
20:54:15 × sulu quits (~sulu@unaffiliated/sulu) (Client Quit)
20:54:45 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
20:56:16 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
20:57:45 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 265 seconds)
20:58:10 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
20:58:38 × luke quits (~luke@bitnomial/staff/luke) (Quit: sleep)
20:59:22 <dsal> I like tasty. I mostly aim towards quickcheck, with some plain assertions and occasionally golden tests.
20:59:34 <dsal> But tasty does all the things I want.
21:00:44 conal joins (~conal@66.115.157.112)
21:01:34 siloxid joins (~user@unaffiliated/siloxid)
21:03:47 × conal quits (~conal@66.115.157.112) (Client Quit)
21:04:00 oish joins (~charlie@228.25.169.217.in-addr.arpa)
21:06:05 vicfred joins (~vicfred@unaffiliated/vicfred)
21:06:15 hlisp joins (~hlisp@114.246.35.11)
21:06:44 wh0 joins (~wh0000@cpc152777-shef18-2-0-cust223.17-1.cable.virginm.net)
21:08:14 vishnix joins (~vishwas@c-24-14-13-197.hsd1.il.comcast.net)
21:08:14 × vishnix quits (~vishwas@c-24-14-13-197.hsd1.il.comcast.net) (Client Quit)
21:08:23 vishnix joins (~vishwas@c-24-14-13-197.hsd1.il.comcast.net)
21:08:29 invaser joins (~Thunderbi@31.148.23.125)
21:08:57 conal joins (~conal@64.71.133.70)
21:11:13 × alp quits (~alp@2a01:e0a:58b:4920:c40b:63d1:e6b8:9277) (Ping timeout: 272 seconds)
21:11:20 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 272 seconds)
21:12:14 Inoperable joins (~PLAYER_1@fancydata.science)
21:13:41 nineonine_ joins (~nineonine@50.216.62.2)
21:14:36 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds)
21:14:36 nineonine_ is now known as nineonine
21:15:49 × conal quits (~conal@64.71.133.70) (Ping timeout: 264 seconds)
21:16:43 Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net)
21:16:44 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
21:17:15 luke joins (~luke@bitnomial/staff/luke)
21:17:18 conal joins (~conal@64.71.133.70)
21:17:25 jcd joins (~user@2601:282:1300:7cb0::5be7)
21:17:52 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 256 seconds)
21:17:59 <jcd> howdy
21:19:27 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
21:19:27 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
21:20:04 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
21:23:10 son0p joins (~son0p@181.136.122.143)
21:23:15 × jwynn6 quits (~jwynn6@050-088-122-078.res.spectrum.com) (Quit: The Lounge - https://thelounge.chat)
21:23:22 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 272 seconds)
21:25:35 <Zetagon> hello!
21:28:14 × borne quits (~fritjof@200116b86455d000f1dc39039d201adf.dip.versatel-1u1.de) (Ping timeout: 264 seconds)
21:28:57 × vishnix quits (~vishwas@c-24-14-13-197.hsd1.il.comcast.net) (Quit: leaving)
21:29:30 hackage heap-console 0.1.0.0 - interactively inspect Haskell values at runtime https://hackage.haskell.org/package/heap-console-0.1.0.0 (TheMatten)
21:29:37 × Aquazi quits (uid312403@gateway/web/irccloud.com/x-kwmvlnupagfhstlw) (Quit: Connection closed for inactivity)
21:29:55 × yummy quits (2fe3e53b@047-227-229-059.res.spectrum.com) (Remote host closed the connection)
21:30:06 <texasmynsted> https://yannesposito.com/Scratch/en/blog/Holy-Haskell-Starter/ 😂
21:30:06 <jcd> Hello! I need some help. I don't know what to do with monad that gets returned from a library function.
21:30:26 <Rembane> jcd: Which monad and which library function?
21:31:08 <jcd> The monad comes from a function called 'parseRequest' from the 'Network.HTTP.Client' module.
21:31:17 <dminuoso> jcd: a "monad" is generally not something you get back, "monad" is just a bizarre name for an interface.
21:31:45 <dminuoso> jcd: So say you get something back of type T, and T has monad, it may be less helpful to think "you're getting a monad back". You're just getting a value back.
21:32:04 <dminuoso> (Or more correctly, you get something back of type `T S`, and T has monad)
21:32:29 <jcd> Then how do I extract the 'Request' out of 'm0 Request'?
21:32:34 <dminuoso> That depends!
21:32:38 <dminuoso> jcd: parseRequest :: MonadThrow m => String -> m Request
21:32:39 <jcd> I thought fmap-like functions were the way
21:32:48 <dminuoso> Is a polymorphic value. First, you must understand that the choice of `m` is yours.
21:32:54 <dminuoso> You decide what `m` you want.
21:32:55 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
21:33:05 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
21:33:10 <jcd> then, 'Just'?
21:33:15 <dminuoso> You can pick any `m` you like, under the constraint that it has an instance MonadThrow.
21:33:27 <dminuoso> Well, let's see. Just is a data constructor, the matching type constructor is Maybe.
21:33:34 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
21:33:37 <dminuoso> Check whether an `instance MonadThrow Maybe` exists to see whether its a valid choice
21:33:53 <dminuoso> https://hackage.haskell.org/package/exceptions-0.10.4/docs/Control-Monad-Catch.html#t:MonadThrow
21:33:59 <jcd> On it.
21:35:37 × conal quits (~conal@64.71.133.70) (Ping timeout: 264 seconds)
21:36:56 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Client Quit)
21:37:56 × knupfer quits (~Thunderbi@i5E86B41D.versanet.de) (Ping timeout: 240 seconds)
21:38:01 × Zetagon quits (~leo@c151-177-52-233.bredband.comhem.se) (Remote host closed the connection)
21:38:21 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
21:38:49 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
21:41:03 <jcd> So, I see that it is a valid choice! I don't know if it's the one I _should_ choose though.
21:41:03 conal joins (~conal@172.255.125.150)
21:42:21 × nyaomi quits (~naomi@2604:6000:1509:c86e:c878:29ff:fedf:ce89) (Quit: meow)
21:42:22 × geekosaur quits (ac3a56ed@172.58.86.237) (Remote host closed the connection)
21:42:28 <dminuoso> That's up to you. In this case, the idea is "parseRequest" could fail. Rather than forcing the function to use say `Maybe` or `IO` to communicate failure in, it defers the choice to you.
21:42:51 <sm[m]> interactively inspect Haskell values at runtime ... that's interesting
21:42:51 <dminuoso> It says "Hey, you pick something of type `m`, as long as I can throw an exception with it", for some value of "exception"
21:43:23 <sm[m]> doc: https://hackage.haskell.org/package/heap-console-0.1.0.0/docs/Heap-Console.html
21:45:08 <dminuoso> Internally the package will use `throwM (InvalidUrlException s "Invalid URL")` if it failed to parse your input. What this ends up doing depends on your choice, if you pick Maybe, you get a Nothing back.
21:45:12 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
21:45:19 <dminuoso> If you pick IO, you get an IO exception
21:45:27 <dminuoso> And so forth
21:45:30 hackage predicate-typed 0.7.4.5 - Predicates, Refinement types and Dsl https://hackage.haskell.org/package/predicate-typed-0.7.4.5 (gbwey)
21:46:09 <jcd> Okay! Got it! How would I properly wrap it? Is there an approriate place to show a 3-line code example?
21:46:20 <dminuoso> What do you mean with "wrap it"?
21:46:25 nyaomi joins (~naomi@cpe-74-75-6-125.maine.res.rr.com)
21:46:27 <dminuoso> @where paste
21:46:27 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
21:47:10 <jcd> https://paste.tomsmeding.com/5trqeFMa
21:47:35 <jcd> Would it be better to say 'assign'?
21:47:59 <dminuoso> jcd: I see. So since httpLbs puts you into IO already, you could chose IO for parseRequest too
21:48:38 <dminuoso> Also note that this use of `Maybe` is not valid
21:48:50 <dminuoso> Sadly, there's not a very explicit way to make the choice, it is inferred on usage
21:48:52 <dminuoso> Say, if you wrote:
21:49:12 johnw_ joins (~johnw@haskell/developer/johnw)
21:49:14 minimario joins (2fe3e53b@047-227-229-059.res.spectrum.com)
21:49:18 hlisp joins (~hlisp@114.246.35.11)
21:49:22 <dminuoso> let f :: Maybe Request; f = parseRequest "https://google.de" in ...
21:49:38 <dminuoso> Then the choice is made in the type signature. Equivalently if you wrote:
21:49:49 <dminuoso> case parseRequest "https://google.de" of
21:49:51 <dminuoso> Nothing -> ...
21:49:54 <dminuoso> Just x -> ...
21:49:57 gxt joins (~gxt@gateway/tor-sasl/gxt)
21:50:19 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:50:21 <dminuoso> Then the choice is implicit because GHC can infer Maybe from the data constructors in the pattern matching.
21:51:07 <dminuoso> For your case, IO is probably a fine choice. Then you can just write: https://paste.tomsmeding.com/USndzrdo
21:51:20 <dminuoso> (The choice of IO is inferred based on the context automatically)
21:51:56 × ubert quits (~Thunderbi@p200300ecdf1e5361e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
21:52:31 hackage phonetic-languages-simplified-common 0.2.1.0 - A simplified version of the phonetic-languages-functionality https://hackage.haskell.org/package/phonetic-languages-simplified-common-0.2.1.0 (OleksandrZhabenko)
21:52:43 <jcd> Because of the 'do'!
21:52:50 <dminuoso> no, not the do
21:52:54 <jcd> Oh!
21:52:59 <jcd> the '<-'
21:53:04 <dminuoso> Also, no.
21:53:12 <dminuoso> If you keep guessing, you'll eventually figure it out.
21:53:14 <dminuoso> :)
21:53:25 <dminuoso> Well, the `do` notation is related, but not quite the point
21:53:33 <minimario> quick question: what's the logic behind making andM return Just False instead of Nothing when we call it on andM (Just False) Nothing?
21:53:45 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
21:54:16 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
21:54:50 <dminuoso> jcd: https://paste.tomsmeding.com/Xx49wa4s here there's two points of interest.
21:55:04 ski . o O ( <https://hackage.haskell.org/package/hood>,<https://hackage.haskell.org/package/GHood>,<https://wiki.haskell.org/Debugging#Printf_and_friends> )
21:55:40 <dminuoso> jcd: First there's the type signature telling us the do-notation uses IO. You left it out, which gives us another point of inference
21:55:44 <dminuoso> The type of httpLbs
21:56:15 <jcd> Since the httpLbs is the expression that gets returned?
21:56:27 <dminuoso> Not because it's returned, just its presence.
21:56:33 <dminuoso> It could be on any line in the do block, in fact.
21:56:50 <dminuoso> Roughly, do-notation is just a syntax desugarer
21:57:15 <dminuoso> It desugars uses of line breaks and <- into (>>) and (>>=)
21:57:32 <dminuoso> % :t (>>)
21:57:33 <yahb> dminuoso: Monad m => m a -> m b -> m b
21:57:34 <dminuoso> % :t (>>+)
21:57:35 <yahb> dminuoso: ; <interactive>:1:1: error:; * Variable not in scope: >>+; * Perhaps you meant one of these: `>>=' (imported from Prelude), `>>' (imported from Prelude), `>>>' (imported from Control.Arrow)
21:57:37 <dminuoso> % :t (>>=)
21:57:37 <yahb> dminuoso: Monad m => m a -> (a -> m b) -> m b
21:57:41 <ski> minimario : it's short-circuiting. since the first action (successfully) executes to `False', we abort and don't try the second
21:57:56 <dminuoso> jcd: Do you see in each type, there's multiple occurences of the *same* m?
21:58:35 rprije joins (~rprije@124.148.131.132)
21:58:42 <dminuoso> jcd: Recall, same story as above! This is a polymorphic value, *you* decide what you want for each of those type variables. So if you make the choice `IO` for the first `m` in say (>>=), then the other `m` in (>>=) become IO too.
21:58:54 <ski> minimario : similarly, if you did `andM readLn readLn', and you typed in `False' for the first one, it would abort the `andM', and not try executing the second `readLn'
21:59:45 <dminuoso> jcd: It's roughly similar to if you had `a + b + c + d`, and if `a` was of type Int, then `b`, `c` and `d` have to be of type Int.
21:59:51 <dminuoso> % :t (+)
21:59:51 <yahb> dminuoso: Num a => a -> a -> a
21:59:52 <ski> minimario : if you don't want short-circuiting, you can use `liftM2 (&&)'/`liftA2 (&&)'. but the point here was exactly when you want short-circuiting
22:00:18 <jcd> dminuoso: Yeah, I do! That explains the errors my REPL was dumping out.
22:00:45 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 240 seconds)
22:01:08 <jcd> dminuoso: Thank you so much for the help! Recommend any literature so I don't have cry anymore.
22:01:27 <minimario> ski: ah ok that makes sense
22:01:40 <ski> @hoogle Monad m => (a -> m Bool) -> [a] -> m Bool
22:01:41 <lambdabot> Control.Monad.Extra anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool
22:01:41 <lambdabot> Control.Monad.Extra allM :: Monad m => (a -> m Bool) -> [a] -> m Bool
22:01:41 <lambdabot> Extra anyM :: Monad m => (a -> m Bool) -> [a] -> m Bool
22:01:50 <ski> @hoogle Monad m => [m Bool] -> m Bool
22:01:51 <lambdabot> Control.Monad.Extra orM :: Monad m => [m Bool] -> m Bool
22:01:51 <lambdabot> Control.Monad.Extra andM :: Monad m => [m Bool] -> m Bool
22:01:51 <lambdabot> Extra orM :: Monad m => [m Bool] -> m Bool
22:01:56 <ski> similar thing, in those
22:02:17 × johnw_ quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in)
22:02:23 <ski> minimario : ooc, which module were you looking in ?
22:02:27 <dminuoso> jcd: Im not good on book references. I keep suggesting CIS194 because it's the only reference material I looked at in the past 12 months and it looked decent.
22:02:53 <dminuoso> And it happens to be one of the few resources that's not as dated
22:02:58 borne joins (~fritjof@200116b86455d000f1dc39039d201adf.dip.versatel-1u1.de)
22:03:16 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds)
22:03:21 <ski> @where CIS194
22:03:21 <lambdabot> https://www.seas.upenn.edu/~cis194/spring13/lectures.html
22:03:43 <minimario> oh lol i was just doing an intro haskell tutorial and one of the exercises was to implement andM haha
22:03:44 <dminuoso> There's also a more recent version of CIS194 from Joachim Breitner around, the style is slightly different.
22:03:45 hlisp joins (~hlisp@114.246.35.11)
22:03:51 <dminuoso> https://www.seas.upenn.edu/~cis194/fall16/
22:03:56 <ski> minimario : ah, okay
22:04:08 moet joins (~moet@mobile-166-137-178-165.mycingular.net)
22:04:34 Rudd0 joins (~Rudd0@185.189.115.103)
22:04:39 <moet> is there an equivalent to KnownNat(natVal) somewhere for types of kind Bool? .. or should i just define it?
22:04:40 <ski> dminuoso : any overheard opinion on the relative merits ?
22:05:24 maroloccio joins (~marolocci@2a02:8084:221:ce00:164f:8aff:fed8:411d)
22:05:33 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
22:06:46 × conal quits (~conal@172.255.125.150) (Quit: Computer has gone to sleep.)
22:07:05 × jneira quits (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) (Ping timeout: 240 seconds)
22:07:15 <ski> minimario : btw, note that the `andM' you were using was a monadic version of the binary conjunction, while the one in e.g. <https://hackage.haskell.org/package/extra/docs/Control-Monad-Extra.html> is `Monad m => [m Bool] -> m Bool', a monadic version of `and :: [Bool] -> Bool', taking a list
22:08:09 <minimario> oh hm there are two versions?
22:08:10 <minimario> interesting
22:08:17 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
22:08:26 <minimario> second one is just a generalization i guess :)
22:09:29 <dminuoso> ski: No.
22:09:41 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
22:10:12 <dminuoso> I only skimmed Brent's version, so Im not equipped to compare them well enough. But I know Brent spoke well of Joachim's take on the course.
22:10:14 FreeBirdLjj joins (~freebirdl@101.228.42.108)
22:10:55 <dminuoso> And at least the entry seems a bit easier since the first weeks build up ontop of each other, giving coherent excercises leading to a sokoban clone.
22:10:57 <ski> minimario : one is a monadic generalization of `(&&)'. the other of `and'
22:11:01 ronbrz joins (~ronbrz@207.229.174.134)
22:11:34 × Feuermagier quits (~Feuermagi@213.178.26.41) (Remote host closed the connection)
22:12:16 <ski> dminuoso : ok. i vaguely recall someone (in here), suggesting the 2013 spring version (over others). but it's possible that was before fall of 2016
22:12:56 <dminuoso> ski: I picked up a few arguments for both, but I never noticed any criticism about either.
22:13:17 wh00 joins (~wh0000@cpc152777-shef18-2-0-cust223.17-1.cable.virginm.net)
22:13:37 × wh0 quits (~wh0000@cpc152777-shef18-2-0-cust223.17-1.cable.virginm.net) (Ping timeout: 256 seconds)
22:14:18 × hyiltiz quits (~quassel@unaffiliated/hyiltiz) (Remote host closed the connection)
22:15:26 hyiltiz joins (~quassel@unaffiliated/hyiltiz)
22:16:24 × rawles quits (~r@unaffiliated/rawles) (Ping timeout: 240 seconds)
22:17:31 hackage dense 0.1.0.1 - Mutable and immutable dense multidimensional arrays https://hackage.haskell.org/package/dense-0.1.0.1 (cchalmers)
22:17:35 × wh00 quits (~wh0000@cpc152777-shef18-2-0-cust223.17-1.cable.virginm.net) (Ping timeout: 256 seconds)
22:17:49 <johnw> I wonder why there is Data.ByteString.isInfixOf, but not Data.ByteString.Lazy.isInfixOf; the others are present
22:17:56 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
22:18:43 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 256 seconds)
22:19:22 rawles joins (~r@unaffiliated/rawles)
22:19:45 FreeBirdLjj joins (~freebirdl@101.228.42.108)
22:21:21 conal joins (~conal@172.255.125.150)
22:21:38 jneira joins (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192)
22:25:28 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
22:25:57 <dminuoso> johnw: Mmm, even the isSuffixOf implementation is a bit questionable.
22:26:09 <dminuoso> Guess the reason seems that bytestring has no streaming facilities
22:26:51 <dminuoso> Is https://hackage.haskell.org/package/text-1.2.4.0/docs/src/Data.Text.Internal.Lazy.Search.html#indices portable to bytestring perhaps?
22:28:02 alp joins (~alp@88.126.45.36)
22:29:40 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:33:01 × minimario quits (2fe3e53b@047-227-229-059.res.spectrum.com) (Remote host closed the connection)
22:34:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
22:35:13 × conal quits (~conal@172.255.125.150) (Quit: Computer has gone to sleep.)
22:35:16 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->)
22:39:24 × Franciman quits (~francesco@host-79-27-199-238.retail.telecomitalia.it) (Quit: Leaving)
22:39:27 conal joins (~conal@64.71.133.70)
22:40:01 × luke quits (~luke@bitnomial/staff/luke) (Quit: sleep)
22:42:09 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 265 seconds)
22:44:39 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
22:44:54 FreeBirdLjj joins (~freebirdl@101.228.42.108)
22:49:14 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
22:49:57 × caasih quits (sid13241@gateway/web/irccloud.com/x-terlgyaghsopjzfx) (Ping timeout: 260 seconds)
22:49:57 × cemerick quits (sid54985@gateway/web/irccloud.com/x-sezszkubzwzwoedv) (Ping timeout: 260 seconds)
22:50:11 caasih joins (sid13241@gateway/web/irccloud.com/x-odjkianrohgyrvme)
22:50:32 × jbetz quits (sid283648@gateway/web/irccloud.com/x-lgtmgjydvhzpefgi) (Ping timeout: 260 seconds)
22:50:32 × trevorriles quits (sid469656@gateway/web/irccloud.com/x-vcwwrvniknzblcpg) (Ping timeout: 260 seconds)
22:50:32 × metadave quits (sid28102@gateway/web/irccloud.com/x-wybfodxjmjkizymy) (Ping timeout: 260 seconds)
22:50:32 × ibloom quits (sid350277@gateway/web/irccloud.com/x-hlioyajxeywwuxmx) (Ping timeout: 260 seconds)
22:50:43 ibloom joins (sid350277@gateway/web/irccloud.com/x-ftwuwcmqpnbfrqgs)
22:50:51 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
22:52:07 × chaosmasttter quits (~chaosmast@p200300c4a70b2a01f05e932a21001b8c.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
22:52:30 conal joins (~conal@64.71.133.70)
22:52:41 trevorriles joins (sid469656@gateway/web/irccloud.com/x-cfgejkqvovtgjbpt)
22:52:43 metadave joins (sid28102@gateway/web/irccloud.com/x-bjrjtdehstdxjwgn)
22:52:47 jbetz joins (sid283648@gateway/web/irccloud.com/x-sdqysuekfefsmces)
22:52:48 cemerick joins (sid54985@gateway/web/irccloud.com/x-bubkwfmgbakwqyik)
22:53:03 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:53:04 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 256 seconds)
22:53:20 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
22:54:36 × conal quits (~conal@64.71.133.70) (Client Quit)
22:56:01 conal joins (~conal@64.71.133.70)
22:59:48 vhs joins (~vhs@41.239.254.104)
23:00:40 minimario joins (2fe3e53b@047-227-229-059.res.spectrum.com)
23:01:03 <minimario> why does Data.List.init exist if take already exists?
23:02:31 <glguy> > init (repeat 'a')
23:02:33 <lambdabot> "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
23:02:36 <monochrom> How would you take to emulate init? You will run into an annoyance and an insurmountable problem.
23:02:42 <monochrom> err
23:02:44 <monochrom> How would you use take to emulate init? You will run into an annoyance and an insurmountable problem.
23:03:18 <glguy> monochrom: is the answer timeouts? ^_^
23:03:54 FreeBirdLjj joins (~freebirdl@101.228.42.108)
23:04:27 <minimario> oh i guess if the list is infinite
23:04:37 <minimario> but for finite lists they're equivalent, no?
23:04:53 <minimario> if i do something like init xs = take (length xs-1) xs or something
23:04:55 <glguy> it's undesirable to have to complete the whole length first before producing any list elements
23:05:03 <johnw> dminuoso: thanks for looking
23:05:12 <monochrom> Your "equivalence" probably ignores very important time and space complexities.
23:05:13 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
23:05:26 × Guest42 quits (56ca6780@gateway/web/cgi-irc/kiwiirc.com/ip.86.202.103.128) (Quit: Connection closed)
23:05:30 <minimario> can you explain that?
23:05:35 <minimario> they're both O(n) right?
23:05:40 <minimario> at least time
23:05:44 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
23:05:44 <minimario> i'm not sure how to reason about space
23:05:51 <monochrom> You are also ignoring lazy evaluation.
23:06:16 <monochrom> Suppose length xs = 10^10
23:06:36 <monochrom> "print (init xs)" can start printing the early elements right away.
23:06:48 <monochrom> It also stays in O(1) spacee.
23:07:24 <glguy> > head (init (1:2:undefined))
23:07:26 <lambdabot> 1
23:07:53 <monochrom> "print (take (length xs -1) xs)" will take its time to count the list length. Also when the counting is done, you're occupying 10^10 units of space memoizing the whole bloody list.
23:08:10 hlisp joins (~hlisp@114.246.35.11)
23:08:15 <minimario> oh i see
23:08:27 <monochrom> Factoring in thrashing, it is as good as taking forever.
23:09:00 <monochrom> Lt. Cmd. Data says, "believe me, for an android, 4.2 seconds feels like forever"
23:09:43 <monochrom> Now marvel at how I could pun on "take" so many times.
23:09:47 <minimario> haha makes sense, thanks guys:)
23:10:14 <minimario> just starting to learn these constructs, always feels very weird seeing what is inside Data.List and what is not
23:10:25 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:10:57 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Ping timeout: 260 seconds)
23:12:41 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:4914:be02:68a7:933e) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:13:05 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 265 seconds)
23:14:31 hackage tart 0.3 - Terminal Art https://hackage.haskell.org/package/tart-0.3 (JonathanDaugherty)
23:14:36 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
23:15:14 × mananamenos quits (~mananamen@84.122.202.215.dyn.user.ono.com) (Ping timeout: 256 seconds)
23:16:05 nbloomf joins (~nbloomf@2600:1700:ad14:3020:154:88ea:8f88:a5f)
23:19:22 christo joins (~chris@81.96.113.213)
23:19:25 × son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal)
23:19:56 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
23:22:17 conal joins (~conal@64.71.133.70)
23:22:31 hlisp joins (~hlisp@114.246.35.11)
23:24:12 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 265 seconds)
23:24:37 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
23:25:03 <texasmynsted> How does overloaded strings work? Specifically right here --> https://gist.github.com/mmynsted/7a7d365b20159bfcbb02f5e8371f1c82#file-gistfile1-txt-L48
23:25:14 <texasmynsted> I do not think that I should need toText
23:25:23 <texasmynsted> But I do.
23:25:35 FreeBirdLjj joins (~freebirdl@101.228.42.108)
23:25:36 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
23:25:52 <monochrom> overloaded strings is for string literals only. You have a variable.
23:26:37 ph88_ joins (~ph88@2a02:8109:9e00:7e5c:11e6:1867:44b7:d623)
23:26:50 <texasmynsted> well snap, that makes perfect sense then
23:27:02 × cawfee quits (chiya@2406:3003:2077:2341::babe) (Ping timeout: 260 seconds)
23:27:06 × jneira quits (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) (Ping timeout: 265 seconds)
23:27:18 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 260 seconds)
23:28:14 cawfee joins (chiya@2406:3003:2077:2341::babe)
23:30:02 × ph88^ quits (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds)
23:32:12 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
23:33:31 × minimario quits (2fe3e53b@047-227-229-059.res.spectrum.com) (Remote host closed the connection)
23:34:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:34:22 <texasmynsted> I forget where that toText came from
23:35:56 <texasmynsted> oooh I bet from relude
23:36:19 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 246 seconds)
23:36:46 × neiluj quits (~jco@unaffiliated/neiluj) (Ping timeout: 265 seconds)
23:36:54 hlisp joins (~hlisp@114.246.35.11)
23:37:01 × revprez_stg quits (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net) (Read error: Connection reset by peer)
23:37:53 <moet> glguy: picking up on our discussion from a few days ago: i'm embedding an external runtime in haskell via a c api and the Boolean package
23:38:24 <moet> eventually i settled on a type family to map haskell types to their representation in the external thing
23:38:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
23:38:26 hekkaidekapus} joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
23:38:40 <moet> and then i just implement all the numeric classes against the representation tiype
23:38:41 revprez_stg joins (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net)
23:38:46 <moet> ish
23:40:23 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
23:41:16 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 240 seconds)
23:41:39 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:154:88ea:8f88:a5f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:42:52 <Axman6> monochrom: aww, you never showed ths zipWith const xs (drop 2 xs)
23:42:52 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
23:43:01 Tario joins (~Tario@201.192.165.173)
23:44:33 <texasmynsted> okay. why would relude's toText be found in the main app but not for the test?
23:45:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:46:10 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
23:47:26 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:48:46 <texasmynsted> yes. Okay that was it.
23:48:54 <texasmynsted> :-)
23:49:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
23:51:35 hlisp joins (~hlisp@114.246.35.11)
23:53:30 × enoq quits (~textual@194-208-146-143.lampert.tv) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:55:47 <texasmynsted> How does this ./test work for tasty? https://github.com/feuerbach/tasty#readme
23:56:07 <texasmynsted> I can run `cabal test`.
23:56:13 kokwok joins (2fe3e53b@047-227-229-059.res.spectrum.com)
23:56:17 <kokwok> how can i write sumNumbers x = sum (map read (wordsBy (not . isDigit) x)) with point free notation?
23:56:19 <texasmynsted> But I see no way to pass the parameters to the tests
23:56:38 × hlisp quits (~hlisp@114.246.35.11) (Ping timeout: 272 seconds)
23:58:00 <monochrom> sum . map read . wordsBy (not . isDigit)
23:58:48 <jcd> I humbly come back in search of assistance.

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