Live data from Hacker News

Typelevel Scala

github.com

41–50 of 57 posts

Re: Typelevel Scala

#41
post #38
post #8

Earlier quoted context omitted.

The Typelevel Scala is nothing more than a branch on which experiments can happen before pull requests are made in the main branch. The people involved have already contributed fixes, like the following by Miles Sabin, which is huge and will make Scala much better: https://github.com/scala/scala/pull/5102 - so basically we've got here a bunch of people that are extremely productive, working for free for the bettermen…

> This is basically anti-intellectualism, the same kind of attitude that made Trump popular and that encouraged Brexit. > its essence just because we're afraid of big words and the opinions of experts. I think most of the distaste for terms like Monad, is a failure to communicate it's meaning to a lot of people, it reminds me a lot of Enterprise Java terminology with terms like factories, abstract/factories, Bean, ec…

That Elm talk is really interesting. Tx.

When it comes to Monad et al I'm reminded of this talk by Gilad Bracha. He points out that the function names and type names that stem from category theory are not very good at communicating their intent in programming. (my words) Monad could be named Flatmappable f.i. 'unit' and 'bind' can have more intuïtive names as well.

At the moment I get the impression that as Scala is becoming a safe and productive and widely used tool there are developers moving to more Haskell like pastures within Scala. Perhaps because that kind of programming is required for some specific problems. But quite likely as well because they hope that it will make them stand out as smarter programmers.

Some people may remember the so called "Peters principle". Informally it states that people get promoted until they've reached their level of incompetence.

Similarly some smart developers tend to increase the complexity of their code to keep themselves amused until they're struggling to understand it themselves. Joosts principle. :-)

Edit: the link to the talk https://www.infoq.com/presentations/functional-pros-cons

Re: Typelevel Scala

#42

Earlier quoted context omitted.

OOP hate is common these days, but I always has been an OOP enthusiast. I used to write in Smalltalk, I implemented a few metaobject protocols of my own, and I think OOP had deserves its success (unfortunately, C++/Java is not really OOP... However, some principles still apply). So, when a language appeared to combine the best ideas from FP and OOP, I happily embraced it. And I want it to stay this way.

Scala is a really great OO language, enabling very useful statically typed mixin compositions that you won't find in any other language. Uunfortunately, the vocal side of the community is very much anti OOP, so you don't hear about them much, but it is still there.

There are many excellent non-OO functional languages like Haskell, where functional concepts are mapped to much more elegant syntactic devices, having not much to do with OOP. There, ADTs are not expressed as "case classes", there's no need for implicits and coercions to enable type classes, and one can speak the word "monad" freely and bravely.

However, Scala is not Haskell. Scala's raison d'être is merging FP and OOP, and it excels at it. I'd like to leave it this way.

Re: Typelevel Scala

#43

Earlier quoted context omitted.

How are Cats and Scalaz different? I haven't played with Cats lately, but last I looked it was just a reimplementation of Scalaz. Typelevel didn't even want to fork Scalaz to begin with. That was only their plan B, plan A was to take over the community with code of conduct/social justice shenanigans, and then expel people they didn't like. The fork is just what they came up with after dibblegate failed.

This desperate rewriting of history is one if the reasons why large parts of the Scala community are happy to get rid of these nutjobs. They need to move their lazy asses to Haskell and start fixing and implementing the tooling there instead of enjoying their free ride in Scala while constantly shitting on the language and its community.

It's not a rewriting of history. The dibblegate conflict occurred at the end of 2014.

https://groups.google.com/forum/#!topic/scalaz/9X_putSGoCY

https://groups.google.com/forum/#!searchin/scalaz/code$20of$...

Calling Tony Morris a rapist was probably the highlight of the affair: https://twitter.com/shajra/status/544712807220908032

Up until they realized they couldn't take over the community, Lars Hupel and Miles Sabin had no publicly stated plans to leave Scalaz.

Cats initial commit is early 2015.

https://github.com/typelevel/cats/commits/master?page=74

I have no idea why everyone dislikes them so much. I use Scalaz, and it's pretty great. From what I've seen Cats is nearly the same thing, I just saw no reason to switch. In what way do you believe Cats is significantly different from Scalaz, beyond the fact that you apparently dislike the people involved?

Incidentally, scalaz-streaming was also pretty nice - mathematically I liked it but it was simply not as performant as Akka streaming. I'd love to use it if it becomes fast.

Re: Typelevel Scala

#44

Earlier quoted context omitted.

OOP hate is common these days, but I always has been an OOP enthusiast. I used to write in Smalltalk, I implemented a few metaobject protocols of my own, and I think OOP had deserves its success (unfortunately, C++/Java is not really OOP... However, some principles still apply). So, when a language appeared to combine the best ideas from FP and OOP, I happily embraced it. And I want it to stay this way.

Sometimes you really need to drop into mutation of state in perf critical paths

There are great tools for that in both Scala and Haskell.

In Scala you can use var, which is easy.

In Haskell you can write your algorithm using ST and then use it as a pure function by means of runST. The type system guarantees that all such state is local to the invocation.

Re: Typelevel Scala

#45
post #3

I am not happy about it. Typelevel projects are just porting the style familiar to Haskell programmers to Scala, and a full fork to accomodate this style seems to be an overkill. I know, many people are happy to go full throttle on Cats/Scalaz/whatever, but there's already Haskell for that. Official Scala documentation never even mentions the word "monad" (not even once!), and I think this is a good thing.

actually without some concepts its pretty hard to not have boilerplate code. I mean OptionT and maybe OneAnd is pretty useful.

Re: Typelevel Scala

#46

Earlier quoted context omitted.

http://stackoverflow.com/questions/3870088/a-monad-is-just-a...

The link you provided contains two precise definitions of the term "monad" in the responses (one which includes the source of the "a monad in X is just a monoid in the category of endofunctors of X" quote). Was it your intent to support @infinity0's premise that words like "monad" are not elitist? If so, well done! If not, then I humbly ask why is a term such as monad qualified as elitist, yet terms such as Abstract…

> If not, then I humbly ask why is a term such as monad qualified as elitist, yet terms such as Abstract Syntax Tree[0], Big O notation[1], and Turing complete[2] are not?

The preciseness of the definition has nothing to do with the perceived elitism. Plenty of precisely mathematically defined concepts, as you've illustrated, can be (and are) explained to people without ever needing a single glyph or axiom in the explanation, let alone a recursive terminology briefer.

Take the following two definitions:

1) A screw is a mechanical device that converts rotational motion to linear motion, and torque to a linear force.

2) A screw is something you use to attach stuff to walls. You use a screwdriver to mash it in there.

One is abstract yet precise. The other is non-abstract and imprecise...so imprecise that it might as well be wrong. Regardless of its cringe induction potential to the Haskell-lovers brain, only one of these definitions will hold the attention of a 4 year old and explains why they're useful and how to use them.

The simple fact of the matter is that people in general are bad at math, and even most people who think they are "good at math" have no fucking clue what category theory is...good luck holding their attention while you brief them on it. Nobody learns abstract before non-abstract, it's just not how brains work. If you give them a reason to hold on to the concept, and explain it with words they likely understand, you might get far enough to one day explain the abstract version.

Re: Typelevel Scala

#47

Earlier quoted context omitted.

This desperate rewriting of history is one if the reasons why large parts of the Scala community are happy to get rid of these nutjobs. They need to move their lazy asses to Haskell and start fixing and implementing the tooling there instead of enjoying their free ride in Scala while constantly shitting on the language and its community.

It's not a rewriting of history. The dibblegate conflict occurred at the end of 2014. https://groups.google.com/forum/#!topic/scalaz/9X_putSGoCY https://groups.google.com/forum/#!searchin/scalaz/code$20of$... Calling Tony Morris a rapist was probably the highlight of the affair: https://twitter.com/shajra/status/544712807220908032 Up until they realized they couldn't take over the community, Lars Hupel and Miles Sabi…

I have no idea what you are even trying to argue.

Why would they create cats while they still had hope to save scalaz from its community? No need to spin some crazy conspiracy.

> you apparently dislike the people involved

LOL WTF? That guy has single-handedly destroyed more than one community already. It's not like it's some unfortunate thing that accidentally happens. It has happened before, and will keep happening until he is shown the door for good.

The rest of the scalaz community are enabling him to keep doing his toxic shit. The faster scalaz goes the way of Lift, the better.

I judge people for using scalaz. If you think it is acceptable to keep enabling him, you are a bad human being.

Re: Typelevel Scala

#48

Earlier quoted context omitted.

It's not a rewriting of history. The dibblegate conflict occurred at the end of 2014. https://groups.google.com/forum/#!topic/scalaz/9X_putSGoCY https://groups.google.com/forum/#!searchin/scalaz/code$20of$... Calling Tony Morris a rapist was probably the highlight of the affair: https://twitter.com/shajra/status/544712807220908032 Up until they realized they couldn't take over the community, Lars Hupel and Miles Sabi…

I have no idea what you are even trying to argue. Why would they create cats while they still had hope to save scalaz from its community? No need to spin some crazy conspiracy. > you apparently dislike the people involved LOL WTF? That guy has single-handedly destroyed more than one community already. It's not like it's some unfortunate thing that accidentally happens. It has happened before, and will keep happening…

If you scroll up, you'll see I was replying to this:

it's desperate desire to turn Scala into Haskell ends up turning an awesome ML-inspired language into a vastly inferior religious (...ahem, pure) language. But Cats and Shapeless aren't Scalaz.

I claim that from a technical perspective they are more or less equivalent and they only forked due to a feud. So if you want to avoid Haskell-inspired constructs in Scalaz, Cats won't be much to your liking either.

Glad we are on the same page!

Re: Typelevel Scala

#49

Earlier quoted context omitted.

I have no idea what you are even trying to argue. Why would they create cats while they still had hope to save scalaz from its community? No need to spin some crazy conspiracy. > you apparently dislike the people involved LOL WTF? That guy has single-handedly destroyed more than one community already. It's not like it's some unfortunate thing that accidentally happens. It has happened before, and will keep happening…

If you scroll up, you'll see I was replying to this: it's desperate desire to turn Scala into Haskell ends up turning an awesome ML-inspired language into a vastly inferior religious (...ahem, pure) language. But Cats and Shapeless aren't Scalaz. I claim that from a technical perspective they are more or less equivalent and they only forked due to a feud. So if you want to avoid Haskell-inspired constructs in Scalaz,…

And if you scroll up, you'll see that this wasn't me.

I don't have issues with Haskell-inspired constructs, I have issues with Haskell-inspired behavior.

Re: Typelevel Scala

#50

Earlier quoted context omitted.

This isn't as bad as it looks. Think of it like an additional experimental scalac that is more ready to integrate into mainline scala than Dotty is. I'm fully on board with you...I think Scalaz as a library is a virus, and it's community is toxic, and it's desperate desire to turn Scala into Haskell ends up turning an awesome ML-inspired language into a vastly inferior religious (...ahem, pure ) language. But Cats an…

The overlap between cats and scalaz is gigantic idk why you seem to think they are distinct? I'd bet that the overlap between the most commonly used parts of cats and scalaz is even larger. The main thing scalaz has that cats doesn't is scalaz.concurrent.Task, and there are multiple typelevel-endorsed alternatives to it being worked on as well (in monix and fs2). Task is wonderful btw. fwiw we use scalaz at work and…

The main thing that scalaz has that cats doesn't is Tony Morris.
Post reply on HN