• Octopus1348@lemy.lol
      link
      fedilink
      arrow-up
      9
      ·
      11 months ago

      It will also complain that trying to break into the castle is unsafe, so you have to tell it that you know.

      • CanadaPlus@futurology.today
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        11 months ago

        “Alright, but you better be outside of a properly locked up and OSHA-compliant castle with the princess by the time I get back, or I’m not compiling”

        And then you do that, but you miss a smoldering ember from one of the castles torches, and everything including the horse and princess catches fire. Next time, pick an escape plan that only requires unsafe for the drawbridge.

        There’s a totally safe way to do it too, I guess, but it involves building a series of replacement castles, and it’s also totally ugly and sinfully slow.

  • Aceticon@lemmy.world
    link
    fedilink
    arrow-up
    33
    ·
    11 months ago

    You use Assembly.

    You describe each and every leg movement and each and every step to the castle and over the castle bridge and inside the castle.

    You somehow end up in the castle kitchen.

    • sunbeam60@lemmy.one
      link
      fedilink
      arrow-up
      18
      ·
      edit-2
      11 months ago

      Or more precisely. You end up in a dark room. You’re not sure it’s in the castle.

      • nilloc@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        8
        ·
        11 months ago

        And the only way back is by counting every step you took on the way in, and if you miss one, the castle buries you.

    • Troy@lemmy.ca
      link
      fedilink
      arrow-up
      23
      ·
      11 months ago

      You have python. You import antigravity. The princess flies off into space. You monkey patch the princess so she has wings.

    • psud@aussie.zone
      link
      fedilink
      arrow-up
      5
      ·
      11 months ago

      No perl either. Much like python you find a relevant library (in cpan), but unlike python there will be seven different implementations, and any four perl devs will come up with at least ten solutions, nine of which will successfully rescue the princess

      • evranch@lemmy.ca
        link
        fedilink
        arrow-up
        5
        ·
        11 months ago

        Everything will seem to be be going great, but to actually gain access to the castle you’ll have to compare your situation to successful rescues to find the undocumented drawbridge control

  • EvilHaitianEatingYourCat@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    edit-2
    11 months ago

    So let me summarise this:

    Only C and Lisp actually completed the initial task of getting the princess free, and Author clearly favors C over the drooling and homeless lisp hacker. Also, turns out, C greatest weakness helped to save not only the princess but everything she ever possessed! How convenient!

    • Shareni@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      Naah, C stabbed himself in both of his feet while planning. The rest of it is his dying mind hallucinating saving the princess.

      Lisp is the true hero, but the author has parenthophobia

  • fruitycoder@sh.itjust.works
    link
    fedilink
    arrow-up
    9
    ·
    11 months ago

    You have rust, you decide to rewrite the C plan but the only library that supports it uses unsafe code so you go back and rewrite it. Wait what were you working on?

  • mindbleach@sh.itjust.works
    link
    fedilink
    arrow-up
    8
    ·
    11 months ago

    You have Perl.

    %_=~aj/dy/hfiw8i/g;
    $_/a(h0w8)y@;
    FWA/E.*FW[tu29uy]/;
    %(1)hjc/f4ifh38/y;

    The princess is saved, but all you can think about is rescuing another, with an entirely different plan. Which is just as well because you have no fucking idea how to explain the one you just wrote and executed.

  • r00ty@kbin.life
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    C# is about right. LINQ was meant to make things easier, or at least the code easier to read. Instead, you gain this addiction to seeing how much functional logic you can fit into one line of code (or a single multi-line query) while still remaining readable.

  • Nailbar@sopuli.xyz
    link
    fedilink
    arrow-up
    3
    ·
    11 months ago

    PHP 8 makes it finally possible to rescue the princess, but you accidentally princess the rescue instead.

  • FlumPHP@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    I’m going to have to print out the Go version for all future “it’s idiomatic” and “but the community!” debates at work

      • FlumPHP@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        11 months ago

        The go community is strongly opinionated in unique ways. For example, using libraries is generally frowned upon. You either use something included in the language itself (standard library) or copy/paste the code you wrote in another project. There’s also advocacy for shorter variable names which generally seems counter to the normal “write descriptive variable name” mantra.

        All in all, I hope the ideas / opinions came from a good place and then some people took them as black & white rules. But they also come off as one or two people’s pet peeves who got to build a language around them.