[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

[Advertise on 4chan]


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


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
>>
>>84466309
bump. looks like a based language, but I'm having a bitch of a time building anything novel using it too
>>
>>84466309
>>84466354
not 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
>>
>>84466309
follow learn you a haskell for the greater good
to get your brain abit prewired, before jumping into a project.
>>
>>84466309
Learn you a Haskell for the great good
If 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 good
Too bad you won't be able to write anything meaningful after reading it.
>>
File: 1637439052172.jpg (8 KB, 250x245)
8 KB
8 KB JPG
>>84466844
> HURR DURR i have an opinion totally unrelated to the subject
it won't teach you programming, no
but it will show you the basics of the language in a simple format.
>>
>>84466309
>>84466635
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.
>>84466740
>>84466704
That book only teaches you the basic syntax, barely touches on monads at all,which is the bread and butter of FP.
>>
>>84467167
so what do you suggest i do then so that im prepared to do a project?
>>84466740
>>84466704
>haskell for a greater good
seems 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 anymore

if 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
>>
>>84466635
Kek 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.
>>
>>84467379
Is there a better functional programming language?
>>
haskell is for losers and using haskell is an admission that your time has no value
>>
>>84467414
well, 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.
>>
>>84467397
not 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 jobs
OCaml if patrician
Haskell 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.
>>
>>84467414
If your time has value then why are you here?
>>
>>84467468
correction: paid for your time, lol
>>
>>84467341
like 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.
>>
>>84467628
and before all that, learn to read type signatures.
:t is your friend.
>>
>>84467628
fuck. 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.
>>
>>84467727
it'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.
>>
>>84467775
haskell 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.
>>
>>84466635
>>84467414
>>84467727
Then go back to your javascript bootcamps, faggots. I know it's hard to comprenend, but some people are just interested in math and computer science for the hell of it.
>>
>>84467814
>t. 3rd year uni autist
>>
>>84467765
Haskell 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.
>>84467814
I 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.
>>
File: image6.png (600 KB, 2072x1214)
600 KB
600 KB PNG
>>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 enough
hell 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
>>
>>84467654
sneak into uni lectures about fp
>>
>>84467935
It says a lot that Haskell does just about EVERYTHING better than so-called “practical languages”
>>
>>84468510
nigga, stop communicating in absolutes, it makes you look under8.
>>
File: u6TRyb7m.jpg (14 KB, 298x298)
14 KB
14 KB JPG
>>84466635
buy my emac haskell-mod
>>
File: 1637779659304.jpg (50 KB, 500x666)
50 KB
50 KB JPG
>>84469204
there there, it's all just a bunch of mean people.
you can still use your emacs, honey.



Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.