2024/12/29

Newest at the top

2024-12-29 19:05:55 +0100 <kaol> I may not be completely serious.
2024-12-29 19:05:34 +0100 <ash3en> kaol: :'(
2024-12-29 19:05:28 +0100euleritian(~euleritia@dynamic-176-003-015-198.176.3.pool.telefonica.de)
2024-12-29 19:04:58 +0100 <kaol> Every time you name a variable god kills a kitten.
2024-12-29 19:04:40 +0100TheCoffeMaker(~TheCoffeM@user/thecoffemaker) TheCoffeMaker
2024-12-29 19:03:53 +0100 <kaol> Peachy. I'll start it on my personal code, haters gonna hate.
2024-12-29 19:03:44 +0100 <ash3en> c_wraith: i will keep that version as a comment :D
2024-12-29 19:03:24 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds)
2024-12-29 19:02:57 +0100 <c_wraith> look, I rediscovered it!
2024-12-29 19:02:43 +0100TheCoffeMaker(~TheCoffeM@user/thecoffemaker) (Remote host closed the connection)
2024-12-29 19:02:27 +0100 <lambdabot> Functor f => (a -> f b) -> a -> f a
2024-12-29 19:02:23 +0100 <statusbot> Maintenance update: Hackage will be offline for a redeploy -- http://status.haskell.org/pages/maintenance/537c07b0cf1fad5830000093/67718e964449ab5853e77361
2024-12-29 19:02:19 +0100 <c_wraith> :t ((<$) <*>) -- amusingly....
2024-12-29 19:02:11 +0100notzmv(~umar@user/notzmv) (Ping timeout: 252 seconds)
2024-12-29 19:01:57 +0100 <kaol> Now that you mention it this is a function I've been hoping for myself more than once.
2024-12-29 19:01:32 +0100Square(~Square@user/square) Square
2024-12-29 19:00:35 +0100 <ash3en> haha nice kaol, but I'll pass on this lib probably
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 +0100merijn(~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 +0100euleritian(~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 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds)
2024-12-29 18:43:30 +0100machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 276 seconds)
2024-12-29 18:41:40 +0100talismanick(~user@2601:644:937c:ed10::ae5) talismanick
2024-12-29 18:40:27 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-29 18:37:48 +0100Digit(~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 +0100Digit(~user@198.144.208.46.dyn.plus.net) (Read error: Connection reset by peer)
2024-12-29 18:35:06 +0100billchenchina(~billchenc@2a0d:2580:ff0c:1:4a35:c1dc:b9b7:67d8) (Quit: Leaving)
2024-12-29 18:33:22 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) ash3en
2024-12-29 18:27:38 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-12-29 18:22:59 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2024-12-29 18:20:06 +0100ash3en(~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 276 seconds)
2024-12-29 18:18:57 +0100talismanick(~user@2601:644:937c:ed10::ae5) (Remote host closed the connection)
2024-12-29 18:13:21 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 248 seconds)
2024-12-29 18:12:22 +0100Square(~Square@user/square) (Remote host closed the connection)