Newest at the top
2024-12-29 18:59:21 +0100 | <kaol> | There's https://hackage.haskell.org/package/IfElse-0.85/docs/Control-Monad-IfElse.html#v:returning but that's not any library I'd consider for my usual toolbox. |
2024-12-29 18:58:59 +0100 | <c_wraith> | sadly, I can read it now. :) |
2024-12-29 18:58:41 +0100 | <ash3en> | yeah, that seems not too readable : ) |
2024-12-29 18:58:15 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-29 18:57:32 +0100 | <c_wraith> | but... don't. For the sake of anyone looking at the code in the future. |
2024-12-29 18:57:18 +0100 | <c_wraith> | Like, you could replace the last two lines with.... (<$) <*> takeRemainingNulBytes $ st |
2024-12-29 18:56:57 +0100 | <ash3en> | so parse until nul bytes; discard all padded null bytes; keep parsing |
2024-12-29 18:55:24 +0100 | <ash3en> | takeRemainingNulBytes discards remaining nul bytes that are just used to pad the string to a multiple of 32bit. so after i have parsed the string i want to discard the remaining nul bytes. however the next value i want to parse may be a zero so i can not just discard ALL nul bytes. just the ones used for padding |
2024-12-29 18:55:20 +0100 | <c_wraith> | If that's just to illustrate a common pattern... you can eliminate it, but it's... bad. |
2024-12-29 18:54:20 +0100 | <glguy> | is that what it does? |
2024-12-29 18:54:07 +0100 | euleritian | (~euleritia@dynamic-176-003-015-198.176.3.pool.telefonica.de) (Ping timeout: 264 seconds) |
2024-12-29 18:54:04 +0100 | <glguy> | attoparsec's "skip (0==)" is shorter than that name |
2024-12-29 18:53:41 +0100 | <c_wraith> | but why does takeRemainingNulBytes even have a parameter? |
2024-12-29 18:53:36 +0100 | <glguy> | it's not obvious to me what takeRemainingNulBytes does or what it needs st |
2024-12-29 18:53:23 +0100 | <glguy> | the pure st seems pretty important because that's where you specified the return value |
2024-12-29 18:53:20 +0100 | <c_wraith> | there's <* |
2024-12-29 18:52:55 +0100 | <ash3en> | hm, I thought maybe there is a more concise version of this. the explicit return/pure is a bit annoying imo |
2024-12-29 18:51:43 +0100 | <glguy> | ash3en, what part of it do you want to eliminate? |
2024-12-29 18:45:01 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2024-12-29 18:43:30 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 276 seconds) |
2024-12-29 18:41:40 +0100 | talismanick | (~user@2601:644:937c:ed10::ae5) talismanick |
2024-12-29 18:40:27 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-29 18:37:48 +0100 | Digit | (~user@198.144.208.46.dyn.plus.net) |
2024-12-29 18:37:13 +0100 | <ash3en> | hi, can i make this a bit less repetetive? https://paste.tomsmeding.com/dQn16HaU |
2024-12-29 18:37:09 +0100 | Digit | (~user@198.144.208.46.dyn.plus.net) (Read error: Connection reset by peer) |
2024-12-29 18:35:06 +0100 | billchenchina | (~billchenc@2a0d:2580:ff0c:1:4a35:c1dc:b9b7:67d8) (Quit: Leaving) |
2024-12-29 18:33:22 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en |
2024-12-29 18:27:38 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
2024-12-29 18:22:59 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-29 18:20:06 +0100 | ash3en | (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 276 seconds) |
2024-12-29 18:18:57 +0100 | talismanick | (~user@2601:644:937c:ed10::ae5) (Remote host closed the connection) |
2024-12-29 18:13:21 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Ping timeout: 248 seconds) |
2024-12-29 18:12:22 +0100 | Square | (~Square@user/square) (Remote host closed the connection) |
2024-12-29 18:11:39 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
2024-12-29 18:08:27 +0100 | econo_ | (uid147250@id-147250.tinside.irccloud.com) |
2024-12-29 18:07:28 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-29 18:02:36 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 264 seconds) |
2024-12-29 17:59:36 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
2024-12-29 17:59:08 +0100 | annamalai | (~yaaic@2409:4072:609c:96c7::1350:d8b1) annamalai |
2024-12-29 17:57:47 +0100 | acidjnk_new3 | (~acidjnk@p200300d6e7283f89c5dccb51c3ab6697.dip0.t-ipconnect.de) acidjnk |
2024-12-29 17:57:09 +0100 | tnt2 | tnt1 |
2024-12-29 17:57:09 +0100 | tnt1 | (~Thunderbi@user/tnt1) (Ping timeout: 246 seconds) |
2024-12-29 17:56:08 +0100 | tnt2 | (~Thunderbi@user/tnt1) tnt1 |
2024-12-29 17:54:57 +0100 | merijn | (~merijn@128-137-045-062.dynamic.caiway.nl) merijn |
2024-12-29 17:47:41 +0100 | kevinz56 | (~kevinz56@202.134.186.134) (Client Quit) |
2024-12-29 17:47:02 +0100 | <kevinz56> | Hii |
2024-12-29 17:46:51 +0100 | kevinz56 | (~kevinz56@202.134.186.134) |
2024-12-29 17:46:31 +0100 | Guest62 | (~Guest10@202.134.186.134) (Client Quit) |
2024-12-29 17:46:14 +0100 | Guest62 | (~Guest10@202.134.186.134) |
2024-12-29 17:44:08 +0100 | rekahsoft | (~rekahsoft@76.69.85.220) rekahsoft |