HNHacker News
TopNewBestAskShowJobs

zeotroph

508 karma · joined August 2, 2012

submissionscomments
zeotroph··on Btrfs in Linux 6.2 brings performance improvements, better RAID 5/6 reliability
Months? I thought it would just go through all the data and verify that the stored checksums match. Even if it fetches filedata more than once to ensure the parity bits are ok, how can it take longer than reading the entire disk a couple times?
zeotroph··on Btrfs in Linux 6.2 brings performance improvements, better RAID 5/6 reliability
Is there a zfs native way to create raid0 disks now? On Linux I usually set up a linear mapping with dmsetup, and then point zfs to that. But this hides the native disks from zfs.

I've done that a couple times to make a bunch of mismatched disk fit into zfs's requirement that all are of the same size. The ability to work with a mix of disk sizes is one advantage of btrfs - if you remember to be extra careful on a disk failure and bad shutdown. Plus the ability to dynamically grow the array, but there is work to improve that in the zfs side as well.

zeotroph··on Ccache – a fast C/C++ compiler cache
That is the compiler itself sortof creating "ad hoc" modules to cache parts of the source code, ideally even inside a single compilation unit, which especially helped with template heavy code. This way completely new code could be sped up, which with ccache would never get a cache hit.

However that project is based on an old version of clang and the changes were never upstreamed (initially it was a commercial product), so sadly this project is practically dead.

zeotroph··on Posits, a New Kind of Number, Improves the Math of AI
The(?) posit website has a pdf[1] which goes into more details under "3.3 Posit format encoding". It also mentions a "quire" (and the footnote for the quire value is self referential?) , can anyone explain that concept?

1: https://posithub.org/docs/posit_standard-2.pdf

zeotroph··on An X11 apologist tries Wayland
Can someone address various criticism, possibly slander of Wayland, along the lines of "well it works now, but it is already outdated"?

I can't remember were I read it, but among the claims were that it is too closely coupled to GNOME, and various things like fractional scaling, apps having to provide min/max/close buttons/decorations, or window shading not being in the core protocol because of that. Also - and more seriously - the rendering was claimed to be based an outdated/wrong model meaning GUI applications can't detect and optimize for things like when to render or not, e.g. make decisions based on refresh rates or not being focused, resulting in performance or battery life problems.

The other point about missing native network support I can dismiss myself, but for the others I am not knowledgeable enough.

zeotroph··on The Val Object Model: Template for a possible future Swift object model
They mention C++ quite often, it seems like they plan to become more than an Apple-first language. If Swift had been designed to be cross platform first and then had optional, but well supported and official "ObjcInterop" and "ApplePlatform" modules it could have taken a serious portion of Go and Rust's market share. But as it is nobody outside the Apple ecosystem is even considering it.

As to "Val", there is inout (and sink set) which Herb Sutter also suggested for C++ to replace all the &ref, const ref&, *ptr, and value parameter mess which to a degree Rust also inherited.

The default let parameters (const ref&) is also what Carbon defaults to. And with explicit copies there are now destructive moves as in Rust. They write "Our goals overlap substantially with that of Rust and other commendable efforts, such as Zig or Vale" - a wasted opportunity to mention "Rust" in the title here!

I just think the fun keyword is silly and the wrong width, just use fn already! But I like any language where reference and value semantics are not hidden behind compiler magic.

zeotroph··on How to create a Python package in 2022
Python is the language with one of the highest 100%-coverage-to-effort ratios. The included unittest.mock framework is making it quite easy to trigger obscure errors and ensure they are handled properly.

Combined with thoughtful use of `# pragma: no cover` a 98% code coverage nowadays is an immediate warning that something was rushed. With this and type checking I feel RuntimeErrors much easier to avoid these days.

And typing, not even a mention?! :) But otherwise a great article, thank you!

zeotroph··on Subtitles becoming more popular, why so
For me the [off-screen sound] portions are more annoying and seem to be included in most subtitles (I am aware of "normal" subtitles vs. SDH, but often the former also include extra information).

To fix that I usually preprocess them with subclean[1], i.e. extract the subtitles with `ffmpeg -i IN out.srt` in clean and use that srt file. There are some players with cleanup options, but I never found them comprehensive enough.

Also, separate subtitle tracks would be awesome, or a slider for "how much information" you want displayed.

1: https://github.com/disrupted/subclean#example=

zeotroph··on Traffic Congestion and Infant Health: Evidence from E-ZPass [pdf]
E-ZPass is a way to collect tolls without each car having to slow down at a toll booth. That reduces traffic congestion and thereby air pollution - which might kill children. Or does kill children as the authors argue.

This paper is from 2011 and appeared in the journal Applied Economics, but that is behind a paywall.

zeotroph··on Carbon Language: An experimental successor to C++
On the road map they have Broaden participation so no organization is >50%, so this has a good chance of not becoming Swiftoogle-Lang.

Also, under "Why not Rust?"

  If you want to use Rust, and it is technically and economically
  viable for your project, you should use Rust. In fact, if you can
  use Rust or any other established programming language, you should.
  Carbon is for organizations and projects that heavily depend on C++;
  for example, projects that have a lot of C++ code or use many
  third-party C++ libraries.
zeotroph··on Carbon Language: An experimental successor to C++
Indeed, from Python to Rust and newer C++ codebases you usually see CamelCaseClasses (or structs) and then snake_case for functions methods etc, which improves readability.

CamelCaseForEverything is such a waste, maybe they use it for implicit public/private as in Go? And maybe to please existing Go or Java users?

zeotroph··on Apple's custom NVMes are amazingly fast – if you don't care about data integrity
APFS at least has metadata checksums to prevent that. However it does not do data checksums (weird decision...), despite being a CoW fs with snapshotting, similar to ZFS and btrfs.
zeotroph··on Sweden approves plan to bury spent nuclear fuel for 100k years
In Finland they are already filling up a 100k year long term storage mine [1]. Will every country with nuclear power have to find and dig (and counter-NIMBY) their own mines or could those with more favorable geological features offer theirs to others?

Earthquake-prone Japan might have a hard time finding an appropriate location.

1: 6m Tom Scott video https://www.youtube.com/watch?v=aoy_WJ3mE50

zeotroph··on Arm releases experimental CHERI-enabled Morello board
Thanks for the explanation!

So these bounds are set by the software (and are guarded against manipulation). Then each read or write to memory is checked against these bounds by the "fine grained MMU" hardware.

zeotroph··on Arm releases experimental CHERI-enabled Morello board
On most current archs:

> Any piece of code running in a process can construct an integer value and, if this integer corresponds to a valid location in the process’ address space, then it can access memory at that location.

What this adds:

> CHERI changes this. Every load or store instruction and every instruction fetch must be authorized by an architectural capability.

So it should be possibly to call into any function (e.g. from an untrusted blob, and given the capabilities are set up) and on return have the guarantee that none of the callers memory has been touched and all the side effects are contained in the return value, and maybe selected whitelisted addresses?

I remember the mill architecture[1] also claims to have that capability, I think they called these calls "Portals". Btw the talks by Ivan Godard are a must watch if you have any interest in hardware architecture.

But how can existing code be just a recompile away from benefiting from these features, don't the capabilities have to be set up somehow (unless it is purely functional language)?

1: https://millcomputing.com/docs/

zeotroph··on €2.6M spent for a book at auction, believed they would own the IP
There was a movie made about that story book https://en.wikipedia.org/wiki/Jodorowsky%27s_Dune

With it there are 4 Dune "movies" out: the 1984 Lynch version, the 2000 Sci-Fi Channel one (a 3 part mini series, nearly a movie), the aforementioned 2013 one, and of course the 2021 Villeneuve one.

zeotroph··on Elfshaker: Version control system fine-tuned for binaries
Ah, the compilation database is where more magic originates from :)
zeotroph··on Elfshaker: Version control system fine-tuned for binaries
Thank you for the explanation, so the pre-link storage is one of the magical ingredients, maybe mention this as well in the README?

Is this the reason why manyclang (using llvms cmake based build system) can be provided easily, but it would be more difficult for gcc? Or is the object -> binary dependency automatically deduced?

zeotroph··on Python 3.11: “Zero cost” exception handling
Indeed, in the following case of a 4-deep call stack, each with its own exception, the bulk of the handling code can be moved elsewhere (already marked as cold by the compiler), but nonetheless there are a few instructions which won't matter in most cases but are still required to jump there and thus end up in the instruction cache.

https://godbolt.org/z/eh1d4K1M7

zeotroph··on Python 3.11: “Zero cost” exception handling
Note that the generated instructions - even if they are never run as in [1] - still consume cache and might hinder further optimizations. Which is why `noexcept` is becoming more popular. And because there is no GC, code must be written to be exception-safe in all conditions which is often forgotten.

1: https://godbolt.org/z/bKfG14P64 - the difference between `e()` and `n()` is that one is marked `noexcept`. Both `f()` and `g()` run directly to `ret` (return) in the normal case.

zeotroph··on Linux Phones [are less secure than mainstream Android]
Thanks for the information, is there an page with an overview of the SailfishOS security concept and progress somewhere (other than reading the changelogs)?
zeotroph··on Amtrak might add more routes, but they won't be faster than a car
"A developed country is not a place where the poor have cars. It's where the rich use public transportation." -Gustavo Petro

See London or Paris or even New York City. Just getting everyone a car only creates cities which are contain more parking lots than buildings and green spaces.

zeotroph··on Unix shell programming: the next 50 years
This proposes a JIT compiler which can e.g. increase parallelism inside a chain of pipelined commands:

  We propose a dynamically triggered optimization regime for the shell
  that we call Jash, short for ‘Just a shell’. Jash inspects each shell
  command as it comes in to identify candidates for rewriting.
zeotroph··on Show HN: Rustpad, a self-hosted online collaborative text editor
Could end-to-end encryption be added (see cryptpad), or does operational transformation or some other design aspect require a central server?

What also comes to mind when editing source code is a non-browser participant which can actually run and test the code (or for other non-interactive backends, such as en external spellcheck).

zeotroph··on Improving Firefox stability on Linux
I also notice the mem leaks, but I can usually leave my Firefox process running until there is the next update to install.

What works for me is having the `about:memory` tab open and clicking on "Minimize memory usage" at the end of the day when I suspend the machine. And, I have a lot of tabs and windows open, strewn over various virtual desktops. Though most tabs are not loaded but more expensive bookmarks, but I have no add-on which actively unloads tabs.

zeotroph··on Machine Thinking on the Printing Press: The Screws of Disruption [video]
How the screw of the wine press was the central part of Gensfleisch/Gutenbergs invention which allowed all the other previously existing ones to finally come together (though I also read that certain advances in metallurgy were also essential). Also see the previous video on screws, a much underappreciated invention.

It then describes how the availability of books made propagation of existing technology and newer developments possible and faster.

The only other comparable moments in history are probably the evolution of spoken language, the invention of writing and most recently the internet.

Also much recommended from that Chanel are the videos on the "Origins of Precision"[1], and "The 1751 Machine that Made Everything"[2].

1: https://www.youtube.com/watch?v=gNRnrn5DE58 2: https://www.youtube.com/watch?v=djB9oK6pkbA

zeotroph··on Paternoster Lift
Conventional closing-doors elevators are just absurdly safe, even stairs (moving or non-moving) are more dangerous. People die around elevators when climbing onto the roof when it gets stuck or forcing the doors open instead of staying put. Once it gets moving again bad things can happen.

But as hinted at in the safety section, with modern sensors and some brains behind them paternoster can be made safe. You can even make them wheelchair accessible by gradually stopping a cabin and informing all other passengers about that.

And when a department in a large and busy office building is spread across a few floors then a paternoster is the most efficient way of moving between floors.

zeotroph··on A Complete Course of the Raku programming language
Also I'd prefer more than one subheading per page. That would make scrolling/wheeling through the content easier.
zeotroph··on Pijul – The Mathematically Sound Version Control System Written in Rust
(right, I switched between "Foo" and "Fix" in the comment, sorry)

> instead of solving it again, you can simply push Resol, and the conflict will be solved.

Oh noes, so no obscure "pijul rerere" to learn!? I mean, very nice!

> pijul record

I see, that's what that field is for - I tried it briefly when pijul had the interim name and wondered why it was listed and editable in the record editor.

zeotroph··on Pijul – The Mathematically Sound Version Control System Written in Rust
Thank you for the explanations!

> In Pijul, conflicts occur between changes (not between commits or states), and are solved by changes.

So some channels contains the changeset (Fix, ..), and if adding that change to a channel creates a conflict, the resolution results in the set (pre_Fix, Fix, ..) on that channel. Then adding "Fix" to another channel will automatically pull in the "dependent change" "pre_Foo" as well, if applicable? Or is a separate "new_Fix" created?

Can a link between two changes be created manually, even though the delta does not require it? E.g. to attach an empty commit, if these are even possible in Pijul (compare git's "--allow-empty"). Or, more reasonably, to record logical dependencies which do not show up in the code, such a separate changes for testing vs. the code itself.

← PreviousPage 2 of 6Next →