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

  • tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    73
    ·
    edit-2
    52 minutes ago

    Which language provides the most random alphabetically sorted sequence?

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

    Sourced from comments in thread (English from image, Dutch from !Vinny_93@lemmy.world, German from !TJA@sh.itjust.works , Turkish from some rando, Chinese from !idealotus@lemmy.world, Lexicographical from !monogram@feddit.nl)

    Plot with Correlation Scores

    We will compute the pearson correlation (r-statistic) score by comparing the base number (column 1) with the corresponding language column. We will also compute the Serial correlation, by creating staggered columns that measure how close a number is in a sequence to the one before it.

    Staggered Table
    cat alphabetic.tab \
        | awk '{print $0"\t"prE"\t"prD"\t"prG"\t"prT"\t"prC"\t"prL;prE=$2;prD=$3;prG=$4;prT=$5;prC=$6;prL=$7}' \
        | tee alphabetic.tab.stagger
    
    Plot 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 rmargin 25; set key at graph 1.5,0.9;
      set size ratio 0.45;
    
      stats "alphabetic.tab.stagger" 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 "C";
      stats "" using 1:7 name "L";
      
      stats "" using 2:8 name "ES";
      stats "" using 3:9 name "DS";
      stats "" using 4:10 name "GS";
      stats "" using 5:11 name "TS";
      stats "" using 6:12 name "CS";
      stats "" using 7:13 name "LS";
    
      set label 1 sprintf("%10s  %6s  %6s", "", "Base", "Stagger") at graph 1.07,0.95;
    
      plot "" using 1:2 with lines lw 3 title sprintf("%10s  %+.3f  %+.3f", "English", E_correlation, ES_correlation),
           "" using 1:3 with lines lw 3 title sprintf("%10s  %+.3f  %+.3f", "Dutch", D_correlation, DS_correlation),
           "" using 1:4 with lines lw 3 title sprintf("%10s  %+.3f  %+.3f", "German", G_correlation, GS_correlation),
           "" using 1:5 with lines lw 3 title sprintf("%10s  %+.3f  %+.3f", "Turkish", T_correlation, TS_correlation),
           "" using 1:6 with lines lw 3 title sprintf("%10s  %+.3f  %+.3f", "Chinese", C_correlation, CS_correlation),
           "" using 1:7 with lines lw 1 title sprintf("%10s  %+.3f  %+.3f", "Lexicon", L_correlation, LS_correlation)
    '
    

    It looks like Dutch has the lowest (near 0) correlation to both the base sequence and it’s own staggered sequence, with Turkish mirroring it’s staggered randomness somewhat.

    The least random alphabetic sequences are English and German.


    Updated: Added chinese and staggered analysis.

  • vrojak@feddit.org
    link
    fedilink
    arrow-up
    33
    ·
    21 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
      14
      arrow-down
      1
      ·
      21 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.

        • FourWaveforms@lemm.ee
          link
          fedilink
          arrow-up
          4
          ·
          14 hours ago

          The epitomy of irony is a JavaScript developer insisting that some other language is “a fractal of bad design” without immediately acknowledging that JS is weird as hell.

      • humorlessrepost@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        19 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
        ·
        19 hours ago

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

  • Vinny_93@lemmy.world
    link
    fedilink
    arrow-up
    41
    ·
    1 day 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

  • cally [he/they]@pawb.social
    link
    fedilink
    English
    arrow-up
    4
    ·
    18 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”)

    • Die Martin Die@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      14 hours ago

      Mine is Spanish

      Cinco (5), cuatro (4), diez (10), doce (12), dos (2), nueve (9), ocho (8), once (11), seis (6), siete (7), tres (3), una (1)

  • Captain Aggravated@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    16
    ·
    1 day 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.

  • Noxy@pawb.social
    link
    fedilink
    English
    arrow-up
    2
    ·
    18 hours ago

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

      • astrsk@fedia.io
        link
        fedilink
        arrow-up
        10
        arrow-down
        1
        ·
        1 day ago

        What?

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

        What am I missing here?

        • HatchetHaro@pawb.social
          link
          fedilink
          English
          arrow-up
          29
          ·
          edit-2
          1 day 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
            ·
            17 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 🤣

        • gerryflap@feddit.nl
          link
          fedilink
          arrow-up
          8
          ·
          22 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.

        • chingadera@lemmy.world
          link
          fedilink
          arrow-up
          1
          arrow-down
          6
          ·
          1 day 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
            ·
            22 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