Recent submissions

Comment · 8 months ago
This is one of those places where Bash diverges from POSIX. The standard says `echo &>/dev/null' is two commands, namely `echo &' and `>/dev/null', but Bash interprets it as redirect both stdout and stderr of `echo' to `/dev/null' both in normal and POSIX mode.
Comment · 8 months ago
Nit pick, but

>FILE* f = fopen(path, "rb");

>...

>if (fseek(f, 0, SEEK_END) != 0) return option_charp_none();

>long len = ftell(f);

does ISO C guarantee this'll work these days? How come there's no fread+realloc fallback?

Comment · 8 months ago
It's a question of scale. Neither crime is less serious but far more children are groomed and abused over Discord than flown in via some super rich sicko's private jet for a 'costume party'.
Comment · 8 months ago
What sibling comment says. Bash does suppress nonexistent products when the pattern includes a glob metacharacter and `shopt -s nullglob' is in effect, but I didn't see a flag or anything to achieve that in the project README.
Comment · 8 months ago
Since when `{...}' syntax is a glob pattern? What does `{a,b}/c' produce when there is no directory named `a'?
Comment · 8 months ago
Title says Unix, renameat2 is Linux-only.
Comment · 8 months ago
> The Ashley Book of Knots is fantastic.

Yup. Referring to knots by their ABoK numbers is also more practical than by their wildly varying names.

Comment · 8 months ago
fish and zsh real silent since this dropped
Comment · 9 months ago
You can. There is a thread-unsafe implementation here <https://gist.github.com/oguz-ismail/72e34550af13e3841ed58e29...>. But the listing needs to be per system call number, so this one only supports system calls 1 (_exit) and 4 (write). It should be fairly easy to automatically generate the complete list but I didn't try it.
Comment · 9 months ago
> How does that work, with syscalls being unable to be called except from the system’s libc?

OpenBSD allows system calls being made from shared libraries whose names start with `libc.so.' and all static binaries, as long as they include an `openbsd.syscalls' section listing call sites.

Comment · 9 months ago
Comment · 9 months ago
*horses
Comment · 9 months ago
Does this spawn a new shell for every instance of $`...`?
Comment · 9 months ago
>uuidgen

That's neither a standard CLI utility nor a bash builtin.

Comment · 9 months ago
How is any of that a subtle difference between platforms?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton