4 ms·
Brian Kenighan wistfully removed the lex/yacc parser in the OneTrueAwk many years ago, and replaced it with a custom parser (I believe for performance reasons).
by chasil 3y ago
Brian Kenighan wistfully removed the lex/yacc parser in the OneTrueAwk many years ago, and replaced it with a custom parser (I believe for performance reasons). The OneTrueAwk remains the standard awk in BSD, renewed, but not replaced. I don't think it's going anywhere.
The POSIX standards, flawed as they may be, have incredible staying power. These standards run our phones and embedded, supercomputers, current Apple workstations, game consoles, and are significant in many other places.
Microsoft itself implemented POSIX in Windows from the beginning (likely recognizing it's importance as the former vendor of Xenix), and while this has waxed and waned, running the "wsl.exe -l -o" command on modern Windows will catalog Ubuntu, Kali, and Oracle Linux that are not Linux, but serviced by the Windows kernel's POSIX layer under WSL1.
Applications that implement or greatly enhance POSIX have staying power.
Those who seek code longevity would do well to study it.
- KerrAvon 3y agoCounterpoint: POSIX is increasingly a creaky anachronism required to support a legacy base of old Unix software. Every modern Unix-derivative OS replaces or significantly augments core POSIX functionality with something that works better for modern hardware and software needs, or suffers in some areas if they don’t/can’t.
- froh 3y ago> that are not Linux, but serviced by the Windows kernel's POSIX layer under WSL1. that's not how that works. wsl is a Linux kernel running under a hypervisor integrated with windows.
- temac 3y agoWsl2 is how you say. WSL1 is a Linux syscall reimplementation in the NT kernel space.
- froh 3y agoI see and TIL. Still said syscall reimplementation was not based off the old and long gone NT posix personality (just sayin' so I save face...)
- josephcsible 3y agoYou're describing WSL2, but the post you quoted explicitly said WSL1.
- peterfirefly 3y agoBut is WSL1 supported by the POSIX layer? I don't think so. I think it uses some of the mechanisms built for the POSIX layer but I think it is a separate "personality".
- chasil 3y agoSee my post to a peer; this comes from the DEC Mica project, the cancelation of which directly led to Windows NT. Windows was designed in part as a UNIX kernel.
- peterfirefly 3y agoAlright, let me be more clear: WSL1 is NOT the POSIX personality of Windows NT. The POSIX personality was very dumb and minimal. WSL1 is NOT that. It is a different thing. And the POSIX personality doesn't even exist anymore.
- chasil 3y agoLook at the wiki for Mica. The goal was for a whole implementation of Ultrix alongside of VMS. It fell apart in trying to allow both sets of system calls to be used by a single process. This failure is likely a huge reason for Windows NT, as it led to cancelation. I used Utrix on a Decstation 240 in college. "However, it proved to be impossible to provide both full ULTRIX and full VMS compatibility to the same application at the same time, and Digital scrapped this plan in favour of having a separate Unix operating system based on OSF/1 (this was variously referred to as PRISM ULTRIX or OZIX)." https://en.m.wikipedia.org/wiki/DEC_MICA https://en.m.wikipedia.org/wiki/DEC_MICA
- chasil 3y agoIf you examine the wiki, you will find that the POSIX layer of Windows is the first implementation. https://en.m.wikipedia.org/wiki/Windows_Subsystem_for_Linux https://en.m.wikipedia.org/wiki/Windows_Subsystem_for_Linux I had known for some time that VAX/VMS was strikingly similar to Windows NT, but I learned a few days ago that the failed Mica project introduced a POSIX interface. https://en.m.wikipedia.org/wiki/DEC_MICA https://en.m.wikipedia.org/wiki/DEC_MICA
- revelio 3y agoIt can be argued the other way round. POSIX is tech debt and exists in modern machines so widely mostly because there happen to be free implementations of it. My experience from interviewing has been that a remarkably large number of developers actually never interact with POSIX directly these days: they never work with files and never open a socket or fork process trees. They certainly never use UNIX-adjacent stuff like X. Instead they interact with APIs layered on top like NodeJS, Java, C#, Android, Swift, HTML. None of which bears much resemblance to POSIX. Like, if you read about how to work with the network in iOS or Android you won't be directed to POSIX APIs.
- chasil 3y agoI might counter with "adb sh" on Android, and the C behind Objective-C as development tools where the standards are still very much present.