[Haskell-cafe] ANN: unification-fd 0.7.0

2012-03-19 Thread wren ng thornton
-- unification-fd 0.7.0 The unification-fd package offers generic functions for single-sorted first-order structural unification (think of programming in Prolog, or of the metavariables in type

Re: [Haskell-cafe] ANN: Haskell Platform Versions Comparison Chart

2012-03-19 Thread Simon Hengel
This includes both, packages that come with ghc and platform packages. Source is on GitHub[1]. Nice. Any chance you could get the packages sorted alphabetically so that it's easier to look things up directly? Sure, now they are sorted alphabetically (case-insensitive). Before it was more

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Stephen Tetley
Hi Damien A translator might be a lot of work. Matthew Naylor had a translator between Haskell and Clean [1], which performed well according to [2]. The translator was his Master project in the UK so I think that means it would represent approximately a years work. [1]

Re: [Haskell-cafe] ANN: Haskell Platform Versions Comparison Chart

2012-03-19 Thread Joachim Breitner
Hi, Am Sonntag, den 18.03.2012, 10:08 +0100 schrieb Simon Hengel: I compiled a chart that gives a side-by-side comparison of package versions in various Haskell Platform releases. http://sol.github.com/haskell-platform-versions-comparison-chart/ This includes both, packages that come

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-03-19 Thread Gregory Collins
A lock-free concurrent queue alone would be worth a summer project IMO. G On Mon, Mar 19, 2012 at 3:25 AM, Florian Hartwig florian.j.hart...@gmail.com wrote: On 19 March 2012 00:59, Chris Smith cdsm...@gmail.com wrote: On Mar 18, 2012 6:39 PM, Florian Hartwig florian.j.hart...@gmail.com

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-03-19 Thread Florian Hartwig
On 19 March 2012 09:56, Gregory Collins g...@gregorycollins.net wrote: A lock-free concurrent queue alone would be worth a summer project IMO. G Ryan Newton is already doing that (https://github.com/rrnewton/haskell-lockfree-queue). ___ Haskell-Cafe

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-03-19 Thread Ryan Newton
The MichaelScott lockefree queues in that repository pass tests and should work. Additional stress testing and feedback would be appreciated. There are some other queues in the literature that might be worth implementing but I think other data structures are higher priority. As Adam Foltzer

[Haskell-cafe] Google Summer of Code 2012

2012-03-19 Thread Edward Kmett
It is that time of year again; the Google Summer of Code is upon us! If you are a student and want to sign up to make $5,000 for hacking on the code you love over the summer or are willing to help out as a mentor, now is the time to act. Please sign up by adding your name to the list at:

[Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread sdiyazg
By arithmetic I mean the everyday arithmetic operations used in engineering. In signal processing for example, we write a lot of expressions like f(t)=g(t)+h(t)+g'(t) or f(t)=g(t)*h(t). I feel it would be very natural to have in haskell something like g::Float-Float --define g here

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Felipe Almeida Lessa
import Control.Applicative f, g :: Float - Float f x = x + 1 g x = 2 * x h = (+) $ f * g Cheers, =) -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Chris Smith
If you are willing to depend on a recent version of base where Num is no longer a subclass of Eq and Show, it is also fine to do this: instance Num a = Num (r - a) where (f + g) x = f x + g x fromInteger = const . fromInteger and so on. ___

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Ozgur Akgun
Hi, If you are feeling adventurous enough, you can define a num instance for functions: {-# LANGUAGE FlexibleInstances #-} instance Num a = Num (a - a) where f + g = \ x - f x + g x f - g = \ x - f x - g x f * g = \ x - f x * g x abs f = abs . f signum f = signum . f

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread David Thomas
The 17 at the end should be 12, or the 2 passed into (f+g+2) should be 3. On Mon, Mar 19, 2012 at 10:38 AM, Ozgur Akgun ozgurak...@gmail.com wrote: Hi, If you are feeling adventurous enough, you can define a num instance for functions: {-# LANGUAGE FlexibleInstances #-} instance Num a =

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Ozgur Akgun
On 19 March 2012 17:43, David Thomas davidleotho...@gmail.com wrote: The 17 at the end should be 12, or the 2 passed into (f+g+2) should be 3. It was the latter :) Copy/paste error, sorry. Ozgur ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Chris Smith
On Mar 19, 2012 11:40 AM, Ozgur Akgun ozgurak...@gmail.com wrote: {-# LANGUAGE FlexibleInstances #-} instance Num a = Num (a - a) where You don't want (a - a) there. You want (b - a). There is nothing about this that requires functions to come from a numeric type, much less the same one. --

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Ozgur Akgun
Hi Chris, On 19 March 2012 17:58, Chris Smith cdsm...@gmail.com wrote: On Mar 19, 2012 11:40 AM, Ozgur Akgun ozgurak...@gmail.com wrote: {-# LANGUAGE FlexibleInstances #-} instance Num a = Num (a - a) where You don't want (a - a) there. You want (b - a). There is nothing about this

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Damien Desfontaines
2012/3/19 Richard O'Keefe o...@cs.otago.ac.nz On 19/03/2012, at 8:01 AM, Damien Desfontaines wrote: The project I suggest is mainly inspired by Ticket #1555 [1] : I think that would be a great idea to make it possible to call some Haskell code into OCamL. In particular, this would

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Chris Smith
Damien Desfontaines ddfontai...@gmail.com wrote: Thanks for your answer. I must admit that I do not really realize how much work such a project represents. I will probably need the help of someone who is more experienced than me to decide my timeline, and perhaps to restrict the final goal

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Brandon Allbery
On Mon, Mar 19, 2012 at 17:06, Chris Smith cdsm...@gmail.com wrote: One possible way out of this trap would be if, perhaps, the variant of Haskell you picked were actually GHC's core language. That could (...) It still seems far too ambitious for GSoC, though. And I remain unconvinced how

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Richard O'Keefe
One problem with hooking functions into the Haskell numeric classes is right at the beginning: class (Eq a, Show a) = Num a where (+) (-) (*) negate abs signum fromInteger where functions are for good reason not members of Eq or Show. Look at

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Chris Smith
On Mon, Mar 19, 2012 at 7:16 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: One problem with hooking functions into the Haskell numeric classes is right at the beginning:    class (Eq a, Show a) = Num a This is true in base 4.4, but is no longer true in base 4.5. Hence my earlier comment

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Jerzy Karczmarczuk
Richard O'Keefe: class (Eq a, Show a) = Num a where (+) (-) (*) negate abs signum fromInteger where functions are for good reason not members of Eq or Show. This is an old song, changed several times. I have no intention to discuss, but please, Richard O'Keefe: WHICH *GOOD*

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Richard O'Keefe
On scoping the project: be clear about the actual goal. If you want to take existing Haskell libraries and use them in OCaml, then you pretty much have to deal with the full language. You should start by using as much as you can of an existing compiler, or by getting an unmodified compiler to

Re: [Haskell-cafe] Google Summer of Code - Lock-free data structures

2012-03-19 Thread Florian Hartwig
On 19 March 2012 11:46, Ryan Newton rrnew...@gmail.com wrote: As Adam Foltzer mentioned in the trac ticket a really good structure would be the concurrent bags from this paper:    http://www.cse.chalmers.se/~tsigas/papers/Lock%20Free%20Bag%20SPAA11.pdf We separately did a C implementation of

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Ivan Lazar Miljenovic
On 20 March 2012 12:27, Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: Richard O'Keefe: class (Eq a, Show a) = Num a where (+) (-) (*) negate abs signum fromInteger where functions are for good reason not members of Eq or Show. This is an old song, changed several times.

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Richard O'Keefe
On 20/03/2012, at 2:21 PM, Chris Smith wrote: On Mon, Mar 19, 2012 at 7:16 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: One problem with hooking functions into the Haskell numeric classes is right at the beginning: class (Eq a, Show a) = Num a This is true in base 4.4, but is no

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Richard O'Keefe
On 20/03/2012, at 2:27 PM, Jerzy Karczmarczuk wrote: Richard O'Keefe: class (Eq a, Show a) = Num a where (+) (-) (*) negate abs signum fromInteger where functions are for good reason not members of Eq or Show. This is an old song, changed several times. I have no intention to

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread Thomas Schilling
I don't understand this discussion. He explicitly said If you are willing to depend on a recent version of base. More precisely, he meant GHC 7.4 which includes the latest version of base. Yes, this is incompatible with the Haskell2010 standard, but it did go through the library submission

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Chris Smith
On Mon, Mar 19, 2012 at 7:52 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: As just one example, a recent thread concerned implementing lock-free containers.  I don't expect converting one of those to OCaml to be easy... If you translate to core first, then the only missing bit is the atomic

Re: [Haskell-cafe] Are there arithmetic composition of functions?

2012-03-19 Thread wren ng thornton
On 3/19/12 12:57 PM, sdiy...@sjtu.edu.cn wrote: By arithmetic I mean the everyday arithmetic operations used in engineering. In signal processing for example, we write a lot of expressions like f(t)=g(t)+h(t)+g'(t) or f(t)=g(t)*h(t). I feel it would be very natural to have in haskell something

Re: [Haskell-cafe] Google Summer of Code idea of project application

2012-03-19 Thread Jason Dagit
On Mon, Mar 19, 2012 at 9:12 PM, Chris Smith cdsm...@gmail.com wrote: On Mon, Mar 19, 2012 at 7:52 PM, Richard O'Keefe o...@cs.otago.ac.nz wrote: As just one example, a recent thread concerned implementing lock-free containers.  I don't expect converting one of those to OCaml to be easy...