Probably with an annotation around a NanBoxable(f64) type that tells it to do that.
That being said, the optimization is complex that may be insufficient:
> For my boxing scheme, I picked a bias value such that the lowest two bits end up being 10. That 1 in bit index 1 indicates that doubles can't be directly compared for equality. Amazingly, we only lose two bits of exponent, and we keep the full precision of the mantissa, meaning we lose no significant digits in the flonum representation.
This suggests the optimization needs more information about specifically how you want to box the float. There probably is some primitives worth considering standardizing to make this kind of optimization possible so that the tunable parameters are passed as const generic values.
Or actually doing what they did here where it changes it to a
enum Value {
SimpleFloat(64bit value),
ComplexNan(Heap pointer)
Ptr(*const T)
}
You lose out on performance if you use the bit patterns in the float that most people don't use very much, but you keep the correctness.
I'd be very unhappy if a compiler silently did this to me - it would make performance extremely hard to reason about. But it's not quite as bad as changing the semantics.
I'd just like to interject for a moment. What you're referring to as Linux, is in fact systemd/Linux, or as I've recently taken to calling it, systemd plus Linux.
Linux is not an operating system unto itself, but rather one more free component of a fully functioning systemd system, made useful by the systemd unit files, target definitions and vital service managers comprising a full OS as defined by Lennart Poettering.
Many computer users run a modified version of the systemd system every day without realizing it. Through a peculiar turn of events, the version of systemd which is widely used today is often called "Linux," and many of its users are not aware that it is basically the systemd system, developed by the systemd project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. Chiefly systemd-udevd, systemd-journald, systemd-resolved, systemd-networkd, systemd-timesyncd, systemd-logind, systemd-homed, systemd-boot, and systemd-oomd, which decides which of your remaining programs deserve to live The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete set of systemd unit files.
I'd just like to interject for a moment. What you're referring to as systemd, is in fact a component of Gnome, or as I've recently taken to calling it, GNOME.
systemd is not a project unto itself, but rather one more component of a fully functioning GNOME system, made useful by the systemd unit files, target definitions and vital service managers comprising a full OS as defined by Lennart Poettering and the Red Hat vendor lock-in team.
GCC, GDB, CoreUtils, etc - A COLLECTION of useful programs alongside a kernel such as Linux.
Barely relevant?
We owe our thanks to the GNU project. If Linus did not create Linux, something else would have taken it's place. "Maybe" HURD... or maybe something else.
If you read the historical archives, Gnu was kinda late in the game with Linux. They were distributing the Joliets 386-BSD and NetBSD and had some drama with trying to do Linux. Debian is a historical spinoff of this.
I gave a conference talk about this about 4 years ago. There may be slight errors in my recollection
Ok, I'll bite. Which parts of the kernel should not be there, given that Linux is not a microkernel? I maintain that most of the code is there for hardware support, for security, or to support user-space application models.
I'll grant you the in-kernel nfs server and ipsec implementations, but those are not tens of millions of lines of code. The only way I can reach that number is by lobbing off a huge part of device drivers into userspace, but that's not really an interesting discussion as it seems purely subjective.
Hot take: filesystem drivers. Final stage boot should load two images: a kernel which surfaces block devices via HAL, and a one or more filesystem drivers which function as external backends for the in-kernel vfs system.
This would facilitate more innovation and ability to quickly resolve reliability issues with filesystems, make the whole “can you boot off of it or do you need a kernel module” distinction obsolete, and would massively reduce the temptation for the kernel to support certain APIs only for certain filesystems (let me inotify on procfs, and use nonblocking IO on any FS I like, dammit!)
> You're welcome to implement inotify for procfs right now.
I more meant that if filesystem drivers had always been external to the kernel, then it would have been harder for so many syscalls to develop filesystem-specific behavior (e.g. things that work on block FSes but not nfs/tmpfs/9pfs/procfs and so on--inotify, atimes, inode stability, sparsity, stuff like that). Being monolithic made it easier to get lots of FS-specific exceptions, which results in some things requiring you to carefully parse manpages or debug EINVALs based on where files live. The benefit of that approach is that it enabled fast development of new features, but looking back I'm not sure if it was worth it.
> Nonblocking I/O only makes sense for IPC.
I want O_NONBLOCK to not fail for disk files. It could lie and block, or only report ready once things were in the buffer cache, or only report ready once part of the VFS response came out of the hardware interrupt/command queue, or any one of several options. I don't know which if any of those count as "async I/O", but the core problem here is ubiquitous syscalls (read/open/inotify_add_watch) whose failure-or-not is contingent on the type of object you give them (blockdev file vs. non-blockdev file vs. semaphore vs. socket vs. pipe vs. timerfd and so on).
> You want async I/O, which Linux doesn't support but Windows does.
Linux kind of has async block device I/O with io_uring now, but they repeated what is basically the Linux original sin mentioned above and made it contingent on whether a device/driver/filesystem support asynchronous operation or not.
Windows overlapped I/O definitely did it first and better though.
Ugh same. I had a 49g and a 49g+ in high school. The 49g broke down and the other got robbed when my student room got burgled a couple years later.
Learned a lot of RPN programming on those things!
I saw one in the wild a couple months back but had to say it didn't live up to my memories. Super slow and clunky interfaces compared to our modern touch screens.
Not to distract from what is undeniably a pretty cool thing, it's hard to even call these "games" as there's absolutely no decision making going on. I absolutely loathe games like these because you're not actually doing anything.
I'm not really sure what position you're taking but taking a rake can certainly change the legality of an activity; in California, playing poker in private is considered a social game and is legal, _except_ if party is taking a rake.
reply