how the fuck do i git gud at Haskell? been trying to learn it via doing a project, but the barrier seems higher than a procedural language. anyone that just learned Haskell as they made something along the way, or is there a better way? i.e. should i take some time to learn the language on its own
>>84466309bump. looks like a based language, but I'm having a bitch of a time building anything novel using it too
>>84466309>>84466354not to ruin your parade, but if you're having hard time actually building something with a language, have you considered that maybe that language isn't actually good and/or practical?http://xahlee.info/UnixResource_dir/writ/lang_purity_cult_deception.html
>>84466309follow learn you a haskell for the greater goodto get your brain abit prewired, before jumping into a project.
>>84466309Learn you a Haskell for the great goodIf it’s anything like learn you some Erlang it’s good, it’s going to be the next thing I try
>>84466704>learn you a haskell for the greater goodToo bad you won't be able to write anything meaningful after reading it.
>>84466844> HURR DURR i have an opinion totally unrelated to the subjectit won't teach you programming, nobut it will show you the basics of the language in a simple format.
>>84466309>>84466635Haskell isn't like your average run-of-the-mill programming language, you can't just jump on it after reading a tutorialspoint and expect to be productive on it.>>84466740>>84466704That book only teaches you the basic syntax, barely touches on monads at all,which is the bread and butter of FP.
>>84467167so what do you suggest i do then so that im prepared to do a project?>>84466740>>84466704>haskell for a greater goodseems meme/toy-ish. trying to actually learn it
haskell's toolchain is a pile of unpolished turds and the average real world project uses so many extensions to the language that it's basically not haskell anymoreif you want to learn it then treat it as a learning exercise, i.e. take your time and let things click, or find a better resource
>>84466635Kek that was quite the read.Despite the title, his conclusion seemed to support mostly-functional languages like F# and OCaml.I quote:>[...]which one should you buy? I think Erlang, OCaml/F#, would be safe choices, while langs like Qi, Oz, Arc, Perl6, would be most questionable.The issue he remarked throughout is basically just his hate around "cults" like in Python and Perl (his examples) Not FP itself. I guess that is what makes the title a little appropriate.He criticizes Scheme, but Scheme isn't an FP language. I found this odd.6/10 is clickbait but with valid points. would not read again though.
>>84467379Is there a better functional programming language?
haskell is for losers and using haskell is an admission that your time has no value
>>84467414well, if you are properly paid for your language, you can write a complete and efficient compiler for your required DSL in haskell in less than 50 lines of code.seems pretty good and maintanable.
>>84467397not him but imo the most practical FP languages have some flexibility to allow a little bit of impurity. I wouldnt say "better" but easier to do productive stuff, yeah.F# or Clojure if you want jobsOCaml if patricianHaskell if you have the time to learn it. It is much more resistant to bugs, and is mathematically and objectively "correct". HOWEVER you need to put dozens of hours into it to get there, quite ironically due to its very nature. It is very easy to write slow or incorrect code, even with all its checks to force you into going Functional.This is both its greatest blessing and its greatest curse.
>>84467414If your time has value then why are you here?
>>84467468correction: paid for your time, lol
>>84467341like I said it has quite the learning curve. If you try to do something big quickly you will prob fallback to your shitty imperative code which kinda defeats the purpose of the language.I suggest you learn all about lambda calculus, higher-order functions, closures, typeclasses, generics, then the different kinds of monads (State,Reader,Writer,Cont), monad transformers, continuation passing style, parsing combinators, Arrows, template haskell, higher-kinded data types, then get comfortable using the package manager (Stack) and only then can you consider doing something useful with Haskell.
>>84467628and before all that, learn to read type signatures.:t is your friend.
>>84467628fuck. any resources you favor? or just what i find from google will be enough?
>>84467167>Haskell isn't like your average run-of-the-mill programming language, you can't just jump on it after reading a tutorialspoint and expect to be productive on it.Then what is the point? You expect people to struggle to learn an unintuitive way of writing code all for no benefit. When you learn C/C++, or rust at least after struggling you get a super fast program. Haskell you deal with the struggle and then get a program that doesn't run much faster than a basic bitch Python program.
>>84467727it's intuitive if you don't block your brain with "computing must be imperative" meme.
>>84467727>doesn't run much faster than a basic bitch Python program.Objectively wrong, modern FP is roughly on par with C#/Java. When FP is appropriate for a given task (i.e. you need to parse something complicated), it lets you write short, bugless code.Haskell is kind of bad for practical shit but its typeclass system is pure genius, once you get a good feel for it the language becomes way more straightforward.
>>84467775haskell is pretty slow (on par with python). i notice it especially when building with extremely tight loops that cannot be reduced by lazy interp., like audio synthesis.
>>84467814>t. 3rd year uni autist
>>84467765Haskell is great for dealing with groups, but is a pain in ass once you have to break a group up and what your looking for isn't at the beginning or the end of the group. >>84467775>Bug free Eh to write code is to make bugs. I mean the zero side effect certainly can minimize it, but I doubt that saves you from everything. >>84467814I program C# professionally and C as a hobby. I don't understand why you would think I don't like the field because I don't like Haskell. Math is great and so is comp sci. I am just not that interested in the annoying work of AI/machine learning so functional makes no practical sense to me. I never got people who tried to sell Haskell outside of those fields.
>>84467814>I know it's hard to comprenend, but some people are just interested in math and computer science for the hell of it.fucking retard, that's exactly what im saying. haskell is an academic meme, not a practical language for writing real softwares.
>>84467654>what i find from google will be enoughhell no, avoid FP blogs and specially 'monad tutorials' on the internet.I just downloaded random pdfs and kinda banged my head on the wall upwards till I got the material
>>84467654sneak into uni lectures about fp
>>84467935It says a lot that Haskell does just about EVERYTHING better than so-called “practical languages”
>>84468510nigga, stop communicating in absolutes, it makes you look under8.
>>84466635buy my emac haskell-mod
>>84469204there there, it's all just a bunch of mean people.you can still use your emacs, honey.