As many are aware - there are a variety of important discussions going on at the moment - be those both at a technical level and also at the community level. I would like to point out that Reddit is something of a unique communication platform, as we all have the ability to directly influence how much someone is heard.
Therefore, I would like to ask that people consider their down votes appropriately. Ideally, down-votes are used for us to filter out the noise from a discussion - that is, the comments that add no value to the conversation. However, just because you disagree with a comment doesn't make it any less important! If you disagree, it's a lot more constructive if you can express why that is, or alternatively leave the comment untouched.
As the community grows, we risk ignoring the full spectrum of opinions - all of which have the potential to add a lot.submitted by ocharles
[link] [43 comments]
Sup' For a kNN algorithm, I need to calculate the euclidean distance between 2 lists of integers, recursivly. But the fuction sqrt( (p1-q1)2 + ... + (pn-qn)2 ) is not really easy to use with the recursivity. If someone got an idea, I take it. Thankssubmitted by Bl4ckb0ne
[link] [11 comments]
A number of convenience methods provided by Foreign.* have a Storable constraint but only use sizeOf and maybe alignment. Examples are all the functions under the Allocation heading here.
It might be good to split sizeOf and alignment into Sizeable or something like that and make that a constraint on Storable.
It seems pretty wasteful to have to write peek and poke implementations just to be able to use those functions.submitted by deech
[link] [16 comments]
… please don't stop! I'm getting a real good laugh. Favorite tweet so far:
This afternoon's debate: conduit vs pipes. THEY MEAN THE SAME THING, YOU ASSHATS! It's every GODDAMN day with these kids.
The answers by edwardkmett, Tekmo and snoyberg are gold.submitted by 8d5rbz6p
[link] [112 comments]
There has been some talk about what a Foldable instance is even supposed to be constrained to do...or why not just any implementation that satisfies the type signature is ok. The documentations just call a good implementation "suitable".
So why can't every foldMap just be foldMap _ _ = mempty ? Or every toList be toList _ = ?
I'm proposing a universal property to supply (at least one) law to Foldable:toList :: Foldable t => t a -> [a]
An implementation of toList f is considered a "proper implementation" if, for any other function g satisfying the above type signature, one can construct a unique k such that:g = k . f
For example, for the "bad instance" above, k = const .
What this does is basically say that if an instance can "extract more information" than another, it is the better one. So the best instances are the ones that extract and preserve the most possible information.
This actually allows for multiple implementations of toList per type...for example, consider:toList'  =  toList' (x:xs) = x:x:xs
But i think that the different implementations all have unique isomorphisms to each other (that is, you can turn the output of toList' into the output of the real toList and vice versa, and backwards).
And besides, Traversable has this same problem as well, even with all of its fancy laws: Nevermind, it doesn't >_>
Anyways, this is my humble proposal for a Foldable law that might give the Foldable detractors (it has no laws! it doesn't mean anything! any implementation is ok!) at least something.submitted by mstksg
[link] [12 comments]
Recently the Haskell community has been engaged in a very intense discussion around potential changes to the Prelude (aka "burning bridges" or "FTP"). Here's the most recent incarnation of the discussion for context. The changes under discussion are non-trivial, and many people are putting in a huge amount of energy to try and make Haskell the best it can be. And to be clear: I'm talking about people arguing on both sides of this discussion, and people trying to moderate it. As someone who's mostly been sitting on the sidelines in this one, I want to start by expressing a big thank you to everyone working on this.
(If anyone's wondering why I'm mostly sitting this one out, it's because I don't feel very strongly about it either way. I think there are great arguments going both ways, and over the past week I've fluctuated between being -0.2 on the proposal and being +0.2.)
When a big discussion like this happens, it's easy for people to misinterpret it as something unhealthy. I'm here to remind everyone that, in fact, the opposite is true: what we're seeing now is the sign of an incredibly healthy community, based on an amazing language, that is undertaking extraordinary things. And there are of course some warts being revealed too, but those are relatively minor, and I believe we will be able to overcome them.
So to begin my cheerleading:
The fact that we can even consider doing this is amazing. I don't think very many languages could sustain a significant rewrite of their most core library. Let's just keep things in perspective here: even the worst case scenario damage from this change involves updating some documentation and modifying a relatively small amount of code in such a way that will be backwards compatible with old versions of the library. This is a true testament not only to the power of the Haskell language, but to the thoughtfulness with which this proposal was made.
The discussion has been incredibly civil. This topic had all the makings for an internet flame war: strongly held opinions, good arguments on both sides, lots of time and effort involved, and Reddit. I am happy to say that I have not seen a single personal attack in the entire discussion. Almost every piece of discourse has been beyond reproach, and the few times where things have gotten close to crossing the line, people on both sides have politely expressed that sentiment, leading to the original content being removed.
To some extent, I think we're all a bit spoiled by how good the civility in the Haskell world is, and we should take a moment to appreciate it. That's not to say we should ever expect any less, but we should feel comfortable patting ourselves on the back a bit.
We're dynamically coming up with new, better processes. When opinions are so strongly divided, it's difficult to make any kind of progress. As a community, we're adapting quickly and learning how to overcome that. As you can see in the thread I linked above, we now have a clear path forward: a feedback form that will be processed by Simon PJ and Simon Marlow, who will make the ultimate decision. This process is clear, and we couldn't be more fortunate to have such great and well respected leaders in our community.
Nothing else has stopped. If you look at issue trackers, commit logs, and mailing list discussions, you can see that while many members of the community are actively participating in this discussion, nothing else has ground to a halt. We're a dynamic community with many things going on, so the ability to digest a major issue while still moving forward elsewhere is vital.
That said, I think there are still some areas for improvement. The biggest one lies with the core libraries committee, of which I'm a member. We need to learn how to be better at communicating with the community about these kinds of large scale changes. I'm taking responsibility for that problem, so if you don't see improvements on that front in the next few weeks, you can blame me.
More generally, I think there are some process and communications improvements that can be made at various places in the community. I know that's an incredibly vague statement, but that's all I have for the moment. I intend to follow up in the coming weeks with more concrete points and advice on how to improve things.
In sum: Haskell's an amazing language, which has attracted an amazing community. This discussion doesn't detract from that statement, but rather emphasizes it. Like any group, we can still learn to do a few things better, but we've demonstrated time and again (including right now!) that we have the strength to learn and improve, and I'm certain we'll do so again.
I'm proud to be part of this community, and everyone else should be as well.
Recruit IT are looking for a Senior Developer to join a bleeding edge Big Data organisation in the New Zealand market. You will bring a proven background in big data systems, business intelligence, and/or data warehouse technologies along with a preference for functional programming and open source solutions.
You will be playing an integral part in ensuring the growth and performance of a state of the art Big Data platform. To do this you will need to have a good understanding of the importance of analytics and a variety of Big Data technologies.
Your experience to date will include:
Experience with big data, business intelligence, and data warehouse applications. This will include; Hadoop, Hive, Spring, Pivotal HD, Cloud Foundry, HAWQ, GreenPlum, MongoDB, Cassandra, Hortonworks, Cloudera, MapReduce, Flume, or Scoop to name a few!
Ideally functional programming experience including; Scala, Haskell, Lisp, Python etc
Passion for bleeding edge tech is a MUST!
If you are interested in finding out more, apply online to Kaleb at Recruit IT with your CV and an overview of your current situation.
Get information on how to apply for this position.