On Wed, 27 May 2009 15:04:36 -0700, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
?There are links to some great tutorials [1] and IRC
information where you can get real-time help [2]. ?Also there are some
good books [3].
I think most recent learners learned from YAHT [4], Gentle
Hi Dan,
On Mon, May 25, 2009 at 1:22 AM, Dan danielkc...@gmail.com wrote:
Hi,
When I was learning to program in imperative languages like Java, there
were plenty of resources to learn from about how to design large
programs. Ideas like the GoF Design Patterns gave useful models that
one
On Wed, 27 May 2009 17:52:17 -0300, Mauricio briqueabra...@yahoo.com
wrote:
I would like to create a mailing list for Portuguese speaking
Haskell programmers. I tried checking haskell.org mailing lists
page, but the only contact e-mail I see is 'mail...@haskell.org',
and a message sent to that
You already have splicing for top level decls. Splicing for local decls is a
whole different ball game because it brings new *binders* into scope. For
example
f = ...g...
g = let $(foo) in ...f...
Is the 'f' inside 'g' the same 'f' as the one bound at top level? Not
necessarily, because
张旭 stircrazyn...@hotmail.com writes:
Hi, I am really new to haskell. I am reading A gentle instruction
to haskell now. And I just cannot understand the chapter below. Is
there anybody who can gives me some hints about why the pattern
matching for client is so early? How does the pattern
You are absolutely right about the tantalising opportunity. I know that
Lennart has thought quite a bit about this very point when designing his
Paradise system. Likewise Conal for Pan.
One difficulty is, I think, that it's easy to get ambiguity. Eg
ifthenelse (a b) e1 e2
The (ab)
On Wed, 27 May 2009 11:31:07 -0700, Jason Dusek
jason.du...@gmail.com wrote:
What can we say to that? I'm well practiced in handling those
who reject types outright (Python programmers), those who
reject what is too different (C programmers), those who can
not live without objects (Java
There are multiple possible classes that you might want under different
circumstances (I think the most interesting issue is whether the class
(==), () etc is in has a fundep from the type of the thing being
compared to the type of the boolean), but if NoImplicitPrelude (or some
other extension)
Here's what I usually use. As Simon points out, ambiguity is lurking
as soon as you use conditional. You can avoid it a fundep, but that's
not necessarily what you want either.
-- | Generalization of the 'Bool' type. Used by the generalized 'Eq' and 'Ord'.
class Boolean bool where
() ::
michael rice nowgate at yahoo.com writes:
I've been digging into this stuff for months and it's still tripping me up.
For exploration use GHCi. It can tell you the type of thing you have written. It
has command to tell you type of thing, the :t. See here:
Prelude let double x = Just (x + x)
One user's view of error message history, perhaps helpful to reformers:-)
Once upon a time, Hugs tended to have better error messages than GHC.
They still weren't perfect, mostly when begginners where confronted with
messages referring to advanced concepts - eg, Simon Thompson had a list
of
Henning Thielemann schlepp...@henning-thielemann.de wrote:
I don't think that it is in general possible to use the same parser
for lazy and strict parsing, just because of the handling of parser
failure.
Polyparse demonstrates that you can mix-and-match lazy parsers with
strict parsers in the
Thanks. GHC at one stage suggested I add (Num a) =
to my Num instance (after I'd added (Eq a) = to my Eq
instance) and I didn't make the connection.
-Original Message-
From: Ryan Ingram [mailto:ryani.s...@gmail.com]
Sent: Thu 28/05/2009 01:18
To: Paul Keir
Cc: haskell-cafe@haskell.org
Of course once you've got ifthenelse you find yourself wanting explicit
desugaring of pattern matching (could view patterns help here?),
Could you be more specific about what you want there, perhaps
with a small example? I recognize the other problems from my own
forays into EDSLs, but I'm not
On Thu, May 28, 2009 at 5:19 PM, Gracjan Polak gracjanpo...@gmail.com wrote:
You don't have to guess then, Haskell compiler can do the guessing for you.
It isn't guess, Haskell compiler (like GHC) gets these types by (type)
inference, as you said :-)
lee
It is called type inference.
On Thu, May 28, 2009 at 5:59 AM, Conal Elliott co...@conal.net wrote:
Thanks for bringing in this angle, David.
My preference is for honest and humble practice and documentation of
negative design. Instead of saying that something won't work, can't
work, is impossible etc (or rephrased via
Hi Ryan, thanks for a nice and thorough explanation. I had trouble
understanding the section of the tutorial as well. Maybe it would deserve to
rewrite to something a bit simpler?
Anyhow, I'd like to ask: Is there a reason for which pattern matching for
single-constructor data types isn't lazy by
2009/5/28 Petr Pudlak d...@pudlak.name:
Hi Ryan, thanks for a nice and thorough explanation. I had trouble
understanding the section of the tutorial as well. Maybe it would deserve to
rewrite to something a bit simpler?
Anyhow, I'd like to ask: Is there a reason for which pattern matching for
On Thursday 28 of May 2009 07:52:56 David Leimbach wrote:
Sorry took so long to get back... Thank you for the response. Been really
busy lately :-)
There are also a lot of 9P implementations in many languages that you can
interoperate with:
http://9p.cat-v.org/implementations
Thank you
Or overloading the `whitespace operator' for several kinds of
application.
On May 28, 2009, at 9:50 AM, Augustsson, Lennart wrote:
And explicit desugaring of list syntax.
-Original Message-
From: Sittampalam, Ganesh [mailto:ganesh.sittampa...@credit-
suisse.com]
Sent: 28 May 2009
Krzysztof Skrzętnicki wrote:
2009/5/27 Bertram Felgenhauer bertram.felgenha...@googlemail.com:
I wrote:
Krzysztof Skrzętnicki wrote:
The code for modifying the counter:
(\ msg - atomicModifyIORef ioref (\ cnt - (cntMsg cnt msg,(
atomicModifyIORef does not force the new value of
Hello Lennart,
Thursday, May 28, 2009, 11:57:09 AM, you wrote:
-- | Generalization of the 'Bool' type. Used by the generalized 'Eq' and
'Ord'.
class Boolean bool where
() :: bool - bool - bool -- ^Logical conjunction.
(||) :: bool - bool - bool -- ^Logical disjunction.
i
Thanks Wren, that makes sense.
Ryan Ingram wrote:
Think of classes like data declarations; an instance with no context
is a constant, and one with context is a function. Here's a simple
translation of your code into data; this is very similar to the
implementation used by GHC for
On Thu, May 28, 2009 at 5:42 AM, Khudyakov Alexey alexey.sklad...@gmail.com
wrote:
On Thursday 28 of May 2009 07:52:56 David Leimbach wrote:
Sorry took so long to get back... Thank you for the response. Been
really
busy lately :-)
There are also a lot of 9P implementations in many
Bulat Ziganshin bulat.zigans...@gmail.com wrote:
Hello Achim,
Thursday, May 28, 2009, 1:34:55 AM, you wrote:
Error: type of x is Integer
while type of read argument should be String
The problem with this is that the compiler can't know whether or not
the type of arguments to
As far as I can tell, there is not way to create CellRenderer that could
include icons with the text (I think it is because of incompatibilities of
Haskell type classes and Gtk inheritance hierarchy).
Is it a good way to use CellRendererPixbuf and render to pixbufs using Cairo? I
think my
leimy2k:
I'm also trying to figure out how bad/good Haskell Binary IO really is that
it's been addressed a few times differently :-)
FWIW Binary IO as implemented in Data.Binary is widely used in our
production systems at Galois. I'd be fairly confident in it.
-- Don
On 27/05/2009 22:02, Henning Thielemann wrote:
My proposal is thus: Discourage orphan instances! If you encounter that
an instance is missing and it is a canonical one, it should be added to
the package that defines the type or the class. If there are several
choices for the implementation then
I'm trying to implement the protocol, so that I can implement other things
on top of that.
I'm also trying to figure out how bad/good Haskell Binary IO really is that
it's been addressed a few times differently :-)
FWIW, I've used Data.Binary extensively and have found it a joy to work
On Thursday, May 28, 2009, Don Stewart d...@galois.com wrote:
leimy2k:
I'm also trying to figure out how bad/good Haskell Binary IO really is that
it's been addressed a few times differently :-)
FWIW Binary IO as implemented in Data.Binary is widely used in our
production systems at Galois.
On Thu, 28 May 2009, Simon Marlow wrote:
Quite. I argued the no orphan instances in libraries position on the
libraries list last year, here's the start of the (longish) thread:
http://www.haskell.org/pipermail/libraries/2008-September/010618.html
I remember. What I propose additionally
Fair enough. I am just new to the interface, wondering if I should
try matching responses by pulling apart via Get, or the bit syntax
package.
I'm assming you have some 'data Foo = ...'? If this is the case, you're
probably okay writing an instance of Binary for Foo and using
John Dorsey hask...@colquitt.org wrote:
As another native English speaker, I found expected/inferred very
intuitive when I was new to GHC, and to Haskell. I even think that
expected/inferred helped me form my intuition about Haskell's type
inference.
First off, me too, and I'm not a native
On Thu, 2009-05-28 at 12:08 -0400, John Van Enk wrote:
I'm trying to implement the protocol, so that I can implement
other things on top of that.
I'm also trying to figure out how bad/good Haskell Binary IO
really is that it's been
On Thu, May 28, 2009 at 9:17 AM, John Van Enk vane...@gmail.com wrote:
Fair enough. I am just new to the interface, wondering if I should
try matching responses by pulling apart via Get, or the bit syntax
package.
I'm assming you have some 'data Foo = ...'? If this is the case, you're
leimy2k:
encode/decode do Big Endian, and 9P does little endian.
From the man page:
Each message consists of a sequence of bytes. Two , four , and eight byte
fields hold unsigned integers represented in little endian order (least
significant byte first).
encode/decode just won't work
The main change I would make is to rename the arguments to
client/server; they overload the same names (reqs/resps) as the top
level declarations above, so it's very easy to get confused while
reading it.
Partially, I think this is just a hard concept to understand;
struggling to figure it out
On Thu, May 28, 2009 at 6:34 PM, Duncan Coutts
duncan.cou...@worc.ox.ac.ukwrote:
If it's not available publicly perhaps you might share it privately. Don
and I have discussed a few times writing a paper on the design and
implementation of a binary library.
I would definitely like to read
Writing instances encode/decode that use either little endian or big endian
(or mixed!) is trivial... see attached file.
I don't see where your problem is...
On Thu, May 28, 2009 at 12:35 PM, David Leimbach leim...@gmail.com wrote:
On Thu, May 28, 2009 at 9:17 AM, John Van Enk
On Thu, May 28, 2009 at 14:41, Bertram Felgenhauer
bertram.felgenha...@googlemail.com wrote:
Krzysztof Skrzętnicki wrote:
2009/5/27 Bertram Felgenhauer bertram.felgenha...@googlemail.com:
I wrote:
Krzysztof Skrzętnicki wrote:
The code for modifying the counter:
(\ msg - atomicModifyIORef
I am starting to get more involved with haskell programming and I'd like to
create a program where I can use the interactive loop in ghci to run a
haskell functions that create graphics in a separate openGL window. This
would be a separate interactive window from the terminal i am running ghci
in
Hi Everybody (especially Parsec Creator),
is there any reason why float parses only positive numbers?
I find following defition:
float = lexeme floating ? float
floating= do{ n - decimal
; fractExponent n
}
If floating was
is there any reason why float parses only positive numbers?
It is usual in parsing libraries to separate the recognition of a
leading sign from recognition of the number itself: the sign-only
parser can be reused in many contexts, e.g. in the Haskell'98 Numeric
library, there is
Greetings,
I am very pleased to officially announce Hac phi, a Haskell
hackathon/get-together to be held July 24-26 at the University of
Pennsylvania in Philadelphia. The hackathon will officially kick off
at 2:30 Friday afternoon, and go until 5pm on Sunday (with breaks for
sleep, of course).
Achim Schneider wrote:
expected/encountered
Expected/actual ? Familiar to users of test frameworks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Benjamin,
I would like to create a mailing list for Portuguese speaking
Haskell programmers. (...)
According to Mailing lists - HaskellWiki (see
http://haskell.org/haskellwiki/Mailing_lists),
Thanks for your comprehensive reports. However, I did
took all measures you sugested.
Any
This code, from YAHT (Section 8.4.2, PDF pg. 119 of 192) seems to have a
problem. Code below.
Michael
=
[mich...@localhost ~]$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking
I'm not sure what you're using at the end of the identifier search', but
it needs to be the single quote that's on the same key as the double quotes.
I suspect that's where it's blowing up.
On Thu, May 28, 2009 at 9:56 PM, michael rice nowg...@yahoo.com wrote:
This code, from YAHT (Section
On Thu, May 28, 2009 at 11:39 AM, John Van Enk vane...@gmail.com wrote:
Writing instances encode/decode that use either little endian or big endian
(or mixed!) is trivial... see attached file.
I don't see where your problem is...
Inexperience, lack of enough contiguous time to digest
michael rice wrote:
Yeah, I went back and tried double again, though I'd swear I got the dang thing
to compile (and run) w/o errors.
I guess I meant Num. So Num is a class and Int and Integer are types? What are
the other classes? Docs?
Unification, for me, is pattern matching ala Prolog.
2009/05/28 Benjamin L.Russell dekudekup...@yahoo.com:
What makes you think that Haskell is likely eventually to dig
a smoking hole in the ground?
This is more about unmet expectations than spectacular
failure.
--
Jason Dusek
___
Haskell-Cafe
Claus Reinke wrote:
Still, I would really like a just the facts, please mode for GHC, with
less text and more type signatures (especially for the contexts of type
mismatches). Error messages simply not including the
information I need has become my main issue with GHC messages,
and seems to be
Thanks! I just copied the code from the PDF file. Whatever that character was
it wasn't the correct one.
Michael
--- On Thu, 5/28/09, Andrew Wagner wagner.and...@gmail.com wrote:
From: Andrew Wagner wagner.and...@gmail.com
Subject: Re: [Haskell-cafe] Problem w/YAHT code example
To: michael
And I thought everyone was puzzling these type signatures out all by
themselves. ;-)
The Haskell learning curve is about the steepest I've ever seen for a computer
language, but I think I'm catching on.
Thanks for the info.
Michael
--- On Thu, 5/28/09, wren ng thornton w...@freegeek.org
54 matches
Mail list logo