2020/09/20

2020-09-20 00:00:07 +0200jb55(~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
2020-09-20 00:00:44 +0200jb55(~jb55@gateway/tor-sasl/jb55)
2020-09-20 00:00:52 +0200jb55(~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection)
2020-09-20 00:01:15 +0200jb55(~jb55@gateway/tor-sasl/jb55)
2020-09-20 00:01:17 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 00:02:58 +0200hackagegi-poppler 0.18.24 - Poppler bindings https://hackage.haskell.org/package/gi-poppler-0.18.24 (inaki)
2020-09-20 00:03:10 +0200juuandyy(~juuandyy@90.166.144.65)
2020-09-20 00:04:10 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-09-20 00:04:46 +0200sfvm(~sfvm@37.228.215.148) (Quit: off to the basement, mixing up the medicine)
2020-09-20 00:06:04 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 00:06:44 +0200sfvm(~sfvm@37.228.215.148)
2020-09-20 00:08:29 +0200leah2(~leah@vuxu.org) (Ping timeout: 272 seconds)
2020-09-20 00:09:38 +0200lkr123(5b40b67c@ip5b40b67c.dynamic.kabel-deutschland.de) (Remote host closed the connection)
2020-09-20 00:11:56 +0200Thra11(~Thra11@5.1.169.217.in-addr.arpa) (Quit: WeeChat 2.9)
2020-09-20 00:13:16 +0200MVQq(~anja@198.254.202.72) (Quit: q)
2020-09-20 00:13:54 +0200MarcelineVQ(~anja@198.254.202.72)
2020-09-20 00:14:44 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 00:16:38 +0200tsrt^(tsrt@ip98-184-89-2.mc.at.cox.net) ()
2020-09-20 00:18:39 +0200ntwhaaci^(ntwoaaci@ip98-184-89-2.mc.at.cox.net)
2020-09-20 00:19:15 +0200dftxbs3e(~dftxbs3e@unaffiliated/dftxbs3e) (Remote host closed the connection)
2020-09-20 00:22:16 +0200mitchellsalad(uid40617@gateway/web/irccloud.com/x-evcglbwkcwzfvhut) (Quit: Connection closed for inactivity)
2020-09-20 00:24:17 +0200nek0(~nek0@2a01:4f8:222:2b41::12)
2020-09-20 00:25:50 +0200aarvar(~foewfoiew@50.35.43.33) (Ping timeout: 265 seconds)
2020-09-20 00:26:05 +0200zacts(~zacts@dragora/developer/zacts)
2020-09-20 00:26:31 +0200leah2(~leah@vuxu.org)
2020-09-20 00:27:05 +0200zacts(~zacts@dragora/developer/zacts) (Client Quit)
2020-09-20 00:28:01 +0200cheater1(~user@unaffiliated/cheater)
2020-09-20 00:31:18 +0200cheater(~user@unaffiliated/cheater) (Ping timeout: 244 seconds)
2020-09-20 00:31:28 +0200cheater1cheater
2020-09-20 00:31:45 +0200MaoZeDong_(~yuri@2a00:1370:8135:91d4:956f:2ce4:9ce3:de8c) (Quit: Leaving)
2020-09-20 00:34:25 +0200juuandyy(~juuandyy@90.166.144.65) (Quit: Konversation terminated!)
2020-09-20 00:38:08 +0200blackfield(~blackfiel@85.255.4.218)
2020-09-20 00:38:09 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:a06a:6814:10f6:3957)
2020-09-20 00:38:20 +0200blackfield(~blackfiel@85.255.4.218) (Changing host)
2020-09-20 00:38:20 +0200blackfield(~blackfiel@unaffiliated/blackfield)
2020-09-20 00:39:40 +0200Volt_(~Volt_@c-73-145-164-70.hsd1.mi.comcast.net)
2020-09-20 00:40:40 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 00:42:10 +0200zacts(~zacts@dragora/developer/zacts)
2020-09-20 00:43:28 +0200hackagelsp-test 0.11.0.6 - Functional test framework for LSP servers. https://hackage.haskell.org/package/lsp-test-0.11.0.6 (luke_)
2020-09-20 00:45:19 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 00:45:53 +0200xerox_(~xerox@unaffiliated/xerox)
2020-09-20 00:45:58 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 00:47:43 +0200cantstanya(~chatting@gateway/tor-sasl/cantstanya) (Ping timeout: 240 seconds)
2020-09-20 00:51:47 +0200cantstanya(~chatting@gateway/tor-sasl/cantstanya)
2020-09-20 01:00:42 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Ping timeout: 260 seconds)
2020-09-20 01:00:42 +0200manjaroi3(~manjaro-i@2600:1700:9f00:b3df:a02:eef:be70:88de) (Ping timeout: 260 seconds)
2020-09-20 01:02:26 +0200ryansmccoy(~ryansmcco@156.96.151.132) (Ping timeout: 272 seconds)
2020-09-20 01:02:45 +0200ryansmccoy(~ryansmcco@156.96.151.132)
2020-09-20 01:08:37 +0200Jeanne-Kamikaze(~Jeanne-Ka@static-198-54-131-92.cust.tzulo.com) (Ping timeout: 264 seconds)
2020-09-20 01:09:17 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
2020-09-20 01:11:10 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:a06a:6814:10f6:3957) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 01:12:30 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 01:12:34 +0200fendor(~fendor@212095005091.public.telering.at) (Remote host closed the connection)
2020-09-20 01:13:46 +0200frdg```(~user@pool-71-184-143-249.bstnma.fios.verizon.net) ("ERC (IRC client for Emacs 27.1)")
2020-09-20 01:14:17 +0200tylerjl(~leothrix@elastic/staff/leothrix) (Quit: ZNC 1.7.5 - https://znc.in)
2020-09-20 01:14:38 +0200manjaroi3(~manjaro-i@2600:1700:9f00:b3df:a02:eef:be70:88de)
2020-09-20 01:18:35 +0200rgvs(47b88ff9@pool-71-184-143-249.bstnma.fios.verizon.net)
2020-09-20 01:19:46 +0200rgvs(47b88ff9@pool-71-184-143-249.bstnma.fios.verizon.net) (Remote host closed the connection)
2020-09-20 01:21:57 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 272 seconds)
2020-09-20 01:21:59 +0200leothrix(~leothrix@elastic/staff/leothrix)
2020-09-20 01:23:37 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 246 seconds)
2020-09-20 01:33:43 +0200shafox(~shafox@106.51.234.111) (Remote host closed the connection)
2020-09-20 01:34:13 +0200zacts(~zacts@dragora/developer/zacts) (Quit: leaving)
2020-09-20 01:37:08 +0200eric(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa)
2020-09-20 01:39:10 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 01:39:54 +0200jedws(~jedws@121.209.139.222)
2020-09-20 01:40:40 +0200xpika(~alan@2001:8003:5d32:1f00:65e7:740e:363f:f90f)
2020-09-20 01:43:17 +0200eric(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa) (Ping timeout: 260 seconds)
2020-09-20 01:45:50 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 01:46:08 +0200ph88(~ph88@ip5f5af726.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds)
2020-09-20 01:46:41 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-09-20 01:46:42 +0200gentauro(~gentauro@unaffiliated/gentauro) (Read error: Connection reset by peer)
2020-09-20 01:47:10 +0200gentauro(~gentauro@unaffiliated/gentauro)
2020-09-20 01:50:31 +0200tompas(~tom@pool-173-79-157-149.washdc.fios.verizon.net) (Quit: Leaving)
2020-09-20 01:50:32 +0200g-belmonte(~g-belmont@2804:14c:8786:9312:3638:eaf5:dc36:146d)
2020-09-20 01:50:37 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
2020-09-20 01:51:06 +0200OscarZ(~oscarz@95.175.104.39)
2020-09-20 01:52:05 +0200g-belmonte(~g-belmont@2804:14c:8786:9312:3638:eaf5:dc36:146d) (Client Quit)
2020-09-20 01:53:45 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-09-20 02:00:01 +0200MasterGruntR75(~MasterGru@185.163.110.116) ()
2020-09-20 02:04:28 +0200hackagestring-interpolate 0.3.0.1 - Haskell string/text/bytestring interpolation that just works https://hackage.haskell.org/package/string-interpolate-0.3.0.1 (williamyaoh)
2020-09-20 02:06:27 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 02:07:02 +0200alx741(~alx741@186.178.110.2) (Ping timeout: 272 seconds)
2020-09-20 02:10:57 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl) (Read error: Connection reset by peer)
2020-09-20 02:14:36 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 02:14:46 +0200Plazma(~Plazma@freenode/staff-emeritus/plazma) ()
2020-09-20 02:20:38 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 02:22:52 +0200__Joker_(~Joker@180.151.105.65) (Ping timeout: 272 seconds)
2020-09-20 02:23:45 +0200machinedgod(~machinedg@24.51.251.11)
2020-09-20 02:25:52 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 02:26:02 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 02:26:43 +0200cantstanya(~chatting@gateway/tor-sasl/cantstanya) (Ping timeout: 240 seconds)
2020-09-20 02:26:57 +0200wavemode(~wavemode@097-070-075-143.res.spectrum.com)
2020-09-20 02:28:12 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 260 seconds)
2020-09-20 02:30:05 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 240 seconds)
2020-09-20 02:30:58 +0200cantstanya(~chatting@gateway/tor-sasl/cantstanya)
2020-09-20 02:35:34 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-20 02:38:01 +0200machinedgod(~machinedg@24.51.251.11) (Ping timeout: 260 seconds)
2020-09-20 02:44:28 +0200maroloccio(~marolocci@2a02:8084:601d:7f80:164f:8aff:fed8:411d)
2020-09-20 02:47:25 +0200aenesidemus(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Quit: Leaving)
2020-09-20 02:48:26 +0200cantstanya(~chatting@gateway/tor-sasl/cantstanya) (Remote host closed the connection)
2020-09-20 02:50:43 +0200cantstanya(~chatting@gateway/tor-sasl/cantstanya)
2020-09-20 02:51:22 +0200solonarv(~solonarv@astrasbourg-653-1-186-165.w90-13.abo.wanadoo.fr) (Ping timeout: 272 seconds)
2020-09-20 02:51:23 +0200alx741(~alx741@186.178.110.2)
2020-09-20 02:54:35 +0200toony1(~toony@s91904426.blix.com)
2020-09-20 02:54:51 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 02:58:34 +0200MorrowM(~max@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 265 seconds)
2020-09-20 02:58:43 +0200polyrain(~polyrain@2001:8003:e501:6901:a8a8:546d:e1e3:2f7b)
2020-09-20 02:59:13 +0200MrZe(~root@140.213.56.183)
2020-09-20 02:59:27 +0200 <MrZe> hi
2020-09-20 02:59:54 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-09-20 03:00:40 +0200 <MrZe> anybody online ?
2020-09-20 03:00:48 +0200 <MrZe> 2
2020-09-20 03:01:08 +0200 <yushyin> maybe
2020-09-20 03:01:56 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 03:02:04 +0200OmegaDoug(6ca87592@dhcp-108-168-117-146.cable.user.start.ca)
2020-09-20 03:02:29 +0200 <yushyin> over 1000 users are online
2020-09-20 03:03:25 +0200ryansmccoy(~ryansmcco@156.96.151.132) (Ping timeout: 240 seconds)
2020-09-20 03:03:37 +0200ryansmccoy(~ryansmcco@68.235.48.108)
2020-09-20 03:04:22 +0200pera(~pera@unaffiliated/pera)
2020-09-20 03:04:24 +0200root_(~root@140.213.56.183)
2020-09-20 03:04:28 +0200 <sim590> I have this function http://sprunge.us/3by4Qf which maps a function on some field of a type LBSNode in order to increment it. I'm getting "Pattern match(es) are non-exhaustive" error with "Patterns not matched: (LBSInternalNode _ _)". Why am I getting this error even though I did write `incIndex _` on the next line to cover every other cases?
2020-09-20 03:04:59 +0200Rudd0(~Rudd0@185.189.115.108) (Ping timeout: 240 seconds)
2020-09-20 03:05:18 +0200MrZe(~root@140.213.56.183) (Ping timeout: 256 seconds)
2020-09-20 03:05:25 +0200 <root_> exit
2020-09-20 03:05:31 +0200 <root_> exit
2020-09-20 03:06:24 +0200 <sim590> Seems like this https://gitlab.haskell.org/ghc/ghc/-/issues/5728 is related?
2020-09-20 03:06:26 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 256 seconds)
2020-09-20 03:06:31 +0200 <MarcelineVQ> sim590: is mapML perhaps not exhaustive?
2020-09-20 03:06:42 +0200xff0x_(~fox@2001:1a81:5373:6a00:4ccb:e51f:bb16:7d67) (Ping timeout: 260 seconds)
2020-09-20 03:06:58 +0200nbloomf(~nbloomf@104-183-67-6.lightspeed.fyvlar.sbcglobal.net)
2020-09-20 03:07:17 +0200 <lechner> Hi, what's a good way to print a string without double quotes, please? Thanks!
2020-09-20 03:07:43 +0200 <MarcelineVQ> putStr or putStrLn
2020-09-20 03:08:35 +0200xff0x_(~fox@2001:1a81:53ac:b300:4ccb:e51f:bb16:7d67)
2020-09-20 03:08:39 +0200 <sim590> MarcelineVQ: I don't think so: http://sprunge.us/TKoZBk. And here's mapL: http://sprunge.us/9NIrK4. If you need to go deeper, here's http://sprunge.us/jUAklr.
2020-09-20 03:08:45 +0200 <lechner> Sorry, it's actually a Data.ByteString.Char8.ByteString
2020-09-20 03:08:59 +0200 <jumper149> lechner: `print` is the same as `putStrLn . show` https://hackage.haskell.org/package/base-4.14.0.0/docs/src/System.IO.html#print
2020-09-20 03:09:16 +0200 <lechner> jumper149: yes, but that adds the quotes
2020-09-20 03:09:37 +0200 <lechner> i currently use putStrLn show
2020-09-20 03:09:43 +0200 <jumper149> Was just making sure you understand what each part does!
2020-09-20 03:10:02 +0200 <lechner> i think the show is not pretty
2020-09-20 03:10:22 +0200root_(~root@140.213.56.183) (Ping timeout: 272 seconds)
2020-09-20 03:10:23 +0200 <sim590> MarcelineVQ: also this: `type LBSTree a = BSTree (LBSNode a)` should clarify things. There's LBSTree, but also BSTree which is the base for the former. But the message is just warning also. It's not an error, but I don't like that.
2020-09-20 03:10:52 +0200rprije(~rprije@27.143.220.203.dial.dynamic.acc01-myal-dub.comindico.com.au)
2020-09-20 03:10:56 +0200 <jumper149> How about BS.putStr https://hackage.haskell.org/package/bytestring-0.10.12.0/docs/Data-ByteString-Char8.html#v:putStr
2020-09-20 03:11:01 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 264 seconds)
2020-09-20 03:11:27 +0200 <lechner> i am concatenating with ++ so i have to convert first
2020-09-20 03:12:05 +0200 <jumper149> Also if you use functions on String like Prelude.print and ++ you will lose some of the benefits from ByteString.
2020-09-20 03:12:23 +0200 <jumper149> I guess you just want it to work and only use bytestring because a library gives it to you?
2020-09-20 03:12:41 +0200 <MarcelineVQ> sim590: What's the full warning?
2020-09-20 03:13:26 +0200 <yushyin> lechner: with String use prelude's putStr with Bytestring use Bytestring's putStr
2020-09-20 03:13:55 +0200 <lechner> I would like to concatenate. last line here: https://dpaste.com/7RQPNTE63
2020-09-20 03:14:21 +0200 <sim590> MarcelineVQ: http://sprunge.us/NW5U6N. I'm getting it on two different calls. The first that I pasted and another one lower.
2020-09-20 03:15:16 +0200 <sim590> MarcelineVQ: here's the whole file if that helps: http://sprunge.us/PxW93j
2020-09-20 03:16:14 +0200 <sim590> MarcelineVQ: I just tried RecordWildCards but it didn't help me fix it.
2020-09-20 03:16:57 +0200 <MarcelineVQ> sim590: that's not about the left side pattern that error is pointing at the right side, ghc isn't super smart here so it's being conservative: it's telling you that "return $ l {index = i+amount}" could be dangerous because l might be LBSInternalNode instead of LBSLeaf which doesn't have an 'index' field
2020-09-20 03:17:02 +0200 <jumper149> lechner: For conversion functions there is pack and unpack in the ByteString library
2020-09-20 03:17:09 +0200 <jumper149> They will convert from and to String
2020-09-20 03:17:20 +0200 <jumper149> so for you it would be C.unpack
2020-09-20 03:17:26 +0200 <divVerent> 135 one seems a false positive as you asserted on the ViewPattern before
2020-09-20 03:17:26 +0200 <MarcelineVQ> Now, we know better, but it doesn't it looks like
2020-09-20 03:18:13 +0200 <MarcelineVQ> fyi using record syntax on sum types like this is avoided for that reason, if you forget to make sure what constructor you have your field accesor could crash your program since it might try to get 'index' from LBSNode which doesn't have one
2020-09-20 03:18:33 +0200 <divVerent> same in the second one
2020-09-20 03:18:43 +0200ntwhaaci^(ntwoaaci@ip98-184-89-2.mc.at.cox.net) ()
2020-09-20 03:19:00 +0200 <divVerent> yes, but here technically the compiler should already know which record case is taken
2020-09-20 03:19:33 +0200 <OmegaDoug> Is there a way in to tell stack where to write the executable when running "stack build"? I'd like to put in the root of the "stack-work" folder.
2020-09-20 03:19:44 +0200 <sim590> MarcelineVQ: OK, but on line 120, I'm using the "same technique" but it doesn't complain. Am I not?
2020-09-20 03:20:03 +0200 <sim590> Oh I'm sorry. You said the right side, so it's not the same thing
2020-09-20 03:20:09 +0200xpika(~alan@2001:8003:5d32:1f00:65e7:740e:363f:f90f) (Ping timeout: 244 seconds)
2020-09-20 03:20:15 +0200 <lechner> jumper149: thanks!
2020-09-20 03:20:27 +0200 <sim590> But isn't the type of the right side determined by the left side since l is just the name of the pattern matched?
2020-09-20 03:21:07 +0200 <lechner> what is the difference between the <- and the =<< operator, please?
2020-09-20 03:21:49 +0200 <MarcelineVQ> sim590: afaict the issue is that you're updating `l` and `l` might not always have `index` as a field, appearantly pattern matching it didn't inform ghc that `l` is LBSLeaf and thus safe. I think this is weird but is the only explanation I can think of
2020-09-20 03:21:51 +0200 <ski> lechner : `=<<' is an ordinary operator, defined in a library. `<-' is special syntax, like `=' or `::'
2020-09-20 03:21:55 +0200 <jumper149> lechner: First of all <- is a keyword and part of the do-nation and =<< is a function
2020-09-20 03:22:16 +0200 <ski> @type (=<<)
2020-09-20 03:22:17 +0200 <lambdabot> Monad m => (a -> m b) -> m a -> m b
2020-09-20 03:23:25 +0200 <ski> f =<< act = do x <- act
2020-09-20 03:23:28 +0200 <ski> f x
2020-09-20 03:23:39 +0200 <ski> is how it could be defined
2020-09-20 03:23:56 +0200 <ski> (the actual definition is probably something like
2020-09-20 03:23:59 +0200 <ski> @src =<<
2020-09-20 03:23:59 +0200 <lambdabot> f =<< x = x >>= f
2020-09-20 03:24:00 +0200 <lechner> ski: thanks, that's what I thought!
2020-09-20 03:24:14 +0200 <MarcelineVQ> sim590: I'm could be wrong though, something about that warning is bugging me
2020-09-20 03:24:24 +0200 <ski> where the `do'-notation syntactic sugar expands to calls to `>>=' (and `>>'))
2020-09-20 03:25:09 +0200 <ski> `<-' is part of `do'-notation (the same symbol `<-' is also used in list comprehensions)
2020-09-20 03:25:22 +0200thc202(~thc202@unaffiliated/thc202) (Ping timeout: 260 seconds)
2020-09-20 03:25:33 +0200 <sim590> MarcelineVQ: Yeah... I find that weird also. It really seems to be related to https://gitlab.haskell.org/ghc/ghc/-/issues/5728, but this issue is quite old and since they flagged it as a duplicate of some issue that they claim having fixed, I'm a bit confused.
2020-09-20 03:26:25 +0200 <MarcelineVQ> the answer is likely in the haskell report or ghc manual since it's related to record update syntax
2020-09-20 03:27:00 +0200nbloomf(~nbloomf@104-183-67-6.lightspeed.fyvlar.sbcglobal.net) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 03:29:02 +0200 <MarcelineVQ> sim590: really though the answer you're gonna get mostly is do not use record syntax for sum types like Trees :>
2020-09-20 03:30:00 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 03:30:26 +0200 <sim590> MarcelineVQ: but I'm really just updating a Node inside a Tree, not the Tree itself!
2020-09-20 03:30:44 +0200 <sim590> I mean that I have a complex type that is a the Node here. It's LBSNode.
2020-09-20 03:30:47 +0200acidjnk_new2(~acidjnk@p200300d0c7365818803e8c849f4b43fc.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-09-20 03:31:20 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-09-20 03:31:27 +0200 <ski> > Node {rootLabel = (),subForest = []}
2020-09-20 03:31:30 +0200 <lambdabot> Node {rootLabel = (), subForest = []}
2020-09-20 03:31:31 +0200 <ski> > (Node) {rootLabel = (),subForest = []}
2020-09-20 03:31:33 +0200 <lambdabot> error:
2020-09-20 03:31:33 +0200 <lambdabot> • Couldn't match expected type ‘Tree a1’
2020-09-20 03:31:33 +0200 <lambdabot> with actual type ‘a0 -> Forest a0 -> Tree a0’
2020-09-20 03:33:18 +0200 <MarcelineVQ> But you are updating a tree, `index` takes a tree not a leaf, it just only works if the tree was a leaf right?
2020-09-20 03:33:37 +0200 <MarcelineVQ> this is the most relevant report section I can find https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-490003.15
2020-09-20 03:34:20 +0200 <MarcelineVQ> starting with "data T = T1 { y :: Int } | T2 { y :: Bool } -- BAD" :>
2020-09-20 03:35:33 +0200 <sim590> MarcelineVQ: no. Look at the full file: http://sprunge.us/PxW93j. The type of `index` is `LBSNode a -> Int`. A LBSNode has a LBSLeaf as constructor.
2020-09-20 03:35:38 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:b852:f831:8cd4:429)
2020-09-20 03:36:13 +0200maroloccio(~marolocci@2a02:8084:601d:7f80:164f:8aff:fed8:411d) (Ping timeout: 272 seconds)
2020-09-20 03:36:46 +0200 <MarcelineVQ> alright then, a sum datatype still
2020-09-20 03:37:06 +0200 <MarcelineVQ> All that aside what I'd try, if I wanted to keep the labels, is probably incIndex LBSLeaf{index = i, leafContent = c} = return $ LBSLeaf {index = i+amount, leafContent = c}
2020-09-20 03:37:36 +0200 <MarcelineVQ> so that we're not updating `l` but making a LBSLeaf
2020-09-20 03:37:46 +0200 <MarcelineVQ> and you can probably use RecordWildcards or punning to shorten that if you want
2020-09-20 03:38:32 +0200 <MarcelineVQ> idk if that's the exact right syntax for record construction since I've never really needed to do it, hopefully the idea comes across
2020-09-20 03:39:00 +0200 <ski> it is
2020-09-20 03:39:22 +0200 <sim590> Hmmm. Yeah. I guess I can do that in order to avoid the warning. But definitely, GHC should not display a warning in principle. May be I can file a bug.
2020-09-20 03:39:23 +0200 <ski> (also that `$' is redundant)
2020-09-20 03:39:38 +0200 <MarcelineVQ> Really ghc should be satisfied that you matched on LBSLeaf but it's being a bit of a penis
2020-09-20 03:40:08 +0200oxide(~lambda@unaffiliated/mclaren) (Ping timeout: 272 seconds)
2020-09-20 03:40:18 +0200 <MarcelineVQ> satisfied as in: should understand that `l` has to be LBSLeaf
2020-09-20 03:40:58 +0200eric(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa)
2020-09-20 03:41:34 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Quit: WeeChat 2.9)
2020-09-20 03:42:14 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 03:43:11 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 03:43:47 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 03:44:04 +0200 <sim590> Yeah. So, this is a bug. May be it's already reported.. Ahhh. 4,060 bugs to look through. Mehhhh. ;).
2020-09-20 03:45:23 +0200 <sim590> Is there a performance difference between both ways of writing it? What I mean is Between record-update and Construction of the same type with the same values. Will GHC be able use some properties of persistent data structure in order to avoid copying things? Does update-record even do that?
2020-09-20 03:45:43 +0200eric(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa) (Ping timeout: 272 seconds)
2020-09-20 03:45:56 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Ping timeout: 256 seconds)
2020-09-20 03:47:27 +0200hackageregex-pcre-builtin 0.95.1.1.8.44 - PCRE Backend for "Text.Regex" (regex-base) https://hackage.haskell.org/package/regex-pcre-builtin-0.95.1.1.8.44 (AudreyTang)
2020-09-20 03:47:42 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 03:48:27 +0200hackagesource-constraints 0.0.2 - Source constraints GHC plugin https://hackage.haskell.org/package/source-constraints-0.0.2 (mbj)
2020-09-20 03:48:31 +0200 <MarcelineVQ> Pretty much the same steps are taken regardless.
2020-09-20 03:48:54 +0200 <MarcelineVQ> check out the translation table in section 3.15.3
2020-09-20 03:49:23 +0200kleisli_(~kleisli@2600:1700:4640:c560:68bd:9d76:dbd8:24e7)
2020-09-20 03:49:45 +0200 <MarcelineVQ> Either you case and build a record or update syntax is gonna case and build a record
2020-09-20 03:50:18 +0200 <MarcelineVQ> Which is surely also our source for the unmatched pattern warning
2020-09-20 03:51:38 +0200 <ski> (hm, in Mercury, if it can prove the old reference is unique, it will do an update-in-place, iirc)
2020-09-20 03:52:20 +0200Jeanne-Kamikaze(~Jeanne-Ka@static-198-54-131-172.cust.tzulo.com)
2020-09-20 03:52:34 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 03:52:34 +0200 <MarcelineVQ> ski: ghc is probably smarter than the report here, but just based on this it's not something to be too concerned about
2020-09-20 03:53:03 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 03:53:15 +0200 <MarcelineVQ> sim590: it you're worried about it it could be an interesting benchmark to do
2020-09-20 03:54:28 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 03:54:40 +0200kyagrd__(sid102627@gateway/web/irccloud.com/x-mzcjmohivbettnaw) (Read error: Connection reset by peer)
2020-09-20 03:54:42 +0200mcfilib(sid302703@gateway/web/irccloud.com/x-jpgleryxlbiywuvp) (Read error: Connection reset by peer)
2020-09-20 03:54:56 +0200kyagrd__(sid102627@gateway/web/irccloud.com/x-umexjnjqxisrtwcp)
2020-09-20 03:55:39 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 03:56:15 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 03:56:28 +0200mcfilib(sid302703@gateway/web/irccloud.com/x-mcvztaukmltliuld)
2020-09-20 03:57:49 +0200 <sim590> Well. It's not very worrying. I was mainly wondering in order to know for other use cases.
2020-09-20 03:58:40 +0200 <sim590> But then since I have to use the constructor, I can go back to the following syntax `incIndex (LBSLeaf i c) = return $ LBSLeaf (i+amount) c` which is the default I normally use.
2020-09-20 03:58:46 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 03:58:59 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 03:58:59 +0200pera(~pera@unaffiliated/pera) (Ping timeout: 240 seconds)
2020-09-20 03:59:18 +0200 <sim590> The main point of using the record syntax is to update things, but since I cannot do that here without creating a warning, then it's not worth writing the fields in the record syntax.
2020-09-20 03:59:47 +0200Amras(~Amras@unaffiliated/amras0000) (Remote host closed the connection)
2020-09-20 04:00:01 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 04:00:35 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 04:00:36 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 04:00:48 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 04:00:55 +0200booppoob(uid425746@gateway/web/irccloud.com/x-zlvvmspyhmlayeab)
2020-09-20 04:01:23 +0200booppoob(uid425746@gateway/web/irccloud.com/x-zlvvmspyhmlayeab) ()
2020-09-20 04:01:37 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 04:02:04 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:b852:f831:8cd4:429) (Quit: Textual IRC Client: www.textualapp.com)
2020-09-20 04:02:42 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 04:04:06 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:7d39:b02b:8868:9bea)
2020-09-20 04:04:12 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 04:06:27 +0200hackagestm-queue 0.1.0.0 - An implementation of a real-time concurrent queue https://hackage.haskell.org/package/stm-queue-0.1.0.0 (sgschlesinger)
2020-09-20 04:08:24 +0200 <dolio> sim590: You could turn off -Wincomplete-record-updates if it's not smart enough to figure it out.
2020-09-20 04:08:27 +0200OmegaDoug(6ca87592@dhcp-108-168-117-146.cable.user.start.ca) (Remote host closed the connection)
2020-09-20 04:08:35 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Ping timeout: 240 seconds)
2020-09-20 04:08:57 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de)
2020-09-20 04:09:09 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 272 seconds)
2020-09-20 04:09:57 +0200wwwww(~wwwww@unaffiliated/wwwww) (Ping timeout: 260 seconds)
2020-09-20 04:10:09 +0200 <sim590> dolio: Yes, but what if I make some other mistakes that it could find for me and I have disabled it?
2020-09-20 04:10:47 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 244 seconds)
2020-09-20 04:10:47 +0200jumper149(~jumper149@ip185225.wh.uni-hannover.de) (Client Quit)
2020-09-20 04:11:03 +0200denisse(~spaceCat@gateway/tor-sasl/alephzer0) (Ping timeout: 240 seconds)
2020-09-20 04:11:24 +0200denisse(~spaceCat@gateway/tor-sasl/alephzer0)
2020-09-20 04:12:13 +0200wwwww(~wwwww@unaffiliated/wwwww)
2020-09-20 04:15:38 +0200gnumonik(~gnumonik@c-73-170-91-210.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-09-20 04:16:48 +0200bloodsta1ker(~bloodstal@46.166.187.178) (Remote host closed the connection)
2020-09-20 04:17:19 +0200toorevitimirp(~tooreviti@117.182.182.33)
2020-09-20 04:27:20 +0200machinedgod(~machinedg@24.51.251.11)
2020-09-20 04:28:07 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-09-20 04:33:03 +0200lagothrix(~lagothrix@unaffiliated/lagothrix) (Killed (verne.freenode.net (Nickname regained by services)))
2020-09-20 04:33:10 +0200lagothrix(~lagothrix@unaffiliated/lagothrix)
2020-09-20 04:34:39 +0200toorevitimirp(~tooreviti@117.182.182.33) (Remote host closed the connection)
2020-09-20 04:37:14 +0200toorevitimirp(~tooreviti@117.182.182.33)
2020-09-20 04:37:54 +0200elliott_(~elliott@2607:fb90:18d6:fc61:a84:10d2:ef86:f415)
2020-09-20 04:38:02 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 04:39:02 +0200 <lechner> Hi, in a new standard stack setup, are the files stack.yaml.lock and *.cabal generated? I would like to add them to .gitignore. Thanks!
2020-09-20 04:43:03 +0200 <glguy> The .cabal is generated if you have a package.yaml, but these days it's better to stick with deleting the package.yaml and maintaining the .cabal file
2020-09-20 04:46:40 +0200 <lechner> glguy: thanks!
2020-09-20 04:48:25 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-09-20 04:52:38 +0200manjaroi3(~manjaro-i@2600:1700:9f00:b3df:a02:eef:be70:88de) (Remote host closed the connection)
2020-09-20 04:52:53 +0200machinedgod(~machinedg@24.51.251.11) (Ping timeout: 260 seconds)
2020-09-20 04:56:52 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 04:57:24 +0200ryansmccoy(~ryansmcco@68.235.48.108) (Ping timeout: 272 seconds)
2020-09-20 04:58:06 +0200a3f(~a3f@chimeria.ext.pengutronix.de) (Ping timeout: 246 seconds)
2020-09-20 04:58:18 +0200ryansmccoy(~ryansmcco@193.37.254.27)
2020-09-20 04:59:53 +0200a3f(~a3f@chimeria.ext.pengutronix.de)
2020-09-20 04:59:54 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 05:00:02 +0200toony1(~toony@s91904426.blix.com) ()
2020-09-20 05:01:17 +0200theDon(~td@muedsl-82-207-238-084.citykom.de) (Ping timeout: 260 seconds)
2020-09-20 05:02:49 +0200zacts(~zacts@dragora/developer/zacts)
2020-09-20 05:03:03 +0200theDon(~td@muedsl-82-207-238-073.citykom.de)
2020-09-20 05:05:26 +0200toorevitimirp(~tooreviti@117.182.182.33) (Remote host closed the connection)
2020-09-20 05:05:45 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 240 seconds)
2020-09-20 05:06:41 +0200toorevitimirp(~tooreviti@117.182.182.33)
2020-09-20 05:11:38 +0200polyrain(~polyrain@2001:8003:e501:6901:a8a8:546d:e1e3:2f7b) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 05:11:59 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 05:13:25 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-09-20 05:13:59 +0200tylerjl(~leothrix@elastic/staff/leothrix)
2020-09-20 05:14:04 +0200toorevitimirp(~tooreviti@117.182.182.33) (Remote host closed the connection)
2020-09-20 05:14:24 +0200pera(~pera@unaffiliated/pera)
2020-09-20 05:14:41 +0200wei2912(~wei2912@unaffiliated/wei2912)
2020-09-20 05:15:59 +0200bitmagie(~Thunderbi@200116b806ecb800483bd36953a84bd2.dip.versatel-1u1.de)
2020-09-20 05:16:01 +0200polyrain(~polyrain@2001:8003:e501:6901:a8a8:546d:e1e3:2f7b)
2020-09-20 05:16:18 +0200toorevitimirp(~tooreviti@117.182.182.33)
2020-09-20 05:17:40 +0200leothrix(~leothrix@elastic/staff/leothrix) (Ping timeout: 272 seconds)
2020-09-20 05:17:41 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 05:18:31 +0200z0_(~z0@bl15-35-201.dsl.telepac.pt) (Quit: Lost terminal)
2020-09-20 05:18:55 +0200p-core(~Thunderbi@koleje-wifi-0046.koleje.cuni.cz) (Remote host closed the connection)
2020-09-20 05:19:12 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311) ()
2020-09-20 05:19:12 +0200p-core(~Thunderbi@koleje-wifi-0046.koleje.cuni.cz)
2020-09-20 05:21:32 +0200polyrain(~polyrain@2001:8003:e501:6901:a8a8:546d:e1e3:2f7b) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 05:24:44 +0200toorevitimirp(~tooreviti@117.182.182.33) (Remote host closed the connection)
2020-09-20 05:26:15 +0200toorevitimirp(~tooreviti@117.182.182.33)
2020-09-20 05:26:43 +0200toorevitimirp(~tooreviti@117.182.182.33) (Read error: Connection reset by peer)
2020-09-20 05:28:09 +0200toorevitimirp(~tooreviti@117.182.182.33)
2020-09-20 05:28:09 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 05:28:35 +0200falafel(~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a)
2020-09-20 05:31:58 +0200hackagestm-queue 0.1.1.0 - An implementation of a real-time concurrent queue https://hackage.haskell.org/package/stm-queue-0.1.1.0 (sgschlesinger)
2020-09-20 05:33:09 +0200abhixec(~abhixec@c-67-169-141-95.hsd1.ca.comcast.net)
2020-09-20 05:34:25 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 260 seconds)
2020-09-20 05:35:52 +0200silver(~silver@178.121.68.26) (Read error: Connection reset by peer)
2020-09-20 05:37:54 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber)
2020-09-20 05:38:06 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-09-20 05:38:26 +0200bitmagie1(~Thunderbi@200116b8062b2e00fc59d02ac7bcf06a.dip.versatel-1u1.de)
2020-09-20 05:39:32 +0200bitmagie(~Thunderbi@200116b806ecb800483bd36953a84bd2.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-09-20 05:39:33 +0200bitmagie1bitmagie
2020-09-20 05:43:00 +0200zacts(~zacts@dragora/developer/zacts) (Ping timeout: 272 seconds)
2020-09-20 05:44:04 +0200falafel(~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Remote host closed the connection)
2020-09-20 05:44:32 +0200falafel(~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a)
2020-09-20 05:45:15 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 05:47:57 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
2020-09-20 05:50:27 +0200jedws(~jedws@121.209.139.222) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 05:50:37 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2020-09-20 05:54:11 +0200sepi(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net)
2020-09-20 05:55:08 +0200 <sepi> Hello guys, why doesn't this return false after running out of elements in a list?
2020-09-20 05:55:24 +0200 <sepi> memb x [] = Falsememb x (y:ys) | x `elem` y:ys = True | otherwise = memb x (y:ys)
2020-09-20 05:55:33 +0200falafel(~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Remote host closed the connection)
2020-09-20 05:55:58 +0200falafel(~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a)
2020-09-20 05:57:11 +0200r2wj(~r2wj@185.244.214.216)
2020-09-20 05:57:43 +0200 <dolio> Because it can't run out.
2020-09-20 05:58:08 +0200 <ski> it's an infinite loop, in case the element isn't there
2020-09-20 05:59:03 +0200 <ski> > let memb x [] = False; memb x (y:ys) | x `elem` y:ys = True | otherwise = memb x (y:ys) in memb 3 []
2020-09-20 05:59:05 +0200 <lambdabot> False
2020-09-20 05:59:14 +0200 <ski> > let memb x [] = False; memb x (y:ys) | x `elem` y:ys = True | otherwise = memb x (y:ys) in memb 3 [0,2,3,1]
2020-09-20 05:59:17 +0200 <lambdabot> True
2020-09-20 05:59:21 +0200 <ski> > let memb x [] = False; memb x (y:ys) | x `elem` y:ys = True | otherwise = memb x (y:ys) in memb 3 [0,2,1]
2020-09-20 05:59:27 +0200 <lambdabot> mueval-core: Time limit exceeded
2020-09-20 05:59:41 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Ping timeout: 256 seconds)
2020-09-20 06:00:01 +0200 <ski> sepi : do you see why it loops ?
2020-09-20 06:00:37 +0200Rudd0(~Rudd0@185.189.115.118)
2020-09-20 06:00:45 +0200 <lechner> Hi, I would like to abstract the calls to the three hash calculations in this code and get the warnings below it. Can I not include 'do' in the function? https://dpaste.com/4ZCGYR975
2020-09-20 06:00:59 +0200falafel(~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Remote host closed the connection)
2020-09-20 06:01:25 +0200 <sepi> Yeah it checks if its in there, if its not it'll keep calling itself. I suppose I want to know how to stop if it reaches the end of the list
2020-09-20 06:01:39 +0200 <ski> compute :: (Char8.ByteString -> Char8.ByteString) -> String -> Char8.ByteString
2020-09-20 06:01:42 +0200 <ski> should be
2020-09-20 06:01:43 +0200 <ski> compute :: (Char8.ByteString -> Char8.ByteString) -> String -> IO Char8.ByteString
2020-09-20 06:02:13 +0200bitmagie(~Thunderbi@200116b8062b2e00fc59d02ac7bcf06a.dip.versatel-1u1.de) (Quit: bitmagie)
2020-09-20 06:02:15 +0200 <lechner> ski: i thought the <- drops the IO?
2020-09-20 06:02:17 +0200 <ski> sepi : make sure you take a step forward, rather than walking in place, standing still
2020-09-20 06:02:19 +0200denisse(~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection)
2020-09-20 06:02:22 +0200 <ski> no, lechner
2020-09-20 06:02:35 +0200denisse(~spaceCat@gateway/tor-sasl/alephzer0)
2020-09-20 06:02:40 +0200 <ski> the whole `do'-expression will still have type `IO T', for some type `T'
2020-09-20 06:02:47 +0200 <ski> (you can't escape)
2020-09-20 06:03:40 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2020-09-20 06:03:50 +0200 <ski> btw, probably it's better to give a name to `Char8.pack contents', in order to not recompute it ?
2020-09-20 06:03:59 +0200 <ski> (in `main', i mean)
2020-09-20 06:04:09 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-09-20 06:05:02 +0200 <ski> sepi : also .. if you care to tell, what is `memb' supposed to compute ?
2020-09-20 06:05:15 +0200 <lechner> i thought perhaps the compiler would be smart enough not to, although I thought that the 'effect' from readFile may force it.
2020-09-20 06:05:40 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 06:05:53 +0200 <ski> lechner : anyway, if you move the `readFile' out of `compute', you can probably avoid the `IO' in its return type
2020-09-20 06:05:53 +0200denisse(~spaceCat@gateway/tor-sasl/alephzer0) (Remote host closed the connection)
2020-09-20 06:06:09 +0200denisse(~spaceCat@gateway/tor-sasl/alephzer0)
2020-09-20 06:06:22 +0200 <lechner> i will, but bear with me for a minute please. i changed the code the way you said, but now the code below fails even though i did not change it.
2020-09-20 06:06:26 +0200 <sepi> like if x = ["abc", "def"]. memb says is ["def"] in x?
2020-09-20 06:06:34 +0200 <sepi> True
2020-09-20 06:06:51 +0200 <lechner> https://dpaste.com/553FLPZG5
2020-09-20 06:06:54 +0200 <ski> lechner : smart enough not to do what ? recompute the calls to `Char8.pack' ? or reread the file ?
2020-09-20 06:07:03 +0200ChaiTRex(~ChaiTRex@gateway/tor-sasl/chaitrex) (Ping timeout: 240 seconds)
2020-09-20 06:07:04 +0200toorevitimirp(~tooreviti@117.182.182.33) (Ping timeout: 272 seconds)
2020-09-20 06:07:17 +0200 <ski> sepi : now try `memb "ghij" x'
2020-09-20 06:07:47 +0200 <lechner> ski: i thought the effectful action of readFile might retrigger the remaining computation, but without that the compiler should not repack
2020-09-20 06:08:14 +0200shad0w_(~shad0w_@160.202.36.27)
2020-09-20 06:08:16 +0200 <ski> GHC only does limited CSE
2020-09-20 06:08:21 +0200ChaiTRex(~ChaiTRex@gateway/tor-sasl/chaitrex)
2020-09-20 06:09:22 +0200 <ski> lechner : anyway, the second error message is because you still have a mistake in `compute'. but perhaps you want to keep the `IO' out of it ?
2020-09-20 06:09:22 +0200 <sepi> It'll just sit there and I have to suspend it rather than being false
2020-09-20 06:09:54 +0200 <ski> (in that case, it would be better to fix that first. although, if you want to, you could fix the other error)
2020-09-20 06:10:02 +0200 <ski> sepi : and why's that ?
2020-09-20 06:10:18 +0200 <lechner> ski: i see. sorry i misread the error message. it's my first day with Haskell
2020-09-20 06:10:33 +0200 <ski> it's okay
2020-09-20 06:10:55 +0200 <ski> it's not that uncommon that fixing an error in one place will trigger an error to be flagged in another location
2020-09-20 06:11:29 +0200 <ski> sometimes it can be hard to know whether one will get out of the "tunnel(s) of error", fixing one after the other
2020-09-20 06:11:40 +0200 <ski> with more experience, you should be able to tell this, quicker
2020-09-20 06:12:12 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 260 seconds)
2020-09-20 06:12:25 +0200 <lechner> ski: How do I add the IO to the result?
2020-09-20 06:13:03 +0200 <sepi> its going to keep looking for the match because recursion, because I suppose there isn't a "if it reaches end, false" statement
2020-09-20 06:13:18 +0200 <lechner> and why is the expected type now without the IO even though I just added it up top?
2020-09-20 06:13:56 +0200 <ski> (this effect can also be noticed, when refactoring, changing the type signature. this can often trigger an error in other places, and fixing those can trigger further errors, like a ripple effect. this is normally a good thing, the implementation telling you all places you must fix, after having changed one place, in order to not encounter problems when running the code)
2020-09-20 06:14:32 +0200elliott_(~elliott@2607:fb90:18d6:fc61:a84:10d2:ef86:f415) (Ping timeout: 260 seconds)
2020-09-20 06:14:52 +0200 <lechner> but why did it not accept the actual type without the IO in the first place. just because of the 'do'?
2020-09-20 06:15:16 +0200 <ski> sepi : there is a "if it reaches end, false" case, that's `memb x [] = False'. the problem is that you never take a step closer to it, you're moving your legs up and down, standing still
2020-09-20 06:16:04 +0200 <ski> lechner : "but why did it not accept the actual type without the IO in the first place. just because of the 'do'?" -- no, because of the `readFile'
2020-09-20 06:16:14 +0200danso(~dan@107-190-41-58.cpe.teksavvy.com) (Read error: Connection reset by peer)
2020-09-20 06:16:32 +0200 <ski> "How do I add the IO to the result?" -- result of what ? `compute' ?
2020-09-20 06:16:50 +0200 <lechner> hashMethod $ Char8.pack contents
2020-09-20 06:16:52 +0200danso(~dan@107-190-41-58.cpe.teksavvy.com)
2020-09-20 06:17:07 +0200 <ski> "and why is the expected type now without the IO even though I just added it up top?" -- what do you mean ? in <https://dpaste.com/553FLPZG5>, the expected type does have an `IO'
2020-09-20 06:17:20 +0200 <ski> lechner : `return :: a -> IO a'
2020-09-20 06:17:26 +0200 <lechner> yes, but only because I added it up top
2020-09-20 06:17:34 +0200jedws(~jedws@121.209.139.222)
2020-09-20 06:18:06 +0200 <lechner> thanks. where do I place this return statement, please? and do I retain the name 'a'?
2020-09-20 06:18:13 +0200 <ski> it's complaining that `hashMethod :: Char8.ByteString -> Char8.ByteString', while you're attempting to use it as if it was `hashMethod :: Char8.ByteString -> IO Char8.ByteString'
2020-09-20 06:18:24 +0200 <lechner> right
2020-09-20 06:18:44 +0200 <ski> `a' is a type variable. in your case, `a' would become `Char8.ByteString'
2020-09-20 06:19:01 +0200 <ski> (so that you get `return :: Char8.ByteString -> IO Char8.ByteString' ..)
2020-09-20 06:19:54 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 06:19:57 +0200drbean(~drbean@TC210-63-209-59.static.apol.com.tw)
2020-09-20 06:20:25 +0200 <ski> (another way to fix the type mismatch for `hashMethod' would be to change the signature of `compute' so that the specified callback (that's `hashMethod'), actually had type `Char8.ByteString -> IO Char8.ByteString' .. but i'm not convinced you actually want to do this)
2020-09-20 06:21:07 +0200Saukk(~Saukk@2001:998:dc:4a67:1c59:9bb5:b94c:4)
2020-09-20 06:21:09 +0200 <lechner> I will eventually remove the IO out of that function. right now, I am just learning. Where does that return statement go, please?
2020-09-20 06:21:14 +0200jedws(~jedws@121.209.139.222) (Client Quit)
2020-09-20 06:21:29 +0200 <lechner> and is this thing still called a function?
2020-09-20 06:21:52 +0200 <ski> (usually, especially as a beginner, one should think twice, before putting `IO' inside argument types. it's not that it's dangerous, but rather that it adds extra power, with possibility for extra confusion, that one relatively rarely needs)
2020-09-20 06:22:01 +0200 <ski> `compute' ? sure
2020-09-20 06:22:11 +0200 <ski> `hashMethod' as well
2020-09-20 06:22:11 +0200 <lechner> i agree with that
2020-09-20 06:22:34 +0200 <lechner> i thought perhaps the 'do' would turn compute into a monad
2020-09-20 06:22:38 +0200 <ski> no
2020-09-20 06:22:55 +0200 <ski> monads are not values that you deal with, at run-time
2020-09-20 06:22:58 +0200hackagereanimate 1.0.0.0 - Animation library based on SVGs. https://hackage.haskell.org/package/reanimate-1.0.0.0 (DavidHimmelstrup)
2020-09-20 06:23:06 +0200 <ski> take e.g. `getLine :: IO String'
2020-09-20 06:23:15 +0200 <ski> `getLine' is not a monad. `IO' is the monad
2020-09-20 06:23:23 +0200 <lechner> i see. that's not a monad either
2020-09-20 06:23:28 +0200 <lechner> or is it?
2020-09-20 06:23:28 +0200 <ski> `getLine' is a monadic action, or just action, for short
2020-09-20 06:23:35 +0200 <ski> if you have
2020-09-20 06:23:39 +0200 <ski> compute :: (Char8.ByteString -> Char8.ByteString) -> String -> IO Char8.ByteString
2020-09-20 06:23:43 +0200 <lechner> the IO is the monad?
2020-09-20 06:23:57 +0200 <ski> then `compute hashMethod fileName' will also be an action. an `IO'-action (since `IO' is the monad here)
2020-09-20 06:24:00 +0200 <ski> yes
2020-09-20 06:24:32 +0200 <ski> the type `IO' (together with its instance of the `Monad' type class) is the monad
2020-09-20 06:25:07 +0200 <lechner> okay, sorry to be persistent. in which line do i stick that return statement, please?
2020-09-20 06:25:17 +0200 <ski> so .. `compute' is a function that computes/returns an action
2020-09-20 06:25:41 +0200 <sepi> I know I would want (y:ys) to be where y gets thrown out, next in ys becomes y. Now I'm trying to figure out how to translate that over
2020-09-20 06:25:50 +0200 <ski> the line in which you currently need `IO Blah', while you actually only have something of type `Blah' in
2020-09-20 06:26:12 +0200 <ski> sepi : perhaps try throwing out `y', then
2020-09-20 06:26:13 +0200 <lechner> so it goes before, which makes it kind of ling
2020-09-20 06:26:19 +0200 <lechner> long
2020-09-20 06:26:51 +0200 <ski> you mean the line of code ?
2020-09-20 06:27:16 +0200 <lechner> i am sticking in before the last line of compute
2020-09-20 06:28:05 +0200 <lechner> something is wrong
2020-09-20 06:29:07 +0200Orbstheorem(~roosember@hellendaal.orbstheorem.ch) (Ping timeout: 240 seconds)
2020-09-20 06:29:13 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 06:29:54 +0200 <ski> sepi : btw, you didn't say what `memb' is supposed to compute
2020-09-20 06:31:30 +0200skiidly wonders what lechner is trying
2020-09-20 06:31:35 +0200ambiso(~ambiso@209.182.239.205) (Quit: Ping timeout (120 seconds))
2020-09-20 06:31:54 +0200ambiso(~ambiso@209.182.239.205)
2020-09-20 06:32:15 +0200 <sepi> its supposed to compute true or false, saying true"abc" is in there, or false it isn't in there
2020-09-20 06:32:15 +0200irc_user(uid423822@gateway/web/irccloud.com/x-yamugsoddzfdaipx) (Quit: Connection closed for inactivity)
2020-09-20 06:32:20 +0200 <lechner> i feel so dumb. i can't put this line in the right place: return :: Char8.ByteString -> IO Char8.ByteString
2020-09-20 06:32:22 +0200 <sepi> I think I got it though
2020-09-20 06:33:00 +0200 <sepi> Thanks I was here for a few hours to get to this point, appreciate your push in the right direction
2020-09-20 06:33:03 +0200 <ski> sepi : what is `memb x ys' supposed to compute, for an arbitrary `x' and list `ys' ?
2020-09-20 06:34:09 +0200 <ski> lechner : oh, i should clarify that i only intended you to use `return'. the `:: Char8.ByteString -> IO Char8.ByteString' was only a clarification, to tell you what type it would have, in your case
2020-09-20 06:34:24 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-09-20 06:34:28 +0200 <ski> sepi : show the code ?
2020-09-20 06:35:37 +0200 <ski> (if you really want to, you could type in `return :: Char8.ByteString -> IO Char8.ByteString' .. but you'd have to bracket it like `(return :: Char8.ByteString -> IO Char8.ByteString)')
2020-09-20 06:37:33 +0200 <lechner> i was just missing some parentheses (or perhaps a dollar sign). return is a function!
2020-09-20 06:37:39 +0200 <ski> yes, of course
2020-09-20 06:37:44 +0200 <ski> it has a `->' in its type
2020-09-20 06:38:08 +0200 <ski> all values whose types are of the general shape `... -> ...' are functions
2020-09-20 06:38:09 +0200 <lechner> doesn't everything in Haskell? :)
2020-09-20 06:38:14 +0200 <ski> (and only those are functions)
2020-09-20 06:38:18 +0200 <lechner> just kidding
2020-09-20 06:38:37 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:7d39:b02b:8868:9bea) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 06:38:46 +0200 <ski> yea .. "Everything is a function" does not hold in the Functional Programming paradigm
2020-09-20 06:38:58 +0200 <lechner> it was a bad joke
2020-09-20 06:39:00 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 06:39:55 +0200 <ski> see <http://conal.net/blog/posts/everything-is-a-function-in-haskell> :)
2020-09-20 06:41:00 +0200 <ski> lechner : so .. how does your `compute' look, now ?
2020-09-20 06:41:15 +0200 <sepi> memb x [] = Falsememb x (y:ys) | x `elem` y:ys = True | otherwise = mMemb where mMemb = memb x (ys)
2020-09-20 06:41:56 +0200 <ski> that's better
2020-09-20 06:42:17 +0200 <lechner> ski: it's working. https://dpaste.com/CBE8R6EU2
2020-09-20 06:42:20 +0200 <ski> sepi : although that code not had redundant functionality
2020-09-20 06:42:22 +0200 <ski> er
2020-09-20 06:42:25 +0200 <ski> sepi : although that code now had redundant functionality
2020-09-20 06:42:32 +0200 <lechner> ski: I am just getting the hang of it. thanks so much for your help.
2020-09-20 06:43:08 +0200 <lechner> ski: i'll be back. my first day with haskell is ending, and it's time to call it a night.
2020-09-20 06:43:09 +0200 <sepi> the extra where part?
2020-09-20 06:43:10 +0200 <ski> lechner : yea. btw, i would probably write that last line as `return (hashMethod (Char8.pack contents))'
2020-09-20 06:43:27 +0200 <lechner> that's what I had. why is that superior, please?
2020-09-20 06:43:33 +0200 <ski> sepi : no, not that
2020-09-20 06:43:48 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
2020-09-20 06:44:12 +0200 <ski> sepi : can you tell me, in words, what `memb x ys' is supposed to compute/check ?
2020-09-20 06:44:25 +0200 <ski> lechner : it uses less `$'s :)
2020-09-20 06:44:43 +0200Orbstheorem(~roosember@hellendaal.orbstheorem.ch)
2020-09-20 06:44:47 +0200 <ski> `$' rarely improve code, imho
2020-09-20 06:44:58 +0200 <sepi> the x = y:ys ?
2020-09-20 06:45:11 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:118d:2a8:7881:1f11)
2020-09-20 06:45:19 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 06:45:26 +0200 <ski> sepi : that question was not about your code, but about what behaviour your code is supposed to have
2020-09-20 06:46:03 +0200 <lechner> thanks again for all your help! unfortunately, i have to go but thanks to you my experience in this channel was super
2020-09-20 06:46:06 +0200 <sepi> Its supposed to check if what's given in x is in the ys list
2020-09-20 06:46:07 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net)
2020-09-20 06:46:35 +0200 <ski> lechner : in general, it's probably better to replace `f $ g $ h $ x' with `f . g . h $ x' or (i prefer) `(f . g . h) x' .. or just `f (g (h x))' (brackets are nothing to be afraid of)
2020-09-20 06:46:54 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:118d:2a8:7881:1f11) (Client Quit)
2020-09-20 06:47:22 +0200 <ski> lechner : the `f . g . h' "chain"/"pipeline" is better, since you can break out and factor away any part of it, giving it a new name. not so with the repeated `$'s
2020-09-20 06:47:58 +0200 <ski> lechner : have fun, and good luck with your continued learning
2020-09-20 06:48:08 +0200 <ski> sepi : yes, thank you
2020-09-20 06:48:39 +0200 <ski> sepi : now, what is x `elem` ys supposed to compute/check ?
2020-09-20 06:52:01 +0200perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 2.9)
2020-09-20 06:52:12 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:118d:2a8:7881:1f11)
2020-09-20 06:53:27 +0200hackagetagstew 0 - Black magic tagsoup https://hackage.haskell.org/package/tagstew-0 (FumiakiKinoshita)
2020-09-20 06:54:14 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-09-20 06:55:57 +0200Orbstheorem(~roosember@hellendaal.orbstheorem.ch) (Ping timeout: 260 seconds)
2020-09-20 06:57:42 +0200 <sepi> I see that is my redundant part 😅
2020-09-20 06:59:09 +0200 <sepi> I'm not sure without my = true, my | becomes a parse error input
2020-09-20 06:59:40 +0200 <ski> how do you mean ?
2020-09-20 07:01:54 +0200mmohammadi981261(~mmohammad@5.238.182.51)
2020-09-20 07:02:15 +0200 <sepi> does it need a true or false claim before using otherwise?
2020-09-20 07:02:30 +0200urodna(~urodna@unaffiliated/urodna) (Quit: urodna)
2020-09-20 07:02:32 +0200 <ski> a guard, introduced by the
2020-09-20 07:02:56 +0200 <ski> `|' symbol, expects an expresion evaluating to `True' or `False', after it, yes
2020-09-20 07:04:40 +0200shad0w_(~shad0w_@160.202.36.27) (Remote host closed the connection)
2020-09-20 07:05:58 +0200 <sepi> memb x (y:ys) | x == y = True | otherwise = mMemb
2020-09-20 07:06:21 +0200 <sepi> that gets rid of redundancy correct
2020-09-20 07:06:22 +0200 <ski> yay :)
2020-09-20 07:06:28 +0200 <ski> yes
2020-09-20 07:07:11 +0200 <sepi> 💀💀 thank you
2020-09-20 07:07:16 +0200 <ski> now, do you know how to express this using, say, `if'-`then'-`else', instead of guards ?
2020-09-20 07:07:24 +0200 <ski> (or any other way ?)
2020-09-20 07:07:28 +0200hackagetypesafe-precure 0.7.9.1 - Type-safe transformations and purifications of PreCures (Japanese Battle Heroine) https://hackage.haskell.org/package/typesafe-precure-0.7.9.1 (igrep)
2020-09-20 07:08:20 +0200mmohammadi981261(~mmohammad@5.238.182.51) (Quit: I quit (╯°□°)╯︵ ┻━┻)
2020-09-20 07:08:25 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-157-9.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-09-20 07:08:32 +0200ericsagnes(~ericsagne@2405:6580:0:5100:64a7:3952:c5b0:2946) (Ping timeout: 260 seconds)
2020-09-20 07:09:49 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-157-9.dhcp-dynamic.fibreop.nb.bellaliant.net)
2020-09-20 07:11:41 +0200HarveyPwca(~HarveyPwc@c-98-220-98-201.hsd1.il.comcast.net) (Quit: Leaving)
2020-09-20 07:13:24 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 07:13:26 +0200Lord_of_Life_(~Lord@unaffiliated/lord-of-life/x-0885362)
2020-09-20 07:14:12 +0200Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 272 seconds)
2020-09-20 07:14:48 +0200Lord_of_Life_Lord_of_Life
2020-09-20 07:16:31 +0200 <sepi> I know how I'd want to do it conceptually but I'm not too sure on the syntax
2020-09-20 07:17:18 +0200abaiste^(abaiste@ip98-184-89-2.mc.at.cox.net)
2020-09-20 07:18:01 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-09-20 07:18:40 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-09-20 07:20:16 +0200ericsagnes(~ericsagne@2405:6580:0:5100:e941:4ff:7183:882c)
2020-09-20 07:22:44 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 07:23:00 +0200 <sepi> If you could show an example or reference that's similar to my function that'd be cool. I'll be heading to bed for the night soon
2020-09-20 07:27:02 +0200rihards(~rihards@balticom-142-78-50.balticom.lv)
2020-09-20 07:27:13 +0200Alleria_(~AllahuAkb@2604:2000:1484:26:1c6a:a4a1:e2e0:f856) (Ping timeout: 244 seconds)
2020-09-20 07:27:19 +0200 <c_wraith> sepi: it's easier than you might think. memb x (y:ys) = if ... then ... else ...
2020-09-20 07:28:08 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 07:28:54 +0200Alleria_(~AllahuAkb@2604:2000:1484:26:f9f7:186a:b38:3c1e)
2020-09-20 07:29:49 +0200ryansmccoy(~ryansmcco@193.37.254.27) (Ping timeout: 260 seconds)
2020-09-20 07:30:47 +0200ryansmccoy(~ryansmcco@156.96.151.132)
2020-09-20 07:33:19 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 07:33:54 +0200abaiste^(abaiste@ip98-184-89-2.mc.at.cox.net) ()
2020-09-20 07:36:12 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 07:39:47 +0200brandly(~brandly@c-73-68-15-46.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
2020-09-20 07:40:04 +0200sepi(49dc4892@c-73-220-72-146.hsd1.ca.comcast.net) (Ping timeout: 245 seconds)
2020-09-20 07:41:34 +0200eric(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa)
2020-09-20 07:43:03 +0200drbean(~drbean@TC210-63-209-59.static.apol.com.tw) (Read error: Connection reset by peer)
2020-09-20 07:43:14 +0200Rudd0(~Rudd0@185.189.115.118) (Ping timeout: 260 seconds)
2020-09-20 07:44:16 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 07:44:27 +0200moondaddi(3ae9ffcb@58.233.255.203)
2020-09-20 07:45:24 +0200drbean(~drbean@TC210-63-209-213.static.apol.com.tw)
2020-09-20 07:45:45 +0200eric(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa) (Ping timeout: 246 seconds)
2020-09-20 07:48:45 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
2020-09-20 07:48:49 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 260 seconds)
2020-09-20 07:49:40 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 07:52:55 +0200Saten-san(~Saten-san@ip-83-134-68-146.dsl.scarlet.be)
2020-09-20 07:56:34 +0200roconnor(~roconnor@host-45-78-192-132.dyn.295.ca) (Ping timeout: 256 seconds)
2020-09-20 07:56:51 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 07:57:31 +0200evanjs(~evanjs@075-129-188-019.res.spectrum.com) (Quit: ZNC 1.8.1 - https://znc.in)
2020-09-20 08:00:02 +0200r2wj(~r2wj@185.244.214.216) ()
2020-09-20 08:00:32 +0200evanjs(~evanjs@075-129-188-019.res.spectrum.com)
2020-09-20 08:00:47 +0200xff0x_(~fox@2001:1a81:53ac:b300:4ccb:e51f:bb16:7d67) (Ping timeout: 246 seconds)
2020-09-20 08:01:37 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2020-09-20 08:01:45 +0200xff0x_(~fox@port-92-195-46-13.dynamic.as20676.net)
2020-09-20 08:01:47 +0200notzmv`(~user@177.103.86.92)
2020-09-20 08:02:50 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 08:04:49 +0200notzmv(~user@unaffiliated/zmv) (Disconnected by services)
2020-09-20 08:04:55 +0200notzmv`notzmv
2020-09-20 08:05:00 +0200notzmv(~user@177.103.86.92) (Changing host)
2020-09-20 08:05:00 +0200notzmv(~user@unaffiliated/zmv)
2020-09-20 08:05:55 +0200Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
2020-09-20 08:07:29 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Ping timeout: 260 seconds)
2020-09-20 08:07:39 +0200Saukk(~Saukk@2001:998:dc:4a67:1c59:9bb5:b94c:4) (Remote host closed the connection)
2020-09-20 08:07:43 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 08:08:43 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-09-20 08:10:45 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2020-09-20 08:11:17 +0200gienah(~mwright@gentoo/developer/gienah) (Quit: leaving)
2020-09-20 08:12:42 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 246 seconds)
2020-09-20 08:15:06 +0200mirrorbird(~psutcliff@2a00:801:44a:a00b:20c3:c64:eb15:73a2)
2020-09-20 08:15:38 +0200Jeanne-Kamikaze(~Jeanne-Ka@static-198-54-131-172.cust.tzulo.com) (Ping timeout: 272 seconds)
2020-09-20 08:16:20 +0200Volt_(~Volt_@c-73-145-164-70.hsd1.mi.comcast.net) (Quit: )
2020-09-20 08:17:13 +0200TooDifficult(~TooDiffic@139.59.59.230)
2020-09-20 08:17:28 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 08:17:58 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 08:22:38 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-20 08:23:58 +0200ggole(~ggole@2001:8003:8119:7200:a81f:ad25:a0f4:9303)
2020-09-20 08:26:44 +0200moondaddi(3ae9ffcb@58.233.255.203) (Ping timeout: 245 seconds)
2020-09-20 08:26:55 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 08:33:32 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08)
2020-09-20 08:35:01 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Ping timeout: 264 seconds)
2020-09-20 08:37:40 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:118d:2a8:7881:1f11) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 08:38:04 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-09-20 08:38:46 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 08:43:05 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-20 08:43:52 +0200kleisli_(~kleisli@2600:1700:4640:c560:68bd:9d76:dbd8:24e7) (Ping timeout: 260 seconds)
2020-09-20 08:47:37 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-09-20 08:48:42 +0200TooDifficult(~TooDiffic@139.59.59.230) (Ping timeout: 258 seconds)
2020-09-20 08:51:06 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2020-09-20 08:52:17 +0200nehsou^(nehsou@ip98-184-89-2.mc.at.cox.net)
2020-09-20 08:56:26 +0200jjj(~jjj@178.239.168.171)
2020-09-20 08:56:48 +0200ph88(~ph88@ip5f5af726.dynamic.kabel-deutschland.de)
2020-09-20 08:57:08 +0200TooDifficult(~TooDiffic@139.59.59.230)
2020-09-20 08:58:05 +0200Saten-san(~Saten-san@ip-83-134-68-146.dsl.scarlet.be) (Quit: WeeChat 2.8)
2020-09-20 08:59:38 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 09:01:09 +0200ph88(~ph88@ip5f5af726.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2020-09-20 09:01:40 +0200shafox(~shafox@106.51.234.111)
2020-09-20 09:02:09 +0200TooDifficult(~TooDiffic@139.59.59.230) (Quit: TooDifficult)
2020-09-20 09:02:57 +0200TooDifficult(~TooDiffic@139.59.59.230)
2020-09-20 09:03:57 +0200hackagewebauthn 0 - Web Authentication API https://hackage.haskell.org/package/webauthn-0 (FumiakiKinoshita)
2020-09-20 09:04:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-20 09:05:45 +0200nehsou^(nehsou@ip98-184-89-2.mc.at.cox.net) ()
2020-09-20 09:07:04 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 09:09:21 +0200tsrt^(tsrt@ip98-184-89-2.mc.at.cox.net)
2020-09-20 09:11:47 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-20 09:13:58 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 256 seconds)
2020-09-20 09:15:39 +0200codygman(~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
2020-09-20 09:15:54 +0200codygman(codygman@gateway/vpn/privateinternetaccess/codygman)
2020-09-20 09:15:55 +0200codygman(codygman@gateway/vpn/privateinternetaccess/codygman) (Client Quit)
2020-09-20 09:15:55 +0200Maxdamantus(~Maxdamant@unaffiliated/maxdamantus)
2020-09-20 09:20:30 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 09:21:35 +0200danso(~dan@107-190-41-58.cpe.teksavvy.com) (Quit: WeeChat 2.9)
2020-09-20 09:25:18 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-09-20 09:28:26 +0200CMCDragonkai1(~Thunderbi@120.17.10.7)
2020-09-20 09:41:07 +0200shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:c058:b9a7:8857:8837) (Ping timeout: 244 seconds)
2020-09-20 09:41:11 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 09:42:06 +0200mmohammadi981261(~mmohammad@2.178.205.88)
2020-09-20 09:43:02 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 09:45:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-20 09:45:42 +0200proteusguy(~proteusgu@cm-58-10-208-180.revip7.asianet.co.th) (Ping timeout: 256 seconds)
2020-09-20 09:47:14 +0200shutdown_-h_now(~arjan@2001:1c06:2d0b:2312:b1b9:b40:f655:8986)
2020-09-20 09:48:19 +0200lambda-11235(~lambda-11@108-237-120-58.lightspeed.frokca.sbcglobal.net) (Quit: Bye)
2020-09-20 09:48:20 +0200danvet_(~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
2020-09-20 09:50:17 +0200Guest38587lep-delete
2020-09-20 09:50:18 +0200lep-deleteGuest38587
2020-09-20 09:50:18 +0200Guest38587lep-delete
2020-09-20 09:50:20 +0200 <perdent> How would you decode this Cistercian Monk Numerals cipher from this image programtically? https://imgur.com/lWxfMHf https://www.dcode.fr/cistercian-numbers
2020-09-20 09:51:24 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de)
2020-09-20 09:52:44 +0200mmohammadi981261(~mmohammad@2.178.205.88) (Ping timeout: 260 seconds)
2020-09-20 09:54:06 +0200tzh(~tzh@2601:448:c500:5300::ad1c) (Quit: zzz)
2020-09-20 09:54:49 +0200wavemode(~wavemode@097-070-075-143.res.spectrum.com) (Ping timeout: 264 seconds)
2020-09-20 09:56:28 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
2020-09-20 09:56:46 +0200asan(~yan4138@124.78.18.192)
2020-09-20 09:57:58 +0200proteusguy(~proteusgu@cm-58-10-208-180.revip7.asianet.co.th)
2020-09-20 10:00:07 +0200 <cheater> you mean with OCR?
2020-09-20 10:00:11 +0200Kaiepi(~Kaiepi@nwcsnbsc03w-47-55-157-9.dhcp-dynamic.fibreop.nb.bellaliant.net) (Read error: Connection reset by peer)
2020-09-20 10:00:45 +0200blackfield(~blackfiel@unaffiliated/blackfield) (Quit: see you)
2020-09-20 10:01:42 +0200 <perdent> cheater: yeah, or is there an easier way?
2020-09-20 10:01:49 +0200ddellacosta(~dd@86.106.121.168) (Ping timeout: 260 seconds)
2020-09-20 10:02:04 +0200blackfield(~blackfiel@85.255.4.218)
2020-09-20 10:02:10 +0200 <perdent> Can't ffind any on github
2020-09-20 10:02:16 +0200 <perdent> That do this
2020-09-20 10:02:31 +0200 <cheater> why not just enter the data by hand?
2020-09-20 10:02:41 +0200 <cheater> do you have huge amounts of data to OCR?
2020-09-20 10:02:46 +0200blackfield(~blackfiel@85.255.4.218) (Changing host)
2020-09-20 10:02:46 +0200blackfield(~blackfiel@unaffiliated/blackfield)
2020-09-20 10:03:29 +0200 <perdent> I could doit by hand, would be nice to have a script to do it though
2020-09-20 10:03:52 +0200 <perdent> What did you get by hand?
2020-09-20 10:06:10 +0200shatriff(~vitaliish@176.52.219.10)
2020-09-20 10:06:34 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-09-20 10:06:47 +0200shatriff(~vitaliish@176.52.219.10)
2020-09-20 10:08:46 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 10:10:46 +0200jedws(~jedws@121.209.139.222)
2020-09-20 10:13:05 +0200shad0w_(~shad0w_@160.202.36.27)
2020-09-20 10:13:19 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 272 seconds)
2020-09-20 10:13:24 +0200jedws(~jedws@121.209.139.222) (Client Quit)
2020-09-20 10:13:36 +0200 <shad0w_> Hi. i was following up on a link i was suggested to read here yesterday. https://wiki.haskell.org/How_to_write_a_Haskell_program
2020-09-20 10:14:08 +0200 <shad0w_> in the `program structure` section, it gives you a link for reading more about monad transformers.
2020-09-20 10:14:14 +0200 <shad0w_> that link seems to be dead.
2020-09-20 10:14:40 +0200 <cheater> are you new to haskell?
2020-09-20 10:14:48 +0200 <shad0w_> sure
2020-09-20 10:15:04 +0200 <cheater> don't read about monad transformers
2020-09-20 10:15:15 +0200 <shad0w_> lmao
2020-09-20 10:15:37 +0200 <cheater> just saving you a headache
2020-09-20 10:15:47 +0200 <shad0w_> just out of curosity. why ?
2020-09-20 10:16:10 +0200 <shad0w_> are they more complex than they are worth ? or they arent the preffered way anymore ?
2020-09-20 10:16:17 +0200 <perdent> i solved it
2020-09-20 10:16:28 +0200 <cheater> because it's an advanced topic you most certainly will not need for a long time, and any explanation you'll come across will likely be way over your head
2020-09-20 10:16:45 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-20 10:16:49 +0200 <shad0w_> gotcha
2020-09-20 10:16:54 +0200 <shad0w_> seems fair.
2020-09-20 10:17:49 +0200 <perdent> HTB{m0Nks_kN3w!}
2020-09-20 10:17:54 +0200 <perdent> is what i got
2020-09-20 10:18:15 +0200 <cheater> perdent: 🤷‍♂️
2020-09-20 10:18:43 +0200 <perdent> capital M
2020-09-20 10:19:11 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:dcd7:c4bd:12f0:39d4)
2020-09-20 10:19:51 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:dcd7:c4bd:12f0:39d4) (Remote host closed the connection)
2020-09-20 10:22:14 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 10:22:18 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Read error: Connection reset by peer)
2020-09-20 10:22:27 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 10:22:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 10:23:48 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi)
2020-09-20 10:24:13 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de) (Ping timeout: 260 seconds)
2020-09-20 10:26:28 +0200 <shad0w_> i had another question. is cabal sandboxing still a thing ?
2020-09-20 10:26:39 +0200kleisli_(~kleisli@2600:1700:4640:c560:68bd:9d76:dbd8:24e7)
2020-09-20 10:27:05 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-20 10:27:55 +0200 <shad0w_> i can only find 1 command `v1-sandbox` in cabal help and its listed under `legacy commands`
2020-09-20 10:29:15 +0200 <cheater> yes, v1-sandbox is still a thing, it's what sandbox used to be
2020-09-20 10:29:27 +0200 <cheater> if you use v2-* commands, they work like a sandbox now
2020-09-20 10:29:29 +0200 <int-e> shad0w_: Barely, it'll be removed in version 3.4. You can presumably get a similar effect by manipulating the store directory.
2020-09-20 10:29:31 +0200 <cheater> but the sandboxes are global
2020-09-20 10:29:35 +0200 <cheater> ish
2020-09-20 10:29:39 +0200 <cheater> it's not really like that
2020-09-20 10:29:48 +0200pera(~pera@unaffiliated/pera) (Quit: leaving)
2020-09-20 10:29:51 +0200 <cheater> but for what you want, using v2-* commands is what you want if you were using sandboxes before
2020-09-20 10:30:03 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Max SendQ exceeded)
2020-09-20 10:30:06 +0200 <cheater> int-e's suggestion of manipulating the store dir isn't necessary
2020-09-20 10:30:17 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi)
2020-09-20 10:30:29 +0200 <int-e> cheater: I *wanted* to keep local build artefacts.
2020-09-20 10:30:50 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 10:31:28 +0200 <cheater> int-e: shad0w_ is just a person new to haskell doing some basic projects. shad0w_ doesn't need to do any of that crazy stuff.
2020-09-20 10:31:29 +0200 <shad0w_> so, if hypothetically, i am writing a new project, doing cabal init will sandbox it to the very folder ?
2020-09-20 10:31:45 +0200 <shad0w_> cheater: +1
2020-09-20 10:31:49 +0200 <cheater> shad0w_: not really, no. it will be global. but it will be done so that you don't get cabal hell
2020-09-20 10:32:27 +0200 <shad0w_> now suppose if 2 of my projects depend on the same dep but different version ?
2020-09-20 10:32:48 +0200 <shad0w_> for eg:- say hlint.
2020-09-20 10:32:57 +0200 <shad0w_> i just updated to 3.2 recently
2020-09-20 10:33:00 +0200 <cheater> you used to get cabal hell due to conflicting library versions. you don't get that anymore. every combination of versions is kept separate, so to speak. so two projects using the same exact lib versions will use the same build artefacts. but two projects using different lib versions will use separate lib artefacts and won't know about each other.
2020-09-20 10:33:35 +0200 <shad0w_> and globals can only be 1 copy right ?
2020-09-20 10:33:47 +0200 <shad0w_> like hlint is installed in .cabal/bin/hlint
2020-09-20 10:33:57 +0200 <shad0w_> it seems to be a symlink to a store folder
2020-09-20 10:35:46 +0200 <cheater> i forgot how that works
2020-09-20 10:35:53 +0200 <cheater> i just know you can set it up to work
2020-09-20 10:36:10 +0200 <shad0w_> cool
2020-09-20 10:36:15 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Max SendQ exceeded)
2020-09-20 10:36:27 +0200jjj(~jjj@178.239.168.171) (Remote host closed the connection)
2020-09-20 10:36:29 +0200 <shad0w_> tl;dr, sandboxing isn't necessary now ?
2020-09-20 10:36:33 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi)
2020-09-20 10:36:49 +0200 <cheater> yes
2020-09-20 10:36:50 +0200 <int-e> cheater: fair enough, I should've asked why they want sandboxes first.
2020-09-20 10:36:52 +0200 <cheater> use v2-*
2020-09-20 10:36:58 +0200 <cheater> int-e: it's okay :)
2020-09-20 10:36:59 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de)
2020-09-20 10:37:08 +0200 <shad0w_> thanks @cheater
2020-09-20 10:37:09 +0200 <cheater> int-e: you were trying to help, that's what matters :)
2020-09-20 10:37:12 +0200 <cheater> yw shad0w_
2020-09-20 10:37:51 +0200 <shad0w_> one more thing
2020-09-20 10:37:59 +0200 <shad0w_> there are v2- commands like you said.
2020-09-20 10:38:11 +0200 <shad0w_> there also happens to be some `new-` commands
2020-09-20 10:38:27 +0200 <shad0w_> do they succeed `v2-` commands ?
2020-09-20 10:38:59 +0200 <shad0w_> thanks @int-e too : )
2020-09-20 10:39:32 +0200kori(~kori@arrowheads/kori) (Quit: WeeChat 2.8)
2020-09-20 10:39:50 +0200 <int-e> shad0w_: no, the new- command are the v2- commands
2020-09-20 10:40:46 +0200 <cheater> new-* is the current new stuff. once we have v3, new will refer to v3 and not v2 any more.
2020-09-20 10:40:49 +0200 <cheater> v2 is forever v2.
2020-09-20 10:40:52 +0200 <cheater> until it gets removed.
2020-09-20 10:40:52 +0200 <int-e> For historical reasons, the old commands were there, then the 'new-' commands were added. Then somebody realized that this will make the switch awkward, and the 'v1-' aliases for the old commands and the 'v2-' aliases for the new commands were added.
2020-09-20 10:41:09 +0200 <int-e> By now the 'v2-' commands are the default, and the 'new-' prefix is confusing.
2020-09-20 10:41:39 +0200 <shad0w_> so the new- seems like a pointer to the newest stuff, which just happens to be v2- in this case ?
2020-09-20 10:41:43 +0200Orbstheorem(~roosember@hellendaal.orbstheorem.ch)
2020-09-20 10:41:53 +0200 <shad0w_> while v2- is always hard v2-
2020-09-20 10:42:04 +0200 <cheater> yes
2020-09-20 10:42:09 +0200 <shad0w_> got it.
2020-09-20 10:42:21 +0200 <shad0w_> damn you guys are helpful.
2020-09-20 10:42:25 +0200 <shad0w_> : )
2020-09-20 10:42:48 +0200 <shad0w_> happy weekend guys.
2020-09-20 10:42:58 +0200 <int-e> cheater: please tell me there are no current plans for a v3 set of cabal commands.
2020-09-20 10:43:00 +0200fendor(~fendor@212095005091.public.telering.at)
2020-09-20 10:43:06 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2020-09-20 10:43:09 +0200 <cheater> int-e: not that i know of
2020-09-20 10:43:20 +0200 <cheater> int-e: but that's what i was told some time ago
2020-09-20 10:43:26 +0200 <cheater> you too shad0w_
2020-09-20 10:43:40 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 10:43:51 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-09-20 10:45:33 +0200kori(~kori@arrowheads/kori)
2020-09-20 10:45:45 +0200coot(~coot@37.30.55.202.nat.umts.dynamic.t-mobile.pl)
2020-09-20 10:46:54 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 10:47:23 +0200knupfer1(~Thunderbi@i59F7FF48.versanet.de)
2020-09-20 10:48:16 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-20 10:49:47 +0200knupfer1knupfer
2020-09-20 10:50:14 +0200coot(~coot@37.30.55.202.nat.umts.dynamic.t-mobile.pl) (Client Quit)
2020-09-20 10:50:30 +0200coot(~coot@37.30.55.202.nat.umts.dynamic.t-mobile.pl)
2020-09-20 10:51:02 +0200Orbstheorem(~roosember@hellendaal.orbstheorem.ch) (Ping timeout: 260 seconds)
2020-09-20 10:52:42 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
2020-09-20 10:52:57 +0200jedws(~jedws@121.209.139.222)
2020-09-20 10:54:04 +0200kicov(959c7c03@nat.ds3.agh.edu.pl)
2020-09-20 10:58:19 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 246 seconds)
2020-09-20 10:58:37 +0200ericsagnes(~ericsagne@2405:6580:0:5100:e941:4ff:7183:882c) (Ping timeout: 260 seconds)
2020-09-20 11:00:09 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 11:00:38 +0200 <kicov> Hi, was just wondering how to approach doing things with State monad and liquid haskell. Let's say our state is int, and we'd like a check for a function `successor` that checks whether the current int is mod 2. If it is, then we return state+1, if it isn't, boom.
2020-09-20 11:00:52 +0200stites[m](stitesmatr@gateway/shell/matrix.org/x-yuspkxyvracibmrk) ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days")
2020-09-20 11:04:28 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 11:07:03 +0200ph88(~ph88@ip5f5af726.dynamic.kabel-deutschland.de)
2020-09-20 11:08:58 +0200thc202(~thc202@unaffiliated/thc202)
2020-09-20 11:09:04 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-20 11:10:59 +0200ericsagnes(~ericsagne@2405:6580:0:5100:2032:8cd9:bb36:4db2)
2020-09-20 11:11:28 +0200blackfield(~blackfiel@unaffiliated/blackfield) (Quit: see you)
2020-09-20 11:12:27 +0200hiroaki(~hiroaki@2a02:908:4b14:d500:8d4c:a111:9cac:718b)
2020-09-20 11:13:22 +0200Dolly(585fd1fd@ti0203q160-5312.bb.online.no)
2020-09-20 11:15:48 +0200asan(~yan4138@124.78.18.192) (Ping timeout: 256 seconds)
2020-09-20 11:17:52 +0200TooDifficult(~TooDiffic@139.59.59.230) (Quit: TooDifficult)
2020-09-20 11:18:09 +0200TooDifficult(~TooDiffic@139.59.59.230)
2020-09-20 11:18:16 +0200TooDifficult(~TooDiffic@139.59.59.230) (Remote host closed the connection)
2020-09-20 11:18:31 +0200TooDifficult(~TooDiffic@139.59.59.230)
2020-09-20 11:18:38 +0200oxide(~lambda@unaffiliated/mclaren)
2020-09-20 11:22:07 +0200TooDifficult(~TooDiffic@139.59.59.230) (Client Quit)
2020-09-20 11:22:58 +0200OscarZ(~oscarz@95.175.104.39) (Quit: Leaving)
2020-09-20 11:23:11 +0200unlink__(~unlink2@p200300ebcf25bd0068eb9d9c94da2a17.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-09-20 11:24:22 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de) (Ping timeout: 272 seconds)
2020-09-20 11:24:46 +0200unlink2(~unlink2@p5dc0ae0e.dip0.t-ipconnect.de)
2020-09-20 11:25:01 +0200 <ski> kicov : sounds like you want to encode precondition and postcondition on the state, that is some kind of Hoare triple ?
2020-09-20 11:25:26 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 11:29:00 +0200Gurkenglas(~Gurkengla@unaffiliated/gurkenglas)
2020-09-20 11:29:48 +0200kayvan``(~user@52-119-115-243.PUBLIC.monkeybrains.net)
2020-09-20 11:30:01 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 11:30:59 +0200suppi(~suppi@172.246.241.246) (Ping timeout: 240 seconds)
2020-09-20 11:31:13 +0200kayvan`(~user@52-119-115-243.PUBLIC.monkeybrains.net) (Ping timeout: 246 seconds)
2020-09-20 11:31:36 +0200suppi(~suppi@2605:f700:40:c00::e6fc:6842)
2020-09-20 11:31:47 +0200drbean(~drbean@TC210-63-209-213.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin1 - https://znc.in)
2020-09-20 11:33:11 +0200mirrorbird(~psutcliff@2a00:801:44a:a00b:20c3:c64:eb15:73a2) (Quit: Leaving)
2020-09-20 11:33:34 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 244 seconds)
2020-09-20 11:34:02 +0200jedws(~jedws@121.209.139.222) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 11:38:11 +0200eric_(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa)
2020-09-20 11:42:34 +0200ph88^(~ph88@ip5f5af726.dynamic.kabel-deutschland.de)
2020-09-20 11:42:42 +0200eric_(~eric@2804:431:c7d4:402a:4dc9:97ef:220b:73aa) (Ping timeout: 260 seconds)
2020-09-20 11:43:05 +0200ph88(~ph88@ip5f5af726.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2020-09-20 11:46:06 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 11:48:06 +0200 <dminuoso> kicov: What is "boom"?
2020-09-20 11:50:33 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 11:53:28 +0200gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2020-09-20 11:55:37 +0200 <kicov> dminuoso: failed constraint
2020-09-20 11:56:44 +0200priyesh(~priyesh@84.39.117.57)
2020-09-20 11:57:18 +0200sw1nn(~sw1nn@host81-146-21-49.range81-146.btcentralplus.com) (Quit: WeeChat 2.9)
2020-09-20 11:58:07 +0200Sgeo(~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
2020-09-20 11:58:23 +0200gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2020-09-20 11:58:40 +0200sw1nn(~sw1nn@host81-146-21-49.range81-146.btcentralplus.com)
2020-09-20 11:59:39 +0200 <ski> kicov : so, what does "checks whether the current int is mod 2" mean ?
2020-09-20 12:00:35 +0200 <kicov> ski: Never heard of them, but that would be possible. Maybe continuation passing style could have a similiar problem
2020-09-20 12:01:17 +0200 <kicov> ski: i (the state) `mod` 2 == 0
2020-09-20 12:01:39 +0200 <kicov> sorry, should be more clear
2020-09-20 12:01:43 +0200 <dminuoso> kicov: So what you're proposing is `successor :: State Int ()` with a matching LH signature that suggests that the *input* state is always even?
2020-09-20 12:01:51 +0200 <ski> kicov : <https://en.wikipedia.org/wiki/Hoare_logic>
2020-09-20 12:01:58 +0200 <dminuoso> kicov: Did I get that right?
2020-09-20 12:02:06 +0200Rudd0(~Rudd0@185.189.115.103)
2020-09-20 12:02:23 +0200 <kicov> dminuoso : yep!
2020-09-20 12:02:28 +0200 <ski> presumably also that the output state is always odd, i'd gather
2020-09-20 12:02:51 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 12:03:04 +0200 <dminuoso> Mmm, I wonder, is there some `liftState :: a -> a -> StateT a ()` function perhaps?
2020-09-20 12:03:05 +0200 <ski> (or maybe even that it's just the successor of the input)
2020-09-20 12:03:19 +0200 <dminuoso> Oh, State rather
2020-09-20 12:03:25 +0200 <ski> what would it do ?
2020-09-20 12:03:46 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
2020-09-20 12:04:05 +0200 <dminuoso> Oh hah, that's just modify I guess
2020-09-20 12:04:19 +0200 <ski> oh .. i was beginning to wonder if it was missing some brackets
2020-09-20 12:04:29 +0200maroloccio(~marolocci@2a02:8084:601d:7f80:164f:8aff:fed8:411d)
2020-09-20 12:05:08 +0200 <dminuoso> Ah indeed, weird.
2020-09-20 12:05:08 +0200fendor(~fendor@212095005091.public.telering.at) (Remote host closed the connection)
2020-09-20 12:05:51 +0200gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2020-09-20 12:06:55 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 12:07:26 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Ping timeout: 256 seconds)
2020-09-20 12:07:28 +0200gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2020-09-20 12:07:51 +0200nyd(~nyd@unaffiliated/elysian)
2020-09-20 12:09:41 +0200ystael(~ystael@209.6.50.55) (Ping timeout: 260 seconds)
2020-09-20 12:11:52 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-09-20 12:13:47 +0200Rudd0^(~Rudd0@185.189.115.108)
2020-09-20 12:14:37 +0200Rudd0(~Rudd0@185.189.115.103) (Ping timeout: 264 seconds)
2020-09-20 12:18:42 +0200day(~Unknown@unaffiliated/day)
2020-09-20 12:20:41 +0200berberman(~berberman@2408:8207:256b:da50::a44) (Quit: ZNC 1.7.5 - https://znc.in)
2020-09-20 12:21:01 +0200gienah(~mwright@gentoo/developer/gienah)
2020-09-20 12:21:06 +0200Dolly(585fd1fd@ti0203q160-5312.bb.online.no) (Remote host closed the connection)
2020-09-20 12:21:50 +0200Rudd0(~Rudd0@185.189.115.108)
2020-09-20 12:23:23 +0200berberman(~berberman@2408:8207:2565:18d0:584e:a9ff:fe9b:d3fe)
2020-09-20 12:24:08 +0200Rudd0^(~Rudd0@185.189.115.108) (Ping timeout: 258 seconds)
2020-09-20 12:24:50 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 12:26:37 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 12:27:08 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08)
2020-09-20 12:27:25 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08) (Client Quit)
2020-09-20 12:27:42 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 12:28:51 +0200 <siraben> What a good alternative to the monad-gen package?
2020-09-20 12:32:32 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-20 12:35:16 +0200Orbstheorem(~roosember@hellendaal.orbstheorem.ch)
2020-09-20 12:36:15 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 12:41:25 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-09-20 12:42:53 +0200solonarv(~solonarv@astrasbourg-653-1-186-165.w90-13.abo.wanadoo.fr)
2020-09-20 12:47:34 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…)
2020-09-20 12:47:39 +0200random(~random@185.219.70.106)
2020-09-20 12:47:52 +0200 <random> hey guys, am I not getting this right or there is no phone parser library for Haskell
2020-09-20 12:47:59 +0200 <random> besides the one that requires libphonenumber?
2020-09-20 12:48:30 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 12:48:47 +0200 <Rembane> random: Is that US phone numbers?
2020-09-20 12:48:57 +0200 <random> I need for european ones
2020-09-20 12:49:17 +0200 <random> but there doesn't seem to be anything for US phones as well
2020-09-20 12:49:24 +0200 <random> thought this was quite a common usecase
2020-09-20 12:49:43 +0200 <Rembane> random: Got it. Maybe it is too simple to write a parser using Megaparsec that everyone does that instead?
2020-09-20 12:50:09 +0200 <Rembane> siraben: I have used this: https://hackage.haskell.org/package/quickcheck-transformer What is good for you?
2020-09-20 12:50:30 +0200ystael(~ystael@209.6.50.55)
2020-09-20 12:50:32 +0200 <random> Rembane: I guess not too simple but I'll be doing it as well lol...
2020-09-20 12:50:59 +0200 <random> the country code numbers are quite variable
2020-09-20 12:52:24 +0200 <Rembane> random: Yeah. :)
2020-09-20 12:52:39 +0200 <Rembane> random: Just out of curiosity, do you have some examples of country code numbers?
2020-09-20 12:52:53 +0200 <random> https://countrycode.org/
2020-09-20 12:52:55 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Ping timeout: 272 seconds)
2020-09-20 12:53:40 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-09-20 12:53:58 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de)
2020-09-20 12:55:09 +0200 <cheater> random: phone numbers are a very difficult thing to parse, like time zone data and time strings, if there's going to be a competent library there's only going to be one
2020-09-20 12:55:29 +0200 <random> cheater: yeah but it relies on a C dep
2020-09-20 12:55:34 +0200 <random> we're in AWS Lambda so that hurts
2020-09-20 12:55:42 +0200 <random> I'll fix it of course, just found it weird
2020-09-20 12:55:43 +0200 <Rembane> random: Dashes! Why?! <- rhetorical question
2020-09-20 12:55:46 +0200 <cheater> that's pretty tough
2020-09-20 12:55:47 +0200 <cheater> sorry
2020-09-20 12:56:20 +0200 <random> alright, putting on my devops gloves
2020-09-20 12:56:25 +0200 <random> wish me luck guys *cries*
2020-09-20 12:58:40 +0200 <Rembane> random: GL HF!
2020-09-20 12:58:59 +0200random(~random@185.219.70.106) (Quit: Leaving)
2020-09-20 12:59:50 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 265 seconds)
2020-09-20 13:00:01 +0200maroloccio(~marolocci@2a02:8084:601d:7f80:164f:8aff:fed8:411d) (Quit: WeeChat 2.3)
2020-09-20 13:00:19 +0200 <edwardk> Forgive me, father, for I have sinned. It has been 33 years since my last confession. I used an overlapping instance, and looked lustfully upon another man's type system. What is my penance?
2020-09-20 13:01:40 +0200miguel_clean(~Miguel@89-72-187-203.dynamic.chello.pl)
2020-09-20 13:04:09 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl)
2020-09-20 13:05:19 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 13:06:05 +0200phaul(~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds)
2020-09-20 13:06:23 +0200kritzefitz(~kritzefit@212.86.56.80)
2020-09-20 13:07:55 +0200phaul(~phaul@ruby/staff/phaul)
2020-09-20 13:09:08 +0200kleisli_(~kleisli@2600:1700:4640:c560:68bd:9d76:dbd8:24e7) (Quit: Leaving)
2020-09-20 13:09:16 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 13:09:26 +0200outerpassage(~outerpass@2600:1700:4640:c560:68bd:9d76:dbd8:24e7)
2020-09-20 13:10:21 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-09-20 13:11:29 +0200miguel_clean(~Miguel@89-72-187-203.dynamic.chello.pl) (Read error: Connection reset by peer)
2020-09-20 13:12:14 +0200bicho_rastrero(~cerdito@169.85-87-37.dynamic.clientes.euskaltel.es)
2020-09-20 13:13:27 +0200gpvs(~gp@37.57.178.79)
2020-09-20 13:14:05 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 13:14:08 +0200 <phadej> recite "why functional programming matters" ten times, and contribute to GHC.
2020-09-20 13:14:29 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 13:15:55 +0200 <edwardk> tough but fair
2020-09-20 13:20:25 +0200oo_miguel(~miguel@89-72-187-203.dynamic.chello.pl)
2020-09-20 13:20:26 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 246 seconds)
2020-09-20 13:20:37 +0200thc202(~thc202@unaffiliated/thc202) (Ping timeout: 265 seconds)
2020-09-20 13:21:18 +0200oo_miguel(~miguel@89-72-187-203.dynamic.chello.pl) (Client Quit)
2020-09-20 13:22:35 +0200 <gpvs> Hello. I can't make this compile:
2020-09-20 13:22:35 +0200 <gpvs> Class (Show type_self, AWord type_word) => Animal type_self where
2020-09-20 13:22:35 +0200 <gpvs> say :: type_self -> [type_word]
2020-09-20 13:22:35 +0200 <gpvs> I tried:
2020-09-20 13:22:35 +0200 <gpvs> Class Show type_self => Animal type_self where
2020-09-20 13:22:36 +0200 <gpvs> say :: AWord type_word => type_self -> [type_word]
2020-09-20 13:22:36 +0200 <gpvs> and it compiled, but then
2020-09-20 13:22:37 +0200 <gpvs> instance Animal AnimalSpecific where
2020-09-20 13:22:37 +0200 <gpvs> say (AnimalSpecific arrayOfInstancesOfAWord) = arrayOfInstanceOfAWord
2020-09-20 13:22:37 +0200gpvs(~gp@37.57.178.79) (Killed (Sigyn (Spam is off topic on freenode.)))
2020-09-20 13:23:39 +0200Amras(~Amras@unaffiliated/amras0000)
2020-09-20 13:23:48 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2020-09-20 13:23:48 +0200ChanServ+o ski
2020-09-20 13:23:53 +0200gpvs(~gp@37.57.178.79)
2020-09-20 13:23:54 +0200 <Cale> oops
2020-09-20 13:24:15 +0200 <gpvs> Hello. How do I paste multiline here not getting banned?
2020-09-20 13:24:22 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-09-20 13:24:26 +0200 <Rembane> gpvs: What error message do you get? Can you put it in a pastebin? See topic for information.
2020-09-20 13:24:33 +0200 <Rembane> gpvs: You can access topic by running the command /topic
2020-09-20 13:24:33 +0200 <Cale> try https://dpaste.com/
2020-09-20 13:24:39 +0200 <niko> ski: already lifted
2020-09-20 13:24:50 +0200ChanServ-o ski
2020-09-20 13:24:53 +0200 <ski> ok
2020-09-20 13:25:10 +0200tchouri(~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-09-20 13:25:12 +0200 <Rembane> edwardk: Was it 33 years since you used an overlapping instance last time?! :O
2020-09-20 13:25:30 +0200 <edwardk> pretty close
2020-09-20 13:25:36 +0200 <edwardk> i used one other really
2020-09-20 13:26:02 +0200 <int-e> Overlapping instances is the devil's way of leading you towards incoherent instances.
2020-09-20 13:26:03 +0200 <edwardk> but i was granted an indulgence by one of the simons, so that sin never existed to be forgiven
2020-09-20 13:26:40 +0200 <phadej> I think that my overlapped instance count is negative
2020-09-20 13:26:43 +0200hekkaidekapus(~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
2020-09-20 13:27:00 +0200 <edwardk> here i'm trying to hack around the fact that 1 + isn't injective for Nat.
2020-09-20 13:27:05 +0200 <edwardk> So I've had to get creative
2020-09-20 13:27:08 +0200 <Rembane> edwardk: Seems legit
2020-09-20 13:27:37 +0200 <edwardk> There appears to be a pattern synonym I _can't_ write without injectivity on succ, despite the fact that the GADT version typechecks, i can't emulate the GADT right.
2020-09-20 13:28:06 +0200 <Rembane> I'm probably extremely dense here, but I cannot see why 1 + isn't injective. What have I missed?
2020-09-20 13:28:20 +0200 <phadej> nobody told GHC
2020-09-20 13:28:37 +0200 <Rembane> Oh
2020-09-20 13:28:44 +0200 <edwardk> in theory if i can get the type information at just the right point so that names are in scopes maybe i can unsafeCoerce a :~~: to make the proof i need
2020-09-20 13:29:03 +0200 <edwardk> Rembane: the builtin Nat kind is crippled
2020-09-20 13:29:20 +0200 <edwardk> + only computes will fully grounded numbers
2020-09-20 13:29:32 +0200jespada(~jespada@90.254.241.6) (Quit: Sleeping)
2020-09-20 13:29:44 +0200 <Cale> At the term level, you have infinity = Succ infinity, which also messes up the injectivity of 1+
2020-09-20 13:29:48 +0200 <Rembane> edwardk: How terrible is it to uncripple it?
2020-09-20 13:29:51 +0200 <edwardk> so i wind up in situations where i need to know 0 and 1+x are disjoint, or that 1+x = 1 + y => x + y
2020-09-20 13:29:58 +0200 <Cale> er, nevermind
2020-09-20 13:30:03 +0200 <Cale> It's just a fixed point
2020-09-20 13:30:07 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 13:30:32 +0200 <phadej> I think though that GHC knows some weak version of injectivity for (+) though, as otherwise one would get a lot more ambiguous type erros
2020-09-20 13:30:36 +0200 <edwardk> Rembane: that is a ghc hq thing. nats have been terrible for several years, so i'm not holding my breath.
2020-09-20 13:30:59 +0200 <ski> gpvs : do you understand the problem you're getting ? perhaps you want to make `Animal' a MPTC, parameterized by both `type_self' and `type_word' ? do you really need to make a type class at all ?
2020-09-20 13:31:06 +0200 <Rembane> edwardk: Got it. Then I assume that it isn't "just" to e-mail a patch and hope for the best.
2020-09-20 13:31:13 +0200 <edwardk> phadej: oh? afaict all it does it leave it dangling there as a stuck type family
2020-09-20 13:31:43 +0200 <edwardk> unless the args are fully grounded out by previous applications of the magic rule for the type family
2020-09-20 13:33:18 +0200 <gpvs> ski: wait a second please, forming dpaste from another PC
2020-09-20 13:33:27 +0200gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
2020-09-20 13:33:55 +0200 <phadej> edwardk: if you write foo :: Proxy (x + y) -> Proxy x -> (); foo _ _ = () -- it is accepted
2020-09-20 13:34:21 +0200 <phadej> clearly means that (+ y) is injective.
2020-09-20 13:34:25 +0200oxide(~lambda@unaffiliated/mclaren) (Ping timeout: 264 seconds)
2020-09-20 13:34:31 +0200 <phadej> "clearly"
2020-09-20 13:34:38 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-20 13:35:22 +0200oxide(~lambda@unaffiliated/mclaren)
2020-09-20 13:35:50 +0200 <edwardk> hrmm
2020-09-20 13:36:51 +0200gehmehgeh(~ircuser1@gateway/tor-sasl/gehmehgeh)
2020-09-20 13:37:32 +0200 <edwardk> the (+) type family is weird
2020-09-20 13:37:38 +0200 <phadej> git grep -i "interaction with inerts" in GHC code
2020-09-20 13:37:49 +0200 <phadej> I just know that makes that `foo` code type-checks
2020-09-20 13:37:53 +0200Cale(~cale@CPEf48e38ee8583-CM0c473de9d680.cpe.net.cable.rogers.com) (Ping timeout: 272 seconds)
2020-09-20 13:38:09 +0200 <phadej> but how, ask someone else
2020-09-20 13:38:22 +0200 <phadej> (e.g. why it doesn't make partially applied + injective)
2020-09-20 13:38:51 +0200Turmfalke(~user@unaffiliated/siracusa) (Quit: Bye!)
2020-09-20 13:38:56 +0200 <phadej> but yes, wired-in magic type-families are weird.
2020-09-20 13:39:05 +0200 <edwardk> the fact that + has some kind of privileged f'd up position explains a bit of how i get errors with it i can't get elsewhere
2020-09-20 13:39:10 +0200dddddd_(~dddddd@unaffiliated/dddddd)
2020-09-20 13:39:15 +0200NieDzejkob(~quassel@188.123.215.55) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2020-09-20 13:39:31 +0200 <phadej> re ground terms
2020-09-20 13:39:40 +0200 <phadej> 5 + n ~ 8 does simplify to n ~ 3
2020-09-20 13:39:49 +0200 <gpvs> I seek to explain to GHC that I want a Class. Class's requirement has a function. Function's "return" type must be instance of another specific Class. Here is what I tried and errors I got: dpaste.com/FTAG9S4MQ , dpaste.com/EG5RM5HXY
2020-09-20 13:40:03 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
2020-09-20 13:40:24 +0200 <edwardk> yet it can't figure out 1 + n ~ 1 + m => n ~ m
2020-09-20 13:40:29 +0200 <phadej> no
2020-09-20 13:40:34 +0200 <phadej> nobody told it *that* :)
2020-09-20 13:40:42 +0200 <phadej> there isn't ring-solver in GHC
2020-09-20 13:40:53 +0200 <phadej> (it's available as a plugin)
2020-09-20 13:41:09 +0200 <phadej> https://hackage.haskell.org/package/ghc-typelits-natnormalise
2020-09-20 13:41:12 +0200 <edwardk> yeah
2020-09-20 13:41:25 +0200 <edwardk> was going to try the natnormalize plugin to see if i could use it to compile the pattern i need
2020-09-20 13:41:37 +0200dddddd(~dddddd@unaffiliated/dddddd) (Ping timeout: 264 seconds)
2020-09-20 13:41:58 +0200 <phadej> I guess Christiaan would appreaciate if you tell him that *it works for you* ;)
2020-09-20 13:42:09 +0200NieDzejkob(~quassel@188.123.215.55)
2020-09-20 13:42:28 +0200 <ski> gpvs : so you want to associate each `type_self', that you make an instance for, with a particular `type_word'
2020-09-20 13:42:54 +0200 <edwardk> let me add the example i'm fighting with to the repo
2020-09-20 13:43:05 +0200utopic_int0x80(~lucid_0x8@188.253.237.87)
2020-09-20 13:44:17 +0200 <gpvs> ski: If I got you correctly: I may, but where is no need to. AWord is good enough abstraction for Animal-s to work with, there is no need to bind particular animals to particular words
2020-09-20 13:44:29 +0200 <kicov> Got a few cpsy + liquid haskell examples: https://dpaste.com/3YX484ND7 and https://dpaste.com/FHMQ5DZ44 - just wondering how both examples could work using single cpsy annotation.
2020-09-20 13:44:41 +0200 <gpvs> ski: and if I must to associate it, how would I do that?
2020-09-20 13:44:46 +0200 <edwardk> oh weeee, more regressions
2020-09-20 13:44:47 +0200alx741(~alx741@186.178.110.2) (Ping timeout: 265 seconds)
2020-09-20 13:45:42 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 13:45:42 +0200 <ski> gpvs : so you definitely don't want the `class Show type_self => Animal type_self where say :: AWord type_word => type_self -> [type_word]' version, since it means that if you pass a `AnimalSpecific' to `say', then `say' will have to be able to compute a list of `type_word's for any instance of `AWord' `type_word', that the caller wants, not just for the `AWordDog' instance
2020-09-20 13:45:47 +0200 <edwardk> phadej: https://github.com/ekmett/haskell/tree/master/types is the project in question
2020-09-20 13:45:47 +0200lucid_0x80(~lucid_0x8@188.253.232.248) (Ping timeout: 258 seconds)
2020-09-20 13:46:10 +0200 <edwardk> if i compile with -f-injectiveSucc then examples/Vec.hs goes to hell
2020-09-20 13:46:53 +0200 <ski> gpvs : so, it seems you either want an existential (but i suspect you don't actually want that here), or else you want to make `type_word' an additional parameter of `Animal' (possibly with a Functional Dependency)
2020-09-20 13:47:04 +0200 <gpvs> ski: oh, now I got it. Any reason first approach should not work?
2020-09-20 13:47:05 +0200 <edwardk> you may need to disable the construction of the SingI instances in Data.Type.Internal.TH as well here https://github.com/ekmett/haskell/blob/master/types/src/Data/Type/Internal/TH.hs#L122
2020-09-20 13:47:14 +0200 <ski> gpvs : hmm
2020-09-20 13:47:46 +0200 <edwardk> but if i write a manual data type that does it rather than emulate a GADT with my pattern synonym i can make it work *headdesk*
2020-09-20 13:48:05 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-20 13:48:19 +0200 <ski> gpvs : "AWord is good enough abstraction for Animal-s to work with, there is no need to bind particular animals to particular words" -- but you just tried to associate `AnimalSpecific', not to arbitrary instances of `AWord', but specifically to `AWordDog'
2020-09-20 13:48:24 +0200 <edwardk> but i can't have the actual data type because i need a homogeneous representation for my singletons or i lose a huge performance tax.
2020-09-20 13:48:51 +0200 <ski> gpvs : that is, your implementation of `say' tried to do that
2020-09-20 13:49:00 +0200 <phadej> edwardk: I only understood "right and slow vs. doesn't work fast"
2020-09-20 13:49:09 +0200 <gpvs> ski: what's existential? could you provide a link or googling term please? I'm truing two avoid making type_word a parameter to Animal not to bind them
2020-09-20 13:49:21 +0200 <edwardk> the cost is linear vs O(1)
2020-09-20 13:49:30 +0200 <edwardk> i have hacked around every other obstacle in the way
2020-09-20 13:49:38 +0200 <edwardk> this is the last farking leg
2020-09-20 13:49:55 +0200Cale(~cale@99.253.130.57)
2020-09-20 13:50:12 +0200 <ski> gpvs : do you want to require `say' to return a list of `type_word's, for some `type_word' that's an instance of `AWord' (but each `say' implementation should be allowed to pick which such `type_word' it wants) ?
2020-09-20 13:50:42 +0200shad0w_(~shad0w_@160.202.36.27) (Remote host closed the connection)
2020-09-20 13:50:44 +0200 <edwardk> in the process i dragged the Nat kind and hacked it to work like Natural as a type (which will just work when ghc does it for real), hacked Type to look like TypeRep, hacked Symbol to look like String, used stuck data families to get me ways to use Int and Char meaningfully as kinds.
2020-09-20 13:50:57 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 13:51:00 +0200 <edwardk> and came up with a way to get constant time singletons
2020-09-20 13:51:13 +0200 <edwardk> which works for everything except when my singleton gets fancy enough
2020-09-20 13:51:17 +0200 <edwardk> and Nat is involved
2020-09-20 13:51:20 +0200 <edwardk> because Nat is awful
2020-09-20 13:51:30 +0200 <gpvs> ski: exactly. Any Animal's 'say' may return *any* value which is instance of AWord
2020-09-20 13:51:40 +0200 <gpvs> ski: * a list
2020-09-20 13:51:45 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 240 seconds)
2020-09-20 13:52:20 +0200 <ski> gpvs : could different elements of the list be of different types `type_word', provided all are instances of `AWord' ? or should all elements in the list be of the same type `type_word' ?
2020-09-20 13:53:10 +0200 <gpvs> ski: I don't have requirement for/against it at the moment. could you please provide both verions?
2020-09-20 13:53:19 +0200 <edwardk> phadej: that said, i really like using Type as Typeable.TypeRep. and then Type.Reflection.TypeRep becomes its singleton
2020-09-20 13:53:40 +0200 <edwardk> very pretty code results
2020-09-20 13:54:41 +0200dddddd_dddddd
2020-09-20 13:54:48 +0200Raito_Bezarius(~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Remote host closed the connection)
2020-09-20 13:54:59 +0200Raito_Bezarius(~Raito_Bez@2001:bc8:38ee::1)
2020-09-20 13:55:02 +0200 <ski> gpvs : hm, let's consider alternatives, and what they would mean
2020-09-20 13:55:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2020-09-20 13:55:31 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 13:55:35 +0200 <Cale> I'm pretty sure from the looks of the code that made it into the channel that gpvs wants a fundep
2020-09-20 13:55:46 +0200 <Cale> But maybe I missed something
2020-09-20 13:55:49 +0200sfvm(~sfvm@37.228.215.148) (Quit: off to the basement, mixing up the medicine)
2020-09-20 13:55:54 +0200Raito_Bezarius(~Raito_Bez@2001:bc8:38ee::1) (Changing host)
2020-09-20 13:55:54 +0200Raito_Bezarius(~Raito_Bez@unaffiliated/raito-bezarius/x-8764578)
2020-09-20 13:56:04 +0200 <ski> gpvs : `class Show type_self => Animal type_self where say :: AWord type_word => type_self -> [type_word]' means that the caller of `say' will decide which `type_word' to pick, can pick any, as long as its an instance of `AWord'. and you said you don't want that
2020-09-20 13:56:15 +0200roconnor(~roconnor@host-45-78-255-115.dyn.295.ca)
2020-09-20 13:56:26 +0200Unhammer(~Unhammer@gateway/tor-sasl/unhammer)
2020-09-20 13:56:42 +0200 <Cale> gpvs: The type of the result should depend on the type of the input, right?
2020-09-20 13:57:04 +0200alx741(~alx741@186.178.110.130)
2020-09-20 13:57:20 +0200Raito_Bezarius(~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Read error: Connection reset by peer)
2020-09-20 13:57:27 +0200priyesh(~priyesh@84.39.117.57) (Remote host closed the connection)
2020-09-20 13:57:33 +0200Raito_Bezarius(~Raito_Bez@2001:bc8:38ee::1)
2020-09-20 13:57:37 +0200 <edwardk> looks like ghc-typelits-natnormalise isn't able to help solve the 1 + n ~ 1 + m ==> n ~ m problem
2020-09-20 13:57:56 +0200 <edwardk> i get the same issue with the plugin enabled
2020-09-20 13:58:28 +0200 <gpvs> ski: I don't want the rigid return type to be defined at type instantiation moment. I'm interesting in both version where return type is define on call or by implementation itself
2020-09-20 13:58:39 +0200 <Cale> edwardk: Can you use unsafeCoerce to get yourself out of that?
2020-09-20 13:58:41 +0200 <edwardk> the problem is that i'm neck deep in a pattern synonym at the time it happens and can't. really get both n and m in type in scope to unsafeCoerce my way to glory
2020-09-20 13:58:43 +0200 <ski> gpvs : `class (Show type_self, AWord type_word) => Animal type_self where say :: type_self -> [type_word]' means that you have associations between particular `type_self's and particular `type_word'. so, for a particular `type_self', you don't need to have all possible instances `type_word' of `AWord' to consider. you could just have some of them, if you'd like to. also, you could enforce it to be at most one `type_word', if you'd want to
2020-09-20 13:58:55 +0200 <Cale> ahh
2020-09-20 13:58:56 +0200Raito_Bezarius(~Raito_Bez@2001:bc8:38ee::1) (Client Quit)
2020-09-20 13:58:58 +0200 <edwardk> i've been trying ever more esoteric dances to make that work
2020-09-20 13:59:07 +0200Raito_Bezarius(~Raito_Bez@unaffiliated/raito-bezarius/x-8764578)
2020-09-20 13:59:25 +0200 <Cale> Pattern synonyms are jankier than I ever imagined they might be
2020-09-20 13:59:31 +0200 <gpvs> Cale: optionaly, but I don't want to bind Animal instances to particular AWord-s instances
2020-09-20 13:59:45 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
2020-09-20 13:59:59 +0200 <edwardk> https://github.com/ekmett/haskell/blob/master/types/example/Vec.hs#L49 the issue is it can't figure out ys is well typed there.
2020-09-20 14:00:14 +0200Raito_Bezarius(~Raito_Bez@unaffiliated/raito-bezarius/x-8764578) (Read error: Connection reset by peer)
2020-09-20 14:00:23 +0200 <Cale> gpvs: Maybe the solution is just a simple two parameter type class then
2020-09-20 14:00:32 +0200Raito_Bezarius(~Raito_Bez@unaffiliated/raito-bezarius/x-8764578)
2020-09-20 14:00:38 +0200 <edwardk> there is another issue involving the SingI instance but i can hack around that by moving the type synonym around
2020-09-20 14:00:49 +0200 <Cale> gpvs: Though, that won't be terribly *convenient* since you'll probably have to annotate the type of the result a lot, given that it can't be determined by the type of the input
2020-09-20 14:00:58 +0200 <edwardk> Cale: i'm doing evil things in there
2020-09-20 14:01:27 +0200 <ski> gpvs : the last option is existentials, which here would be either `class Show type_self => Animal type_self where say :: type_self -> exists type_word. AWord type_word *> [type_word]' or `class Show type_self => Animal type_self where say :: type_self -> [exists type_word. AWord type_word *> type_word]'. both of these will allow the choice of `type_word' to depend on the run-time input to `say' (if you don't want that, that could be corrected)
2020-09-20 14:01:27 +0200 <edwardk> Cale: in particular i'm emulating GADTs on a non GADT using pattern synonyms and another GADT as a helper to sort of scaffold all the equalities i need
2020-09-20 14:01:40 +0200 <gpvs> Cale: resulting types will bind particula Animals to particular Words then, wouldn't they?
2020-09-20 14:01:43 +0200 <ski> (er, possibly cut off part was "(if you don't want that, that could be corrected)")
2020-09-20 14:01:44 +0200 <edwardk> the scaffolding GADT is just unsafeCoerced to offer what i need
2020-09-20 14:02:15 +0200kicov(959c7c03@nat.ds3.agh.edu.pl) (Remote host closed the connection)
2020-09-20 14:02:28 +0200 <gpvs> Cale: I've just read what fundeps are and I believe it's not what I want
2020-09-20 14:02:35 +0200wei2912(~wei2912@unaffiliated/wei2912) (Quit: Lost terminal)
2020-09-20 14:02:41 +0200mirrorbird(~psutcliff@2a00:801:44a:a00b:20c3:c64:eb15:73a2)
2020-09-20 14:03:39 +0200 <edwardk> pattern SVCons :: forall k (n :: Nat) (r :: Vec k (1 + n)). () => forall (x :: k) (xs :: Vec k n). r ~ 'VCons x xs => Sing x -> Sing xs -> Sing r; pattern SVCons y ys <- ( upSVec -> SVCons' y ys) where SVCons (Sing y) (Sing ys) = UnsafeSing (VCons y ys); should basically faithfully emulate the GADT constructor that it delegates down to for proof
2020-09-20 14:03:47 +0200 <Cale> gpvs: It would mean that, say, given that you have a list of Cats as input, then the type of words that Cats produce would be determined by the fact that they are Cats
2020-09-20 14:04:00 +0200 <Cale> For example, maybe Cats produce Text
2020-09-20 14:04:03 +0200 <edwardk> upSVec casts from Sing x -> SVec' x
2020-09-20 14:04:07 +0200 <gpvs> ski: "means that the caller of `say' will decide which `type_word' to pick, can pick any" how do I express it in Haskell from the callers perspective?
2020-09-20 14:04:14 +0200 <edwardk> but the constructor for SVec' is well typed and happy
2020-09-20 14:04:29 +0200 <edwardk> i just can't figure out the right way to pass through the lesson from SVec' to Sing
2020-09-20 14:04:36 +0200 <Cale> gpvs: That's just the two-parameter class with no functional dependencies
2020-09-20 14:04:37 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550)
2020-09-20 14:04:43 +0200 <edwardk> when it matches it learns a heterogeneous type equality
2020-09-20 14:04:52 +0200DavidEichmann(~david@43.240.198.146.dyn.plus.net) (Ping timeout: 246 seconds)
2020-09-20 14:05:07 +0200 <Cale> gpvs: and you can write type annotations like (say cats :: [Text]) to determine the type of result then
2020-09-20 14:05:24 +0200 <Cale> (or if it's determined by how the result is used, that's also fine
2020-09-20 14:05:26 +0200 <Cale> )
2020-09-20 14:05:27 +0200 <ski> gpvs : that option was already expressed in Haskell. i dunno what you mean by "from the callers perspective" (i was already talking there about it being the caller who got to pick `type_word' there)
2020-09-20 14:05:27 +0200 <edwardk> that the output type is carrying an argument of kind Vec k (S n) relative to Vec k n for the inside argument to the vector.
2020-09-20 14:07:47 +0200 <edwardk> -- just works (S n = 1 + n as a type synonym, Z = 0) -- so now what i want is a pattern synonym as a next step that just basically wraps SVCons0 https://www.irccloud.com/pastebin/j3dAUDko/svec0
2020-09-20 14:07:58 +0200hackagebinaryen 0.0.4.0 - Haskell bindings to binaryen https://hackage.haskell.org/package/binaryen-0.0.4.0 (terrorjack)
2020-09-20 14:08:01 +0200rprije(~rprije@27.143.220.203.dial.dynamic.acc01-myal-dub.comindico.com.au) (Ping timeout: 258 seconds)
2020-09-20 14:08:03 +0200p-core(~Thunderbi@koleje-wifi-0046.koleje.cuni.cz) (Quit: p-core)
2020-09-20 14:08:18 +0200 <edwardk> if that data type didn't type check this wouldn't be so infuriating
2020-09-20 14:08:23 +0200 <edwardk> because i'd know it was impossible
2020-09-20 14:08:25 +0200p-core(~Thunderbi@koleje-wifi-0046.koleje.cuni.cz)
2020-09-20 14:08:27 +0200 <gpvs> ski: `class Show type_self => Animal type_self where say :: AWord type_word => type_self -> [type_word]' I got error trying to compile it. It's in https://dpaste.com/EG5RM5HXY . Did I missed some required extensions?
2020-09-20 14:08:29 +0200 <edwardk> but that is just hunky dory
2020-09-20 14:08:45 +0200 <Cale> edwardk: hmm, think I'll have to fire up ghci here... :)
2020-09-20 14:10:15 +0200 <gpvs> ski: this `class (Show type_self, AWord type_word) => Animal type_self where say :: type_self -> [type_word]' got me compile error too. https://dpaste.com/FTAG9S4MQ
2020-09-20 14:10:16 +0200 <ski> gpvs : no, your `say' implementation doesn't satisfy that type signature
2020-09-20 14:10:34 +0200 <ski> (the `say :: AWord type_word => type_self -> [type_word]' one, i mean)
2020-09-20 14:11:03 +0200 <Cale> gpvs: You need another parameter on the class there
2020-09-20 14:11:29 +0200 <Cale> gpvs: class (Show s, AWord w) => Animal s w where say :: [s] -> [w]
2020-09-20 14:11:30 +0200 <ski> gpvs : oh, sorry. the middle alternative should have been `class (Show type_self, AWord type_word) => Animal type_self type_word where say :: type_self -> [type_word]' .. iow MPTC
2020-09-20 14:11:44 +0200 <ski> Cale : no list input
2020-09-20 14:11:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 14:12:07 +0200 <Cale> oh
2020-09-20 14:12:08 +0200p-core(~Thunderbi@koleje-wifi-0046.koleje.cuni.cz) (Client Quit)
2020-09-20 14:12:09 +0200 <Cale> okay
2020-09-20 14:12:17 +0200 <Cale> yeah, just s -> [w] in that case
2020-09-20 14:13:28 +0200 <ski> gpvs : anyway, perhaps we should first try to determine what you want, before diving into the how ?
2020-09-20 14:13:40 +0200 <edwardk> Cale: i have it boiled down to one file now
2020-09-20 14:14:08 +0200 <edwardk> https://www.irccloud.com/pastebin/KHWDco0s/BrokenVec.hs
2020-09-20 14:14:23 +0200 <edwardk> that is standalone and doesn't need the types library i'm writing
2020-09-20 14:14:45 +0200 <Cale> ah, cool
2020-09-20 14:15:31 +0200 <gpvs> Cale, ski: ok, as far as I can see to get a uniform list of instances I *must* bind types like with multiparam class. What about getting a non-uniform list? Like when Cat can say [WordType0, WordType2].
2020-09-20 14:15:57 +0200 <Cale> gpvs: Well, what do those word types have in common? What are you going to do with the resulting list?
2020-09-20 14:16:19 +0200 <ski> gpvs : you could do that, too, with existentials
2020-09-20 14:16:22 +0200 <gpvs> ski: I want something like returning an array of objects confirming to interface in OO-kind stuff
2020-09-20 14:16:27 +0200 <Cale> gpvs: You can think of a type as representing permissions to use the corresponding values in particular ways. If you don't know what type something is, it becomes impossible to observe
2020-09-20 14:16:27 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-20 14:16:36 +0200 <ski> gpvs : yea, that sounds like existentials
2020-09-20 14:16:37 +0200PropositionJoe(~ConJoe@cm-84.215.192.230.getinternet.no)
2020-09-20 14:16:49 +0200 <gpvs> Cale: those word types all are instances of AWord class
2020-09-20 14:16:53 +0200 <ski> gpvs : however, often this is not a good idea / overkill. but you can do it
2020-09-20 14:16:53 +0200 <PropositionJoe> Why do I have to write "`div`" instead of just div?
2020-09-20 14:17:04 +0200 <Cale> Yeah, existentials give you one way to discard information about what type of thing you have
2020-09-20 14:17:11 +0200 <ski> > div 18 7 -- PropositionJoe
2020-09-20 14:17:14 +0200 <lambdabot> 2
2020-09-20 14:17:14 +0200 <edwardk> > div 4 3
2020-09-20 14:17:17 +0200 <lambdabot> 1
2020-09-20 14:17:18 +0200 <edwardk> works for me
2020-09-20 14:17:21 +0200suppi(~suppi@2605:f700:40:c00::e6fc:6842) (Ping timeout: 244 seconds)
2020-09-20 14:17:31 +0200 <PropositionJoe> so div is prefix "`div`" is infix?
2020-09-20 14:17:34 +0200 <ski> yep
2020-09-20 14:17:35 +0200 <Cale> data SomeWord where MkSomeWord :: AWord w => w -> SomeWord
2020-09-20 14:17:37 +0200kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-09-20 14:17:40 +0200 <PropositionJoe> thanks ski
2020-09-20 14:17:48 +0200 <edwardk> putting backticks on makes anything infix
2020-09-20 14:17:49 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 14:17:50 +0200 <ski> PropositionJoe : works for any identifier
2020-09-20 14:17:51 +0200 <Cale> (that uses the GADTs extension)
2020-09-20 14:17:53 +0200vicfred(~vicfred@unaffiliated/vicfred) (Remote host closed the connection)
2020-09-20 14:18:20 +0200vicfred(~vicfred@unaffiliated/vicfred)
2020-09-20 14:19:41 +0200 <ski> gpvs : `AWord' class currently has no methods (and no superclasses). so `exists type_word. AWord type_word *> ..type_word..' is kind of pointless, you can't get any information out. but perhaps your shown `AWord' was a mockup, and you'll actually have useful methods or superclasses ?
2020-09-20 14:21:02 +0200 <Cale> gpvs: In my example, applying the MkSomeWord data constructor to a value whose type w is an instance of AWord will result in forgetting everything about which type w was, except that it had an instance of AWord, and then the only things you'll be allowed to do with the value when you get it out will be things you could do with any unknown instance of AWord
2020-09-20 14:21:07 +0200 <ski> gpvs : "I want something like returning an array of objects confirming to interface in OO-kind stuff" -- do you actually need that ? how are you going to use the result of calls to `say' ? (Cale's question)
2020-09-20 14:21:38 +0200 <gpvs> Cale, ski: looks like downcasting to me. Seems like I getting closer. I understand it doesn't make a lot sense in Haskell, just trying of how far it can extend. Yes, AWord is a mockup
2020-09-20 14:21:44 +0200 <Cale> If you want to be more like OO, it might be more sensible just to make object types which correspond to whatever your classes would have been
2020-09-20 14:21:58 +0200fulc927(~fulc927@unaffiliated/fulc927)
2020-09-20 14:22:01 +0200Rudd0(~Rudd0@185.189.115.108) (Ping timeout: 246 seconds)
2020-09-20 14:22:02 +0200 <ski> gpvs : there is no downcasting in Haskell, really
2020-09-20 14:22:04 +0200 <Cale> Don't try to use Haskell classes as OO classes, they're not the same thing
2020-09-20 14:22:29 +0200 <Cale> Instances of OO classes are values, instances of Haskell classes are types.
2020-09-20 14:22:30 +0200 <gpvs> ski: yes, I sayed that making a parallel to what it would be for me in OO
2020-09-20 14:22:32 +0200 <ski> gpvs : and how would you use downcasting, anyway ? test for particular types ? why not use a sum type ?
2020-09-20 14:22:45 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-20 14:22:58 +0200ystael(~ystael@209.6.50.55) (Ping timeout: 265 seconds)
2020-09-20 14:23:05 +0200 <Cale> Haskell classes are a good bit like interfaces though
2020-09-20 14:23:15 +0200tchourihekkaidekapus
2020-09-20 14:23:17 +0200 <Cale> But usually it makes more sense not to start from there
2020-09-20 14:23:21 +0200ericsagnes(~ericsagne@2405:6580:0:5100:2032:8cd9:bb36:4db2) (Ping timeout: 246 seconds)
2020-09-20 14:23:40 +0200 <Cale> What methods were you going to put in the AWord class?
2020-09-20 14:23:41 +0200 <ski> gpvs : if `AWord' is beefy enough for you to be able to do something sensible with values of an unknown type `type_word' that's an instance of `AWord', then existentials start to make more sense
2020-09-20 14:23:50 +0200 <gpvs> ski, Cale: "data SomeWord where MkSomeWord :: AWord w => w -> SomeWord" ok, maybe 'downcasting' is not the best term. Let me call it 'specialization' then.
2020-09-20 14:24:42 +0200 <gpvs> ski: yes, AWord in dpaste is a mockup
2020-09-20 14:24:47 +0200suppi(~suppi@2605:f700:40:c00::e6fc:6842)
2020-09-20 14:24:50 +0200 <ski> yea, i got that
2020-09-20 14:25:06 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-09-20 14:25:06 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 14:25:28 +0200 <ski> gpvs : by "downcasting" i meant being able to do e.g. `toAWordDog :: AWord w => w -> Maybe AWordDog'
2020-09-20 14:25:47 +0200shatriff(~vitaliish@176.52.219.10)
2020-09-20 14:25:48 +0200 <gpvs> Cale: I will not try to do OO with Haskell, pinkie-promise! :) Just looking at cases while learning.
2020-09-20 14:25:54 +0200 <ski> gpvs : that is the kind of thing you had in mind, yes ?
2020-09-20 14:26:57 +0200 <gpvs> ski: nodes of graph of different types and constructs which can reference each other regardless, relying on fact that all of them confirm to the basic interface
2020-09-20 14:27:25 +0200 <ski> gpvs : which question is that an answer to ?
2020-09-20 14:27:58 +0200 <ski> (it doesn't seem to obviously be about how to use downcasts, e.g.)
2020-09-20 14:28:55 +0200 <Cale> gpvs: Well, I think doing OO with Haskell can be quite good in some cases. The encoding, if you do it right, is indistinguishable from ordinary functional programming. You have first class functions and you have record types. Put those together, and you can make records of methods which can be defined differently for each value you construct.
2020-09-20 14:29:06 +0200 <ski> Cale : although you call interface methods on an object :)
2020-09-20 14:29:14 +0200 <Cale> gpvs: i.e. you don't need subclasses to override method implementations
2020-09-20 14:29:24 +0200 <Cale> (which is good, since you don't have subclasses)
2020-09-20 14:29:55 +0200 <gpvs> ski: I misread 'that' as 'what', sorry. It seems like that. Have to research existentials and try in ghc.
2020-09-20 14:30:13 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 264 seconds)
2020-09-20 14:30:15 +0200 <Cale> I would honestly avoid existentials initially
2020-09-20 14:30:26 +0200 <Cale> Most of the time, you won't really need them
2020-09-20 14:30:37 +0200 <ski> @where existential-antipattern
2020-09-20 14:30:37 +0200 <lambdabot> "Haskell Antipattern: Existential Typeclass" by Luke Palmer at <http://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/>
2020-09-20 14:31:36 +0200 <gpvs> ski, Cale: thank you for your help! Will research existentials and try them for my case, just to know it's there. If you wondering, the original idea was "nodes of graph of different types and constructs which can reference each other regardless, relying on fact that all of them confirm to the basic interface"
2020-09-20 14:31:36 +0200 <Cale> gpvs: The important question to think about first is "what am I allowed to do with these things?" -- if you can figure out all the things you're allowed to do with a thing, then one of the ways of defining its type is just as a collection of the results of those operations
2020-09-20 14:31:39 +0200 <ski> gpvs : if we saw the actual `AWord' class, or if you told how you were going to use the results of `say', or both, we might be able to give better advice
2020-09-20 14:32:35 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 14:32:41 +0200 <ski> gpvs : that's a pretty vague, non-committal description
2020-09-20 14:33:01 +0200 <gpvs> lamdabot: thanks for the link
2020-09-20 14:34:05 +0200 <ski> gpvs : (a) often you don't want/need OO-style things; (b) if you do, ordinary lexical scoping with records commonly suffice; (c) sometimes existentials may be required
2020-09-20 14:34:30 +0200 <bicho_rastrero> I'm learning haskell and I saw this syntax in a function "merge list1@(x: xs) list2@(y : ys)", what is the name of the @ operator there? How is that structure named?
2020-09-20 14:34:36 +0200 <ski> gpvs : you should probably not reach for existentials, unless you really need them
2020-09-20 14:35:25 +0200 <ski> bicho_rastrero : "as-patterns"
2020-09-20 14:35:30 +0200 <gpvs> ski: part I stumbled on is the last part of description. Any type of class node should be able to return a list of nodes it's connected to, these nodes might be of different types, but of the same base class.
2020-09-20 14:35:48 +0200 <bicho_rastrero> Thank you, ski
2020-09-20 14:36:12 +0200ericsagnes(~ericsagne@2405:6580:0:5100:59cb:4e8f:c201:4e04)
2020-09-20 14:36:16 +0200 <ski> bicho_rastrero : it's both giving a name to the whole input, and simultaneously matching it with a pattern, so that you can check its shape, and name parts
2020-09-20 14:36:26 +0200carif(~mcarifio@cpe-67-246-228-200.rochester.res.rr.com) (Quit: Leaving)
2020-09-20 14:37:00 +0200 <bicho_rastrero> Yeah, that was my understanding, but I wanted to read an proper explanation with more examples. Thanks.
2020-09-20 14:37:04 +0200 <ski> gpvs : yea, it sounds like you could possibly do that with just (b)
2020-09-20 14:37:17 +0200 <ski> (depending on the specifics of what you want to do with them)
2020-09-20 14:37:23 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 14:37:31 +0200 <ski> gpvs : iow the record-of-operations that Cale mentioned
2020-09-20 14:39:01 +0200utopic_int0x80(~lucid_0x8@188.253.237.87) (Ping timeout: 260 seconds)
2020-09-20 14:39:08 +0200drbean(~drbean@TC210-63-209-85.static.apol.com.tw)
2020-09-20 14:40:02 +0200ukari(~ukari@unaffiliated/ukari)
2020-09-20 14:42:28 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net)
2020-09-20 14:42:54 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-09-20 14:44:15 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-09-20 14:44:27 +0200 <Cale> edwardk: Ah, so annoying to try to get these n1 and n2 in scope...
2020-09-20 14:44:35 +0200 <edwardk> exactly!
2020-09-20 14:44:35 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-09-20 14:44:40 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Client Quit)
2020-09-20 14:45:06 +0200 <Cale> It's not even syntactically permitted to write something like pattern SVCons y (ys :: ...)
2020-09-20 14:45:13 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net)
2020-09-20 14:45:19 +0200bitmagie(~Thunderbi@200116b8062b2e00fc59d02ac7bcf06a.dip.versatel-1u1.de)
2020-09-20 14:46:44 +0200 <edwardk> i fought with writing (\x -> case upSNat x of ... -> (sometypeequality,y,ys) ) -> (Refl,y,ys))
2020-09-20 14:46:52 +0200 <edwardk> for the viewpattern
2020-09-20 14:47:00 +0200 <edwardk> but that didn't move the needle much
2020-09-20 14:47:26 +0200 <edwardk> if S is replaced with data family S :: Nat -> k -- this just works
2020-09-20 14:47:44 +0200 <edwardk> but then i'm adding exotic types to kind Nat
2020-09-20 14:47:47 +0200 <Cale> I wrote this thing: onePlusInj :: forall n m r. ((1+n) ~ (1+m)) => (n ~ m => r) -> r but of course, I need to disambiguate which types I want to use it with
2020-09-20 14:47:55 +0200 <edwardk> yeah
2020-09-20 14:47:58 +0200 <edwardk> did the same
2020-09-20 14:48:02 +0200 <Cale> The idea being that maybe we can stick it in using a view pattern
2020-09-20 14:48:17 +0200 <edwardk> thats the sort of thing the scenario above tried to use
2020-09-20 14:48:18 +0200coot(~coot@37.30.55.202.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 272 seconds)
2020-09-20 14:48:25 +0200 <Cale> yeah, I see
2020-09-20 14:48:26 +0200 <Cale> hmm
2020-09-20 14:48:27 +0200 <edwardk> the someTypeEquality thing there can be a refl built
2020-09-20 14:48:41 +0200 <edwardk> and in there i can see x and the types of y and ys
2020-09-20 14:48:54 +0200 <edwardk> before i return them out to the surrounding context
2020-09-20 14:50:18 +0200kicov(959c7c03@nat.ds3.agh.edu.pl)
2020-09-20 14:51:41 +0200 <kicov> Hi, one more question about liquid haskell : are annotation such as `function :: f:(Int -> Int) -> {ret : Int | f ret == 0}` possible, or is something similiar also possible ?
2020-09-20 14:51:55 +0200 <Cale> btw, I love the super janky required () => in the type of the pattern synonym
2020-09-20 14:52:09 +0200 <Cale> It inspires so much confidence in GHC
2020-09-20 14:52:48 +0200 <edwardk> i also run into problems when i go to write the SingI instance. morally its instance (SingI a, SingI b) => SingI ('VCons a b) -- but the argumentthere has a type synonym in it!
2020-09-20 14:53:18 +0200 <edwardk> which prevents me from hanging the instance
2020-09-20 14:53:19 +0200 <Cale> I wonder... can we bind (kind/type) variables in the pattern's type signature? Does that work?
2020-09-20 14:53:26 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 14:53:32 +0200 <edwardk> oh let me give you a longer worked version
2020-09-20 14:53:46 +0200 <edwardk> yes
2020-09-20 14:54:19 +0200 <edwardk> forall variables. (context needed to call the pattern) => forall more variables (stuff you learn by binding the pattern) => pattern args -> pattern result
2020-09-20 14:54:30 +0200 <edwardk> the two context thing is deliberate
2020-09-20 14:54:33 +0200 <edwardk> it was the chosen syntax
2020-09-20 14:54:39 +0200 <edwardk> by ghc ghc
2020-09-20 14:54:41 +0200 <edwardk> er ghc hq
2020-09-20 14:54:57 +0200hackageinline-c 0.9.1.1 - Write Haskell source files including C code inline. No FFI required. https://hackage.haskell.org/package/inline-c-0.9.1.1 (FrancescoMazzoli)
2020-09-20 14:55:17 +0200 <edwardk> to disambiguate between what you need to call the pattern (like fromjson, tojson, etc.) and what you learn by matching. (like GADT existential args)
2020-09-20 14:55:33 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz)
2020-09-20 14:56:19 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:118d:2a8:7881:1f11)
2020-09-20 14:56:40 +0200utopic_int0x80(~lucid_0x8@188.253.237.87)
2020-09-20 14:57:56 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-20 14:58:25 +0200 <gpvs> lambdabot: <https://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/> yeah, this actually made sense for me once I recalled there is currying
2020-09-20 14:58:34 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 14:58:39 +0200 <gpvs> ski, Cale, lamdabot: thank you for your help!
2020-09-20 14:58:40 +0200ystael(~ystael@209.6.50.55)
2020-09-20 14:58:59 +0200gpvs(~gp@37.57.178.79) (Quit: Leaving.)
2020-09-20 15:00:58 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 272 seconds)
2020-09-20 15:01:47 +0200ph88^(~ph88@ip5f5af726.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
2020-09-20 15:03:19 +0200fiQ2(~fiQ@mirkk.ninja) (Ping timeout: 246 seconds)
2020-09-20 15:04:02 +0200laxask(~lax@unaffiliated/laxask) (Ping timeout: 246 seconds)
2020-09-20 15:04:35 +0200skisuspects gpvs meant "partial application"
2020-09-20 15:08:28 +0200 <Cale> edwardk: I got... something... to compile
2020-09-20 15:08:43 +0200 <Cale> I'm not sure if it's not just completely fucked, one sec :D
2020-09-20 15:08:43 +0200 <edwardk> i have a few versions that compile, but none that learn when they match
2020-09-20 15:08:54 +0200henninb(~henninb@63-226-191-96.mpls.qwest.net) (Quit: leaving)
2020-09-20 15:09:42 +0200bicho_rastrero(~cerdito@169.85-87-37.dynamic.clientes.euskaltel.es) (Remote host closed the connection)
2020-09-20 15:09:53 +0200 <edwardk> pattern SVCons :: forall (k::Type) (x::k) (n::Nat) (xs :: Vec k n). () => () => Sing x -> Sing xs -> Sing ('VCons x xs :: Vec k (S n)); pattern SVCons a b <- (upSVec -> (SVCons' a b :: SVec' ('VCons a b))) where SVCons (Sing y) (Sing ys) = UnsafeSing (VCons y ys)
2020-09-20 15:10:27 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08)
2020-09-20 15:10:35 +0200 <Cale> Yeah, that looks pretty similar
2020-09-20 15:11:08 +0200laxask(~lax@unaffiliated/laxask)
2020-09-20 15:11:35 +0200 <edwardk> all of this is to hack around the injectivity of succ, if it was there i could just use literally the same code i generate via template haskell for everything else
2020-09-20 15:11:56 +0200 <Cale> oh wait, what if we just need r ~ 'VCons x xs twice?
2020-09-20 15:12:05 +0200 <edwardk> but if i get gimped by any attempt to use kind nat, which perforce infects Int and other numeric types i lift i get screwed up
2020-09-20 15:12:08 +0200 <edwardk> ?
2020-09-20 15:12:45 +0200utopic_int0x80(~lucid_0x8@188.253.237.87) (Ping timeout: 240 seconds)
2020-09-20 15:12:45 +0200 <edwardk> oh, the ~ there is probably going to be a ~~
2020-09-20 15:13:04 +0200 <edwardk> the starting Vec k n needs to learn it is Vec k n' but that is the kind for the argument type
2020-09-20 15:13:15 +0200 <edwardk> so you need to learn both the kind and the type
2020-09-20 15:13:20 +0200 <edwardk> which is ~~'s job
2020-09-20 15:13:32 +0200suppi(~suppi@2605:f700:40:c00::e6fc:6842) (Ping timeout: 260 seconds)
2020-09-20 15:13:33 +0200 <Cale> Do you have an example usage handy?
2020-09-20 15:13:47 +0200 <Cale> (of using the pattern synonym to learn the equality)
2020-09-20 15:14:11 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 15:14:28 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de) (Remote host closed the connection)
2020-09-20 15:14:44 +0200 <edwardk> https://github.com/ekmett/haskell/blob/master/types/src/Data/Type/Internal.hs#L435
2020-09-20 15:14:44 +0200bitmagie(~Thunderbi@200116b8062b2e00fc59d02ac7bcf06a.dip.versatel-1u1.de) (Quit: bitmagie)
2020-09-20 15:14:55 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de)
2020-09-20 15:14:57 +0200 <edwardk> each of the patterns in there and all the ones generated by TH learn the result type
2020-09-20 15:15:05 +0200suppi(~suppi@172.246.241.246)
2020-09-20 15:15:07 +0200 <edwardk> but the result argument's kind doesn't change unlike here
2020-09-20 15:17:23 +0200 <edwardk> when working with a S that is injective, (e.g. using the data family hack) you can just write
2020-09-20 15:17:27 +0200 <edwardk> pattern SVCons :: () => (r ~ 'VCons a b) => Sing a -> Sing b -> Sing r; pattern SVCons a b <- (upSVec -> SVCons' a b) where SVCons (Sing y) (Sing ys) = UnsafeSing (VCons y ys)
2020-09-20 15:17:31 +0200 <edwardk> like every other instance
2020-09-20 15:17:39 +0200 <edwardk> and my TH would have a hope in hell of autogenerating it
2020-09-20 15:18:41 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 15:19:57 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-09-20 15:22:55 +0200PropositionJoe(~ConJoe@cm-84.215.192.230.getinternet.no) (Quit: Leaving)
2020-09-20 15:25:24 +0200kritzefitz(~kritzefit@212.86.56.80)
2020-09-20 15:25:26 +0200kritzefitz(~kritzefit@212.86.56.80) (Remote host closed the connection)
2020-09-20 15:25:30 +0200nbloomf(~nbloomf@2600:1700:83e0:1f40:118d:2a8:7881:1f11) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 15:29:26 +0200jeremybennett(~jeremyben@185.244.214.216)
2020-09-20 15:31:18 +0200geekosaur(ae68c070@cpe-174-104-192-112.neo.res.rr.com)
2020-09-20 15:33:03 +0200 <edwardk> the main concern about dumping an S into kind Nat like that though is that you get two types that produce the same value, and i can't create a custom KnownNat instance for instance KnownNat n => KnownNat (S n) -- so i can only make an overlapping instance of SingI (S n)
2020-09-20 15:33:13 +0200 <edwardk> and overlapping makes me sad
2020-09-20 15:33:25 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-20 15:35:44 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 15:38:28 +0200danso(~dan@107-190-41-58.cpe.teksavvy.com)
2020-09-20 15:40:01 +0200 <edwardk> Cale: https://github.com/TimWSpence/stitch/blob/master/src/Language/Stitch/Exp.hs#L158
2020-09-20 15:40:04 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2020-09-20 15:40:31 +0200 <edwardk> SVec ~ Sing here
2020-09-20 15:41:08 +0200 <edwardk> TypeRep a there is Sing (a :: Type) here
2020-09-20 15:41:41 +0200 <edwardk> exprType :: Sing ctx -> Exp ctx ty -> Sing ty
2020-09-20 15:42:19 +0200 <edwardk> comes about from the types library mashing everything into one rep
2020-09-20 15:46:49 +0200drbean(~drbean@TC210-63-209-85.static.apol.com.tw) (Ping timeout: 260 seconds)
2020-09-20 15:47:07 +0200outerpassage(~outerpass@2600:1700:4640:c560:68bd:9d76:dbd8:24e7) (Ping timeout: 260 seconds)
2020-09-20 15:48:58 +0200 <Cale> On the one hand, this is all kind of cool, on the other hand, it's definitely crossing the line into dependently-typed stuff that I think Haskell just plain isn't good at yet. I think if you actually need explicit singletons, that's a pretty good indication of "oops, Haskell is going to suck at this". I wonder how long until we can realistically have a working pi.
2020-09-20 15:50:24 +0200troydm(~troydm@unaffiliated/troydm)
2020-09-20 15:50:43 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 15:51:27 +0200hackageinline-c 0.9.1.2 - Write Haskell source files including C code inline. No FFI required. https://hackage.haskell.org/package/inline-c-0.9.1.2 (FrancescoMazzoli)
2020-09-20 15:53:37 +0200lagothrix(~lagothrix@unaffiliated/lagothrix) (Ping timeout: 264 seconds)
2020-09-20 15:55:21 +0200jespada(~jespada@148.252.133.47)
2020-09-20 15:55:34 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de)
2020-09-20 15:55:47 +0200 <edwardk> well, i have been building a little dependent type checker in haskell, and every time i move more stuff into my types i catch more bugs =)
2020-09-20 15:56:09 +0200 <edwardk> so i'm just trying to push a few more things into them
2020-09-20 15:56:17 +0200 <edwardk> which is what prompted the singleton push
2020-09-20 15:56:31 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 15:56:36 +0200 <edwardk> getting the singleton stuff to be super fast and more homogeneous made me happy, til Nat made me sad
2020-09-20 15:59:56 +0200caumeslasal(~Thunderbi@157.139.207.77.rev.sfr.net)
2020-09-20 16:00:29 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 16:00:35 +0200caumeslasal(~Thunderbi@157.139.207.77.rev.sfr.net) (Client Quit)
2020-09-20 16:00:39 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2020-09-20 16:01:06 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-09-20 16:01:17 +0200son0p(~son0p@186.159.4.142)
2020-09-20 16:03:37 +0200kicov(959c7c03@nat.ds3.agh.edu.pl) (Remote host closed the connection)
2020-09-20 16:05:49 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2020-09-20 16:06:41 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-20 16:06:53 +0200Ashely3(5beb81b2@gateway/web/cgi-irc/kiwiirc.com/ip.91.235.129.178)
2020-09-20 16:08:36 +0200 <edwardk> i suppose what i could do is build a type data Unnat = Add Int# Nat -- relying on the fact that Int# doesn't promote so we don't have to worry about any 'native' terms in kind Unnat. use my data family trick to inject a S constructor, and one for, so that it morally models data Unnat = S Unnat | N Nat -- so i can distinguish between the base number type i got from type Nat and the number of times i called S on it
2020-09-20 16:08:56 +0200 <edwardk> that way i don't need to worry about S 1 ~ 2 causing the universe to collapse or something
2020-09-20 16:10:48 +0200 <edwardk> another another option is to just do what I do now which is use an hlist and carry a witness of the length around rather than use Vec a N
2020-09-20 16:11:05 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 240 seconds)
2020-09-20 16:11:16 +0200 <Cale> Also, I haven't really thought very hard about how this suggestion might help, but generally I think if you're going to use overlapping instances in order to compute things, everything is okay in the case that you can manage to avoid exporting the class.
2020-09-20 16:11:32 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08)
2020-09-20 16:11:38 +0200 <edwardk> the class here is a very public offering
2020-09-20 16:11:41 +0200 <Cale> yeah
2020-09-20 16:12:06 +0200 <edwardk> i was hoping to split this out and ran into this issue while writing up examples
2020-09-20 16:12:44 +0200 <edwardk> i had started looking for 'all the instances i can add to base' when i ran afoul of this
2020-09-20 16:12:47 +0200 <Cale> I don't know if there's a way to make a private analogue and get anything related to what you want (like, make a public instance for that class that depends on an instance of the class that nobody's allowed to see, maybe)
2020-09-20 16:12:49 +0200 <edwardk> er from base
2020-09-20 16:13:24 +0200laxasksudden
2020-09-20 16:13:42 +0200Ashely3(5beb81b2@gateway/web/cgi-irc/kiwiirc.com/ip.91.235.129.178) (Disconnected by services)
2020-09-20 16:13:46 +0200 <edwardk> i'm inclined to just yolo the data family S thing
2020-09-20 16:13:50 +0200 <edwardk> and go on with my day
2020-09-20 16:13:56 +0200 <edwardk> and if it bites anyone say 'don't do that'
2020-09-20 16:14:17 +0200Ashely3(c247e36b@gateway/web/cgi-irc/kiwiirc.com/ip.194.71.227.107)
2020-09-20 16:14:25 +0200Ashely3(c247e36b@gateway/web/cgi-irc/kiwiirc.com/ip.194.71.227.107) (Disconnected by services)
2020-09-20 16:15:03 +0200 <edwardk> data family S' :: Nat -> k; type S :: Nat -> Nat; type S = S' -- just works .. til you need to feed it to + and want + to actually compute, because they closed the type family for +
2020-09-20 16:15:07 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 16:15:17 +0200 <edwardk> but i could offer my own + and have it delegate to the main + once i changed out the S's
2020-09-20 16:15:47 +0200 <edwardk> but then the benefit of working with base Nat is fleeing fast
2020-09-20 16:17:20 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 16:17:43 +0200nyd(~nyd@unaffiliated/elysian) (Quit: nyd)
2020-09-20 16:18:31 +0200lagothrix(~lagothrix@unaffiliated/lagothrix)
2020-09-20 16:19:38 +0200 <edwardk> i want a way to export a thing only at the type level without having to infect it with a type like Type that doesn't exist as a term.
2020-09-20 16:19:52 +0200 <edwardk> where i can have constructors in it, without using my data families
2020-09-20 16:20:08 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
2020-09-20 16:20:52 +0200 <edwardk> leaning towards exporting my own Nat type, ignoring the TypeNats Nat and going on my way.
2020-09-20 16:21:19 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 16:21:47 +0200 <edwardk> since Natural currently doesn't promote i _could_ use the data family hack to put Z and S in it as a kind.
2020-09-20 16:21:52 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-09-20 16:22:15 +0200 <edwardk> then you could use linear time slow SingI instances if you had to
2020-09-20 16:23:16 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-09-20 16:23:17 +0200 <edwardk> and i'd have both Nat and Natural, with the former working for when i want a large literal and the latter when i want induction for things like environments that'll usually get built from 0, til... next ghc release or so when they merge Nat and Natural
2020-09-20 16:23:28 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 16:24:01 +0200 <edwardk> to make the linear time thing less awful, i could emulate a better basis, like binary nats, or zeroless binary or something.
2020-09-20 16:25:04 +0200bloodstalker(~bloodstal@46.166.187.178)
2020-09-20 16:25:09 +0200 <edwardk> that'd get me log time literals, and Z and S become type families acting on the type, but they require more type information about the rest of the nat to know what to do at some points
2020-09-20 16:25:42 +0200 <edwardk> where peano can succ without forcing or matching on anything
2020-09-20 16:25:58 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 16:27:05 +0200 <Cale> Yeah, how does merging Nat and Natural work with type families wanting to compute anything?
2020-09-20 16:27:11 +0200olligobber(olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 265 seconds)
2020-09-20 16:27:18 +0200 <Cale> I mean, in the future GHC case
2020-09-20 16:27:56 +0200kicov(959c7c03@nat.ds3.agh.edu.pl)
2020-09-20 16:28:56 +0200 <Cale> I guess they just have wired in type families anyway
2020-09-20 16:29:32 +0200 <kicov> Hi, just one more question - did someone try to use liquid haskell on lens? Got any tips how to write these annotations? `fn :: Int -> Lens' State a` doesn't work well
2020-09-20 16:30:54 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 272 seconds)
2020-09-20 16:31:00 +0200 <Cale> Is liquid haskell getting to the point where it can be used on nontrivial programs?
2020-09-20 16:31:19 +0200 <kicov> Just for reference: https://dpaste.com/H877D9HQU
2020-09-20 16:33:39 +0200howdoi(uid224@gateway/web/irccloud.com/x-dtashatgyjqumlie)
2020-09-20 16:34:19 +0200 <Cheery> Haskell's still using STG in the runtime right?
2020-09-20 16:35:16 +0200 <lechner> Hi, will findFiles from System.Directory descend into subdirectories?
2020-09-20 16:35:23 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 16:35:30 +0200irc_user(uid423822@gateway/web/irccloud.com/x-yhvajookqrbnnurt)
2020-09-20 16:36:17 +0200 <Cale> Cheery: In name more than anything
2020-09-20 16:38:05 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 16:38:17 +0200 <edwardk> well, i suppose what i can do is this. i'll make Z and S hacks that can inhabit kind Natural for now. and when they merge I'll just take the name Nat and move them over there =)
2020-09-20 16:38:41 +0200 <Cheery> Cale: the 1992 paper describes the design space and abstract machine with denotational and operational semantics. Is this still the same?
2020-09-20 16:39:08 +0200 <edwardk> Cheery: the STG has gotten a few upgrades since then, dynamic pointer tagging, etc.
2020-09-20 16:39:20 +0200 <edwardk> but the general flavor is there
2020-09-20 16:39:23 +0200 <Cale> Understanding the original STG will still give a decent understanding of what exists today, even though it's no longer always spineless and usually no longer tagless
2020-09-20 16:40:13 +0200 <Cale> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.19.411&rep=rep1&type=pdf -- "Putting the Spine back in the Spineless Tagless G-Machine"
2020-09-20 16:40:43 +0200 <Cale> https://simonmar.github.io/bib/papers/ptr-tagging.pdf -- "Faster laziness using dynamic pointer tagging"
2020-09-20 16:41:31 +0200pta2002(~quassel@104.248.23.110)
2020-09-20 16:42:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
2020-09-20 16:42:46 +0200urodna(~urodna@unaffiliated/urodna)
2020-09-20 16:43:53 +0200 <Cheery> I thought I do one last thing with RPython. Exploring eval/apply interpreters and STG. I'll see if there's something to propose in place of Javascript so that there's less room for people to replace it with crap.
2020-09-20 16:44:13 +0200 <Cheery> a nice FP runtime. :)
2020-09-20 16:44:13 +0200outerpassage(~outerpass@2600:1700:4640:c560:68bd:9d76:dbd8:24e7)
2020-09-20 16:45:20 +0200 <Cheery> Also would love for an efficient logic programming runtime slipped in, but I'll try to not scope creep much.
2020-09-20 16:45:28 +0200CMCDragonkai1(~Thunderbi@120.17.10.7) (Ping timeout: 272 seconds)
2020-09-20 16:47:04 +0200ddellacosta(~dd@86.106.121.168)
2020-09-20 16:48:22 +0200polyrain(~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 16:49:33 +0200petersen(~petersen@redhat/juhp) (Quit: petersen)
2020-09-20 16:55:42 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 16:56:25 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz)
2020-09-20 17:00:01 +0200jeremybennett(~jeremyben@185.244.214.216) ()
2020-09-20 17:01:33 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 256 seconds)
2020-09-20 17:02:47 +0200 <Orbstheorem> If building a derivation is a linear process, why doesn't nix cache intemediate build steps ? (e.g. git@`buildPhase::c1kj2h31...`)
2020-09-20 17:03:08 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 17:04:01 +0200outerpassage(~outerpass@2600:1700:4640:c560:68bd:9d76:dbd8:24e7) (Quit: Leaving)
2020-09-20 17:08:16 +0200__Joker(~Joker@180.151.105.65) (Ping timeout: 272 seconds)
2020-09-20 17:08:26 +0200 <Orbstheorem> Oh, my bad, wrong buffer ><"
2020-09-20 17:10:39 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de) (Quit: knupfer)
2020-09-20 17:10:39 +0200knupfer1(~Thunderbi@200116b82c277000795bc1703ccafd48.dip.versatel-1u1.de)
2020-09-20 17:12:30 +0200pingiun(~pingiun@j63019.upc-j.chello.nl)
2020-09-20 17:12:48 +0200HeAvengin7_(~sedx@112.198.75.236)
2020-09-20 17:13:03 +0200knupfer1knupfer
2020-09-20 17:16:30 +0200jespada(~jespada@148.252.133.47) (Read error: Connection reset by peer)
2020-09-20 17:16:45 +0200__Joker(~Joker@180.151.105.65)
2020-09-20 17:16:48 +0200HeAvengin7_(~sedx@112.198.75.236) (Quit: Please click my blog: https://bit.ly/2RjfReh or https://bit.ly/33tb5lx)
2020-09-20 17:17:50 +0200 <sm[m]> hi lechner, doesn't it's doc say ?
2020-09-20 17:19:33 +0200dsf(~dsf@cpe-75-80-106-108.san.res.rr.com) (Ping timeout: 260 seconds)
2020-09-20 17:22:04 +0200ermau(~ermau@185.163.110.116)
2020-09-20 17:30:50 +0200knupfer(~Thunderbi@200116b82c277000795bc1703ccafd48.dip.versatel-1u1.de) (Quit: knupfer)
2020-09-20 17:31:14 +0200knupfer(~Thunderbi@200116b82c2770005077b6463d9d1f88.dip.versatel-1u1.de)
2020-09-20 17:32:40 +0200dsf(~dsf@cpe-75-82-64-167.socal.res.rr.com)
2020-09-20 17:37:11 +0200ClaudiusMaximus(~claude@198.123.199.146.dyn.plus.net)
2020-09-20 17:37:12 +0200ClaudiusMaximus(~claude@198.123.199.146.dyn.plus.net) (Changing host)
2020-09-20 17:37:12 +0200ClaudiusMaximus(~claude@unaffiliated/claudiusmaximus)
2020-09-20 17:39:57 +0200ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2020-09-20 17:40:42 +0200ukari(~ukari@unaffiliated/ukari)
2020-09-20 17:42:52 +0200Turmfalke(~user@unaffiliated/siracusa)
2020-09-20 17:46:22 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-09-20 17:51:30 +0200kicov(959c7c03@nat.ds3.agh.edu.pl) (Remote host closed the connection)
2020-09-20 17:53:32 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-20 18:00:39 +0200Rudd0(~Rudd0@185.189.115.98)
2020-09-20 18:02:09 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2020-09-20 18:04:00 +0200outerpassage(outerpassa@2600:3c01::f03c:92ff:fed1:4643)
2020-09-20 18:04:11 +0200elliott_(~elliott@2600:380:9266:42eb:7b5e:250e:ef35:8b08)
2020-09-20 18:07:59 +0200son0p(~son0p@186.159.4.142) (Read error: Connection reset by peer)
2020-09-20 18:09:19 +0200 <lechner> sm[m]: I am not sure. I can only see the "given list of directories"---which is elaborated on but not otherwise expanded to recursive behavior in the reference to findFilesWith here: https://hackage.haskell.org/package/directory-1.3.6.1/docs/System-Directory.html#v:findFiles
2020-09-20 18:11:01 +0200ryansmccoy(~ryansmcco@156.96.151.132) (Ping timeout: 264 seconds)
2020-09-20 18:11:12 +0200son0p(~son0p@186.159.4.142)
2020-09-20 18:11:28 +0200jflewkfjlwjefklf(~jfkeflkwe@2600:1700:4640:c560:68bd:9d76:dbd8:24e7)
2020-09-20 18:11:42 +0200ryansmccoy(~ryansmcco@193.37.254.27)
2020-09-20 18:12:33 +0200jflewkfjlwjefklf(~jfkeflkwe@2600:1700:4640:c560:68bd:9d76:dbd8:24e7) (Remote host closed the connection)
2020-09-20 18:16:59 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net)
2020-09-20 18:20:18 +0200zebrag(~inkbottle@aaubervilliers-654-1-99-86.w86-212.abo.wanadoo.fr)
2020-09-20 18:20:52 +0200inkbottle(~inkbottle@aaubervilliers-654-1-100-182.w86-212.abo.wanadoo.fr) (Ping timeout: 256 seconds)
2020-09-20 18:22:18 +0200thir(~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de)
2020-09-20 18:22:23 +0200 <thir> #bitsnbugs
2020-09-20 18:22:33 +0200gmt(~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 260 seconds)
2020-09-20 18:22:47 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2020-09-20 18:23:13 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
2020-09-20 18:23:42 +0200thir(~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) ()
2020-09-20 18:28:44 +0200pera(~pera@unaffiliated/pera)
2020-09-20 18:29:01 +0200Jeanne-Kamikaze(~Jeanne-Ka@104.200.129.62)
2020-09-20 18:30:36 +0200ajfelfjlsdkfjejf(~jfkeflkwe@2600:1700:4640:c560:68bd:9d76:dbd8:24e7)
2020-09-20 18:31:27 +0200hackageuniqueness-periods-vector-examples 0.5.3.0 - Examples of usage for the uniqueness-periods-vector series of packages https://hackage.haskell.org/package/uniqueness-periods-vector-examples-0.5.3.0 (OleksandrZhabenko)
2020-09-20 18:31:28 +0200carlomagno(~cararell@inet-hqmc02-o.oracle.com) (Remote host closed the connection)
2020-09-20 18:31:45 +0200jespada(~jespada@148.252.133.47)
2020-09-20 18:32:15 +0200carlomagno(~cararell@inet-hqmc02-o.oracle.com)
2020-09-20 18:32:27 +0200zopsi(~zopsi@irc.dir.ac) (Remote host closed the connection)
2020-09-20 18:32:45 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net)
2020-09-20 18:33:23 +0200zopsi(zopsi@2600:3c00::f03c:91ff:fe14:551f)
2020-09-20 18:33:26 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 18:34:39 +0200fendor(~fendor@77.119.128.171.wireless.dyn.drei.com)
2020-09-20 18:35:33 +0200ericsagnes(~ericsagne@2405:6580:0:5100:59cb:4e8f:c201:4e04) (Ping timeout: 272 seconds)
2020-09-20 18:35:40 +0200aenesidemus(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net)
2020-09-20 18:39:20 +0200tzh(~tzh@2601:448:c500:5300::ad1c)
2020-09-20 18:39:20 +0200cheater(~user@unaffiliated/cheater) (Quit: BitchX: the new hardcore, psycho, nitro client -- in a can)
2020-09-20 18:41:53 +0200cheater(~user@unaffiliated/cheater)
2020-09-20 18:43:26 +0200knupfer(~Thunderbi@200116b82c2770005077b6463d9d1f88.dip.versatel-1u1.de) (Ping timeout: 244 seconds)
2020-09-20 18:47:21 +0200ericsagnes(~ericsagne@2405:6580:0:5100:5585:9ff6:72b9:d99a)
2020-09-20 18:48:02 +0200 <sm[m]> lechner: you're right, it's not crystal clear, but yes I'm 99% sure it descends. Probably you tested it by now
2020-09-20 18:49:03 +0200Dolly(585fd1fd@ti0203q160-5312.bb.online.no)
2020-09-20 18:49:48 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de)
2020-09-20 18:49:55 +0200igghibu(~igghibu@net-93-66-17-40.cust.vodafonedsl.it)
2020-09-20 18:50:47 +0200pingiun(~pingiun@j63019.upc-j.chello.nl) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 18:51:09 +0200justsomeguy(~justsomeg@unaffiliated/--/x-3805311)
2020-09-20 18:53:42 +0200 <nshepperd2> whoa i just converted this dynamic programming-based tokenization thing from a laziness based pure Vector implementation to a mutable unboxed vector in ST, and it got like 100 times faster
2020-09-20 18:54:02 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 18:54:26 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 18:54:39 +0200 <ski> top-down to bottom-up ?
2020-09-20 18:54:45 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 18:55:52 +0200 <nshepperd2> I'm not quite sure what those terms mean, but yes I think so
2020-09-20 18:57:15 +0200 <nshepperd2> the lazy one was let table = V.generate (n+1) go; go = ...; in table!n
2020-09-20 18:57:19 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz)
2020-09-20 18:57:45 +0200 <nshepperd2> the fast one was to make a mutable unboxed vector and fill it out in order from 0 to n
2020-09-20 18:57:49 +0200 <ski> where `go' referred to `table'
2020-09-20 18:57:55 +0200 <nshepperd2> yeah
2020-09-20 18:58:17 +0200 <sshine> >_<
2020-09-20 18:58:24 +0200 <ski> hm, what kind of access pattern ?
2020-09-20 18:59:25 +0200 <nshepperd2> 'go i' would reference some or all cells between i-5 and i-1
2020-09-20 18:59:34 +0200 <hekkaidekapus> sm[m]: The 1% wins again :p It does not descend. At its core, the function calls doesFileExist to the supplied dirs.
2020-09-20 19:00:12 +0200ajfelfjlsdkfjejf(~jfkeflkwe@2600:1700:4640:c560:68bd:9d76:dbd8:24e7) (Quit: Leaving)
2020-09-20 19:00:20 +0200 <hekkaidekapus> doesFileExist (dir </> file)
2020-09-20 19:00:24 +0200 <ski> "bottom-up" means that you fill in the "lower cells", before the higher ones, "prematurely" so to speak. "top-down" that you start demanding higher ones, which in turn demands lower ones (which are cached)
2020-09-20 19:00:39 +0200 <dolio> There's a lot of overhead in the top-down lazy approach.
2020-09-20 19:00:54 +0200 <dolio> If you're working with integers.
2020-09-20 19:01:10 +0200sleblanc(~sleblanc@unaffiliated/sebleblanc)
2020-09-20 19:01:47 +0200 <nshepperd2> ski: then yeah, that's exactly what i did
2020-09-20 19:01:59 +0200 <ski> nshepperd2 : i suppose you could even use a five-tuple, or a vector of size five, then
2020-09-20 19:02:41 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 260 seconds)
2020-09-20 19:03:28 +0200igghibu(~igghibu@net-93-66-17-40.cust.vodafonedsl.it) (Quit: Konversation terminated!)
2020-09-20 19:03:37 +0200 <dolio> Yeah, like computing fibonacci with an accumulator pair.
2020-09-20 19:04:10 +0200 <ski> (you'd use `mod i 5')
2020-09-20 19:05:09 +0200 <ski> i suppose the computation of the next cell isn't a linear function of the previous five ones ..
2020-09-20 19:05:10 +0200zaquest(~notzaques@5.128.210.178) (Quit: Leaving)
2020-09-20 19:06:52 +0200elliott_(~elliott@2600:380:9266:42eb:7b5e:250e:ef35:8b08) (Ping timeout: 260 seconds)
2020-09-20 19:07:20 +0200 <ski> nshepperd2 : probably the lazy approach would work better, in case there's many cells which aren't needed to compute the result
2020-09-20 19:07:38 +0200coot(~coot@37.30.49.42.nat.umts.dynamic.t-mobile.pl)
2020-09-20 19:08:00 +0200notzmv`(~user@177.103.86.92)
2020-09-20 19:08:11 +0200 <dolio> Yeah, there are a lot of factors making it sub-optimal for this case.
2020-09-20 19:08:29 +0200zaquest(~notzaques@5.128.210.178)
2020-09-20 19:08:37 +0200hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2020-09-20 19:10:10 +0200cheater(~user@unaffiliated/cheater) (Read error: Connection reset by peer)
2020-09-20 19:10:37 +0200 <sshine> I have a data type, data Foo a = X a | Y a | Z a | P | Q | R; and I'd like to make a type NumFoo = forall n. Num n => Foo n, but it seems that I can't do that. what are my alternatives? I was thinking of a data type with a type class constraint.
2020-09-20 19:10:59 +0200 <sshine> I think I can use GADTs, but that would require me to alter 'Foo', too, right?
2020-09-20 19:11:18 +0200notzmv(~user@unaffiliated/zmv) (Ping timeout: 256 seconds)
2020-09-20 19:11:46 +0200cheater(~user@unaffiliated/cheater)
2020-09-20 19:11:55 +0200 <nshepperd2> ski: yeah in this case pretty much all cells are eventually needed
2020-09-20 19:13:30 +0200 <ski> sshine : why can't you ?
2020-09-20 19:13:33 +0200 <hyperisco> sshine, what is the idea of this type? I don't understand
2020-09-20 19:14:26 +0200 <ski> a value of type `NumFoo' possibly contains a number of any numeric type the user wants to get
2020-09-20 19:14:52 +0200Lord_of_Life_(~Lord@unaffiliated/lord-of-life/x-0885362)
2020-09-20 19:15:26 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Remote host closed the connection)
2020-09-20 19:16:00 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 19:16:27 +0200igghibu(~igghibu@91.193.5.10)
2020-09-20 19:16:50 +0200Lord_of_Life(~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 272 seconds)
2020-09-20 19:16:50 +0200Lord_of_Life_Lord_of_Life
2020-09-20 19:22:38 +0200igghibu(~igghibu@91.193.5.10) (Quit: Textual IRC Client: www.textualapp.com)
2020-09-20 19:22:54 +0200 <zebrag> I believe `cons :: a -> List l a -> List (Succ l) a` cannot be done with plain GADT? (The following ref, might suggest it could be done?? https://www.cis.upenn.edu/~sweirich/talks/GADT.pdf, page 9)
2020-09-20 19:23:15 +0200cole-h(~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
2020-09-20 19:23:45 +0200 <hyperisco> zebrag, is there a compiler error you're seeing?
2020-09-20 19:23:56 +0200Dolly(585fd1fd@ti0203q160-5312.bb.online.no) (Remote host closed the connection)
2020-09-20 19:24:14 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Remote host closed the connection)
2020-09-20 19:24:18 +0200 <zebrag> At least if you consider `Succ` is a data constructor
2020-09-20 19:24:25 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 19:24:39 +0200 <zebrag> hyperisco: no I'm just reading the slides above
2020-09-20 19:25:59 +0200 <hyperisco> all I don't understand is how that is an example of dependent types
2020-09-20 19:26:07 +0200tzh(~tzh@2601:448:c500:5300::ad1c) (Ping timeout: 260 seconds)
2020-09-20 19:26:20 +0200 <hyperisco> what is your objection?
2020-09-20 19:26:37 +0200kindaro(5f6e6241@h95-110-98-65.dyn.bashtel.ru)
2020-09-20 19:26:57 +0200suppi(~suppi@172.246.241.246) (Ping timeout: 260 seconds)
2020-09-20 19:27:06 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Remote host closed the connection)
2020-09-20 19:27:26 +0200pingiun(~pingiun@j63019.upc-j.chello.nl)
2020-09-20 19:27:30 +0200Dolly(585fd1fd@ti0203q160-5312.bb.online.no)
2020-09-20 19:29:08 +0200 <Cale> sshine: Just replace "type NumFoo = ..." with "data NumFoo = ..." and what you wrote is valid code, if a little bit useless. Forgetting everything about the type of number except that it was a type of number will mean that you can't really do a whole lot with it (in particular, you won't know that it's the same type as any other type of number, so the arithmetic you can perform is very limited)
2020-09-20 19:30:13 +0200 <Cale> sshine: Or did you really want to define a type synonym for the universal type?
2020-09-20 19:31:09 +0200 <c_wraith> Cale: it's a bit worse than that since Show is no longer a superclass of Num. Num doesn't give you any eliminator to see the value.
2020-09-20 19:31:10 +0200DirefulSalt(DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
2020-09-20 19:31:18 +0200 <Cale> Right
2020-09-20 19:31:27 +0200 <Cale> and Eq is gone too
2020-09-20 19:31:48 +0200 <c_wraith> Eq would be pretty useless, though, unless you wanted to test for lack of reflexivity or something
2020-09-20 19:32:16 +0200 <Cale> You could test out arithmetical identities involving your one value of the given type :)
2020-09-20 19:32:41 +0200 <c_wraith> hah. is x + x == x ? :)
2020-09-20 19:32:45 +0200 <Cale> yeah
2020-09-20 19:33:08 +0200 <hyperisco> no
2020-09-20 19:33:15 +0200GyroW_(~GyroW@ptr-48ujrfb8c7gfd2lu92q.18120a2.ip6.access.telenet.be)
2020-09-20 19:33:18 +0200supercoven(~Supercove@dsl-hkibng32-54fb54-166.dhcp.inet.fi) (Ping timeout: 272 seconds)
2020-09-20 19:33:43 +0200 <Cale> (that's essentially the same as checking if x == 0, if the instance is lawful)
2020-09-20 19:33:48 +0200 <c_wraith> I suppose the Num instance would let you throw in literals too, so you could ask if x * 0 == x
2020-09-20 19:33:49 +0200GyroW(~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds)
2020-09-20 19:33:51 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 19:34:21 +0200 <c_wraith> That's not true in a modular ring
2020-09-20 19:34:41 +0200 <c_wraith> Oh, I guess it is. nevermind me!
2020-09-20 19:34:49 +0200 <phadej> x * 0 = 0, not x ?
2020-09-20 19:35:14 +0200 <Cale> That was another equation that would only be satisfied when x == 0
2020-09-20 19:35:27 +0200 <c_wraith> Anyway. The real point is that a value of an unknown type with a Num instance is very low.
2020-09-20 19:35:28 +0200 <Cale> (again, a fun thing to check holds in any ring)
2020-09-20 19:35:37 +0200 <hyperisco> I guess you can use this to dynamically determine which laws might hold
2020-09-20 19:35:54 +0200tzh(~tzh@c-73-94-222-143.hsd1.mn.comcast.net)
2020-09-20 19:35:56 +0200 <c_wraith> If you add in Eq, you can do that
2020-09-20 19:36:07 +0200 <c_wraith> but with *just* Num, you've got basically nothing.
2020-09-20 19:36:24 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-09-20 19:36:25 +0200 <hyperisco> I feel like Num without Ord is amiss
2020-09-20 19:36:52 +0200 <c_wraith> so... not a fan of complex numbers?
2020-09-20 19:37:23 +0200 <hyperisco> you telling me they can't be ordered or are you telling me Ord is too strong
2020-09-20 19:37:39 +0200 <merijn> hyperisco: There's two separate and equally valid orderings for them
2020-09-20 19:37:43 +0200 <geekosaur> they can't be ordered
2020-09-20 19:37:46 +0200 <merijn> Well, technically probably more
2020-09-20 19:37:54 +0200 <geekosaur> or, what merijn said.
2020-09-20 19:37:55 +0200 <merijn> But they can't be ordered in a arithmetically meaningful way
2020-09-20 19:38:06 +0200 <merijn> hyperisco: Consider this
2020-09-20 19:38:22 +0200 <merijn> hyperisco: Is "1 + 0i" > than "0 + 1i" or not?
2020-09-20 19:38:29 +0200Chi1thangoo(~Chi1thang@87.112.60.168)
2020-09-20 19:38:55 +0200 <geekosaur> basically "Ord" only makes sense if they can be squashed down to a line without data loss. complex numbers, quaternions, etc. have infinitely many such squashings, none of which has any claim to being primary
2020-09-20 19:39:05 +0200 <hyperisco> so you're telling me Ord is too strong
2020-09-20 19:39:23 +0200 <merijn> You could argue Num should be Eq
2020-09-20 19:39:30 +0200 <merijn> Which, in fact, the Haskell Report does
2020-09-20 19:39:37 +0200 <merijn> GHC ignores that, however
2020-09-20 19:39:40 +0200acidjnk_new2(~acidjnk@p200300d0c736584378afc0f7e05aaafd.dip0.t-ipconnect.de)
2020-09-20 19:39:43 +0200 <hyperisco> what about the cherished function instance though
2020-09-20 19:39:49 +0200 <merijn> The report also mandates a Show instance as superclass of Num
2020-09-20 19:39:58 +0200 <merijn> hyperisco: Those aren't legal per the report
2020-09-20 19:40:02 +0200borne(~fritjof@200116b86490460022497ba62715fb72.dip.versatel-1u1.de)
2020-09-20 19:40:08 +0200 <merijn> Since they can't have Eq or Show
2020-09-20 19:40:14 +0200 <hyperisco> well the report can stuff itself in regards to Num
2020-09-20 19:40:29 +0200 <merijn> hyperisco: Well, you wanted Ord
2020-09-20 19:40:29 +0200wroathe(~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-09-20 19:40:34 +0200 <merijn> hyperisco: Which requires Eq :p
2020-09-20 19:40:34 +0200 <hyperisco> it started this mess
2020-09-20 19:40:45 +0200 <merijn> hyperisco: So insisting on Ord for Num kills that instance too :p
2020-09-20 19:41:01 +0200 <merijn> It's easy
2020-09-20 19:41:01 +0200 <monochrom> "forall n. Num n => n" is very likely the same as "Integer".
2020-09-20 19:41:14 +0200 <hyperisco> if you think I'm giving one consistent position here, I'm not
2020-09-20 19:41:15 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-09-20 19:41:15 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Client Quit)
2020-09-20 19:41:20 +0200 <merijn> Num is perfectly adequate if you just give up on any notion of "math" definitions of arithmetic
2020-09-20 19:41:33 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-09-20 19:41:38 +0200 <merijn> hyperisco: There've been 50 different Num hierarchies "better" than the current one proposed
2020-09-20 19:41:56 +0200 <merijn> But no one uses them, because they're all a pain for anything anyone actually cares about doing
2020-09-20 19:41:57 +0200 <phadej> Num is an unsuccessful attempt to unify operations on `Integer` and `Double`
2020-09-20 19:41:58 +0200shad0w_(~shad0w_@160.202.36.27)
2020-09-20 19:42:06 +0200 <monochrom> But you can't squash down those 50 alternatives down to a line. :)
2020-09-20 19:42:15 +0200 <hyperisco> I doubt it
2020-09-20 19:42:21 +0200 <merijn> Turns out the current Num hierarchy does passably well at "stuff people actually care about"
2020-09-20 19:42:34 +0200 <phadej> right now I think that exact and inexact math should just had different operator set :)
2020-09-20 19:42:35 +0200 <Cale> I think Num is pretty okay at the moment. The main things which always bothered me before were the Show and Eq constraints, and those are gone.
2020-09-20 19:42:35 +0200 <merijn> hyperisco: Well, feel free to work out and propose alternative 51 :)
2020-09-20 19:42:40 +0200 <hyperisco> no
2020-09-20 19:42:42 +0200 <merijn> Maybe this time someone will get it right :)
2020-09-20 19:43:03 +0200 <hyperisco> PureScript has a different hierarchy and soils it with invalid instances
2020-09-20 19:43:15 +0200 <Cale> signum/abs being there is a little weird perhaps, but those are always definable in some fashion
2020-09-20 19:43:16 +0200 <monochrom> I am somewhat bothered by the opposite, Cale. For example allowing X->Integer to be a Num instance.
2020-09-20 19:43:21 +0200 <hyperisco> but other than that, I've personally found ample utility in it
2020-09-20 19:43:43 +0200 <merijn> I have no clue about purescript's hierarchy
2020-09-20 19:43:58 +0200 <hyperisco> it is more disciplined than a bag called Num
2020-09-20 19:44:06 +0200 <phadej> I think PureScript makes the same mistake, by having e.g. Double as part of "the only numeric hierarchy"
2020-09-20 19:44:22 +0200 <hyperisco> but then it goes and gives the usual Double instance and pretends Int is Integer
2020-09-20 19:44:43 +0200 <monochrom> Then again I'm bothered by signum and abs, too.
2020-09-20 19:44:46 +0200 <merijn> hyperisco: Well, what's the alternative?
2020-09-20 19:44:49 +0200MorrowM(~max@bzq-110-168-31-106.red.bezeqint.net)
2020-09-20 19:44:59 +0200 <merijn> Do an Ocaml and use a different + for Int and Double?
2020-09-20 19:45:08 +0200 <monochrom> Yes.
2020-09-20 19:45:11 +0200 <hyperisco> I recommended that
2020-09-20 19:45:24 +0200 <merijn> That's one of the worst things in ocaml >.<
2020-09-20 19:45:32 +0200 <monochrom> It is why I came over to Haskell. :)
2020-09-20 19:45:32 +0200Tesseraction(~Tesseract@unaffiliated/tesseraction)
2020-09-20 19:45:36 +0200 <hyperisco> though the issue starts at division, not +, for Int
2020-09-20 19:45:39 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-09-20 19:45:58 +0200 <hyperisco> so long as we're willing to accept the reality that Int is a modular ring
2020-09-20 19:46:10 +0200 <merijn> hyperisco: Well, how is your hypothetical hierarchy going to unify + for Int and Double and not get this "wrong instance" for Double you're complaining about
2020-09-20 19:46:15 +0200 <hyperisco> a hard thing for programmers to do, seems
2020-09-20 19:46:30 +0200 <hyperisco> well that's easy
2020-09-20 19:46:37 +0200 <hyperisco> you just cast Double out of the hierarchy altogether
2020-09-20 19:46:41 +0200gestone(~gestone@c-98-225-37-68.hsd1.wa.comcast.net) (Quit: Lost terminal)
2020-09-20 19:46:43 +0200 <merijn> Right
2020-09-20 19:46:59 +0200 <merijn> So then + doesn't work on Double, but you just said the division start at division
2020-09-20 19:47:06 +0200 <hyperisco> and then you do the harder thing of figuring out truthful axioms for Double
2020-09-20 19:47:25 +0200 <hyperisco> for Int it does
2020-09-20 19:47:48 +0200 <hyperisco> for Double the problem started at the beginning
2020-09-20 19:47:55 +0200 <dolio> Maybe you could accept that not every type class needs to be a grand mathematical design, and sometimes people just want to overload stuff.
2020-09-20 19:48:23 +0200 <hyperisco> frankly that isn't why I use these languages
2020-09-20 19:49:16 +0200 <hyperisco> and I find it bemusing how concerned people get about overloading syntax
2020-09-20 19:49:51 +0200 <hyperisco> how do we get on if + cannot be used for both Int and Double in the same module
2020-09-20 19:53:17 +0200 <maralorn> I wanna design a small library and am uncertain about the design. I want to specify A) a data type representing certain dialog interactions with a user (like a menu, a text input, a yes/no question) and B) multiple implementations of IO actions that execute that dialog. So far so easy. But now I wonder how I can make the type of possible dialogs composable and giving the handlers an option to specify which types of dialogs
2020-09-20 19:53:17 +0200 <maralorn> they support. And I wonder if that's worth it. Because for my use case I could probably just have one data type for "dialogs" and extend it whenever I need to.
2020-09-20 19:54:18 +0200 <hyperisco> merijn, oh sorry I think the division is fine, though there are different ways to do it, but the problem starts at Euclidean rings because Int is not an integral domain
2020-09-20 19:54:41 +0200 <maralorn> On the other hand specifying possible dialog variants in a type level list will probably multiple my development time and lower the ease of use.
2020-09-20 19:55:13 +0200juuandyy(~juuandyy@90.166.144.65)
2020-09-20 19:55:23 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de) (Ping timeout: 240 seconds)
2020-09-20 19:56:08 +0200 <hyperisco> merijn, no scratch that, EuclideanRing defines division. :P clumsily remembering the hierarchy
2020-09-20 19:56:14 +0200perrier-jouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2020-09-20 19:56:25 +0200orion(~orion@unaffiliated/orion) (Ping timeout: 240 seconds)
2020-09-20 19:56:33 +0200skilooks at sshine
2020-09-20 19:56:42 +0200suppi(~suppi@172.246.241.246)
2020-09-20 19:56:51 +0200MarcelineVQlooks at rcloud
2020-09-20 19:56:54 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 19:56:54 +0200 <hyperisco> there is DivisionRing which defines multiplicative inverses but that can't be closed on Int
2020-09-20 19:57:03 +0200Lycurgus(~niemand@98.4.96.130)
2020-09-20 19:58:13 +0200 <hyperisco> but for example, I can count with semirings, and that has been helpful (technically could with a group, but for whatever reason groups are omitted from the hierarchy, painfully)
2020-09-20 19:58:54 +0200dansho(~dansho@ip68-108-167-185.lv.lv.cox.net)
2020-09-20 19:59:36 +0200worc3131(~quassel@2a02:c7f:c026:9500:7d0b:65d0:38a4:4786)
2020-09-20 19:59:38 +0200 <Cale> hyperisco: Well, Euclidean domains usually are required to be integral domains, but practically speaking, I'm not sure how much trouble you run into with the generalisation...
2020-09-20 20:00:02 +0200ermau(~ermau@185.163.110.116) ()
2020-09-20 20:00:16 +0200 <hyperisco> both instances given in the Prelude for PS are invalid, so I guess you run into trouble on all counts :P
2020-09-20 20:00:28 +0200 <Cale> for PS?
2020-09-20 20:00:33 +0200 <hyperisco> PureScript
2020-09-20 20:01:28 +0200Lycurgusjust reviewed from herstein the group/ring distinction
2020-09-20 20:02:13 +0200wavemode(~wavemode@097-070-075-143.res.spectrum.com)
2020-09-20 20:02:45 +0200 <hyperisco> I am guessing there are semirings and rings I could avail myself of but I am not instinctively inclined to see things that way yet
2020-09-20 20:03:10 +0200 <Cale> What's wrong with it apart from Int not being an integral domain?
2020-09-20 20:03:28 +0200 <Cale> (I'm not very familiar with purescript)
2020-09-20 20:04:13 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de)
2020-09-20 20:04:42 +0200 <hyperisco> I stopped investigating at that point, I don't know if anything else is wrong
2020-09-20 20:04:59 +0200Sgeo(~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-09-20 20:05:25 +0200maralornthinks, that trying to closely match any detailed mathematical hierarchy is to rigid. I guess Num is okayish. But I think I would go for more finegrained classes if someone forced me to think of a "correct" definition. Like have one for addition, another one for subtraction, one for multiplication, one or I guess two for division ...
2020-09-20 20:05:25 +0200AlterEgo__(~ladew@124-198-158-163.dynamic.caiway.nl)
2020-09-20 20:05:31 +0200AlterEgo__(~ladew@124-198-158-163.dynamic.caiway.nl) (Remote host closed the connection)
2020-09-20 20:05:55 +0200 <hyperisco> I was doing something or other with Euclidean spaces I think and it became relevant to have actual an actual Euclidean ring
2020-09-20 20:06:15 +0200 <hyperisco> even the approximation of Double is more palatable than Int
2020-09-20 20:06:50 +0200 <hyperisco> but literally the all-powerful overloaded syntax argument was wheeled out to defend it
2020-09-20 20:07:17 +0200 <hyperisco> and if you're going to do that, I say Num was better
2020-09-20 20:07:22 +0200andreas303(~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
2020-09-20 20:07:35 +0200 <hyperisco> lawless, no one ought to care that much about it, just a bag of overloaded names
2020-09-20 20:08:01 +0200hiroaki(~hiroaki@2a02:908:4b14:d500:8d4c:a111:9cac:718b) (Ping timeout: 272 seconds)
2020-09-20 20:08:16 +0200 <hyperisco> problem is, people aren't viewing this right, and I know it
2020-09-20 20:09:17 +0200 <hyperisco> if you started caring about, say, a Euclidean ring generically, ie the only thing important is the Euclidean ring itself, not any particular instances
2020-09-20 20:09:40 +0200 <Cale> Wait, Double isn't a useful approximation of a Euclidean domain... except in a trivial way
2020-09-20 20:09:44 +0200 <hyperisco> then you'd be upset that after going through that work it could be instantiated with potentially program-crashing instances
2020-09-20 20:10:23 +0200 <Cale> Fields are technically Euclidean domains, they're not very interesting ones though.
2020-09-20 20:10:33 +0200andreas303(~andreas@gateway/tor-sasl/andreas303)
2020-09-20 20:13:05 +0200 <hyperisco> all I am saying is that I prefer the problems of Double to the problems of Int
2020-09-20 20:13:19 +0200 <Cale> ah
2020-09-20 20:14:01 +0200merijnjust embraced anarchy and lawlessness
2020-09-20 20:14:14 +0200 <merijn> Seems better for my blood pressure :p
2020-09-20 20:15:06 +0200xerox_(~xerox@unaffiliated/xerox) (Ping timeout: 272 seconds)
2020-09-20 20:15:12 +0200jespada(~jespada@148.252.133.47) (Quit: Sleeping)
2020-09-20 20:16:52 +0200 <hyperisco> I appreciate how rarified the atmosphere is to be arguing with Haskellers over their precision
2020-09-20 20:17:31 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 20:17:54 +0200 <Cale> I just think I'd rather save a proper Ring class hierarchy for when we get dependent types, and even then, it probably doesn't need to be in the Prelude.
2020-09-20 20:18:33 +0200 <hyperisco> what can we gain from dts here?
2020-09-20 20:18:49 +0200 <Cale> Then you can add the actual laws as methods
2020-09-20 20:19:10 +0200 <hyperisco> oh well I feel like that is a broader discussion about how class laws are treated
2020-09-20 20:20:20 +0200 <hyperisco> Idris chose to have lawful and lawless versions of each class, and that seems odd
2020-09-20 20:21:17 +0200 <Cale> I think it makes sense if you try to use the lawful ones and don't enjoy wasting your time convincing the computer :P
2020-09-20 20:21:29 +0200 <MarcelineVQ> that's because idris isn't a proof assistant, it's a gp programming language, and a gp language should endeavor to be useable
2020-09-20 20:21:53 +0200laen_(~laen_@s91904426.blix.com)
2020-09-20 20:22:01 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 20:22:02 +0200 <hyperisco> that is fine but why is that the chosen escape hatch
2020-09-20 20:22:11 +0200 <hyperisco> because another option is to just leave the proofs as TODOs
2020-09-20 20:22:16 +0200 <MarcelineVQ> There's other escape hatches, what problem are we escaping?
2020-09-20 20:23:05 +0200 <geekosaur> carrying around proofs that your typeclass instances are law-abiding
2020-09-20 20:23:20 +0200nibbling(~nibbling@165.227.18.242) (Quit: WeeChat 2.6)
2020-09-20 20:23:21 +0200 <Cale> The proposition might actually be untrue, but you might know that the extent to which it's untrue doesn't matter to you
2020-09-20 20:23:35 +0200 <Cale> (like in the case of most uses of Double for arithmetic)
2020-09-20 20:23:52 +0200 <hyperisco> I'd expect in Haskell, if we had such lawful classes, we could write in error "TODO" or some such instead of a proof
2020-09-20 20:23:57 +0200 <MarcelineVQ> The issue with providing an instance that claims to enforce laws and then not enforcing them is that you have users, and users and surprises are a bad combination
2020-09-20 20:24:45 +0200 <hyperisco> I don't feel like that tracks with the pragmatism argument though
2020-09-20 20:25:05 +0200 <MarcelineVQ> As a user I pragmatically don't like surprises :X
2020-09-20 20:25:35 +0200 <hyperisco> if I make a library do I require you to give me lawful or lawless instances?
2020-09-20 20:25:45 +0200 <phadej> Cale: it's fun (when you think about it) that there's plenty of research how to make computing with IEEE754 less-imprecise / numerically stable / ...
2020-09-20 20:25:47 +0200 <hyperisco> I'm deciding what work you need to do for me, at that point
2020-09-20 20:26:16 +0200 <phadej> Cale: and all of that is thrown away when you try to fit into (just) + and * of Ring class (for example)
2020-09-20 20:26:31 +0200 <phadej> repeating what I said, it is a wrong abstraction
2020-09-20 20:27:08 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2020-09-20 20:27:09 +0200 <hyperisco> on the flip, you give me a lawful instance and it is not truly law-abiding, I'll be upset, true
2020-09-20 20:27:13 +0200 <phadej> something as 'basic' as FMA
2020-09-20 20:27:51 +0200 <phadej> https://gitlab.haskell.org/ghc/ghc/-/issues/10364 :(
2020-09-20 20:27:52 +0200 <Cale> In what way do we throw out numerical stability analysis?
2020-09-20 20:28:14 +0200 <phadej> e.g. not offering fma, for example
2020-09-20 20:28:28 +0200 <Cale> Oh, I see, you just want more operations
2020-09-20 20:28:36 +0200 <Cale> I don't think that requires removing + and *
2020-09-20 20:29:09 +0200 <hyperisco> Cale, it is just that if Double actually works then probably the algebraic structure never mattered
2020-09-20 20:29:16 +0200 <MarcelineVQ> "<hyperisco> I'm deciding what work you need to do for me, at that point" Indeed, that's an issue with laws at api boundries, it's also why I so far advocate to not let dependent types into your api's.
2020-09-20 20:29:30 +0200 <hyperisco> the issue of perspective I am seeing is that people argue from a specific instance, rather than arguing from the algebraic structure
2020-09-20 20:29:33 +0200 <Cale> hyperisco: It *approximately* matters :)
2020-09-20 20:29:38 +0200 <hyperisco> and that is how we get syntax arguments
2020-09-20 20:30:19 +0200 <Cale> The algebraic laws are stated as equations, while what the application probably needed was only inequalities which bounded those things to be true within some interval of error
2020-09-20 20:30:49 +0200 <Cale> and only for values in a particular range
2020-09-20 20:30:56 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 20:32:04 +0200 <hyperisco> fine, but still did the generalisation of that structure, realised as a type class, ever matter
2020-09-20 20:32:12 +0200__monty__(~toonn@unaffiliated/toonn)
2020-09-20 20:32:34 +0200 <hyperisco> and I'm not saying you're making this argument
2020-09-20 20:33:34 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.)
2020-09-20 20:34:45 +0200 <Cale> Not all that much, but it allowed for overloading, and possibly some reuse of functions defined in terms of Num which aren't part of it
2020-09-20 20:36:24 +0200 <Cale> phadej: I think to start with, we should have all the operations like fma but not in a class.
2020-09-20 20:36:37 +0200 <Cale> (maybe in their own class)
2020-09-20 20:37:03 +0200 <phadej> Cale: I'd argue that Double shouldn't be Num (or whatever Ring) to begin with
2020-09-20 20:37:03 +0200 <Cale> Presumably that could be done as a library, though perhaps it's worth wiring the operations into GHC...
2020-09-20 20:37:36 +0200 <Cale> Meh, it's got operations which roughly correspond to the operations of Num to the point that the meanings of things are predictable.
2020-09-20 20:37:37 +0200 <phadej> if you really want, then there could be a newtype wrapping IEEE754 type and pretending it's a Num (or Ring)
2020-09-20 20:38:28 +0200jespada(~jespada@90.254.241.6)
2020-09-20 20:38:36 +0200 <Cale> I don't think there's all that much value in making it any less convenient to add and multiply Double values
2020-09-20 20:39:01 +0200 <Cale> Or interpret integer literals as Double values, for that matter
2020-09-20 20:39:15 +0200 <hyperisco> biased way to put it but sure, I'd prefer not to lose that
2020-09-20 20:39:25 +0200son0p(~son0p@186.159.4.142) (Ping timeout: 240 seconds)
2020-09-20 20:39:39 +0200jespada(~jespada@90.254.241.6) (Read error: Connection reset by peer)
2020-09-20 20:40:28 +0200 <Cale> It's hard to see how kicking Double out of Num is going to result in the same level of convenience even -- at the very least, you're going to have to choose new, slightly more awkward names for the operations -- we're basically out of single-character infix operators
2020-09-20 20:41:12 +0200jespada(~jespada@90.254.241.6)
2020-09-20 20:41:27 +0200 <Cale> and then you lose all the things which were written to work with an arbitrary instance of Num, many of which still make sense for Double
2020-09-20 20:42:22 +0200 <hyperisco> I sometimes hate our editing tools too
2020-09-20 20:42:51 +0200 <Cale> Our keyboards need more keys
2020-09-20 20:43:02 +0200ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2020-09-20 20:43:24 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-09-20 20:43:36 +0200 <hyperisco> one idea is to decouple the notion of overloading
2020-09-20 20:43:49 +0200ukari(~ukari@unaffiliated/ukari)
2020-09-20 20:44:29 +0200xerox_(~xerox@unaffiliated/xerox)
2020-09-20 20:44:33 +0200 <Cale> Add a subclass of Num called Ring, with no additional operations, but more laws
2020-09-20 20:44:38 +0200 <hyperisco> basically what Num does now, at least the report version
2020-09-20 20:44:53 +0200mpereira(~mpereira@2a02:810d:f40:d96:b46b:1e98:8653:4550) (Remote host closed the connection)
2020-09-20 20:44:59 +0200 <Cale> and then things which truly care that they have a proper Ring can demand it
2020-09-20 20:45:47 +0200 <phadej> Ring is wrong for Natural
2020-09-20 20:46:15 +0200 <phadej> even without thinking about Double :)
2020-09-20 20:46:33 +0200 <hyperisco> a trouble being that Num defines a lot of syntax, more than say a semiring would want
2020-09-20 20:47:02 +0200 <hyperisco> I guess this is the Idris lawful/lawless duality all over again
2020-09-20 20:47:30 +0200 <hyperisco> one is just syntax, the other adds semantics
2020-09-20 20:47:56 +0200 <hyperisco> maybe just a different mechanism is warranted, than type classes
2020-09-20 20:48:09 +0200 <hyperisco> C++ has macros, by preprocessor or template
2020-09-20 20:48:15 +0200 <hyperisco> it isn't a shining example but it is more truthful
2020-09-20 20:48:24 +0200juuandyy(~juuandyy@90.166.144.65) (Ping timeout: 260 seconds)
2020-09-20 20:49:01 +0200 <phadej> I also don't know how much Ocaml people hate the difference between + and .+
2020-09-20 20:49:39 +0200 <phadej> whether the dotted operators are driving people crazy and into Haskell
2020-09-20 20:49:52 +0200 <hyperisco> I suspect the best way to solve this is with the editor / code viewer
2020-09-20 20:49:53 +0200 <[exa]> is there a squiggly variant of + in utf8 that could mark the approximate + on doubles etc ?
2020-09-20 20:50:14 +0200 <[exa]> because this is really just ascii problem
2020-09-20 20:50:14 +0200 <hyperisco> but that upends probably the most entrenched aspect of programming
2020-09-20 20:51:06 +0200 <hyperisco> I already use compose sequences to type things like →
2020-09-20 20:51:08 +0200 <ski>
2020-09-20 20:51:10 +0200 <ski> maybe ?
2020-09-20 20:51:31 +0200 <[exa]> looks too precise
2020-09-20 20:52:26 +0200 <ski>
2020-09-20 20:52:32 +0200 <hyperisco> if the same symbol was used in two ways then all I'd ask is there be some subtle indication of overloading, be it by colour or an extra mark (especially for the colourblind)
2020-09-20 20:52:42 +0200 <hyperisco> and the editor affords a way to unmask the overload
2020-09-20 20:53:01 +0200 <[exa]> ski: that's a strong candidate!
2020-09-20 20:53:18 +0200 <hyperisco> so then we don't have to play the unicode game either
2020-09-20 20:53:19 +0200shad0w_(~shad0w_@160.202.36.27) (Remote host closed the connection)
2020-09-20 20:53:56 +0200 <ski> (there's ⌜⨦⌝, too)
2020-09-20 20:54:04 +0200 <hyperisco> in other words, there is a difference of syntax representation in a way somewhat similar to the compose sequences I use
2020-09-20 20:54:23 +0200 <hyperisco> I have multiple ways to type → say, but they present the same
2020-09-20 20:55:06 +0200 <hyperisco> and all I'd want to know is that 1) → represents more than one sequence and 2) which sequence it represents, but I only need to know (2) by explicitly asking
2020-09-20 20:55:23 +0200orion(~orion@c-76-19-238-5.hsd1.nh.comcast.net)
2020-09-20 20:55:23 +0200orion(~orion@c-76-19-238-5.hsd1.nh.comcast.net) (Changing host)
2020-09-20 20:55:23 +0200orion(~orion@unaffiliated/orion)
2020-09-20 20:55:31 +0200 <hyperisco> so then we can have + and .+ and whatever, and these present both as +
2020-09-20 20:55:56 +0200 <hyperisco> plus some signal it is overloaded
2020-09-20 20:56:51 +0200 <hyperisco> and all this without having to go off the deep end of projectional editing
2020-09-20 20:57:40 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Remote host closed the connection)
2020-09-20 20:58:10 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz)
2020-09-20 20:58:17 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 21:00:27 +0200sfvm(~sfvm@37.228.215.148)
2020-09-20 21:00:41 +0200adam_wespiser(~adam_wesp@209.6.42.110)
2020-09-20 21:00:45 +0200abhixec(~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
2020-09-20 21:01:18 +0200abhixec(~abhixec@c-67-169-141-95.hsd1.ca.comcast.net)
2020-09-20 21:01:20 +0200 <sm[m]> I don't suppose there's any easy way to tell GHCI to use the extensions configured for a particular module ?
2020-09-20 21:01:48 +0200adam_wespiseradamwespiser
2020-09-20 21:02:33 +0200 <adamwespiser> On load, you should be able to load a specific module, if I recall correctly, and in that module can be your extensions
2020-09-20 21:02:55 +0200 <geekosaur> but that doesn't set them for interactive use
2020-09-20 21:02:57 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Ping timeout: 260 seconds)
2020-09-20 21:03:08 +0200 <sm[m]> right
2020-09-20 21:03:10 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 258 seconds)
2020-09-20 21:03:12 +0200Dolly(585fd1fd@ti0203q160-5312.bb.online.no) (Remote host closed the connection)
2020-09-20 21:03:18 +0200 <geekosaur> nor does having multiple modules loaded and switching between them
2020-09-20 21:03:31 +0200 <sm[m]> I'm always being thwarted by mismatches between the module and ghci
2020-09-20 21:03:33 +0200Lycurgus(~niemand@98.4.96.130) (Quit: Exeunt)
2020-09-20 21:04:11 +0200 <geekosaur> (and this is often a feature, consider ExtendedDefaultRules which you probably don't want turned off by loading a module)
2020-09-20 21:04:16 +0200 <sm[m]> I guess I can make some shorter aliases to turn them on/off
2020-09-20 21:05:32 +0200 <ddellacosta> kind of a nix question, but can anyone tell me (or point me at docs for) how to override a dependency in a nix Haskell project with a local version of that package which I've compiled myself? Basically I just want to install my copy of the library just for that Haskell project
2020-09-20 21:06:35 +0200 <sm[m]> on another note, if anyone here has experience with sdl2, I have questions. Eg, why does destroyWindow not get rid of the window when running in GHCI. And, why does kill -TERM not kill a sdl app, it must be kill -KILL
2020-09-20 21:08:35 +0200bennofs(~quassel@dslb-178-000-064-245.178.000.pools.vodafone-ip.de)
2020-09-20 21:09:04 +0200thir(~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de)
2020-09-20 21:10:47 +0200shafox(~shafox@106.51.234.111) (Remote host closed the connection)
2020-09-20 21:12:34 +0200howdoi(uid224@gateway/web/irccloud.com/x-dtashatgyjqumlie) (Quit: Connection closed for inactivity)
2020-09-20 21:12:44 +0200bennofs_(~quassel@dslb-188-106-250-199.188.106.pools.vodafone-ip.de) (Ping timeout: 272 seconds)
2020-09-20 21:13:04 +0200notzmv``(~user@177.103.86.92)
2020-09-20 21:14:02 +0200thir(~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-09-20 21:15:24 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Remote host closed the connection)
2020-09-20 21:16:00 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net)
2020-09-20 21:16:05 +0200notzmv`(~user@177.103.86.92) (Ping timeout: 240 seconds)
2020-09-20 21:17:41 +0200cosimone(~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6)
2020-09-20 21:18:44 +0200 <koz_> Is there a good way to generate a Text randomly which _is_ valid UTF-8, but _not_ valid Latin-1?
2020-09-20 21:19:24 +0200 <geekosaur> I don't think there's an invalid Latin-1
2020-09-20 21:19:52 +0200 <geekosaur> unless you mean embedded control codes or similar, but that would also apply to UTF-8
2020-09-20 21:19:55 +0200 <koz_> I think I'm being imprecise, sorry. I want to generate Text which contains at least one grapheme requiring a multi-byte encoding in UTF-8.
2020-09-20 21:20:05 +0200 <koz_> What's a good way to do this?
2020-09-20 21:20:16 +0200josh(~josh@c-67-164-104-206.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
2020-09-20 21:20:28 +0200 <phadej> arbitrary ++ [multibytechar] ++ arbitrary
2020-09-20 21:20:51 +0200 <adamwespiser> If you have a bytestring, I might use Data.Text.Encoding for that task
2020-09-20 21:20:53 +0200 <geekosaur> include at least one grapheme with a codepoint > 255
2020-09-20 21:21:04 +0200 <phadej> geekosaur: >=128
2020-09-20 21:21:16 +0200 <phadej> but >255 would work too
2020-09-20 21:21:24 +0200 <geekosaur> no, because 128..255 are valid Latin-1
2020-09-20 21:21:36 +0200 <phadej> at least one grapheme requiring a multi-byte encoding in UTF-8.
2020-09-20 21:21:39 +0200 <koz_> phadej: Yeah, that's a good point.
2020-09-20 21:21:44 +0200 <koz_> Thanks!
2020-09-20 21:21:52 +0200 <phadej> codepoint 128 is encoded as two bytes
2020-09-20 21:22:04 +0200 <phadej> up to koz_ to refine the specification
2020-09-20 21:22:19 +0200 <koz_> phadej: The basic idea works well though.
2020-09-20 21:22:28 +0200 <koz_> Thanks for the suggestion.
2020-09-20 21:24:58 +0200hackagestm-queue 0.1.2.0 - An implementation of a real-time concurrent queue https://hackage.haskell.org/package/stm-queue-0.1.2.0 (sgschlesinger)
2020-09-20 21:26:09 +0200bahamas(~lucian@unaffiliated/bahamas)
2020-09-20 21:30:27 +0200hackageWin32 2.10.0.0 - A binding to Windows Win32 API. https://hackage.haskell.org/package/Win32-2.10.0.0 (TamarChristina)
2020-09-20 21:30:50 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2020-09-20 21:31:00 +0200niHiggim(~manjaro-u@2606-a000-4545-ba00-0000-0000-0000-0006.inf6.spectrum.com)
2020-09-20 21:32:06 +0200knupfer1(~Thunderbi@200116b82c2770004d12026ebf4c4ad8.dip.versatel-1u1.de)
2020-09-20 21:32:08 +0200knupfer(~Thunderbi@i59F7FF48.versanet.de) (Quit: knupfer)
2020-09-20 21:32:08 +0200knupfer1knupfer
2020-09-20 21:33:32 +0200ryansmccoy(~ryansmcco@193.37.254.27) (Ping timeout: 256 seconds)
2020-09-20 21:34:17 +0200ryansmccoy(~ryansmcco@156.96.151.132)
2020-09-20 21:36:03 +0200mirrorbird(~psutcliff@2a00:801:44a:a00b:20c3:c64:eb15:73a2) (Ping timeout: 272 seconds)
2020-09-20 21:38:17 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser) (Ping timeout: 260 seconds)
2020-09-20 21:42:31 +0200fendor(~fendor@77.119.128.171.wireless.dyn.drei.com) (Remote host closed the connection)
2020-09-20 21:49:19 +0200fendor(~fendor@77.119.128.171.wireless.dyn.drei.com)
2020-09-20 21:49:45 +0200solonarv(~solonarv@astrasbourg-653-1-186-165.w90-13.abo.wanadoo.fr) (Ping timeout: 260 seconds)
2020-09-20 21:51:25 +0200niHiggim(~manjaro-u@2606-a000-4545-ba00-0000-0000-0000-0006.inf6.spectrum.com) (Quit: Konversation terminated!)
2020-09-20 21:56:23 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net)
2020-09-20 21:57:26 +0200ukari(~ukari@unaffiliated/ukari) (Remote host closed the connection)
2020-09-20 22:00:52 +0200auri__(~auri_@fsf/memeber/auri-) (Ping timeout: 246 seconds)
2020-09-20 22:02:27 +0200auri_(~auri_@fsf/memeber/auri-)
2020-09-20 22:03:02 +0200tsrt^(tsrt@ip98-184-89-2.mc.at.cox.net) ()
2020-09-20 22:03:45 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-09-20 22:03:58 +0200shatriff(~vitaliish@176.52.219.10)
2020-09-20 22:04:17 +0200ntwhaaci^(ntwhaaci@ip98-184-89-2.mc.at.cox.net)
2020-09-20 22:04:22 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-09-20 22:04:39 +0200shatriff(~vitaliish@176.52.219.10)
2020-09-20 22:05:05 +0200shatriff(~vitaliish@176.52.219.10) (Remote host closed the connection)
2020-09-20 22:05:07 +0200wroathe(~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Quit: leaving)
2020-09-20 22:06:48 +0200jobor_(~jobor@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:07:02 +0200juuandyy(~juuandyy@90.166.144.65)
2020-09-20 22:08:44 +0200jobor_(~jobor@83.24.161.211.ipv4.supernova.orange.pl) (Client Quit)
2020-09-20 22:09:09 +0200hekkaidekapus(~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
2020-09-20 22:09:33 +0200johnyb(~johnyb@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:09:51 +0200hekkaidekapus(~tchouri@gateway/tor-sasl/hekkaidekapus)
2020-09-20 22:09:53 +0200geekosaur(ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Remote host closed the connection)
2020-09-20 22:11:38 +0200bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 272 seconds)
2020-09-20 22:14:21 +0200g-belmonte(~g-belmont@2804:14c:8786:9312:3638:eaf5:dc36:146d)
2020-09-20 22:16:49 +0200 <kindaro> Is there a nice library for logging messages in IO to standard output/error?
2020-09-20 22:17:18 +0200 <kindaro> Like a fancy `putStrLn`, yes.
2020-09-20 22:17:41 +0200 <merijn> @hackage monad-logger
2020-09-20 22:17:41 +0200 <lambdabot> https://hackage.haskell.org/package/monad-logger
2020-09-20 22:17:47 +0200 <Uniaika> co-log exists too
2020-09-20 22:17:47 +0200 <merijn> And a billion others :p
2020-09-20 22:17:50 +0200 <[exa]> logging?
2020-09-20 22:17:58 +0200 <[exa]> ^^ actual package name
2020-09-20 22:18:07 +0200johnyb(~johnyb@83.24.161.211.ipv4.supernova.orange.pl) (Quit: Leaving...)
2020-09-20 22:18:22 +0200 <kindaro> No, these are not in IO, they have their own transformer or something.
2020-09-20 22:18:37 +0200 <merijn> What I like about monad-logger is that you can start out lazy just using LoggingT and then you can easily later replace it and implement your own stuff
2020-09-20 22:18:40 +0200 <merijn> eh
2020-09-20 22:18:48 +0200 <merijn> Well, then "hPutStrLn"? :p
2020-09-20 22:19:13 +0200 <[exa]> kindaro: https://hackage.haskell.org/package/logging even says "in IO"
2020-09-20 22:19:14 +0200 <ddellacosta> kindaro: logging that [exa] mentioned is just in IO I thought
2020-09-20 22:19:22 +0200 <ddellacosta> lol jinx
2020-09-20 22:19:30 +0200 <[exa]> :]
2020-09-20 22:19:30 +0200 <kindaro> I see `logging` has `log :: Text -> IO ()` — that I like.
2020-09-20 22:20:46 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e)
2020-09-20 22:22:40 +0200johnyb(5318a1d3@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:24:29 +0200ggole(~ggole@2001:8003:8119:7200:a81f:ad25:a0f4:9303) (Quit: Leaving)
2020-09-20 22:25:18 +0200 <kindaro> By the way, I see `logging` is using the idiom of `logLevel = unsafePerformIO $ newIORef LevelDebug` for initializing an implicit global state. I know that `random` recently removed a similar feature. Has there been research that shows definitely that such use of `unsafePerformIO` is either safe or unsafe?
2020-09-20 22:25:27 +0200mariatsji(~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) (Ping timeout: 272 seconds)
2020-09-20 22:25:48 +0200borne(~fritjof@200116b86490460022497ba62715fb72.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
2020-09-20 22:26:59 +0200 <kindaro> Particularly, see this explanation: https://github.com/haskell/random/issues/57#issuecomment-649473745
2020-09-20 22:27:20 +0200 <kindaro> I am divided on this technique since then — should I like or dislike it?
2020-09-20 22:27:25 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 22:28:12 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 22:29:12 +0200 <[exa]> kindaro: unsafePerformIO is often quite practical, like for tracing
2020-09-20 22:29:45 +0200borne(~fritjof@200116b86490460022497ba62715fb72.dip.versatel-1u1.de)
2020-09-20 22:29:47 +0200 <Cale> I dislike it just because it means that only one usage is possible. It's fine to use mutable stuff, but it would make more sense to have a little bundle of mutable state containing a handle for where the log message was going, together with the current log level perhaps
2020-09-20 22:30:06 +0200 <kindaro> Not sure I follow.
2020-09-20 22:30:21 +0200 <Cale> I guess the assumption here is that the log is only going to stderr
2020-09-20 22:30:26 +0200polyphem(~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Read error: Connection reset by peer)
2020-09-20 22:30:37 +0200 <Cale> But say multiple libraries decide to use this log library
2020-09-20 22:30:53 +0200 <Cale> Then they might interfere with each other when it comes to setting their log level
2020-09-20 22:30:56 +0200johnybJonathanB
2020-09-20 22:31:10 +0200JonathanBJonatanB
2020-09-20 22:31:18 +0200 <Cale> One library can't have a different log level than the other, even if it might appear that way, because some initialisation function takes a log level
2020-09-20 22:31:22 +0200 <Cale> (and sets it)
2020-09-20 22:31:48 +0200 <Cale> Just because they accidentally both used logging
2020-09-20 22:32:08 +0200 <c_wraith> I'd probably argue libraries should never set the log level anyway, but that's beside the point a bit. With the point being that there are ways to design it that don't involve unsafePerformIO
2020-09-20 22:32:58 +0200polyphem(~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2020-09-20 22:33:12 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2020-09-20 22:33:21 +0200 <Cale> Well, they might set the log level according to what the user of the library requests
2020-09-20 22:33:41 +0200 <Cale> But yeah, I suppose if you're using 'logging', you don't really do that
2020-09-20 22:34:06 +0200 <Cale> because it doesn't make sense, as you can't really have a distinct logging level from any other library which is using it
2020-09-20 22:34:09 +0200JonatanBjonatanb
2020-09-20 22:36:42 +0200 <jonatanb> \nick jobo
2020-09-20 22:37:19 +0200jonatanb(5318a1d3@83.24.161.211.ipv4.supernova.orange.pl) (Remote host closed the connection)
2020-09-20 22:37:33 +0200jonatanb`(~user@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:38:13 +0200sense(uid464711@gateway/web/irccloud.com/x-rdruibjtxeskwext) (Quit: Connection closed for inactivity)
2020-09-20 22:38:23 +0200jonatanb`(~user@83.24.161.211.ipv4.supernova.orange.pl) (Client Quit)
2020-09-20 22:38:57 +0200jonatanb(~user@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:41:20 +0200jonatanb27(5318a1d3@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:41:34 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2020-09-20 22:42:20 +0200heatsink(~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-09-20 22:42:32 +0200jonatanb27(5318a1d3@83.24.161.211.ipv4.supernova.orange.pl) (Remote host closed the connection)
2020-09-20 22:43:05 +0200bahamas(~lucian@188.24.181.166)
2020-09-20 22:43:05 +0200bahamas(~lucian@188.24.181.166) (Changing host)
2020-09-20 22:43:05 +0200bahamas(~lucian@unaffiliated/bahamas)
2020-09-20 22:44:58 +0200coot(~coot@37.30.49.42.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2020-09-20 22:47:37 +0200mirk0_(~mirko@unaffiliated/-mirko-/x-2946915)
2020-09-20 22:47:38 +0200lep-delete(~lep@94.31.82.44) (Read error: Connection reset by peer)
2020-09-20 22:47:55 +0200lep-delete(~lep@94.31.82.44)
2020-09-20 22:48:05 +0200bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 260 seconds)
2020-09-20 22:48:46 +0200jonatanb(~user@83.24.161.211.ipv4.supernova.orange.pl) (Quit: ERC (IRC client for Emacs 26.3))
2020-09-20 22:49:08 +0200tabemann(~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Ping timeout: 260 seconds)
2020-09-20 22:49:21 +0200jonatanb(~jonatanb@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 22:49:22 +0200justanotheruser(~justanoth@unaffiliated/justanotheruser)
2020-09-20 22:51:47 +0200danso(~dan@107-190-41-58.cpe.teksavvy.com) (Read error: Connection reset by peer)
2020-09-20 22:51:47 +0200dansho(~dansho@ip68-108-167-185.lv.lv.cox.net) (Ping timeout: 240 seconds)
2020-09-20 22:51:58 +0200hackageRasterific 0.7.5.3 - A pure haskell drawing engine. https://hackage.haskell.org/package/Rasterific-0.7.5.3 (VincentBerthoux)
2020-09-20 22:52:56 +0200danso(~dan@107-190-41-58.cpe.teksavvy.com)
2020-09-20 22:52:59 +0200aidecoe(~aidecoe@unaffiliated/aidecoe) (Ping timeout: 240 seconds)
2020-09-20 22:53:59 +0200lagothrix(~lagothrix@unaffiliated/lagothrix) (Read error: Connection reset by peer)
2020-09-20 22:54:49 +0200lagothrix(~lagothrix@unaffiliated/lagothrix)
2020-09-20 22:59:05 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz)
2020-09-20 22:59:12 +0200aidecoe(~aidecoe@unaffiliated/aidecoe)
2020-09-20 22:59:45 +0200juuandyy(~juuandyy@90.166.144.65) (Ping timeout: 260 seconds)
2020-09-20 23:00:02 +0200laen_(~laen_@s91904426.blix.com) ()
2020-09-20 23:00:13 +0200ryansmccoy(~ryansmcco@156.96.151.132) (Ping timeout: 260 seconds)
2020-09-20 23:00:37 +0200ryansmccoy(~ryansmcco@156.96.151.132)
2020-09-20 23:01:03 +0200knupfer(~Thunderbi@200116b82c2770004d12026ebf4c4ad8.dip.versatel-1u1.de) (Quit: knupfer)
2020-09-20 23:01:25 +0200knupfer(~Thunderbi@200116b82c27700031ead27836249122.dip.versatel-1u1.de)
2020-09-20 23:01:26 +0200knupfer(~Thunderbi@200116b82c27700031ead27836249122.dip.versatel-1u1.de) (Client Quit)
2020-09-20 23:01:42 +0200 <lechner> sm[m]: not sure what you are doing with sdl2, but maybe this helps https://discourse.libsdl.org/t/mac-os-x-avoid-the-sdl-to-catch-sigterm-and-sigint-signals/27357
2020-09-20 23:01:45 +0200knupfer(~Thunderbi@200116b82c277000ad37883ab022eaf9.dip.versatel-1u1.de)
2020-09-20 23:01:56 +0200knupfer1(~Thunderbi@200116b82c277000b09f08f0bf52a637.dip.versatel-1u1.de)
2020-09-20 23:01:56 +0200knupfer1(~Thunderbi@200116b82c277000b09f08f0bf52a637.dip.versatel-1u1.de) (Read error: Connection reset by peer)
2020-09-20 23:02:03 +0200knupfer(~Thunderbi@200116b82c277000ad37883ab022eaf9.dip.versatel-1u1.de) (Read error: Connection reset by peer)
2020-09-20 23:02:11 +0200knupfer(~Thunderbi@200116b82c277000646991969a0bc875.dip.versatel-1u1.de)
2020-09-20 23:02:15 +0200knupfer(~Thunderbi@200116b82c277000646991969a0bc875.dip.versatel-1u1.de) (Client Quit)
2020-09-20 23:02:34 +0200kindaro(5f6e6241@h95-110-98-65.dyn.bashtel.ru) (Ping timeout: 245 seconds)
2020-09-20 23:02:37 +0200jonatanb(~jonatanb@83.24.161.211.ipv4.supernova.orange.pl) (Quit: Leaving...)
2020-09-20 23:02:45 +0200jonatanb(~jonatanb@83.24.161.211.ipv4.supernova.orange.pl)
2020-09-20 23:04:18 +0200kenran(~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 258 seconds)
2020-09-20 23:04:39 +0200 <orion> Hi. Does anyone know how to make this typecheck?: https://gist.github.com/centromere/b1f795418d00dff28e2cfcaefd727751
2020-09-20 23:05:00 +0200 <orion> (The package is acid-state)
2020-09-20 23:05:34 +0200 <orion> I realize that the "event" expressed by the type signature is general, whereas I am trying to use it with a more specific type, leading to the error.
2020-09-20 23:05:45 +0200 <orion> I am not sure how to approach the issue though.
2020-09-20 23:05:53 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 23:10:35 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-09-20 23:11:43 +0200Volt_(~Volt_@c-73-145-164-70.hsd1.mi.comcast.net)
2020-09-20 23:14:14 +0200oxide(~lambda@unaffiliated/mclaren) (Ping timeout: 260 seconds)
2020-09-20 23:15:11 +0200bahamas(~lucian@unaffiliated/bahamas)
2020-09-20 23:16:14 +0200Tuplanolla(~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
2020-09-20 23:16:27 +0200 <tomsmeding> orion: EventState is a type family; what does 'EventState AppState' resolve to?
2020-09-20 23:16:57 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 258 seconds)
2020-09-20 23:16:58 +0200hackagetermbox 0.3.0 - termbox bindings https://hackage.haskell.org/package/termbox-0.3.0 (mitchellwrosen)
2020-09-20 23:18:13 +0200AlterEgo-(~ladew@124-198-158-163.dynamic.caiway.nl) (Read error: Connection reset by peer)
2020-09-20 23:19:37 +0200bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 246 seconds)
2020-09-20 23:20:55 +0200romtam(~romtam@s91904426.blix.com)
2020-09-20 23:21:53 +0200pingiun(~pingiun@j63019.upc-j.chello.nl) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-09-20 23:23:39 +0200jonatanb(~jonatanb@83.24.161.211.ipv4.supernova.orange.pl) (Quit: Leaving...)
2020-09-20 23:23:41 +0200 <sm[m]> lechner: that looks highly relevant, thanks!
2020-09-20 23:24:59 +0200 <sm[m]> I'm wanting to kill & restart my sdl app on rebuild with entr, which sends SIGTERM
2020-09-20 23:25:37 +0200ahmr88(~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection)
2020-09-20 23:26:43 +0200 <sm[m]> though if I could destroy the window from ghci, I would rather run it with ghcid
2020-09-20 23:38:04 +0200merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2020-09-20 23:38:05 +0200opticblast(~june@075-128-229-153.res.spectrum.com)
2020-09-20 23:41:10 +0200thir(~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de)
2020-09-20 23:41:10 +0200fendor(~fendor@77.119.128.171.wireless.dyn.drei.com) (Read error: Connection reset by peer)
2020-09-20 23:52:56 +0200lortabac(~lortabac@51.158.65.124) (Ping timeout: 256 seconds)
2020-09-20 23:53:17 +0200bahamas(~lucian@unaffiliated/bahamas)
2020-09-20 23:53:53 +0200hyperisco(~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 260 seconds)
2020-09-20 23:54:34 +0200notzmv``notzvm
2020-09-20 23:54:36 +0200notzvmnotzmv
2020-09-20 23:54:45 +0200notzmv(~user@177.103.86.92) (Changing host)
2020-09-20 23:54:45 +0200notzmv(~user@unaffiliated/zmv)
2020-09-20 23:55:30 +0200lortabac(~lortabac@51.158.65.124)
2020-09-20 23:55:40 +0200isovector1(~isovector@node-1w7jr9squrfoy3fci95ksrhpu.ipv6.telus.net)
2020-09-20 23:56:11 +0200 <hyiltiz> What's the design choice of not sugaring `$ do` into something else (like $$ or whatev) in HSpec? I think it is because both $ and do is basic stuff and simply composing them as a basic HSpec operation is also nice, besides it is not too long to type
2020-09-20 23:56:34 +0200 <hyiltiz> Also, sometimes the do is not needed
2020-09-20 23:57:07 +0200 <hyiltiz> So sugaring it to $$ could lead to confusion
2020-09-20 23:57:23 +0200 <edwardk> hyiltiz: ? do is builtin syntax
2020-09-20 23:57:38 +0200 <edwardk> you can use BlockArguments to drop the $ though
2020-09-20 23:58:02 +0200bahamas(~lucian@unaffiliated/bahamas) (Ping timeout: 256 seconds)
2020-09-20 23:58:23 +0200 <hyiltiz> I c it is builtin syntax. I am just wondering why not wrap the EDSL into something less verbose
2020-09-20 23:58:36 +0200 <ski> (`$' is a library operation, though)
2020-09-20 23:59:06 +0200rprije(~rprije@27.143.220.203.dial.dynamic.acc01-myal-dub.comindico.com.au)
2020-09-20 23:59:11 +0200 <hyiltiz> oh wait that $ is overloaded? I thought it was the one from haskell?
2020-09-20 23:59:20 +0200adamwespiser(~adam_wesp@209.6.42.110) (Remote host closed the connection)