[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Why aren'y you learning yourself a haskell today?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 45
Thread images: 5
File: haskell-book-cover.png (44 KB, 672x888) Image search: [Google]
haskell-book-cover.png
44 KB, 672x888
Why aren'y you learning yourself a haskell today?
>>
File: file.png (348 KB, 1530x1980) Image search: [Google]
file.png
348 KB, 1530x1980
>>54500826
That book is like five years old. Why aren't you reading an up-to-date Haskell introduction instead?
>>
Because I realised everything it can do a normal language can do better and faster. I did go through that book and then through real world Haskell. Waste of time
>>
>>54500826

Because I was learning how to write a lisp interpreter.
>>
because i don't have time to waste today
>>
File: 1395701410346.jpg (46 KB, 737x711) Image search: [Google]
1395701410346.jpg
46 KB, 737x711
>>54500826
meme book with a meme title, dropped
>>
>>54501088

Only ebook I've ever paid for. Still worth it
>>
Serious question, is Haskell worth it if you're already familiar with other functional (specifically LISP-like) languages?
>>
>>54503225
The only LISP that's close to modern functional programming might be Clojure. Haskell (especially) goes in-depth into contemporary functional programming.
>>
>>54503225
Yes, Haskell still makes you think in a very different way.
>>
That book sucks and is the definition of babbyslutting
>>
Because I'm learning Fortran 77
>>
>>54501088
>>54503206
are you guys shills?
I've seen this book everywhere, yet no mention in discussions, kind of like shillary

upload a complete pdf
I ain't paying shit nigga
>>
>>54506304
It's actually work-in-progress, but it covers "newer" topics like Foldable, Traversable, and Applicative, i.e. le FTP and AMP. I have two friends using the WIP copy to learn Haskell and I'm impressed of the speed at which they're learning to be cumest. I imagine it'll be more readily available for free as in piss once it's finished this year.
>>
>>54500826
I'm already a Haskell expert. (Feel free to ask me anything related to Haskell)
>>
File: 1462205836874.jpg (44 KB, 491x719) Image search: [Google]
1462205836874.jpg
44 KB, 491x719
>>54506486
how do I become a haskell expert
e. g. what concepts should I fully understand

also, do you have tips to make haskell code faster && more efficient

and what are lens useful for
>>
>>54506472
hmm, is that it
op pic has applicatives and I think also mentions foldables and traversables

I hope it has more than that.
>>
>>54506486
wtf is Word8 and the like useful for
>>
>>54506581
>how do I become a haskell expert
Spend all day on #haskell for several years and read blog posts by prominent haskellers

>e. g. what concepts should I fully understand
The type system

>also, do you have tips to make haskell code faster && more efficient
Add strictness annotations. Make your data types strict, and unbox them. Profile your code, figure out where it's spending the time, then optimized that. (Look into threadscope)

Inspect the Core of your critical inner loops and see if it's doing something obviously wrong. Write code that streams or deforests well. (Learn how to use rewrite rules)

Most importantly: Look at other fast and efficient Haskell libraries to see what they're doing differently.

>and what are lens useful for
Multiple things. Lenses (in general) embody some sort of data structure access concept. The key principle is that these are composable and reusable.

Lens is basically an abstraction for working with data structures in a composable, high-level and reusable way. Too hard to summarize, I tried my best.
>>
>>54506623
They're useful for when you want known-size integers.

Word8, Word16, Word32, Word64 = unsigned integers of that size
Int8, Int16, Int32, Int64 = signed integers of that size

(‘Int’ and ‘Word’ have implementation-defined size, so you can't rely on them)

Imagine you're writing a protocol de/serializer, for example.
>>
>>54506634
Oh, also, don't be afraid to write performance-sensitive inner loops in C or assembly and call out to them using the FFI. The FFI is really easy to use.
>>
>>54506634
>type system
what is there more to understand than that types have to align for everything to work?

is there something that type theory teaches you?

>strictness annotation
you mean like specific types such as Int -> Int instead of Num a => a -> a

>data types strict and unbox them
define that, all I think is concrete types like Int when you say strict

>unbox
???


also, is equational reasoning used much? do you personally use it
>>
>>54501135
what do you mean?
>>
>>54500826
Because there is nothing in for me learning a lazy evaluated cuck language.
>>
>>54506761
>what is there more to understand than that types have to align for everything to work?
Plenty more. Types are the most interesting part of Haskell by far.

The rich type theory can give rise to abstraction, safety, performance, reusability, static guarantees, and more. Learning how to design types, how to use the type system, how to derive theorems and useful abstractions from types and how to leverage the power of GHC's 50 billion type system extensions is what lets you write and understand advanced Haskell.

>you mean like specific types such as Int -> Int instead of Num a => a -> a
No. Look up “haskell strictness annotation”. The corresponding language extension is BangPatterns.

>define that, all I think is concrete types like Int when you say strict
You're confusing “strict” with “specific”/“concrete” (or “monomorphic”).

f being strict means, in layman's terms, that evaluating f x requires you to evaluate x first.

In the context of data types, a data type being strict (or more precisely: its constructors being strict) means that returning e.g. Foo x forces x to be evaluated first.

See e.g. the definition of Map: https://hackage.haskell.org/package/containers-0.5.7.1/docs/src/Data.Map.Base.html#Map

Notice how it uses both strictness *and* unboxing. (Both for performance)

>also, is equational reasoning used much? do you personally use it
Yes and yes. It's mostly used when refactoring or going through code transformations.
>>
>>54506893
what about category theory?

any math background before I delve into type theory and category theory?
>>
>>54507499
I answered this question (and similar ones) in depth a day ago or so

https://archive.rebeccablacktech.com/g/thread/S54487186#p54487781
>>
Is it ready for production ? Is the doc as good as the python doc' ? Who hire haskell dev' ? How is this better than Lisp ?
>>
>>54500826
F# is more practical
>>
>>54507695
Is it well supported outside Windows?
>>
>>54507711
Yes it is through mono or core clr
>>
>>54507557
thanks family, you've been very helpful
>>
>>54500826
because Elm is more fun and F# is more practical and flexible (multi paradigm, wont force you to use FP in every situation)
>>
>>54507952
>F# more flexible than Haskell
I can tell you know neither of the two
>>
>>54508030
Flexible in that lazy isn't forced and multi paradigm
>>
>>54508076
>I can tell you know neither of the two
>>
But I am anon!
>>
>>54507586
https://storify.com/realtalktech/the-truth-about-haskell-in-industry-startusp-and-b
>>
>>54507726
Is this a "well supported" like c# is "well supported" by mono? Or can you run everything you could on windows on mono, obviously excluding platform specific code?
>>
Do i need math for this?
Also what book for absolute starters ?
>>
>>54508170
>Do i need math for this?
http://www.vex.net/~trebla/haskell/prerequisite.xhtml
>>
>>54508170

>do I need math for programming

No, you also don't need any store of power source to run your computer
>>
File: carry.png (308 KB, 604x1000) Image search: [Google]
carry.png
308 KB, 604x1000
Why would I learn me a Haskell when I can already Lisp? If I can write purely functional code that cross-compiles into blazing fast C, then why should I bother with a lazily-evaluated overly academic meme lang?
>>
>>54508096
I can tell you know either of the two
>>
>>54508152
All the core libraries are there
Only wpf and other Windows only shit is missing
Thread replies: 45
Thread images: 5

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.