2024/10/29

Newest at the top

2024-10-29 13:20:01 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-10-29 13:19:29 +0100 <tomsmeding> ash3en: see the docs for parseOnly, perhaps?
2024-10-29 13:18:52 +0100 <tomsmeding> ash3en: that "Partial" suspiciously sounds like you need to tell attoparsec that your end-of-string is really EOF and there is not more data coming
2024-10-29 13:07:39 +0100Digit(~user@user/digit) Digit
2024-10-29 13:06:43 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 264 seconds)
2024-10-29 13:03:50 +0100rvalue(~rvalue@user/rvalue) rvalue
2024-10-29 13:03:20 +0100rvalue(~rvalue@user/rvalue) (Read error: Connection reset by peer)
2024-10-29 13:01:08 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-10-29 13:00:14 +0100CiaoSen(~Jura@2a05:5800:47e:3300:ca4b:d6ff:fec1:99da) CiaoSen
2024-10-29 12:55:36 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 246 seconds)
2024-10-29 12:52:09 +0100alphazone(~alphazone@2.219.56.221) (Ping timeout: 276 seconds)
2024-10-29 12:50:31 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-10-29 12:45:34 +0100L29Ah(~L29Ah@wikipedia/L29Ah) L29Ah
2024-10-29 12:45:32 +0100merijn(~merijn@77.242.116.146) merijn
2024-10-29 12:35:42 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds)
2024-10-29 12:33:16 +0100lortabac(~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) lortabac
2024-10-29 12:33:07 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 264 seconds)
2024-10-29 12:32:33 +0100 <ash3en> maybe I don't need attoparsec after all, but I probably will keep using it for convenience now
2024-10-29 12:31:14 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-10-29 12:30:57 +0100 <ash3en> Ah! oversaw that! mauke, I will try!
2024-10-29 12:30:53 +0100 <mauke> very much not using attoparsec, though
2024-10-29 12:30:14 +0100 <Rembane> ash3en: Cool, I think mauke has a reasonable solution. :)
2024-10-29 12:28:12 +0100 <ash3en> Rembane: it results in a "Partial _" this way: many' (take 4)
2024-10-29 12:26:41 +0100merijn(~merijn@77.242.116.146) merijn
2024-10-29 12:25:34 +0100 <lambdabot> ["\SOH\STX\ETX\EOT"]
2024-10-29 12:25:33 +0100 <mauke> > unfoldr (\s -> if BS.length s < 4 then Nothing else Just (BS.splitAt 4 s)) (BSC.pack "\1\2\3\4\5\6\7")
2024-10-29 12:24:44 +0100 <lambdabot> with actual type ‘[Char]’
2024-10-29 12:24:44 +0100 <lambdabot> • Couldn't match expected type ‘BSC.ByteString’
2024-10-29 12:24:44 +0100 <lambdabot> error:
2024-10-29 12:24:42 +0100 <mauke> > unfoldr (\s -> if BS.length s < 4 then Nothing else Just (BS.splitAt 4 s)) "\1\2\3\4\5\6\7"
2024-10-29 12:24:18 +0100 <lambdabot> BSC.ByteString -> [BSC.ByteString]
2024-10-29 12:24:17 +0100 <mauke> :t unfoldr (\s -> if BS.length s < 4 then Nothing else Just (BS.splitAt 4 s))
2024-10-29 12:21:50 +0100 <Rembane> Let me rephrase this to see if I understand it, is the problem that many (take 4) will throw away the last fewer than 4 bytes?
2024-10-29 12:21:00 +0100zetef(~quassel@5.14.132.142) (Client Quit)
2024-10-29 12:21:00 +0100zetef(~quassel@5.14.132.142) zetef
2024-10-29 12:15:33 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds)
2024-10-29 12:15:31 +0100 <ash3en> Attoparsec's take it is
2024-10-29 12:15:02 +0100 <ash3en> for now i use "take 4". just want to repeat this using sth like many but with a conditiion -- to maybe lookAhead and count bytes? -- if there are less than 4 left or EOF give back the result. all that with performance in mind
2024-10-29 12:15:02 +0100 <ash3en> i have no problem to figure it out myself with a few hints/best practices : )
2024-10-29 12:13:49 +0100merijn(~merijn@77.242.116.146) (Ping timeout: 260 seconds)
2024-10-29 12:13:35 +0100 <Rembane> ash3en: What functions/combinators are you using to get 4 bytes?
2024-10-29 12:13:13 +0100 <Rembane> Got it!
2024-10-29 12:11:43 +0100 <ash3en> problem is to create these list with take and many. it does not stop on time (when eof is reached or less than 4 byte left)
2024-10-29 12:10:30 +0100 <Rembane> Or maybe the tail goes on the other argument... hm...
2024-10-29 12:09:15 +0100 <Rembane> ash3en: If you have a list of 4 byte chunks, and that list is called xs, you can go: zip xs (tail xs)
2024-10-29 12:08:24 +0100morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-10-29 12:07:13 +0100 <ash3en> many'
2024-10-29 12:07:07 +0100 <ash3en> combined with many was my first thought. but stopping it was not successfull so far
2024-10-29 12:06:02 +0100 <ash3en> i think
2024-10-29 12:05:56 +0100 <ash3en> take 4