Newest at the top
2025-01-08 07:31:17 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
2025-01-08 07:28:43 +0100 | rvalue | (~rvalue@user/rvalue) (Ping timeout: 244 seconds) |
2025-01-08 07:27:56 +0100 | rvalue- | (~rvalue@user/rvalue) rvalue |
2025-01-08 07:26:41 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-08 07:26:40 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
2025-01-08 07:24:02 +0100 | <hololeap> | I tried using (\f -> sourceFile f .| decodeUtf8Lenient .| mapC (f,)), but for some reason it only read part of the file when I tested it |
2025-01-08 07:23:44 +0100 | <haskellbridge> | <maerwald> jackdk: Uh... directory-tree uses lazy IO. That's not the same as a proper streaming library. It just blows up randomly in your face. |
2025-01-08 07:22:35 +0100 | <hololeap> | my only question is if Data.Text.IO.readFile makes sense here |
2025-01-08 07:22:01 +0100 | <hololeap> | this looks a lot cleaner with conduit: https://github.com/hololeap/cabal-portage/blob/c85bc09e23514d816b6d1936b7ebbacb058fe58a/portage-hs… |
2025-01-08 07:18:09 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2025-01-08 07:17:52 +0100 | dtman34 | (~dtman34@2601:447:d080:1a3c:6104:fe1a:e15b:6312) dtman34 |
2025-01-08 07:16:42 +0100 | hgolden | (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) hgolden |
2025-01-08 07:15:59 +0100 | hgolden | (~hgolden@2603:8000:9d00:3ed1:6ff3:8389:b901:6363) (Ping timeout: 260 seconds) |
2025-01-08 07:15:48 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2025-01-08 07:12:44 +0100 | Eoco | (~ian@128.101.131.218) Eoco |
2025-01-08 07:11:42 +0100 | Eoco | (~ian@128.101.131.218) (Ping timeout: 252 seconds) |
2025-01-08 07:11:18 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-08 07:10:50 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) sord937 |
2025-01-08 07:10:28 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-01-08 07:00:22 +0100 | michalz | (~michalz@185.246.207.221) |
2025-01-08 06:59:58 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2025-01-08 06:57:52 +0100 | dtman34 | (~dtman34@2601:447:d080:1a3c:effe:71d9:1c5c:6a1a) (Ping timeout: 265 seconds) |
2025-01-08 06:56:18 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
2025-01-08 06:56:13 +0100 | <haskellbridge> | <yatta> maerwald: Maybe the jokes on us and his bouncer is performing exactly as planned? |
2025-01-08 06:55:19 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-08 06:50:22 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2025-01-08 06:42:26 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-08 06:39:34 +0100 | <monochrom> | If you want Nothing ??? pure foo = pure foo, consider using <|> instead: Nothing <|> pure foo. In other words, you are looking for { throw Exception; } catch Exception { return foo; } |
2025-01-08 06:37:49 +0100 | <monochrom> | But if you prefer pragmatics to theory, every exception system, in every language, says that { throw Exception; return (div 5 2); } is going to throw that exception rather than return normally. |
2025-01-08 06:36:40 +0100 | <monochrom> | Belated: Nothing >> pure foo = Nothing is pretty much forced by the monad laws. Several laws are involved, but the most damning one is k >>= pure = k, now let k be Nothing. |
2025-01-08 06:31:39 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 245 seconds) |
2025-01-08 06:27:03 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-08 06:15:36 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2025-01-08 06:12:17 +0100 | forell | (~forell@user/forell) (Ping timeout: 248 seconds) |
2025-01-08 06:09:00 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2025-01-08 06:08:04 +0100 | <jackdk> | I like https://hackage.haskell.org/package/directory-tree for this sort of thing, unless you really need to handle large inputs (I haven't tested its lazy `readDirectoryWithL` function). Otherwise, yeah, streaming libraries would be the way to go. I tend to use package `streaming`. |
2025-01-08 06:03:12 +0100 | eL_Bart0 | (eL_Bart0@dietunichtguten.org) (Ping timeout: 246 seconds) |
2025-01-08 06:01:12 +0100 | <hololeap> | I'm ok with using conduit here |
2025-01-08 06:00:36 +0100 | <int-e> | I'm not arguing against that, it's a separate question |
2025-01-08 06:00:35 +0100 | <c_wraith> | that's kind of the whole point of it. |
2025-01-08 05:59:48 +0100 | <c_wraith> | which actually won't construct the whole list in memory before moving to the next step |
2025-01-08 05:59:36 +0100 | <c_wraith> | you have tools like https://hackage.haskell.org/package/conduit-1.3.6/docs/Data-Conduit-Combinators.html#v:sourceDirec… |
2025-01-08 05:59:25 +0100 | <c_wraith> | I mean, conduit really is better. |
2025-01-08 05:58:54 +0100 | Square2 | (~Square@user/square) (Ping timeout: 265 seconds) |
2025-01-08 05:58:09 +0100 | <int-e> | oh it's \m -> lift m >>= fromList |
2025-01-08 05:57:57 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
2025-01-08 05:57:00 +0100 | <hololeap> | this was the one use-case where ListT was actually the most elegant way to do it |
2025-01-08 05:56:54 +0100 | Feuermagier | (~Feuermagi@user/feuermagier) Feuermagier |
2025-01-08 05:54:44 +0100 | <lambdabot> | LogicT . (. foldr) . (.) . (>>=) |
2025-01-08 05:54:44 +0100 | <int-e> | @pl \x -> LogicT (\f c -> x >>= foldr f c) |