Log in | Sign up

  • 2 Posts
  • 442 Comments
Joined 2 years ago
cake
Cake day: January 22nd, 2024

help-circle
  • elm is easily the loveliest programming language of any paradigm I’ve ever come across. Imagine if you enjoyed maintaining an old codebase, or that five years later adding a new feature wouldn’t take you half a day to get your had round the insane tangled spaghetti of your project, because the spaghetti and the meatballs and the sauce were always kept separate until cooked and served on the dish by the compiler. You find the spaghetti straight and in bundles because that’s how you like them laid out and no one tried to get you to soften them in the warm sauce and thread them through the raw meatballs. Imagine if the compiler did your whole project in about three to five seconds, and was genuinely helpful when something is going to bite you later.

    Get your monad burritos here: https://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/


  • I’ve been through phases when I could explain it, and in far simpler terms, less jargony, than endofunctors

    A monad is when you can do shit and return stuff. There are two things you can do in absolutely every doShitAndReturnStuff:

    1. andThen, also known as ; in less flexible languages and >>= in more esoteric languages.
    2. And return also known as
      function ret(const a)
      { ret = a
      } in other languages.

    There are two rules:

    1. (a then b) then c = a then (b then c), which sounds obvious, but I skipped a couple of values being passed (I’m using the kleisli category), and it can actually go wrong, which means that if you don’t have a monad but behave like you do, all sorts of subtle and very hard indeed to debug errors can sneak in. See “software complexity problem” for details.
    2. ret then somethingrother = somethingorother = somethingorother then ret, which would seem obvious to you if you spotted that ret does nothing, but for fun, it turns out that in a language with a sufficiently advanced/flexible/accurate type system (eg Hindley-Milner stuff), of you manage 2 you get 1 for free, which is totally awesome.

    “But what’s the point?” I hear all the Python devs say “We already got rid of the curly brackets. What more do you want?” (Which starts a flame war with the C syntax folk while the elm programmers shake their head and wonder why anyone is manually formatting their code whether it’s with curly braces or not in 2026).

    Well, the point, my dear internet Lunatics that have persisted with this fairly unhelpful and daft re-expression of monads, the point is: what if you could redefine ; locally to totally rewire your programming language and everyone was used to that and understood what you were doing from context? Yesterday it was making database requests, but today it’s answering queries on a server. Or authenticating users from the other side of the globe. Maybe now it’s a recursive descent parser or a non-deterministic, expanding list of possible future moves in a game.

    It’s totally awesome and powerful and you just don’t know that you’re missing it because you have no idea unless you already know, but that’s not really helping anyone that doesn’t already understand monads, sorry. Not that this was a plausible attempt at that. It’s more just a bit of humour if you already came across monads. Famously a monad is like a burrito more than anything else.

    But unfortunately there are also monad transformer stacks. And… …operator soup for lenses and prisms. And trust me, you don’t want to go there, you really, really don’t. Just don’t go there, I’m telling you, don’t. DID YOU LIKE BEING SANE? I WARNED YOU, REMEMBER.




  • dress code

    Ours says something like “Formal suits and ties are not required, but colleages should be dressed appropriately for the workplace, and whether you are customer facing or not, you should not dress inappropriately casually.” which is nice because I find ties uncomfortable, but there’s a grey area a mile wide there that I would rather there weren’t.

    In practice, this means that crocs, shorts, mini skirts, loud shirts and crop tops all get called out by the boss, but he seems no more willing than I am to call out a low neckline in public, and I don’t know whether that’s because he doesn’t mind, doesn’t care, didn’t like getting criticised in the past for noticing, or secretly likes low necklines.

    I’m certainly not bringing it up in AOB any year soon. I’ve overheard the “well you shouldn’t have been looking” conversion enough in the past to know how some folk react to bring asked to tone it down somewhat.



  • As a reasonably unattractive middle aged man, I do wish that some of the people in my workplace wouldn’t wear low necklines. I am fully aware that I’m not supposed to look and that my eyes aren’t the target of the clothing choices. I think it’s very rare indeed that I do look, but I can’t help but notice, ALL THE TIME I’m interacting with whoever it is. I find it very distracting and would rather not be distracted from the issue at hand. What I look at is under my conscious control, but my sexuality isn’t.

    Someone in the comments mentioned that men should know not to stare from simple polite social etiquette. Yes. I know this. I live this. But if you’re talking social etiquette, I think you have to accept that it’s possible to be inappropriately dressed for the workplace. Wear whatever you like while you’re out in the evening, out in the street, out shopping, but while we’re at work, while I have no choice over who I interact with or for how long, please dress in a less distracting way.

    Sorry if that makes you feel objectified or controlled, and I don’t want to make anyone unhappy, but also I don’t want to spend our planning meeting trying to ignore your breats.


  • Taiwan is a land illegitimstely invaded by the Kuomintang and its citizens deserve to be liberated from western puppeteering.

    By “liberated”, you mean invaded by a larger neighbour against the demonstrable will of the population, so no, they don’t deserve that.

    Have you once expressed your support of Gaddafi in this website against western invasion and meddling?

    No; he died before this website existed.

    Your support of Cuba and Venezuela?

    Cuba I support; they’ve shown how socialised healthcare can be far more effective and inexpensive than involving the private sector, and have held their own despite long term agitation, interference and intimidation by their large neighbour.

    Venezuela I know less about. I knew a Venezuelan expat who left because he felt unsafe as a mixed race resident, but I’m afraid that that sort of persecution is all too common in lots of countries, and it’s getting worse b because of the rise of the far right at Putin’s intervention.

    Your support of Lenin against external invasion by England, France, Germany, Italily and the USA during the Russian civil war?

    A bit before my time, that one, I think. I’m inclined to disbelieve you on it, I’m afraid, because your takes on current world events fly in the face of facts and logic, so feel free to point me to Wikipedia to put me straight if it’s just a British cover up of yet one more awful act of our awful track record of imperial nastiness.






  • To hypothetical rape. And Russian soldiers raped Ukrainian women and kidnapped Ukrainian children to Russia too.

    Maybe formerly communist China will behave better than formerly communist Russia when they invade their smaller neighbour to try to pretend that their leader has a big dick.

    Why not stick to the improving lives of the Chinese people instead of wasting money and effort on a vanity war? China is one of the world’s oldest civilisations, with one of the best long term planning governments the world over. Silly and short sighted to throw the maturity and respect away on a vanity war like Putin’s war. Everyone used to think that Russia’s land forces were unstoppable. Not any more. Woe to China if it follows someone as vain as Putin to think that war is simple and short. USA keeps having to learn that lesson over and over b feverish their leaders are short sighted and they think that because their military is the strongest they can easily and quickly win wars and change countries to be like them. They’re wrong. Every stupid war they start ends up with them looking weaker. Putin made the same mistake. Why would wise old China follow the idiots to the fool’s gold?