News for hackers. Stuff that matters.

aarch64

Re:Writing ARM64 Code for Apple Platforms on Thursday June 24, 2021 @10:54AM (#27618509)
Here is ARM's explanation in the AAPCS64 (ARM 64-bit Architecture Procedure Call Standard):

> Software developers creating platform-independent code are advised to avoid using r18 if at all possible. Most compilers provide a mechanism to prevent specific registers from being used for general allocation; portable hand-coded assembler should avoid it entirely. It should not be assumed that treating the register as callee-saved will be sufficient to satisfy the requirements of the platform. Virtualization code must, of course, treat the register as they would any other resource provided to the virtual machine.

From: https://github.com/ARM-software/abi-aa/blob/2bcab1e3b22d5517...

Kai-Fu Lee and David Siegel talked about AI in April 2019 and mentioned:

> It's neither artificial nor intelligent

Quote is at 3:40 (topic starts around 3:05) in the YouTube video linked at the end of the article:

https://www.twosigma.com/articles/ai-past-and-future-a-conve...

Re:The Unix-Haters Handbook (1994) [pdf] on Monday March 18, 2019 @11:05AM (#19421637)
One of these "apposite observations" is in the section on pipes (p. 199 of link).

The authors use this convoluted bash script to show that pipes are best suited for simple hacks and might fail mysteriously under certain circumstances:

  egrep '^To:|^Cc:' /var/spool/mail/$USER | \
  cut -c5- | \
  awk '{ for (i = 1; i <= NF; i++) print $i }' | \
  sed 's/,//g' | grep -v $USER | sort | uniq
Although this is hard to read, it can be simplified from 7 commands to 5:

  awk '/^To:|^Cc:/ { for (i = 2; i <= NF; i++) print $i }' /var/mail/$USER | \
  sed 's/,//g' | grep -v [email protected] | sort | uniq
By folding the egrep pattern matching into awk as it is supposed to be used and starting from the second field instead of removing the first four characters with cut, this script is both easier to read and fewer lines long.

By inverse grepping for [email protected], there will not be mysterious behavior if $USER is in another person's email address.