mark.spezzano:
> Hi,
>
> Just wondering if Generics and Parametric polymorphism are one and the same in
> Haskell.
>
> I read (somewhere!) an article stating that generics might be included in
> Haskell Prime but I thought that they’re already included as parametric
> polymorphism.
>
> Did I mis
Hi,
Just wondering if Generics and Parametric polymorphism are one and the same
in Haskell.
I read (somewhere!) an article stating that generics might be included in
Haskell Prime but I thought that they’re already included as parametric
polymorphism.
Did I misread something? Or is gene
Lyle Kopnicky wrote:
> If it is a hurdle for me, I can imagine a lot of people are getting
> frustrated at trying to distribute their binaries on Linux.
>
I don't think so. Developers usually just don't, and the distribution
packagers seem to enjoy their specific messes... otherwise, they
wouldn'
On Mar 10, 2009, at 10:38 PM, Mark Spezzano wrote:
Hi,
I’m an experienced software developer, but a bit of a newbie when
it comes to parallel processing in any language.
Question 1:
Is there any programmatic change in dealing with multiple threads
as opposed to multiple cores in most lan
Hi,
I’m an experienced software developer, but a bit of a newbie when it comes
to parallel processing in any language.
I’ve done some multithreading in Java and C++ on a single processor, single
core architecture only.
First, let me define some terms:
Multithreading: this is multipl
Hi,
I’m an experienced software developer, but a bit of a newbie when it comes
to parallel processing in any language.
I’ve done some multithreading in Java and C++ on a single processor, single
core architecture only.
First, let me define some terms:
Multithreading: this is multipl
Hi, thanks for the hint. I'll see what I can do with it.
Xiao-Yong
Bulat Ziganshin writes:
> Hello Xiao-Yong,
>
> Wednesday, March 11, 2009, 12:28:45 AM, you wrote:
>
>> It goes beyond my current knowledge, now. How do you define
>> a custom data type as an instance of UA or Storable?
>
> jus
> I would also consider it bad style to be fully polymorphic in this case, as
> you require polymorphic seq, which is evil (though I don't have the space to
> argue this right now :-). Unamb would be bad style, also, since your
> semantics are nondeterministic and so you wouldn't meet the precondi
manlio_perillo:
> Don Stewart ha scritto:
>> [...]
>> {-# LANGUAGE OverloadedStrings #-}
>>
>> import qualified Data.ByteString.Char8 as C
>>
>> isMatch :: C.ByteString -> Bool
>> isMatch "match" = True
>> isMatch _ = False
>>
>> main = print . map isMatch . C.lines =<
Am Mittwoch, 11. März 2009 00:58 schrieb R J:
> Given a list of decimal digits represented by Integers between 0 and 9--for
> example, the list [1,2,3, 4]--with the high-order digit at the left, the
> list can be converted to a decimal integer n using the following formula,
> an instance of Horner'
Don Stewart ha scritto:
[...]
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Char8 as C
isMatch :: C.ByteString -> Bool
isMatch "match" = True
isMatch _ = False
main = print . map isMatch . C.lines =<< C.getContents
What is the reason why i
Given a list of decimal digits represented by Integers between 0 and 9--for
example, the list [1,2,3, 4]--with the high-order digit at the left, the list
can be converted to a decimal integer n using the following formula, an
instance of Horner's rule:
n = 10 * 10 * 10 * 1 + 10
Don Stewart ha scritto:
[...]
-XOverloadedStrings
Perfect, thanks.
Is this supported by other Haskell implementations, or planned for Haskell'?
Not as far as I know. It was added to GHC just over 2 years ago,
http://article.gmane.org/gmane.comp.lang.haskell.cvs.all/31022
and isn't terr
Oh, you're right. Here are some thoughts.
You want the list you get back to only contain values in WHNF. This differs
from mergeIO & co., which are simply evaluating the spine of the list, and
don't even look at the values.
I would also consider it bad style to be fully polymorphic in this case
manlio_perillo:
> Don Stewart ha scritto:
>> manlio_perillo:
>>> Hi.
>>>
>>> Using normal String type I can define a pattern like:
>>>
let foo "baz" = 777
foo "baz"
>>> 777
>>>
>>> But if I want to use ByteString, what should I do?
>>> This seems impossible, since ByteString data construc
Don Stewart ha scritto:
manlio_perillo:
Hi.
Using normal String type I can define a pattern like:
let foo "baz" = 777
foo "baz"
777
But if I want to use ByteString, what should I do?
This seems impossible, since ByteString data constructor is not available.
-XOverloadedStrings
Perfect
i think this would still force me to evailuate the whole list, right?
i would want something that pipes the results into a channel that i
can lazyly read as the results are available.
On Tue, Mar 10, 2009 at 2:44 PM, Luke Palmer wrote:
> I think nmergeIO . map (:[]) should do the trick.
>
> Luke
manlio_perillo:
> Hi.
>
> Using normal String type I can define a pattern like:
>
> > let foo "baz" = 777
> > foo "baz"
> 777
>
>
> But if I want to use ByteString, what should I do?
> This seems impossible, since ByteString data constructor is not available.
-XOverloadedStrings
e.g.
{-# LAN
Hello Manlio,
Wednesday, March 11, 2009, 1:28:13 AM, you wrote:
> Using normal String type I can define a pattern like:
> But if I want to use ByteString, what should I do?
> This seems impossible, since ByteString data constructor is not available.
for numeric types, it works via Num instances
On Tue, Mar 10, 2009 at 3:28 PM, Manlio Perillo wrote:
> This seems impossible, since ByteString data constructor is not available.
>
You can use view patterns, per
http://www.serpentine.com/blog/2009/01/11/fun-with-haskell-view-patterns/
___
Haskell-Ca
Hi.
Using normal String type I can define a pattern like:
> let foo "baz" = 777
> foo "baz"
777
But if I want to use ByteString, what should I do?
This seems impossible, since ByteString data constructor is not available.
Thanks Manlio Perillo
___
bulat.ziganshin:
> Hello Don,
>
> Wednesday, March 11, 2009, 12:48:35 AM, you wrote:
>
> >> unfortunately, Array library unboxed arrays still aren't based on any
> >> Unboxable *class*
>
> > Hmm. Aren't all the array library types based on MArray and IArray?
>
> > So I can define my own say, ne
Hello Don,
Wednesday, March 11, 2009, 12:48:35 AM, you wrote:
>> unfortunately, Array library unboxed arrays still aren't based on any
>> Unboxable *class*
> Hmm. Aren't all the array library types based on MArray and IArray?
> So I can define my own say, new STUArray element type by writing an
Hello Xiao-Yong,
Wednesday, March 11, 2009, 12:28:45 AM, you wrote:
> It goes beyond my current knowledge, now. How do you define
> a custom data type as an instance of UA or Storable?
just look at existing instances. basically, for complex data type, you
just use instances for its basic types,
bulat.ziganshin:
> Hello Don,
>
> Wednesday, March 11, 2009, 12:12:07 AM, you wrote:
>
> > Right, so my point stands: there's no difference now. If you can write a
> > Storable instance, you can write a UA et al instance.
>
> yes, if there is some class provided for this and not just hard-coded
I think nmergeIO . map (:[]) should do the trick.
Luke
On Tue, Mar 10, 2009 at 3:41 PM, Anatoly Yakovenko wrote:
> Hmm, yea, actually that makes sense. What i am looking for is
> something that maps over a list and returns the list in order which
> the values are evaluated. looks like i can im
Hmm, yea, actually that makes sense. What i am looking for is
something that maps over a list and returns the list in order which
the values are evaluated. looks like i can implement that pretty
easily with unamb.
On Tue, Mar 10, 2009 at 2:33 PM, Luke Palmer wrote:
> Although it is not formally
Although it is not formally specified, my intuition for the specification is
that order is preserved within each of the lists.
Luke
On Tue, Mar 10, 2009 at 2:50 PM, Anatoly Yakovenko wrote:
> do nmergeIO or mergeIO preserve order? or not preserve order?
>
Don Stewart writes:
>> instance UA UserDefinedDataType
>>
>> I'm not sure how to do that. Can you give me some
>> clarification?
>
> Yes, you can do that. This is the case for most of the new array
> libraries.
It goes beyond my current knowledge, now. How do you define
a custom data type as
On Tue, 10 Mar 2009 21:08:15 +0100, you wrote:
>I found one on Amazon
>http://www.amazon.com/Plush-Sloth-Bear-Cuddlekin-12/dp/B000FBLP76 , but
>without the logo.
>
>But we would of cause need one with Haskell logo printed upon it. I
>could not find a place with user-definable textile printing (if
Hello Don,
Wednesday, March 11, 2009, 12:12:07 AM, you wrote:
> Right, so my point stands: there's no difference now. If you can write a
> Storable instance, you can write a UA et al instance.
yes, if there is some class provided for this and not just hard-coded
4 or so base types
> And GHC 6.
xj2106:
> Don Stewart writes:
>
> > And what is Storable limited to?
> >
> > Ultimately they're all limited to the primops for reading and writing,
> > and to what types we can encode in those. So:
> >
> > primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
> > ...
> > {-
> > instance
bulat.ziganshin:
> Hello Don,
>
> Tuesday, March 10, 2009, 11:01:31 PM, you wrote:
>
> >> if uavector use ghc's built-in unboxed array operations (as
> >> Data.Array.Unboxed does) then it's necessarily bounded to types
> >> supported by those operations
>
> > And what is Storable limited to?
>
Hello Xiao-Yong,
Tuesday, March 10, 2009, 11:52:50 PM, you wrote:
> So it's me who understand it wrong. If I want some high
> performance array with elements of custom data type, I'm
> stuck with Array, anyway?
ForeignArray will be the best here. just make you type instance of
Storable. if you
Hello Don,
Tuesday, March 10, 2009, 11:01:31 PM, you wrote:
>> if uavector use ghc's built-in unboxed array operations (as
>> Data.Array.Unboxed does) then it's necessarily bounded to types
>> supported by those operations
> And what is Storable limited to?
> Ultimately they're all limited to t
Don Stewart writes:
> And what is Storable limited to?
>
> Ultimately they're all limited to the primops for reading and writing,
> and to what types we can encode in those. So:
>
> primop ReadOffAddrOp_Char "readCharOffAddr#" GenPrimOp
> ...
> {-
> instance Storable Double
> instance Sto
do nmergeIO or mergeIO preserve order? or not preserve order?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Perhaps we could make a sloth variant clinging to a tree branch then replace
the YEHH!! with YAAAWWWN!!
/jve
On Tue, Mar 10, 2009 at 4:19 PM, Don Stewart wrote:
> I thought this was our unofficial mascot:
>
>http://www.haskell.org/sitewiki/images/8/85/NarleyYeeaaahh.jpg
>
> Available in
TASE 2009 - CALL FOR POSTER PRESENTATIONS
**
* 3rd IEEE International Symposium on
* Theoretical Aspects of Software Engineering
* (TASE 2009)
* 29-31 July 2009, Tianjin, China
* http://www.dur.ac.uk/ieee.tase2009
*
* For more information email: ieee.tase2.
I thought this was our unofficial mascot:
http://www.haskell.org/sitewiki/images/8/85/NarleyYeeaaahh.jpg
Available in plush form:
http://www.amazon.com/Narwhal-Plush-Stuffed-Animal-Toy/dp/B0011DFUGE/ref=sr_1_3?ie=UTF8&s=toys-and-games&qid=1236716339&sr=1-3
YEEHH!
mads_lindstroem:
Hi Maurício
Great idea. I would love a toy one with a Lambda logo.
I found one on Amazon
http://www.amazon.com/Plush-Sloth-Bear-Cuddlekin-12/dp/B000FBLP76 , but
without the logo.
But we would of cause need one with Haskell logo printed upon it. I
could not find a place with user-definable texti
bulat.ziganshin:
> Hello Don,
>
> Tuesday, March 10, 2009, 10:40:30 PM, you wrote:
>
> >> I think uvector only works with certain types that can be
> >> unboxed, while storablevector works with all types that
> >> instantiate Foreign.Storable.Storable. I don't know about
> >> vector. From the d
Hello Don,
Tuesday, March 10, 2009, 10:40:30 PM, you wrote:
>> I think uvector only works with certain types that can be
>> unboxed, while storablevector works with all types that
>> instantiate Foreign.Storable.Storable. I don't know about
>> vector. From the description of vector, I have the
xj2106:
> Alexander Dunlap writes:
>
> > - uvector, storablevector and vector are all designed for dealing with
> > arrays. They *can* be used for characters/word8s but are not
> > specialized for that purpose, do not deal with Unicode at all, and are
> > probably worse at it. They are better for
I agree that we should use the first round of voting to learn what the
general consensus of the Haskell community is on a logo design "idea"
(and to filter out the non-viable logos).
In the spirit of bikeshedding, I would love to see---and would
volunteer to spend part of a day editing, say, the t
Hi Hany,
> *Plus2> writeVHDL plus2SysDef
> *** Exception: VHDL Compilation Error: Untranslatable function: where
> constructs are not supported in functions:
> where addOnef_0 = n_1 GHC.Num.+ 1
> in process function `addTwof' (created in Plus2) used by process
> `plus2Proc' belonging to sy
Hi Eugene,
I run into some troubles with the digest package on Windows.
On unix, digest binds to zlib, but on Windows, the relevant c files from
zlib are included. However, in digest-0.0.0.4, two header files were
missing which were needed for compilation on my machine. With these
header file
> If it is a hurdle for me, I can imagine a lot of people are getting frustrated
> at trying to distribute their binaries on Linux.
Yes. This is not a new observation :)
-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.or
Dear all,
I have used ForSyDe to translate a Haskell script to VHDL for a while, and I
have one problem by applying where-clause during the translation.
I wrote a small function Plus2.hs which is implied as following
addTwof :: ProcFun (Int32 -> Int32)
addTwof = $(newProcFun [d|addTwof ::
Thanks folks for your replies.
I did learn, from your e-mails and from the cabal documentation (example 9
on page
http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/builders.htm),
how to build a tarball with an executable and LICENSE file, via cabal copy.
It would have been nice to
Hi Bulat, hi all,
On 10 Mar 2009, at 16:06, Bulat Ziganshin wrote:
Hello Conor,
Tuesday, March 10, 2009, 6:59:58 PM, you wrote:
{-
-- Haskell Types with Numeric Constraints
--
On Wed, Mar 11, 2009 at 1:06 AM, Yusaku Hashimoto wrote:
>> import Test.Torch
>>
>> main = run $ do
>> ok (odd 1) "assertion"
>> is 42 (7*6) "equality assertion"
>> isBottom (error undefined) "check whether value is bottom"
>> ans <- liftIO (putStr "\n5 + 7 = " >> readLn)
>> is ans 12 "s
On Tue, Mar 10, 2009 at 4:34 PM, Manlio Perillo
wrote:
> After a quick search with Google, it seems that there is not yet an
> "official" document for Style Guide for Haskell Code.
>
> I was only able to found:
>
> http://www.cs.caltech.edu/courses/cs11/material/haskell/misc/haskell_style_guide.ht
Hello Conor,
Tuesday, March 10, 2009, 6:59:58 PM, you wrote:
> {-
> -- Haskell Types with Numeric Constraints
> -}
are you have in mind integrating results into produc
Hello,
I have wrote and uploaded my unit test library (or framework)
torch-0.1 on Hackage.
With torch, We can write simple unit test and run like this:
> import Test.Torch
>
> main = run $ do
> ok (odd 1) "assertion"
> is 42 (7*6) "equality assertion"
> isBottom (error undefined) "chec
Apologies for crossposting. Please forward this message
to individuals or lists who may be interested. In addition
to the recently advertised PhD position at Strathclyde on
"Reusability and Dependent Types", I am delighted to
advertise the following PhD opportunity.
{-
>
> I was not able to make the haddock documentation appear in Hackage,
> although I have no problem generating documentation using "cabal
> haddock" locally. It would be nice if there is a way to see some
> diagnose of warning or error messages why haddock failed on Hackage.
It is there now. P
After a quick search with Google, it seems that there is not yet an
"official" document for Style Guide for Haskell Code.
I was only able to found:
http://www.cs.caltech.edu/courses/cs11/material/haskell/misc/haskell_style_guide.html
http://urchin.earth.li/~ian/style/haskell.html
http://github.c
Maur??cio sed:
> Hi,
>
> Here in Brazil we have a forest animal we name 'preguiça' -- literally,
> lazyness. What better mascot we could have for Haskell? It lives (and
> sleeps) in trees, and if you see the main picture in wikipedia articles
> you can easily imagine the tree branch beeing repla
Hi,
Problem instance
In my code, I use some monad transformers. I used to use the "mtl" package,
but I recently switched to the combination "transformers"/"monads-tf"
(mainly for the Applicative instances).
The same code also uses the "haskeline" library, for line reading.
Haskeline a
On Tue, Mar 10, 2009 at 11:19 AM, Malcolm Wallace
wrote:
>> > The Google Summer of Code will be running again this year. Once
>> > again, haskell.org has the opportunity to bid to become a mentoring
>> > organisation. (Although, as always, there is no guarantee of
>> > acceptance.)
>>
>> Google
> > The Google Summer of Code will be running again this year. Once
> > again, haskell.org has the opportunity to bid to become a mentoring
> > organisation. (Although, as always, there is no guarantee of
> > acceptance.)
>
> Google is now accepting applications:
Indeed. Since I am (perhaps by
On Mon, 2009-03-09 at 17:56 -0700, John Meacham wrote:
> On Sun, Mar 08, 2009 at 01:13:33PM +0100, Svein Ove Aas wrote:
> > On Sun, Mar 8, 2009 at 12:32 PM, Duncan Coutts
> > wrote:
> > > Note also that the list of licenses mkcabal offers is wrong. You can get
> > > the list from the Cabal lib its
sparsebit - Sparse Bitmaps for Pattern Match Coverage
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/sparsebit
This library packages the functional peal paper 'Sparse Bitmaps for
Pattern Match Coverage' submitted to ICFP 2009 by Ki Yung Ahn and Tim
Sheard. You can look up the tutorial-
Don Stewart wrote:
Who needs to build futures into the language -- all you need is MVars, eh?
For a pure computation in Haskell one can use "par" (which did take changing the
runtime, and arguably adding to the language).
The future package I uploaded is just a clean way to get something a l
On Mon, 2009-03-09 at 21:08 -0400, Alexy Khrabrov wrote:
> Duncan --
>
> On Mar 9, 2009, at 8:14 PM, Duncan Coutts wrote:
> > BTW, how did you get the package installed in that location? Did it
> > involve copying into a temp dir and copying again? I believe that on
> > OSX, copying a .a file brea
On Tue, Feb 10, 2009 at 3:26 PM, Malcolm Wallace
wrote:
> Gentle Haskellers,
>
> The Google Summer of Code will be running again this year. Once again,
> haskell.org has the opportunity to bid to become a mentoring
> organisation. (Although, as always, there is no guarantee of
> acceptance.)
>
>
67 matches
Mail list logo