• @ramjambamalam@lemmy.ca
    link
    fedilink
    69
    edit-2
    5 months ago
    • Push directly to master, not main
    • No command line args, just change the global const and recompile
    • No env vars either
    • Port numbers only go up to 5280, the number of feet in a mile
    • All auth is just a password; tokens are minority developers, not auth, and usernames are identity politics
    • No hashes – it’s the gateway drug to fentanyl
    • No imports. INTERNAL DEVELOPERS FIRST
    • Exceptions are now illegal and therefore won’t occur, so no need to check for them
    • SOAP/XML APIs only
    • No support for external machines. If it’s good enough for my machine, it’s good enough for yours.
    • Rikudou_Sage
      link
      fedilink
      175 months ago

      Exceptions are now illegal and therefore won’t occur, so no need to check for them

      Ah, I see you’ve met C++ developers.

    • @excral@feddit.org
      link
      fedilink
      75 months ago

      No command line args, just change the global const and recompile

      Nah, don’t use global variables, magic values everywhere. And don’t use const whatsoever, we need to move fast and break things, we can’t let something immutable stop us

    • @stetech@lemmy.world
      link
      fedilink
      25 months ago
      • Port numbers only go up to 5280, the number of feet in a mile

      What about internationalization – do the European port numbers go up to the cm or only meter count within a kilometer?

      • @ZILtoid1991@lemmy.world
        link
        fedilink
        25 months ago

        Elon Musk will fund the development of KKK++, a programming language that will bring us back to the good old times before “GOTOs considered harmful” dropped, because real programmers not only do away with memory safety, but structured programming too.

        • pelya
          link
          fedilink
          225 months ago

          In Lua all arrays are just dictionaries with integer keys, a[0] will work just fine. It’s just that all built-in functions will expect arrays that start with index 1.

          • my_hat_stinks
            link
            fedilink
            95 months ago

            That’s slightly misleading, I think. There are no arrays in Lua, every Lua data structure is a table (sometimes pretending to be something else) and you can have anything as a key as long as it’s not nil. There’s also no integers, Lua only has a single number type which is floating point. This is perfectly valid:

            local tbl = {}
            local f = function() error(":(") end
            
            tbl[tbl] = tbl
            tbl[f] = tbl
            tbl["tbl"] = tbl
            
            print(tbl)
            -- table: 0x557a907f0f40
            print(tbl[tbl], tbl[f], tbl["tbl"])
            -- table: 0x557a907f0f40	table: 0x557a907f0f40	table: 0x557a907f0f40
            
            for key,value in pairs(tbl) do
              print(key, "=", value)
            end
            -- tbl	=	table: 0x557a907f0f40
            -- function: 0x557a907edff0	=	table: 0x557a907f0f40
            -- table: 0x557a907f0f40	=	table: 0x557a907f0f40
            
            print(type(1), type(-0.5), type(math.pi), type(math.maxinteger))
            -- number	number	number	number
            
          • @frezik@midwest.social
            link
            fedilink
            45 months ago

            PHP did that same thing. It was a big problem when algorithmic complexity attacks were discovered. It took PHP years to integrate an effective solution that didn’t break everything.

        • db0
          link
          fedilink
          105 months ago

          Fortran angrily starts typing…

          • db0
            link
            fedilink
            155 months ago

            I always felt that Lua was a girl

            • Sonotsugipaa
              link
              fedilink
              English
              205 months ago

              Lua - Portuguese feminine noun for “moon”, coming from the Latin “luna”
              Luna - Latin, feminine noun (coincidentally identical to the Italian noun, also feminine)

              Yup, Lua is a girl.

      • Writing Lua code that also interacts with C code that uses 0 indexing is an awful experience. Annoys me to this day even though haven’t used it for 2 years

      • nickwitha_k (he/him)
        link
        fedilink
        15 months ago

        This is one of the few things that I really don’t like any Lua. It’s otherwise pretty decent and useful.

        • Something Burger 🍔
          link
          fedilink
          25 months ago

          Not in languages where you don’t manually handle memory, such as PHP, SQL, Python… Higher-level languages using 0-indexed arrays are letting the abstraction leak.

      • Traister101
        link
        fedilink
        65 months ago

        So what’s 0 do then? I’m okay with wacky indexes (I’ve used something with negative indexes for a end-index shorthand) but 0 has to mean something that’s actually useful. Using the index as the offset into the array seems to be the most useful way to index them.

        • @labsin@sh.itjust.works
          link
          fedilink
          15 months ago

          I’d say the index is actually an offset is a reasoning for explaining why it should start at 1. If index was an index, I’d just start at 1.

          I don’t think any one is better than the other, but history chose 0.

          That you can choose it in VB is probably the worst option :D

    • @dan@upvote.au
      link
      fedilink
      55 months ago

      Visual Basic used to let you choose if you wanted to start arrays at 0 or 1. It was an app-wide setting, so that was fun.

        • @dan@upvote.au
          link
          fedilink
          25 months ago

          It’s how I got into programming, so I’ll always have a soft spot for it. Now it’s over 20 years later and I’m still coding.

          • nickwitha_k (he/him)
            link
            fedilink
            15 months ago

            Apple Basic (on an Apple IIe) was my first language that I recall.

            Didn’t have a computer powerful enough for VB until later. It does have a special place in my nostalgia zone but has also led so many astray.

  • @MTK@lemmy.world
    link
    fedilink
    275 months ago

    Error handling should only be with “if”

    Variable names must be generic and similar to each-other

    Debugging is only done with prints

    Version numbers must be incoherent, hard to order correctly, contain letters and jump in ways that don’t align with the updates done.

      • @xmunk@sh.itjust.works
        link
        fedilink
        105 months ago

        Hey now, you know that according to the Bible the biggest number is a million. Anything larger than that including infinity is some of that “woke shit”.

        Your array will be 999,999, 999,998, 999,997 …

  • db0
    link
    fedilink
    205 months ago

    NGL, this kind of form of putting the decisions the monkey-in-charge is making in a way experts in a field will understand, is a very good way to showcase the absurdity.

    • @NABDad@lemmy.world
      link
      fedilink
      English
      45 months ago

      Are there really people capable of understanding this who aren’t capable of understanding, for example, “tariffs increase inflation”?

  • @tgm@lemmy.world
    cake
    link
    fedilink
    English
    85 months ago

    Haven’t heard of the stack address thing, anyone got a TLDR on the topic?

  • @notabot@lemm.ee
    link
    fedilink
    75 months ago

    I started reading that from the top and got increasingly angry on the way down. That creature is a monster.

    • @SamboT@lemmy.world
      link
      fedilink
      25 months ago

      Im unfamiliar with this as well. If you are allocating memory for a stack, why does it matter which direction it populates data? Is this just a convention?

      • @Gigamegs@lemmy.zip
        link
        fedilink
        Deutsch
        3
        edit-2
        5 months ago

        I asked deepseek: Downward-growing stacks** are more common in many architectures (e.g., x86, ARM). This convention originated from early computer architectures and has been carried forward for consistency.

        Funny, I can’t remember, because I did a lot of assembler.