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

Have you come by your certainty that they have not asked because you were a contributor?


The advice in the 2014 talk applies to exporting specific types of errors as part of a package’s public API surface.

The article, on the other hand, advocates for local variables storing errors not to have distinct names.


So a public variable error should follow different naming conventions then a local variable? That doesn't seem right, the go wiki says you should use the 'err' prefix for both (capitalized for public variables though, obviously)

And I'm only asking about when you are giving an error a distinct name, not just naming it 'err'.


systemd services are named "foo.service", and you do not need to specify the ".service" in almost any case.


They're referring to Debian's service(8) command.

  NAME
       service - run a System V init script
  SYNOPSIS
       service SCRIPT COMMAND [OPTIONS]
(the manpage wasn't updated, but the same command also supports systemd services nowadays)


> > advance

> you can just manually make any letterform 2x width,

Yes. Any glyph may be wider than its advance. The advance, however, must remain the same across all glyphs. If it does not, the font is not monospaced.

The passage you’ve quoted refers not to the width, but to the advance.


Bryan Lunduke has an article about this myth, actually!

https://lunduke.locals.com/post/4037306/myth-windows-3-1-was...

It’s backed up by another Old New Thing article at https://devblogs.microsoft.com/oldnewthing/20100517-00/?p=14...

The TL;DR is that Windows 3.1 effectively replaced DOS and acted as a hypervisor for it, while drivers could be written for Windows (and many were) or DOS (and presumably many more of those were actually distributed). The latter category was run in hypervised DOS and the results bridged to Windows callers.

(Edited after submission for accuracy and to add the Old New Thing link.)


One of the major motivations for windows, is that the driver situation for DOS really sucked. Every single office suite had to talk directly to printers. Text mode was reasonably uniform, but printing graphics required the application to know about the printer.

And games needed to talk directly to the video card and sound card if you wanted anything more than PC speaker beeps and non-scrolling screens on one of the default BIOS graphics modes.

One of the major selling points of Windows 1.0 was a unified 2D graphics API, for both screen and printing. The graphics vendor would supply a driver and any windows application could use its full resolution and color capabilities needing to be explicitly coded for that graphics card. This rendering API also supported 2D accelerators, so expensive graphics card could accelerate rendering. 2D accelerators were often known as Windows accelerators.

Windows 3.1 still relied on DOS for disk and file IO, but everything was can be done by VXD drivers, and should never need to call back to DOS or the BIOS (which was slow, especially on a 286)

With Windows 95, Disk/File IO were moved into VXD drivers, and it was finally possible to do everything without ever leaving protected mode (though, DOS drivers were still supported).

Read more about the history of Device drivers here: http://www.summitsoftconsulting.com/WinDDHistory.htm

And I really enjoyed this documentary about the development of Windows 1.0: https://www.youtube.com/watch?v=vqt94b8bNVc


It was specifically the acceleration that made it advantageous, especially once DirectX got off the ground. 2D graphics by itself was reasonably straightforward in DOS once SVGA and VBE were a thing, but all you got out of it was a raw pixel buffer that you could poke into.


Thanks for that it’s very interesting. I had no idea the virtual machine system was so advanced. Device drivers and such were all still real mode but yes I can see how this would make DOS a component of Windows rather than the other way round. All for nothing if the apps aren’t bought in though!


Is it?

It seems as though the maintainer moved it into an external plugin because they were told, loud and long, that “shoving AI [there] [was] totally the wrong idea.”

It’s certainly an example of how public backlash can change the discourse, but it is not an example of why it was wrong to put AI there.


> So it's a bit like "why don't people wear a welding mask while cooking?"

Your kitchen does not have staff telling you to make sure you are wearing a welding mask. It may also lack appropriate indicator lamps that tell you when it is a good time to wear your welding mask. It is also not standard practice in all kitchens.

It’s actually not like airplane seatbelts at all, where they are ubiquitous and the risks of not wearing them are fairly well-documented.


People are constantly bombarded with seemingly unnecessary warnings. I frequently assume that these warnings are to insulate a company from legal trouble and not really to protect me. This might be an American perspective.


Here’s another American perspective: there are tons of videos of crazy turbulence tossing people around the cabin. I don’t want to get tossed around.


Warning fatigue is a real concern, and requiring people to watch videos on the internet should not be a prerequisite for adequate safety.

I've definitely noticed a proliferation of warning notices and signs in the US (and I don't just mean the Californian chemical hazard warnings in the most bizarre/unavoidable locations like a jet bridge), with the really important ones usually reiterated by a human standing next to them, continuously shouting the same instruction, apparently because people don't seem to take them seriously otherwise.


It’s always been an American impulse to resist authority and think for yourself. That is generally admirable. Then at some point the “think for yourself” part got tossed out, and people disobey instructions for the sake of it.

It’s not that hard to follow instructions. There aren’t that many, and almost all flights have the exact same ones. If you don’t want to learn about getting tossed around like a rag doll at 40k feet that’s fine, just do what the crew tells you to do and you’ll be ok.


What is a "jet bridge"?


It's the enclosed, moveable walkway you go through between the airport gate and the plane.


See: many airlines that still warn to put your phones in airplane mode, despite that being known nonsense for decades


It's not "known nonsense", but not for the reason you think. There's a small risk of your phone connecting to some random carrier located in whatever country you're currently flying over. For some smaller / third-world countries, this can be quite expensive, cents-per-megabyte isn't unheard of.


Every time this is brought up people come out of the woodworks with post-hoc rationale for this rule that has no basis in historical fact. This comment is good example.

Why would the FAA and other aviation regulatory agencies care about your phone bill?


I completely agree on GPs statement being absurd post-hoc rationale, but interestingly, this rule is actually coming from the FCC, not the FAA [1], with the FAA only indicating support for it [2].

The motivation is supposedly cellphones at high altitudes interfering with far-away cell towers that are reusing the same frequency at a distance that would normally make interference very unlikely, given the radio horizon and everything.

I highly doubt that that would still be an issue modern networks couldn't handle (also given that most other countries don't have a corresponding law on their books, as far as I know), yet here we are.

[1] https://www.law.cornell.edu/cfr/text/47/22.925

[2] https://www.faa.gov/documentLibrary/media/Advisory_Circular/...


It's not the reason the rule was implemented, it's not something the FAA cares about, but this doesn't change the fact that it's still a good idea in some cases, rule or no rule.


By that logic, many more things ought to be declared illegal by completely unrelated regulatory bodies. It would be a bit like the FDA banning gambling, or the SEC reinstating prohibition.


If that were the motivation, airlines should also display a "no credit cards" icon to protect you from overspending on the in-flight drinks service.

> cents-per-megabyte isn't unheard of.

If only! Double-digit dollars per 100 kilobyte aren't unheard of.


It may still be a good idea because of battery but basically no one cares. Contra early days of smartphones when there near altercations with passengers responding to one last email after the doors closed.


Something interesting I’ve seen on my recent domestic United flight, which I don’t think I’ve seen before. While the flight safety video was being played, a male flight attendant was walking through the cabin and actively telling people with headphones on (connected to their own device), to take them off and listen to the safety video. It wasn’t a recommendation though, he would wait until the person complied and would then continue down the aisle.

I didn’t have any headphones on. At first it felt a little bit overboard, but with events like this turbulence happening, I can see the need for it.


> Your kitchen does not have staff telling you to make sure you are wearing a welding mask.

The advice to wear your seat belt throughout the flight are hardly clear and emphatic. They often make it sound like something they have to say to cover their asses. There's certainly no clear comms around the risk of death and serious injury.

I have no idea in this case whether the indicators went on in time but I obviously wasn't arguing in favour of ignoring those.

> the risks of not wearing them are fairly well-documented.

Where? Where would I have seen this documentation? I'm 53 and I have no recollection of stumbling across it.

(also - please reconsider your tone next time. It feels like you're trying to get me riled up)


Yes, they say it to cover their asses -- for the very very rare occasion when an unbelted passenger ends up stuffed into the overhead lighting panel or carry-on baggage compartments. :)

Seat belts in cars also contain several CYA-grade chimes and buzzers. The owner manual may mention risk of injury or death. Likely an airline's contract of carriage contains the same. I suspect both are read as often and as eagerly by their users.

I think the multiple "off tone" messages you're getting are in response to your use of ignorance as a defense for ignoring airplane crew instructions.


> [..] in response to your use of ignorance as a defense for ignoring airplane crew instructions.

Unless I come from an alternate universe - most people wear their seatbelt during take-off and landing and when the seatbelt light comes on.

I wear mine through most of the flight but I only started doing this fairly recently because I learned more about turbulence.

I'm not defending ignorance at all. I'm simply describing how poorly the risks are communicated and the reality that most people I've observed don't wear seatbelts for the entire duration of a flight unless the warning light comes on.


If they spent the time to describe all of the rare-yet-possible ways a person could die on an airliner, the thing would never leave the gate.

At some level, take their mandated-by-regulations word for it? -- these regs are written in blood, and they say to buckle your belt, not only when the sign is lighted, but also any time when seated at your seat.

Boeing has done a good job of reminding us of some non-turbulence reasons to buckle up. You might also get sucked out of an unsecured exit door plug on a 737. :) I haven't heard that one mentioned in a safety brief yet.

In the pilot circles I frequent, the joke about seatbelts is that it helps accident investigators more easily count the deceased among the wreckage. So there's some YOLO fuel for your next trip. This was a freak occurrence. It's sad and it sucks. The injuries to passengers were likely preventable -- less so the cabin crew. New word is that the fatality was a cardiac event -- no belt buckle helps anyone there.


People who follow all safety instructions endure fewer light injuries, severe injuries and fatalities. Pilots who joke about seatbelts are just an example of professionals being hilariously wrong (or sardonic) about a topic adjacent to their expertise. Or they were just joking about their usefullness in an uncontrolled crash landing, which is extremely rare.

In this case, a seat belt would have likely saved the person - heavily injuring yourself is quite traumatic (tautologically) which increases the risk of cardiac events. In any case, injuries due to turbulence are extremely common as far as injuries in airliners go.


Nearly every flight they state that you should keep your seatbelt buckled at all times. If someone decides that they don't need to do that, it is because of their willful ignorance, sorry.


I think maybe you come from an alternate universe. It’s been standard procedure for at least 3 decades to wear your seatbelt, even if loosely, all the time you’re on a plane, apart from when going to the loo or otherwise moving around.

I mean, I don’t really know how to say it without sounding like a git. This is simply what you do. What “everyone” does, for a loose definition of everyone. The “everyone” that wears seatbelts in a car, for example.

Genuine question: you know you should wear seatbelts if traveling in the rear seats of a car as well, yes ?


As mentioned elsewhere I have generally worn a seatbelt on planes for several years. And I think other people should.

And I religiously wear one in a car - just like any sane person.

I'm really sorry not to be the strawman that people in this thread seem to be craving.


> The advice to wear your seat belt throughout the flight are hardly clear and emphatic. They often make it sound like something they have to say to cover their asses. There's certainly no clear comms around the risk of death and serious injury.

I can't remember the last time I was on a plane where they didn't recommend keeping a seatbelt on at all times.

Here is the BA brief saying to do just that time 1:55: https://youtu.be/gBGbDQbwzWU?si=5KS4LTEcDmtQKJH_

Here is the United one where they mention it at 0:30: https://www.youtube.com/watch?v=u2LSKVAH4WA

I can't imagine anything more clear than starting the seatbelt briefing: "It is important to have your safety belt on at all times"

They end it with: "In case of unexpected turbulence keep your seatbelt fastened, even when the seatbelt sign is off."

Its literally the first and last things that United tells you about your seatbelt.


> The advice to wear your seat belt throughout the flight are hardly clear

> Where? Where would I have seen this documentation? I'm 53 and I have no recollection of stumbling across it.

Besides the bright "buckle your belt" sign in front of you and the little leaflet that says "buckle your belt" at arms reach ?

https://www.travelandleisure.com/thmb/K-qKcdwWTPYlcarQsYPkR3...


And, frankly, the simple existence of turbulence?

It’s not like the pilots can see a giant messy region of air up ahead. Sometimes they’ll know the flight overall will be rough and can warn you but generally most times they tell you to fasten your seat belts some turbulence has already happened.

A plane the other day dove suddenly out of nowhere. Less recently a door plug blew off a plane and nobody was sucked out thanks to seatbelts. Before that, a flight departing Hawaii fell a few hundred feet without warning shortly after takeoff. These all happened very publicly and with widespread media coverage.

Frankly, if you fly a few times a year and never wear your belt you’ll probably be fine. But it takes zero effort and doesn’t need to be strapped particularly tight to be effective. There’s essentially zero reason not to wear it and it can save your life.

Sometimes you just have to use a little of your own intelligence.


You mean the seatbelt light that is sometimes on but mostly off?

There's some weird disconnect in this thread. People seem to be completely misinterpreting me at every step.


I agree with this. The seatbelt light is as anachronistic as the no-smoking light. They should just keep it on at all times. People obviously are still incorrectly interpreting "seatbelt light off" as "I should take my seatbelt off now."


The seatbelt sign tells you whether or not you are allowed to get up and move around. Unlike the no-smoking light it has actual informational content.


> Bounds checking and assertions shouldn’t change the type layout.

Any bounds checks and assertions that rely on storing additional data such as valid iterator ranges or mutation counters would need to change the type layout, wouldn't they?

Even if the STL were purely a header-only library (and influenced only by code generation changes for debug builds), there's still the problem of ABI compatibility across different translation units--or different libraries--which might be built with different options.

EDIT: One of your sibling comments goes into greater detail!


bsdtar can do this! It supports reading an mtree file (a text description of a filesystem or of the contents of an archive) as an input and producing ZIP as an output!

Given an mtree file foo.mtree:

    #mtree
    baz/bar type=file content=quux
You can produce a ZIP containing baz/bar with:

    bsdtar -c --format=zip -f out.zip @foo.mtree
There’s a much better explanation in the bsdtar manual at https://man.freebsd.org/cgi/man.cgi?query=bsdtar&sektion=1&f...

If you’re on Windows, “tar.exe” is bsdtar. With the caveat that the mtree file should be saved with LF line endings, this should still work.


As the maintainer for Windows in-box bsdtar/libarchive, I'd love to learn more!

How are the tarballs you get out of it invalid? Do you have a sample file I could take a look at?

FWIW, since it is bsdtar it supports a few additional options[1] to control the format. You can pass --format=gnutar, --format=zip, --format=ustar, --format=7zip, ... for a bit more flexibility and to create archives in other formats.

[1]: https://man.freebsd.org/cgi/man.cgi?query=bsdtar&sektion=1&f...


I'm sure it was user error but `tar -czf` failed to produce a tarball I could untar on a server. Maybe due to it calling the wrong zip.exe? Maybe unzip on the server was using a different zlib or something? I'm not quite sure what it was but I decided to switch to using tar.xz for nix and zip for windows.

I'll see if my old devops code history can produce a bad-state tarball and get back to you.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: