Readit News logoReadit News
201984 commented on Claude’s C Compiler vs. GCC   harshanu.space/en/tech/cc... · Posted by u/unchar1
IshKebab · 3 days ago
Yeah I saw a post on LinkedIn (can't find it again sorry) where they found that CCC compiles C by mostly just ignoring errors. `const` is a nop. It doesn't care if you redefine variables with different types, use a string where an `int` is expected, etc.

Whenever I've done optimisation (e.g. genetic algorithms / simulated annealing) before you always have to be super careful about your objective function because the optimisation will always come up with some sneaky lazy way to satisfy it that you didn't think of. I guess this is similar - their objective was to compile valid C code and pass some tests. They totally forgot about not compiling invalid code.

201984 · 3 days ago
>They totally forgot about not compiling invalid code.

Indeed. For a specific example of it not erroring out:

https://www.reddit.com/r/Compilers/comments/1qx7b12/comment/...

201984 commented on Roundcube Webmail: SVG feImage bypasses image blocking to track email opens   nullcathedral.com/posts/2... · Posted by u/nullcathedral
teekert · 3 days ago
Hmm, never been there, but it never feels good to be lumped in with some group (especially when they have lunatics in the name) instead of receiving feedback that may point at errors in judgement.

I'm generally considered knowledgeable and I'm just thinking from the perspective of owning a company and employees taking these actions instead of coming to talk to me, showing evidence of my poor management decisions.

This whole text reeks of a employee vs employer situation, which is never good (you're in it together), so probably it is good that the person left the company, for both parties.

Perhaps I'm naive, or not American enough, US work culture seems harsh to me sometimes, especially wrt work ethic and hierarchy.

I'm off now to find what PMC is, thank you.

Edit: Looked around for sometime, no idea still what PMC is.

201984 · 3 days ago
Professional-Managerial Class, as opposed to working class or proletariat.

Dead Comment

201984 commented on Lennart Poettering, Christian Brauner founded a new company   amutable.com/about... · Posted by u/hornedhob
Foxboron · 15 days ago
> * Secure Boot (vendor-keyed deployments)

I wish this myth would die at this point.

Secure Boot allows you to enroll your own keys. This is part of the spec, and there are no shipped firmwares that prevents you from going through this process.

201984 · 15 days ago
What about all those Windows on ARM laptops?
201984 commented on Waiting for dawn in search: Search index, Google rulings and impact on Kagi   blog.kagi.com/waiting-daw... · Posted by u/josephwegner
ajdude · 22 days ago
Does anyone else use the phrase "I'm going to google XYZ" while referring to actually searching it up on Kagi, DDG, or another search engine?
201984 · 21 days ago
I do
201984 commented on IRISC: An ARMv7 assembly interpreter and computer architecture simulator   polysoftit.co.uk/irisc-we... · Posted by u/rtybanana
rtybanana · 25 days ago
This is a little web app I developed a good while ago now to help people start learning ARMv7 assembly language and to understand how the computer hardware interprets and executes instructions of low level languages.

The tutorial section should have enough content to get people started. Only a minimal understanding of comp sci concepts are required, so whether you're completely new to programming or are experienced with high level languages and want to understand more about what goes on lower down, this tool is for you! I hope you enjoy it or learn something from it. I certainly enjoyed making it.

Unfortunately, mobile is not supported since the simulator has a lot of moving parts which describe the state of the simulated computer hardware. I recommend a laptop or larger for the optimal experience :).

201984 · 25 days ago
I played around with it, and it's very neat. This is the first time I've seen an assembly REPL and I wish I had something like this that ran native for playing with unfamiliar instructions.

I did find a couple minor issues with the simulator: MVN is supposed to be a bitwise NOT but the simulator does a two's-complement negation instead (https://github.com/rtybanana/irisc-web/blob/main/src/interpr...), and it seems negative immediate offsets aren't supported, e.g.

  ldr r0, [r1, #-4]

201984 commented on PCs refuse to shut down after Microsoft patch   theregister.com/2026/01/1... · Posted by u/smurda
skeeter2020 · a month ago
Do they really "teach Windows" in schools? I see way more people treat the browser as the OS, if they even use a non-mobile device.

Your comment is full of phrases that answer why consumers and enterprise won't switch: "pretty stable", "good enough", "a pretty good option". This are true for the Windows default; why switch?

201984 · a month ago
Sadly, schools don't have real computers any more, it's all chromebooks. Gen Alpha is going to be completely computer illiterate.
201984 commented on This game is a single 13 KiB file that runs on Windows, Linux and in the Browser   iczelia.net/posts/snake-p... · Posted by u/snoofydude
oguz-ismail2 · a month ago
> a static compiled and linked "hello world" in C on Linux is around ~785KB

Huh?

    $ musl-gcc -xc -static -Wl,-z,norelro -Wl,-z,nosectionheader -Wl,-z,noseparate-code -s - <<eof
    #include <stdio.h>
    int
    main(void) {
            static const char s[] = "Hello, World!\n";
            fwrite(s, (sizeof s)-1, 1, stdout);
    }
    eof
    $ ./a.out
    Hello, World!
    $ ls -l a.out
    -rwxr-xr-x 1 oguz oguz 4976 Jan 12 09:38 a.out
And if that's not enough

    $ musl-gcc -xc -static -nostdlib -fcf-protection=none -fno-asynchronous-unwind-tables -fomit-frame-pointer -Wl,-z,norelro -Wl,-z,nosectionheader -Wl,-z,noseparate-code -s - -lc <<eof
    #include <unistd.h>
    void
    _start(void) {
            static const char s[] = "Hello, World!\n";
            write(1, s, (sizeof s)-1);
            _exit(0);
    }
    eof
    $ ./a.out
    Hello, World!
    $ ls -l a.out
    -rwxr-xr-x 1 oguz oguz 487 Jan 12 09:58 a.out

201984 · a month ago
I'm sure that number is using glibc, not musl.
201984 commented on What happened to WebAssembly   emnudge.dev/blog/what-hap... · Posted by u/enz
torginus · a month ago
For WASM, the performance target isn't Javascript - but native code and NaCl. Considering WASM has had tremendously more time and effort invested into it, and still underperforms NaCl (and JS) signals to me that this is not the right approach.

The WASM runtime ended up from something that ingests pseudo-assembly,validates it and turns it into machine code, into a full-fledged multi-tiered JIT, like what JS has, with crazy engineering complexity per browser, and similar startup performance woes (which was one of the major goals of Nacl/Wasm to alleviate the load time issues with huge applications).

201984 · a month ago
What does NaCl (seems to be some random crypto library?) have to do with this?

u/201984

KarmaCake day511April 22, 2024View Original