• Camille_Jamal@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 hours ago

        I’m sorry, but I can’t take you seriously if you critique something out of your area of expertise OR if you are correcting language and you, yourself, mess up.

        If how python works is not close enough to english for op, why is “fuckoing” close enough?

        PYTHON ISN’T EVEN MEANT TO FOLLOW ALL ENGLISH RULES???

  • rtxn@lemmy.world
    link
    fedilink
    arrow-up
    22
    ·
    2 days ago

    [lady for lady in ladies if lady.is_single] just doesn’t have the same bop.

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      9
      arrow-down
      2
      ·
      2 days ago

      list comprehensions aren’t changed much. but a statement like dog = Dog(name="fido") is transpiled to the dog is now a Dog with name 'fido'

      the language uses backticks for strings. it handles nested stringly nicely because of it

    • lemmyman@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      edit-2
      1 day ago

      Can I just say that as someone who only codes tangentially to my work, code and documentation that uses the same word 2 or 3 times in an expression, when they mean different things, is such an immense pet peeve of mine when learning something new.

      I’m already struggling with everything else about it, and now I have to parse out which lady is which and what the hell each one is supposed to be

      object Object(object = object);

      Statements dreamed up by the utterly deranged.

      • rtxn@lemmy.world
        link
        fedilink
        arrow-up
        4
        arrow-down
        1
        ·
        edit-2
        1 day ago

        That’s just Python’s generator syntax. Not all that difficult to parse once you get a feel for it. Plus syntax highlighting helps.

        (OUTPUT_EXPRESSION for ITEM in INPUT_ITERABLE if CONDITION)
        
      • yetAnotherUser@discuss.tchncs.de
        link
        fedilink
        arrow-up
        5
        ·
        edit-2
        4 hours ago

        It’s calling a function without a parameter.

        You know how in math you had something like:

        f(x) = x²

        Not all functions need parameters though. The function:

        f(x) = 2

        does not even use the provided x! So just leave it out:

        f() = 2

        Similarly, you could give a function two parameters:

        f(x, y) = x + y

        Programmers use functions to primarily organize their code. Otherwise it would get very unreadable very quickly. Those function are usually a bit more complicated than a single line, though.

        dog.walk() would call the walk() function of “dog”. Some valid code could be:

        dog.walk()
        wait(10)
        dog.stop()
        

        This code would make the dog walk for 10 seconds assuming every function used is actually defined somewhere.

  • m0darn@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    I feel like I’m walking into a trap here but:

    This pedant is using an adjective as an adverb.

    (…)you don’t conjugate your verbs right.

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      3
      ·
      23 hours ago

      right is informal american english for “correctly”. i don’t give a shit about prescriptive rules of grammar, they’re all bullshit. every last rule was created by some holier-than-thou pedant. i’m only interested in descriptive rules, i.e. grice’s maxims (the thing that finally made me understand how to get over my autism)

        • alias_qr_rainmaker@lemmy.worldOP
          link
          fedilink
          arrow-up
          2
          arrow-down
          2
          ·
          21 hours ago

          believe it or not i can’t remember how it all works even though i was completely obsessed with it in college. i knew how much it could benefit me if i started applying the maxims to every single thing i heard and said, which i did.

      • Camille_Jamal@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 hours ago

        (the thing that finally made me understand how to get over my autism)

        What do you mean get over your autism? You’re still autistic, you may have gained social skills or something similar, but you’re still autistic.

        <gen> also idgaf how incorrect my grammar and spellings are as long as it’s readable </gen>

        also I use tone indicators kinda like HTML tags because I find they help me more that way, so they might help someone else more that way.

        I do not care if you use formal, informal, american, canadian, australian, british, or a different english than any of those, as long as what you’re saying is comprehensible

      • m0darn@lemmy.ca
        link
        fedilink
        arrow-up
        1
        ·
        33 minutes ago

        Honestly I agree, I only pointed it out because of the irony of a pedant insisting others ought to use words according to their formal definitions while misusing formal English.

        “Right” is a bad word to end a sentence with

        “Right” is a bad word with which to end a sentence because it can be mis-parsed as as an invitation to agreement.

  • lauha@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    1 day ago

    I would imagine the class would be aDog and when you instantiate it the variable would be theDog.

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      3
      arrow-down
      6
      ·
      1 day ago

      “the dog” maps to dog, the = maps to “is now”, and Dog() maps to “a dog”, and (name=“Dog name”) maps to “with name dog name”

      So no, you’re wrong, lmao

      I’ve already written the transpiler

    • green_copper@kbin.earth
      link
      fedilink
      arrow-up
      1
      ·
      13 hours ago

      theDog sounds more like a reference to a singleton than one of many instances. I think thisDog fits better.

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      3
      arrow-down
      7
      ·
      edit-2
      1 day ago

      perl is garbage and larry wall is barely fluent in english. that man does NOT know how to name things.

      EDIT: i kid i kid, he definitely speaks english

      • bus_factor@lemmy.world
        link
        fedilink
        arrow-up
        6
        ·
        1 day ago

        With the Lingua::Perligata module you can write your perl in Latin instead. My coworker says it’s more readable that way if you know Latin.

  • Jankatarch@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    3 minutes ago

    It is kinda funny we spent all these centuries turning english into a less-debatable notation called “math” to write algorithms in, only to then reverse that and get stuff like vibe-coding

  • BleakBluets@lemmy.world
    link
    fedilink
    English
    arrow-up
    30
    ·
    edit-2
    1 day ago
    Buffalo_buffalo::buffaloBuffalo.buffalo(Buffalo.buffalo);
    

    p.s. I’m on mobile and this is a shitpost. I did not put a lot of thought into this code. Feel free to suggest a more accurate representation.

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      22 hours ago

      buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalobuffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalobuffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo buffalo

      that’s ruby

    • Camille_Jamal@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 hours ago

      HAHAHAHA

      I love how evil this is

      Don’t speak any chinese languages (or is that japanese?) but I do know that most words don’t have a direct translation to english

      HAHAHAHHAHAHAHAHAAAAAAAA I’M STEALING THAT IDEA!

      I’m forced to learn french because I’m in canada, so if I get corrected I can chuck a phrase of similar meaning with no direct translation

      God I love doing stuff like this

    • alias_qr_rainmaker@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      arrow-down
      2
      ·
      23 hours ago

      does chinese code take up less space? wait how many bytes does it take to encode a chinese character? is it just UTF-8 or is it something else

      • fibojoly@sh.itjust.works
        link
        fedilink
        arrow-up
        3
        ·
        22 hours ago

        UTF-16 is fine for the cat majority of Chinese characters. It has been standard since 2008 for C++ (at least for code that wants to be running on windows; Microsoft moved everything to w_string back then).
        C# uses UTF-16 natively for strings.
        Dunno about other languages