Half a croissant, on a plate, with a sign in front of it saying '50c'
h a l f b a k e r y
Trying to contain nuts.

idea: add, search, annotate, link, view, overview, recent, by name, random

meta: news, help, about, links, report a problem

account: browse anonymously, or get an account and write.



Please log in.
Before you can vote, you need to register. Please log in or create an account.

Explanation Of Monads That Means Something

There isn’t one
  [vote for,

I’ve had a brilliant idea! An explanation of monads that actually means something.

Not an explanation of a word you don’t understand (monad) using yet more words you don’t understand at all but even more. Then you wish you hadn’t bothered.

Not an explanation of a word you don’t understand but using words you do understand yet in a configuration that makes absolutely no sense at all and leaves you even more confused. Then you wish you hadn’t bothered.

No, this idea is to explain monads, using words that are understandable and commonplace, and put together in a configuration that is understandable and almost anyone can grasp.

Never been done before. I think this idea is probably the best good , it s

Ian Tindale, Jun 08 2019

Verity Stob made a start. https://www.google....of_the_great_monad/
[pertinax, Jun 09 2019]


       Are you sure you know what "monad" means?   

       Or is this idea a plea for help with precisely that problem?
pertinax, Jun 08 2019

       I've floundered on the monadic wikipedia site - but, having recently been employed building what I suspect is a functional (in both the "working" and "Haskell-like" senses of the word) ETL system, I think the thrust of what they're on about may be to do with having building a "pipeline" of functions whose outputs can be fed arbitrarily into the inputs of each other, in order to make a richly functional "pipe" that you squirt your unclean, unprocessed data in at one end, and out the other comes something shiny, categorised and cleansed as per requirements.   

       To put it more examply, say your data is a load of photos. You might want to convert them all to .png, resize to 100x100, pass them through a cat-detecor (that keeps anything with a cat in it) and filter out (drop) anything that looked like Piers Morgan.   

       One way would be to have a series of batch-processes that ran one after the other on a set of input directories, and then a set of output directories. Fair enough, but lots of messing about with paths and waiting for one process to finish before the next one got kicked off.   

       Alternately, write a getter() function, a pnger(), a hundredbyhundred(), catdetectkeep() and piersdetectdrop(), and a saveresult() set of functions, and then you can compose them all into a single function:   

       do_job = saveresult( piersdetectdrop( catdetectkeep (hundredbyhundred( pnger( getter( kittyfile.jpeg ) ) ) ) ) )   

       And running do_job on any individual file (or more usefully, iteratively running it over any big collection of similar starting files) returns the result you want in a single composite process.   

       The hard part is writing your library of functions such that they can all accept and return similar enough arguments that they can be rearranged without breaking.   

       If you want a different process, you can reuse the functions that do modular bits that you want, and re-order them with other ones. Think a set of modular synth components, wired in series, each modulating an input wave according to their own individual design and passing it on. It's like that, but with data.   

       I could be horribly, horribly wrong, but would invite a more precise (or correct?) explanation as this is mostly guesswork.
zen_tom, Jun 08 2019

       As a precursor to this, could there be an "Explanation Of [Ian Tindale] That Means Something " ?   

       Please ?
8th of 7, Jun 08 2019

       I read about monads once; I got the feeling they were like eigenvalues of sets of functions, only not as defined as a math matrix operation like an eigenvalue. Also that they cover much more, emergent-property like things, at/from a system, like a plannable writeable system. [Zen_tom]'s explanation actually is very straightforward though.
beanangel, Jun 08 2019

       This idea is talking about an act of a genius and there are very few are on the ground to go around.   

       It doesn't have to be words, pictures, animations work as well.
wjt, Jun 08 2019


       Why wouldn't you multi-thread?
pertinax, Jun 09 2019

       aside thought: I suppose a nerve is a monad with multiple pipelines in and multiple pipelines out. Now that's threading.
wjt, Jun 09 2019

       For what it's worth, the etymological "meaning" of "monad" is something like this:   

       It belongs to a family of words meaning "a grouping of n" for various values of n. As you probably know, a myriad is a grouping of ten thousand, a chiliad is a grouping of one thousand, a decad (usually frenchified to "decade") is a grouping of ten and a triad is a grouping of three.   

       I shall not mention NiCads, gonads or doodads.   

       So, from this point of view, the essence of a monad is that, in some given context, there's only one of it.   

       Going out on a limb, I'm going to make a guess based on the opposition between functional programming and object-oriented programming, as alluded to in my link. My guess is that, in OO development, you have a number of substantially self-contained objects, each one minding its own business (on the Single Responsibility Principle) and interacting with others on a Treaty of Westphalia basis. By contrast, in functional programming, a program is one. Ommmmm.   

       However, in the far-off days when I functional-programmed in Orwell, no-one even mentioned monads, so that guess could be completely wrong.
pertinax, Jun 09 2019

       [pert] You didn't need so many words for your first bit "it means one of something" would probably have sufficed.
Skewed, Jun 09 2019

pertinax, Jun 09 2019

       The closest thing I can offer, and it may be so incorrect as to be useless, and it may be so disconnected with how anyone could model it in their heads as to be also useless, is something along the lines of this:   

       I quite like coffee. I quite like tea, too, so let’s use tea as an example – it is probably the more commonly encountered and widespread of the two. The same theoretical exposition would probably also work with proper alcoholic booze such as beer, cider or wine.   

       My end result with tea is to bring it to my mouth and take a sip or a gulp in order to consume it. Then do it again a short while later, and so on. That’s the desired target.   

       The tea itself requires growing on a bush, perhaps somewhere in the Indian subcontinent area. It requires picking, drying, shredding and other processing, packing, exporting, importing and putting in a small package of tealeaves which I’ll buy on a supermarket shelf.   

       The milk requires constructing a goat and milking it, filling up a milk urn until the milk goes pasteurise, putting the milk urns on lorries, etc until I buy the goats milk in the same supermarket.   

       Water requires, well, who knows where water comes from, I turn on the tap and then an exorbitant bill arrives later.   

       Electricity is supplied to heat the water, I pour a tiny bit of the boiled water into the teapot to ‘hot the pot’ and sloosh it out again, put the tealeaves in, put the hot water in, put some milk in the cups, with the saucers nearby, and wait the approved duration of time for the brewing process to complete.   

       I’ll then pour out the tea into the cup through a tea strainer. Then put the cup on the saucer, bring the cup and saucer of tea to where I’m sitting, and take a sip.   

       The cup of tea is a monad. Drinking tea involves only dealing with one thing at this point, it is a cup of tea – a singular thing. The monad wraps other types to enable me to consume them as one – it wraps the brewed hot water type and the milk type. The teapot is a monad which wraps hot water and tealeaves in a warmed pot to enable a single brewing process to have occurred. The tea caddy is a monad – a singular thing which I’ll take a spoonful out of, which wraps the whole growing, processing and distribution processes of getting tea into my cupboard. Same with the goats milk carton in the fridge. The fridge is a monad by the way, it’s the one single thing I get cooled foodage out of, but it wraps many different types for the same kind of access process.   

       Anyway, that’s about the best I can do, and I’ll have to revise it I know but I think this is a start for me.
Ian Tindale, Jun 09 2019

       Assuming you're talking about the word as used in philosophy?   

       Monad (philosophy), a term meaning "unit" used by philosophers to signify a variety of entities from a genus to God. Monads, a basic unit of perceptual reality in the book of philosophy Monadology by Gottfried Leibniz.   

       I simply fail to see any sort of problem understanding what it is or what is meant by it.   

       Maybe you could give examples of use where you've found it confusing?
Skewed, Jun 09 2019

       If it's a term from philosophy, it will inevitably be bollocks.   

       As far as I can tell, pretty much all philosophy is bollocks; but when they have to invent words, the level of bollockry increases.   

       If we pause for a brief moment to consider all the achievements of philosophy over the last couple of millennia, that will be more than enough time.
MaxwellBuchanan, Jun 09 2019

       //pretty much all philosophy is bollocks//   

       The ability to bun annos is seriously desired at this point.   

       At it's (very) best philosophy can be almost akin to science, but only as far as the first steps where you observe & form a hypothesis (though it even skips observation & goes straight to hypothesis sometimes), then it stops..   

       No testing of the hypothesis by experiment.   

       No analysis of experimental results.   

       At its worst it is as you said absolute bollocks, but it does go well with five or six pints.
Skewed, Jun 09 2019

       " ... Socrates himself was permanently pissed ... " as the song says.   

       // No testing of the hypothesis by experiment //   

       The hypotheses frequently can be tested; the problem being that, for one of the classic postulates* of Utilitarian Ethics, the test involves killing groups of people on railway crossings by choosing which way to set the points.   

       The objection is obvious; railway locomotives are expensive, and it would be unaceptable to risk damaging one that way.   

       *You are standing at the lever of a set of railway points. A train is approaching at high speed. 200 metres down the line from the points, traffic is stalled on a road crossing. The signals are inoperative and the train cannot be stopped.   

       If you do nothing, the train will hit a vehicle in which there are four disabled children. If you switch the points, the train will hit a van carrying six elderly people.   

       You have no time to do anything other than move the lever. You cannot stop the train or reach either of the vehicles in time. What is the ethically correct choice ?
8th of 7, Jun 09 2019

       The nomad is perpetually and eternally lost, and will never find a road sign to guide him on his way.
The monad is perpetually and eternally lost, and his dyslexia would make it difficult for him to read a road sign, but as he will never find it, it makes little difference. His solitary nature means that he will have to bear his embarrassment alone; but, since there are none to observe his embarrassment, it makes little difference.
lurch, Jun 10 2019

       I can explain this in a way that makes sense to Ian very simply. Imagine 2 cups of coffee. Now, take one cup away. Now you have a monad.
RayfordSteele, Jun 10 2019

       //no time to do anything other than move the lever//   

       Any passenger carriages & passengers on the train?   

       For these purposes (& as you didn't say it wasn't) I'll be assuming it's a goods train with only one (or maybe two) operators.   

       Switch the points halfway causing the train to plow past both stationary vehicles as it jumps the rails into a field of cows & bursts into flame.   

       Old people & kiddies have a barbeque.
Skewed, Jun 10 2019

       Since it's a hypothetical train, yes, it can be a freight train.   

       It's a mixture of containers and tanker cars, loaded with volatile petroleum products and hazardous chemicals. If it crashes, the resultant fireball will destroy not only the vehicles on the crossing, but those for some distance each side, and engulfing a primary school, a hospital, a home for sick orphans, and an animal shelter specializing in caring for abandoned puppies. Hundreds will die, and the toxic cloud will force the evacuation of the whole town, leaving anyone exposed to the vapour with long term health damage. Water used to extinguish the blaze washes pollutants into the nearby river, killing all the wildlife and destroying a unique habitat of special scientific interest.   

       To keep looters out of the abandoned town, and stop anyone other than emergency workers gaining access, the government is forced to call in the army to set up a cordon. However, there are disputes between soldiers and townspeople wanting access to their homes. The situation escalates and both sides over-react; there are deaths. A political crisis ensues, and the minority government collapses. A general election results in a divided result with no over all control. Protracted negotiations for a coalition fail. Disagreements between factions become increasingly bitter and aggressive. There are riots in major cities. Without strong drection from above, the nation collapses into anarchy and civil war. The armed forces stage a coup and impose a brutal dictatorial regime. Thousands are detained without trial. Torture becomes routine. The food supply and health care systems fail. The country becomes a patchwork of fiefdoms, each ruled by a warlord, constantly battling their neighbours. The majority of the remaining population are reduced to subsistence farming - those not killed by disease, hunger or war, that is. Infant mortality soars, and the land sinks into a new Dark Age. Four horsemen appear, followed by a Beast with Seven Heads and Ten Horns with the Whore of Babylon riding on its back. The world ends.   

       Are you happy now, [Skewed] ? Look what you did. You had one job. One. Job. People died, [Skewed]. Thousands, millions died. All because of you. All you had to do was pull the lever or not. Was that so difficult ?   

       Aren't you even going to say "Sorry" ?
8th of 7, Jun 10 2019

       The rational solution is to do nothing. If you pull the lever, you are killing one group of people whilst saving the others from a near-certain (but not certain) death. You will be hounded to hell by the relatives of those that died. If you do nothing, events have just taken their course and nobody will blame you (much).   

       This is why all-year British Summer Time was abandoned after a brief trial. Although the total number of child road- deaths was reduced (because more schoolchildren were killed by dark evenings than by dark mornings), the people conducting the trial were (arguably) culpable for the deaths of the few children who were definitely killed in the darker evenings, but could not be credited with saving the lives of a larger number of unknown children who would have been killed had it not been for the lighter mornings.
MaxwellBuchanan, Jun 10 2019

       "Do nothing" is in fact the correct answer. Since you did not create the situation, and there is no action you can take to produce a "better" outcome, "fate" or the workings of blind chance have already "decided". You are not responsible (although you may indeed be blamed, since humans are very odd).   

       Sadly, [Skewed] has decided that it's better to destroy civilization. Are you proud, [Skewed] ? How do you live with yourself ? Do you sleep at night ?
8th of 7, Jun 10 2019

       Wow, [8th], all of that and you've never revealed which party is carrying the most AD&D insurance.
lurch, Jun 10 2019

       //"Do nothing" is in fact the correct answer//   

       I disagree; the correct answer is in fact "run away"
pocmloc, Jun 10 2019

       If you run away, someone else will mke the money from selling the video to "Destroyed In Seconds".   

       // you've never revealed which party is carrying the most AD&D insurance //   

       Sorry, the records were all incinerated when the rampaging mob built a huge bonfire to burn [Skewed] in effigy.
8th of 7, Jun 10 2019

       //proud// ??   

       I destroy civilisations & they build idols to me, so I'm a god then, hell yeah!   

       //How do you live with yourself ? Do you sleep at night ?//   

       I thought I just went up in a petrochemical fireball along with a large slice of countryside, so that hardly seems much of an issue.
Skewed, Jun 11 2019

       // so I'm a god then //   

       Yes, but only *a* god, so not a monad.
pertinax, Jun 11 2019

       Um yes actually (I think?) a unit of one, so one person qualifies, as a person is indivisibly a person..   

       Because you can't split it in two, if you try you either end up with two lumps of ex-person or if you're very careful & only cut a little bit off (a limb say) one person plus a severed limb.   

       We've tried & believe me it just gets messy & you never end up with two people.   

       Presumably then a God (being a unit of one) is also a monad.
Skewed, Jun 11 2019

       Not necessarily.   

       Gods are, ipso facto, above and beyond human comprehension, nor are they constrained by physical laws.   

       In the Hindu pantheon, which is very complicated, Gods may have many "aspects", but can simultaneously be considered part of the one, supreme Unknowable God.   

       You, who have become Death, the Destroyer of Worlds, should know that better than anyone. All those arms and you can't even manage to pull a simple lever properly. Shameful, we call it.
8th of 7, Jun 11 2019

       //In the Hindu pantheon, which is very complicated, Gods may have many "aspects", but can simultaneously be considered part of the one, supreme Unknowable God.// This sounds very much like HM Revenue and Customs.
MaxwellBuchanan, Jun 11 2019

       There is nothing.
pocmloc, Jun 12 2019

       I would like to change my first answer.   

       Based on [Ian]'s summary of what he's read, I conclude two things. First, he's definitely talking about the Functional Programming context (and not, as it might be, phenomenology). Second, what he's describing is very similar to what, in Object- Oriented Programming, would be an object class (and not a whole program, contrary to the last part of my earlier answer).   

       Why, then, you might ask, is it called a monad, and not a class? For the answer to that, you might like to have another look at the Verity Stob link. You will notice there that one of the things she mocks about Functional Programming is a preoccupation with state-invariance. If an object's state is invariant, then you only need one of it (so it's like a static class in OOP).   

       Therefore, the oneness indicated by "monad" is not, as I first thought, the oneness of all-inclusivity, but the oneness of being unique-of-its-kind. It's a Platonic oneness, not a Heracleitean oneness. Specifically, in the teapot example, the teapot monad resembles the ideal form of a teapot which Plato would have imagined, if he had heard of teapots.   

       This illustrates the general principle that a large part of past philosophy is actually software engineering, carried on with great ingenuity in spite of the handicap that computers had not yet been invented.
pertinax, Jun 12 2019

       // a teapot which Plato would have imagined, if he had heard of teapots. //   

       But he had.   

       Ceramic ware was Baked* in the time when Plato lived. Therefore "pots" existed, some of which probably had spouts to improve pouring. A spout is not an excessively difficult structure to contrive.   

       "Tea" can in fact be any infusion of vegetable material in boiling water. Herbal teas have existed since prehistory.   

       So it is possible to be certain that Plato had encountered both pots, and tea, and extremely likely that he had not only seen a pot produced specifically for brewing tea, but had partaken of the "tea" so produced.   

       // This illustrates the general principle that a large part of past philosophy is actually software engineering, carried on with great ingenuity in spite of the handicap that computers had not yet been invented. //   

       Not half as much of a handicap as actually having computers. That's where it all went wrong, of course.   

       *Unbaked ceramic ware is technically just shaped mud, and tends to revert to its original form in the presence of water.
8th of 7, Jun 12 2019

       //That's where it all went wrong, of course//   

       Of course it did, there's nothing like the actual real world application of running your software to prove it does what you say it will for showing up all the stupid mistakes you made that cause it to not do what it's supposed to do.   

       Perfection should never be studied too closely if you don't want to see the flaws.   

       And no program is ever more perfect than before you test it properly.
Skewed, Jun 12 2019

       // there's nothing like the actual real world application of running your software to prove it does what you say it will for showing up all the stupid mistakes you made that cause it to not do what it's supposed to do. //   

       Actually, the critical test is giving it to a senior manager to try. If there's anyone who's going to do something so utterly ludicrous that it never occurred to the testing team, it's going to be a senior manager.   

       // Perfection should never be studied to closely if you don't want to see the flaws. //   

       That's because it's essentially fractal in natuure.
8th of 7, Jun 12 2019

       //the critical test is giving it to a senior manager//   

       Actually I'd have to say that the best critical test of any software would have to be to release it for Beta test in Eve Online.   

       If there's a single group of people more dedicated & competent at finding ways to 'break' things & achieve other than desired or intended by the programmer consequences from software I've yet to find it :)
Skewed, Jun 12 2019

       An even better solution is to implement whatever it was in hardware. It's fairly easy to de-bug a card index, for instance*; and typewriters with carbon paper produce a document format which is almost universally compatible.   

       *except for silverfish, which tend to slip in between the cards and are the devil's own job to eradicate. Technically, they're not bugs of course. But then again they're not features either.
MaxwellBuchanan, Jun 12 2019

       //"Tea" can in fact be any infusion of vegetable material in boiling water.//   

       Incorrect. Tea is an infusion of Camellia sinensis in hot water. You are thinking of "tisane".   

       //Herbal teas have existed since prehistory.//   

       Allowing for your gross nomenclature error detailed above, a tisane that has existed since prehistory would have had to have been remarkably preserved against the effects of evaporation and / or mould growth. Unless a prehistoric container of fresh tisane was set down in permafrost, I fail to see how it could have survived more than a few weeks.
pocmloc, Jun 12 2019

       Surely the explanation of "monad" is "it's an 'm', then an 'onad'"?
MaxwellBuchanan, Jun 12 2019

       //Camellia Sinensis// Cptlztn: Camellia sinensis. The specific name is never capitalized, even when referring to a person, country or place.
MaxwellBuchanan, Jun 12 2019

       Thank you, changed, despite my Love of Arbitrary Capitalisation.
pocmloc, Jun 12 2019

       // Tea is an infusion of Camellia sinensis //   

       Tea is made from camels ? Who knew, huh ?
8th of 7, Jun 12 2019

       No, just their sinuses.
MaxwellBuchanan, Jun 12 2019

       Title needs the qualifying suffix ', maybe'.
wjt, Jun 13 2019

       <Desperately tries to ignore persistent mental image of [IT] strumming chords on a Stratocaster and singing "Tell me why ? I don't like Monads ..."/>
8th of 7, Jun 13 2019

       My guitar isn’t a strat, it’s an old Hohner G3T LH –  a headless in the style of the Steinberger.
Ian Tindale, Jun 13 2019


back: main index

business  computer  culture  fashion  food  halfbakery  home  other  product  public  science  sport  vehicle