I'm performing at Bright Club, Edinburgh, Tuesday 28 April at The Stand. Doors open 7:30, show begins 8:30. See you there! Details, tickets £5.
If a type is an instance of a common typeclass, is there a good reason to also provide an explicitly named value or function?
For example: for ParsecT, Parsec provides parserBind, parserReturn, parsecMap, parserFail, and more. These duplicate the Monad methods, and some other functions duplicate the MonadPlus and Alternative methods. Is there a good reason to do this?submitted by massysett
[link] [5 comments]
Hey guys! I'm new to this subreddit. I have recently gotten into Haskell, and I'm loving it so far. The functional paradigm is a really fun way to reason about programming.
So, like the title says, this summer I do not have an internship lined up, so my plan is to do a lot of personal projects, post a lot on github, contribute to open source projects, and possibly attend tech meetups to network. As such, I should probably learn as much as I can this summer, right?
I really want to get good at Haskell, though, like really really good. And functional programming in general. My question is, if I spend all of my summer doing Haskell, getting good at it and doing a lot of good work with it, would I have a shot at getting interviews for places that use functional programming, even if I don't have too much experience with other languages?
Either way, I will probably dabble in more popular languages like Scala, Erlang, F#, etc, but as of now I'm making haskell a priority. Should I split the time more evenly, or will learning haskell pay more dividends when it comes to being a better programmer, and still not hurt my chances of getting interviews at places whose stack is heavily functional based?
Thanks for reading!submitted by uncountableB
[link] [3 comments]
I'm starting out in Haskell and trying to build something that requires reading protocol buffers in ghc 7.10. I'm using 7.10 because it's the latest and I don't want to learn old stuff that I have to later unlearn and it's what I have on my Linux distro (Arch Linux). Is there a package for reading protocol buffers that I can use?
protocol-buffers: Build errors when I try to cabal install it.
protobuf: I can't get code to work that's modeled after the first example in the hackage docs. I get a parse error on the part where I express the field tag. (http://hackage.haskell.org/package/protobuf-0.2.0.4/docs/Data-ProtocolBuffers.html)
protobuf-native: Seems to require interfacing with C++. I'm not sure whether I'm ready for that.submitted by Syncopat3d
[link] [4 comments]
Last evening, Codingame held a “Programming World Cup” titled “There is no Spoon”. The format is that within four hours, you get to write a program that solves a given task. Submissions are first rated by completeness (there are 13 test inputs that you can check your code again, and further hidden tests that will only be checked after submission) and then by time of submission. You can only submit your code once.
What I like about Codingame is that they support a great number of programming languages in their Web-“IDE”, including Haskell. I had nothing better to do yesterday, so I joined. I was aiming for a good position in the Haskell-specific ranking.
After nearly two hours my code completed all the visible test cases and I submitted. I figured that this was a reasonable time to do so, as it was half-time and there are supposed to be two challenges. I turned out that the first, quite small task, which felt like a warm-up or qualification puzzle, was the first of those two, and that therefore I was done, and indeed the 5th fastest to complete a 100% solution! With only less than 5 minutes difference to the 3rd, money-winning place – if I had known I had such a chance, I had started on time...
Having submitted the highest ranked Haskell code, I will get a T-Shirt. I also defended Haskell’s reputation as an efficient programming language, ranked third in the contest, after C++ (rank 1) and Java (rank 2), but before PHP (9), C# (10) and Python (11), listing only those that had a 100% solution.
The task, solving a Bridges puzzle, did not feel like a great fit for Haskell at first. I was juggling Data.Maps around where otherwise I’d simple attach attributes to object, and a recursive function simulated nothing but a plain loop. But it played off the moment I had to implement guessing parts of the solution, trying what happens and backtracking when it did not work: With all state in parameters and pure code it was very simple to get a complete solution.
My code is of course not very polished, and having the main loop live in the IO monad just to be able to print diagnostic commands is a bit ugly.
The next, Lord of the Ring-themed world cup will be on June 27th. Maybe we will see more than 18 Haskell entries then?
It seems to me that many of the problems with cabal are due to precompiling packages, because, as far as I can see, Haskell never guarantees ABI compatibility.
Why, then, are packages precompiled, instead of coherently building all the modules used from source when the program is compiled?submitted by 1-05457
[link] [8 comments]
Pretty cool that we made it to 20k readers. That makes /r/haskell the 7th largest language community on reddit. Not bad for an obscure academic language ;)dons
[link] [44 comments]