Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-09 Thread Daniel McAllansmith
On Monday 09 July 2007 17:42, Thomas Conway wrote: I don't know if you saw the following linked off /. http://www.itwire.com.au/content/view/13339/53/ An amazon link for the book is here: http://www.amazon.com/Computer-Science-Reconsidered-Invocation-Expression/d p/0471798142 The basic

Re: [Haskell-cafe] Re: Too many packages on hackage? :-)

2007-07-09 Thread Ketil Malde
On Mon, 2007-07-09 at 10:30 +1000, Donald Bruce Stewart wrote: Another idea I've been pondering is allowing people to add links to documentation for libraries My main worry about Hackage is that it is often hard to tell the current status of packages - it could easily develop into a huge list

Re: [Haskell-cafe] Re: Too many packages on hackage? :-)

2007-07-09 Thread Donald Bruce Stewart
ketil: On Mon, 2007-07-09 at 10:30 +1000, Donald Bruce Stewart wrote: Another idea I've been pondering is allowing people to add links to documentation for libraries My main worry about Hackage is that it is often hard to tell the current status of packages - it could easily develop

Re: [Haskell-cafe] Re: Too many packages on hackage? :-)

2007-07-09 Thread Thomas Conway
On 7/9/07, Ketil Malde [EMAIL PROTECTED] wrote: The current deliverables seem to consist of a tar file and a package description, neither of them accurately dated. Clearly we need to store them in a treap. :-) -- Dr Thomas Conway [EMAIL PROTECTED] Silence is the perfectest herald of joy: I

Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-09 Thread Stephen Forrest
On 7/9/07, Daniel McAllansmith [EMAIL PROTECTED] wrote: I wouldn't want to comment on the validity of his claim, maybe he's wrong, or maybe he's... well, anyway... what I will say is I got a chuckle out of the 'Citations' that Amazon lists. As amusing as that thought is, it seems that this is

Re[2]: [Haskell-cafe] Toy compression algorithms [was: A very edgy language]

2007-07-09 Thread Bulat Ziganshin
Hello Andrew, Sunday, July 8, 2007, 7:07:59 PM, you wrote: Actually, LZW works surprisingly well for such a trivial little algorithm... When you compare it to the complexity of an arithmetic coder driven by a high-order adaptive PPM model (theoretically the best general-purpose algorithm

[Haskell-cafe] Constraints on data-types, mis-feature?

2007-07-09 Thread Daniil Elovkov
Hello In the archives of haskell-cafe I found a mention of constraints on datatypes as a mis-feature of Haskell. In particular, that they're not propagated well. Can someone elaborate on that? Also, are they still considered a mis-feature with the emergence of GADTs ? If I have data GADT a

Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-09 Thread Puneet
It looks like Amazon's citation database is mistakenly using the index for the book _Beating Depression_ by John Rush (Toronto: John Wiley Sons, Canada Ltd., 1983). Yes it is so. Amazon.com mistakenly thinks that the given book is a new edition of the book titled beating depression. Amazon

Re: [Haskell-cafe] Lambdabot web interface

2007-07-09 Thread Donald Bruce Stewart
voigt: Hi, I can't get http://lambdabot.codersbase.com/ to work for me. Whatever input = No lambdabot process Is that a known issue, not the right URL, ...? Thanks, Janis. Right URL, but Jason's not running lambdabot at the moment. You can access our bot via IRC though.

Re: [Haskell-cafe] More binary IO, compression, bytestrings and FFI fun

2007-07-09 Thread Philip Armstrong
On Mon, Jul 09, 2007 at 02:42:49PM +1000, Donald Bruce Stewart wrote: Processing larger amounts of data, compression, serialisation and calling C. Just a thought: is it worth sticking this up on the wiki? Phil -- http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt

Re: [Haskell-cafe] Lambdabot web interface

2007-07-09 Thread Janis Voigtlaender
Donald Bruce Stewart wrote: Right URL, but Jason's not running lambdabot at the moment. You can access our bot via IRC though. http://haskell.org/haskellwiki/IRC_channel Yup, but I assume that would mean bothering others with my experiments with some lambdabot features ;-) I'll better try

[Haskell-cafe] Is Haskell well-founded? was: Clearly, Haskell is ill-founded

2007-07-09 Thread Pasqualino 'Titto' Assini
Doesn't Haskell already implement the 3-valued logic (True, False, NULL), that Karl Fant proposes (see papers at http://www.theseusresearch.com/invocation%20model.htm) as an alternative to centralised clock-based coordination, by postulating that every data type includes the bottom value? I

Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-09 Thread Conor McBride
Hi all On 9 Jul 2007, at 06:42, Thomas Conway wrote: I don't know if you saw the following linked off /. http://www.itwire.com.au/content/view/13339/53/ [..] The basic claim appears to be that discrete mathematics is a bad foundation for computer science. I suspect the subscribers to this

Re: [Haskell-cafe] Clearly, Haskell is ill-founded

2007-07-09 Thread Asumu Takikawa
On 15:42 Mon 09 Jul , Thomas Conway wrote: I don't know if you saw the following linked off /. http://www.itwire.com.au/content/view/13339/53/ I read that earlier and his comments, such as This concept of 'process expression' is, he says, a common thread running through the various

Re: [Haskell-cafe] Gtk2Hs, Glade, Multiple windows/dialog in one interface file.

2007-07-09 Thread Duncan Coutts
On Sun, 2007-07-08 at 16:40 -0400, Brandon S. Allbery KF8NH wrote: On Jul 8, 2007, at 16:36 , D.V. wrote: I finally got it to work with onResponse : I traced each possible response to see which one was fired when clicking the close button And what was the result? Great, another place

[Haskell-cafe] ANNOUNCE: Haskell XML Toolbox Version 7.2

2007-07-09 Thread Uwe Schmidt
Haskell XML Toolbox 7.2 I would like to announce a new version of the Haskell XML Toolbox. This is mainly a bug fix release, but there is one new module for converting data between user defined types and the HXT DOM structure. This new modules enables the simple persistent storage and retrieval

Re: [Haskell-cafe] Re: Too many packages on hackage? :-)

2007-07-09 Thread Sascha Böhme
Hello, Who's our SoC hackage guy? To do list right here! The HackageDB project is for now concentrating on another subject. I see the necessity of adding search features and additionally tags, but in the moment I work on automatic generation of Haddock documentation. The progress and a to do

[Haskell-cafe] Elementary question about Type Constraints

2007-07-09 Thread lassoken
Hi, I'm trying to translate Example 2.3.3 (simple symbolic differentation) from Structure and Interpretation of Computer Programs into Haskell. Here is code that works (as far as see): --- data Term b = Var String | Const b | Sum (Term b) (Term b) | Prod (Term b) (Term b) newSum (Const a)

Re: [Haskell-cafe] reading existential types

2007-07-09 Thread Claus Reinke
I'd like to be able to use MT to build a list like: [MT (T1a,1), MT (T1b,3)] And I'd like to read str with: read $ show str Substituting return (m) with return (MT m) leads to error messages like: Ambiguous type variable `e' in the constraints which is the important hint! the parser used for

Re: [Haskell-cafe] Evaluation of IO actions in record assignment

2007-07-09 Thread haskell
Try liftM3 from Control.Monad let get = xmlGetWidget xml castToEntry liftM3 UserPanel (get signatureEntry) (get passwordEntry) (get repeatEntry) Adde wrote: Hi. I'm toying around with GTK2Hs and one of the things I'm doing is stuffing a bunch of widgets in a record. The problem is that

Re: [Haskell-cafe] Constraints on data-types, mis-feature?

2007-07-09 Thread Jonathan Cast
On Monday 09 July 2007, Daniil Elovkov wrote: Hello In the archives of haskell-cafe I found a mention of constraints on datatypes as a mis-feature of Haskell. In particular, that they're not propagated well. Can someone elaborate on that? Also, are they still considered a mis-feature with

Re: [Haskell-cafe] Evaluation of IO actions in record assignment

2007-07-09 Thread Tillmann Rendel
Adde wrote: signatureEntry - xmlGetWidget xml castToEntry signatureEntry passwordEntry - xmlGetWidget xml castToEntry passwordEntry repeatEntry - xmlGetWidget xml castToEntry repeatEntry return UserPanel {userPanelSignatureEntry = signatureEntry, userPanelPasswordEntry =

Re: [Haskell-cafe] Haskell's prefix exprs

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 03:55:52PM +0200, Christian Maeder wrote: Hi, I would like haskell to accept the following (currently illegal) expressions as syntactically valid prefix applications: f = id \ _ - [] g = id let x = [] in x h = id case [] of [] - [] i = id do [] j = id if True then

Re: [Haskell-cafe] Re: Too many packages on hackage? :-)

2007-07-09 Thread Philip Armstrong
On Mon, Jul 09, 2007 at 06:05:44PM +0200, Marc Weber wrote: Another idea I've been pondering is allowing people to add links to documentation for libraries, from their hackage page. We have a fair few libs documented in blog form, here, Beeing able adding some comments (wiki style) would be

Re: [Haskell-cafe] More binary IO, compression, bytestrings and FFI fun

2007-07-09 Thread Philip Armstrong
On Mon, Jul 09, 2007 at 06:53:15PM +1000, Donald Bruce Stewart wrote: phil: On Mon, Jul 09, 2007 at 02:42:49PM +1000, Donald Bruce Stewart wrote: Processing larger amounts of data, compression, serialisation and calling C. Just a thought: is it worth sticking this up on the wiki?

Re: [Haskell-cafe] Haskell's prefix exprs

2007-07-09 Thread Isaac Dupree
Stefan O'Rear wrote: On Mon, Jul 09, 2007 at 03:55:52PM +0200, Christian Maeder wrote: Hi, I would like haskell to accept the following (currently illegal) expressions as syntactically valid prefix applications: f = id \ _ - [] g = id let x = [] in x h = id case [] of [] - [] i = id do [] j =

Re: [Haskell-cafe] Toy compression algorithms [was: A very edgy language]

2007-07-09 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Sunday, July 8, 2007, 7:07:59 PM, you wrote: i don't think that ppm is so complex - it's just probability of symbol in some context. it's just too slow in naive implementation Oh, sure, the *idea* is simple enough. Trying to actually *implement* it

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 09:05:55PM +0100, Andrew Coppin wrote: OK, can somebody explain to me *really slowly* exactly what the difference between an existential type and a rank-N type is? (I couldn't find much of use on the wiki. I have now in fact written some stuff there myself, but since

Re: [Haskell-cafe] Toy compression algorithms [was: A very edgy language]

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 09:15:07PM +0100, Andrew Coppin wrote: Bulat Ziganshin wrote: Hello Andrew, Sunday, July 8, 2007, 7:07:59 PM, you wrote: i don't think that ppm is so complex - it's just probability of symbol in some context. it's just too slow in naive implementation Oh,

[Haskell-cafe] Type system madness

2007-07-09 Thread Andrew Coppin
OK, can somebody explain to me *really slowly* exactly what the difference between an existential type and a rank-N type is? (I couldn't find much of use on the wiki. I have now in fact written some stuff there myself, but since I don't understand it in the first place, I'm having difficulty

Re: [Haskell-cafe] reading existential types

2007-07-09 Thread Claus Reinke
which is the important hint! the parser used for 'read' depends on the return type, but the existential type _hides_ the internal type which would be needed to select a read parser. forall e . (MyClass e, Show e, Read e) = MT (e,Int) the 'Read' there ensures that we only inject types that

Re: [Haskell-cafe] Toy compression algorithms [was: A very edgy language]

2007-07-09 Thread Andrew Coppin
Stefan O'Rear wrote: On Mon, Jul 09, 2007 at 09:15:07PM +0100, Andrew Coppin wrote: Oh, sure, the *idea* is simple enough. Trying to actually *implement* it correctly is something else... ;-) Took me about an hour and 50 lines of code (about a year ago - this was one of my first

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Andrew Coppin
Stefan O'Rear wrote: All users should worry about is Quantifiers. A quantifier is an operator on types which defines a variable in some way. OK... id has type :: ∀α. α → α toUpper (can) have type :: ∃α. α → α So... you're saying that id:: x - x works for *every* possible choice of

Re: [Haskell-cafe] In-place modification

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 10:01:06PM +0100, Andrew Coppin wrote: Bulat Ziganshin wrote: Hello Andrew, Monday, July 9, 2007, 12:36:25 AM, you wrote: OK. So that's just the GHC binary itself, right? it's INSTALLER Ah. That explains the size then... Is it safe to install two

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 09:57:14PM +0100, Andrew Coppin wrote: Stefan O'Rear wrote: id has type :: ∀α. α → α toUpper (can) have type :: ∃α. α → α So... you're saying that id:: x - x works for *every* possible choice of x, but toUpper :: x - x works for *one* possible choice of x?

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread Albert Y. C. Lai
Andrew Coppin wrote: I stand in awe of people who actually understand what universal and existential actually mean... To me, these are just very big words that sound impressive. I offer to relieve that with http://www.vex.net/~trebla/allsome.txt I think of formal logic as clarifying thought

[Haskell-cafe] no-coding functional data structures via lazyness

2007-07-09 Thread Dave Bayer
Learning Haskell, the Prelude.ShowS type stood out as odd, exploiting the implementation of lazy evaluation to avoid explicitly writing an efficient concatenable list data structure. This felt like cheating, or at least like using a screwdriver as a crowbar, to be less judgmental.

Re: [Haskell-cafe] no-coding functional data structures via lazyness

2007-07-09 Thread Jonathan Cast
On Monday 09 July 2007, Dave Bayer wrote: Learning Haskell, the Prelude.ShowS type stood out as odd, exploiting the implementation of lazy evaluation to avoid explicitly writing an efficient concatenable list data structure. This felt like cheating, or at least like using a screwdriver as a

[Haskell-cafe] xkcd #287 NP-Complete

2007-07-09 Thread Albert Y. C. Lai
http://xkcd.com/c287.html import Data.Array import Control.Monad -- exactly n v -- items in v that sum to exactly n -- returns list of solutions, each solution list of items exactly :: (Real a) = a - Array Int a - [[a]] exactly 0 v = return [] exactly n v = do i - indices v guard (v!i = n)

[Haskell-cafe] ANNOUNCE: HCL v1.0 -High-level library for building command line interfaces

2007-07-09 Thread Justin Bailey
I'm please to announce HCL 1.0 - a library for building command line interfaces. The library exports a mix of low and high-level functions for building programs which gather simple values, ask yes/no questions, or present hierarchical menus. The library is not intended to do complex, full-screen

[Haskell-cafe] Testing parsing failures with Parsec

2007-07-09 Thread Sean Smith
All - I tried emailing this to Daan, but I can't find an up-to-date email address, so I hope this is an acceptable alternative :). I'm looking for someone who knows the guts of Parsec a bit, or has done some automated testing of a Parsec parser. I'm interested in using Parsec for

Re: [Haskell-cafe] Type system madness

2007-07-09 Thread David Menendez
On 7/9/07, Andrew Coppin [EMAIL PROTECTED] wrote: OK, can somebody explain to me *really slowly* exactly what the difference between an existential type and a rank-N type is? One important difference is that Hugs supports existential quantification, but not rank-N types. (It does support

[Haskell-cafe] Re: Evaluation of IO actions in record assignment

2007-07-09 Thread Adde
Use one of the general monadic combinators given in Control.Monad: liftM3 UserPanel (xmlGetWidget xml castToEntry signatureEntry) (xmlGetWidget xml castToEntry passwordEntry) (xmlGetWidget xml castToEntry repeatEntry) or return UserPanel `ap`

[Haskell-cafe] Multiple instancing of functions with FFI

2007-07-09 Thread Lewis-Sandy, Darrell
I am having trouble exporting multiple instances of a polymorphic function similar to the example in the Haskell 98 Foreign Function Interface 1.0 addendum (page 6). My specific code is below: ---begin test.hs- module Test() where import

[Haskell-cafe] where's yi available?

2007-07-09 Thread Vadim
I'm trying to get 'hide' but failed to install 'yi'. I followed instructions at page http://haskell.org/hawiki/hIDE_2fDesign but can't succeed in executing darcs get http://scannedinavian.org/repos/yi/ the mentioned http isn't responding. Can you please advise where can I get yi? TIA.

Re: [Haskell-cafe] no-coding functional data structures via lazyness

2007-07-09 Thread Donald Bruce Stewart
bayer: Learning Haskell, the Prelude.ShowS type stood out as odd, exploiting the implementation of lazy evaluation to avoid explicitly writing an efficient concatenable list data structure. This felt like cheating, or at least like using a screwdriver as a crowbar, to be less

Re: [Haskell-cafe] Re: Too many packages on hackage? :-)

2007-07-09 Thread Donald Bruce Stewart
sascha.boehme: Hello, Who's our SoC hackage guy? To do list right here! The HackageDB project is for now concentrating on another subject. I see the necessity of adding search features and additionally tags, but in the moment I work on automatic generation of Haddock documentation.

Re: [Haskell-cafe] where's yi available?

2007-07-09 Thread Stefan O'Rear
On Mon, Jul 09, 2007 at 08:43:03PM +0400, Vadim wrote: I'm trying to get 'hide' but failed to install 'yi'. I followed instructions at page http://haskell.org/hawiki/hIDE_2fDesign but can't succeed in executing HaWiki is no longer used, has not been updated for months, and on the FrontPage

[Haskell-cafe] Data.ByteString.dropWhile

2007-07-09 Thread Thomas Conway
Hi All, I notice that Data.ByteString has span and spanEnd. Is there a known particular reason why dropWhile and takeWhile don't have corresponding *End functions? If not, what is the protocol for adding them? cheers, T. -- Dr Thomas Conway [EMAIL PROTECTED] Silence is the perfectest herald of

Re: [Haskell-cafe] Data.ByteString.dropWhile

2007-07-09 Thread Donald Bruce Stewart
drtomc: Hi All, I notice that Data.ByteString has span and spanEnd. Is there a known and break/breakEnd. particular reason why dropWhile and takeWhile don't have corresponding *End functions? If not, what is the protocol for adding them? There's no reason -- we couldn't decide on whether

Re: [Haskell-cafe] Data.ByteString.dropWhile

2007-07-09 Thread Donald Bruce Stewart
drtomc: Well, maybe I shoud be asking a higher level question then. I have a function tidy = reverse . dropWhile punk . reverse . dropWhile punk where punk = isPunctuation . chr . fromIntegral which is leading to a significant amount of allocation, and you can see why. The way

Re: [Haskell-cafe] Data.ByteString.dropWhile

2007-07-09 Thread Bryan O'Sullivan
Donald Bruce Stewart wrote: I'd just manually write a 'tidy' loop (in the Data.ByteString style) (which would avoid all allocations), since it seems pretty useful. That would indeed be very useful to have as a library function. I've pined for Python's strip() string method (removes leading

Re: [Haskell-cafe] no-coding functional data structures via lazyness

2007-07-09 Thread Dave Bayer
On Jul 9, 2007, at 6:52 PM, Donald Bruce Stewart wrote: bayer: Learning Haskell, the Prelude.ShowS type stood out as odd, exploiting the implementation of lazy evaluation to avoid explicitly writing an efficient concatenable list data structure. See also

Re: [Haskell-cafe] Data.ByteString.dropWhile

2007-07-09 Thread Roman Leshchinskiy
Thomas Conway wrote: Well, maybe I shoud be asking a higher level question then. I have a function tidy = reverse . dropWhile punk . reverse . dropWhile punk where punk = isPunctuation . chr . fromIntegral which is leading to a significant amount of allocation, and you can see why.