2021/11/14

2021-11-14 00:01:23 +0100 <dsal> energizer: I think your thinking is backwards. It's not "how much of a slowdown do you suffer if you disallow mutation" it's "how many bugs do you need to think about if you allow mutation"
2021-11-14 00:01:50 +0100 <c_wraith> energizer: for what it's worth, it's known that under the Random Access Model, an algorithm containing no mutation will never be worse than an O(log n) factor additional work on top of an algorithm containing mutation. This comes from the fact that you can simulate mutable memory with a balanced binary tree.
2021-11-14 00:02:30 +0100 <dsal> We have things like ST that do allow us to put mutation in a box and implement an algorithm inside that box where performance matters, but it's far easier to get to a working solution, even in heavy concurrency and stuff when stuff you're referencing isn't being mutated under you.
2021-11-14 00:02:33 +0100 <energizer> dsal: i'm assuming correct code in my question
2021-11-14 00:03:01 +0100nehsou^(~nehsou@h50.174.139.63.static.ip.windstream.net) (Remote host closed the connection)
2021-11-14 00:03:10 +0100 <geekosaur> I feel like that's "point missed"
2021-11-14 00:03:37 +0100 <maerwald> mutation can be contained reasonably
2021-11-14 00:04:20 +0100 <energizer> geekosaur: i know functional code can be helpful for avoiding bugs but i dont want to introduce other dimensions into the question i'm asking about which is performance.
2021-11-14 00:05:00 +0100 <geekosaur> you're assuming they're disjoint, among other things
2021-11-14 00:05:11 +0100 <dsal> At a level up, do you want it to be easier to make something work correctly, or do you want it to be easier to make something faster?
2021-11-14 00:05:20 +0100 <dsal> Faster is interesting because fast enough is usually a pretty low bar.
2021-11-14 00:05:52 +0100 <energizer> that's not the situation i'm talking about. i'm talking about where "fast enough" is a high bar
2021-11-14 00:06:09 +0100 <dsal> I got tired of obscure, difficult to reproduce mosquitto bugs, so I wrote an mqtt broker in Haskell and didn't look back.
2021-11-14 00:06:33 +0100 <maerwald> c_wraith: that's interesting... I think that might be the only thing you can reasonably assess... "performance" is much more fuzzy. You could pick the same language for both implementations, but even then: maybe the language optimizes for one case better
2021-11-14 00:07:08 +0100 <maerwald> So you're always comparing compilers as well
2021-11-14 00:07:10 +0100 <energizer> c_wraith: i agree that is interesting
2021-11-14 00:07:11 +0100 <dsal> Too much hypothetical here. Immutability makes some things faster. It makes many things easier. Sometimes mutating stuff makes things faster. You can mutate things in those cases, but not completely freely.
2021-11-14 00:08:13 +0100 <energizer> dsal: right. i'm looking to fill in the "some things" and "many things" with some specifics
2021-11-14 00:08:32 +0100 <energizer> ie /which/ things and by how much
2021-11-14 00:09:08 +0100 <energizer> but c_wraith says probably there is no list of these, and i believe them
2021-11-14 00:09:28 +0100 <geekosaur> part of this is the question assumes there is a simple list. I'm not so sure it's simple
2021-11-14 00:09:32 +0100 <dsal> These mostly show up for me in doing Advent of Code or something. Where you have a problem that requires mutating a vector or array in a loop and then yielding a result. I'll do the easy thing first, get an answer/test case and stuff. And then I'll rewrite it with ST and get a speedup.
2021-11-14 00:09:47 +0100 <dsal> It's more like, I encountered a problem and my solution isn't fast enough. How do I make my solution faster?
2021-11-14 00:10:10 +0100 <dsal> There are lots of ways to speed most things up. Most things don't need sped up, but when you have something that does, you have to consider what's making the particular thing slow.
2021-11-14 00:10:33 +0100 <dsal> Sometimes, you just have a bad algorithm. Or you're doing some work more than you need to. Sometimes, you just need to stomp on memory a lot because of how the problem was contrived.
2021-11-14 00:11:00 +0100 <energizer> this is all on the wrong track
2021-11-14 00:11:11 +0100 <energizer> anyway thanks c_wraith
2021-11-14 00:11:45 +0100 <dsal> It's hard to get concrete answers to hypotheticals. Better questions are "I don't think this code is fast enough. How can I speed it up?"
2021-11-14 00:12:51 +0100 <dsal> Sometimes the answers are super not obvious. Like, "Hey, if you use a lazy map here and deleted a bunch of that code there, your solution would be much faster."
2021-11-14 00:12:59 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-11-14 00:13:25 +0100kadir(~kadir@78.178.105.36) (Quit: WeeChat 3.3)
2021-11-14 00:13:54 +0100 <energizer> on another topic. `foldr f (foldr f e ys) xs = foldr f e (xs ++ ys)` one of these is said to be "fused" but i dont know which one
2021-11-14 00:18:24 +0100 <dsal> That might be referring to `{-# RULES "++" [~1] forall xs ys. xs ++ ys = augment (\c n -> foldr c n xs) ys #-}`
2021-11-14 00:19:43 +0100 <maerwald> energizer: for example... I tried the example you linked and I can't observe the performance difference in the article
2021-11-14 00:20:46 +0100 <maerwald> on 135k integers, haskell is 1.34s and C++ 1.29
2021-11-14 00:20:56 +0100johnny_sitar(~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 245 seconds)
2021-11-14 00:21:28 +0100 <energizer> which haskell one?
2021-11-14 00:21:34 +0100 <maerwald> https://koerbitz.me/posts/Efficient-Quicksort-in-Haskell.html
2021-11-14 00:22:19 +0100 <maerwald> but that post is almost 10 years old, so who knows which GHC version was used
2021-11-14 00:22:27 +0100cosimone(~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Quit: ERC (IRC client for Emacs 27.1))
2021-11-14 00:22:35 +0100mvk(~mvk@2607:fea8:5cc3:e900::df92) (Ping timeout: 264 seconds)
2021-11-14 00:24:12 +0100 <dsal> I imagine Haskell has improved more than c++ in that time.
2021-11-14 00:24:26 +0100 <geekosaur> c++ may actually have lost performance
2021-11-14 00:24:33 +0100 <[exa]> relevant: https://arxiv.org/pdf/1908.10926.pdf
2021-11-14 00:24:45 +0100 <geekosaur> I've seen a number of complaints about recent gcc/g++
2021-11-14 00:24:54 +0100 <maerwald> I'm using clang
2021-11-14 00:25:06 +0100ees(~user@pool-108-18-30-46.washdc.fios.verizon.net) (Read error: Connection reset by peer)
2021-11-14 00:25:28 +0100 <geekosaur> davean would have some words about that, although I note that for the uses I have locally clang performs better than g++
2021-11-14 00:26:15 +0100 <geekosaur> (I should say clang++-compiled code performs better than g++-compiled code)
2021-11-14 00:27:41 +0100 <maerwald> and ghc-9.2.1 became slower too it seems :o
2021-11-14 00:28:27 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
2021-11-14 00:29:21 +0100etrepum(uid763@uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2021-11-14 00:29:41 +0100jkaye(~jkaye@2601:281:8300:7530:663a:b6d3:3081:a6b4) (Ping timeout: 245 seconds)
2021-11-14 00:29:56 +0100jbox(~jbox@user/jbox)
2021-11-14 00:30:07 +0100eggplant_(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1) (Remote host closed the connection)
2021-11-14 00:32:08 +0100 <maerwald> and ghc-8.8.4 is fastest so far
2021-11-14 00:32:19 +0100 <sm> :/
2021-11-14 00:32:40 +0100 <maerwald> 9.2.1 takes 1.4s, 8.8.4 1.07s
2021-11-14 00:32:44 +0100 <maerwald> that's large
2021-11-14 00:33:17 +0100 <maerwald> but maybe that's due to changes in inlining behavior or so... it changes frequently
2021-11-14 00:37:25 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds)
2021-11-14 00:37:34 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2021-11-14 00:37:42 +0100msmhbvd^(~msmhbvd@h50.174.139.63.static.ip.windstream.net)
2021-11-14 00:38:39 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
2021-11-14 00:40:49 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-11-14 00:40:57 +0100random-jellyfish(~random-je@user/random-jellyfish)
2021-11-14 00:42:48 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1)
2021-11-14 00:44:21 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 00:47:18 +0100jgeerds(~jgeerds@55d41b94.access.ecotel.net) (Ping timeout: 268 seconds)
2021-11-14 00:48:47 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 00:49:59 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Remote host closed the connection)
2021-11-14 00:51:24 +0100Guest42(~Guest42@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
2021-11-14 00:53:10 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1) (Remote host closed the connection)
2021-11-14 00:56:44 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
2021-11-14 00:59:58 +0100allbery_b(~geekosaur@xmonad/geekosaur)
2021-11-14 00:59:58 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-11-14 01:00:01 +0100allbery_bgeekosaur
2021-11-14 01:00:04 +0100jkaye(~jkaye@2601:281:8300:7530:3c34:ee17:936f:a727)
2021-11-14 01:04:18 +0100zava(~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de) (Quit: WeeChat 3.3)
2021-11-14 01:05:17 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 256 seconds)
2021-11-14 01:05:20 +0100Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
2021-11-14 01:08:13 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
2021-11-14 01:08:37 +0100acidjnk_new3(~acidjnk@p200300d0c736cb18d4b31450c12316ac.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2021-11-14 01:13:26 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Remote host closed the connection)
2021-11-14 01:15:45 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1)
2021-11-14 01:16:09 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 01:21:09 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2021-11-14 01:23:14 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-11-14 01:23:26 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net)
2021-11-14 01:26:32 +0100slice(~slice@user/slice) (Quit: zzz)
2021-11-14 01:28:15 +0100ec(~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
2021-11-14 01:28:36 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2021-11-14 01:29:18 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds)
2021-11-14 01:29:54 +0100Lord_of_Life_Lord_of_Life
2021-11-14 01:31:08 +0100msmhbvd^(~msmhbvd@h50.174.139.63.static.ip.windstream.net) (Remote host closed the connection)
2021-11-14 01:31:17 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2021-11-14 01:31:20 +0100sprout(~quassel@2a02:a467:ccd6:1:34a5:6053:7bcf:2391) (Ping timeout: 265 seconds)
2021-11-14 01:36:16 +0100mmhat(~mmh@55d46755.access.ecotel.net) (Quit: WeeChat 3.3)
2021-11-14 01:39:34 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 01:39:45 +0100machinedgod(~machinedg@24.105.81.50)
2021-11-14 01:43:56 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 01:44:31 +0100mvk(~mvk@2607:fea8:5cc3:e900::df92)
2021-11-14 01:48:21 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Ping timeout: 256 seconds)
2021-11-14 01:48:26 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 245 seconds)
2021-11-14 01:51:26 +0100tcard(~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp)
2021-11-14 02:01:37 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 02:02:00 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Remote host closed the connection)
2021-11-14 02:05:47 +0100aegon(~mike@174.127.249.180) (Remote host closed the connection)
2021-11-14 02:06:10 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
2021-11-14 02:08:18 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 02:08:25 +0100pavonia(~user@user/siracusa)
2021-11-14 02:11:59 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1) (Remote host closed the connection)
2021-11-14 02:12:36 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2021-11-14 02:15:26 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 02:15:55 +0100 <sm> soo.. haskell numbers defeat me again. I want to raise to a power, like ** 1.5. How do I make a `Floating a` ?
2021-11-14 02:16:24 +0100 <sm> also, which is the partial conversion function that should be avoided ? fromIntegral, fromInteger.. ?
2021-11-14 02:16:42 +0100Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 268 seconds)
2021-11-14 02:20:24 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-11-14 02:21:38 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds)
2021-11-14 02:25:02 +0100 <sm> the answer seems to be: more fromIntegral
2021-11-14 02:25:53 +0100 <sm> `tot + round ( fromIntegral tot * 1 ** ((fromIntegral sp - 15) / 10) )`
2021-11-14 02:26:07 +0100harveypwca(~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving)
2021-11-14 02:30:23 +0100jkaye(~jkaye@2601:281:8300:7530:3c34:ee17:936f:a727) (Ping timeout: 264 seconds)
2021-11-14 02:31:22 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk) (Remote host closed the connection)
2021-11-14 02:31:46 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 02:36:39 +0100gdown(~gavin@h69-11-248-109.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
2021-11-14 02:36:39 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1)
2021-11-14 02:37:03 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 268 seconds)
2021-11-14 02:45:23 +0100falafel(~falafel@2603-8000-d800-688c-34f9-26f3-71b0-5b78.res6.spectrum.com)
2021-11-14 02:48:49 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 02:53:47 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
2021-11-14 03:04:24 +0100 <monochrom> @quote monochrom fromIntegral
2021-11-14 03:04:24 +0100 <lambdabot> monochrom says: You've got an Int / But you want Double / Who do you call? / "fromIntegral!"
2021-11-14 03:08:07 +0100falafel(~falafel@2603-8000-d800-688c-34f9-26f3-71b0-5b78.res6.spectrum.com) (Read error: Connection reset by peer)
2021-11-14 03:12:07 +0100notzmv(~zmv@user/notzmv)
2021-11-14 03:12:16 +0100random-jellyfish(~random-je@user/random-jellyfish) (Ping timeout: 256 seconds)
2021-11-14 03:13:14 +0100slice(~slice@user/slice)
2021-11-14 03:16:14 +0100slice_(~slice@user/slice)
2021-11-14 03:16:52 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 03:17:47 +0100slice(~slice@user/slice) (Ping timeout: 264 seconds)
2021-11-14 03:19:12 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-11-14 03:20:53 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2021-11-14 03:21:59 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 264 seconds)
2021-11-14 03:24:54 +0100zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2021-11-14 03:30:35 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
2021-11-14 03:42:16 +0100retro_(~retro@176.255.22.26)
2021-11-14 03:43:03 +0100sander(~sander@user/sander) (Quit: So long! :))
2021-11-14 03:45:30 +0100retroid_(~retro@176.255.22.26) (Ping timeout: 268 seconds)
2021-11-14 03:46:24 +0100sander(~sander@user/sander)
2021-11-14 03:50:49 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net)
2021-11-14 03:50:58 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 03:53:31 +0100xff0x(~xff0x@2001:1a81:526d:df00:b864:176f:3a64:2e83) (Ping timeout: 268 seconds)
2021-11-14 03:54:44 +0100atlas(~jbox@user/jbox)
2021-11-14 03:54:58 +0100xff0x(~xff0x@2001:1a81:52ad:7900:2980:608c:4201:500d)
2021-11-14 03:55:50 +0100waleee(~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3)
2021-11-14 03:55:59 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 268 seconds)
2021-11-14 03:58:23 +0100Maxdamantus(~Maxdamant@user/maxdamantus)
2021-11-14 03:58:35 +0100jbox(~jbox@user/jbox) (Ping timeout: 264 seconds)
2021-11-14 04:05:54 +0100Codaraxis(~Codaraxis@user/codaraxis)
2021-11-14 04:14:01 +0100img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2021-11-14 04:16:11 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 04:17:29 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 04:24:55 +0100img(~img@user/img)
2021-11-14 04:25:40 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 04:27:02 +0100wei2912(~wei2912@138.75.71.147)
2021-11-14 04:30:04 +0100atlasjbox
2021-11-14 04:30:13 +0100jboxatlas
2021-11-14 04:30:31 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 245 seconds)
2021-11-14 04:31:33 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
2021-11-14 04:31:45 +0100retro_(~retro@176.255.22.26) (Ping timeout: 268 seconds)
2021-11-14 04:32:19 +0100atlas(~jbox@user/jbox) (Quit: Leaving)
2021-11-14 04:32:56 +0100retroid_(~retro@176.255.22.26)
2021-11-14 04:33:23 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds)
2021-11-14 04:36:43 +0100jbox(~jbox@user/jbox)
2021-11-14 04:40:13 +0100slack1256(~slack1256@181.42.50.223)
2021-11-14 04:41:37 +0100retroid_(~retro@176.255.22.26) (Ping timeout: 268 seconds)
2021-11-14 04:44:49 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net)
2021-11-14 04:48:33 +0100xkuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2021-11-14 04:50:26 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
2021-11-14 04:55:35 +0100renzhi(~xp@2607:fa49:6500:b100::6e7f) (Ping timeout: 264 seconds)
2021-11-14 04:58:22 +0100td_(~td@muedsl-82-207-238-039.citykom.de) (Ping timeout: 260 seconds)
2021-11-14 05:00:01 +0100shriekingnoise(~shrieking@186.137.144.80) (Quit: Quit)
2021-11-14 05:00:10 +0100td_(~td@muedsl-82-207-238-006.citykom.de)
2021-11-14 05:00:39 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 05:01:03 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 05:01:45 +0100jmorris(uid433911@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-11-14 05:03:12 +0100finn_elija(~finn_elij@user/finn-elija/x-0085643)
2021-11-14 05:03:12 +0100FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2021-11-14 05:03:12 +0100finn_elijaFinnElija
2021-11-14 05:04:25 +0100slack1256(~slack1256@181.42.50.223) (Ping timeout: 256 seconds)
2021-11-14 05:05:22 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2021-11-14 05:06:23 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 264 seconds)
2021-11-14 05:15:20 +0100jmorris(uid433911@hampstead.irccloud.com)
2021-11-14 05:21:38 +0100retroid_(~retro@97e2ba2e.skybroadband.com)
2021-11-14 05:25:23 +0100ralu(~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 256 seconds)
2021-11-14 05:25:43 +0100justsomeguy(~justsomeg@user/justsomeguy)
2021-11-14 05:25:57 +0100rtsn(~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 256 seconds)
2021-11-14 05:26:29 +0100rtsn(~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
2021-11-14 05:31:35 +0100Maxdamantus(~Maxdamant@user/maxdamantus) (Ping timeout: 264 seconds)
2021-11-14 05:35:03 +0100SeungheonOh(~Thunderbi@2600:1700:5168:1400:c39d:a61d:4d11:1e35)
2021-11-14 05:37:15 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 05:40:07 +0100SeungheonOh(~Thunderbi@2600:1700:5168:1400:c39d:a61d:4d11:1e35) (Quit: SeungheonOh)
2021-11-14 05:42:11 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 265 seconds)
2021-11-14 05:46:01 +0100ralu(~ralu@static.211.245.203.116.clients.your-server.de)
2021-11-14 05:52:31 +0100motherfsck(~motherfsc@user/motherfsck) (Quit: quit)
2021-11-14 05:52:47 +0100motherfsck(~motherfsc@user/motherfsck)
2021-11-14 05:53:39 +0100Maxdamantus(~Maxdamant@user/maxdamantus)
2021-11-14 05:54:46 +0100MoC_(~moc@user/moc)
2021-11-14 05:54:51 +0100MoC(~moc@user/moc) (Ping timeout: 256 seconds)
2021-11-14 05:54:58 +0100motherfsck(~motherfsc@user/motherfsck) (Client Quit)
2021-11-14 05:55:43 +0100motherfsck(~motherfsc@user/motherfsck)
2021-11-14 05:58:21 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 06:12:20 +0100yauhsien(~yauhsien@49.216.238.61)
2021-11-14 06:16:18 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 260 seconds)
2021-11-14 06:29:53 +0100zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2021-11-14 06:44:50 +0100slowButPresent(~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-11-14 06:45:10 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 06:46:58 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 06:53:07 +0100vicfred(~vicfred@user/vicfred)
2021-11-14 06:56:15 +0100Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
2021-11-14 06:56:45 +0100Guest80(~Guest80@pd9ed7762.dip0.t-ipconnect.de)
2021-11-14 06:59:23 +0100emergence(~emergence@vm0.max-p.me) (Quit: emergence)
2021-11-14 07:00:02 +0100emergence(~emergence@vm0.max-p.me)
2021-11-14 07:04:00 +0100MoC_MoC
2021-11-14 07:05:56 +0100hughjfchen(~hughjfche@vmi556545.contaboserver.net) (Ping timeout: 245 seconds)
2021-11-14 07:20:59 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-11-14 07:21:10 +0100myShoggoth(~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds)
2021-11-14 07:24:54 +0100yauhsien(~yauhsien@49.216.238.61) (Ping timeout: 260 seconds)
2021-11-14 07:26:04 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 07:32:27 +0100hughjfchen(~hughjfche@vmi556545.contaboserver.net)
2021-11-14 07:35:45 +0100 <energizer> takeWhile f = foldr (\x acc -> if f x then x : acc else []) []
2021-11-14 07:36:15 +0100 <energizer> can someone explain how that's proportional to the length of the output (not the length of the input)
2021-11-14 07:36:35 +0100 <energizer> i assume it's because of nonstrict, but i can't get my head around it
2021-11-14 07:37:41 +0100EvanR(~evan@2600:1700:ba69:10:f592:1a89:999e:d55f)
2021-11-14 07:38:31 +0100 <energizer> ok maybe i get it now
2021-11-14 07:38:38 +0100 <energizer> that's crazy
2021-11-14 07:39:52 +0100 <energizer> ..it is because of nonstrict, right?
2021-11-14 07:40:27 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Remote host closed the connection)
2021-11-14 07:40:59 +0100benin2(~benin@183.82.176.36)
2021-11-14 07:42:10 +0100benin(~benin@183.82.176.36) (Ping timeout: 260 seconds)
2021-11-14 07:42:10 +0100benin2benin
2021-11-14 07:42:36 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 07:45:59 +0100mvk(~mvk@2607:fea8:5cc3:e900::df92) (Ping timeout: 264 seconds)
2021-11-14 07:47:03 +0100bbhoss(sid18216@tinside.irccloud.com) (Ping timeout: 256 seconds)
2021-11-14 07:47:47 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
2021-11-14 07:47:51 +0100slice_(~slice@user/slice) (Quit: zzz)
2021-11-14 07:49:32 +0100slice(~slice@user/slice)
2021-11-14 07:50:21 +0100bbhoss(sid18216@tinside.irccloud.com)
2021-11-14 07:51:02 +0100phma(phma@2001:5b0:2144:33f8:194f:6c28:dad5:4e86) (Read error: Connection reset by peer)
2021-11-14 07:52:26 +0100phma(phma@2001:5b0:211f:46f8:6fa2:18b9:ccfa:b3da)
2021-11-14 08:04:05 +0100shidima(~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl)
2021-11-14 08:05:38 +0100mbuf(~Shakthi@122.178.124.57)
2021-11-14 08:07:01 +0100bliminse(~bliminse@host86-185-253-43.range86-185.btcentralplus.com) (Quit: leaving)
2021-11-14 08:09:21 +0100bliminse(~bliminse@host86-185-253-43.range86-185.btcentralplus.com)
2021-11-14 08:09:41 +0100[exa](exa@user/exa/x-3587197) (Ping timeout: 264 seconds)
2021-11-14 08:10:54 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 08:14:39 +0100slice(~slice@user/slice) (Quit: zzz)
2021-11-14 08:15:23 +0100EvanR(~evan@2600:1700:ba69:10:f592:1a89:999e:d55f) (Ping timeout: 264 seconds)
2021-11-14 08:15:59 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 264 seconds)
2021-11-14 08:19:55 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 256 seconds)
2021-11-14 08:22:33 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 08:24:40 +0100 <c_wraith> energizer: yes. It's because as soon as (f x) in the lambda returns false, acc is unused. Recursion only happens in folder when acc is used.
2021-11-14 08:24:47 +0100 <c_wraith> *in foldr
2021-11-14 08:24:56 +0100 <c_wraith> I'm obviously thinking phonetically
2021-11-14 08:27:47 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 08:28:16 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 08:32:11 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 245 seconds)
2021-11-14 08:32:57 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2021-11-14 08:40:00 +0100 <energizer> ok
2021-11-14 08:40:53 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 256 seconds)
2021-11-14 08:41:37 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2021-11-14 08:48:49 +0100kristjansson_(sid126207@tinside.irccloud.com) (Ping timeout: 256 seconds)
2021-11-14 08:49:08 +0100 <int-e> c_wraith: fold-arr ;-)
2021-11-14 08:50:27 +0100kristjansson_(sid126207@tinside.irccloud.com)
2021-11-14 08:53:52 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 08:59:37 +0100Guest80(~Guest80@pd9ed7762.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2021-11-14 08:59:52 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 265 seconds)
2021-11-14 09:01:15 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk)
2021-11-14 09:04:20 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2021-11-14 09:07:25 +0100anna_user2_(~anna_user@207.181.251.46)
2021-11-14 09:08:11 +0100 <anna_user2_> I'm a beginner and I don't know how to call my function. I get "The IO action ‘main’ is not defined in module ‘Main’
2021-11-14 09:08:11 +0100 <anna_user2_> "
2021-11-14 09:09:51 +0100 <anna_user2_> error is pasted on tomsemeding
2021-11-14 09:11:03 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 09:11:13 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 09:11:49 +0100 <gentauro> anna_user2_: do you expose it? Like this? `module Main (main) where`
2021-11-14 09:13:43 +0100 <anna_user2_> I just said "main :: IO()" and "main = return()" and it compiles and links now. IDK if it is doing anything. I would like to load up an array and pass it to my funciton.
2021-11-14 09:14:57 +0100gehmehgeh(~user@user/gehmehgeh)
2021-11-14 09:15:59 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 264 seconds)
2021-11-14 09:16:19 +0100 <anna_user2_> Maybe I say "data = ..."?
2021-11-14 09:17:30 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 09:21:15 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 09:22:30 +0100 <anna_user2_> Can anyone please tell me how to create a small array of integers?
2021-11-14 09:24:22 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2021-11-14 09:24:50 +0100kadir(~kadir@78.178.105.36)
2021-11-14 09:24:59 +0100 <anna_user2_> OK I may have created an array. I would like to dispaly it to the console
2021-11-14 09:26:51 +0100 <gentauro> anna_user2_: if you are using `return`, then you are a `function` of the Monad type-class
2021-11-14 09:28:03 +0100 <gentauro> please start the `interpreter` (if you use `stack`, it's like this: `stack ghci`). Then you can type: `:info Monad` and you will see: `class Applicative m => Monad m where … return :: a -> m a`
2021-11-14 09:28:04 +0100 <anna_user2_> I don't know if I need a Monday type-class. I just want to load up an array and pass it with an integer to my funciton, which inserts the integer
2021-11-14 09:28:23 +0100 <gentauro> so the correct syntax would be: `main = do return ()` as it seems that you are using `do-notation`
2021-11-14 09:28:41 +0100 <anna_user2_> Since I have no idea what a Monad is...
2021-11-14 09:28:42 +0100nrl^(~nrl@h50.174.139.63.static.ip.windstream.net)
2021-11-14 09:29:22 +0100 <gentauro> anna_user2_: then I would suggest you read this "online tutorial" first :) http://learnyouahaskell.com/chapters
2021-11-14 09:30:30 +0100gentauroI hope SPJ before leaving to play Fortninte that he renames the Monad type in Haskell to Monday :)
2021-11-14 09:32:41 +0100[exa](exa@user/exa/x-3587197)
2021-11-14 09:33:19 +0100jbox(~jbox@user/jbox) (Read error: Connection reset by peer)
2021-11-14 09:33:41 +0100jbox(~jbox@user/jbox)
2021-11-14 09:37:35 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 264 seconds)
2021-11-14 09:37:35 +0100amk(~amk@109.255.169.126) (Ping timeout: 264 seconds)
2021-11-14 09:38:17 +0100shidima(~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl) (Remote host closed the connection)
2021-11-14 09:39:59 +0100amk(~amk@109.255.169.126)
2021-11-14 09:44:33 +0100alzgh(~alzgh@user/alzgh)
2021-11-14 09:45:51 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:d32:7961:c8e7:76c1) (Remote host closed the connection)
2021-11-14 09:49:37 +0100 <tomsmeding> Foldable -> Friday, Traversable -> Thursday?
2021-11-14 09:49:53 +0100 <tomsmeding> or rather Functor -> Friday
2021-11-14 09:51:23 +0100 <[exa]> constructing a haskellish advent calendar?
2021-11-14 09:51:43 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-11-14 09:52:55 +0100 <tomsmeding> [exa]: https://ircbrowse.tomsmeding.com/day/lchaskell/2021/11/14?id=271388#trid271388
2021-11-14 09:53:56 +0100 <[exa]> ah rofl.
2021-11-14 09:55:23 +0100wei2912(~wei2912@138.75.71.147) (Quit: Lost terminal)
2021-11-14 09:55:44 +0100slice(~slice@user/slice)
2021-11-14 09:58:49 +0100meridion(~meridion@punt.hetgrotebos.org) (Read error: Connection reset by peer)
2021-11-14 09:59:54 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 10:03:46 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 10:04:16 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2021-11-14 10:05:59 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk) (Remote host closed the connection)
2021-11-14 10:09:52 +0100max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
2021-11-14 10:17:43 +0100allbery_b(~geekosaur@xmonad/geekosaur)
2021-11-14 10:17:43 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2021-11-14 10:17:46 +0100allbery_bgeekosaur
2021-11-14 10:28:44 +0100mmhat(~mmh@55d47fa1.access.ecotel.net)
2021-11-14 10:29:21 +0100zava(~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de)
2021-11-14 10:31:33 +0100acidjnk_new3(~acidjnk@p200300d0c736cb18d4b31450c12316ac.dip0.t-ipconnect.de)
2021-11-14 10:40:16 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk)
2021-11-14 10:42:24 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2021-11-14 10:43:28 +0100nrl^(~nrl@h50.174.139.63.static.ip.windstream.net) (Remote host closed the connection)
2021-11-14 10:44:41 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk) (Ping timeout: 245 seconds)
2021-11-14 10:46:35 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20)
2021-11-14 10:49:05 +0100_ht(~quassel@82-169-194-8.biz.kpn.net)
2021-11-14 10:49:59 +0100Tuplanolla(~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
2021-11-14 10:50:56 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20) (Ping timeout: 245 seconds)
2021-11-14 10:51:44 +0100kadir(~kadir@78.178.105.36) (Quit: WeeChat 3.3)
2021-11-14 10:55:54 +0100tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
2021-11-14 11:01:44 +0100Guest80(~Guest80@pd9ed7762.dip0.t-ipconnect.de)
2021-11-14 11:07:30 +0100incendiary(~i@5.18.232.236)
2021-11-14 11:09:23 +0100xff0x(~xff0x@2001:1a81:52ad:7900:2980:608c:4201:500d) (Ping timeout: 264 seconds)
2021-11-14 11:09:45 +0100MoC(~moc@user/moc) (Read error: Connection reset by peer)
2021-11-14 11:09:51 +0100MoC_(~moc@user/moc)
2021-11-14 11:10:10 +0100MoC_(~moc@user/moc) (Client Quit)
2021-11-14 11:10:12 +0100xff0x(~xff0x@2001:1a81:52ad:7900:fdd2:161e:af5e:122)
2021-11-14 11:11:45 +0100jmorris(uid433911@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-11-14 11:13:02 +0100dsrt^(~dsrt@h50.174.139.63.static.ip.windstream.net)
2021-11-14 11:25:03 +0100slice(~slice@user/slice) (Quit: cya)
2021-11-14 11:28:24 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk)
2021-11-14 11:29:16 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 245 seconds)
2021-11-14 11:30:13 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 11:34:27 +0100 <gentauro> tomsmeding: I like it :)
2021-11-14 11:43:32 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2021-11-14 11:45:00 +0100Vajb(~Vajb@2001:999:85:46d7:d6a4:d6c1:950b:ce99)
2021-11-14 11:45:06 +0100random-jellyfish(~random-je@user/random-jellyfish)
2021-11-14 11:48:07 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 11:53:54 +0100xff0x(~xff0x@2001:1a81:52ad:7900:fdd2:161e:af5e:122) (Ping timeout: 268 seconds)
2021-11-14 11:54:24 +0100xff0x(~xff0x@2001:1a81:52ad:7900:8288:e51a:352c:7fbc)
2021-11-14 11:59:28 +0100xff0x(~xff0x@2001:1a81:52ad:7900:8288:e51a:352c:7fbc) (Ping timeout: 268 seconds)
2021-11-14 12:00:34 +0100Alleria(~textual@user/alleria)
2021-11-14 12:01:25 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 12:03:01 +0100kupi(uid212005@hampstead.irccloud.com)
2021-11-14 12:04:48 +0100xff0x(~xff0x@2001:1a81:52ad:7900:8288:e51a:352c:7fbc)
2021-11-14 12:06:14 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
2021-11-14 12:22:27 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-11-14 12:24:16 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 245 seconds)
2021-11-14 12:27:18 +0100justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 260 seconds)
2021-11-14 12:29:51 +0100Guest80(~Guest80@pd9ed7762.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2021-11-14 12:32:52 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 12:33:38 +0100cosimone(~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3)
2021-11-14 12:37:08 +0100cheater(~Username@user/cheater) (Ping timeout: 246 seconds)
2021-11-14 12:37:35 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
2021-11-14 12:39:06 +0100Midjak(~Midjak@82-65-111-221.subs.proxad.net)
2021-11-14 12:41:01 +0100cheater(~Username@user/cheater)
2021-11-14 12:43:56 +0100mei(~mei@user/mei)
2021-11-14 12:45:35 +0100acidjnk_new3(~acidjnk@p200300d0c736cb18d4b31450c12316ac.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2021-11-14 12:48:59 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20)
2021-11-14 12:53:26 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20) (Ping timeout: 245 seconds)
2021-11-14 12:57:18 +0100cosimone(~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Quit: ERC (IRC client for Emacs 27.1))
2021-11-14 13:00:08 +0100peutri_peutri
2021-11-14 13:00:25 +0100cheater(~Username@user/cheater) (Ping timeout: 256 seconds)
2021-11-14 13:02:20 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat)
2021-11-14 13:03:27 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 13:04:15 +0100stevenxl(sid133530@uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2021-11-14 13:04:23 +0100mikoto-chan(~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 256 seconds)
2021-11-14 13:04:26 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Client Quit)
2021-11-14 13:04:28 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 13:09:04 +0100__monty__(~toonn@user/toonn)
2021-11-14 13:09:29 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2021-11-14 13:16:20 +0100cheater(~Username@user/cheater)
2021-11-14 13:20:47 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 13:23:18 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2021-11-14 13:25:21 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 256 seconds)
2021-11-14 13:26:36 +0100phma(phma@2001:5b0:211f:46f8:6fa2:18b9:ccfa:b3da) (Read error: Connection reset by peer)
2021-11-14 13:27:28 +0100phma(phma@2001:5b0:210f:6c88:14c5:503:d6e5:c919)
2021-11-14 13:29:37 +0100Lycurgus(~juan@98.4.112.204)
2021-11-14 13:31:44 +0100 <AndreasK__> Anyone have a good implementation of a "sized IntSet". Basically IntSet with size being O(1)
2021-11-14 13:32:36 +0100 <xerox> size is O(1) in IntSet
2021-11-14 13:33:07 +0100 <xerox> oh dang it's not!
2021-11-14 13:33:15 +0100 <Hecate> https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-IntSet.html#v:size
2021-11-14 13:33:18 +0100 <Hecate> nope
2021-11-14 13:33:19 +0100 <Hecate> :'D
2021-11-14 13:33:39 +0100 <xerox> I had this one in mind https://www.stackage.org/haddock/lts-18.16/containers-0.6.5.1/src/Data-Set-Internal.html#size
2021-11-14 13:33:42 +0100 <AndreasK__> xerox: If only it would be that easy :D
2021-11-14 13:34:00 +0100 <[exa]> O(1) size?
2021-11-14 13:34:01 +0100 <xerox> whereas theirs does work https://www.stackage.org/haddock/lts-18.16/containers-0.6.5.1/src/Data-IntSet-Internal.html#size
2021-11-14 13:34:35 +0100 <[exa]> can you just keep a counter next to the set?
2021-11-14 13:34:38 +0100 <AndreasK__> The code I'm looking at currently uses what amounts to `Data.Set Int` which isn't anywhere near optimal.
2021-11-14 13:35:03 +0100 <AndreasK__> [exa]: Yes. But the question is then how do you update the counter?`insert doesn't tell you if it modified the set.
2021-11-14 13:35:22 +0100 <[exa]> yeah you need to have a special insert that tells you :/
2021-11-14 13:35:49 +0100 <[exa]> anyway, there are weight-balanced trees somewhere in haskell (at least in Set), getting a size there is O(1)
2021-11-14 13:36:01 +0100 <AndreasK__> [exa]: Then there are more complex operations like union etc. It's not trivial. Which is why I would rather just use someone elses work haha
2021-11-14 13:36:08 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 13:36:36 +0100pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-11-14 13:36:40 +0100 <AndreasK__> [exa]: Yeah `Data.Set Int` works. But everything except size is just soo much slower than IntSet
2021-11-14 13:37:25 +0100jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2021-11-14 13:38:44 +0100 <[exa]> AndreasK__: btw what's your usecase? there might be a specialzied approach
2021-11-14 13:39:07 +0100 <AndreasK__> [exa]: Looking at optimizing https://github.com/ghc/ghc/blob/c60652929ebd2510e52c05a2f61d52e2bf1846ad/compiler/GHC/Cmm/Expr.hs#…
2021-11-14 13:40:19 +0100 <AndreasK__> [exa]: The set is used in dataflow analysis for things like liveness, we check if facts changed by checking if the size changed
2021-11-14 13:40:34 +0100 <[exa]> the RegSet is relatively tiny right? (less than 100 elements?)
2021-11-14 13:41:12 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
2021-11-14 13:41:14 +0100 <AndreasK__> Not guaranteed but often yes.
2021-11-14 13:43:36 +0100 <[exa]> in that case you might just want to take a vector of ones/zeroes and some magic with fromEnum
2021-11-14 13:45:57 +0100 <[exa]> running through a continuous array of ~100 elements is usually faster on average than just jumping 2 pointers
2021-11-14 13:46:55 +0100 <AndreasK__> Given that as you traverse the programm you can encounter any "number" going forward I'm not sure how to construct such a magic function unless we go all the way to using a hashmap.
2021-11-14 13:48:18 +0100 <[exa]> I understood that GlobalReg and LocalReg are "finite" right?
2021-11-14 13:48:46 +0100 <AndreasK__> LocalReg represents virtual registers, of which there can be arbitrary many
2021-11-14 13:49:00 +0100 <AndreasK__> I've seen code where we can have >3k
2021-11-14 13:49:18 +0100 <[exa]> ah okay
2021-11-14 13:49:49 +0100 <AndreasK__> GlobalReg is properly finite. But that's also not really causing performance issues.
2021-11-14 13:50:23 +0100 <AndreasK__> Yeah otherwise you could just compute a static mapping from Reg <-> Int
2021-11-14 13:50:56 +0100jbox(~jbox@user/jbox) (Ping timeout: 245 seconds)
2021-11-14 13:51:05 +0100max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 268 seconds)
2021-11-14 13:51:17 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 13:54:21 +0100 <AndreasK__> I think in this case such a magic function would need to use a map internally, and you would end up with the same problem in a very roundabout way.
2021-11-14 13:55:19 +0100Lycurgus(~juan@98.4.112.204) (Quit: Exeunt)
2021-11-14 14:00:35 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2021-11-14 14:00:50 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2021-11-14 14:01:48 +0100machinedgod(~machinedg@24.105.81.50)
2021-11-14 14:03:15 +0100jakalx(~jakalx@base.jakalx.net)
2021-11-14 14:05:54 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 14:08:43 +0100cheater(~Username@user/cheater) (Ping timeout: 265 seconds)
2021-11-14 14:14:04 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat)
2021-11-14 14:14:40 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 14:16:32 +0100azimut_(~azimut@gateway/tor-sasl/azimut)
2021-11-14 14:16:39 +0100nf(~n@monade.li) (Quit: Fairfarren.)
2021-11-14 14:17:18 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Client Quit)
2021-11-14 14:17:30 +0100nf(~n@monade.li)
2021-11-14 14:18:42 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 14:19:13 +0100shriekingnoise(~shrieking@186.137.144.80)
2021-11-14 14:20:27 +0100azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
2021-11-14 14:22:05 +0100pwug(~pwug@user/pwug) (Remote host closed the connection)
2021-11-14 14:23:42 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds)
2021-11-14 14:23:43 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 14:24:05 +0100pwug(~pwug@user/pwug)
2021-11-14 14:24:34 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-11-14 14:31:30 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat)
2021-11-14 14:33:48 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 14:34:47 +0100 <yin> do peano encoded nats "collapse" as they are evaluated? will `n > 9` be faster after i do `n > 7`?
2021-11-14 14:35:21 +0100 <yin> i know "collapse" may not be the right word here
2021-11-14 14:35:49 +0100Everything(~Everythin@37.115.210.35)
2021-11-14 14:36:39 +0100 <hpc> the term to google is "thunk"
2021-11-14 14:37:23 +0100 <hpc> basically before something is evaluated, it's stored as a chunk of code that would compute the actual value
2021-11-14 14:37:36 +0100 <hpc> then once it's evaluated, as long as it stays in memory it doesn't have to be recomputed
2021-11-14 14:38:05 +0100 <hpc> how long it stays in memory is complicated, and what actually gets evaluated by each expression is complicated
2021-11-14 14:38:47 +0100 <yin> i guess what im asking is if `data Nat = Z | Succ Nat` will behave the same as `iterate succ 0`
2021-11-14 14:39:06 +0100 <hpc> oh, no it won't
2021-11-14 14:39:17 +0100 <hpc> you'll always have that chain of Succ
2021-11-14 14:39:38 +0100 <hpc> an equivalent operation would be turning a linked list into an array automatically
2021-11-14 14:39:48 +0100 <hpc> which ghc also doesn't do
2021-11-14 14:40:10 +0100 <hpc> however, you do get a built-in Natural type
2021-11-14 14:40:32 +0100 <hpc> which uses libgmp, so it's not a peano nat
2021-11-14 14:42:55 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
2021-11-14 14:43:05 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2021-11-14 14:43:14 +0100 <yin> is that GHC.TypeLits.Nat ?
2021-11-14 14:44:25 +0100 <hpc> https://hackage.haskell.org/package/base-4.16.0.0/docs/Numeric-Natural.html#t:Natural
2021-11-14 14:44:46 +0100 <hpc> that one is for type-level nonsense :D
2021-11-14 14:46:44 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-11-14 14:46:59 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 14:47:06 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-11-14 14:47:20 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 14:47:28 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-11-14 14:47:36 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 245 seconds)
2021-11-14 14:47:42 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 14:47:49 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-11-14 14:48:03 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 14:48:11 +0100lavaman(~lavaman@98.38.249.169) (Remote host closed the connection)
2021-11-14 14:48:47 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Quit: The Lounge - https://thelounge.chat)
2021-11-14 14:49:09 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 14:49:36 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com) (Client Quit)
2021-11-14 14:49:56 +0100Flonk(~Flonk@vps-zap441517-1.zap-srv.com)
2021-11-14 14:50:34 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20)
2021-11-14 14:50:56 +0100cheater(~Username@user/cheater)
2021-11-14 14:53:11 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-11-14 14:54:31 +0100 <yin> ok
2021-11-14 14:55:06 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20) (Ping timeout: 245 seconds)
2021-11-14 14:55:10 +0100 <yin> is there a way i can guarantee my program is total?
2021-11-14 14:56:07 +0100meinside(uid24933@helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2021-11-14 14:56:54 +0100skewerrspoonm
2021-11-14 14:57:28 +0100 <yin> meaning no `undefined`
2021-11-14 14:57:59 +0100 <hpc> that's equivalent to the halting problem, so no
2021-11-14 14:58:06 +0100 <hpc> maybe someday
2021-11-14 14:58:27 +0100 <hpc> there are other languages that deliberately fall just short of turing-completeness in order to have that guarantee though
2021-11-14 14:58:48 +0100 <hpc> they're usually used for theorem proving, but that's a whooooole other topic
2021-11-14 14:59:11 +0100 <yin> ah, no. i'm perfectly ok with non-termination. what i mean is no `error` or `undefined` as a result
2021-11-14 14:59:51 +0100 <hpc> ah, then sort of
2021-11-14 15:00:14 +0100 <hpc> you can have ghc warn on non-exhaustive patterns
2021-11-14 15:00:31 +0100 <hpc> and iirc error/undefined are covered by the safe haskell stuff
2021-11-14 15:00:32 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 15:00:51 +0100 <yin> what is "the safe haskell stuff"?
2021-11-14 15:01:08 +0100 <yin> is there a safe prelude?
2021-11-14 15:01:14 +0100 <hpc> you'll have to google it, i don't remember everything
2021-11-14 15:01:50 +0100 <hpc> ah, nvm, that doesn't cover error/undefined
2021-11-14 15:01:57 +0100 <hpc> it's just for type safety stuff
2021-11-14 15:03:25 +0100 <yin> i see
2021-11-14 15:05:32 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 15:10:10 +0100benin(~benin@183.82.176.36) (Ping timeout: 260 seconds)
2021-11-14 15:10:48 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Remote host closed the connection)
2021-11-14 15:16:04 +0100EvanR(~evan@108-93-18-102.lightspeed.nworla.sbcglobal.net)
2021-11-14 15:20:44 +0100EvanR(~evan@108-93-18-102.lightspeed.nworla.sbcglobal.net) (Ping timeout: 265 seconds)
2021-11-14 15:21:10 +0100max22-(~maxime@2a01cb08833598006adbffa1edba2526.ipv6.abo.wanadoo.fr)
2021-11-14 15:26:50 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 15:41:52 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 15:41:58 +0100deadmarshal(~deadmarsh@95.38.117.102) (Quit: ZNC 1.8.2 - https://znc.in)
2021-11-14 15:42:07 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2021-11-14 15:43:03 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 15:45:02 +0100Unhammer(~Unhammer@user/unhammer) (Ping timeout: 240 seconds)
2021-11-14 15:45:05 +0100 <albet70> could fmap or >>= break in []? like in other languages "for i in alist: if i==0: break"
2021-11-14 15:46:27 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2021-11-14 15:50:58 +0100v01d4lph4(~v01d4lph4@user/v01d4lph4) (Quit: my macbook has gone to sleep zzz)
2021-11-14 15:51:22 +0100 <geekosaur> fmap can't really, althouhg you could fake it with a flag in the "accumulator"
2021-11-14 15:51:55 +0100 <geekosaur> >>= will stop that path if you fail, but it will still try other paths; this is what leads to "nondeterminism"
2021-11-14 15:53:23 +0100 <albet70> oh traverse may do the trick
2021-11-14 15:54:55 +0100 <albet70> break a loop or iteration is a very common need in most languages, and it's hard in haskell...
2021-11-14 15:55:23 +0100 <davean> albet70: its not hard - those aren't loops tohugh
2021-11-14 15:55:54 +0100 <davean> Theres nothing even sequential about them
2021-11-14 15:56:07 +0100 <davean> there as parallel as they are sequential
2021-11-14 15:56:19 +0100 <davean> Theres no order at all, and they might all happen at the same time
2021-11-14 15:56:24 +0100 <davean> THEY ARE NOT LOOPS
2021-11-14 15:57:10 +0100 <davean> There are not even related to loops in any meaningful way
2021-11-14 15:57:10 +0100gentauro(~gentauro@user/gentauro) (Read error: Connection reset by peer)
2021-11-14 15:57:11 +0100EvanR(~evan@2600:1700:ba69:10:a438:4841:cc0d:6c57)
2021-11-14 15:57:47 +0100 <albet70> for i in alist: if i==0: break else: f(i) if there's no 0 in alist, f will apply on every element, you say this is not loop?
2021-11-14 15:58:13 +0100 <davean> it is a loop, fmap and >>= are not
2021-11-14 15:58:23 +0100 <davean> in any way
2021-11-14 15:58:23 +0100Vajb(~Vajb@2001:999:85:46d7:d6a4:d6c1:950b:ce99) (Read error: Connection reset by peer)
2021-11-14 15:58:38 +0100Unhammer(~Unhammer@user/unhammer)
2021-11-14 15:58:56 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 256 seconds)
2021-11-14 15:59:02 +0100 <albet70> when they meet []
2021-11-14 15:59:35 +0100Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2021-11-14 16:00:03 +0100 <davean> I'm not sure what you mean by that, but if you're saying when they're on lists, no still no where related to a loop
2021-11-14 16:00:05 +0100 <davean> ENTIRELY different
2021-11-14 16:00:15 +0100 <davean> if you want a loop, use a loop
2021-11-14 16:00:16 +0100 <albet70> when m~[], what's the fmap's behavior?
2021-11-14 16:00:35 +0100 <geekosaur> sorry, I was thinking fold earlier, no9t fmap
2021-11-14 16:00:38 +0100 <davean> Nothing at all related to a loop
2021-11-14 16:01:02 +0100 <geekosaur> fmap can't be treated as a loop, as davean said. and >>= "follows all possible paths at once"
2021-11-14 16:01:28 +0100 <davean> I can talk aboutspecific implimentations, but fmap fmaps, which is closer related to opengl than a loop
2021-11-14 16:01:31 +0100 <davean> opengl has projections
2021-11-14 16:01:35 +0100 <davean> fmap is projective
2021-11-14 16:01:49 +0100 <davean> the actual evaluations, in GHC practice, will happen when they're looked at
2021-11-14 16:01:54 +0100oats(~thomas@user/oats) (Quit: until later, my friends)
2021-11-14 16:01:58 +0100 <davean> the order is *entirely undefined*
2021-11-14 16:02:09 +0100oats(~thomas@user/oats)
2021-11-14 16:02:16 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk) (Remote host closed the connection)
2021-11-14 16:02:59 +0100gentauro(~gentauro@user/gentauro)
2021-11-14 16:03:20 +0100 <davean> haskell has loops, if you want that, use that
2021-11-14 16:05:08 +0100 <davean> albet70: fmap is fairly closely related to projecting 3D objects into 2D space - this might be worth thinking on
2021-11-14 16:05:45 +0100Guest42(~Guest42@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2021-11-14 16:06:37 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk)
2021-11-14 16:07:36 +0100 <albet70> what's the fmap function definition about []? I can't find it
2021-11-14 16:08:26 +0100 <albet70> https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-List.html#v:fmap
2021-11-14 16:09:50 +0100 <geekosaur> https://downloads.haskell.org/ghc/latest/docs/html/libraries/base-4.16.0.0/Prelude.html#g:10 leads to a list of instances for Functor, all of which have Source links
2021-11-14 16:10:20 +0100 <geekosaur> which for instance Functor [] leads to https://downloads.haskell.org/ghc/latest/docs/html/libraries/base-4.16.0.0/src/GHC.Base.html#line-…
2021-11-14 16:11:08 +0100 <geekosaur> ("g:10" is "Monads and functors" in the sidebar for Prelude)
2021-11-14 16:12:04 +0100 <geekosaur> and I knew to look in Prelude because you don't have to import anything to use fmap
2021-11-14 16:13:33 +0100 <albet70> map f (x:xs) = f x : map f xs
2021-11-14 16:14:03 +0100xkuru(~xkuru@user/xkuru)
2021-11-14 16:14:04 +0100 <davean> yep
2021-11-14 16:15:15 +0100 <albet70> it's recursive, not iteration
2021-11-14 16:15:28 +0100 <davean> Iteration is a special case of recursion
2021-11-14 16:15:38 +0100 <geekosaur> also that's because lists are defined recursively
2021-11-14 16:16:03 +0100 <geekosaur> data [] a = [] | a : [] a
2021-11-14 16:16:12 +0100 <davean> also thats not performing the fmap the way you probably think of it, its declaring what it is, and setting up the computation
2021-11-14 16:16:19 +0100 <albet70> "davean :Iteration is a special case of recursion", why you say that?
2021-11-14 16:16:32 +0100 <davean> Because all iteration is recursion but not all recursion is iteration
2021-11-14 16:17:06 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 16:18:15 +0100 <albet70> wait a sec, most languages support iteration, but not support TCO, you can't say all iteration is recursion
2021-11-14 16:18:37 +0100 <davean> Yes I can, look at what the loop is
2021-11-14 16:18:40 +0100 <davean> open up your assembler
2021-11-14 16:18:47 +0100 <geekosaur> tco does not define recursion, it merely limits how the language can optimize it
2021-11-14 16:19:02 +0100 <davean> your language HAPPENS to optimize loops specificly
2021-11-14 16:19:07 +0100 <geekosaur> tco is tail call *optimization*
2021-11-14 16:19:16 +0100 <davean> but if you look at the code generated, it is SPECIFICLY recursion
2021-11-14 16:19:27 +0100 <davean> thats the ONLY IMPLIMENTATION
2021-11-14 16:20:56 +0100EvanR(~evan@2600:1700:ba69:10:a438:4841:cc0d:6c57) (Ping timeout: 268 seconds)
2021-11-14 16:20:57 +0100 <davean> They just don't have the power to optimize recursion *in general* so they give yo uspecial cases they CAN optimize
2021-11-14 16:21:40 +0100 <davean> and now we're out side of haskell in to basic CS
2021-11-14 16:21:56 +0100 <davean> https://en.wikipedia.org/wiki/Primitive_recursive_function
2021-11-14 16:22:02 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
2021-11-14 16:23:47 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-11-14 16:23:51 +0100 <davean> but seriously, open up the assembly your compilers generate, what they'll have is a small piece of code for the body of the loop, and a (conditional) jump from the end to the start (or they'll have a condition at the start to leave it, and a non-conditional jump at the end)
2021-11-14 16:24:12 +0100 <davean> whats a jump? Its a TCO function call when tis to its parent function
2021-11-14 16:24:25 +0100stef204(~stef204@user/stef204)
2021-11-14 16:24:51 +0100 <yin> this pen is blue, so it follows that all pens are blue
2021-11-14 16:25:35 +0100 <davean> yin: sunrise problem :)
2021-11-14 16:25:47 +0100 <davean> I believe in this case its 50% probably all pens are blue?
2021-11-14 16:26:35 +0100 <davean> (Ok, that s a VERY reductive comment, but yours is too so ...)
2021-11-14 16:26:40 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-11-14 16:27:01 +0100slowButPresent(~slowButPr@user/slowbutpresent)
2021-11-14 16:27:21 +0100 <maerwald> davean: are you a Popper fan too?
2021-11-14 16:27:57 +0100gg(~gg@2a01:e0a:819:1510:9018:293a:5d7d:4597)
2021-11-14 16:29:21 +0100 <davean> maerwald: No idea what you're even talking about so no
2021-11-14 16:30:33 +0100 <yin> the criticism of inductive reasoning i think
2021-11-14 16:31:04 +0100 <maerwald> yeah, specifically "The Logic of Scientific Discovery"
2021-11-14 16:31:15 +0100 <maerwald> where he talks about the sunrise problem as well
2021-11-14 16:31:40 +0100 <davean> the sunrise problem is very well known in statistics?
2021-11-14 16:31:47 +0100 <davean> Its a classic problem
2021-11-14 16:32:21 +0100 <yin> maerwald: is davean's method inductive or deductive though?
2021-11-14 16:33:02 +0100 <yin> did he confirm his theory by looking at the assembly ode or did he derive it from observation?
2021-11-14 16:33:21 +0100 <yin> s/ ode/code
2021-11-14 16:34:49 +0100 <maerwald> yin: well, Popper didn't really say that induction is wrong. Inductive thoughts are the basis for ideas and theories, it's just that they carry little value as a naked argument.
2021-11-14 16:35:34 +0100johnjay(~pi@192.142.100.50) (Ping timeout: 260 seconds)
2021-11-14 16:35:40 +0100 <maerwald> he called it the "irrational moment" that happens when you "think up" a theory
2021-11-14 16:36:38 +0100johnjay(~pi@192.142.100.50)
2021-11-14 16:37:01 +0100 <davean> I like the implication we have rational moments
2021-11-14 16:37:04 +0100 <maerwald> haha
2021-11-14 16:37:06 +0100 <davean> Its really optimistic
2021-11-14 16:37:52 +0100 <geekosaur> does it imply that, or that we have other kinds of irrational ity at other times?
2021-11-14 16:38:06 +0100 <davean> Good point
2021-11-14 16:39:13 +0100hippoid(~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
2021-11-14 16:39:41 +0100 <maerwald> Well, the idea was to very clearly distinguish the construction of a theory from the discourse of whether it has merits, especially in order to allow and encourage more radical scientific theories, without getting nonsense like "how did you think of that?".
2021-11-14 16:39:59 +0100 <maerwald> Like, it's really none of your business :D
2021-11-14 16:42:27 +0100 <davean> The more interesting question is how you didn't think of things
2021-11-14 16:42:31 +0100 <davean> thats where improvements are to be made
2021-11-14 16:42:42 +0100 <davean> like understanding the computational hierarchy in albet70's case
2021-11-14 16:45:33 +0100Digit(~user@user/digit) (tidying)
2021-11-14 16:51:53 +0100justsomeguy(~justsomeg@user/justsomeguy)
2021-11-14 16:52:29 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-11-14 16:55:57 +0100max22-(~maxime@2a01cb08833598006adbffa1edba2526.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
2021-11-14 16:56:28 +0100jkaye(~jkaye@2601:281:8300:7530:af2a:f6dc:e38f:a278)
2021-11-14 16:56:44 +0100johnjay(~pi@192.142.100.50) (Ping timeout: 256 seconds)
2021-11-14 16:56:46 +0100eggplantade(~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 245 seconds)
2021-11-14 16:57:07 +0100mc47(~mc47@xmonad/TheMC47)
2021-11-14 16:57:50 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 17:00:06 +0100jesser[m](~jessermat@2001:470:69fc:105::d5ae) (Quit: You have been kicked for being idle)
2021-11-14 17:00:11 +0100johnjay(~pi@192.142.100.50)
2021-11-14 17:00:47 +0100hippoid(~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 265 seconds)
2021-11-14 17:03:01 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
2021-11-14 17:05:27 +0100shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-11-14 17:11:46 +0100justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 245 seconds)
2021-11-14 17:12:30 +0100max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
2021-11-14 17:12:35 +0100waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
2021-11-14 17:14:55 +0100max22-(~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection)
2021-11-14 17:15:46 +0100justsomeguy(~justsomeg@user/justsomeguy)
2021-11-14 17:18:48 +0100bitmapper(uid464869@lymington.irccloud.com)
2021-11-14 17:19:12 +0100eggplantade(~Eggplanta@2600:1700:bef1:5e10:185c:f2cc:27d3:da20)
2021-11-14 17:27:13 +0100tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2021-11-14 17:28:01 +0100johnjay(~pi@192.142.100.50) (Ping timeout: 245 seconds)
2021-11-14 17:28:37 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 17:29:57 +0100johnjay(~pi@192.142.100.50)
2021-11-14 17:32:13 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 17:32:45 +0100hippoid(~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
2021-11-14 17:33:00 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 256 seconds)
2021-11-14 17:35:11 +0100johnjay(~pi@192.142.100.50) (Ping timeout: 264 seconds)
2021-11-14 17:36:28 +0100johnjay(~pi@192.142.100.50)
2021-11-14 17:36:48 +0100cosimone(~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3)
2021-11-14 17:37:35 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
2021-11-14 17:39:29 +0100 <yin> oh no i had to get away for a bit. i was enjoying the conversation
2021-11-14 17:39:50 +0100random-jellyfish(~random-je@user/random-jellyfish) (Ping timeout: 256 seconds)
2021-11-14 17:40:29 +0100justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 268 seconds)
2021-11-14 17:40:36 +0100 <yin> davean: i'm curious to know in what context is "all iteration recursion"
2021-11-14 17:49:00 +0100 <Rembane_> yin: All kinds of iteration can be expressed as recursion. Not the other way around though.
2021-11-14 17:49:38 +0100 <Rembane_> Hm... lets just assume I'm wrong about that and say that iteration = recursion.
2021-11-14 17:51:38 +0100Guest80(~Guest80@pd9ed7762.dip0.t-ipconnect.de)
2021-11-14 17:51:45 +0100 <yin> all right. but can we have iteration without recursion?
2021-11-14 17:52:12 +0100 <jkaye> yin, in Haskell, or in general? I assume the former
2021-11-14 17:52:43 +0100EvanR(~evan@user/evanr)
2021-11-14 17:53:08 +0100 <yin> my question is in which contexts can we make that argument and in which we can't
2021-11-14 17:53:25 +0100 <c_wraith> it's mostly a math thing
2021-11-14 17:54:00 +0100 <Rembane_> In C we can have iteration without recursion.
2021-11-14 17:54:22 +0100Guest89(~Guest89@catv-89-134-211-102.catv.broadband.hu)
2021-11-14 17:55:29 +0100 <yin> Rembane_: davean's argument is that if you look at the assembly code you'll always see it as recursion. isn't that also true for C?
2021-11-14 17:57:41 +0100 <Rembane_> yin: It is? I gotta read some backlog.
2021-11-14 17:57:43 +0100 <c_wraith> It's not really very interesting to argue about
2021-11-14 17:58:03 +0100 <c_wraith> because to make any headway, you need to define "iteration" and "recursion" precisely.
2021-11-14 17:58:14 +0100 <jkaye> You could write the loop in assembly without recursion using conditional jumps
2021-11-14 17:58:17 +0100 <c_wraith> And doing that generally removes any questions
2021-11-14 17:58:20 +0100 <jkaye> So, I'm not sure that's true?
2021-11-14 17:58:43 +0100 <jkaye> c_wraith, yeah pretty much what I'm saying as well, I think it's definitional
2021-11-14 17:59:02 +0100 <davean> jkaye: conditional jumps are conditional calls - a call is just a jump with register push
2021-11-14 17:59:22 +0100 <jkaye> And right there we get to c_wraith's point that it's all in the definition
2021-11-14 17:59:23 +0100 <yin> so my question becomes "what is the definitional difference between iteration and recursion we are assuming here?"
2021-11-14 18:00:28 +0100 <jkaye> Iteration and recursion are (I think) isomorphic in that they can freely be converted from one to the other. Saying one cannot exist without the other therefore I think doesn't make sense, since the definition of either could be written in terms of the other
2021-11-14 18:00:44 +0100 <jkaye> Regardless of which definitions we were to choose
2021-11-14 18:00:54 +0100 <davean> jkaye: you can't convert recursion (except primitive recursion) to loops
2021-11-14 18:01:01 +0100 <yin> ^ this
2021-11-14 18:01:41 +0100 <jkaye> I'm fairly sure you can by using a stack. Could be mistaken
2021-11-14 18:01:48 +0100 <davean> primitive recursion is exactly what you can do with loops
2021-11-14 18:01:59 +0100 <jkaye> Can you show a situation that cannot be converted? We should be able to prove with contradiction if that is true
2021-11-14 18:02:36 +0100 <geekosaur> make sure you look at not only the definition of primitive recursion, but also why there is a difference
2021-11-14 18:02:46 +0100max22-(~maxime@2a01cb08833598007277439ba0202f1c.ipv6.abo.wanadoo.fr)
2021-11-14 18:02:58 +0100 <EvanR> the least defined thing so far is "loops"
2021-11-14 18:03:00 +0100 <yin> i'm looking up the definition of loop
2021-11-14 18:03:11 +0100 <yin> EvanR: exactly
2021-11-14 18:03:14 +0100 <EvanR> primitive recursion is cool
2021-11-14 18:03:31 +0100 <jkaye> Also, unrelated to all of this, but does anyone have a better way to do this? https://paste.tomsmeding.com/MppfHUD5 Thinking both towards efficiency and de-duplication of code if possible
2021-11-14 18:04:12 +0100 <jkaye> This one is a little more complete in case it helps https://paste.tomsmeding.com/fbVa3VZE
2021-11-14 18:04:15 +0100stef204(~stef204@user/stef204) (Quit: WeeChat 3.3)
2021-11-14 18:05:09 +0100 <EvanR> I like how the idea of loops comes up in so many ways without needing a concrete definition
2021-11-14 18:05:42 +0100 <Guest89> j
2021-11-14 18:07:36 +0100 <EvanR> if the pesky professor didn't define algorithms as a *finite* list of steps for yadda yadda maybe we wouldn't need loops xD
2021-11-14 18:08:19 +0100 <yin> i'm curious to know how any usual definition of "loops" and "recursion" are different if we look at the actual way we run bits through logic gates. as i understand it, haskell translates recursive functions to loops wich can be then considered recursion
2021-11-14 18:08:42 +0100 <hpc> i wonder what the difference even is, between finite and infinite lists of steps
2021-11-14 18:09:14 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 18:09:21 +0100 <EvanR> presumably you can't load an infinite list of steps on a computer-- oh
2021-11-14 18:09:33 +0100 <Rembane_> Decidability?
2021-11-14 18:09:54 +0100jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds)
2021-11-14 18:10:06 +0100gehmehgeh(~user@user/gehmehgeh)
2021-11-14 18:10:12 +0100 <monochrom> Doesn't an x86 CPU interprets your recursive asm code by a loop, and that counts as converting recursion to iteration?
2021-11-14 18:10:24 +0100 <EvanR> yin: insisting on considering bits in gates and programming terms and recursion theory all at the same time seems... confusing
2021-11-14 18:10:25 +0100 <yin> it's never finite if we consider that any "finite" computation outputs something, even if in the form of photons that are transmitted to our brain that then continues a (mostly believed) infinite computation of the world
2021-11-14 18:10:42 +0100 <davean> monochrom: x86 doesn't have loops - I know no real archs with loops
2021-11-14 18:10:53 +0100 <davean> It only has call/jump
2021-11-14 18:10:54 +0100 <jkaye> That's why I was saying that I think the question is somewhat meaningless
2021-11-14 18:11:05 +0100jpds(~jpds@gateway/tor-sasl/jpds)
2021-11-14 18:11:13 +0100 <monochrom> No I mean the microcode inside the CPU.
2021-11-14 18:11:13 +0100 <yin> monochrom: that's what i'm thinking, but by then we must consider a loop as something that's recurring in the machine
2021-11-14 18:11:25 +0100 <jkaye> davean, jump could easily be defined as a loop. You're saying "jump isn't loop" but you haven't shown why.
2021-11-14 18:11:38 +0100 <EvanR> first do you even have an understanding of the terms isolated to their own area
2021-11-14 18:11:48 +0100 <EvanR> before mixing them up and seeing if they explode
2021-11-14 18:11:49 +0100 <davean> jkaye: no it can't becasue its clearly mathametically more powerful
2021-11-14 18:11:52 +0100 <jkaye> You can't just keep saying "it is X" or "it is not X", there has to be a reason that's the case
2021-11-14 18:12:11 +0100 <davean> conditional jump is turing complete
2021-11-14 18:12:13 +0100dankey(~dankey@85-250-184-204.bb.netvision.net.il)
2021-11-14 18:12:20 +0100 <yin> EvanR: i don't (have an understanding of the terms isolater to their own area)
2021-11-14 18:12:26 +0100 <jkaye> davean, if I can transform one to the other in practical space, I don't really care about the "mathematical power" of it :)
2021-11-14 18:12:29 +0100 <davean> jkaye: its mostly I'm really bored by basic discussions
2021-11-14 18:12:39 +0100 <EvanR> after enough time and no input from the outside world, any program with finite memory has to repeat, i.e. The Big Loop xD
2021-11-14 18:12:41 +0100 <jkaye> As am I by circular logic
2021-11-14 18:12:43 +0100 <davean> jkaye: mathematical pwoer says you can't do the conversion though
2021-11-14 18:12:52 +0100 <jkaye> So let's prove it by contradiction!
2021-11-14 18:13:03 +0100 <jkaye> I am happy to be wrong here, it's an interesting thought exercise
2021-11-14 18:13:19 +0100 <monochrom> The following may be serious or may be trolling, I haven't decided yet: No, looping plus stack plus stack smashing is more powerful than recursion, you now even have call/cc.
2021-11-14 18:13:24 +0100 <jkaye> We need a (working, in code) recursion implementation that cannot be converted to an iterative form
2021-11-14 18:13:33 +0100 <jkaye> C or C++ should suffice
2021-11-14 18:13:36 +0100 <dankey> test
2021-11-14 18:14:27 +0100 <davean> jkaye: yes, and I'm saying that is a standard basic CS topic - I linked you to primative recursion which covers which ones can'ty
2021-11-14 18:14:54 +0100 <davean> if you can't even read, then see the ackermann function - the classic example
2021-11-14 18:15:39 +0100 <EvanR> in before someone questions the church turing thesis
2021-11-14 18:15:47 +0100 <yin> :D
2021-11-14 18:16:07 +0100 <jkaye> You have posted no links, and apparently cannot engage in conversation without degrading into whatever that was supposed to be. Probably not worth interacting with you I suppose
2021-11-14 18:16:07 +0100geekosaur(~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
2021-11-14 18:16:21 +0100 <yin> hey come on
2021-11-14 18:16:27 +0100 <davean> I'm really not interested in this interaction
2021-11-14 18:16:30 +0100 <yin> let's keep this entertaining
2021-11-14 18:16:32 +0100geekosaur(~geekosaur@xmonad/geekosaur)
2021-11-14 18:16:44 +0100 <jkaye> Sorry yin, not worth my time for someone like that :)
2021-11-14 18:16:49 +0100 <jkaye> I was having some fun too
2021-11-14 18:18:49 +0100jurjen(~jurjen@89-200-15-28.mobile.kpn.net)
2021-11-14 18:19:22 +0100 <yin> https://www.youtube.com/watch?v=i7sm9dzFtEI
2021-11-14 18:20:02 +0100TranquilEcho(~grom@user/tranquilecho)
2021-11-14 18:20:57 +0100 <monochrom> http://www.vex.net/~trebla/compsci/imperative-functional.html
2021-11-14 18:22:21 +0100hippoid(~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Quit: leaving)
2021-11-14 18:23:03 +0100 <yin> and between these two links i think we can call it a day
2021-11-14 18:23:31 +0100jess(~jess@libera/staff/jess) ()
2021-11-14 18:24:12 +0100bbear(~znc@21212.s.t4vps.eu) (Quit: ZNC 1.7.4 - https://znc.in)
2021-11-14 18:24:26 +0100bbear(~znc@21212.s.t4vps.eu)
2021-11-14 18:24:59 +0100 <EvanR> another gem from /~trebla/
2021-11-14 18:25:07 +0100 <monochrom> :)
2021-11-14 18:27:37 +0100Guest89(~Guest89@catv-89-134-211-102.catv.broadband.hu) (Quit: Client closed)
2021-11-14 18:28:14 +0100Guest6622(~Guest66@catv-89-134-211-102.catv.broadband.hu)
2021-11-14 18:28:40 +0100 <Guest6622> Hi, I'm not sure what keywords to search for: I'm looking for a typeclass family, that looks like Applicative&Monad, but has no pure/return or fmap
2021-11-14 18:29:17 +0100 <davean> what does that mean? what does it do? Maybe you mean something like semigroup/monoid?
2021-11-14 18:29:23 +0100 <davean> got something more concrete?
2021-11-14 18:30:08 +0100 <EvanR> a monad without pure is one thing but how could it not have fmap
2021-11-14 18:30:11 +0100 <Guest6622> Basically I want to keep all values inside the typeclass, don't want to be able to inject values (like return) or functions (like fmap)
2021-11-14 18:30:26 +0100 <davean> so how does it do anything at all?
2021-11-14 18:30:27 +0100 <Franciman> Guest6622: what about extracting things ?
2021-11-14 18:30:37 +0100 <davean> yah he could mean comonad
2021-11-14 18:30:42 +0100 <Franciman> can you have a function with type, w a -> a ?
2021-11-14 18:30:47 +0100 <EvanR> comonad has fmap
2021-11-14 18:30:49 +0100 <Guest6622> no extraction either
2021-11-14 18:31:02 +0100waleee(~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds)
2021-11-14 18:31:37 +0100 <davean> Guest6622: so the only thing I can think of is semigroup/monoid
2021-11-14 18:31:44 +0100 <davean> but I have no idea what you're attempting to do
2021-11-14 18:32:19 +0100 <EvanR> so Guest6622 wants myMethod :: MyClass m => m a -> (a -> m b) -> m b, but no fmap
2021-11-14 18:32:42 +0100 <Guest6622> I'm trying to ensure isolation between the world inside the typeclass and the world outside
2021-11-14 18:32:47 +0100TranquilEcho(~grom@user/tranquilecho) (Ping timeout: 264 seconds)
2021-11-14 18:32:52 +0100 <EvanR> I'm guessing there are no known laws to follow xD
2021-11-14 18:32:54 +0100waleee(~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
2021-11-14 18:33:23 +0100TranquilEcho(~grom@user/tranquilecho)
2021-11-14 18:33:55 +0100 <EvanR> since the correspondence between bind and join relies on fmap, and you don't want it, maybe you want join :: MyClass m => m (m a) -> m a instead?
2021-11-14 18:33:55 +0100 <davean> EvanR: but that injects a function?
2021-11-14 18:34:22 +0100 <EvanR> yeah it's not clear
2021-11-14 18:34:37 +0100 <Guest6622> EvanR: yes join seems like something I'd need
2021-11-14 18:35:03 +0100 <EvanR> It's hard to imagine using join a lot without fmap...
2021-11-14 18:35:03 +0100 <Guest6622> davean: could you elaborate? how does join inject a function?
2021-11-14 18:36:20 +0100 <davean> EvanR talked about >>=
2021-11-14 18:38:17 +0100 <EvanR> maybe you don't want a typeclass in the first place, it would be easier to know if you gave a better picture of the interface
2021-11-14 18:38:52 +0100 <Guest6622> as I imagine it, bind would no allow arbitrary function injection, like fmap, only a pre-defined list of API functions, that would allow controlled entry into the type
2021-11-14 18:39:01 +0100chomwitt(~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374)
2021-11-14 18:39:44 +0100 <EvanR> no you can use any function with the right type
2021-11-14 18:39:47 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 18:40:04 +0100 <Guest6622> EvanR: possibly. The basic idea is: I want to build a world, with no entry or exit into "normal" haskell world
2021-11-14 18:40:06 +0100 <davean> he could name the functions in an associated data
2021-11-14 18:41:20 +0100 <Guest6622> EvanR: right, but if there's no return, you cannot create arbitrary functions that generate values inside the closed type, only combine functions from the API
2021-11-14 18:42:13 +0100 <EvanR> functions aren't what let you arbitrarily work on the type, that's determined by the type itself. Like do you expose the constructors or hide them and only expose operators
2021-11-14 18:42:46 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260) (Ping timeout: 265 seconds)
2021-11-14 18:42:51 +0100 <EvanR> user functions given to bind or fmap can't do anything not allowed by the type's API
2021-11-14 18:42:55 +0100 <Guest6622> a real world usage I can think of is an HSM or GPU, where you build up a world inside a separate system
2021-11-14 18:43:15 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-11-14 18:43:48 +0100 <EvanR> oh yeah, sort of like compiling to a different category by conal
2021-11-14 18:44:01 +0100 <Guest6622> the type itself would not have constructors
2021-11-14 18:44:29 +0100 <EvanR> without changing the compiler you can't really stop the user form using haskell functions wherever they want
2021-11-14 18:45:02 +0100 <EvanR> within the code of some value
2021-11-14 18:45:10 +0100shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
2021-11-14 18:45:18 +0100dankey(~dankey@85-250-184-204.bb.netvision.net.il) (Ping timeout: 260 seconds)
2021-11-14 18:46:48 +0100 <EvanR> but maybe look at how this guy did it https://hackage.haskell.org/package/atom
2021-11-14 18:49:10 +0100 <EvanR> it looks like you write an Atom () action which when passed to compile, generates C code
2021-11-14 18:49:29 +0100 <EvanR> so it's ok if haskell code runs during that
2021-11-14 18:53:09 +0100 <Guest6622> yes, this looks like an instance for what I'd like. I was hoping for a higher level abstraction that would cover the general case (maybe it's the Conal reference you shared earlier, I just started processing it)
2021-11-14 18:54:52 +0100 <EvanR> there's a few shader DSLs on duckduckgo
2021-11-14 18:57:09 +0100 <Guest6622> I'm not much of a theoretician, so I was hoping someone already did the generalisations from these DSLs
2021-11-14 18:57:35 +0100econo(uid147250@user/econo)
2021-11-14 19:01:41 +0100mikoto-chan(~mikoto-ch@esm-84-240-99-143.netplaza.fi)
2021-11-14 19:04:11 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net)
2021-11-14 19:04:41 +0100jkaye(~jkaye@2601:281:8300:7530:af2a:f6dc:e38f:a278) (Ping timeout: 245 seconds)
2021-11-14 19:05:07 +0100 <yin> Guest6622: have you looked into GADTs to see if that's what you're after?
2021-11-14 19:08:11 +0100 <Guest6622> yin: as I see it, GADTs are useful when you're creating those DSLs. What I'm looking for is more a framework, that covers this kind of "a system separate from this" case.
2021-11-14 19:09:16 +0100yauhsien(~yauhsien@118-167-47-187.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
2021-11-14 19:09:32 +0100 <Guest6622> not to say, that GADTs can't be useful for that as well, but they're lower level tool, than I was hoping already exists.
2021-11-14 19:10:11 +0100 <EvanR> the idea of "no entry or exit" seems kind of besides the point, since when you design a DSL part of the idea is you could have different interpretations for the DSL programs. Whether you could interact with something is part of the interpretation
2021-11-14 19:15:53 +0100 <Guest6622> mNo
2021-11-14 19:16:25 +0100 <Guest6622> it isn't besides the point to me :)
2021-11-14 19:17:15 +0100 <EvanR> if that is the only criteria... then it seems to me it leaves a lot of options open xD
2021-11-14 19:17:41 +0100 <Guest6622> what I'm trying to look at is what meaningful abstractions have already been built for these use cases
2021-11-14 19:18:44 +0100sprout(~quassel@2a02:a467:ccd6:1:19a8:3d0f:213:c260)
2021-11-14 19:19:39 +0100timCF(~timCF@m91-129-99-212.cust.tele2.ee) (Quit: leaving)
2021-11-14 19:19:44 +0100 <Guest6622> yes, and I don't have the capacity to research those open options myself, so I was looking for the giants to hop their shoulders
2021-11-14 19:20:36 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 19:21:23 +0100alx741(~alx741@181.196.68.187) (Ping timeout: 264 seconds)
2021-11-14 19:22:50 +0100NinjaTrappeur(~ninja@user/ninjatrappeur) (Ping timeout: 268 seconds)
2021-11-14 19:25:35 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
2021-11-14 19:25:43 +0100Everything(~Everythin@37.115.210.35) (Quit: leaving)
2021-11-14 19:26:55 +0100NinjaTrappeur(~ninja@user/ninjatrappeur)
2021-11-14 19:29:09 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 256 seconds)
2021-11-14 19:35:44 +0100mbuf(~Shakthi@122.178.124.57) (Quit: Leaving)
2021-11-14 19:35:50 +0100alx741(~alx741@181.196.68.69)
2021-11-14 19:37:43 +0100shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net)
2021-11-14 19:39:59 +0100deadmarshal(~deadmarsh@95.38.117.102)
2021-11-14 19:42:07 +0100gaff(~gaff@49.207.207.122)
2021-11-14 19:42:17 +0100gaff(~gaff@49.207.207.122) (Client Quit)
2021-11-14 19:45:16 +0100 <yin> is there any reason *not* to use {-# LANGUAGE Safe #-} ?
2021-11-14 19:45:27 +0100incendiary(~i@5.18.232.236) (Quit: Lost terminal)
2021-11-14 19:45:52 +0100Guest46(~Guest46@apn-pool3-226-097.pennnet.nat.upenn.edu)
2021-11-14 19:45:54 +0100 <[exa]> useful instances of unsafePerformIO in libs
2021-11-14 19:46:11 +0100 <[exa]> also, (slightly faster) unsafe ops for vectors
2021-11-14 19:46:19 +0100 <geekosaur> all your imports have to be FFI-free or guarantee that all their FFI uses are safe, iirc
2021-11-14 19:47:10 +0100 <geekosaur> but a loot of things are done via FFI; I think this for example precludes ByteString and Text?
2021-11-14 19:47:29 +0100 <geekosaur> s/loot/lot/
2021-11-14 19:48:31 +0100 <yin> doesnt Safe allow for Trustworthy imports?
2021-11-14 19:48:53 +0100 <geekosaur> that's what "guarantee all their FFI uses are safe" is
2021-11-14 19:49:00 +0100 <yin> right
2021-11-14 19:49:10 +0100 <geekosaur> the question becomes how well audited those libraries are
2021-11-14 19:49:45 +0100 <yin> so i should get into the habit of having it on by default
2021-11-14 19:49:56 +0100 <geekosaur> and whether their authors are willing to commit to their safety
2021-11-14 19:50:12 +0100 <geekosaur> which is more or less what they are doing if they declare themselves Trustworthy
2021-11-14 19:50:16 +0100 <yin> understood
2021-11-14 19:50:53 +0100shapr(~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
2021-11-14 19:51:18 +0100 <yin> is there an extension for guaranteeing that i don't import functions that are either incomplete or explicitly return bottom values?
2021-11-14 19:53:43 +0100 <geekosaur> no
2021-11-14 19:54:33 +0100 <monochrom> {-# LANGUAGE Agda #-} >:)
2021-11-14 19:56:39 +0100 <EvanR> that would be an interesting "guarantee"
2021-11-14 19:56:55 +0100 <EvanR> no obvious bottoms
2021-11-14 20:02:19 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 20:07:37 +0100Guest46(~Guest46@apn-pool3-226-097.pennnet.nat.upenn.edu) (Quit: Client closed)
2021-11-14 20:08:23 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 20:11:12 +0100 <yin> well, i figure it wouldn't be that hard. just a check at the type level that all polimorphic functions eventually resolve to some "bottomless" type. i'm excluding non-termination, of course
2021-11-14 20:11:55 +0100 <yin> s/functions/values ? (i don't really know what i'm talking about)
2021-11-14 20:12:13 +0100 <geekosaur> pattern match checking has been shown to be anything but easy and still misses some cases, I think
2021-11-14 20:14:54 +0100deadmarshal(~deadmarsh@95.38.117.102) (Ping timeout: 260 seconds)
2021-11-14 20:15:06 +0100alx741(~alx741@181.196.68.69) (Ping timeout: 245 seconds)
2021-11-14 20:15:07 +0100jrm(~jrm@156.34.187.65) (Remote host closed the connection)
2021-11-14 20:15:36 +0100zincy_(~zincy@2a00:23c8:970c:4801:350f:7ee:191a:6f65)
2021-11-14 20:15:53 +0100max22-(~maxime@2a01cb08833598007277439ba0202f1c.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
2021-11-14 20:17:30 +0100fef(~thedawn@user/thedawn)
2021-11-14 20:18:15 +0100mvk(~mvk@2607:fea8:5cc3:e900::df92)
2021-11-14 20:26:55 +0100Guest42(~Guest42@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed)
2021-11-14 20:28:47 +0100zincy_(~zincy@2a00:23c8:970c:4801:350f:7ee:191a:6f65) (Remote host closed the connection)
2021-11-14 20:29:26 +0100 <yin> shame shame
2021-11-14 20:30:02 +0100 <geekosaur> the more complete you try to be about such things, the closer you get to the halting problem
2021-11-14 20:30:21 +0100 <geekosaur> it's much harder than you think even if you try to scale the problem down to supposedly manageable subsets
2021-11-14 20:31:34 +0100fef(~thedawn@user/thedawn) (Quit: Leaving)
2021-11-14 20:31:50 +0100 <geekosaur> you end up doing what languages like agda do, restrict the scope of the language itself to prevent bottoms — but then you make the language much less usable
2021-11-14 20:33:39 +0100max22-(~maxime@2a01cb088335980063a544fa463a8015.ipv6.abo.wanadoo.fr)
2021-11-14 20:33:54 +0100 <Franciman> much less usable how? You mean you found yourself in a situation where you couldn't write a program to solve your problem?
2021-11-14 20:34:30 +0100 <Franciman> or that it's harder? You should also consider that you can tweak agda to get correct by construction software
2021-11-14 20:34:43 +0100 <Franciman> up to agda bugs :P
2021-11-14 20:36:37 +0100 <geekosaur> but agda won't let you write some things unless you also write a proof that it will terminate
2021-11-14 20:36:54 +0100 <geekosaur> or that it won't bottom out some other way
2021-11-14 20:40:18 +0100Sgeo(~Sgeo@user/sgeo)
2021-11-14 20:41:14 +0100kuribas(~user@ptr-25vy0i7llzyvxfc43ot.18120a2.ip6.access.telenet.be)
2021-11-14 20:42:11 +0100 <yin> what's liquid haskell?
2021-11-14 20:42:36 +0100 <yin> what's -> how does it relate to this?
2021-11-14 20:42:50 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
2021-11-14 20:42:54 +0100 <geekosaur> it's a preprocessor (which I think is being rewritten to a set of ghc plugins?) that adds refinement types
2021-11-14 20:43:23 +0100random-jellyfish(~random-je@user/random-jellyfish)
2021-11-14 20:43:24 +0100machinedgod(~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
2021-11-14 20:44:31 +0100 <geekosaur> the problem with relating them to this discussion is that bottom is not a value, so cannot be captured or refuted by a refinement type
2021-11-14 20:46:15 +0100mcgroin(~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2021-11-14 20:48:56 +0100jurjen(~jurjen@89-200-15-28.mobile.kpn.net) (Read error: Connection reset by peer)
2021-11-14 20:54:43 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
2021-11-14 20:55:50 +0100Jeanne-Kamikaze(~Jeanne-Ka@static-198-54-131-136.cust.tzulo.com)
2021-11-14 20:56:38 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2021-11-14 20:58:28 +0100 <dolio> Agda will let you write things that don't obviously terminate without a proof. It just won't let you give them a type that says they'll definitely terminate.
2021-11-14 20:58:46 +0100Guest43(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
2021-11-14 20:59:39 +0100alx741(~alx741@181.196.68.69)
2021-11-14 21:00:15 +0100 <dolio> It'll even let you just declare that something terminates, too, strictly speaking.
2021-11-14 21:00:29 +0100yauhsien(~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
2021-11-14 21:02:54 +0100wolfshappen(~waff@irc.furworks.de) (Quit: later)
2021-11-14 21:03:36 +0100 <kuribas> I found the concept of "fuel" in idris interesting. You can make a function that terminates given finite "fuel", and to make it run forever, you just give it infinite fuel.
2021-11-14 21:03:47 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
2021-11-14 21:04:51 +0100 <kuribas> On the other hand, "terminating" functions may not practically terminate.
2021-11-14 21:05:03 +0100 <kuribas> As in they terminate but not in any reasonable time.
2021-11-14 21:05:06 +0100yauhsien(~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 245 seconds)
2021-11-14 21:05:11 +0100 <dolio> Well, that's always been true.
2021-11-14 21:05:21 +0100 <hpc> a better term for it might be "productivity"
2021-11-14 21:05:29 +0100juhp(~juhp@128.106.188.220) (Ping timeout: 256 seconds)
2021-11-14 21:05:38 +0100 <dolio> The Ackermann function is a terminating function, as far as type theory is concerned.
2021-11-14 21:05:53 +0100 <kuribas> So terminating functions are mostly useful for proofs?
2021-11-14 21:05:54 +0100 <hpc> you can define things that deal with infinite structures, but they have to always produce something at every step
2021-11-14 21:06:13 +0100 <hpc> filtering an infinite list needs to always have a next element, for instance
2021-11-14 21:06:15 +0100 <kuribas> streams are total in idris as well.
2021-11-14 21:06:25 +0100 <kuribas> As it knows you are not producing the whole list.
2021-11-14 21:06:46 +0100juhp(~juhp@128.106.188.220)
2021-11-14 21:06:56 +0100 <kuribas> But that could rule out a function like "loeb".
2021-11-14 21:07:00 +0100 <dolio> Just because it doesn't solve all problems doesn't mean it's useless.
2021-11-14 21:11:35 +0100wolfshappen(~waff@irc.furworks.de)
2021-11-14 21:18:29 +0100ystael(~ystael@user/ystael) (Quit: Lost terminal)
2021-11-14 21:19:54 +0100aegon(~mike@174.127.249.180)
2021-11-14 21:20:36 +0100jurjen(~jurjen@89-200-14-25.mobile.kpn.net)
2021-11-14 21:25:32 +0100Jeanne-Kamikaze(~Jeanne-Ka@static-198-54-131-136.cust.tzulo.com) (Quit: Leaving)
2021-11-14 21:26:51 +0100 <kuribas> dolio: not useless, but heavy for what it gives.
2021-11-14 21:27:18 +0100 <kuribas> It may sometimes catch an accidental recursion, which is easy with lazyness.
2021-11-14 21:30:20 +0100zincy_(~zincy@2a00:23c8:970c:4801:350f:7ee:191a:6f65)
2021-11-14 21:33:37 +0100acidjnk_new3(~acidjnk@p200300d0c736cb18d4b31450c12316ac.dip0.t-ipconnect.de)
2021-11-14 21:35:23 +0100acidjnk_new(~acidjnk@p200300d0c74373762d98dd33bce98ac3.dip0.t-ipconnect.de)
2021-11-14 21:38:42 +0100acidjnk_new3(~acidjnk@p200300d0c736cb18d4b31450c12316ac.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
2021-11-14 21:38:43 +0100zebrag(~chris@user/zebrag)
2021-11-14 21:42:48 +0100kupi(uid212005@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2021-11-14 21:44:21 +0100cjb(~cjbayliss@user/cjb)
2021-11-14 21:44:42 +0100jurjen(~jurjen@89-200-14-25.mobile.kpn.net) (Quit: WeeChat 3.0)
2021-11-14 21:45:45 +0100random-jellyfish(~random-je@user/random-jellyfish) (Ping timeout: 256 seconds)
2021-11-14 21:50:22 +0100tomsmeding(~tomsmedin@tomsmeding.com) (Quit: ZNC 1.8.2 - https://znc.in)
2021-11-14 21:53:13 +0100tomsmeding(~tomsmedin@tomsmeding.com)
2021-11-14 21:55:31 +0100ircbrowse_tom(~ircbrowse@static.162.49.55.162.clients.your-server.de)
2021-11-14 21:55:33 +0100Server+Cnt
2021-11-14 21:58:54 +0100chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2021-11-14 21:59:07 +0100chexum(~quassel@gateway/tor-sasl/chexum)
2021-11-14 22:01:29 +0100edwtjo(~edwtjo@user/edwtjo) (Quit: WeeChat 3.0)
2021-11-14 22:02:47 +0100Feuermagier(~Feuermagi@user/feuermagier) (Ping timeout: 264 seconds)
2021-11-14 22:04:24 +0100alx741(~alx741@181.196.68.69) (Ping timeout: 268 seconds)
2021-11-14 22:06:28 +0100edwtjo(~edwtjo@h-109-228-137-133.A213.priv.bahnhof.se)
2021-11-14 22:06:28 +0100edwtjo(~edwtjo@h-109-228-137-133.A213.priv.bahnhof.se) (Changing host)
2021-11-14 22:06:28 +0100edwtjo(~edwtjo@user/edwtjo)
2021-11-14 22:06:49 +0100kuribas(~user@ptr-25vy0i7llzyvxfc43ot.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2021-11-14 22:10:23 +0100Guest6622(~Guest66@catv-89-134-211-102.catv.broadband.hu) (Quit: Client closed)
2021-11-14 22:13:46 +0100mastarija(~mastarija@2a05:4f46:e06:ff00:9df8:7c4a:6bea:1e5a)
2021-11-14 22:13:54 +0100 <[itchyjunk]> Hi, slightly offtopic link https://www.cambridge.org/core/blog/2021/11/11/journal-of-functional-programming-moving-to-open-ac…
2021-11-14 22:14:16 +0100 <[itchyjunk]> I don't have stomach for reading papers especially FP papers but there must be people who can digest it!
2021-11-14 22:17:35 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk) (Remote host closed the connection)
2021-11-14 22:18:21 +0100alx741(~alx741@181.196.68.69)
2021-11-14 22:22:11 +0100_ht(~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-11-14 22:24:18 +0100 <tomsmeding> yay!
2021-11-14 22:24:56 +0100ubert(~Thunderbi@p548c9652.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-11-14 22:25:14 +0100ubert(~Thunderbi@p548c9652.dip0.t-ipconnect.de)
2021-11-14 22:27:03 +0100ec(~ec@gateway/tor-sasl/ec)
2021-11-14 22:27:55 +0100ec(~ec@gateway/tor-sasl/ec) (Client Quit)
2021-11-14 22:31:28 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl)
2021-11-14 22:32:04 +0100 <tomsmeding> [exa]: I suddenly realise that your regex lib request was for adiff
2021-11-14 22:41:27 +0100machinedgod(~machinedg@24.105.81.50)
2021-11-14 22:44:06 +0100zincy_(~zincy@2a00:23c8:970c:4801:350f:7ee:191a:6f65) (Remote host closed the connection)
2021-11-14 22:48:17 +0100 <[exa]> tomsmeding: precisely
2021-11-14 22:48:18 +0100mcgroin(~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Quit: WeeChat 3.3)
2021-11-14 22:48:26 +0100 <[exa]> it's a bit on hold
2021-11-14 22:48:38 +0100mcgroin(~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2021-11-14 22:48:40 +0100 <[exa]> :]
2021-11-14 22:50:46 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk)
2021-11-14 22:50:47 +0100mvk(~mvk@2607:fea8:5cc3:e900::df92) (Ping timeout: 264 seconds)
2021-11-14 22:51:21 +0100gehmehgeh(~user@user/gehmehgeh) (Quit: Leaving)
2021-11-14 22:53:01 +0100mcgroin(~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 245 seconds)
2021-11-14 22:53:22 +0100slack1256(~slack1256@186.11.4.84)
2021-11-14 22:56:33 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
2021-11-14 22:56:34 +0100cosimone(~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Quit: ERC (IRC client for Emacs 27.1))
2021-11-14 22:58:27 +0100slack1256(~slack1256@186.11.4.84) (Ping timeout: 265 seconds)
2021-11-14 22:59:45 +0100mastarija(~mastarija@2a05:4f46:e06:ff00:9df8:7c4a:6bea:1e5a) (Quit: Leaving)
2021-11-14 23:04:00 +0100jbox(~jbox@user/jbox)
2021-11-14 23:06:04 +0100merijn(~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-11-14 23:09:41 +0100cheater(~Username@user/cheater) (Ping timeout: 245 seconds)
2021-11-14 23:18:12 +0100mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2021-11-14 23:18:37 +0100yauhsien(~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
2021-11-14 23:19:21 +0100 <yin> @type flip id
2021-11-14 23:19:22 +0100 <lambdabot> b -> (b -> c) -> c
2021-11-14 23:19:28 +0100cheater(~Username@user/cheater)
2021-11-14 23:19:31 +0100 <energizer> which other languages have `where`?
2021-11-14 23:19:50 +0100 <yin> ^ can anybody quickly help me wrap my head around this?
2021-11-14 23:20:48 +0100lavaman(~lavaman@98.38.249.169)
2021-11-14 23:21:05 +0100 <[exa]> yin: do you know how substitutions and unifications work?
2021-11-14 23:21:22 +0100 <yin> not formally but i got the intuition
2021-11-14 23:21:23 +0100 <monochrom> Specialize id to (b->c)->(b->c) = (b->c)->b->c, which is ($).
2021-11-14 23:21:31 +0100 <[exa]> yin: in short, you have: id :: x->x; flip :: (a -> (b -> c)) -> b -> (a -> c)
2021-11-14 23:21:58 +0100 <[exa]> then you need to make x -> x fit into the first parameter, so you got equation x->x == a->(b->c)
2021-11-14 23:22:10 +0100 <[exa]> in turn you'll get a == x == b->c
2021-11-14 23:22:26 +0100 <yin> (b -> c) -> b -> (x -> x) -> c
2021-11-14 23:22:27 +0100 <yin> ?
2021-11-14 23:22:47 +0100 <yin> ah no
2021-11-14 23:22:50 +0100 <yin> ok i got it
2021-11-14 23:22:54 +0100ec(~ec@gateway/tor-sasl/ec)
2021-11-14 23:23:00 +0100takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2021-11-14 23:23:11 +0100yauhsien(~yauhsien@61-231-43-127.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2021-11-14 23:23:18 +0100 <[exa]> first step you solve x->x == a->(b->c) because you need to smash the `id` into the first argument
2021-11-14 23:23:20 +0100Gurkenglas(~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds)
2021-11-14 23:23:37 +0100 <[exa]> solution of a symbolic equation is a substitution of variables that makes the sides equal
2021-11-14 23:23:46 +0100 <yin> yeah it clicked
2021-11-14 23:23:50 +0100 <yin> thanks
2021-11-14 23:24:05 +0100 <yin> i'm tired
2021-11-14 23:24:08 +0100 <sshine> x -> x = a -> b -> c, so that is when a = x, and (b -> c) = x.
2021-11-14 23:24:10 +0100 <[exa]> (you can wiki "robinson unification" btw, the process is surprisingly straightforward) :]
2021-11-14 23:24:32 +0100 <[exa]> anyway, just to finish that, you'll eventually get a fact that a==(b->c)
2021-11-14 23:24:46 +0100 <EvanR> energizer, SQL? xD
2021-11-14 23:24:55 +0100 <energizer> elixir, apparently
2021-11-14 23:24:59 +0100 <[exa]> which should lead to final flip id :: b -> ((b->c) -> c)
2021-11-14 23:25:03 +0100 <geekosaur> what variety of `where`?
2021-11-14 23:25:06 +0100lavaman(~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
2021-11-14 23:25:16 +0100 <[exa]> EvanR: rofl
2021-11-14 23:25:38 +0100 <geekosaur> if you mean where blocks, they exist but are not especially common. I couldn't name any off the top of my head though
2021-11-14 23:26:31 +0100 <energizer> https://hexdocs.pm/elixir/guards.html#where-guards-can-be-used
2021-11-14 23:27:15 +0100 <energizer> what's the other kind of where in haskell?
2021-11-14 23:27:20 +0100 <[exa]> julia has a where keyword for type constraints
2021-11-14 23:27:55 +0100 <[exa]> and then there's the SPARQL where but let's not open that box
2021-11-14 23:28:19 +0100 <geekosaur> `where` has multiple meanings in haskell. consider `module Foo where`, `class Foo a where`, etc.
2021-11-14 23:28:47 +0100 <geekosaur> syntactically they all have the same form, but have varied meanings
2021-11-14 23:28:47 +0100 <yin> are we talking about a "where" keyword, or just syntactic sugar for closures in general?
2021-11-14 23:29:17 +0100 <[exa]> sugary still a keyword though
2021-11-14 23:39:04 +0100danso(~danso@23-233-111-52.cpe.pppoe.ca)
2021-11-14 23:39:53 +0100mvk(~mvk@2607:fea8:5cc3:e900::df92)
2021-11-14 23:43:34 +0100burnsidesLlama(~burnsides@dhcp168-014.wadham.ox.ac.uk)
2021-11-14 23:44:15 +0100mcgroin(~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr)
2021-11-14 23:44:48 +0100cadsDoseMeBoofy
2021-11-14 23:49:14 +0100yauhsien(~yauhsien@61-231-43-127.dynamic-ip.hinet.net)
2021-11-14 23:51:22 +0100fuzzypixelz(~fuzzypixe@tchebychev.ensimag.fr)
2021-11-14 23:51:30 +0100unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection)
2021-11-14 23:51:42 +0100Guest43(~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 268 seconds)
2021-11-14 23:51:47 +0100choucavalier(~choucaval@peanutbuttervibes.com) (Quit: ZNC 1.8.2 - https://znc.in)
2021-11-14 23:51:50 +0100unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2021-11-14 23:52:05 +0100choucavalier(~choucaval@peanutbuttervibes.com)
2021-11-14 23:54:46 +0100zaquest(~notzaques@5.130.79.72)
2021-11-14 23:58:26 +0100TranquilEcho(~grom@user/tranquilecho) (Quit: WeeChat 2.8)
2021-11-14 23:58:39 +0100yin(~z@user/zero) ()