HNHacker News
TopNewBestAskShowJobs

pixelbeat__

567 karma · joined February 1, 2017

https://twitter.com/pixelbeat_
submissionscomments
pixelbeat__··on Ask HN: What is the most impactful thing you've built?
Totally custom userland, though does reuse common open source components
pixelbeat__··on Ask HN: What is the most impactful thing you've built?
No, it's completely built from source, and finely tuned to the vast/quite homogeneous hardware, and deployment model. Though yes it is Linux based.
pixelbeat__··on Ask HN: What is the most impactful thing you've built?
Maintained/released the GNU coreutils for the last 10 years https://github.com/coreutils/coreutils/commits?author=pixelb

Designed/Built/Deployed Meta's backend operating system for the last 7 years

pixelbeat__··on FTX hacker identity discovered by Kraken Exchange team?
https://twitter.com/AutismCapital is a good source ATM
pixelbeat__··on Intel plans thousands of job cuts in face of PC slowdown
Even with dividends reinvested, $INTC gave zero real returns from Dec 1998 to now, and a net loss if invested after July 2014. Also $AMD now has a larger market cap, and $NVDA is 3 times larger! An amazing decline.

https://totalrealreturns.com/s/VFINX,VBMFX,USDOLLAR,INTC?sta...

pixelbeat__··on Seer – a GUI front end to GDB for Linux
Ctrl-L to redraw is often required, but that's standard for any tui
pixelbeat__··on Sudden disturbing moves for IT in large companies, mandated by CEOs
Possibly related to recent VMWare SEC fraud charges

https://news.ycombinator.com/item?id=32834988

pixelbeat__··on It's been a little over 3 weeks since Google randomly sent me $249,999
Careful with tax implications!
pixelbeat__··on The history of sending signals to Unix process groups
Thank you for documenting those gotchas.

I know not being a library has different considerations, but some ideas I used in timeout(1) to kill a process group may be useful. Tricky things like using sigsuspend() to avoid signal handling races.

https://github.com/coreutils/coreutils/blob/master/src/timeo...

cgroups might be another avenue to explore, being more modern and so having less compatibility baggage

pixelbeat__··on Happy Birthday GNOME! 25 years today
Wow so I have been using gnome for 25 years! Here are some screenshots along the way https://www.pixelbeat.org/pics/ss/
pixelbeat__··on Ctrl-C
I agree that this is an awkward but very desirable property for a system to have.

I was calling this "responsive idempotence" when discussing how the GNU coreutils are tested:

https://www.pixelbeat.org/docs/coreutils-testing.html

pixelbeat__··on A little story about the `yes` Unix command
Trying to differentiate GNU implementations had nothing to do with it. This is never a consideration for me. It was worth the slight increase in complexity for the reasons stated in the commit message. Also an unmentioned point is that the coreutils code is very often referenced, so should be as robust and performant as possible, so those properties may percolate elsewhere.
pixelbeat__··on A little story about the `yes` Unix command
The above code doesn't propagate errors
pixelbeat__··on A little story about the `yes` Unix command
Right. Faster generally means less CPU used for a particular use. For example I made ls(1) a bit faster recently. Even though not really noticeable per run, given how often it is run I estimated this to save 9 tonnes of carbon emissions per year. https://twitter.com/pixelbeat_/status/1511030095011581953
pixelbeat__··on A little story about the `yes` Unix command
I carefully considered this before I optimized GNU yes.

The reason it is useful is because yes can output anything, and so is useful to produce any repeated data for test files etc.

You can see the justification detailed in the original optimization commit: https://github.com/coreutils/coreutils/commit/35217221

pixelbeat__··on How is GNU `yes` so fast? (2017)
I did this because it runs significantly faster with relatively extra complexity. It's useful for quickly generating test data etc
pixelbeat__··on Bash-oneliner: A collection of handy Bash one-liners and terminal tricks
Note realpath is the preferred interface these days. For some history see: https://unix.stackexchange.com/a/136527
pixelbeat__··on Moreutils: A collection of Unix tools that nobody thought to write long ago
pee is not really needed these days as with bash you can:

  tee -p >(command | line)
Note the -p option available now with GNU tee that doesn't exit tee if the pipe closes early
pixelbeat__··on Moreutils: A collection of Unix tools that nobody thought to write long ago
Using sponge to replace a file is equivalent to method 6 at:

https://www.pixelbeat.org/docs/unix_file_replacement.html

Note the caveats listed there

pixelbeat__··on The Unexpected Importance of the Trailing Slash
Yes there are inconsistences and surprises with trailing slash handling. For e.g rmdir doesn't follow symlink-to-dir/ on Linux. I tried to at least clarify what was happening in this case recently: https://github.com/coreutils/coreutils/commit/9de1d153
pixelbeat__··on Firefox UI/UX History
Here's an equivalent visual history of the mozilla mail clients

https://www.pixelbeat.org/docs/netscape_email/

pixelbeat__··on Bugs in Hello World
Jim Meyering's classic "Goodbye World" talk on this

https://www.gnu.org/ghm/2011/paris/slides/jim-meyering-goodb...

pixelbeat__··on Bugs in Hello World
Jim Meyering's discussion on how this is handled usually in GNU programs

https://www.gnu.org/ghm/2011/paris/slides/jim-meyering-goodb...

pixelbeat__··on Easily handle CLI operation via Python instead of regular Bash programs
Lots of similar tools in the vein. Here's my funcpy tool, which has references to similar tools

https://www.pixelbeat.org/scripts/funcpy

pixelbeat__··on Linux kernel heap buffer overflow in fs_context.c since version 5.1
Overflow https://www.pixelbeat.org/programming/gcc/integer_overflow.h...
pixelbeat__··on Uutils: an attempt at writing cross-platform CLI utilities in Rust
As a GNU coreutils maintainer, I'm happy to see another implementation. A lot of the coreutils development effort goes into testing, and new implementations should be able to leverage the existing GNU coreutils test suite, as it just uses whatever utilities are in the $PATH

BTW some notes on how the GNU coreutils are tested are at: https://www.pixelbeat.org/docs/coreutils-testing.html

pixelbeat__··on Sed challenge: join cal -y months into a single column
I know this is not in the spirit of the article, but getting the number of weeks is quite useful generally. One can do this with the standard date util like:

    $ echo $(((($(date +%s -d 'Aug 31') - $(date +%s -d 'Jul 1'))/(60*60*24*7))))
    8  # 8.7 weeks truncated

    $ echo $(((($(date +%W -d 'Aug 31') - $(date +%W -d 'Jul 1')))))
    9
It's useful to get the number of weeks from git logs for release notes etc., which can be done like:

   oldvs='v1.0'
   oldts=$(git log -n1 --format="%at" "$oldvs")
   weeks=$((($(date +%s) - $oldts)/(60*60*24*7)))
pixelbeat__··on I'm “still afraid to use spaces in file names” years old
POSIX portable file names were defined not to have spaces, and just contain '[[:alnum:]_./]'.

The findnl script as part of fslint identifies problematic patterns, and has 4 levels of stringency, with "POSIX" being the most stringent. https://github.com/pixelb/fslint/blob/master/fslint/findnl

pixelbeat__··on Seashells: Pipe output from command-line programs to the web in real-time
For generally converting cli output to HTML see also https://github.com/pixelb/scripts/commits/master/scripts/ans...
pixelbeat__··on Generic CRC algorithm generator, from Mark Adler
We used CPU intrinsics in version 9 of GNU coreutils, for the cksum utility. From the release notes:

"cksum [-a crc] is now up to 4 times faster by using a slice by 8 algorithm, and at least 8 times faster where pclmul instructions are supported."

Implementing that portably is a bit tricky, as one must consider:

  - support various compilers which may not support intrinsics
  - runtime checks to see if the current CPU supports the instructions
  - ensure compiler options enabling the instructions are restricted to their own lib to ensure the don't leak into unprotected code.
    - automake requires using a separate lib for this rather than just a separate compilation unit
BTW we also introduced avx intrinsics for `wc -l`
← PreviousPage 2 of 4Next →