[Haskell-cafe] Re: An idea - Feasibility and effort

2008-01-23 Thread Aaron Denney
On 2008-01-23, Ketil Malde <[EMAIL PROTECTED]> wrote: > Achim Schneider <[EMAIL PROTECTED]> writes: > >>> Just out of curiosity: how do you plan to find out server locations >>> (beyond the obvious top-level domain -> country heuristics)? > >> $ whois | grep Country > > Some also have location in

Re: [Haskell-cafe] Why functional programming matters

2008-01-23 Thread Michael Vanier
This is pure "general waffle", but I saw the following comment on reddit.com which impressed me: "C isn't hard; programming in C is hard. On the other hand: Haskell is hard, but programming in Haskell is easy." Mike Simon Peyton-Jones wrote: Friends Over the next few months I'm giving two or

Re: [Haskell-cafe] Re: Why functional programming matters

2008-01-23 Thread Thomas Schilling
On Wed, 2008-01-23 at 15:42 -0800, Don Stewart wrote: > catamorphism: > > On 1/23/08, Peter Hercek <[EMAIL PROTECTED]> wrote: > > > Other things did not seem that great for me from the beginning. For > > > example: referential transparency - just enforces what you can take care > > > not to do your

Re: [Haskell-cafe] Re: Why functional programming matters

2008-01-23 Thread Don Stewart
catamorphism: > On 1/23/08, Peter Hercek <[EMAIL PROTECTED]> wrote: > > Other things did not seem that great for me from the beginning. For > > example: referential transparency - just enforces what you can take care > > not to do yourself > > ...if you never make mistakes, that is. > > > (e.g. i

Re: [Haskell-cafe] Re: Why functional programming matters

2008-01-23 Thread Tim Chevalier
On 1/23/08, Peter Hercek <[EMAIL PROTECTED]> wrote: > Other things did not seem that great for me from the beginning. For > example: referential transparency - just enforces what you can take care > not to do yourself ...if you never make mistakes, that is. > (e.g. in C# you just cannot be sure s

Re: [Haskell-cafe] Why functional programming matters

2008-01-23 Thread Ryan Dickie
On Jan 23, 2008 5:29 AM, Simon Peyton-Jones <[EMAIL PROTECTED]> wrote: > Friends > > Over the next few months I'm giving two or three talks to groups of *non* > functional programmers about why functional programming is interesting and > important. If you like, it's the same general goal as John

[Haskell-cafe] Re: [Haskell] Why functional programming matters

2008-01-23 Thread Don Stewart
stephan.friedrichs: > Simon Peyton-Jones wrote: > >[...] > > > >2. War stories from real life. eg "In company X in 2004 they rewrote > >their application in Haskell/Caml with result Y". Again, for my purpose > >I can't tell very long stories; but your message can give a bit more > >detail than

Re: [darcs-devel] [Haskell-cafe] Re: announcing darcs 2.0.0pre3

2008-01-23 Thread Lutz Donnerhacke
* zooko wrote: > On the one hand, SHA-1 is cryptographically fragile and is deprecated > for use in applications that require collision-resistance and pre- > image resistance. Such a cryptographically strong requirement is not given in the darcs case. SHA-1 is still used in almost all existing c

Re: [darcs-devel] [Haskell-cafe] Re: announcing darcs 2.0.0pre3

2008-01-23 Thread zooko
In principle it is good to provide a cryptographically secure hash, as this allows users to sign their repositories by signing a single file, which seems like it's potentially quite a useful feature. Can you be more specific about this -- who can "sign" a repository? How is such a signat

[Haskell-cafe] Re: Why functional programming matters

2008-01-23 Thread Peter Hercek
Here are things I liked most (compared with standard imperative languages) when I started to learn functional programming: * algebraic types with pattern matching work nicely as "tagged unions"; doing a tagged union manually in C/C++/C# is a pain (there is no automatic tag (provided you dismis

Re: [darcs-devel] [Haskell-cafe] Re: announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
On Wed, Jan 23, 2008 at 02:55:06PM -0700, zooko wrote: > I have to ask: why does darcs use SHA-1? > > On the one hand, SHA-1 is cryptographically fragile and is deprecated > for use in applications that require collision-resistance and pre- > image resistance. SHA-2 is the current standard for

[Haskell-cafe] Re: Draft chapters of "Real World Haskell" now publicly available

2008-01-23 Thread Achim Schneider
Jon Harrop <[EMAIL PROTECTED]> wrote: > On Tuesday 22 January 2008 14:30:22 Bryan O'Sullivan wrote: > > Paul Moore wrote: > > > I'm posting here because there doesn't seem to be an "overall" > > > comment section, but the TOC seems to cover less ground than I > > > expected. Is the TOC meant to be

Re: [darcs-devel] [Haskell-cafe] Re: announcing darcs 2.0.0pre3

2008-01-23 Thread zooko
I have to ask: why does darcs use SHA-1? On the one hand, SHA-1 is cryptographically fragile and is deprecated for use in applications that require collision-resistance and pre- image resistance. SHA-2 is the current standard for those applications (SHA-2 is about twice as expensive in CPU

Re: [Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre3

2008-01-23 Thread Anatoly Yakovenko
i would recommend just using the native one. The best performance that I was able to get with ghc 6.6 was still seven times slower then the native sha1 implementation. 2008/1/23 Peter Verswyvelen <[EMAIL PROTECTED]>: > > Maybe a dedicated SIMD version of SHA1? > > http://arctic.org/~dean/crypto

Re: [Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
On Wed, Jan 23, 2008 at 10:09:05PM +0100, Peter Verswyvelen wrote: > Maybe a dedicated SIMD version of SHA1? > > http://arctic.org/~dean/crypto/sha1.html >From what that page says, it looks like thta sha1 is not recommended for actual use (although they don't test with gcc 4.x). I've come across

Re: [Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre3

2008-01-23 Thread Peter Verswyvelen
Maybe a dedicated SIMD version of SHA1? http://arctic.org/~dean/crypto/sha1.html Cheers, Peter David Roundy wrote: On Wed, Jan 23, 2008 at 03:26:51PM +, Simon Marlow wrote: There are still times when I see nothing happening, for example in the

Re: [Haskell-cafe] Draft chapters of "Real World Haskell" now publicly available

2008-01-23 Thread Jon Harrop
On Tuesday 22 January 2008 14:30:22 Bryan O'Sullivan wrote: > Paul Moore wrote: > > I'm posting here because there doesn't seem to be an "overall" comment > > section, but the TOC seems to cover less ground than I expected. Is > > the TOC meant to be complete? > > No, it's less than a third of the

Re: [Haskell-cafe] Abstracting ByteStrings

2008-01-23 Thread Chad Scherrer
> Given a reasonable Storable instance of pairs you could use: > http://code.haskell.org/~sjanssen/storablevector I hadn't seen that before, thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-

Re: [Haskell-cafe] Abstracting ByteStrings

2008-01-23 Thread Chad Scherrer
> Careful. ByteString is an alternative to [Word8]. Converting [Char] to > ByteString and back requires an encoding. (Unfortunately, the only encoding > that comes with the bytestring package is lossy.) Ahh, good point. I guess I almost always just use them to read ASCII, so it hasn't been an issu

Re: [Haskell-cafe] Draft chapters of "Real World Haskell" now publicly available

2008-01-23 Thread Dan Weston
I think this points out the benefit (or even the need), given the fast-paced evolution of Haskell and its libraries as a whole, of an evolving online supplement to your book, minimally with errata and code, but also (as publisher resources permit) with intermittently updated appendices on still

[Haskell-cafe] Re: Arrow without `>>>'

2008-01-23 Thread David Menendez
On Jan 23, 2008 12:20 PM, Valery V. Vorotyntsev <[EMAIL PROTECTED]> wrote: > I've built GHC from darcs, and... > Could anybody tell me, what's the purpose of Arrow[1] not having `>>>' > method? It's derived from the Category superclass. -- Dave Menendez <[EMAIL PROTECTED]>

[Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
On Wed, Jan 23, 2008 at 03:26:51PM +, Simon Marlow wrote: > There are still times when I see nothing happening, for example in the > unpull test on the GHC repo (see previous messages), the last progress > message I get is > > Reading patches in /64playpen/simonmar/ghc-darcs2 17040 > > and

Re: [Haskell-cafe] Abstracting ByteStrings

2008-01-23 Thread David Menendez
On Jan 22, 2008 6:19 PM, Chad Scherrer <[EMAIL PROTECTED]> wrote: > A lazy ByteString is an alternative to a String=[Char] Careful. ByteString is an alternative to [Word8]. Converting [Char] to ByteString and back requires an encoding. (Unfortunately, the only encoding that comes with the bytest

Re: [Haskell-cafe] Draft chapters of "Real World Haskell" now publicly available

2008-01-23 Thread Bryan O'Sullivan
Wolfgang Jeltsch wrote: > Covering reactive programming would indeed be interesting. I agree. However, we have no plans to cover this topic. I don't believe any of us has used FRP, and my impression of it as an approach is that it's not yet cooked. We already have our hands and TOC full coveri

[Haskell-cafe] Arrow without `>>>'

2008-01-23 Thread Valery V. Vorotyntsev
Hi, friends, I've built GHC from darcs, and... Could anybody tell me, what's the purpose of Arrow[1] not having `>>>' method? 1. http://darcs.haskell.org/packages/base/Control/Arrow.hs $ ghci GHCi, version 6.9.20080104: http://www.haskell.org/ghc/ :? for help Loading package base ... li

[Haskell-cafe] Ann: Drawing with Cairo: Getting Started

2008-01-23 Thread Hans van Thiel
Hello All, There is now an appendix to the Gtk2Hs tutorial on getting started with Cairo drawing. It's not actually about drawing, but on how to get drawings on the screen and how to write them to .png, .pdf, .ps. or .svg files. Though this is very easy, the 'recipes' are not self-evident, so this

[Haskell-cafe] Re: [darcs-devel] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
On Wed, Jan 23, 2008 at 03:26:51PM +, Simon Marlow wrote: > David Roundy wrote: > > We are happy to announce the third prerelease version of darcs 2! Darcs 2 > > features numerous improvements, and it seems that we have fixed most of the > > regressions, so we're looking for help, from users wi

Re: [Haskell-cafe] Why functional programming matters

2008-01-23 Thread Michał Pałka
On Wed, 2008-01-23 at 13:29 +, Simon Peyton-Jones wrote: > 1. Small examples of actual code. The goal here is (a) to convey a > visceral idea of what functional programming *is*, rather than just > assume the audience knows (they don't), and (b) to convey an idea of > why it might be good. Hel

[Haskell-cafe] Re: announcing darcs 2.0.0pre3

2008-01-23 Thread Simon Marlow
David Roundy wrote: We are happy to announce the third prerelease version of darcs 2! Darcs 2 features numerous improvements, and it seems that we have fixed most of the regressions, so we're looking for help, from users willing to try this release out. Read below, to see how you can benefit from

Re: [Haskell-cafe] Why functional programming matters

2008-01-23 Thread Henning Thielemann
On Wed, 23 Jan 2008, Simon Peyton-Jones wrote: > 1. Small examples of actual code. The goal here is (a) to convey a > visceral idea of what functional programming *is*, rather than just > assume the audience knows (they don't), and (b) to convey an idea of why > it might be good. One of my favou

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Johan Tibell
On Jan 23, 2008 2:11 PM, Magnus Therning <[EMAIL PROTECTED]> wrote: > Yes, this reflects my recent experience, Char is not a good representation > for an 8-bit byte. This thread came out of my attempt to add a module to > dataenc[1] that would make base64-string[2] obsolete. As you probably can >

[Haskell-cafe] ANNOUNCE: Harpy 0.4 - Runtime code generation for x86 machine code

2008-01-23 Thread Martin Grabmueller
We are pleased to announce the release of Harpy 0.4, a library for runtime code generation for x86 machine code. Harpy is available from Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/harpy-0.4 Also see Harpy's homepage, which features two tutorials and access to the darcs

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Ketil Malde
"Johan Tibell" <[EMAIL PROTECTED]> writes: >>> The benefit would be that if the input is not in latin-1 an exception >>> could be thrown rather than returning a Char representing the wrong >>> Unicode code point. >> I'm not sure what you mean here. All 256 possible values have a meaning. OTOH, g

Re: [Haskell-cafe] announcing darcs 2.0.0pre3

2008-01-23 Thread David Roundy
On Wed, Jan 23, 2008 at 09:59:29AM +0300, Bulat Ziganshin wrote: > Hello David, > > Tuesday, January 22, 2008, 11:43:44 PM, you wrote: > > > The third prerelease features (apart from numerous bug and performance > > regression fixes) a completely rewritten rollback command and new > > progress-re

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Reinier Lamers
Johan Tibell wrote: What *does* matter to the programmer is what encodings putStr and getLine use. AFAIK, they use "lower 8 bits of unicode code point" which is almost functionally equivalent to latin-1. Which is terrible! You should have to be explicit about what encoding you expect.

Re: [Haskell-cafe] Why functional programming matters

2008-01-23 Thread Maxime Henrion
Simon Peyton-Jones wrote: > Friends > > Over the next few months I'm giving two or three talks to groups of *non* > functional programmers about why functional programming is interesting and > important. If you like, it's the same general goal as John Hughes's famous > paper "Why functional pr

Re: [Haskell-cafe] Precedence and associativity in a pretty-printer

2008-01-23 Thread devriese
Nice! I'll give that a try, Thanks, Edsko ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Why functional programming matters

2008-01-23 Thread Simon Peyton-Jones
Friends Over the next few months I'm giving two or three talks to groups of *non* functional programmers about why functional programming is interesting and important. If you like, it's the same general goal as John Hughes's famous paper "Why functional programming matters". Audience: some ar

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Magnus Therning
On 1/23/08, Johan Tibell <[EMAIL PROTECTED]> wrote: [..] My proposal is for I/O functions to specify the encoding they use if > they accept or return Chars (and Strings). If they deal in terms of > bytes (e.g. socket functions) they should accept and return Word8s. > Optionally, text I/O functions

Re: [Haskell-cafe] Re: An idea - Feasibility and effort

2008-01-23 Thread Yitzchak Gale
Ben Franksen wrote: >>> Just out of curiosity: how do you plan to find out server locations >>> (beyond the obvious top-level domain -> country heuristics)? Achim Schneider wrote: >> $ whois | grep Country Ketil Malde wrote: > Some also have location in the TXT field in DNS (Sometimes called an

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Johan Tibell
> > The benefit would be that if the input is not in latin-1 an exception > > could be thrown rather than returning a Char representing the wrong > > Unicode code point. > > I'm not sure what you mean here. All 256 possible values have a meaning. You're of course right. So we don't have a problem

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Jules Bean
Johan Tibell wrote: What *does* matter to the programmer is what encodings putStr and getLine use. AFAIK, they use "lower 8 bits of unicode code point" which is almost functionally equivalent to latin-1. Which is terrible! You should have to be explicit about what encoding you expect. Python 300

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Johan Tibell
> > > > What *does* matter to the programmer is what encodings putStr and > > > > getLine use. AFAIK, they use "lower 8 bits of unicode code point" which > > > > is almost functionally equivalent to latin-1. > > > > > > Which is terrible! You should have to be explicit about what encoding > > > you

[Haskell-cafe] Darcs Patch Theory and GADTs at London Haskell User Group tonight

2008-01-23 Thread Neil Bartlett
Hi all, Just a reminder about tonight's London Haskell User Group meeting, at City University from 6:30PM. Ganesh Sittampalam will be giving a talk entitled "Darcs Patch Theory and GADTs". For full details see the website: http://www.londonhug.net/2008/01/07/darcs-patch-theory-an

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread david48
On Jan 23, 2008 12:13 PM, Jules Bean <[EMAIL PROTECTED]> wrote: > Presumably there wasn't a sufficiently good answer available in time for > haskell98. Will there be one for haskell prime ? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://w

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Jules Bean
Johan Tibell wrote: On Jan 23, 2008 11:56 AM, Jules Bean <[EMAIL PROTECTED]> wrote: Peter Verswyvelen wrote: Now I'm getting a bit confused here. To summarize, what encoding does GHC 6.8.2 use for [Char]? UCS-32? [snip] What *does* matter to the programmer is what encodings putStr and getLin

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Johan Tibell
On Jan 23, 2008 11:56 AM, Jules Bean <[EMAIL PROTECTED]> wrote: > Peter Verswyvelen wrote: > > > Now I'm getting a bit confused here. To summarize, what encoding does > > GHC 6.8.2 use for [Char]? UCS-32? > > [snip] > > What *does* matter to the programmer is what encodings putStr and > getLine use

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Ketil Malde
Peter Verswyvelen <[EMAIL PROTECTED]> writes: > No I just used wrong terminology. When I said unicode, I actually meant UCS-x, You might as well say UCS-4, nobody uses UCS-2 anymore. It's been replaced by UTF-16, which gives you the complexity of UTF-8 without being compact (for 99% of existing

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Jules Bean
Peter Verswyvelen wrote: Now I'm getting a bit confused here. To summarize, what encoding does GHC 6.8.2 use for [Char]? UCS-32? How dare you! Such a personal question! This is none of your business. I jest, but the point is sound: the internal storage of Char is ghc's business, and it shoul

Re: [Haskell-cafe] Re: An idea - Feasibility and effort

2008-01-23 Thread Ketil Malde
Achim Schneider <[EMAIL PROTECTED]> writes: >> Just out of curiosity: how do you plan to find out server locations >> (beyond the obvious top-level domain -> country heuristics)? > $ whois | grep Country Some also have location in the TXT field in DNS (Sometimes called an ICBM record). I think

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Peter Verswyvelen
Ketil Malde wrote: So let's all switch to unicode ASAP and leave that horrible multi-byte-string-thing behind us? You are being ironic, I take it? No I just used wrong terminology. When I said unicode, I actually meant UCS-x, and with multi-byte-string-thing I meant VARIABLE-length, so

Re: [Haskell-cafe] Draft chapters of "Real World Haskell" now publicly available

2008-01-23 Thread Peter Verswyvelen
Wolfgang Jeltsch wrote: Covering reactive programming would indeed be interesting. I want to add that there is no single way for doing reactive programming in Haskell. There is Conal’s stuff, there is Yampa and there is “my” stuff (Grapefruit [1]) whereby the pros and cons of these approaches

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Ketil Malde
Peter Verswyvelen <[EMAIL PROTECTED]> writes: >> Prelude Data.Char> map ord "ö" >> [195,182] >> Prelude Data.Char> length "ö" >> 2 >> there are actually 2 bytes there, but your terminal is showing them as >> one character. > So let's all switch to unicode ASAP and leave that horrible > multi-byt

Re: [Haskell-cafe] Has character changed in GHC 6.8?

2008-01-23 Thread Magnus Therning
On 1/22/08, Ian Lynagh <[EMAIL PROTECTED]> wrote: > > On Tue, Jan 22, 2008 at 03:59:24PM +, Magnus Therning wrote: > > > > Yes, of course, stupid me. But it is still the UTF-8 representation of > "ö", > > not Latin-1, and this brings me back to my original question, is this an > > intentional