HNHacker News
TopNewBestAskShowJobs

Hello71

1,909 karma · joined September 24, 2012

submissionscomments
Hello71··on How to compare two PDF documents
not only is this the first solution presented in the article, you've not even bothered to pass -layout to pdftotext or -u/-y to diff which would make this marginally workable. spaces after shebang also doesn't always work (e.g. in qemu), you don't clean up the temporary files, and the temporary files have unhelpful names.
Hello71··on Git password authentication is shutting down
> If "git pull --rebase" succeeds without reporting a merge conflict, then it's tantamount to having executed the command with "--ff-only".

this is not correct. git rebase, as with git merge, will automatically resolve conflicts using a 3-way merge algorithm.

> It will only ever modify your local

this is correct.

> unpublished commits

this is not correct. git rebase (in its default mode) rebases all commits that are not upstream onto the upstream. it has nothing to do with whether they are published or not. if you have a published feature branch, and git pull --rebase into it, git rebase will dutifully rebase all your commits.

Hello71··on Git password authentication is shutting down
as far as i can tell there's no git --configure. you may be confusing it with Xorg -configure, which is (very) obsolete and shouldn't be used.
Hello71··on Summary of the semantics of inline in C and C++
as pointed out in the reply, this is incomplete. there are actually three versions of inline in common use in C-like languages: gnu89, c99, and c++, which are all different.
Hello71··on Happy Birthday, OpenStreetMap
Commoditize Your Complement
Hello71··on The Economics of OnlyFans: Most accounts make less than $145/mo
that's not how medians work. if 100 creators make $100 each, then the median income is $100. if you divide it again by 100, then you'll get $1/creator^2 which is a nonsense number.
Hello71··on Beware of 'shrinkflation,' inflation's devious cousin
> © REDDITT/IMGUR

ah, daily mail...

Hello71··on Steam survey shows Linux marketshare hitting 1.0%
> full OS reboots

while it's theoretically possible for this to be caused by software, it seems more likely considering the other issues you've listed that there are some hardware issues here. linux drivers exercise the hardware differently from windows, and usually more efficiently. if your hardware is weak (particularly PSU), it can fail during intense loads. see: people blaming prime95 for crashing their computer.

Hello71··on The journey to controlling external monitors on M1 Macs
https://www.google.com/search?q=macos+send+ethernet+frames&h...

if you have root access, you should be allowed to have raw device access. the problem seems to be that apple no longer believes in users owning their computers, if it ever did.

Hello71··on Command line tools for productive programmers
it looks like entr does a bunch of weird, potentially incompatible things, like redirecting stdin from /dev/tty and leaving FDs open in the child. however, my guess is that your build process is non-atomic, and your program is crashing due to necessary files being partially updated. this could probably be hacked around by doing something like `entr /bin/sh -c "sleep 1; exec realcommand"`.
Hello71··on Zip – How not to design a file format
Huh? I just checked the Info-ZIP zip man page, and it says (reformatted):

> -g, --grow: Grow (append to) the specified zip archive, instead of creating a new one. If this operation fails, zip attempts to restore the archive to its original state. If the restoration fails, the archive might become corrupted. This option is ignored when there's no existing archive or when at least one archive member must be updated or deleted.

I tested this on Linux and it appears to work as advertised. I assume the reason why it is not enabled by default is because "If the restoration fails, the archive might become corrupted".

edit: python zipfile in append mode also appears to avoid rewriting the zip file. libarchive doesn't seem to support appending to zip files.

Hello71··on Kubernetes is our generation's Multics
At the risk of falling down an analogy rabbit hole, I'll be upset if the HVAC guy assumes that air will flow freely throughout the house and has no understanding of walls, or if the drywall guy blindly screws into my air ducts. No abstraction is perfect; some knowledge of the other layers is necessary to do a proper job. Unfortunately, in software, it seems like our abstractions are particularly leaky, and knowledge of other layers is frequently necessary to do a proper job. In house building, issues are usually contained by physical proximity, whereas the same is obviously not true in software, particularly networked software.
Hello71··on Torpar: TUI Client for Torrent Paradise (Distributed Torrent Search)
it doesn't seem like it actually uses blockchain? according to https://en.wikipedia.org/wiki/Proof_of_personhood, it's basically PGP WoT but hopefully actually usable?
Hello71··on Our lawsuit against ChessBase
> the CC0 Public Domain Dedication is GPL-compatible and acceptable for software.
Hello71··on Things I Learned Reading Webkit’s UA Stylesheet
this reminds me of https://nautil.us/blog/impossibly-hungry-judges: google has the majority of github repos indexed (although isn't always great at giving you the best result), and webkit is a pretty popular software. unless this parameter was added to the codebase literally minutes ago, google should have at least some results. the fact that absolutely no results show up means that something is either wrong with google, or more likely, your query.
Hello71··on HaikuOS running on RISC-V hardware (HiFive Unmatched)
as far as i can tell, the whole point of haikuos at this point is "fun". as pointed out e.g. at https://en.wikipedia.org/wiki/Haiku_(operating_system)#Criti..., haiku will never be a "mainstream" os. it seems plausible to me that riscv enablement is more "fun" than figuring out how to mangle crappy proprietary drivers enough to barely run.
Hello71··on When static makes your C code 10 times faster
static can also make your code 10 times smaller: note that in the linked godbolt, there are actually two copies of both loop functions: one regular, and one inlined. this is because the compiler wants to inline the function, but is required to generate an additional one in case someone else will be calling it. what's more, at least on Linux, this copy cannot be removed from the final executable even if nobody calls it, unless a) the compilation is done with -ffunction-sections and the linking is done with --gc-sections, or b) LTO is enabled. adding static to the function declaration resolves this issue.

the situation is even worse with ELF dynamic libraries due to the interaction of two rules: a) by default, all functions are exported, and b) by default, all functions can be interposed, e.g. by LD_PRELOAD. here, if you specify -fPIC in the compilation arguments (as is required to produce a modern dynamic library), inlining is totally disabled. for small functions, the call overhead can be substantial.

Hello71··on Audacity may collect “Data necessary for law enforcement, litigation” and more
there's an easier way that doesn't require root and also doesn't break your environment variables:

  unshare -Ucn program
Hello71··on Things I wish Git had: Commit groups
https://github.com/mhagger/git-when-merged

edit: also https://stackoverflow.com/questions/8475448/find-merge-commi..., and also github shows this (but only for github PRs, not other merges)

Hello71··on Linux with “memory folios”: a 7% performance boost when compiling the kernel
AMD64 supports only 48-bit addresses, and is still the most popular server ISA.

  You have: 2^48 byte
  You want: tebibyte
          2^48 byte = 256 tebibyte
          2^48 byte = (1 / 0.00390625) tebibyte
how many servers do you have with more than 256 TiB of RAM?
Hello71··on How to handle secrets on the command line
it's not the main point of the article, but curl -X is being misused here. as the manual explains, "Normally you don't need this option. All sorts of GET, HEAD, POST and PUT requests are rather invoked by using dedicated command line options." https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-cu... reiterates the issue, along with a reminder that -X persists past redirects (hope your API doesn't redirect to a completion page).

after searching for "PUT" in the manual, I found "-T, --upload-file <file> [...] If this is used on an HTTP(S) server, the PUT command will be used. Use the file name "-" (a single dash) to use stdin instead of a given file."

Hello71··on How to handle secrets on the command line
> if you are protecting yourself from something that can access /proc (i.e. root)

on Linux and all other Unix-like systems I know of, all users are allowed to list running processes and their command lines.

> Protecting yourself from a rogue process that can monitor `ps` is also already a lost battle.

ps is not a privileged command on most systems. POSIX says "On some implementations, especially multi-level secure systems, ps may be severely restricted and produce information only about child processes owned by the user."; "severely restricted" implies that this is not a common behavior.

furthermore, the article explains clearly how to hide secret arguments from ps. that's the main point of the article.

Hello71··on Fedora contemplates the driverless printing future
Brother did not invent ink tanks. According to https://en.wikipedia.org/wiki/Supertank_printers, Epson first introduced supertank printers to the US market, but continuous ink systems with (I assume) external tanks are at least 15 years old: https://en.wikipedia.org/w/index.php?title=Continuous_ink_sy.... As far as I can tell, your linked article doesn't even claim that Brother invented ink tanks, merely that Brother sells them and they are good.
Hello71··on A stupid simple make wrapper that makes my life easier
more specifically the problem with type is it's not clear whether "An error occurred" includes the case where the command is not found. one could reasonably argue that printing "command not found" is a successful run. additionally, it's only present in the XSI extension. for these reasons, command -v is usually preferred for better POSIX compatibility.
Hello71··on Unix Shell Programming: The Next 50 Years [pdf]
as I comment in basically every one of these shell articles, while Unix shell does kinda suck, the main problem is that the bad examples far, far outnumber the good ones, and so everybody programs in an overly complicated manner.

  SCRIPT_DIR="${0%/*}"
works in practically all shells, as long as the script is actually invoked by path (if you do curl script | bash, you're SOL right off the bat).

the same applies with "combination of grep, awk and cut". awk contains almost all the functionality of grep, sed, and cut, so any pipeline of awk plus one of the others is almost always unnecessarily complicated. it would be like complaining "in python, string handling is so hard. look, you have to do import re; for x in re.sub(...).match(5).split(' ')[3:-5]: lst.append(x)". of course if you make it overly complicated then it will be overly complicated.

there are also too many footguns. spaces and newlines are trivial to handle in 95% of scripts, as long as you quote every expansion. as long as you never ever write cmd $file and always write cmd "$file", that solves virtually all whitespace problems. quotation marks in filenames are never interpreted in a special manner in Bourne-like shell unless you use eval, which has the same pitfalls as any other interpreted language (see python above).

Hello71··on A stupid simple make wrapper that makes my life easier
there are more issues after fixing all of those: grep -w is not POSIX, the exit status of type is not clearly defined by POSIX, realpath is not POSIX, basename is POSIX but can be replaced with ${path##*/} for most well-formed paths (gives different results for /, but this script doesn't work properly for / anyways?), inodes are not unique across devices, --directory=dir has ugly handling but seems to work but --directory dir doesn't (i think it silently sets the directory to --directory and then passes dir as a separate argument?)
Hello71··on Y Combinator backed MMO metaverse game is a blatant scam
> Runescape was basically turn-based and ran like 1 turn a second

actually, runescape still has 0.6 sec ticks. it has become part of the meta-game to input commands at exactly 0.6 second intervals for optimal efficiency, and is basically mandatory for high-level pvp combat.

https://oldschool.runescape.wiki/w/Tick_manipulation https://runescape.wiki/w/Tick_manipulation

Hello71··on Azar, a Korean Chatroulette-style dating app quietly taking over the world
according to wiktionary, they both originate from Arabic اَلزَّهْر‎ (az-zahr, “the dice”). presumably frenchmen were simply wont to add a bunch of silent letters.

https://en.wiktionary.org/wiki/hasard https://en.wiktionary.org/wiki/azar

Hello71··on Run your ghost blog on Raspberry Pi for free
i assume they mean "Managed install & setup"
Hello71··on Rufus: Reliable USB Formatting Utility
this is a zsh-ism. on bash it will have no effect.
← PreviousPage 6 of 33Next →