Re: [Haskell-cafe] Implementing a MUD server in haskell

2007-12-16 Thread Ketil Malde
Jack Kelly <[EMAIL PROTECTED]> writes: > struct room{ > ... > struct player * players; > ... > }; > > struct player{ > ... > struct room * room; > ... > }; Extreme programming (or maybe it was some other "agile" thingy) suggests doing the simplest possible approach that could conceiva

Re: [Haskell-cafe] Implementing a MUD server in haskell

2007-12-16 Thread Luke Palmer
On Dec 16, 2007 1:45 PM, Jules Bean <[EMAIL PROTECTED]> wrote: > > This needs to stand up to concurrent modification of a shared world > > structure, but I think I'll set up the concurrency controls after I get > > my head around this.t > The simplest way to do this is to bundle all your big shared

Re: [Haskell-cafe] Implementing a MUD server in haskell

2007-12-16 Thread Jack Kelly
Jules Bean wrote: Jack Kelly wrote: -snip- Essentially you have to choose some form of identity (relational DB fans might call it a "key") for your players and rooms. My gut feeling is that String will do fine; it's nice for debugging, gives rise to a natural way to write your admin commands

Re: [Haskell-cafe] Implementing a MUD server in haskell

2007-12-16 Thread Jules Bean
Jack Kelly wrote: struct room{ ... struct player * players; ... }; struct player{ ... struct room * room; ... }; From what I can see, I'd use a record type for players and rooms, but I'm not sure how to replicate the pointer effects: Essentially you have to choose some form of

[Haskell-cafe] Implementing a MUD server in haskell

2007-12-15 Thread Jack Kelly
Hi, I've been thinking about two things for some time now: 1. Sharpening my haskell 2. Implementing a MUD server I've been thinking about doing (1) and (2) at the same time but I've run into some problems with data structures. I need to be able to get a list of players from a room (for things