2025-02-19 00:00:39 +0100 | mange | (~user@user/mange) mange |
2025-02-19 00:03:48 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2025-02-19 00:04:11 +0100 | weary-traveler | (~user@user/user363627) user363627 |
2025-02-19 00:05:38 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 00:09:42 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) Tuplanolla |
2025-02-19 00:12:04 +0100 | ljdarj1 | (~Thunderbi@user/ljdarj) ljdarj |
2025-02-19 00:12:26 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 00:16:11 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 265 seconds) |
2025-02-19 00:16:12 +0100 | ljdarj1 | ljdarj |
2025-02-19 00:17:26 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 00:22:02 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 272 seconds) |
2025-02-19 00:23:41 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 00:27:00 +0100 | remexre | (~remexre@user/remexre) remexre |
2025-02-19 00:30:23 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-19 00:31:19 +0100 | remexre | (~remexre@user/remexre) (Ping timeout: 260 seconds) |
2025-02-19 00:40:19 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2025-02-19 00:40:41 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) stiell |
2025-02-19 00:40:45 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 00:45:44 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-19 00:49:22 +0100 | remexre | (~remexre@user/remexre) remexre |
2025-02-19 00:52:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 00:54:03 +0100 | Googulator | (~Googulato@2a01-036d-0106-4074-e4c1-4d2b-93a1-bece.pool6.digikabel.hu) (Quit: Client closed) |
2025-02-19 00:54:26 +0100 | Googulator | (~Googulato@2a01-036d-0106-4074-e4c1-4d2b-93a1-bece.pool6.digikabel.hu) |
2025-02-19 00:56:49 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-19 01:03:29 +0100 | ec | (~ec@gateway/tor-sasl/ec) ec |
2025-02-19 01:05:11 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 01:07:24 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 01:09:32 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) ec |
2025-02-19 01:10:10 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 272 seconds) |
2025-02-19 01:12:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
2025-02-19 01:12:12 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 264 seconds) |
2025-02-19 01:18:24 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Ping timeout: 260 seconds) |
2025-02-19 01:19:24 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Ping timeout: 264 seconds) |
2025-02-19 01:22:12 +0100 | ec | (~ec@gateway/tor-sasl/ec) ec |
2025-02-19 01:22:47 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 01:27:01 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-19 01:27:53 +0100 | forell | (~forell@user/forell) (Ping timeout: 245 seconds) |
2025-02-19 01:29:00 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 264 seconds) |
2025-02-19 01:29:41 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) L29Ah |
2025-02-19 01:30:31 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-19 01:30:58 +0100 | ec | (~ec@gateway/tor-sasl/ec) ec |
2025-02-19 01:34:11 +0100 | yegorc | (~yegorc@user/yegorc) yegorc |
2025-02-19 01:38:09 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 01:38:47 +0100 | tremon | (~tremon@83.80.159.219) (Quit: getting boxed in) |
2025-02-19 01:38:56 +0100 | sprotte24 | (~sprotte24@p200300d16f0680009d71da3872d3d25e.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
2025-02-19 01:41:21 +0100 | acidjnk | (~acidjnk@p200300d6e7283f20718e6a656831e8a3.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2025-02-19 01:42:53 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
2025-02-19 01:47:27 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) ec |
2025-02-19 01:47:36 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 264 seconds) |
2025-02-19 01:52:36 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 01:53:42 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 01:54:03 +0100 | ec | (~ec@gateway/tor-sasl/ec) ec |
2025-02-19 01:54:48 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Ping timeout: 264 seconds) |
2025-02-19 01:56:56 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-19 01:58:56 +0100 | Eoco | (~ian@128.101.131.218) (Ping timeout: 272 seconds) |
2025-02-19 02:00:36 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 02:02:35 +0100 | j1n37- | (~j1n37@user/j1n37) j1n37 |
2025-02-19 02:02:54 +0100 | Googulator13 | (~Googulato@2a01-036d-0106-4074-e4c1-4d2b-93a1-bece.pool6.digikabel.hu) |
2025-02-19 02:03:19 +0100 | xff0x | (~xff0x@2405:6580:b080:900:4548:6ab4:269:a170) (Ping timeout: 260 seconds) |
2025-02-19 02:04:04 +0100 | j1n37 | (~j1n37@user/j1n37) (Ping timeout: 260 seconds) |
2025-02-19 02:06:40 +0100 | Googulator | (~Googulato@2a01-036d-0106-4074-e4c1-4d2b-93a1-bece.pool6.digikabel.hu) (Ping timeout: 240 seconds) |
2025-02-19 02:07:50 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2025-02-19 02:07:50 +0100 | Eoco | (~ian@128.101.131.218) Eoco |
2025-02-19 02:08:34 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) stiell |
2025-02-19 02:11:45 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 02:13:22 +0100 | Eoco | (~ian@128.101.131.218) (Ping timeout: 268 seconds) |
2025-02-19 02:16:40 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
2025-02-19 02:19:41 +0100 | hattckory | (~hattckory@67.71.152.102) (Read error: Connection reset by peer) |
2025-02-19 02:19:56 +0100 | hattckory | (~hattckory@149.102.242.103) |
2025-02-19 02:23:51 +0100 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) ezzieyguywuf |
2025-02-19 02:27:08 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 02:27:36 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) atwm |
2025-02-19 02:31:30 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-19 02:32:13 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2025-02-19 02:33:27 +0100 | califax | (~califax@user/califx) califx |
2025-02-19 02:34:08 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 245 seconds) |
2025-02-19 02:35:10 +0100 | zungi | (~tory@user/andrewchawk) andrewchawk |
2025-02-19 02:35:25 +0100 | bilegeek | (~bilegeek@2600:1008:b0a4:c6d5:66f:6873:2abc:50c5) (Quit: Leaving) |
2025-02-19 02:38:46 +0100 | bilegeek | (~bilegeek@2600:1008:b0a4:c6d5:66f:6873:2abc:50c5) bilegeek |
2025-02-19 02:41:36 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 264 seconds) |
2025-02-19 02:42:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 02:45:00 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 02:46:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 02:49:22 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-19 02:52:53 +0100 | weary-traveler | (~user@user/user363627) (Remote host closed the connection) |
2025-02-19 02:54:08 +0100 | Googulator13 | (~Googulato@2a01-036d-0106-4074-e4c1-4d2b-93a1-bece.pool6.digikabel.hu) (Quit: Client closed) |
2025-02-19 02:54:25 +0100 | Googulator13 | (~Googulato@2a01-036d-0106-4074-e4c1-4d2b-93a1-bece.pool6.digikabel.hu) |
2025-02-19 02:55:34 +0100 | xff0x | (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
2025-02-19 02:57:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 02:59:58 +0100 | machinedgod | (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 245 seconds) |
2025-02-19 03:00:45 +0100 | ljdarj | (~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds) |
2025-02-19 03:02:49 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-19 03:03:01 +0100 | Square | (~Square@user/square) (Ping timeout: 248 seconds) |
2025-02-19 03:10:52 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
2025-02-19 03:13:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 03:19:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 03:30:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 03:33:04 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 03:34:34 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-19 03:36:41 +0100 | weary-traveler | (~user@user/user363627) user363627 |
2025-02-19 03:37:14 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-19 03:37:51 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-19 03:48:04 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 03:52:56 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
2025-02-19 03:57:39 +0100 | vanishingideal | (~vanishing@user/vanishingideal) (Ping timeout: 260 seconds) |
2025-02-19 03:59:03 +0100 | vanishingideal | (~vanishing@user/vanishingideal) vanishingideal |
2025-02-19 04:03:28 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 04:03:47 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 244 seconds) |
2025-02-19 04:07:50 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 04:10:02 +0100 | byorgey | (~byorgey@user/byorgey) (Ping timeout: 252 seconds) |
2025-02-19 04:10:20 +0100 | byorgey | (~byorgey@user/byorgey) byorgey |
2025-02-19 04:18:49 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 04:20:49 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 04:23:58 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 272 seconds) |
2025-02-19 04:25:20 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 268 seconds) |
2025-02-19 04:28:46 +0100 | <simon1> | I want to make a function that yields a deterministically shuffled list. So I'm trying to use this signature `RandomGen gen => [a] -> gen -> IO [a]`, but when try to use the function `next` I get the warning `Deprecated: "No longer used"`. What replaces `next` and `RandomGen` then? |
2025-02-19 04:28:51 +0100 | simon1 | sim590 |
2025-02-19 04:32:34 +0100 | <geekosaur> | RandomGen is still used, but next has been deprecated since random-1.1. https://hackage.haskell.org/package/random-1.3.0/docs/System-Random.html#v:next explains and provides references and alternatives |
2025-02-19 04:32:35 +0100 | <sim590> | Ah. I guess I wanna use `random` instead. |
2025-02-19 04:32:43 +0100 | <sim590> | Right? |
2025-02-19 04:33:53 +0100 | <geekosaur> | you should use an operation specialized for your target type (next always converted to/from Integer) |
2025-02-19 04:34:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 04:34:19 +0100 | <sim590> | I mean the function `random` as in `random :: RandomGen gen => gen -> (a, gen)` ? |
2025-02-19 04:34:38 +0100 | <sim590> | Instead of using `next`. |
2025-02-19 04:34:45 +0100 | <monochrom> | For shuffling, use randomR for Int. |
2025-02-19 04:35:21 +0100 | <monochrom> | or even randomRs if your gen won't be used elsewhere. |
2025-02-19 04:35:47 +0100 | <monochrom> | On a different note, given gen, I don't see why you still need IO. |
2025-02-19 04:36:35 +0100 | <sim590> | monochrom: actually, I'm writing a network application. All nodes have the same seed and they have to generate a random state from that seed. So I need to initialize a generator with the same seed on all nodes. |
2025-02-19 04:37:18 +0100 | <monochrom> | Huh that comes across as https://xkcd.com/221/ |
2025-02-19 04:39:08 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-02-19 04:42:42 +0100 | <sim590> | ? All my nodes are gonna have a list of elements and they need to generate the same shuffled list. This is because my application is a game where every node has been given the player list, but now we have to know which player starts first, so then I shuffle the list according to a hexdigit code. Yes, this is not "random", but that is not what I need. I need a deterministicly shuffled list. |
2025-02-19 04:44:13 +0100 | <monochrom> | Is there anything wrong with generating the list just once and passing it to all nodes? |
2025-02-19 04:44:51 +0100 | <monochrom> | But either version still doesn't need IO. |
2025-02-19 04:46:30 +0100 | <sim590> | No, I don't need IO, it's true. I actually just generalized my code to something that doesn't need IO, but my first iteration did need IO because the function I evolved from did actual randomness for shuffling. But, now I don't. It's becasue I'm evolving the code of the game from single player to multiplayer now. |
2025-02-19 04:48:45 +0100 | <monochrom> | Even for actual PRNG I would still go for either gen -> ([a], gen) or gen -> [a] or the new-fangled StatefulGen monads, and avoid committing to IO. |
2025-02-19 04:49:35 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 04:52:37 +0100 | <monochrom> | Actually I ended up using s/StatefulGen/RandomGenM/ because it has nicer functions eg randomRM. |
2025-02-19 04:52:49 +0100 | <sim590> | as for shuffling the list before sending it over, yes, it's true I could do that. But, since every node already have the seed from the start (the game code given by the user), I prefer just sorting the list first, then shuffling it according to the code because then other nodes don't rely on the host so much. They can generate this themselves. There is no server. It's all taking place ontop of a |
2025-02-19 04:52:51 +0100 | <sim590> | distributed hash table. |
2025-02-19 04:53:56 +0100 | yegorc | (~yegorc@user/yegorc) (Leaving) |
2025-02-19 04:54:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 04:57:11 +0100 | <jackdk> | What are your plans for when a new node comes online and needs to acquire the same random state, or if there is a bug in your code and nodes call a randomisation function a different number of times or use the results in a different order? |
2025-02-19 04:58:11 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) atwm |
2025-02-19 04:59:15 +0100 | <monochrom> | I don't normally worry about a bug that affects one node but not others. All nodes run the same code because programmers are too lazy to write two versions. Therefore all nodes run the same bug anyway. |
2025-02-19 05:00:49 +0100 | <monochrom> | BTW it's also why our university discourages anyone except the top authority from talking about exam timetables and venues. Because if there is to be a mistake, it is better for everyone to make the same mistake (sourced from one single source) than inconsistency hell. |
2025-02-19 05:01:18 +0100 | <jackdk> | How do you update things to a new version without downtime? |
2025-02-19 05:01:45 +0100 | <monochrom> | Perhaps don't make new versions? >:) |
2025-02-19 05:01:56 +0100 | tavare | (~tavare@user/tavare) tavare |
2025-02-19 05:02:00 +0100 | <jackdk> | Perfect. |
2025-02-19 05:02:28 +0100 | <monochrom> | The serious and honest answer is I don't know. |
2025-02-19 05:02:29 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 248 seconds) |
2025-02-19 05:04:18 +0100 | <monochrom> | The aternative is to accept that you now have the Byzantine Generals problem and you still taking distributed algorithms seriously, i.e., there is a voting system, there is cryptographical hashes, there is a Lamport partially-ordered clock system, ... |
2025-02-19 05:04:35 +0100 | <monochrom> | s/still/start/ |
2025-02-19 05:04:57 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 05:06:09 +0100 | <monochrom> | or in other words, if there is going to be a non-shared bug, then both "send a seed" and "send a list" are vulnerable to their respective non-shared bugs, e.g., "what if one node has a bug that uses the list wrongly?" |
2025-02-19 05:06:12 +0100 | <sim590> | jackdk: there's a connection stage where we wait for everyone before the game starts. The list is not gonna be shuffled before we end that stage and everybody is connected (i.e. the "host" knows about them). |
2025-02-19 05:07:00 +0100 | <sim590> | Yeah, and for now I assume that every nodes run the same code of course. |
2025-02-19 05:07:03 +0100 | <jackdk> | And then you're doing synchronous lockstep simulation across nodes? |
2025-02-19 05:07:41 +0100 | <jackdk> | s/across nodes/across all nodes at once/ |
2025-02-19 05:07:54 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 05:09:47 +0100 | <sim590> | The game code is going to be the initial seed for everything. Everyone is gonna have that seed. The game is a turn base game so every player will just be able to repeat the exact same operations by listening to packets containing the player's turn info. It will be some data that modifies the state. They use that packet to update they're state. Every player turn is going to also change the current |
2025-02-19 05:09:49 +0100 | <sim590> | "seed" identifying where players are in the chain of turns. |
2025-02-19 05:10:06 +0100 | <monochrom> | I'm OK with "the list is 5GB so sending a 32-bit seed over the network is better". |
2025-02-19 05:10:45 +0100 | <monochrom> | But if it is "this is a legacy system, that's why" then it's just sad. |
2025-02-19 05:12:02 +0100 | <monochrom> | Well, I still find joy in it with https://www.vex.net/~trebla/humour/pessimisms.html #2. Gotta make the best of what you have. |
2025-02-19 05:12:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-19 05:12:22 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 252 seconds) |
2025-02-19 05:13:22 +0100 | <sim590> | Regarding the byzantine general problem, I don't think that this applies for me because this game is turn based, so there's no concurrency issues. |
2025-02-19 05:13:40 +0100 | <sim590> | Everybody is going to evolve at the same rate waiting for the player to make his turn. |
2025-02-19 05:13:51 +0100 | <sim590> | current* player |
2025-02-19 05:18:23 +0100 | <jackdk> | I am curious as to why you need a DHT - this sounds like a small enough network where DHTs would mostly be useful as an exercise. |
2025-02-19 05:18:56 +0100 | <monochrom> | Speaking of which, the distributed algorithm course I took was taught by two profs together, one from Greece, another of Egyptian ethnicity (like, he is a French citizen but his parent came from Egypt). |
2025-02-19 05:18:57 +0100 | <sim590> | I don't "need" a DHT. I just wanna make a multiplayer code without making server code. |
2025-02-19 05:19:14 +0100 | <sim590> | multiplayer game* |
2025-02-19 05:19:22 +0100 | <monochrom> | It took 5 years to dawn on me "wait, Byzantine generals you say? and two of them?" |
2025-02-19 05:20:04 +0100 | <sim590> | hmmmm :) |
2025-02-19 05:20:09 +0100 | <jackdk> | sim590: Yeah that's fair. I'd just look at making the gamestate a left fold of events, some of which are generated by other players. And then you can hold the same state at each node |
2025-02-19 05:22:10 +0100 | sim590 | (~simon@209-15-185-101.resi.cgocable.ca) (WeeChat 4.5.1) |
2025-02-19 05:22:22 +0100 | sim590 | (~simon@209-15-185-101.resi.cgocable.ca) sim590 |
2025-02-19 05:23:00 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 05:24:34 +0100 | <sim590> | jackdk: also I did help develop the DHT over here: https://github.com/savoirfairelinux/opendht/ during 2015-2017. So I've become quite familiar with Kademlia and quite found of it also. When I decided to make a game and also think about making it multiplayer, that is the first thing I thought about doing. But I like Haskell and OpenDHT is in C++, so I had to write the bindings! |
2025-02-19 05:24:36 +0100 | <sim590> | https://github.com/sim590/opendht-hs/. All of that was a fun experience, so that's pretty much because of all these reasons. |
2025-02-19 05:24:54 +0100 | <jackdk> | Having fun is a pretty good reason |
2025-02-19 05:24:58 +0100 | <sim590> | Yup |
2025-02-19 05:25:08 +0100 | <jackdk> | sim590: https://github.com/ESWAT/john-carmack-plan-archive/blob/master/by_day/johnc_plan_19981014.txt Carmack doesn't use these words, but it really sounds like he made the state a strict left fold over an event stream. |
2025-02-19 05:26:08 +0100 | <sim590> | I've made this nice project also in the past: https://github.com/sim590/dpaste/. A pastebin running on the DHT (IRC folks should like that). I still have to work on it because I need to expand the file limit size by spreading the values in multiple packets. I'll do that after I finish my game I guess or when I feel like id... :-) |
2025-02-19 05:27:30 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-19 05:29:08 +0100 | <sim590> | jackdk: Hmmmmm.... Who's Carmack ?? |
2025-02-19 05:30:27 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) atwm |
2025-02-19 05:30:46 +0100 | aforemny_ | (~aforemny@2001:9e8:6ce5:a900:aaac:d53d:16e5:71d8) aforemny |
2025-02-19 05:31:13 +0100 | <jackdk> | wrote Commander Keen, Wolf3D, Doom, Quake, etc. |
2025-02-19 05:31:41 +0100 | <sim590> | Oh. I see. A big name in gaming. |
2025-02-19 05:32:18 +0100 | <sim590> | Oh I think I just got what you hinted at with the folding thing. Was that a joke about the lines not being folded in his file? lol |
2025-02-19 05:32:22 +0100 | aforemny | (~aforemny@i59F4C483.versanet.de) (Ping timeout: 272 seconds) |
2025-02-19 05:33:22 +0100 | <monochrom> | Oh haha the irony. |
2025-02-19 05:34:33 +0100 | <jackdk> | No, as in it sounds like he got a lot of portability and other architectural benefits from building Q3 around (morally) a function `State -> Event -> State` and having all the event sources produce onto a queue that is consumed by the game engine, a lot like the `Data.List.foldl'` function. |
2025-02-19 05:34:54 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 272 seconds) |
2025-02-19 05:36:14 +0100 | forell | (~forell@user/forell) forell |
2025-02-19 05:38:21 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 05:42:48 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 05:43:49 +0100 | michalz | (~michalz@185.246.207.203) |
2025-02-19 05:44:22 +0100 | <haskellbridge> | <Liamzee> are there any suggestions on improving this code? It feels hacky, and there's probably too much IO coupling |
2025-02-19 05:44:26 +0100 | <haskellbridge> | <Liamzee> https://paste.tomsmeding.com/gTV1Ck0j |
2025-02-19 05:44:30 +0100 | <sim590> | jackdk:sounds like a logical approach. |
2025-02-19 05:45:56 +0100 | Inst | (~Inst@user/Inst) Inst |
2025-02-19 05:46:05 +0100 | <haskellbridge> | <Liamzee> hmmm |
2025-02-19 05:46:49 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-19 05:50:59 +0100 | <sim590> | Liamzee: that is actually funny that you send that piece of code because I'm trying to teach Haskell to someone. And that someone asked me if it would be easy to make the snake game in Haskell... :) |
2025-02-19 05:52:32 +0100 | Inst | (~Inst@user/Inst) (Remote host closed the connection) |
2025-02-19 05:53:43 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 05:54:19 +0100 | <sim590> | Liamzee: by the way, if you're looking to experiment around with this, you might be interested in Brick https://github.com/jtdaugherty/brick. It is a library that helps making TUIs and it seems like your game is text based. It actually takes care of alot of stuff for you like key press and stuff. |
2025-02-19 05:56:18 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 05:57:28 +0100 | <sim590> | Liamzee, I don't see how you could not use IO wherever you do use it. It seems like everywhere you use it is where you need to handle the screen or user input. That seems fine to me. But, I'm far from being a Haskell guru :) |
2025-02-19 05:58:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 06:00:33 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 244 seconds) |
2025-02-19 06:04:17 +0100 | rvalue | (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
2025-02-19 06:04:48 +0100 | rvalue | (~rvalue@user/rvalue) rvalue |
2025-02-19 06:08:52 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) atwm |
2025-02-19 06:09:07 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 06:13:32 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 272 seconds) |
2025-02-19 06:13:44 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-19 06:14:05 +0100 | ephilalethes | (~noumenon@2001:d08:1a00:bc0:aa7e:eaff:fede:ff94) noumenon |
2025-02-19 06:17:59 +0100 | alp | (~alp@2001:861:8ca0:4940:e4d1:8a6d:1936:4535) (Ping timeout: 252 seconds) |
2025-02-19 06:24:31 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 06:28:50 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-19 06:39:19 +0100 | ZLima12 | (~zlima12@user/meow/ZLima12) (Remote host closed the connection) |
2025-02-19 06:40:28 +0100 | ZLima12 | (~zlima12@user/meow/ZLima12) ZLima12 |
2025-02-19 06:40:37 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 06:41:50 +0100 | <haskellbridge> | <Liamzee> sim590: Claude, DeepSeek R1 can all produce fairly decent Haskell code that mainly needs stylistic correction for these types of micro-programs. Also, if you're focusing on IO, you need to prioritize concurrency, which is why I'm wondering if the usage of MVar is correct here (IORef would actually provide better functionality for what I'm trying to do). |
2025-02-19 06:43:10 +0100 | <haskellbridge> | <Liamzee> I was originally planning to upgrade to Brick, but I spent two days pushing this out (mainly hamstrung by lack of confidence in concurrency features), so I'm more likely to move to my primary project, which would be a Rust-based API caller for claim verification in social media. |
2025-02-19 06:44:02 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 06:45:56 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds) |
2025-02-19 06:48:34 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 260 seconds) |
2025-02-19 06:49:28 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) lisbeths |
2025-02-19 06:51:25 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich |
2025-02-19 06:54:09 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2025-02-19 06:54:24 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) chexum |
2025-02-19 06:56:11 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 07:00:47 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-19 07:01:43 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2025-02-19 07:01:55 +0100 | Guest52 | (~Guest52@host-64-178-152-151.public.eastlink.ca) |
2025-02-19 07:02:06 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) bitdex |
2025-02-19 07:08:12 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 07:12:34 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds) |
2025-02-19 07:17:50 +0100 | takuan | (~takuan@d8D86B601.access.telenet.be) |
2025-02-19 07:19:28 +0100 | CiaoSen | (~Jura@ip-037-201-240-075.um10.pools.vodafone-ip.de) CiaoSen |
2025-02-19 07:21:12 +0100 | monochrom | (trebla@216.138.220.146) (Quit: ZNC 1.9.1+deb1 - https://znc.in) |
2025-02-19 07:21:53 +0100 | akegalj | (~akegalj@89-172-194-52.adsl.net.t-com.hr) akegalj |
2025-02-19 07:23:36 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 07:24:58 +0100 | peterbecich | (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 245 seconds) |
2025-02-19 07:27:03 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) atwm |
2025-02-19 07:29:16 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds) |
2025-02-19 07:31:07 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 07:35:33 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 265 seconds) |
2025-02-19 07:38:25 +0100 | monochrom | (trebla@216.138.220.146) |
2025-02-19 07:39:39 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 07:40:52 +0100 | atwm | (~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 265 seconds) |
2025-02-19 07:44:09 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
2025-02-19 07:49:37 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
2025-02-19 07:55:02 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 07:59:02 +0100 | ft | (~ft@p4fc2a610.dip0.t-ipconnect.de) (Quit: leaving) |
2025-02-19 08:01:45 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
2025-02-19 08:09:15 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 08:13:52 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
2025-02-19 08:17:13 +0100 | tccq | (~user@user/tccq) tccq |
2025-02-19 08:18:31 +0100 | alfiee | (~alfiee@user/alfiee) alfiee |
2025-02-19 08:23:01 +0100 | alfiee | (~alfiee@user/alfiee) (Ping timeout: 248 seconds) |
2025-02-19 08:24:37 +0100 | merijn | (~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn |
2025-02-19 08:29:17 +0100 | internatetional | (~nate@2001:448a:20a3:c2e5:9ba2:a48e:b934:7d97) internatetional |