Disclaimer: I think I've been doing functional programming for just over half a month.
I've been learning Haskell through "Learn You a Haskell" and messing around on some different webpages, getting a closer look at some packages (the numeric probability package from Hackage, for example) while reading about monads a bit. I want to continue my learning but in a more focused manner (and I'd like to take a break from LYAH; I feel that it has been better serving as a reference than something to "read" at this point).
I think one of the best ways to do this (and please tell me if you disagree) is to get a good outline of topics to learn and learn them in order. I have heard Real World Haskell is outdated in some ways but still a useful tool. Would you recommend this or any other tools? If I choose to read Real World Haskell, which sections should I skip and read somewhere else (or at least read with caution)?
Background: I am a mathematics undergrad student in my 4th year. My interests are in machine learning, statistics, and information theory. I have a background in basic measure theory (from a probabilistic perspective) but not category theory as well as mathematical statistics. I can program in Python and Java. Haskell interests me for a number of reasons, including the fact that it is so mathematically oriented, it seems to have great potential uses in data science/machine learning/AI (this is a big one, and if anyone has any links to things related to this, I'd love to see them), its use is becoming more widespread (and thus potentially viable in a number of new industry settings?), and honestly, it just feels nice to use.submitted by Knux-
[link] [10 comments]
I've heard that Haskell is very good at parsing and there are some good libraries for this (parsec, attoparsec, uu-parsinglib and so on).
Anyway, in the process "input -> Lexing -> Parsing" I haven't reached parsing stage. I'm stuck on designing the Token type and AST type. Any tips, rules of thumbs, mind patterns, little and concrete examples, tutorials for this type of intuition?
My goal is implement basic parsers and prettyprinters for ActionScript, C++ and Java, to be able to translate code between them. I cannot use existing parsing libraries, because they are just too broad. I need only subsets of these languages to be able to intertranslate. I assume that correcty designed AST is larger part of parsing problem, so I ask here.submitted by danbst
[link] [9 comments]
Learning haskell, I wrote this simple function that's supposed to return a list of prime numbers up to n. It works for low enough n, but above 5000 or so, it becomes noticeably slower to begin, which is far lower than a prime sieve has any right to slow down. What am I missing?import Data.List sieve :: (Integral a) => a -> [a] sieve n | n < 2 =  | n == 2 =  | otherwise = comb [2..n] where comb xxs@(x:xs) | x^2 > last xs = xxs | otherwise = x : comb (xs \\ [2*x, 3*x .. n]) comb  =  submitted by ZankerH
[link] [21 comments]
I started working on an emulator for the old CHIP-8 CPU as a project to learn haskell. Although it probably wasn't the best choice of project due to how basic it is, I've definitely gotten hooked on haskell.
I've done a few clojure projects in the past, so I'm familiar with the functional programming basics, but I haven't experimented much with haskell's abstractions (apart from basic monads).
If anyone can offer any improvements or tips, i'd be greatly appreciated. I'm planning on doing plenty more haskell projects, so I'd like to nip any bad practices in the bud.
Thanks in advance!submitted by tominated
[link] [3 comments]
Hey everyone. I've just started out with Haskell, and I just can't seem to understand how the reader and writer monads work. Could someone point me to some place where they're explained well? Thanks!submitted by Bollu
[link] [15 comments]
[ANN](and feedback request) unagi-chan: Fast and scalable concurrent queues for x86, with a Chan-like API
Here in sunny Austin Texas we've spun up a Haskell meetup group, and if you're in the area, you should join! Specifically, we've set up a small meetup tomorrow as a training class to help people solidify and expand their Haskell knowledge.
We currently are having monthly meetups here with classical talks, and we're also planning of setting up monthly or biweekly study groups like the one tomorrow for people to talk and learn in a different setting. So the one tomorrow will hopefully be the first of many more to come.
Tomorrow the study group will be downtown at MakerSquare - and if you're in the area, you should come by! Brand new to Functional Programming? Don't have GHC installed? Don't even know what Haskell is? No matter - things will happen, people will learn things, and you should come by and learn how awesome it is and how awesome all of us are, and we'll help you as much as we can.
Next week we'll be having a meeting at Rackspace in North Austin, where we'll be talking about error handling in Haskell, and I'll probably talk about something and I have no idea what that will be yet (it'll be a secret).
We normally have a turnout of about 20 people for the meetings. But that's just because you haven't come and hung out yet. The meetings are typically open forum and rather lax. So you're encouraged to raise your hand or just speak up.
We also tend to go drink beers and talk into the night afterwords - with many riveting conversations, including subjects like (roughly in order of priority):
- Tacos. Beer. Serious business.
- Why is software so terrible?
- How to achieve world domination in a purely-functional way?
- Education and how to do that properly.
- War stories (tears of joy/pain are encouraged)
- Cloud computing (the half-dozen Rackspace employees love this one!)
- Ask Austin (me, not the town) how some random GHC thing works.
- Non-taco-related foods.
Also, a bajillion points go to Rackspace for giving us a great working space for our meetups so far and providing us with great pizza for the past several meetings.submitted by aseipp