ROB PIKE TWITTER RANT

...

Other urls found in this thread:

gnu.org/software/coreutils/>
translationproject.org/team/>COPYRIGHT
gnu.org/licenses/gpl.html>.
gnu.org/software/coreutils/true>
gnu.org/licenses/>.
youtube.com/watch?v=ylstybS6rqw
muppetlabs.com/~breadbox/software/tiny/
github.com/faissaloo/true/blob/master/true.asm
twitter.com/rob_pike/status/966896123548872705
muppetlabs.com/~breadbox/software/tiny/teensy.html
askubuntu.com/questions/130186/what-is-the-rationale-for-the-usr-directory
multicians.org/multics-vm.html
multicians.org/mgs.html#signal
twitter.com/NSFWRedditImage

yes

amen

true

tbf what couldn't you say this about

`false`

Only if you already know what that essence is. Someone not sufficiently adjusted to Unix would be really confused.
GNU true does the right thing. --help flags are the correct solution. Commands ought to be self-documenting.

why not a man page instead?

#Absolute shit tier~>> du -h /bin/true24.5K /bin/true#Better~>> du -h /usr/local/sbase/bin/true8.5K /usr/local/sbase/bin/true#Best~>> touch true~>> du -h true512 true

TRUE(1) User Commands TRUE(1)NAME true - do nothing, successfullySYNOPSIS true [ignored command line arguments] true OPTIONDESCRIPTION Exit with a status code indicating success. --help display this help and exit --version output version information and exit NOTE: your shell may have its own version of true, which usually supersedes the version described here. Please refer to your shell's documentation for details about the options it supports.AUTHOR Written by Jim Meyering.REPORTING BUGS GNU coreutils online help: gnu.org/software/coreutils/> Report true translation bugs to translationproject.org/team/>COPYRIGHT Copyright © 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.SEE ALSO Full documentation at: gnu.org/software/coreutils/true> or available locally via: info '(coreutils) true invocation'GNU coreutils 8.26 February 2017 TRUE(1)

/* Exit with a status code indicating success. Copyright (C) 1999-2018 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see gnu.org/licenses/>. */#include #include #include #include "system.h"/* Act like "true" by default; false.c overrides this. */#ifndef EXIT_STATUS# define EXIT_STATUS EXIT_SUCCESS#endif#if EXIT_STATUS == EXIT_SUCCESS# define PROGRAM_NAME "true"#else# define PROGRAM_NAME "false"#endif#define AUTHORS proper_name ("Jim Meyering")voidusage (int status){ printf (_("\Usage: %s [ignored command line arguments]\n\ or: %s OPTION\n\"), program_name, program_name); printf ("%s\n\n", _(EXIT_STATUS == EXIT_SUCCESS ? N_("Exit with a status code indicating success.") : N_("Exit with a status code indicating failure."))); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME); emit_ancillary_info (PROGRAM_NAME); exit (status);}intmain (int argc, char **argv){ /* Recognize --help or --version only if it's the only command-line argument. */ if (argc == 2) { initialize_main (&argc, &argv); set_program_name (argv[0]); setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); /* Note true(1) will return EXIT_FAILURE in the edge case where writes fail with GNU specific options. */ atexit (close_stdout); if (STREQ (argv[1], "--help")) usage (EXIT_STATUS); if (STREQ (argv[1], "--version")) version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version, AUTHORS, (char *) NULL); } return EXIT_STATUS;}

And for a quick comparison:

/* $OpenBSD: true.c,v 1.1 2015/11/11 19:05:28 deraadt Exp $ *//* Public domain - Theo de Raadt */intmain(int argc, char *argv[]){ return (0);}

wtf theo, it shouldn't take args.
/* See LICENSE file for copyright and license details. */intmain(void){ return 0;}

Submit a patch!

Apparently it can. Weird.

global _start_start: mov eax, 1 mov ebx, 0 int 80h

It's not portable. Nothing feels better than seeing that glorious EOF block in your Bash scripts. Most utils don't need a gassing-list of headers, for fucks sake I've seen an include list fill my whole 1080p height screen, at 8 font size. It brings a minuscule amount of compiling speed boost (lmao'ing at ur priorities), and a giant fucking dredge for anyone who wants to come in and understand how your code works. Oh, what's this call for getDMoverAndOutNinerNiner()? Let me just search this c file, oh it's only called about 100 times? Well, I'm sure am glad our faithful maintainer decided to use a combined namespace! I'll just look at each match (regex searches make this a bit easier, but not ACCEPTABLE). Well looks like it's not defined here, let me just... jesus christ 30 fucking includes? And they're named dumb shit like "fuckme/daddy.h." Absolutely fucking perfect. Now I need to grep the entire repo for all matches, which thankfully come in at *only* 400 line matches. Let me just repeat the last process, and hope I find it. Fuck. You don't need all of these headers if it's your code. Slam it all into one file and be done with it, so people with productive workflows can zoom around the entire page, instead of having to deal with dumb shit like this. Obj files were a mistake. But back to man pages. Slam your doc under the "--help" case and let it be. The problem with Lameix is that everything spread out into the four corners of the earth. You've got you doc pages, your libs, your includes, your binaries, your configs, all just thrown around everywhere so you need to do some digging in the hope that someone asked the same "where is this one crucial file that doesn't have a standardized location?" Goddamn. I just installed Nginx from source after having to rip out a Ubuntu Nginx package to get a new module. I was shocked and appalled. The entire source was copied into a single directory. /usr/local/nginx. How fucking outrageous is that? All the docs, binaries, confs, and party crackers under one single directory. Even the public_html directory. Who would've thunk it? What madman sacrificed his maintainer status for this? I'll pour one out for you tonight. All of these things can be rectified with proper planning and not being a retard.

>sabotagep
A beacon of light in the madness of the /g/.

It's code correct, you absolute GNU. Lurk the mailing list.

#Bester$ touch true$ du -h true0 true

I was memeing you dip. If you disassemble them they are exactly the same.

nice. Its due to filesystem right? For example I made that post using a bloated FS (ZFS) whereas if I use something else its 0.

Something that is empty and nothing is not the same. The empty set is empty (duh), but it certainly is not nothing (specifically, a set which containst the empty set as an element is non-empty itself).
Also
char *ptr1 = {'\0'};char *ptr2 = NULL;
ptr1 points to an empty string, ptr2 points to no string at all. They are most certainly very different from one another.

Is that "The UNIX Way"-conformant?

You ran the configure script without changing any of the defaults, didn't you?

The why is it isn't needed at boot. /bin/ and /sbin/ have binaries needed to boot up, before /usr/bin/ is mounted. You can for example have /usr/bin/ in a remote filesystem, not so for /bin/. Of course that's not a real use-case, but a different partition is. The whole reason /usr/ exists in the first place is they ran out of space in / half a century ago and solved it by putting binaries in /usr/bin instead.

BLOAT

No. Make two files, "you.c" and "bsd.c". Now copy paste each example you gave. Your no args example into the "you.c" file and raadt's example into "bsd.c". Now run
gcc -S -O0 bsd.c & gcc -S -O0 you.c && gcc -O0 -c bsd.s && gcc -O0 -c you.s && gcc bsd.o -O0 -o bsd && gcc you.o -O0 -o you && ls -la | grep -o "you$" | sed "s/.*/(&)/g"

No, it's probably your sbase "du" bin. Older ones, iirc, report everything in 512 bytes, so any 0 byte files automatically get reported as 512 bytes. I'm using GNU's du, so it reports real sizes. Echo a nullbyte into "true" and then run du again. Tell me if it changes.

Yee. I saw the path options, but skipped over them. A welcome surprise.

>gcc -S -O0 bsd.c & gcc -S -O0 you.c && gcc -O0 -c bsd.s && gcc -O0 -c you.s && gcc bsd.o -O0 -o bsd && gcc you.o -O0 -o you && ls -la | grep -o "you$" | sed "s/.*/(&)/g"
Ironically your (you) broke because sbase's grep doesn't support '-o' but I get the point. I should have disabled compiler optimizations before embarrassing myself.

Aw fuck, I'm a retard. It's likely because du only shows physical sizes, and ZFS allocates everything in 512 chunks instead of just a listing, like ext3. Do ls -sh "FILE" if you want the logical "real" size. And then do stat "FILE" if you want more info on how ZFS does shit compared to ext3. If you do, post a blank file and a one-ascii file for me. I need to quench my autism.

If you have a neurotypical version of sed, I can whip up a "portable" version.

No need, I made something absolutely disgusting myself.
ls | sed '/^bsd/d;s:\..*::;s:.*:(&):'

inc eaxint 80h

I was trying to figure out how you got autism, but I realized I had a file in my directory already there.
ls | sed '\:.*....$:d;s:s:a:;s:-.*::;x;'

ls | sed '\:.*....$:d;s:s:a:;s:-.*::;x;s:d:g:;s:b:f:;'

~>> touch true; printf '\0' > true.ascii~>> du -h true*512 true512 true.ascii~>> ls -lh true*-rw-r--r-- 1 fag fag 0 Feb 23 19:06 true-rw-r--r-- 1 fag fag 1 Feb 23 19:06 true.ascii~>> stat true* File: true Size: 0 Blocks: 1 IO Block: 131072 regular empty file Birth: - File: true.ascii Size: 1 Blocks: 1 IO Block: 512 regular fileDevice: 23h/35d Inode: 27383 Links: 1~>> stat -f true* File: "true" ID: 1fb6b072003a5d31 Namelen: 255 Type: zfsBlock size: 131072 Fundamental block size: 131072Blocks: Total: 943915 Free: 930326 Available: 930326Inodes: Total: 238189294 Free: 238163584 File: "true.ascii" ID: 1fb6b072003a5d31 Namelen: 255 Type: zfsBlock size: 131072 Fundamental block size: 131072Blocks: Total: 943915 Free: 930326 Available: 930326Inodes: Total: 238189294 Free: 238163584

My power level isn't high enough for hold space yet.

What did he intend to convey, when he decided to post this code snippet in our Forum of Fastidious FOSS Followers, Fanatics, and Fetishists?

Yeah, Unix sucks, shells suck, standards bodies suck, GNU sucks -- this isn't news buddy. If I were to start scrutinizing everything about my system I'd end up wasting half my life implementing my own Right Thing user space on top of Linux.

GNU true being bloated trash and me being able to make a shorter code in assembly is pretty much what I've been saying for a year, but you just called me a faggot.

Thats because you are a faggot. If you read the rest of the post you would have realized that part of the problem with it being a C executable is that it is not portable which is the exact same case for assembly. The best solution is an empty file named true.

Unix is meant to be portable though...

youtube.com/watch?v=ylstybS6rqw

What an amazing world we live in where I have to carefully select what hardware I buy in order to run any of the Unix operating systems presently on the market.

I've run Linux, FreeBSD, and OpenBSD on arbitrary commodity hardware for a long time and it mostly works fine to great. You can of course choose to buy stuff without drivers but a random spin of the wheel in the desktop / laptop segment is going to almost always be fully supported.

Regardless this isn't an argument for writing Unix utilities in assembly, that's been done multiple times and always petered out or dead ended.

Wouldn't it be wonderful if software didn't have to support hardware! There would be no need for operating systems like Unix! No need for drivers!

literally who????

Rob Pike was one of the inventors of plan9, go and utf-8.
He is one of the few remaining unix wizards, corrupted by google but hey, is what it is.

you mean sour grapes spergs who can't into Multics or Lisp Machines? They're brainlets, not wizards.

Survivor's bias. Now try Illumos or Linux-libre.

I'm not a fan of Unix, but I think this particular problem is because hardware is terrible, not because Unix is bad at being portable.

You're dumb.

So who are the wizards of the current generation?
lel no

Oh I bet he is just seething over not sticking to multics and lisp


Define current generation.

unix dindu nuffin

Have we reached peak retardation yet, /g/?

bloat

People between about 20-25 and 45-50 years old. Folks like Ken Thompson, Brian Kernighan, Rob Pike, RMS, ESR, the dudes who made C++, Java, Perl, Python etc. are all beyond that. Linus Torvalds can just barely still be called "current generation", but not for much longer.

...

...

I'm sure he wants pwd to be a separate binary.
But cd can't be a separate binary, unless you go back to the days when fork() didn't exist. Nobody wants that.

Nobody really. Either counterproductive cucks like Poettering or just soyboys and pajeets all the way down.

du -h /bin/true28K /bin/true

w-why...

eh I think you mean du -b.

I think you mean du -bh. Or du -b | numfmt --to=si if you want to be all modular but nevertheless use GNU.

who cares it's not like that extra jpeg worth of space has value

electron baBYYYYYYYY

Actually I might be wrong here I just checked on busybox and I don't see a way to get du to report file size.
So I guess what we really want is
stat -c %s
Which bugs out my shell where it's stat -c "%s"
or you could just use ls -lh.


Yeah -bh. --to=si is a different measure.

--to=si is a more correct measure. 10³ is human-adapted, 2¹⁰ is just silly.

So, in the end, computing *was* a mistake after all.

Are you a HDD maker? They also think that powers of 2 are silly

Powers of two are mostly used in practice for signalling you know things about compooters

Just like using numbers over 5 is signalling for you dun went 2 skool.

Powers of two shouldn't be mixed with decimal notation. If you use decimal, use SI prefixes. If you use a binary prefix, use hexadecimal or something, not decimal.

Truth is relative.

...

5,700,000 B should equal 5.7 MB, not 6 MB. Converting between units is easy when they match your notation.

If you don't know why powers of two are more usuful when dealing with binary-based computers (i.e. basically all of them), then I'm not sure why you're here. You think the hexadecimal number system (which is just shorthand for binary, four binary symbols are contracted to just one hexadecimal symbol) is also arbitrary and inferior to decimal in all contexts?

I meant that using powers of two for information units is usually signalling. Obviously there are lots of places in general where powers of two are desirable.
Hexadecimal is superior to decimal in a lot of contexts. But in contexts where you're already using decimal, like ordinary not-super-technical human communication, proper SI prefixes are almost always the way to go.

5.44 MiB is preferred though.
By the way the "1.44 MB" floppy disk capacity is wrong. A standard high density floppy disk has a capacity of 1,474,560 B (512 B per sector * 18 sectors per track * 2 tracks per cylinder * 80 cylinders per disk), which makes it either 1.47 MB (1474560/(10^3)^2), or 1.41 MiB (1474560/(2^10)^2). The "1.44 MB" is a figure popularized by diletants who combined a base-2 and base-10 approach.

As far as storage is concerned, base-2 is basically always better. Base-10 is used when dealing with bitrate and generally transfer speeds where the base unit is a bit rather than a byte (for instance you usually would use kilo- or megabits etc. which are 1000 and 1,000,000 bits respectively, rather than kibi- or mebibits which would be 1024 and 1048,574 bits respectively).

My post should have said 5.44 MB instead of 6 MB, sorry.
5.44 MiB is a step up from 5.44 MB, because it's unambiguous, but it's still pretty bad because it's hard to convert. Going from 5,700,000 B to 5.7 MB is trivial, going from 5,700,000 B to 5.44 MiB is tedious, especially if you have to do it manually.


Most use of storage units happens at a high enough level that base-2 has no advantages over base-10.

~/ $ as true.s -o true.o
.text .global _start_start: movl $1, %eax movl $0, %ebx int $0x80
~/ $ ld -T link.ld -o true
OUTPUT_FORMAT("elf64-x86-64")OUTPUT_ARCH(i386:x86-64)ENTRY(_start)SECTIONS{. = 0x400000;.text : { *(.text) }}
best I can do, still need to strip the section headers.

inttruecmd(int argc, char **argv){ return 0;}

~/tmp% cat test.lst 1 %line 1+1 test.asm 2 [bits 64] 3 4 true: 5 00000000 31C0 xor eax, eax 6 00000002 FFC0 inc eax 7 00000004 31DB xor ebx, ebx 8 00000006 CD80 int 0x80 9 10 00000008 31C0 xor eax, eax 11 0000000A B001 mov al, byte 1 12 0000000C 31DB xor ebx, ebx 13 0000000E CD80 int 0x80 14 15 00000010 B801000000 mov eax, 1 16 00000015 31DB xor ebx, ebx 17 00000017 CD80 int 0x80 18 19 00000019 B801000000 mov eax, 1 20 0000001E BB00000000 mov ebx, 0 21 00000023 CD80 int 0x80~/tmp%

...

Terry, Theo, that's about it.

You too dumbo

...

$ du -h /usr/bin/true2.0K /usr/bin/true
Better then better but not best :-/

TRUE(1) General Commands Manual TRUE(1)NAME true - return true valueSYNOPSIS trueDESCRIPTION The true utility always returns with exit code zero.SEE ALSO csh(1), false(1), sh(1)STANDARDS The true utility conforms to IEEE Std 1003.2-1992 ("POSIX.2").NetBSD 8.0_BETA June 27, 1991 NetBSD 8.0_BETA

I compiled dash with and without the true built-in. The difference in the binary is 104 bytes.

original content pls do not steal.
BITS 32 org 0x00010000 db 0x7F, "ELF" ; e_ident dd 1 ; p_type dd 0 ; p_offset dd $$ ; p_vaddr dw 2 ; e_type ; p_paddr dw 3 ; e_machine dd _start ; e_version ; p_filesz dd _start ; e_entry ; p_memsz dd 4 ; e_phoff ; p_flags _start: mov bl, 42 ; e_shoff ; p_align xor eax, eax inc eax ; e_flags int 0x80 db 0 dw 0x34 ; e_ehsize dw 0x20 ; e_phentsize db 1 ; e_phnum ; e_shentsize ; e_shnum ; e_shstrndx filesize equ $ - $$

Thinking about me?

kill yourself

I see that people have been reading the tiny elf page I've been advocating... Nice.

muppetlabs.com/~breadbox/software/tiny/

The network effect and inertia are the only forces keeping the x86 zombie alive at this point. The faster we blow its head off, the more trouble we save ourselves. Those are facts many people, even on Holla Forums, have yet to understand.

My sbase one would have been smaller if
1. It wasn't statically linked
2. It wasn't compiled on gentoo hardened(Hardening features cause massive bloat).
NetBSD's is pretty good though
#! /bin/shexit 0
No idea why they are doing this instead of just making an empty file though.

Maybe it's different on NetBSD, but an empty file doesn't work on my Loonix.
$ ls -l true.*-rwxr-xr-x 1 user user 0 Feb 24 22:24 true.empty-rwxr-xr-x 1 user user 18 Feb 24 22:25 true.shell$ cat true.shell#! /bin/shexit 0$ cat test.c#include int main (int argc, char **argv){ execl(argv[1], argv[1]);}$ tcc -run test.c ./true.empty; echo $?255$ tcc -run test.c ./true.shell; echo $?0
I think some shells interpret non-executable executables as shell scripts, but true isn't only called from shells.

It works for me.
~>> touch true~>> chmod +x true~>> ./true~>> echo $?0~>> ls -lh true-rwxr-xr-x 1 fag fag 0 Feb 24 16:32 true~>> busybox sh ./true; echo $?0~>> cc test.c -o test~>> ./test ./true; echo $?0
Thanks for the reminder to install tcc. I had removed it because I was going to write an ebuild for it and then I forgot.

I can't decide if you're actually a pajeet or just that embedded systems larper.

I made a bit of a mistake, because failing to exec means test.c exits with success, and tcc isn't acting like I expected it to.
Revised:
$ PS1='$? $ '0 $ cat test.c#include #include int main (int argc, char **argv){ execl(argv[1], argv[1]); puts("oh no"); return 1;}0 $ tcc -run test.c ./true.shell0 $ tcc -run test.c ./true.emptyoh no1 $ tcc test.c -o test0 $ ./test ./true.shelloh no1 $ ./test ./true.emptyoh no1 $ gcc test.c -o test0 $ ./test ./true.shell0 $ ./test ./true.emptyoh no1 $
Something fucky is going on. I'm not sure what.

An empty file works on NetBSD. Maybe it's just done that way to keep consistency with 'false'.
$ touch test$ du -h test 0B test$ chmod +x test$ ./test$ echo $? 0$ false$ echo $? 1

$ cat /usr/bin/false #! /bin/sh exit 1$

you mean the one percent of the one percent doesn't even get it? the world is fucked

plan 9 is another shitty variant of *nix not even worth using. utf8 is aids. unicode is aids.
unix was never good

the dudes behind node.js and minecraft :^)

pwd shouldn't even be a thing. the command line is some retarded bullshit. things shouldn't revolve around some stupid programs that input and output text that has no defined format and has to be parsed in some idiotic way. that's why plan9's so called superiority and other things that try to slightly improve over *nix are all crap.

Are you sure that's not just your shell handling it?
$ ./true.empty; echo $?0$ fish> ./true.empty; echo $statusFailed to execute process './true.empty'. Reason:exec: Exec format errorThe file './true.empty' is marked as an executable but could not be run by the operating system.125
dash, bash and busybox sh all handle it like a shell script, but fish and my execl wrapper reject it.

Here's a version with a standards compliant ELF header and that doesn't use the deprecated and extremely slow int 0x80 system call convention
github.com/faissaloo/true/blob/master/true.asm

It's a manually-built ELF file that embeds the program inside the header, you fucking moron. See

Kill yourself.

I have no idea.
$ fish Would you like instructions (y or n)? yThis is the traditional children's card game "Go Fish". We each get sevencards, and the rest of the deck is kept to be drawn from later. Theobject of the game is to collect "books", or all of the cards ...

Do you have Python?
$ python -c 'import os; os.execv("./true.empty", ["./true.empty"])'Traceback (most recent call last): File "", line 1, in OSError: [Errno 8] Exec format error
If not, try the C thing.

Btw source since no one's actually bothered to go looking
twitter.com/rob_pike/status/966896123548872705

According to some of the replies, if a file is empty it's going to be interpreted by the current interpreter, and that's slow as hell.

Farewell my sweet cookies, you were of no use

tcc -run true.c ./true.shell; echo $?255$ tcc -run true.c ./true.empty; echo $?255

I didn't but i just pkgsrc'ed it so i could try this.

$ python3.6 -c 'import os; os.execv("./true.empty", ["./true.empty"])'Traceback (most recent call last): File "", line 1, in OSError: [Errno 8] Exec format error$ du -h true.empty 0B true.empty$ python3.6 -c 'import os; os.execv("./true.shell", ["./true.shell"])'$$ cat true.shell #! /bin/sh exit 0$

tcc looks to be for x86 and arm only?
I am on PowerPC so can't try that sorry.

And a poo in a da loo to you too.

What is it like from a SO answer/ famous example? Genuinely curious, because I don't feel like stripping the newlines to search it up. Also it's assembly, aren't you bound to get look-a-likes with such simple shit?

Found it: muppetlabs.com/~breadbox/software/tiny/teensy.html

I didn't paste shit, moron. If you want the explanation, go to the link I posted.

I am not this street shitter, thank you.

/bin #Essential command binaries that need to be available in single user mode; for all users, e.g., cat, ls, cp./sbin #Essential system binaries, e.g., fsck, init, route./usr/bin #Non-essential command binaries (not needed in single user mode); for all users./usr/sbin #Non-essential system binaries, e.g., daemons for various network-services.

...

Sure but he made two classic mistakes.
1. posted impressive code
2. the code didn't do what he thought it did
The hallmarks of a true Pajeet.

...

Correct layout is:
/bin/sbin --> /bin/usr --> /#Where /bin is/bin/${package} --> /opt/${package/bin/${packge_binary}

They did this to make things easier for developers using the Win32 API because x86 programs are run under WoW64

Jeffrey Snover, lead developer of PowerShell, probably put the differences between *nix and Windows best when he said;
"...On Linux, everything's an ASCII text file, so anything that can manipulate that is a managing tool. AWK, grep, sed...in Windows, everything's an API that returns structured data..."
In *nix everything is a file and the filesystem doubles as an API. In Windows APIs like the Registry are what set all filesystem variables. The Registry is a binary database. In fact you can have Program Files (x86) point to the regular Program Files dir by editing the Registry

Lets see, I have found exes in the following
\Windows
\Program Files
\Program Files (x86)
\Users\[user]\appdata - hidden
\Users\[user]\Application Data - hidden
\Users\[user]\Local Data\Application Data - hidden
And that's assuming the program defaults to any recommendation of Microsoft at all, some programs just install to \[program]

The FHS is very far from perfect and carries historical structures from when hard drives were too small to fit the whole system but it's not any worse than Windows.
askubuntu.com/questions/130186/what-is-the-rationale-for-the-usr-directory


Snover also didn't want the program file split iirc.
Powershell is a great shell for windows because it was made for the registry, you do get some added benefits because of this structure, for instance choosing columns, you can simply get an arbitrary column by choosing the column number, no dealing with delimiter characters or edge cases in your data.

Some distros do that, but with /usr/lib not /usr/bin because you usually don't have multiple architectures of the same program installed.

No. The best layout is:
cd /ls -la/boot/sys/var/tmp
You have a bootloader, system-managed files, user-managed files, and a temporary directory that gets wiped on boot.
Why in god's name does root need its own directory? It would be better to lump it under /home (unless it's some wacky zanny filesystem hierarchy shit that won't let you have root under anything but /)
Almost as useless as /sys. Go look at your /srv dir, and the your /sys dir. Tell me why you think these should be here.
I want potternigger to get his chode out of my aryan goddess Arch. Throw it under proc or back to dev.
HAHAHA, *wheeze* OH NO NO NO. While I concede the need for a virtual filesystem where we can store all of our Code-Correc(TM) sockets, I have great disdain for needing it in /root. Linus please get your LunexDee kernel under control.
One of the ugliest filesystems out there, but it's important when you're running your webserver on root and accidentally rm -rf / instead of rm -rf .
Are you, for real? What is your reason for not just sticking it under /usr/lib? It's already symlinked to /usr/lib.
Pull the trigger Pike, do it motherfucker, end me now.
Mount all of your data to /tmp.
There's nowhere to stick this if we follow the *NIX tradition of only having binaries in /usr/bin, but that's retarded. Stick the confs in with the bins so no one has to "find / -name" their way through mismatched filenames for everything. And stick libs with includes. There is absolutely no mismatch here and it consolidates resources.
Is fine, just nest it somewhere else.
Whoever started this chain, if you're reading this, reply to this post right now of your mother will die in her sleep tonight. This is the most inane shit ever. There's a logical diverge between system-managed files in /usr/ and non-managed files in /var/. Stick local under var, it's the exact same thing with less goddamn inconsistency and headaches trying to debug fucking retarded package-prefixes. I'm looking at you Fedora, yum+rpm+sometimes install in local+sometimes install in usr+sometimes none of the above.

Savage post my dude glad I'm not the only one who thinks the FHS is fucking insane

...

Maybe Rob Pike should focus on making his shit-tier language not produce 2MB large binaries for simple hello world programs instead of ranting about 512 Bytes in Unix.

After you merge the entire fucking dumping ground that is bin into sensible folders and figure out some sane alternative to single-user mode. There is a trade off though. Bin is really fucking convenient for doing a "/bin/ [TAB COMPLETE]" when trying to find a sys-bin. Alongside would be better. The only reason I suggested merging was because package managers don't even care about how bin works anymore. I already see directories piling up.

Not much can be done. Linux is built on so much outdated bloat that can't be ripped out, and it's just going Microsoft-nova and taking no goddamn survivors.

I should have explained the layout I posted better. Though most of your post doesn't seem to apply to what I posted.

Everything that specific package needs to run is located here. So that we don't have to hack up every single packages build system symlink the contents of lib to /lib. bins contents are symlinked to /bin for usability sake.
Where does this even exist? I've never seen it.
Like you mentioned only exists on pozzed systems.
Sure I guess.
It shouldn't be dynamic but it should definitely be there.
Did you read my first post? Its a symlink to /

The rest of you post seems like lunacy though. I'm talking about a working system here I'm not sure what you are talking about. If I'm wrong and you have a setup like this then please link.

NO
I can get behind most of what you say though.
permissions and editing rights to bin and etc stuff can really just be done via groups or a sudoers file instead of an entirely new mountpoint.
User profile specific stuff in my opinion should just be like another mini hierarchy, either visible or dotfolders.
Binaries or configs ONLY for user1 should be /home/user1/bin with the conf as /home/user1/etc
Would've saved us from this .local, .config .program-name debacle.

Because /home may be on some other partition, perhaps not even on a functional disk, maybe even on a network. If you're going to reinvent Unix, at least try to be smarter than they were.

It was a semi-related, segue into my mental masturbation. Please do not regard it as a serious reply.

Yeah, I love having 50 dotfiles in my home directory, along with a .config directory for miscellaneous configs. Goddman. Emacs also has 3 different possible configs.

Heh, try symlinking + bind. You've already beat the devil at his own game, by using his own fiddle as a figging instrument.

You have no idea what /proc and /dev are, you fucking disgusting moron. Jesus fuck I just can't get over how insanely retarded you are. You dumb fucking nigger. Kill yourself. I almost want systemd to succeed just to spite your dumb ass.

Tell me exactly why you think putting run back into dev is a bad thing, without quoting poetry.

Because it's not device files you stupid fuck cunt. Stop posting any time.

My one request was that you wouldn't quote poettering, and you failed.

Get that through your thick skull, braindead fuck. Don't post your disgustingly shit opinions here ever again.

You could even throw them under tmp, it's the best practical solution. There is a stark contrast between what normie autists think is logical and what really is logical: usability. FHS is bloat, systemd is bigger bloat, Poettering setting his goons on the FHS is huge bloat, adding another filesystem because a few people couldn't stand the thought of their peas touching their carrots is the biggest bloat of all. Even me, I am bloat. The best choice for a single-person workstation is to get a choice of how you want your filesystem to be laid out. It doesn't even have to be major, you can just middleman your prefixes, in the hope some retard didn't hardcode a path.

But, the point is, it doesn't matter what the abstract representation of /dev is. After you understand that device nodes and runtime files go there, where runtime files are dot separated, it's not even a problem. The people who are using the system already know where everything goes. The newbies can read the docs and learn how it works. And the root system doesn't keep on becoming more and more out of control. I may have been memeing with a lot of the things there, but this is for real. You are likely autistic if you care about proper labeling in sacrifice of better features. Root-only mounting is a cancer that needs to be excised. Single devs being able to negatively influence people because they have high-functioning autism, is getting a pass from me.

Kill yourself you autistic cancerous fucking faggot.

I'm going to bed, aspie. Remember to tuck your weighted blanket under your feet so the cold air doesn't set you off again. And don't forget to tell your mom you appreciate all she's done for you. It's tough raising someone with disabilities, but even through thick and thin, she'll still love you.

Good night.

Nobody cares brainlet. Just kill yourself already.

...

Ideally you shouldn't even have a "true" file nor executable lingering on your hard drive taking space. Instead systemd could determine at boot time the actual requirements for a "true" command in the system and generate a virtual command umber /tmp and symlink it under /bin

Because it's necessary for single-user mode. Home might be a different filesystem and might not even be mounted.

But Loonix isn't about consolidating resources. Quite to the contrary, it mandates placing almost every type of resource somewhere else entirely, even if they belong to the same fucking program. That's why you don't have programs in Loonix that have their binaries, libraries, data, configs, docs etc. all in the same directory (like Windows programs often do, especially the portable ones).

/ is the primary hierarchy. /usr is the secondary hierarchy (hence /usr/bin, /usr/etc etc.). /usr/local is the tertiary hierarchy (hence /usr/local/bin, /usr/local/etc etc.). What is the issue here?

...

I can think of no sane reason for this, besides using edge cases to justify madness.

The main issue here is that that the Lunix filesystem hierarchy is a child of the trough, of all the people that've worked on it, and brought their ego into it. Projects become a disaster when there's more than one person at the helm vying for the "visionary" responsibility. The Lunix filesystem is not the product of careful, deliberate, and single-minded design. It's an abomination of different ideas and compromises, that take away all the benefits of their singular parts. Take the root hierarchy. Poettering's autism won't let him have /run as a sub-directory, fine. I could not care less, but then you have the FHS wanting dedicated media and srv/ points, and then some other idiot decided the meaning of sbin and bin should be context dependent, all of these conflict with Pootering's "everything belongs in their own singular directory." Even look at /var/.*mail. Why? For what reason is this so hard to agree upon. There is a better way to do it, but there are normies standing in the way.

UNIX weenies can't even make a program that does nothing but return 0 work right (not that needing an external executable file to return 0 makes any sense).


This brain damage is, of course, due to praying to "simplicity of implementation" when implementing switch and goto, without worrying about "the right thing." Yes, and they've succeeded. Hordes of grumpy C hackersare complaining about C++ because it's too close to theright thing. Sometimes the world can be a frighteningplace.


Yesterday Rob Pike from Bell Labs gave a talk on the latest and greatest successor to unix, called Plan 9. Basically he described ITS's mechanism for using file channels to control resources as if it were the greatest new idea since the wheel.Amazing, wasn't it? They've even reinvented the JOB device.In another couple of years I expect they will discover theneed for PCLSRing (there were already hints of this in histalk yesterday).I suppose we could try explaining this to them now, butthey'll only look at us cross-eyed and sputter somethingabout how complex and inelegant that would be. And thenwe'd really lose it when they come back and tell us how theyinvented this really simple and elegant new thing...

$ man resize2fs
Note: when kilobytes is used above, I mean *real*, power-of-2 kilobytes, (i.e., 1024 bytes), which some politically correct folks insist should be the stupid-sounding ``kibibytes''. The same holds true for megabytes, also sometimes known as ``mebibytes'', or gigabytes, as the amazingly silly ``gibibytes''. Makes you want to gibber, doesn't it?
Theodore Ts'o has spoken, EOF.

Pure signalling

LOL
bash-3.2$ info '(coreutils) true invocation'info: No menu item '(coreutils) true invocation' in node '(dir)Top'

Moldbug's got his own unique brand of autism going, if they can put it into a chip and make it run faster or something it'll be pretty based.

As for now it's just basically autism but it has promise.

It's slow because he designed it for a computer that doesn't distinguish between ram and storage, basically he's all in on NVRAM.
I am reading the urbit whitepaper and it's a lot more sane than just getting jargon bombed in the docs.
It also helped me realize why he made these seemingly bizarre decisions, worth the read.

That was a main Multics and AS/400 feature and it's faster than the file I/O that UNIX uses. Running it on top of UNIX makes it slow.

multicians.org/multics-vm.html


The lesson I just learned is: When developing with Make on 2 different machines, make sure their clocks do not differ by more than one minute. Raise your hand if you remember when file systems had version numbers. Don't. The paranoiac weenies in charge of Unix proselytizing will shoot you dead. They don't like people who know the truth.Heck, I remember when the filesystem was mapped into theaddress space! I even re

What is the page cache?

Something very different, unless I'm missing something.
Mapping a file into memory means that you can manipulate the file contents directly by manipulating the memory, which can be very convenient.
Unix eventually got it in the form of mmap, around 1990, a few decades later.

For a quick comparison GNU true is a shitload faster than the OpenBSD one. It's true, look at the benchmarks.

I copied the original code which returns 42 because its a popular hack people would recognize, or be interesting enough to encourage reading the code before being spoonfed the explanation.

now thats autism

How to properly handle error conditions with mmap? Since you're editing memory there's no function return value. Signals like SIGSEGV are used, and handling signals is pure hell and even if I do it right and return from the handler I just end up back in the code that caused it.

How the fuck does this work?

Like most things in UNIX, mmap is "a childish, vulgar, totally unsatisfying imitation" of the real thing.


Signals are done right in real operating systems, but they're broken in UNIX. No wonder nobody does error checking.

Unix encourages, by egregious example, the mostirresponsible programming style imaginable. No errorchecking. No error messages. No conscience. If a studenthere turned in code like that, I'd flunk his ass.Unix software comes as close to real software as TeenageMutant Ninja Turtles comes to the classic Three Musketeers:a childish, vulgar, totally unsatisfying imitation.

TMNT was good nigger needs to stfu

Yeah Unix sucks I know I posted a lot in the kill Unix thread. However its what we got now so answer the goddamn question: how to handle mmap signals properly?

Also I know full well exactly how shitty signals are. You have no idea how much I hate signals. Signals were a mistake. Trying to handle these fucking things is what made me hate Unix in the first place.

The best implementation I got is saying fuck POSIX, blocking fucking everything so my code can't actually be interrupted, using signalfd to epoll signals and handle them in an event loop on a separate process cloned with shared memory just for that exact purpose. I effectively turned my program into a micro-node.js.

Even this monstrous event loop thing breaks down when faced with mmap though, due to the simple fact it can't be captured by signalfd, and even if it could it wouldn't make sense since I'd have no way to figure out where the segmentation violation actually happened. So yeah, it's back to handler functions here.

I was thinking about long jumping away from the handler into exception handling code burt I dunno. I'm confused and don't quite know what I'm doing right now. I need to sleep on it.

...

...

you missed this in the GNU one:
/* Note true(1) will return EXIT_FAILURE in the
edge case where writes fail with GNU specific options. */
The GNU one should be considered infinitely slow because it is not correct.
t. Lamport

Get yourself a filesystem with tail packing, user.

but rember tthat the length doesn't equal performance

Multics did signals properly and it didn't need mmap because every file was addressable as memory. Almost everything in UNIX is broken or wrong in some way.

UNIX had the same problems in 1992 and people said UNIX sucked compared to real OSes.

multicians.org/mgs.html#signal

Once one strips away the cryptology, the issue is control.UNIX is an operating system that offers the promise ofultimate user control (ie: no OS engineer's going to take away from ME!), which was a good thing in itsinfancy, less good now, where the idiom has caused hugeredundancies between software packages. How many B*Treepackages do we NEED? I think that I learned factoring inhigh school; and that certain file idioms are agreed to inthe industry as Good Ideas. So why not support certaincommon denominators in the OS?Just because you CAN do something in user programs does notmean it's a terribly good idea to enforce it as policy. Ifsociety ran the same way UNIX does, everyone who owned a carwould be forced to refine their own gasoline from barrels ofcrude...

Multics did signals properly and it didn't need mmap because every file was addressable as memory. Almost everything in UNIX is broken or wrong in some way.

UNIX had the same problems in 1992 and people said UNIX sucked compared to real OSes.

multicians.org/mgs.html#signal

Once one strips away the cryptology, the issue is control.UNIX is an operating system that offers the promise ofultimate user control (ie: no OS engineer's going to take away from ME!), which was a good thing in itsinfancy, less good now, where the idiom has caused hugeredundancies between software packages. How many B*Treepackages do we NEED? I think that I learned factoring inhigh school; and that certain file idioms are agreed to inthe industry as Good Ideas. So why not support certaincommon denominators in the OS?Just because you CAN do something in user programs does notmean it's a terribly good idea to enforce it as policy. Ifsociety ran the same way UNIX does, everyone who owned a carwould be forced to refine their own gasoline from barrels ofcrude...

Except it was TMHT ("Teenage Mutant HERO Turtles") in Europe, as "ninja" was believed to not be kid-friendly enough.

I live in Europe.

Benchmarks (measured with `time for i in {1..1000}; do ./foo; done`):

t.codelet

...

For me C vs asm shows a much bigger difference (like half the time). I think the asm you used is shit, fasm gets it in 129bytes:
format ELF64 executable 3segment readable executableentry $xor edi,edimov eax,60syscall
Not that it matters since if true is your bottleneck you're doing something wrong.

Yes. Yes it is. Fast code is OBJECTIVELY better than slow code. Always.

There is no meaning in this kind of benchmark because there is no meaning of true beyond the truth of true.

Seemed ok to me. Next time use ministat.

Did you know that Europe is not a single state or culture or society and that "in Europe" usually means "in 1-3 countries"

Eurabia.

Of course it is. It's GNU's as.

0

/sys and /proc are filesystem interfaces to the kernel. Keeping them in / away from any other path that might get written to by mistake is a Good Thing.

Did you know Europe is a Union of "countries" and when most people say "In Europe" they typically use it as shorthand for "The European Union"? Not to mention the bureaucrats in charge want the "United States of Europe" to be a thing

/sys is a filesystem interface to bricking your computer.

Are you a GCC developer?