[Haskell-cafe] Haskell Implementors Workshop talk proposals due this Friday!

2011-07-19 Thread Ben Lippmeier
Call for Talks ACM SIGPLAN Haskell Implementors' Workshop http://haskell.org/haskellwiki/HaskellImplementorsWorkshop/2011 Tokyo, Japan, September 23rd, 2011 The workshop will be held in conjunction with ICFP 2011 http://www

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread David Barbour
On Tue, Jul 19, 2011 at 11:14 PM, yi huang wrote: > 2011/7/20 Eugene Kirpichov > >> reallyUnsafePointerEq#, and it really is as unsafe as it sounds :) >> >> Why is it so unsafe? i can't find any documentation on it. > I think always compare pointer first is a good optimization. > Any number of

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread Levent Erkok
> Is there any way of getting the following code to immediately return > True without performing the element-by-element comparison? Essentially > this boils down to checking whether pointers are equal before > comparing the contents. > >> main = print $ f == f >> where f = [1..10^9] Nikhil,

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread Carl Howells
On Tue, Jul 19, 2011 at 11:14 PM, yi huang wrote: > 2011/7/20 Eugene Kirpichov >> >> reallyUnsafePointerEq#, and it really is as unsafe as it sounds :) >> > Why is it so unsafe? i can't find any documentation on it. > I think always compare pointer first is a good optimization. False positives a

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread yi huang
2011/7/20 Eugene Kirpichov > reallyUnsafePointerEq#, and it really is as unsafe as it sounds :) > > Why is it so unsafe? i can't find any documentation on it. I think always compare pointer first is a good optimization. > > > 20.07.2011, в 7:51, "Nikhil A. Patil" написал(а): > > > Hi, > > > >

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread Eugene Kirpichov
reallyUnsafePointerEq#, and it really is as unsafe as it sounds :) 20.07.2011, в 7:51, "Nikhil A. Patil" написал(а): > Hi, > > Is there any way of getting the following code to immediately return > True without performing the element-by-element comparison? Essentially > this boils down to che

Re: [Haskell-cafe] pointer equality

2011-07-19 Thread Brandon Allbery
On Tue, Jul 19, 2011 at 23:51, Nikhil A. Patil wrote: > Is there any way of getting the following code to immediately return > True without performing the element-by-element comparison? Essentially > this boils down to checking whether pointers are equal before > comparing the contents. > Let's p

[Haskell-cafe] pointer equality

2011-07-19 Thread Nikhil A. Patil
Hi, Is there any way of getting the following code to immediately return True without performing the element-by-element comparison? Essentially this boils down to checking whether pointers are equal before comparing the contents. > main = print $ f == f > where f = [1..10^9] Thanks!! nikhil

Re: [Haskell-cafe] question regarding the $ apply operator

2011-07-19 Thread Richard O'Keefe
Polish notation was indeed published in 1920. However, it relies on knowing the arity of each symbol. Put another way, it relies on symbols *having* definite arities. Thus if f has 2 arguments, it has 2, not 1. This does not suit languages like Haskell at all well. Worse, as usually presented,

Re: [Haskell-cafe] derive + quickCheck

2011-07-19 Thread Ivan Lazar Miljenovic
On 19 July 2011 21:23, bob zhang wrote: > Hi, >   thank you . >   I read your souce, I found the depth is only 2, right? >  like data A = [A]|String, any easy way to control the maximum_depth of > generated data? You could always use an Int parameter instead of a Bool and have it count down to 0,

Re: [Haskell-cafe] derive + quickCheck

2011-07-19 Thread bob zhang
Hi, thank you . I read your souce, I found the depth is only 2, right? like data A = [A]|String, any easy way to control the maximum_depth of generated data? Regards,bob 于 11-7-17 下午8:13, Ivan Lazar Miljenovic 写道: On 17 July 2011 23:42, bob zhang wrote: Hi, all, I found derive + quic

Re: [Haskell-cafe] question regarding the $ apply operator

2011-07-19 Thread Brent Yorgey
On Mon, Jul 18, 2011 at 11:52:15PM -0700, Ting Lei wrote: > > Thanks, Brandon, > > That's a very clear explanation. I remembered that it's low, but forgot that > it's this low. > Maybe it's because of my mis-understanding that in C, infix operators have > lower precedence. > > Just curious, th

Re: [Haskell-cafe] Haskell fgl example

2011-07-19 Thread Eugene Kirpichov
I've got a small example here https://github.com/jkff/minxmod/blob/master/Buchi.hs . 2011/7/19 Rohit Agrawalla : > I am new to haskell and the haskell fgl (functional graph library). l am > looking for some examples of the haskell fgl. Would appreciate any pointers > regarding the same. > > > -- >

[Haskell-cafe] Haskell fgl example

2011-07-19 Thread Rohit Agrawalla
I am new to haskell and the haskell fgl (functional graph library). l am looking for some examples of the haskell fgl. Would appreciate any pointers regarding the same. -- Rohit ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.o

[Haskell-cafe] Ur tutorial, and a challenge

2011-07-19 Thread Adam Chlipala
Last week, I posted a message to this list looking for people interested in joining projects using my domain-specific language Ur/Web. Some responses rightly chastised me for the lack of documentation on the core Ur language's novel type system features. I'm sure many Haskellers have had the

Re: [Haskell-cafe] question regarding the $ apply operator

2011-07-19 Thread Ivan Lazar Miljenovic
On 19 July 2011 09:51, Maciej Marcin Piechotka wrote: > On Tue, 2011-07-19 at 07:11 +, Ivan Lazar Miljenovic wrote: >> The only thing that I can think of that matches this is Reverse Polish >> Notation, and according to Wikipedia was about 90 years ago, not >> hundreds ;-) >> > > I may be wron

Re: [Haskell-cafe] question regarding the $ apply operator

2011-07-19 Thread Maciej Marcin Piechotka
On Tue, 2011-07-19 at 07:11 +, Ivan Lazar Miljenovic wrote: > On 19 July 2011 06:52, Ting Lei wrote: > > > > I read somewhere that people a couple of hundreds of years ago can manage to > > express things using ($)-like notation without any parenthesis at all. > > The only thing that I can th

Re: [Haskell-cafe] partial inheritance

2011-07-19 Thread Maciej Piechotka
On Tue, 2011-07-19 at 10:43 +0200, Yves Parès wrote: > > I haven't followed the thread carefully but why does the bird have > to be a penguin? > > A bird doesn't have to be a penguin : > > instance (Penguin b) => Bird b where > fly = -- fly method for penguins > > Says that every Penguin is

Re: [Haskell-cafe] Parsing cabal files to calculate average number of dependencies

2011-07-19 Thread Henning Thielemann
On 02.07.2011 01:26, Gwern Branwen wrote: Another thing you can do along the same lines is generate a script to download all the repos from packages which declare repos. Some ugly code: If 'script' also includes Haskell code, then the 'tar' package could be of help to walk throught the TAR ar

Re: [Haskell-cafe] ANN: cabal-dev 0.8

2011-07-19 Thread Herbert Valerio Riedel
On Tue, 2011-07-19 at 10:33 +0200, Gregory Collins wrote: > Particular tips from our configuration: > > * Jenkins is a Java project, and hence gobbles RAM. My VPS couldn't > handle it, so I run it over a VPN tunnel to a machine sitting in my > living room. > > * If you set up test-framework t

Re: [Haskell-cafe] partial inheritance

2011-07-19 Thread Yves Parès
> I haven't followed the thread carefully but why does the bird have to be a penguin? A bird doesn't have to be a penguin : *instance* (Penguin b) => Bird b where fly = -- fly method for penguins Says that every Penguin is a Bird. But thinking back about it, there is a problem when trying t

Re: [Haskell-cafe] ANN: cabal-dev 0.8

2011-07-19 Thread Gregory Collins
On Tue, Jul 19, 2011 at 10:10 AM, Herbert Valerio Riedel wrote: > On Mon, 2011-07-18 at 15:29 -0700, Bryan O'Sullivan wrote: > >> Wonderful! This is absolutely one of those indispensable tools for >> build automation and sanity preservation. I use cabal-dev to manage >> the builds for all of my Ha

Re: [Haskell-cafe] ANN: cabal-dev 0.8

2011-07-19 Thread Herbert Valerio Riedel
On Mon, 2011-07-18 at 15:29 -0700, Bryan O'Sullivan wrote: > Wonderful! This is absolutely one of those indispensable tools for > build automation and sanity preservation. I use cabal-dev to manage > the builds for all of my Haskell projects, under many different > configurations: https://jenkins.

Re: [Haskell-cafe] partial inheritance

2011-07-19 Thread Malcolm Wallace
On 19/07/2011, at 0:09, Patrick Browne wrote: > instance Bird Emperor where > -- No fly method > walk x y = y > > instance Penguin Emperor where > -- How can I override the walk method in the instance Penguin? > -- walk x y = x Why would you want to override the walk method for Emperor?

Re: [Haskell-cafe] I confused myself with generics, and now I confused ghc too

2011-07-19 Thread José Pedro Magalhães
Hi Ari, I won't really try to answer your question, but I'll give you the code for gzipWithQ written by Alexey Rodriguez Yakushev some years ago for his comparison on generic programming libraries. The original darcs repo no longer exists, but here is the file which I think is relevant for you: >

Re: [Haskell-cafe] question regarding the $ apply operator

2011-07-19 Thread Ivan Lazar Miljenovic
On 19 July 2011 06:52, Ting Lei wrote: > > I read somewhere that people a couple of hundreds of years ago can manage to > express things using ($)-like notation without any parenthesis at all. The only thing that I can think of that matches this is Reverse Polish Notation, and according to Wikipe

Re: [Haskell-cafe] question regarding the $ apply operator

2011-07-19 Thread Arlen Cuss
> Just curious, the following is not allowed in Haskell either for the > same reason. > > applySkip i f ls = (take i) ls ++ $ f $ drop i ls This doesn't work for a slightly different reason; you can't use the infix operators beside each other ("++ $"), but if you could, it'd work! __