Newest at the top
2025-03-19 22:55:57 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla |
2025-03-19 22:55:42 +0100 | notdabs | (~Owner@2600:1700:69cf:9000:28cb:4a01:fb92:fda0) |
2025-03-19 22:55:05 +0100 | michalz | (~michalz@185.246.207.193) (Remote host closed the connection) |
2025-03-19 22:54:33 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
2025-03-19 22:53:02 +0100 | notdabs | (~Owner@2600:1700:69cf:9000:c1b9:805:b7a6:91b1) (Read error: Connection reset by peer) |
2025-03-19 22:52:52 +0100 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-03-19 22:52:28 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 245 seconds) |
2025-03-19 22:50:38 +0100 | ljdarj1 | (~Thunderbi@user/ljdarj) (Client Quit) |
2025-03-19 22:50:11 +0100 | ljdarj1 | (~Thunderbi@user/ljdarj) ljdarj |
2025-03-19 22:49:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-19 22:43:50 +0100 | ljdarj | (~Thunderbi@user/ljdarj) ljdarj |
2025-03-19 22:39:01 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-03-19 22:38:49 +0100 | <tomsmeding> | INTERCAL vibes, except "unsafe" makes your code faster |
2025-03-19 22:37:44 +0100 | <EvanR> | xD |
2025-03-19 22:37:28 +0100 | <EvanR> | unsafe stages in the processing are faster! |
2025-03-19 22:37:12 +0100 | <EvanR> | it does look like a rewritable thing as is |
2025-03-19 22:36:47 +0100 | <tomsmeding> | perhaps people have rewrite RULES on Data.List.scanr and delegating to that preserves the RULES' effect? |
2025-03-19 22:36:14 +0100 | <EvanR> | and would be checked by the compiler |
2025-03-19 22:36:05 +0100 | <EvanR> | the API is safe because of an invisible proof about the implementation, but if it was written slightly different the proof would not be invisible |
2025-03-19 22:35:53 +0100 | <[exa]> | tomsmeding: the ox arrays look cool thanks |
2025-03-19 22:35:28 +0100 | <tomsmeding> | if they aren't, then who _are_ they useful for |
2025-03-19 22:35:12 +0100 | <[exa]> | the tail&head warnings are not super useful for newbies tbh |
2025-03-19 22:35:08 +0100 | <EvanR> | but performance |
2025-03-19 22:34:59 +0100 | <EvanR> | I was hoping it would just write scanr without doing that |
2025-03-19 22:34:35 +0100 | <tomsmeding> | it's the premise of ST |
2025-03-19 22:34:29 +0100 | <tomsmeding> | but it's encapsulated in a safe API, much of FP is like that |
2025-03-19 22:34:21 +0100 | <EvanR> | but I guess we don't need to know that |
2025-03-19 22:34:16 +0100 | <EvanR> | which crashes on an empty list xD |
2025-03-19 22:34:10 +0100 | <EvanR> | the code for scanr internally does fromList |
2025-03-19 22:33:20 +0100 | <tomsmeding> | okay that works |
2025-03-19 22:33:17 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-03-19 22:33:11 +0100 | <tomsmeding> | yep, nice |
2025-03-19 22:33:10 +0100 | <EvanR> | I guess |
2025-03-19 22:33:07 +0100 | <EvanR> | tail :: NonEmpty a -> [a] |
2025-03-19 22:33:06 +0100 | <tomsmeding> | ah! |
2025-03-19 22:33:03 +0100 | <EvanR> | and then |
2025-03-19 22:32:32 +0100 | <haskellbridge> | <Jade> "Data.List.NonEmpty" has "scanr :: Foldable f => (a -> b -> b) -> b -> f a -> NonEmpty b" |
2025-03-19 22:32:02 +0100 | <EvanR> | scanr :: Foldable f => (a -> b -> b) -> b -> f a -> NonEmpty b |
2025-03-19 22:31:44 +0100 | <tomsmeding> | this is sometimes called prescanr, but Data.List doesn't have it |
2025-03-19 22:31:20 +0100 | <tomsmeding> | yep |
2025-03-19 22:31:16 +0100 | <EvanR> | wrong direction |
2025-03-19 22:31:15 +0100 | <tomsmeding> | if you're idealistic about totality (which is okay), it's scanr that you should tackle here |
2025-03-19 22:31:09 +0100 | <EvanR> | hmm |
2025-03-19 22:31:04 +0100 | <lambdabot> | (a -> a -> a) -> [a] -> [a] |
2025-03-19 22:31:03 +0100 | <EvanR> | :t scanr1 |
2025-03-19 22:30:32 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-03-19 22:30:23 +0100 | <tomsmeding> | Jade: I have a list and I want tail (scanr (*) 1 list), how do I use nonempty? |
2025-03-19 22:30:21 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) machinedgod |
2025-03-19 22:30:15 +0100 | <EvanR> | since that conversion has an impossible case, just kicking the can down the road |
2025-03-19 22:30:04 +0100 | <EvanR> | if you have a list you know is non-empty, then converting it to NonEmpty just so you can use head or tail won't help |