Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Re:Salmon (Score 4, Informative) 47

Once translated by the compiler (thanks to the `U`) the `salmon` bytes are a bunch of UTF-32 mostly invisible chars that represent the text shown when run (each LSB of the 32-bits integers are the actual characters).

The rest of the code is pretty explicit when special invisible characters are shown in hexa after the added char `^` for clarity

#define grill^f3^a0^81^81 ;while(putchar(*salmon++))
#undef grill

#define ^f3^a0^81^81 grill^f3^a0^81^81
#undef grill

int main() {^f3^a0^81^81 ^f3^a0^81^81
for (int i = 1; i printf("%d * %d = %d\n", i, i, i*i);
}
}


The 2 `#undef` are useless.
The first `#define grillHEX code` (which HEX are not visible) defines the real running code.
The second `#define HEX grillHEX` defines HEX as being the running code above.
Finally the invisible HEX is expanded as

;while(putchar(*salmon++)) ;while(putchar(*salmon++)) for ( int i ... ) {}

Since `putchar()` only prints the LSB and returns its value, the first `while` prints the entire string "Season salmon fillets..." and stops on the byte zero.
The 2nd `while` reads a zero and stops immediately, thus not executing the `for ...` that follows.
Amazing work!

Submission + - UK Users Need to Post Selfie or Photo ID to View Reddit's r/IsraelCrimes, r/Ukra (404media.co) 1

alternative_right writes: Several Reddit communities dedicated to sharing news and media from conflicts around the world now require users in the UK to submit a photo ID or selfie in order to prove they are old enough to view “mature” content. The new age verification system is a result of the recently enacted Online Safety Act in the UK, which aims to protect children from certain types of content and hold platforms like Reddit accountable if they don’t.

Submission + - Nobody owns the moon—researcher suggests that could be a problem (phys.org) 2

alternative_right writes: It's true, nobody owns the moon. But that doesn't mean that anybody can do whatever the heck they want. Taking that argument to the extreme, do we really want some giant corporate logo burned into the regolith for the world to see, so that every time you gaze up into the night sky you're reminded of the existence of some Silicon Valley startup—because, of course, it would be some Silicon Valley startup to pull a stunt like that.

[ Obviously this is relevant too: https://www.garretthardinsocie... — submitter. ]

Submission + - Cyberattack cripples Russian airline Aeroflot (politico.com)

Pravetz-82 writes:

A cyberattack on Russian state-owned flagship carrier Aeroflot caused a mass outage to the company’s computer systems on Monday, Russia’s prosecutor’s office said, forcing the airline to cancel more than 100 flights and delay others. Ukrainian hacker group Silent Crow and Belarusian hacker activist group the Belarus Cyber-Partisans, which opposes the rule of Belarusian President Alexander Lukashenko, claimed responsibility for the cyberattack.


Slashdot Top Deals

If I set here and stare at nothing long enough, people might think I'm an engineer working on something. -- S.R. McElroy

Working...