(_____(_____________(#)~~~~~~

  • 0 Posts
  • 43 Comments
Joined 3 years ago
cake
Cake day: April 11th, 2022

help-circle

  • But most importantly, it won’t work in the end. These scraping tech companies have much deeper pockets and can use specialized hardware that is much more efficient at solving these challenges than a normal web browser.

    A lot of people don’t seem to be able to comprehend this. Even the most basic Server Hardware that these companies have access to is many times more powerful than the best Gaming PC you can get right now. And if things get too slow they can always just spin up more nodes, which is trivial to them. If anything, they could use this as an excuse to justify higher production costs, which would make resulting datasets and models more valuable.

    If this PoW crap becomes widespread it will only make the Internet more shitty and less usable for the average person in the long term. I despise the idea of running completely arbitrary computations just so some Web Admin somewhere can be relieved to know that the CPU spikes they see coming from their shitty NodeJS/Python Framework that generates all the HTML+CSS on-the-fly, does a couple of roundtrips and adds tens of lines of log on every single request, are maybe, hopefully caused by a real human and not a sophisticated web crawler.

    My theory is people like to glaze Anubis because it’s linked to the general “Anti-AI” sentiment now (thanks to tech journalism), and also probably because its mascot character is an anime girl and the Developer/CEO of Techaro is a streamer/vtuber.




  • AI? Look, I helped a friend fix a new install. It wasn’t Linux fault, it was a setting in the bios that needed to be changed. But the AI had them trying all sorts of things that were unrelated, and was never going to help. Use with a grain of salt.

    I have the same experience but sometimes it was even worse; Sometimes the AI would confidently recommend doing things that might lead to breakage. Personally I recommend against using AI to learn Linux. It’s just not worth it and will only give new users a false impression of how things work on Linux. People are much better off reading documentation (actual documentation, not SEO slop on random websites) or asking for help in forums.








  • COW filesystems like BTRFS/ZFS with btrbk/sanoid are great for this. Only the initial copy may take a while, but after that it only takes the delta between the source and the destination to synchronize. On my main Server I have the OS on a single drive with BTRFS and all the actual data lives on a 4 disk zpool in raidz2. I have cron jobs set up to do hourly snapshots on both and I keep about a week worth of history. The BTRFS one gets synced to an external drive every 24 hours, while the zpool gets synced to another external 4 disk zpool on a weekly basis.





  • Interesting feature, I had no idea. I just verified this with gcc and indeed the return register is always set to 0 before returning unless otherwise specified.

    spoiler
    int main(void)
    {
        int foo = 10;
    }
    

    produces:

    push   %rbp
    mov    %rsp,%rbp
    movl   $0xa,-0x4(%rbp) # Move 10 to stack variable
    mov    $0x0,%eax       # Return 0
    pop    %rbp
    ret
    
    int main(void)
    {
        int foo = 10;
        return foo;
    }
    

    produces:

    push   %rbp
    mov    %rsp,%rbp
    movl   $0xa,-0x4(%rbp) # Move 10 to stack variable
    mov    -0x4(%rbp),%eax # Return foo
    pop    %rbp
    ret
    


  • Your CPU has big registers, so why not use them!

    #include <x86intrin.h>
    #include <stdio.h>
    
    static int increment_one(int input)
    {
        int __attribute__((aligned(32))) result[8]; 
        __m256i v = _mm256_set_epi32(0, 0, 0, 0, 0, 0, 1, input);
        v = (__m256i)_mm256_hadd_ps((__m256)v, (__m256)v);
        _mm256_store_si256((__m256i *)result, v);
        return *result;
    }
    
    int main(void)
    {
        int input = 19;
        printf("Input: %d, Incremented output: %d\n", input, increment_one(input));
        return 0;
    }