Home liberachat/#haskell: Logs Calendar

Logs on 2021-11-02 (liberachat/#haskell)

00:04:57 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
00:06:26 × G_w quits (~Gw@197.3.191.56) (Remote host closed the connection)
00:09:57 × sander quits (~sander@user/sander) (Quit: So long! :))
00:11:05 × max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection)
00:16:36 zzz joins (~z@user/zero)
00:19:04 zzz is now known as yin
00:19:45 × zero quits (~z@user/zero) (Ping timeout: 268 seconds)
00:19:45 yin is now known as zero
00:21:06 × acidjnk quits (~acidjnk@p200300d0c7441145a0f2d1eed66e92ec.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
00:21:10 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
00:21:12 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
00:21:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
00:22:29 Lord_of_Life_ is now known as Lord_of_Life
00:24:21 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3)
00:28:10 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
00:29:05 cross joins (~cross@spitfire.i.gajendra.net)
00:29:45 × ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec)
00:31:58 <remexre> how far is DataKinds+GADTs from dependent types?
00:32:37 <monochrom> Very, very far.
00:34:57 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
00:36:58 <c_wraith> IIRC, with TypeInType you get to full dependent.... kinds.
00:37:08 <maerwald> and yet, not far enough that people come up with creative ways to emulate all sorts of it
00:38:37 <monochrom> The imitation game has always defined computing. :)
00:40:37 <monochrom> OK, but there is still a difference between a watertight emulation and a leaky emulation.
00:41:25 <monochrom> The need for something like the singleton library proves that we have a very leaky emulation for now.
00:44:00 jespada joins (~jespada@190.7.36.46)
00:44:36 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3)
00:46:34 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
00:49:43 × catman quits (~catman@user/catman) (Read error: Connection reset by peer)
00:50:43 × lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
00:51:03 × mmhat quits (~mmh@55d4a9b2.access.ecotel.net) (Quit: WeeChat 3.3)
00:51:33 catman joins (~catman@user/catman)
00:54:10 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3)
00:57:55 Codaraxis_ joins (~Codaraxis@user/codaraxis)
00:58:19 × Codaraxis_ quits (~Codaraxis@user/codaraxis) (Remote host closed the connection)
00:58:32 × catman quits (~catman@user/catman) (Quit: WeeChat 3.4-dev)
00:58:54 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
00:59:03 catman joins (~catman@user/catman)
00:59:52 sander joins (~sander@user/sander)
01:00:53 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
01:01:34 catern joins (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407)
01:01:42 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds)
01:02:01 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:02:58 × Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep)
01:03:19 × jespada quits (~jespada@190.7.36.46) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:03:43 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
01:05:42 <catern> dear lazyirc, how would I write a function which yields an infinite stream of binary numbers in a nice elegant recursive style? i.e. 0, 1, 10, 11, etc (I promise this is not homework)
01:06:01 <catern> (other than the obvious "map to_binary_string integers")
01:06:27 <Axman6> what type do you want them to be?
01:06:39 <catern> strings
01:06:47 <catern> or lists, anything other than int, I guess
01:07:16 <Axman6> there's a really cute way to do it and I can't remember...
01:07:26 <Axman6> iterate isn't a bad place to start though
01:07:44 <catern> that's how I'm feeling too, lol
01:08:38 <Axman6> > concat $ iterate (\xs -> xs ++ map ('1':) xs) [0,1] -- I wonder if this does anything...
01:08:40 <lambdabot> error:
01:08:40 <lambdabot> • No instance for (Num [Char]) arising from the literal ‘0’
01:08:40 <lambdabot> • In the expression: 0
01:09:00 <Axman6> > concat $ iterate (\xs -> xs ++ map ('1':) xs) ["0","1"] -- I wonder if this does anything...
01:09:02 <lambdabot> ["0","1","0","1","10","11","0","1","10","11","10","11","110","111","0","1","...
01:09:11 lavaman joins (~lavaman@98.38.249.169)
01:09:13 <Axman6> > concat $ iterate (\xs -> map ('1':) xs) ["0","1"] -- I wonder if this does anything...
01:09:14 <lambdabot> ["0","1","10","11","110","111","1110","1111","11110","11111","111110","11111...
01:09:27 <Axman6> no...
01:09:27 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
01:10:00 <Axman6> > mapM (flip replicateM "01") [1..]
01:10:07 <lambdabot> mueval-core: Time limit exceeded
01:10:16 <Axman6> > map (flip replicateM "01") [1..]
01:10:16 <shapr> take?
01:10:17 <lambdabot> [["0","1"],["00","01","10","11"],["000","001","010","011","100","101","110",...
01:10:19 <shapr> oh
01:11:38 <awpr> > reverse <$> let xs = [('1':), ('0':), id] <*> "1":xs in "0":xs
01:11:39 <lambdabot> ["0","11","111","1111","11111","111111","1111111","11111111","111111111","11...
01:11:50 <awpr> bad ordering
01:12:03 <Axman6> getting the order right is tough
01:13:55 Axman6 feels nerdsniped
01:14:14 shapr checks to see if Data.Bits has an Enum instance
01:15:37 <shapr> nope
01:16:33 quazimodo parts (~quazimodo@n1-40-235-47.bla1.nsw.optusnet.com.au) ()
01:20:28 <awpr> > let go xs = xs ++ go (xs <**> [('0':), ('1':)] ) in fmap reverse $ "0":go ["1"]
01:20:30 <lambdabot> ["0","1","10","11","100","101","110","111","1000","1001","1010","1011","1100...
01:23:19 <monochrom> I would map convert_to_binary [0..], and implement convert_to_binary.
01:24:16 <monochrom> Actually, s/would/would also consider/ All approaches are worth learning.
01:25:48 <awpr> > fmap ('1':) . flip replicateM "01" =<< [0..] -- this might fix the replicateM solution?
01:25:49 <lambdabot> ["1","10","11","100","101","110","111","1000","1001","1010","1011","1100","1...
01:26:03 <awpr> eh. zero isn't a number anyway
01:27:08 × srk quits (~sorki@user/srk) (Ping timeout: 260 seconds)
01:27:19 srk_ joins (~sorki@user/srk)
01:28:04 × tremon quits (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
01:29:59 srk_ is now known as srk
01:31:11 <Clint> too bad showBin didn't show up until base 4.16
01:36:42 × unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 260 seconds)
01:51:34 <koz> I want to make a pattern synonym which makes a single-item constructo behave like a two-item constructor where both items are the same item.
01:51:37 <koz> How do I spell that?
01:51:57 <koz> 'pattern Foo x x <- Bar x' doesn't work.
01:52:16 <dibblego> @type join (,)
01:52:17 <lambdabot> b -> (b, b)
01:52:59 <koz> dibblego: I don't follow.
01:53:47 fvr joins (uid503686@id-503686.uxbridge.irccloud.com)
01:54:47 <dibblego> I guess, why?
01:55:15 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
01:57:39 ahlk joins (~user@2600:1700:31c0:3a10::43)
02:00:48 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
02:04:04 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
02:04:38 lavaman joins (~lavaman@98.38.249.169)
02:10:43 bitmapper joins (uid464869@id-464869.lymington.irccloud.com)
02:16:50 Sgeo_ joins (~Sgeo@user/sgeo)
02:17:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:18:08 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 268 seconds)
02:20:07 justsomeguy joins (~justsomeg@user/justsomeguy)
02:20:35 zero is the *best* number
02:23:23 zero parts (~z@user/zero) ()
02:24:36 zero joins (~z@user/zero)
02:24:39 zero parts (~z@user/zero) ()
02:35:30 × ahlk quits (~user@2600:1700:31c0:3a10::43) (Read error: Connection reset by peer)
02:35:44 ahlk joins (~user@2600:1700:31c0:3a10::43)
02:42:11 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 268 seconds)
02:43:21 × trillp quits (~trillp@69.233.98.238) (Quit: nyaa~)
02:43:35 × emf quits (~emf@2620:10d:c090:400::5:f24f) (Ping timeout: 264 seconds)
02:45:39 emf joins (~emf@2620:10d:c091:480::1:9d5d)
02:45:54 zmt00 joins (~zmt00@user/zmt00)
02:46:42 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds)
02:47:07 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
02:51:27 × xff0x quits (~xff0x@2001:1a81:537f:9c00:96ab:881b:fbec:f66f) (Ping timeout: 268 seconds)
02:52:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
02:52:47 xff0x joins (~xff0x@2001:1a81:53bc:d300:c35b:4f80:361f:6318)
02:56:43 emf_ joins (~emf@2620:10d:c090:400::5:5f62)
02:57:00 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
02:58:35 × emf quits (~emf@2620:10d:c091:480::1:9d5d) (Ping timeout: 264 seconds)
02:58:39 × boxscape_ quits (~boxscape_@mue-88-130-59-184.dsl.tropolys.de) (Quit: Connection closed)
03:01:18 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds)
03:04:26 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
03:11:43 <monochrom> zero : best number :: nobody : perfect >:)
03:11:56 boxscape_ joins (~boxscape_@mue-88-130-59-184.dsl.tropolys.de)
03:14:16 × xff0x quits (~xff0x@2001:1a81:53bc:d300:c35b:4f80:361f:6318) (Ping timeout: 268 seconds)
03:15:05 xff0x joins (~xff0x@2001:1a81:53bc:d300:4699:7f78:c236:affc)
03:18:43 × tcard_ quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
03:20:12 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
03:29:41 × xff0x quits (~xff0x@2001:1a81:53bc:d300:4699:7f78:c236:affc) (Ping timeout: 268 seconds)
03:30:18 xff0x joins (~xff0x@port-92-195-109-25.dynamic.as20676.net)
03:36:26 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
03:40:23 mbuf joins (~Shakthi@171.61.170.115)
03:41:52 zmt01 joins (~zmt00@user/zmt00)
03:43:10 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 260 seconds)
03:45:34 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 260 seconds)
03:47:25 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
03:47:50 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
03:49:42 stevenxl_ joins (~stevenlei@174.128.182.120)
04:00:39 × stevenxl_ quits (~stevenlei@174.128.182.120) (Quit: leaving)
04:00:55 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
04:05:34 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
04:05:54 × alx741 quits (~alx741@181.196.69.253) (Quit: alx741)
04:15:50 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 260 seconds)
04:21:28 × boxscape_ quits (~boxscape_@mue-88-130-59-184.dsl.tropolys.de) (Ping timeout: 268 seconds)
04:25:22 Krusl joins (~Krusl@2001:da8:9000:a436:b9ff:5056:861f:3e05)
04:25:29 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
04:28:32 zmt00 joins (~zmt00@user/zmt00)
04:35:26 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds)
04:35:54 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 260 seconds)
04:45:04 × Krusl quits (~Krusl@2001:da8:9000:a436:b9ff:5056:861f:3e05) (Read error: Connection reset by peer)
04:48:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:58:18 × Athas quits (athas@2a01:7c8:aaac:1cf:ca09:aa6a:e1e8:dce5) (Quit: ZNC 1.8.2 - https://znc.in)
04:58:28 Athas joins (athas@sigkill.dk)
05:05:17 tcard joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
05:11:33 eggplant_ joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
05:11:50 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:54f0:825c:9f33:c349) (Ping timeout: 260 seconds)
05:11:53 iqubic joins (~user@2601:602:9502:c70:458b:ca39:de67:50b0)
05:13:20 <iqubic> What's the best way to test if a given double is a whole number? Should I just use "(\x -> floor x == x)"?
05:13:42 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
05:15:05 <iqubic> No, that doesn't work, because there's no instance for (Integral Double)
05:15:35 <iqubic> s/whole/integer/
05:17:05 zmt00 joins (~zmt00@user/zmt00)
05:17:19 <c_wraith> it's a bit of a weird question, because it's generally not a good idea to think of a Double as representing a number
05:17:30 <c_wraith> It's more like a range of possible numbers
05:18:06 <iqubic> How so?
05:18:15 <c_wraith> > 1 / 3
05:18:16 <lambdabot> 0.3333333333333333
05:18:24 __xor is now known as _xor
05:18:29 <c_wraith> > 3 * (1 / 3)
05:18:30 <lambdabot> 1.0
05:18:47 <c_wraith> there's a bit of a contradiction, there
05:19:43 <iqubic> Why?
05:20:47 <c_wraith> if you multiply 0.3333333333333333 by 3, you end up with a string of 9s after the decimal point. (no, this is not .9 repeating equals one, because that's not repeating)
05:22:10 <c_wraith> that tells you that the result of (1/3) isn't exactly what it prints, because that would multiply out differently. But it also isn't exactly the rational 1/3, because that's not encodable in the IEEE-754 format
05:22:21 <c_wraith> it's... squishier
05:22:32 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
05:22:59 <iqubic> Yeah. Doubles are weird.
05:26:08 <c_wraith> quick quiz: is (0.5 + 2^54 - 2^54 - 0.5 ) a whole number?
05:26:14 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 268 seconds)
05:26:23 <c_wraith> > 0.5 + 2^54 - 2^54 - 0.5
05:26:25 <lambdabot> -0.5
05:26:40 <c_wraith> It's a weird question to ask about floating-point. :)
05:27:08 <dsal> Usually the best question when dealing with floating point has "epsilon" somewhere in it.
05:28:10 zmt00 joins (~zmt00@user/zmt00)
05:28:21 <c_wraith> all that said, you can probably get what you want in the obvious cases with `ceiling x == floor x'
05:28:58 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
05:30:27 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:30:27 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
05:30:27 wroathe joins (~wroathe@user/wroathe)
05:33:21 unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
05:34:39 zmt01 joins (~zmt00@user/zmt00)
05:35:29 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
05:39:10 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 268 seconds)
05:46:34 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds)
05:48:25 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds)
05:49:49 × Skyfire quits (~pyon@user/pyon) (Read error: Connection reset by peer)
05:54:48 zmt00 joins (~zmt00@user/zmt00)
05:55:34 × zmt00 quits (~zmt00@user/zmt00) (Remote host closed the connection)
05:58:17 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 268 seconds)
06:03:24 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 276 seconds)
06:04:07 <Axman6> :t properFraction
06:04:08 <lambdabot> (RealFrac a, Integral b) => a -> (b, a)
06:04:20 <Axman6> > properFraction pi
06:04:22 <lambdabot> (3,0.14159265358979312)
06:05:07 ChaiTRex joins (~ChaiTRex@user/chaitrex)
06:05:38 <Axman6> > let isWhole (properFraction -> (_,x)) = x == 0 in (isWhole 1, isWhole 1000000000001, isWhole pi, isWhole (3 * (1/3)))
06:05:38 × MQ-17J quits (~MQ-17J@8.6.144.203) (Read error: Connection reset by peer)
06:05:39 <lambdabot> (True,True,False,True)
06:06:40 MQ-17J joins (~MQ-17J@8.6.144.203)
06:09:11 × hendursaga quits (~weechat@user/hendursaga) (Remote host closed the connection)
06:09:53 hendursaga joins (~weechat@user/hendursaga)
06:13:25 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
06:28:58 rkrishnan joins (~user@223.226.59.167)
06:39:12 dyeplexer joins (~dyeplexer@user/dyeplexer)
06:47:38 × timCF_ quits (~timCF@m91-129-101-112.cust.tele2.ee) (Ping timeout: 268 seconds)
06:49:46 max22- joins (~maxime@2a01cb0883359800d15ccd5476102118.ipv6.abo.wanadoo.fr)
06:59:10 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
07:00:14 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
07:07:17 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
07:12:55 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
07:18:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:19:43 × juhp quits (~juhp@128.106.188.220) (Quit: juhp)
07:23:39 × Sgeo_ quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:25:45 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
07:27:11 img joins (~img@user/img)
07:29:36 michalz joins (~michalz@185.246.204.104)
07:32:51 gehmehgeh joins (~user@user/gehmehgeh)
07:33:14 × son0p quits (~ff@181.136.122.143) (Ping timeout: 260 seconds)
07:33:56 × son0p- quits (~ff@181.136.122.143) (Ping timeout: 260 seconds)
07:35:27 fendor joins (~fendor@77.119.197.65.wireless.dyn.drei.com)
07:40:56 × fizzsegfaultbuzz quits (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 260 seconds)
07:44:10 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
07:45:48 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
07:46:22 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
07:47:48 img joins (~img@user/img)
07:48:55 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Client Quit)
07:49:08 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
07:52:36 lortabac joins (~lortabac@2a01:e0a:541:b8f0:c40:37f:b11e:565f)
07:52:59 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
07:54:00 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Client Quit)
07:54:36 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
07:55:25 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
08:00:23 × eggplant_ quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:02:44 neurocyte0132889 joins (~neurocyte@IP-213157011136.dynamic.medianet-world.de)
08:02:44 × neurocyte0132889 quits (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host)
08:02:44 neurocyte0132889 joins (~neurocyte@user/neurocyte)
08:03:23 × fvr quits (uid503686@id-503686.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:05:19 hendursa1 joins (~weechat@user/hendursaga)
08:08:51 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
08:10:20 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
08:12:26 jumper149 joins (~jumper149@80.240.31.34)
08:13:39 cfricke joins (~cfricke@user/cfricke)
08:19:33 acidjnk joins (~acidjnk@p200300d0c7441145a0f2d1eed66e92ec.dip0.t-ipconnect.de)
08:21:07 shidima joins (~shidima@188-206-67-204.mobile.kpn.net)
08:23:24 chele joins (~chele@user/chele)
08:28:08 <shidima> @Hecate, thanks for the help! Sorry I didn't react, things got a bit hectic :) I Think I solved it: https://paste.tomsmeding.com/60CO6IQm
08:28:08 <lambdabot> Unknown command, try @list
08:30:32 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:36:41 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
08:37:49 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer)
08:39:43 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
08:40:17 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
08:45:25 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
08:50:47 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
08:51:44 neurocyte0132889 joins (~neurocyte@IP-213157011136.dynamic.medianet-world.de)
08:51:44 × neurocyte0132889 quits (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host)
08:51:44 neurocyte0132889 joins (~neurocyte@user/neurocyte)
08:52:41 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
08:53:49 dyeplexer joins (~dyeplexer@user/dyeplexer)
08:59:31 img joins (~img@user/img)
09:00:12 mc47 joins (~mc47@xmonad/TheMC47)
09:01:01 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
09:01:02 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
09:01:51 <shidima> I'm (trying) to follow 'Practical Haskell, a real world guide'. But I keep running into problems with the code from the book. Does any one have any experiance with the book?
09:04:37 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:05:42 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
09:06:07 × unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection)
09:07:35 <merijn> Never heard of it, tbh. But then there seem to be dozens of books I haven't heard of in the past 5 years :p
09:07:54 <merijn> What kinda problems?
09:11:33 azeem joins (~azeem@emp-89-199.eduroam.uu.se)
09:13:06 × timCF quits (~timCF@200-149-20-81.sta.estpak.ee) (Ping timeout: 260 seconds)
09:15:31 fvr joins (uid503686@id-503686.uxbridge.irccloud.com)
09:15:55 <shidima> Well, the code examples are not working, and I'm not sure it is all my fault. That makes it a bit frustrating.
09:17:12 ubert joins (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de)
09:18:09 <merijn> shidima: Can you pastebin an example and the error it gives?
09:19:49 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:21:40 jonathanclarke joins (~jonathanc@36.252.181.57)
09:22:02 × ubert quits (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
09:22:16 mei joins (~mei@user/mei)
09:22:20 ubert joins (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de)
09:22:42 <shidima> The code compiles, but when I run the example in ghci I get an error: https://paste.tomsmeding.com/tK9370YY
09:22:48 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:24:04 <merijn> shidima: oh!
09:24:26 <merijn> shidima: If that's literally copy paste from the book, it's an error in the book
09:24:38 <merijn> shidima: Consider this: How many arguments does clientName take?
09:25:03 <shidima> just one
09:25:06 <shidima> A string
09:25:47 <shidima> I tried moving the last bracket around the boolean at the end, but thats not working either :)
09:26:11 <merijn> oh, there's a bunch of problems there
09:26:28 <merijn> Starting with: Individual [Person "Jack" "Smith" Male]
09:26:48 hge joins (~helmut@2a02:8106:223:e000:2c6e:6ca4:e28e:520)
09:26:57 <merijn> shidima: If you look at line 5 you see that Individual is defined to take a Person and Bool as arguments
09:27:05 <merijn> But it's getting a list of Person there
09:27:36 <[exa]> weird, the code contains normal (parens) ?
09:27:37 × hge quits (~helmut@2a02:8106:223:e000:2c6e:6ca4:e28e:520) (Client Quit)
09:27:57 <merijn> [exa]: Copy paste error? Or weird fancy book formatting?
09:28:39 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
09:29:00 <merijn> shidima: Anyway, even if you replace the [] with () it will go wrong because "Individual (Person "Jack" "Smith" Male) :: Bool -> Client" and you are applying clientName (which wants a Client) to that function and trying to apply the result of that to True
09:29:04 <[exa]> no idea I just clicked that and wondered where the H does the error come from
09:29:36 <merijn> [exa]: The error is triggered by line 4 of the error paste
09:30:22 <[exa]> aah the code isn't in datatypes.hs, ok good :]
09:30:57 <[exa]> then just bracketing problems :]
09:31:25 <shidima> Relevant section in the book: https://snipboard.io/6VWrgx.jpg
09:32:27 <merijn> shidima: Yeah, that is just straight up type error in the example
09:32:40 <merijn> That's...not a good look
09:33:10 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
09:33:16 <shidima> It makes it a bit hard if you are still learning :)
09:33:53 <merijn> shidima: The correct code woulda been: clientName (Individual (Person "Jack" "Smith" Male) False)
09:34:17 <merijn> i.e. Individual applied to two arguments (Person and Bool) and clientName applied to the result of that
09:34:45 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 268 seconds)
09:35:10 <merijn> Not inspiring a lot of confidence if the text has this level of error, though
09:35:16 <shidima> Yes, that works. I already had my doubt about the dangeling boolean, but wasent sure about the square brackets
09:36:15 <shidima> Well, time to find a different book then. To bad, I do like the premis of building something in a book, and not just loose examples
09:36:31 <merijn> @where books
09:36:31 <lambdabot> https://www.extrema.is/articles/haskell-books, see also @where LYAH, RWH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, HTAC, TwT, FoP, PFAD, WYAH, non-haskell-books
09:36:48 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
09:37:30 <merijn> "Thinking Functionally with Haskell" and "Programming in Haskell" are well regarded. Haskell Programming from First Principles is solid but rather verbose and huge
09:37:55 <shidima> Heh, this book is on the list tho :)
09:38:30 <shidima> I will look into you sugestions, thanks!
09:38:51 × alzgh quits (~alzgh@user/alzgh) (Ping timeout: 256 seconds)
09:43:35 × wolfshappen quits (~waff@irc.furworks.de) (Ping timeout: 260 seconds)
09:43:43 wolfshappen_ joins (~waff@irc.furworks.de)
09:44:12 drownbes joins (~drownbes@200-149-20-81.sta.estpak.ee)
09:45:48 thyriaen joins (~thyriaen@x4dbf0bd8.dyn.telefonica.de)
09:46:11 juhp joins (~juhp@128.106.188.220)
09:47:04 × ubert quits (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
09:47:05 <merijn> shidima: I mean, anyone can edit that list, so it's not necessarily all held in the same regard :p
09:47:18 <shidima> hehe :)
09:47:34 hellcatto joins (~hellcatto@user/runecroon)
09:49:21 <hellcatto> Hello, I'm using VSCode and haskell-lsp right now. How do I rename identifier using lsp? Usually, with other langs that runs on LSP, I could just press f2 and rename. Is it different keybinding or is not yet an available feature?
09:50:11 <jneira[m]> it is not available by default yet, nor included in the prebuilt binaries
09:50:38 <jneira[m]> https://github.com/haskell/haskell-language-server/issues/2193
09:50:59 <hellcatto> jneira[m]: I see. Thank you for pointing that out.
09:51:02 <drownbes> Hi. I am using ghc as library to transform ast and write back to file. The problem is that parseModule function gives ast without comments and pragmas. How I extract them from module and insert back into generated file?
09:52:18 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds)
09:54:23 <dminuoso> drownbes: This is a very complicated problem domain.
09:54:35 <dminuoso> I recall a variety of papers on that subject
09:55:11 × hellcatto quits (~hellcatto@user/runecroon) (Quit: Leaving)
09:56:13 <dminuoso> drownbes: This is called exact printing
09:56:33 <geekosaur> ghc-exactprint is supposed to be merged as of 9.2.1, but I don't know if you need extra flags to use it
09:56:52 <geekosaur> this is probably a question for #ghc
09:59:51 <alanz> geekosaur: the main functionality is in ghc, but you currently still use ghc-exactprint from hackage. Version 1.1. And it may need an update for the actual release. Will do it today
10:00:06 <drownbes> thx. It's not my case. Our project is stuck for while on 8.6.5. I guess for practical usecase we can just extract pragmas as a strings and ignore comments...
10:03:01 <drownbes> i came to haskell from js world and there codeshifts using ast are quite common in migrating large codebases to new versions of language. https://astexplorer.net/
10:03:38 <drownbes> is there any such gui ast explorer for haskell?
10:04:04 <maerwald> ahahaha
10:06:10 dyeplexer joins (~dyeplexer@user/dyeplexer)
10:07:12 cosimone joins (~user@93-47-228-48.ip115.fastwebnet.it)
10:10:31 × mc47 quits (~mc47@xmonad/TheMC47) (Ping timeout: 268 seconds)
10:15:37 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
10:18:10 gensyst joins (gensyst@user/gensyst)
10:18:47 <gensyst> Is there any isMainThread function out there, to check if current thread is the main thread?
10:19:42 <gensyst> (other than grab the main thread id in main func and pass it around everywhere)
10:20:09 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Read error: Connection reset by peer)
10:20:41 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
10:22:31 wonko joins (~wjc@user/wonko)
10:23:18 <merijn> gensyst: not afaik
10:23:56 ubert joins (~Thunderbi@ip5b405828.dynamic.kabel-deutschland.de)
10:27:04 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
10:28:00 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
10:28:30 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
10:31:34 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
10:35:21 × thyriaen quits (~thyriaen@x4dbf0bd8.dyn.telefonica.de) (Quit: Leaving)
10:39:35 <maerwald> can use a global IORef
10:42:37 <gensyst> maerwald, i guess that will be fine, thanks
10:43:12 <maerwald> make sure to use NOINLINE
10:44:21 <maerwald> foo = unsafePerformIO $ newIORef 0
10:46:39 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
10:47:24 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
10:49:39 thblt parts (~thblt@user/thblt) (ERC (IRC client for Emacs 28.0.50))
10:52:36 <gensyst> thanks!
10:56:00 <gensyst> maerwald, the NOINLINE ensures the cached version is used in 2nd and later calls?
10:56:07 <gensyst> (i.e. always the same ioref)
10:57:55 Cajun joins (~Cajun@user/cajun)
10:59:06 × shidima quits (~shidima@188-206-67-204.mobile.kpn.net) (Ping timeout: 260 seconds)
10:59:30 <maerwald> yeah sorta
10:59:39 <gensyst> maerwald, and another question is, how to actually make sure this gets called when i call it in main? (other than forcing its evaluation by outputting the main thread id to stdout)
11:00:51 alx741 joins (~alx741@181.196.69.253)
11:01:51 <maerwald> you use writeIORef in `main` to fill it
11:01:54 <maerwald> that should be enough
11:02:49 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
11:03:46 yauhsien_ joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
11:03:54 <dminuoso> gensyst: unsafePerformIO can be subtly dangerous. :)
11:04:40 <maerwald> dminuoso: what's unsafe about this particular pattern other than that it's a hack?
11:05:16 <dminuoso> Nothing, just saying that the NOINLINE is needed precisely because unsafePerformIO is subtly dangerous.
11:05:23 <maerwald> sure
11:07:51 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
11:07:52 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
11:07:54 <dminuoso> gensyst: You can assume the thread id of main to be 24. Your program will be right 75% (?) of the time.
11:08:00 <dminuoso> /s
11:14:05 arjun joins (~user@user/arjun)
11:14:22 <arjun> how do i point to cabal that install this package from this url and not hackage ?
11:14:25 × agoraphobic quits (~agoraphob@ip11-173.bon.riksnet.se) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in)
11:14:31 <arjun> its a github master branch
11:14:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
11:15:13 <jneira[m]> `source-repository-package` in `cabal.project`?
11:15:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:15:46 <jneira[m]> https://cabal.readthedocs.io/en/latest/cabal-package.html#pkg-section-source-repository-source-repository
11:17:23 <gensyst> maerwald, ah, so the initial value is just a dummy value? (undefined for instance)
11:17:38 <gensyst> (undefined :: ThreadId)
11:18:14 <gensyst> s/initial value/the value put into newIORef
11:18:45 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
11:18:59 <gensyst> no, forget that. it seems more like i'll be duplicating the main thread ID. once for newIORef, and then into writeIORef just to make sure it's in there
11:19:07 <gensyst> kind of unfortunate duplication though
11:19:56 <arjun> jneira[m]: no good
11:20:19 <arjun> maybe im missing something here
11:20:34 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
11:20:56 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:23:37 × yauhsien_ quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
11:24:12 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
11:24:40 × bitmapper quits (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
11:30:16 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
11:31:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
11:31:35 <arjun> jneira[m]: got it working, nvm, thanks!
11:37:14 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:42:18 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
11:42:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
11:42:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:46:15 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
11:50:31 jakalx joins (~jakalx@base.jakalx.net)
11:52:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
11:53:30 × jonathanclarke quits (~jonathanc@36.252.181.57) (Ping timeout: 268 seconds)
11:53:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:59:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
11:59:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:00:46 jstolarek joins (~jstolarek@137.220.120.162)
12:03:05 shidima joins (~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl)
12:03:13 mikoto-chan joins (~mikoto-ch@185.25.79.186)
12:03:13 guniberas joins (~guniberas@42.191.188.121)
12:04:50 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
12:05:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:05:28 × mikoto-chan quits (~mikoto-ch@185.25.79.186) (Client Quit)
12:07:22 mc47 joins (~mc47@xmonad/TheMC47)
12:10:54 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
12:12:44 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
12:13:50 × mc47 quits (~mc47@xmonad/TheMC47) (Ping timeout: 268 seconds)
12:17:32 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
12:23:08 kadir joins (~kadir@95.7.9.203)
12:23:42 × MQ-17J quits (~MQ-17J@8.6.144.203) (Ping timeout: 268 seconds)
12:23:43 × azeem quits (~azeem@emp-89-199.eduroam.uu.se) (Ping timeout: 268 seconds)
12:24:19 azeem joins (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659)
12:25:01 servytor joins (uid525486@id-525486.hampstead.irccloud.com)
12:25:35 × slowtyper quits (~slowtyper@user/slowtyper) (Ping timeout: 260 seconds)
12:25:43 Ainoretho joins (~ypw@huji-132-64-245-223.xt.huji.ac.il)
12:25:50 × Ainoretho quits (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Client Quit)
12:26:36 <servytor> I am trying to decide between common lisp and haskell for a project
12:27:01 <servytor> I am worried because I have had issues with haskell-language-server borking up when editing in emacs
12:27:18 jonathanclarke joins (~jonathanc@110.44.127.167)
12:28:26 slowtyper joins (~slowtyper@user/slowtyper)
12:28:46 Ainoretho joins (~ypw@huji-132-64-245-223.xt.huji.ac.il)
12:30:02 × Ainoretho quits (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Client Quit)
12:30:16 Ainoretho joins (~ypw@huji-132-64-245-223.xt.huji.ac.il)
12:31:47 × Ainoretho quits (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Client Quit)
12:32:02 Ainoretho joins (~ypw@huji-132-64-245-223.xt.huji.ac.il)
12:32:14 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
12:32:20 × mei quits (~mei@user/mei) (Ping timeout: 268 seconds)
12:32:58 × jonathanclarke quits (~jonathanc@110.44.127.167) (Ping timeout: 268 seconds)
12:36:55 mei joins (~mei@user/mei)
12:37:02 × Ainoretho quits (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Quit: WeeChat 3.3)
12:40:17 kadir parts (~kadir@95.7.9.203) ()
12:42:55 dyeplexer joins (~dyeplexer@user/dyeplexer)
12:42:59 thyriaen joins (~thyriaen@x4dbf0bd8.dyn.telefonica.de)
12:44:29 jonathanclarke joins (~jonathanc@36.252.181.57)
12:44:45 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:45:32 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
12:46:21 × gensyst quits (gensyst@user/gensyst) (Quit: Leaving)
12:48:59 × mei quits (~mei@user/mei) (Ping timeout: 268 seconds)
12:50:10 yrlnry joins (~mjd@pool-100-11-2-80.phlapa.fios.verizon.net)
12:50:58 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
12:51:46 <maerwald> I'm worried too
12:53:56 × max22- quits (~maxime@2a01cb0883359800d15ccd5476102118.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
12:57:47 × azeem quits (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659) (Read error: Connection reset by peer)
12:58:04 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
12:58:39 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
12:58:53 azeem joins (~azeem@emp-89-199.eduroam.uu.se)
12:59:32 kadir joins (~kadir@95.7.9.203)
13:00:05 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 268 seconds)
13:01:54 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
13:02:19 <servytor> maerwald: what's your experience with hls?
13:03:20 <maerwald> it works occasionally
13:03:47 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
13:03:49 <maerwald> some issues with TH
13:04:27 mmhat joins (~mmh@55d4b212.access.ecotel.net)
13:04:37 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
13:06:01 <dminuoso> The main thing I dislike about HLS is that it adds quite a bit of complexity and moving parts.
13:06:15 <dminuoso> When things go wrong, it's usually some combination of "restart the entire editor and/or hls"
13:06:16 × azeem quits (~azeem@emp-89-199.eduroam.uu.se) (Ping timeout: 268 seconds)
13:06:26 <dminuoso> It adds great value, but it's definitely not lightweight
13:06:33 <maerwald> I think that's more due to the nature of LSP
13:07:18 <dminuoso> Perhaps, but stories of stale compilation state are not unhead of, and that's an HLS issue
13:08:14 <maerwald> if I knew how to fix I would rant more about it
13:08:16 <dminuoso> But it's absolutely lovely to remove some binding, and then have HLS clean up 17 unused imports with jus one click.
13:08:33 azeem joins (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659)
13:08:47 <dminuoso> It improved my haskell life considerably, but the brittleness is definitely noticeable at times
13:09:18 <dminuoso> ghcide should still not be forgotten, as that one is really solid, stable and lightweight.. :)
13:09:20 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
13:10:02 betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be)
13:11:46 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
13:13:03 × arjun quits (~user@user/arjun) (Remote host closed the connection)
13:13:38 <merijn> dminuoso: Define solid
13:13:49 <merijn> dminuoso: For me it breaks on everything but the most trivial code
13:16:15 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
13:16:30 × ncopa quits (~ncopa@gbr2-dev1.alpinelinux.org) (Changing host)
13:16:30 ncopa joins (~ncopa@alpine/developer/ncopa)
13:18:34 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:20:12 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
13:22:55 × azeem quits (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659) (Ping timeout: 268 seconds)
13:23:51 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
13:24:18 cigsender joins (~cigsender@74.124.58.162)
13:24:27 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
13:24:38 × lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
13:24:57 lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
13:27:23 × jonathanclarke quits (~jonathanc@36.252.181.57) (Ping timeout: 264 seconds)
13:28:48 azeem joins (~azeem@emp-89-199.eduroam.uu.se)
13:29:41 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
13:30:15 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
13:36:44 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
13:39:04 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer)
13:39:31 dyeplexer joins (~dyeplexer@user/dyeplexer)
13:40:49 jonathanclarke joins (~jonathanc@36.252.181.57)
13:41:05 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
13:41:40 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
13:44:36 kadir parts (~kadir@95.7.9.203) ()
13:46:50 mei joins (~mei@user/mei)
13:46:58 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
13:47:36 × w1gz quits (~do@159.89.11.133) (Quit: WeeChat 3.0.1)
13:48:14 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
13:50:31 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection)
13:52:51 × mei quits (~mei@user/mei) (Read error: Connection reset by peer)
13:53:00 mei joins (~mei@user/mei)
13:53:41 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
13:53:41 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
13:53:41 wroathe joins (~wroathe@user/wroathe)
13:55:04 Guest|69 joins (~Guest|69@89.211.234.25)
13:55:15 <Guest|69> Hello guys
13:55:48 <geekosaur> ohai
13:56:03 <Guest|69> these are my first days using Haskell on Mac , and I'm having a problem:
13:56:06 <maerwald> Guest|69: run `source ~/.ghcup/env`
13:57:01 <Guest|69> whenever I restart the terminal and run ghci the terminal gives command not found
13:57:37 <Guest|69> although I did install it
14:00:31 <yushyin> maerwald: i see your crystal ball is working wonderfully today
14:00:52 <[exa]> Guest|69: you probably need to ensure that the PATH setting is loaded everytime you start the terminal
14:01:09 <[exa]> Guest|69: did you check bashrc and everything? (not sure that exists on mac though)
14:01:20 <merijn> [exa]: zsh by default nowadays
14:01:25 <Guest|69> I thought of that but I didn't know how to do it
14:01:49 <[exa]> check out if you have any .zshrc or similar files in your home dir
14:01:56 <Guest|69> sorry but I'm jus
14:02:00 <dminuoso> merijn: Not sure why ghcide would break for you.
14:02:06 [exa] <- totally untouched by Mac
14:02:06 <Guest|69> new to programming
14:02:24 × Guest|69 quits (~Guest|69@89.211.234.25) (Quit: Connection closed)
14:03:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
14:04:11 Guest|58 joins (~Guest|58@89.211.234.25)
14:04:33 <[exa]> Guest|58: try something like: ls -a ~
14:04:34 do joins (~do@159.89.11.133)
14:05:23 <Guest|58> hello I'm guest 69
14:06:04 × mei quits (~mei@user/mei) (Ping timeout: 268 seconds)
14:06:09 <merijn> dminuoso: FFI and TH are both brittle
14:06:29 <Guest|58> so I install Haskell then when I restart my terminal it doesn't work
14:06:31 <dminuoso> Guess they are brittle irrespective of whether its HLS or ghcide
14:06:38 <merijn> dminuoso: Also lack of component support
14:06:41 <dminuoso> Though ffi hasnt been a problem yet, QQ/TH is.
14:08:17 <maerwald> dminuoso: I have problems with ffi... -fobject-code seems to break stuff
14:14:01 <Guest|58> how can I save Haskell so I don't have to reinstall it each time I restart my terminal
14:15:02 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 260 seconds)
14:15:36 <yushyin> Guest|58: run `source ~/.ghcup/env` this in your terminal, if this works, add it to the end of your ~/.zshrc
14:16:49 × Nachtgespenst quits (~user@user/siracusa) (Quit: Bye!)
14:19:40 boxscape_ joins (~boxscape_@134.171.69.87)
14:19:56 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:19:56 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:19:56 wroathe joins (~wroathe@user/wroathe)
14:20:24 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
14:20:49 hendursaga joins (~weechat@user/hendursaga)
14:20:55 <Guest|58> yushyin I got nothing like I simply pressed enter
14:22:35 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
14:22:35 slack1256 joins (~slack1256@191.126.99.76)
14:22:41 <Guest|58> Uploaded file: https://uploads.kiwiirc.com/files/efabc507c63ccc0b8193f4aaebf0af19/Screenshot%202021-11-02%20at%2017.21.36.png
14:23:19 <slack1256> What is the second most popular numerical hierarchy? The `foundation` library seems to be it, right?
14:24:05 <merijn> The 2nd most popular is "none" :p
14:24:10 <geekosaur> Guest|58, it won't do anything visible, but "ghci" should work afterward
14:24:11 do is now known as w1gz
14:24:35 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
14:24:45 <geekosaur> hm, that screenshot says you're already in ghci
14:24:56 <slack1256> merijn: :sad:
14:25:11 <geekosaur> the "Prelude>" prompt, indicating that the module "Prelude" is active because you didn't load a different module)
14:25:37 <Guest|58> my problem is when I restart my terminal i can't run ghci
14:25:57 <geekosaur> right, at that point you run that "source" command and then you should be able to run ghci
14:25:59 <Guest|58> it's like I didn't install Haskell in the first place
14:26:21 <geekosaur> if that works, you add the "source" command to your .zshrc so it'll be run automatically when you open a terminal
14:27:43 <Guest|58> source ~/.ghcup/env this source command ?
14:27:50 <geekosaur> yes
14:28:20 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
14:28:29 <geekosaur> to summarize what's going on, the terminal only looks in certain places for commands. the "source" command adds a new place to that list of places, so ghc and ghci should be found afterward
14:28:58 <Guest|58> thank you
14:29:20 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
14:29:32 <Guest|58> and how can I add source command to .zshrc?
14:29:47 <yushyin> but the screenshot indicates that the bootstrap script has already changed the zshrc, so I don't know exactly what's going wrong there
14:30:38 <maerwald> maybe they're using bash and not zsh
14:31:01 <maerwald> login shell isn't necessarily the same as user shell
14:31:22 × jonathanclarke quits (~jonathanc@36.252.181.57) (Ping timeout: 260 seconds)
14:31:57 <Guest|58> Uploaded file: https://uploads.kiwiirc.com/files/8fbbcbb7702eab5562cc07ab592f52b8/Screenshot%202021-11-02%20at%2017.31.12.png
14:32:42 shriekingnoise joins (~shrieking@186.137.144.80)
14:32:50 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds)
14:33:03 <geekosaur> if it's modern os x, it'll be zsh unless they've made specific (and complicated on os x) changes
14:33:08 <maerwald> "To update your account to use zsh, please run..."
14:33:14 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds)
14:34:38 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3)
14:34:43 mc47 joins (~mc47@xmonad/TheMC47)
14:35:05 <Guest|58> I ran it and got no changes made
14:36:29 <yushyin> I believe you will need to re-login after such a change.
14:36:45 <merijn> You need to exit and restart the Terminal
14:37:16 Sgeo joins (~Sgeo@user/sgeo)
14:37:36 <Guest|58> and then just run ghci?
14:37:43 <Guest|58> or the source command?
14:38:44 <Guest|58> Uploaded file: https://uploads.kiwiirc.com/files/efabc507c63ccc0b8193f4aaebf0af19/Screenshot%202021-11-02%20at%2017.21.36.png
14:40:47 <maerwald> well, seems everything is working
14:40:54 <yushyin> if you start a new shell and type in 'ghci', it should just work now
14:41:08 <yushyin> s/shell/terminal/
14:42:59 × slack1256 quits (~slack1256@191.126.99.76) (Remote host closed the connection)
14:45:37 Midjak joins (~Midjak@82-65-111-221.subs.proxad.net)
14:45:58 dyeplexer joins (~dyeplexer@user/dyeplexer)
14:45:59 y04nn joins (~y04nn@92.223.89.196)
14:46:50 <Guest|58> so every time I open terminal I run the source command then ghci
14:46:52 <Guest|58> ?
14:48:44 <yushyin> just ghci should be fine
14:49:39 <Guest|58> just ghci gives command not found
14:49:49 mei joins (~mei@user/mei)
14:50:30 Skyfire joins (~pyon@user/pyon)
14:51:00 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
14:51:29 azimut joins (~azimut@gateway/tor-sasl/azimut)
14:52:58 <Guest|58> Uploaded file: https://uploads.kiwiirc.com/files/e03144e0edfc469d108e75dc0d2c96c2/Screenshot%202021-11-02%20at%2017.52.23.png
14:54:09 jtomas joins (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net)
14:55:31 <yushyin> Guest|58: Did you run the command the shell asks you to run? To change your default shell? `chsh -s /bin/zsh'
14:55:42 <Guest|58> yes
14:56:43 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
14:56:59 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
14:57:07 <geekosaur> huh, when did they make that work? I used to have to run some ugly gui thing to edit apple's binary user database
14:57:19 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
14:57:31 <geekosaur> (ugly = you could tell they didn't put much work into it and it wasn't really intended for end users)
14:57:41 <yushyin> Guest|58: maybe do try a re-login
14:58:34 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
14:58:40 × Guest|58 quits (~Guest|58@89.211.234.25) (Quit: Connection closed)
14:58:53 azimut joins (~azimut@gateway/tor-sasl/azimut)
15:00:13 <merijn> geekosaur: It has worked as long as I know?
15:00:35 Guest|58 joins (~Guest|58@89.211.234.25)
15:00:38 ec joins (~ec@gateway/tor-sasl/ec)
15:01:15 <Guest|58> it's all good]
15:01:27 <yushyin> Guest|58: hello again ;)
15:01:28 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection)
15:01:35 <Guest|58> thank you guys for your time and effort
15:01:44 × Guest|58 quits (~Guest|58@89.211.234.25) (Client Quit)
15:02:03 max22- joins (~maxime@2a01cb08833598003c892bb6cec267c2.ipv6.abo.wanadoo.fr)
15:02:04 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
15:02:06 hippoid joins (~idris@184.105.6.88)
15:04:08 kadir joins (~kadir@95.7.9.203)
15:05:49 × thyriaen quits (~thyriaen@x4dbf0bd8.dyn.telefonica.de) (Quit: Leaving)
15:05:59 <hippoid> > fmap (+1) (1, 2)
15:06:01 <lambdabot> (1,3)
15:06:39 <hippoid> what's the reason that (+1) is only applied to the last element of the tuple?
15:06:49 <merijn> :t (1, 2)
15:06:50 <lambdabot> (Num a, Num b) => (a, b)
15:06:54 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
15:07:10 <merijn> hippoid: Now, mentally rewrite that to use the tuple as prefix syntax "(,) a b"
15:07:14 <merijn> :t fmap
15:07:15 <lambdabot> Functor f => (a -> b) -> f a -> f b
15:07:17 <boxscape_> hippoid what would you expect to happen to `fmap (+1) ("hello", 3)` if it were applied to both?
15:07:29 <merijn> hippoid: And ponder: "what is 'f' in case of a tuple?"
15:07:44 <dminuoso> Its funny eh, we get that question once a week.
15:07:46 <maerwald> :t bimap
15:07:47 <lambdabot> Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d
15:08:05 <hippoid> ok follow up question, is there an easy way to see the implementaiton of fmap for a tuple using hoogle or some vim plugin, etc?
15:08:17 <dminuoso> sadly no
15:08:19 <merijn> Using hoogle, yes
15:08:34 <dminuoso> Or rather, I dont think hoogle can search for instances itself.
15:08:57 <merijn> hippoid: If you go to the Haddocks for Functor (https://hackage.haskell.org/package/base-4.16.0.0/docs/Prelude.html#v:fmap) then you see a list of instances below it
15:09:14 <merijn> Those instances have a source link behind them
15:09:48 Sgeo_ joins (~Sgeo@user/sgeo)
15:10:07 <hippoid> ok, thanks all!
15:11:02 justsomeguy joins (~justsomeg@user/justsomeguy)
15:11:09 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
15:12:40 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 268 seconds)
15:13:48 × azeem quits (~azeem@emp-89-199.eduroam.uu.se) (Read error: Connection reset by peer)
15:14:32 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
15:15:03 azeem joins (~azeem@2a00:801:3c9:cf16:6d84:9e6f:3c27:1ca6)
15:17:22 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
15:20:04 × mei quits (~mei@user/mei) (Ping timeout: 268 seconds)
15:20:30 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
15:21:18 × guniberas quits (~guniberas@42.191.188.121) (Ping timeout: 268 seconds)
15:25:00 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
15:27:51 pretty_dumm_guy joins (~trottel@eduroam-134-96-204-83.uni-saarland.de)
15:28:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
15:31:29 ec joins (~ec@gateway/tor-sasl/ec)
15:38:01 fizzsegfaultbuzz joins (~segfaultf@135-180-0-138.static.sonic.net)
15:38:34 × acidjnk quits (~acidjnk@p200300d0c7441145a0f2d1eed66e92ec.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
15:50:03 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
15:50:17 jonathanclarke joins (~jonathanc@202.51.76.91)
15:53:39 fendor_ joins (~fendor@178.165.199.1.wireless.dyn.drei.com)
15:54:00 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
15:54:54 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
15:55:23 Null_A joins (~null_a@2601:645:8700:2290:7887:7a6d:751e:a369)
15:55:44 Jing joins (~textual@2604:a840:3::1021)
15:56:27 × fendor quits (~fendor@77.119.197.65.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
15:56:51 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
15:58:30 zmt00 joins (~zmt00@user/zmt00)
15:59:19 ec joins (~ec@gateway/tor-sasl/ec)
16:01:39 lbseale joins (~lbseale@user/ep1ctetus)
16:01:48 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:c40:37f:b11e:565f) (Quit: WeeChat 2.8)
16:02:47 × boxscape_ quits (~boxscape_@134.171.69.87) (Ping timeout: 264 seconds)
16:04:28 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:05:04 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2)
16:05:05 × jstolarek quits (~jstolarek@137.220.120.162) (Ping timeout: 268 seconds)
16:10:18 × wonko quits (~wjc@user/wonko) (Ping timeout: 260 seconds)
16:13:14 × sagax quits (~sagax_nb@user/sagax) (Remote host closed the connection)
16:13:56 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection)
16:16:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
16:17:18 × shidima quits (~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl) (Ping timeout: 260 seconds)
16:19:01 × nckx quits (~nckx@tobias.gr) (Quit: Updating my Guix System <https://guix.gnu.org>)
16:19:22 <zincy> Again I hear from an experienced Haskeller that IO is impure in all languages.
16:19:35 <zincy> Am I going mad?
16:20:16 <dminuoso> Seeing as Im not a psychologist, I'm not equipped to answer that question.
16:20:19 <nitrix> The purity refers to how the effects are modeled by the language, as to not break the semantics/guarantees it provides.
16:20:40 <geekosaur> IO is kinda by definition impure, since it involves interacting with the "world" outside the program itself
16:21:14 <dminuoso> zincy: I'd first step back and ask what that sentence means exactly. What do they mean by "IO is impure" and what is meant by "impure" exactly, and what does "in *all* languages" refer to?
16:21:26 <dminuoso> Without more context, I dont think this is a good basis for a discussion
16:21:30 <geekosaur> Haskell carefully limits how you do this. Most languages just mix it in willy-nilly, which makes it much harder to reason about what they're doingt
16:21:38 <maerwald> IO is pure
16:21:47 <dminuoso> Whether something is "pure" or not should start with what we mean by pure.
16:22:09 <dminuoso> This is too handwavy
16:22:48 <maerwald> > seq (putStrLn "lol") 1
16:22:49 <lambdabot> 1
16:23:03 <dminuoso> Point of interest, if you use this for demonstration, you should use pseq.
16:24:51 boxscape_ joins (~boxscape_@i59F67A65.versanet.de)
16:25:39 <zincy> dminuoso: So there are lots of competing definitions of "pure"?
16:25:47 <dminuoso> GHC is free to evalutae this in parallel, so it could be conceivable that lambdabot printed 1 before the other "lol" was printed.
16:25:59 <maerwald> zincy: not really
16:26:02 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:26:07 <dminuoso> zincy: No, its rather that in some handwavy statement "IO is impure in all languageS", Im not even sure what is meant by that.
16:26:19 nckx joins (~nckx@tobias.gr)
16:26:48 <tomsmeding> there are multiple competing definitions of "pure", though; GCC has a function attribute "pure" that allows IO in its body https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html
16:27:04 <dminuoso> Purity is usually part of the semantics of the language, not of a type (like say IO)
16:27:14 <maerwald> tomsmeding: *academic* definitions?
16:27:15 <tomsmeding> oh hm, it may actually not allow IO
16:27:22 <dminuoso> So Im not even sure what "IO being pure/impure" even means
16:27:31 <tomsmeding> maerwald: there are multiple academic definitions of almost everything
16:27:44 <maerwald> I only know of one formal definition of purity
16:27:47 <dminuoso> It's the language that can be pure/impure. Or possibly expressions
16:27:49 <maerwald> can you provide a link to some?
16:28:39 neightchan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
16:28:55 <tomsmeding> maerwald: cannot provide a link, but I'm fairly sure there are definitions that allow nontermination and definitions that do, in a pure function
16:29:01 × natechan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Read error: No route to host)
16:29:03 <dminuoso> zincy: At best I can interpret that remark as taking note, that while evaluating expressions can be pure in the sense that the outside world is not touched, executing IO actions can trivially interact with the world.
16:29:16 <nitrix> I/O translates to effects (if the language is pure) and side-effects (if the language isn't pure).
16:29:18 sagax joins (~sagax_nb@user/sagax)
16:29:23 <zincy> dminuoso: Right so it's an ill formed statement
16:29:35 jkaye joins (~jkaye@BELVEDERE-T.ear2.Denver1.Level3.net)
16:29:35 <dminuoso> Id say so, yes
16:30:54 <dminuoso> Heck, even the term IO is sort of gibberish in an all encompassing generalization
16:31:24 <dminuoso> Haskell IO is more than just about outside world interaction, think about forkIO
16:31:27 <zincy> Yeah I think that is why I felt icky
16:31:52 <maerwald> I simply look at "IO" in the sense that it can do syscalls
16:32:07 <maerwald> I have no understanding of worlds
16:32:36 <dminuoso> maerwald: So any runtime execution that allocates memory via syscalls automatically triggers IO?
16:32:57 <maerwald> I don't understand your question
16:33:17 <dminuoso> Nevermind
16:33:40 <geekosaur> I grant that I did not define that term. but a program has what it does inside itself (internal state — a "world") and how it interacts outside itself via syscalls and the like (external state — a "world")
16:34:26 <maerwald> how do you separate the filesystem into internal and external state
16:34:45 <geekosaur> also in a language like Haskell there is very little direct allocation of memory by a program (only done as part of FFI); mostly it's done behind the scenes by the runtime. as is any actual I/O
16:35:18 <nitrix> I would say forkIO has implications with the semantics (control flow, concurrency), that's a little immediate than "a world".
16:35:27 <geekosaur> the filesystem is external state. manipulation of filesystem objects is *driven by* internal state, but the actual manipulation itself is external
16:35:50 <maerwald> I can't fathom that distinction
16:36:04 <geekosaur> and yes, forkIO confuses things a bit, because now you have separate internal "worlds" which have to interact with each other as if each was external to the other
16:36:22 <maerwald> I think of programs in terms of control flow, not worlds
16:36:47 <maerwald> everything that clouds the control flow is bad: forkIO, objects, filesystem state
16:36:48 <geekosaur> hm, but "control flow" is somewhat ill-defined in a language like Haskell
16:36:56 <maerwald> not really
16:37:06 <nitrix> I view evaluation and control flow independently.
16:37:21 <nitrix> control flow = execution in my verbiage.
16:37:22 <dminuoso> nitrix: I dont think works reasonable, given how we tend to encode control flow.
16:37:26 <maerwald> even laziness clouds control flow
16:37:41 <maerwald> so I'm not a big fan of that either
16:38:04 <nitrix> As in the execution is controllable and drives evaluation.
16:38:04 <geekosaur> that was part of what I meant by "somewhat ill-defined". the rest was how you tend to specify what you want as opposed to how to do it
16:38:07 <dminuoso> 17:31:52 maerwald | I simply look at "IO" in the sense that it can do syscalls
16:38:15 <dminuoso> Perhaps this definition is simple and good.
16:38:19 <maerwald> IO helps me reason about control flow... in some way. But effects? No idea.
16:38:43 <dminuoso> Because at the end, this capturs nicely what we usually mean by "cant delete a file, call an API or write to a database"
16:38:45 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:38:47 <maerwald> When I look at my mtl code, I usually can't reason about effects. They're all over the places.
16:39:20 <maerwald> What I can reason about is: this code doesn't do filesystem syscalls.
16:39:28 <maerwald> But I can't reasonably express this in haskell.
16:39:43 <maerwald> I have to run a seccomp based syscall filter to verify any of that.
16:39:45 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
16:40:26 <maerwald> have you ever checked how many files `tar` opens when it extracts an archive?
16:40:37 <maerwald> I mean all sorts of stuff in /etc and whatnot
16:40:59 <maerwald> curl is even worse
16:41:13 <dminuoso> I recall work on programming languages with effect systems that talk about filtering syscalls exactly like that
16:41:45 <dminuoso> Such that you would have useful extractable semantics, where if you had EffXYZ you could make some useful statement about what your program can or cant do.
16:41:57 <dminuoso> Mmm, I have to dig this up again
16:42:12 <maerwald> that would be useful
16:42:32 <dminuoso> Ill reach out to my buddy tomorrow, pretty sure he showed me a paper on this subject
16:42:36 ec joins (~ec@gateway/tor-sasl/ec)
16:43:34 <maerwald> I've been playing with sydbox, which is a program that allows to filter syscalls and used in some linux package managers. But it has bugs last I tried, because it isn't widely used
16:44:28 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
16:44:43 <nitrix> I'm personally not fond of trying to encode everything with types. The static safety is great, but it's blows up so quickly in terms of complexity.
16:44:57 <maerwald> sure, you can have multiptle orthogonal type systems
16:45:16 <dminuoso> If memory serves right, in that particular example it was a secondary type system
16:45:19 <maerwald> you don't need to encode everything into one, that's usually a consequence of compiler maintenance
16:45:51 <maerwald> imagine GHC would come up with a secondary type system... I can't imagine how much work that would be to get an initial working version
16:45:58 <maerwald> 3 PhDs and 5 years of work
16:47:01 × yrlnry quits (~mjd@pool-100-11-2-80.phlapa.fios.verizon.net) (Ping timeout: 268 seconds)
16:47:40 <maerwald> but... I think having a configurable syscall filter in the RTS... might not be that hard maybe
16:49:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:50:02 × pretty_dumm_guy quits (~trottel@eduroam-134-96-204-83.uni-saarland.de) (Quit: WeeChat 3.3)
16:50:06 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 268 seconds)
16:52:33 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
16:54:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
16:55:42 Guest26 joins (~Guest26@cpc78119-cwma10-2-0-cust127.7-3.cable.virginm.net)
16:56:14 fef joins (~thedawn@user/thedawn)
16:58:17 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
16:59:10 <dminuoso> Mmm, I want to stop using ToJSON instances with servant, it's just darn frustrating to have to create newtype wrappers just to feed some JSON representation in.
16:59:39 <dminuoso> Im thinking of making some shallow existential `data Jsonable = forall a. ToJSON a => Jsonable a`, and then write my servant APIs to simply return Jsonable
16:59:47 <dminuoso> Is this reasonable? Is there another way?
17:03:03 × rkrishnan quits (~user@223.226.59.167) (Ping timeout: 268 seconds)
17:03:59 × ubert quits (~Thunderbi@ip5b405828.dynamic.kabel-deutschland.de) (Remote host closed the connection)
17:04:38 econo joins (uid147250@user/econo)
17:08:30 × Guest26 quits (~Guest26@cpc78119-cwma10-2-0-cust127.7-3.cable.virginm.net) (Quit: Client closed)
17:09:23 boxscape_92 joins (~boxscape_@i59F67A65.versanet.de)
17:09:23 boxscape_92 is now known as boxscape__
17:09:32 kadir parts (~kadir@95.7.9.203) ()
17:11:42 × boxscape_ quits (~boxscape_@i59F67A65.versanet.de) (Ping timeout: 268 seconds)
17:13:14 Guest92 joins (~Guest92@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com)
17:13:59 × Guest92 quits (~Guest92@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Client Quit)
17:16:24 × Jing quits (~textual@2604:a840:3::1021) (Remote host closed the connection)
17:17:26 v01d4lph4 joins (~v01d4lph4@106.215.93.204)
17:17:26 × v01d4lph4 quits (~v01d4lph4@106.215.93.204) (Changing host)
17:17:26 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
17:17:49 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
17:20:08 Jing joins (~textual@2604:a840:3::1021)
17:21:23 × zincy quits (~tom@2a00:23c8:970c:4801:d180:6949:f6bd:3923) (Ping timeout: 264 seconds)
17:22:39 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
17:24:39 chomwitt joins (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374)
17:24:47 kadir joins (~kadir@95.7.9.203)
17:25:20 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
17:27:06 ec joins (~ec@gateway/tor-sasl/ec)
17:27:58 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:30:38 dsamperi joins (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com)
17:34:37 <dsamperi> #cplusplus
17:38:03 <geekosaur> not interested, sorry
17:38:06 Inst joins (~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e)
17:40:26 tcard_ joins (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
17:40:41 × tcard quits (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Remote host closed the connection)
17:43:02 <dsamperi> First time user. I see no activity. Normal?
17:43:06 <Inst> does anyone
17:43:09 × Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Ping timeout: 268 seconds)
17:43:15 <Inst> know anything about how the Reflex-FRP project is coming along?
17:43:37 <geekosaur> dsamperi, it's active at various times
17:43:45 <geekosaur> usually not continuous though
17:43:46 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 268 seconds)
17:44:20 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Read error: Connection reset by peer)
17:44:26 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
17:44:44 <geekosaur> Inst, this may be a better question for the haskell-cafe mailing list or the haskell Discourse
17:44:51 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection)
17:45:06 <Inst> Discourse?
17:45:28 <geekosaur> discourse.haskell.org
17:45:31 <Inst> reflex-frp is a thing, but much smaller
17:45:49 peterhil joins (~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi)
17:46:16 × peterhil quits (~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi) (Remote host closed the connection)
17:47:05 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
17:52:23 Null_A_ joins (~null_a@c-98-210-133-39.hsd1.ca.comcast.net)
17:54:50 × Null_A quits (~null_a@2601:645:8700:2290:7887:7a6d:751e:a369) (Ping timeout: 260 seconds)
17:55:56 kadir parts (~kadir@95.7.9.203) ()
17:56:59 <dminuoso> dsamperi: Usually activity is very spiky. There's phases without much activity, other times you find multiple concurrent lengthy involving discussions
17:57:46 <dsamperi> Thanks for the information
17:58:00 neurocyte0132889 joins (~neurocyte@IP-213157011136.dynamic.medianet-world.de)
17:58:00 × neurocyte0132889 quits (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host)
17:58:00 neurocyte0132889 joins (~neurocyte@user/neurocyte)
17:58:11 Partmedia parts (~kevinz@172-221-159-029.res.spectrum.com) ()
18:01:23 Null_A joins (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e)
18:01:54 × Null_A_ quits (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
18:02:53 vicfred joins (~vicfred@user/vicfred)
18:03:17 × mbuf quits (~Shakthi@171.61.170.115) (Quit: Leaving)
18:03:58 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
18:04:02 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
18:04:25 <geekosaur> dsamperi, for what it's worth: https://ircbrowse.tomsmeding.com/lchaskell
18:04:58 <geekosaur> (oy, I'm one of the blabbiest in channel according to that)
18:06:51 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
18:07:04 × chele quits (~chele@user/chele) (Remote host closed the connection)
18:07:37 dminuoso pokes tomsmeding
18:07:46 <dminuoso> Is that GDPR compliant?
18:08:21 <dminuoso> Im willing to bet that IRC handles publically linkable to my name can be considered personal identifiable information.
18:08:28 <[exa]> dminuoso: can you backtrace merijn's birth date by the profiles here? https://ircbrowse.tomsmeding.com/nick/merijn
18:09:03 <[exa]> wait you wrote your real name into IRC?
18:09:14 <dminuoso> No, but it takes no effort to figure out my real name.
18:09:38 <geekosaur> you can get mine relatively easily as well although you'll have to poke a little bit
18:10:46 <[exa]> GDPR core rule is "enables finding additional information about a somehow-identifiable individual"
18:11:10 <[exa]> but anyone can idle on IRC and log and analyze everything so I guess the "additional" doesn't really apply here
18:11:32 <dminuoso> Just because you can log, does not mean you have the right to do so.
18:11:36 <boxscape__> geekosaur you more or less have it set in the IRC "real name" field (not sure if that's proper terminology)
18:11:37 <dminuoso> That's the core of GDPR.
18:11:39 ec joins (~ec@gateway/tor-sasl/ec)
18:11:53 boxscape__ is now known as boxscape_
18:11:59 <geekosaur> probably do, at that
18:12:14 <dminuoso> In fact, article one says
18:12:22 <dminuoso> "This Regulation lays down rules relating to the protection of natural persons with regard to the processing of personal data and rules relating to the free movement of personal data."
18:12:32 <dminuoso> I'd say processing what I say is about processing personal data as it can get.
18:12:41 <geekosaur> but even without that you can get it from other places, pretty sure it's one click to link "geekosaur" with (for example) my public FCC database entry that includes full name and address
18:13:06 <dminuoso> So yeah. Im beginning to suspect operating a website like https://ircbrowse.tomsmeding.com/lchaskell is not GDPR conform.
18:13:24 yangby joins (~secret@125.120.162.167)
18:13:31 <[exa]> dminuoso: I'll actually ask our GDPR law folks
18:13:50 <shapr> ooh
18:14:06 <dminuoso> [exa]: GDPR is so easily written, really if you read the definition of personal data:
18:14:08 <dminuoso> ‘personal data’ means any information relating to an identified or identifiable natural person (‘data subject’); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological,
18:14:10 <dminuoso> genetic, mental, economic, cultural or social identity of that natural person;
18:14:15 <dminuoso> This applies.
18:14:16 × darkstardevx quits (~darkstard@2601:1c2:300:c8a0::6c32) (Ping timeout: 245 seconds)
18:14:54 <dminuoso> In fact, it even explicitly mentions information relating an idenifiable person, for which an online identifier is sufficient.
18:15:22 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
18:15:25 <[exa]> dminuoso: well technically I remember yourself identifying here several times already, same did I
18:15:33 <[exa]> (let's jump to -offtopic? )
18:15:38 <dminuoso> Sure
18:15:47 <geekosaur> sad. like anyone can get this trivially just from e.g. client backscroll
18:15:49 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds)
18:16:16 kadir joins (~kadir@95.7.9.203)
18:17:03 × yangby quits (~secret@125.120.162.167) (Client Quit)
18:22:31 kadir parts (~kadir@95.7.9.203) ()
18:23:11 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 264 seconds)
18:25:00 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
18:26:40 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
18:27:33 × chomwitt quits (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) (Ping timeout: 268 seconds)
18:27:35 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
18:30:37 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
18:32:25 __monty__ joins (~toonn@user/toonn)
18:33:01 chomwitt joins (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374)
18:33:20 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
18:35:12 darkstardevx joins (~darkstard@50.39.114.152)
18:35:27 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
18:36:06 neurocyte0132889 joins (~neurocyte@IP-213157011136.dynamic.medianet-world.de)
18:36:06 × neurocyte0132889 quits (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host)
18:36:06 neurocyte0132889 joins (~neurocyte@user/neurocyte)
18:36:48 × mmhat quits (~mmh@55d4b212.access.ecotel.net) (Ping timeout: 268 seconds)
18:37:32 tremon joins (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl)
18:38:16 mei joins (~mei@user/mei)
18:38:25 ec joins (~ec@gateway/tor-sasl/ec)
18:38:45 × Null_A quits (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) (Remote host closed the connection)
18:39:15 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds)
18:39:39 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
18:39:39 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
18:40:06 jpds joins (~jpds@gateway/tor-sasl/jpds)
18:43:19 jstolarek joins (~jstolarek@137.220.120.162)
18:43:23 × fvr quits (uid503686@id-503686.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
18:46:00 Null_A joins (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e)
18:46:18 × y04nn quits (~y04nn@92.223.89.196) (Remote host closed the connection)
18:46:41 zincy joins (~tom@2a00:23c8:970c:4801:b46f:f559:1389:e031)
18:48:12 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Remote host closed the connection)
18:48:30 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
18:49:06 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
18:49:49 mmhat joins (~mmh@55d4a263.access.ecotel.net)
18:52:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:52:30 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Read error: Connection reset by peer)
18:53:05 <janus> maerwald: when you say you can't reason about effects, is it because you have a fixed monad stack instead of accepting n^2 and having type class constraints all over the place?
18:53:42 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
18:53:44 <janus> because it seems to me that if people use constraints everywhere instead of specifying the actual monad, then you _can_ reason about which effects are used where?
18:53:55 <maerwald> I use constraints
18:54:03 <maerwald> and it makes reasoning impossible
18:54:10 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
18:54:17 <maerwald> all it tells you is which functions may appear in the body (or not)
18:54:46 <cigsender> /3/3
18:54:49 <dsal> The people defining standards on a project I'm working on are very opposed to "constraint-based DI" kinds of things.
18:55:20 <maerwald> I dislike thick monad types like `App` a lot, but I don't think mtl is better
18:55:52 <dsal> Everything should run in the `Handler` monad or whatever. Except for the things that I've defined in the `Transaction` monad which I guess doesn't get to log because all the logging functions are defined to only work in `Handler` which is how they get their logger function because doing that with a constraint is bad or something.
18:56:01 <maerwald> I'm not even sure a proper effects system would be better, it just shifts the problem away to where you defined your interpreters
18:56:10 <maerwald> now everything is so abstract, you don't know anything
18:56:27 hseg joins (~gesh@185.120.126.13)
18:56:29 <dsal> I've failed to try fancier effects systems a few times.
18:57:47 pavonia joins (~user@user/siracusa)
18:58:02 <hseg> working on adding an equivalent of `partition` to Witherable, just noticed that part :: f (Either a b) -> (f a, f b) only fuses a single pass, and in particular doesn't compose to partition arbitrarily many-way partitions in a single pass
18:58:03 × dsrt^ quits (~dsrt@wsip-98-188-242-6.mc.at.cox.net) (Remote host closed the connection)
18:58:07 <dsal> The guy who doesn't like the constraint thing is having a hard time selling me on the concerns. It's something about how constraints can lie because if a function says it wants `:: Eq a => a -> Whatever` then it lies because I can use a `Double` and maybe something weird will happen.
18:58:23 <hseg> or have I missed something?
18:58:40 <dsal> Or more concretely, if I make a `HasLogger` it could do something wrong and suddenly we have bugs because the logger doesn't behave properly or whatever.
18:58:43 <maerwald> dsal: well, they lie because they don't tell you anything about the order of effects
18:59:03 <geekosaur> dsal, that kinda sounds like a complaint from 18ish hours ago that Maybe a is a lie because you could set a ~ Void
18:59:17 <dsal> maerwald: I've not heard that particular argument.
18:59:26 <geekosaur> I have
18:59:27 <maerwald> well, it's trivially true
18:59:44 <dsal> Sure, I'm just saying it's not come up.
18:59:53 <maerwald> on the other hand, it's also an advantage of some sorts
19:01:08 <dsal> Guy seems to really not like generic stuff in general. I was told not to use `fold` when `concat` will work because code could change in a way that compiles and doesn't work correctly. But also, testing is super important, so between writing lots of tests for behavior and not doing stupid things, I don't think the concerns are practical.
19:01:11 <Boarders> do any of you know how to configure hlint to ignore a hint within a folder (as opposed to module)?
19:01:41 <maerwald> dsal: well, that argument is true, especially for lens
19:01:42 <geekosaur> doesn't hlint have a config file?
19:01:46 <awpr> hseg: I've thought about a similar problem monomorphized to lists, and came up with: `[Sigma (Rep10 f) Identity] -> f []` where `f :: (k -> Type) -> Type`, `Rep10` is some GADT identifying typed fields of `f`, and `Sigma` is `data Sigma k m = forall a. Sigma (k a) (m a)`
19:02:41 <hseg> yeah, noted something similar on the Witherable issue tracker in offering directions to extend my patch https://github.com/fumieval/witherable/issues/45#issuecomment-958062035
19:03:05 <maerwald> dsal: lens has caused a serious production bug for me that way, because documentation doesn't propagate and behavior isn't described everywhere.
19:03:19 <dsal> maerwald: It's not entirely false, but it conflicts with the testing concerns, IMO.
19:03:24 <Boarders> geekosaur: I am asking what I put in the config file
19:03:33 <Boarders> to exclude a folder
19:03:37 <Boarders> so yes, it does have a config file
19:04:31 <awpr> see also Data.Functor.Naperian, which kind of generalizes unzip the same way this generalizes partitionEithers
19:04:37 <maerwald> on the other hand, I use fmap a lot
19:05:00 <maerwald> coworkers would easily see which code was written by me by the amount of fmaps
19:05:21 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
19:05:32 <maerwald> nested fmaps, (fmap . fmap), fmap over <$>... fmap all the way
19:05:53 <hseg> awpr: https://hackage.haskell.org/package/naperian-0.1.0.0/docs/Data-Naperian.html ?
19:06:24 × max22- quits (~maxime@2a01cb08833598003c892bb6cec267c2.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
19:06:34 <awpr> ah yeah, that one
19:07:05 <awpr> https://hackage.haskell.org/package/ten-0.1.0.2/docs/Data-Ten-Representable.html is where Representable10 came from, by the way
19:07:06 <hseg> awpr: note it is the type a ^ r, not pi_{i in r} a(i)
19:08:10 <hseg> in particular, writing dependently, want some dist :: f (sum_{i in r} a(i)) -> pi_{i in r} f (a(i))
19:09:51 <awpr> yeah, that's roughly what I wrote before but with `f ~ []` and using isomorphism of `(forall a. Rep10 f a -> m a) ~= f m`
19:10:07 <awpr> just saying Naperian is the Product->Product analog of this
19:10:11 ec joins (~ec@gateway/tor-sasl/ec)
19:10:25 <hseg> K
19:10:58 <awpr> the motivation being: there's precedent for doing that sort of generalization
19:13:45 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
19:14:27 neurocyte0132889 joins (~neurocyte@IP-213157011136.dynamic.medianet-world.de)
19:14:27 × neurocyte0132889 quits (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host)
19:14:27 neurocyte0132889 joins (~neurocyte@user/neurocyte)
19:14:54 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:17:21 mrckndt9 joins (~mrckndt@user/mrckndt)
19:19:03 desantra joins (~skykanin@user/skykanin)
19:19:35 × mrckndt quits (~mrckndt@user/mrckndt) (Ping timeout: 264 seconds)
19:19:35 mrckndt9 is now known as mrckndt
19:19:43 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Remote host closed the connection)
19:21:21 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
19:21:26 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Remote host closed the connection)
19:24:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
19:26:13 × desantra quits (~skykanin@user/skykanin) (Quit: WeeChat 3.3)
19:27:05 nehsou^ joins (~nehsou@wsip-98-188-242-6.mc.at.cox.net)
19:27:23 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
19:28:26 × lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
19:28:45 lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
19:29:49 × mei quits (~mei@user/mei) (Ping timeout: 268 seconds)
19:33:52 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
19:34:36 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
19:35:44 Hanicef joins (~gustaf@81-229-9-108-no92.tbcn.telia.com)
19:37:13 <energizer> is there a name for functions that are like "fold then map", such as subtracting the mean of xs from each x in xs ?
19:37:42 ec joins (~ec@gateway/tor-sasl/ec)
19:39:04 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds)
19:40:25 <shapr> energizer: do you mean like catamorphism? or perhaps map reduce? https://en.wikipedia.org/wiki/MapReduce
19:40:56 <boxscape_> that's the opposite, right? Map reduce means you map first, then fold
19:41:02 <energizer> ^
19:41:38 <shapr> oh good point
19:41:51 <tomsmeding> the fact that that requires two traversals of the list makes it, intuitively to me, less of a "standard primitive"
19:41:57 <tomsmeding> so less likely to have a particular name
19:44:37 × mc47 quits (~mc47@xmonad/TheMC47) (Ping timeout: 268 seconds)
19:47:21 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection)
19:47:52 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
19:47:54 max22- joins (~maxime@2a01cb08833598001e044e1e5445c714.ipv6.abo.wanadoo.fr)
19:49:38 <[exa]> energizer: you might wrap Reader a bit to do that
19:50:12 <[exa]> > ( foldl (+) 0 >>= flip fmap length . div >>= map . flip (-) ) [0,1,2,3,4]
19:50:14 <lambdabot> [-2,-1,0,1,2]
19:50:23 son0p- joins (~ff@181.136.122.143)
19:50:53 <boxscape_> kind of seems like you should be able to get away with one traversal with some laziness/mutation stuff
19:52:22 <tomsmeding> you aren't going to be able to stream the list :p
19:52:26 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds)
19:52:33 <tomsmeding> that counts as >1 traversal to my operational ears
19:52:50 <boxscape_> hmm
19:54:02 <tomsmeding> (and streaming the list but remembering all elements doesn't count :p )
19:54:12 <boxscape_> makes sense
19:54:51 <boxscape_> I'm just imagine something where you add subtract mean as a thunk from each value while traversing, but at the same time mutate the thunk to add the values you are traversing (so you're not storing all values, only the sum)
19:55:02 <boxscape_> s/add//
19:55:22 <tomsmeding> isn't that precisely the case I said didn't count
19:55:28 <tomsmeding> except you're now storing it in a chain of thunks
19:55:49 <boxscape_> hmm I suppose
19:58:48 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3)
19:59:20 neurocyte0132889 joins (~neurocyte@IP-213157011136.dynamic.medianet-world.de)
19:59:20 × neurocyte0132889 quits (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host)
19:59:20 neurocyte0132889 joins (~neurocyte@user/neurocyte)
20:01:35 × chomwitt quits (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) (Ping timeout: 264 seconds)
20:01:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
20:02:37 <boxscape_> can you load a .hs file with cabal repl?
20:02:53 <boxscape_> when I try it it doesn't seem to import the names
20:03:26 <monochrom> Perhaps get cabal repl started normally first, then use :load
20:03:48 <boxscape_> right, that's what I did - if I try to pass it as argument, it fails before that, saying it doesn't take arguments
20:04:01 <geekosaur> ^ my guess is it loads the compiled form which will only get exported symbols
20:04:11 <monochrom> If you have multiple components, you may have to say explicity "cabal repl <the component you mean>"
20:04:28 <geekosaur> but :load should work since cabal repl can't reach inside ghci and change how :load works
20:04:28 <tomsmeding> boxscape_: works if you give the thing a module name
20:04:31 <tomsmeding> iirc
20:04:38 <boxscape_> yes you guys are right, module name works
20:04:39 <tomsmeding> it's completely weird
20:04:40 <geekosaur> mm, might need to force source
20:04:51 <geekosaur> :load *moduleName
20:05:08 <geekosaur> (the * forces source instead of precompiled)
20:05:08 <tomsmeding> yeah but if you don't give the file a module header, there is no module name that works there
20:05:10 <tomsmeding> not even Main
20:05:32 <boxscape_> yeah it's strange that Main doesn't work
20:05:36 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 268 seconds)
20:05:37 <geekosaur> should be the file name in that case
20:05:50 <geekosaur> *foo.hs
20:05:52 <monochrom> The thing is I have been doing this my whole life with 100% success rate and no special treatment.
20:06:23 <boxscape_> geekosaur the asterisk doesn't seem to change things if I don't add a module name
20:06:47 <tomsmeding> I have a file A.hs containing 'foo = 42'. I have opened a repl with 'cabal repl' outside of a project. How do I load that file so that 'foo' is visible?
20:06:47 juhp joins (~juhp@128.106.188.220)
20:06:50 ec joins (~ec@gateway/tor-sasl/ec)
20:07:03 <tomsmeding> in my experience you can't, until you write 'module Something where' above that file
20:13:12 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
20:15:29 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:16:04 × jstolarek quits (~jstolarek@137.220.120.162) (Ping timeout: 268 seconds)
20:16:42 × alx741 quits (~alx741@181.196.69.253) (Ping timeout: 268 seconds)
20:16:50 wootehfoot joins (~wootehfoo@user/wootehfoot)
20:18:11 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
20:18:27 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
20:20:02 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d15:54ac:ed5f:296c)
20:21:45 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
20:25:14 jess joins (~jess@libera/staff/jess)
20:26:06 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds)
20:29:12 alx741 joins (~alx741@186.178.109.189)
20:30:24 gg joins (~gg@2a01:e0a:819:1510:9c2f:617b:a3fa:cf0d)
20:31:09 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
20:31:13 hololeap_ joins (~hololeap@user/hololeap)
20:32:27 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
20:34:09 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d15:54ac:ed5f:296c) (Remote host closed the connection)
20:34:41 × max22- quits (~maxime@2a01cb08833598001e044e1e5445c714.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
20:35:16 max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
20:35:19 <boxscape_> tomsmeding does subtractMean' count as one traversal? I think I'm only storing the sum here, not the individual values https://paste.tomsmeding.com/I0ipKExN
20:35:49 ec joins (~ec@gateway/tor-sasl/ec)
20:35:55 <boxscape_> (also, FWIW: quickCheck \xs -> subtractMean xs == subtractMean' xs; +++ OK, passed 100 tests.)
20:38:33 <tomsmeding> boxscape_: I'm lazy, what's the type of that large do block in subtractMean'
20:39:43 <tomsmeding> okay not so lazy, ST s [ST s a]
20:39:45 ss4 joins (~wootehfoo@user/wootehfoot)
20:39:53 <tomsmeding> thank you for writing dependencyless code
20:40:06 <boxscape_> I think almost, go :: (Num a, Num b) => STRef s b -> [b] -> ST s (a, [ST s b])
20:40:39 <tomsmeding> you're constructing a list of stuff the size of the original list, then traversing that again?
20:40:42 <tomsmeding> that's two traversals :p
20:40:54 × Null_A quits (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) (Remote host closed the connection)
20:41:01 <boxscape_> oh lol right at the beginning
20:41:18 <tomsmeding> if that's allowed, I can traverse 'list' and build 'map id list' meanwhile, then traverse that second list afterwards and have it count as one traversal
20:41:32 <boxscape_> right, okay
20:41:32 Null_A joins (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e)
20:41:55 <tomsmeding> my concept of "number of traversals" is based on "how many parallel loops can you write this in"
20:42:11 <tomsmeding> and here the answer is two
20:42:26 <boxscape_> I'm not quite sure what that meanss
20:42:26 <tomsmeding> (okay a scan also counts as such a loop in this case)
20:42:54 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds)
20:43:24 <tomsmeding> boxscape_: I like the sneaky :) at the end of line 23
20:43:31 <boxscape_> :)
20:43:36 <tomsmeding> @botsnack
20:43:36 <lambdabot> :)
20:45:24 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Read error: Connection reset by peer)
20:46:31 n8chan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
20:48:06 <tomsmeding> boxscape_: wait this particular problem can easily be written using one traversal because your formula is linear
20:48:18 <Hecate> woop woop, just released my babyyyy https://hackage.haskell.org/package/text-display-0.0.1.0
20:48:33 <boxscape_> Hecate 🎉
20:48:45 × neightchan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
20:49:07 <boxscape_> I saw that a couple of days ago, looked interesting
20:49:15 <tomsmeding> oh ignore what I just said
20:49:20 <boxscape_> ok
20:49:31 <Hecate> boxscape_: :D
20:49:33 <Hecate> thank you
20:49:47 <Hecate> just waiting for tomsmeding's seal of approval
20:49:59 tomsmeding reads
20:50:07 <boxscape_> tomsmeding so if I'm understanding correctly, the "second traversal" in my solution was the fmap, is that right?
20:50:16 <tomsmeding> the sequence, I think
20:50:17 <boxscape_> i.e. fmap sequence
20:50:21 <boxscape_> ah right sorry
20:50:25 <tomsmeding> but yeah
20:50:40 <boxscape_> https://paste.tomsmeding.com/okd4PHqT it's gone
20:51:06 <cigsender> Hecate: right at the bottom of the docs, "You should not try to display ByteStrings!", you've put decudeUtf8 instead of decodeUtf8
20:51:10 <cigsender> <3
20:51:11 <boxscape_> still passes the tests, somewhat to my surprise
20:51:50 <tomsmeding> Hecate: looks neat! I think I've written a Pretty class like 10 times by now
20:52:12 <cigsender> same thing, decudeUtf8With :p
20:52:42 <tomsmeding> also in the docs for the instance :p
20:54:12 <tomsmeding> Hecate: I think it's good that you didn't go overboard with the predefined instances
20:54:27 × dsamperi quits (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Quit: Konversation terminated!)
20:54:39 <tomsmeding> the point of classes like this, I think, is to be able to do some partial domain-specific debugging formatting
20:54:41 dsamperi joins (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com)
20:55:38 × dsamperi quits (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Client Quit)
20:56:29 dsamperi joins (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com)
20:57:42 <boxscape_> tomsmeding I'm not missing something else, right? The updated version counts as one (hacky) traversal?
20:58:03 <tomsmeding> I'm reading, trying to figure out what the hell is happening with the nested unsafePerformIOs :p
20:58:15 <boxscape_> fair :)
20:58:16 <tomsmeding> why are you even unsafePerformIO'ing _inside_ an IO context
20:58:20 <tomsmeding> is that essential?
20:58:35 <boxscape_> urm my idea was that it should only unsafePerformIO after the mean is compute
20:58:36 <boxscape_> d
20:58:48 <tomsmeding> if so then before understanding what's happening, I claim linked list of thunks
20:58:52 <tomsmeding> if not then no idea
20:59:06 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
20:59:15 <boxscape_> hm I guess I'll have to figure out if it's essential
20:59:18 <awpr> this sounds like something that's impossible to do under a useful definition of "single-pass"
20:59:24 <tomsmeding> yeah
20:59:29 <boxscape_> :(
20:59:38 <tomsmeding> boxscape_ is trying very hard though
20:59:47 takuan joins (~takuan@178-116-218-225.access.telenet.be)
20:59:53 <tomsmeding> it's a nice puzzle to even figure out what's going on
20:59:53 <awpr> this impl might succeed in hiding the second pass in the form of thunks
21:00:07 <tomsmeding> yes :p
21:00:30 <tomsmeding> right yes
21:00:47 <tomsmeding> the output list has a thunk in each position, and each of those thunks calls unsafePerformIO
21:00:50 <boxscape_> if you have a list of thunks that consist of `1 + 1`, would you say that list effectively requires another traversal before it's evaluated?
21:01:13 <awpr> but you have to look all the way to the end of the list to finish computing the mean before you can produce the first element, so I don't think it'd be meaningfully better than making two normal passes
21:01:18 <tomsmeding> so after you've traversed the whole input list, you update the IORef with the final mean, and then when you force the list in the end, you evaluate each of the thunks
21:01:35 <tomsmeding> boxscape_: no, because in strict evaluation that's one traversal
21:01:51 <boxscape_> I see, whereas if I make my list strict, the result it different
21:01:55 <tomsmeding> you can choose evaluation style, but in some chosen sensible evaluation order it needs to be one traversal :p
21:02:08 <awpr> well this impl effectively copies the input list into thunks, so in terms of being able to stream the output in constant space, it's not any better
21:02:09 <boxscape_> (I think, anyway)
21:02:17 <tomsmeding> yeah
21:02:20 <awpr> it does avoid retaining the original input list, but it retains something equivalent to it
21:02:22 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
21:02:22 <tomsmeding> then you'd be subtracting the partial means
21:02:29 <tomsmeding> what awpr says
21:02:32 <boxscape_> okay
21:03:09 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:03:46 <boxscape_> (I accept defeat)
21:03:51 × stefan-_ quits (~cri@42dots.de) (Ping timeout: 245 seconds)
21:03:58 johnny_sitar joins (~artur@078088015209.bialystok.vectranet.pl)
21:04:37 ec joins (~ec@gateway/tor-sasl/ec)
21:04:44 <tomsmeding> you _can_, however, compute the variance of a list (sum_i (x_i - mean(x))^2) in a single traversal
21:04:45 acidjnk joins (~acidjnk@p200300d0c74411677812fb9732750684.dip0.t-ipconnect.de)
21:04:58 <boxscape_> interesting
21:05:24 <tomsmeding> but you need to do a little high-school algebra to get there, and no array fusion algorithm is going to produce that given the obvious two-pass algorithm :p
21:06:03 <tomsmeding> (The 2 in the exponent is non-essential, works with at the very least every _fixed_ nonnegative integer power)
21:06:23 <tomsmeding> (hm perhaps that's too much of a hint)
21:06:42 <boxscape_> I'm not about to do this anyway, I need to eat :)
21:07:34 acidjnk_new joins (~acidjnk@p200300d0c72670437812fb9732750684.dip0.t-ipconnect.de)
21:07:48 × unmanbearpig quits (~unmanbear@45.76.95.141) (Ping timeout: 260 seconds)
21:08:05 stefan-_ joins (~cri@42dots.de)
21:08:59 <tomsmeding> it's not too interesting: sum_i (x_i - mu)^2 = sum_i x_i^2 - 2 mu sum_i x_i + n mu^2
21:09:03 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
21:09:41 <tomsmeding> so collecting the sum of squares, sum of values, and length (sounds like a pattern...), allows you to compute the final result in O(1)
21:09:53 <boxscape_> hm I see
21:09:59 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
21:10:27 <tomsmeding> of course you collect (sum_i x_i^0, ..., sum_i x_i^k) if the power was not 2 but k
21:10:29 ec joins (~ec@gateway/tor-sasl/ec)
21:10:57 × acidjnk quits (~acidjnk@p200300d0c74411677812fb9732750684.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
21:12:34 <tomsmeding> for k=2 the end result is -s_1^2 / s_0 + s_2; I wonder if that gives a pattern as well, probably it does
21:15:09 mc47 joins (~mc47@xmonad/TheMC47)
21:15:09 <maerwald> cabal repl can't reload .hsc file changes it seems
21:15:31 unmanbearpig joins (~unmanbear@user/unmanbearpig)
21:20:34 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:20:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:21:07 × ss4 quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
21:21:14 <monochrom> My tie-knot solution: https://paste.tomsmeding.com/bbCS30Yd
21:22:32 <geekosaur> maerwald, ghci is not smart enough to run hsc2hs
21:22:41 <tomsmeding> monochrom: yes :)
21:23:04 <tomsmeding> monochrom: question 2 https://www.cs.uu.nl/docs/vakken/fp/2021/exercises/lazy.html
21:23:52 <monochrom> OMG that is a tough question.
21:24:45 <monochrom> Ugh "Implement the Sieve of Eratosthenes for computing prime numbers"
21:25:23 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
21:26:24 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
21:28:06 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
21:28:14 <tomsmeding> yeah that's a bad question, implementing that with the right complexity in haskell is a pain. They aren't asking for the right complexity
21:29:13 <[exa]> where's my fav diophantine equation for prime number testing?
21:29:54 <monochrom> Beyond a certain point, I forsake laziness and use non-strictness instead, i.e., I forsake operational semantics and use denotational semantics.
21:31:12 <tomsmeding> monochrom: that tja thing is applying the same trick as your code: the left pair element can be computed first because it's not dependent on the second
21:31:27 <tomsmeding> so it does two traversals, to circle back to the topic we started with :p
21:33:35 ec joins (~ec@gateway/tor-sasl/ec)
21:38:11 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 264 seconds)
21:38:37 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
21:40:33 × jtomas quits (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 268 seconds)
21:43:09 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
21:43:57 × cosimone quits (~user@93-47-228-48.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1))
21:44:40 × Hanicef quits (~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving)
21:46:43 × johnny_sitar quits (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds)
21:49:46 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:51:45 × michalz quits (~michalz@185.246.204.104) (Remote host closed the connection)
21:55:00 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
21:55:21 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
21:57:08 × kjak quits (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
22:00:38 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
22:01:20 trillp joins (~trillp@69.233.98.238)
22:01:21 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
22:01:24 × hseg quits (~gesh@185.120.126.13) (Quit: WeeChat 3.3)
22:01:44 ec joins (~ec@gateway/tor-sasl/ec)
22:02:38 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds)
22:03:40 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:04:50 × fendor_ quits (~fendor@178.165.199.1.wireless.dyn.drei.com) (Remote host closed the connection)
22:08:18 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
22:09:26 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
22:10:48 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:11:38 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:14:47 × dsamperi quits (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Ping timeout: 264 seconds)
22:15:51 <dsal> Heh, it's nice having people I can argue with about everything every day. Currently: if you write code in the form of `:: MonadIO m => a -> m ()` you've most likely made your code incorrect because someone can send in an `m` that doesn't do `MonadIO` correctly.
22:16:07 <dsal> I mean, it's *true*, but also like, inside your own codebase, moving `liftIO` to all the callers doesn't really fix anything.
22:16:42 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
22:16:58 <Rembane_> dsal: That sounds fun! :D
22:17:01 <monochrom> I would slippery-slope that all the way to foldr and map.
22:17:04 <[exa]> dsal: in an ideal world, that person will be guilty of breaking monad instance laws, and expunged to python lands
22:17:18 <Rembane_> [exa]: No! Not the snake pit! :O :O :O
22:17:50 <[exa]> that is the way
22:18:19 <monochrom> "If I wrote map :: (a -> b) -> [a] -> [b], it would be likely incorrect because someone can send in a buggy f::a->b"
22:18:39 <[exa]> oR a BuGgy lIsT
22:18:42 <dsal> monochrom: There's already a lot of that sort of thing. I like the idea of making it so that people can't do bad things, but also, just because someone *can* do a bad thing doesn't mean we should make everything harder.
22:19:26 <Rembane_> Best def: map _ _ = []
22:19:52 <monochrom> I like Rembane_'s solution. :)
22:19:55 <dsal> [exa]: examples include things like `liftIO action = Don't $ error "didn't do it"` and `liftIO action = Stupid $ action >> action` or even just doing extra stuff.
22:19:57 <monochrom> I mean >:)
22:20:38 <dsal> Rembane_: We've secretly replaced your `map` with a different implementation that satisfies the compiler. Let's see if anyone notices.
22:20:51 <monochrom> Really, nihilism is the unique solution to both parametricity and resilience against human mistakes.
22:22:18 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
22:22:30 <boxscape_> hm so this was just tweeted https://twitter.com/kerckhove_ts/status/1455657935019941892
22:22:33 <[exa]> dsal: to the snake pit I said! :D
22:22:49 <boxscape_> (re: MonadIO)
22:22:53 <dsal> boxscape_: Heh. Person I'm arguing with...
22:22:56 <boxscape_> I see
22:22:58 <Rembane_> monochrom, dsal: Muaha! One of the best pranks was that a friend of mine changed the definition of addition, like this in ghci: (+) = (-) and then cleared the screen and watched the mayhem ensue.
22:23:08 <boxscape_> I thought that was likely too much of a coincidence to be a coincidence
22:23:31 iqubic parts (~user@2601:602:9502:c70:458b:ca39:de67:50b0) (ERC 5.3 (IRC client for GNU Emacs 29.0.50))
22:24:56 <[exa]> dsal: anyway, the concerns of "someone could break it" are generally invalid, some assumption drift (easily generated by a thinking being) can break literally any code
22:25:05 <dsal> Yeah. That's kind of where I am.
22:25:29 <dsal> In this case, moving `liftIO` to all the callers doesn't seem clear to me. Or as I said in conversation, I've rarely seen a situation where writing more code in general leads to fewer bugs.
22:25:34 <[exa]> there's even some kind of rigorous proof for that, somewhere in the neighborhood of halting & rice theorems
22:25:45 <dsal> halters gonna halt
22:25:51 <monochrom> Is someone going to troll kerckhove with a Show instance that goes "show x = ackermann 100 100 `seq` <the actual code>"?
22:25:53 <Rembane_> dsal: I need that on a t-shirt
22:26:05 <Rembane_> But isn't this why we write tests?
22:26:13 <[exa]> takeaway: we still rely a lot of non-code communication while sharing the code
22:26:24 <dsal> This dude is big on tests. I'm still staring at that `Late` instance and failing to see the problem.
22:26:31 <boxscape_> Rembane_ but what if the evil MonadIO instance has code to figure out whether it's being run in a test or not
22:27:17 <dsal> monochrom: He pretty much dislikes all class constraints, so that's not going to change a mind.
22:27:35 <monochrom> OK, then perhaps my map and foldr.
22:27:42 <Rembane_> boxscape_: Now that's fun! Doesn't that sound an awful lot like Volkswagen's cars?
22:27:44 <monochrom> err, my map and foldr point.
22:27:50 <boxscape_> hah yeah
22:27:59 <boxscape_> they shouldn't allow car manufacturers to use type classes
22:28:06 <monochrom> Every criticism against class constraints can be translated to higher-order functions.
22:28:14 <[exa]> "does this volkswagen halt?"
22:28:33 <monochrom> Right? By the dictionary translation.
22:28:45 <boxscape_> monochrom that sounds right to me
22:29:00 <boxscape_> well
22:29:03 <awpr> the criticisms become /stronger/ when translated to HOFs
22:29:09 <boxscape_> you could argue that type classes with *laws* are special
22:29:19 <boxscape_> because then you can write an instance that type checks but doesn't satisfy laws
22:29:19 <hpc> every criticism of higher-order functions can be translated to first-order functions with sufficiently java-like data definitions
22:29:24 <boxscape_> which you can't really do with higher order functions
22:29:36 <boxscape_> but of course you can have pre-conditions on your higher-order functions as well
22:29:50 <awpr> because being a typeclass imposes a guarantee that a given type has only one instance (ignoring incoherent instances)
22:30:10 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
22:30:20 <hpc> awpr: can't ignore those, the incoherent instance can be in another module
22:30:41 <awpr> I mean if you're using typeclasses in a not-broken way, you won't have them
22:30:58 <hpc> it could be in another package then
22:31:06 <awpr> can't argue against typeclasses by saying you can turn on an extension and break them intentionally
22:31:14 <awpr> at least, not reasonably
22:31:21 <hpc> but unreasonably...
22:31:44 <awpr> may as well argue against the notion of types because you can wreck everything with `unsafeCoerce`
22:33:27 <dsal> I think the thing that throws me off is "can write a bug if you try by deviating from something sensible" vs. "everything's harder, but we can't write specific types of bugs"
22:34:06 <awpr> I can still write that delay bug without any typeclasses
22:34:19 <hpc> without IO, even
22:34:25 <monochrom> slippery-slopeable to "if programming is impossible, then bugs are impossible too"
22:34:40 <boxscape_> what's the supposed solution here? Specializing the MonadIO instance so you know which implementation it will be?
22:34:41 <awpr> given `thing :: IO Something`, `let thing' = threadDelay 1010101010 >> thing`
22:35:18 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 260 seconds)
22:35:25 <dsal> boxscape_: Only use known concrete instances with no typeclasses.
22:35:29 <hpc> ooh, make that threadDelay use acme-now instead of a hard-coded number
22:35:32 <boxscape_> I see
22:35:48 <dsal> I really don't understand what's wrong with that `Late` instance other than just being slightly silly.
22:35:53 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
22:35:58 <monochrom> BTW this criticism also translates to using any library you didn't write yourself, too.
22:36:20 <monochrom> In fact in that case you are also vulnerable to supply-chain trust-network attacks.
22:36:27 <hpc> dsal: nothing imo, it's just "you don't want this instance therefore the class is bad"
22:36:30 <dsal> Someone checked in a change that generates an RSA keypair before every test iteration. That's basically the `Late` Monad.
22:36:34 <hpc> like saying Const invalidates Functor or something
22:36:45 <monochrom> And the javascript community did suffer that one prominently.
22:37:05 <dsal> hpc: That summarizes it well.
22:37:11 <awpr> yeah, I think that argument is not useful at all. "parameterizing your IO makes it possible to ask for bad instances" is not really any different from "parameterizing putStrLn makes it possible to print bad words"
22:37:24 <awpr> if you don't want to print bad words, then just... don't
22:37:43 <awpr> if you don't want to use an artificially slowed-down IO monad, then don't
22:37:48 <hpc> there's also, what law do you add to MonadIO that makes that definition impossible?
22:37:56 <hpc> what information could you even gain out of such a law?
22:38:12 <hpc> when you look at the Monoid laws, you get mconcat and so many other useful things
22:38:18 <awpr> hmm, `liftIO x >> liftIO y == liftIO (x >> y)`?
22:38:38 <hpc> they're not just to say "neener neener" to the acme authors of the world
22:38:54 dsamperi joins (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com)
22:39:32 <hpc> liftIO (m >>= f) = liftIO m >>= (liftIO . f) is already a law
22:39:35 <hpc> so... yeah
22:39:36 <dsal> This is the same "`fold` is bad" argument, though. I don't like knowing lots of things, so I just use `fold` whenever I want to fold things.
22:39:41 <hpc> actually, that makes that tweet wrong to begin with
22:39:51 <awpr> oh, yeah, that does seem to break laws then
22:40:09 <hpc> this whole discussion is like a bad branch prediction
22:40:26 <dsal> Delay is a weird side effect, though.
22:40:28 Cajun joins (~Cajun@user/cajun)
22:40:51 <hpc> but it is one
22:41:09 <boxscape_> why is it weird?
22:41:13 <hpc> sometimes it seems like the only thing that isn't a side effect of IO is seq making your cpu warm
22:41:31 <dsal> It's weird because it's not *exactly* observable. The delay may be indistinguishable from just having things be slow.
22:42:00 <boxscape_> at least in this context you can observe the IO expression that's built up rather than the actual effect
22:42:03 <awpr> from a laws perspective, computing the same thing but slower is generally considered not to be a difference. but putting it as an action in an IO makes it intuitively different somehow
22:42:07 <boxscape_> and I guess the laws are for the former
22:43:09 <hpc> it's just where the line is drawn
22:43:21 <dsal> One of the arguments used `error` which is not even IO. We try to hlint some of this stuff out, but I can bottom any function call.
22:43:29 <hpc> you could also argue pure code has side effects from being written slightly differently because of what ends up in the cpu cache at the end of evaluation
22:44:03 <hpc> timing is commonly useful in software written in haskell, so it goes in IO's model
22:45:11 <boxscape_> dsal eagerly awaiting someone to come up with the theoretical foundations for a haskell completeness checker
22:45:21 <boxscape_> s/dsal/dsal I'm
22:45:37 <boxscape_> or... totality checker might be a better word
22:46:39 × jkaye quits (~jkaye@BELVEDERE-T.ear2.Denver1.Level3.net) (Quit: Leaving)
22:46:46 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:46:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:47:46 × acidjnk_new quits (~acidjnk@p200300d0c72670437812fb9732750684.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
22:47:47 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 264 seconds)
22:47:49 <dsal> Heh. Yeah. But in your own small codebase, you can also like, see what's calling what and with what. "someone can do MonadIO wrong" is just a weird concept to me.
22:48:02 <boxscape_> yeah
22:49:27 <Cajun> boxscape_: does section 3.3.3 in https://arxiv.org/abs/1610.07978 count for "theoretical foundations"?
22:50:02 <Cajun> ah well it doesnt define a foundation, he just talks about it
22:50:07 <boxscape_> Cajun IIRC the main thing it says about totality checking is that "totality checking haskell is hard"
22:50:22 <Cajun> what a shame ):
22:50:36 <boxscape_> yeah
22:50:36 yauhsien joins (~yauhsien@61-231-61-245.dynamic-ip.hinet.net)
22:51:42 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
22:51:52 <boxscape_> not to mention GHC inserts Any in your Core if you blink for a second
22:52:03 <hpc> foo n | collatzConverges n = "defined" -- try checking that :D
22:52:44 <boxscape_> hpc totality checking in dependently typed languages is usually conservative, i.e. if it can't show that it's total, it just assumes that it isn't
22:53:02 <hpc> we're talking haskell though
22:53:23 <boxscape_> well, if haskell did have a totality checker, I'd imagine that it'd work similarly to those
22:53:45 <hpc> the question then though is how far in the analysis do you stop
22:53:56 <hpc> totality checking in haskell could potentially be very easy :P
22:54:02 <boxscape_> that is true
22:54:08 <boxscape_> const false will work
22:55:35 × Jing quits (~textual@2604:a840:3::1021) (Remote host closed the connection)
22:55:47 × yauhsien quits (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
22:58:40 thyriaen joins (~thyriaen@x4dbf0bd8.dyn.telefonica.de)
22:59:21 retro_ joins (~retro@2e41e9c8.skybroadband.com)
22:59:22 Jing joins (~textual@2604:a840:3::1021)
22:59:29 × retroid_ quits (~retro@2e41e9c8.skybroadband.com) (Ping timeout: 268 seconds)
23:02:41 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
23:04:51 × max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Quit: Leaving)
23:06:47 jespada joins (~jespada@190.7.36.46)
23:09:00 × thyriaen quits (~thyriaen@x4dbf0bd8.dyn.telefonica.de) (Quit: Leaving)
23:11:56 jespada_ joins (~jespada@190.7.36.46)
23:12:06 × jespada quits (~jespada@190.7.36.46) (Read error: Connection reset by peer)
23:18:37 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
23:27:34 × dsamperi quits (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Ping timeout: 260 seconds)
23:29:20 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Read error: Connection reset by peer)
23:29:37 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
23:32:39 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
23:37:26 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 260 seconds)
23:37:40 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:37:40 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:37:41 wroathe joins (~wroathe@user/wroathe)
23:39:49 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
23:41:22 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Remote host closed the connection)
23:42:31 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
23:47:01 × Jing quits (~textual@2604:a840:3::1021) (Remote host closed the connection)
23:47:35 Jing joins (~textual@2604:a840:3::1021)
23:51:28 dsamperi joins (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com)
23:56:31 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection)
23:58:18 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)

All times are in UTC on 2021-11-02.