Hacker Newsnew | past | comments | ask | show | jobs | submit | matja's commentslogin

A point in screen space is a line in world space after inverse camera projection, so this way you get the line-to-closest-geometry test in O(1), after the overhead of needing to render the lookup texture first.

You can fool the optimizer, but you have to work harder to do so:

    unsigned add(unsigned x, unsigned y) {
        unsigned a, b;
        do {
            a = x & y;
            b = x ^ y;
            x = a << 1;
            y = b;
        } while (a);
        return b;
    }
becomes (with armv8-a clang 21.1.0 -O3) :

    add(unsigned int, unsigned int):
    .LBB0_1:
            ands    w8, w0, w1
            eor     w1, w0, w1
            lsl     w0, w8, #1
            b.ne    .LBB0_1
            mov     w0, w1
            ret

Since I had to think about it:

    unsigned add(unsigned x, unsigned y) {
        unsigned a, b;
        do {
            a = x & y;   /* every position where addition will generate a carry */
            b = x ^ y;   /* the addition, with no carries */
            x = a << 1;  /* the carries */
            y = b;
        /* if there were any carries, repeat the loop */
        } while (a);
        return b;
    }
It's easy to show that this algorithm is correct in the sense that, when b is returned, it must be equal to x+y. x+y summing to a constant is a loop invariant, and at termination x is 0 and y is b.

It's a little more difficult to see that the loop will necessarily terminate.

New a values come from a bitwise & of x and y. New x values come from a left shift of a. This means that, if x ends in some number of zeroes, the next value of a will also end in at least that many zeroes, and the next value of x will end in an additional zero (because of the left shift). Eventually a will end in as many zeroes as there are bits in a, and the loop will terminate.


In C, I'm pretty confident the loop is defined by the standard to terminate.

Also I did take the excuse to plug it (the optimized llvm ir) into Alive:

https://alive2.llvm.org/ce/#g:!((g:!((g:!((h:codeEditor,i:(f...


Alive2 does not handle loops; don't know what exactly it does by default, but changing the `shl i32 %and, 1` to `shl i32 %and, 2` has it still report the transformation as valid. You can add `--src-unroll=2` for it to check up to two loop iterations, which does catch such an error (and does still report the original as valid), but of course that's quite limited. (maybe the default is like `--src-unroll=1`?)

Oh wow nice catch - I was not at all familiar with the limitations. I would've hoped for a warning there, but I suppose it is a research project.

I was able to get it working with unrolling and narrower integers:

https://alive2.llvm.org/ce/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF...


> In C, I'm pretty confident the loop is defined by the standard to terminate.

Huh? What's that supposed to mean?


That it is Undefined Behavior for a loop with a non-constant conditional and that doesn't cause side effects in its body to not terminate.

For example, you can use this make the compiler "prove" the Collatz Conjecture:

https://gcc.godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(file...


Perhaps it's improving the checksum algorithm on network packets, or even ... adding one.

Makes you wonder, if/how _passengers_ are directly protected against the radiation

They're not. Excessive high altitude flight increases your chance of developing melanoma.

https://pmc.ncbi.nlm.nih.gov/articles/PMC9447865/


Ok, I'll take an aisle seat more often now instead of a window seat.

Unless you fly as often as pilots and other onboard staff, it's unlikely to be significant.

If flying were invented today, I bet it wouldn't be allowed due to the radiation. It's more than many medical procedures which guidelines say to only do when the medical benefits outweigh the radiation risk.

I suppose if flying were invented today the plane would have no windows and the pilots would use cameras.

Clearly the benefits of flying outweight the radiation risks, though.

Passengers flying now and then, it's not a big deal, but aircrews are at increased risk of cancer.

How can I contribute the data for the boards I own which are not on the site?


Dithering isn't only applied to 2D graphics, it can be applied in any type of spatial or temporal data to reduce the noise floor, or tune aliasing distortion noise to other parts of the frequency spectrum. Also common in audio.


Seems to me the real problem here is not the timezone (there's legitimate business needs to run something daily at a specific localtime...) but having multiple instances of a cron job that overlap, in which case it should wait until the previous is done or not start at all. At least prefix a job with "flock -n" if it doesn't/can't handle that.


Presumably because it looks identical to a Sandisk extreme pro 512gb, with grey boxes drawn over the logo.


The report has a heavily redacted interview with a submarine expert. Who directed Titanic and The Abyss.

They’re not good at redacting.


> No, our interposer only works on DDR4

Not surprising - even having 2 DDR5 DIMMs on the same channel compromises signal integrity enough to need to drop the frequency by ~30-40%, so perhaps the best mitigation at the moment is to ensure the host is using the fastest DDR5 available.

So - Is the host DRAM/DIMM technology and frequency included in the remote attestation report for the VM?


Interposers exist for every type of memory.

We use them during hardware development to look at the waveforms in detail well beyond what is needed to read the bits.

The reason their interposer doesn't work with DDR5 is because they designed it with DDR4 as the target, not because DDR5 is impossible to snoop.


The mental image I'm getting from your description is a high speed o-scope probe copy-pasted 80 times, which would obviously be insane. But keysight docs show what looks like an entirely normal PCB that literally interposes the BGA with trace wires on every pin, which looks far too simple for a multi GHz signal.

What do they actually look like and are there teardowns that show the analog magic?


> The mental image I'm getting from your description is a high speed o-scope probe copy-pasted 80 times, which would obviously be insane

It's a thing. It's expensive though. At some point you copy-paste scopes and trigger sync them.

Edit: https://www.teledynelecroy.com/oscilloscope/oscilloscopeseri...


$157k starting price for a 4 channel is a bit rich for the kind of work I do.


100%.

I wonder if these are full sampling scopes. In the past we had Equivalent Time Sampling scope(wideband front end, fast sampling slow rate ADC, a variable delay trigger) and many buses have repeatable test patterns that let you trigger that way. They were always a fairly niche device.


They're not snooping, they're modifying the address dynamically to cause aliasing.


All of that info is faked. You should never trust a cloud vm. That is why it is called "public cloud".


The attestation report is signed by a key in the PSP hardware, not accessible by any OS or software, which can then be validated with the vendor's certificate/public-key. If that can be faked, are you saying that those private keys are compromised?


I'm willing to bet if you ran terrorism-as-a-service.com on a protected VM, it wouldn't be secure for long, and if it really came down to it, the keys would be coughed up.


> If that can be faked, are you saying that those private keys are compromised?

As I understand it, the big idea behind Confidential Computing is that huge American tech multinationals AWS, GCP and Azure can't be trusted.

It is hardly surprising, therefore, that the trustworthiness of huge American tech multinationals Intel and AMD should also be in doubt.


Do you have a benchmark that shows the M1 Ultra CPU to memory throughput?


If you get IPv6 from your ISP you're usually not "behind NAT", even if your home router does NAT IPv4 or your ISP does CGNAT for IPv4.


I am a blue collar layperson (who only understands IPv4's limitation as a lack of total available IP addresses) that disables IPv6 (at the router level) for this exact reason — I feel like I am losing the little bit of control that being "behind NAT" allows on a private IP range/network (e.g. firewall; port mapping).

Obviously I still use Windows 7 Pro 64-bit as my only Microsoft computer — also have an Ubuntu dual Xeon (for LLM/crypto) and several Apple Silicon products (for general browsing).


You're misunderstanding the purpose of NAT, which is not a security boundary. Apple, for instance, has (or had) nearly all of their workstations on a public IP space.

You can still equally as effectively firewall and port map devices on public IPs as you can behind NAT -- and actually just a bit easier, since you're taking NAT out of the picture.


Do you have a gateway that doesn't do ipv6 firewalling (e.g. allow outgoing, only allow established incoming)? I was under the impression that even no-names manage to get that correct. Why would you need port mapping if not for NAT? Even with NAT, for home use I was always mapping port n to n.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: