2025/02/19

Newest at the top

2025-02-19 06:00:33 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 244 seconds)
2025-02-19 05:58:12 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
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:56:18 +0100alfiee(~alfiee@user/alfiee) alfiee
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:53:43 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-19 05:52:32 +0100Inst(~Inst@user/Inst) (Remote host closed the connection)
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:46:49 +0100bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2025-02-19 05:46:05 +0100 <haskellbridge> <Liamzee> hmmm
2025-02-19 05:45:56 +0100Inst(~Inst@user/Inst) Inst
2025-02-19 05:44:30 +0100 <sim590> jackdk:sounds like a logical approach.
2025-02-19 05:44:26 +0100 <haskellbridge> <Liamzee> https://paste.tomsmeding.com/gTV1Ck0j
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:43:49 +0100michalz(~michalz@185.246.207.203)
2025-02-19 05:42:48 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-02-19 05:38:21 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-19 05:36:14 +0100forell(~forell@user/forell) forell
2025-02-19 05:34:54 +0100atwm(~andrew@19-193-28-81.ftth.cust.kwaoo.net) (Ping timeout: 272 seconds)
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:33:22 +0100 <monochrom> Oh haha the irony.
2025-02-19 05:32:22 +0100aforemny(~aforemny@i59F4C483.versanet.de) (Ping timeout: 272 seconds)
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:31:41 +0100 <sim590> Oh. I see. A big name in gaming.
2025-02-19 05:31:13 +0100 <jackdk> wrote Commander Keen, Wolf3D, Doom, Quake, etc.
2025-02-19 05:30:46 +0100aforemny_(~aforemny@2001:9e8:6ce5:a900:aaac:d53d:16e5:71d8) aforemny
2025-02-19 05:30:27 +0100atwm(~andrew@19-193-28-81.ftth.cust.kwaoo.net) atwm
2025-02-19 05:29:08 +0100 <sim590> jackdk: Hmmmmm.... Who's Carmack ??
2025-02-19 05:27:30 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
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: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:24:58 +0100 <sim590> Yup
2025-02-19 05:24:54 +0100 <jackdk> Having fun is a pretty good reason
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: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:23:00 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-02-19 05:22:22 +0100sim590(~simon@209-15-185-101.resi.cgocable.ca) sim590
2025-02-19 05:22:10 +0100sim590(~simon@209-15-185-101.resi.cgocable.ca) (WeeChat 4.5.1)
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:20:04 +0100 <sim590> hmmmm :)
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:19:14 +0100 <sim590> multiplayer game*
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: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: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:13:51 +0100 <sim590> current* player
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: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:12:22 +0100alfiee(~alfiee@user/alfiee) (Ping timeout: 252 seconds)
2025-02-19 05:12:12 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 268 seconds)