[–] 6 points 7 months ago* (last edited 7 months ago) (3 children)

Only tangentially related, but I dislike that filter and map are eager in JS. Meaning if you chain them, you allocate N-1 arrays that are being discarded right away. C#, Java and Rust have the right approach.

  • source
  • [–] 10 points 7 months ago

    It's rather trivial to translate Python to C:

    $ cat << EOF > ./shitpost.c && gcc -O2 -o ./shitpost ./shitpost.c && ./shitpost
    #include <stdlib.h>
    
    int main(int argc, char** argv) {
        system("python3 -c \\"print(\\\\\\"Hello, World!\\\\\\")\\"");
        return 0;
    }
    EOF
    Hello, World!
    

    My C is a bit rusty though, sorry.

  • source
  • parent
  • context
  • view more: ‹ prev next ›