Actually, it’s 5 4 10 12 2 9 8 11 6 7 3 1 for me, but too lazy to edit the image

  • vrojak@feddit.org
    link
    fedilink
    arrow-up
    21
    ·
    6 hours ago

    I recently found out that javascript’s .sort() function, when called without arguments on an array of numbers, converts them all to strings and sorts them alphabetically 🤡

    • ElectricTrombone@lemmy.world
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      1
      ·
      6 hours ago

      I’m a C programmer. My first time writing Javascript and ran into some sort of bug involving a === sign or something. Javascript is a silly language.

      • humorlessrepost@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        4 hours ago

        Javascript lets you compare unlike types without extra steps using ==. If you want strict comparison where “2” isn’t 2, use === and !==. Personally, I find that easier than having to parseint or cast every damn thing or whatever c does (strtol?). That said, I have build tools set up to enforce strict comparison because I don’t trust myself or others.

      • aesthelete@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        4 hours ago

        Truish and falsish and nullish are all concepts made up by madmen. JavaScript is the language of the damned.

  • cally [he/they]@pawb.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    Portuguese

    cinco, dez, dois, doze, nove, oito, onze, quatro, seis, sete, três, um

    5 10 2 12 9 8 11 4 6 7 3 1

    cinco, dez, dois, doze, meia, nove, oito, onze, quatro, sete, três, um

    5 10 2 12 6 9 8 11 4 7 3 1

    (six can be “seis” or “meia”)

  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    56
    ·
    edit-2
    7 hours ago

    Which language provides the most random alphabetically sorted sequence?

    Data
    |  N | Eng | Dut | Ger | Tur | Lex |
    |----+-----+-----+-----+-----+-----|
    |  1 |   8 |   8 |   8 |   6 |   1 |
    |  2 |  11 |   3 |   3 |   5 |  10 |
    |  3 |   5 |   1 |   1 |   1 |  11 |
    |  4 |   4 |  11 |  11 |   9 |  12 |
    |  5 |   9 |   9 |   5 |   4 |   2 |
    |  6 |   1 |  10 |   9 |   2 |   3 |
    |  7 |   7 |  12 |   6 |  10 |   4 |
    |  8 |   6 |   2 |   7 |  11 |   5 |
    |  9 |  10 |   4 |   4 |  12 |   6 |
    | 10 |   3 |   5 |  10 |   8 |   7 |
    | 11 |  12 |   6 |   2 |   3 |   8 |
    | 12 |   2 |   7 |  12 |   7 |   9 |
    

    Sourced from comments in thread (English from image, Dutch from Vinny93, German from TJA, Turkish from some rando, Lexicographical from monogram)

    Plot with Pearson Score
    Code
    gnuplot -p -e '
      set xlabel "Base Sequence";
      set ylabel "Alphabetic";
      set xtics 1,1,12;
      set ytics 1,1,12;
      set title "Alphabetic Number Plot with Correlation Score";
      set key outside left;
      set size ratio 0.45;
      stats "alphabetic.tab" using 1:2 name "E";
      stats "" using 1:3 name "D";
      stats "" using 1:4 name "G";
      stats "" using 1:5 name "T";
      stats "" using 1:6 name "L";
      plot "" using 1:2 with lines title sprintf("%s (%.3f)", columnhead(2), E_correlation),
           "" using 1:3 with lines title sprintf("%s (%.3f)", columnhead(3), D_correlation),
           "" using 1:4 with lines title sprintf("%s (%.3f)", columnhead(4), G_correlation),
           "" using 1:5 with lines title sprintf("%s (%.3f)", columnhead(5), T_correlation),
           "" using 1:6 with lines title sprintf("%s (%.3f)", columnhead(6), L_correlation)
    '
    

    It looks like the most random language is Dutch (closest to zero), and Turkish appears to be the least random (probably the 10,11,12 sequence skewed it).

    Although Lexicographic also appears to have a near zero score, despite being the most ordered. I think Pearson is a bad measure here, and maybe a Serial Correlation test might be better.

  • Noxy@pawb.social
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 hours ago

    If a mechanical clock or watch was like that it would be one hell of a fascinating movement

  • Vinny_93@lemmy.world
    link
    fedilink
    arrow-up
    40
    ·
    13 hours ago

    Acht, drie, een, elf, negen, tien, twaalf, twee, vier, vijf, zes, zeven.

    8, 3, 1, 11, 9, 10, 12, 2, 4, 5, 6, 7

    • IndiBrony@lemmy.world
      link
      fedilink
      English
      arrow-up
      17
      ·
      edit-2
      12 hours ago

      I don’t even know 100% that this is Dutch, but Dutch so often reads and sounds like someone German who doesn’t know English trying to speak English and I love the language because of it ❤️

    • TJA!@sh.itjust.works
      link
      fedilink
      arrow-up
      11
      arrow-down
      1
      ·
      13 hours ago

      Acht, drei, eins, elf, fünf, neun, sechs, sieben, vier, zehn, zwei, zwölf

      8, 3, 1, 11, 5, 9, 6, 7, 4, 10, 2, 12

      • Derpenheim@lemmy.zip
        link
        fedilink
        arrow-up
        5
        ·
        9 hours ago

        Ah there it is. The real language, not the one a confused toddler trying to learn German speaks

      • tetris11@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        9 hours ago

        altı beş bir dokuz dört iki on onbir oniki sekiz üç yedi

        6 5 1 9 4 2 10 11 12 8 3 7

        • idealotus@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          6 hours ago

          Transliterating from Mandarin Chinese and using English dictionary order

          Ba Er Jiu Liu Qi San Si Shi ShiEr ShiYi Wu Yi

          8 2 9 6 3 4 7 10 12 11 5 1 八 二 九 六 三 四 七 十 十二 十一 五 一

  • Captain Aggravated@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    16
    ·
    12 hours ago

    Okay, here’s the challenge: Make it always tell the correct time 8:30 should point to the 8 with the little hand and the 6 with the big hand. And 8:35 shoudl point to the 7 with the big hand.

      • astrsk@fedia.io
        link
        fedilink
        arrow-up
        9
        arrow-down
        2
        ·
        11 hours ago

        What?

        Two, Eight, Eleven, — not gonna type it all out because it’s already wrong.

        What am I missing here?

        • gerryflap@feddit.nl
          link
          fedilink
          arrow-up
          8
          ·
          7 hours ago

          I was equally confused initially, but then I looked at the clock in my house and realized that the number up top is the highest number, 12, and not 0. So the first number in the ordering is at the position of the 1 of a normal clock.

        • HatchetHaro@pawb.social
          link
          fedilink
          English
          arrow-up
          29
          ·
          edit-2
          11 hours ago

          “Two” is the last one. The order starts with “eight”.

          Think about it: on a real analogue clock, where is the smallest number and where is the largest?

          • astrsk@fedia.io
            link
            fedilink
            arrow-up
            1
            ·
            2 hours ago

            Thank you, I was so confused and stuck lol. I always just treated the top as the starting spot because the days starts at 12:00 AM. That’s what I get for trying to think through this well past my bedtime 🤣

        • chingadera@lemmy.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          6
          ·
          10 hours ago

          You’re missing the lack of logic, aka you’re not missing shit, OP has some soul searching to do.

          • gerryflap@feddit.nl
            link
            fedilink
            arrow-up
            3
            ·
            7 hours ago

            What lack of logic? The numbers on the clock are sorted based on the alphabetical order when they’re spelled out in English. Just like with a real clock, the top number is the highest, not the lowest. That seems quite logical to me