Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-04-07 01:36:24 <solvr> FP excels in closed systems. OOP is better as the metaphor between those closed systems
2021-04-07 01:36:53 <solvr> Do we need threads in a closed system... sure. Not always, but sure.
2021-04-07 01:36:59 gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net)
2021-04-07 01:37:02 <solvr> But OOP is also naturally concurrent.
2021-04-07 01:37:07 <solvr> Especially the actor model.
2021-04-07 01:37:57 <dibblego> oh gawd
2021-04-07 01:38:33 <Axman6> I wouldn't conflate OOP and the actor model, at least as far as most people understand OOP today. they are certainly related, and in many the actor model much better adhears to the original ideas of OOP, but when you start talking about Java we're way off from where I would like to be
2021-04-07 01:38:41 stree joins (~stree@68.36.8.116)
2021-04-07 01:40:38 <solvr> Java is not strictly OOP, hasn't been for a long time. It's mixed paradigm. Can do FP, can do procedural, can do actors, can do "OOP as abstract data structures" which is probably what you don't like.
2021-04-07 01:41:30 <solvr> The thing about immutability is that it's great when you want it.
2021-04-07 01:41:42 <solvr> But not as something forced upon you.
2021-04-07 01:43:29 <Axman6> who says it's being forced on anyone?
2021-04-07 01:43:34 <c_wraith> Which is why Haskell has mutable stuff
2021-04-07 01:43:41 <monochrom> What is the purpose of this discussion?
2021-04-07 01:44:00 <c_wraith> To attack a straw man unrelated to any real language, probably
2021-04-07 01:44:33 <monochrom> Am I right in that dibblego's question was never answered?
2021-04-07 01:45:54 <dibblego> It appears: To hold and express an opinion on a subject, without having to come to understand the subject, and with peer support of the position. This is disappointing :(
2021-04-07 01:46:28 <monochrom> Yeah. That's what's wrong with social media.
2021-04-07 01:46:47 <monochrom> https://www.smbc-comics.com/comic/app-3 applies.
2021-04-07 01:46:49 <dibblego> right, remember when #haskell was not social media? *jumps in joy*
2021-04-07 01:47:17 <monochrom> New mission for #haskell: Avoid social media success at all costs. >:)
2021-04-07 01:47:31 <dibblego> I support this mission
2021-04-07 01:48:33 nbloomf joins (~nbloomf@2600:1700:ad14:3020:ccca:5598:c03f:71de)
2021-04-07 01:49:49 <solvr> I just want a happy middleground where fp/oop/imperative/relational co-exist in one shared paradigm.
2021-04-07 01:50:45 <monochrom> Have you even studied the expression problem? which puts a bound on how well two things can coexist.
2021-04-07 01:52:11 × zebrag quits (~inkbottle@aaubervilliers-651-1-244-162.w83-200.abo.wanadoo.fr) (Ping timeout: 240 seconds)
2021-04-07 01:52:29 <monochrom> I am unsympathetic to hiding behind the façade of "discussions and debates" when one hasn't done their share of due diligence, and instead merely exhibit the shallow news reporter behaviour of "I heard this from somewhere, what do you think?", which is a sorry excuse for "discussions and debates".
2021-04-07 01:53:06 <solvr> monochrom, one of the biggest problems to resolve in programming is scaling the complexity of a system while keeping performance and defects in check
2021-04-07 01:53:33 <solvr> monochrom, to think about complex systems as a single "expression" would be to miss their nature entirely
2021-04-07 01:53:57 <monochrom> Are you done?
2021-04-07 01:54:06 Axman6 is trying to find where monochrom claimed that
2021-04-07 01:54:35 <solvr> Well if monochrom doesn't claim that, then the expression problem doesn't apply
2021-04-07 01:54:45 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
2021-04-07 01:55:03 <Axman6> it clearly applies, what on earth are you talking about
2021-04-07 01:55:39 <monochrom> I want to tell you about a formalism that I call the Markov-Mealy chain.
2021-04-07 01:56:00 glguy pulls up a chair
2021-04-07 01:56:03 <monochrom> It simply means a cross of a Markov chain and a Mealy machine. >:)
2021-04-07 01:56:51 <solvr> The expression problem is about extensibility in fixed boundaries. A system is a hierarchy of collections of boundaries.
2021-04-07 01:57:19 <solvr> Case in point, every FP is implemented on imperative procedural machines.
2021-04-07 01:57:26 <solvr> No expression problem somehow
2021-04-07 01:57:27 <monochrom> But I can't be the first one to think up this hybrid. Do you know of a more standard name?
2021-04-07 01:57:48 <dibblego> FWIW, I once read something from Brian Goetz — it was a friend of mine spending hundreds of comments trying to teach him the Maybe data type. That was the last time.
2021-04-07 01:58:28 <solvr> dibblego, oh yeah, he doesn't understand the Maybe type. Sure.
2021-04-07 01:58:40 <Axman6> starting off with the meme that people don't want to use monads... when they literally use monads every single day of their lives didn't help his argument
2021-04-07 01:58:52 <dibblego> haha you read the same thread :)
2021-04-07 01:59:59 Alleria joins (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com)
2021-04-07 02:00:22 Alleria is now known as Guest59918
2021-04-07 02:00:28 <solvr> Axman6, just because IO for ex. is a monad in Haskell, doesn't make IO a monad in Java.
2021-04-07 02:00:46 <Axman6> doesn't it?
2021-04-07 02:00:54 <monochrom> Nothing makes a monad in Java. There is no monad there.
2021-04-07 02:01:01 <solvr> No it absolutely doesn't. you confuse your mental map with the actual thing.
2021-04-07 02:01:10 <dibblego> Yes it is.
2021-04-07 02:01:15 <Axman6> they couldn't even make Optional a law abiding monad in Java -_-
2021-04-07 02:01:29 <monochrom> But don't read this as a criticism on Java. Java has other strengths, but not shoehorning monads.
2021-04-07 02:01:45 <dibblego> http://www.functionaljava.org/javadoc/4.8.1/functionaljava/fj/data/IOW.html
2021-04-07 02:02:01 <dibblego> witness for the monad is carried; see if for yourself, or don't
2021-04-07 02:03:16 <solvr> Axman6, behold as Optional works while not being a "law abiding monad"
2021-04-07 02:03:29 <solvr> Axman6, likewise for Promises in JS and so on
2021-04-07 02:03:33 <Axman6> "works" for some poor definition of works
2021-04-07 02:03:50 <solvr> Axman6 "poor" for some subjective definition of poor
2021-04-07 02:03:57 <glguy> How does all this tie back to #haskell?
2021-04-07 02:03:57 <Axman6> who would want to represent Just null anyway
2021-04-07 02:04:31 × Guest59918 quits (~textual@2603-7000-3040-0000-c5e8-81b5-bd49-f2bd.res6.spectrum.com) (Ping timeout: 250 seconds)
2021-04-07 02:06:33 Tario joins (~Tario@201.192.165.173)
2021-04-07 02:06:42 <dibblego> it doesn't work — that is why I just deleted it today, out of a java project
2021-04-07 02:06:43 <Axman6> I _think_ the original argument was something along the lines of "immutable by default is wrong", which is clearly nonsense. but if it were true, we're all wrong, and we should feel wrong
2021-04-07 02:07:19 juri__ joins (~juri@212.86.35.156)
2021-04-07 02:08:06 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
2021-04-07 02:09:09 <solvr> It was not the original argument.
2021-04-07 02:09:39 <solvr> But let's say that immutable by default would be less of a nonsense if we poured and burned RAM in our computers like you pour and burn gas in your car.
2021-04-07 02:09:58 <dibblego> no, let's not say that please — this is #haskell
2021-04-07 02:10:24 <Axman6> the opening sentense of your quote is trivially wrong, so it's hard to see how you're operating from a solid foundation of the facts of whatever point it is you're trying to make
2021-04-07 02:10:30 × juri_ quits (~juri@79.140.114.222) (Ping timeout: 265 seconds)
2021-04-07 02:10:45 <monochrom> Could we all just stop this please.
2021-04-07 02:11:45 <olligobber> so I looked at how the Q monad works, and so I wrote my N type: `newtype N = N {runN :: forall n. Num n => n}', and even gave it a Num instance
2021-04-07 02:12:13 <Axman6> Where's the Q monad come from?
2021-04-07 02:12:13 <olligobber> this feels like some sort of dark magic
2021-04-07 02:12:20 <olligobber> Templat Haksell
2021-04-07 02:12:38 <olligobber> https://hackage.haskell.org/package/template-haskell-2.17.0.0/docs/Language-Haskell-TH.html
2021-04-07 02:12:50 <olligobber> it's defined as `newtype Q a = Q { unQ :: forall m. Quasi m => m a }'
2021-04-07 02:12:55 <Axman6> Thought you were talking about that quantum computation monad
2021-04-07 02:13:18 <olligobber> nah
2021-04-07 02:13:34 <monochrom> What does Num have to do with Q?
2021-04-07 02:13:54 <glguy> olligobber, made his 'N' in the style of 'Q'
2021-04-07 02:13:55 <olligobber> Q is defined as the Quasi type, so I made N the Num type
2021-04-07 02:14:24 <olligobber> N can do anything any Num can, and then later you runN to get a particular value out
2021-04-07 02:14:43 <olligobber> correction, N can do anything all Nums can
2021-04-07 02:14:45 <glguy> olligobber, It's a bit the other way around though, N can *only* do things Num can
2021-04-07 02:14:49 <olligobber> yeah
2021-04-07 02:15:14 <olligobber> it feels wrong somehow
2021-04-07 02:15:20 <glguy> % newtype N = N {runN :: forall n. Num n => n}
2021-04-07 02:15:20 × shachaf quits (~shachaf@unaffiliated/shachaf) (Remote host closed the connection)
2021-04-07 02:15:20 <yahb> glguy:
2021-04-07 02:15:55 <olligobber> especially when you look at the instances of Quasi and it only gives IO (which is incomplete) and Q (which is ...)
2021-04-07 02:16:03 <Axman6> I wish yahb would say something when defining things, like "It is defined"
2021-04-07 02:16:15 <olligobber> % runN (1 + 2 :: N)
2021-04-07 02:16:15 <yahb> olligobber: ; <interactive>:60:9: error:; * Could not deduce (Num N) arising from a use of `+'; from the context: Num n bound by the inferred type of it :: Num n => n at <interactive>:60:1-17; * In the first argument of `runN', namely `(1 + 2 :: N)'; In the expression: runN (1 + 2 :: N); In an equation for `it': it = runN (1 + 2 :: N)
2021-04-07 02:16:20 <olligobber> oh right
2021-04-07 02:16:21 <olligobber> um
2021-04-07 02:16:28 <olligobber> % instance Num N where { N x + N y = N $ x + y; N x * N y = N $ x * y; abs (N x) = N (abs x); signum (N x) = N (signum x); fromInteger = N . fromInteger; negate (N x) = N (negate x)}

All times are in UTC.