11 ms·
> Perhaps rm -rf / should be replaced with something with more verbose flags set. That way, when you run a bad command, you are told immediately that things are
by dkarl 6y ago
> Perhaps rm -rf / should be replaced with something with more verbose flags set. That way, when you run a bad command, you are told immediately that things are being deleted
This gives me an idea: Hell Linux. In Hell Linux, the operating system does its best to pretend that nothing is wrong, so it takes you as long as possible to realize that you've made a mistake. Commands ignore all unrecognized flags. In shell scripts, if one branch exits with a nonzero exit code, the other branch is taken. stderr is always redirected to /dev/null. 0 exit code is reported for all processes, no matter how they terminate. If you try to exec a file that doesn't exist, it runs a process that does nothing and immediately exits, unless it is part of a pipeline, in which case it consumes standard in. If you try to read a .json file that doesn't exist, you get the bytes "{}". When you read a log file, any lines containing "ERROR" or "WARN" are skipped. If you try to connect to a port that nothing is listening on, it does its best to behave like the service that should be listening there. Oh, the possibilities....
- jmnicolas 6y ago> the operating system does its best to pretend that nothing is wrong, so it takes you as long as possible to realize that you've made a mistake. You're describing my (modest) experience with Javascript: it fails silently. I was describing it this way to a colleague: Javascript is a Japanese girlfriend, too polite to show you your mistakes so you have a hard time to know what you did wrong. I want a rigorous German girlfriend that won't let pass any mistake or even an Italian one that will burn my house because I forgot to call her by her right name!
- ojnabieoot 6y agoI am from the left-liberal side of things, including my choice of employers, and I am always flummoxed when I come into HN and see developers a) make comments that are flagrantly bigoted and misogynistic b) indicate that they make comments like these to their colleagues Do devs really say horrible things like this at the workplace? If anyone on my team made jokes about Japanese vs. Italian girlfriends, either they would be fired or I would quit.
- ColanR 6y agoWhen I read it, the comment sounded like the emphasis was on stereotypes of the culture, not the gender. Maybe you're reading too much into it.
- chki 6y ago>the comment sounded like the emphasis was on stereotypes of the culture To be honest, that is also pretty weird, wandering into "wrong"-territory. At least if you are prescribing negative stereotypes to a culture.
- ojnabieoot 6y agoTo be clear: comments about "polite" Japanese versus "strict" Germans and "angry" Italians are also bigoted and will make many immigrant coworkers deeply uncomfortable (especially if they are women). Everything about his comment is gross and 100% inappropriate for the workplace, and civilized society in general.
- sz4kerto 6y ago"obstinately or unreasonably attached to a belief, opinion, or faction, and intolerant towards other people's beliefs and practices." (Definition of bigoted from Wikipedia) Stereotypes can be harmful, but they oftentimes are based in reality. Yes, the formalities of an average Japanese are almost incomprehensible to an average Italian. What's the problem with that? The world is fortunately colorful, and making jokes about its colorfulness is not necessarily evil.
- fantod 6y agoHave you actually met a person from Europe? They play on stereotypes constantly.
- jlokier 6y ago> They play on stereotypes constantly. Above is true. But below is also true: > make many immigrant coworkers deeply uncomfortable (especially if they are women) You can also add gay people, trans, etc - and even things like being smart, or stupid, or being a man or woman, or blond or redhead or... etc - to the list who have to endure feeling uncomfortable and unwelcome (and often keeping it to themselves or playing along) in a workplace where "they" are made fun of regularly. I think it's because humour and oppression both exist, and actual for real consequences of the latter have been very severe and sometimes still are. It's hard to tell how much of each is really in process at any moment, so of course it's uncomfortable, and of course if someone feels they have to fit in to keep in their colleague's good books at work, they'll tend to keep their discomfort and background to themselves.
- wincy 6y agoThis sounds like if the designers of the web made a Linux distro.
- laksdjfkasljdf 6y agoThis is already what happens. Just like the web (W3C?) was a front for microsoft taking over from Netscape, and now Google taking over from everyone else, the linux foundation et al are just fronts for Google et al to have whatever they want on the kernel and to prevent any and all GPL3 "corruption" of their take-take-take business practices. GNU/Linux is old news, everyone runs BIGCORP/Linux today. You probably have more code from Google/Amazon/etc than GNU in any modern distro. Just look at all the effort devoted to systemd (which is a blatant copy of oracle/windows service management) or everyone eating up the hype of zsh on macs (which is nothing but a spin from apple: Look how this new shell is so much better, oh bash is going to be GPLv3, no this has nothing to do with it, look how shiny is zsh!) GPLv3 will set you free!
- Teever 6y agoMy paranoid thoughts about the state of disorganization in organizations like Mozilla and Gnome is that large corporations like Google and Microsoft clandestinely pay agent provocateurs involved in these organizations to derail progress in the projects. Systemd is really just the most blatant of these kinds of efforts.
- natmaka 6y agoSee https://www.cia.gov/news-information/featured-story-archive/2012-featured-story-archive/CleanedUOSSSimpleSabotage_sm.pdf https://www.cia.gov/news-information/featured-story-archive/... , starting from page 28
- anthk 6y agozsh is older than you think.
- 6y ago
- outworlder 6y agoSome of these design decisions precisely emulate the thought process of some 'architects' (never understood why that word was used for software) that I've worked with. They'd call some of these 'being resilient'.
- Minor49er 6y agoThat's a bit extreme. You should at least allow some error messages. Though those ones should just say "Oops, something went wrong :)"
- deleted 6y ago[deleted]
- vulcan01 6y agoOr perhaps the famous ? from ed :)
- segfaultbuserr 6y agoI like the error messages in some early BASIC interpreters. They must be as short as possible, since the entire interpreter fits in 4 KiB of RAM. For example, in Li-Chen Wang's Palo Alto Tiny BASIC... The only message for all syntax errors, is: WHAT? The only message for all runtime errors, is: HOW? And the only message for legal but unsupported operations (e.g. out of memory) is: SORRY See the source code here: https://github.com/ancientcomputing/8080_8085/blob/master/Tiny_Basic/tinybasic.asm#L154 https://github.com/ancientcomputing/8080_8085/blob/master/Ti...
- linker3000 6y agoFrom the Z80ASM users manual (1984): Syntax Error This message appears when the assembler is too confused to know what went wrong.
- oefnak 6y agoOhhh the horror... :(
- segfaultbuserr 6y agoSeriously speaking, it took me many years to realize that nearly all Windows BSoD messages are non-specific and useless - looking them up is a total waste of time. The only correct way to identify the actual error is analyzing the crashdump in WinDbg. I recently fixed a family computer that crashes randomly after a RAM upgrade. Removing the RAM didn't help, and it was totally a wild goose chase. The BSoD stop codes indicate some types of crucial system errors or memory corruption, sometimes in drivers, sometimes in kernel, but nonspecific. Finally I installed WinDbg and opened the crash dumps, and all dumps have the same error, and it became obvious immediately, KERNEL_DATA_INPAGE_ERROR - This bug check indicates that the requested page of kernel data from the paging file could not be read into memory. RAM was fine, the kernel simply cannot swap from the bad hard drive, no wonder it crashes. But the SSD was known-good, so I checked voltages, and saw the +5 V had a huge voltage drop. Upon closer look, found a loose wire at the power supply.
- laurent92 6y agoThat looks like a cmd.exe emulator. Just replace / with \ so it gets confused with escaping sequences.
- aprdm 6y agoGosh this gave me the chills. I am afraid some people are that creative to cause chaos!
- ChuckNorris89 6y ago> the operating system does its best to pretend that nothing is wrong Initially, I though you were talking about the lastest MacOS. You had me there for a second.
- numpad0 6y agoI remember some of earliest Android phones returned shell errors as “__: not found” using LSM just to make ROM devs’ life harder
- bashinator 6y ago> In shell scripts, if one branch exits with a nonzero exit code, the other branch is taken. > 0 exit code is reported for all processes, no matter how they terminate. These two things are mutually exclusive - shell script branching is usually based off of exit codes.
- quesera 6y agoI read that, and I thought that. But then I decided that the GP was probably throwing out suggestions, not developing an internally-consistent model for the final design. :)
- dllthomas 6y agoNot quite mutually exclusive, I think. The combination just means we always try the "true" path first, in our depth-first search of paths out of the script.
- kashyapc 6y agoOne of the "nice side effects" of your shell design is that one can do away with thinking about POSIX requirements / portability, among other "potential goodies". ;-) - - - But yes, if Hell Linux exists, it'd make a great candidate for a future QEMU Advent Calendar[1] submission. [1] https://www.qemu-advent-calendar.org/2018/#about https://www.qemu-advent-calendar.org/2018/#about
- 2is10 6y ago> the operating system does its best to pretend that nothing is wrong Call it "Trump Linux"! :)
- dafoex 6y agoIf we're poking fun at political leaders, maybe the antithesis to this OS - one that pretends everything is going wrong all the time - should be Brussels OS
- heresie-dabord 6y ago> the operating system does its best to pretend that nothing is wrong There is already a major OS with this characteristic.
- lostlogin 6y ago> Hell Linux As someone who accidentally moved /etc recently, I have been into the valley of darkness and wish for no further OS pain.
- yjftsjthsd-h 6y agoInterestingly, this can be made to work; IIRC, nixos supposedly works fine like that. AFAIK, the idea being that you only need to put non-default settings in /etc.
- cferr 6y agoTry accidentally moving /bin. A buddy at work did that not too long ago. There was panicking involved.
- yjftsjthsd-h 6y agoI've actually wished for something that takes it the other direction: Technically, everything it does is allowed, but it's designed to stress-test your assumptions. So, a distro that replaces half of coreutils with busybox, the other half with toybox or BSD ports or something, the system libc is musl, build tools are patched to randomly switch between using gcc or clang (both of which have `-Werror` enabled by default), user home directories are created like `/home/First Last/` (and if it doesn't have a last name for you it'll just leave a trailing space in the name), mktemp likewise is patched to stick temporary files somewhere other than `/tmp` by default (and always somewhere with a space in the name), /bin/sh is provided by dash (this isn't super rare, but some stuff still assumes that BASH is /bin/sh), normal programs are all in PATH but /usr/bin is empty (or maybe chmodded 000 or something)... The idea is, if your code builds and works on this system, it'll run anywhere, correctly, because the system leaves no room for "oh, everybody does it this way, so it's fine to rely on this non-standard behavior".
- thotsBgone 6y agoStrange Linux
- deleted 6y ago[deleted]
- jacobwilliamroy 6y agoI once got an hdd from a mac user. It had trailing spaces in filenames. Leading spaces. Asterisks. Question marks. Colon. Forward slash. :c I needed 2 computers to fix that one.
- anthk 6y agodetox(1) fixes that.
- badgerigar 6y agoNix with --pure does most of what you want here.
- kristopolous 6y agoActually worked on something similar about 16 years ago. The idea was an attacker could be led astray and then drop various behavioral clues to disclose their identity past a legally arguable threshold based on challenges and confusions selectively presented. The guy I was working on it with dropped out of academics for a career of spirituality. He went off to a monastery so I also abandoned the project as well. We never even got a publication out of it :-/. These days you could probably make a very expensive product out of it.* Someone else may have picked it up, I don't follow the literature anymore --- * - I just realized maybe he went off to become a spook - I don't know how I never thought of that - even to this day many of my colleagues from the era work for these nebulous companies with names like "The Adirondack Group" who just have a basic website with a single email address. I never understood why they even try, just say "we are spies" - everyone knows it. Maybe it allows them to live otherwise normal social lives where they don't have to lie about the superficialities of their job? I dunno. It can't be actually project based - that'd be super retarded - instead of knowing "he works for the CIA" everyone would also know what project they work on - super dumb - that can't be it. I'll probably hit up one of my old friends to see if that monastery was real. He can probably say "yes" or "no".
- kristopolous 6y agook, just talked to my friend. He was evasive and politely changed the topic so yeah, I still have zero information. I guess that's the right approach. If I has asked him if he knew the name of the monastery as opposed to whether the entire story was a canard, I probably could have gotten further. By foolishly asking if it was a story, I think he fell back on the "zero information" strategy - as in, even if it's real and he's living a solemn life of meditation, don't say anything. Me effectively going "Hey man, I gotta question about spies" was in retrospect, pretty dumb.
- tmearnest 6y agoI wonder what horrors you can subject the user to with only modifying the kernel. Nothing to kill the machine, but some sort of trickery involving messing with argv or randomly messing with process memory and silently prevent the resulting mess from being sent a SIGSEGV.
- derefr 6y agoIs there a name for this design philosophy? A lesser version of it is already what both shell scripts and PHP pages do by default. No crashing—only limping forward (likely in ridiculous invalid states.) > if one branch exits with a nonzero exit code, the other branch is taken That's called the Amb operator. It's actually fairly useful! Presuming you tended to write side-effect-free shell scripts, I could see enjoying this one. > If you try to read a .json file that doesn't exist, you get the bytes "{}" I would actually appreciate some little intermediary utility that would inject "{}" to stdout iff stdin was empty. It'd make piping maybe-JSON documents through to jq(1) work a lot more smoothly. > If you try to connect to a port that nothing is listening on, it does its best to behave like the service that should be listening there. I love the idea of the xinetd(8) equivalent to Busybox. A multi-protocol stub server, that knows how to speak literally every protocol, and listens on every port it can, but does nothing much over any of those protocols. It could serve as a way to slow down a Metasploit scan, by offering it an endless variety of things to try to exploit!
- eru 6y agoSome variants of BASIC had the infamous 'on error resume next' statement.
- Shish2k 6y ago> the operating system does its best to pretend that nothing is wrong, so it takes you as long as possible to realize that you've made a mistake Aka “the PHP design philosophy”?