[Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Mitar
Hi! Why is 0/0 (which is NaN) 1 == False and at the same time 0/0 1 == False. This means that 0/0 == 1? No, because also 0/0 == 1 == False. I understand that proper mathematical behavior would be that as 0/0 is mathematically undefined that 0/0 cannot be even compared to 1. There is probably

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Cristian Baboi
On Thu, 10 Jan 2008 10:22:03 +0200, Mitar [EMAIL PROTECTED] wrote: Hi! Why is 0/0 (which is NaN) 1 == False and at the same time 0/0 1 == False. This means that 0/0 == 1? No, because also 0/0 == 1 == False. I understand that proper mathematical behavior would be that as 0/0 is

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Benja Fallenstein
Hi Mitar, On Jan 10, 2008 9:22 AM, Mitar [EMAIL PROTECTED] wrote: I understand that proper mathematical behavior would be that as 0/0 is mathematically undefined that 0/0 cannot be even compared to 1. My understanding is that common mathematical practice is that comparing an undefined value to

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Cristian Baboi
On Thu, 10 Jan 2008 10:48:51 +0200, Benja Fallenstein [EMAIL PROTECTED] wrote: Hi Mitar, On Jan 10, 2008 9:22 AM, Mitar [EMAIL PROTECTED] wrote: I understand that proper mathematical behavior would be that as 0/0 is mathematically undefined that 0/0 cannot be even compared to 1. My

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Cristian Baboi
On Thu, 10 Jan 2008 10:48:51 +0200, Benja Fallenstein [EMAIL PROTECTED] wrote: Hi Mitar, On Jan 10, 2008 9:22 AM, Mitar [EMAIL PROTECTED] wrote: I understand that proper mathematical behavior would be that as 0/0 is mathematically undefined that 0/0 cannot be even compared to 1. My

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Yitzchak Gale
Mitar wrote: Why is 0/0 (which is NaN) 1 == False and at the same time 0/0 1 == False. This means that 0/0 == 1? No, because also 0/0 == 1 == False. I understand that proper mathematical behavior would be that as 0/0 is mathematically undefined that 0/0 cannot be even compared to 1.

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Cristian Baboi
and there is no such thing as the same bottom right ? On Thu, 10 Jan 2008 11:13:05 +0200, Ketil Malde [EMAIL PROTECTED] wrote: Cristian Baboi [EMAIL PROTECTED] writes: I think it's a bug. Here is why: let f = (\x - x/0) in f 0 == f 0 Referential transparency say that f 0 must equal to f

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Yitzchak Gale
Cristian Baboi wrote: and there is no such thing as the same bottom right ? Yes and no. Semantically, every bottom is the same. However, the Haskell Report makes bottom an explicit exceptional case. Compilers are allowed to do whatever they want with bottoms, including different results for

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Ketil Malde
Cristian Baboi [EMAIL PROTECTED] writes: I think it's a bug. Here is why: let f = (\x - x/0) in f 0 == f 0 Referential transparency say that f 0 must equal to f 0, but in this case it is not. :-) I think you are wrong. Referential transparency says that you can replace any occurence of

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Cristian Baboi
On Thu, 10 Jan 2008 11:23:51 +0200, Yitzchak Gale [EMAIL PROTECTED] wrote: Cristian Baboi wrote: and there is no such thing as the same bottom right ? Yes and no. Semantically, Yes and No is bottom ? Information from NOD32 This message was checked by NOD32 Antivirus

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Jules Bean
Yitzchak Gale wrote: Mitar wrote: Why is 0/0 (which is NaN) 1 == False and at the same time 0/0 1 == False. This means that 0/0 == 1? No, because also 0/0 == 1 == False. I understand that proper mathematical behavior would be that as 0/0 is mathematically undefined that 0/0 cannot be even

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Yitzchak Gale
Cristian Baboi wrote: and there is no such thing as the same bottom right ? I wrote: Yes and no. Semantically, Yes and No is bottom ? Yes and no. -Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Yitzchak Gale
Cristian Baboi wrote: I think this should be put this way: Bottom is a part of the semantic domain which is not Haskell. Rather, something outside Haskell that describes what Haskell programs mean. Yes. In the semantic domain there is one bottom. In Haskell there are many expressions that

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Yitzchak Gale
I wrote: Like nearly all programming languages, Haskell implements the standard IEEE behavior for floating point numbers. That leads to some mathematical infelicities that are especially irking to us in Haskell, but the consensus was that it is best to follow the standard. Jules Bean wrote:

Re: [Haskell-cafe] viewing HS files in Firefox

2008-01-10 Thread Johan Tibell
Adding the following to my lighttpd config (on Ubuntu Feisty) solves the problem from the server side: external configuration files ## mimetype mapping # change mime type for haskell source files so they get displayed # inside the browser include_shell

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Ketil Malde
Yitzchak Gale [EMAIL PROTECTED] writes: In the semantic domain there is one bottom. In Haskell there are many expressions that represent bottom. One cannot test those for equality. If we are being pedantic, I can define data Foo = Foo instance Eq Foo where _ == _ = True

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread Henning Thielemann
On Thu, 10 Jan 2008, Ketil Malde wrote: I think you mean that they cannot be bottom if you want to compare them for equality. Yes. See above. What is the precise term for describing this? Structural equality? On the other hand, some bottoms are exceptions, you may be able to catch

Re: [Haskell-cafe] Tim Sweeney (the gamer)

2008-01-10 Thread Nick Rolfe
On 10/01/2008, Galchin Vasili [EMAIL PROTECTED] wrote: Hello, I have been reading with great interested Tim Sweeney's slides on the Next Generation Programming Language. Does anybody know his email address? Vasili is referring to these slides, which will probably interest many people on

[Haskell-cafe] Displaying steps in my interpreter

2008-01-10 Thread Victor Nazarov
Hello, I have little practice in Haskell. And I look forward for suggestions on how to improve the code. Code is not working: some definitions are missed. The goal of the code is to implement the evaluator for untyped lambda-calculus. The main problem is how to display each step of reduction?

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Nick Rolfe [EMAIL PROTECTED] wrote: http://morpheus.cs.ucdavis.edu/papers/sweeny.pdf He refers to Haskell and its strengths (and some of its weaknesses) quite a bit. For those who don't know him, Tim Sweeney is the main programmer behind Epic Games's popular Unreal Engine. When he talks,

Re: [Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Sebastian Sylvan
On Jan 10, 2008 11:51 AM, Achim Schneider [EMAIL PROTECTED] wrote: Nick Rolfe [EMAIL PROTECTED] wrote: http://morpheus.cs.ucdavis.edu/papers/sweeny.pdf He refers to Haskell and its strengths (and some of its weaknesses) quite a bit. For those who don't know him, Tim Sweeney is the

Re: [Haskell-cafe] ANNOUNCE: Haddock version 2.0.0.0

2008-01-10 Thread David Waern
2008/1/10, Alfonso Acosta [EMAIL PROTECTED]: On Jan 8, 2008 1:28 PM, David Waern [EMAIL PROTECTED] wrote: Dear Haskell community, I'm proud to announce the release of Haddock 2.0.0.0! Great! I already tested a dracs spanshot before the release and seemed to work well with TH code. Any

Re: [Haskell-cafe] viewing HS files in Firefox

2008-01-10 Thread Jules Bean
Johan Tibell wrote: Adding the following to my lighttpd config (on Ubuntu Feisty) solves the problem from the server side: external configuration files ## mimetype mapping # change mime type for haskell source files so they get displayed # inside the browser include_shell

Re: [Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Sebastian Sylvan
On Jan 10, 2008 12:41 PM, Achim Schneider [EMAIL PROTECTED] wrote: Sebastian Sylvan [EMAIL PROTECTED] wrote: For those who don't know him, Tim Sweeney is the main programmer behind Epic Games's popular Unreal Engine. When he talks, many game developers will listen. We will

[Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
Should be straight forwardsimplest example is... class A a data D = D1 instance A D fine.D is declared to be a member of type class A what about. class A a type T = (forall x.Num x=x) instance A T error!... Illegal polymorphic or qualified type: forall x. (Num x) = x

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Sebastian Sylvan [EMAIL PROTECTED] wrote: For those who don't know him, Tim Sweeney is the main programmer behind Epic Games's popular Unreal Engine. When he talks, many game developers will listen. We will dream, most likely. Perhaps more importantly, anything he does will

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Miguel Mitrofanov
class A a type T = (forall x.Num x=x) instance A T type declares a synonym, like #define in C - but working only on types. So, essentially, you wrote instance A (forall x.Num x = x) which is not very Haskelly. I am simply trying to state that all members of typeclass Num are of typeclass

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Luke Palmer
On Jan 10, 2008 1:03 PM, Nicholls, Mark [EMAIL PROTECTED] wrote: Should be straight forwardsimplest example is... class A a data D = D1 instance A D fine.D is declared to be a member of type class A what about. class A a type T = (forall x.Num x=x) instance A T

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
Thanks for your response, I think you helped me on one of my previous abberations. Hmmmthis all slightly does my head inon one hand we have typesthen type classes (which appear to be a relation defined on types)then existential types...which now appear not to be treated quite in

Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Bulat Ziganshin
Hello Mark, Thursday, January 10, 2008, 4:25:20 PM, you wrote: instance Num a = A a Mean the same thing as instance A (forall a.Num a=a) programmers going from OOP world always forget that classes in Haskell doesn't the same as classes in C++. *implementation* of this instance require to

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
class A a type T = (forall x.Num x=x) instance A T type declares a synonym, like #define in C - but working only on types. So, essentially, you wrote Yep that's fine.. instance A (forall x.Num x = x) Yep which is not very Haskelly. Hmmm... I am simply trying to

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Sebastian Sylvan [EMAIL PROTECTED] wrote: You make less bugs with that language? Fucking learn to write C++! Excuse me? A probable exclamation of a pointy-haired boss, that is. What I wanted to say is that if you tell such a guy that you'll make less bugs in language X, he would assume

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Niko Korhonen
Neil Mitchell wrote: Laziness and purity together help with equational reasoning, compiler transformations, less obscure bugs, better compositionality etc. Although it could be argued that laziness is the cause of some very obscure bugs... g Niko

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Achim Schneider [EMAIL PROTECTED] wrote: The surest thing to make people switch is to make them not aware of it, i.e. make things look exactly like in C, with incremental updates of the same variable and everything, while still retaining a purely functional semantic under the hood. I guess

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Luke Palmer
On Jan 10, 2008 1:25 PM, Nicholls, Mark [EMAIL PROTECTED] wrote: Thanks for your response, I think you helped me on one of my previous abberations. Hmmmthis all slightly does my head inon one hand we have typesthen type classes (which appear to be a relation defined on

RE: Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
-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, Thursday, January 10, 2008, 4:25:20 PM, you

Re: Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Luke Palmer
On Jan 10, 2008 2:04 PM, Nicholls, Mark [EMAIL PROTECTED] wrote: I can translate OO into mathematical logic pretty easily, I was trying to do the same thing (informally of course) with Haskellbut things are not quite what they appearnot because of some OO hang up (which I probably have

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread jerzy . karczmarczuk
Niko Korhonen writes: ... Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
Thanks for your response, I think you helped me on one of my previous abberations. Hmmmthis all slightly does my head inon one hand we have typesthen type classes (which appear to be a relation defined on types)then existential types...which now appear not to be treated

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Jules Bean
Nicholls, Mark wrote: Thanks for your response, I think you helped me on one of my previous abberations. Hmmmthis all slightly does my head inon one hand we have typesthen type classes (which appear to be a relation defined on types)then existential types...which now appear not

Re: Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Luke Palmer
On Jan 10, 2008 1:36 PM, Bulat Ziganshin [EMAIL PROTECTED] wrote: Hello Mark, Thursday, January 10, 2008, 4:25:20 PM, you wrote: instance Num a = A a Mean the same thing as instance A (forall a.Num a=a) programmers going from OOP world always forget that classes in Haskell doesn't

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Jules Bean
Nicholls, Mark wrote: My confusion is not between OO classes and Haskell classes, but exactly are the members of a Haskell type class...I'd naively believed them to be types (like it says on the packet!)...but now I'm not so sure. Which packet? Classes are not types. Classes are groups of

[Haskell-cafe] Re: [Haskell] Problems with Unicode Symbols as Infix Function Names in Propositional Calculus Haskell DSL

2008-01-10 Thread Simon Marlow
Cetin Sert wrote: I want to design a DSL in Haskell for propositional calculus. But instead of using natural language names for functions like or, and, implies etc. I want to use Unicode symbols as infix functions ¬, ˅, ˄, →, ↔ But I keep getting error messages from the GHC parser. Is there a

Re: [Haskell-cafe] viewing HS files in Firefox

2008-01-10 Thread Johan Tibell
On Jan 10, 2008 1:55 PM, Jules Bean [EMAIL PROTECTED] wrote: Johan Tibell wrote: Adding the following to my lighttpd config (on Ubuntu Feisty) solves the problem from the server side: external configuration files ## mimetype mapping # change mime type for haskell source files

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
-Original Message- From: Jules Bean [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 14:22 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] confusion about 'instance' Nicholls, Mark wrote: My confusion is not between OO classes

RE: Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
Someone said something about having 2 instances of the type in the typeclass.maybe I misinterpreted it. -Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 14:12 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re:

[Haskell-cafe] Field updates in a state monad

2008-01-10 Thread Michael Roth
Hello list, still playing with monads and states, I have the following question: Given: import Control.Monad.State.Lazy data MyData = MyData { content :: String } foobar :: State MyData String foobar = do gets content Ok, that looks nice and tidy.

Re: [Haskell-cafe] Field updates in a state monad

2008-01-10 Thread Lutz Donnerhacke
* Michael Roth wrote: Exists there a way to write this cleaner without writing countless set_xyz helper functions? The syntactic sugar for record modifications is simply that: sugar. You might write your own modifier functions: set_bla x y = x { bla = y }

[Haskell-cafe] Re: viewing HS files in Firefox

2008-01-10 Thread Stefan Monnier
My problem is when viewing plain darcs repositories (like mine on darcs.johantibell.com which I recently fixed with the above mime type hack.) Please complain to your browser('s authors): most browsers only provide *one* way to view a given mime-type, which is stupid. It's not specific to .hs

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Achim Schneider
[EMAIL PROTECTED] wrote: Niko Korhonen writes: ... Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. [1..] == [1..] , for assumed operational semantics of ones own axiomatic semantics. Bugs are only a misunderstanding

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Tillmann Rendel
Nicholls, Mark wrote: I only have 1 type. If I say my name is mark twice, it doesn't mean I belong to set of objects called Mark twice Typeclasses define not only sets of types, but a common interface for these types, too. An analogy would be to say: I have a name, and it is Marc.

[Haskell-cafe] Re: viewing HS files in Firefox

2008-01-10 Thread Achim Schneider
Stefan Monnier [EMAIL PROTECTED] wrote: My problem is when viewing plain darcs repositories (like mine on darcs.johantibell.com which I recently fixed with the above mime type hack.) Please complain to your browser('s authors): most browsers only provide *one* way to view a given

Re: [Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Daniel Yokomizo
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 obscure bugs... g Niko Example, PLEASE. [1..] == [1..] , for assumed operational

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Achim Schneider
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 obscure bugs... g Niko Example, PLEASE.

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Henning Thielemann
On Thu, 10 Jan 2008, Nicholls, Mark wrote: Existential: newtype Numeric = forall a. Num a = Numeric a My compiler doesn't like this A newtype constructor cannot have an existential context, Universal: newtype Numeric' = Numeric' (forall a. Num a = a) Not so sure I understand

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Jules Bean
Nicholls, Mark wrote: Classes are groups of types. Sets of types. Classifications of types. I had them down as an n-ary relation on typessomeone's said something somewhere that's made me question that...but I think I misinterpreted themso I may default back to n-ary relation. Yes,

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread David Roundy
On Jan 9, 2008 5:42 PM, Henning Thielemann [EMAIL PROTECTED] wrote: I just want to point out that unsafePerformIO is at the core of the (safe) bytestring library. As SPJ et al pointed out, this is crucial functionality, and is only unsafe if unsafely used. Indeed, there are hacks and they

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread Stefan Holdermans
Neil wrote: Laziness. It is very difficult to have a lazy language which is not pure. Exactly. Laziness and purity together help with equational reasoning, compiler transformations, less obscure bugs, better compositionality etc. Related, but nevertheless a shameless plug: Jurriaan Hage

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread jerzy . karczmarczuk
Achim Schneider answers my question to somebody else (Niko Korhonen): Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. [1..] == [1..] Whatever you may say more, this is neither obscure nor a bug. I still wait for a relevant

Re: [Haskell-cafe] Haskell-mode 2.4

2008-01-10 Thread Johan Tibell
First of all, thanks. My Aqua Emacs (on OS X Leopard) hangs when I send a command like C-c C-l or C-c C-t to the interpreter (I can quit the command using C-g) . Starting the interpreter and using :l from inside it works fine. This is using GHC 6.8 (and I think I also tried 6.6.) What could

Re: [Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Tillmann Rendel
[EMAIL PROTECTED] wrote: Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. Prelude sum [1..100] *** Exception: stack overflow Prelude Data.List.foldl' (+) 0 [1..100] 5050 Tillmann

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Achim Schneider
[EMAIL PROTECTED] wrote: Achim Schneider answers my question to somebody else (Niko Korhonen): Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. [1..] == [1..] Whatever you may say more, this is neither

Re: [Haskell-cafe] Comments and suggestions on code

2008-01-10 Thread Andre Nathan
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. This function is fairly complicated, simply because of the number of separate definitions involved; I would be looking for

Re: [Haskell-cafe] Field updates in a state monad

2008-01-10 Thread Chaddaï Fouché
2008/1/10, Lutz Donnerhacke [EMAIL PROTECTED]: * Michael Roth wrote: Exists there a way to write this cleaner without writing countless set_xyz helper functions? The syntactic sugar for record modifications is simply that: sugar. You might write your own modifier functions: set_bla x y

Re: [Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Don Stewart
rendel: [EMAIL PROTECTED] wrote: Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. Prelude sum [1..100] *** Exception: stack overflow Prelude Data.List.foldl' (+) 0 [1..100] 5050 See,

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread jerzy . karczmarczuk
Achim Schneider: jerzy.karczmarczuk asks what's wrong with: [1..] == [1..] Whatever you may say more, this is neither obscure nor a bug. I still wait for a relevant example. But I don't insist too much... It's not an example of a bug, but of a cause. A cause of WHAT?? This is a

Re: [Haskell-cafe] Re: ANN: A triple of new packages for talking tothe outside world

2008-01-10 Thread Don Stewart
agl: On Jan 9, 2008 5:01 PM, David Roundy [EMAIL PROTECTED] wrote: But I can't imagine an implementation in which this change wouldn't slow down getBytes for the normal case. Perhaps the slowdown would be small, but it seems unwise to enforce that slowness at the API level, when we've

Re: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Miguel Mitrofanov
If I say my name is mark twice, it doesn't mean I belong to set of objects called Mark twice Yes, but instance declaration doesn't only state that some type belongs to some class. It also provides some operations on this type. ___ Haskell-Cafe

Re: [Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Sebastian Sylvan
On Jan 10, 2008 1:49 PM, Achim Schneider [EMAIL PROTECTED] wrote: Sebastian Sylvan [EMAIL PROTECTED] wrote: You make less bugs with that language? Fucking learn to write C++! Excuse me? A probable exclamation of a pointy-haired boss, that is. What I wanted to say is that if you

[Haskell-cafe] GHC API?

2008-01-10 Thread Galchin Vasili
Hello, I am reading http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/API. Is the GHC API a means of reflection Haskell? Or to put more simply what is its intent? Thanks, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] GHC API?

2008-01-10 Thread Don Stewart
vigalchin: Hello, I am reading [1]http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/API. Is the GHC API a means of reflection Haskell? Or to put more simply what is its intent? It can be used for reflection, since it exposes the interpreter at

[Haskell-cafe] The reason why I want Tim Sweeney's email address ..

2008-01-10 Thread Galchin Vasili
Hello, http://www.coverity.com/html/library.php *Ensuring Code Quality in Multi-threaded Applications* ** *This white paper touches on Haskell's STM but also issues that Sweeney brought up in his slides(parallel programming in huge multi-cores and why the current thread-based paradigm

[Haskell-cafe] Not to load Prelude

2008-01-10 Thread Maurí­cio
Hi, Is it possible not to load Prelude module when compiling a Haskell module? Or instruct ghc to “unload” it? Thanks, Maurício ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Not to load Prelude

2008-01-10 Thread Brandon S. Allbery KF8NH
On Jan 10, 2008, at 14:22 , Maurí cio wrote: Is it possible not to load Prelude module when compiling a Haskell module? Or instruct ghc to “unload” it? -fno-implicit-prelude -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too

Re: [Haskell-cafe] Not to load Prelude

2008-01-10 Thread Ari Rahikkala
Sorry for the double message, Mauricio. It's the first time I ever posted to haskell-cafe - figures I'd click on reply and not reply to all... On Jan 10, 2008 9:22 PM, Maurí­cio [EMAIL PROTECTED] wrote: Hi, Is it possible not to load Prelude module when compiling a Haskell module? Or instruct

Re: [Haskell-cafe] Not to load Prelude

2008-01-10 Thread Clifford Beshers
Use: import Prelude () On Jan 10, 2008 11:22 AM, Maurí­cio [EMAIL PROTECTED] wrote: Hi, Is it possible not to load Prelude module when compiling a Haskell module? Or instruct ghc to unload it? Thanks, Maurício ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Not to load Prelude

2008-01-10 Thread Jeremy Shaw
At Thu, 10 Jan 2008 17:22:02 -0200, Maurí­cio wrote: Hi, Is it possible not to load Prelude module when compiling a Haskell module? Or instruct ghc to “unload” it? You can either do: import Prelude() or compile with the -fno-implicit-prelude flag, or add {-# LANGUAGE NoImplicitPrelude

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread jerzy . karczmarczuk
David Roundy writes: It's unfortunate that there's no way to include strictness behavior in function types (at least that I'm aware of), so one has to rely on possibly-undocumented (and certainly never checked by a compiler) strictness behavior of many functions in order to write truly correct

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Sebastian Sylvan [EMAIL PROTECTED] wrote: Concurrency does seem pretty disruptive. Yes, the thought of using par on a dual quad-core makes me salivate. -- (c) this sig last receiving data processing entity. Inspect headers for past copyright information. All rights reserved. Unauthorised

Re: [Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Don Stewart
barsoap: Sebastian Sylvan [EMAIL PROTECTED] wrote: Concurrency does seem pretty disruptive. Yes, the thought of using par on a dual quad-core makes me salivate. Haskell is (in a very small part) driving sales of multicore boxes -- I've met half a dozen people who nominated Haskell's

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread Henning Thielemann
On Thu, 10 Jan 2008, David Roundy wrote: On Jan 9, 2008 5:42 PM, Henning Thielemann In Modula-3 modules using hacks must be explicitly marked as UNSAFE. See http://www.cs.purdue.edu/homes/hosking/m3/reference/unsafe.html Maybe this is also an option for Haskell? I don't think this

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Don Stewart [EMAIL PROTECTED] wrote: In return, we can improve the parallelism support further. Now don't make me think of using par on a beowolf cluster of ps3's. -- (c) this sig last receiving data processing entity. Inspect headers for past copyright information. All rights reserved.

Re: [Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread David Roundy
On Thu, Jan 10, 2008 at 10:10:21AM -0800, Don Stewart wrote: rendel: [EMAIL PROTECTED] wrote: Although it could be argued that laziness is the cause of some very obscure bugs... g Niko Example, PLEASE. Prelude sum [1..100] *** Exception: stack overflow Prelude

[Haskell-cafe] Re: Why purely in haskell?

2008-01-10 Thread Achim Schneider
[EMAIL PROTECTED] wrote: Achim Schneider: jerzy.karczmarczuk asks what's wrong with: [1..] == [1..] Whatever you may say more, this is neither obscure nor a bug. I still wait for a relevant example. But I don't insist too much... It's not an example of a bug, but of a

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread Ketil Malde
David Roundy [EMAIL PROTECTED] writes: I just want to point out that unsafePerformIO is at the core of the (safe) bytestring library. As SPJ et al pointed out, this is crucial functionality, and is only unsafe if unsafely used. In Modula-3 modules using hacks must be explicitly marked as

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread Sebastian Sylvan
On Jan 10, 2008 8:06 PM, Ketil Malde [EMAIL PROTECTED] wrote: David Roundy [EMAIL PROTECTED] writes: I just want to point out that unsafePerformIO is at the core of the (safe) bytestring library. As SPJ et al pointed out, this is crucial functionality, and is only unsafe if unsafely

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread David Roundy
On Thu, Jan 10, 2008 at 08:10:57PM +, Sebastian Sylvan wrote: On Jan 10, 2008 8:06 PM, Ketil Malde [EMAIL PROTECTED] wrote: David Roundy [EMAIL PROTECTED] writes: I just want to point out that unsafePerformIO is at the core of the (safe) bytestring library. As SPJ et al pointed

Re: [Haskell-cafe] 0/0 1 == False

2008-01-10 Thread John Meacham
On Thu, Jan 10, 2008 at 11:17:18AM +0200, Yitzchak Gale wrote: The special case of 1/0 is less clear, though. One might decide that it should be an error rather than NaN, as some languages have. It is neither, 1/0 = Infinity -1/0 = -Infinity At least on IEEE style floating point systems.

Re: [Haskell-cafe] Re: viewing HS files in Firefox

2008-01-10 Thread John Meacham
On Thu, Jan 10, 2008 at 10:07:25AM -0500, Stefan Monnier wrote: My problem is when viewing plain darcs repositories (like mine on darcs.johantibell.com which I recently fixed with the above mime type hack.) Please complain to your browser('s authors): most browsers only provide *one* way

[Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread Achim Schneider
John Meacham [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 11:17:18AM +0200, Yitzchak Gale wrote: The special case of 1/0 is less clear, though. One might decide that it should be an error rather than NaN, as some languages have. It is neither, 1/0 = Infinity -1/0 = -Infinity

Re: [Haskell-cafe] Why purely in haskell?

2008-01-10 Thread Sebastian Sylvan
On Jan 10, 2008 8:12 PM, David Roundy [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 08:10:57PM +, Sebastian Sylvan wrote: On Jan 10, 2008 8:06 PM, Ketil Malde [EMAIL PROTECTED] wrote: David Roundy [EMAIL PROTECTED] writes: I just want to point out that unsafePerformIO is at

Re: [Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread David Roundy
On Thu, Jan 10, 2008 at 09:24:34PM +0100, Achim Schneider wrote: John Meacham [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 11:17:18AM +0200, Yitzchak Gale wrote: The special case of 1/0 is less clear, though. One might decide that it should be an error rather than NaN, as some

Re: [Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Ketil Malde
Sebastian Sylvan [EMAIL PROTECTED] writes: Maybe I'm just lucky, but if we are still talking about the games industry I don't think this fits my experience of bosses. Games compete very much on performance, and we basically rewrite almost all of our code over a few years or so anyway Another

[Haskell-cafe] Re: Tim Sweeney (the gamer)

2008-01-10 Thread Achim Schneider
Ketil Malde [EMAIL PROTECTED] wrote: Sebastian Sylvan [EMAIL PROTECTED] writes: Maybe I'm just lucky, but if we are still talking about the games industry I don't think this fits my experience of bosses. Games compete very much on performance, and we basically rewrite almost all of our

[Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread Achim Schneider
David Roundy [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 09:24:34PM +0100, Achim Schneider wrote: John Meacham [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 11:17:18AM +0200, Yitzchak Gale wrote: The special case of 1/0 is less clear, though. One might decide that it should

Re: [Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread David Roundy
On Thu, Jan 10, 2008 at 09:41:53PM +0100, Achim Schneider wrote: David Roundy [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 09:24:34PM +0100, Achim Schneider wrote: John Meacham [EMAIL PROTECTED] wrote: 1/0 = Infinity -1/0 = -Infinity Just out of curiosity: 1/-0 =

[Haskell-cafe] Re: 0/0 1 == False

2008-01-10 Thread Achim Schneider
David Roundy [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 09:41:53PM +0100, Achim Schneider wrote: David Roundy [EMAIL PROTECTED] wrote: On Thu, Jan 10, 2008 at 09:24:34PM +0100, Achim Schneider wrote: John Meacham [EMAIL PROTECTED] wrote: 1/0 = Infinity -1/0 = -Infinity

Re: [Haskell-cafe] Re: Difference lists and ShowS

2008-01-10 Thread Henning Thielemann
On Wed, 9 Jan 2008, apfelmus wrote: So, difference lists are no eierlegende wollmilchsau either. LEO's forum suggests 'swiss army knife' as translation. :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: Difference lists and ShowS

2008-01-10 Thread Achim Schneider
Henning Thielemann [EMAIL PROTECTED] wrote: On Wed, 9 Jan 2008, apfelmus wrote: So, difference lists are no eierlegende wollmilchsau either. LEO's forum suggests 'swiss army knife' as translation. :-) But you really need one with 5 differently-sized blades plus three spezialized

[Haskell-cafe] Re: Difference lists and ShowS

2008-01-10 Thread apfelmus
Achim Schneider wrote: Henning Thielemann wrote: apfelmus wrote: So, difference lists are no eierlegende wollmilchsau either. LEO's forum suggests 'swiss army knife' as translation. :-) But you really need one with 5 differently-sized blades plus three spezialized carving blades, an USB

  1   2   >