This is a paraphrase of the less technical-sounding: "if you find two ants in the kitchen, you don't have a two-ant problem" which I definitely heard my mom say in the 90s (about actual ants, not metaphorically).
Fable 5.2 attempted a Lean proof and found a bug in the implementation, it has a fix though:
The published blqsort has a bug. In partition, the last loop in the C code only skips elements that are greater than or equal to the pivot. It assumes nothing unsorted is left, and that is false.
For example, take 2000 ones with x[1] = 2 and x[2] = 0. The C code returns 0 2 1 1 …, which is not sorted. It fails on about 3 of 4 random seeds.
In a C fuzz test of 20,000 random cases, 904 failed. The C++ and threaded versions have the same loop.
Because of this bug, no proof can show the published code is correct.
I used to do floppy disk data recovery as a service for students at college. Roughly speaking, we helped one student out every three hours, out of 2,500 students, during busy hours. Based on the rates and hours, I think it would come out to something like 25% of the student body, each year, coming to us with a data loss incident involving floppy disks.
YMMV. I’m sure a lot of people were shoving these things into backpacks, and this was post-2000, so the quality of disks for sale was poorer than it was in the 90s and 80s.
I’ve also (since then, for myself) repaired drives. The drives fail because they’re mechanical and have motors, and anything that moves or has a motor in it will need some kind of service. Servicing a floppy drive requires specialized equipment which is hard to find (or requires a lot of patience—it’s possible to repair a floppy drive with just a screwdriver, but it’s not fun; guess how I know?)
HD floppies were much worse, both 1.44MB and 1.2MB. They are just much more susceptible to defects from wear and tear because of the shrunken sector size. DD 3.5" wasn't as bad.
I am guessing a combination of tighter manufacturing tolerances, smaller sector sizes, and manufacturers over time cheaping out would contribute to decreased reliability of 3.5" disks. People also, as far as I remember, universally used sleeves for 5.25" disks, but almost never had cases for 3.5" disks.
On the other hand, 3.5" disks have higher magnetic coercivity, which makes them less susceptible to data loss from stray magnetic fields (e.g. nearby motors).
I don't think you needed cases for them though since they covered the magnetic disk with their own sliding door while on 5.25" disks they were exposed to the elements. I once spilled jelly all over a 5.25" disk and took it out of the sleeve, washed it off in the sink, and put it in a new sleeve and it still worked :)
3.5" floppies were still common while I was in college. I have distinct memories of copying a project to a floppy in my dorm room, popping the disk out, walking next door (literally next door in the dorms, not even going outside up or down stairs or anything), popping the disk into a team member's PC and the project being gone. We laughed it off and chucked the disk in the trash and got another. Project wasn't lost-lost since I had a copy on my hard disk. This was also the era of the 100MB Zip Drives, which I also had in my PC and thankfully all of our lab PCs had, too. That's what I normally used for all of my day-to-day file transfers of any real import. I still have my zip disks, but I seem to have lost my zip drive, so no idea if the disks still have any data on them.
Yeah at the time. You would get the whole range of good/bad disks. Sometimes even between computers. May work just fine on one computer and not the next. It was not common but it wasnt totally rare either. Just sometimes would catch out out at silly times.
That they are still used in a critical infra item is a bit surprising. Getting new stock would be a major hassle.
I was on a school paper in high school and was taking photos on a "digital" camera that wrote to 3.5" floppies. Some of them are still with the (printed) copies of my articles I kept. I'll have to see if they survived.
This is probably my "I'm getting old" moment. Good lord.
Until quite recently, my Dad had a Zip drive plugged into an ancient Pentium box (back when "Pentium" meant "successor to 486"). I don't know when it was last actually used, but it's LED had been on since the 90s.
Wow, it's crazy how experiences differ! I've never encountered anything more unreliable than zip disks. Even burned CDs lost to the dreaded buffer couldn't compete with the failure rate of those things. Past me wishes I had your luck with them, they were super cool.
Depends on the schools for networks. I attended a college that finished adding wired networks to their dorms in 2000 or so. It just wasn't a campus priority in the 90s, fewer students had computers back then. If it was a school with more money or an engineering school they got to it earlier, the rest added it when they added it.
Also depends on the environment. My dad used to repair the pre-PC computers: Amiga, Commodore, Atari, Spectrum, etc. I've had access to them before many others have even seen a computer. I've been given a really heavy, not-completely-broken and usable laptop before they became affordable for normal people.
People who grew up with or lived in the tech environment had access to lots of things.
Sure, but what are the odds they're using these rather than HD 3.5" disks purchased from whatever new old stock they've been able to source over the past 20-odd years?
In the vast majority of programs, errors and non-results are irrelevant at the call site. You want to program for the happy path and not wrap every single call with error checking code or `try/catch/finally`.
h = file_open(path)
data = file_read(h)
file_close(h)
return data
is the code you want to read. This essentially is:
return file_open(path).success(h -> h, file_read(h)).success(h, data -> file_close(h); data)
A language with thoughtful error handling primitives will support such code.
This is the root of a lot of the evil. Yes, humans want to program for the happy path. It is a lot more fun. However, that bias leads to so much lack of diligence to properly deal with the unhappy path.
Syntax is not going to solve logic errors. No amount of checked exceptions or forced unwrapping of a result will help with TOCTOU or any number of similar vulnerabilities in code.
You ideally want to attack the problem at two ends:
- make the syntax noise-free so you can see what is happening
- build primitives at the syscall and stdlib level for common footguns
You would still need to deal with domain-specific logic errors, but you have at least reduced the surface area exposed to casual attacks.
It is not. Being extremely restrictive in the happy path, throwing all over the place, but have generic error handling code at the top level (e.g. HTTP entry point) makes for some pretty robust, stable, easy to read software. Albeit it typically has somewhat rough user experience.
The thing is, that's a pretty good place to start. From there on, you can handle exceptions one by one, surgically, and make things nicer.
I keep hearing how diligent it is to handle errors at the call site, always by people who end up making services that either crash for preventable reasons or bury errors. Python is actually safer than Golang, and I don't mean with type hints.
returning a non-success you either handle it or pass it up the chain, potentially with not a lot of information about what originally caused it. with an exception you can retain the full information about what happened by either rethrowing it, throwing your own exception with it embedded as the cause or declaring that you don't handle it by saying you can throw it.
Yeah, checked exceptions are weird. Almost everything has some way to fail. The exact type of exception is usually meaningless, more like there are a couple of broad categories analogous to HTTP 4xx vs 5xx, and even then you usually don't want to handle it right there.
Well, for example, if you had opened a file to put the data into, you might delete the file or restore from a backup. But even if the answer is nothing, bubbling it all the way up to main is not the wrong answer. The point isn't whether you can do something, it's whether someone can do something.
The question is _where_ the error needs to be handled. It's almost never directly at the call site. And then there's a few issues with checked exceptions and Java language things (RMI, closures, etc) which make checked exceptions cumbersome. An exception (checked or not) might be worse than sum types, but they're still a thousand times better then returning an error in-band.
> The question is _where_ the error needs to be handled. It's almost never directly at the call site.
Which is why exceptions in Java can bubble up the stack? You don't have to catch it in a particular method you can let it go to the caller of the method, and so on.
Go doesn't require you to handle or pass an error upwards. You can call something that returns err and just ignore it, compiler won't care. The "if err != nil" thing is annoying too. Rust made the right compromise with !
Better design breeds better habits. In Java, you can end up handling a DNS exception 20 layers up the stack, even if your call never actually triggers a DNS lookup, simply because some method deep in the call stack declares it as possible. The culture is to propagate or wrap exceptions rather than translate them into domain-specific errors near the source.
Rust makes handling and mapping `Result` locally more ergonomic, even though `?` makes propagation easy too. Rust, however, also makes it easy to lose the context during propagation and end up with useless `Error`.
I agree but I think was also because Java didn't have sum types (or still doesn't? years I haven't read Java) and rethrowing is super easy, while Rust kinda nudges you into the right direction (if you need to rethrow at all, think if you want to rethrow verbatim or wrap with a semantic error type).
The problem with them all always comes when the ever-steady march of abstractions, features, and edge cases results in one routine throwing the same two error classes but in different places, and how you handle them is different despite being the same wrapper. Add a thousand developers and several years of churn, and poof you get extremely complex bugs that result from errors seeming to come from one place, but actually coming from another.
Having been on the receiving end of debugging that a few times, I no longer mind the in-band error handling, although admittedly I'm inexperienced enough to be confident its better. Just for the random code I've had to read where I just need to know exactly how something I didn't write and will never read again works, and whether the error is handled and how, i love reading in-band error handling, even if I too dislike the way an error laden routine must be written. Over time I've come to appreciate elegance "in the large" as opposed to the code I see in any individual function.
I always thought the ideas was great, but type system was holding it back. If you could have expressed that your thrown exceptions are the same as some other method's (e.g. a method of a class given as a parameter), and some other classes, then it could have been a lot less annoying. Powerful, even! But Java did take its sweet time to get even type parameters.
I have written very little Java, though, so this is more of an armchair analyst position.
Amen, people saw the symptoms of "needs more syntactic sugar" and misinterpreted it into "rigorous error handling is bad".
The same way that layered code should react/wrap/translate when it comes to return types, it should do the same for thrown exceptions, and checked-exceptions helps you do that. They're both results of computation.
btw congrats on the company. i was skeptical at the time but it was never because you wouldn't attract awesome talent and make great hires. your process looks great to me.
Thanks! And don't worry -- there were PLENTY of reasons for skepticism in 2019! We got lucky many times over, hitting on stuff that turned out to be really important in ways that we couldn't know at the time.
The hiring process is a very concrete example of that. What still blows my mind (at least a little) is that our process came directly out of one of the worst moments in my career: making an absolutely terrible hire about two years before we started Oxide. For a while after that, I wished I could go back and warn my previous self to not make the hire that would be so destructive to the organization -- but in the years at Oxide I have come to realize that that terrible hire was in fact essential for the future Oxide: it was the impetus for putting together a writing-intensive process, and there is no doubt in my mind that I had I not made this atrocious hire, I would have continued to hire the (broken) way that I had been hiring. (I described this a bit in my conversation with Gergely Orosz on hiring.[0])
Anyway: don't get me near the time machine -- I'll only screw things up.
>is that our process came directly out of one of the worst moments in my career: making an absolutely terrible hire ... that would be so destructive to the organization
What role was this hire filling? Are they publicly well known enough to name drop?
reply