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 .

[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

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

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

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

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

[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

[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

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.

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

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

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

[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

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 (\ (_ ::

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

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,

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/

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/

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 :: *

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

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

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

[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 -

[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/

[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))

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

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:

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

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

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

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

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

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

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

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

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,

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

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

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

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

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

[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'

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

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

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

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

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

[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

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

[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

[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,

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

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

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

[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

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