"Chaddaï Fouché" <[EMAIL PROTECTED]> writes:
> > so you need an f so that c `f` x is c (for any c and x) and
> > yet (b `f` c) is c for any c and b -- this is impossible (or
> > I'm asleep).
>
> Well, it isn't "impossible" but quite hard (and not even standard H98
> if I'm not mistaken)
If it is
16 Aug 2007 10:11:24 +0100, Jon Fairbairn <[EMAIL PROTECTED]>:
>
snip my quote
>
> I certainly wouldn't count such a thing as a valid
> solution. It's always amazed me that C uses as standard a
> mechanism of ending strings that is so obviously an
> error-prone hack.
I'm completely with you on tha
Duncan Coutts wrote:
> On Wed, 2007-08-15 at 11:06 -0700, Stefan O'Rear wrote:
>
> > foo = getSomethingCPS $ \ arg ->
> > moreStuff
> >
> > is now a syntax error (\ { varid -> } matches no productions).
>
> I'm not sure I follow.
>
> The patterns would have to match up in a column, so
>
>
On Wed, 2007-08-15 at 15:04 +0200, Lars Oppermann wrote:
> Hi All,
>
> This is my first post here, so I'll start with a quick introduction...
> I live and work in Hamburg, Germany. My day job is as a software
> engineer at Sun Microsystems at the OpenOffice.org development team
> where I'm mostly
Joel,
This sounds like an extremely interesting (but very ambitious!)
project, which I would like to get involved with if I have the time.
However, wouldn't it be rather difficult, given that there doesn't
seem to be a publicly available specification for the Erlang VM or the
BEAM file format --
On Aug 16, 2007, at 1:36 PM, Neil Bartlett wrote:
However, wouldn't it be rather difficult, given that there doesn't
seem to be a publicly available specification for the Erlang VM or the
BEAM file format
Very difficult, correct. I use Erlang daily, in fact Erlang is what
brings bread to my
I think Haskell is the right language to nail down the semantics of Erlang
and to prototype an implementation.
For performance, I think Haskell is probably not the right language, because
you need high performing low level code.
This isn't impossible in Haskell, but the implementations are not gear
I have gotten ghc 6.7 to compile, but not with extra libs. I'm on linux
x86, ubuntu.
Can someone suggest a download date that worked for them, or how to fix
one or more of the problems described below?
When I build from source (this is for august 2, unknown linux, as conal
spoke well of it :)
ok wrote:
> Trying to install GHC 6.6 on a Solaris 2.9 box (do I have the last
> 2.9 box in captivity? I've asked for 2.10, really and truly I have)
> I ran into two problems.
Is it Solaris for Sparc or x86? Did you try to install
one of the binary dists from the download pages?
http://www.haskel
Paul Hudak wrote:
>
> [I]n the one-of-many ways that I view monads, a monad is just a high-order
> function that abstracts away function composition. In particular, if I
> have an action f, and an action g, I can think of them as recipes, because
> I can combine them via f >>= g. It's only aft
On Thu, Aug 16, 2007 at 01:01:12PM -0400, Thomas Hartman wrote:
> I repeated the install attempt described below using darcs head, including
> the extra libs.
>
> I got the exact same error as before.
>
> Setup: Warning: Unknown fields: nhc98-options (line 173) and then a
> cryptic error
On 8/15/07, Alexteslin <[EMAIL PROTECTED]> wrote:
> I am really sorry, but i still can't define the function. The chapter the
> exercise is in precedes algebraic types or Maybe a types. And is seems that
> must being easy to define.
> I answered some exercises on using foldr such as summing for e
Kurt Hutchinson wrote:
On 8/15/07, Alexteslin <[EMAIL PROTECTED]> wrote:
I am really sorry, but i still can't define the function. The chapter the
exercise is in precedes algebraic types or Maybe a types. And is seems that
must being easy to define.
I answered some exercises on using foldr suc
Chad Scherrer wrote:
I'm starting to think the power of abstraction is a blessing and a
curse. Haskell's abstraction mechanisms are so powerful that it's
generally possible to come up with a way to solve a given problem
elegantly and efficiently. On the other hand, if a problem isn't so
well stud
On 8/16/07, Thomas Hartman <[EMAIL PROTECTED]> wrote:
>
>
> I repeated the install attempt described below using darcs head, including
> the extra libs.
>
> I got the exact same error as before.
>
> Setup: Warning: Unknown fields: nhc98-options (line 173) and then a
> cryptic error involving
Ian Duncan wrote:
Hello everyone, I've been working on improving my Haskell knowledge, and
in doing so, I have read a little about as-patterns as well as some form
of pattern that uses "~" that I don't really understand. I suspect there
are even more lesser-known pattern matching expressions th
I'm using ListT now, trying to do this:
type Sample a = ListT (State StdGen) a
randomStreamR :: (RandomGen g, Random a) => (a,a) -> g -> ([a], g)
randomStreamR bds g =(randomRs bds g1, g2)
where (g1,g2) = split g
sample :: [a] -> Sample a
sample [] = ListT (State f)
where f s = case next s o
Aaron Denney wrote:
>
> On 2007-08-15, Pekka Karjalainen <[EMAIL PROTECTED]> wrote:
>> A little style issue here on the side, if I may. You don't need to use
>> (++) to join multiline string literals.
>>
>> text = "If you want to have multiline string literals \
>>\in your source code, y
But if the strings are all constant it's perfectly feasible to concatenate
them at compile time.
On 8/16/07, Kim-Ee Yeoh <[EMAIL PROTECTED]> wrote:
>
>
>
> Aaron Denney wrote:
> >
> > On 2007-08-15, Pekka Karjalainen <[EMAIL PROTECTED]> wrote:
> >> A little style issue here on the side, if I may.
Hi Neil,
For haskell-cafe members: This is what we are talking about:
http://www.hck.sk/users/peter/
I'm glad somebody liked it.
I do not understand what you mean by the extension request. Would you
want to see the number of references of a production head even without
opening the popup list
On 2007-08-16, Kim-Ee Yeoh <[EMAIL PROTECTED]> wrote:
>
>
> Aaron Denney wrote:
>>
>> On 2007-08-15, Pekka Karjalainen <[EMAIL PROTECTED]> wrote:
>>> A little style issue here on the side, if I may. You don't need to use
>>> (++) to join multiline string literals.
>>>
>>> text = "If you want to ha
I wanted to do some experiments with HOpenGL, and one of the things I tried is
importing 3D models.
So I searched for a library that could do that, but besides Frag, who uses the
limited MD3 format, I did not find anything useful. Has any work been done on
supporting that? Maybe just converting
So what I noticed that "A Gentle Introduction to Haskell" mentioned
that wild-cards are useful in constructors. For example:
head (x:_) = x
So, does that offer any performance benefits over:
head (x:xs) = x
Or is it primarily to indicate to the coder that xs is useless? I get
the impressio
Hi
> So what I noticed that "A Gentle Introduction to Haskell" mentioned
> that wild-cards are useful in constructors. For example:
>
> head (x:_) = x
>
> So, does that offer any performance benefits over:
>
> head (x:xs) = x
No. They are exactly the same. _ simply means "a new unique name".
> O
On 2007-08-16, Neil Mitchell <[EMAIL PROTECTED]> wrote:
> Hi
>
>> So what I noticed that "A Gentle Introduction to Haskell" mentioned
>> that wild-cards are useful in constructors. For example:
>>
>> head (x:_) = x
>>
>> So, does that offer any performance benefits over:
>>
>> head (x:xs) = x
>
> N
On 16 aug 2007, at 13.46, Bertram Felgenhauer wrote:
Duncan Coutts wrote:
On Wed, 2007-08-15 at 11:06 -0700, Stefan O'Rear wrote:
foo = getSomethingCPS $ \ arg ->
moreStuff
is now a syntax error (\ { varid -> } matches no productions).
I'm not sure I follow.
The patterns would have
I am trying to determine why my stack overflows in my medium sized
program (it has several modules but maybe only 1000 LOC total). On
Windows, at least, the ghcprof visualization tool doesn't work. Any
suggestions besides an output trace?
It may be the function below, which tries to determine if a
On Thu, 2007-08-16 at 22:22 +0300, Esa Ilari Vuokko wrote:
> On 8/16/07, Thomas Hartman <[EMAIL PROTECTED]> wrote:
> Setup: Warning: Unknown fields: nhc98-options (line 173)
> and then a cryptic error involving HsColour
> I think you run into Cabal bug - you need to remove (
Justin Bailey:
> I am trying to determine why my stack overflows in my medium sized
> program [...snip...]
>
> prefixesAtLeast :: Int -> [S.ByteString] -> Int
> prefixesAtLeast !0 !ss
> | null ss = 0
> | all S.null ss = 0
> | otherwise = -1
> prefixesAtLeast !n !ss = prefixesAtLeast' n ss
>
Hi,
Apologies for a long post that may not be totally clear. I was thinking through
a problem and how the data might be represented in Haskell. I'm now stuck and
frustrated. Now, I'm not even sure whether I'm on the right track (I might
still be thinking too OO). Suggestions/ideas would be much a
Is there any way to view the steps that a haskell program goes
through step by step?
I'm thinking something similar to what I've seen in things I've been
reading. For example:
foldl (+) 0 [1..10]
=> (0+1)
=> ((0+1)+2)
=> (((0+1)+2)+3)
=> etc.
I've seen these sorts of line-by-line execution ste
On 8/16/07, Ian Duncan <[EMAIL PROTECTED]> wrote:
>
> Is there any way to view the steps that a haskell program goes
> through step by step?
> I'm thinking something similar to what I've seen in things I've been
> reading. For example:
> foldl (+) 0 [1..10]
> => (0+1)
> => ((0+1)+2)
> => (((0+1)+2)
Someone mentioned the "Blow your mind" page.
One example there really caught my attention.
"1234567" => ("1357","246")
foldr (\a ~(x,y) -> (a:y,x)) ([],[])
I've known about lazy match since an early version of the Haskell
report, but have never actually used it. Last night, looking at
that exa
Let's start by reminding ourselves what foldr does.
foldr f z [x1,x2,...,xn] = f x1 (f x2 ... (f xn z) ...)
Now let's ask about last:
last [] = error ...
last [x1,...,xn] = xn
We're going to have to keep track of whether we have a last element
or not. The obvious candidate for this is Maybe x
Levi Stephen:
> [...]
> I was imagining a drag and drop web page designer. There are a bunch of
> Widgets (e.g., BlogWidget, TextWidget, MenuWidget, etc) that the user can
> place on the page.
> [...]
>
> class Widget a where
> render :: a -> Html
>
> -- A page has a title and a Widget.
> -- I k
I hate to be a party pooper, but isn't this just:
> f = foldr (\a z -> (a:snd z,fst z)) ([],[])
This takes less time to grok and takes no longer to run.
But why stop there?
> import Control.Arrow
> swap = snd &&& fst
> f = foldr (\a -> swap >>> first (a:)) ([],[])
Just read this aloud to see
On Thu, Aug 16, 2007 at 09:39:54AM -0400, Thomas Hartman wrote:
>
> The programs included with the Ubuntu system are free software;
> checking host system type... i686-pc-linux-gnu
> checking target system type... i686-pc-linux-gnu
> Which we'll further canonicalise into: i386-unknown-linux
> chec
Justin Bailey wrote:
I am trying to determine why my stack overflows in my medium sized
program (it has several modules but maybe only 1000 LOC total). On
Windows, at least, the ghcprof visualization tool doesn't work. Any
suggestions besides an output trace?
You shouldn't need ghcprof. Just c
38 matches
Mail list logo