Hi all,
This contest should be of interest to Haskellers. There is an "FP
Category" in which termination of Haskell programs is automatically
checked. The current state can be observed by following the
corresponding "View Results" link from the page
http://termcomp.uibk.ac.at/termcomp/competitio
On 18 Dec 2009, at 06:39, Richard O'Keefe wrote:
My experience has been that in order to make sense of someone else's
code you *HAVE* to break identifiers into their component words.
With names like (real example) ScatterColorPresetEditor, the eye
*can't* take it in at once, and telling the dif
On Thu, Dec 17, 2009 at 6:58 PM, Richard O'Keefe wrote:
> (Why do people call
> baStudly syle "camel"? Is there somewhere in the world a
> species of camel with three or four humps, like
> XmlNodeSansChildren?)
As near as I can tell (from googling) you're the one calling it
"baStudlyCaps" :)
Hello,
I was advised respectfully to post my query here.
Please, read the whole letter before you do anything, because I tried to
construct the problem step by step.
Also keep in mind, that the problem I query here is more general, and
similar cases occur elsewhere, not just in this particular exam
András Mocsáry wrote:
> *My concern*
> is about predictable failure of sw written in Haskell.
> To illustrate it let's see a Haskell pattern matching example:
> And in Haskell pattern matching:
>
> switch 1 = "Unchecked"
>
> switch 2 = "Checked"
>
> switch 3 = "Unknown"
>
>
> Let's say, th
> I would like to have a way for Haskell, not to crash, when my coders write
> pattern matching without the above mentioned general case.
> Like having the compiler auto-include those general cases for us,
> but when those cases got hit, then instead of crashing, it should report
> some error on st
> Also, it would be nice if there were an lhs2tex version which worked
> out-of-the-box with base>=4, since hacking the Makefile for that seems, er,
> sub-optimal?
I've just uploaded 1.15 which should work better on Windows. Sorry, I
should have released a new version a long time ago. Please let
I used to refer to them as dromedaryCase and BactrianCase, but the
names never caught on :(
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
András Mocsáry writes:
> Now we have a problem, which is most generally fixed in these ways:
> C-like:
>> switch ( x )
>
> {
>
> Case 0:
>
> "Unchecked"
>
> Case 1:
>
> "Checked"
>
> Case 2:
>
> "Unknown"
>
> Default:
>
> "Nothing"
>
> }
This is not a fix, this is a workaround for a des
Hi!
On Fri, Dec 18, 2009 at 8:16 AM, Jason Dusek wrote:
> Concatenating two `ByteString`s is O(n)?
This is what it is written here:
http://haskell.org/ghc/docs/latest/html/libraries/bytestring-0.9.1.5/Data-ByteString.html#v%3Aappend
Mitar
___
Haske
Hello,
> Date: Fri, 18 Dec 2009 13:04:47 +0100
> From: Andr?s Mocs?ry
>
>
> switch 1 = "Unchecked"
>
> switch 2 = "Checked"
>
> switch 3 = "Unknown"
>
> switch x = "Nothing"
>
> These general ways really avoid this particular crash, but does something
> real bad to the code in my opinion.
..
On Fri, Dec 18, 2009 at 02:13:02PM +, John Lato wrote:
> So now the program needs a result of some type (String in your
> example) and gets an undefined, and then immediately crashes
> with an "Exception - undefined" error.
I think this is the second time this is said in this thread, but
pleas
On Fri, 18 Dec 2009 16:39:21 +1300, you wrote:
>My experience has been that in order to make sense of someone else's
>code you *HAVE* to break identifiers into their component words.
>With names like (real example) ScatterColorPresetEditor, the eye
>*can't* take it in at once, and telling the diff
Patai Gergely schrieb:
>> I have a function for mixing sounds at different (relative) start times.
>> I feel that it does not get maximum speed in GHC, but is still ready for
>> realtime application.
>>
>> http://hackage.haskell.org/packages/archive/synthesizer-core/0.2.1/doc/html/Synthesizer
On Fri, 2009-12-18 at 13:04 +0100, András Mocsáry wrote:
> Hello,
> I was advised respectfully to post my query here.
> Please, read the whole letter before you do anything, because I tried
> to construct the problem step by step.
> Also keep in mind, that the problem I query here is more general,
I was looking for a simple generic technique targeting and transforming
the "largest" terms of a particular type. For example, with Expr and
Val declared as:
data Expr = Val Val | Add Expr Expr | Sub Expr Expr
deriving (Show, Eq, Typeable, Data)
data Val = Var String | Struct [Expr]
deriving
> I would do resampling (with some of the Interpolation routines) and
> mixing in two steps, that is I would prepare (lazy) storable vectors
> with the resampled sounds and mix them. Since Haskell is lazy, this is
> still somehow "on the fly", although one could still wish to eliminate
> the interi
Please note: We have a version of GUM in which PVM has been replaced by
direct network communication. However, this project has been idle since
the appearance of GHC-6, and I have not been able to get a binary of the
parallel version (which is based on GHC-5) to compile itself.
Murray Gross
B
On Thu, 2009-12-17 at 18:08 +, Nils Anders Danielsson wrote:
> I was hoping that I could make use of this feature now:
>
> $ cabal --version
> cabal-install version 0.7.5
> using version 1.8.0.2 of the Cabal library
>
> However, when I try to use it I get the following error:
So there
Hi!
On Fri, Dec 18, 2009 at 8:29 AM, Ketil Malde wrote:
> Lazy ByteStrings should be able to append with O(1). (Or use strict BS
> hGetNonBlocking, and Lazy ByteString fromChunks.)
Oh, true. Thanks!
But ... lazy ByteString's hGetNonBlocking is probably not lazy? Could
it be? It has to read at
> I would do resampling (with some of the Interpolation routines) and
> mixing in two steps, that is I would prepare (lazy) storable vectors
> with the resampled sounds and mix them.
And is that straightforward considering the peculiarities of tracked
music? After all, frequency can change between
Hey everyone,
I would like to write a routine like
nextPtr :: Storable a => Ptr a -> Ptr a
nextPtr = (`plusPtr` sizeOf (undefined :: a))
which increments a pointer by the correct amount, but GHC complains that the
type variable "a" is ambiguous. I can see what's going on: it c
Ugh, I figured out how to write code to do what I wanted, but it seems like an
ugly solution:
getPtrSize :: Ptr a -> Int
getPtrSize = getFrom dummy
where
getFrom :: a -> Ptr a -> Int
getFrom dummy _ = sizeOf dummy
Any thoughts on a less u
> I would like to write a routine like
>
>nextPtr :: Storable a => Ptr a -> Ptr a
>nextPtr = (`plusPtr` sizeOf (undefined :: a))
How about:
getA :: Ptr a -> a
getA _ = undefined
nextPtr ptr = (`plusPtr` sizeOf (getA ptr)) ptr
-Thomas
__
> I can see what's going on: it can't tell that the "a" I am writing there
> is the same "a" that's in the type specification, but is there any way that
> I can make it identify "a" with the "a" in the specification for nextPtr?
>
Lexically scoped type variables:
http://www.haskell.org/ghc/docs/l
On Fri, Dec 18, 2009 at 12:20 PM, Gregory Crosswhite
wrote:
> Ugh, I figured out how to write code to do what I wanted, but it seems like
> an ugly solution:
>
> getPtrSize :: Ptr a -> Int
> getPtrSize = getFrom dummy
> where
> getFrom :: a -> Ptr a -> Int
>
Hi,
> I would like to write a routine like
>
> nextPtr :: Storable a => Ptr a -> Ptr a
> nextPtr = (`plusPtr` sizeOf (undefined :: a))
>
> which increments a pointer by the correct amount, but
> GHC complains that the type variable "a" is ambiguous.
Maybe Foreign.Marshal.Array.advan
Yay, advancePtr is exactly what I needed! I totally missed that one in the
docs.
Also thanks to those of you who pointed me to the scoped type variables
feature, since I had figured that a feature liked that had to exist but I just
didn't know where to look for it.
You guys rock!
Cheers,
Gre
Hi!
On Fri, Dec 18, 2009 at 6:54 PM, Mitar wrote:
> On Fri, Dec 18, 2009 at 8:29 AM, Ketil Malde wrote:
>> Lazy ByteStrings should be able to append with O(1). (Or use strict BS
>> hGetNonBlocking, and Lazy ByteString fromChunks.)
>
> Oh, true. Thanks!
>
> But ... lazy ByteString's hGetNonBlock
Hi,
When I run cabal install zlib or cabal upgrade zlib I get the following
error:
Resolving dependencies...
Configuring zlib-0.5.2.0...
Preprocessing library zlib-0.5.2.0...
Only one output file may be specified
cabal: Error: some packages failed to install:
zlib-0.5.2.0 failed during the buildi
30 matches
Mail list logo