261 karma · joined March 24, 2020
Can you do all this on Linux? Yes. Will it ever be set up correctly? Depends where you work, but based on my experience so far, not likely.
Edit: To be extra clear. When I was researching this, I ended up going with zram only because:
* It is the default for Fedora.
* zramctl gives me live statistics of used and compressed size.
* The zswap doc didn't help my confusion on how backing devices work (I guess they're any swapon'd device?)
Another example: it takes ~2 seconds to run git on my work machine
(Measure-Command { git status | Out-Null }).TotalSeconds
while running the same command on my personal Windows 11 virtual machine is near instant: ~0.1 seconds.
Still slower than Linux, but not nearly as bad as my work machine.[1] https://crt.sh/
In terms of being blocked by CloudFront (not cloudflare),I actually got a website to fix their policies by just emailing their tech support and showing that simple user-agent changes bypasses their policy anyhow.
Maybe this?
I don't know. I'm a believer in extreme gun rights as well, but giving people the power to have rocket launching systems like MANPADS just seems a bit, dangerous.
[0]: https://www.kernel.org/doc/Documentation/filesystems/ext4.tx...
Edit: note this isn't a universal property either, so it's still wrong: https://btrfs.wiki.kernel.org/index.php/FAQ#What_are_the_cra...
I'm pretty sure even Tomatoes weren't. I hope this isn't the reason for the disdain.
By reading in the whole file at once. Bash does not mmap shared the script it is parsing. You can see this behavior with
strace -e read,lseek bash << EOF
echo 1
echo 2
EOF
bash will read(), do its multi-step expansion-parsing thing and then lseek back so the next read starts on the next input it needs to handle. This is why the problems described in the story can happen.The other way to fix this is to simply use editors that will just make a new file and move over that file on the target on save. I believe vim or neovim does this by default, but things like, ed or vi do not. Emacs will do something similar on first save if you did not (setq backup-by-copying t) but any write after will still be done in-place. I tested this trivially without reviewing the emacs source simply doing the following and you can to with $EDITOR of choice:
!#/usr/bin/env bash
echo test
sleep 10
# evil command below, uncomment me and save
# echo test2
while running sleep, if changing the script causes things to happen, your editor may cause the problem described. strace -ff -e execve /bin/bash -c 'x="$(cat <<< "test")"'
... snip
[pid 311214] execve("/usr/bin/cat", ["cat"], 0x56280da76fc0 /* 3 vars */) = 0EDIT: changed link to the github issue I created with inlined utility.