Hello Bulat,
Monday, August 14, 2006, 10:37:37 AM, you wrote:
i'm started to write article about type classes. can you, type gurus,
please check this initial text for correctness in explaining
differences between classes and type classes?
i continue to develop this text. below is list of
Hello Gabriel,
Tuesday, August 15, 2006, 10:36:28 PM, you wrote:
| Moreover, Haskell type classes supports inheritance. Run-time
| polymorphism together with inheritance are often seen as OOP
| distinctive points, so during long time i considered type classes as a
| form of OOP
Mike Gunter wrote:
I had hoped the History of Haskell paper would answer a question
I've pondered for some time: why does Haskell have the if-then-else
syntax? The paper doesn't address this. What's the story?
For what it's worth, I have been asking myself the same question several
times.
Bulat Ziganshin [EMAIL PROTECTED] writes:
| Hello Gabriel,
|
| Tuesday, August 15, 2006, 10:36:28 PM, you wrote:
|
| | Moreover, Haskell type classes supports inheritance. Run-time
| | polymorphism together with inheritance are often seen as OOP
| | distinctive points, so during long time i
Hi,
I am a newbie learning Haskell. I have used languages with functional
features before (R, Scheme) but not purely functional ones without
side-effects.
Most of the programming I do is numerical (I am an economist). I
would like to know how to implement the iterative algorithm below in
Tamas K Papp wrote:
Hi,
I am a newbie learning Haskell. I have used languages with functional
features before (R, Scheme) but not purely functional ones without
side-effects.
Most of the programming I do is numerical (I am an economist). I
would like to know how to implement the iterative
You might use the Prelude function until:
until :: (a - Bool) - (a - a) - a - a
until ( 3) (+ 2) 0 = 4
or for your purpose:
until (\ a - not (goOn(a, f(a))) f ainit
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#v%3Auntil
On Aug 15, 2006, at 11:43 PM, Casey Hawthorne wrote:
The Q Programming Language can do symbolic manipulation -- Haskell?
The Q Programming Language can do the following:
sqr X = X*X
==sqr 5
25
==sqr (X+1)
(X+1)*(X+1)
Can Haskell do symbolic manipulation?
Well, there's always the
Tamas K Papp wrote:
f is an a-a function, and there is a stopping rule
goOn(a,anext) :: a a - Bool which determines when to stop. The
algorithm looks like this (in imperative pseudocode):
a = ainit
while (true) {
anext - f(a)
if (goOn(a,anext))
a - anext
Hi,
I am working through Hal Daume's tutorial, trying to do the exercises.
I can't figure out how to output an integer with putStrLn (or any
other way), I think I need an Int - [Char] conversion but couldn't
find it. Specifically, in Exercise 3.10, I have the product of
numbers in pp, and would
Tamas K Papp [EMAIL PROTECTED] writes:
Hi,
I am working through Hal Daume's tutorial, trying to do the exercises.
I can't figure out how to output an integer with putStrLn (or any
other way), I think I need an Int - [Char] conversion but couldn't
find it. Specifically, in Exercise 3.10, I
Casey Hawthorne wrote:
The Q Programming Language can do the following:
sqr X = X*X
==sqr 5
25
==sqr (X+1)
(X+1)*(X+1)
Can Haskell do symbolic manipulation?
Typeful symbolic differentiation of compiled functions
Hi,
You could try Hoogle URL: http://haskell.org/hoogle/ ,
though entering Int - [Char] isn't very helpful,
A known issue, Hoogle 4 will know about [Char] = String, and will
also be tweaked to give show first in this instance.
Thanks
Neil
___
Hello Haskell'rs,
I've been playing with threads and I tried to do a toy example (that used java) from a class.
When run, the program should print a prompt and accept commands just like a linux shell. It doesn't have to do anything
fancy, just spawn new threads that make system calls when
Neil Mitchell wrote:
Hi,
You could try Hoogle URL: http://haskell.org/hoogle/ ,
though entering Int - [Char] isn't very helpful,
A known issue, Hoogle 4 will know about [Char] = String, and will
also be tweaked to give show first in this instance.
Thanks
Neil
Greg Buchholz wrote:
Casey Hawthorne wrote:
The Q Programming Language can do the following:
sqr X = X*X
==sqr 5
25
==sqr (X+1)
(X+1)*(X+1)
Can Haskell do symbolic manipulation?
Typeful symbolic differentiation of compiled functions
It looks like a stdout buffering issue, plus a 'yield' issue. forkIO does not
spawn OS level threads (that is forkOS) so adding a yield helps the runtime:
import Control.Concurrent
import System
import System.IO
loop = do
putStr
z - getLine
runCommands z
yield
Chris Kuklewicz wrote:
Tamas K Papp wrote:
Hi,
I am a newbie learning Haskell. I have used languages with functional
features before (R, Scheme) but not purely functional ones without
side-effects.
Most of the programming I do is numerical (I am an economist). I
would like to know how to
putStrLn (Product: ++ convertnumbertostring(pp))
Also, there is a predefined function called 'print' where
print x = putStr (convertnumbertostring x)
i.e.
print x = putStr (show x)
Jared.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hello haskell-cafe,
The http://haskell.org/haskellwiki/Special:Popularpages page lists
most popular pages on haskell wiki. I think this list is very
useful because it shows us what are the questions about Haskell
people most interested and gives us hints what should be improved in
first place.
Is there some Haskell library which provides Samba bindings and some FTP client library bindings (e.g. ftplib3)?I started writing the bindings for some of the functions myself for my project but it looks like it is a lot of work and probably someone has done it already.
-- Best regards,Ivan
Hi Oleg,
Thanks a lot for your reply. I see now where my attempt went wrong and
why it couldn't work in the first place, the instances will indeed
overlap. I'm not completely satisfied with your solution though, but
seeing how you did it has lead me to the solution I want. Details
below. :-)
]
G'day all.
Quoting Benjamin Franksen [EMAIL PROTECTED]:
For what it's worth, I have been asking myself the same question several
times. If/then/else syntax could be replaced by a regular (lazy) function
without any noticeable loss.
I believe that if-then-else cannot be replaced by a regular
[EMAIL PROTECTED] wrote:
G'day Tamas.
Quoting Tamas K Papp [EMAIL PROTECTED]:
f is an a-a function, and there is a stopping rule
goOn(a,anext) :: a a - Bool which determines when to stop. The
algorithm looks like this (in imperative pseudocode):
a = ainit
while (true) {
anext - f(a)
G'day all.
Quoting Chris Kuklewicz [EMAIL PROTECTED]:
The compiler may not deforest that list, so creating the list may be a small
overhead of this method.
And in return, you get:
- Code that is smaller than the imperative version, AND
- a reusable function, making the next
25 matches
Mail list logo