2025/12/17

Newest at the top

2025-12-17 21:08:48 +0100lambda_gibbon(~lambda_gi@208.83.175.39)
2025-12-17 21:05:58 +0100peterbecich(~Thunderbi@71.84.33.135) peterbecich
2025-12-17 21:04:35 +0100ljdarj1ljdarj
2025-12-17 21:04:34 +0100ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 260 seconds)
2025-12-17 21:03:07 +0100ljdarj1(~Thunderbi@user/ljdarj) ljdarj
2025-12-17 21:00:16 +0100 <chromoblob> the required skill is in inverse relationship with the quality of documentation.
2025-12-17 21:00:15 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-12-17 20:58:44 +0100ljdarj(~Thunderbi@user/ljdarj) (Read error: Connection reset by peer)
2025-12-17 20:42:30 +0100 <milan2> int-e: It works.. It increased to 6. TO read a documenation of others is a skill in itself :)
2025-12-17 20:38:24 +0100olivial(~benjaminl@user/benjaminl) benjaminl
2025-12-17 20:37:37 +0100pavonia(~user@user/siracusa) siracusa
2025-12-17 20:35:27 +0100Lord_of_Life_Lord_of_Life
2025-12-17 20:33:04 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
2025-12-17 20:32:42 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-12-17 20:31:24 +0100pabs3(~pabs3@user/pabs3) pabs3
2025-12-17 20:30:47 +0100pabs3(~pabs3@user/pabs3) (Read error: Connection reset by peer)
2025-12-17 20:28:10 +0100 <milan2> int-e: You rock! It's there.. It starts to make sense. I am pretty sure it will work now.
2025-12-17 20:26:10 +0100 <int-e> You can also look at the Settings record itself, it's exposed by a ...Internal module: https://hackage-content.haskell.org/package/warp-3.4.11/docs/Network-Wai-Handler-Warp-Internal.htm…
2025-12-17 20:25:45 +0100sp1ff(~user@c-73-164-203-114.hsd1.wa.comcast.net) (Ping timeout: 245 seconds)
2025-12-17 20:25:34 +0100 <int-e> The docs for makeSettingsAndCounter say: "Create Settings with a connection counter."
2025-12-17 20:24:41 +0100sp1ff`(~user@2601:1c2:4c00:55a0::59db)
2025-12-17 20:23:18 +0100 <milan2> Where do you see that Settings has Counter ?
2025-12-17 20:22:36 +0100 <int-e> (The thing I was confused about was what the intended use of that `makeSettingsAndCounter` function is, or put differently, why there's utility in tying these two together. The fact that the Settings value has an optional counter for counting connections is what I was missing.)
2025-12-17 20:22:34 +0100 <milan2> Well lets try it then.
2025-12-17 20:22:29 +0100 <milan2> int-e: Yes I get your point. So even tho makeSettingsAndCounter returns IO (Counter, Settings) this Counter is bound with Settings and If I don't start app with settings explicitly Counter won't be updated.
2025-12-17 20:20:20 +0100 <int-e> milan2: But for warp to do it it needs to know about the counter. That information is part of the Settings record that you're not using.
2025-12-17 20:19:13 +0100 <milan2> int-e: But how could I? I don't open connections to increment counter. This should be wai/warp work to do right?
2025-12-17 20:18:40 +0100 <milan2> int-e: Also it is true that I don't use settings at all.. maybe I really need to runSettings
2025-12-17 20:18:26 +0100 <int-e> if nobody updates the counter then it will always be 0
2025-12-17 20:17:56 +0100 <milan2> int-e: No I don't I expect wai/warp to update counter.
2025-12-17 20:17:24 +0100 <int-e> which and that means you need https://hackage-content.haskell.org/package/warp-3.4.11/docs/Network-Wai-Handler-Warp.html#v:setPort for setting the port in the settings.
2025-12-17 20:15:46 +0100 <int-e> milan2: you also need to use https://hackage-content.haskell.org/package/warp-3.4.11/docs/Network-Wai-Handler-Warp.html#v:runSe… so that it actually uses the settings that include that particular counter.
2025-12-17 20:15:35 +0100arahael(~wetfoot@user/arahael) arahael
2025-12-17 20:14:52 +0100arahael(~wetfoot@user/arahael) (Ping timeout: 244 seconds)
2025-12-17 20:14:14 +0100 <int-e> Hmm. I'm actually confused about something here.
2025-12-17 20:13:31 +0100 <int-e> milan2: do you increment the counter anywhere?
2025-12-17 20:12:19 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-12-17 20:09:58 +0100 <milan2> Maybe I need to build it with "parallel" support? These special options for ghc.
2025-12-17 20:09:22 +0100 <milan2> int-e: Heck :D same result :D
2025-12-17 19:53:54 +0100_________(~nobody@user/noodly) _________
2025-12-17 19:50:07 +0100jj(~apropos@dhcp-128-189-46-128.ubcsecure.wireless.ubc.ca) (Ping timeout: 240 seconds)
2025-12-17 19:50:00 +0100 <milan2> That makes sense.. this will reuse counter and may show different number.
2025-12-17 19:47:51 +0100 <int-e> *app
2025-12-17 19:47:47 +0100 <int-e> (and change the next line to `ap counter _ respond = do` accordingly)
2025-12-17 19:47:05 +0100sp1ff(~user@c-73-164-203-114.hsd1.wa.comcast.net) sp1ff
2025-12-17 19:46:54 +0100 <int-e> You can have `app :: Counter -> Application`.
2025-12-17 19:46:20 +0100 <int-e> milan2: yeah I'm pretty sure you're supposed to do that in `main` and pass the counter to your request handler(s) (which includes `app`).
2025-12-17 19:44:55 +0100Square(~Square4@user/square) (Ping timeout: 240 seconds)
2025-12-17 19:44:47 +0100 <milan2> int-e: Yeah..that might be true..
2025-12-17 19:43:57 +0100 <milan2> int-e: Here https://hackage-content.haskell.org/package/warp-3.4.11/docs/Network-Wai-Handler-Warp.html#g:5