Better HN
topnewbestaskshowjobs
Log inSign up

Hello71

1,909 karma · joined Sep 24, 2012 (14y ago) · 1,011 submissions

Submissions

comment 3y ago · link · parent

but... if you use unprivileged user namespaces, tmux isn't a very good use, because then you can't use any suid programs like su, sudo, doas, pkexec, fusermount, mount (user), etc.

comment 3y ago · link · parent

isn't that what you want if you want to calculate adsense revenue?

comment 3y ago · link · parent

afaik the linux kernel doesn't read environment variables, but it does write some: processes spawned by the kernel, such as init, modprobe, and request_key, start with some pre-defined environment variables, like HOME=/ TERM=linux PATH=/sbin:/usr/sbin:/bin:/usr/bin.

comment 3y ago · link · parent

what percentage of the money actually goes to the volunteers?

comment 3y ago · link · parent

according to https://arstechnica.com/gadgets/2021/09/examining-btrfs-linu..., btrfs devs say you should not add degraded to fstab, and doing so can easily result in data loss.

comment 4y ago · link · parent

termux doesn't use most of the system libraries that are likely to be remotely exploitable, e.g. openssl and webview. the remaining unupdatable weakness is the kernel, but it's pretty unlikely to have a TCP RCE or something like that. there's SACK Panic, but that's only DoS, not RCE, and if you're running something on android 5 you probably have low reliability expectations anyways.

comment 4y ago · link · parent

after reading a reddit thread a few months ago about why forks are better than chopsticks, I realized that food and the utensils used to eat it are actually highly culturally intertwined.

for example, a key argument in favor of forks was that fork and knife is vastly superior to chopstick and knife when eating steak. Asian cultures simply don't have this issue, because they don't eat steak, because they don't (historically) have huge pastures for free cattle grazing. in Asian cuisine, meat is served pre-cut, not in large chunks for the diner to cut themselves. therefore, Asians don't have the problem of cutting steak at the table.

similarly, Americans rarely eat soft tofu; although tofu is gaining popularity in the US, mainstream grocery stores and restaurants selling tofu tend to sell firm tofu, probably mainly because it's closer to meat in texture. firm tofu is usually served pre-cut, for various reasons including that firm tofu is usually served with stronger and more uniform flavoring. therefore, Americans don't need to cut their soft tofu at the table.

chopsticks are also useful for taking individual bites out of a shared plate without disturbing the remaining contents. consider taking one bite of a shared salad using a fork: it's impossible to do so without either slightly crushing the remainder of the salad, which is impolite, or using the fork as a spoon, which is highly inefficient (salad falls off easily). Americans don't have this problem because they generally take a large portion of salad using a spoon or tongs, then use the fork to take bites from their own plate where it's acceptable to slightly crush the salad.

comment 4y ago · link · parent

despite Chinese-American fast food restaurants typically using cheap disposable bamboo chopsticks, metal chopsticks also exist and are used in many restaurants. higher-end restaurants typically use high-quality (heavy) polymer or coated wooden chopsticks which can be thoroughly cleaned in regular dishwashers.

edit to add: I enjoy Chinese-American fast food, but like all fast food, it is designed to be cheap, not luxury. it would be like going to an American-style fast food restaurant and complaining that all American food is bad because it gets your hands dirty when eating, or complaining that the cheap disposable plastic utensils are hard to clean (which gets to another point that disposable wooden chopsticks are probably much better for the environment than disposable plastic forks/knives, but that's a digression from a digression)

comment 4y ago · link · parent

OneDrive for Business is also SharePoint, and Teams is also Exchange (sort of)

comment 4y ago · link · parent

you only need 30 MB if you use the ridiculously bloated icu library. musl implements POSIX locale APIs including iconv and wcwidth plus the entire rest of the libc in around half a megabyte. if you need case folding, character classes, or other special functionality, utf8proc is about 0.3 MB, and libunistring is about 1.5 MB.

additionally, if your device has less than a few megabytes of storage, you'll almost certainly be using static linking, which automatically prunes unused code from properly designed libraries.

comment 4y ago · link · parent

https://en.wikipedia.org/wiki/List_of_common_misconceptions#...:

> Microwave ovens are not tuned to any specific resonance frequency for water molecules in the food, but rather produce a broad spectrum of frequencies, cooking food via dielectric heating of polar molecules, including water. Several absorption peaks for water lie within the microwave range, and while it is true that these peaks are caused by quantization of molecular energy levels corresponding to a single frequency, water absorbs radiation across the entire microwave spectrum.

comment 4y ago · link · parent

according to that article, the train and station already had surveillance cameras. the current post and comment thread are about surveillance microphones; how would that help with the investigation in your article, where we can reasonably assume that the robbers were shouting things like "open your bag" and "give me your wallet", and interview witnesses to confirm our assumption?

comment 4y ago · link · parent

> Wine isn't set up to support multiple installed versions of itself.

huh? the official wine packages for ubuntu, debian, and i believe fedora provide separate wine-devel and wine-staging packages, which can be installed in parallel with each other and with distro packages. in fact, debian (and ubuntu) as well as arch provide separate wine and wine-staging packages as part of the distro itself, no separate repo required.

wine has no special support for relocated installations, but no more or less so than any large Unix program; you can install as many copies as you want, but they must be compiled with different --prefixes, and you cannot use different versions of wine simultaneously with the same WINEPREFIX.

comment 4y ago · link · parent

that's running it directly on musl. gcompat is more like a passive adapter which works except you need to know if the device you're plugging in actually supports 240V, which most stuff does nowadays but when it doesn't it explodes horribly.

comment 4y ago · link · parent

with difficulty, and not that well. for example, firefox binaries require gtk built with support for X, despite only actually using wayland at runtime if configured. the reason why people generally don't complain about it is because if you have this sort of weird configuration, you can usually compile firefox yourself, or have it compiled by your distro. with binary-only releases, all complaints (IMO justifiably) go to the proprietary software vendors.

comment 4y ago · link · parent

while i am not a "cloud expert", i'm pretty sure that google datacenters have more than one switch. furthermore, while the precise datacenter layout is probably secret, i infer that the the compute servers and the data servers cannot be housed in the same or nearby racks, since both are independently provisionable and can be arbitrarily attached. for example, if i start a vm and connect a drive, even if google could put them right next to each other in the datacenter, what happens if i start another vm, which for fragmentation reasons gets placed way on the other side of the building, detach the drive and connect it to this new one?

therefore, there must at least be several switches between the devices, and realistically, probably one or more routers.

comment 4y ago · link · parent

not if the program is statically linked and stripped.

comment 4y ago · link · parent

This reminds me of when people say that the Visual Studio debugger is much better than gdb, or that Windows developer tooling in general is better than Linux tooling.

I believe the main reason why gdb kinda stinks is that it can be: traditional Unix-like operating systems typically have smaller components with well-defined interfaces, making them much easier to debug. Windows has too many DLLs, too many interfaces between them, and poor definition of layers. Quick, what's the difference between kernel32 and kernelbase? How do I tell which one a program is using?

This is not to say that Unix-like systems have perfect interfaces, merely that they're generally better-factored than interfaces inside Windows and Windows applications. Further comments can be made of the differences between Windows and Mac "applications" and Linux "programs": for example, the difference is not only in GUI or TUI or CLI: Firefox is an "application", but Notepad and Calculator are "programs"; Paint is a "program", but Paint 3D is an "application".

comment 4y ago · link · parent

i was able to find the xxhash core within 5 minutes, with no particular experience in xxhash or hashing algorithms.

1. google xxhash, click first result (github)

2. open xxhash.c

3. see it is mostly empty, go back and open xxhash.h. this file is 6k lines (not 20k), it probably has most or all of the implementation somewhere.

4. starting from top of file, read intro docs: "xxHash [...] is proposed in four flavors, in three families: 1. @ref XXH32_family: Classic 32-bit hash function." i will select XXH32 for illustration.

5. scroll down to examples, which calls "return XXH32(string, length, seed);"

6. ctrl-f "XXH32(", could be done in any text editor (even notepad)

7. press enter 6 times

8. see "@brief The implementation for @ref XXH32().", we have probably arrived at the core or reasonably close to it. if that didn't work, then I would try "XXH32 (", which would immediately find the XXH32 function.

of the 6k lines, about 550 are empty, about 2800 are comments, and about 800 are preprocessor directives. the comments appear to be mostly useful comments, not the "/* Frobnicate the bar. */ int Bar::frobnicate()" type which tend to be seen in IDE-overuse projects.

comment 4y ago · link · parent

that's true, I didn't think about that. a restaurant probably has better ventilation and better fuel than a crappy household wood stove, but even, say, half a pack per day is a lot.

comment 4y ago · link · parent

biofuel is carbon-neutral. it might cause some particulate pollution, but if it's minimal enough for use in a restaurant dining area, then the environmental impact is probably negligible.

comment 4y ago · link · parent

Selecting both scale and rotate options results in:

  Multiple -filter, -af or -vf options specified for stream 0, only the last option '-filter:v transpose=1' will be used.
-vn, -an, -ss, and -to are specified as output rather than input options, which are much more efficient.

comment 4y ago · link · parent

this only looks terrible because you've forced a specific height in rem. https://jsfiddle.net/vbd3fok5/ looks fine to me. there is some extra space, but I assume that if the font designer added extra space on top of the text, they did it on purpose. if you insist on ignoring that, https://jsfiddle.net/qpb0d45n/ makes the text "visually continuous", at least for a non-Korean reader like myself. I would speculate that a Korean user might look at this and ask why the site designer ignored their font's preference for space above the text.

comment 4y ago · link · parent

and what is the rut=4a9ada2347e29c8fce96a95bde34e6343c279202dbc22b4fe61524ab39bf8eff for?

comment 4y ago · link · parent

> It was almost impossible to prosecute a ship owner who lived across the ocean in Europe, so simply seizing a ship and its smuggled goods was a viable alternative.

why not? prosecute them normally, if they show up then the trial proceeds as usual, if not then convict them in absentia and then forfeit the goods. why does this require a whole new system that bypasses all the constitutional rights for domestic citizens?

comment 4y ago · link · parent

My ASRock B450 Pro4 draws about 3W from the wall if WOL is enabled, which in ASRock's firmware seems to keep all PCI devices (and attached USB devices) powered. 30W seems impossible though, anything not specifically designed to be fanless will almost certainly need to turn on the fan at that power usage (and even fanless might have difficulty dissipating a constant 30W).

comment 4y ago · link · parent

is it common to need to take the FTC on residence taxes? my understanding is that US federal income taxes are lower than most foreign taxes, and skimming the Japanese personal income tax brackets, it seems to be slightly higher than US federal income taxes (ignoring deductions).

comment 4y ago · link · parent

setting aside whether a gif is really necessary, it was surprising to me that your gif is so large, considering it's mostly flat colors, albeit at a fairly high frame rate. running it through gifsicle -O3 takes off 1 MB, and -O3 --lossy takes off another MB. -O3 --colors 4 drops it by another 2 MB, for a total of 69% file size reduction, at the cost of some minor fringing only visible when displayed full-screen.

comment 4y ago · link · parent

while i agree with you to some extent, i don't think including a very large set of sorting functions in the standard library is a good idea. especially for dynamic languages, a larger standard library means more disk usage and worse cache utilization. it's also typically relatively easy to use your own sort function: in performance-critical cases, the sort function is usually called directly, not via intermediate libraries (which might need to be patched to call the new sort function); also, sort functions are self-contained, i.e. typically don't require system dependencies.
12345
34