juan_gandhi: (Default)
[personal profile] juan_gandhi
is not with algorithms; there's hardly any algorithm that is hard to implement, once it's clearly formulated.
And it is probably not even performance, since it is another algorithm issue.

It is our struggle with monads. With monads that don't commute.

That's what makes Haskell so good (and so hard): it makes us to mention monads explicitly.

Or maybe

Date: 2011-02-09 11:01 pm (UTC)
From: [identity profile] cema.livejournal.com
With monads that don't commute.

With monads that don't compute.

:-)

Date: 2011-02-10 09:51 am (UTC)
From: [identity profile] antilamer.livejournal.com
Care to elaborate? With all due respect to monads, I've no idea what you mean.

Date: 2011-02-10 03:10 pm (UTC)
wizzard: (Default)
From: [personal profile] wizzard
He's probably using monads to abstract out small-scale 'software components', like algorithm pieces.

Date: 2011-02-10 03:11 pm (UTC)
From: [identity profile] antilamer.livejournal.com
But I still don't get why their commutation is so important.

Date: 2011-02-10 03:23 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
People hide monadic nature of their pieces of code because they don't know how to deal with combinations of monads.

E.g. you have an io, and it throws an exception, and some data you input are not numbers as you expect, and some attributes are NULL, and some strings are too short.

Date: 2011-02-10 03:25 pm (UTC)
From: [identity profile] antilamer.livejournal.com
Now it makes more sense, though I'm still not sure whether it is *that* important, and what we'd have if the monads commuted (and what that would even mean).

Date: 2011-02-10 03:33 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
By commuting I mean converting a list of partial values to a partial list of values and vice versa, for instance.

Their non-commuting makes life harder, but more interesting... maybe this is the part of our profession is less formalizable than most.

Date: 2011-02-10 03:21 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
No, I'm talking on a much smaller scale. Non-total functions being used as if they were total, for instance.

Date: 2011-02-10 03:23 pm (UTC)
wizzard: (Default)
From: [personal profile] wizzard
Not using them in such a way would require a total description of the surrounding environment, which is impossible.

I think Erlang is just the opposite (reducing complexity by reducing the range of possible inputs)

Date: 2011-02-10 03:20 pm (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
I mean, we hardly ever have pure functions, right? But in the code, say, in Java, people pretend to have pure functions, sighing and doing something when it turns out kaboom those are not pure functions. String.charAt, Integer.valueOf(), etc, they are not functions. I mean, they are arrows in a Kleisli category for a certain monad, but people pretend not to notice it.

Haskell, on the other hand, at least ideally, disambiguates between pure, total functions and the arrows that make sense only in a certain Kleisli category, forcing people to explicitly use something monadic.

To me, this is similar to Java generics (which Java people kind of hate) that force people to write a more type-safe code.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

June 2025

S M T W T F S
1 2345 6 7
8 9 10 11 121314
15161718 1920 21
222324252627 28
29 30     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 1st, 2025 12:10 pm
Powered by Dreamwidth Studios