Re: [Haskell-cafe] Re: excercise - a completely lazy sorting algorithm

2009-07-09 Thread Matthias Görgens
Interesting.  Can you make the definition of quicksort non-recursive,
too?  Perhaps with help of a bootstrapping combinator like the one
implicit in the approach I have given earlier?

 treeSort = bootstrap partitionOnMedian
 bootstrap f = Fix . helper . f
 where helper = fmap (Fix . helper . f)

 partitionOnMedian :: forall a. (Ord a) = (S.Seq a) - BTreeRaw a (S.Seq a)

Extra points if you can give 'bootstrap' or an equivalent in terms of
existing Haskell combinators.

Matthias.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Re: excercise - a completely lazy sorting algorithm

2009-07-09 Thread Heinrich Apfelmus
Matthias Görgens wrote:
 Interesting.  Can you make the definition of quicksort non-recursive,
 too?  Perhaps with help of a bootstrapping combinator like the one
 implicit in the approach I have given earlier?
 
 treeSort = bootstrap partitionOnMedian
 bootstrap f = Fix . helper . f
 where helper = fmap (Fix . helper . f)
 
 partitionOnMedian :: forall a. (Ord a) = (S.Seq a) - BTreeRaw a (S.Seq a)
 
 Extra points if you can give 'bootstrap' or an equivalent in terms of
 existing Haskell combinators.

Sure, no problem.

Of course, some part of algorithm has to be recursive, but this can be
outsourced to a general recursion scheme, like the hylomorphism

hylo :: Functor f = (a - f a) - (f b - b) - (a - b)
hylo f g = g . fmap (hylo f g) . f

This scheme is a combination of the anamorphism which builds the tree of
recursive calls

data Fix f = In { out :: f (Fix f) }

ana :: Functor f = (a - f a) - a - Fix f
ana f = In . fmap (ana f) . f

and a catamorphism which combines the results

cata :: Functor f = (f b - b) - Fix f - b
cata g = g . fmap (cata g) . out

so we could also write

hylo f g = cata g . ana f



For quicksort, the call tree is the fixed point of the functor

type Size= Int
data Q a b   = Empty | Merge Size a b b

instance Functor (Q a) where
fmap f (Merge n x b b') = Merge n x (f b) (f b')
fmap f Empty= Empty

The algorithm

quicksort = hylo partition merge

proceeds in the two well-known phases: first, the input list is
partitioned into two parts separated by a pivot

partition [] = Empty
partition (x:xs) = Merge (length xs + 1) x ls xs
where
ls = filter (= x) xs
rs = filter (  x) xs

and then the sorted results are merged

merge Empty   = []
merge (Merge _ x a b) = a ++ [x] ++ b

The random access tree implementation can be obtained by using a
different  merge  function. In particular, the quicksort from my
previous post was parametrized on  merge  (with a slightly different way
to indicate the list lengths); any function of type

(Size - a - b - b - b) - b - c

is equivalent to a function of type

(Q a b - b) - c


Incidentally, the random access tree *is* the call tree for quicksort,
so we'd have

   merge = In

and we can shorten the whole thing to

   quicksort = ana partition

which is essentially what you coded.



To read about  hylo f g = cata g . ana f  with quicksort as example
again in a slightly different light, see also the following blog post by
Ulisses Costa

 http://ulissesaraujo.wordpress.com/2009/04/09/hylomorphisms-in-haskell/



Regards,
apfelmus

--
http://apfelmus.nfshost.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: hsparql, a SPARQL query generator/DSL and client

2009-07-09 Thread Nicolas Pouillard
Excerpts from Jeff Wheeler's message of Thu Jul 09 00:27:51 +0200 2009:
 I'm excited to announce the first version of hsparql. HSparql makes it
 easy to query SPARQL-compliant servers using a relatively intuitive DSL
 and very simple client.

I've looked at your DSL and it looks really neat. While reading I was
wondering if GADTs could help having an even nicer query language.

-- 
Nicolas Pouillard
http://nicolaspouillard.fr
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: excercise - a completely lazy sorting algorithm

2009-07-09 Thread Matthias Görgens
Thanks.  I heard about the hylo-, ana- and catamorphisms before, but
never explicitly used them.  Time to get started.

And yet another question: One can get the median in deterministic
linear time.  For quicksort choosing the median as pivot keeps the O(n
log n) average running time and brings down the expected worst case,
too.  Do you know of a (natural) way to combine selecting the median
and doing the quicksort, so that you don't compare unnecessarily?

The way to de-randomize quickselect is to calculate medians of
medians.  I.e. solve the problem for smaller instances first.  I
suspect if we follow this strategy with the reified quicksort
call-trees, the de-randomized quicksort will look a lot like
mergesort.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Where can I get GHC for Solaris?

2009-07-09 Thread Brandon S. Allbery KF8NH

On Jul 8, 2009, at 03:32 , John Ky wrote:

 | /export/home/a-m/joky/ghc-6.8.2/utils/ghc-pkg/ghc-pkg.bin
 --global-conf /export/home/a-m/joky/.tools/ghc-6.8.2/lib/ghc-6.8.2/ 
package.conf update - --force

 ld.so.1: ghc-pkg.bin: fatal: libm.so.2: version `SUNW_1.2' not found
 (required by
 file /export/home/a-m/joky/ghc-6.8.2/utils/ghc-pkg/ghc-pkg.bin)
 ld.so.1: ghc-pkg.bin: fatal: libm.so.2: open failed: No such file or
 directory



gmake isn't the problem here.  The problem was that the binary was  
built on a system with the C99 patches installed (ghc pretty much  
requires them) but there aren't that many Solaris 9 systems with the  
C99 patches and the patches themselves seem to be impossible to find.


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: Hayoo! beta 0.4

2009-07-09 Thread Janis Voigtlaender

Timo B. Hübel wrote:

Visit Hayoo! here: http://holumbus.fh-wedel.de/hayoo

Additionally, we have again updated the search index. It contains all packages 
from Hackage as well as gtk2hs as of 06.07.2009, a total of 111.946 function 
and type definitions.


Is it possible that coverage has decreased in some areas? I am pretty
sure that a week ago or so I could use Hayoo to find

   sumP :: Num a = [:a:] - a

from GHC.PArr.

Now, that result does not turn up anymore.

Ciao,
Janis.

--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:vo...@tcs.inf.tu-dresden.de

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: darcs 2.3 beta 2

2009-07-09 Thread Petr Rockai
Hello!

Two weeks passed and it is about time to release darcs 2.3 beta 2 (it's already
a day late, sorry about that).

As with beta 1, there is only a single installation package for this release of
darcs: cabalised source. (Please note that the final version with also come
with the legacy autoconf-based buildsystem, for the last time.)

You can either download a tarball from
http://repos.mornfall.net/darcs/darcs-2.2.98.2.tar.gz and build manually (see
the build instructions in README inside the tarball), or, alternatively, you
can use cabal-install to obtain a copy (the beta release is now available on
Hackage):

$ cabal update
$ cabal install darcs-beta

This, if successful, will give you a darcs binary in `~/.cabal/bin` -- you
should probably add that to your PATH.

What's new since beta 1
---

There are basically two relatively intrusive changes since beta 1. First, I
have added index upgrade functionality to hashed-storage and this is now used
by darcs, so that any bad or incompatible indexes are recreated transparently
by darcs. Moreover, the index format is now architecture-independent, meaning
that repositories shared across multiple architectures should not suffer from
excessive index rebuilding.

Second, Ganesh has done further work on his gzip CRC correction code. There is
a very slight risk of regressions, so if you have around any repositories with
broken CRCs in them, please test this functionality. Moreover, there is now an
option to limit the repair to current repository, avoiding changes in related
branches or caches.

Trent, Thorkil and Eric have done cleanup work and a number of minor fixes for
this release, improving overall quality and polish. One bug in the new indexing
code has been found and reported by Eric and Guillaume independently, and is
fixed in hashed-storage 0.3.4 (which required by this beta).

You can track the release plan and progress at our wiki:
http://wiki.darcs.net/development.

The question of GHC 6.8
---

Using GHC 6.10.3 or newer is *strongly recommended*. You may compile darcs with
GHC 6.8, but there are several caveats. If you are using 6.8.2 or older, please
disable mmap support (pass -f-mmap to cabal install or runghc Setup configure
below). Note that the GHC 6.8.2 that ships with Debian Lenny is not affected
and it should be safe to keep mmap enabled. It is also recommended to disable
use of Hackage zlib when compiling with GHC 6.8.2 (including the Debian Lenny
version): pass -f-zlib to cabal. When using zlib, we have seen occasional
crashes with error messages like openBinaryFile: file locked -- this is a
known GHC 6.8.2 bug (and is fixed in GHC 6.8.3). Last, if you are using a
64-bit system, darcs may hang when you exit a pager when compiled with GHC
older than 6.10.3. Although this is harmless, it is quite inconvenient.

Overall, the status of GHC 6.8 is semi-supported: for many cases, things will
work just fine, especially if you take a little extra caution with compilation
flags.

Yours,
   Petr.

-- 
Petr Ročkai | http://web.mornfall.net
A physicist is an atom's way of knowing about atoms. (George Wald)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Cristiano Paris
Hi,
I'm wondering what a good example of why laziness enhances composability
would be.

I'm specifically looking for something that can't implemented in Python with
iterators (at least not elegantly), but can actually be implemented in
Haskell.

Thanks,

Cristiano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Jeremy Shaw
Hello,

A wonderful, and practical example, is the techniques in this modular lazy 
search paper:

http://web.cecs.pdx.edu/~apt/jfp01.ps

They build simple solvers, like backtracking, backjumping, etc. and
then compose them together like: bt . bj

The techniques are very much based on laziness. 

- jeremy

At Thu, 9 Jul 2009 14:55:09 +0200,
Cristiano Paris wrote:
 
 [1  multipart/alternative (7bit)]
 [1.1  text/plain; ISO-8859-1 (7bit)]
 Hi,
 I'm wondering what a good example of why laziness enhances composability
 would be.
 
 I'm specifically looking for something that can't implemented in Python with
 iterators (at least not elegantly), but can actually be implemented in
 Haskell.
 
 Thanks,
 
 Cristiano
 [1.2  text/html; ISO-8859-1 (quoted-printable)]
 
 [2  text/plain; us-ascii (7bit)]
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Thomas Davie


On 9 Jul 2009, at 14:55, Cristiano Paris wrote:


Hi,

I'm wondering what a good example of why laziness enhances  
composability would be.


I'm specifically looking for something that can't implemented in  
Python with iterators (at least not elegantly), but can actually be  
implemented in Haskell.


Pretty much anything that uses tying the knot is very difficult to  
implement in a non-lazy language without a lot of indirection.


Bob
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Cristiano Paris
Thank you for your suggestions!
C.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Alternative IO

2009-07-09 Thread Cristiano Paris
As a joke, I wrote an instance of Alternative for IO actions:
{-# LANGUAGE ScopedTypeVariables #-}
module Main where

import Control.Applicative
import Control.Exception

instance Alternative IO where
  empty = undefined
  x | y = handle (\ (_ :: SomeException) - y) x

This would allow to write IO code which failsafes to a value if the previous
computation failed, i.e.:

*Main Control.Applicative undefined | print Hello
Hello
*Main Control.Applicative print Hello | undefined
Hello

It seems a neat way to catch exception in some scenarios. What do you think?
Why is not Alternative IO defined in Control.Applicative?

Thanks,

Cristiano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Bulat Ziganshin
Hello Cristiano,

Thursday, July 9, 2009, 4:55:09 PM, you wrote:

the best known example is chessmate implementation in Wadler's why
functional programming matter

but i don't know much about Python iterators, so can't say what is
difference. may be its' only simplicity since lazy lists is looks like
and processed just as lists while generators in any other language is
separate data structure

 Hi,
 I'm wondering what a good example of why laziness enhances composability 
 would be.

 I'm specifically looking for something that can't implemented in
 Python with iterators (at least not elegantly), but can actually be 
 implemented in Haskell.
   
 Thanks,

 Cristiano
  
   


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread haskell
Hi,

i find the current www.haskell.org frontpage quite overwhelming.

Compare it for example with the home pages of other programming languages :
http://caml.inria.fr/
http://factorcode.org/
http://sbcl.sourceforge.net/
http://www.ruby-lang.org/en/
http://www.falconpl.org/


Here is my sketch of a leaner, more structured Haskell front page:
http://www.haskell.org/haskellwiki/User:Lenny222/Haskell

Comments?

Bye,
Lenny
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative IO

2009-07-09 Thread Henning Thielemann


On Thu, 9 Jul 2009, Cristiano Paris wrote:


As a joke, I wrote an instance of Alternative for IO actions:
{-# LANGUAGE ScopedTypeVariables #-}
module Main where

import Control.Applicative
import Control.Exception

instance Alternative IO where
  empty = undefined
  x | y = handle (\ (_ :: SomeException) - y) x

This would allow to write IO code which failsafes to a value if the previous
computation failed, i.e.:

*Main Control.Applicative undefined | print Hello
Hello
*Main Control.Applicative print Hello | undefined
Hello

It seems a neat way to catch exception in some scenarios. What do you think?
Why is not Alternative IO defined in Control.Applicative?


I just say, what I always say. :-) 'error' denotes a programming error and 
catching it is a hack, sometimes needed but less often than you think. 
For exceptions one must use 'throw'. Thus, you may e.g. define

   empty = throw ...___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative IO

2009-07-09 Thread Cristiano Paris
On Thu, Jul 9, 2009 at 3:42 PM, Edward Kmett ekm...@gmail.com wrote:

 Hrmm. This should probably be made consistent with the MonadPlus instance
 for IO, so

  empty = ioError (userError mzero)


I agree. Of course, that was only a first attempt :)

Cristiano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Cristiano Paris
On Thu, Jul 9, 2009 at 3:42 PM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:

 Hello Cristiano,

 Thursday, July 9, 2009, 4:55:09 PM, you wrote:

 the best known example is chessmate implementation in Wadler's why
 functional programming matter

 but i don't know much about Python iterators, so can't say what is
 difference. may be its' only simplicity since lazy lists is looks like
 and processed just as lists while generators in any other language is
 separate data structure

Thanks. In fact, I was stuck trying to find an example which couldn't
be written using Python's iterators. The only difference coming up to
my mind was that Haskell's lists are a more natural way to express a
program relying on laziness. That was the reason why added the clause
at least not elegantly in my first post.

Cristiano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread minh thu
2009/7/9  hask...@kudling.de:
 Hi,

 i find the current www.haskell.org frontpage quite overwhelming.

 Compare it for example with the home pages of other programming languages :
 http://caml.inria.fr/
 http://factorcode.org/
 http://sbcl.sourceforge.net/
 http://www.ruby-lang.org/en/
 http://www.falconpl.org/


 Here is my sketch of a leaner, more structured Haskell front page:
 http://www.haskell.org/haskellwiki/User:Lenny222/Haskell

 Comments?

My favorite in all these is haskell.org :)

I find it very to the point and not overwhelming at all : it's easy to
glance over it and find quickly what I want.

In fact, the homepage reflects well the language and its community:
effective, useful, healthy and joyful.

Cheers,
Thu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Janis Voigtlaender

Bulat Ziganshin wrote:

Hello Cristiano,

Thursday, July 9, 2009, 4:55:09 PM, you wrote:

the best known example is chessmate implementation in Wadler's why
functional programming matter


Aeh, ... Wadler's - Hughes'

--
Dr. Janis Voigtlaender
http://wwwtcs.inf.tu-dresden.de/~voigt/
mailto:vo...@tcs.inf.tu-dresden.de
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Removing polymorphism from type classes (viz. Functor)

2009-07-09 Thread Edward Kmett
Well, you're going to wind up with a lot of cases where you really want a
quantified context, even with just your Functor definition, but in that same
spirit you can build an 'Applicative-like' instance as well.

 type family Arg f :: *
 type instance Arg [a - b] = [a]

 type family Result f :: *
 type instance Result [a - b] = [b]

 class Pointed f = Applicative f where
 (*) :: f - Arg f - Result f

 instance Applicative [a - b] where
 fs * xs = do f - fs; map f

The thing is these definitions are very hard to actually use. I have a
similar construction for Foldable/Traversable-like containers in the
'monoids' package as Data.Generator that you might want to look at for
ideas.

-Edward Kmett

On Tue, Jul 7, 2009 at 7:03 PM, George Pollard por...@porg.es wrote:

 Ok, so I have a small idea I'm trying to work on; call it a
 Prelude-rewrite if you want. For this I want to be able to have the
 hierarchy Functor → Applicative → Monad.

 For Functor, I would like to be able to implement it for a wider
 variety of types, as there are types which have aren't polymorphic
 which would also benefit from having an instance.
 My running example for this set of types is ByteString; the module
 contains the method:

map ∷ (Word8 → Word8) → ByteString → ByteString

 However, we cannot use this for Functor because ByteString isn't
 polymorphic. To get around this, I devised the following:

 Introduce a type family which represents ‘points’ inside the type:

type family Point f ∷ ★

 For ByteString we have:

type instance Point ByteString = Word8

 For a polymorphic example (lists) we have:

type instance Point [a] = a

 Now Functor becomes:

class SimpleFunctor f where
fmap ∷ (Point f → Point f) → (f → f)

 However, this doesn't allow for the existence of functions with the
 type (a → b). I need to introduce another type into the class:

class Functor f g where
fmap ∷ (Point f → Point g) → (f → g)

 But having two types isn't very nice (for one thing we can't introduce
 a fundep because for lists as it fails one of the coverage
 conditions), so introduce another type family to represent types which
 can be produced by giving a free variable:

type Subst f a ∷ ★
type Subst [a] b = [b]
type Subst ByteString b = ByteString

class Functor f where
fmap ∷ (Point f → Point (Subst f a)) → (f → Subst f a)

 I'm not sure how much of a hack this is, or if there is a better way.
 It seems to be OK...

 Now I want to implement Applicative. It would make sense to have
 ‘return’ be split out into a separate class, because this can be
 restricted in a similar way to Functor:

class Pointed f where
return ∷ Point f → f

instance Pointed [a] where
return x = [x]

instance Pointed ByteString where
return = BS.singleton

 Now, I want to be able to restrict Applicative to things which have
 [Pointed f, and forall a b. Point f ~ (a → b)]. At the moment I can't
 figure this out because I believe it would require something like the
 ‘quantified contexts’ proposal:

class (Pointed f, ∀ a b. Point f ~ (a → b)) ⇒ Applicative f where
...

 I could have something like:

class (Pointed f, Point f ~ (a → b)) ⇒ Applicative f a b where
apply ∷ f → Subst f a → Subst f b

 This is still not very nice, because it requires two more type
 variables in the class, and the non-type-families version is far more
 straightforward... in fact, it makes sense for the Applicative class
 to have a polymorphic type because it must be able to have ‘return’
 applied to arbitrary functions (remember [fmap f xs ≡ return f `apply`
 xs]). So back to:

class Applicative f where
apply ∷ f (a → b) → f a → f b

 But then ‘return’ cannot be added via a superclass restriction to
 Pointed! I seem to have painted myself into a corner. Does anyone see
 a better way to go about this?

 Thanks,
 - George
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative IO

2009-07-09 Thread Edward Kmett
Hrmm. This should probably be made consistent with the MonadPlus instance
for IO, so

 empty = ioError (userError mzero)
Otherwse, I'm surprised this isn't already in the standard library.

I'd suggest submitting it to librar...@.

-Edward Kmett
On Thu, Jul 9, 2009 at 9:27 AM, Cristiano Paris
cristiano.pa...@gmail.comwrote:

 As a joke, I wrote an instance of Alternative for IO actions:
  {-# LANGUAGE ScopedTypeVariables #-}
 module Main where

 import Control.Applicative
 import Control.Exception

 instance Alternative IO where
   empty = undefined
   x | y = handle (\ (_ :: SomeException) - y) x

 This would allow to write IO code which failsafes to a value if the
 previous computation failed, i.e.:

  *Main Control.Applicative undefined | print Hello
 Hello
 *Main Control.Applicative print Hello | undefined
 Hello

 It seems a neat way to catch exception in some scenarios. What do you
 think? Why is not Alternative IO defined in Control.Applicative?

 Thanks,

 Cristiano

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative IO

2009-07-09 Thread Thomas Davie

To be honest -- that seems rather nice.  Can has in Hackage?

Bob

On 9 Jul 2009, at 15:27, Cristiano Paris wrote:


As a joke, I wrote an instance of Alternative for IO actions:

{-# LANGUAGE ScopedTypeVariables #-}
module Main where

import Control.Applicative
import Control.Exception

instance Alternative IO where
  empty = undefined
  x | y = handle (\ (_ :: SomeException) - y) x

This would allow to write IO code which failsafes to a value if the  
previous computation failed, i.e.:


*Main Control.Applicative undefined | print Hello
Hello
*Main Control.Applicative print Hello | undefined
Hello

It seems a neat way to catch exception in some scenarios. What do  
you think? Why is not Alternative IO defined in Control.Applicative?


Thanks,

Cristiano
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Bulat Ziganshin
Hello haskell,

Thursday, July 9, 2009, 5:54:16 PM, you wrote:

 i find the current www.haskell.org frontpage quite overwhelming.

it's rather frequent topic here :)

 Here is my sketch of a leaner, more structured Haskell front page:
 http://www.haskell.org/haskellwiki/User:Lenny222/Haskell

i like your design. i believe that homepage is used primarily by
first-time users and here they will find all they need to understand
haskell and start to use it


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] iteratee enumHandle

2009-07-09 Thread Paolino
I'm testing iteratee.
This is the possible bug I've found

import Data.Iteratee.IO
import Data.Iteratee.Base
import Data.Iteratee.Char
import System.IO
import Control.Exception

main = do
h - openFile mamma23 ReadWriteMode
hPutStrLn h ciao
hSeek h AbsoluteSeek 0
l - (enumHandle h stream2list :: IO (Iteratee IO String)) = run
print  $  assert (l == ciao) ()

assertion failed

This aside, I'd like to know if there is a way to use parsec library
to make an Iteratee, so if it's possible to make parsec spit out a
continuation on EOF, or maybe as in delcont language to capture it.

thanks

paolino
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] About return type

2009-07-09 Thread ZhangXu


_
Messenger安全保护中心,免费修复系统漏洞,保护Messenger安全!
http://im.live.cn/safe/
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread haskell
 I find it very to the point and not overwhelming at all : it's easy to
glance over it and find quickly what I want.

Thanks for your feedback.

Most people feel overwhelmed when confronted with more than 7+-2 items:
http://www.smashingmagazine.com/2007/10/09/30-usability-issues-to-be-aware-of/

On the current Haskell frontpage there are over 60 links competing for 
attention.

I am not sure whether we should design interfaces solely with few people having 
exceptional abilities in mind. This could be understood as a statement about 
who Haskell is made for in itself.

Bye,
Lenny
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] About the return type

2009-07-09 Thread xu zhang
I have trouble in returning a list of Figures. I want return a type of m
(Maybe [Figure IO]), but the type of dv_findFigure is :: a - Point - s
(Maybe (Figure s)). How can change the code below to get a s (Maybe [Figure
s])?
Thank you in advance!

 dv_findFigure :: a - Point - s (Maybe (Figures))
 fig_contains :: fig - Point - m Bool
 anc :: Point
do
 fs - dv_getSelFigs dv
 fs' - filterM (`fig_contains` anc) fs
 f - case fs' of
[] - dv_findFigure dv anc
fig : _ - return $ Just fig
 case f of
   Just f' - tool_dragtrack self f'
   Nothing - dv_clearSel dv  tool_areatrack self

  Couldn't match expected type `Figure m'
   against inferred type `[Figure IO]'
  Expected type: m (Maybe (Figure m))
  Inferred type: m (Maybe [Figure IO])
In the expression: return $ Just fs
In a case alternative: fig : _ - return $ Just fs
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Jochem Berndsen
hask...@kudling.de wrote:
 Most people feel overwhelmed when confronted with more than 7+-2 items:
 http://www.smashingmagazine.com/2007/10/09/30-usability-issues-to-be-aware-of/

This refers to the number of items/things people can remember in their
short-time memory. This has nothing to do with the maximum number of
menu items you should use. There is of course a limit, but there is no
reason to limit it to 7+-2.

Cheers,
-- 
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread minh thu
2009/7/9  hask...@kudling.de:
 I find it very to the point and not overwhelming at all : it's easy to
 glance over it and find quickly what I want.

 Thanks for your feedback.

 Most people feel overwhelmed when confronted with more than 7+-2 items:
 http://www.smashingmagazine.com/2007/10/09/30-usability-issues-to-be-aware-of/

 On the current Haskell frontpage there are over 60 links competing for 
 attention.

 I am not sure whether we should design interfaces solely with few people 
 having exceptional abilities in mind. This could be understood as a statement 
 about who Haskell is made for in itself.

Well, I guess there is room for personnal preference...

But I don't find correct to say 60 links competing for attention.
You forget to mention the section titles and the separation in two
columns. You could have said more than 600 words competing for
attention...

I can understand people find it overwhelming, but only *at first
sight*. I would make the comparison with a table of content for a
book. I've seen book providing a chapters at a glance part, just
before the real table of content. Glancing a few pages to see the
chapter names (that is not paying attention to the sections and
subsections) is not very more complicated.

For the hompage we're talking about, glancing is even simpler since
everything is on the same page and you can scroll it quite easily.

I'm not sure hiding a level of the hierarchy of information behind a
few clicks make things easier.

Please don't be upset by my opinion, it's just that; I've no will to
enforce it to anybody :)

Cheers,
Thu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread haskell
 I've seen book providing a chapters at a glance part, just
before the real table of content.

Such an inverted pyramid is exactly the consequence Nielson draw from the F 
shape pattern (http://www.useit.com/alertbox/reading_pattern.html).

And that's my critque: i don't see the most important things there are to be 
sayed about Haskell in the top left corner. 

 For the hompage we're talking about, glancing is even simpler since
everything is on the same page and you can scroll it quite easily.

I don't agree that everything on one page makes comprehension easier.

 I'm not sure hiding a level of the hierarchy of information behind a
few clicks make things easier.

That depends on which task we are talking about:
- getting an overview of all available information, or
- finding exactly what you are looking for

I think we should optimize for the latter, where What is Haskell? being the 
most improtant question.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread haskell
I never said we should only expose 7 links.

Take for example the task Find out more about this Haskell i heared about.

You would need to scan the right half of the front page and you need to scan 
the left part of the page. There you need to scan About, it could be 
explained under Why use Haskell? or Language definition or Haskell in 5 
steps or Learning Haskell or Wiki articles or Blog articles and news.

Where should i look? I have to scan a lot of text, i have to keep a lot of 
options in mind and for my taste the load is too much. Be my limit 7 or 20 
links.


hask...@kudling.de wrote:
 Most people feel overwhelmed when confronted with more than 7+-2 items:
 
http://www.smashingmagazine.com/2007/10/09/30-usability-issues-to-be-aware-of/

This refers to the number of items/things people can remember in their
short-time memory. This has nothing to do with the maximum number of
menu items you should use. There is of course a limit, but there is no
reason to limit it to 7+-2.

Cheers,
-- 
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Thomas ten Cate
Are there any kind of hard statistics and analytics that we can base
this discussion upon? There is always room for improvement, but
stumbling around in the dark making blind guesses may not be the best
way to go. Although I personally feel that Lenny's proposed page is an
improvement, statistics could tell us what actual people actually use
the site for.

I don't see any tracking code in the page source. Maybe the site
admins could install Google Analytics? It's free, easy to install and
use, and very informative. (Or some other usage tracker; I merely
suggested GA because I use it and know that it works well.)

Thomas

On Thu, Jul 9, 2009 at 17:53, hask...@kudling.de wrote:
 I never said we should only expose 7 links.

 Take for example the task Find out more about this Haskell i heared about.

 You would need to scan the right half of the front page and you need to scan 
 the left part of the page. There you need to scan About, it could be 
 explained under Why use Haskell? or Language definition or Haskell in 5 
 steps or Learning Haskell or Wiki articles or Blog articles and news.

 Where should i look? I have to scan a lot of text, i have to keep a lot of 
 options in mind and for my taste the load is too much. Be my limit 7 or 20 
 links.


 hask...@kudling.de wrote:
 Most people feel overwhelmed when confronted with more than 7+-2 items:

 http://www.smashingmagazine.com/2007/10/09/30-usability-issues-to-be-aware-of/

 This refers to the number of items/things people can remember in their
 short-time memory. This has nothing to do with the maximum number of
 menu items you should use. There is of course a limit, but there is no
 reason to limit it to 7+-2.

 Cheers,
 --
 Jochem Berndsen | joc...@functor.nl
 GPG: 0xE6FABFAB
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Don Stewart
ttencate:
 Are there any kind of hard statistics and analytics that we can base
 this discussion upon? There is always room for improvement, but
 stumbling around in the dark making blind guesses may not be the best
 way to go. Although I personally feel that Lenny's proposed page is an
 improvement, statistics could tell us what actual people actually use
 the site for.

FWIW, the current layout is actually based on previous analysis of Popular
Pages a few years ago, so that we have O(1) access to key resources.

-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: hsparql, a SPARQL query generator/DSL and client

2009-07-09 Thread Jeff Wheeler
On Thu, Jul 9, 2009 at 4:34 AM, Nicolas
Pouillardnicolas.pouill...@gmail.com wrote:

 I've looked at your DSL and it looks really neat. While reading I was
 wondering if GADTs could help having an even nicer query language.

To be honest, I really only know the name GADT, I don't really know
anything about them. I guess I have a good excuse to go learn them,
though, now. :)

Jeff Wheeler
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread minh thu
2009/7/9 Don Stewart d...@galois.com:
 ttencate:
 Are there any kind of hard statistics and analytics that we can base
 this discussion upon? There is always room for improvement, but
 stumbling around in the dark making blind guesses may not be the best
 way to go. Although I personally feel that Lenny's proposed page is an
 improvement, statistics could tell us what actual people actually use
 the site for.

 FWIW, the current layout is actually based on previous analysis of Popular
 Pages a few years ago, so that we have O(1) access to key resources.

Wonderful !

Do you mean that if we put every links from haddock on the homepage,
we'd have O(1) access to any piece of documentation ? haskell.org is
the neatest data structure of functional programming !

Thu
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Rick R
I think it would be best if the page were  targeted towards newcomers, and
not as a jump point for resources.
Such a jump page is useful, but not as a homepage. Perhaps
haskell.org/linkswould be a better place for such a thing.

As an aside, in the current homepage, the Haskell description is outweighed
by the link menu on the left. IMO the reader's eyes should move from the
title, to the description, then either down or left.  Currently my attention
is split evenly between the link menu and the title/description, which
results in confusion.



On Thu, Jul 9, 2009 at 12:33 PM, Don Stewart d...@galois.com wrote:

 ttencate:
  Are there any kind of hard statistics and analytics that we can base
  this discussion upon? There is always room for improvement, but
  stumbling around in the dark making blind guesses may not be the best
  way to go. Although I personally feel that Lenny's proposed page is an
  improvement, statistics could tell us what actual people actually use
  the site for.

 FWIW, the current layout is actually based on previous analysis of Popular
 Pages a few years ago, so that we have O(1) access to key resources.

 -- Don
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

- Daniel J. Boorstin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Don Stewart

ttencate:
 On Thu, Jul 9, 2009 at 18:33, Don Stewartd...@galois.com wrote:
  ttencate:
  Are there any kind of hard statistics and analytics that we can base
  this discussion upon? There is always room for improvement, but
  stumbling around in the dark making blind guesses may not be the best
  way to go. Although I personally feel that Lenny's proposed page is an
  improvement, statistics could tell us what actual people actually use
  the site for.
 
 Thanks Don, I should have thought of that. It's a start!

No matter what we decide, I'd like to advocate for maintaining the RSS
feed of Hackage uploads on the front page -- this is what makes the page
seem alive and active, and was introduced in response to John Hughes
complaining the page was always out of date. (Similar to the Arch Linux
package updates: http://www.archlinux.org/)


-- Don

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Bulat Ziganshin
Hello Don,

Thursday, July 9, 2009, 8:33:17 PM, you wrote:

 FWIW, the current layout is actually based on previous analysis of Popular
 Pages a few years ago, so that we have O(1) access to key resources.

yes, and it means that page is optimized for regular Haskell users

what is proposed, though, is to optimize it for newcomers so they will
find their way to Haskell

so first we need to decide what category of users homepage should be
optimized for. who can set up poll?


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Thomas ten Cate
By the way, the most valuable pixels, right at the top of the page,
are wasted on wiki stuff. Compare
http://www.haskell.org/
with, for example,
http://www.ruby-lang.org/
http://python.org/

If, like the consensus seems to be, the page should be made more
friendly to beginners (who are unlikely to want to contribute to the
wiki right away), then this should be moved elsewhere, or at the very
least made smaller and less obtrusive.

Thomas
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Don Stewart
bulat.ziganshin:
 Hello Don,
 
 Thursday, July 9, 2009, 8:33:17 PM, you wrote:
 
  FWIW, the current layout is actually based on previous analysis of Popular
  Pages a few years ago, so that we have O(1) access to key resources.
 
 yes, and it means that page is optimized for regular Haskell users
 
 what is proposed, though, is to optimize it for newcomers so they will
 find their way to Haskell
 
 so first we need to decide what category of users homepage should be
 optimized for. who can set up poll?


Perhaps a newbie page can be designed separately first, and hosted
concurrently.  Then we can offer both:

  Newbies:
http://haskell.org

  Everything regular users need at fingertips
http://dashboard.haskell.org/

A newbie porthole is a great idea.

-- Don
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Bulat Ziganshin
Hello Don,

Thursday, July 9, 2009, 8:58:48 PM, you wrote:

   Newbies:
 http://haskell.org

   Everything regular users need at fingertips
 http://dashboard.haskell.org/

yes, my vision is that newbies will go to homepage, from google search
or by typing haskell.org. we cannot expect that they will search for
some special newbie page

while amateurs have more chances to know about their special page.
actually, we probably need to provide link to O(1) page at homepage.
btw, it's rather close to sitemap page provided at some sites

-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Jason Dagit
On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com wrote:

 By the way, the most valuable pixels, right at the top of the page,
 are wasted on wiki stuff. Compare
 http://www.haskell.org/
 with, for example,
 http://www.ruby-lang.org/
 http://python.org/


The thing I like the most from the ruby page is the top box of content where
it starts describing ruby with a Read more... link adjacent to a code
snippet.  Because I doubt anyone will agree on *the one* best code snippet
to show people, I think there should/could be a pool of fun snippets and
loading the page picks one at random.  I have no idea if the wiki engine
supports this.  I also like the strip of links at the top with things like,
Download, Community, and so on.  Something I think the Haskell page does
much better than the other two, is the listing of events and hackage
updates.  Both of those sections feel inviting to me.  It makes me curious
and I want to explore.

The python page looks at least as cluttered as the haskell page.  Neither
the haskell page or the python page have the same look and feel of the ruby
page.  I think the shaded/gradient backgrounds actually add a lot to the
visual experience.  I also like that the boxes have a different bg color for
the box title and the box contents.  I also like the use of icons on the
ruby page.  The Download Ruby link/box with the download icon is very
inviting.  I just want to download it, even if I'm not going to use ruby!

Perhaps we could have a contest similar to the logo contest but for homepage
asthetics redesign.  I think the content on the haskell page is great, but
the visual style of the presentation could be improved considerably.




 If, like the consensus seems to be, the page should be made more
 friendly to beginners (who are unlikely to want to contribute to the
 wiki right away), then this should be moved elsewhere, or at the very
 least made smaller and less obtrusive.


Optimizing for newcomers seems wise.

Jason
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Marcin Kosiba
On Thursday 09 July 2009, Cristiano Paris wrote:
 Thanks. In fact, I was stuck trying to find an example which couldn't
 be written using Python's iterators. The only difference coming up to
 my mind was that Haskell's lists are a more natural way to express a
 program relying on laziness. That was the reason why added the clause
 at least not elegantly in my first post.

Hi,
I recently tried writing some code to simulate a certain protocol in 
Python. 
I thought I'll go the smart way and rely on the Python yield construct to 
do a CPS transformation of my code.
While this worked to a certain extent, composability was a problem, 
because 
any sub-procedure which used yield (and thus was an iterator) required being 
called in a rather inelegant way.

Thanks!
Marcin Kosiba


signature.asc
Description: This is a digitally signed message part.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] c2hs confusion with a simple function

2009-07-09 Thread Jeff Heard
The c2hs documentation at
http://www.cse.unsw.edu.au/~chak/haskell/c2hs/docu/implementing.html#id314947
 gives me an example to follow for this case:

{#fun notebook_query_tab_label_packing as ^
  `(NotebookClass nb, WidgetClass cld)' =
  {notebook `nb',
   widget   `cld'   ,
   alloca-  `Bool' peekBool*,
   alloca-  `Bool' peekBool*,
   alloca-  `PackType' peekEnum*} - `()'#}

so I took the original C binding:

   void SHPGetInfo(SHPHandle, int*, int*, double*, double*)

And wrote a c2hs binding:

{#fun SHPGetInfo as getInfo
{ fromSHPHandle `SHPHandle'
, alloca- `Int'
, alloca- `Int'
, alloca- `Double'
, alloca- `Double'
} - `()' #}

The error I get:

Internal.chs:85:2:
Couldn't match expected type `Int'
   against inferred type `(Ptr b - IO c) - IO c'
  Expected type: IO (Int, Int, Double, Double)
  Inferred type: IO
   ((Ptr b - IO c) - IO c,
(Ptr b1 - IO c1) - IO c1,
(Ptr b2 - IO c2) - IO c2,
(Ptr b3 - IO c3) - IO c3)
In the expression:
  alloca $ \ a2' - alloca $ \ a3' - alloca $ \ a4' - ...
In the expression:
let a1' = fromSHPHandle a1
in alloca $ \ a2' - alloca $ \ a3' - alloca $ ...

I've tried ending it with withCIntConv and withCFloatConv to no avail.
 The original c2hs file is attached.  I'm sure there are many more
problems, but this is the one I'm working on at the moemnt...

-- Jeff


Internal.chs
Description: Binary data
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Marcin Kosiba
On Thursday 09 July 2009, you wrote:
 2009/7/9 Marcin Kosiba marcin.kos...@gmail.com:
  I thought I'll go the smart way and rely on the Python yield construct
  to do a CPS transformation of my code.
         While this worked to a certain extent, composability was a
  problem, because any sub-procedure which used yield (and thus was an
  iterator) required being called in a rather inelegant way.

 i confess to not understanding the inelegance.
 can you provide an example where an iterator inside CPS requires
 special support?

Hi,
To illustrate what I meant I'm attaching two examples. In example_1.py 
I've 
written code the way I think would be elegant (but it doesn't work). In 
example_2.py I've written code so that it works, but it isn't elegant.
I know I'm abusing Python iterators here. Also, I'm not sure the way to 
compose iterators shown in example_2.py is the only option. Actually I'd love 
to see a better solution, because it would remove a lot of bloat from my 
code ;)

Thanks!
Marcin Kosiba


example_1.py
Description: application/python


example_2.py
Description: application/python


signature.asc
Description: This is a digitally signed message part.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Jason Dagit
On Thu, Jul 9, 2009 at 3:11 PM, Derek Elkins derek.a.elk...@gmail.comwrote:

 On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:
 
 
  On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com
 wrote:
 
  By the way, the most valuable pixels, right at the top of the page,
  are wasted on wiki stuff. Compare
  http://www.haskell.org/
  with, for example,
  http://www.ruby-lang.org/
  http://python.org/
 
  The thing I like the most from the ruby page is the top box of content
 where
  it starts describing ruby with a Read more... link adjacent to a code
  snippet.  Because I doubt anyone will agree on *the one* best code
 snippet
  to show people, I think there should/could be a pool of fun snippets and
  loading the page picks one at random.  I have no idea if the wiki engine
  supports this.  I also like the strip of links at the top with things
 like,
  Download, Community, and so on.  Something I think the Haskell page
 does
  much better than the other two, is the listing of events and hackage
  updates.  Both of those sections feel inviting to me.  It makes me
 curious
  and I want to explore.
 
  The python page looks at least as cluttered as the haskell page.  Neither
  the haskell page or the python page have the same look and feel of the
 ruby
  page.  I think the shaded/gradient backgrounds actually add a lot to the
  visual experience.  I also like that the boxes have a different bg color
 for
  the box title and the box contents.  I also like the use of icons on the
  ruby page.  The Download Ruby link/box with the download icon is very
  inviting.  I just want to download it, even if I'm not going to use ruby!
 
  Perhaps we could have a contest similar to the logo contest but for
 homepage
  asthetics redesign.  I think the content on the haskell page is great,
 but
  the visual style of the presentation could be improved considerably.
 
 
  If, like the consensus seems to be, the page should be made more
  friendly to beginners (who are unlikely to want to contribute to the
  wiki right away), then this should be moved elsewhere, or at the very
  least made smaller and less obtrusive.
 
  Optimizing for newcomers seems wise.
  Jason

 This is what I see when visiting the Ruby page:
 DoS vulnerability in BigDecimal


That's true.  And I never said we want to copy the ruby community :)  In
fact, I'd prefer to not be associated with them given the community's
blatant unprofessionalism and sexism (cf. CouchDB presentation at a
semi-recent ruby conference).  I do think their page has more visual appeal
though.  So other than pointing out the DoS, did you have feedback?

Thanks,
Jason
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Rick R
IMO, causing a segfault in the interpreter is more than just a DOS
vulnerability :)

On Thu, Jul 9, 2009 at 6:11 PM, Derek Elkins derek.a.elk...@gmail.comwrote:

 On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:
 
 
  On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com
 wrote:
 
  By the way, the most valuable pixels, right at the top of the page,
  are wasted on wiki stuff. Compare
  http://www.haskell.org/
  with, for example,
  http://www.ruby-lang.org/
  http://python.org/
 
  The thing I like the most from the ruby page is the top box of content
 where
  it starts describing ruby with a Read more... link adjacent to a code
  snippet.  Because I doubt anyone will agree on *the one* best code
 snippet
  to show people, I think there should/could be a pool of fun snippets and
  loading the page picks one at random.  I have no idea if the wiki engine
  supports this.  I also like the strip of links at the top with things
 like,
  Download, Community, and so on.  Something I think the Haskell page
 does
  much better than the other two, is the listing of events and hackage
  updates.  Both of those sections feel inviting to me.  It makes me
 curious
  and I want to explore.
 
  The python page looks at least as cluttered as the haskell page.  Neither
  the haskell page or the python page have the same look and feel of the
 ruby
  page.  I think the shaded/gradient backgrounds actually add a lot to the
  visual experience.  I also like that the boxes have a different bg color
 for
  the box title and the box contents.  I also like the use of icons on the
  ruby page.  The Download Ruby link/box with the download icon is very
  inviting.  I just want to download it, even if I'm not going to use ruby!
 
  Perhaps we could have a contest similar to the logo contest but for
 homepage
  asthetics redesign.  I think the content on the haskell page is great,
 but
  the visual style of the presentation could be improved considerably.
 
 
  If, like the consensus seems to be, the page should be made more
  friendly to beginners (who are unlikely to want to contribute to the
  wiki right away), then this should be moved elsewhere, or at the very
  least made smaller and less obtrusive.
 
  Optimizing for newcomers seems wise.
  Jason

 This is what I see when visiting the Ruby page:
 DoS vulnerability in BigDecimal
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
The greatest obstacle to discovering the shape of the earth, the
continents, and the oceans was not ignorance but the illusion of knowledge.

- Daniel J. Boorstin
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Derek Elkins
On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:


 On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com wrote:

 By the way, the most valuable pixels, right at the top of the page,
 are wasted on wiki stuff. Compare
 http://www.haskell.org/
 with, for example,
 http://www.ruby-lang.org/
 http://python.org/

 The thing I like the most from the ruby page is the top box of content where
 it starts describing ruby with a Read more... link adjacent to a code
 snippet.  Because I doubt anyone will agree on *the one* best code snippet
 to show people, I think there should/could be a pool of fun snippets and
 loading the page picks one at random.  I have no idea if the wiki engine
 supports this.  I also like the strip of links at the top with things like,
 Download, Community, and so on.  Something I think the Haskell page does
 much better than the other two, is the listing of events and hackage
 updates.  Both of those sections feel inviting to me.  It makes me curious
 and I want to explore.

 The python page looks at least as cluttered as the haskell page.  Neither
 the haskell page or the python page have the same look and feel of the ruby
 page.  I think the shaded/gradient backgrounds actually add a lot to the
 visual experience.  I also like that the boxes have a different bg color for
 the box title and the box contents.  I also like the use of icons on the
 ruby page.  The Download Ruby link/box with the download icon is very
 inviting.  I just want to download it, even if I'm not going to use ruby!

 Perhaps we could have a contest similar to the logo contest but for homepage
 asthetics redesign.  I think the content on the haskell page is great, but
 the visual style of the presentation could be improved considerably.


 If, like the consensus seems to be, the page should be made more
 friendly to beginners (who are unlikely to want to contribute to the
 wiki right away), then this should be moved elsewhere, or at the very
 least made smaller and less obtrusive.

 Optimizing for newcomers seems wise.
 Jason

This is what I see when visiting the Ruby page:
DoS vulnerability in BigDecimal
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Derek Elkins
On Thu, Jul 9, 2009 at 5:17 PM, Jason Dagitda...@codersbase.com wrote:


 On Thu, Jul 9, 2009 at 3:11 PM, Derek Elkins derek.a.elk...@gmail.com
 wrote:

 On Thu, Jul 9, 2009 at 12:31 PM, Jason Dagitda...@codersbase.com wrote:
 
 
  On Thu, Jul 9, 2009 at 10:00 AM, Thomas ten Cate ttenc...@gmail.com
  wrote:
 
  By the way, the most valuable pixels, right at the top of the page,
  are wasted on wiki stuff. Compare
  http://www.haskell.org/
  with, for example,
  http://www.ruby-lang.org/
  http://python.org/
 
  The thing I like the most from the ruby page is the top box of content
  where
  it starts describing ruby with a Read more... link adjacent to a code
  snippet.  Because I doubt anyone will agree on *the one* best code
  snippet
  to show people, I think there should/could be a pool of fun snippets and
  loading the page picks one at random.  I have no idea if the wiki engine
  supports this.  I also like the strip of links at the top with things
  like,
  Download, Community, and so on.  Something I think the Haskell page
  does
  much better than the other two, is the listing of events and hackage
  updates.  Both of those sections feel inviting to me.  It makes me
  curious
  and I want to explore.
 
  The python page looks at least as cluttered as the haskell page.
  Neither
  the haskell page or the python page have the same look and feel of the
  ruby
  page.  I think the shaded/gradient backgrounds actually add a lot to the
  visual experience.  I also like that the boxes have a different bg color
  for
  the box title and the box contents.  I also like the use of icons on the
  ruby page.  The Download Ruby link/box with the download icon is very
  inviting.  I just want to download it, even if I'm not going to use
  ruby!
 
  Perhaps we could have a contest similar to the logo contest but for
  homepage
  asthetics redesign.  I think the content on the haskell page is great,
  but
  the visual style of the presentation could be improved considerably.
 
 
  If, like the consensus seems to be, the page should be made more
  friendly to beginners (who are unlikely to want to contribute to the
  wiki right away), then this should be moved elsewhere, or at the very
  least made smaller and less obtrusive.
 
  Optimizing for newcomers seems wise.
  Jason

 This is what I see when visiting the Ruby page:
 DoS vulnerability in BigDecimal

 That's true.  And I never said we want to copy the ruby community :)  In
 fact, I'd prefer to not be associated with them given the community's
 blatant unprofessionalism and sexism (cf. CouchDB presentation at a
 semi-recent ruby conference).  I do think their page has more visual appeal
 though.  So other than pointing out the DoS, did you have feedback?

I admit it; you caught me.

I'm not a newbie and I don't use the front page terribly often, but I
do like most of the links that are on it.  The Ruby page is certainly
prettier, but the layout of the Haskell page is fine in my opinion;
the difference is mainly eye-candy.  On another topic, I know people
have expressed that they have liked the fact that the entire Haskell
site is a wiki; this expressing openness and community involvement.

I personally don't find the Haskell front page too cluttered and I
think most of issue in that vein could be resolved by simply making
sure the most important/newbie-oriented links are above the fold and
appropriately emphasized/categorized as is partially done already.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell used for data analysis - OLAP?

2009-07-09 Thread Günther Schmidt

Hi,

I've developed this commercial app in Haskell with all of the business  
logic coded in SQL with the help of haskelldb. Some of the intermediate  
results (of queries) I had to manifest in extra tables because the initial  
query was expensive, the intermediate result would be the source data of  
other queries and queries can't themselves be indexed for further  
efficient querying. Since the amount of data could become rather large,  
in-memory processing wasn't an option and I thus chose SQL (Sqlite).


The solution works, but still I'm not quite happy about it, since I  
consider the tables that hold intermediate results fixes.


I understand that the financial industry employs Haskell to analyse large  
data set under complex schemes. I wonder what techniques are employed for  
that, do they use Haskell to create some sort of OLAPish tools? Do they  
use Haskell to run complex queries against SQL data warehouses?


Günther

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Richard O'Keefe

I like the Haskell page the way it is.
The O'Caml web page, is, by comparison,
infuriatingly unhelpful.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] iteratee enumHandle

2009-07-09 Thread Echo Nolan

Hi Paolino.

What's happening is reading [Char] uses the Storable instance for Char 
which is 32-bit. Thus, you get gibberish. The below does what you want, 
by reading Word8s and converting them.


import Control.Exception
import Data.Char
import Data.Iteratee.IO
import Data.Iteratee.Base
import Data.Word
import System.IO

main :: IO ()
main = do
   h - openFile mamma23 ReadWriteMode
   hPutStr h ciao
   hSeek h AbsoluteSeek 0
   l - enumHandle h readString = run
   print $ assert (l == ciao) ()

-- This is declared on its own so I can give a type signature without making
-- any of the above lines unmanageably long.
readString :: IterateeG [] Word8 IO String
readString = joinI $ mapStream (chr . fromIntegral) stream2list

This only works for ASCII, of course. Someone should write some 
enumerators for the other encodings.


Regards,
Echo Nolan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread Jeff Wheeler
On Thu, Jul 9, 2009 at 6:12 PM, Derek Elkinsderek.a.elk...@gmail.com wrote:

 I'm not a newbie and I don't use the front page terribly often, but I
 do like most of the links that are on it.  The Ruby page is certainly
 prettier, but the layout of the Haskell page is fine in my opinion;
 the difference is mainly eye-candy.  On another topic, I know people
 have expressed that they have liked the fact that the entire Haskell
 site is a wiki; this expressing openness and community involvement.

 I personally don't find the Haskell front page too cluttered and I
 think most of issue in that vein could be resolved by simply making
 sure the most important/newbie-oriented links are above the fold and
 appropriately emphasized/categorized as is partially done already.

I strongly feel that the homepage should be made more newbie friendly,
and I think the Ruby page has done this well, disregarding the news
section. I suspect most people who like the Ruby page see the Ruby
is... section as especially effective at introducing the language,
and the random snippet is a simple way to show off a bit of code
before they dive into a tutorial. Furthermore, the Download link is
useful, but since GHC can be complicated (and varies by platform), we
probably want to include pretty well thought-out instructions behind
the link if we include a similar feature. I also quite like the
Participate box on the Ruby page, which is very inviting.

Regarding the current Haskell homepage, I feel the events are given
far too high a place on the homepage. Almost no newbies will be
interested in these, and most experienced users will know of the
events via the mailing lists. The headlines below that deserve
significantly more attention, and perhaps should be updated with
greater frequency (and dated, and have RSS). The updated package list
is fine, I think.

The navigation is a bit tricky, in my opinion. To a beginner (that
doesn't know what GHC is), the two download links may be confusing,
although I suspect most would correctly assume that Download Haskell
was correct option. The Find A Library is a good link, but the
Search that follows it is awkward. There are three large search
choices for beginners: 1) the search at the top, which confusingly has
two submit buttons (with ambiguous differences to a beginner); 2) the
Search link near the top of the navigation (which links to an almost
empty page that might as well be included at the link's location); and
3) the Search link underneath the About header, which doesn't seem to
belong at all.

Jeff Wheeler

(Sorry, sent this to just Derek at first.)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: AC-Vector, AC-Colour and AC-EasyRaster-GTK

2009-07-09 Thread roconnor

Max Rabkin wrote:

On Sat, Jul 4, 2009 at 8:38 PM, Andrew
Coppinandrewcoppin at btinternet.com wrote:


A few reasons:

1. I never knew it existed. ;-)



A good reason. However, it's good to do a quick search over Hackage
before uploading (or before writing) so you know what's out there.

Also, if you hadn't used an AC- prefix, you'd have had a name
collision. Is there a particular reason why you want your name in the
package name rather than just the author field?



I find it amazing that you independently chose to spell colour with a `u'. 
It makes me feel better about my choice.



2. It's mind-blowingly complex.



Colour *is* complex. Which is why I'm so glad Russell O'Connor did all
the hard work for me :)



Well, no, because now I'm going to have to spend a few hours trying to
find out what CIE is before I can even use that library.

I think really it's just aimed at a different problem. It looks like
it's trying to specify actual real-world colours. [It's news to me that
this isn't fundamentally impossible...] I'm only trying to specify
colours on a computer screen. And as we all know, computer screens
aren't calibrated in any way, and the same RGB value looks different on
each display. But then, I'm only trying to write a fractal generator, so
CIE specifications are somewhat overkill here. ;-)


You can use by lib without worrying about the CIE.  You can use my library 
without ever importing or using the word CIE.  However, the CIE stuff is 
there for those who need it.


Perhaps I (maybe with some help) need to make a tutorial on the haskell 
wiki to try to make it less intimidating.



3. It doesn't appear to provide arithmetic over colours.



It provides darken, blend and addition (though addition is called
mappend rather than (+)). signum, abs and fromInteger don't make a
huge amount of sense for colours.



Yeah, I implemented signum and so forth for colours and vectors, but
they're not particularly meaningful... [Insert remark here about
Haskell's numeric class hierachy.]

So mappend gives you colour addition [with the perplexing comments about
gamut, presumably some kind of small mammal?], but there's no
subtraction? No multiplication? No linear blending?


Linear blending is done by the affineCombo function.

I think the darken function will do what you mean by multiplication

Colour subtraction can be done by adding (using mappend) a colour that has 
been darkend by a factor of (-1).  I don't believe there is any demand for 
a colour subtraction fuction, so I don't have a name for it.


I suppose these sorts of questions can be put nicely into a short tutorial 
on the wiki.


4. It's parameterised over the component type; my library is hard-coded 

to

specific types for speed.



My feeling would be to trust the specializer until it lets me down.
Has it let you down in the past?



Heh, my colour library includes a custom floor implementation that talks
to the GHC primops directly because calling floor is too slow...

[In case that sounds like idle talk, I had a program go from 10 seconds
to less than 1 second just by using this function. There's a few tickets
about it on the GHC Trac.]


Certainly speed is an issue that I haven't tackled yet since I don't know 
too much about how to optimized Haskell code.  I was thinking of 
sprinkling in some SPECIALIZE pragmas and maybe adding some RULES to make 
operations more effecient.  For example we could have a rule to rewrite 
floor to some sort of GHC specific fast floor function. (Although that 
rule probably deserves to be in some sort of more general location).


Any help in this direction would be appricated (perferably while keeping 
things as portable as possible).


This all being said, the major problem my code solves is doing blending in 
a linear colour space. This necessarily make converting to non-linear sRGB 
for output much slower. So for people who want speed over proper blending, 
then probably AC-Colour is the package they need to reach for.


Essentially the two packages do fill different niches!


BTW, the EasyRaster package looks useful.



I haven't looked at EasyRaster yet, but I got excited when I saw it 
announced. :)


--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread wren ng thornton

Ignoring the rest of the thread, but jumping in here...


hask...@kudling.de wrote:

For the hompage we're talking about, glancing is even simpler since

everything is on the same page and you can scroll it quite easily.

I don't agree that everything on one page makes comprehension easier.


I'm not sure hiding a level of the hierarchy of information behind a

few clicks make things easier.

That depends on which task we are talking about:
- getting an overview of all available information, or
- finding exactly what you are looking for


I agree with minh thu. For the newcomer to the Haskell community the big 
question is not what is Haskell? but rather I've heard of this 
Haskell thing, how do I get started? and I've tinkered with this 
Haskell thing, where do I get more?


The biggest thing I dislike about the alternative pages mentioned by the 
OP is that they fail in this task. Many of those pages are entirely 
unhelpful on where to go and/or are filled with administrative nonsense 
only the compiler developers would care about. Those that aren't are so 
so polished that there's no content left, or if there is it can't be 
easily discerned from all the other polish (e.g. the Ruby site. *I* know 
the content there is meaningful, but the presentation has a very 
corporate who-gives-a-damn flavor to it which dissuades actually reading 
the page).


Certainly changes could be made (e.g. the verbiage of the description 
paragraph, moving the language choice to the top, minimizing the 
realestate devoted to the top bar, simplifying the many redundant search 
boxes/links,...) but I think by and large the page is very good as a 
portal for new users as well as for experienced community members 
looking for That One Thing Whatsitcalled. Hiding the TOC content behind 
links is a sure way to keep people from finding it and reading it.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread wren ng thornton

Rick R wrote:

As an aside, in the current homepage, the Haskell description is outweighed
by the link menu on the left. IMO the reader's eyes should move from the
title, to the description, then either down or left.  Currently my attention
is split evenly between the link menu and the title/description, which
results in confusion.


This would be (partially) fixed by reducing the whitespace between the 
title and the description. Our eyes are attracted to whitespaces, so 
this is one of the key areas that makes or breaks a design. As it stands 
the description is stranded and has nothing to lead one into it; whereas 
the sidebar is taller, in bold, in highlight color,...


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread wren ng thornton

Don Stewart wrote:

ttencate:

On Thu, Jul 9, 2009 at 18:33, Don Stewartd...@galois.com wrote:

ttencate:

Are there any kind of hard statistics and analytics that we can base
this discussion upon? There is always room for improvement, but
stumbling around in the dark making blind guesses may not be the best
way to go. Although I personally feel that Lenny's proposed page is an
improvement, statistics could tell us what actual people actually use
the site for.

Thanks Don, I should have thought of that. It's a start!


No matter what we decide, I'd like to advocate for maintaining the RSS
feed of Hackage uploads on the front page -- this is what makes the page
seem alive and active, and was introduced in response to John Hughes
complaining the page was always out of date. (Similar to the Arch Linux
package updates: http://www.archlinux.org/)


+1.

I also like the events listing, since community events tend to be one of 
the hardest things to get a single concrete listing of.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Colour tutorial (Was: AC-Vector, AC-Colour and AC-EasyRaster-GTK)

2009-07-09 Thread roconnor

On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:

You can use by lib without worrying about the CIE.  You can use my library 
without ever importing or using the word CIE.  However, the CIE stuff is 
there for those who need it.


Perhaps I (maybe with some help) need to make a tutorial on the haskell wiki 
to try to make it less intimidating.


Okay, I threw together a quick introduction at 
http://www.haskell.org/haskellwiki/Colour.  Any changes, comments, 
corrections, and addtions are welcome.  It's a wiki!


The word CIE does occur at all in the document.

--
Russell O'Connor  http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote, ``is the merest claptrap, for there exists no property in
ideas musical, literary or artistic, except as defined by statute.''
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Leaner Haskell.org frontpage

2009-07-09 Thread wren ng thornton

Jeff Wheeler wrote:

I suspect most people who like the Ruby page see the Ruby
is... section as especially effective at introducing the language,
and the random snippet is a simple way to show off a bit of code
before they dive into a tutorial.


I'll agree that that part is slick.

The rest of it I dislike. In particular the whole right column is 
indicative of link hell where they couldn't just decide on a single way 
to make links: there's the download button which is different (fine), 
there're the first two boxes (also fine), there's the third box which is 
like the first two but has a whole bunch of extraneous text, there's a 
bullet listing of top projects which looks entirely different, there's a 
random RSS link which looks different again, and then it flows into the 
old-posts segment of the main body which is different again, and then we 
get to the footer links which mirror the header (this one is fine), and 
then i18n links are different again and relegated to a footnote (which 
isn't very inviting to non-English natives),...


Whereas haskell.org is much more consistent in picking a single style 
and running with it. There are some things that could be tweaked (why is 
GHC in bold? can we remove the extra leading line between indented link 
groups and their heading link?) but it gives a much more coherent and 
well designed image.


--
Live well,
~wren
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe