Re: [Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-22 Thread david48
On Wed, Jul 22, 2009 at 4:40 AM, Trent W. Buckt...@cybersource.com.au wrote: Later, when that user has developed VCS habits and is trusted to work on larger group projects, I can introduce the additional complexity of in- repo branching without overwhelming him. I went from nothing to using

Re: [Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-22 Thread Dmitri Sosnik
Ha, try branching and merging in SVN (it worse in CVS) :-) Git got beautiful branching. On 22/07/2009, at 4:46 PM, david48 wrote: On Wed, Jul 22, 2009 at 4:40 AM, Trent W. Buckt...@cybersource.com.au wrote: Later, when that user has developed VCS habits and is trusted to work on larger

Re: [Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-22 Thread Magnus Therning
On Wed, Jul 22, 2009 at 7:46 AM, david48dav.vire+hask...@gmail.com wrote: On Wed, Jul 22, 2009 at 4:40 AM, Trent W. Buckt...@cybersource.com.au wrote: Later, when that user has developed VCS habits and is trusted to work on larger group projects, I can introduce the additional complexity of

[Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread Chris Kuklewicz
Nathan Bloomfield wrote: Hello haskell-cafe; I'm fiddling with this http://cdsmith.wordpress.com/2009/07/20/calculating-multiplicative-inverses-in-modular-arithmetic/ blog post about inverting elements of Z/(p), trying to write the inversion function in pointfree style. This led me to try

[Haskell-cafe] Re: Implicit concatenation in list comprehensions

2009-07-22 Thread Jon Fairbairn
Bulat Ziganshin bulat.zigans...@gmail.com writes: Hello Neil, Tuesday, July 21, 2009, 1:26:55 PM, you wrote:  ++ [ -i      | not (null (ghcOptSearchPath opts)) ]  ++ [ -i, dir | dir - ghcOptSearchPath opts ] Following the discussions, I now support this extension too - I keep seeing more

Re: [Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread Thomas ten Cate
There are two ways of looking at the mod operator (on integers): 1. As a map from the integers Z to Z/pZ. Then n mod p is defined as: n mod p = { k | k in Z, k = n + ip for some i in Z } Instead of the set, we ususally write its smallest nonnegative element. And yes, in that sense, Z/0Z gives: n

Re: [Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-22 Thread david48
On Wed, Jul 22, 2009 at 9:41 AM, Magnus Therningmag...@therning.org wrote: On Wed, Jul 22, 2009 at 7:46 AM, david48dav.vire+hask...@gmail.com wrote: I went from nothing to using git, and I sincerely don't know what's overwhelming about repo branching. You just need to work with more

[Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Marc Weber
I know about module Foo ( exportedFuncA, ExportedType(..) ) where exportedFuncA :: .. exportedFuncA = .. data ExportedType = ExportedType It's great that you can only export a subset of all functions defined in a module. However this kind of declaration causes some work when

[Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-22 Thread Petr Rockai
Hi, Grant Husbands darcsus...@grant.x43.net writes: 1. When you unpull old patches or reorder patches, Darcs alters existing patch files. This will break other branches that share the same files. Not true, since the filenames are fully determined by the file content. Hashed repositories will

Re: [Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Bulat Ziganshin
Hello Marc, Wednesday, July 22, 2009, 4:28:49 PM, you wrote: So does it make sense to add this information using pragmas? pragmas shouldn't change program behavior or alter whether program may be compiled of course, LANGUAGE pragmas violate this law, but is considered as bug in Haskell

Re: [Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Thomas Davie
On 22 Jul 2009, at 14:53, Bulat Ziganshin wrote: Hello Marc, Wednesday, July 22, 2009, 4:28:49 PM, you wrote: So does it make sense to add this information using pragmas? pragmas shouldn't change program behavior or alter whether program may be compiled of course, LANGUAGE pragmas

Re[2]: [Haskell-cafe] what about adding a HIDE pragma ?

2009-07-22 Thread Bulat Ziganshin
Hello Thomas, Wednesday, July 22, 2009, 5:08:15 PM, you wrote: Why shouldn't they? I'm not particularly in support of this idea -- it makes it less clear what is being exported by the module, but I don't get your reasoning. pragmas supposed to be some hints to compiler helping it to

Re: [Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread Kalman Noel
Thomas ten Cate schrieb: There are two ways of looking at the mod operator (on integers): 1. As a map from the integers Z to Z/pZ. [...] 2. As the remainder under division by p. Since n mod 0 would be the remainder under division by 0, this correctly gives a division by zero error. I

Re: [Haskell-cafe] Re: Implicit concatenation in list comprehensions

2009-07-22 Thread Lanny Ripple
Speaking as a perl programmer I find that a bit insulting. We do see how awful some of it is. perl4-perl5-perl6 have been as much about cleanup as adding functionality. And I would have thought this forum would have been more aware that after Audrey built the first perl6 interpreter basically

[Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Matthias Görgens
I need to take some elements from the front of a list.  However the criteria are somewhat complex. walk f [] = [] walk f (x:xs) = case f x of Just g - x : walk g xs Nothing - [] For each item the `predicate' f either returns Nothing, when it thinks we

[Haskell-cafe] Re: [darcs-users] cheap in-repo local branches (just needs implementation)

2009-07-22 Thread Eric Kow
On Wed, Jul 22, 2009 at 16:48:39 +0100, Grant Husbands wrote: Overall, I'd say this just feeds back into my original point, though; I fully expected that many points could be answered, and I think I can raise more, given a bit of thought. (I won't unless I'm asked to, though, as I'm trying to

[Haskell-cafe] Re: cheap in-repo local branches (just needs implementation)

2009-07-22 Thread Petr Rockai
Grant Husbands darcsus...@grant.x43.net writes: The original note that I should have quoted was from Max Battcher: : Additionally, there would be other useful management tools : (``darcs-branch list``, ``darcs-branch remove`` (or unfreeze)). I think : that these four commands could be done

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Felipe Lessa
On Wed, Jul 22, 2009 at 06:00:38PM +0200, Matthias Görgens wrote: ] I need to take some elements from the front of a list.  However the ] criteria are somewhat complex. ] ] walk f [] = [] ] walk f (x:xs) = case f x ] of Just g - x : walk g xs ] Nothing - [] ]

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Jason Dagit
2009/7/22 Matthias Görgens matthias.goerg...@googlemail.com I need to take some elements from the front of a list. However the criteria are somewhat complex. walk f [] = [] walk f (x:xs) = case f x of Just g - x : walk g xs Nothing - [] For each

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Matthias Görgens
Thanks to Jason and Felipe. I'll try that approach. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Anton van Straaten
Felipe Lessa wrote: On Wed, Jul 22, 2009 at 06:00:38PM +0200, Matthias Görgens wrote: ] I need to take some elements from the front of a list. However the ] criteria are somewhat complex. ] ] walk f [] = [] ] walk f (x:xs) = case f x ] of Just g - x : walk g xs ]

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Aycan iRiCAN
Matthias Görgens matthias.goerg...@googlemail.com writes: Thanks to Jason and Felipe. I'll try that approach. http://www.nabble.com/There%27s-nothing-wrong-with-infinite-types!-td7713737.html Which explains the problem. -- aycan ___ Haskell-Cafe

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Thomas Hartman
What is the use case(s) for this function? lements from the front of a list.  However the criteria are somewhat complex. walk f [] = [] walk f (x:xs) = case f x                 of Just g - x : walk g xs                    Nothing - [] For each item the `predicate' f either returns

[Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread gladstein
Is the utility of having (n `mod` 0) return a value greater than the confusion it will engender? In the 99.99% case it's an error. You wouldn't want (n `div` 0) to return 0, I expect.If we want these number-theoretic mod and div operations let's please put them in a separate module.

[Haskell-cafe] Re: Implicit concatenation in list comprehensions

2009-07-22 Thread Simon Michael
It was the perl community that brought me to haskell - by their interesting choice of implementation language for Pugs - and I'm grateful to them for this among other things! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Implicit concatenation in list comprehensions

2009-07-22 Thread Bulat Ziganshin
Hello Simon, Wednesday, July 22, 2009, 11:47:17 PM, you wrote: It was the perl community that brought me to haskell - by their interesting choice of implementation language for Pugs - for me, Pugs development tale is Beast and Beauty of programming world :) -- Best regards, Bulat

[Haskell-cafe] ANN: Semantic Web

2009-07-22 Thread Vasili I. Galchin
I. Swish-0.2.1(Semantic Web Inference uSing Haskell) is a semantic web toolkit designed and implemented by Graham Klyne - g...@ninebynine.org: 1) http://www.ninebynine.org/RDFNotes/Swish/Intro.html 2) http://www.ninebynine.org/Software/swish-0.2.1.html I am personally very excited

Re: [Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread Jeff Wheeler
On Wed, Jul 22, 2009 at 1:34 PM, gladst...@gladstein.com wrote: Is the utility of having (n `mod` 0) return a value greater than the confusion it will engender? In the 99.99% case it's an error. You wouldn't want (n `div` 0) to return 0, I expect. If we want these number-theoretic mod and

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Matthias Görgens
What is the use case(s) for this function? I often want to take one more element than takeWhile does, or only start checking the predicate after taking the first element for sure. Or both. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: Simple quirk in behavior of `mod`

2009-07-22 Thread Matthias Görgens
Couldn't the same be said for round-to-even, instead of rounding down like every other language? I doubt any beginners have ever expected it, but it's probably better. What do you mean with round-to-even? For rounding down there's floor. ___

Re: [Haskell-cafe] Generalizing takeWhile

2009-07-22 Thread Felipe Lessa
On Thu, Jul 23, 2009 at 07:28:55AM +0200, Matthias Görgens wrote: ] I often want to take one more element than takeWhile does, or only takeWhileMore n p x | p x = Just . F $ takeWhileMore n p | otherwise = Just . F $ takeN n ] start checking the predicate after taking

Re: [Haskell-cafe] ANN: Semantic Web

2009-07-22 Thread Graham Klyne
I'd like to thank Vasili for resurrecting this project, which I thought had all-but-died for lack of nurture (the day job, etc.). It's really nice to know that, when (I hope!) the day comes that I want to pick up my Haskell work again, it won't have completely been left behind by the many