| You're right, that's annoying. It's particularly a problem for Windows
| GHC users who expect pre-built binaries, since GHC currently requires
| all libs to be rebuilt with each new minor GHC version.
Are you sure? We try hard not to change interface-file format or calling
conventions between
Michael Vanier [EMAIL PROTECTED] writes:
We always say that Haskell is named for Haskell Curry
because his work provided the logical/computational
foundations for the language. How exactly is this the case?
Specifically, does anyone claim that Curry's combinatorial
logic is more relevant to
On 19 Jul 2007, at 03:40, Tim Chevalier wrote:
On 7/18/07, Michael Vanier [EMAIL PROTECTED] wrote:
We always say that Haskell is named for Haskell Curry because his
work provided the
logical/computational foundations for the language. How exactly
is this the case? Specifically,
does
Just some remarks:
difference = length . filter (==False) . uncurry (zipWith (==))
Maybe
difference = length . filter id . uncurry (zipWith (/=))
or even
difference w = length . filter id . zipWith (/=) w
and defer the call of uncurry. We then have
keepOneDiff = filter (( 2) . uncurry
Jon Fairbairn wrote:
If not, why isn't Haskell called "Alonzo"? ;-)
I think that was one of the suggestions made among many
others. Haskell has the advantage of sounding less like a
person's name (which might have been why Curry didn't like
it)
Actually, the more
On 7/19/07, Claus Reinke [EMAIL PROTECTED] wrote:
the idea is well known: build your app as a server, and put
an ajax-based gui in front of it, even if server and browser
run on the same machine.
A more desktopy alternative: http://www.gtk-server.org/
martin
Hi Derek
On 17 Jul 2007, at 17:42, Derek Elkins wrote:
On Tue, 2007-07-17 at 13:23 +0100, Conor McBride wrote:
Mux...
data{-codata-} Mux x y = Mux (Muy x y)
...is defined by mutual induction with...
data Muy x y = y :- Muy x y | x :~ Mux y x
As an inductive data type, isn't this
as Marc pointed out, there was a problem with my javascript use
that showed up as an event error in firefox. Miguel has suggested
how to remove that issue. i've also added commands to set the
colour explicitly, and to move to the origin after translation, so that
firefox now draws whole
Conor McBride wrote:
Derek Elkins wrote:
As an inductive data type, isn't this empty?
Not in the manner which I intended. But it's a good question whether what I
wrote unambiguously represented what I intended. In full-on nuspeak, I
meant
Mux = Nu mux. Mu muy. /\x y. Either (y, muy x
Dougal Stanton wrote:
I worked out that [ (a,b) | a - as, b - bs ] must be equivalent to
comp = concatMap (\x - map ((,) x) ys) xs
but I can't really say how conditions like a /= b get slotted in to
that style. Is there a reference for that?
Here's an example translation
[ (a,b) | a -
| You're right, that's annoying. It's particularly a problem for Windows
| GHC users who expect pre-built binaries, since GHC currently requires
| all libs to be rebuilt with each new minor GHC version.
Are you sure? We try hard not to change interface-file format or
calling conventions
Mirko Rahn wrote:
wanted ws = [ (w,v) | (w:vs) - tails ws, v - vs, difference w v 2 ]
Moreover, we only calculate the difference to check whether it is
smaller than 2. We can do this directly (capturing the common pattern):
diff_lt_2 = diff (diff (const . const $ False))
diff _ []
On Thu, 2007-07-19 at 12:07 +0100, Claus Reinke wrote:
the idea is well known: build your app as a server, and put
an ajax-based gui in front of it, even if server and browser
run on the same machine.
A more desktopy alternative: http://www.gtk-server.org/
that looks promising. does
On Thu, 2007-07-19 at 10:06 +0100, Simon Peyton-Jones wrote:
| You're right, that's annoying. It's particularly a problem for Windows
| GHC users who expect pre-built binaries, since GHC currently requires
| all libs to be rebuilt with each new minor GHC version.
Are you sure? We try hard
On Thu, 2007-07-19 at 12:02 +0100, Claus Reinke wrote:
is there even tool support for i've got a new major version of ghc, please
rebuild and register everything i had registered for the old major version.?
Gentoo has such a tool. The ghc ebuild instructs users to run
ghc-updater after
Paul Hudak [EMAIL PROTECTED] writes:
Actually, the more compelling reason we chose Haskell
over Alonzo was that, at the time, Church was alive --
he died in 1995 -- whereas Curry was not -- he died in
1982. We felt uncomfortable naming the language after
someone who still alive (however
On 7/18/07, Derek Elkins [EMAIL PROTECTED] wrote:
On Wed, 2007-07-18 at 14:06 -0500, Antoine Latter wrote:
MediaWiki's search isn't fantastic - what I did was a google search on
site:www.haskell.org DLL
It's not a very good answer, but it's the only answer I know.
In general I find
On Thu, 2007-07-19 at 13:01 +0100, Duncan Coutts wrote:
On Thu, 2007-07-19 at 10:06 +0100, Simon Peyton-Jones wrote:
| You're right, that's annoying. It's particularly a problem for Windows
| GHC users who expect pre-built binaries, since GHC currently requires
| all libs to be rebuilt with
Thank-you for the explanation :-) You make it very easy to understand,
awesome :-)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
The question suggests to use some functions defined in the section, and one
of them is iSort.
So i used the function but without using higher-order functions - i don't
know though how correct is it?
minimumValue :: [Int] - Int
minimumValue ns = head (iSort ns)
The other question is to test
MB I think there are some problems with your implementation of
MB first. Here are some examples which don't behave the way I would
MB expect:
You are right. I have a problem and I need to think of it a bit more.
MB My first attempt was to use explicit queues:
So was mine. But then I thought I
You can get the head and the tail by pattern matching. Lets say you have a
function that takes a list:
myfunction list = -- do something here
go = myfuction [1,4,2,6]
... you can write the list bit of the function as (x:xs), where x is the
head, or first element, of the list, and xs is the
On Thu, 19 Jul 2007 10:55:19 -0700 (PDT), you wrote:
The question suggests to use some functions defined in the section, and one
of them is iSort.
Aha. Well, that one certainly lends itself better to this particular
proplen than either map or filter.
minimumValue :: [Int] - Int
minimumValue ns
On 19/07/07, Steve Schafer [EMAIL PROTECTED] wrote:
On Thu, 19 Jul 2007 10:55:19 -0700 (PDT), you wrote:
The question suggests to use some functions defined in the section, and one
of them is iSort.
Aha. Well, that one certainly lends itself better to this particular
proplen than either map or
I tried this version,
however
nsortBy cmp l = mergesort compare l
should be:
nsortBy cmp l = mergesort cmp l
Thanks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I tried this version,
however
nsortBy cmp l = mergesort compare l
should be:
nsortBy cmp l = mergesort cmp l
Thanks
Sorry, with this version I meant:
nsort l = mergesort compare l
nsortBy cmp l = mergesort compare l
mergesort :: (a - a - Ordering) - [a] - [a]
mergesort cmp =
On 2007-07-19, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 19/07/07, Steve Schafer [EMAIL PROTECTED] wrote:
On Thu, 19 Jul 2007 10:55:19 -0700 (PDT), you wrote:
The question suggests to use some functions defined in the section, and one
of them is iSort.
Aha. Well, that one certainly lends
On Thu, 19 Jul 2007 19:26:39 +0100, you wrote:
Actually, since Haskell is lazy and only the first element is required
for minimumValue, the above algorithm should be O(n).
You're right (as long as the sort algorithm itself is sufficiently lazy,
of course).
Steve Schafer
Fenestra Technologies
I have defined the first line it seems right to me but second line not sure.
I have True or False and whatever value i give it produces that value.
allEqual :: [Int] - Bool
allEqual (x1:x2:xs) = (x1 == x2) allEqual xs
allEqual _ = ???
Steve Schafer wrote:
On Thu, 19 Jul 2007
On Thursday 19 July 2007, Alexteslin wrote:
I have defined the first line it seems right to me but second line not
sure. I have True or False and whatever value i give it produces that
value.
allEqual :: [Int] - Bool
allEqual (x1:x2:xs) = (x1 == x2) allEqual xs
allEqual _ = ???
At Philips Research (Eindhoven, The Netherlands), we have a Haskell
master-thesis project in the context of interactive toys. We are developing
a platform for serious toys and games. In this project, we add advanced
interactivity based on wireless sensors to traditional toy designs. This
can be
The standard (and simplest) definition for universally quantified
predicates (all) starts with True and looks for a False occurrance:
Prelude all even []
True
Conversely, existentially-quantified predicates (any) start with False
and looks for a True occurrance:
Prelude any even []
False
I
Anthony Clayden wrote:
(Or at least the problem is under-specified.)
1. There may be several sub-sequences having the maximum
sum.
So the type for the solution should be :: Num a = [a] -
[[a]]
2. The inits . tails approach adds a fault:
It introduces a sprinkling of empty
On 7/19/07, Dan Weston [EMAIL PROTECTED] wrote:
I would define:
allEqual [] = True
allEqual [_]= True
allEqual (x1:x2:xs) = (x1 == x2) allEqual xs
What does this function do for allEqual [1, 1, 2] ?
Antoine
___
Haskell-Cafe
On 19/07/07, Aaron Denney [EMAIL PROTECTED] wrote:
On 2007-07-19, Sebastian Sylvan [EMAIL PROTECTED] wrote:
On 19/07/07, Steve Schafer [EMAIL PROTECTED] wrote:
On Thu, 19 Jul 2007 10:55:19 -0700 (PDT), you wrote:
The question suggests to use some functions defined in the section, and one
of
On Thu, 19 Jul 2007 12:30:06 -0700 (PDT), you wrote:
I have defined the first line it seems right to me
Close, but not quite. Think of the result that line would give on
[1,1,2].
Steve Schafer
Fenestra Technologies Corp.
http://www.fenestra.com/
___
Oops, you got me. I didn't even look at the third line, I just took it
from the previous post. My first instinct actually was to write:
allEqual x@(h:t) = and (zipWith (==) x t)
but I don't think that zipWith is allowed in the question.
Dan
Antoine Latter wrote:
On 7/19/07, Dan Weston
Thanks you, that works fine. Sometimes I am not sure what the exercise asks.
For example in the section of higher order functions i presume most
exercises would be to use those functions, but it seems that that not always
true.
Dan Weston wrote:
The standard (and simplest) definition for
On 7/19/07, Dan Weston [EMAIL PROTECTED] wrote:
Oops, you got me. I didn't even look at the third line, I just took it
from the previous post. My first instinct actually was to write:
allEqual x@(h:t) = and (zipWith (==) x t)
I prefer,
allEqual [] = True
allEqual xs = foldl1 (==) xs
But,
On 7/19/07, Jason Dagit [EMAIL PROTECTED] wrote:
On 7/19/07, Dan Weston [EMAIL PROTECTED] wrote:
Oops, you got me. I didn't even look at the third line, I just took it
from the previous post. My first instinct actually was to write:
allEqual x@(h:t) = and (zipWith (==) x t)
I prefer,
The real lesson here is that
1) no problem is too easy to cheat good software engineering practices.
2) no solution not accompanied by at least a QuickCheck result should be
viewed with suspicion
I obviously have to go back and relearn these lessons.
Dan
Jason Dagit wrote:
On 7/19/07,
What wrong with my original solution?
allEqual2 :: [Int] - Bool
allEqual2 xs = length xs == length (filter isEqual xs)
where
isEqual n = (head xs) == n
It looks simpler to me
Dan Weston wrote:
The real lesson here is that
1) no problem is too easy to cheat good software
The length command is too greedy. It wants to check the entire length of
both lists, and only then compare. If you did this by hand, you would
know to quit at the first nonequal element. To do this in Haskell, you
should generally avoid length. Lazier functions such as and stop as
soon as they
On 7/19/07, Alexteslin [EMAIL PROTECTED] wrote:
What wrong with my original solution?
allEqual2 :: [Int] - Bool
allEqual2 xs = length xs == length (filter isEqual xs)
where
isEqual n = (head xs) == n
It looks simpler to me
I believe it's correct, but the use of length and
is there even tool support for i've got a new major version of ghc, please
rebuild and register everything i had registered for the old major
version.?
We will have soon. The nix distribution system will be able to do
exactly this.
You pass a ghc compiler for each build description. Passing
Not applying (probably not eligible), just answering for fun, so feel free
to pipe to null :-D :
Is your target user for the language the end-user of the toy itself, or a
toy designer who will be using your middleware?
I'm guessing the latter. Is there any reason why you cant use Lua? It's an
Just found this in a gmail adtext link, it's quite interesting (and
convincing): http://www.janestcapital.com/yaron_minsky-cufp_2006.pdf
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 7/19/07, Sebastian Sylvan [EMAIL PROTECTED] wrote:
Actually, since Haskell is lazy and only the first element is required
for minimumValue, the above algorithm should be O(n).
That's pretty cool :-)
___
Haskell-Cafe mailing list
Andrew Coppin [EMAIL PROTECTED] wrote:
Chris Smith wrote:
Well, it doesn't have to go over anywhere. I'm reading and posting
just fine with NNTP right now. It works great.
How'd you manage that?
Andrew, sorry for the delay. Just point a news reader at
news.gmane.org.
--
Chris
I was hoping someone could direct me to material on how I might go about
optimizing a small parsing program I wrote. Used for calculating
differences between two files that store a hash of hashes (each line is
a hash, each line has key=value pairs seperated by commas), the
bottleneck seems to be
Re, Joseph (IT) wrote:
At this point I'm out of ideas, so I was hoping someone could identify
something stupid I've done (I'm still novice of FP in general, let alone
for high performance) or direct me to a guide,website,paper,library, or
some other form of help.
Two ideas about your
Hi, again.
I started looking at the Euler problems [1]. I had no trouble with
problems 1 through 10, but I'm stuck on problem 11. I am aware that
the solutions are available ([2]), but I would rather not look just
yet.
In Problem 11, a 20x20 grid of numbers is given, and the problem is to
Here's my hint, FWIW.
Pick a data structure that makes your life easier, i.e. where horz,
vert, and diag lines are handled the same way. Instead of a 2D
structure, use a 1D structure.
Then,
data Dir = Horz | Vert | LL | LR
stride Horz = 1
stride Vert = rowLength
stride LL = rowLength - 1
53 matches
Mail list logo