Hacker News new | past | comments | ask | show | jobs | submit | CUViper's comments login

Whenever I hit the age gate in the Steam store, I just bump the year to continue, so January 1st it is!


Even if a pointer was guaranteed correct at the time of creation, it can't be known safe to dereference in the future unless you put a lifetime on it, and then it's just a reference.


Best practice is to resolve them early now: https://www.redhat.com/en/blog/hardening-elf-binaries-using-...


The crescent moon is often depicted with the dark part transparent too, e.g. with stars in that space.


Every depiction which does that is secretly set in the future and those are moon-bases :grin:


Rust is backwards compatible when you stick to stable features, but the kernel uses unstable features that can and do incur breaking changes.

https://github.com/Rust-for-Linux/linux/issues/2


It seems prudent to limit rust usage in the kernel until that list can be burned down to zero. It makes sense that you need to at least get rust in the kernel to find out what missing features you need to have implemented and stabilized, but excessive use will make folks lives painful as they try to track upstream rust releases.


Please bear in mind that Linux has used non-standard GCC extensions to C for decades as well. The tradeoffs here are their call to make.

Besides, at this stage, it makes perfect sense for Linux to use unstable Rust features. It was one thing to say Rust should be great for writing kernels, it's another to actually get feedback on how it needs to be better, and that's only possible if the potential improvements are motivated by those who need them and incubated without the constraints of backwards compatibility nor the risks of locking in permanent tech debt.

Rust's unstable feature concept was designed for exactly this kind of freeform evolution and it's working exactly as intended. As for the specific tradeoffs being made in Linux, its contributors are in a much better position to weigh those than we are.


What you propose is exactly what's been done by the kernel. They are integrating the language in a non-mandatory way, to both exercise the kernel side and the language itself. The unstable features haven't been stabilized because either they have open questions on their implementation (and having a customer using them helps define them) or no-one has cared enough to complete them (and having a customer using them gives them the extra push). Either way what's happening now is exactly the process you are proposing.

The article is about updating the Rust version the kernel targets where a feature they use (offset_of) was stabilized.



Then extrapolate "random guy trying to follow dtolnay's lead."


Well then complain about that, not this.

And anyway it doesn't really matter. As soon as you use anyone's crates you're more or less completely trusting them. It's not difficult to hide malware in a Rust crate even if you don't ship a binary.

And... come on. David Tolnay came up with Watt. He's clearly not intending to ship a binary forever - the long term solution is WASM.

This author comes across as an annoying naysayer - everything is impossible, even things that have already been done like WASI.


wasm is also a binary format, and I wouldn't like it to be included into the .crate file either. The .crate files should ideally only include source code, to preserve the source first nature of crates.io (even if it's never been officially confirmed).

Rustdoc is also automatically built by docs.rs and nobody distributes it in their .crate file. I think the same should be done for wasm proc macros, too: they should be built by public infrastructure, and then people can opt into using binaries provided by that infrastructure to do their development, and if they want also opt towards using native binaries instead of wasm. But the binaries, including wasm, should only be a cache.


> I think the same should be done for wasm proc macros, too: they should be built by public infrastructure, and then people can opt into using binaries provided by that infrastructure to do their development

That's obviously how it would work. Read dtonlay's proposal. Crates.io would compile the WASM.


Only as a verification step though, not to obtain the actual binary, which will be included in the .crate package, where it IMO should not be put.



Ah, thanks for that! I wonder how they plan to support future extensions like RV64GCV which seems to be gaining traction…


Would anything prevent compilers from approaching it like SSE on Intel? Check for feature presence and enable the appropriate path (if using compiler-generated code).


> Check for feature presence

That is the hard part. On Intel you can use CPUID, but it is ARM policy to not expose such instructions. You can read /proc/cpuinfo, but that is Linux-specific.

Edit: there is a reason for ARM policy: CPUID is a well known virtualization hazard. In fact, KVM immediately traps if you execute CPUID on guest. ARM made a good decision here. Still, it means things can't work exactly like it worked on Intel.


The Arm Linux kernel allows you to use some of the "read ID register" instructions from userspace, because it traps them in the kernel and emulates them to present you with a slightly sanitized view of the available hardware: https://www.kernel.org/doc/html/v5.8/arm64/cpu-feature-regis...

You can also look at the hwcaps (available in the ELF aux vector) -- this is the older mechanism.

It's true that there's no cross-OS mechanism to do this, but that's life -- often the OS wants to get in anyway to sanitize the answers (eg so it can tell you "feature X is not present" when it knows about a hardware erratum or the OS was built without feature-X support).


https://news.ycombinator.com/item?id=18542040 talks about registers with a similar purpose.


Only in EL1, which means you can only use them in kernel.


But specific instructions should be testable anyway, right? Try to execute with an exception handler and you'll know.


On Arm this is generally a bad idea -- there are, or were, some corner cases where the kernel can know that an extension shouldn't be used, but it doesn't have a mechanism for "make the instructions UNDEF". The example I know about is ancient history now -- on the Cortex-A8 I think you could build a kernel without Neon support or perhaps the kernel might find there was a Neon-related erratum, but there was no way to disable Neon to force the UNDEFs.

The recommended approach is to use HWCAPs, or else to use the kernel's "emulated ID register accesses" functionality.


Debian distributes compiled binaries. Thus, they have to either turn processor features on in all their binaries, or off (or distribute two sets of binaries).


There are options for runtime instruction selection:

https://wiki.debian.org/InstructionSelection


You're thinking of optimizing the code for a specific processor. Run-time codepaths that detect CPU features have existed since MMX and SSE


Debian does distribute SSE-using binaries (with fallback) on i386 which detects presence of SSE at runtime using CPUID.


Would it be much different than armhf vs. armel?


Note that NEON is optional for armhf, mainly to support Tegra 2. This was a big deal at the time. See https://wiki.debian.org/ArmHardFloatPort.



In the conclusion:

> We fully expect to continue offering the Zulip Cloud Free plan indefinitely,


That merely says that there is no plan that the writer knows of to pull the plug on you. And indefinitely is a duration of currently undefined length, not infinite length.


which isn't a promise that it will be "free forever". in the context of the rest of the article, it's not even an attempt to mislead you into thinking it will be free forever. though it is apparently enough to base willful misunderstanding on.


And their broader thrust in the post is less the forever and more of the "own your mistakes". Don't pretend like you never had a free forever plan.

Their promise seems to be less "we'll ACTUALLY be free forever" and more "we're free right now, but if that's going to change, we'll communicate with you".


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: