I think it'd be nice if we just replaced the if with a question mark :)
--
_jsn
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Anatoly
I have not been following the details, but would you consider writing up your
example on the GHC user guide Wiki?
http://haskell.org/haskellwiki/GHC/Using_the_FFI
It's a very good way to share your experience with others.
Simon
| -Original Message-
| From: [EMAIL
Bertram has put together a peg solitaire game using gtk2hs with Prompt
for control:
http://int-e.home.tlink.de/haskell/solitaire.tar.gz
It's a good read and probably a good starting point for other board games.
-- ryan
On Wed, Sep 24, 2008 at 7:04 PM, Rafael C. de Almeida
[EMAIL
Daniel Fischer [EMAIL PROTECTED] wrote:
The fast searching function on ByteStrings has already been written
for you :)
That's in ghc 6.8.3, which is not in gentoo but only in the haskell
overlay, which means that all blame goes to the gentoo maintainers for
being utterly out of date.
The KMP
leledumbo wrote:
consider this partial program:
if n5 then
putStrLn big
else
putStrLn small
this works fine in hugs, but in ghc I must change it to:
if n5
then
putStrLn big
else
putStrLn small
Actually both of those are valid expressions.
And they both work in hugs and ghc.
Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
I think Hugs is violating the Haskell98 layout rules.
One could argue that GHC should, too.
--
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
Stephen wrote:
I wrote a command-line program recently for a friend in haskell.
However, he's far away and not particularly computer literate. I sent
him the raw binaries, but they came up with errors about not being able
to find libgmp stuff. So then I thought I should probably be able to
Jules Bean [EMAIL PROTECTED] wrote:
do
if n5 then
putStrLn big
else
putStrLn small
this is shorthand for
do { if n 5 then putStrLn big ; else putStrLn small }
which is a syntax error. A statement in a do block cannot begin with
the keyword else.
Haskell' is
Achim Schneider [EMAIL PROTECTED] wrote:
if i knew how to do it
Sorry, apparent mistake, besides confusing b (bool) with p (predicate):
if p _ c = do
(_, _, a) - get
put (p, c, a)
mzero
--
(c) this sig last receiving data processing entity. Inspect headers
for
Marc
What is this strange syntax
columns = [ (trackId, conT *''Int* )
It looks like a not ended string literal unless I still have sth to learn
about Haskell.
Thank you
J-C
On Thu, Sep 25, 2008 at 12:03 AM, Marc Weber [EMAIL PROTECTED] wrote:
On Wed, Sep 24, 2008 at 11:17:01PM +0200,
Hi everybody,
The second pre-release of darcs 2.1 (formerly known as 2.0.3) is now
available at http://darcs.net/darcs-2.1.0pre2.tar.gz
We have increased the version number since the last pre-release because
we are adopting an important new behaviour:
The darcs initialize command now creates
jean-christophe mincke [EMAIL PROTECTED] wrote:
What is this strange syntax
columns = [ (trackId, conT *''Int* )
It looks like a not ended string literal unless I still have sth to
learn about Haskell.
' isn't special in Haskell, it's idiomatic: you often see things like
foo' = bar foo
On Thu, Sep 25, 2008 at 11:52:26AM +0200, jean-christophe mincke wrote:
Marc
What is this strange syntax
columns = [ (trackId, conT ''Int )
Hi J-C,
I'ts part of template haskell and tells ghc to use the type
referenced by Int. There are some getting started guides on haskell.org
Hello jean-christophe,
Thursday, September 25, 2008, 1:52:26 PM, you wrote:
columns = [ (trackId, conT ''Int )
It looks like a not ended string literal unless I still have sth to learn
about Haskell.
it's TemplateHaskell, look for Reification in
http://www.haskell.org/bz/thdoc.htm
--
2008/9/24 Galchin, Vasili [EMAIL PROTECTED]:
Do there currently (or in the works) exist FFI bindings for Google's
Android API?
The Android API is obviously a Java API, additionally Android will
only execute DEX bytecode programs, so you would first need a way to
compile Haskell to Java,
On 25 Sep 2008, at 13:33, Adam Langley wrote:
A Google
search for haskell java turns up at least one good candidate[1], but
if you manage to get that working well, binding the APIs is a rather
trivial task ;)
[1] http://www.cse.unsw.edu.au/~pls/thesis-topics/ghcjava.html
That's actually just
Hi,
I can't find the loadMatrix function in
http://hackage.haskell.org/packages/archive/OpenGL/latest/doc/html/Graphics-Rendering-OpenGL-GL-CoordTrans.html
Should I use loadIdentity then multMatrix instead ?
Thank you,
Thu
___
Haskell-Cafe mailing
On Thu, Sep 25, 2008 at 15:39, minh thu [EMAIL PROTECTED] wrote:
Hi,
I can't find the loadMatrix function in
http://hackage.haskell.org/packages/archive/OpenGL/latest/doc/html/Graphics-Rendering-OpenGL-GL-CoordTrans.html
Should I use loadIdentity then multMatrix instead ?
Thank you,
Thu
minh thu [EMAIL PROTECTED] wrote:
I can't find the loadMatrix function in
http://hackage.haskell.org/packages/archive/OpenGL/latest/doc/html/Graphics-Rendering-OpenGL-GL-CoordTrans.html
Should I use loadIdentity then multMatrix instead ?
You're supposed to use withMatrix and regard OpenGL
2008/9/25 Achim Schneider [EMAIL PROTECTED]:
minh thu [EMAIL PROTECTED] wrote:
I can't find the loadMatrix function in
http://hackage.haskell.org/packages/archive/OpenGL/latest/doc/html/Graphics-Rendering-OpenGL-GL-CoordTrans.html
Should I use loadIdentity then multMatrix instead ?
You're
Hello haskell-cafe,
In my application I have a complex state threaded through long
computation chains, and I need a way to log all state changes (so that
the evolving state can be animated/replayed somewhere else).
Initially I tried combining State and Writer monads but this allows
for the
On Thu, 25 Sep 2008, Anthony LODI wrote:
Hello haskell-cafe,
In my application I have a complex state threaded through long
computation chains, and I need a way to log all state changes (so that
the evolving state can be animated/replayed somewhere else).
Initially I tried combining State and
withMatrix doesn't seem to have anything to do with glLoadMatrix.
You are right that you can do glLoadMatrix with loadIdentity and multMatrix.
To directly load a matrix, use the function matrix (with a Nothing
argument). This will internally call the loadMatrix function that
Krzysztof mentioned
minh thu [EMAIL PROTECTED] wrote:
Anyway, the bindings are not that much functionnal, even with things
like withMatrix.
http://thread.gmane.org/gmane.comp.lang.haskell.cafe/35444/focus=35713
Mind you: regarding 3d, I barely manage to code up camera movements.
That is, I don't use it much at
2008/9/25 Bit Connor [EMAIL PROTECTED]:
withMatrix doesn't seem to have anything to do with glLoadMatrix.
You are right that you can do glLoadMatrix with loadIdentity and multMatrix.
To directly load a matrix, use the function matrix (with a Nothing
argument). This will internally call the
Rich Neswold ha scritto:
On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:
I need a simple, concurrent safe, database, written in Haskell.
A database with the interface of Data.Map would be great, since what
I need to to is atomically
http://news.cnet.com/8301-13953_3-10050826-80.html?part=rsssubj=newsta
g=2547-1_3-0-5
We have to see a paradigm change in the way we write applications. He
also said that software development hasn't graduated to become a formal
engineering discipline. The resilience of systems is not up to the
While trying to test 6.10, I ran into the issue that a number of the
libraries it wants are not installed by default, and are most
conveniently added via Fink. This includes gmp, binutils, readline,
etc.
/sw/ is not in the default gcc path, of course, so the usual solution
is to add
John Van Enk [EMAIL PROTECTED] writes:
I'm going to have to agree with David... even if you ignore the multi-threaded
projects, why couldn't the C programs just implement very specific version of
the third party library inside their code?
Or they could just FFI to the Haskell libraries :-)
Dear all,
I've written a function with the following type:
build :: Bifunctor s = (forall b. (s a b - b) - b) - Fix s a
When I try to compile I get the following error:
Illegal polymorphic or qualified type: forall b. (s a b - b) - b
In the type signature for `build':
build :: (Bifunctor
On Thu, Sep 25, 2008 at 11:09 AM, Manlio Perillo
[EMAIL PROTECTED]wrote:
Rich Neswold ha scritto:
On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo [EMAIL PROTECTED]mailto:
[EMAIL PROTECTED] wrote:
I need a simple, concurrent safe, database, written in Haskell.
A database with the
I have not been following the details, but would you consider writing up your
example on the GHC user guide Wiki?
http://haskell.org/haskellwiki/GHC/Using_the_FFI
It's a very good way to share your experience with others.
I got that example from Claude Heiland-Allen. Unless he has
Hello Ketil,
Thursday, September 25, 2008, 8:57:05 PM, you wrote:
John Van Enk [EMAIL PROTECTED] writes:
I'm going to have to agree with David... even if you ignore the
multi-threaded
projects, why couldn't the C programs just implement very specific version of
the third party library
I have not been following the details, but would you consider writing up
your example on the GHC user guide Wiki?
http://haskell.org/haskellwiki/GHC/Using_the_FFI
It's a very good way to share your experience with others.
I got that example from Claude Heiland-Allen. Unless he has
Andrew Coppin wrote:
OK, so a GHC question: Apparently at some point, GHC used to support
DLLs. And then it stopped working. And then it may or may not have
been brought back again... Does anybody know exactly what the status
of this is? Is it currently working or broken? If it's working, what
Lihn, Steve [EMAIL PROTECTED] wrote:
Notice: This e-mail message, together with any attachments, contains
information of Merck Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck
On Thu, Sep 25, 2008 at 10:34 AM, Henning Thielemann
[EMAIL PROTECTED] wrote:
Instead of rewriting from scratch, you can also define
newtype StateWriter l s a = StateWriter (StateT s (Writer l) a)
Thanks for the tip! I knew there must be a way to reuse some of the
existing machinery. I'll
Rich Neswold [EMAIL PROTECTED] wrote:
On Thu, Sep 25, 2008 at 11:09 AM, Manlio Perillo
[EMAIL PROTECTED]wrote:
Rich Neswold ha scritto:
On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo
[EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote:
I need a simple, concurrent safe, database,
On Sep 25, 2008, at 13:50 , Achim Schneider wrote:
Lihn, Steve [EMAIL PROTECTED] wrote:
Notice: This e-mail message, together with any attachments, contains
information of Merck Co., Inc. (One Merck Drive, Whitehouse
Station,
Just curious: What'd happen if I forward this message to
Achim Schneider wrote:
Rich Neswold [EMAIL PROTECTED] wrote:
On Thu, Sep 25, 2008 at 11:09 AM, Manlio Perillo
[EMAIL PROTECTED]wrote:
...
But this works only if the database is used by only one process.
Ah. When you said concurrent safe, I thought you meant within the
application. You're
Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote:
On Sep 25, 2008, at 13:50 , Achim Schneider wrote:
Lihn, Steve [EMAIL PROTECTED] wrote:
Notice: This e-mail message, together with any attachments,
contains information of Merck Co., Inc. (One Merck Drive,
Whitehouse Station,
Jamie Brandon wrote:
Try writing
data RBStack = RBS [RBSItem] [RBSItem]
where the first list are all the same colour and the start of the second list
is a different colour. The rest should follow naturally and you will get
amortised O(1) push and pop (you occasionally have to juggle the
Anton van Straaten [EMAIL PROTECTED] wrote:
Achim Schneider wrote:
Rich Neswold [EMAIL PROTECTED] wrote:
On Thu, Sep 25, 2008 at 11:09 AM, Manlio Perillo
[EMAIL PROTECTED]wrote:
...
But this works only if the database is used by only one process.
Ah. When you said concurrent
On Wed, Sep 24, 2008 at 5:17 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
Hi.
I need a simple, concurrent safe, database, written in Haskell.
A database with the interface of Data.Map would be great, since what I need
to to is atomically increment some integer values, and I would like to avoid
And the one liner:
(rand 1 10) = return . (\v - take v [1..10])
What about:
take $ rand 1 10 * pure [1..10]
(more readable IMHO).
One could even define:
f % x = f * pure x
and have
take $ rand 1 10 % [1..10]
Also, why not using getRandomR(1,10) instead?
take $ getRandomR
On Wed, 24 Sep 2008, leledumbo wrote:
consider this partial program:
if n5 then
putStrLn big
else
putStrLn small
this works fine in hugs, but in ghc I must change it to:
if n5
then
putStrLn big
else
putStrLn small
maybe related
http://www.haskell.org/haskellwiki/If-then-else
On Thu, Sep 25, 2008 at 1:15 PM, Eric [EMAIL PROTECTED] wrote:
Dear all,
I've written a function with the following type:
build :: Bifunctor s = (forall b. (s a b - b) - b) - Fix s a
When I try to compile I get the following error:
Illegal polymorphic or qualified type: forall b. (s a
On Thu, 25 Sep 2008, David Menendez wrote:
That looks like it should work. I'm guessing you enabled
ExistentialQuantification, but not Rank2Types or RankNTypes. The
former allows you to use the forall keyword in data declarations, but
you need one of the others to allow universal
Graham Fawcett ha scritto:
On Wed, Sep 24, 2008 at 5:17 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
Hi.
I need a simple, concurrent safe, database, written in Haskell.
A database with the interface of Data.Map would be great, since what I need
to to is atomically increment some integer values,
Matthew Eastman said:
i.e. popping Blue in [Red, Red, Blue, Red, Blue] would give [Red, Red,
Blue]
Hmm, did you mean [Red,Blue] or [Red,Red,Red,Blue]? Judging by your
implementation of remUseless, I'm guessing the latter.
Here is a more straightforward approach than apfelmus'. I store
On Thu, Sep 25, 2008 at 5:09 PM, Manlio Perillo
[EMAIL PROTECTED] wrote:
Graham Fawcett ha scritto:
If you're on Intel/Itanium, I believe there's a CMPXCHG instruction
that will do atomic compare-and-set on a memory address, and I'm not
sure you could get much faster than that. :-)
I have an
I am afraid, but this does not give constant amortized time.
sendEmail :: ProperlyThoughtOut Idea - IO ()
Clearly my brain lacks a type checker.
Jamie
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Iain Barnett wrote:
On 24 Sep 2008, at 10:13 pm, Evan Laforge wrote:
For one approach, check
out 'replicate' to make copies of something, and then 'sequence' to
run them and return a list.
Thanks, I haven't found anything that explains 'sequence' well yet, but
I'll keep looking.
Yet
On Thu, 2008-09-25 at 00:11 -0400, Matthew Eastman wrote:
Hey guys,
This is probably more of a question about functional programming than
it is about Haskell, but hopefully you can help me out. I'm new to
thinking about things in a functional way so I'm not sure what the
best way to
Hi everyone,
I'm finding Haskell to be a really handy language for writing programs
designed to be used from shell scripts of late. hpodder, twidge, and
datapacker are al on Hackage.
I released dataacker 1.0.1 recently. It's about one fifth the size of
a close competitor written in another
Ariel J. Birnbaum [EMAIL PROTECTED] wrote:
And the one liner:
(rand 1 10) = return . (\v - take v [1..10])
What about:
take $ rand 1 10 * pure [1..10]
The reason why this doesn't work by default is the occurrence
distribution of tutorials about warm, fuzzy things and warm, funky
jgoerzen:
Hi everyone,
I'm finding Haskell to be a really handy language for writing programs
designed to be used from shell scripts of late. hpodder, twidge, and
datapacker are al on Hackage.
I released dataacker 1.0.1 recently. It's about one fifth the size of
a close competitor
57 matches
Mail list logo