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

Is Haskell's ungodly bestiary of string types a problem

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 86
Thread images: 7

File: Haskell-purple.sh.png (16KB, 650x650px) Image search: [Google]
Haskell-purple.sh.png
16KB, 650x650px
Is Haskell's ungodly bestiary of string types a problem in everyday programming? What annoyances do you often encounter in Haskell?
>>
>>59925035
>What annoyances do you often encounter in Haskell?
Trying to find a real-life usecase for zygohistomorphic prepromorphisms.
>>
>What annoyances do you often encounter in Haskell?

Having to deal with 1 GB/s of immediately garbage collected data every time I pass a list.
>>
>>59925075
The hell do you store in your lists?
>>
>>59925125
It's a 500 line text file. The problem is Haskell's lazy evaluation.
>>
>>59925249
>500 line text file
>1 GB/s of immediately garbage collected data
The question of how remains. I'd like to hear more. Or is it 1 GB/s for 0.01 s?
>>
>>59925062
Please refer to http://stackoverflow.com/a/5059703/
>>
>>59925465
No, that only covers zygomorphisms, not zygohistomorphic prepromorphisms
>>
>>59925062
>>59925075
samefag
>>
just one more
>>
>>59925035
>What annoyances do you often encounter in Haskell?
It considering everything a theorem (every type is implicitly inhabited), which trivializes truth and falsehood.
>>
>>59925035
I program every day in Haskell, for my job, and my answer is: no. I basically only use strict Text, and the Text string builder type. Works 4 me. ByteStrings useful when you need strings of bytes.

Just avoid lazy IO, unless you're feeling (hue) lazy.
>>
>>59930130
>Just avoid lazy IO
So should I just use System.IO.Strict?
>>
I wish happy and alex got a major overhaul
>>
Haskell is almost perfect, it certainly is better than all other languages
>>
>>59933319
Haskell is great, but I think it is far from perfect, even from almost perfect. I have serious hopes for PureScript to improve on Haskell because it's a clean break. They've made it strict, given it real strings by default, unfucked the records, etc. It's starting to look really good.
>>
>>59934069
>unfucked the records
What do people usually mean by this? I've started using Haskell only recently and haven't noticed anything that bad with records.
>>
File: 1492286093350.jpg (297KB, 1920x1080px) Image search: [Google]
1492286093350.jpg
297KB, 1920x1080px
Haskell is basically a virgin waifu form OCaml
>>
>>59934182
>non extensible
>can't reuse names
>incovenient

i recommend you try lenses
>>
>>59925035
> What annoyances do you often encounter in Haskell?
Laziness and unholy mess of extensions.
>>
>>59934332
Laziness is the one thing I miss in all the languages that don't have it.
>>
>>59925249
You know that you can force Haskell to evaluate something if you need it?
>>
>>59933319
https://www.youtube.com/watch?v=iSmkqocn0oQ
>>
>>59925249
You need to learn more.
Using conduit, and streaming shit for example makes it use much less.
You can also force evaluation through other means, but pipes or conduit is so great that learning it is a pretty good thing to do.
>>
>>59930219
Data.Test.IO
Data.ByteString.IO

Mostly those, or whichever of pipe/conduit you use.
>>
>>59934290
Or https://nikita-volkov.github.io/record/
>>
File: pQo7e8E.jpg (43KB, 514x536px) Image search: [Google]
pQo7e8E.jpg
43KB, 514x536px
>>59925062
>>59925465
>mfw those aren't made-up words
>>
>>59935259
Are you genuinely retarded?
>>
>>59933319
Pretty sure Idris is better, even if I was a pure faggot.
>>
>>59935259
Most math-related words (and operators) are made-up, non-related nonsense.
Mathematicians should be forbidden to name anything or to make up notations.
>>
>>59935466
>Pretty sure Idris is better
It is. Haskell is merely a pleb filter for Idris. But Idris itself is a pleb filter for Coq.
>>
>>59935370
I genuinely thought it was satire.
>>
>>59936471
What did you think was satire exactly? I don't get it.
>>
>>59935759
you mean isabelle/HOL
I prefere my cute girls over cocks
>>
>>59936514
>I don't get satire

yup, autism.
>>
>>59935259
>I wrote that code out on the #haskell channel as a joke [...]
https://www.reddit.com/r/programming/comments/6ml1y/a_pretty_useful_haskell_snippet/
>>
File: Untitled.png (50KB, 763x496px) Image search: [Google]
Untitled.png
50KB, 763x496px
>>59936514
Haskell is sometimes stereotyped as being the language of smug academics and using excessively verbose vocabulary that requires a PhD in mathematics to understand. Since I had to spell this out for you, you probably fall on the spectrum.
>>
>>59936680
Haskell is a pretty simple language, I would even say it was made for retards.
>>
>>59925035
Haskell is mostly a toylanguage for academics, strings are just one example: consider how powerful is the type system in Haskell is, now consider how poor Haskell is processing text (one of the most common tasks of a computer program), finally ask your self why is that? the answer is in the history of Haskell and the reason why it was created by a bunch of type theorist wanting to implement one master FP language to rule em all. But even then, after 30 years you could think that the community would want to improve the situation, but no, they dont really give a shit. There is not even an usable package for OAuth2 in 2017!

Really, just forget Haskell and move to some productive language like OCaml, Elixir, or Rust.
>>
>>59936813
>consider how powerful is the type system in Haskell is
About as powerful as its string processing ability.
>>
>>59936847
>>59936813
>not using an indexed GADT for all major text encodings and using types that operate polymorphically on such a GADT for any given type parameters
>>
>>59936880
>GADTs
Plebeian trash.
>>
>>59936813
Haskell is pretty good at string processing.
I don't know what you are talking about.
>>
>>59937094
Yeah, Haskell is so good at text processing that it needs fucking Perl for some trivial regex:
https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Tools
>>
>>59938043
>Yeah, Haskell is so good at text processing that it needs fucking Perl for some trivial regex:
You meant to say "to bootstrap GHC"

But the state of regex in haskell is, questionable.
Mostly because they are generally frowned upon in the community.
>>
>>59938079
As they should be
>>
>>59935759
>But Idris itself is a pleb filter for Coq.
How so? And can Coq even do TCP socket I/O?
>>
>>59936813
>OCaml
You mean maybe F#. OCaml isn't where you go if you want usable OAuth2 packages and such. Its library situation is more dire than Haskell's.
>>
>>59938183
No, but if you for some strange reason need it you can extract the program to some other language and do it there.
I/O is mostly useless garbage anyway.
>>
>>59938333
>I/O is mostly useless garbage anyway.
Okay.
>>
>>59938260
>F#
>OCaml
They've got type systems which are even weaker than Haskell's, and that's pretty fucking hard to achieve.
>>
>>59938348
you try to make this joke multiple times every programming thread
>>
>>59938360
I believe this is the second time I have said this, and it isn't a joke by any stretch of the imagination.
>>
>>59938373
>second time i have said this
in this thread maybe
>>
>>59938373
>>>/tg/
>>
>>59938385
Is that so?
>>59938400
Don't be hasty anon
>>
>tfw there are only two HKT languages with libraries, and the other one is fucking Scala
Haskell may be flawed, but it isn't like you have much choice.
>>59938348
>that's pretty fucking hard to achieve.
You wish.
>>
>>59938260
What is wrong with OCaml's type system?
>>
Use clojure. 1000x better
>>
>>59940364
>Scala
Utter trash. Now I will have to try and forget this moment.
>Haskell may be flawed
That would be a massive understatement.
>but it isn't like you have much choice.
Why is that? It's not like I need a lot of libraries anyway, you can program just fine in bare-bones System F even.

>>59940506
You mean other than it being complete garbage?

>>59940560
Get the fuck out of here, you shit-eating moron.
>>
>>59940560
Clojure is fine, but it isn't relevant to this thread because it's unityped (core.typed ain't ready and no libraries use it).
>>
>>59940615
>You mean other than it being complete garbage?
I see no problem with it, can you provide an example?
>>
>>59940653
Clojure is fucking trash and should be banned and outlawed. Anyone who uses it should be publicly executed.
>>
>>59940695
It's unsound garbage. Also no HKTs, meaning it's a complete joke.
>>
>>59940697
Agreed.
Let the fucking JVM die already. Nobody needs that complete piece of shit.
>>
>>59940615
>>59940697
What's so wrong with it? I haven't ever used it, only know that it's some Lisp dialect compilable to JS.
>>
>>59940697
>>>/comp.lang.lisp/
>>
>>59940742
Why do you fucking retard say its better then?
Also clojure is not compatible to JS, but to the java virtual machine. Get the fuck out of here now, and go back to red.dit.
>>
>>59940802
Because I wasn't the original poster, gee. I thought you'd be smart enough to deduce that.
>>
File: 1481475088167.png (2MB, 1920x1080px) Image search: [Google]
1481475088167.png
2MB, 1920x1080px
Not sure what it is, but something about this thread gives me a warm feeling in my heart
>>
>>59940957
You are an intellectual coprophiliac and enjoy shitposting.
>>
File: 1483916387703.jpg (74KB, 577x682px) Image search: [Google]
1483916387703.jpg
74KB, 577x682px
>>59940982
Exactly the same can be said about you. But fine, I'm not poking the subject anymore.
>>
>>59940957
>>59941092
I like that you like anime and post in Haskell threads
>>
>>59940715
I see the point about HKTs, though I never really used them so I'm not really sure what I'm missing out on. About the unsoundess, however, don't unsound types appear only when you tinker with internal representations (Obj) or when you make non-terminating loop or terminate a computation (either with an exception or by terminating the whole program)?
>>
>>59941172
>though I never really used them so I'm not really sure what I'm missing out on
Languages which have them aren't that different in terms of difficulty to learn, so I don't really see any reason for this.
Using a shit language for certain reasons can be justified, but not using or at least knowing about good ones can't be.
>About the unsoundess ...
I should have said "inconsistent", any system where you can prove both P and not P is inconsistent. Just the possibility alone is enough.
>>
>>59941140
What does that even mean to you?
>>
>>59941092
>Exactly the same can be said about you.
Weak. I've actually only contributed serious posts to this shitshow of a thread. You, on the other hand, announced your presence with a full-screen PNG anime screenshot failed attempt at a reaction image and a worthless inane meta-comment about how you felt. Worse still, your feelings about this thread were incorrect.
>>
>>59941333
>I've actually only contributed serious posts to this shitshow of a thread.
This is comically wrong.
>a full-screen PNG anime screenshot failed attempt at a reaction image
Do you consider every image to be a reaction image? What (internet and first-hand) cultures taught you to be this way?
>worthless inane meta-comment about how you felt
I don't think it was worthless, and you clearly agree. I don't think you realize that yourself, though.
>your feelings about this thread were incorrect
And why is that?
>>
>>59941427
capped
>>
>>59941299
>I don't really see any reason for this
I just started with OCaml first. I'm starting learning Haskell now.
>>
>>59929578
patrician detected
>>
>>59941475
Just keep in mind that Haskell is merely a stepping stone for learning better languages like Idris.
>>
>>59941588
Okay.
>>
>>59941588
more like useless shit toy languages.
Out of good (truly) functional languages, haskell is the only one not useless anymore.
>>
>>59942196
if it's not useless then it's shit
we must stop haskell from becoming useful
>>
Fuck this gay shit. We need a type theory captcha on this board.
Thread posts: 86
Thread images: 7


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.