| I see no need two answer this again I believe I have already made my
| views perfectly clear already and provided ample evidence to justify
| them. Surely I don't need to do it again?
Is there a Wiki page about this somewhere? Often email gets into a loop
because not everyone reads
On 20-mei-2007, at 17:39, Anthony Chaumas-Pellet wrote:
Hello,
I'm currently hacking away a wxhaskell program that uses up 100% CPU
even when it should be idle. So, rather than doing blind guesswork,
I've thought about using profiling to spot the zealous function. I do
not need a very
On 21-mei-2007, at 9:31, Simon Peyton-Jones wrote:
| I see no need two answer this again I believe I have already made my
| views perfectly clear already and provided ample evidence to justify
| them. Surely I don't need to do it again?
Is there a Wiki page about this somewhere? Often email
Hello,
Has anyone got any pointers on using SWIG with Haskell to integrate a
C++ library? For the library there other language bindings, so I am in a
position to leverage off these.
In general what are the particular issues with C++ and Haskell. One
obvious one is management of object
| The following doesn't seem to work. Is this a limitation of the current
| implementation or will it never work? Are there any work arounds without
| introducing extra type params into the data type E?
|
| class G a b | a - b where
| data E a :: *
| wrap :: b - E a
| unwrap :: E a
On Wed, 18 Apr 2007, Dan Weston wrote:
You have already won over the scientists.
I only know few mathematicians using Haskell, most of the (applied)
mathematician colleagues I know prefer MatLab.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Wed, 28 Mar 2007, Benjamin Franksen wrote:
Hi,
I often run into the following issue: I want to write a list of lengthy
items like this
mylist = [
quite_lengthy_list_item_number_one,
quite_lengthy_list_item_number_two,
quite_lengthy_list_item_number_three
]
On Sat, 28 Apr 2007, Hans van Thiel wrote:
Thanks again for the help, and, to follow up, this now does what I
need..
-- partitions a list according to an equivalence relation
partition1 :: (a - a - Bool) - [a] - ([a],[a])
partition1 eq ls = partition ((head ls) `eq`) ls
--
partitionBy
On Sat, 28 Apr 2007, Hans van Thiel wrote:
Hello All,
The standard function groupBy of List.hs doesn't work as I expect in
this case:
groupBy (\x y - (last x) == (last y)) [abc, bd,cac]
results in:
[[abc],[bd],[cac]]
where I want:
[[abc,cac], [bd]]
I think you must roll your own
On Sat, 31 Mar 2007, Jacques Carette wrote:
Bryan Burgers wrote:
On 3/31/07, Scott Brown [EMAIL PROTECTED] wrote:
It's working now, thank you.
I changed the definition to
binom n j = div (fac n) ((fac j)*(fac (n - j)))
bernoulli n p j = fromIntegral(binom n j)*(p ^ j) * ((1 -
On Mon, May 21, 2007 at 10:36:00AM +0100, Simon Peyton-Jones wrote:
| The following doesn't seem to work. Is this a limitation of the current
| implementation or will it never work? Are there any work arounds without
| introducing extra type params into the data type E?
|
| class G a b | a -
I have a dream. It's not a little dream. It's a big dream. I have a
dream that someday I can find a UNIX/Linux text editor for Haskell
hacking (and possibly two or three hundred other programming languages,
although that's optional) that can give me all of the following:
1. A real GUI
What I meant is this:
http://en.wikipedia.org/wiki/Combinatorics#Combination_without_repetition
the order does not matter and each object can be chosen only once.
But thank all those who have offered help, it helps a lot ;)
--
View this message in context:
Michael T. Richter wrote:
I have a dream. It's not a little dream. It's a big dream. I have a
dream that someday I can find a UNIX/Linux text editor for Haskell
hacking (and possibly two or three hundred other programming languages,
although that's optional) that can give me all of the
You are not missing anything obvious. The process is in fact
somewhat tricky. What you have to do is the following snip
Thanks! I've followed your instructions and got a profiler-enabled
binary up and running. I'd figured out how to modify the Makefile
(silly me searching for *G*HC), but I had
| | instance G a b where
| | data E a = EC b -- this line - the b is not in scope.
| | wrap = EC
| | unwrap (EC b) = b
| |
| | I get Not in scope: type variable `b'.
|
| That's a bug. b should be in scope
I was wrong. It's not a bug. E is supposed to be a type
geniusfat wrote:
What I meant is this:
http://en.wikipedia.org/wiki/Combinatorics#Combination_without_repetition
the order does not matter and each object can be chosen only once.
But thank all those who have offered help, it helps a lot ;)
Then you want triples1 from the code below.
The
[EMAIL PROTECTED] wrote:
Then you want triples1 from the code below.
The idea for triples1, triples2, and triples3 is that each pickOne returns a
list of pairs. The first element of each pair is the chosen element and the
second element of each pair is the list of choices for the next element
On Mon, 2007-21-05 at 11:47 +0100, Jules Bean wrote:
Michael T. Richter wrote:
1. A real GUI environment that takes into account some of the HID
advances made in the past 30 years. (Emacs and Vim don't count,
in other words.)
That particular part is trolling. Both emacs
On Mon, May 21, 2007 at 12:39:20PM +0100, Simon Peyton-Jones wrote:
| | instance G a b where
| | data E a = EC b -- this line - the b is not in scope.
| | wrap = EC
| | unwrap (EC b) = b
| |
| | I get Not in scope: type variable `b'.
|
| That's a bug. b should be
My friend read your email and remarked:
How is this guy not embarrassed posting on the internet about not liking
vim because he doesn't like editing config files?
On 21/05/07, Michael T. Richter [EMAIL PROTECTED] wrote:
On Mon, 2007-21-05 at 11:47 +0100, Jules Bean wrote:
Michael T. Richter
On 21 May 2007, at 13:04, Rodrigo Queiro wrote:
My friend read your email and remarked:
How is this guy not embarrassed posting on the internet about not
liking vim because he doesn't like editing config files?
Two points
1) This guy doesn't like editing config files -- that's his
Jules Bean wrote:
In the spirit of multiple implementations; another approach is to note
that you're really asking for all 3-element sublists:
power [] = [[]]
power (x:xs) = power xs ++ map (x:) (power xs)
triples1' l = [ t | t - power l, length t == 3]
(this implementation also preserves
On Mon, 2007-21-05 at 13:04 +0100, Rodrigo Queiro wrote:
My friend read your email and remarked:
How is this guy not embarrassed posting on the internet about not
liking vim because he doesn't like editing config files?
Because, unlike your friend, I actually have seen the advances in HID
geniusfat [EMAIL PROTECTED] writes:
(snip)
the order does not matter and each object can be chosen only once.
(snip)
In that case, with the help of Data.List.tails, one can do:
threeOf :: [a] - [(a,a,a)]
threeOf xs =
[ (p,q,r) | (p:ps) - tails xs, (q:qs) - tails ps, r - qs ]
(the r - qs
Hallo,
On 5/21/07, Michael T. Richter [EMAIL PROTECTED] wrote:
Oh, and of course it wasn't just the config files I showed problems with, now,
was it? I seem to remember something about modality and bad syntax
highlighting. Maybe I was tripping. It happens.
You may not like
Hello All,
Version 0.2 of Emping, a utility to derive heuristic rules from a table
of nominal data, is available. In addition to a reduced normal form
in .csv format, which can be read by Open Office Calc, it now also
displays observed implications and equivalences in the reduced rules (if
Your rant accomplishes nothing. Just note that programmers can
generally be considered more open towards harder-to-learn but
eventually more efficient to use interfaces. Yes, to a large part
they lack visibility, consistency, integration, or other such
properties; then again, once you learn to
Ok, thanks for the clarification. One final question then, how could I
rewrite the following in associated types:
class OneStep a b | a - b
instance OneStep (Cons v t) t
class TwoStep a b | a - b
instance (OneStep a b, OneStep b c) = TwoStep a c
If the fundep and b is dropped then I get:
Mark T.B. Carroll wrote:
nOf _[] = []
nOf 1xs = map return xs
nOf n (x:xs) = map (x:) (nOf (n-1) xs) ++ nOf n xs
No! With this implementation we have nOf 0 _ == [] but it should be nOf
0 _ == [[]]: The list of all sublists of length 0 is not empty, it
contains the empty list!
Andres Loeh [EMAIL PROTECTED] wrote:
class OneStep a
data OS a :: *
instance OneStep (Cons v t)
data OS (Cons v t) = t
class TwoStep a
data TS a :: *
instance (OneStep a, OneStep b) = TwoStep a
instance (OneStep a, OneStep (OS a)) = TwoStep a
?
Doesn't seem to
On Mon, 14 May 2007, Malcolm Wallace wrote:
Henning Thielemann [EMAIL PROTECTED] wrote:
*Text.ParserCombinators.PolyLazy
runParser (exactly 4 (satisfy Char.isAlpha))
(abc104++undefined)
(*** Exception: Parse.satisfy: failed
How can I rewrite the above example
Thanks for the help! Strangely, I just now received your messages from
April 28, hence the late reply...
Hans van Thiel
On Sat, 2007-04-28 at 18:09 +0200, Henning Thielemann wrote:
On Sat, 28 Apr 2007, Hans van Thiel wrote:
Hello All,
The standard function groupBy of List.hs doesn't work
I have a dream. It's not a little dream. It's a big dream. I have a
dream that someday I can find a UNIX/Linux text editor for Haskell
hacking (and possibly two or three hundred other programming languages,
although that's optional) that can give me all of the following:
'find / -type dream
On Mon, May 21, 2007 at 02:08:13PM +0100, Matthew Sackman wrote:
Further, it is *impossible* to define mkTS'' for the extra
-- should be mkOS''
But actually, in that code, the data declaration was never even used
either - all that is needed is:
Mirko Rahn [EMAIL PROTECTED] writes:
(snip)
Correct (and more natural):
nOf 0 _ = [[]]
nOf n (x:xs) = map (x:) (nOf (n-1) xs) ++ nOf n xs
nOf _ [] = []
Thanks very much - in both claims you're indeed correct.
-- Mark
___
Haskell-Cafe
With a slightly less flippant response, have you ever tried TextMate? I
haven't, but I've heard many wax lyrical about its combination of the UNIXy
power of Vim et al with the intuitive and simple UI that OS X has a
reputation for. Unfortunately, it's not free and is only for Mac OS X, but
it
On Mon, 2007-21-05 at 13:41 +0100, Neil Mitchell wrote:
Michael is asking is there something more GUI like? - to
which the answer is yes - Visual Haskell -
Sadly what I was asking was is there anything more GUI like for
Linux. ;) It doesn't surprise me that Macs and Windows boxes have
1.A real GUI
2.Good quality syntax highlighting for Haskell..., plus:
3. raw Haskell both forms of Literate Haskell;
4. properly highlight Haddock comments;
5. highlight functions and types from libraries differently
from local
3.Line folding
On 21-mei-2007, at 13:56, Michael T. Richter wrote:
Hell, even comparing the out-of-the-box syntax highlighting support
in Gedit vs. (G)Vim is instructive. Code like
makeRandomValueST :: StdGen - (MyType, StdGen) (which,
incidentally, was far easier to copy from in Gedit than GVim to
On Mon, 21 May 2007, Hans van Thiel wrote:
Thanks for the help! Strangely, I just now received your messages from
April 28, hence the late reply...
Our mail server does now send a bunch of mails I thought that were sent
long ago.
___
Haskell-Cafe
Bayley, Alistair wrote:
1. A real GUI
2. Good quality syntax highlighting for Haskell..., plus:
3. raw Haskell both forms of Literate Haskell;
4. properly highlight Haddock comments;
5. highlight functions and types from libraries differently
from local
3. Line folding to hide
I'd like to announce AngloHaskell 2007, or at least the start of the
process of organising it!
Last year there was a get-together organised around the interviews for the
job of GHC maintainer. There were talks, with a largely pragmatic
flavour, and there was plenty of socialising. It was fun,
On 21/05/07, Michael T. Richter [EMAIL PROTECTED] wrote:
Easy, quick access to online documentation for said functions and declarations.
I'm writing this for Emacs right now. At the moment both Emacs and Vim
can access everything that GHCi has to offer on a function, which
means where it's
Just in case anyone was wondering how to do this with the other major
Haskell GUI lib Gtk2Hs...
./configure --enable-profiling
some day when Gtk2Hs is cabalised it'll be even easier.
Duncan
On Sun, 2007-05-20 at 17:39 +0200, Anthony Chaumas-Pellet wrote:
Hello,
I'm currently hacking away a
Matthew Sackman wrote:
class G a where
data E a :: *
wrap :: a - E a
unwrap :: E a - a
I'm afraid not. I really need wrap to take a 'b' and unwrap to return a 'b'.
Talking on #haskell to sjanssen last night, he came up with:
How does
class F a
I'm not sure what you mean by a lot of transcription
work. It's an excellent book, aimed at beginners.
transcribe :: Print - Etext
Mike
PR Stanley wrote:
Hi
I've acquired a copy of the above title but it requires a lot of
transcription work. So, I thought I'd first ensure it's
Henning Thielemann wrote:
On Wed, 18 Apr 2007, Dan Weston wrote:
You have already won over the scientists.
I only know few mathematicians using Haskell, most of the (applied)
mathematician colleagues I know prefer MatLab.
Blehr! _
I hate MatLab... it's horrid!
(OTOH, I'm not
On May 21, 2007, at 14:15 , Andrew Coppin wrote:
Henning Thielemann wrote:
I only know few mathematicians using Haskell, most of the (applied)
mathematician colleagues I know prefer MatLab.
I hate MatLab... it's horrid!
Everyone hates Matlab. Problem is, it's hard to find anything like
At Sun, 20 May 2007 10:55:26 +0100,
Malcolm Wallace wrote:
Jeremy Shaw [EMAIL PROTECTED] writes:
How do I create a HaXml filter that adds a new element as a child of
an existing element. For example, let's say I have the XML document:
a b/ c/ /a
How do I add a new element under a
You mentioned a dream
Have you looked at Yi? might be worth a peek if you're prepared
to work towards your dream.
http://www.haskell.org/haskellwiki/Yi
...a long way to go - but it certainly nails #7!
--Ben
On 21 May 2007, at 15:44, Leif Frenzel wrote:
Bayley, Alistair wrote:
(aside to Dylan T: I hope you don't mind me advertising your (well,
public) web pages here. In my opinion a lot more people should know about
the stuff that both you and Ken are doing!)
Here's an example of some great math being done in haskell:
Hello,
is there an efficient algorithm that takes two positive numbers n and m and
that computes all lists l of numbers 0x=n such that sum l = m?
For instance
alg 5 1 = [[1]]
alg 5 2 = [[1,1],[2]]
alg 5 3 = [[1,1,1],[1,2],[2,1],[3]]
...
I know that filter (\l-sum l == m) (powerSet [1..n])
Michael T. Richter wrote:
1. A real GUI environment that takes into account some of the HID
advances made in the past 30 years. (Emacs and Vim don't count,
in other words.)
I for my life think HID refers to human input devices: keyboard, mouse,
joystick, gamepad, pedal,
Steffen Mazanek [EMAIL PROTECTED] writes:
alg 5 1 = [[1]]
alg 5 2 = [[1,1],[2]]
alg 5 3 = [[1,1,1],[1,2],[2,1],[3]]
Would this be better?
alg n m =
case signum m of
-1 - []
0 - [[]]
1 - [ x : xs | x - [1..n], xs - alg n (m - x) ]
-- Mark
HC-er's,
Find below some simple-minded code from a naive Haskeller for generating all
partitions of a multiset about which i have two questions.
mSplit :: [a] - [([a], [a])]
mSplit [x] = [([x],[])]
mSplit (x:xs) = (zip (map (x:) lxs) rxs)
++ (zip lxs (map (x:) rxs))
[EMAIL PROTECTED] (Mark T.B. Carroll) writes:
alg n m =
case signum m of
-1 - []
0 - [[]]
1 - [ x : xs | x - [1..n], xs - alg n (m - x) ]
FWIW it's faster if you do some memoising:
algMemo n m = lookupMemo m
where
memo = [[]] : map helper [1..m]
[EMAIL PROTECTED] (Mark T.B. Carroll) writes:
(snip)
algMemo n m = lookupMemo m
where
memo = [[]] : map helper [1..m]
lookupMemo m = if m 0 then [] else memo !! m
helper m' = [ x : xs | x - [1..n], xs - lookupMemo (m' - x) ]
which, I suppose, is rather like,
algMemo n
On Tuesday 22 May 2007 02:30, Claus Reinke wrote:
Vim is eliminated before it reaches the gate because it's a modal
editor. Even with GVim in place, it still has that modal stench to it
that leaps up and bites at awkward moments.
that's a bit more specific, at least. but as far as i recall,
I think this must almost be a FAQ, or at least a PAQ (Previously AQ)...
If I have a type class for conversion to a type X:
class XType a where
toX :: a - X
I can define instances for
instance XType Int where toX = ...
instance XType Double where toX = ...
Tim Docker wrote:
I think this must almost be a FAQ, or at least a PAQ (Previously AQ)...
If I have a type class for conversion to a type X:
class XType a where
toX :: a - X
I can define instances for
instance XType Int where toX = ...
instance XType Double
On Mon, May 21, 2007 at 06:37:22PM +0800, Michael T. Richter wrote:
1. A real GUI environment that takes into account some of the HID
advances made in the past 30 years. (Emacs and Vim don't count,
in other words.)
heh. find me a new GUI editor that takes into account the
Bertram Felgenhauer:
How does
class F a where
data B a :: *
data E a :: *
wrap :: B a - E a
unwrap :: E a - B a
sound? 'B a' would represent the 'b' in your previous attempt,
class F a b | a - b where
...
I'm with Simon in thinking that this code is
Derek Elkins wrote:
I believe there is a trick where essentially you end up with, instance
IsChar a = XType [a] where ...
That is simple enough, and works fine. Thanks!
Tim
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
When working on xmonad, we're trying to produce very clean, correct
code -- a window manager that just works. To do this, we're looking to
employ more static checking tools to the code base. Currently we use:
* QuickCheck (checks high level window manager behaviour)
* Catch (Neil's
65 matches
Mail list logo