On 10/02/06, Creighton Hogg <[EMAIL PROTECTED]> wrote:
> Hi,
> If I have something like
> data Patootie = Pa Int | Tootie Int
> and I want to pull out the indices of all elements of a list
> that have type constructor Tootie, how would I do that?
>
> I thought I might be able to use findIndices, bu
For the record, a little more digging turned up this
http://portal.acm.org/citation.cfm?id=583852.581496
which answers most of my questions.
On Feb 10, 2006, at 2:02 PM, Robert Dockins wrote:
OK. I've been doing a little thinking about type lambda in Haskell.
Now, I understand the prevaili
On 2/10/06, Ketil Malde <[EMAIL PROTECTED]> wrote:
> Hmm...perhaps it is worth it, then? The benchmark may specify "hash
> table", but I think it is fair to interpret it as "associative data
> structure" - after all, people are using "associative arrays" that
> (presumably) don't guarantee a hash
On Fri, Feb 10, 2006 at 12:26:30PM +, Simon Marlow wrote:
> in fact, I think this should be the basic API, since you can implement
> readFD in terms of it. (readNonBlockingFD always reads at least one
> byte, blocking until some data is available). This is used to partially
> fill an input bu
Hello Simon,
Wednesday, February 08, 2006, 2:58:30 PM, you wrote:
SM> I would prefer to see more type structure, rather than putting
SM> everything in the Stream class. You have classes ByteStream,
SM> BlockStream etc, but these are just renamings of the Stream class. There
SM> are many composi
Hello,
If you are working on finance type stuff, you may be interested in my
Decimal library:
http://article.gmane.org/gmane.comp.lang.haskell.cafe/8734
I think my 'last even' rounding algorithm is broken because I misread
the spec -- so be warned:
hunk ./Decimal/Operations.hs 78
-| roundHi
Hello Simon,
Friday, February 10, 2006, 2:53:25 PM, you wrote:
i'm not very interested to do something fascinating in this area. it
seems that it is enough to do
1) non-blocking read of the entire buffer on input
2) flush buffer at each '\n' at output
that should be enough to implement LineBuff
Hello Simon,
Friday, February 10, 2006, 3:26:30 PM, you wrote:
as i understand this idea, transformer implementing async i/o should
intercept vGetBuf/vPutBuf calls for the FDs, start the appropriate
type FD = Int
vGetBuf_async :: FD -> Ptr a -> Int -> IO Int
vPutBuf_async
I'm currently working on a mathematics library in Haskell. I'm not a
mathematician -- I'm basically writing this library as an excuse to
learn mathematics and Haskell at the same time.
Feel free to check out the code:
http://robtougher.com/
My main focus is financial mathematics (options pric
OK. I've been doing a little thinking about type lambda in Haskell.
Now, I understand the prevailing wisdom is that adding type lambda
and/or partially applied type synonyms to the haskell type system
would make type checking/inference undecidable. The reason given is
that higher-order un
Creighton Hogg <[EMAIL PROTECTED]> writes:
> data Patootie = Pa Int | Tootie Int
> and I want to pull out the indices of all elements of a list
> that have type constructor Tootie, how would I do that?
x = [Pa 3, Tootie 5, Pa 7, Tootie 9, Pa 11]
y = [ i |Tootie i <- x ]
z = [ i | i@(Tootie
Why do these error occur?
After hiding the packages com (beeing in comlib) and hdirect (beeing in lib)
and adding -package com -package hdirect it works fine. I haven't tried without
hiding but adding -package options yet.
ghc --make -H16m -O -fglasgow-exts -syslib com -fno-warn-missing-methods
On Fri, 10 Feb 2006, Bulat Ziganshin wrote:
...
> when i think how to implementat LineBuffering, i decided that it is
> the only possible way - read byte a time and see for a '\n'. i don't
> know how System.IO implemented but i think that it should do the same
Don't know - I see that Simon M follo
On Fri, Feb 10, 2006 at 05:20:47PM +0100, Niklas Broberg wrote:
> - when looking at the definition of MonadWriter the Monoid constraint
> is not strictly necessary, and none of the other mtl monads have
> anything similar. Is it the assumption that this kind of constraint is
> never really necessar
Or inline as
> findIndices (\x -> case x of Tootie _ -> True; _ -> False) listOfPasAndTooties
There was a recent thread about wanting a more succint way to write
this (unary pattern matching):
http://thread.gmane.org/gmane.comp.lang.haskell.cafe/11109
If John got his wish, then you could write s
On Fri, 10 Feb 2006, Creighton Hogg wrote:
> Hi,
> If I have something like
> data Patootie = Pa Int | Tootie Int
> and I want to pull out the indices of all elements of a list
> that have type constructor Tootie, how would I do that?
>
> I thought I might be able to use findIndices, but I don't
tootieIndices = findIndices isTootie
where isTootie (Pa _) = False
isTootie (Tootie _) = True
would be my first approach.
/g
On 2/10/06, Creighton Hogg <[EMAIL PROTECTED]> wrote:
> Hi,
> If I have something like
> data Patootie = Pa Int | Tootie Int
> and I want to pull out th
On Feb 10, 2006, at 11:09 AM, Colin Paul Adams wrote:
Is there any Haskell code around that can interpret combinatory
logic expressions?
Humm. That's kind of a broad question. I've written a shell for
interpreting the pure untyped lambda calculus which has definitions
for Turner's Combin
Hi,
I'm playing around with associated type synonyms (ATS) [1] and the
PHRaC interpreter, trying to model existing uses of FDs. I really
enjoy working with ATS, but I've come across a situation that I don't
quite know how to handle, or indeed if it can be handled at all.
The scene is Control.Mona
On Fri, 10 Feb 2006, Colin Paul Adams wrote:
> Is there any Haskell code around that can interpret combinatory logic
> expressions?
http://www0.us.ioccc.org/1998/fanf.lambda
Tony.
--
f.a.n.finch <[EMAIL PROTECTED]> http://dotat.at/
BISCAY: WEST 5 OR 6 BECOMING VARIABLE 3 OR 4. SHOWERS AT FIR
Hi,
If I have something like
data Patootie = Pa Int | Tootie Int
and I want to pull out the indices of all elements of a list
that have type constructor Tootie, how would I do that?
I thought I might be able to use findIndices, but I don't
know how to express the predicate.
_
Is there any Haskell code around that can interpret combinatory logic
expressions?
--
Colin Adams
Preston Lancashire
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, 10 Feb 2006, Cale Gibbard wrote:
> On 10/02/06, Stefan Holdermans <[EMAIL PROTECTED]> wrote:
> > Don Stewart wrote:
> >
> > > P.S. I remember having a discussion on #haskell 2 weeks ago where
> > > we all
> > > agreed that Haskell placing #1 was pretty much impossible. Did we have
> > > a
Actually I was starting to develop a matrix library, but then I found
someone beat me to it... which is nice of course because you can move
straight on to using it...
http://dis.um.es/~alberto/hmatrix/matrix.html
It uses the GSL which can use an optimized cblas library for even faster
computa
Chris Kuklewicz <[EMAIL PROTECTED]> writes:
> Comparing Haskell to OCaml, Haskell is almost always slower.
...but generally not by much.
And for another perspective on speed: Haskell loses tremendously in
the knucleotide benchmark. As I mentioned previously, even TCL beats
us by a margin of two
Stefan Holdermans wrote:
> Don Stewart wrote:
>
>> P.S. I remember having a discussion on #haskell 2 weeks ago where we all
>> agreed that Haskell placing #1 was pretty much impossible. Did we have
>> an inferiority complex?
>
> Still---and, please, forgive me for this---I feel that us being #1 n
Bulat Ziganshin wrote:
Hello Immanuel,
Friday, February 10, 2006, 12:42:41 PM, you wrote:
Still---and, please, forgive me for this---I feel that us being #1
now tells us more about the Haskell community than it tells us about
Haskell.
IL> How to optimize Haskell code:
IL> 1) enter it as a
Hello Immanuel,
Friday, February 10, 2006, 12:42:41 PM, you wrote:
>> Still---and, please, forgive me for this---I feel that us being #1
>> now tells us more about the Haskell community than it tells us about
>> Haskell.
>>
IL> How to optimize Haskell code:
IL> 1) enter it as a test in the great
Bulat Ziganshin wrote:
Hello Einar,
Friday, February 10, 2006, 2:09:08 AM, you wrote:
as i understand this idea, transformer implementing async i/o should
intercept vGetBuf/vPutBuf calls for the FDs, start the appropriate
type FD = Int
vGetBuf_async :: FD -> Ptr a -> Int -> IO Int
vPutBuf_as
On Fri, 10 Feb 2006, Simon Peyton-Jones wrote:
> | Between google searching and looking through the activity
> | report, I take it that no one has really developed serious
> | libraries for matrix manipulations, diff eqs, etc.
> |
> | Are there any practical reasons for this or is it just a
> | m
Bulat Ziganshin wrote:
Hello Donn,
Friday, February 10, 2006, 12:47:42 AM, you wrote:
DC> "Slow" devices like pipes, sockets etc. get along fine with Handles
DC> or whatever buffered I/O - as long as you have only one going at a time.
DC> Multiple input sources - like, say you want to read a
Hello Bulat,
Thursday, February 09, 2006, 10:24:59 PM, you wrote:
>>> if you can make select/poll transformer, at least for testing
>>> purposes, that will be really great.
JM>> Yeah, I will look into this. the basic select/poll call will have to be
JM>> pretty low level, but hopefully it will a
"Stefan Holdermans" <[EMAIL PROTECTED]> writes:
>
> Still---and, please, forgive me for this---I feel that us being #1
> now tells us more about the Haskell community than it tells us about
> Haskell.
>
How to optimize Haskell code:
1) enter it as a test in the great language shootout.
2) wait a f
> indicates that it triggers a bug in 6.4.1
Ah, I missed that.
For my word counting indexes, I've settled on Data.Map, calculating an
Int or Integer hash for each word (depending on word length, which is
fixed). I haven't given it nearly the effort the shootout programs
have seen, though, so I'
Ketil Malde wrote:
> Chris Kuklewicz <[EMAIL PROTECTED]> writes:
>
>> Is Jan-Willem Maessen's Hash available anywhere? I could benchmark it.
>
> Did you ever get around to run the benchmark? I browsed around a bit,
> and found that the knucleotide is probably the worst GHC benchmark in
> the sh
| Between google searching and looking through the activity
| report, I take it that no one has really developed serious
| libraries for matrix manipulations, diff eqs, etc.
|
| Are there any practical reasons for this or is it just a
| matter of the haskell community being small and there not
| b
Congratulations, guys! An amazing, and (maybe it should have been!) to
me surprising, achievement.
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
| Donald Bruce Stewart
| Sent: 10 February 2006 01:35
| To: haskell-cafe@haskell.org
| Subject: [
> Ah, I see. In the first case, you simply change the tag into
> , keeping the tag exactly the same. But in the second case,
> you not only want to change into , but also to move the
> tag from outside the to inside.
Not exactly. In the end I want to turn both tags into one :
Hello World a
Hello Einar,
Friday, February 10, 2006, 2:09:08 AM, you wrote:
>> as i understand this idea, transformer implementing async i/o should
>> intercept vGetBuf/vPutBuf calls for the FDs, start the appropriate
>>
>> type FD = Int
>> vGetBuf_async :: FD -> Ptr a -> Int -> IO Int
>> vPutBuf_async :: FD
Hello Donn,
Friday, February 10, 2006, 12:47:42 AM, you wrote:
>> DC> "Slow" devices like pipes, sockets etc. get along fine with Handles
>> DC> or whatever buffered I/O - as long as you have only one going at a time.
>> DC> Multiple input sources - like, say you want to read a process' output
>>
40 matches
Mail list logo