Re: [Haskell-cafe] Errors in non-monadic code

2013-08-19 Thread Jerzy Karczmarczuk
e more economic to "jump". This is as simple as that. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Errors in non-monadic code

2013-08-19 Thread Jerzy Karczmarczuk
ome dozen smileys... More seriously, some people like exquisite continuations and will use them. Instead of fighting against exceptions it might be more fruitful to make them more robust, powerful, parametrable and sexy. Jerzy Karczmarczuk ___

Re: [Haskell-cafe] Some philosophy

2013-08-10 Thread Jerzy Karczmarczuk
Kim-Ee Yeoh comments my reading suggestion: "Indiscrete Thoughts" by Gian-Carlo Rota, published by Birkhäuser in 1997. Available on the Web. [I forgot where] I'm rather fond of Rota's two volumes of musings. For the purpose of furthering the quality of philosophizing, would it not be

[Haskell-cafe] Some philosophy (Was: Alternative name for return)

2013-08-09 Thread Jerzy Karczmarczuk
d find them interesting. And you will find inside that for Rota the term "should" is very important, even if it impossible to define...) Many thanks to Olivier Danvy, who recommended me this book! Jerzy Karczmarczuk Caen, France. ___

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Jerzy Karczmarczuk
I am sorry for having mixed-up arguments (but who throws the first stone?...) Jerzy seemed to suggest that the "impurity" of IO was somehow related to it not supporting very many operations. No, not really. I added First, it is not true that you can do with, say, (printStr "Ho!" ) whatever

[Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Jerzy Karczmarczuk
reasonable sense. Would you add to all this: getLine == getLine etc.? Good luck! I suspect that you would have to establish also the equality relation between functions and between infinite streams. And you would end as Giordano Bruno and Jeanne d'Arc. But for diffe

Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Jerzy Karczmarczuk
...). The "running" or "execution" takes place outside of your program. In such a way Richard O'Keefe and I converge... That's why I say that the concept of purity is meaningless in the discussed context. It is a kind of counterfeit notion,

Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Jerzy Karczmarczuk
for me the "purity" (while teaching I try to avoid this word) means simply that whatever you do with the object, it won't fire a "magic" process. As Richard, I do not claim that this is "right", but it surely facilitated my teach

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Jerzy Karczmarczuk
some layers UNDER the one YOU control) are impure, since there is no operational definition of purity for them. "No side effects"? Sure, if you don't do anything with it. Even the most horrible Devil is pure. Unless you call it... Jerzy Karczmarczuk _

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Jerzy Karczmarczuk
Le 06/08/2013 11:01, J. Stutterheim a écrit : ... So in reply to Jerzy, I do want to encourage the discussion in the "Noble Domain of Philosophy" and I also want to repeat that I am not proposing to change Haskell or Haskell libraries Jurriën, I taught Haskell for several years. I saw the dis

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Jerzy Karczmarczuk
ith all my respect, I see that Haskell reached finally the Noble Domain of Philosophy. I mean, instead of discussing concepts, people begin to discuss names. And since for some, even IO () is a "pure" value, I suspect that the next round will rekindle the discussion on

Re: [Haskell-cafe] Probabilistic functional programming with Baysig/BayesHive

2013-07-09 Thread Jerzy Karczmarczuk
Le 09/07/2013 13:53, Tom Nielsen a écrit : Almost everything else -- optimal decisions, categorisation, (...) -- becomes trivial. Optimal decisions "trivial"? Interesting... And not so frequent... Jerzy Karczmarczuk ___ Haskell-Cafe ma

Re: [Haskell-cafe] (no subject)

2013-06-10 Thread Jerzy Karczmarczuk
e, and the rest of the community, that Haskell will always spiritually remain the same clean, consistent programming language as it is now! Yes. Dear Mom, dear Dad! Promise me that you will never die... I wish that for all of you. Jerzy Ka

Re: [Haskell-cafe] list comprehension doesn't work

2013-05-14 Thread Jerzy Karczmarczuk
obscure, even if one "almost-syntax" error was clear... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Looking for portable Haskell or Haskell like language

2013-04-27 Thread Jerzy Karczmarczuk
n. Perhaps it might help to know what do you need it for... The best Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Yampa integral function

2013-04-16 Thread Jerzy Karczmarczuk
Le 17/04/2013 01:48, Jerzy Karczmarczuk a écrit : With constant acceleration v=v0+a*Dt => 1.01, not 1.05 Gosh, trivial errors seem to be contagious. Of course I meant 1.1, not 1.01. Sorry. JK ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

Re: [Haskell-cafe] Yampa integral function

2013-04-16 Thread Jerzy Karczmarczuk
ysics is simply wrong. == In general, even correcting all, you might have reasonable results in some trivial cases, but in general the extrapolating Euler schema is unstable, produces growing errors (e. g. in the oscillating case). Jerzy Karc

Re: [Haskell-cafe] NaN as Integer value

2013-04-13 Thread Jerzy Karczmarczuk
f the representation. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] education or experience?

2012-12-08 Thread Jerzy Karczmarczuk
ans more learning ab ovo, the loss of time might be considerable. Roman: - Christopher Howard seems to be very far from publishing papers; he asks us whether he should complete his B.S. In this context, recommending Open Source seems a bit p

[Haskell-cafe] Iterations (Was: Re: Darcs fetches too little files)

2012-08-29 Thread Jerzy Karczmarczuk
Le 29/08/2012 23:55, Henk-Jan van Tuyl a écrit : In conclusion: repeating the same thing could give different results. Certainly! My favourite example is : sex. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] How to select n random words from a file ...

2012-06-11 Thread Jerzy Karczmarczuk
use a different random generation protocol, or whatever. I believe that this solution is known for years... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Can Haskell outperform C++?

2012-05-06 Thread Jerzy Karczmarczuk
ving replaced the recursion by explicit stacks + loops. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] adding the elements of two lists

2012-03-26 Thread Jerzy Karczmarczuk
Le 26/03/2012 16:31, Chris Smith a écrit : If you were asking about why there is no ring on [a] that defines (+) = zipWith (+), then here's why. By that definition, you have [1,2,3] + [4,5] = [5,7]. But also [1,2,42] + [4,5] = [5,7]. Addition by [4,5] is not one-to-one, so [4,5] cannot be inve

Re: [Haskell-cafe] adding the elements of two lists

2012-03-26 Thread Jerzy Karczmarczuk
Le 26/03/2012 02:41, Chris Smith a écrit : Of course there are rings for which it's possible to represent the elements as lists. Nevertheless, there is definitely not one that defines (+) = zipWith (+), as did the one I was responding to. What? The additive structure does not define a ring. Th

Re: [Haskell-cafe] adding the elements of two lists

2012-03-25 Thread Jerzy Karczmarczuk
than lists, is a question of style. The fact that - as you say - "there's no good way to write an instance that obeys the laws" won't disturb my sleep. You know, there is no good way to organise a society where everybody obeys the Law. This is no argument against the organis

Re: [Haskell-cafe] adding the elements of two lists

2012-03-25 Thread Jerzy Karczmarczuk
:set -XFlexibleInstances . (Then you might have some other "small" problems, but nobody is perfect). Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-20 Thread Jerzy Karczmarczuk
l class with division), and that's it. You cannot compute the exponential [using the standard name] of a power series, unless you declare this series, which may be a list of rational coefficients, a "Floating". Thank you. Jerzy Karczmarczuk _

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Jerzy Karczmarczuk
WHICH *GOOD* REASONS?? Thank you. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-17 Thread Jerzy Karczmarczuk
n Haskell, disguised as a do block. There are two "distinct" file objects, the "previous", and the "next" one, which happen to share the same name, because *the type system* prevents that a computing block refers to both. Either the old, or the new. This is my phil

Re: [Haskell-cafe] Theoretical question: are side effects necessary?

2012-03-16 Thread Jerzy Karczmarczuk
transparency, or does it? Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] If you'd design a Haskell-like language, what would you do different?

2012-03-09 Thread Jerzy Karczmarczuk
in to 2-nd year students what does it mean: a value which doesn't have a value... Thank you. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Mersenne-random and standard random API

2012-02-09 Thread Jerzy Karczmarczuk
Aleksey Khudyakov: On 09.02.2012 15:32, Jerzy Karczmarczuk wrote: 1. Mersenne Twister, AND congruential generators AND the Marsaglia stuff, all use some kind of "seed", all are stateful. There are no miracles. Just look the agressive monadization, the form of defaultSeed, etc. wit

Re: [Haskell-cafe] Mersenne-random and standard random API

2012-02-09 Thread Jerzy Karczmarczuk
o all people who made those generators however imperfect they are. Only Mister Nobody is perfect. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] On the purity of Haskell

2012-01-02 Thread Jerzy Karczmarczuk
Conal Elliott cites Steve Horne: I look at this World parameter as purely hypothetical, a trick used to gain an intuition. Whereas Jerzy (I think) uses it to claim Haskell is referentially transparent - those differing x and y values come from different worlds, or different world

Re: [Haskell-cafe] On the purity of Haskell

2012-01-01 Thread Jerzy Karczmarczuk
. Sorry, what are you trying to suggest? You show two OBVIOUSLY different pieces of code, and you say that they are different. If, by chance, some newbie reads that and gets the impression that (<-) is something equivalent to (=), you are serving the devil. J

Re: [Haskell-cafe] Are all monads functions?

2011-12-31 Thread Jerzy Karczmarczuk
Yves Parès : all standard Monads are newtypes wrapping functions What about Maybe and [] ? Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] (...) Random generators

2011-12-30 Thread Jerzy Karczmarczuk
Bardur Arantsson: Random streams are not referentially transparent, though, AFAICT...? Either way this thread has gone on long enough, let's not prolong it needlessly with this side discussion. Sure. But the discussion on randomness is /per se/ interesting, especially in a functional settin

Re: [Haskell-cafe] On the purity of Haskell

2011-12-29 Thread Jerzy Karczmarczuk
ither way, at run-time, Haskell is impure. Most people here, some VERY knowledgeable, do not agree with you. /Errare humanum est, perseverare diabolicum/. Either way, since you insist to prove that you DON'T WANT to understand other people view, I wish you good luck. Jerzy Ka

Re: [Haskell-cafe] On the purity of Haskell /Random generators

2011-12-29 Thread Jerzy Karczmarczuk
Steve Horne : Some code (intended to be loaded into GHCi and played with) -- import System.Random -- randSelect "this is a list" 5 (mkStdGen 9877087) -- ... module P23 (randSelect) where -- ... randSelect' (x:xs) n l g = let xsLen = (l - 1)

Re: [Haskell-cafe] On the purity of Haskell /Random generators

2011-12-29 Thread Jerzy Karczmarczuk
Steve Horne : I only meant that there's random number handling support in the Haskell library and, and least judging by type signatures, it's pure functional code with no hint of the IO monad. Look well at those functions, please. Within the RandomGen class you have pure members, such as next

[Haskell-cafe] On the purity of Haskell /Random generators

2011-12-29 Thread Jerzy Karczmarczuk
The story begins here: Steve Horne: /BTW - why use an IO action for random number generation? There's a perfectly good pure generator. It's probably handy to treat it monadically to sequence the generator state/seed/whatever but random number generation can be completely pure. / ===

Re: [Haskell-cafe] On the purity of Haskell

2011-12-29 Thread Jerzy Karczmarczuk
Le 29/12/2011 18:01, Iustin Pop a écrit : I'm confused as what you mean. And to clarify better my original email: yes, (bar x) always gives you back the same IO action; but the results of said IO action are/can be different when executed. The whole of my point is that it DOESN'T MATTER. (And I b

Re: [Haskell-cafe] On the purity of Haskell

2011-12-29 Thread Jerzy Karczmarczuk
tion. Then, the discussion might be more fruitful Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] On the purity of Haskell

2011-12-29 Thread Jerzy Karczmarczuk
ution operator transformed both of you, YOU and the particle into a new instance of this sector. OK, I stop here, otherwise the digestion of your sandwiches may produce some side effects. Jerzy Karczmarczuk Caen, France. (William the Conqueror was here. Produced one nice side-effect.)

Re: [Haskell-cafe] On the purity of Haskell

2011-12-28 Thread Jerzy Karczmarczuk
u disagree, show them. I don't think that speaking about "compile-time purity" is correct. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell Platform

2011-11-24 Thread Jerzy Karczmarczuk
Dear Gurus, A. Why the Haskell Platform is still based on ghc 7.03? (At least on WinXP) B. Does anybody care about wxHaskell? Thanks. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Decision procedure for foldr/foldl/foldl'?

2011-11-22 Thread Jerzy Karczmarczuk
sly choose those who will implement them. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Decision procedure for foldr/foldl/foldl'?

2011-11-21 Thread Jerzy Karczmarczuk
of why each one behaves the way it does" of David Fox, I compare it with a question of a young army officer, addressed to his elders: "Tell me how to win the war in the quickest way possible, rather than boring me with the explanations behind all those complicated strategies&

Re: [Haskell-cafe] Tutorial/slides on pretty-printing combinators?

2011-11-16 Thread Jerzy Karczmarczuk
nual-ocaml/manual003.html#toc11 OK, these are not slides... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A Mascot

2011-11-16 Thread Jerzy Karczmarczuk
what is strictly forbidden, is lazily allowed. Best regards Jerzy Karczmarczuk Caen, France. (25 km from the Oldest Comic Strip in the World, 1000 years and progressing) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] German names for kinds and sorts

2011-11-13 Thread Jerzy Karczmarczuk
cannot be really sorted. Especially with "sortir" in French. BTW, "to sort" in English is "trier" in French; "tri", "trie", "tree". Try everything... == When some years ago we asked our students to write some reports in English, I t

Re: [Haskell-cafe] The best way to call Java from Haskell?

2011-10-11 Thread Jerzy Karczmarczuk
o there is no problem in "handling" those infinite modules. It will just take you an anfinite amount of time before you get any money from such a work. But this is a general problem elsewhere as well. Jerzy Karczmarczuk ___ Haskell-Cafe ma

Re: [Haskell-cafe] Off-topic: Mathematics

2011-08-30 Thread Jerzy Karczmarczuk
Peter Simons : Now, a person who has profound knowledge of the subject you're asking about is not very likely to do this, because he is probably not going to learn anything in the process. Dedicating time and effort to studying your particular problem is not an appealing prospect. You might be r

[Haskell-cafe] Off-topic: Mathematics and modesty

2011-08-30 Thread Jerzy Karczmarczuk
t you don't need the details). Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Truly Really Off-topic: (Was: Mathematics)

2011-08-29 Thread Jerzy Karczmarczuk
a fool, I didn't look at the stars... (Well, actually I was a fool, but it is a long story). Jerzy Karczmarczuk Caen, France ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] partial inheritance

2011-07-18 Thread Jerzy Karczmarczuk
may manifest itself when you specify the *instances*. That's why I suggested how you might do that: for some datatypes, say the Emperors, you specify some special flying method (e.g. dummy or bombing), or you don't specify it at al

Re: [Haskell-cafe] partial inheritance

2011-07-17 Thread Jerzy Karczmarczuk
really don't need it... When instancing your Bird class you may "forget" to define the flying methods. Is this unsuitable for you? The compiler will yell, but this is harmless. Jerzy Karczmarczuk PS. Penguins DO fly. http://www.telegraph.co.uk/news/worldnews/1583517/Flying-

Re: [Haskell-cafe] Input and output of mathematical expressions

2011-06-13 Thread Jerzy Karczmarczuk
by Planet Math, integrated into Drupal, etc. I confess I tried to write something which displayed math fromHaskell, I gave even a project of that kind to my student. But the solutions exist already and are known, so... See e.g. http://www.twingly.com/haskell/stories/4013ffd773e942fdb4b9cf2cb

Re: [Haskell-cafe] Lazy lists vs generators

2011-06-11 Thread Jerzy Karczmarczuk
quot; in Python. This is not just a non-deterministic return mechanism, but an expression, which yields a value also for the generator code. It becomes thus a reentrant co-procedure, which goes quite a mileage beyond the lazy list model. Jerzy Karczmarczuk _

Re: [Haskell-cafe] Haskell School of Expression (graphics)

2011-05-30 Thread Jerzy Karczmarczuk
engine. Perhaps, if we had before a semester of OpenGL, and at least two months of a true course/tutorial (not your pseudo-tutorial on the Web...) we could be more productive. That's it... I don't want to generalize, but there is a huge work to do

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-27 Thread Jerzy Karczmarczuk
itely progressing, such as the standard definition of the stream of integers, used to scare the beginners... ints = 1 : zipWith (+) (fix (1:)) ints where fix f = f (fix f) Thanks. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@ha

Re: [Haskell-cafe] Python is lazier than Haskell

2011-04-27 Thread Jerzy Karczmarczuk
laziness?... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] philosophy of Haskell

2010-08-08 Thread jerzy . karczmarczuk
l tricks. Yep. But, BTW, could you tell me what was the result of the final desugarization and the BASIC sense of the IO monad for you? Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: US Patent for the idea ...

2010-04-16 Thread jerzy . karczmarczuk
countries...) Somebody finally decided to ridiculise the system. If you want a good laugh, see the patent 6,368,227. The search site is here: http://patft.uspto.gov/netahtml/PTO/srchnum.htm Best regards. Jerzy Karczmarczuk PS. concerning the patent 7120900. The authors appropria

[Haskell-cafe] What is a number. (Was: Num instances for 2-dimensional types)

2009-10-05 Thread jerzy . karczmarczuk
NOW for its evolution have other priorities. But the story has at least 15 years. Jeroen Fokker did something then, I worked on it at the same period. Now Jacques Carette has his own system, and Sergey Mechveliani another one... But other people don't care, s

Re: [Haskell-cafe] Num instances for 2-dimensional types

2009-10-05 Thread jerzy . karczmarczuk
no addition or (*)seem natural. Or the other way round ; apparently Sönke Hahn is in that situation, so he fakes... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Convert IO Int to Int

2009-06-09 Thread jerzy . karczmarczuk
ansform ANY parameter into something unrecognizable). When he says : "I know all that", THEN hurt him badly with monads. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Time for a new logo?

2008-12-17 Thread jerzy . karczmarczuk
ve they spent teaching parallel programming? I suggest that you say goodmorning to Google. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] sound synthesis

2008-05-02 Thread jerzy . karczmarczuk
o do it dynamically, then, either you know how to interrupt *any* infinite process within Haskell, or you have to learn how to do it... Here people more competent than myself will surely help you. Good luck, and thanks for your interest in a this fabulous fie

Re: [Haskell-cafe] approximating pi

2008-04-28 Thread jerzy . karczmarczuk
hrough the truncation of real randoms? Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] approximating pi

2008-04-27 Thread jerzy . karczmarczuk
So, why not use 'randoms' to generate an infinite list of them, 'take' some N, and then 'sum' 1 on randoms filtered by the circle condition. I think that you won't need full 10 lines of code... Jerzy Karczmarczuk ___

[Haskell-cafe] Re: Function Precedence

2008-04-03 Thread jerzy . karczmarczuk
thematical subsumptions, e.g., that the ring of integers modulo N becomes a field if N is prime. Or, that every additive group is a module over integers. But it seems that we are very far from such a dream. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Function Precedence

2008-04-02 Thread jerzy . karczmarczuk
er to write a new Prelude. :-) Oh, yes, our common dream... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Function Precedence

2008-04-02 Thread jerzy . karczmarczuk
Hans Aberg writes: ... But one should also be able to write (f+g)(x). - This does not work in Haskell, because Num requires an instance of Eq and Show. So, declare them, even if they are vacuous. I did it several times, I am still alive, so no need to say "this does not work"

Re: [Haskell-cafe] function type def

2008-04-01 Thread jerzy . karczmarczuk
pe t, it is g(g x), not (t->t), it is as simple as that. Perhaps you didn't recognize that "->" is syntactically a right-associative op, so a->b->c is equivalent to a->(b->c), or (t->t)->t->t equiv. to (t->t)->(t->t) Jerzy Karczmarczuk

Re: [Haskell-cafe] Function Precedence

2008-04-01 Thread jerzy . karczmarczuk
ement that f g x fails. It doesn't, in normal order everything should go smoothly, f g 5 returns 5 = (f g) 5 = g 5, unless I am terribly mistaken... Where did you see an error? Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskel

Re: [Haskell-cafe] Wumpus World

2008-03-28 Thread jerzy . karczmarczuk
://www.thefreecountry.com/compilers/prolog.shtml You will find there the GNU-Prolog, whose licensing should be as you wish. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] "Computational Category Theory" in Haskell

2008-02-25 Thread jerzy . karczmarczuk
ctor Classes" by Luc Duponcheel, and Erik Meijer. Available through citeseer. This has been written under Gofer, should thus work for Hugs, and no reason why not under GHC. Very nice paper. (Of course, Rydeheard and Burstall is their first reference

Re: [Haskell-cafe] Repeated function application

2008-02-21 Thread jerzy . karczmarczuk
ng against (apart an auxiliary list, and "x" not curried away) times n f x = (iterate f x)!!n Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Doubting Haskell

2008-02-17 Thread jerzy . karczmarczuk
re or less the same as between "Immediate failure" and "Delayed failure". Choose yourselves which is which. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: A question about "monad laws"

2008-02-14 Thread jerzy . karczmarczuk
s represented. If the numbers are normalized, as they should, plenty of low-level iterative algorithms may use the equality - after some operation - to check that the machine- precision convergence has been obtained. On the contrary, the verification that the absolute value between two ter

[Haskell-cafe] Re: A question about "monad laws"

2008-02-13 Thread jerzy . karczmarczuk
such packages in the numerical domain, typically don't believe that FP gives anything interesting. At least, this is the opinion of physicists I spoke to recently. Never mind. We shall dance over their cadavers, unless they dance over ours. In both cases we shall be happy. Jerzy Karczmarczuk

[Haskell-cafe] Re: A question about "monad laws"

2008-02-12 Thread jerzy . karczmarczuk
Yitzchak Gale writes: Jerzy Karczmarczuk wrote: Would you say that *no* typical floating-point software is reliable? It depends on how you define "reliable". Floating point intentionally trades accuracy for speed, ... It used to be true - and may still be - that the eng

[Haskell-cafe] Re: A question about "monad laws"

2008-02-11 Thread jerzy . karczmarczuk
ng it different ways will give you different answers. This is *not* a good way to write reliable software. [Then we see the scalar product whose value *may* depend on the ev. order] I wonder... Would you say that *no* typical floating-point software is reliable? Jerzy Karczma

Re: [Haskell-cafe] A question about "monad laws"

2008-02-11 Thread jerzy . karczmarczuk
. There is a small obscure religious sect of people who want to implement several mathematical entities as functional operators, where multiplication is f. composition. You do it too generically, too optimistically, and then some octonions come and br

[Haskell-cafe] Re: Who started 42, and when?

2008-02-01 Thread jerzy . karczmarczuk
onacci of 42, then you have to wait so long, that you must build a special Supercomputer for it. It has, BTW. been built, and it is called the "haskell-cafe mailing list". Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: anybody can tell me the pronuncation of?"haskell"?

2008-01-30 Thread jerzy . karczmarczuk
widely known entre a gente falando portugues. Vou calar a boca... Gomen nasai. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] anybody can tell me the pronuncation of "haskell"?

2008-01-29 Thread jerzy . karczmarczuk
e where I sit now... Arigato gozaimasu. Jerzy Karczmarczuk. PS. If you think that "arigato" is a genuine Japanese word, well, check how the appropriately translated word is spelled in Portuguese... ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] anybody can tell me the pronuncation of "haskell"?

2008-01-29 Thread jerzy . karczmarczuk
Tim Chevalier(*) writes: I think to ease the acceptance of Haskell in the broader world, we should just change the name to Schönfinkel. On the other hand, is better not to try Curry, since the French pronounce it: Queue-rhrhrh. This is for me absolutely inacceptable and scandalous, since t

Re: [Haskell-cafe] anybody can tell me the pronuncation of "haskell"?

2008-01-28 Thread jerzy . karczmarczuk
you should take into account that no word may terminate on a consonant, so you have to add another schwa, or a Sicilian Variant of that at the end. Jerzy Karczmarczuk (pronounced as written) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: The programming language market

2008-01-27 Thread jerzy . karczmarczuk
any other conceptual structure, can be stored and communicated. You may kill all the "working instances", and rekindle it later. It such a way it is difficult to kill a religion, or a political doctrine. But it may die, become useless/unused tempora

Re: The programming language market (was Re: [Haskell-cafe] Why functional programming matters

2008-01-26 Thread jerzy . karczmarczuk
. This "School of computer science" gave some theory to the humanity. But no, or almost no software, sorry. I *sincerely* hope that it changed now. Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: The programming language market (was Re: [Haskell-cafe] Why functional programming matters

2008-01-26 Thread jerzy . karczmarczuk
ia and their satellites became a kind of desert here not only because of economical problems... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Re: Data constructors versus types

2008-01-17 Thread jerzy . karczmarczuk
l targeted at serious comp. sci. problems, and I think that the fact that somebody is young and inexperienced, is not a justification to make false claims, just because this and that had XXX years less than myself in order to read some easily available texts. Of course, anybody may say "dubious truths

[Haskell-cafe] Re: Data constructors versus types

2008-01-16 Thread jerzy . karczmarczuk
ss' sake!? Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2008-01-15 Thread jerzy . karczmarczuk
s you gratuitously with a waste of time. Absolutely inacceptable for engineering reasons. In games it might happen as well, when, e.g., a collision handling module finds a pathological geometrical situation, with a singularity so close that math bombs. Then, a possible solution is

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

2008-01-14 Thread jerzy . karczmarczuk
stupid than you. http://mathworld.wolfram.com/Undefined.html http://en.wikipedia.org/wiki/Defined_and_undefined http://mathforum.org/library/drmath/view/53336.html http://encarta.msn.com/encyclopedia_761568582/Calculus_(mathematics).html etc. Jerzy Karczmarczuk ___

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

2008-01-14 Thread jerzy . karczmarczuk
ish... But don't write medical software, please... Jerzy Karczmarczuk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Computer Science Books using Haskell

2008-01-14 Thread jerzy . karczmarczuk
racters. I perhaps misunderstand this phrase, but if you suggest that it would be useful to snatch the code examples from within the book, I believe that no OCR is needed, they are here: http://www.iro.umontreal.ca/~lapalme/AlgoFP/code.html

Re: [Haskell-cafe] All equations must have the same arity - why?

2008-01-13 Thread jerzy . karczmarczuk
things more regular! Sometimes it is useful, but not where it "for free" gives you more opportunities to make bugs. I wonder whether f = g and f x = g x attributes *always* the same type to both variants of f... Jerzy Karczmarczuk _

  1   2   3   4   >