2025/05/16

Newest at the top

2025-05-16 20:16:50 +0200 <EvanR> if you tried reading in an unknown amount using strict bytestring you'd have to "reallocate" when your guess at total size keeps being wrong
2025-05-16 20:16:23 +0200 <EvanR> I see. By using lazy I/O you can allocate chunks in order and they're already chained together
2025-05-16 20:13:29 +0200tromp(~textual@2001:1c00:3487:1b00:a44a:50e6:3df5:3b66) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-05-16 20:13:26 +0200tzh(~tzh@c-76-115-131-146.hsd1.or.comcast.net)
2025-05-16 20:13:16 +0200vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 276 seconds)
2025-05-16 20:12:05 +0200acidjnk(~acidjnk@p200300d6e71c4f410c8650aa1a5c1c11.dip0.t-ipconnect.de) acidjnk
2025-05-16 20:11:52 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 252 seconds)
2025-05-16 20:09:39 +0200 <ski> but since wbrawner already had a `Response a' here, no need to wrap in `Right' and pass to `getResponseBody', better to just extract the `responseBody' field
2025-05-16 20:09:04 +0200 <EvanR> classy
2025-05-16 20:08:46 +0200 <ski> (throwing exception in case of `Left', apparently)
2025-05-16 20:08:25 +0200 <ski> where `Result = Either Whatever'
2025-05-16 20:08:21 +0200sabathan2(~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr)
2025-05-16 20:08:18 +0200acarrico(~acarrico@pppoe-209-99-221-107.greenmountainaccess.net) (Quit: Leaving.)
2025-05-16 20:08:12 +0200 <ski> EvanR : it is `IO', but it takes `Result (Response a)', not `Response a'
2025-05-16 20:08:03 +0200 <EvanR> hax
2025-05-16 20:07:52 +0200sabathan2(~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr) (Remote host closed the connection)
2025-05-16 20:05:45 +0200 <c_wraith> length is sufficient
2025-05-16 20:03:38 +0200 <EvanR> deepseq
2025-05-16 20:03:26 +0200 <EvanR> how do you even do that
2025-05-16 20:03:14 +0200 <EvanR> I'm boggling at reading in an entire lazy bytestring and closing the connection immediately xD
2025-05-16 20:02:28 +0200 <EvanR> it says immediately closes the connection
2025-05-16 20:02:23 +0200 <EvanR> I paraphrased it
2025-05-16 20:00:13 +0200 <monochrom> Hell, also for the "read" part.
2025-05-16 19:59:41 +0200 <monochrom> You can believe all of it, keeping in mind it never said "right now right away" for the "close" part.
2025-05-16 19:58:29 +0200 <c_wraith> I'm not sure which part of the docs to disbelieve
2025-05-16 19:58:13 +0200 <c_wraith> It's either not lazy for efficiency or doesn't promptly close the connection
2025-05-16 19:54:55 +0200 <EvanR> I'm wondering how lazy that strategy can be
2025-05-16 19:53:51 +0200 <monochrom> A Data.ByteString.Lazy of Flesh
2025-05-16 19:51:52 +0200dibblego(~dibblego@haskell/developer/dibblego) dibblego
2025-05-16 19:51:52 +0200dibblego(~dibblego@116.255.1.119) (Changing host)
2025-05-16 19:51:52 +0200dibblego(~dibblego@116.255.1.119)
2025-05-16 19:51:23 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-16 19:51:02 +0200 <EvanR> httpLbs (pronounced http pounds of course), "reads in the entire response and closes the connection. uses lazy bytestring for memory efficiency" o_O
2025-05-16 19:50:00 +0200dibblego(~dibblego@haskell/developer/dibblego) (Ping timeout: 244 seconds)
2025-05-16 19:49:37 +0200 <monochrom> When meaningful names go wrong. :)
2025-05-16 19:48:43 +0200 <EvanR> or not supposed to be
2025-05-16 19:48:29 +0200 <EvanR> oh getResponseBody is not IO
2025-05-16 19:48:04 +0200 <ski> wbrawner ^
2025-05-16 19:47:56 +0200 <ski> return (L8.unpack (responseBody response))
2025-05-16 19:47:40 +0200 <ski> oh, and that would make it
2025-05-16 19:47:26 +0200 <ski> hm, try replacing `getResponseBody' with `responseBody' ?
2025-05-16 19:46:34 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-05-16 19:42:45 +0200jespada(~jespada@r179-25-150-22.dialup.adsl.anteldata.net.uy) (Client Quit)
2025-05-16 19:41:40 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-16 19:40:58 +0200jespada(~jespada@r179-25-150-22.dialup.adsl.anteldata.net.uy) jespada
2025-05-16 19:39:12 +0200 <ski> `(<$>)' is another name for `fmap'
2025-05-16 19:38:47 +0200 <wbrawner> That gives me Couldn't match type ‘L8.ByteString’ with ‘IO L8.ByteString’
2025-05-16 19:38:29 +0200 <wbrawner> Haven't seen that before, I'll have to read up on what it is
2025-05-16 19:37:08 +0200 <ski> yep
2025-05-16 19:37:06 +0200 <ski> L8.unpack <$> getResponseBody response