Note: This channel on freenode is currently not being logged anymore. The logs are reproduced here for posterity.

2020-09-16 22:29:03 +0200 <hyperisco> this is like saying oh, parametric polymorphism is just templates
2020-09-16 22:29:33 +0200 <tomsmeding> well, c++ templates with c++20 concepts get somewhere in the right direction
2020-09-16 22:29:51 +0200 <tomsmeding> though it's a more bloated and idiosyncratic version :)
2020-09-16 22:29:55 +0200 <lc_> Hyperisco if you know something interfaces cant do that typeclasses can, tell me then
2020-09-16 22:29:56 +0200 <ski> lc_ : the "object" part in your description isn't there, for type classes
2020-09-16 22:29:57 +0200 <hyperisco> minus the whole "parametric" part
2020-09-16 22:30:16 +0200 <hyperisco> lc_, an interface is a type, a type class is not a type, for one
2020-09-16 22:30:52 +0200 <Graypup_> a type class can be used as a constraint but it is not a type
2020-09-16 22:31:22 +0200 <tomsmeding> hyperisco: a Go interface is not a type
2020-09-16 22:31:43 +0200 <tomsmeding> at least
2020-09-16 22:31:46 +0200 <hyperisco> okay, I was referring to Java-like interfaces, and I don't know Go, but we can go on to other differences as soon as I know what a Go interface is
2020-09-16 22:31:59 +0200 <tomsmeding> lc_: can you write a method that takes a particular type T that must be both Read and Write?
2020-09-16 22:32:17 +0200 <tomsmeding> hyperisco: a Go interface is approximately a C++ concept :)
2020-09-16 22:32:21 +0200 <Graypup_> a go interface (as a non go programmer so boulder of salt etc) is a set of methods that you are saying a type has, and you accept things that have it
2020-09-16 22:32:28 +0200 <Graypup_> which is, yeah, ≈ a C++ concept
2020-09-16 22:32:53 +0200 <lc_> You can make that interface. But that reminds me of a constraint for interfaces, where you can't really "combine them", e.g. you cant say input to function f must satisfy x y and z interfaces
2020-09-16 22:33:01 +0200 <tomsmeding> ah
2020-09-16 22:33:08 +0200 <hyperisco> last I grazed C++, concepts were just a figment of C++14's imagination
2020-09-16 22:33:16 +0200 <lc_> So that's a genuine constraint, and people make specialty interfaces to get around that. But they're kinda similar
2020-09-16 22:33:17 +0200 <Graypup_> they exist as of C++20
2020-09-16 22:33:19 +0200 <tomsmeding> whereas in haskell, I can write a function: foo :: (Read a, Write a) => a -> Something
2020-09-16 22:33:24 +0200 <lc_> Exactly
2020-09-16 22:33:30 +0200 <lc_> We have to have a ReadWriter for that
2020-09-16 22:33:34 +0200 <hyperisco> well congratulations to them
2020-09-16 22:33:48 +0200 <hyperisco> the end of error novels?
2020-09-16 22:33:59 +0200 <tomsmeding> hyperisco: it's c++
2020-09-16 22:34:03 +0200 <Graypup_> lmao
2020-09-16 22:34:12 +0200 <Graypup_> haskell also has error novels
2020-09-16 22:34:14 +0200 <hyperisco> alright so that hype was overhype
2020-09-16 22:34:15 +0200 <Graypup_> IME
2020-09-16 22:34:24 +0200gestone(~gestone@c-73-97-137-216.hsd1.wa.comcast.net)
2020-09-16 22:34:25 +0200 <tomsmeding> though I've had haskell errors that don't fit on a screen too
2020-09-16 22:34:28 +0200 <ski> tomsmeding : or `read :: Read a => String -> a'
2020-09-16 22:34:37 +0200 <Graypup_> haskell errors are crap compared to rust errors
2020-09-16 22:34:51 +0200borne(~fritjof@200116b864b6860060095f4622ae75c8.dip.versatel-1u1.de)
2020-09-16 22:35:01 +0200 <rustisafungus> Graypup_: yeah i think many in the haskell community recognize that it would be worthwhile investing in developer ergonomics
2020-09-16 22:35:09 +0200 <tomsmeding> ski: or is that really a feature of parametric polymorphism?
2020-09-16 22:35:14 +0200 <hyperisco> okay but "error novel" is like, I hope your terminal has a large enough buffer for this
2020-09-16 22:35:15 +0200 <lc_> I retract my statement about them being exactly the same thing. They are exactly the same thing conditional on being able to assert multiple interfaces per variable. But it is correct to call them "interfaces"
2020-09-16 22:35:21 +0200 <maerwald> Graypup_: not so fast
2020-09-16 22:35:21 +0200 <tomsmeding> you can't write 'read' in Go I think
2020-09-16 22:35:33 +0200 <maerwald> borrow checker errors can be quite confusing too
2020-09-16 22:35:42 +0200 <ski> tomsmeding : type classes depend on parametric polymorphism
2020-09-16 22:36:07 +0200 <Graypup_> that's true but they're doing their best. haskell has too fancy of types to have good errors I suspect
2020-09-16 22:36:32 +0200 <ski> lc_ : how would you call the method of an interface, if there's no object to call it on ?
2020-09-16 22:36:47 +0200 <hyperisco> lc_, if "interface" is meant loosely then I don't disagree. It is just a common tripping point when someone believes type classes = OOP interfaces, or other notions of "interface"
2020-09-16 22:37:06 +0200 <dolio> For some reason, people complain about GHC's errors, and the response seems to be to put ever more information in them. :)
2020-09-16 22:37:11 +0200 <maerwald> Graypup_: you don't have to use that jazz
2020-09-16 22:37:18 +0200 <tomsmeding> lc_: with ski's help, I think indeed the Read type class is a good example of something that doesn't map well to Go
2020-09-16 22:37:24 +0200 <Graypup_> maerwald, yesod go brrr
2020-09-16 22:37:32 +0200 <dolio> Even though it seems like the opposite would be better.
2020-09-16 22:37:44 +0200aenesidemus_(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net)
2020-09-16 22:37:56 +0200 <maerwald> Graypup_: that's exactly why I don't use it
2020-09-16 22:38:11 +0200 <hyperisco> GHC would have great errors probably if everyone stopped using so much inference
2020-09-16 22:38:46 +0200 <dolio> I don't know about that.
2020-09-16 22:38:50 +0200 <Graypup_> maerwald, well I didn't choose to get hired working on a yesod project, and honestly didn't have much of a choice anyway haha
2020-09-16 22:39:02 +0200gestone(~gestone@c-73-97-137-216.hsd1.wa.comcast.net) (Ping timeout: 260 seconds)
2020-09-16 22:39:02 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 260 seconds)
2020-09-16 22:39:15 +0200 <maerwald> yeah, you might as well go back to Java
2020-09-16 22:39:27 +0200 <lc_> Anyone here got any thoughts about using golang vs. Haskell in a production environment. I come close to switching a lot, but I really don't like meme chasing
2020-09-16 22:39:31 +0200 <tomsmeding> maerwald: that escalated quickly
2020-09-16 22:39:32 +0200 <Graypup_> java has better errors and doesn't require a PhD to understand the type theory
2020-09-16 22:39:38 +0200 <hyperisco> tomsmeding, looks like an interface is a type in Go
2020-09-16 22:39:41 +0200 <Graypup_> oops a controversial statement
2020-09-16 22:39:49 +0200 <maerwald> tomsmeding: that was sarcasm towards yesod
2020-09-16 22:39:52 +0200 <dolio> I don't have a PhD.
2020-09-16 22:40:12 +0200 <dolio> Neither does SPJ, I think.
2020-09-16 22:40:16 +0200 <sm[m]> new-to-you ghc errors can suck, but ghc errors you see repeatedly in production code soon become a non-problem
2020-09-16 22:40:18 +0200 <hyperisco> you can mail my honorary PhD to my PO box
2020-09-16 22:40:35 +0200 <tomsmeding> Graypup_: true, but there's metric tonnes of stuff you can do in haskell that you can't in java :p
2020-09-16 22:40:38 +0200 <tomsmeding> in terms of abstractions
2020-09-16 22:41:11 +0200 <maerwald> lc_: if you like to live in microservice hell, Go is your first choice
2020-09-16 22:41:29 +0200 <hyperisco> lc_, imo that depends on the project. If Go has the right libraries and ecosystem already for the job then have at it
2020-09-16 22:41:32 +0200 <tomsmeding> dolio: SPJ has a honorary doctorate
2020-09-16 22:41:39 +0200 <dolio> Ah, okay.
2020-09-16 22:41:50 +0200aenesidemus(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
2020-09-16 22:42:06 +0200aenesidemus(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net)
2020-09-16 22:42:14 +0200pfurla(~pfurla@ool-182ed2e2.dyn.optonline.net)
2020-09-16 22:42:16 +0200 <Graypup_> tomsmeding, well I literally work on a webapp that has a logic checker embedded in it so...
2020-09-16 22:42:18 +0200aenesidemus_(~aenesidem@c-73-53-247-25.hsd1.fl.comcast.net) (Ping timeout: 260 seconds)
2020-09-16 22:42:24 +0200 <Graypup_> yeah java is a no go
2020-09-16 22:42:25 +0200 <rustisafungus> it would be nice if there was a way to do away with the "libraries" entrechment phenomenon to promote language innovation
2020-09-16 22:42:51 +0200 <lc_> maerwald: Completely incorrect. I work on a golang project that is almost entirely a monolith besides its dependencies on NIH apis and infra
2020-09-16 22:43:09 +0200 <monochrom> Graypup_, I think your experience about advanced types is due to using some of the web frameworks that go crazy with advanced types, and is not representative of what other people experience, certainly not what I experience.
2020-09-16 22:43:10 +0200 <lc_> why anyone would suggest that golang --> microservices beyond the fact that its easy to use the http libraries is beyond me
2020-09-16 22:43:15 +0200 <maerwald> lc_: how does that make my statement incorrect
2020-09-16 22:43:21 +0200 <tomsmeding> lc_: maerwald said microservices -> go, but go -> microservices
2020-09-16 22:43:23 +0200 <maerwald> I didn't talk about your work project :)
2020-09-16 22:43:23 +0200 <tomsmeding> ;)
2020-09-16 22:43:30 +0200 <tomsmeding> s/but/not/
2020-09-16 22:43:45 +0200 <lc_> you got me there
2020-09-16 22:44:00 +0200 <monochrom> But I don't speak badly of Java either because Java has a better exception system.
2020-09-16 22:44:08 +0200 <maerwald> indeed
2020-09-16 22:44:17 +0200 <maerwald> But I still speak badly of it :)
2020-09-16 22:44:26 +0200 <dolio> Yeah, I don't really have many problems with weird type errors. I mainly don't find the list of information about everything in scope in a where clause very useful, and such like.
2020-09-16 22:44:27 +0200 <hyperisco> I read recently how the exception system is terrible in Java and how Haskell does it better, lol
2020-09-16 22:44:46 +0200 <monochrom> We can all speak badly about a bad aspect, as opposed to a whole language.
2020-09-16 22:44:49 +0200 <hyperisco> my experience with checked exceptions is checkered
2020-09-16 22:44:53 +0200 <maerwald> hyperisco: haskell has an exception system?
2020-09-16 22:45:04 +0200 <hyperisco> as a library sure