Logs: freenode/#haskell
| 2021-03-23 22:06:59 | <__minoru__shirae> | there is a Network.Socket.ByteString.Lazy module: https://hackage.haskell.org/package/network-3.1.2.1/docs/Network-Socket-ByteString-Lazy.html |
| 2021-03-23 22:09:31 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 2021-03-23 22:09:52 | <lukelau_> | __minoru__shirae: hm was hoping i wouldnt have to drop down to the socket level |
| 2021-03-23 22:10:32 | <lukelau_> | is there a reason though as to why http packages currently wait for the entire response before returning lazy results? |
| 2021-03-23 22:11:12 | <lukelau_> | i gather that some might want to throw an exception if the status code isn’t 200, but thats the first thing that arrives |
| 2021-03-23 22:13:57 | → | geowiesnot_bis joins (~user@87-89-181-157.abo.bbox.fr) |
| 2021-03-23 22:15:58 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:30aa:5abb:2db7:7fb5) |
| 2021-03-23 22:17:20 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Quit: Lost terminal) |
| 2021-03-23 22:18:02 | × | knupfer quits (~Thunderbi@i59F7FF9C.versanet.de) (Ping timeout: 264 seconds) |
| 2021-03-23 22:19:16 | <__minoru__shirae> | lukelau_: I think that an exception you're talking about has different semantics than http response code semantics |
| 2021-03-23 22:20:46 | <__minoru__shirae> | server can start sending you a 200 response with a big body and fail in the middle of it |
| 2021-03-23 22:20:57 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 264 seconds) |
| 2021-03-23 22:21:34 | × | malumore quits (~malumore@151.62.117.161) (Remote host closed the connection) |
| 2021-03-23 22:21:44 | <__minoru__shirae> | http protocol doesn't guarrantee that once started, a transaction of sending an answer can't fail, right? |
| 2021-03-23 22:21:59 | <lukelau_> | I guess |
| 2021-03-23 22:22:07 | → | malumore joins (~malumore@151.62.117.161) |
| 2021-03-23 22:22:14 | <lukelau_> | And by fail that presumably means the connection is closed before Content-Length bytes are read? |
| 2021-03-23 22:22:34 | <__minoru__shirae> | yeah, something like that |
| 2021-03-23 22:22:42 | × | apeyroux quits (~alex@78.20.138.88.rev.sfr.net) (Ping timeout: 256 seconds) |
| 2021-03-23 22:23:04 | <__minoru__shirae> | because you would need time travel to fix the response code of that response |
| 2021-03-23 22:24:40 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-03-23 22:25:35 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 2021-03-23 22:25:54 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-109-157.w86-212.abo.wanadoo.fr) |
| 2021-03-23 22:26:19 | <__minoru__shirae> | wait, do you have to know the Content-Length beforehand? |
| 2021-03-23 22:26:39 | <__minoru__shirae> | then that's another reason |
| 2021-03-23 22:26:47 | <Axman6> | lukelau_: what about wreq? https://hackage.haskell.org/package/wreq-0.5.3.3/docs/Network-Wreq.html |
| 2021-03-23 22:26:48 | <__minoru__shirae> | but I'm not sure if it's required |
| 2021-03-23 22:27:29 | <lukelau_> | __minoru__shirae: no, the http request i’m making streams blobs of json separated by newlines |
| 2021-03-23 22:27:34 | <lukelau_> | so its content-length is infinite really |
| 2021-03-23 22:27:55 | <Axman6> | get :: String -> IO (Response ByteString) (and that's a lazy bytestring) |
| 2021-03-23 22:27:55 | <monochrom> | wreq looks like what you want. |
| 2021-03-23 22:28:04 | <lukelau_> | iI |
| 2021-03-23 22:28:10 | <lukelau_> | I’ll give wreq a try, thanks |
| 2021-03-23 22:28:13 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:30aa:5abb:2db7:7fb5) (Ping timeout: 268 seconds) |
| 2021-03-23 22:28:18 | <lukelau_> | So far HTTP and req have been blocking for me |
| 2021-03-23 22:28:20 | <monochrom> | I just forgot it because I'm not familiar with any http library. |
| 2021-03-23 22:29:34 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2021-03-23 22:29:46 | <Axman6> | but really, lazy bytestrings are not a great way to deal with streaming data |
| 2021-03-23 22:29:53 | × | dragestil quits (~quassel@fsf/member/dragestil) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2021-03-23 22:30:57 | <lukelau_> | argh wreq blocks anyway |
| 2021-03-23 22:31:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-03-23 22:31:37 | → | conal joins (~conal@64.71.133.70) |
| 2021-03-23 22:32:49 | × | wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 272 seconds) |
| 2021-03-23 22:33:19 | <wz1000> | unsafeInterleaveIO? |
| 2021-03-23 22:34:00 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-23 22:34:40 | <monochrom> | unsafeInterleaveIO doesn't reduce blocking unless you actually have something else to do in the meantime. |
| 2021-03-23 22:34:49 | × | lemmih quits (~lemmih@2406:3003:2072:44:ae54:3bb1:1680:3911) (Remote host closed the connection) |
| 2021-03-23 22:35:07 | → | lemmih joins (~lemmih@2406:3003:2072:44:1345:21f1:41a5:e328) |
| 2021-03-23 22:35:08 | <Gurkenglas> | "To make packages available add them to the stack.yaml in the IHaskell directory and run stack solver && stack install." <- stack solver says "Invalid argument: 'solver'", what do I do? |
| 2021-03-23 22:35:41 | × | fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds) |
| 2021-03-23 22:36:57 | <sclv> | Did stack delete the solver command? Iirc it may have, not sure... |
| 2021-03-23 22:37:06 | <Axman6> | Perhaps check the release notes for stack to see what happened to it |
| 2021-03-23 22:37:43 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 2021-03-23 22:38:21 | → | nf joins (~n@monade.li) |
| 2021-03-23 22:38:52 | <glguy> | sclv: IIRC it stopped working when cabal changed and was then deprecated in favor of fixing |
| 2021-03-23 22:39:35 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 2021-03-23 22:39:49 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection) |
| 2021-03-23 22:41:13 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:b09b:3609:dd4b:42c9) |
| 2021-03-23 22:41:44 | <sclv> | right, so that sadly answers Gurkenglas ' question in the negative |
| 2021-03-23 22:41:57 | → | GZJ0X_ joins (~gzj@unaffiliated/gzj) |
| 2021-03-23 22:42:03 | <sclv> | I guess the answer is "you have to figure it all out by hand". i don't know what the standard workflow for that is |
| 2021-03-23 22:42:03 | <Gurkenglas> | It's still in the user guide :( did they say what one should use instead? |
| 2021-03-23 22:42:21 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2021-03-23 22:42:30 | <lukelau_> | Axman6: yeah, http-conduit works, looks like i’m going into the conduit ecosystem now! |
| 2021-03-23 22:42:52 | × | Nik05 quits (~Nik05@unaffiliated/nik05) (Quit: ZNC 1.8.2 - https://znc.in) |
| 2021-03-23 22:43:04 | × | _ashbreeze_ quits (~mark@64.85.214.234.reverse.socket.net) (Remote host closed the connection) |
| 2021-03-23 22:43:17 | <Axman6> | good luck! |
| 2021-03-23 22:43:33 | <Gurkenglas> | like, i would like to import modules from a package whose name I know. what do I need to do? |
| 2021-03-23 22:43:44 | → | Nik05 joins (~Nik05@unaffiliated/nik05) |
| 2021-03-23 22:44:42 | × | LKoen quits (~LKoen@194.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 2021-03-23 22:44:51 | → | _ashbreeze_ joins (~mark@64.85.214.234.reverse.socket.net) |
| 2021-03-23 22:45:26 | <sclv> | Gurkenglas: add it to the extra deps section https://docs.haskellstack.org/en/stable/GUIDE/#curated-package-sets |
| 2021-03-23 22:45:39 | <sclv> | i assume you did that, and then stack solver failed to run |
| 2021-03-23 22:45:50 | → | wonko7 joins (~wonko7@45.15.17.60) |
| 2021-03-23 22:45:56 | × | gzj quits (~gzj@unaffiliated/gzj) (Ping timeout: 265 seconds) |
| 2021-03-23 22:45:59 | <sclv> | so what that means is I think that you can still try to proceed, but you may get a failure because some transitive dep of that package is missing |
| 2021-03-23 22:46:10 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:30aa:5abb:2db7:7fb5) |
| 2021-03-23 22:46:12 | <sclv> | so you need to go add that transitive dep to extra deps, and repeat |
| 2021-03-23 22:46:17 | × | malumore quits (~malumore@151.62.117.161) (Ping timeout: 260 seconds) |
| 2021-03-23 22:46:34 | <sclv> | and hope you don't accidentally introduce a conflict, or take care using Mad Thinking Skillz to ensure you don't |
| 2021-03-23 22:46:39 | <sclv> | (i.e. run a solver in your head) |
| 2021-03-23 22:47:11 | → | texasmynsted joins (~texasmyns@99.96.221.112) |
| 2021-03-23 22:47:16 | <wz1000> | Does Conduit really have to way to mask exceptions? |
| 2021-03-23 22:47:22 | → | codygman__ joins (~user@47.186.207.161) |
| 2021-03-23 22:47:30 | <wz1000> | How do people write any exception safe code with it? |
| 2021-03-23 22:47:40 | <sclv> | they don't |
| 2021-03-23 22:47:55 | → | conal joins (~conal@64.71.133.70) |
| 2021-03-23 22:47:57 | <Axman6> | I thought ResourceT was part of doing that |
| 2021-03-23 22:48:00 | <wz1000> | huh, pipes doesn't either |
| 2021-03-23 22:48:23 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-03-23 22:48:37 | <Axman6> | I would guess you rely on being able to do it in the monad your conduits use, not the conduits themselves |
| 2021-03-23 22:48:44 | × | vchlup_ quits (~vchlup@nat.brnet.cz) (Remote host closed the connection) |
| 2021-03-23 22:49:27 | <wz1000> | But I want to mask around await! |
| 2021-03-23 22:50:21 | <Axman6> | BEst I can do is, no you don't :) |
| 2021-03-23 22:50:56 | <sclv> | or don't use conduit |
| 2021-03-23 22:51:01 | → | vchlup joins (~vchlup@nat.brnet.cz) |
| 2021-03-23 22:51:11 | <wz1000> | how do I ensure values don't get lost in the ether when I send a timeout and recover from it |
| 2021-03-23 22:51:31 | <wz1000> | do people really use this for network applications? |
| 2021-03-23 22:51:33 | <sclv> | i don't think you can do that with conduit |
| 2021-03-23 22:51:57 | <wz1000> | seems like a fundamental limitation |
All times are in UTC.