I'm following Harper's blog, Existential Type¹, which I find to be an
enjoyable and entertainingly written tirade about the advantages of
teaching functional programming - specifically ML - to students. Of
course, he tends to be critical of Haskell, but it's nice to get some
thought provoking
Yes, I'm following it too, and it seems to me that Harper just allows his
dislike for Haskell to take advantage of his judgement. Monads as a way to deal
with laziness are a very common misconception.
Отправлено с iPhone
May 2, 2011, в 11:54, Ketil Malde ke...@malde.org написал(а):
I'm
On 2011-05-02 03:54, Ketil Malde wrote:
There is a particular reason why monads had to arise in Haskell,
though, which is to defeat the scourge of laziness.
I wonder if there are any other rationale for a statement like that?
He spends one paragraph dismissing the usefulness of
Hello all,
I have rather strange question. I wonder whether there is an obvious
solution or not in Haskell. I tried but without defining quite
ugly tree-like structures and incorporating IORefs it seems to me like
impossible.
Note: I use ASCII art to explain.
let l be a Haskell list
On 2 May 2011 11:10, John Sneer johnsn...@operamail.com wrote:
Hello all,
I have rather strange question. I wonder whether there is an obvious
solution or not in Haskell. I tried but without defining quite
ugly tree-like structures and incorporating IORefs it seems to me like
impossible.
Sorry to reply after so long time.
When you say there is no proble, I understand it as:
Even if some libraries were compiled with gcc, they are still
linkable with object files generated with llvm.
So this remembered me a problem I met long ago with no answer.
I compiled ghc 7 with ghc 6 and
On Mon, May 2, 2011 at 8:16 AM, Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com wrote:
On 2 May 2011 11:10, John Sneer johnsn...@operamail.com wrote:
Hello all,
I have rather strange question. I wonder whether there is an obvious
solution or not in Haskell. I tried but without defining quite
Well, I have more or less similar solution, but its efficiency for
map/foldr etc. is quite low :-(
Nevertheless, probably no other solution.
BR and thanks
John
--
John Sneer
johnsn...@operamail.com
On Mon, 02 May 2011 08:32 -0300, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
On
Re-CCing the list.
On 2 May 2011 11:33, John Sneer johnsn...@operamail.com wrote:
I took a look at
http://cvs.haskell.org/Hugs/pages/libraries/base/Data-Sequence.html
but it doesn't seem to be helpful - cannot insert sequence into the
sequence, just
modification of a single element is
On 02/05/11 13:10, John Sneer wrote:
Simply: I would like to have direct access into several places
in a very long list.
Maybe you could use a zipper. Or just maintain the list split into
chunks. So l' = [stuffBefore,hi,stuffAfter].
Or if you want to be able to use each element of hi as a
2011/5/2 Ketil Malde ke...@malde.org:
There is a particular reason why monads had to arise in Haskell,
though, which is to defeat the scourge of laziness.
My own view is/was that monads were so successful in Haskell since it
allowed writing flexible programs with imperative features,
Ok I have found the source issue, in my case it was an issue that ended up
turning into how the modules for my Webserver is organized, and that
compiler error (about an ambiguous type) occurred because my main webserver
datatype was not instantiated yet in that module (using where aproot).
In
Actually, there's a much simpler solution already implemented in the
scaffolded site: instead of using mkYesod, use mkYesodData and
mkYesodDispatch. mkYesod is really just a combination of the two. The
former defines your route datatype, and the latter creates the
YesodDispatch instance. This
On Mon, May 2, 2011 at 9:29 AM, Dominique Devriese
dominique.devri...@cs.kuleuven.be wrote:
I agree with your analysis. Throughout his different articles, I think
Harper partly has a point when he says that laziness brings certain
disadvantages (like e.g. complex memory and CPU behaviour) to
Hi Cafe!
When I'm running examles from Gloss graphics library, all examples
except gloss-hello are crashing with the following error: GLUT:
Warning in gloss-easy: GL error: gloss-easy: stderr: hPutChar:
invalid argument (character is not in the code page). A window with
produced picture is showed
..
You tell me this now ;)
I was actually wanting to look at scaffolding, but the section for it in the
Yesod book is not completed yet (http://www.yesodweb.com/book/scaffold)
Well that was like 4 hours wasted
Do you have a quick example of how scaffolding is done with mkYesodData and
My best advice is to just run the scaffolder. Any other examples I can
point you to (like the Haskellers source code) will contain a lot of
extra information that won't necessarily apply to your case.
Michael
On Mon, May 2, 2011 at 4:28 PM, Mathew de Detrich dete...@gmail.com wrote:
..
You
Im not sure what you mean exactly by run the scaffolder, (just to be
clear, I am not exactly sure what technically scaffolding is apart from it
being referenced once or twice in your documentation)
I assume you are talking about setting up the handlers for a specific route,
and then creating that
Type:
yesod init
It will ask you some questions and then generate a bootstrap site.
Michael
On Mon, May 2, 2011 at 4:40 PM, Mathew de Detrich dete...@gmail.com wrote:
Im not sure what you mean exactly by run the scaffolder, (just to be
clear, I am not exactly sure what technically
Ok thanks, that helped
On Mon, May 2, 2011 at 11:53 PM, Michael Snoyman mich...@snoyman.comwrote:
Type:
yesod init
It will ask you some questions and then generate a bootstrap site.
Michael
On Mon, May 2, 2011 at 4:40 PM, Mathew de Detrich dete...@gmail.com
wrote:
Im not sure what
Hi Mathew,
I was not the one working on Yi integration so far, but let me tell
you
what I think of the matter. Yi attempts to be a full blown editor,
while Leksah
needs Yi as a library for text editing with features typical of a
source code editor component.
What we have in Leksah is an abstract
On Mon, May 2, 2011 at 6:29 AM, Artyom Kazak artyom.ka...@gmail.com wrote:
Hi Cafe!
When I'm running examles from Gloss graphics library, all examples
except gloss-hello are crashing with the following error: GLUT:
Warning in gloss-easy: GL error: gloss-easy: stderr: hPutChar:
invalid
It's good to hear. Thanks!
2011/5/2 Jason Dagit dag...@gmail.com:
This is fixed in the git repository for GLUT, but I didn't push the fix to
hackage yet:
https://github.com/haskell-opengl/GLUT/pull/1
Sorry for the inconvenience!
Jason
___
Hi,
I tried to access C++ iterators from Haskell via the FFI. There are two
example programs attached, in Haskell as well as in C++. Both utilise the
same iterator wrapper example.cpp, but when running the Haskell program it
prints an empty list, where it should print the contents of some vector.
Hello everyone!
Haskell have nice automatically derivable Show type class. It's quite
useful for debugging with one exception. String representation of even
moderately large value is completely unreadable (example below).
My question is there any tool for reformatting result of show so it
Hi Alexey,
On 2 May 2011 21:01, Alexey Khudyakov alexey.sklad...@gmail.com wrote:
My question is there any tool for reformatting result of show so it could
be read by human beings?
http://hackage.haskell.org/package/pretty-show
Just use ppShow, instead of show.
Hope this helps,
Ozgur
On 2 May 2011 22:01, Alexey Khudyakov alexey.sklad...@gmail.com wrote:
Hello everyone!
Haskell have nice automatically derivable Show type class. It's quite
useful for debugging with one exception. String representation of even
moderately large value is completely unreadable (example below).
It works if I replace the 'bool' return type of 'finished' with int
and CInt on the C++ and Haskell side, respectively, and test for (/=
0).
On Mon, May 2, 2011 at 9:35 PM, Huynh Huu Long
long.upc...@googlemail.com wrote:
Hi,
I tried to access C++ iterators from Haskell via the FFI. There are
On Mon, May 2, 2011 at 3:01 PM, Alexey Khudyakov
alexey.sklad...@gmail.com wrote:
Hello everyone!
Haskell have nice automatically derivable Show type class. It's quite useful
for debugging with one exception. String representation of even moderately
large value is completely unreadable
Rogan Creswick schrieb:
We *do* still have some trouble maintaining / enforcing the PVP in
general, and there are a few things that it doesn't cover (I don't
believe exception behavior is covered, for example, although I'd argue
that throwing more exceptions than a previous version introduces
Big thanks, that works for me as well. Doesn't GHC check whether a
type is allowed (like CInt,...) or not (like Bool,...)?
2011/5/2 Gábor Lehel illiss...@gmail.com:
It works if I replace the 'bool' return type of 'finished' with int
and CInt on the C++ and Haskell side, respectively, and test
Ozgur Akgun wrote:
Hi Alexey,
On 2 May 2011 21:01, Alexey Khudyakov alexey.sklad...@gmail.com wrote:
My question is there any tool for reformatting result of show so it could
be read by human beings?
http://hackage.haskell.org/package/pretty-show
Just use ppShow, instead of
On 03.05.2011 00:43, Antoine Latter wrote:
On Mon, May 2, 2011 at 3:01 PM, Alexey Khudyakov
alexey.sklad...@gmail.com wrote:
Hello everyone!
Haskell have nice automatically derivable Show type class. It's quite useful
for debugging with one exception. String representation of even moderately
I actually agree with you on that regard, I think the best thing you can get
from Yi is just the basic editing commands (the same you would get from
vim), such as visual/edit mode and whatnot
The best thing that Leksah can turn into (and something that
Haskell desperately needs) is a Haskell
On 02/05/11 17:54, Ketil Malde wrote:
I'm following Harper's blog, Existential Type¹, which I find to be an
enjoyable and entertainingly written tirade about the advantages of
teaching functional programming - specifically ML - to students. Of
course, he tends to be critical of Haskell, but
On 11-05-02 05:31 PM, Huynh Huu Long wrote:
Big thanks, that works for me as well. Doesn't GHC check whether a
type is allowed (like CInt,...) or not (like Bool,...)?
No, it doesn't, since version 6.10.1:
I'm a bit skeptical of adding builders for different variable length
encodings to the library, simply because there are so many
possibilities. I think creating a binary-vle (for variable length
encoding) package would be worthwhile. I have an implementation of the
VLE used in protocol
In one of his blog posts, Robert Harper claims that the natural numbers
are not definable in Haskell.
SML datatype nat = ZERO | SUCC of nat
Haskell data Nat = Zero | Succ Nat
differ in that the SML version has strict constructors, and so only
finite instances of nat can be constructed,
On 11-05-02 11:25 PM, Richard O'Keefe wrote:
Fair enough, but what about
data Nat = Zero | Succ !Nat
It works. I say, Harper forgot it.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
I did most of the Yi integration work done so far, but I have not had time to
work on it lately. Yi already is a library (for dyre) and is designed to work
with different front ends. The approach I took was to add a new Pango
Control front end based on the existing Pango front end.
I think
On 03/05/2011, at 1:25 PM, Richard O'Keefe wrote:
In one of his blog posts, Robert Harper claims that the natural numbers
are not definable in Haskell.
SML datatype nat = ZERO | SUCC of nat
Haskell data Nat = Zero | Succ Nat
differ in that the SML version has strict constructors,
Tony Morris:
Interesting how I have been authoring and subsequently using monads in
scala for several years and it is strictness that gets in the way more
than anything.
Just to make sure that I understand you correctly. You are saying that when
you use monads in Scala, then strictness makes
For a historical perspective, I highly recommend The Definitive Account of the
History of Haskell:
http://research.microsoft.com/en-us/um/people/simonpj/papers/history-of-haskell/index.htm
Section 7 clearly and directly cites the desire to have pure I/O as the
motivation for adopting
43 matches
Mail list logo