Re: [Haskell-cafe] using haskell for a project

2009-05-03 Thread Belka
Welcome to Haskell! =) But now I don't know how to dynamically add new spells (new spells can be created in my gameplay). Since I can't assign a new value to the `spells' variable (Data.Map.insert returns a new map), I just don't know where to go. Do distinguish *pure function* concept and

Re: [Haskell-cafe] using haskell for a project

2009-05-03 Thread j.waldmann
don't think in terms of modifying state, think of it as computing new values from old values. I find that the payoff of learning to think ,like this is massive, as it's usually much easier to reason about. /qoute Indeed. [warning: what follows is a rant with a purpose:] The imperative/OO

Re: [Haskell-cafe] using haskell for a project

2009-05-03 Thread Martijn van Steenbergen
Hi Nicolas, Nicolas Martyanoff wrote: So now I'd want to use it for a small project of mine, a simple multiplayer roguelike based on telnet. I wrote a minimal server in C, and it took me a few hours. Now I'm thinking about doing the same in Haskell, and I'm in trouble. I don't know if this is

Re: [Haskell-cafe] using haskell for a project

2009-05-03 Thread Eugene Kirpichov
To the original author: I must notice that this is not the most convincing use of purity. I personally would prefer to have a character's spell list be mutable because this corresponds better to the nature of the problem (in the problem domain it is nonsense to have two versions of a character and

Re: [Haskell-cafe] using haskell for a project

2009-05-03 Thread Bulat Ziganshin
Hello Nicolas, Saturday, May 2, 2009, 9:17:55 PM, you wrote: But now I don't know how to dynamically add new spells (new spells can be created in my gameplay). Since I can't assign a new value to the `spells' variable (Data.Map.insert returns a new map), I just don't know where to go. well,

[Haskell-cafe] using haskell for a project

2009-05-02 Thread Nicolas Martyanoff
Hi, I don't think I already presented myself; I'm Nicolas, a 23y french student, trying to learn and use haskell. I've been using C for years, for all sort of tasks, and am quite comfortable with it. I'm also using it 40h a week in my internship for network systems, so I kind of know how to use

Re: [Haskell-cafe] using haskell for a project

2009-05-02 Thread Dean Herington
At 7:17 PM +0200 5/2/09, Nicolas Martyanoff wrote: Content-Type: multipart/signed; micalg=pgp-sha1; protocol=application/pgp-signature; boundary=ibTvN161/egqYuK8 Content-Disposition: inline Hi, I don't think I already presented myself; I'm Nicolas, a 23y french student, trying to learn

Re: [Haskell-cafe] using haskell for a project

2009-05-02 Thread Sebastian Sylvan
On Sat, May 2, 2009 at 6:17 PM, Nicolas Martyanoff khae...@gmail.comwrote: Hi, I don't think I already presented myself; I'm Nicolas, a 23y french student, trying to learn and use haskell. I've been using C for years, for all sort of tasks, and am quite comfortable with it. I'm also using