Re: [Haskell-cafe] Lazy lists simulated by unboxed mutable arrays

2008-05-27 Thread Bulat Ziganshin
Hello Henning, Wednesday, May 28, 2008, 9:51:28 AM, you wrote: >We could simulate a list with strict elements, i.e. > data StrictList a = Elem !a (StrictList a) | End > by an unboxed array with a cursor to the next element to be evaluated and > a function that generates the next elemen

[Haskell-cafe] re: a build problem

2008-05-27 Thread Galchin, Vasili
Hi Duncan, In response to your below, I am running "runhaskell Setup.hs configure -v3 --prefix=$HOME". Is v3 the current highest Cabal highest verbosity level? FYI basically I am running ghc that I just built a couple of days ago from the ghc source distribution. Vasili (I. Galchin) ;^) On

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Benjamin L. Russell
Not always. Just to be sure, I just checked the "Longman Dictionary of Contemporary English Online" (http://pewebdic2.cw.idm.fr/topbar.html), and it came up with the following pronunciation for "cabal": \kəˈbæl\ In fact, this was the only pronunciation listed, so the other pronunciation is no

[Haskell-cafe] Lazy lists simulated by unboxed mutable arrays

2008-05-27 Thread Henning Thielemann
I wonder whether the following idea has been investigated or implemented somewhere: We could simulate a list with strict elements, i.e. data StrictList a = Elem !a (StrictList a) | End by an unboxed array with a cursor to the next element to be evaluated and a function that generates th

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Clifford Beshers
On Tue, May 27, 2008 at 10:27 PM, Benjamin L. Russell < [EMAIL PROTECTED]> wrote: > Actually, according to the definition that you used ( > http://www.merriam-webster.com/dictionary/cabal), there are the following > two pronunciations of "cabal": > > 1) \kə-ˈbäl\ > 2) \kə-ˈbal\ > > The "a" phoneme

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Ketil Malde
Andrew Coppin <[EMAIL PROTECTED]> writes: > So, after an entire day of boggling my mind over this, I have brought > it down to one simple example: > > (id 'J', id True) -- Works perfectly. > > \f -> (f 'J', f True) -- Fails miserably. > > Both expressions are obviously perfectly type-safe, a

Re: [Haskell-cafe] Re: the Network.URI parser

2008-05-27 Thread Miguel Mitrofanov
I am taking comments on a web forum from arbitrary people. The interpretation of the HTML occurs at the user's browser. A lot of people will be using outdated browsers (IE 5.5 / 6), ergo security (at the source) becomes my problem. I cannot force them to upgrade their browsers. I think th

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Benjamin L. Russell
Actually, according to the definition that you used (http://www.merriam-webster.com/dictionary/cabal), there are the following two pronunciations of "cabal": 1) \kə-ˈbäl\ 2) \kə-ˈbal\ The "a" phoneme of the "ˈbal" syllable of pronunciation 2 is actually defined to be identical to the first syl

[Haskell-cafe] Re: the Network.URI parser

2008-05-27 Thread Peter Gammie
On 27/05/2008, at 6:08 PM, Neil Mitchell wrote: It most certainly is a security flaw. In the src of an img, yes, probably. In the href of a link, its a completely valid thing to do - and one that I've done loads of times. The URI is fine, its just the particular location that is dodgy. Sure,

Re: [Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Clifford Beshers
As in the dictionary (http://www.merriam-webster.com/dictionary/cabal), accent on the second syllable, which is pronounced like none of ball, balance, boll and bale. Roughly the same rhythm as kaboom. On Tue, May 27, 2008 at 6:04 PM, Dan Piponi <[EMAIL PROTECTED]> wrote: > In particular, which s

[Haskell-cafe] So how do people pronounce 'cabal' around here?

2008-05-27 Thread Dan Piponi
In particular, which syllable gets the stress, and what are the lengths of the two vowels? Couldn't find anything in the FAQ (http://www.haskell.org/haskellwiki/Cabal/FAQ). -- Dan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Luke Palmer
On Tue, May 27, 2008 at 5:55 PM, Andrew Coppin <[EMAIL PROTECTED]> wrote: > Gleb Alexeyev wrote: >> >> foo :: (forall a . a -> a) -> (Bool, String) >> foo g = (g True, g "bzzt") > > So, after an entire day of boggling my mind over this, I have brought it > down to one simple example: > > (id 'J',

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Duncan Coutts
On Tue, 2008-05-27 at 15:33 -0700, Thomas Hartman wrote: > I think dist gets populated when you do build. Actually we also stash the configuration in ./dist/setup-config so that gets created at configure time. Galchin's problem is that something goes wrong during the configure and so nothing get

Re: [Haskell-cafe] Aren't type system extensions fun?

2008-05-27 Thread Ryan Ingram
On 5/26/08, Andrew Coppin <[EMAIL PROTECTED]> wrote: > This is probably the first real use I've ever seen of so-called rank-2 > types, and I'm curios to know why people think they need to exist. > [Obviously when somebody vastly more intelligent than me says something is > necessary, they probably

Re: Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Ryan Ingram
On 5/27/08, Darrin Thompson <[EMAIL PROTECTED]> wrote: > On Tue, May 27, 2008 at 3:40 PM, Kim-Ee Yeoh <[EMAIL PROTECTED]> wrote: > > What we want is the callEE to choose x_t since callEE needs to > > instantiate x_t to Char and Bool. What we want is > > (x_t -> x -> x) -> (Char, Bool). > > But tha

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Philippa Cowderoy
Warning for Andrew: this post explains a new-to-you typed lambda calculus and a significant part of the innards of Hindley-Milner typing in order to answer your questions. Expect to bang your head a little! On Tue, 27 May 2008, Andrew Coppin wrote: > - A function starts out with a polymorphic t

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Thomas Hartman
I think dist gets populated when you do build. > > 2008/5/27 Galchin, Vasili <[EMAIL PROTECTED]>: >> when I do a "clean" followed by "configure" then dist is empty >> >> vasili >> >> On Tue, May 27, 2008 at 4:37 PM, Thomas Hartman <[EMAIL PROTECTED]> wrote: >>> >>> maybe try >>> >>> runghc Setup.

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Tillmann Rendel
Andrew Coppin wrote: So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) -- Works perfectly. \f -> (f 'J', f True) -- Fails miserably. Both expressions are obviously perfectly type-safe, and yet the type checker stubbor

[Haskell-cafe] ANN: HSmugMug 0.1 - a haskell wrapper to the photo site smugmug's api

2008-05-27 Thread Daniel Patterson
Released May 27th, 2008. I've been working for a little while on a haskell wrapper to the photo hosting site Smugmug's api. As of now, the library is pretty simple - it is 'read-only' - ie, you can't use it to upload to or create galleries, but I still think it is potentially useful to haskell/sm

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Galchin, Vasili
actually I also got a core file. ... when I am running "runghc Setup.lhs ." and get a core file when I run "gdb" on the core file in this situation what Linux executable should I specify with the core file? ghc? Also when building ghc how to do I specify to keep symbol table for debugging? Is

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Galchin, Vasili
when I do a "clean" followed by "configure" then dist is empty vasili On Tue, May 27, 2008 at 4:37 PM, Thomas Hartman <[EMAIL PROTECTED]> wrote: > maybe try > > runghc Setup.hs clean > > or fresh darcs checkout and try build again from scratch. it's helped > me in the past. > > thomas. > > > Am

Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Isaac Dupree
Darrin Thompson wrote: On Tue, May 27, 2008 at 3:40 PM, Kim-Ee Yeoh <[EMAIL PROTECTED]> wrote: Let's fill in the type variable: (x -> x) -> (Char, Bool) ==> forall x. (x -> x) -> (Char, Bool) ==> x_t -> (x -> x) -> (Char, Bool), where x_t is the hidden type-variable, not unlike the reader monad.

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Isaac Dupree
Chaddaï Fouché wrote: - Why are top-level variables and function arguments treated differently by the type system? They aren't In a sense, they are. id :: (forall a. a -> a) useId :: (forall a. a -> a) -> (Int,Bool) brokenUseId :: (forall a. (a -> a) -> (Int,Bool)) brokenUseId :: (a -> a) ->

Re: [Haskell-cafe] a build problem ....

2008-05-27 Thread Thomas Hartman
maybe try runghc Setup.hs clean or fresh darcs checkout and try build again from scratch. it's helped me in the past. thomas. Am 26. Mai 2008 21:32 schrieb Galchin, Vasili <[EMAIL PROTECTED]>: > Hello, > > One of my test cases will not build. I am running: > > [EMAIL PROTECTED]:~$ ghc -v

Re: [Haskell-cafe] Examples of using Haskell for mathematics

2008-05-27 Thread Conal Elliott
Along these lines, check out (and maybe quote) the July 2007 note from Doug McIlroy to the Haskell list: http://www.haskell.org/pipermail/haskell/2007-July/019632.html I've particularly been enjoying Doug's paper "The Music of Streams", mentioned in that note. - Conal On Mon, May 26, 2008 at

[Haskell-cafe] Re: HDBC with SQL Server / OBDC

2008-05-27 Thread Morten Holm Pedersen
John Goerzen wrote: On Sunday 25 May 2008 11:24:20 am Morten Holm Pedersen wrote: am trying to do a simple DB connection from Haskell to a SQL Server 2005 (on Windows obviously). The DSN name ("Nylon") works from C++ but when running the below example (or any other I can think of) ghci crashes.

Re: Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Darrin Thompson
On Tue, May 27, 2008 at 3:40 PM, Kim-Ee Yeoh <[EMAIL PROTECTED]> wrote: > Let's fill in the type variable: (x -> x) -> (Char, Bool) ==> > forall x. (x -> x) -> (Char, Bool) ==> x_t -> (x -> x) -> (Char, Bool), > where x_t is the hidden type-variable, not unlike the reader monad. > > As you've point

Re: Re: [Haskell-cafe] Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Kim-Ee Yeoh
Andrew Coppin wrote: > > So, after an entire day of boggling my mind over this, I have brought it > down to one simple example: > > (id 'J', id True) -- Works perfectly. > \f -> (f 'J', f True) -- Fails miserably. > > Both expressions are obviously perfectly type-safe, and yet the typ

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Chaddaï Fouché
2008/5/27 Andrew Coppin <[EMAIL PROTECTED]>: > Gleb Alexeyev wrote: >> >> foo :: (forall a . a -> a) -> (Bool, String) >> foo g = (g True, g "bzzt") > > So, after an entire day of boggling my mind over this, I have brought it > down to one simple example: > > (id 'J', id True) -- Works perfectly

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Don Stewart
andrewcoppin: > Gleb Alexeyev wrote: > >foo :: (forall a . a -> a) -> (Bool, String) > >foo g = (g True, g "bzzt") > > So, after an entire day of boggling my mind over this, I have brought it > down to one simple example: > > (id 'J', id True) -- Works perfectly. > > \f -> (f 'J', f True)

Re: [Haskell-cafe] Re: Aren't type system extensions fun? [Further analysis]

2008-05-27 Thread Andrew Coppin
Gleb Alexeyev wrote: foo :: (forall a . a -> a) -> (Bool, String) foo g = (g True, g "bzzt") So, after an entire day of boggling my mind over this, I have brought it down to one simple example: (id 'J', id True) -- Works perfectly. \f -> (f 'J', f True) -- Fails miserably. Both expre