Re: [Haskell-cafe] Dread __DISCARD__

2005-09-17 Thread Kenneth Hoste

Steven Elkins wrote:


Hello everyone,

I'm a Haskell newbie trying out various programs from the web.  I'm
trying to compile one called bjpop-ray (from Bernie Pope, I think) and
I hit this at link-time:


 

Can you tell us where you got bjpop-ray ? I wrote my own raytracer in 
Haskell, and would like to check this one out too...


K.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Eq Type Class: Overloading (==)

2005-09-17 Thread Bulat Ziganshin
Hello Jason,

Saturday, September 17, 2005, 10:14:14 AM, you wrote:

JD> class?  I also wish that "if" were a function, but that's probably
JD> just the lisper in me speaking.  Something like:

>if :: Bool b =>> b -> a -> a-> a

no problem!

iif :: Bool -> a -> a -> a

iif a b c  =  if a then b else c

anyway, Haskell use lazy evaluation ;)
really, i developed a lot of control structures for I/O monad


about making Bool a class - it is the same issue as making
head/map/... belonging to some Collection class. we need to change
standard Prelude or add to Haskell "supertyping" mechanism, proposed
by John Meacham, as i remember


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use Haskell to extract GXL representation

2005-09-17 Thread Bulat Ziganshin
Hello Sara,

Saturday, September 17, 2005, 5:11:23 AM, you wrote:

SK> 1) In my work, I use GXL representation to represent a quantification
SK> (e.g. forall(x:Z|x = 3 and x^2 - 3x + 2 =0))

SK> 2) My objective is to write a Haskell module to extract the content of
SK> the GXL file such that a prover theorem (e.g, ICS) and a computer
SK> algebra system (e.g, Matlab) can read the content of GXL file.

SK> If any of you have experiences or any ideas about the problem, please
SK> share with me.

you may use Parsec module to create parser: 
http://www.cs.uu.nl/people/daan/download/parsec/parsec.html



-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Newbie syntax question

2005-09-17 Thread Bulat Ziganshin
Hello André,

Friday, September 16, 2005, 10:55:16 PM, you wrote:

AVAdC> map (foo 5) my_list_of_lists_of_doubles

AVAdC> But how to do that (if possible) when I invert the parameters list ?!

third, most iniversal solution is to create anonymous lambda function:

map (\x->foo x 5) my_list_of_lists_of_doubles

of course, it is not needed for such trivial example, really i also
prefer `foo` for this case



-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] a new Monad

2005-09-17 Thread Bulat Ziganshin
Hello Malcolm,

Friday, September 16, 2005, 11:32:02 PM, you wrote:

MW> What a strange choice of name for a language...!  :-)

really, a word Monad derived by mathemathics from philosophy and
esoteric


-- 
Best regards,
 Bulatmailto:[EMAIL PROTECTED]



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Dread __DISCARD__

2005-09-17 Thread Steven Elkins
On 9/17/05, Kenneth Hoste <[EMAIL PROTECTED]> wrote:

> Can you tell us where you got bjpop-ray ? I wrote my own raytracer in
> Haskell, and would like to check this one out too...

http://www.cs.mu.oz.au/~bjpop/code.html

Please let me know whether you run into __DISCARD__.

Thanks,
Steve
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell] Re: [Haskell-cafe] Haskell versus Lisp

2005-09-17 Thread Tomasz Zielonka
On Fri, Sep 16, 2005 at 06:56:10PM -0400, David F. Place wrote:
> 
> On Sep 16, 2005, at 6:26 PM, Glynn Clements wrote:
> 
> >Haskell's safety and consistency can get in the way, while Lisp's
> >freedom can be quite unsafe and inconsistent.
> 
> and lazy evaluation eliminates 99% of the need for macros in lisp.

I wrote:
> supposedly unavailable in other languages. Surprisingly, most of these
> things were equally easy to do with higher-order functions and
> closures in Haskell.

... and laziness of course, and some other features too.

Did I say "equally easy"? It is often easier. Creating your own control
structures in Haskell is a pure pleasure.

Best regards
Tomasz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Nofib documentation

2005-09-17 Thread Monique Louise
Hi all.

   does anyone know where can I find a better documentation
for Nofib benchmark?  Is there any reference which contains the
"standard" and "slow" inputs? In the CVS tree I just found the
standard/slow/fast outputs.

Thanks in advance,-- Monique Louise B.MonteiroMsc Student in Computer ScienceCenter of InformaticsFederal University of Pernambuco
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Dread __DISCARD__

2005-09-17 Thread Wolfgang Thaller

I'm on Mac OS 10.4.2, using ghc 6.4 (from the haskell.org .dmg) and
gcc 4.0.0.  Other wxHaskell programs (the samples and my own
experiments) compile without tripping over this.


GHC 6.4 is incompatible with gcc 4.0.0 when -O or -via-C is used.
You can work around this problem by either not using -via-C and  
always adding -fasm *after* -O, or by setting your default compiler  
to gcc-3.3 using

sudo gcc_select 3.3
... but be aware that this also affects other C compilations; switch  
back using

sudo gcc_select 4.0

I suspect that you compiled the program with -O before, and then  
switched to -O0 without removing your .o files. If you compiled  
wxHaskell yourself, then the problem might also be in wxHaskell  
(you'd have to recompile it then).


The upcoming GHC 6.4.1 will of course fix this problem.

Cheers,

Wolfgang
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] a new Monad

2005-09-17 Thread Cale Gibbard
On 17/09/05, Bulat Ziganshin <[EMAIL PROTECTED]> wrote:
> Hello Malcolm,
> 
> Friday, September 16, 2005, 11:32:02 PM, you wrote:
> 
> MW> What a strange choice of name for a language...!  :-)
> 
> really, a word Monad derived by mathemathics from philosophy and
> esoteric
> 
> 
> --
> Best regards,
>  Bulatmailto:[EMAIL PROTECTED]

Recent mathematics apparently didn't take it from philosophy, that was
supposedly more of a coincidence. Before the term was adopted, the
triples  were variously referred to as "dual standard
construction", "triple", "monoid", and "triad". The frequent use of
the term "triple" was getting confusing for somewhat obvious reasons,
so a portmanteau of "monoid" and "triad" was formed to get "monad".
The philosophical use derives more directly from the greek word
"monas" (unity), and is much older, having been found in Hellenistic
Greek sources in reference to the doctrine of Pythagoras and other
ancient philosophers.

  - Cale
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Dread __DISCARD__

2005-09-17 Thread Steven Elkins
On 9/17/05, Wolfgang Thaller <[EMAIL PROTECTED]> wrote:

> I suspect that you compiled the program with -O before, and then
> switched to -O0 without removing your .o files. 

Silly me!  Of course you're exactly right.  After removing the .o
files it worked.  The only thing I don't understand is why I haven't
needed -O0 elsewhere.

> The upcoming GHC 6.4.1 will of course fix this problem.

I can live with the current situation but I'm glad to hear the
problem's going away.

Thanks,
Steve
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Eq Type Class: Overloading (==)

2005-09-17 Thread David Menendez
Jason Dagit writes:

> This reminds me that several times now I've wished that Bool was some  
> sort of interface instead of a type.  Perhaps Bool could be a type  
> class?  I also wish that "if" were a function, but that's probably  
> just the lisper in me speaking.  Something like:

John Meacham has a library that implements a BooleanAlgebra type class.


-- 
David Menendez <[EMAIL PROTECTED]> | "In this house, we obey the laws
  |of thermodynamics!"
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] Eq Type Class: Overloading (==)

2005-09-17 Thread Jason Dagit


On Sep 17, 2005, at 1:43 AM, Bulat Ziganshin wrote:


about making Bool a class - it is the same issue as making
head/map/... belonging to some Collection class. we need to change
standard Prelude or add to Haskell "supertyping" mechanism, proposed
by John Meacham, as i remember


A link to supertyping can be found here:
http://repetae.net/john/recent/out/supertyping.html

After reading that, I wonder why it's not implemented.  It seems like  
a wonderfully useful idea.  I view it as a way to add things back to  
the language which should have been there to begin with, but which  
the language designers left out for various reasons (such as lack of  
time, interest or possibly even oversight).


Thanks,
Jason
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: Re[2]: Eq Type Class: Overloading (==)

2005-09-17 Thread Aaron Denney
On 2005-09-17, Jason Dagit <[EMAIL PROTECTED]> wrote:
>
> On Sep 17, 2005, at 1:43 AM, Bulat Ziganshin wrote:
>>
>> about making Bool a class - it is the same issue as making
>> head/map/... belonging to some Collection class. we need to change
>> standard Prelude or add to Haskell "supertyping" mechanism, proposed
>> by John Meacham, as i remember
>
> A link to supertyping can be found here:
> http://repetae.net/john/recent/out/supertyping.html
>
> After reading that, I wonder why it's not implemented.

Not enough people calling for it.

> It seems like a wonderfully useful idea.

It is.  It would be terribly useful for those trying to prototype a
new Prelude, and clean up the mathematical structures.

-- 
Aaron Denney
-><-

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Network parsing and parsec

2005-09-17 Thread Scott Turner
On 2005 September 15 Thursday 12:09, John Goerzen wrote:
> However, the difficulty I come up time and again is: parsec normally
> expects to parse as much as possible at once.
>
> With networking, you must be careful not to attempt to read more data
> than the server hands back, or else you'll block.
>
> I've had some success with hGetContents on a socket and feeding it into
> extremely carefully-crafted parsers, but that is error-prone and ugly.
>
> Here's the problem.  With a protocol such as IMAP, there is no way to
> know until a server response is being parsed, how many lines (or bytes)
> of data to read.  Ideally, I would be able to slrup in more data as I
> go, but that doesn't seem to be very practical in Parsec either.

Assuming I've understood the gist of Koen Claessen's "Parallel Parsing 
Processes", its implementation of the Parsec interface returns all possible 
parses, in the order of how much input they consume. Also, no more input is 
consumed than necessary.  For the purpose of parsing network input, that's 
superior to the usual order in which parse alternatives are considered. The 
Parsec interface supports lookahead, which implies examining beyond what is 
consumed. That could be error-prone, but I expect lookahead is considerably 
easier to manage than Parsec's order of considering alternatives.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] a new Monad

2005-09-17 Thread Albert Lai
Malcolm Wallace <[EMAIL PROTECTED]> writes:

> Microsoft has announced the following:
> 
> Developers can also expect a new scripting language for management
> applications, called Monad.

If we embedded the Monad language, as a DSL, into Haskell using a
Haskell monad, would we get to call it the Monad monad? :)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe