Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Two questions for a production project... (Yitzchak Gale)
2. Re: Fwd: Implementing a spellchecker - problem with
Data.HashTable performance (Chadda? Fouch?)
3. Is it only one data structure per ST monad? (KC)
4. Re: Is it only one data structure per ST monad? (Edward Z. Yang)
5. (no subject) (KC)
6. The last statement in a 'do' construct must be an
expression: a <- readArray arr (1, 1) (KC)
7. Re: [Haskell-cafe] The last statement in a 'do' construct
must be an expression: a <- readArray arr (1, 1) (KC)
----------------------------------------------------------------------
Message: 1
Date: Mon, 23 Apr 2012 17:46:07 +0300
From: Yitzchak Gale <[email protected]>
Subject: Re: [Haskell-beginners] Two questions for a production
project...
To: umptious <[email protected]>
Cc: [email protected]
Message-ID:
<CAOrUaLZ28v+H0R-8G-4vQoidP+Tncp2J_Kf9dKz=xTr1n=z...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
umptious wrote:
> ...I can't find a list of real world users for
> Yesod etc.
There are a number of companies doing web development
using each of the various Haskell web frameworks, as well as
freelancers. Since you mentioned Yesod specifically, yes,
some of them use Yesod.
I wont' speak for any them, though. Instead, join the web-devel
mailing list to keep up with what's happening
in the Haskell web development world:
http://www.haskell.org/mailman/listinfo/web-devel
Or see the home pages of the three main web frameworks
for framework-specific community resources:
http://www.happstack.com/
http://snapframework.com/
http://www.yesodweb.com/
Regards,
Yitz
------------------------------
Message: 2
Date: Mon, 23 Apr 2012 17:38:37 +0200
From: Chadda? Fouch? <[email protected]>
Subject: Re: [Haskell-beginners] Fwd: Implementing a spellchecker -
problem with Data.HashTable performance
To: Rados?aw Szymczyszyn <[email protected]>
Cc: [email protected]
Message-ID:
<CANfjZRYm=yz5w8mscclyytqzcqzrqnauk4016_dr85betr8...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
On Sun, Apr 22, 2012 at 4:58 PM, Rados?aw Szymczyszyn <[email protected]> wrote:
> Thank you all for thoughts and suggestions. I've been tracking them as
> they appeared, but being busy with university assignments, couldn't
> try them out yet.
>
> In the meantime, however, Karol Samborski investigated the issue
> further and found the cause of poor performance -- somehow using
> HashTable.newHint doesn't play well with HashTable.update. Simply
> changing newHint to hint gives me execution time of about 12s (on my
> rather slowish AMD Fusion 1.6GHz laptop) with a dataset of ~1.35mln
> words.
>
While it's good that you have found a bug that explain the very poor
performance you got, I must reiterate Brent Yorgey's advice to use
Data.HashMap from unordered-containers or some other performance
oriented implementation : Data.HashTable is a legacy datastructure
that was mainly introduced to have a hashtable in Haskell core
libraries, it ran into some performance problem of GHC (only reduced
in very recent release I believe) and was never written to be very
fast in the first place... Avoiding it is generally a very good idea !
Using another structure (HashMap or some trie implementation) would
probably get you much better performance without hassle. I must admit
that having Data.HashTable in the base library without warning as to
its unsuitability is very misleading to the beginner coming from Perl
or Python.
--
Jeda?
------------------------------
Message: 3
Date: Mon, 23 Apr 2012 11:32:57 -0700
From: KC <[email protected]>
Subject: [Haskell-beginners] Is it only one data structure per ST
monad?
To: haskell-cafe <[email protected]>, [email protected]
Message-ID:
<CAMLKXynmZsoVcOyQ4hVCo2kvTq-X48qZdyNN_=p6beqrfbs...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Is it only one data structure per ST monad?
--
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120423/0379a44a/attachment-0001.htm>
------------------------------
Message: 4
Date: Mon, 23 Apr 2012 16:49:33 -0400
From: "Edward Z. Yang" <[email protected]>
Subject: Re: [Haskell-beginners] Is it only one data structure per ST
monad?
To: KC <[email protected]>
Cc: beginners <[email protected]>, haskell-cafe
<[email protected]>
Message-ID: <1335214142-sup-4033@ezyang>
Content-Type: text/plain; charset=UTF-8
If you mean, per 'ST s a', no: you can generate as many
STRefs as you want.
Edward
Excerpts from KC's message of Mon Apr 23 14:32:57 -0400 2012:
> Is it only one data structure per ST monad?
>
------------------------------
Message: 5
Date: Mon, 23 Apr 2012 13:51:03 -0700
From: KC <[email protected]>
Subject: [Haskell-beginners] (no subject)
To: haskell-cafe <[email protected]>, [email protected]
Message-ID:
<CAMLKXynrGaMu8GUMpjCkF4ZuJSegaXXv3YOo-ao7wxw=aT-=d...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
buildPair =
do
arr <- newArray ((1,1),(1,10)) 37 :: ST s (STArray s (Int,Int) Int)
a <- readArray arr (1,1)
writeArray arr (1,1) 64
b <- readArray arr (1,1)
return (a,b)
main = print $ runST buildPair
--
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120423/f9ad2a32/attachment-0001.htm>
------------------------------
Message: 6
Date: Mon, 23 Apr 2012 13:52:48 -0700
From: KC <[email protected]>
Subject: [Haskell-beginners] The last statement in a 'do' construct
must be an expression: a <- readArray arr (1, 1)
To: haskell-cafe <[email protected]>, [email protected]
Message-ID:
<CAMLKXy=z9yJNJ1X6ceDxoEmyiZFGE4uW=quciizrvvbyr4u...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
I'm getting the above error message and I cannot figure out why?
buildPair =
do
arr <- newArray ((1,1),(1,10)) 37 :: ST s (STArray s (Int,Int) Int)
a <- readArray arr (1,1)
writeArray arr (1,1) 64
b <- readArray arr (1,1)
return (a,b)
main = print $ runST buildPair
--
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120423/b106eeca/attachment-0001.htm>
------------------------------
Message: 7
Date: Mon, 23 Apr 2012 13:58:21 -0700
From: KC <[email protected]>
Subject: Re: [Haskell-beginners] [Haskell-cafe] The last statement in
a 'do' construct must be an expression: a <- readArray arr (1, 1)
To: Ryan Yates <[email protected]>, haskell-cafe
<[email protected]>, [email protected]
Message-ID:
<camlkxym0rtxkooac2a0lkaihrwaur-8g9qgso4wgqbpl88k...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Thank you, that was it.
I was mixing up and tabs and spaces.
I expected new versions of NotePad++ to keep my old settings.
On Mon, Apr 23, 2012 at 1:54 PM, Ryan Yates <[email protected]> wrote:
> Perhaps you are mixing tabs and spaces?
>
> On Mon, Apr 23, 2012 at 4:52 PM, KC <[email protected]> wrote:
>
>> I'm getting the above error message and I cannot figure out why?
>>
>>
>> buildPair =
>> do
>> arr <- newArray ((1,1),(1,10)) 37 :: ST s (STArray s (Int,Int) Int)
>> a <- readArray arr (1,1)
>> writeArray arr (1,1) 64
>> b <- readArray arr (1,1)
>> return (a,b)
>>
>>
>> main = print $ runST buildPair
>>
>>
>> --
>> --
>> Regards,
>> KC
>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> [email protected]
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>>
>>
>
--
--
Regards,
KC
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20120423/9a083740/attachment-0001.htm>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 46, Issue 41
*****************************************