On Tue, 2008-06-17 at 18:45 +0200, Karoly Negyesi wrote:
> Hi,
>
> The PHP community is discussing the adding of closures and lambdas to
> the language, see the proposal at http://wiki.php.net/rfc/closures
>
> If someone with knowledge of both languages could take a quick look it
> would be great
On Sat, 2008-06-14 at 17:19 +1000, Rafal Kolanski wrote:
> Ryan Ingram wrote:
> > sumns 0 = 0
> > sumns x = sumns (x-1) + n
> >
> > Without the monomorphism restriction, computing n is a function call;
> > it is evaluated each time it is asked for.
>
> I'm relatively new to Haskell, and since thi
On Wed, 2008-06-11 at 20:24 -0700, Don Stewart wrote:
> page:
> > Definition of f:
> >f = foldr (+) 0
> > Types:
> >0 :: (Num t) => t
> >foldr (+) 0 :: Num a => [a] -> a
> >f :: [Integer] -> Integer
> >
> > Please remind me, again, of the advantages of f being something different
On 5 Jun 2008, at 1:39 AM, Thomas Davie wrote:
Even deriving an instance of Functor seems rather implausable, what
should it do for
data Wierd a b = Nil | A a (Wierd a b) | B b (Wierd a b)
Should fmap's function argument operate on 'a's, 'b's, or both?
class Functor (f :: * -> *) where ...
On 31 May 2008, at 7:12 AM, Dimitry Golubovsky wrote:
Hi,
If a parser which updated user state fails, will such update be
reverted?
Suppose we have two parsers combined with <|>
p = p1 <|> p2
p1 has the following:
p1 = try $ do
... -- getting something from the input stream
updateStat
On 30 May 2008, at 12:29 AM, Galchin, Vasili wrote:
compactness in writing and also namespace pollution .. ;^)
I know what the advantages of C's notation are. But getting the best
notation out of Haskell generally doesn't happen by trying to make
your code look like C.
So the general an
On 29 May 2008, at 11:46 PM, Galchin, Vasili wrote:
Hello,
I don't want to write kludgy Haskell code!
typedef struct blah
{
int val1;
union {
int val2;
struct {
int val3;
int val4;
}
}
}C_typ
On 29 May 2008, at 10:44 AM, Dan Piponi wrote:
On Wed, May 28, 2008 at 6:38 PM, Richard A. O'Keefe
<[EMAIL PROTECTED]> wrote:
I've always pronounced it k'BAHL, but was surprised to find that
the OED only countenances a short second syllable:
The reason I originally asked is that American, Br
On 15 May 2008, at 4:29 AM, Conor McBride wrote:
Replying slap-foreheadedly to own post...
On 15 May 2008, at 11:56, Conor McBride wrote:
Folks
I'm also wondering whether it makes sense to have a
"bottomless Top" type, with constructor _ and lazy pattern _
(with (undefined :: Top) equal to _
On 14 May 2008, at 2:13 PM, Claus Reinke wrote:
It's not that simple with bits. They lack consistency just
like the
usual US date format and the way Germans read numbers.
So you claim that you pronounce 14 tenty-four? In German
pronunciation
is completely uniform from 13 to 99.
http://w
On 22 Apr 2008, at 9:53 AM, Ryan Ingram wrote:
On Mon, Apr 21, 2008 at 10:58 PM, Jonathan Cast
<[EMAIL PROTECTED]> wrote:
I must have failed to communicate well. To me, the point of
giving a class
a name is that then you can write a program that is parametric
over the
elements o
On 22 Apr 2008, at 8:03 PM, Derek Elkins wrote:
On Mon, 2008-04-21 at 22:58 -0700, Jonathan Cast wrote:
class Forceable alpha where
seq :: alpha -> beta -> beta
Instances derived automatically by the compiler, when possible, for
every type (like Typeable should be). We can omit fun
On 21 Apr 2008, at 12:50 AM, Ryan Ingram wrote:
On Fri, Apr 18, 2008 at 10:01 PM, Jonathan Cast
<[EMAIL PROTECTED]> wrote:
{-# GHC_OPTIONS -foverlapping-instances -fundecidable-instances
#-} :)
What you want to work is precisely what this allows.
Of course, I bring that point up
On 20 Apr 2008, at 3:05 AM, David MacIver wrote:
On Sun, Apr 20, 2008 at 4:46 AM, Jonathan Cast
<[EMAIL PROTECTED]> wrote:
On 19 Apr 2008, at 5:02 AM, David MacIver wrote:
Independently of the rant...
On Sat, Apr 19, 2008 at 6:01 AM, Jonathan Cast
<[EMAIL PROTECTED]> wrote:
On 19 Apr 2008, at 5:02 AM, David MacIver wrote:
Independently of the rant...
On Sat, Apr 19, 2008 at 6:01 AM, Jonathan Cast
<[EMAIL PROTECTED]> wrote:
But why do I need to jump through these hoops for a perfectly safe &
commonly desired operation?
It's called a proof oblig
On 18 Apr 2008, at 9:29 PM, Ryan Ingram wrote:
WARNING: RANT AHEAD.
WARNING: RESPONSE IN THE SPIRIT OF THE ORIGINAL AHEAD.
Hopefully this fires off some productive
discussion on how to fix these problems!
{-# GHC_OPTIONS -foverlapping-instances -fundecidable-instances #-} :)
What you wan
On 8 Apr 2008, at 7:06 PM, Dan Weston wrote:
Richard A. O'Keefe wrote:
On 8 Apr 2008, at 7:15 am, Dan Weston wrote:
[1] Yes, I know that "conciseness" is the much more common and
accepted word for this, but if we can say "precision",
"decision", and "incision", then it seems foolish to not
On 29 Mar 2008, at 10:21 PM, Jason Dusek wrote:
Stefan O'Rear <[EMAIL PROTECTED]> wrote:
The only type that you are allowed to assume corresponds to a C
int is
CInt, in the Foreign.C.Types module. This probably isn't the
problem,
but it could make problems of its own on a 64-bit or other
On 28 Mar 2008, at 2:02 AM, Paul Keir wrote:
Thanks, I'd thought it was something to do with incompatible types.
I can now create a simpler problem:
tester2 = reserved "parameter" <|> symbol ":"
Certainly I could use reserved ":" instead of symbol, but where is
my thinking with symbol here
On 10 Mar 2008, at 4:00 AM, Adrian Hey wrote:
Neil Mitchell wrote:
2) What does it do with duplicate elements in the list? I expect
it deletes
them. To avoid this, you'd need to use something like
fromListWith, keeping
track of how many duplicates there are, and expanding at the end.
Th
On 10 Mar 2008, at 12:37 AM, Donn Cave wrote:
On Mar 9, 2008, at 1:07 PM, Henning Thielemann wrote:
Errors are programming errors and must be fixed as Denis
explained. Thus
there is no need for a complex system of handling these situations at
run-time. The program error might be unexpect
On 23 Feb 2008, at 3:30 AM, Radosław Grzanka wrote:
Hi,
I'm developing toy application to learn HDBC. I have "problem" with
doing relations mapping. Actually I don't know is it a problem or
"feature". ;)
Anyway, I have two tables with relation between them:
(this example is simplified to the
On 17 Feb 2008, at 1:12 AM, Colin Paul Adams wrote:
"apfelmus" == apfelmus <[EMAIL PROTECTED]> writes:
apfelmus> Colin Paul Adams wrote:
Left? Right?
Hardly descriptive terms. Sounds like a sinister language to
me.
apfelmus> The mnemonics is that Right x is "right" in the sense o
On 16 Feb 2008, at 11:40 PM, Peter Verswyvelen wrote:
After having played with some packages that use arrows, and after
having read the very nice "programming with arrows" paper I wanted
to build some of my own.
Strangely my code did not work, even the simplest function got
stuck in an in
On 16 Feb 2008, at 11:46 PM, Anton van Straaten wrote:
Colin Paul Adams wrote:
"Cale" == Cale Gibbard <[EMAIL PROTECTED]> writes:
Cale> So, the first version:
Cale> import System.IO import Control.Exception (try)
Cale> main = do mfh <- try (openFile "myFile" ReadMode) case mfh
On 16 Feb 2008, at 5:04 PM, Donn Cave wrote:
On Feb 16, 2008, at 3:46 PM, Philippa Cowderoy wrote:
On Sat, 16 Feb 2008, Alan Carter wrote:
I'm a Haskell newbie, and this post began as a scream for help.
Extremely understandable - to be blunt, I don't really feel that
Haskell
is ready a
On 16 Feb 2008, at 3:06 PM, Ruslan Evdokimov wrote:
Hi, all!
I have strange GHC behavior. Consider the code:
import Control.Parallel
main = print (o `par` (fromInteger e) / (fromInteger o))
where
[e,o] = map sum $ map (`filter` numbers) [even, odd]
numbers = [1..1000]
When it comp
On 11 Feb 2008, at 7:52 AM, Arnar Birgisson wrote:
Hi all,
On Feb 11, 2008 3:14 PM, apfelmus <[EMAIL PROTECTED]> wrote:
I will be mean by asking the following counter question:
x + (y + z) = (x + y) + z
is a mathematical identity. If it is a mathematical identity, a
programmer need not ca
On 11 Feb 2008, at 5:33 AM, Deokjae Lee wrote:
Tutorials about monad mention the "monad axioms" or "monad laws". The
tutorial "All About Monads" says that "It is up to the programmer to
ensure that any Monad instance he creates satisfies the monad laws".
The following is one of the laws.
(x >>
On 8 Feb 2008, at 6:50 PM, Jonathan Cast wrote:
On 8 Feb 2008, at 6:34 PM, Ryan Ingram wrote:
import System.IO
myGetLine = hFlush stdout >> getLine
That fixes this issue, certainly (although it's superfluous; my
program really does contain only a single call to getLine)...
N
On 8 Feb 2008, at 6:34 PM, Ryan Ingram wrote:
import System.IO
myGetLine = hFlush stdout >> getLine
That fixes this issue, certainly (although it's superfluous; my
program really does contain only a single call to getLine)...
Nevertheless, it would be nice to at least have it in the stand
On 8 Feb 2008, at 5:29 PM, Philip Weaver wrote:
GHC certain *could* do this, but it's arguably not the right thing
to do. For performance, the operating system buffers writes until
it is ready to write large chunks at a time. If you do not want
this behavior, change the buffering mode fro
On 8 Feb 2008, at 4:50 PM, Brandon S. Allbery KF8NH wrote:
On Feb 8, 2008, at 19:41 , Philip Weaver wrote:
Your "gsi> " is buffered because there's no newline at the end.
To flush the buffer and force it to be printed immediately, use
'hFlush' from the System.IO library, or use 'hSetBuffe
$ cat > foo.c
#include
int
main()
{
char s[1024];
printf("gsi> ");
gets(s);
printf("%s\n", s);
return 0;
}
$ make foo
cc gsi.c -o gsi
$ ./foo
warning: this program uses gets(), which is unsafe.
gsi> hello
hello
$ cat > foo.hs
main = do
putStr "gsi> "
s <- getLine
putStrLn s
On 7 Feb 2008, at 12:30 PM, Chad Scherrer wrote:
On Feb 7, 2008 11:57 AM, Don Stewart <[EMAIL PROTECTED]> wrote:
Ah, yes, missing parens! Well spotted.
So a pretty printer wibble in GHC?
-- Don
Yeah, that was my first concern, but then I noticed the quantification
was different, so I'm stil
On 7 Feb 2008, at 12:07 AM, Henning Thielemann wrote:
On Wed, 6 Feb 2008, Jonathan Cast wrote:
On 6 Feb 2008, at 1:54 PM, Matthew Pocock wrote:
On Wednesday 06 February 2008, Henning Thielemann wrote:
If the type checker does not terminate because the checked
function does
not terminate
On 6 Feb 2008, at 11:32 PM, Uwe Hollerbach wrote:
All right, after a bit of dinner and some time to mess about, here's
another attempt to check my understanding: here is a simplified
version of the lisp-time example:
module Main where
import System.Time
pure_fn :: Integer -> String
pure_fn n
On 6 Feb 2008, at 7:30 PM, Uwe Hollerbach wrote:
Hi, all, thanks for the responses. I understand the distinction
between pure functions and impure functions/procedures/IO actions,
Um, I'm not sure of that, given what you go on to say.
it
just felt to me in the samples that I quoted that I wa
On 6 Feb 2008, at 5:17 PM, Jeff φ wrote:
IO(U)Arrays are only one variant of mutable Array, there are also ST
(U)Arrays,
which are often preferred.
I should have worded my question better. The MArray interface is
implemented in both the ST and IO monad. A state monad seems like
a logical
I and some others proposed) guarantee you
a constant amount of memory consumed and is perfectly safe too, is the
Clean solution really so much better ?
Jonathan Cast :
I'm confused --- does uToList_2D return the head of the list
before or after it finishes reading
the array? If before, then
On 6 Feb 2008, at 1:54 PM, Matthew Pocock wrote:
On Wednesday 06 February 2008, Henning Thielemann wrote:
If the type checker does not terminate because the checked
function does
not terminate on the example input, then the function does not
pass the
type check and as a compromise this wou
On 5 Feb 2008, at 10:14 PM, Jeff φ wrote:
On Feb 5, 2008 4:58 PM, Chaddaï Fouché <[EMAIL PROTECTED]>
wrote:
2008/2/5, Jeff φ <[EMAIL PROTECTED]>:
> This is interesting. I've been programming in Concurrent Clean
for a while.
> Instead of monads, Clean supports unique types for mutable
On 4 Feb 2008, at 6:22 AM, Felipe Lessa wrote:
Hi there,
Reading http://www.haskell.org/haskellwiki/Things_to_avoid I found an
interesting saying:
"By the way, in the case of IO monad the Functor class method fmap and
the Monad based function liftM are the same."
I always tought that
prop ::
On 1 Feb 2008, at 10:30 PM, Logesh Pillay wrote:
I have a list. Each component is a list with 2 whole numbers.
First off, why? In Haskell (unlike dynamically typed languages like
Python or Perl), if you know you always have two elements, you want a
pair (519432,525806), not a list [51943
On 31 Jan 2008, at 1:23 AM, Reinier Lamers wrote:
Bayley, Alistair wrote:
More than one person has posted previously about the flaws and
traps of lazy IO. A common position seems to be "don't do lazy IO".
Still, when I was browsing the Haskell' wiki a few days ago, I
couldn't find any prop
On 30 Jan 2008, at 7:19 PM, Anton van Straaten wrote:
Derek Elkins wrote:
On Thu, 2008-01-31 at 02:18 +, Neil Mitchell wrote:
...
It isn't something that would throw a C programmer off, but it is
something that could confuse a pure Haskell programmer. And the only
way I could be sure of r
On 29 Jan 2008, at 9:44 PM, Adam Smyczek wrote:
Hi,
My application has to manage a data set. I assume the state monad
is designed for this.
The state changes in functions that:
a. perform IO actions and
b. return execution status and execution trace (right now I'm using
WriteT for this).
On 29 Jan 2008, at 1:28 AM, Neil Mitchell wrote:
Hi Adrian,
The "bug" is in ghc stack management. Why is it so important that the
stack size is arbitrarily limited?
It's not, but it makes some things easier and faster. A better
question is why is it important for the stack to grow dynamical
On 28 Jan 2008, at 11:00 PM, Henning Thielemann wrote:
On Mon, 28 Jan 2008, Jonathan Cast wrote:
Or, to put it another way, the bugs Java's stack overflow is designed
to catch are considered good style in Haskell.
I consider explicit recursion in Haskell as bad style. One should use
h
On 28 Jan 2008, at 10:07 AM, Neil Mitchell wrote:
Hi
ghc uses a pretty conventional stack AFAIK, and it is arbitrarily
limited, but you can change the limit with +RTS options.
GHC uses a conventional stack (in that you put stuff at the top, and
take it off from the top), but it is not a con
On 27 Jan 2008, at 11:18 PM, L.Guo wrote:
Hi,
How do you organize code ?
Here is a sample.
Acturally, I am thinking about using this plan.
Any suggestions ?
-- BasicalType.hs
type Position = (Int,Int)
data Box = Box { pos :: Position }
data Chain = Chain { pos :: [Position] }
-- Object.h
On 24 Jan 2008, at 3:04 PM, Evan Laforge wrote:
This takes an iterator over some collection of Foos and finds the one
with the highest value of updateTime. 9 lines of code, or 12 with
the
closing curly brackets.
In Haskell this is so short and obvious you probably wouldn't bother
declaring
On 20 Jan 2008, at 1:02 PM, [EMAIL PROTECTED] wrote:
On 2008.01.19 19:11:13 +0100, Peter Verswyvelen <[EMAIL PROTECTED]>
scribbled 1.4K characters:
The problem is that this only works when the complete source file
compiles
correctly no?
Yes. As I said, it's a very hackish solution - think
On 19 Jan 2008, at 2:52 AM, Kalman Noel wrote:
Jonathan Cast wrote:
On 12 Jan 2008, at 3:23 AM, Kalman Noel wrote:
(2) lim a_n = ∞
[...]
(2) means that the sequence does not converge,
To a value in R. Again, inf is a perfectly well defined extended
real number, and behaves like
On 18 Jan 2008, at 2:00 PM, Clifford Beshers wrote:
2008/1/18 Sukit Tretriluxana <[EMAIL PROTECTED]>:
Hi,
I don't know if it's been asked before. I just wonder if GHC
supports some sort of one-liner program that can be specify right
as the argument to either ghci or runghc program. In perl,
On 17 Jan 2008, at 7:02 PM, Don Stewart wrote:
http://cs.hubfs.net/blogs/hell_is_other_languages/archive/
2008/01/16/4565.aspx
I imagine this can only ease the process of learning Haskell, and
broaden the base of possible Haskellers, as more people on using .NET
stuff become familiar with mode
On 15 Jan 2008, at 7:54 PM, Adam Smyczek wrote:
On Jan 15, 2008, at 7:34 PM, Brandon S. Allbery KF8NH wrote:
On Jan 15, 2008, at 22:05 , Adam Smyczek wrote:
Ups, resend, first response did not make into the list.
On Jan 14, 2008, at 9:33 PM, Brandon S. Allbery KF8NH wrote:
On Jan 15, 20
On 14 Jan 2008, at 9:56 AM, David Roundy wrote:
On Fri, Jan 11, 2008 at 07:10:20PM -0800, Jonathan Cast wrote:
On 11 Jan 2008, at 10:12 AM, Achim Schneider wrote:
David Roundy <[EMAIL PROTECTED]> wrote:
Prelude> let x=1e-300/1e300
Prelude> x
0.0
Prelude> x/x
NaN
The "
On 13 Jan 2008, at 5:49 PM, Achim Schneider wrote:
Jonathan Cast <[EMAIL PROTECTED]> wrote:
On 13 Jan 2008, at 5:27 PM, Achim Schneider wrote:
Answer #2:
Because you can't write
f x = case x of
[] -> [1]
-> sort.nub
But why not?
Because arities are
On 13 Jan 2008, at 5:38 PM, [EMAIL PROTECTED] wrote:
Neil Mitchell writes:
I quite like the idea of permitting equations to have different
arities. It removes restrictions, makes things more regular etc.
More regular???
My goodness... Of course, it removes restrictions. But in the
history
On 13 Jan 2008, at 5:27 PM, Achim Schneider wrote:
"Neil Mitchell" <[EMAIL PROTECTED]> wrote:
Hi,
It's nice to write functions in point free style:
f = sort . nub
But sometimes I have to add an extra case, on a certain value:
f [] = [1]
f = sort . nub
But now these equations have differen
On 13 Jan 2008, at 4:56 PM, [EMAIL PROTECTED] wrote:
Jonathan Cast writes:
On 13 Jan 2008, at 4:15 PM, Achim Schneider wrote:
... never mind...
I'm glad you are capable of ever so nobly assigning the purest
imaginable motives to the designers of Haskell. You are an
inspiration
On 13 Jan 2008, at 4:15 PM, Achim Schneider wrote:
"Neil Mitchell" <[EMAIL PROTECTED]> wrote:
i.e. lift the arities to the longest argument list.
Is there a reason this isn't done?
Most likely not, there are being made up right now.
I'm glad you are capable of ever so nobly assigning the
On 12 Jan 2008, at 4:06 AM, Achim Schneider wrote:
Kalman Noel <[EMAIL PROTECTED]> wrote:
Achim Schneider wrote:
Actually, lim( 0 ) * lim( inf ) isn't anything but equals one, and
the anything is defined to one (or, rather, is _one_ anything) to be
able to use the abstraction. It's a bit like
On 12 Jan 2008, at 3:33 AM, Cristian Baboi wrote:
On Sat, 12 Jan 2008 13:23:41 +0200, Kalman Noel
<[EMAIL PROTECTED]> wrote:
Achim Schneider wrote:
Actually, lim( 0 ) * lim( inf ) isn't anything but equals one, and
the anything is defined to one (or, rather, is _one_ anything) to be
able to
On 12 Jan 2008, at 3:23 AM, Kalman Noel wrote:
Achim Schneider wrote:
Actually, lim( 0 ) * lim( inf ) isn't anything but equals one, and
the anything is defined to one (or, rather, is _one_ anything) to be
able to use the abstraction. It's a bit like the difference between
eight pens and a box
On 11 Jan 2008, at 11:25 PM, Achim Schneider wrote:
Jonathan Cast <[EMAIL PROTECTED]> wrote:
On 11 Jan 2008, at 10:12 AM, Achim Schneider wrote:
David Roundy <[EMAIL PROTECTED]> wrote:
Prelude> let x=1e-300/1e300
Prelude> x
0.0
Prelude> x/x
NaN
The "true"
On 12 Jan 2008, at 4:42 PM, Andre Nathan wrote:
On Sat, 2008-01-12 at 16:00 -0800, Jonathan Cast wrote:
Wait, the last entry? If you're just printing out the values, then
no --- those should have been garbage collected already.
Won't they be garbage collected only after the las
On 12 Jan 2008, at 10:26 AM, Andre Nathan wrote:
On Sat, 2008-01-12 at 10:11 -0800, Jonathan Cast wrote:
A nit: the list is almost certainly getting created lazily, or you'd
get more than 300% more memory usage. But you still get the list's
cons cells as your bookkeeping baggage
On 12 Jan 2008, at 3:30 PM, David Benbennick wrote:
On 1/12/08, Henning Thielemann <[EMAIL PROTECTED]> wrote:
Caching is not the default, but you can easily code this by
yourself:
Define an array and initialize it with all function values.
Because of
lazy evaluation the function values are
On 12 Jan 2008, at 10:26 AM, Andre Nathan wrote:
On Sat, 2008-01-12 at 10:11 -0800, Jonathan Cast wrote:
A nit: the list is almost certainly getting created lazily, or you'd
get more than 300% more memory usage. But you still get the list's
cons cells as your bookkeeping baggage
On 12 Jan 2008, at 3:16 PM, Hugh Perkins wrote:
On Jan 12, 2008 10:54 PM, Henning Thielemann
<[EMAIL PROTECTED]> wrote:
On Sat, 12 Jan 2008, Hugh Perkins wrote:
I guess that Haskell's referential transparence means the answers to
the isPerfectSquare will be cached, ie automatically memoized?
On 12 Jan 2008, at 7:19 AM, Andre Nathan wrote:
On Fri, 2008-01-11 at 19:14 -0800, Jonathan Cast wrote:
These are all known and expected. As I said, you can expect lazy
versions to normally be slower than explicit loops. The question is
whether 50% more time and 300% more memory has a higher
On 12 Jan 2008, at 1:45 AM, Achim Schneider wrote:
Kalman Noel <[EMAIL PROTECTED]> wrote:
Achim Schneider wrote:
whereas lim( 0 ) * lim( inf ) is anything you want
Indeed I suppose that »lim inf«, which is a notation I'm not familiar
with, is not actually defined to mean anything?
It's an
On 11 Jan 2008, at 2:24 PM, Andre Nathan wrote:
processEntry :: DirStream -> IO ()
processEntry ds = do
entry <- readDirStream ds
if entry =~ "^[0-9]+$"
then do
putStrLn entry
processEntry ds
else
if entry == "" then return () else processEntry ds
bar :: IO ()
bar
On 11 Jan 2008, at 2:20 PM, Andre Nathan wrote:
On Fri, 2008-01-11 at 13:27 -0200, Andre Nathan wrote:
I was wondering if laziness would make it run as if it was a
single O(n)
operation (get one directory entry "on demand", pass it to filter and
then to insertInTree), because only one entry i
On 11 Jan 2008, at 7:27 AM, Andre Nathan wrote:
On Thu, 2008-01-10 at 20:37 -0800, Jonathan Cast wrote:
It might be faster; laziness usually has higher constants than direct
implementations. But I doubt the difference is critical in this
case, and I would definitely time a re-writing and
On 11 Jan 2008, at 10:12 AM, Achim Schneider wrote:
David Roundy <[EMAIL PROTECTED]> wrote:
Prelude> let x=1e-300/1e300
Prelude> x
0.0
Prelude> x/x
NaN
The "true" answer here is that x/x == 1.0 (not 0 or +Infinity), but
there's no way for the computer to know this, so it's NaN.
Didn't catch
On 11 Jan 2008, at 5:13 AM, Achim Schneider wrote:
Jonathan Cast <[EMAIL PROTECTED]> wrote:
What kind of mathematics? I don't know of any mathematics where
algebraic simplifications are employed without proof of the
underlying equations (in some denotational model).
Mathematic
On 10 Jan 2008, at 7:55 AM, Achim Schneider wrote:
"Daniel Yokomizo" <[EMAIL PROTECTED]> wrote:
On Jan 10, 2008 3:36 PM, Achim Schneider <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
Niko Korhonen writes:
...
Although it could be argued that laziness is the cause of some
very obscur
On 10 Jan 2008, at 6:04 AM, Nicholls, Mark wrote:
-Original Message-
From: Bulat Ziganshin [mailto:[EMAIL PROTECTED]
Sent: 10 January 2008 13:36
To: Nicholls, Mark
Cc: Luke Palmer; haskell-cafe@haskell.org
Subject: Re[2]: [Haskell-cafe] confusion about 'instance'
Hello Mark,
Thur
On 10 Jan 2008, at 10:21 AM, Andre Nathan wrote:
Hi Jonathan
On Wed, 2008-01-09 at 21:32 -0800, Jonathan Cast wrote:
An actual coding question, abuse? We should be so lucky.
:) Your comments are much appreciated.
You're welcome.
This function is fairly complicated, simply becau
On 9 Jan 2008, at 7:57 PM, Andre Nathan wrote:
Hello
I've just found time to finish writing my first "real world"
program, so
I thought I'd post it here and ask for insight on general issues
such as
if there's anything that isn't done "the Haskell way", or if there's
something that could b
On 8 Jan 2008, at 9:01 PM, Derek Elkins wrote:
On Tue, 2008-01-08 at 21:44 -0800, Jonathan Cast wrote:
On 8 Jan 2008, at 7:56 PM, Derek Elkins wrote:
Can we stop using confusing, misleading or outright wrong
definitions
and analogies?
What, and bring CS to a halt?
CS wouldn't b
On 8 Jan 2008, at 7:56 PM, Derek Elkins wrote:
Can we stop using confusing, misleading or outright wrong definitions
and analogies?
What, and bring CS to a halt?
jcc
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailm
On 8 Jan 2008, at 3:38 PM, Achim Schneider wrote:
---$<---
or, while I'm at it
---$<---
moveBall :: State' -> State'
moveBall state = state {ballPos' = (bpx+bvx, bpy+bvy)}
where (bpx, bpy) = ballPos' state
(bvx, bvy) = ballVel' state
idle'' :: StateRef -> IdleCallback
idle'' st =
On 6 Jan 2008, at 4:00 PM, Aaron Denney wrote:
On 2008-01-06, Jonathan Cast <[EMAIL PROTECTED]> wrote:
To wit, I do not believe the term `declarative' has any single
referent, even in the sense that the term `functional' has any single
referent. I find the only similarity bet
On 6 Jan 2008, at 12:13 PM, Derek Elkins wrote:
On Sun, 2008-01-06 at 09:45 -0800, Jonathan Cast wrote:
On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote:
On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote:
Programming languages are generally classified into three groups,
imperative
On 6 Jan 2008, at 1:31 PM, [EMAIL PROTECTED] wrote:
Derek Elkins writes:
Jonathan Cast wrote:
I find the term `declarative' to be almost completely meaningless.
I was originally thinking of having the final sentence: "There are no
clear, accepted meanings for any of these terms
On 6 Jan 2008, at 12:27 PM, Dominic Steinitz wrote:
Jonathan Cast fastmail.fm> writes:
Extensionality is a key part of the definition of all of these
constructions. The categorical rules are designed to require, in
concrete categories, that the range of the two injections int
On 6 Jan 2008, at 10:34 AM, Sai Hemanth K wrote:
Hi,
I am new to functional and lazy programming languages ( that's
correct, my life has been pretty pathetic so far) and am not able
to understand GHC's behaviour for a particular function. Can
someone help me please?
I am trying to write
On 6 Jan 2008, at 5:32 AM, Yitzchak Gale wrote:
(sorry, I hit the send button)
What is the lifted version you are referring to?
Take the ordinary disjoint union, and then add a new _|_ element,
distinct from both existing copies of _|_ (which are still distinct
from each other).
Now why i
On 6 Jan 2008, at 3:55 AM, Yitzchak Gale wrote:
I wrote:
What goes wrong with finite coproducts? The obvious thing to
do would be to take the disjoint union of the sets representing the
types, identifying the copies of _|_.
Jonathan Cast wrote:
This isn't a coproduct. If we have f
On 6 Jan 2008, at 2:13 AM, Achim Schneider wrote:
Jonathan Cast <[EMAIL PROTECTED]> wrote:
On 4 Jan 2008, at 2:00 AM, Nicholls, Mark wrote:
You may be right...but learning is not an atomic thingwherever I
start I will get strange things happening.
The best place to start le
On 6 Jan 2008, at 3:02 AM, Derek Elkins wrote:
On Fri, 2007-12-28 at 17:54 -0600, Jonathan Cast wrote:
Programming languages are generally classified into three groups,
imperative, functional, and logical. The difference is in the style
of programming encouraged (or mandated, for older
On 5 Jan 2008, at 6:03 PM, Yitzchak Gale wrote:
Jonathan Cast wrote:
The normal view taken by Haskellers is that the denotations of
Haskell types are CPPOs.
So:
(1) Must be monotone
(2) Must be continuous
(Needn't be strict, even though that messes up the resulting
category substant
On 4 Jan 2008, at 2:00 AM, Nicholls, Mark wrote:
You may be right...but learning is not an atomic thingwherever I
start I will get strange things happening.
The best place to start learning Haskell is with the simplest type
features, not the most complicated. And it's the simplest featu
On 3 Jan 2008, at 3:40 AM, Jens Blanck wrote:
> The normal view taken by Haskellers is that the denotations of
> Haskell types are CPPOs.
CPPO?
> So:
>
> (1) Must be monotone
> (2) Must be continuous
Could you please define what you mean by those terms
in this context?
> (Needn't be strict,
On 3 Jan 2008, at 7:40 AM, Nicholls, Mark wrote:
I do not necessarily disagree
But if I can identify the overlapthen I have leant the
overlap...on
the cheap.
Not really. You still don't have the context which allows you to fit
the Haskell features into a complete system. Meanin
On 3 Jan 2008, at 4:49 AM, Isaac Dupree wrote:
Achim Schneider wrote:
Achim Schneider <[EMAIL PROTECTED]> wrote:
[...]
I'm trying to grok that
[] = id
++ = .
in the context of Hughes lists.
they are also known as "difference lists", and also used at type
String in the Prelude as "ShowS",
301 - 400 of 581 matches
Mail list logo