News aggregator

Proposal: add alterLookupWithKey to Data.Map.Lazy (containers)

libraries list - Tue, 04/21/2015 - 10:23pm
Github issue: Summary: add alterLookupWithKey :: Ord k => (k -> Maybe a -> Maybe a) -> k -> Map k a -> (Maybe a, Map k a) function to Data.Map.Lazy. Details: implement alterLookupWithKey function which takes an update function, key and map, allowing to insert, delete or update a value in a Map and return updated map with a new value. Motivations: For insert/update/delete: same as for alter :: Ord k => (Maybe a -> Maybe a) -> k -> Map k a -> Map k a - it allows to perform insert/update/delete within single lookup. For returning updated value: same as for *LookupWithKey functions - in case of update we mind be interested in the updated value. For a "key" parameter: hornestly, don't know. *LookupWithKey functions are having (k -> .. ) -> k -> <a> -> Map k a -> (Maybe a, Map k a) signatures, but I don't see any reason to pass the key to the update function, because we always can capture the key in a closure if we whant to. The only reason is to respect exist
Categories: Offsite Discussion

Beautiful Code, Compelling Evidence: OpenGL, Cairo tutorial - still up-to-date?

Haskell on Reddit - Tue, 04/21/2015 - 8:43pm

I came across this beautiful tutorial -

I noticed though it's about 7 years old now and things have moved pretty fast as far as opengl standards, opengl tooling in haskell, haskell practices, and data science since then.

Is there an updated equivalent of this tutorial? Is anything there obviously out of date now?

submitted by klaxion
[link] [2 comments]
Categories: Incoming News

Extended Deadline - SBLP 2015

General haskell list - Tue, 04/21/2015 - 7:42pm
CALL FOR PAPERS SBLP 2015 *** EXTENDED DEADLINE *** 19th Brazilian Symposium on Programming Languages 24-25 September 2015 Belo Horizonte, Brazil +++++++++++++++++++++++++++++++++++++++++++++++++++ IMPORTANT DATES Abstract submission (extended): 27 April, 2015 Paper submission (extended): 4 May, 2015 Author notification: 18 June, 2015 Camera ready deadline: 2 July 2015 INTRODUCTION The Brazilian Symposium on Programming Languages is a well-established symposium which provides a venue for researchers and practitioners interested in the fundamental principles and innovations in the design and implementation of programming languages and systems. SBLP 2015 is part of 6th Brazilian Conference on Software: Theory and Practice, CBSoft 2015, that will be held in Belo Horizonte, Minas Gerais, Brazil, from September 21st to September 26th, 2015. SBLP dates are Thursday 24th and Friday 25th of September. Authors are invited to submit original research on any relevant topic which c
Categories: Incoming News

Looking for Senior Software Engineers

haskell-cafe - Tue, 04/21/2015 - 6:01pm
Dear Haskellers, There are two senior software engineer openings at, a Haskell and NixOS based company located in Manhattan NY. Here are the job postings. Professional Haskell experience is not required. Provided you have experience maintaining and developing web services, this is your chance to become a professional Haskeller (if you're not one already). Relocation will be provided, but remote is not an option. Please send your resumes to jobs< at > if you are interested. Sincerely, Jonathan Fischoff VP of Engineering at _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion

GHC 7.10 and memory usage

Haskell on Reddit - Tue, 04/21/2015 - 5:48pm

I have the impression that my programs are using more memory since I changed to GHC 7.10. Just now a program that used to run normally took all of my RAM. Did anyone have this experience also?

submitted by guaraqe
[link] [29 comments]
Categories: Incoming News

Passing functions of type (Num a) => (a->a->a)

Haskell on Reddit - Tue, 04/21/2015 - 4:33pm

I'm writing a scheme interpreter I'm trying to write a function that will do the type coercion when adding and subtracting. Currently I have functions like the "add" for almost every operation.

I would like to write a generic function that will accept a function like (+) and some Numbers which are either a INTs or DOUBLEs and then applies the function once the numbers have been converted.

data Number = INT Int | DOUBLE Double add :: Number -> Number -> Number add (INT a) (INT b) = (INT (a + b)) add (INT a) (DOUBLE b) = (DOUBLE ((fromIntegral a) + b)) add (DOUBLE a) (INT b) = (DOUBLE (a + (fromIntegral b))) add (DOUBLE a) (DOUBLE b) = (DOUBLE (a + b)) coercion :: (Num a) => (a -> a -> a) -> Number -> Number -> Number coercion f (INT a) (INT b) = (INT (f a b)) coercion f (INT a) (DOUBLE b) = (DOUBLE (f (fromIntegral a) b)) coercion f (DOUBLE a) (INT b) = (DOUBLE (f a (fromIntegral b))) coercion f (DOUBLE a) (DOUBLE b) = (DOUBLE (f a b))

GHC complains that it cannot deduce that (f a b) is the right type to fit into INT or DOUBLE's type constructor.

Why does it work if I hard code (+) into a function like add but not when I pass a function of the same type like with coercion?

Thanks for taking the time to read through this!

[EDIT]: Fixed typos in the declaration of Numbers

submitted by JD95
[link] [15 comments]
Categories: Incoming News

A post on /r/haskelltil turned into a discussion about the newbie-friendliness of Haskell documentation

Haskell on Reddit - Tue, 04/21/2015 - 4:25pm

There was a (small) consensus that it should be moved here. Here's the link, but to make things easier I've reproduced the full comment thread (actually in comments), starting with my initial post (right here).

Endo, "The monoid of endomorphisms under composition," is just a newtype for (a -> a) -- | The monoid of endomorphisms under composition. newtype Endo a = Endo { appEndo :: a -> a } deriving (Generic) instance Monoid (Endo a) where mempty = Endo id Endo f `mappend` Endo g = Endo (f . g)

Haskell documentation is frequently a lot scarier than it needs to be. :)

submitted by tejon
[link] [26 comments]
Categories: Incoming News

ANN: Upload agentx,Library for write extensible SNMP agents.

haskell-cafe - Tue, 04/21/2015 - 1:46pm
Can be useful for create monitoring tools. Usage example in docs. get, set, walk, context is work. Bulk work as simple get. Tables don't work, Indexes don't work.
Categories: Offsite Discussion

is haskell good for anything besides

Haskell on Reddit - Tue, 04/21/2015 - 12:51pm

making the Fibonacci sequence?

submitted by patriceonealfan
[link] [19 comments]
Categories: Incoming News

How to use an crypto with hackage cereal?

haskell-cafe - Tue, 04/21/2015 - 10:22am
Hi, I am trying to work with some binary data that encrypted by field instead of the result of serialization. I'd like to use Data.Serialize to wrap the data structure. But I could not figure out how to apply an runtime specified cipher method to the bytestring. Any idea? Or I should use totally other solution? Thanks.
Categories: Offsite Discussion

AI4FM 2015: Call for Short Contributions

General haskell list - Tue, 04/21/2015 - 9:57am
------------------------------------------------- AI4FM 2015 - the 6th International Workshop on the use of AI in Formal Methods Edinburgh, 1st September, 2015 In association with AVoCS 2015 ------------------------------------------------- --- First Call for Contributions --- Important Dates --------------- Submission deadline: 1st August, 2015 Notification of acceptance: 10th August, 2015 Final version due: 21st August, 2015 Workshop: 1st September, 2015 General --------------- This workshop will bring together researchers from formal methods, automated reasoning and AI; it will address the issue of how AI can be used to support the formal software development process, including requirement analysis, modelling and proof. Previous AI4FM workshops have included a mix of industrial and academic participants and we anticipate attracting a similarly diverse audience. Rigorous software development using formal methods allows th
Categories: Incoming News

Dimitri Sabadie: Losing our privacy

Planet Haskell - Tue, 04/21/2015 - 6:46am
Big brother of NSA

On the 19th of March 2015, a law was introduced in France. That law was entitled “loi du renseignement” and was presented in regard of what happened in the Charlie Hebdo awful week. The main idea of the law is to put peole on wire so that terrorist activities could be spotted and dismantled.

That law will be voted and apply on the the 5th of May 2015.

Although such a law sounds great for counter-terrorism, it has several major issues people should be aware of.

You’re on wire

Every people – in France and abroad as well of course – could be on wire. The French government might have access to whatever you do with your internet connection. Crypto-analysts working for the goverment will read dozens of thousands of messages from individuals. They’ll know where you go to and where you go from – think of your smartphone’s GPS capabilities. They’ll know which pictures you take, how much time you spend in your bathroom. They’ll even be able to read your e-mails if they want to.

Of course, most people “just don’t care”. “Why should I care that the government knows the litter brand I bought to my cat? I don’t give a damned heck as long as they catch bad people”. That’s a point, but that’s also being blind. Digital communication is not only about yourself. It’s about people. It’s about you and your friends. You, and your contacts. You can’t choose for them whether they’d like people to watch over their shoulders every now and then. If the government has access to your private data, it has access to your friends’ and contacts’ data as well. Not giving a damned heck is being selfish.

You’ll be violated

Then comes the issue with what the law is. It gives the government the right to spy on masses. They could even sell the data they collect. As a counter argument, the “Commission de contrôle des techniques de renseignement” – which French stands for “Control commission of intelligence techniques” – was created. That committe is there to watch the government and ensure it doesn’t go out of control and doesn’t violate people’s rights. The issue with that is that our prime minister has the right to ignore the committee’s decision. If the committee says “Wait a minute. You don’t have the right to gather those information without asking for M. Dupont’s approval”, the prime minister may answer back “Well, fuck off. I will and you can’t stop me”. And the sad truth is that… yeah, with that law, the prime minister and their team has the right to ignore the committee’s decision.

The committee then has no point. It just gives an opinion. Not a veto. What would happen if a terrorist hacked into your computer. Would you go to jail because the prime minister would have stated you were a terrorist? Damn me if I know.

We’re going to lose a right

French people will lose a very important right: the right to privacy. It’ll be sacrificied without your opinion for counter-terrorism, giving the government a power it shouldn’t have. You thought the NSA was/is wrong? Sure it is. But when the NSA watches over American and worldwide people, it is illegal whereas when the French government watches over French and worldwide people, it is legal. That makes the French government way worse than the NSA to me.

I think the first thing I’ll do will be to revoke my French VPS subscription to move it out of France, in a country in which people still have privacy. Keep your communication encrypted as much as possible (ssh and so on). And as a bad joke, don’t leave your camera in your bedroom. You might be spied on by Manuel Valls while having sex with your girlfriend.

Categories: Offsite Blogs

Purpose of Data.Vector.Mixed

Haskell on Reddit - Tue, 04/21/2015 - 6:20am
Categories: Incoming News

Data.Tree traversals

libraries list - Tue, 04/21/2015 - 4:20am
Data.Tree makes Tree into a Traversable in only one way: depth-first. It seems to me that we should have a newtype to traverse in breadth-first order. David Feuer _______________________________________________ Libraries mailing list Libraries< at >
Categories: Offsite Discussion

VSTTE 2015 Final Call For Papers

General haskell list - Tue, 04/21/2015 - 3:58am
********************************************************************** 7th Working Conference on Verified Software: Theories, Tools, and Experiments July 18 - 19, 2015 San Francisco, California, USA Co-located with 25th Conference on Computer Aided Verification ( ********************************************************************** Full Paper Submission Deadline: April 27, 2015 SCOPE: The Seventh Working Conference on Verified Software: Theories, Tools, and Experiments follows a successful inaugural working conference at Zurich in 2005 followed by conferences in Toronto (2008), Edinburgh (2010), Philadelphia (2012), Atherton (2013), and Vienna (2014). The goal of this conference is to advance the state of the art in the science and technology of software verification, through the interaction of theory development, tool evolution, and experimental validation. We welcome submissions describing significant advances in the production of verified so
Categories: Incoming News

ANN: ssh, darcsden vulnerability

General haskell list - Tue, 04/21/2015 - 12:35am
We recently learned of a serious undocumented vulnerability in the ssh <> package. This is a minimal ssh server implementation used by darcsden <> to support darcs push/pull. If you use the ssh package, or you have darcsden’s darcsden-ssh server running, you should upgrade to/rebuild with the imminent ssh-0.3 release right away. Or if you know of someone like that, please let them know. Also, if you're interested in cryptography/security, additional help and patches for the ssh and darcsden packages would be very welcome. I've blogged more details at <> (if you're a Darcs Hub user, hopefully you've already seen it). Best - Simon_______________________________________________ Haskell mailing list Haskell< at >
Categories: Incoming News

[ANN] Haskell Music - Two tracks in the Jungle style

haskell-cafe - Tue, 04/21/2015 - 12:07am
Dear list. I'd like to share two new tracks made in haskell (with csound-expression lib). They are two etudes in the style of the Jungle. One track is just a joke. I hope that Simon doesn't mind me sampling him. The track is made in Haskell :) So it's a musical thank-you for the wonderful language! Anton _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe< at >
Categories: Offsite Discussion