Re: [Haskell-cafe] How to input Unicode string in Haskell program?

2013-02-22 Thread Jon Fairbairn
Alexander V Vershilov alexander.vershi...@gmail.com writes: The problem is that Prelude.getLine uses current locale to load characters: for example if you have utf8 locale, then everything works out of the box: $ runhaskell 1.hs résumé 履歴書 резюме résumé 履歴書 резюме But if you change locale

Re: [Haskell-cafe] How to input Unicode string in Haskell program?

2013-02-22 Thread Semyon Kholodnov
with Unicode quite well. Anyway, the problem is partially solved: I patched my WinGHCi so it no longer chokes on Unicode input, and as for compiled .exe... I'll see. 2013/2/22, Jon Fairbairn jon.fairba...@cl.cam.ac.uk: Alexander V Vershilov alexander.vershi...@gmail.com writes: The problem

Re: [Haskell-cafe] How to input Unicode string in Haskell program?

2013-02-22 Thread Albert Y. C. Lai
to switch to the UTF-8 code page. Unfortunately, code page and encoding is only half of the battle; the other half is fonts. Most Windows fonts are incomplete; all Windows fixed-width fonts are incomplete. (Silver lining: Arial Unicode is sufficiently complete.) Therefore, you may be unable

[Haskell-cafe] How to input Unicode string in Haskell program?

2013-02-21 Thread Semyon Kholodnov
(It works! Because Windows has Unicode for 20 years now), but the output is all messed up. In a rather curious way, actually: the input string is converted to UTF-8 byte string, and its bytes are treated as being characters from my local code page. So, it appears that I have no way to enter Unicode

Re: [Haskell-cafe] How to input Unicode string in Haskell program?

2013-02-21 Thread MigMit
contains Latin-1, Cyrillic and Kanji symbols at the same time. But there is also WinGHCi. So I do :main, copy-paste this string into the window (It works! Because Windows has Unicode for 20 years now), but the output is all messed up. In a rather curious way, actually: the input string

Re: [Haskell-cafe] How to input Unicode string in Haskell program?

2013-02-21 Thread Erik Hesselink
such an outrageous string — Windows console is locked to one specific local code page, and no codepage contains Latin-1, Cyrillic and Kanji symbols at the same time. But there is also WinGHCi. So I do :main, copy-paste this string into the window (It works! Because Windows has Unicode for 20

[Haskell-cafe] Fwd: How to input Unicode string in Haskell program?

2013-02-21 Thread Semyon Kholodnov
-- Forwarded message -- From: Semyon Kholodnov joker...@gmail.com Date: Thu, 21 Feb 2013 16:26:58 +0400 Subject: Re: [Haskell-cafe] How to input Unicode string in Haskell program? To: Alexander V Vershilov alexander.vershi...@gmail.com I know that this problem doesn't exist

[Haskell-cafe] Unicode case (in)stability and Haskell identifiers.

2012-11-02 Thread Richard O'Keefe
I've been putting together a proposal for Unicode identifiers in Erlang (it's EEP 40 if anyone wants to look it up). In the course of this, it has turned out that there is a technical problem for languages with case-significant identifiers. Haskell 2010 report, chapter 2. http://www.haskell.org

Re: [Haskell-cafe] Unicode case (in)stability and Haskell identifiers.

2012-11-02 Thread Max Rabkin
I try to maintain some knowledge of Unicode issues, but this one never occurred to me. On Fri, Nov 2, 2012 at 10:28 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote: Would anyone care to see and comment on the proposal before I send it to Unicode.org? Anyone got any suggestions before I begin

[Haskell-cafe] XMonad.Shell.Prompt and unicode input

2012-01-24 Thread Eugene Dzhurinsky
Hello, community! I have some strange issue with recent XMonad: with using of standard Shell module it is not possible to use unicode input. It simply freezes up and in console I can observe: Enum.toEnum{Word8} : tag (1092) is outside of bounds (0,255). What function may cause such error

[Haskell-cafe] TypeOperators and Unicode

2011-09-12 Thread Grigory Sarnitskiy
I want to have Unicode symbols for type operator: {-# LANGUAGE TypeOperators #-} data a ── b = Foo a b But it doesn't work. Any suggestions? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] TypeOperators and Unicode

2011-09-12 Thread Maciej Marcin Piechotka
On Mon, 2011-09-12 at 11:51 +0400, Grigory Sarnitskiy wrote: I want to have Unicode symbols for type operator: {-# LANGUAGE TypeOperators #-} Add also: {-# LANGUAGE UnicodeSyntax #-} data a ── b = Foo a b But it doesn't work. Any suggestions? Regards signature.asc Description

Re: [Haskell-cafe] TypeOperators and Unicode

2011-09-12 Thread Grigory Sarnitskiy
+0400, Grigory Sarnitskiy wrote:  I want to have Unicode symbols for type operator:  {-# LANGUAGE TypeOperators #-} Add also: {-# LANGUAGE UnicodeSyntax #-}  data a ── b = Foo a b  But it doesn't work. Any suggestions? Regards ___ Haskell-Cafe

Re: [Haskell-cafe] TypeOperators and Unicode

2011-09-12 Thread Brandon Allbery
2011/9/12 Grigory Sarnitskiy sargrig...@ya.ru Still {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UnicodeSyntax #-} data a ── b = Foo a b leads to test.hs:4:6: Malformed head of type or class declaration: a ── b Failed, modules loaded: none. Don't all infix constructors have to start

Re: [Haskell-cafe] TypeOperators and Unicode

2011-09-12 Thread Roel van Dijk
2011/9/12 Brandon Allbery allber...@gmail.com: Don't all infix constructors have to start with a colon? Yes that is true. You can of course use Unicode symbols as infix type variables: (⋙) :: Category ⇝ = (α ⇝ β) - (β ⇝ γ) - α ⇝ γ But a constructor must always begin with a capital letter

Re: [Haskell-cafe] Posix IO Unicode lookup exception

2011-05-01 Thread Mark Lentczner
My guess is that you are closing the file descriptor out from under the handle. It is probably the handle that has the open iconv connection, and since it is never closed, you run out of memory. Why not just interact with the handle? Use hPutStr instead of fdWrite, and hClose instead of closeFd.

[Haskell-cafe] Posix IO Unicode lookup exception

2011-04-24 Thread Lee Pike
Hi, I wanted to see if anyone had an idea about why the following program results in an exception. The issue seems to be related to stdin to a POSIX file descriptors for a subprocess, and GHC's Unicode encoding lookup. I've tried to make the program as simple as possible to make the issue

Re: [Haskell-cafe] Unicode normalization

2011-04-20 Thread Colin Adams
. On 20 April 2011 03:02, wren ng thornton w...@freegeek.org wrote: Hello all, I'm in need of a Unicode normalization function, Utf8 NFC for ByteString in particular. From some quick Googling around it looks like the only available option is to use ICU in some form. The text-icu package has a nice

[Haskell-cafe] Unicode normalization

2011-04-19 Thread wren ng thornton
Hello all, I'm in need of a Unicode normalization function, Utf8 NFC for ByteString in particular. From some quick Googling around it looks like the only available option is to use ICU in some form. The text-icu package has a nice binding to it, but unfortunately that means a lot of redundant

[Haskell-cafe] [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

2011-03-30 Thread John Obbele
Hi everyone ! I'm having a problem in GHCi when loading modules relying on the base-unicode-symbols package. My prompt gives me the following message: ghci $ GHCi, version 7.0.2: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp

Re: [Haskell-cafe] [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

2011-03-30 Thread John Obbele
On Wed, Mar 30, 2011 at 10:37:47PM +0200, John Obbele wrote: I'm having a problem in GHCi when loading modules relying on the base-unicode-symbols package. My prompt gives me the following message: ghci $ Loading package base-unicode-symbols-0.2.1.2 ... linking ... interactive: /home

Re: [Haskell-cafe] [ghci] unknown symbol in base-unicode-symbols-0.2.1.2 ...

2011-03-30 Thread Roel van Dijk
john.obb...@gmail.com wrote: On Wed, Mar 30, 2011 at 10:37:47PM +0200, John Obbele wrote: I'm having a problem in GHCi when loading modules relying on the base-unicode-symbols package. My prompt gives me the following message: ghci $ Loading package base-unicode-symbols-0.2.1.2 ... linking

Re: [Haskell-cafe] unicode filenames advice

2011-02-15 Thread Yves Parès
been trying to deal with how my haskell program handles unicode filenames. Been dealing with problems like those described here: http://hackage.haskell.org/trac/ghc/ticket/3307 Or, simply demonstrated by feeding unicode to getLine = readFile My approach currently is to carefully identify any

[Haskell-cafe] unicode filenames advice

2011-02-11 Thread Joey Hess
I've been trying to deal with how my haskell program handles unicode filenames. Been dealing with problems like those described here: http://hackage.haskell.org/trac/ghc/ticket/3307 Or, simply demonstrated by feeding unicode to getLine = readFile My approach currently is to carefully identify

Re: [Haskell-cafe] [ANNOUNCE] text 0.10.0.0 - fast Unicode text handling

2010-10-22 Thread Ivan Lazar Miljenovic
On 22 October 2010 16:38, Bryan O'Sullivan b...@serpentine.com wrote: [Blog copy of the announcement here.] I just pushed it to bitbucket and github, and you can install it from the text site on Hackage in the usual way: cabal update cabal install text What's in this release? New 

Re: [Haskell-cafe] [ANNOUNCE] text 0.10.0.0 - fast Unicode text handling

2010-10-22 Thread Johan Tibell
On Fri, Oct 22, 2010 at 10:30 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: For example, I assume that it's better to try and use Text throughout rather than continually packing String values (in my case, I'm looking at using Text for I/O in graphviz; should I then start using Text

[Haskell-cafe] [ANNOUNCE] text 0.10.0.0 - fast Unicode text handling

2010-10-21 Thread Bryan O'Sullivan
decoding and encoding are now very fasthttp://www.serpentine.com/blog/2010/10/15/unicode-text-performance-improvements/. They're up to 9x faster than they were, and close to the performance of pure C UTF-8 decoding and encoding. - The Eq and Ord instances are also now very fast, up to 5x

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-08 Thread Daniel Fischer
On Wednesday 08 September 2010 06:44:32, Bryan O'Sullivan wrote: I have a Replace.hs benchmark in the main text repo, just to be sure we're talking about the same thing. Grabbed the darcs repo, compiled with the darcs version and also with the installed text package, both exhibit the same

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-08 Thread Daniel Fischer
On Wednesday 08 September 2010 13:46:13, Daniel Fischer wrote: My timings are quite different, but that's probably because 6.12.3's inliner doesn't give the full fusion benefit, so it'll improve automatically with the next GHC release. Or maybe not so much. Just built the latest source bundle

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-07 Thread Bryan O'Sullivan
On Wed, Sep 1, 2010 at 12:29 PM, Daniel Fischer daniel.is.fisc...@web.dewrote: I'm on Linux. I guess that's another point in favour of it:) Do you happen to know why it's slower on a Mac? I'd guess because of something to do with the system iconv. So I tentatively believe most of the

[Haskell-cafe] Re: Laziness bug in Data.List.intersperse (was: ANNOUNCE: text 0.8.0.0, fast Unicode text support)

2010-09-04 Thread Bryan O'Sullivan
On Wed, Sep 1, 2010 at 1:00 PM, Daniel Fischer daniel.is.fisc...@web.dewrote: I'm not keen on subscribing to libraries@ to follow the official proposal process, any takers? I'll take it up. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Ivan Lazar Miljenovic
On 1 September 2010 15:14, John Millikin jmilli...@gmail.com wrote: [aside] does anybody know how to get a list of what packages somebody's uploaded to Hackage? I think I've updated all mine for the new text version dependency, but I'm worried I forgot some. Unfortunately, no; I've often

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Tako Schotanus
On Wed, Sep 1, 2010 at 07:14, John Millikin jmilli...@gmail.com wrote: Don't forget, you can always improve the text library yourself. I love to receive patches, requests for improvement, and bug reports. Are there any areas in particular you'd like help with, for either library? I'm

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread David Virebayre
2010/9/1 Tako Schotanus t...@codejive.org: As a Haskell noob I'm curious about this statement, is there something intrinsically wrong with String? String is just a linked list of Char which are unicode code points; which is probably not the optimal way to store text. For intensive use of text

[Haskell-cafe] Re: ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Kevin Jardine
Hi Tako, The issues involved with String, ByteString, Text and a few related libraries were discussed at great length recently in this thread: http://groups.google.com/group/haskell-cafe/browse_thread/thread/52a21cf61ffb21b0/ Basically, Chars are 32 bit integers and Strings are represented as a

Re: [Haskell-cafe] Re: ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Tako Schotanus
Hi Kevin, thanks for the pointer, although I was aware of the thread and had followed it quite closely, it was quite interesting. But it never explained if and why String should be avoided, all I read is test and decide depending on the circumstances, which in itself is good advise, but I'd like

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Daniel Fischer
library provides an efficient packed, immutable Unicode text type (both strict and lazy), with a powerful loop fusion optimization framework. The 'Text' type represents Unicode character strings, in a time and space-efficient manner. This package provides text processing capabilities

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Bryan O'Sullivan
Hi, Daniel - Thanks for taking the new code for a test drive! The interesting part is the comparison between text and vanilla String I/O, the difference is smaller than I expected for text-0.8.0.0. Yes. Much of this is due to the new encoding stuff on Handles in GHC 6.12, which is slow. Its

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Bryan O'Sullivan
On Tue, Aug 31, 2010 at 10:14 PM, John Millikin jmilli...@gmail.com wrote: Is there a summary of the API changes available? I see a new module, but Precis is choking on Data.Text and Data.Text.Lazy, so I'm not sure what existing signatures have been modified. Ouch. I'll try to do a diff and

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Daniel Fischer
On Wednesday 01 September 2010 18:15:19, Bryan O'Sullivan wrote: Hi, Daniel - Thanks for taking the new code for a test drive! The interesting part is the comparison between text and vanilla String I/O, the difference is smaller than I expected for text-0.8.0.0. Yes. Much of this is due

[Haskell-cafe] Laziness bug in Data.List.intersperse (was: ANNOUNCE: text 0.8.0.0, fast Unicode text support)

2010-09-01 Thread Daniel Fischer
On Wednesday 01 September 2010 21:29:47, Daniel Fischer wrote: that's where you definitely get a space leak, because intersperse             :: a - [a] - [a] intersperse _   []      = [] intersperse _   [x]     = [x] intersperse sep (x:xs)  = x : sep : intersperse sep xs isn't lazy enough.

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-09-01 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/01/2010 02:44 AM, Ivan Lazar Miljenovic wrote: On 1 September 2010 16:27, David Virebayre dav.vire+hask...@gmail.com wrote: Sometimes I'd love if I could program using String and the compiler would automatically convert that to Text, or

[Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-08-31 Thread Bryan O'Sullivan
New in this release: - Substantial performance improvements. - Bug fixes, and better quality assurance via automated QuickCheck and HPC tests and coverage. - An even nicer API than before. The text library provides an efficient packed, immutable Unicode text type (both strict

Re: [Haskell-cafe] ANNOUNCE: text 0.8.0.0, fast Unicode text support

2010-08-31 Thread John Millikin
Is there a summary of the API changes available? I see a new module, but Precis is choking on Data.Text and Data.Text.Lazy, so I'm not sure what existing signatures have been modified. Don't forget, you can always improve the text library yourself. I love to receive patches, requests for

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-29 Thread Peter Gromov
Thanks for getting back to me. I was imprecise, by UTF8 characters I mean Unicode. My source files are UTF8-encoded, and Haskell reads them fine, it only has problems outputting them in a readable way. At this point I'm not talking of any I/O besides plain console output. Not using Show

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-29 Thread Ivan Lazar Miljenovic
2010/8/29 Peter Gromov gromop...@gmail.com: Thanks for getting back to me. I was imprecise, by UTF8 characters I mean Unicode. My source files are UTF8-encoded, and Haskell reads them fine, it only has problems outputting them in a readable way. At this point I'm not talking of any I/O besides

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-29 Thread Peter Gromov
to me. I was imprecise, by UTF8 characters I mean Unicode. My source files are UTF8-encoded, and Haskell reads them fine, it only has problems outputting them in a readable way. At this point I'm not talking of any I/O besides plain console output. How are you outputting them?  Unless you use

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-29 Thread Ivan Lazar Miljenovic
On 29 August 2010 21:24, Peter Gromov gromop...@gmail.com wrote: Yes, it's GHC 6.12.3. Character escapes are the least I want to see. *sigh* that could be because HUnit is calling print ( = putStrLn . show) on the String rather than putStrLn; unfortunately unless it decides to have a special

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-29 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/29/10 07:35 , Ivan Lazar Miljenovic wrote: On 29 August 2010 21:24, Peter Gromov gromop...@gmail.com wrote: $ locale LANG= LC_COLLATE=C LC_CTYPE=C LC_MESSAGES=C LC_MONETARY=C LC_NUMERIC=C LC_TIME=C LC_ALL= Unfortunately, I'm completely

[Haskell-cafe] Unicode pretty-printing

2010-08-28 Thread Peter Gromov
Hi all, I've been considering using Haskell for my natural language processing project. Due to its nature, it has much to do with Unicode. Unfortunately, Haskell escapes UTF8 characters. I've been able to output these strings via System.IO.UTF8.putStrLn (though I wish it was less painful

Re: [Haskell-cafe] Unicode pretty-printing

2010-08-28 Thread Don Stewart
gromopetr: Hi all, I've been considering using Haskell for my natural language processing project. Due to its nature, it has much to do with Unicode. Unfortunately, Haskell escapes UTF8 characters. I've been able to output these strings via System.IO.UTF8.putStrLn (though I wish

[Haskell-cafe] Re: Unicode vs. System.Directory

2010-05-27 Thread Andy Stewart
Hi Arie, If you don't mind binding code. You can try to use GIO APIs from my repository: http://patch-tag.com/r/AndyStewart/gio-branch/home GIO APIs handle unicode filename every well, and cross-platform. Cheers, -- Andy Arie Peterson ar...@xs4all.nl writes: After upgrading to haskell

Re: [Haskell-cafe] Re: Unicode vs. System.Directory

2010-05-27 Thread Bulat Ziganshin
, such as displaying icons/filetypes, launching documents...) Hi Arie, If you don't mind binding code. You can try to use GIO APIs from my repository: http://patch-tag.com/r/AndyStewart/gio-branch/home GIO APIs handle unicode filename every well, and cross-platform. Cheers, -- Andy Arie

Re[2]: [Haskell-cafe] Re: Unicode vs. System.Directory

2010-05-27 Thread Bulat Ziganshin
Hello Andy, Friday, May 28, 2010, 1:05:59 AM, you wrote: Looks my file-manager: http://farm5.static.flickr.com/4027/4584389024_782b1e09ee_o.png can you please share windows and linux executables and source code? I have finish all necessary GIO APIs at

Re[3]: [Haskell-cafe] Re: Unicode vs. System.Directory

2010-05-27 Thread Bulat Ziganshin
Hello Bulat, Friday, May 28, 2010, 9:24:02 AM, you wrote: I have finish all necessary GIO APIs at http://patch-tag.com/r/AndyStewart/gio-branch/home but what is the license? heh, i've found COPYING file. but what you mean? if it's just about one should share all improvements to the library

[Haskell-cafe] Unicode vs. System.Directory

2010-05-26 Thread Arie Peterson
After upgrading to haskell-platform-2010.1.0.0, with the improved unicode support for IO in ghc-6.12, I hoped to be able to deal with filenames containing non-ascii characters. This still seems problematic, though: $ ls m×n♯α $ ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help

Re: [Haskell-cafe] Unicode vs. System.Directory

2010-05-26 Thread Johan Tibell
On Wed, May 26, 2010 at 1:25 PM, Arie Peterson ar...@xs4all.nl wrote: Is this a known problem? I searched ghc's trac, but there are no relevant bugs for the component 'libraries/directory'. This bug might be relevant: http://hackage.haskell.org/trac/ghc/ticket/3307

Re: [Haskell-cafe] Unicode vs. System.Directory

2010-05-26 Thread Yitzchak Gale
Arie Peterson wrote: After upgrading to haskell-platform-2010.1.0.0, with the improved unicode support for IO in ghc-6.12, I hoped to be able to deal with filenames containing non-ascii characters. This still seems problematic, though Yes, unfortunately. This is not simple to fix, for several

[Haskell-cafe] Re: Unicode strings and runCommand / runProcess

2010-04-26 Thread S. Astanin
. According to Simon Marlow, Be careful with FilePaths. On Windows they are interpreted as Unicode, on Unix they are interpreted as [Word8], by taking the low 8 bits of each Char. So if you always encode FilePaths to UTF-8, that will break on Windows. Fixing FilePaths is a high priority. The last

Re: [Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-24 Thread Khudyakov Alexey
В сообщении от 24 апреля 2010 06:14:55 вы написали: Khudyakov Alexey wrote: Actually, the behavior of openFile when given a String with characters 0xFF is also completely undocumented. I am not sure what it does with that. It should probably be the same as runCommand, whatever it is.

[Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-23 Thread John Goerzen
Here is a very interesting little problem. ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude :m System.Process Prelude

Re: [Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-23 Thread Khudyakov Alexey
this, and perhaps a version of runProcess that accepts ByteStrings. It should just use system locale for encoding like System.IO do. FYI I just submitted bug to GHC trac: http://hackage.haskell.org/trac/ghc/ticket/4006 P.S. Haskell libraries aren't very well designed with respect to unicode

Re: [Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-23 Thread Ivan Lazar Miljenovic
John Goerzen jgoer...@complete.org writes: ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude :m System.Process Prelude

Re: [Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-23 Thread John Goerzen
Ivan Lazar Miljenovic wrote: John Goerzen jgoer...@complete.org writes: ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude :m

Re: [Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-23 Thread Khudyakov Alexey
В сообщении от 24 апреля 2010 03:50:54 John Goerzen написал: Ivan Lazar Miljenovic wrote: John Goerzen jgoer...@complete.org writes: ghci GHCi, version 6.12.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking

Re: [Haskell-cafe] Unicode strings and runCommand / runProcess

2010-04-23 Thread John Goerzen
Khudyakov Alexey wrote: Actually, the behavior of openFile when given a String with characters 0xFF is also completely undocumented. I am not sure what it does with that. It should probably be the same as runCommand, whatever it is. Under unices file names are just array of bytes. There is

[Haskell-cafe] HWN Issue 148 -- unicode error

2010-01-31 Thread Joe Fredette
Indeed, the Unicode only made it through my system, and not the mailer itself. In fact, the name should look something like Ćwikłowski, and not the garbled mess that made it through. Apologies again, Bartek! /Joe___ Haskell-Cafe mailing list

[Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Bryan O'Sullivan
The new 0.7 release of the text packagehttp://hackage.haskell.org/package/textadds support for Unicode I/O, using either the new locale-aware Handle code in 6.12 or a fallback on older releases. Details: http://www.serpentine.com/blog/2009/12/15/data-text-0-7-gains-io-support

Re: [Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Don Stewart
bos: The new 0.7 release of the text package adds support for Unicode I/O, using either the new locale-aware Handle code in 6.12 or a fallback on older releases. Details: http://www.serpentine.com/blog/2009/12/15/ data-text-0-7-gains-io-support/ That was ridculously fast. -- Don

Re: [Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Ivan Lazar Miljenovic
Bryan O'Sullivan b...@serpentine.com writes: using either the new locale-aware Handle code in 6.12 or a fallback on older releases. How do you manage this? Any chance of abstracting something like this out (ala extensible-exceptions)? -- Ivan Lazar Miljenovic ivan.miljeno...@gmail.com

Re: [Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Bryan O'Sullivan
On Tue, Dec 15, 2009 at 3:15 AM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Bryan O'Sullivan b...@serpentine.com writes: using either the new locale-aware Handle code in 6.12 or a fallback on older releases. How do you manage this? Any chance of abstracting something like

Re: [Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Ivan Lazar Miljenovic
Bryan O'Sullivan b...@serpentine.com writes: The fallback is very simple: on versions of GHC older than 6.12, you get UTF-8 codecs and your platform's native newline conversion, and that's it :-) There really isn't anything to abstract. Aha, you use Text's own decoding/encoding functions, so

Re: [Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Bryan O'Sullivan
On Tue, Dec 15, 2009 at 2:33 PM, Ivan Lazar Miljenovic ivan.miljeno...@gmail.com wrote: Aha, you use Text's own decoding/encoding functions, so it isn't very useful for other libraries that don't use Text :( Huh? I am confused. The point of the text I/O code is to support I/O on the Text

Re: [Haskell-cafe] [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Ivan Lazar Miljenovic
Bryan O'Sullivan b...@serpentine.com writes: Huh? I am confused. The point of the text I/O code is to support I/O on the Text type. What else would I be wanting there? Yes, but I thought you were using utf8-string or something for it (that is, something not Text-specific). -- Ivan Lazar

[Haskell-cafe] Re: [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Ashley Yakeley
Bryan O'Sullivan wrote: The new 0.7 release of the text package http://hackage.haskell.org/package/text adds support for Unicode I/O, using either the new locale-aware Handle code in 6.12 or a fallback on older releases. Details: http://www.serpentine.com/blog/2009/12/15/data-text-0-7-gains

[Haskell-cafe] Re: [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Bryan O'Sullivan
On Tue, Dec 15, 2009 at 8:03 PM, Ashley Yakeley ash...@semantic.org wrote: How do you pack Unicode codepoints into Word16? Do you use UTF-16? You don't get to find out as a user of the Text API, but yes. Supposing - s = \x010A60\x010A61 -- Old South Arabian script t = pack s

Re: [Haskell-cafe] Re: [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Cetin Sert
http://corsis.sourceforge.net/img/csharp-6.png http://corsis.sourceforge.net/img/csharp-6.pngo__O!? 2009/12/16 Bryan O'Sullivan b...@serpentine.com On Tue, Dec 15, 2009 at 8:03 PM, Ashley Yakeley ash...@semantic.orgwrote: How do you pack Unicode codepoints into Word16? Do you use UTF-16

[Haskell-cafe] Re: [ANN] text 0.7, fast Unicode text

2009-12-15 Thread Ashley Yakeley
Cetin Sert wrote: http://corsis.sourceforge.net/img/csharp-6.png http://corsis.sourceforge.net/img/csharp-6.pngo__O!? That's just C# string literals. In Haskell, '\x010A60' '\x010A61', but in C#, '\x010A' '6' '0' '\x010A' '6' '1'. -- Ashley Yakeley

Re: [Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-10 Thread Roel van Dijk
2009/12/10 Richard O'Keefe o...@cs.otago.ac.nz: On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote: I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'. No it couldn't.  One expects 3÷2

[Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-09 Thread Roel van Dijk
Hello, I would like the announce the release of my package unicode-symbols: http://hackage.haskell.org/package/unicode-symbols It offers alternative symbols for a number of common functions and operators from the base and containers packages. When used in combination with the language extension

Re: [Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-09 Thread Richard O'Keefe
On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote: I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'. No it couldn't. One expects 3÷2 to be 1½, not 1. You will, for example, find

Re: [Haskell-cafe] ANNOUNCE: unicode-symbols-0.1.1

2009-12-09 Thread James Hall
2009/12/9 Richard O'Keefe o...@cs.otago.ac.nz On Dec 10, 2009, at 2:58 AM, Roel van Dijk wrote: I tried to be conservative with the choice of unicode symbols. I have defined the division sign (÷) to be (/). But it could just as well be defined as 'div'. No it couldn't. One expects 3÷2

[Haskell-cafe] hscolour + unicode

2009-11-29 Thread Sean McLaughlin
Hello, Is there a way to get the source documentation from cabal haddock --hyperlink-source to show up with unicode characters preserved? Right now the unicode from my comments and source programs are being mangled. I tried the --haddock-option=--use-unicode option, but it seems to only work

[Haskell-cafe] Lexical Syntax and Unicode

2009-11-14 Thread Manlio Perillo
Hi. Reading the Haskell 98 Report (section 9.2), I have found a possible problem. The lexical syntax supports Unicode, however this is not true for the newline: newline - return linefeed | return | linefeed | formfeed The Unicode standard adds two additional characters: U+2028 LINE SEPARATOR

Re: [Haskell-cafe] Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-19 Thread José Pedro Magalhães
Hi, While I agree that the documentation of Data.Generics is not perfect, I do not think it is possible to have the haddock documentation be self-contained. For a thorough understanding of syb, a user has to read the two initial papers, which are linked from the haddock documentation. I also do

Re: [Haskell-cafe] Re: Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-19 Thread Kyle Murphy
On a somewhat related note, I think the Haskell documentation in general is rather patchy and hard to follow for most things. Part of that I think is because of the confusion between the different forms of documentation. In general as a programmer I expect to find three kinds of documentation

Re: [Haskell-cafe] Re: Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-19 Thread Tom Tobin
On Mon, Oct 19, 2009 at 4:32 PM, Kyle Murphy orc...@gmail.com wrote: If they have to spend three hours trying to track down some obscure research paper that's referenced in your documentation a half dozen times in as many functions, you're not providing enough detail and assuming too great a

Re: [Haskell-cafe] Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-18 Thread Sean Leather
Hi John, On Sun, Oct 11, 2009 at 14:58, John Lato wrote: For anyone writing introductions to generic programming, take this as a plea from Haskellers everywhere. If one of the RWH authors can't understand how to make use of these techniques, what hope do the rest of us have? I would like

[Haskell-cafe] Re: Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-12 Thread John Lato
From: Derek Elkins derek.a.elk...@gmail.com On Sun, Oct 11, 2009 at 8:55 AM, Iain Barnett iainsp...@gmail.com wrote: On 11 Oct 2009, at 13:58, John Lato wrote: For anyone writing introductions to generic programming, take this as a plea from Haskellers everywhere.  If one of the RWH

[Haskell-cafe] Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-11 Thread John Lato
For anyone writing introductions to generic programming, take this as a plea from Haskellers everywhere. If one of the RWH authors can't understand how to make use of these techniques, what hope do the rest of us have? John Lato P.S. Some might wryly note that I'm the maintainer of a package

Re: [Haskell-cafe] Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-11 Thread Iain Barnett
On 11 Oct 2009, at 13:58, John Lato wrote: For anyone writing introductions to generic programming, take this as a plea from Haskellers everywhere. If one of the RWH authors can't understand how to make use of these techniques, what hope do the rest of us have? John Lato P.S. Some might

Re: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-11 Thread Neil Brown
Bryan O'Sullivan wrote: On Fri, Oct 9, 2009 at 8:33 AM, Jeremy Shaw jer...@n-heptane.com mailto:jer...@n-heptane.com wrote: What are the chances of seeing a, instance Data Text, some day? I might as well follow up here, since I've sent Jeremy a couple of messages on this subject. I

Re[2]: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-11 Thread Bulat Ziganshin
Hello Neil, Sunday, October 11, 2009, 5:58:51 PM, you wrote: I had a crack at a simple proper Data instance, and got as far as needing a Data instance for ByteString#, accompanied by an error I don't impossible. i'm not sure wher i've read this but those # types (Int#, ByteArray# and so on)

Re: [Haskell-cafe] Documentation (was: ANN: text 0.5, a major revision of the Unicode text library)

2009-10-11 Thread Derek Elkins
On Sun, Oct 11, 2009 at 8:55 AM, Iain Barnett iainsp...@gmail.com wrote: On 11 Oct 2009, at 13:58, John Lato wrote: For anyone writing introductions to generic programming, take this as a plea from Haskellers everywhere.  If one of the RWH authors can't understand how to make use of these

[Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-09 Thread Bryan O'Sullivan
Get it while it's fresh on Hackage, folks! Details of the changes here: http://bit.ly/1u4UOT ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-09 Thread Jeremy Shaw
Sweet! What are the chances of seeing a, instance Data Text, some day? text would be a great type to use with Happstack, because it is far more memory efficient than String. But it is difficult to do that with out a instance of Data. For the time being, I have been hacking it with:

Re: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-09 Thread Bryan O'Sullivan
On Fri, Oct 9, 2009 at 8:33 AM, Jeremy Shaw jer...@n-heptane.com wrote: What are the chances of seeing a, instance Data Text, some day? text would be a great type to use with Happstack, because it is far more memory efficient than String. But it is difficult to do that with out a instance of

Re: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-09 Thread Bryan O'Sullivan
On Fri, Oct 9, 2009 at 8:33 AM, Jeremy Shaw jer...@n-heptane.com wrote: What are the chances of seeing a, instance Data Text, some day? I might as well follow up here, since I've sent Jeremy a couple of messages on this subject. I think maybe someone else will have to take a crack at a Data

Re: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-09 Thread Jeremy Shaw
Based on section 5.2 of this paper: http://www.cs.vu.nl/boilerplate/gmap2.pdf I wonder if the Data instance I provided is the best possible option with out modifying SYB. And that the optimal solution would be to extend ConstrRep to support Text as a primitive: data ConstrRep = AlgConstr

Re: [Haskell-cafe] ANN: text 0.5, a major revision of the Unicode text library

2009-10-09 Thread Paulo Tanimoto
Hi Bryan, On Fri, Oct 9, 2009 at 2:11 AM, Bryan O'Sullivan b...@serpentine.com wrote: Get it while it's fresh on Hackage, folks! Details of the changes here: http://bit.ly/1u4UOT This is superb! I tried to post a comment to your website, but it may have been lost. It seems that the

  1   2   3   4   >