Live data from Hacker News

Number in man page titles e.g. sleep(3)

lalitm.com

51–60 of 85 posts

Re: Number in man page titles e.g. sleep(3)

#51
Remarkable that no one yet here, including the article author, reports the true origin of these section numbers: they identified (depending on section size, one or a group of) physical binders in the series published by AT&T to document System V UNIX, and when you got an update to your system software, it came with a package of new manual pages which you would physically install in the binders to replace the now-superseded older versions. Everything you hate about man pages is in consequence of that origin, and of the corollary that the online version was never designed to be authoritative.

I have one of those physical binders, a volume of Section 3 for an AT&T 3B2, in the software section of my library downstairs. A beautiful artifact in every respect, of the level of quality you would imagine in the manual for a machine that cost $15,000 in the 80s.

Re: Number in man page titles e.g. sleep(3)

#52

Earlier quoted context omitted.

Tuna is a type of fish so the joke is that they sound the same.

There was also the record You Can Tune a Piano, but You Can't Tuna Fish by REO Speedwagon, I had assumed that's what the tunefs man page was referencing as that was a best-selling record at around the time Unix was being developed.

Yes. It had been a popular joke in the US, I believe about a generation before. (Probably the joke came in around the same time as canned tuna.)

Re: Number in man page titles e.g. sleep(3)

#54
post #22

For me man(3) is the most interesting of them all. Run `apropos . | grep "(3)"`; you'll be surprised how many libraries come with man pages for their functions (e.g; curl). Now I wonder if there are any IDEs that can automatically dial into these man pages and pull up documentation for functions?

  apropos --sections=3 .
may be a better version of what you propose, depending on what you're looking for. On my system, this also gives me entries from sections like '3x' and '3ossl' and '3bsd'.

Re: Number in man page titles e.g. sleep(3)

#55
post #47
post #9

Earlier quoted context omitted.

Reading this makes me wonder if Easter eggs are ever appropriate for something as ubiquitous as man.

Almost everything had an easter egg in it back in the day. When computing was more fun and less serious. They fell out of favor when people realized they were a security issue, because it was a code path that rarely got tested.

Or they were removed for other reasons than security.

In Star Trek: 25th Anniversary, we had a hidden animation of Captain Kirk's toupee jumping off his head and running out of the room. It was caught before release and they made us take it out since no one wanted to piss off William Shatner.

Re: Number in man page titles e.g. sleep(3)

#56
post #47
post #9

Earlier quoted context omitted.

Reading this makes me wonder if Easter eggs are ever appropriate for something as ubiquitous as man.

Almost everything had an easter egg in it back in the day. When computing was more fun and less serious. They fell out of favor when people realized they were a security issue, because it was a code path that rarely got tested.

No, proper easter eggs don't introduce security issues, they're benign almost by definition. I think what made them disappear was the introduction of all the suit-wearing people who decide what the programmers are supposed to program, with no room for autonomous work within that.

Re: Number in man page titles e.g. sleep(3)

#57
post #47

Earlier quoted context omitted.

Almost everything had an easter egg in it back in the day. When computing was more fun and less serious. They fell out of favor when people realized they were a security issue, because it was a code path that rarely got tested.

No, proper easter eggs don't introduce security issues, they're benign almost by definition. I think what made them disappear was the introduction of all the suit-wearing people who decide what the programmers are supposed to program, with no room for autonomous work within that.

> proper easter eggs don't introduce security issues

Proper code doesn't either, and yet there they are! The point is they added another attack surface, however small, and another code path that should be tested.

When people started to care about 100% test coverage, they started to disappear.

Re: Number in man page titles e.g. sleep(3)

#58
post #57

Earlier quoted context omitted.

No, proper easter eggs don't introduce security issues, they're benign almost by definition. I think what made them disappear was the introduction of all the suit-wearing people who decide what the programmers are supposed to program, with no room for autonomous work within that.

> proper easter eggs don't introduce security issues Proper code doesn't either, and yet there they are! The point is they added another attack surface, however small, and another code path that should be tested. When people started to care about 100% test coverage, they started to disappear.

> The point is they added another attack surface, however small, and another code path that should be tested.

I dunno, "attack surface" to me means "facilitate opening/vulnerability somehow" and none of the easter egg code I've seen has done that. You have any concrete examples where a easter egg made possible a security vulnerability that wouldn't be possible otherwise?

But yes, another code path created by easter eggs that wasn't tested I've seen countless of times, but never been an issue, but maybe our easter eggs always been too small in scope for that.

Re: Number in man page titles e.g. sleep(3)

#59
post #57

Earlier quoted context omitted.

> proper easter eggs don't introduce security issues Proper code doesn't either, and yet there they are! The point is they added another attack surface, however small, and another code path that should be tested. When people started to care about 100% test coverage, they started to disappear.

> The point is they added another attack surface, however small, and another code path that should be tested. I dunno, "attack surface" to me means "facilitate opening/vulnerability somehow" and none of the easter egg code I've seen has done that. You have any concrete examples where a easter egg made possible a security vulnerability that wouldn't be possible otherwise? But yes, another code path created by easter e…

The most famous is the Xbox hack that was only possible because of an Easter Egg:

https://security.stackexchange.com/questions/144202/are-ther...

Re: Number in man page titles e.g. sleep(3)

#60

Earlier quoted context omitted.

... because if you do `man crontab` you get section 1, which does not document the crontab fields.

That is incredibly stupid. A documentation system designed by someone who doesn't understand how people use documentation. If man was designed by someone with any taste at all it would at least give you a menu to select (1) crontab command, (5) crontab file format. Maybe we need a rewrite in Rust to fix that.

It seems it has been done already a while ago without waiting for the rust community to do their usual churn.

https://imgur.com/a/kEkmRxx (link shows a screenshot of khelpcenter showing the different manpages available for crontab)

Post reply on HN