On Fri, Dec 4, 2009 at 12:13 AM, M Xyz functionallyharmoni...@yahoo.comwrote:
Greetings, my name is M. This is my first time posting to a mailing list so
forgive me if I've done something wrong. I just finished Real World
Haskell and am currently working through School of Expression. I am new
On Thu, Dec 3, 2009 at 8:25 AM, John D. Earle johndea...@cox.net wrote:
Haskell has a problem with its type system and is not rigorous. Haskell is
not a suitable language for proof assistants and so I would advise you to
stay clear of Haskell. Standard ML was engineered with the needs of proof
| So I think that if local let generalisation is abandoned, let bindings in GHCi
| would somehow have to be modified to remain polymorphic.
I agree. They are like top-level bindings in a Haskell module, and should be
generalised. They don't suffer from the problems of generalising nested
The suggestion was to have a single Download button, leading to a *page* of
suitably described links, allowing the user to choose whether they only
wanted the basics (a choice of compiler/interpreter + cabal), or the whole
Platform, or something else. It would be the ideal place to explain
2009/12/3 Jeremy Shaw jer...@n-heptane.com:
See this thread,
http://groups.google.com/group/happs/browse_thread/thread/6e4d6af0109cc649
Ah, thank you. I somehow missed that.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Brent Yorgey byor...@seas.upenn.edu writes:
It's not too late to write something for Issue 15 of the Monad.Reader!
Whether you're an established academic or have only just started
learning Haskell, if you have something to say, please consider
writing an article for The Monad.Reader!
One
Please help me understand the holes in Haskell's type system.
Not really wanting to support the troll, but ...
unsafePerformIO?
Can't it be removed?
--
Colin Adams
Preston,
Lancashire,
ENGLAND
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Or maybe it should be renamed
proofObligationsOnUseNeedToBeSupliedBySuitablyQualifiedIndividualPerformIO
which is what it really is - unsafe in the wrong hands
Nei
On 4 Dec 2009, at 08:57, Colin Adams wrote:
Please help me understand the holes in Haskell's type system.
Not really
But the type system doesn't insist on such a proof - so is it not a hole?
2009/12/4 Neil Davies semanticphilosop...@googlemail.com:
Or maybe it should be renamed
proofObligationsOnUseNeedToBeSupliedBySuitablyQualifiedIndividualPerformIO
which is what it really is - unsafe in the wrong hands
On 04/12/2009 01:30, Gwern Branwen wrote:
The changes look fine to me, although I'm a little surprised at all
the {{fact}} tags. (Some of them look very easy to fix, like why
typeclasses were introduced in the first place.)
Yes, they're just placeholders to fill in later. (I'm new to
Ah
but the type system is the proof - it doesn't permit you to construct
things that are 'unsafe' - the whole way the language (and its
implementation) is constructed is to do that for you.
The issue is that, very occasionally, you the programmer (usually for
reasons of performance -
Friends
One of the absolutely best things about the Haskell community is that it is
almost invariably respectful and usually friendly. People often remark on this
when they join the community. Beginner questions are greeted with polite and
helpful replies. Category theory and elementary
On Fri, Dec 4, 2009 at 10:34 AM, Simon Peyton-Jones
simo...@microsoft.com wrote:
Friends
Amen !
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Emmanuel CHANTREAU wrote:
I will take an example:
f x y= x+y
The program ask the user to enter two numbers and print the sum. If the
user enter 1 2 f 1 2=3 is stored and a gargage collector is used to
remove this dandling expression later ?
If the user enter again 1 2, ghc search in dandling
Hi,
Am Freitag, den 04.12.2009, 01:00 +0100 schrieb Joachim Breitner:
And just now, after writing half the code, I find out that $( fun
[d|...|] ) runs the type checker on the declarations before passing them
to fun, which of course kills my whole approach here, as only having the
On Fri, Dec 4, 2009 at 3:36 AM, Neil Brown nc...@kent.ac.uk wrote:
But let's say you have:
g x y = f x y * f x y
Now the compiler (i.e. at compile-time) can do some magic. It can spot the
common expression and know the result of f x y must be the same both times,
so it can convert to:
g
Hi,
Am Freitag, den 04.12.2009, 10:36 + schrieb Neil Brown:
But let's say you have:
g x y = f x y * f x y
Now the compiler (i.e. at compile-time) can do some magic. It can
spot the common expression and know the result of f x y must be the
same both times, so it can convert to:
g
Don Stewart wrote:
vandijk.roel:
On Wed, Dec 2, 2009 at 11:44 PM, Gregory Crosswhite
gcr...@phys.washington.edu wrote:
On a more serious note, Download Haskell /= Download Haskell Platform, so if I were glancing
down the sidebar looking for a link to download the Haskell Platform then the
Emmanuel CHANTREAU wrote:
In my futur program, it use a lot of binary trees with strings (words)
as leaf. There is just arround 1000 words and they will appear a lot of
times. The program will possibly consume a lot of process and memory
(it is a mathematics proover).
If your strings are
On Fri, Dec 4, 2009 at 00:30, Simon Marlow wrote:
As noted before, the Wikipedia article for Haskell is a disorganised mess.
http://en.wikipedia.org/wiki/Haskell_%28programming_language%29
I'm confused. When I'm logged in to Wikipedia, I see a page that is vastly
different from when I'm not
On 04/12/2009 11:18, Sean Leather wrote:
On Fri, Dec 4, 2009 at 00:30, Simon Marlow wrote:
As noted before, the Wikipedia article for Haskell is a disorganised
mess.
http://en.wikipedia.org/wiki/Haskell_%28programming_language%29
I'm confused. When I'm logged in to Wikipedia, I
Hi,
I'm using the language-dot package to generate some .dot file.
I'm wondering how to make edges. I was expecting to generate something like
1 - {2 ; 3}
but get in fact
1
- 2 - 3
I used the (pseudo) statements
[NodeStatement $ NodeID 1, EdgeStatement [NodeId 2, NodeId 3]]
What is the
On Fri, Dec 4, 2009 at 12:20, Simon Marlow wrote:
On 04/12/2009 11:18, Sean Leather wrote:
On Fri, Dec 4, 2009 at 00:30, Simon Marlow wrote:
As noted before, the Wikipedia article for Haskell is a disorganised
mess.
http://en.wikipedia.org/wiki/Haskell_%28programming_language%29
Peter Verswyvelen wrote:
It would be fantastic to have a little practical real-world challenge
(like building a simple music system, or a simple multi-channel sound
mixer), and work this out in an imperative language, an
object-oriented language, a functional language, and maybe other
*Shameless plug* use my graphviz package!
OK, relevant answer:
minh thu not...@gmail.com writes:
I'm wondering how to make edges. I was expecting to generate something like
1 - {2 ; 3}
but get in fact
1
- 2 - 3
I used the (pseudo) statements
[NodeStatement $ NodeID 1, EdgeStatement
I'm looking for the right concurrency library/semantics for what
should be a reasonably simple problem.
I have a little simulator:
runWorldSim :: MTGen - SimState - IO SimState
it takes about a second to run on a PC. It's functional except it whacks
the rng, which needs IO. I run 5-10 of
Patrick Caldon p...@pessce.net writes:
it takes about a second to run on a PC. It's functional except it
whacks the rng, which needs IO. I run 5-10 of these jobs, and then
use:
Which RNG are you using that it needs so much IO?
mergeWorld :: [SimState] - SimState
to pick the best features
Ivan Lazar Miljenovic wrote:
Patrick Caldon p...@pessce.net writes:
it takes about a second to run on a PC. It's functional except it
whacks the rng, which needs IO. I run 5-10 of these jobs, and then
use:
Which RNG are you using that it needs so much IO?
Mersenne Twister,
Patrick Caldon wrote:
I'm looking for the right concurrency library/semantics for what
should be a reasonably simple problem.
I have a little simulator:
runWorldSim :: MTGen - SimState - IO SimState
it takes about a second to run on a PC. It's functional except it
whacks the rng, which
On Tue, Oct 13, 2009 at 9:44 PM, Don Stewart d...@galois.com wrote:
http://www.galois.com/blog/2009/10/13/domain-specific-languages-for-domain-specific-problems/
It advocates for Haskell + EDSLs, much as we have been discussing in
this thread.
I am think that use of EDSLs for Physics
Ketil Malde wrote:
Although I don't care for the cutesy naming suggested in the 'Train'
datatype [...]
data TerminatedList a e = Then a (TerminatedList a e)
| Finally e
(So you could do e.g: 4 `Then` 5 `Then` 1 `Finally` success!. Of
course, you might prefer
On Fri, Dec 4, 2009 at 13:11, Max Rabkin wrote:
On Fri, Dec 4, 2009 at 1:18 PM, Sean Leather leat...@cs.uu.nl wrote:
I'm confused. When I'm logged in to Wikipedia, I see a page that is
vastly
different from when I'm not logged in. I haven't played with Wikipedia in
a
long time, so
Neil Brown wrote:
Patrick Caldon wrote:
I'm looking for the right concurrency library/semantics for what
should be a reasonably simple problem.
I have a little simulator:
runWorldSim :: MTGen - SimState - IO SimState
it takes about a second to run on a PC. It's functional except it
Simon Peyton-Jones simo...@microsoft.com writes:
Respect, guys, please.
Yes. Much as I enjoy the mangling of Shakespeare (finally some use out
of that Eng.Lit. class all those years ago), I worry that this will
finally be the thread that launched a thousand replies and burned the
bottomless
2009/12/4 Ivan Lazar Miljenovic ivan.miljeno...@gmail.com:
*Shameless plug* use my graphviz package!
Ok. I see your DotEdge has explicit from/to nodes but not
language-dot. I've not a lot of code, so using your package should be
easy. But still I wonder what the intended usage of languge-dot
On Fri, Dec 4, 2009 at 6:36 AM, Evan Laforge qdun...@gmail.com wrote:
I'd just like to point out or reiterate the odd rise in trolling and the
recent announcements of haskell-2010...
Just wait until haskell-2012 is announced with nonexistential aka
eschatological types spelled notany a.
Daniel Fischer schrieb:
Am Mittwoch 02 Dezember 2009 18:54:51 schrieb Christian Maeder:
Daniel Fischer schrieb:
However, according to a couple of tests, the funkyName version is
somewhat faster and allocates less.
My timing tests showed that your fpairs version is fastest.
Interesting. Using
_So my strong opinion that solution is only DSL not EDSL_
Why do you think they will learn your DSL, if they don't learn any
other language? And if your DSL includes general purpose stuff, like
functions, control structures, data structures, you'll re-invent the
wheel. Probably porly.
wren ng thornton wrote:
One of the nice things about not having a Nil is that it lets you easily
be polymorphic over things ending in () ---a normal list---, (Maybe a)
---a fallible list---, (Either a b) ---your progress type---, etc.
Whereas the version that has both Nil and End forces us
On Fri, Dec 4, 2009 at 6:42 AM, Christian Maeder
christian.mae...@dfki.de wrote:
Daniel Fischer schrieb:
Am Mittwoch 02 Dezember 2009 18:54:51 schrieb Christian Maeder:
Daniel Fischer schrieb:
However, according to a couple of tests, the funkyName version is
somewhat faster and allocates
On Fri, 2009-12-04 at 22:51 +1100, Patrick Caldon wrote:
I'm looking for the right concurrency library/semantics for what
should be a reasonably simple problem.
I have a little simulator:
runWorldSim :: MTGen - SimState - IO SimState
it takes about a second to run on a PC. It's
Luke Palmer schrieb:
\begin{code}
allPossibilities :: [[a]] - [[a]]
allPossibilities [] = [[]]
allPossibilities (l:ls) = [ x : xs | x - l, xs - allPossibilities ls]
I am confused. This is exactly sequence. How is this a faster
version? Other than maybe avoiding some dictionary-passing?
Gregory Crosswhite schrieb:
If there is one thing that we really don't have enough of in Haskell, it is
*ways to handle errors*! Thus, I am pleased to announce the release of the
error-message package to help in filling this, erm, gap.
This philosophy behind this package is that it is
Gregory Crosswhite schrieb:
When I uploaded my new package, error-message, I also went ahead and
created a new category: Error Handling.
Error handling is the same as debugging for you? I hope it is not
intended for generating further confusion about exception handling and
debugging (= help
Hi Simon and others,
Personally I don't see anything wrong with this guy's line of questioning.
He wants some proof that Haskell can live up to some of the claims made
about it. There's a lot of selling of languages like Clojure, Scala, and
Haskell going on that have real world examples showing
d
On Thu, Dec 3, 2009 at 7:55 PM, Gregory Collins g...@gregorycollins.netwrote:
Conal Elliott co...@conal.net writes:
I'd like to make some FRPish toys that keep files updated to have
functional relationships with other files. hinotify looks like just
the sort of underlying magic I
kqueue is the low level interface, but requires that you handle all
file system events as they happen, and fast. There is a higher level
interface called fsevents (with accompanying daemon fseventsd) which
allows you a more calm way to read the file system events.
There is nothing wrong with constructive criticism and debate. We
should welcome it and I think that the initial response did. But the
OP's follow up of:
It will be better for all of you to figure it out for yourselves and
gain more experience about what is out there. Haskell isn't the world.
On Fri, Dec 4, 2009 at 5:31 PM, Ross Mellgren rmm-hask...@z.odi.ac wrote:
kqueue is the low level interface, but requires that you handle all file
system events as they happen, and fast.
For the purposes of creating a binding in haskell, my preferred way
would be to use the low-level interface
On Dec 4, 2009, at 2:43 AM, Luke Palmer wrote:
So GHC leaves it to the user to specify sharing. If you want an
expression shared, let bind it and reuse.
Does GHC treat where and let the same in this regard? Or in code, are these
treated the same?
x'' = sum l + product l where l =
I thought we were supposed to be civil on this list?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Dec 04, 2009 at 01:43:42PM +, Matthias Görgens wrote:
_So my strong opinion that solution is only DSL not EDSL_
Why do you think they will learn your DSL, if they don't learn any
other language?
I didn't said that they didn't learn any language. They learn languages,
but
only
Am Freitag 04 Dezember 2009 16:48:25 schrieb Christian Maeder:
Luke Palmer schrieb:
\begin{code}
allPossibilities :: [[a]] - [[a]]
allPossibilities [] = [[]]
allPossibilities (l:ls) = [ x : xs | x - l, xs - allPossibilities ls]
I am confused. This is exactly sequence. How is this a
On Thu, 2009-12-03 at 19:49 -0500, wren ng thornton wrote:
Duncan Coutts wrote:
I've got an open mind on the suggestion to amalgamate the two ways the
list could end. I'm not especially in favour of generalising for the
sake of generalising, especially if it looses the connection to the
Well, I don't think anything bad will happen, but I think I remember
there being no/little buffering, so your program had to be responsive
if you wanted to get the events. fseventsd is a daemon on top that
keeps logs, so you can read them at leisure.
I'm sorry I can't find the original
On Dec 4, 2009, at 7:55 AM, Henning Thielemann wrote:
Gregory Crosswhite schrieb:
If there is one thing that we really don't have enough of in Haskell, it is
*ways to handle errors*! Thus, I am pleased to announce the release of the
error-message package to help in filling this, erm, gap.
On Thu, 2009-12-03 at 13:03 +0100, Emmanuel CHANTREAU wrote:
Hello
In my futur program, it use a lot of binary trees with strings (words)
as leaf. There is just arround 1000 words and they will appear a lot of
times. The program will possibly consume a lot of process and memory
(it is a
On Fri, Dec 4, 2009 at 9:44 AM, Mark Lentczner ma...@glyphic.com wrote:
On Dec 4, 2009, at 2:43 AM, Luke Palmer wrote:
So GHC leaves it to the user to specify sharing. If you want an
expression shared, let bind it and reuse.
Does GHC treat where and let the same in this regard? Or in code,
On Fri, Dec 4, 2009 at 9:34 AM, Keith Sheppard keiths...@gmail.com wrote:
There is nothing wrong with constructive criticism and debate. We
should welcome it and I think that the initial response did. But the
OP's follow up of:
It will be better for all of you to figure it out for yourselves
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr | AConst Int
The first one supports addition and multiplication and the second
only addition.
I can write a function to simplify the first expression:
simplify :: Expr
It is possible to do this automatically, but you'll have to program
the automation yourself with Template Haskell.
2009/12/4 Radek Micek radek.mi...@gmail.com:
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr |
On Fri, Dec 4, 2009 at 10:26 AM, Radek Micek radek.mi...@gmail.com wrote:
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr | AConst Int
The first one supports addition and multiplication and the second
only
On Fri, Dec 4, 2009 at 11:26 AM, Radek Micek radek.mi...@gmail.com wrote:
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr | AConst Int
The first one supports addition and multiplication and the second
only
Daniel Fischer schrieb:
allPossibilities :: [[a]] - [[a]]
allPossibilities [] = [[]]
allPossibilities (l:ls) = [ x : xs | xs - allPossibilites ls, x - l ]
I cannot really observe a speed up, with this version, but there are
probably examples where any version is faster than the other.
I
On Thu, Dec 3, 2009 at 5:09 PM, John D. Earle johndea...@cox.net wrote:
See [Haskell-cafe] Optimization with Strings ? for background.
Don Stewart wrote, the guarantees of purity the type system provides are
extremely
useful for verification purposes. My response to this is in theory. This
On Fri, Dec 04, 2009 at 11:52:35AM -0600, Derek Elkins wrote:
On Fri, Dec 4, 2009 at 11:26 AM, Radek Micek radek.mi...@gmail.com wrote:
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr | AConst Int
The
wren ng thornton wrote:
concat1 :: T a b - (b - T a b) - T a b
This could just as easily be
concat :: T a b - (b - T a c) - T a c
right? It's a little weird to call this concatenation, but I bet it
could come in handy.
--
Jason McCarty jmcca...@sent.com
Sebastian,
It helps if you think of John as having already won in this discussion, since
he succeeded in getting a lengthy high-noise emotional reaction from us. :-)
Cheers,
Greg
On Dec 4, 2009, at 10:00 AM, Sebastian Sylvan wrote:
On Thu, Dec 3, 2009 at 5:09 PM, John D. Earle
I have created an entry in the syb-with-class issue database
here:http://code.google.com/p/syb-with-class/issues/detail?id=3
I attached a version of the code with the necessary bits of
Happstack.Data.Default included in-line.
On Thu, Dec 3, 2009 at 2:50 PM, Jeremy Shaw jer...@n-heptane.com
2009/12/04 Simon Peyton-Jones simo...@microsoft.com:
If you think someone is talking nonsense, I think the best
policy is to ignore it or reply privately (not to the list);
then the thread dies. I find derogatory discussion of a
particular person quite discouraging. It is likely to be
What is the most minimal (preferably platform independent) library available
for writing bytes to the sound card? I see 60 wonderful libraries on Hackage,
but I really just need the Haskell equivalent of an audio.write(byte[]) method.
What sound api are these 60 libraries using?
I think the
Gregory Crosswhite wrote:
I have posted Blueprint to Hackage so that people can see what I have done
and possibly play with it.
Very interesting, this. However, I could not build it. I get
b...@sarun[2]: ~/tmp cabal install blueprint
Resolving dependencies...
cabal: There is no installed
Hi,
portaudio is my embarrassing fault, but it does work most of the time.
(Community, some one remind me to revisit this package after Christmas.)
Are you running in Windows? Linux? If Linux, which flavor?
/jve
On Fri, Dec 4, 2009 at 1:51 PM, M Xyz functionallyharmoni...@yahoo.comwrote:
Hi all,
I have a small FFI-based library that I like to test like this:
$ ghci -I../c -L../c/.libs -lmlp t.hs
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base
Am Freitag 04 Dezember 2009 19:00:33 schrieb Christian Maeder:
aP1 [] = [[]]
aP1 (h:t) = do
x - h
xs - aP1 t
return (x:xs)
for every x in h, we calculate the combinations of t anew.
Do we? Isn't aP1 t one closure that's being evaluated only once?
That depends.
Well, since he thinks we're fanatics, getting a strong emotional
reaction from us is something one certainly wouldn't desire.
On 4 Dec 2009, at 21:14, Gregory Crosswhite wrote:
Sebastian,
It helps if you think of John as having already won in this
discussion, since he succeeded in getting
Hi,
portaudio is my embarrassing fault, but it does work most of the time.
(Community, some one remind me to revisit this package after Christmas.)
Are you running in Windows? Linux? If Linux, which flavor?
/jve
I'm using Haskell on XP but I dual boot with Ubuntu 9 and I'd prefer not to
You'll have to install the portaudio C libraries and header files before
continuing. I never actually tested the package on XP, if you get it to
work, I'd love to hear your experience.
/jve
On Fri, Dec 4, 2009 at 2:20 PM, M Xyz functionallyharmoni...@yahoo.comwrote:
Hi,
portaudio is my
On 04/12/09 11:51, Patrick Caldon wrote:
I'm looking for the right concurrency library/semantics for what
should be a reasonably simple problem.
I have a little simulator:
runWorldSim :: MTGen - SimState - IO SimState
it takes about a second to run on a PC. It's functional except it
Yes, that is because at this time Blueprint is presently of a lower quality
than other packages on Hackage. ;-) At the moment you need to execute the
setup script manually:
runhaskell Setup.hs bootstrap
./Setup configure
./Setup build +RTS -N4 -RTS
./Setup
On Fri, Dec 4, 2009 at 1:14 PM, Jason McCarty jmcca...@sent.com wrote:
wren ng thornton wrote:
concat1 :: T a b - (b - T a b) - T a b
This could just as easily be
concat :: T a b - (b - T a c) - T a c
right? It's a little weird to call this concatenation, but I bet it
could come in
On 02/12/09 01:55, Michael Mossey wrote:
I have a quite messy problem which is describable as a big state
machine, at least in the way I think of it. An input event can
trigger a cascade of changes to the state. Channel numbers must be
assigned and tracked, table numbers as well, decisions
if you get it to work
As a spoiled Java programmer, this new role as pioneer is a bit intimidating,
but I will give it a shot. :)
I downloaded the portaudio v19 source and I'm attempting to build it.
Apparently I have to register my Visual Studio Express with Microsoft. Deeper
down the
I have stripped things down to the bare minimum, and test under GHC
6.10, GHC 6.12, Linux, and Mac OS X. Results are consistent.
In the following code,
1. if you load the code into ghci and evaluate e it will hang, but
(defaultValueD dict) :: Expression returns fine
2. if you change the
2009/12/4 M Xyz functionallyharmoni...@yahoo.com
if you get it to work
As a spoiled Java programmer, this new role as pioneer is a bit intimidating,
but I will give it a shot. :)
I downloaded the portaudio v19 source and I'm attempting to build it.
Apparently I have to register my
Thank you for your reply. If I understand this correctly
I can use your solution to have functions which work on any
subsets of constructors like in this example:
{-# LANGUAGE GADTs, EmptyDataDecls #-}
data Yes
data No
data AnyType a b c where
A :: AnyType Yes b c
B :: AnyType a Yes c
C
On Mon, Nov 23, 2009 at 12:29 PM, Antoine Latter aslat...@gmail.com wrote:
I finally had some time to test it. After running it multiple times
(of course, it would be nice to use criterion here), I'm getting
numbers in this neighborhood:
I used criterion to compare pandoc compiled with
Are there major inefficiencies in Haskell compared to OCaml?
If so, can something be done about them?
--
Regards,
Casey
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
caseyh:
Are there major inefficiencies in Haskell compared to OCaml?
If so, can something be done about them?
Can you be more specific?
Looking at the u64q shootout:
http://shootout.alioth.debian.org/u64q/benchmark.php?test=alllang=ghclang2=ocamlbox=1
Shows the two implementations tied
Although, in Luke's example,
x = sum [1..10^6] + product [1..10^6]
x' = let l = [1..10^6] in sum l + product l
We can do much much better, if we're sufficiently smart.
-- Define:
bar m n = foo (enumFromTo m n)
foo xs = sum xs + prod xs
-- We're given:
sum = foldl (+) 0
product = foldl (*) 1
On Fri, Dec 4, 2009 at 4:25 PM, Casey Hawthorne cas...@istar.ca wrote:
Are there major inefficiencies in Haskell compared to OCaml?
If so, can something be done about them?
There are definitely some gotchas when it comes to performance, mostly in
the realm of inadvertent space leaks and
2009/12/4 Evan Laforge qdun...@gmail.com:
The interesting thing is CAFs, which at the top level will never be
out of scope and hence live forever.
Untrue! CAFs can be garbage collected as well. See:
http://www.haskell.org/pipermail/glasgow-haskell-users/2005-September/009051.html
Casey Hawthorne wrote:
Are there major inefficiencies in Haskell compared to OCaml?
As a five plus year veteran of Ocaml and a one year user of Haskell
I would say in general no.
However, Ocaml's strict evaluation makes it easy for someone new to
the language to have a pretty accurate guess
Did you look at synthesizer ? There is a short introductory file [1].
Cheers,
Thu
[1]
http://hackage.haskell.org/packages/archive/synthesizer-core/0.2.1/doc/html/Synthesizer-Plain-Tutorial.html
Thanks for the tutorial link. As I'm new to Haskell, these 2 lines got me
thinking: Using plain
I admit author's bias, but I suggest graphics-drawingcombinators. It is a
2D drawing library based on OpenGL with a pure interface (no IO, except to
finally render your drawing), and supports all the stuff you want except
clipping.
It uses the SDL bindings, which I have heard are not easy
On Fri, Dec 4, 2009 at 8:39 AM, Svein Ove Aas svein@aas.no wrote:
That said.. you say you have to handle the events fast. What happens
if you don't?
If you don't handle events quickly, they're typically thrown away by the
kernel without you ever getting to read them. That is, for
On Dec 4, 2009, at 5:30 PM, Bryan O'Sullivan wrote:
On Fri, Dec 4, 2009 at 8:39 AM, Svein Ove Aas svein@aas.no
wrote:
That said.. you say you have to handle the events fast. What happens
if you don't?
If you don't handle events quickly, they're typically thrown away by
the kernel
However, Ocaml's strict evaluation makes it easy for someone new to
the language to have a pretty accurate guess about its run time and
memory usage something which can be difficult in the face of Haskell's
lazy evaluation (not that I have experienced any obvious manifestations
of this myself).
Luke Palmer wrote:
On Fri, Dec 4, 2009 at 10:26 AM, Radek Micek radek.mi...@gmail.com wrote:
Hello.
I have two types for expression:
data Expr = Add Expr Expr | Mul Expr Expr | Const Int
data AExpr = AAdd AExpr AExpr | AConst Int
The first one supports addition and multiplication and the
Conal,
If I were looking to do this, I'd read the relevant parts of the libev code.
Matt
On 12/3/09, Conal Elliott co...@conal.net wrote:
I'd like to make some FRPish toys that keep files updated to have functional
relationships with other files. hinotify looks like just the sort of
1 - 100 of 116 matches
Mail list logo