RE: What is a punctuation character?

2012-03-19 Thread Simon Marlow
On Fri, Mar 16, 2012 at 6:49 PM, Ian Lynagh ig...@earth.li wrote: Hi Gaby, On Fri, Mar 16, 2012 at 06:29:24PM -0500, Gabriel Dos Reis wrote: OK, thanks!  I guess a take away from this discussion is that what is a punctuation is far less well defined than it appears... I'm not

Re: What is a punctuation character?

2012-03-19 Thread Gabriel Dos Reis
On Mon, Mar 19, 2012 at 4:34 AM, Simon Marlow simon...@microsoft.com wrote: On Fri, Mar 16, 2012 at 6:49 PM, Ian Lynagh ig...@earth.li wrote: Hi Gaby, On Fri, Mar 16, 2012 at 06:29:24PM -0500, Gabriel Dos Reis wrote: OK, thanks!  I guess a take away from this discussion is that what is

Re: What is a punctuation character?

2012-03-19 Thread Brandon Allbery
On Mon, Mar 19, 2012 at 05:56, Gabriel Dos Reis g...@integrable-solutions.net wrote: The fact that the Report is silent about encoding used to represent concrete Haskell programs in text files adds a certain level of non-portability (and confusion.) I found Specifying the encoding can

Re: What is a punctuation character?

2012-03-19 Thread Gabriel Dos Reis
On Mon, Mar 19, 2012 at 5:36 AM, Brandon Allbery allber...@gmail.com wrote: On Mon, Mar 19, 2012 at 05:56, Gabriel Dos Reis g...@integrable-solutions.net wrote: The fact that the Report is silent about encoding used to represent concrete Haskell programs in text files adds a certain level of

Re: What is a punctuation character?

2012-03-19 Thread Colin Paul Adams
Iavor report? My understanding is that the intention is that the Iavor alphabet is unicode codepoints (sometimes referred to as Iavor unicode characters). Unicode characters are not the same as Unicode codepoints. What we want is Unicode characters. We don't want to be able to

Re: String != [Char]

2012-03-19 Thread Greg Weber
I actually was not able to successfully google for Text vs. String benchmarks. If someone can point one out that would be very helpful. On Sat, Mar 17, 2012 at 1:52 AM, Christopher Done chrisd...@googlemail.com wrote: On 17 March 2012 05:30, Tony Morris tonymor...@gmail.com wrote: Do you know

Re: String != [Char]

2012-03-19 Thread Johan Tibell
Hi Greg, There are a few blog posts on Bryan's blog. Here are two of them: http://www.serpentine.com/blog/2009/10/09/announcing-a-major-revision-of-the-haskell-text-library/ http://www.serpentine.com/blog/2009/12/10/the-performance-of-data-text/ Unfortunately the blog seems partly

Re: String != [Char]

2012-03-19 Thread Duncan Coutts
On 17 March 2012 01:44, Greg Weber g...@gregweber.info wrote: the text library and Text data type have shown the worth in real world Haskell usage with GHC. I try to avoid String whenever possible, but I still have to deal with conversions and other issues. There is a lot of real work to be

Re: String != [Char]

2012-03-19 Thread Thomas Schilling
On 18 March 2012 19:29, ARJANEN Loïc Jean David arjanen.l...@gmail.com wrote: Good point, but rather than specifying in the standard that the new string type should be the Text datatype, maybe the new definition should be that String is a newtype with suitable operations defined on it, and

Re: String != [Char]

2012-03-19 Thread Johan Tibell
On Mon, Mar 19, 2012 at 8:45 AM, Thomas Schilling nomin...@googlemail.com wrote: Regarding the type class for converting to and from that type, there is a perhaps more complicated question: The current fromString method uses String as the source type which causes unnecessary overhead. This is

Re: String != [Char]

2012-03-19 Thread Christian Siefkes
On 03/19/2012 04:53 PM, Johan Tibell wrote: I've been thinking about this question as well. How about class IsString s where unpackCString :: Ptr Word8 - CSize - s What's the Ptr Word8 supposed to contain? A UTF-8 encoded string? Best regards Christian -- |--- Dr.

Re: String != [Char]

2012-03-19 Thread Johan Tibell
On Mon, Mar 19, 2012 at 9:02 AM, Christian Siefkes christ...@siefkes.net wrote: On 03/19/2012 04:53 PM, Johan Tibell wrote: I've been thinking about this question as well. How about class IsString s where     unpackCString :: Ptr Word8 - CSize - s What's the Ptr Word8 supposed to contain? A

Re: String != [Char]

2012-03-19 Thread Greg Weber
This is the best I can do with Bryan's blog posts, but none of the graphs (which contain all the information) show up: http://web.archive.org/web/20100222031602/http://www.serpentine.com/blog/2009/12/10/the-performance-of-data-text/ If someone has some benchmarks that can be ran that would be

RE: String != [Char]

2012-03-19 Thread Simon Peyton-Jones
Don't forget that with -XOverloadedStrings we already have a IsString class. (That's not a Haskell Prime extension though.) class IsString a where fromString :: String - a Simon | -Original Message- | From: haskell-prime-boun...@haskell.org [mailto:haskell-prime- |

Re: String != [Char]

2012-03-19 Thread Daniel Peebles
If the input is specified to be UTF-8, wouldn't it be better to call the method unpackUTF8 or something like that? On Mon, Mar 19, 2012 at 12:59 PM, Johan Tibell johan.tib...@gmail.comwrote: On Mon, Mar 19, 2012 at 9:02 AM, Christian Siefkes christ...@siefkes.net wrote: On 03/19/2012 04:53

Re: String != [Char]

2012-03-19 Thread Johan Tibell
On Mon, Mar 19, 2012 at 2:55 PM, Daniel Peebles pumpkin...@gmail.com wrote: If the input is specified to be UTF-8, wouldn't it be better to call the method unpackUTF8 or something like that? Sure. -- Johan ___ Haskell-prime mailing list