Better HN
topnewbestaskshowjobs
Log inSign up

Hello71

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

Submissions

comment 4y ago · link · parent

thanks!

comment 4y ago · link · parent

source? upon searching for "e6 ham", "norway ham tax", "e6 skinke" etc found only this post.

comment 4y ago · link · parent

constant means the speed doesn't change with cpu frequency, invariant means the speed doesn't change with power saving. https://www.chromium.org/chromium-os/how-tos-and-troubleshoo...

comment 4y ago · link · parent

> Via TLP on Linux, I've been capping my laptop's CPU (i7-8665U) to 800Mhz whenever I'm on battery.

in most cases, on modern hardware, limiting the frequency significantly below its nominal maximum will reduce battery life. for a fixed amount of work (e.g. parsing an HTML document), it is more efficient to complete the task as quickly as possible then return to a low-power state. the picture gets somewhat murkier when considering increased voltage requirements at higher clock speeds and certain fixed-wakeup workloads, but the majority of scheduler tuning for battery-powered devices over the past decade has been towards going to sleep as quickly as possible, even if that requires a high peak frequency.

comment 4y ago · link · parent

> For some handle types like sockets, for hardware reasons (multicore CPUs) Linux no longer guarantees sequential file descriptors.

huh? this would be a severe POSIX violation, which says that for socket and accept, "The file descriptor shall be allocated as described in File Descriptor Allocation.": "All functions that open one or more file descriptors shall, unless specified otherwise, atomically allocate the lowest numbered available (that is, not already open in the calling process) file descriptor at the time of each allocation."

comment 4y ago · link · parent

I don't run DNSSEC either, but as you know, the Slack issue was caused by haphazard implementation, followed by apparent panicked incorrect rollback. They would have had basically the same issue if they had added incorrect AAAA records with long expiry. There may well be reasons not to deploy IPv6, but I don't think this is a good one. Similarly, while I agree that DNSSEC offers few upsides, I don't think this particular example is a good one against DNSSEC itself.

comment 4y ago · link · parent

The vast majority of these programs are not ordinarily linked in a single DSO though; KDE and the Linux kernel for example are well-known for containing very large numbers of DSOs. I am also skeptical of this methodology: checking the first project, KDE, on the linked source, Open Hub, it says there are 19 million lines of code, not 58. Of those, only 63% are in C++, with 16% in XML, 6% in PHP (?), etc, which would presumably not count towards a linking cap.

comment 4y ago · link · parent

> So I guess bash or whatever does an mmap of the script it’s running

this is incorrect, and is relatively easy to test:

  $ strace -y -P /tmp/test.sh bash /tmp/test.sh
  ioctl(3</tmp/test.sh>, TCGETS, 0x7ffc6daea580) = -1 ENOTTY (Inappropriate ioctl for device)
  lseek(3</tmp/test.sh>, 0, SEEK_CUR)     = 0
  read(3</tmp/test.sh>, "#!/bin/sh\n", 80) = 10
  lseek(3</tmp/test.sh>, 0, SEEK_SET)     = 0
  dup2(3</tmp/test.sh>, 255)              = 255</tmp/test.sh>
  close(3</tmp/test.sh>)                  = 0
  fcntl(255</tmp/test.sh>, F_SETFD, FD_CLOEXEC) = 0
  fcntl(255</tmp/test.sh>, F_GETFL)       = 0x8000 (flags O_RDONLY|O_LARGEFILE)
  newfstatat(255</tmp/test.sh>, "", {st_mode=S_IFREG|0644, st_size=10, ...}, AT_EMPTY_PATH) = 0
  lseek(255</tmp/test.sh>, 0, SEEK_CUR)   = 0
  read(255</tmp/test.sh>, "#!/bin/sh\n", 10) = 10
  read(255</tmp/test.sh>, "", 10)         = 0
the reason why modifying a script during execution can have unpredictable results, not demonstrated in this test, is that Unix shells traditionally alternate between reading commands and executing them, instead of reading the entire file (potentially very large compared to 1970s RAM size) and executing commands from the in-memory copy. on modern systems, shell script sizes are usually negligible compared to system RAM. therefore, you can manually cause the entire file to be buffered by enclosing the script in a function or subshell:

  #!/bin/sh
  main() {
  # script goes here
  }
  main

comment 4y ago · link · parent

> In the US, an apology is considered an admission of responsibility and is often the starting point of legal action against the culprit

source? this is a popular theory among non-lawyers, but not, as far as I can tell, well-supported by the evidence. http://jaapl.org/content/early/2021/05/19/JAAPL.200107-20 has extensive citations including for their claim that "In theory, telling a patient about an error may make patients more likely to pursue litigation. In practice, however, bad outcomes alone are typically not reason enough for patients or their families to file malpractice claims."

comment 4y ago · link · parent

musl has lasted almost one-third as long as glibc, with significantly less than one-third the number of ABI breaks. as far as I know, the only musl ABI break has been time64; despite glibc's supposedly superior version handling, musl has completed time64 support with headers only, whereas glibc is still in progress.

comment 4y ago · link · parent

is it possible that microsoft bought the rights to the software

comment 5y ago · link · parent

in classic Microsoft fashion [0], WSL1 is not officially abandoned, but seems to be planned to be left in half-finished mode forever. bugs are closed as "fixed-in-wsl2" without further comment: https://github.com/microsoft/WSL/issues?q=label%3Afixed-in-w..., including serious bugs causing incorrect computations: https://github.com/microsoft/WSL/issues/830.

[0] see the dozens of official Windows GUI frameworks: https://news.ycombinator.com/item?id=16736720 (and since then, it's gotten worse: https://www.google.com/search?hl=en&q=uwp%20deprecated)

comment 5y ago · link · parent

looking at last 1000 commits to gcc, it seems like about 80-90% of emails are associated with "big corps". however, this doesn't tell the whole story. according to https://lwn.net/Articles/867540/, over 85% (100%-6.8%-5.0%-1.6%=86.6%) of Linux kernel changesets are supported by employers, but nobody sensible would claim that Linux is not community developed. whether it is because of historical project culture, or BDFL, or simply a large number of contributing organizations, there is clearly a substantial difference between Linux and OpenJDK development methodology.

comment 5y ago · link · parent

i don't think that's consistent with history. there used to be a large number of Java implementations; by far the biggest reason why they (almost) all died out is because Sun agreed to open up their implementation. IBM still maintains J9, and while that's only part of a full Java implementation, I don't see any reason why Apache Harmony or GNU Classpath couldn't be revived and combined with it for a high-performance Oracle-less Java implementation. there is major precedent for this in the form of GNU/Linux, where substantial parts of the userspace are provided by GNU, but the kernel is a separate project.

comment 5y ago · link · parent

unless you're exclusively running shell built-ins, doesn't running any command at all potentially cause a disk scan

comment 5y ago · link · parent

  echo power | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference

comment 5y ago · link · parent

But Microsoft can do that too? They can compile one version of each DLL for SSE2 and another for AVX or whatever if they want, same as any other vendor. It's not like they can just turn off SSE2 for everybody, because it would break every program, and even new programs may use SSE2 instructions in combination with newer x86 extensions. Even if they did (and I'm not sure it's even possible in x86), I don't see how it could increase security anyways; any new Spectre vulnerability or whatever is probably going to be just as exploitable if not more so using AVX load instructions as SSE load instructions.

comment 5y ago · link · parent

I'm not sure I buy your point about ISA extensions. Many programs still target Windows XP or Windows 7, and if that "lag" remains the case, then it will be many, many years until vendors can reasonably require Windows 11 as a proxy for those ISA extensions. In the meantime, vendors can offer a Windows XP-11 version, and a Windows 11 "optimized" version, but at that rate, it would be just as much work to put the optimizations in the single version and make the program automatically detect the CPU, saving the user the trouble of figuring out which version they need while also making the CPU optimizations work on older Windows versions.

comment 5y ago · link · parent

The original article is extremely clear on this fact.

The title:

> A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux

as opposed to ELF Executables for non-Linux systems, or a.out executables for Linux. In the middle of the article, when the illegal shenanigans start:

> Unless, that is, we could change the contents of the structures to make them match even further....

> How many of these fields is Linux actually looking at, anyway? For example, does Linux actually check to see if the e_machine field contains 3 (indicating an Intel 386 target), or is it just assuming that it does?

At the end of the article:

> Of course, half of the values in this file violate some part of the ELF standard, and it's a wonder that Linux will even consent to sneeze on it, much less give it a process ID. This is not the sort of program to which one would normally be willing to confess authorship.

I don't see how the author could possibly be any clearer that this is Linux-specific and will probably not work (unmodified) on non-Linux systems.

comment 5y ago · link · parent

ld isn't the dynamic linker either, it's the object linker. the name of the dynamic linker is ld.so or ld-linux.so. this is also documented in the ldd man page.

comment 5y ago · link · parent

duplicate of https://news.ycombinator.com/item?id=28720338

comment 5y ago · link · parent

> all the world is not Linux or BSD

since when does glibc run on bsd

comment 5y ago · link · parent

  Location: Toronto, Canada
  Remote: Open to
  Willing to relocate: Yes
  Technologies: C, Python, shell, Linux, git
  Résumé/CV: https://www.alxu.ca/resume/
  Email: see resume

comment 5y ago · link · parent

the first sentence of the article:

> The new biography Steve Jobs

it was a response to the new biography.

comment 5y ago · link · parent

Normally, terrible. These systems are built with anemic, usually single-core CPUs usually in the low 100s MHz. The only way they can actually do gigabit switching is by hardware offload to dedicated ASICs. Anything going through the main CPU, even without encryption, will have terrible performance.

comment 5y ago · link · parent

If you can pause writes to the disk while reading from it (and you are using a supported filesystem, and you aren't doing or can ignore any raw device accesses), it would be much easier to use fsfreeze(8) instead. Caution is of course required when using this on the root filesystem, but I would trust it far more than anything using blktrace. My guess, having used it before but not closely investigated it, is that while it may appear reliable at first, it is most likely not highly tested to drop no events under load, and the same applies for this tool. On the other hand, as long as I've worked out that fsfreeze won't deadlock the whole machine, I'm reasonably confident that it will result in a correct disk image.

comment 5y ago · link · parent

According to https://tradingeconomics.com/country-list/sales-tax-rate?con..., out of G20 countries, 16 have sales tax rates greater than or equal to 10%. This seems to only counts national sales tax, since it lists 5% for Canada, but about 85% of Canadians live in areas with more than 10% total sales tax.

comment 5y ago · link · parent

> uname -a

so whenever you upgrade the kernel or change CPU all your programs need manual patching? you may answer, "well uname -a was a joke, you would actually check the libc version". this worked alright in a very specific time period with a couple of big vendors with nigh-unmodifiable toolchains with well-defined release versions. it became increasingly awful when people started making their own toolchains with free software and had to patch every single piece of software to properly detect their new libc. sitting through an hour of autoconf sucks, but slogging through ten hours of patching poorly written bespoke configure scripts is a hundred times worse.

edit: not to mention cross-compiling where you can't even run uname -a, and which was almost universally broken before autoconf, which, despite being painful, made cross-compiling mostly work everywhere.

comment 5y ago · link · parent

> one-click "disable 1p CSS"

this is built in to firefox since it was netscape navigator, under view -> page style -> no style.

even the menu items have barely changed since then: http://www.alanwood.net/unicode/net7_encoding.gif

1
456
34