2025-02-08 00:02:56 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds) |
2025-02-08 00:07:10 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 00:08:08 +0100 | <EvanR> | >3rd rate college grad |
2025-02-08 00:08:12 +0100 | <EvanR> | I resemble that remark |
2025-02-08 00:08:33 +0100 | <EvanR> | but also not only do I understand recursion it was actually on the syllabus once |
2025-02-08 00:11:20 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-08 00:12:21 +0100 | foul_owl | (~kerry@193.42.0.126) foul_owl |
2025-02-08 00:14:28 +0100 | <c_wraith> | I'm still unsure if understanding recursion was made easier by simultaneously learning how compilers implement it or not. |
2025-02-08 00:15:09 +0100 | michalz | (~michalz@185.246.207.197) (Remote host closed the connection) |
2025-02-08 00:17:21 +0100 | <haskellbridge> | <Bowuigi> Knowing about the stack is good for imperative languages but bad for functional languages IMHO |
2025-02-08 00:17:50 +0100 | <geekosaur> | I'm… not sure I ever didn't understand recursion. I recall being annoyed that there was no way to do it in MS-BASIC |
2025-02-08 00:19:48 +0100 | MyNetAz | (~MyNetAz@user/MyNetAz) (Remote host closed the connection) |
2025-02-08 00:25:33 +0100 | <Leary> | Yeah, for me recursion was an obvious, intuitive tool for simplifying problems; I'd instead stuggle to solve them /without/ it. Though I may have understood it via the principle of induction. |
2025-02-08 00:26:48 +0100 | MyNetAz | (~MyNetAz@user/MyNetAz) MyNetAz |
2025-02-08 00:32:13 +0100 | <geekosaur> | yeh, I can't say whether I'd encountered that by that point or not |
2025-02-08 00:32:35 +0100 | <geekosaur> | but even so, the notion of reducing a problem to a simpler version seemed pretty obvious to me |
2025-02-08 00:46:51 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2025-02-08 00:47:44 +0100 | <hololeap> | I asked this a year back because for some reason this package is hard for me to remember and it's surprisingly difficult to search for |
2025-02-08 00:48:13 +0100 | <hololeap> | but what is the name of the package that contains an Either like data type that accumulates errors? |
2025-02-08 00:49:01 +0100 | <Leary> | @hackage validation |
2025-02-08 00:49:01 +0100 | <lambdabot> | https://hackage.haskell.org/package/validation |
2025-02-08 00:49:24 +0100 | otbergsten | (~otbergste@user/otbergsten) () |
2025-02-08 00:49:37 +0100 | <hololeap> | thanks |
2025-02-08 00:51:20 +0100 | <hololeap> | I also remember there was a related typeclass that was considered to be "between" Applicative and Monad |
2025-02-08 00:51:39 +0100 | <Leary> | @hackage selective |
2025-02-08 00:51:39 +0100 | <lambdabot> | https://hackage.haskell.org/package/selective |
2025-02-08 00:53:36 +0100 | <hololeap> | thank you |
2025-02-08 00:55:14 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 00:59:22 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-08 01:03:24 +0100 | foul_owl | (~kerry@193.42.0.126) (Ping timeout: 252 seconds) |
2025-02-08 01:16:36 +0100 | robobub | (uid248673@id-248673.uxbridge.irccloud.com) robobub |
2025-02-08 01:17:50 +0100 | foul_owl | (~kerry@174-21-138-88.tukw.qwest.net) foul_owl |
2025-02-08 01:19:25 +0100 | Square | (~Square@user/square) Square |
2025-02-08 01:19:43 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-08 01:23:24 +0100 | sprotte24 | (~sprotte24@p200300d16f162e00a0abf896d629d189.dip0.t-ipconnect.de) (Quit: Leaving) |
2025-02-08 01:40:33 +0100 | <haskellbridge> | <Preetham Gujjula> Is there any way to infer "Eq (f a)" from "(Eq a, Eq1 f)"? Here's a small example: |
2025-02-08 01:40:33 +0100 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/txkgrmSDUVjUVWVJRVXKYhNi/LYPi2Ize3LU (21 lines) |
2025-02-08 01:41:23 +0100 | <haskellbridge> | <Preetham Gujjula> Is there any way to infer "Eq (f a)" from "(Eq a, Eq1 f)"? Here's a small example: |
2025-02-08 01:41:23 +0100 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/IWoCXjVZUXtnETfIMFBBSOuB/v7p8RIuNF04 (21 lines) |
2025-02-08 01:43:58 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 01:45:01 +0100 | <haskellbridge> | <Preetham Gujjula> My apologies everyone, I meant to post this in the Haskell matrix channel |
2025-02-08 01:48:08 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-08 01:49:49 +0100 | <Leary> | Preetham: You can write `newtype F1 f a = F1 (f a); instance (Eq1 f, Eq a) => Eq (F1 f a)` and use `coerce @[f a] @[F1 f a]`. |
2025-02-08 01:51:20 +0100 | <haskellbridge> | <sm> Preetham Gujjula: worked perfectly in my matrix client. :) And in IRC client, it was also readable, with two pastebin links |
2025-02-08 01:52:53 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 01:54:50 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 01:55:40 +0100 | <haskellbridge> | <Preetham Gujjula> Oh good to hear sm :) |
2025-02-08 02:02:02 +0100 | <haskellbridge> | <Preetham Gujjula> Leary: I don't think that idea works, GHC warns: |
2025-02-08 02:02:02 +0100 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/AmMeFJGdLlJCilBtJKDYAhqG/0S1DLbftubs (10 lines) |
2025-02-08 02:02:46 +0100 | <haskellbridge> | <Preetham Gujjula> Also why can't I just use the "F1" constructor instead of "coerce"? |
2025-02-08 02:08:00 +0100 | <haskellbridge> | <Preetham Gujjula> Oh wait I see, I can write an implementation for "(==)" using "eq1": |
2025-02-08 02:08:00 +0100 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/SGoxowAGeEDwOguEHnahrMWL/IttEtTK99nU (11 lines) |
2025-02-08 02:08:18 +0100 | <Leary> | Preetham: You still have to define `(==)`, but you can do that with `eq1`. Using `coerce` over `map F1` may avoid a needless traversal of the list, though rewrite rules would likely evade it anyway. |
2025-02-08 02:10:39 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-08 02:13:11 +0100 | <haskellbridge> | <Preetham Gujjula> I see, thanks Leary! |
2025-02-08 02:15:21 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 02:15:44 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 272 seconds) |
2025-02-08 02:16:29 +0100 | <haskellbridge> | <Preetham Gujjula> It does feel a little clunky. The current definition of "Eq1" is "class (forall a. Eq a => Eq (f a)) => Eq1 (f :: Type -> Type)", but I noticed that if we write |
2025-02-08 02:16:32 +0100 | <haskellbridge> | ... long message truncated: https://kf8nh.com/_heisenbridge/media/kf8nh.com/KekKHFuFggARKJEfWBCnMgyf/rXzjao_nHrA (6 lines) |
2025-02-08 02:17:13 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 02:21:14 +0100 | <Leary> | You're probably using a version of GHC/base from before that quantified superclass was added, otherwise it should work the same. |
2025-02-08 02:22:30 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 02:22:58 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-02-08 02:23:30 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 02:24:46 +0100 | acidjnk_new3 | (~acidjnk@p200300d6e7283f9788a4d7c575081360.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2025-02-08 02:30:29 +0100 | zwro | (~z@user/zero) (Ping timeout: 248 seconds) |
2025-02-08 02:30:50 +0100 | zero | (~z@user/zero) zero |
2025-02-08 02:32:02 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 02:36:34 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 265 seconds) |
2025-02-08 02:45:00 +0100 | <haskellbridge> | <Preetham Gujjula> Ah yes, you're right it works on later GHCs. Thank you again! |
2025-02-08 02:52:10 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 02:53:08 +0100 | terrorjack | (~terrorjac@2a01:4f8:c17:a66e::) (The Lounge - https://thelounge.chat) |
2025-02-08 02:54:44 +0100 | aaronv | (~aaronv@user/aaronv) aaronv |
2025-02-08 02:55:11 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2025-02-08 02:58:07 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-08 02:59:43 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 03:09:38 +0100 | zero | (~z@user/zero) (Read error: Connection reset by peer) |
2025-02-08 03:13:03 +0100 | zero | (~z@user/zero) zero |
2025-02-08 03:14:36 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 264 seconds) |
2025-02-08 03:19:46 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 03:21:24 +0100 | dostoevsky | (~dostoevsk@user/dostoevsky) (Remote host closed the connection) |
2025-02-08 03:21:43 +0100 | dostoevsky | (~dostoevsk@user/dostoevsky) dostoevsky |
2025-02-08 03:23:56 +0100 | erdem | (~erdem@user/erdem) (Quit: ZNC 1.9.1 - https://znc.in) |
2025-02-08 03:24:35 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-08 03:27:03 +0100 | xff0x | (~xff0x@2405:6580:b080:900:a44a:d727:8d11:d274) (Ping timeout: 252 seconds) |
2025-02-08 03:28:53 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@c-73-93-78-113.hsd1.ca.comcast.net) Jeanne-Kamikaze |
2025-02-08 03:29:32 +0100 | emergence7 | (emergence@vm0.max-p.me) emergence |
2025-02-08 03:29:51 +0100 | emergence | (emergence@vm0.max-p.me) (Read error: Connection reset by peer) |
2025-02-08 03:29:51 +0100 | emergence7 | emergence |
2025-02-08 03:30:06 +0100 | xff0x | (~xff0x@2405:6580:b080:900:a44a:d727:8d11:d274) |
2025-02-08 03:38:24 +0100 | erdem | (~erdem@user/erdem) erdem |
2025-02-08 03:40:13 +0100 | ColinRobinson | (~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org)) |
2025-02-08 03:41:34 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-08 03:49:58 +0100 | cheater | (~Username@user/cheater) cheater |
2025-02-08 03:53:33 +0100 | aaronv | (~aaronv@user/aaronv) (Remote host closed the connection) |
2025-02-08 03:53:57 +0100 | aaronv | (~aaronv@user/aaronv) aaronv |
2025-02-08 04:00:17 +0100 | aaronv | (~aaronv@user/aaronv) (Remote host closed the connection) |
2025-02-08 04:00:42 +0100 | aaronv | (~aaronv@user/aaronv) aaronv |
2025-02-08 04:00:55 +0100 | tavare | (~tavare@150.129.88.189) |
2025-02-08 04:00:55 +0100 | tavare | (~tavare@150.129.88.189) (Changing host) |
2025-02-08 04:00:55 +0100 | tavare | (~tavare@user/tavare) tavare |
2025-02-08 04:02:53 +0100 | Guest42 | (~Guest42@220-233-36-23.ip4.exetel.com.au) |
2025-02-08 04:04:14 +0100 | Guest42 | (~Guest42@220-233-36-23.ip4.exetel.com.au) (Client Quit) |
2025-02-08 04:08:22 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 268 seconds) |
2025-02-08 04:08:52 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 04:09:53 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-08 04:13:18 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-08 04:15:48 +0100 | fmira | (~user@user/fmira) (Ping timeout: 264 seconds) |
2025-02-08 04:15:58 +0100 | <monochrom> | c_wraith: I am arrogant, I say that I am sure recursion is not more easily learned by see how to compile. In fact, has anything been made easier to learn by seeing how to compile it? |
2025-02-08 04:16:42 +0100 | <c_wraith> | for some people, yes. |
2025-02-08 04:17:08 +0100 | <monochrom> | I even go as far as making this joke. (Context: Everyone except me teach recursion by teaching how to execute by hand.) Your computer has been executing recursion for years. Has it learned anything yet? |
2025-02-08 04:18:02 +0100 | <c_wraith> | I have absolutely seen some people go "oh, it's just using a stack" and never have an issue with it again. |
2025-02-08 04:18:43 +0100 | <monochrom> | Have they gone one step further and go "and the stack is just an optimization"? |
2025-02-08 04:19:08 +0100 | <monochrom> | Because if you don't mind a quadratic slowdown, you don't need a stack. |
2025-02-08 04:21:42 +0100 | <monochrom> | (It is still not O(1) space. Every procedure call becomes an inline expansion of the procedure text.) |
2025-02-08 04:27:29 +0100 | <geekosaur> | how well does that work for a non-fixed number of calls? |
2025-02-08 04:27:58 +0100 | <monochrom> | Equally well. I never assumed a fixed number. |
2025-02-08 04:29:27 +0100 | <monochrom> | A functional example goes like this. To execute f(5), it goes: f(5) -> 5 * f(4) -> 5 * (4 * f(3)) -> 5 * (4 * (3 * f(2))) -> ... |
2025-02-08 04:30:50 +0100 | <monochrom> | If I don't have a stack, I just have to scan the long expression "5 * (4 * (3 * f(2)))" for the redex, f(2). This is slow, but I don't need a stack. A stack is there to save a pointer to the f(2) subexpr so I don't have to search. |
2025-02-08 04:34:42 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 04:35:26 +0100 | <monochrom> | (And also a pointer to the 3*f(2) so I don't have to search in the future when I'm ready for it. And so on so forth.) |
2025-02-08 04:36:58 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 04:45:23 +0100 | MyNetAz | (~MyNetAz@user/MyNetAz) (Remote host closed the connection) |
2025-02-08 04:46:36 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 268 seconds) |
2025-02-08 04:51:10 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 04:52:23 +0100 | MyNetAz | (~MyNetAz@user/MyNetAz) MyNetAz |
2025-02-08 04:54:49 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 04:58:37 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 05:03:15 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-08 05:04:52 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@c-73-93-78-113.hsd1.ca.comcast.net) (Quit: Leaving) |
2025-02-08 05:07:16 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 05:11:25 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 05:13:00 +0100 | cheater_ | (~Username@user/cheater) cheater |
2025-02-08 05:16:33 +0100 | cheater | (~Username@user/cheater) (Ping timeout: 265 seconds) |
2025-02-08 05:16:37 +0100 | cheater_ | cheater |
2025-02-08 05:24:27 +0100 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 252 seconds) |
2025-02-08 05:32:10 +0100 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) gabiruh |
2025-02-08 05:41:09 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 05:44:52 +0100 | emergence7 | (emergence@vm0.max-p.me) emergence |
2025-02-08 05:46:50 +0100 | emergence | (emergence@vm0.max-p.me) (Ping timeout: 252 seconds) |
2025-02-08 05:46:50 +0100 | emergence7 | emergence |
2025-02-08 05:47:42 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 05:51:46 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 05:52:45 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 276 seconds) |
2025-02-08 05:55:03 +0100 | aforemny | (~aforemny@i577B1279.versanet.de) (Ping timeout: 268 seconds) |
2025-02-08 05:55:34 +0100 | aforemny | (~aforemny@2001:9e8:6cc0:9f00:f26a:4821:630d:3b0c) aforemny |
2025-02-08 05:57:52 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-08 06:01:52 +0100 | aaronv | (~aaronv@user/aaronv) (Remote host closed the connection) |
2025-02-08 06:02:34 +0100 | capslair^ | (~capslair@108.192.66.114) (Remote host closed the connection) |
2025-02-08 06:02:47 +0100 | MyNetAz | (~MyNetAz@user/MyNetAz) (Remote host closed the connection) |
2025-02-08 06:04:29 +0100 | aaronv | (~aaronv@user/aaronv) aaronv |
2025-02-08 06:09:25 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 06:09:47 +0100 | MyNetAz | (~MyNetAz@user/MyNetAz) MyNetAz |
2025-02-08 06:12:04 +0100 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2025-02-08 06:12:37 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-02-08 06:13:46 +0100 | duckworld | (~duckworld@user/duckworld) (Remote host closed the connection) |
2025-02-08 06:16:10 +0100 | euphores | (~SASL_euph@user/euphores) (Ping timeout: 252 seconds) |
2025-02-08 06:16:57 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 06:18:39 +0100 | duckworld | (~duckworld@user/duckworld) duckworld |
2025-02-08 06:19:47 +0100 | duckworld | (~duckworld@user/duckworld) (Remote host closed the connection) |
2025-02-08 06:20:23 +0100 | duckworld | (~duckworld@user/duckworld) duckworld |
2025-02-08 06:35:46 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 06:40:41 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-08 06:40:52 +0100 | prasad | (~Thunderbi@2601:243:c001:3f07::53) (Quit: prasad) |
2025-02-08 06:46:18 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 246 seconds) |
2025-02-08 06:48:25 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2025-02-08 06:48:45 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) chexum |
2025-02-08 07:01:58 +0100 | elnegro | (elnegro@r186-54-42-10.dialup.adsl.anteldata.net.uy) elnegro |
2025-02-08 07:08:50 +0100 | tabaqui1 | (~root@87.200.129.102) tabaqui |
2025-02-08 07:09:13 +0100 | elnegro | (elnegro@r186-54-42-10.dialup.adsl.anteldata.net.uy) () |
2025-02-08 07:09:42 +0100 | tavare | (~tavare@user/tavare) (Ping timeout: 252 seconds) |
2025-02-08 07:09:58 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 07:12:23 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 07:12:46 +0100 | euphores | (~SASL_euph@user/euphores) euphores |
2025-02-08 07:16:27 +0100 | foul_owl | (~kerry@174-21-138-88.tukw.qwest.net) (Ping timeout: 268 seconds) |
2025-02-08 07:17:21 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 07:18:11 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 07:20:00 +0100 | tavare | (~tavare@150.129.88.189) |
2025-02-08 07:20:00 +0100 | tavare | (~tavare@150.129.88.189) (Changing host) |
2025-02-08 07:20:00 +0100 | tavare | (~tavare@user/tavare) tavare |
2025-02-08 07:23:51 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 07:24:41 +0100 | tnt2 | (~Thunderbi@user/tnt1) tnt1 |
2025-02-08 07:25:09 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 246 seconds) |
2025-02-08 07:25:09 +0100 | tnt2 | tnt1 |
2025-02-08 07:28:02 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-08 07:28:30 +0100 | foul_owl | (~kerry@193.42.0.122) foul_owl |
2025-02-08 07:32:17 +0100 | igemnace | (~igemnace@user/igemnace) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in) |
2025-02-08 07:33:15 +0100 | igemnace | (~igemnace@user/igemnace) igemnace |
2025-02-08 07:35:20 +0100 | tnt2 | (~Thunderbi@user/tnt1) tnt1 |
2025-02-08 07:36:34 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 260 seconds) |
2025-02-08 07:36:34 +0100 | tnt2 | tnt1 |
2025-02-08 07:38:12 +0100 | takuan | (~takuan@d8D86B601.access.telenet.be) |
2025-02-08 07:47:13 +0100 | tnt2 | (~Thunderbi@user/tnt1) tnt1 |
2025-02-08 07:47:19 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 244 seconds) |
2025-02-08 07:47:19 +0100 | tnt2 | tnt1 |
2025-02-08 07:47:59 +0100 | arahael | (~arahael@user/arahael) (Quit: leaving) |
2025-02-08 07:56:52 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-08 08:00:31 +0100 | JamesMowery4395 | (~JamesMowe@ip68-228-212-232.ph.ph.cox.net) JamesMowery |
2025-02-08 08:05:03 +0100 | duckworld | (~duckworld@user/duckworld) (Remote host closed the connection) |
2025-02-08 08:06:32 +0100 | duckworld | (~duckworld@user/duckworld) duckworld |
2025-02-08 08:09:04 +0100 | tnt2 | (~Thunderbi@user/tnt1) tnt1 |
2025-02-08 08:10:03 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 244 seconds) |
2025-02-08 08:10:03 +0100 | tnt2 | tnt1 |
2025-02-08 08:12:15 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 08:15:02 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 268 seconds) |
2025-02-08 08:16:26 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-08 08:16:33 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-08 08:18:34 +0100 | tavare | (~tavare@user/tavare) (Ping timeout: 260 seconds) |
2025-02-08 08:21:10 +0100 | tavare | (~tavare@user/tavare) tavare |
2025-02-08 08:36:40 +0100 | nitrix | (~nitrix@user/meow/nitrix) (Quit: ZNC 1.8.2 - https://znc.in) |
2025-02-08 08:38:01 +0100 | nitrix | (~nitrix@user/meow/nitrix) nitrix |
2025-02-08 08:53:28 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-02-08 09:00:01 +0100 | caconym | (~caconym@user/caconym) (Quit: bye) |
2025-02-08 09:00:19 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 09:01:03 +0100 | caconym | (~caconym@user/caconym) caconym |
2025-02-08 09:04:41 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 265 seconds) |
2025-02-08 09:07:06 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 09:09:04 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 09:17:03 +0100 | jrm | (~jrm@user/jrm) (Quit: ciao) |
2025-02-08 09:17:27 +0100 | jrm | (~jrm@user/jrm) jrm |
2025-02-08 09:19:03 +0100 | aaronv | (~aaronv@user/aaronv) (Ping timeout: 252 seconds) |
2025-02-08 09:22:50 +0100 | arahael | (~arahael@user/arahael) arahael |
2025-02-08 09:23:06 +0100 | tabaqui1 | (~root@87.200.129.102) (Ping timeout: 246 seconds) |
2025-02-08 09:24:49 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 09:31:14 +0100 | michalz | (~michalz@185.246.207.193) |
2025-02-08 09:31:32 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 09:34:17 +0100 | tzh | (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
2025-02-08 09:48:43 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 09:50:09 +0100 | michalz | (~michalz@185.246.207.193) (Remote host closed the connection) |
2025-02-08 09:52:51 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 246 seconds) |
2025-02-08 09:55:44 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 09:56:29 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 10:02:10 +0100 | tabaqui1 | (~root@87.200.129.102) tabaqui |
2025-02-08 10:02:23 +0100 | acidjnk_new3 | (~acidjnk@p200300d6e7283f0588a4d7c575081360.dip0.t-ipconnect.de) |
2025-02-08 10:18:42 +0100 | <tomsmeding> | monochrom: disclaimer I didn't follow the discussion, just saw stuff in the scrollback |
2025-02-08 10:18:56 +0100 | <tomsmeding> | your functional example is precisely that: a functional example, and it will work well for functionally-minded people |
2025-02-08 10:20:31 +0100 | <tomsmeding> | without prior exposure to either mathematics or functional programming, people tend to be more comfortable with sequential recipes than hierarchical procedures, and learning an imperative language first (before getting to recursion, that is) will only reinforce that |
2025-02-08 10:21:37 +0100 | <tomsmeding> | if you show that execution of a recursive procedure (with the right (rough) complexity! This is important) can be expressed rather simply in terms of a sequential recipe (doing stuff to a stack), then for some people that will map nicely to their mental model |
2025-02-08 10:22:31 +0100 | <tomsmeding> | then they may still lack a good intuition for how to _apply_ recursion, but they can at least reason about what a particular recursive function _does_ -- and that's a very useful stepping stone to understanding how to apply recursion |
2025-02-08 10:23:50 +0100 | <tomsmeding> | the reason why it's important that the operational equivalent has roughly the right complexity is that this hypothetical imperative programmer is probably willing to accept that a recipe that between each step instructs the cook to pet their dog, achieves the same as the recipe that doesn't -- albeit a bit slower |
2025-02-08 10:25:11 +0100 | <tomsmeding> | but if you show them a recipe that, between each step, instructs them (step-by-step) to go over each of the steps they did already and check and make adjustments where necessary (resulting in a quadratically-sized recipe), they'll be confused and be blocked by "why would anyone ever write anything like this" from understanding what's actually going on |
2025-02-08 10:25:49 +0100 | <tomsmeding> | (and if they get past that, they'll question whether those "adjustments where necessary" ever actually change anything -- you'll assure them that they don't, but then they'll just be more confused why the steps are there) |
2025-02-08 10:26:02 +0100 | <tomsmeding> | (this refers to scanning the long expression looking for the redex) |
2025-02-08 10:26:12 +0100 | eL_Bart0 | (eL_Bart0@dietunichtguten.org) |
2025-02-08 10:27:45 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
2025-02-08 10:27:51 +0100 | <peutri> | I'm trying to get this line to compile without warnings (I feel it gives all the relevant context): let size = Relude.length xs * Foreign.Storable.sizeOf(Prelude.head xs) |
2025-02-08 10:28:15 +0100 | <peutri> | warning is: head is partial |
2025-02-08 10:28:24 +0100 | <peutri> | which is fair, but also sizeOf doesn't consume it |
2025-02-08 10:28:26 +0100 | <tomsmeding> | side note: not getting blocked by "why would anyone ever write this" and accepting ridiculous inputs and just rolling with them, is part of mathematical maturity, I think -- i.e. this hypothetical programmer does not have that |
2025-02-08 10:28:31 +0100 | euleritian | (~euleritia@dynamic-176-006-128-136.176.6.pool.telefonica.de) |
2025-02-08 10:28:48 +0100 | misterfish | (~misterfis@84.53.85.146) misterfish |
2025-02-08 10:28:55 +0100 | <tomsmeding> | monochrom: end of rant |
2025-02-08 10:28:55 +0100 | <peutri> | I could put some (undefined :: a), but then Relude yells at me |
2025-02-08 10:29:12 +0100 | <tomsmeding> | peutri: you're running into the unfortunate design of sizeOf |
2025-02-08 10:29:16 +0100 | <peutri> | yup |
2025-02-08 10:29:22 +0100 | <peutri> | any common solution out there? |
2025-02-08 10:29:26 +0100 | <tomsmeding> | undefined :: a |
2025-02-08 10:29:33 +0100 | <tomsmeding> | (for the right a, that is) |
2025-02-08 10:29:39 +0100 | <peutri> | “but then Relude yells at me” |
2025-02-08 10:29:42 +0100 | <tomsmeding> | in what way? |
2025-02-08 10:29:51 +0100 | <peutri> | but I can use Prelude's I guess |
2025-02-08 10:30:07 +0100 | <peutri> | in a “You have undefineds remaining in your code” kind of way |
2025-02-08 10:30:21 +0100 | <tomsmeding> | sizeOf' :: forall a. Proxy a -> Int ; sizeOf' _ = sizeOf (Prelude.undefined :: a) |
2025-02-08 10:30:32 +0100 | <peutri> | I think I'm going to end up defining some term proxy alias in the end |
2025-02-08 10:30:45 +0100 | <peutri> | oh your thing too |
2025-02-08 10:30:45 +0100 | <tomsmeding> | ooh |
2025-02-08 10:30:50 +0100 | <tomsmeding> | sizeOf' :: forall a. proxy a -> Int ; sizeOf' _ = sizeOf (Prelude.undefined :: a) |
2025-02-08 10:30:53 +0100 | <tomsmeding> | note the P -> p |
2025-02-08 10:30:59 +0100 | <tomsmeding> | now you can pass in your list directly to this sizeOf' |
2025-02-08 10:31:18 +0100 | <tomsmeding> | and retain the connection between the list elements and the sizeOf call that your head code had, but the undefined code lost |
2025-02-08 10:32:46 +0100 | tomsmeding | personally feels that this head-is-partial warning is not helpful -- indeed, head is partial, but the programmer knows that, and the sign that something is off (or to be manually checked) is right there in the code: "head" |
2025-02-08 10:33:19 +0100 | <tomsmeding> | if you don't know 'head' is partial, you should think about what it does :p |
2025-02-08 10:33:47 +0100 | AlexZenon | (~alzenon@178.34.151.30) (Ping timeout: 268 seconds) |
2025-02-08 10:33:49 +0100 | <peutri> | I mean, I'm not using it for the function at all, it's just the only [a]->a function I could think of |
2025-02-08 10:34:24 +0100 | <tomsmeding> | I would accept your sizeOf (head) code in code review :p |
2025-02-08 10:34:30 +0100 | <peutri> | “function” overload. That's 1) functionality 2) signature match |
2025-02-08 10:34:33 +0100 | <tomsmeding> | and probably add -Wno-x-partial (or what was it) to the cabal file |
2025-02-08 10:34:46 +0100 | <peutri> | I want localized warning shunning :'( |
2025-02-08 10:35:02 +0100 | <tomsmeding> | in what situation is this warning going to help you? |
2025-02-08 10:35:11 +0100 | <peutri> | no, but it's a big file |
2025-02-08 10:35:50 +0100 | <peutri> | oh sorry misread |
2025-02-08 10:35:55 +0100 | <tomsmeding> | put `sizeOfListElt :: [a] -> Int ; sizeOfListElt = sizeOf . head` in a file with -Wno-x-partial? |
2025-02-08 10:35:58 +0100 | <peutri> | mmm good point actually |
2025-02-08 10:36:15 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 10:36:43 +0100 | sprotte24 | (~sprotte24@p200300d16f1e3a00501959556750eb7a.dip0.t-ipconnect.de) |
2025-02-08 10:37:05 +0100 | <tomsmeding> | you could even defend this sizeOfListElt as "I'm only turning off the partiality warning in this separate file, so I have to watch out more here, but there's little code so it's easy to audit" |
2025-02-08 10:37:07 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 10:37:25 +0100 | <tomsmeding> | never mind the leagues of other partial functions in not-Prelude that don't have an x-partial warning |
2025-02-08 10:37:49 +0100 | AlexZenon | (~alzenon@178.34.151.30) |
2025-02-08 10:38:00 +0100 | <tomsmeding> | I want an exception effect system so that I can statically determine whether an IO operation can throw |
2025-02-08 10:41:07 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 10:41:29 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 260 seconds) |
2025-02-08 10:48:53 +0100 | paddymahoney | (~paddymaho@pool-99-250-10-137.cpe.net.cable.rogers.com) |
2025-02-08 10:53:07 +0100 | __monty__ | (~toonn@user/toonn) toonn |
2025-02-08 10:56:21 +0100 | JuanDaugherty | (~juan@user/JuanDaugherty) JuanDaugherty |
2025-02-08 11:01:47 +0100 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 252 seconds) |
2025-02-08 11:03:04 +0100 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) gabiruh |
2025-02-08 11:03:49 +0100 | euleritian | (~euleritia@dynamic-176-006-128-136.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
2025-02-08 11:04:07 +0100 | euleritian | (~euleritia@ip4d17fae8.dynamic.kabel-deutschland.de) |
2025-02-08 11:12:19 +0100 | lxsameer | (~lxsameer@Serene/lxsameer) lxsameer |
2025-02-08 11:12:52 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2025-02-08 11:15:38 +0100 | JuanDaugherty | ColinRobinson |
2025-02-08 11:17:25 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla |
2025-02-08 11:24:51 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-08 11:25:05 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 11:25:17 +0100 | ColinRobinson | (~juan@user/JuanDaugherty) (Quit: praxis.meansofproduction.biz (juan@acm.org)) |
2025-02-08 11:26:29 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 11:29:18 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-08 11:32:56 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod |
2025-02-08 11:36:39 +0100 | euouae | (~euouae@user/euouae) euouae |
2025-02-08 11:36:59 +0100 | ss4 | (~wootehfoo@user/wootehfoot) wootehfoot |
2025-02-08 11:37:01 +0100 | <euouae> | Hello I'm reading the 1992 STG paper by Jones and I'm wondering if it's worthwhile paying attention to all the technical aspects of the STG language |
2025-02-08 11:37:08 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
2025-02-08 11:37:26 +0100 | <euouae> | I noticed that GHC has a -ddump-stg-from-core that looks a lot like what the paper discusses. Is it a good idea to look at this or has it mutated a lot since 1992? |
2025-02-08 11:37:44 +0100 | hazmat_237 | (~hazmat_23@2406:7400:56:f19f:793f:9847:668d:4a12) |
2025-02-08 11:37:46 +0100 | <euouae> | (including the semantics) |
2025-02-08 11:37:54 +0100 | hazmat_237 | (~hazmat_23@2406:7400:56:f19f:793f:9847:668d:4a12) (Changing host) |
2025-02-08 11:37:54 +0100 | hazmat_237 | (~hazmat_23@user/Monospace) Monospace |
2025-02-08 11:38:02 +0100 | ss4 | (~wootehfoo@user/wootehfoot) (Client Quit) |
2025-02-08 11:38:20 +0100 | remedan | (~remedan@ip-62-245-108-153.bb.vodafone.cz) remedan |
2025-02-08 11:39:57 +0100 | <__monty__> | That depends rather more on your goals than anything. |
2025-02-08 11:41:49 +0100 | <euouae> | I |
2025-02-08 11:41:58 +0100 | <euouae> | I'm just messing around with the lower parts I don't have explicit goals |
2025-02-08 11:42:30 +0100 | <euouae> | But if I should say something I guess my goal is to write optimized & parallel code |
2025-02-08 11:42:36 +0100 | <geekosaur> | IMO if you want to know how to implement it, read SPJ's paper. If you want to understamnd what's going on down there, see Csaba Hruska's STGi |
2025-02-08 11:43:00 +0100 | <geekosaur> | even though that is imcomplete (e.g. doesn't support update frames) |
2025-02-08 11:43:07 +0100 | <geekosaur> | *incomplete |
2025-02-08 11:43:41 +0100 | <geekosaur> | if you want to write optimized and parallel code, stick to Core |
2025-02-08 11:43:48 +0100 | <euouae> | Are you talking about <https://github.com/grin-compiler/ghc-whole-program-compiler-project>? |
2025-02-08 11:43:52 +0100 | <int-e> | Hmm there's the more recent "making a fast curry: push/enter vs. eval/apply" paper as well. And another implementation: https://hackage.haskell.org/package/ministg |
2025-02-08 11:45:32 +0100 | <geekosaur> | not the while thing, just the external STG interpreter |
2025-02-08 11:45:51 +0100 | <int-e> | I don't really know which one comes closest to current GHC in terms of syntax and semantics. |
2025-02-08 11:46:02 +0100 | <geekosaur> | https://github.com/grin-compiler/ghc-whole-program-compiler-project/tree/master/external-stg-inter… |
2025-02-08 11:46:47 +0100 | <euouae> | nice thanks |
2025-02-08 11:47:02 +0100 | <euouae> | when you say stick to Core for optimizations & parallel what do you mean? |
2025-02-08 11:47:25 +0100 | <geekosaur> | GRIN itself seems to be kinda stuck, but STGi will show you how STG works without requiring you to delve into implementation details (SPJ's paper talks a lot about register allocation etc.) |
2025-02-08 11:47:46 +0100 | <euouae> | I've read that Core does not capture certain issues with memory use & other benchmarking analysis |
2025-02-08 11:47:50 +0100 | <geekosaur> | almost all optimizations in ghc are done at the level of Core |
2025-02-08 11:48:19 +0100 | <euouae> | Ah, hm... I meant that I want to write code that is fast, not to study the optimizations of GHC |
2025-02-08 11:48:28 +0100 | <geekosaur> | there are a few things at Cmm and STG levels but you won't find anything except the ghc source to help with those |