Timeline for Why are true and false so large?
Current License: CC BY-SA 3.0
29 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 27, 2020 at 10:34 | comment | added | Flow | Recommended related article: G. Holzmann, "Code Inflation" in IEEE Software, vol. 32, no. 02, pp. 10-13, 2015. | |
| Aug 26, 2020 at 18:24 | comment | added | breadbox | @d33tah A better version is here: muppetlabs.com/~breadbox/software/tiny/useless.html -- It's the same size, but it provides both true and false, returning 0 or 1 depending on the name used to invoke it. | |
| Jan 14, 2020 at 2:50 | answer | added | R.. GitHub STOP HELPING ICE | timeline score: 5 | |
| Jan 6, 2020 at 20:19 | vote | accept | Kidburla | ||
| Feb 14, 2018 at 13:22 | answer | added | user unknown | timeline score: 3 | |
| Feb 3, 2018 at 12:16 | history | edited | Rui F Ribeiro | CC BY-SA 3.0 | deleted 1 character in body |
| Jan 31, 2018 at 10:20 | history | edited | Rui F Ribeiro | CC BY-SA 3.0 | added 4 characters in body |
| Jan 30, 2018 at 15:41 | comment | added | David42 | @MarkPlotnick What is even funnier about the true and false shell scripts in SVR4 is the long notice which begins with the phrase "This is unpublished proprietary source code of AT&T." It struck me as funny because of the obviously absurdity of the claims that AT&T has copyright on the phrase "exit 0", that it is a trade secret, and that the text of a shell script in a comercial operating system is somehow "unpublished". Then there was the fact that the notice bloated what should have been a six-byte script into almost a page of text. | |
| Jan 28, 2018 at 18:15 | history | edited | Rui F Ribeiro | edited tags | |
| Jan 28, 2018 at 9:18 | review | Suggested edits | |||
| Jan 28, 2018 at 10:32 | |||||
| Jan 27, 2018 at 13:24 | comment | added | Mark Plotnick | @Philip When a coworker saw that the SVR4 true shell script was version 1.6, he said "I wonder what bugs it had in the first five versions." (They were probably just adjusting the copyright notices or moving from one revision control system to another.) | |
| Jan 27, 2018 at 11:58 | comment | added | dave_thompson_085 | Also, giving a builtin command at the prompt does NOT 'run[] a two-line script that redirects to the builtin' because that cannot work for builtins that create and/or alter variables like read export declare or otherwise alter the shell state like cd ulimit shopt . Trying to do it from a program that isn't a shell and doesn't use a shell like find xargs nohup nice etc might. | |
| Jan 27, 2018 at 9:23 | history | edited | Rui F Ribeiro | edited tags | |
| Jan 26, 2018 at 22:27 | comment | added | Rui F Ribeiro | @user1024 Spelling errors? I think I looked more at the code than the messages... | |
| Jan 26, 2018 at 22:24 | comment | added | user1024 | @Philip: Now I'm curious what changed in GNU true between version 5.93 and 5.94. I suppose that they could have fixed spelling/punctuation errors in the --help text. | |
| Jan 26, 2018 at 20:16 | comment | added | Rui F Ribeiro | @BasileStarynkevitch My answer is based on Debian binaries and talks about the side of those options. | |
| Jan 26, 2018 at 16:58 | comment | added | Basile Starynkevitch | On my Debian system, true accepts both --help and --versionarguments, so has code to process them | |
| Jan 26, 2018 at 14:36 | comment | added | d33tah | Obligatory - the smallest implementation of false: muppetlabs.com/~breadbox/software/tiny/teensy.html | |
| Jan 26, 2018 at 4:16 | comment | added | Philip | Some early versions of unix just had an empty file for true since that was a valid sh program that would return exit code 0. I really wish I could find an article I read years ago about the history of the true utility from an empty file to the monstrosity it is today, but all I could find is this: trillian.mit.edu/~jc/humor/ATT_Copyright_true.html | |
| Jan 25, 2018 at 23:51 | comment | added | David Richerby | It's ironic that you write such a long question to say "Why are true and false 29kb each? What's in the executable other than the return code?" | |
| Jan 25, 2018 at 22:42 | history | tweeted | twitter.com/StackUnix/status/956658664823296000 | ||
| Jan 25, 2018 at 22:20 | comment | added | mtraceur | @meuh Just for the record command -V is common to shells like bash but not really portable to all Bourne-likes in use today. command -v (lower case v) is much more universal/portable, but just prints the command name for builtins and functions in most shells I've seen. | |
| Jan 25, 2018 at 22:15 | comment | added | mtraceur | true and false are builtins in every modern shell, but the systems also includes external program versions of them because it's part of the standard system so that programs invoking commands directly (bypassing the shell) can use them. which ignores builtins, and looks up external commands only, which is why it only showed you the external ones. Try type -a true and type -a false instead. | |
| Jan 25, 2018 at 21:05 | answer | added | steve | timeline score: 27 | |
| Jan 25, 2018 at 20:53 | comment | added | meuh | You should use command -V true not which. It will output: true is a shell builtin for bash. | |
| Jan 25, 2018 at 20:50 | answer | added | Rui F Ribeiro | timeline score: 159 | |
| Jan 25, 2018 at 20:29 | answer | added | Maks Verver | timeline score: 37 | |
| Jan 25, 2018 at 20:21 | comment | added | Rui F Ribeiro | libraries probably? github.com/wertarbyte/coreutils/blob/master/src/true.c | |
| Jan 25, 2018 at 20:14 | history | asked | Kidburla | CC BY-SA 3.0 |