Yves, that is exactly how I designed my program so far.
Human player needs a monad IO, AI needs just a monad, whatever it is, and I
make both run in IO.
And, as you said, the type of the ai (bot :: Monad m = Player m) contains
no IO, so I know that, even if I make it run in IO, it won't make any
I have some difficulties to see the use of PromptT, because in the tutorial,
this type is never mentioned, and its operations (Return and :=) are
instead constructors of ProgramT...
Would you have some concrete examples? Because there I'm a bit lost (since
the tutorial doesn't match the
...@quantentunnel.de
Limestraël wrote:
I have some difficulties to see the use of PromptT, because in the
tutorial,
this type is never mentioned, and its operations (Return and :=) are
instead constructors of ProgramT...
Would you have some concrete examples? Because there I'm a bit
Okay, I start to understand better...
Just, Heinrich, how would implement the mapMonad function in terms of the
operational package?
You just shown the signature.
2010/4/14 Bertram Felgenhauer bertram.felgenha...@googlemail.com
Limestraėl wrote:
Okay, I just understood that 'Prompt' was just
:
let pl1 = humanPlayer Cross
let pl2 = artificialPlayer Circle levelOfDifficulty
doGame blankGrid [runPlayer pl1, runPlayer pl2]
I did it!
2010/4/15 Heinrich Apfelmus apfel...@quantentunnel.de
Limestraël wrote:
Okay, I start to understand better...
Just, Heinrich, how would implement
, very clean (incomplete doc, for instance), but it'll do
the work.
By the way, the game.hs and client.hs are to be modified (it's the only way
to change the type of the players in the game)
2010/4/15 Limestraël limestr...@gmail.com
Ok, but there is no function such as mapMonad in the operational
By the way, I happen to have a little problem when I try to add data
compression/decompression.
Since its impossible to add binary treatments (I call binary treatment a
function which type is: ByteString - ByteString, e.g. compression), I made
my own package binary-communicator. (can be found on
Hello,
I'm trying to make two simple classe which would help me to transform
unserializable datatypes to serializable ones.
The classes are:
class (Binary b) = Binarizable a b | a - b where
toBinary :: a - b
class (Binarizable a b, Monad m) = Unbinarizable a b m | a - b where
fromBinary :: b
to automatically define a Binary as
an instance of Binarizable.
2010/4/17 Daniel Fischer daniel.is.fisc...@web.de
Am Samstag 17 April 2010 19:14:02 schrieb Limestraël:
Hello,
Well, here comes the trouble:
GameStructs.hs:16:9:
Functional dependencies conflict between instance declarations
Ok, so I am heading to a headache...
Daniel Fischer mentioned a solution using Type Families. As I read, those
are meant to replace the FunDeps, I will try this solution...
2010/4/17 Casey McCann syntaxgli...@gmail.com
On Sat, Apr 17, 2010 at 4:01 PM, Limestraël limestr...@gmail.com wrote:
I
There must be some kind of a private joke I don't get...
BTW, all you've said is pretty scaring...
It's strange I can't declare a generic instance for Binary types... I
thought I was trying to do something quite common in Haskell.
Apparently I'm still a young padawan with many things to learn.
of flexibility -- way before other
languages which pretend to be generic.
2010/4/18 Sebastian Fischer s...@informatik.uni-kiel.de
On Apr 18, 2010, at 11:01 AM, Limestraël wrote:
It's strange I can't declare a generic instance for Binary types... I
thought I was trying to do something quite common
Nice initiative!
By the way, since this is a monad, I think a better place than
Control.Concurrent.Forkable would be Control.Monad.Forkable.
It's just a suggestion.
2010/4/21 David Anderson d...@natulte.net
Dear Haskellers,
I'm happy, and only slightly intimidated, to announce the initial
Hello Café,
When I was trying to cabal-install haskell-src, I came up with:
cabal: The program happy is required but it could not be found
However, the happy package was actually installed and the 'happy' executable
was in ~/.cabal/bin (which was in my PATH)
I had to link ~/.cabal/bin/happy to
Yes, it's weird, but it works! Thanks.
2010/5/1 Daniel Fischer daniel.is.fisc...@web.de
Am Samstag 01 Mai 2010 13:16:55 schrieb Limestraël:
Hello Café,
When I was trying to cabal-install haskell-src, I came up with:
cabal: The program happy is required but it could not be found
Hello Café,
I don't know if you know
conkyhttp://en.wikipedia.org/wiki/Conky_%28software%29.
It's a well-known open-source system monitor (a software that displays
information on the desktop, like CPU frequency, disk usage, network rate,
etc.).
It is quite good, but it's very descriptive, and
Thank you all, that's very interesting.
Martin, I've started reading the paper, I like the way you think about what
a scripting language should provide (traceability, error handling and a
type system).
But, hold me if I'm wrong, but at no moment in the paper you made you own
language? It's a
not perfect in Haskell)
Plus, end-users have to install the compiler (GHC, which is not
lightweight), even if they have the statically-linked executable of the
application.
2010/5/4 minh thu not...@gmail.com
2010/5/4 Limestraël limestr...@gmail.com:
...
Minh, Kyle, Gwern, the dyre approach
How do you embed Lua in Haskell?
2010/5/5 Niclas W nicl...@gmail.com
Limestraël limestrael at gmail.com writes:
(*) functional language, because I want to keep the benefit of functional
programming for scripting. So no Lua, no Python...
You might want to take another look at lua
think about it?
2010/5/5 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com
Limestraël limestr...@gmail.com writes:
How do you embed Lua in Haskell?
http://hackage.haskell.org/package/hslua
--
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
and
links with yi.
But Yi is a far bigger application than what Limestraël is talking
about. One of my computers is very old and much
less powerful than yours (let's just say that it has far less than
1 Gb memory in total). On that machine, xmonad, still much
larger than Limestraël's app, recompiles
imperative
way of approaching problems.
-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.
On Wed, May 5, 2010 at 16:29, Limestraël limestr...@gmail.com wrote:
Yes, the xmonad approach is very neat, but I see 2 major (IMO) drawbacks
to it:
1) The end-user has to have GHC
, Limestraël limestr...@gmail.com wrote:
Yes, the xmonad approach is very neat, but I see 2 major (IMO) drawbacks
to
it:
1) The end-user has to have GHC, and all the necessary libraries to
compile
the configuration
2) A scripting language should be simple and QUICK to learn : Haskell
limestraël ;-)
El 05/05/2010, a las 18:25, Gregory Crosswhite escribió:
On May 5, 2010, at 3:09 PM, Daniel Fischer wrote:
Learning Lisp dialects is much harder (to a large part because of the
parentheses, which makes them near impossible to parse).
On the contrary, the whole point
... good luck limestraël ;-)
Seconded.
I chose the Dyre method. The easy path. ^^
If I was trying to make a game, I should be trying hslua. Just sad I didn't
find an easy way to script in functional (*).
(*) Nonconformist geek hit again.
___
Haskell
Yes, I wonder why mtl is not updated so as to remove this restriction.
2010/5/1 John Millikin jmilli...@gmail.com
You might want to make a local version of ErrorT in your library, to
avoid the silly 'Error' class restriction. This is pretty easy; just
copy it from the 'transformers' or 'mtl'
There is the package hint, which embeds the calls to GHC API.
Quite easy to use:
Let's say your configuration file (cfg/Script.hs) contains a function
script that you want to get:
type ScriptFun = IO ()
loadScript :: IO ScriptFun
loadScript = do
liftM (either (error . show) id) $
Personally I think fail is a terrible wart, and should be shunned.
So do I.
I can't understand its purpose since monads which can fail can be
implemented through MonadPlus.
2010/5/8 Ross Paterson r...@soi.city.ac.uk
On Sat, May 08, 2010 at 07:49:57AM +1000, Ivan Lazar Miljenovic wrote:
...@ece.cmu.edu
On May 7, 2010, at 19:51 , Limestraël wrote:
then *interpret script (as :: ScriptFun)*
There is just the line I put in bold that bothers me. Can't we get the
action script more easily than by re-interpreting some code?
Make up your mind: you don't want to have
Really?
There are only 4 fundamental functions in Reactive?
Seems simpler than I thought...
Thanks, btw, I've been looking quite a long time to simple reactive tutos.
2010/5/10 Tom Poliquin poliq...@softcomp.com
On Monday 10 May 2010 00:08, Jean-Marie Gaillourdet wrote:
We have created
Hello,
I know there is a special mailing list for reactive, but I got no answers
when sending to it.
Also, maybe my problem is not totally reactive-centered, it concerns
integration of an object speed to obtain its position with FRP.
As a newbie with reactive, I'm trying to make a simple example,
Okay,
guess I'll have to bring out the chapter 25 of my Real World Haskell...
2010/5/15 Bulat Ziganshin bulat.zigans...@gmail.com
Hello Limestraėl,
Saturday, May 15, 2010, 7:02:38 PM, you wrote:
But when I set my beat to tick every 60 times per second, the
position is well updated, but
the main.
I don't see where I should add strict evaluation.
2010/5/15 Limestraël limestr...@gmail.com
Okay,
guess I'll have to bring out the chapter 25 of my Real World Haskell...
2010/5/15 Bulat Ziganshin bulat.zigans...@gmail.com
Hello Limestraėl,
Saturday, May 15, 2010, 7:02:38 PM
2010/5/16 David Leimbach leim...@gmail.com
On Sat, May 15, 2010 at 8:42 AM, Limestraël limestr...@gmail.com wrote:
Okay,
guess I'll have to bring out the chapter 25 of my Real World Haskell...
I find it's often the most practical chapter that I hit a lot during writes
and changes to my
Yampa, that works for sure (although you should
mark all your output data strict, as is done in the examples,
otherwise you might also get space leaks or shaky frame rates). Or
Elerea, which comes with a breakout game.
On Sun, May 16, 2010 at 9:30 PM, Limestraël limestr...@gmail.com wrote
I looked at elerea. I found it simple and nice!
I just regret the fact that the SignalMonad can only be run inside IO. With
reactive, you can transform signals in pure code.
I suggest unpacking the source of
dow and executing it in ghci, the problem will be obvious as you play at
length.
Yes,
I heard complaints about this two-layered solution with
SignalMonad/SignalGen, so I'm glad you like it. :)
Doesn't SignalGen replace SignalMonad in the experimental branch ? They
aren't meant to be used together, are they?
By the way, I strongly recommend using the Experimental branch instead
Time has to be an external signal?
I saw dow uses the Simple experimental branch, and I don't see how you
synchronize elerea with GLFW (what is done by driveNetwork in the Chase and
Breakout examples which use the main branch).
2010/5/18 Patai Gergely patai_gerg...@fastmail.fm
Doesn't
The game speed is determined by the amount of sleep
per frame.
I that the saw sleep time at each loop is fixed (0.02). So game speed will
depend on processor speed, since with a more powerful CPU frames will be
computed quicklier?
So we don't have (with the Simple branch) some way to say I want
Then it would be:
class Functor f where
fmap :: (a - b) - f a - f b
class (Functor f) = Pointed f where
pure :: a - f a
class (Pointed f) = Applicative f where
(*) :: f (a - b) - f a - f b
class (Applicative f) = Monad f where
join :: f (f a) - f a
This would be a great idea,
As some people were advising me to peek in Lua, I did so. Well, I find it
far too laxist and bug prone : weak-typing, variables which are global by
default, non-existing variables which contain nil when we access them
instead of failing...
I mean, I like Haskell especially because it is rigorous
Elerea finds middle ground between the two, and unlike Yampa, it's
examples would still work I guess.
Yes that's the big problem of Yampa: all of the examples are very old, and
some even don't work anymore.
It's the same for the papers/tutorials (they're all 6 years old or more),
and it would
immediate difficulty. Do you have
any particular bad experience?
Limestraël:
I find Elerea fine so far, but it is still experimental and more limited
than Yampa.
Well, it's more expressive in one way and more limited in another.
Elerea lifts some limitations of Yampa by extending
But you have to be aware that Elerea, Yampa, Lucid Synchrone and Lustre
are all very similar in their foundations.
Okay. I just thought that reactive programming was a quite new field of
research, but I saw that Lustre and Esterel date back to 1980...
I assumed also that it was a field which
...
On Mon, May 24, 2010 at 6:13 PM, Limestraël limestr...@gmail.com wrote:
I assumed also that it was a field which was still under research,
however,
Lustre, again, is used for critical control software in aircraft,
helicopters, and nuclear power plants, according to wikipedia
game coding, not yet at least.
On Tue, May 25, 2010 at 10:49 AM, Limestraël limestr...@gmail.com wrote:
Wow... impressive...
And now, with your experience, if you'd have to do this again, would you
use
Yampa or stick up with C#/C++ ?
2010/5/24 Peter Verswyvelen bugf...@gmail.com
I would expand your definition of monadic to:
able to syntactically transformed so as to be put in a sequence where an
operation can be altered by the results of the operations preceeding it.
IMO your definition matches more applicative.
2010/6/18 Alexander Solla a...@2piix.com
On Jun 17,
???
What does exactly swing do ?
2010/6/18 Bulat Ziganshin bulat.zigans...@gmail.com
Hello Martin,
Thursday, June 17, 2010, 11:02:31 PM, you wrote:
But what if I want to apply a list of functions to a single argument. I
can
one more answer is swing map:
Cabal/cabal-install are good tools for distribution and installation, but I
was wondering -- as I was starting to learn how to use Cabal -- how do
usually Haskell developpers build their softwares (and especially medium or
big libraries) while they are still developping them ?
With cabal-install,
(This is a same message, but with newlines. Sorry for the double post)
Cabal/cabal-install are good tools for distribution and installation, but I
was wondering -- as I was starting to learn how to use Cabal -- how do
usually Haskell developpers build their softwares (and especially medium or
Okay, so then I have so troubles regarding the compilation of my executable:
First, what do you think is the simpler : (1) build only the library through
cabal-install and then the executable with ghc (it isn't to be distributed
with the lib), or (2) add both to my
this.
Nevertheless, issue (2) remains...
Limestraël wrote:
Okay, so then I have some troubles regarding the compilation of my
executable:
First, what do you think is the simpler : (1) build only the library
through cabal-install and then the executable with ghc (it isn't to be
distributed
Okay, but have you ever felt the need to make in the same project a library
and an executable which depends on this library (even just like me, for
testing purpose)? How would you do it?
Jason Dusek wrote:
My development environment is a Screen with Bash, Vim and GHCi
running.
If I
Then how does the 'Executable' section of your .cabal look like? That's what
I can't get working.
Jonathan Daugherty-4 wrote:
The first thing I always do is create a skeletal cabal file for my
project and add Library and Executable sections to it. The executable
might be a test/demo
I think I must be dumb or something.
I did my SFML.cabal exactly the way the packager of vty-ui did vty-ui.cabal,
and I still have got the error when building:
hs_src/SFML/Direct/Graphics.hs:51:7:
Could not find module `SFML.Direct.Types.Enums':
It is a member of the hidden package
Neil Brown-7 wrote:
Don't you simply need to do what the error message says, and add (*in
the Executable section*, at the end of the file):
Nope, just check my previous message (my issue (2)):
Limestrael wrote:
(2) well, then, when building, if I don't specify that my executable
Eventually, I think using cabal during development may be convenient. The
only drawback is that you have to specify each dependency and -- above all
-- every module each time you add one.
Nevertheless, I'm not convinced regarding the use of Makefiles with Cabal. I
happen to think it's a bit
Seems like today FRP is the last word in game programming with Haskell.
Do you know something that could be a good tutorial, or at least
introduction to FRP ? Something that could somewhat help me learn the ropes,
'cause I'm afraid if I dive directly into your code I'm gonna be lost.
Good job,
58 matches
Mail list logo