Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The FTP fiasco

Name: Anonymous 2015-10-14 7:24

Isn't it hilarious? But the real question is, why are Haskallers so stupid? seriously, it's almost like they want to shit all over what took them decades to build...

Name: Anonymous 2015-11-03 4:18

fuck the police

Name: Anonymous 2015-11-03 19:19

>>13,15
Foldable is just ToList, Traversable is just ToListApplicative. For a language that is so crazy about linked lists, the adoption of those classes into Prelude is only logical. It would make sense for Lisp, too, but Lisp just cannot into typeclasses.

Name: Anonymous 2015-11-03 20:02

>>42
It's also an examplar abstraction creep.
See, a class for fold sure does help a lot: pretty much every agelbraic type can be folded and you can even mechamically derive fold for them too, but why the hell does Foldable have fucking length in it?

Name: above top kek 2015-11-03 20:41

>>43
fold has a very different type for each algebraic type though.. it's not something you can abstract over with a class

Name: Anonymous 2015-11-03 22:51

>>43
because length = foldl (const . (+1)) 0

Name: Anonymous 2015-11-04 9:00

>>45
Well I mean why just let List keep length and call the Foldable equivalent total or something? Because the name length implies some sort of sequential linear structure, while a Tree can be Foldable too.
>>44
it's not something you can abstract over with a class
You can if you restricted it to type constructors with kind *->*, and Foldable does just this.
class Foldable f where foldr::(a->b->b)->b->f a->b

Doesn't stop Foldable from being a convoluted OVER-ENGINEERED piece of shitware.

Name: Anonymous 2015-11-04 9:42

>>43
Because Foldable is ToList. If a data structure is coercible to a list, then there obviously is a way to define length for it.

Name: Anonymous 2015-11-04 9:44

>>46
Being a member of Foldable already implies some sort of sequential linear structure, whether it's a tree or not is irrelevant. If it's listable, there is length of it.

Name: Anonymous 2015-11-04 13:44

>>48
No it doesn't you monkey, it just says there is a structure-preserving map from some initial algebra to some other algebra. It implies nothing of there being a measure that corresponds to the length.

data Expression = Number Int
| Add Expression Expression
| Minus Expression
| Mult Expression Expression
| Divide Expression Expression

Name: Anonymous 2015-11-04 14:09

>>46
that's not a proper fold though, as 47 its a shittly listlike structure. Don't let them use 'advanced' names like Fold trick to you into thinking there's anything clever going on here. It's java level unprincipled bad design.

Name: Anonymous 2015-11-04 14:14

>>49
don't conflate category theory ideas like inital alegebras and folds with the cappy 'likelist' typeclass they've come up with and happened to call fold.

exercise:
(1) Define a foldable instance on your Expression a type (change it so Number Int is Number a).
(2) Remember how in category theory the identity function is an example of a fold? Define that using foldr :: (a->b->b)->b->f a->b

1 is possible of course but 2 is not, because it's not a real fold.

fuck what these people are doing to destroy this once beautiful language. Seriously? Am I the only one seeing this happening? They keep moving further and further away from mathematically justified things.

Name: Anonymous 2015-11-04 14:24

>>49
You're converting a datastructure to a finite list. All finite lists have lengths. Which fucking part don't you understand, caveman?

Name: Anonymous 2015-11-04 15:13

>>51
mathematically justified things.
Yeah, like Num. All of my category theory books say that numbers must have functions for negation and conversion to strings.

Name: Anonymous 2015-11-04 16:18

>>53
I agree Num is and has always been shit. I don't think that invalidates my other point though.

Name: Anonymous 2015-11-04 16:56

real fold
you mena CATAMORPHISM

Name: Anonymous 2015-11-04 17:07

Haskell is deprecated.
Install Rust today!

Name: Anonymous 2015-11-04 23:44

fold my anus

Name: Anonymous 2015-11-05 11:23

CATAMORPH MY ANUSMORPHISM

Name: Anonymous 2015-11-05 13:18

>>58
I prefer Analmorphisms.

Name: Anonymous 2016-11-01 19:00

it's just a trick to invalidate the old books and sell new books

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List