Hacker Newsnew | past | comments | ask | show | jobs | submit | maplant's commentslogin

It can't do these things because it's not wanted. Say you have the following:

  enum Value {
      Float(f64),
      Ptr(*const T),
  }
Do you want the compiler to disallow certain bit patterns in the Float variant simply so that it can implement NanBoxing?

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 GNU/Linux, is in fact, just Linux.


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.


Whats in a name?

Personally I use Google/Windows at work, and Steam/Windows at home. I also have a Meta/Android OS for my phone and a Garmin/Auto OS for my car.

My websites are hosted on AWS/Linux, and I browse on Comcast/Internet. My entertainment comes from Warner/Netflix. Or Disney/Disney)

I call it Linux, when I call it at all.


Yep. Stallman was just a bit salty that GNU turned out to be barely relevant. Most of the code in a so-called "GNU/Linux" system is not GNU.

There really was a GNU project, but it was just an attempt to harmonize system tools across all open and proprietary Unices.


> GNU turned out to be barely relevant

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.


Are you not using vendor-lockin-licensed LLVM instead?


NetBSD or one of that ilk.


I’ve recently taken to calling it GNU minus Linux.


Yeah GNU hasn't really been involved for a long time. It's Mozilla/Linux in reality. Not to mention the totally GNU-free distributions, like Alpine.


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


Where would someone read more about that history? Sounds up my alley:)


The efforts people will go to in order to avoid GPL3. Makes you wonder why?


Because large corporations want to take without giving.


Yep, look at Apples 12 year journey of rebuilding everything that was moved up to GPL3.


Are you saying that Hurd will also kill Google/Linux?


What I'm saying is that Hurd is just a kernel in the same way that Linux is also just a kernel


The snark artist in me would say that Linux is a kernel plus tens of millions of lines of code that absolutely should not be in the kernel but are.


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.

Nonblocking I/O only makes sense for IPC. You want async I/O, which Linux doesn't support but Windows does.


> 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.


Have you tried asking an LLM to fix that?


Hurd specifically includes a userspace. Its kernel is Mach.


Hurd is not just a kernel, but yes, it does provide approximately the same functionality of Linux.


They're both kernels, one of them just happens to actually be useful


No, what they're referring to as a GNU/Linux is in fact GNU Hurd.


Don't get your hopes up, it'll be used in deadlock's volleyball game mode


It’s hilarious that I can’t tell if you’re being serious or not here


They do have a bouncing ball of about the right size in the beta. I was thinking basketball though.


I wish they would re-release the HP50-g, I had one somewhere but it got lost and I _loved_ that thing!


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.


db48x/db50x is probably your best bet


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.


Agreed. You might as well play candy land.


I plan on using it to create a backup password/2FA device... eventually


These glasses look absolutely stunning


I was sure that these were similar to the famous Luminarc and the French connection seemed relevant. But having trawled their site… they aren’t.

https://www.luminarc.com/collections/glassware/


They remind me of Duralex Picardie glasses


Thank you - that’s what I had in mind.

Not quite the same but a lot closer.

There was a good thread about the brand here a while back, which your comment helped me find.

https://www.duralex.com/en https://news.ycombinator.com/item?id=46015379


That first photo looks so much like a watercolor that it's uncanny. Glass is such a cool material.


I like them because they look like cartoon glasses


I can't speak for the parent but I have a 5090 and it works perfectly fine


There’s on called “sonic boom: link and smash?”


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.


yeah a social _game_, not a commodity pork bellies futures market.


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

Search: