[Haskell-cafe] Logo

2009-06-14 Thread Ashley Yakeley
Thomas Davie wrote: We had a lot of "fun" deciding Haskell's new logo, and while I don't agree with the final result, it would be nice if we could now start consistently using it. With that in mind, I realised that the Haskell Platform's logo is totally different, and did a quick mock up of a

[Haskell-cafe] a now abandoned experimental extension to Haskell?

2009-06-14 Thread Vasili I. Galchin
Hello, In some code that I am cabalizing I ran into: type DataLiteral = <<< ref RDFgraph defs >>> type URIReference = <<< ref RDFgraph defs >>> type NonNegativeInteger = <<< ??? >>> What is this? Kind regards, Vasili ___ Haskell-Cafe

Re: [Haskell-cafe] Runtime strictness analysis for polymorphic HOFs?

2009-06-14 Thread Jason Dagit
On Sun, Jun 14, 2009 at 8:18 PM, Eugene Kirpichov wrote: > The idea looks cool, but perfect strictness analysis is not possible, > t.i. the problem of determining whether f _|_ = _|_ is undecidable, > since it is a non-trivial property of f (there exist f's for which it > is true, and ones for whi

Re: [Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Tony Morris
Just guessing. How do you know it's an accident? Richard O'Keefe wrote: > > On 15 Jun 2009, at 4:26 pm, Tony Morris wrote: > >> Prelude Data.List> nub . concat $ [[2, 3], [1, 2], [2, 3, 4], [1, 2, 3]] >> [2,3,1,4] > > In this particular case. But that's a lucky accident.\ > > -- Tony Morris ht

Re: [Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Tony Morris
nub . concat ? Richard O'Keefe wrote: > > On 14 Jun 2009, at 8:06 pm, Fernan Bolando wrote: > >> Hi all >> >> If I have a number of list >> example >> list1 = [2,3] >> list2 = [1,2] >> list3 = [2,3,4] >> list4 = [1,2,3] >> >> I want to create a list from the list above with n elements, >> non-repe

Re: [Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Richard O'Keefe
On 14 Jun 2009, at 8:06 pm, Fernan Bolando wrote: Hi all If I have a number of list example list1 = [2,3] list2 = [1,2] list3 = [2,3,4] list4 = [1,2,3] I want to create a list from the list above with n elements, non-repeating and each elements index represents 1 of the elements from the corr

[Haskell-cafe] Performance of functional priority queues

2009-06-14 Thread Richard O'Keefe
There's a current thread in the Erlang mailing list about priority queues. I'm aware of, for example, the Brodal/Okasaki paper and the David King paper. I'm also aware of James Cook's priority queue package in Hackage, have my own copy of Okasaki's book, and have just spent an hour searching the

Re: [Haskell-cafe] Runtime strictness analysis for polymorphic HOFs?

2009-06-14 Thread Eugene Kirpichov
2009/6/15 Paul Chiusano : > Hello, > I was recently trying to figure out if there was a way, at runtime, to do > better strictness analysis for polymorphic HOFs, for which the strictness of > some arguments might depend on the strictness of the strictness of function > types that are passed as argu

[Haskell-cafe] Re: Wiki user accounts

2009-06-14 Thread Ashley Yakeley
Gwern Branwen wrote: > Presumably Ashley is busy. Yes. Average request rate is about one each day; I tend to do them in a lump about once a week. One solution would be to have Ashley re-enable user registrations. This has been suggested before, but no one knows how bad the spam would be. B

[Haskell-cafe] Re: Wiki user accounts

2009-06-14 Thread Ashley Yakeley
Gwern Branwen wrote: This runs on MediaWiki, right? How about adding a CAPTCHA for account registrations? http://www.mediawiki.org/wiki/Extension:ConfirmEdit See http://haskell.org/haskellwiki/Special:Version ConfirmEdit would require an upgrade. This is the ideal solution. But it requires

Re: [Haskell-cafe] Wiki user accounts

2009-06-14 Thread Gwern Branwen
On Fri, Jun 12, 2009 at 12:46 PM, Gwern Branwen wrote: ... > If I might suggest some users we might give the bit to: myself, dons, > Magnus Therning, Neil Mitchell, and byorgey. All have been editing the > wiki for some time, some have administrator experience on Wikipedia, > and all have commit bi

Re: [Haskell-cafe] Haskell EDSL to generate SQL?

2009-06-14 Thread Marc Weber
On Sat, Apr 04, 2009 at 03:40:56PM +0200, Gü?nther Schmidt wrote: > Hi, > > I tried to solve some large data processing solely in Haskell so I could > avoid lots of eventually very long and complex SQL statements. You won't find something comparable to SQLAlchemy (python ORM mapper) in haskell y

[Haskell-cafe] Runtime strictness analysis for polymorphic HOFs?

2009-06-14 Thread Paul Chiusano
Hello, I was recently trying to figure out if there was a way, at runtime, to do better strictness analysis for polymorphic HOFs, for which the strictness of some arguments might depend on the strictness of the strictness of function types that are passed as arguments [1]. As an example, consider f

[Haskell-cafe] traversal transformations

2009-06-14 Thread Sjoerd Visscher
Hi, While playing with Church Encodings of data structures, I realized there are generalisations in the same way Data.Foldable and Data.Traversable are generalisations of lists. The normal Church Encoding of lists is like this: > newtype List a = L { unL :: forall b. (a -> b -> b) -> b ->

Re: [Haskell-cafe] curious about sum

2009-06-14 Thread Claus Reinke
A much better idea than making sum strict, would simply be to add a sum'. Even better to abstract over strictness, to keep a lid on code duplication? {-# LANGUAGE TypeOperators #-} sum = foldlS ($) (+) 0 sum' = foldlS ($!) (+) 0 -- identity on constructors of t (from a), modulo

Re: Fwd: [Haskell-cafe] curious about sum

2009-06-14 Thread Jochem Berndsen
Alberto G. Corona wrote: > Once more I forgot to send my messages to the haskell cafe list. All the > rest of the list which I´m suscribed to, send the mail replies to the list > automatically, but this doesn´t. Please, can this be changed?. This comes up every so often, but I would be against th

Re: [Haskell-cafe] curious about sum

2009-06-14 Thread Thomas Davie
On 14 Jun 2009, at 12:47, Roman Cheplyaka wrote: * Deniz Dogan [2009-06-13 16:17:57+0200] I remember needing a non-strict sum at least once, but I do not remember the exact application. We may agree that lazy sum is sometimes (rarely) needed, but then it can be always written as fold. How

Fwd: [Haskell-cafe] curious about sum

2009-06-14 Thread Alberto G. Corona
Once more I forgot to send my messages to the haskell cafe list. All the rest of the list which I´m suscribed to, send the mail replies to the list automatically, but this doesn´t. Please, can this be changed?. -- Forwarded message -- From: Alberto G. Corona Date: 2009/6/13 Subje

[Haskell-cafe] slow code

2009-06-14 Thread brian
Haskell Gurus, I have tried to use profiling to tell me what's going on here, but it hasn't helped much, probably because I'm not interpreting the results correctly. Empirically I have determined that the show's are pretty slow, so an alternative to them would be helpful. I replaced the

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Jochem Berndsen
Gjuro Chensen wrote: > startsWithUpper :: String -> Bool > startsWithUpper []= False > startsWithUpper string = > if myIsUpper(head(string)) then True > else False It is very good that you caught the issue of taking the head of an empty list :) I saw here and also below, that you did

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Gjuro Chensen
Gjuro Chensen wrote: > > > /cut > > I dont know everyone will see this, but I would like thank everyone who found time to help, and not spam too much doing it:D. Well, I did it! Its not great (especially comparing to those one line solutions, wow!), but it works. module Main where starts

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-14 Thread Toby Miller
On Jun 14, 2009, at 6:05 AM, Deniz Dogan wrote: 2009/6/14 Gwern Branwen : -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Sat, Jun 13, 2009 at 10:22 PM, Magicloud Magiclouds wrote: Hi, I am learning to use cabal for my code. Just when I start, I met a question, is there an easy way to f

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Jochem Berndsen
Deniz Dogan wrote: > 2009/6/14 Jochem Berndsen : >> Toby Miller wrote: >>> caps1 s = all (\x -> isUpper (head x)) (words s) >> This seems fine, but you need to check that words never returns a list >> containing the empty string (otherwise `head' will fail). > > Is there any such case? I was think

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Deniz Dogan
2009/6/14 Jochem Berndsen : > Toby Miller wrote: >> caps1 s = all (\x -> isUpper (head x)) (words s) > This seems fine, but you need to check that words never returns a list > containing the empty string (otherwise `head' will fail). Is there any such case? I was thinking about that as well, but c

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Andrew Coppin
Toby Miller wrote: Here's what I came up with. I especially like the 2nd version, even though it's longer, as it seems very declarative. caps1 s = all (\x -> isUpper (head x)) (words s) caps2 s = all startsWithUpper (words s) where startsWithUpper w = isUpper (head w) I'm also fairly ne

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Deniz Dogan
2009/6/14 Toby Miller : > Here's what I came up with.  I especially like the 2nd version, even though > it's longer, as it seems very declarative. > > caps1 s = all (\x -> isUpper (head x)) (words s) > > caps2 s = all startsWithUpper (words s) where >    startsWithUpper w = isUpper (head w) > > > I

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Jochem Berndsen
Toby Miller wrote: > Here's what I came up with. I especially like the 2nd version, even > though it's longer, as it seems very declarative. > > caps1 s = all (\x -> isUpper (head x)) (words s) > > caps2 s = all startsWithUpper (words s) where > startsWithUpper w = isUpper (head w) > > > I

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Toby Miller
Here's what I came up with. I especially like the 2nd version, even though it's longer, as it seems very declarative. caps1 s = all (\x -> isUpper (head x)) (words s) caps2 s = all startsWithUpper (words s) where startsWithUpper w = isUpper (head w) I'm also fairly new to Haskell, so I

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Daniel Fischer
Am Sonntag 14 Juni 2009 17:19:22 schrieb Gjuro Chensen: > Hello everyone! > > Im a Haskell newbie, and Ive have few unanswered questions. For someone > more experienced (at least I think so) its a very simple task, but I just > cant get a grip on it and its pretty frustrating. It wouldn't be that b

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Deniz Dogan
2009/6/14 Deniz Dogan : > I'd say take a look at functions "all" [1] and "isUpper" [2], those > should be all you need. Sorry, "words" is also needed for the idea I was thinking of. -- Deniz Dogan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Jochem Berndsen
Gjuro Chensen wrote: > Hello everyone! > > Im a Haskell newbie, and Ive have few unanswered questions. For someone more > experienced (at least I think so) its a very simple task, but I just cant > get a grip on it and its pretty frustrating. It wouldn't be that bad if I > haven't browse thru bun

Re: [Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Deniz Dogan
2009/6/14 Gjuro Chensen : > > Hello everyone! > > Im a Haskell newbie, and Ive have few unanswered questions. For someone more > experienced (at least I think so) its a very simple task, but I just cant > get a grip on it and its pretty frustrating. It wouldn't be that bad if I > haven't browse thr

[Haskell-cafe] Haskell - string to list isusses, and more

2009-06-14 Thread Gjuro Chensen
Hello everyone! Im a Haskell newbie, and Ive have few unanswered questions. For someone more experienced (at least I think so) its a very simple task, but I just cant get a grip on it and its pretty frustrating. It wouldn't be that bad if I haven't browse thru bunch of pages and tutorials and st

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-14 Thread Deniz Dogan
2009/6/14 Gwern Branwen : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Sun, Jun 14, 2009 at 6:05 AM, Deniz Dogan wrote: >> Someone really ought to write a tool for this... > > Well, it's an issue of time. Just building and adding the deps is fast > and straightforward. A tool I'd need

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-14 Thread Gwern Branwen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Sun, Jun 14, 2009 at 6:05 AM, Deniz Dogan wrote: > Someone really ought to write a tool for this... Well, it's an issue of time. Just building and adding the deps is fast and straightforward. A tool I'd need to know about, have installed, and rem

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-14 Thread Krzysztof Skrzętnicki
If your module compiles, you can get the info by passing '-ddump-types': TYPE SIGNATURES numbersTests :: Test testAverage :: Test testBindInt :: Test TYPE CONSTRUCTORS Dependent modules: [(MoresmauJP.Util.Numbers, False)] Dependent packages: [HUnit-1.2.0.3, base, ghc-prim, integer] It

Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds [2009-06-14 18:48:26+0800] > My gtk2hs is install manually, `configure && make && make install`. So It's okay. > when I add gtk to build-dependency, it tells me > Setup.hs: At least the following dependencies are missing: > gtk -any Installation of gtk2hs registers these

Re: [Haskell-cafe] curious about sum

2009-06-14 Thread Roman Cheplyaka
* Deniz Dogan [2009-06-13 16:17:57+0200] > I remember needing a non-strict sum at least once, but I do not > remember the exact application. We may agree that lazy sum is sometimes (rarely) needed, but then it can be always written as fold. However, in most cases user wants strict sum. So it's n

Re: [Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Roman Cheplyaka
* Magicloud Magiclouds [2009-06-14 17:30:33+0800] > Hi, > I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by > cabal, but my program needs it, and I want my program cabalized. So > how to do this? > Thanks. gtk2hs consists of several cabal packages, e.g. gtk, glib and so on.

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-14 Thread Claus Reinke
I am learning to use cabal for my code. Just when I start, I met a question, is there an easy way to find out what packages my code depends? If you've managed to get your code to compile, ghc --show-iface Main.hi is perhaps the easiest way (ghc --make and ghci will also report package de

[Haskell-cafe] Running Hoogle as a cgi script.

2009-06-14 Thread Erik de Castro Lopo
Hi all, I'd like to run my own version of Hoogle: http://hackage.haskell.org/package/hoogle as a CGI script much like this: http://www.haskell.org/hoogle/ but there doesn't seem to be any documentation on how to do this. Clues anyone? Cheers, Erik -- ---

Re: [Haskell-cafe] How to know the build dependencies?

2009-06-14 Thread Deniz Dogan
2009/6/14 Gwern Branwen : > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Sat, Jun 13, 2009 at 10:22 PM, Magicloud Magiclouds wrote: >> Hi, >>  I am learning to use cabal for my code. >>  Just when I start, I met a question, is there an easy way to find >> out what packages my code depen

[Haskell-cafe] Re: Logo fun

2009-06-14 Thread Tim Attwood
Graphics are fun. Here's my version. http://s201.photobucket.com/albums/aa280/Zakardis/?action=view¤t=lambda_haskell_platform.png ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [cabal] How to deal with build-depency that not under cabal's control?

2009-06-14 Thread Magicloud Magiclouds
Hi, I use gtk2hs in linux. Well, I have no idea how to install gtk2hs by cabal, but my program needs it, and I want my program cabalized. So how to do this? Thanks. -- 竹密岂妨流水过 山高哪阻野云飞 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.ha

Re: [Haskell-cafe] install problems ...

2009-06-14 Thread Vasili I. Galchin
BTW is "TimeDate" a Hugism? Vasili On Sun, Jun 14, 2009 at 3:58 AM, Vasili I. Galchin wrote: > Hi Duncan, > > Actually it was do to a typo on an "Executable" > > I specified "N3Parser" where I meant "N3ParserTest" => DUH . I am > totally ashamed . > > Vasili > > > On Sun, Jun 14, 2

Re: [Haskell-cafe] install problems ...

2009-06-14 Thread Vasili I. Galchin
Hi Duncan, Actually it was do to a typo on an "Executable" I specified "N3Parser" where I meant "N3ParserTest" => DUH . I am totally ashamed . Vasili On Sun, Jun 14, 2009 at 3:31 AM, Duncan Coutts wrote: > On Thu, 2009-06-11 at 23:50 -0500, Vasili I. Galchin wrote: > > Hello, > >

Re: [Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Miguel Mitrofanov
ghci> map reverse $ foldM (\answer list -> [x:answer | x <- list, not $ x `elem` answer]) [] [[2,3], [1,2], [2,3,4], [1,2,3]] [[2,1,4,3],[3,1,4,2],[3,2,4,1]] On 14 Jun 2009, at 12:06, Fernan Bolando wrote: Hi all If I have a number of list example list1 = [2,3] list2 = [1,2] list3 = [2,3,4]

Re: [Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Fernan Bolando
On Sun, Jun 14, 2009 at 4:13 PM, Erik de Castro Lopo wrote: > Fernan Bolando wrote: > >> Hi all >> >> If I have a number of list >> example >> list1 = [2,3] >> list2 = [1,2] >> list3 = [2,3,4] >> list4 = [1,2,3] >> >> I want to create a list from the list above with n elements, >> non-repeating and

Re: [Haskell-cafe] install problems ...

2009-06-14 Thread Duncan Coutts
On Thu, 2009-06-11 at 23:50 -0500, Vasili I. Galchin wrote: > Hello, > > As I have said before I a, "cabalizing" Swish (a semantic web > toolkit). I have it built and have run most of the original author's > tests by and they pass. There are numerous warnings which seem to be > either lack of a

Re: [Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Erik de Castro Lopo
Fernan Bolando wrote: > Hi all > > If I have a number of list > example > list1 = [2,3] > list2 = [1,2] > list3 = [2,3,4] > list4 = [1,2,3] > > I want to create a list from the list above with n elements, > non-repeating and each elements index represents 1 of the elements > from the correspondi

[Haskell-cafe] I need a hint in list processing

2009-06-14 Thread Fernan Bolando
Hi all If I have a number of list example list1 = [2,3] list2 = [1,2] list3 = [2,3,4] list4 = [1,2,3] I want to create a list from the list above with n elements, non-repeating and each elements index represents 1 of the elements from the corresponding list so for the above input I would get. a