Newest at the top
| 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 +0100 | olivial | (~benjaminl@user/benjaminl) benjaminl |
| 2025-12-17 20:37:37 +0100 | pavonia | (~user@user/siracusa) siracusa |
| 2025-12-17 20:35:27 +0100 | Lord_of_Life_ | Lord_of_Life |
| 2025-12-17 20:33:04 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds) |
| 2025-12-17 20:32:42 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) Lord_of_Life |
| 2025-12-17 20:31:24 +0100 | pabs3 | (~pabs3@user/pabs3) pabs3 |
| 2025-12-17 20:30:47 +0100 | pabs3 | (~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 +0100 | sp1ff | (~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 +0100 | sp1ff` | (~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 +0100 | arahael | (~wetfoot@user/arahael) arahael |
| 2025-12-17 20:14:52 +0100 | arahael | (~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 +0100 | ljdarj | (~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 +0100 | jj | (~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 +0100 | sp1ff | (~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 +0100 | Square | (~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 |
| 2025-12-17 19:42:53 +0100 | <int-e> | what is `makeSettingsAndCounter`? The `app` part is executed for each request, so perhaps you're making a new counter every time too. |
| 2025-12-17 19:41:31 +0100 | Square2 | (~Square@user/square) Square |
| 2025-12-17 19:40:56 +0100 | spew | (~spew@user/spew) spew |
| 2025-12-17 19:37:27 +0100 | <milan2> | Hmm... maybe there is no "context switch" |
| 2025-12-17 19:28:27 +0100 | CiaoSen | (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) CiaoSen |
| 2025-12-17 19:26:51 +0100 | tromp | (~textual@2001:1c00:3487:1b00:681b:ee7b:c126:c8ee) |
| 2025-12-17 19:22:45 +0100 | <milan2> | It should use http1.1 which should open new connection on every curl request.. |
| 2025-12-17 19:21:58 +0100 | sp1ff | (~user@2607:fb90:3397:1dee:eb26:2295:32e9:767a) (Ping timeout: 255 seconds) |