Hi!
I am thinking about a model where you would have only n threads on a
n-core (or processor) machine. They would be your worker threads and
you would spawn them only once (at the beginning of the program) and
then just delegate work between them.
On 8/13/07, Jan-Willem Maessen [EMAIL
Stefan O'Rear wrote:
Also, large numbers don't (this is arguably a bug...) have restricted
types:
[EMAIL PROTECTED]:~$ ghc -e '100 :: Int'
-1486618624
So many other programming languages allow weird things to happen with
numeric overflows... it would be nice if Haskell
Hello Everyone,
I'm not quite sure if I'm posing this question correctly, but what facilities
currently exist in haskell to nicely deal with datastructures that won't fit
within a given machine's ram?
And if there are no such facilities, what would it take to fix that?
thanks
-Carter
On Mon, Aug 13, 2007 at 12:29:25PM -0700, Carter T Schonwald wrote:
Hello Everyone,
I'm not quite sure if I'm posing this question correctly, but what
facilities currently exist in haskell to nicely deal with
datastructures that won't fit within a given machine's ram? And if
there are no
Carter T Schonwald wrote:
Hello Everyone,
I'm not quite sure if I'm posing this question correctly, but what
facilities currently exist in haskell to nicely deal with
datastructures that won't fit within a given machine's ram?
And if there are no such facilities, what would it take to fix
On Aug 13, 2007, at 2:53 PM, Mitar wrote:
Hi!
I am thinking about a model where you would have only n threads on a
n-core (or processor) machine. They would be your worker threads and
you would spawn them only once (at the beginning of the program) and
then just delegate work between them.
The main two use cases I have in mind are
1) really really really big abstract syntax trees or proof trees (a la
compilers or theorem provers)
2) random access to numerical data
does that help clarify what i'm asking about? In each case, is there a standard
way of dealing with this?
in the
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/
side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about combining compatible things things
together in a row.
/None/ of them force any particular
On Aug 13, 2007, at 16:29 , Benjamin Franksen wrote:
Let's take the simplest example: Maybe. The effect in question is the
premature abortion of a computation (when Nothing is returned). And of
course Maybe sequences these effects, that's what you use it for: the
_first_ action to be
Andrea Rossato wrote:
The task this library should do is simple: given an xml object
(representing a bibliographic reference), render it with rules stored
in a different xml object (the citation style). While I think I can
find solutions for this problem - the rendering -, what I find
Brian Hulley wrote:
apfelmus wrote:
Brian Hulley schrieb:
main = do
buffer - createBuffer
edit1 - createEdit buffer
edit2 - createEdit buffer
splitter - createSplitter (wrapWidget edit1) (wrapWidget
edit2)
runMessageLoopWith splitter
In the second case, if your numerical data is just a big array, why not
just mmap it? Unless you're running on a 32 bit machine, or have a
*seriously* large amount of data, that seems like the easiest option.
Although if you're talking about mutable data, that's a whole 'nother can
of worms... but
Andrew Coppin wrote:
Stefan O'Rear wrote:
Also, large numbers don't (this is arguably a bug...) have restricted
types:
[EMAIL PROTECTED]:~$ ghc -e '100 :: Int'
-1486618624
So many other programming languages allow weird things to happen with
numeric overflows... it would
On Mon, Aug 13, 2007 at 05:13:01PM -0400, Brandon S. Allbery KF8NH wrote:
On Aug 13, 2007, at 16:29 , Benjamin Franksen wrote:
Let's take the simplest example: Maybe. The effect in question is the
premature abortion of a computation (when Nothing is returned). And of
course Maybe sequences
Brian Hulley wrote:
Thinking about this a bit more, and just so this thought is recorded for
posterity (!) and for the benefit of anyone now or in a few hundred
years time, trying to solve Fermat's last GUI, the object oriented
solution allows the buffer object to do anything it wants, so that
Brian Hulley wrote:
Brian Hulley wrote:
apfelmus wrote:
Brian Hulley schrieb:
main = do
buffer - createBuffer
edit1 - createEdit buffer
edit2 - createEdit buffer
splitter - createSplitter (wrapWidget edit1) (wrapWidget
edit2)
Brandon S. Allbery KF8NH wrote:
On Aug 13, 2007, at 16:29 , Benjamin Franksen wrote:
Let's take the simplest example: Maybe. The effect in question is the
premature abortion of a computation (when Nothing is returned). And of
course Maybe sequences these effects, that's what you use it for:
David Roundy wrote:
It's the *effect* of a monad, not the *side* effect. The type of =
defines this dependency. And when you have a chain of dependencies, that
is sometimes referred to as a sequence. True, it's not mystical, but it's
still sequenced.
How can a Haskell type define a data
On 13/08/07, David Roundy [EMAIL PROTECTED] wrote:
Try executing:
do { x - return 2; undefined; return (x*x); }
in any monad you like, and you'll find that regardless of the *data*
dependencies (the return value of this monadic action is unambiguous), the
undefined is evaluated *before*
On Mon, 2007-08-13 at 22:29 +0200, Benjamin Franksen wrote:
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/
side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about combining compatible
On 13/08/07, Pekka Karjalainen [EMAIL PROTECTED] wrote:
On 8/13/07, L.Guo [EMAIL PROTECTED] wrote:
Hi All:
Hello,
I am reading http://www.haskell.org/haskellwiki/Prime_numbers
The code in sector 1 Bitwise prime sieve.
I have 3 questions about it.
1) In function go, what does
On Mon, 2007-08-13 at 19:31 +0200, peterv wrote:
When I read side-effects, I understand it as unwanted effects, like
aliasing, and effects depending on the order of execution. I'm not sure
if my understanding here is correct. I hope Haskell does not allow
side-effects but only effects, meaning
Benjamin Franksen wrote:
I'd be careful. Introducing a network connection into the equation makes the
object (its methods) susceptible to a whole new bunch of failure modes;
think indefinite delays, connection loss, network buffer overflow, etc etc.
It may be a mistake to abstract all that away;
On 8/13/07, David Roundy [EMAIL PROTECTED] wrote:
Try executing:
do { x - return 2; undefined; return (x*x); }
in any monad you like
instance Monad M where
return a = M a
~(M a) = f = f a
Or is that cheating?
--
Dan
___
Haskell-Cafe
On Tue, 14 Aug 2007, Benjamin Franksen wrote:
...
I'd be careful. Introducing a network connection into the equation makes the
object (its methods) susceptible to a whole new bunch of failure modes;
think indefinite delays, connection loss, network buffer overflow, etc etc.
It may be a mistake
On 8/13/07, David Roundy [EMAIL PROTECTED] wrote:
| Try executing:
|
| do { x - return 2; undefined; return (x*x); }
|
| in any monad you like
It's not just the identity monad:
Prelude :m +Control.Monad.State
Prelude Control.Monad.State flip evalState () $ do { x - return 2;
undefined;
Derek Elkins wrote:
On Mon, 2007-08-13 at 22:29 +0200, Benjamin Franksen wrote:
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/
side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about
I made this mistake myself at first too. It seems that the Monad = side
effect machine error is common to Haskell newbies. Probably to do with the
fact that the first thing every programmer wants to do is write a hello world
program and for that you need the IO Monad which requires some
On 8/13/07, Benjamin Franksen [EMAIL PROTECTED] wrote:
Ok, I admit defeat now ;-) Monads in general /allow/ sequencing of (certain)
effects, but it is not necessary for a monad to do so.
I'm sure I said that 300 or so posts ago :-)
Here's an example that might help make some of this explicit.
Isaac Dupree wrote:
Benjamin Franksen wrote:
I'd be careful. Introducing a network connection into the equation makes
the
object (its methods) susceptible to a whole new bunch of failure modes;
think indefinite delays, connection loss, network buffer overflow, etc
etc.
It may be a mistake to
G'day all.
Quoting Andrew Coppin [EMAIL PROTECTED]:
So many other programming languages allow weird things to happen with
numeric overflows... it would be nice if Haskell didn't.
It would nice if CPUs supported trapping integer arithmetic.
Cheers,
Andrew Bromage
I put together a small intro lesson on proving haskell code using
quickcheck, equational reasoning and Isabelle/HOL. Its very elementary,
but might be of interest to some people here.
http://www.thenewsh.com/%7Enewsham/formal/reverse/
Feedback is appreciated.
Tim Newsham
Ronald Guida wrote:
Given the question What is a Monad, I would have to say A Monad is
a device for sequencing side-effects.
peterv [EMAIL PROTECTED] wrote:
Side-effects is a piece of linguistic cruft played fast-and-loose
by too many people in this game. Sequencing suffers the same
Ronald Guida wrote:
Here is the brief explanation I came up with:
Arrows and monads are abstract data types used to construct Domain
Specific Embedded Languages (DSELs) within Haskel. A simple arrow
provides a closed DSEL. A monad is a special type of arrow that
creates an open
Stefan O'Rear wrote:
apfelmus wrote:
My assumption is that we have an equivalence
forall a,b . m (a - m b) ~ (a - m b)
because any side effect executed by the extra m on the outside can well
be delayed until we are supplied a value a. Well, at least when all
arguments are fully applied,
On 14/08/07, Ronald Guida [EMAIL PROTECTED] wrote:
My present goal is to understand monads well enough to be able to
explain them to others. I wonder if it's possible to create a
tutorial that explains monads well enough so that they just make
sense or click for people.
It seems everyone
Hi
I was trying out some parsing with parsec. I tried:
Accepting proper parenthesized expressions, this was the
code:
parens :: Parser ()
parens = do
char '('
parens
char ')'
parens
| return ()
Implementing basically: S - (S)S | e.
I doubt the fact that 'e' was actually considered,
Vimal wrote:
Hi
I was trying out some parsing with parsec. I tried:
Accepting proper parenthesized expressions, this was the
code:
parens :: Parser ()
parens = do
char '('
parens
char ')'
parens
| return ()
I would indent | return () a bit less:
...
parens
|
Benjamin Franksen wrote:
Brian Brunswick wrote:
One thing that I keep seeing people say (not you), is that
monads /sequence/ side effects. This is wrong, or at
least a limited picture.
/All/ of the above structures are about combining compatible things things
together in a row.
I
I noticed many code snippets on the wiki that have syntax colouring.
How is this done? Can I convert syntax coloured code from Emacs to HTML?
I'm using the Haskell mode for Emacs to get the syntax colouring.
I'm writing a monads for C# programmers tutorial (oh no) and would
M-x htmlize-buffer
On 8/14/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
I noticed many code snippets on the wiki that have syntax colouring.
How is this done? Can I convert syntax coloured code from Emacs to HTML?
I'm using the Haskell mode for Emacs to get the syntax colouring.
On 8/14/07, Peter Verswyvelen [EMAIL PROTECTED] wrote:
I noticed many code snippets on the wiki that have syntax colouring.
How is this done? Can I convert syntax coloured code from Emacs to HTML?
Look at HsColour:
http://www.cs.york.ac.uk/fp/darcs/hscolour/
regards,
Bas van Dijk
Having just gone through all the tutorials and things (again but
this time I think it stuck) the Haskell community is on the wrong
track as far as teaching Monads to new programmers.
If I were teaching addition and multiplication to children I
wouldn't start with, We'll begin by defining an
I'm looking for cool but mind-bending examples of functional brilliance.
Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the Dilbert and Garfield you could
seriously stomach, decide you should educate yourself while on the
job. :-)
So you decide
On 14/08/07, Lanny Ripple [EMAIL PROTECTED] wrote:
Having just gone through all the tutorials and things (again but
this time I think it stuck) the Haskell community is on the wrong
track as far as teaching Monads to new programmers.
If I were teaching addition and multiplication to children
On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:
I'm looking for cool but mind-bending examples of functional brilliance.
Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the Dilbert and Garfield you could
seriously stomach, decide you should
On Aug 14, 2007, at 11:17 , Dougal Stanton wrote:
Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the Dilbert and Garfield you could
seriously stomach, decide you should educate yourself while on the
job. :-)
Sounds to me like you want a
On Tuesday 14 August 2007 10:17:53 Dougal Stanton wrote:
I'm looking for cool but mind-bending examples of functional brilliance.
Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the Dilbert and Garfield you could
seriously stomach, decide you
Hello,
There is clearly a problem with the Haskell/monad tutorials out there...
The tutorials seriously need to step back and start with
something like, To enforce order of evaluation we evaluate
closures* returning a defined type. The first closure will feed
its result to the second
So you decide to print up some one-liner style programs into a
little booklet. Something between credit-card and postcard sized, with
a neat but mind-bending program on it. Don Stewart occasionally swoops
in with some fixpoint malarkey to defuse heated discussions. I mean
that kind of thing,
Look! You are doing it again! :) Does that paragraph even
contain the word Monad? :)
I'm aware a monad is an abstraction and as such it doesn't *do*
anything. My point was along the lines that you don't need to
know that your working in a field to be able to learn that
3/2 = 1.5
.
Hallo,
On 8/14/07, Jeff Polakow [EMAIL PROTECTED] wrote:
Hello,
There is clearly a problem with the Haskell/monad tutorials out there...
The tutorials seriously need to step back and start with
something like, To enforce order of evaluation we evaluate
closures* returning a defined
On 8/14/07, Jeff Polakow [EMAIL PROTECTED] wrote:
One general intuition about monads is that they represent computations
rather than simple (already computed) values:
x :: Int -- x is an Int
x :: Monad m = m Int -- x is a computation of an Int
What's a computation? It
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
I like the very light weight analogy (which works for most practical
uses of monads) that a monadic action is a recipe
Many introductory programming books present the idea of a program as a
recipe. Here's a recipe for computing factorials:
Hello,
Look! You are doing it again! :) Does that paragraph even
contain the word Monad? :)
Sorry. Your first paragraph led me to believe you were writing about
monads.
I'm aware a monad is an abstraction and as such it doesn't *do*
anything. My point was along the lines that you
Maybe something of these?
http://www.haskell.org/haskellwiki/Blow_your_mind
--
Chad Scherrer
Time flies like an arrow; fruit flies like a banana -- Groucho Marx
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Tue, 2007-08-14 at 09:55 -0500, Lanny Ripple wrote:
Having just gone through all the tutorials and things (again but
this time I think it stuck) the Haskell community is on the wrong
track as far as teaching Monads to new programmers.
If I were teaching addition and multiplication to
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
I like the very light weight analogy (which works for most practical
uses of monads) that a monadic action is a recipe
Many introductory programming books present the idea of a program as
A very good point. I even knew that implicitly but wasn't
thinking in those terms explicitly when writing up my first post
and it does make a difference in how you view things.
-ljr
Jeff Polakow wrote:
Hello,
Look! You are doing it again! :) Does that paragraph even
contain the
You don't normally call x::Int a computation of an Int because there's
nothing that distinguishes the value of the x from what it was before you
computed it. So I prefer to regard x as a value (in a domain, of course).
But for x :: (Monad m) = m Int there is something else happening, so the
word
Derek Elkins wrote:
What people need to do is stop reading two page blog posts by someone
who's just got monads and read the well-written peer-reviewed papers
I have taught many people to program in group settings and
individually in my career. I have referred them to many
tutorials. I
Hello,
On 8/14/07, Jeff Polakow [EMAIL PROTECTED] wrote:
One general intuition about monads is that they represent computations
rather than simple (already computed) values:
x :: Int -- x is an Int
x :: Monad m = m Int -- x is a computation of an Int
What's a
On 14/08/07, Jeff Polakow [EMAIL PROTECTED] wrote:
Of course, the type [Int] denotes a value which is a list of Ints;
additionally [Int] can be viewed as a value representing the
nondeterministic computation of a single Int. Generally, the type Monad m =
m Int can be viewed as a value
On 14/08/07, Brent Yorgey [EMAIL PROTECTED] wrote:
Clearly, we need to actually put together such a book! I'm imagining
something where you have two mostly blank facing pages, with the code by
itself in the middle of the right page; then the next 2-4 pages devoted to a
short discussion of the
On 8/14/07, Lennart Augustsson [EMAIL PROTECTED] wrote:
You don't normally call x::Int a computation of an Int because there's
nothing that distinguishes the value of the x from what it was before you
computed it.
Can you spell out exactly what you mean by this?
So I prefer to regard x as a
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
Where do monads come in?
Well I would try to distinguish between code that we write to compute
values, and values which represent monadic actions when coming up with
analogies.
How would
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
Where do monads come in?
Well I would try to distinguish between code that we write to compute
values, and values which represent
On 8/14/07, Dougal Stanton [EMAIL PROTECTED] wrote:
On 14/08/07, Brent Yorgey [EMAIL PROTECTED] wrote:
Clearly, we need to actually put together such a book! I'm imagining
something where you have two mostly blank facing pages, with the code by
itself in the middle of the right page; then
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
Well that's easy, don't use the recipe analogy to explain code, use it
for monadic values exclusively, and you avoid the confusion entirely!
I don't think it's that complicated.
It certainly is complicated. I think I have a good grasp of
On 2007-08-14, Dan Piponi [EMAIL PROTECTED] wrote:
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
I like the very light weight analogy (which works for most practical
uses of monads) that a monadic action is a recipe
Many introductory programming books present the idea of a program as
Hello,
On 14/08/07, Jeff Polakow [EMAIL PROTECTED] wrote:
Of course, the type [Int] denotes a value which is a list of Ints;
additionally [Int] can be viewed as a value representing the
nondeterministic computation of a single Int. Generally, the type
Monad m = m Int can be viewed as a
On 2007-08-14, Spencer Janssen [EMAIL PROTECTED] wrote:
On Tuesday 14 August 2007 10:17:53 Dougal Stanton wrote:
I'm looking for cool but mind-bending examples of functional brilliance.
Let us say, hypothetically, you had a bathroom without any reading
material. And having read all the
Setup.hs wants a module that Cabal hides. Am I doing something wrong (newbie :-)
or should I try to fall back to Cabal-1.1.6.1?
$ ghc --make -o setup Setup.hs
Setup.hs:13:7:
Could not find module `Distribution.Compat.FilePath':
it is hidden (in package Cabal-1.1.6.2)
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
On 8/14/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
Well that's easy, don't use the recipe analogy to explain code, use it
for monadic values exclusively, and you avoid the confusion entirely!
I don't think it's that complicated.
It
Dan Piponi wrote:
| On 8/14/07, Lennart Augustsson [EMAIL PROTECTED] wrote:
| You don't normally call x::Int a computation of an Int because there's
| nothing that distinguishes the value of the x from what it was before
| you computed it.
|
| Can you spell out exactly what you mean by this?
Dan Piponi, Tue, 14 Aug 2007 11:52:16 -0700:
All functions can be viewed as recipes. (+) is a recipe. Give me some
ingredients (two numbers) and I'll use (+) to give you back their sum.
(+) is not a recipe, it is a chef. On the other hand,
(return 5 :: State Integer) is a recipe. You need a
On 14/08/07, Malte Milatz [EMAIL PROTECTED] wrote:
Dan Piponi, Tue, 14 Aug 2007 11:52:16 -0700:
All functions can be viewed as recipes. (+) is a recipe. Give me some
ingredients (two numbers) and I'll use (+) to give you back their sum.
(+) is not a recipe, it is a chef. On the other hand,
Sebastian Sylvan wrote:
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
If I was one of your students and you said that monads are recipes I
would immediately ask you where the monads are in my factorial program
regardless of whether you had introduced one or two different
analogies for
On 14/08/07, Seth Gordon [EMAIL PROTECTED] wrote:
Sebastian Sylvan wrote:
On 14/08/07, Dan Piponi [EMAIL PROTECTED] wrote:
If I was one of your students and you said that monads are recipes I
would immediately ask you where the monads are in my factorial program
regardless of whether you
Hi,
I am trying to do the exercise which asks to define built-in functions
'last' and 'init' using 'foldr' function, such as last Greggery Peccary =
'y'
the type for my function is:
myLast :: [Char] - Char
I am not generalizing type so that make it less complicated. But what ever
i am
On 2007-08-14, Alexteslin [EMAIL PROTECTED] wrote:
Hi,
I am trying to do the exercise which asks to define built-in functions
'last' and 'init' using 'foldr' function, such as last Greggery Peccary =
'y'
the type for my function is:
myLast :: [Char] - Char
I am not generalizing type
John Dell'Aquila wrote:
Setup.hs wants a module that Cabal hides. Am I doing something wrong
(newbie :-)
or should I try to fall back to Cabal-1.1.6.1?
$ ghc --make -o setup Setup.hs
Setup.hs:13:7:
Could not find module `Distribution.Compat.FilePath':
it is hidden (in package
I've found a way to do it, but it's not pretty.
Hint: The function in the foldr first get the last value, and will
need to keep it the whole way through. How can it tell if it is being
given the last item or an earlier item?
I'm generally not too good at the Socratic method, so feel free to
Well, i have tried cons (:) operator but when it passed to foldr doesn't work
because cons operator operates first character and then the list but the
foldr argument takes a function (a-a-a). Maybe i am missing the point
here?
Aaron Denney wrote:
On 2007-08-14, Alexteslin [EMAIL PROTECTED]
2007/8/14, Alexteslin [EMAIL PROTECTED]:
Well, i have tried cons (:) operator but when it passed to foldr doesn't work
because cons operator operates first character and then the list but the
foldr argument takes a function (a-a-a). Maybe i am missing the point
here?
What Aaron was saying
You can consider foldr to be continual modification of a state. The
initial state is given as an argument, and then the (a - b - b)
function is passed the next element of the list and the current state,
and it returns the new state. foldr will then return the final state,
from which the result can
(Quoting reformatted. Try to have your responses below what you are
responding to. It makes it easier to read as a conversation.)
On 2007-08-14, Alexteslin [EMAIL PROTECTED] wrote:
Aaron Denney wrote:
Folds replace the cons operator (:) with the function you pass it.
If you want the tail of
On 2007-08-14, Chaddaï Fouché [EMAIL PROTECTED] wrote:
2007/8/14, Alexteslin [EMAIL PROTECTED]:
Well, i have tried cons (:) operator but when it passed to foldr doesn't work
because cons operator operates first character and then the list but the
foldr argument takes a function (a-a-a). Maybe
Conor McBride and Ross Paterson said it best in the introduction to
their paper Applicative programming with effects [1]:
This is the story of a pattern that popped up time
and again in our daily work,..., until the temptation
to abstract it became irresistible. Let us illustrate
with
On 14/08/07, Dan Weston [EMAIL PROTECTED] wrote:
[snips another metaphor for monadic programming]
No offence to Dan, whose post I enjoyed. The concept of wrapping is as
close a metaphor as we seem to get without disagreements. But this has
brought me to a realisation, after Paul Erdos:
The
2007/8/14, Aaron Denney [EMAIL PROTECTED]:
The problem with foldl is that you can't easily make it polymorphic
because of how the null case is handled. foldl1 and foldr1 are trivial,
true.
The original last fail on empty list, it's far easier to obtain the
same semantic with foldl than with
snark
As you know, an arrow tutorial is like a wrapper around a monad tutorial, sort of like a container
around it that can do extra actions with sufficient lifting. The appropriate higher-order function
to convert monad tutorials to arrow tutorials will be left as an exercise to the reader.
On 2007-08-14, Chaddaï Fouché [EMAIL PROTECTED] wrote:
2007/8/14, Aaron Denney [EMAIL PROTECTED]:
The problem with foldl is that you can't easily make it polymorphic
because of how the null case is handled. foldl1 and foldr1 are trivial,
true.
The original last fail on empty list, it's far
On 8/14/07, Dan Weston [EMAIL PROTECTED] wrote:
Conor McBride and Ross Paterson said it best in the introduction to
their paper Applicative programming with effects [1]:
As von Neumann said: Young man, in mathematics you don't understand
things, you just get used to them.
Getting used to
On Tue, 2007-08-14 at 12:40 -0500, Lanny Ripple wrote:
Derek Elkins wrote:
What people need to do is stop reading two page blog posts by someone
who's just got monads and read the well-written peer-reviewed papers
I have taught many people to program in group settings and
individually in
On 8/14/07, Michael Vanier [EMAIL PROTECTED] wrote:
I'm becoming more and more convinced that metaphors for monads do more harm
than good. From now on
I'm going to describe monads as purely abstract entities that obey certain
laws, and that _in
certain instances_ can be viewed to be like
For what it's worth, the nature of Haskell is such that you do (at least currently) have to spend a
lot of time reading research papers to understand what's going on. Maybe that will change sometime,
but probably not soon. This ties in to the open-endedness of Haskell; I sometimes think that
Sorry to spam you Jeff, again I sent my email to the poster rather than the
list. I'm using Yahoo beta webmail and don't see a way to set it to reply to
the list rather than the originator. Anyway, this was my post:
Hence the need to perform a run operation like runIdentity, evalState or
On 15/08/07, Gregory Propf [EMAIL PROTECTED] wrote:
- Original Message
From: Jeff Polakow [EMAIL PROTECTED]
One general intuition about monads is that they represent computations
rather than simple (already computed) values:
I still want to re-iterate that they represent /complex/
I have a large Haskell/C project that needs to be linked against an even
larger set of C libraries and object files (OpNet) on a linux box (Fedora
Core 7). So far I have been able to link my Haskell libraries to some C
test code containing a main function without incident. However the link
1 - 100 of 102226 matches
Mail list logo