Live data from Hacker News

The Unix-Haters Handbook (1994) [pdf]

web.mit.edu

221–230 of 316 posts

Re: The Unix-Haters Handbook (1994) [pdf]

#221
post #105

When I read this 20 years ago I would never have believed I'd be typing this on a Mac laptop running yet another Unix variant. This line is now so funny... As for me? I switched to the Mac. No more grep, no more piping, no more SED scripts. Just a simple, elegant life: “Your application has unexpectedly quit due to error number –1. OK?”

Ha! I switched to Mac so I could have pipes, grep and bash. I personally believe a big reason for the Mac resurgence has to do with the switch to UNIX. I was on Windows using Cygwin for years before anyone I knew was using a Mac. Then OSX came out, and all of a sudden all the academics I knew switched to Mac, and a couple years later most of the professional programmers I knew had switched. The great thing about a Ma…

> The great thing about a Mac is that I get to have my user level UNIX without having to know anything about the system level UNIX. I don't need to be a sysadmin to run the thing. I get grep and pipes without having to know all the crazy commands to tweak networks settings and display timings and boot scripts.

Luckily, that is basically true for modern Linux as well.

Re: The Unix-Haters Handbook (1994) [pdf]

#222
post #25
post #16

Earlier quoted context omitted.

Basically only two paradigms survived the 90s. The Unix way (via Linux, BSD, Darwin) and the VMS way (via Windows NT). Everything else is either ultra-niche, dying, a mainframe so ancient and terrifying nobody will go near it, or only of marginal historical import. Bear in mind that when this book was written, the average desktop PC was running MS-DOS, and possibly Windows 3.1 if it was new and powerful enough. What…

The Xerox way also influenced Windows, OS X, iOS and Android and to certain extent ChromeOS. In regards to IDEs, frameworks, programming languages culture.

There's a good book about this, called 'Dealers of Lightning: Xerox PARC and the Dawn of the Computer Age'

http://a.co/9Gp3tQ7

Re: The Unix-Haters Handbook (1994) [pdf]

#223
post #193

Earlier quoted context omitted.

See Show Stopper!: The Breakneck Race to Create Windows NT by Zachary. Gives you an idea what the Unix landscape was like, and how primitive Windows was when Dave Culter's team from Digital began building NT (after the VMS at Digital), which became Windows XP (when Windows stopped crashing every hour). Much of what we assume every OS does today was cutting edge development in 1990.

Yeah everyone seems to rag on C for being ancient. They don't realize that, in 1990, writing a kernel in C was an huge improvement over assembly language! And it still is today -- there's really no other option. If your only other choice is assembly language, then C starts to look really good. You don't complain about weird function interfaces, because at least you have functions!

The original NT graphics code was in newfangled C++. The books goes into detail on the time lost teaching the team C++, and that they should have stuck with C. ;)

Re: The Unix-Haters Handbook (1994) [pdf]

#224

Earlier quoted context omitted.

I actually worked on a project that used NeWS (actually HyperNeWS) as a front end for a Lisp based AI system written in Common Lisp. HyperNeWS could do some neat things - e.g. you could draw a shape (any shape!) in the graphical editor and paste it as the shape of a window, all without writing any code. Edit: changed "uses" to "used" - was quite a long time ago!

I really miss HyperNeWS [1], which I worked on with Arthur van Hoff at the Turing Institute, and I used it to port SimCity to NeWS on Unix [2]. Arthur van Hoff (who developed HyperNeWS and other stuff like Java [3]) and I are working together again, this time at his 360° VR video camera company, JauntVR [4]! I'm developing a secret project called HyperJaunt, that I can't say anything about yet, but you can guess by t…

I worked in Edinburgh and visited the Turing Institute a few times - I did meet Arthur a few times though I think we mainly spoke to some other chap (Danny?).

When Arthur moved to work for Sun I remember begging a copy of Java from him early in '95.

Re: The Unix-Haters Handbook (1994) [pdf]

#225
post #207

Earlier quoted context omitted.

They were expensive. Sun workstations that cost five figures were cheap compared to LispMs. Their UI was powerful and efficient, but not easy to learn. They were designed by programmers for programmers. Their UI assumed that you were willing to invest nontrivial time and effort learning a broad palette of specialized tools. Their system design made some pretty different assumptions about how they were going to be use…

If you would have wanted a comparable Lisp experience on a SUN workstation (large bitmap screen, large disk, software, ...) the actual price difference wasn't that much. But there were a lot of underpowered and slow SUNS, which were cheaper. But then you would better not use Allegro CL, Lucid CL or LispWorks on those. 16 or even 24 MB RAM were simply not enough and GC was fighting with the virtual memory pager... The…

True, but the point is that there weren't any really cheap LispMs until it was too late to matter.

Besides which, a system that was so much designed for programmers was probably never going to command a very big market.

Re: The Unix-Haters Handbook (1994) [pdf]

#226
post #105

Earlier quoted context omitted.

Ha! I switched to Mac so I could have pipes, grep and bash. I personally believe a big reason for the Mac resurgence has to do with the switch to UNIX. I was on Windows using Cygwin for years before anyone I knew was using a Mac. Then OSX came out, and all of a sudden all the academics I knew switched to Mac, and a couple years later most of the professional programmers I knew had switched. The great thing about a Ma…

Have you tried the Windows Subsystem for Linux?

Not OP, but I'm genuinely interested in how this experience is. What do you think of it compared to using, say, iTerm2 on OSX? I've been thinking of switching back to a Windows PC since I haven't been very impressed by OSX in the last couple of years.

Re: The Unix-Haters Handbook (1994) [pdf]

#227
post #200

I like to cover myself with some crazy question and think about them. For example, what would look like the thing that would make people go "oh this looks good enough to replace UNIX". Don't get me wrong, I am big fan of UNIX, but I hope I will be alive around the time(but I doubt that) when we will see some new thing which will make UNIX feel dated. Now, some of you might jump and say "Oh, but UNIX already feels dat…

I wish someone would try to reimplement Symbolics Genera under an open source license and make it run on modern hardware properly, without VLM. Its design and philosophy is quite different from Unix derivatives, being so object-oriented in the right parts and extensible on the source code level. The user interface was very reminiscent of the notebook interface in Mathematica - output in the listener wasn't plain text…

The Genera terminal, or "listener" was a real eye opener for me the first time I used it. It can display rich text and images, has mouseable elements like buttons and editable forms, and has a powerful incremental online help system. It's almost like a kind of scrolling desktop.

The thing I really liked was that the console output was independent of the input line. You can start typing in a command, hit and have the (rich, hypertext) documentation appear in the console above where you are typing in. You don't have to delete everything and type man foo like in Unix, only to have the man page disappear when you quit.

Simply in terms of usability the Genera listener craps on any Unix or Windows terminal I have used.

Re: The Unix-Haters Handbook (1994) [pdf]

#228
post #202
post #181

Earlier quoted context omitted.

Plan 9 did it in an interesting way. You draw to the screen by writing to files under /dev. On Plan 9, all file operations take place over 9P, a networked file protocol. So if you are connecting to a remote machine and want to run a graphical program, you mount your local /dev/draw files on the remote end (this is actually taken care of automatically by cpu(1)) and just run the program. Its graphical functions access…

How was it efficient?

I don't have numbers but in general I'd call it no less usable than X forwarding over ssh. For a long time I used to connect to a Japanese Plan 9 server using drawterm (a Windows/Linux application which essentially emulates the /dev/draw infrastructure) and it was pretty decent considering the latency--I used it to read email, follow IRC, and write code. Over a LAN, it's so fast as to be indistinguishable from something running on your local machine.

Re: The Unix-Haters Handbook (1994) [pdf]

#229
post #181
post #6

Earlier quoted context omitted.

Yeah but try and figure out how you'd do better... efficient.ly. Over the network...

Plan 9 did it in an interesting way. You draw to the screen by writing to files under /dev. On Plan 9, all file operations take place over 9P, a networked file protocol. So if you are connecting to a remote machine and want to run a graphical program, you mount your local /dev/draw files on the remote end (this is actually taken care of automatically by cpu(1)) and just run the program. Its graphical functions access…

Plan 9's "everything is a file" philosophy never worked for me, because it's far too low level, and I don't believe Unix's file I/O API itself is very pleasant: open, read, write, ioctl and select (gag).

I'd much rather have a real API with rich app-specific functional or event interfaces to call, and to be able to pass actual typed parameters instead just a stream of bytes, including structured data like json, s-expressions or PostScript data, or even (gasp) Turing complete programs, like PostScript code!

NeFS, as defined in 1990 in the infamous NFS3 proposal aka "Network extensible File System Protocol Specification" did just that, and it was actually a great idea too early for its time. So it went over like a lead balloon, and was never actually adopted.

NeFS should not have been framed as a successor to NFS, because it required a revolution in how programs interacted with the file system. And of course there are the security and stability implications of running downloaded code in the kernel, which hadn't been properly addressed. ;)

Take for example (shown below) the act of copying a file to a backup file in the same directory.

With traditional NFS, the server would have to send each block of the file to the client, which would then send it back to the server, which would then write it to disk. That required a lot of network traffic, as well as many context switches between user and kernel space on both the client and the server (at a time in history where they were extremely expensive).

Instead, the client could just send a simple PostScript program to the server (or call one that was loaded from a library or sent previously -- see the example below), which copied the file in the kernel of the server, without sending it over the network, or requiring any context switches on either the client or server.

That's several orders of magnitude more efficient in terms of both CPU and network usage, and just the simplest and easiest to explain example possible of what you could do.

Just imagine how much more efficient, powerful and tightly integrated together other utilities like "find" and "grep" could be, tightly woven together procedurally in the kernel instead of communicating with a stream of bytes over a pipe!

http://www.donhopkins.com/home/nfs3_0.pdf

Introduction

The Network Extensible File System protocol(NeFS) provides transparent remote access to shared file systems over networks. The NeFS protocol is designed to be machine, operating system, network architecture, and transport protocol independent. This document is the draft specification for the protocol. It will remain in draft form during a period of public review. Italicized comments in the document are intended to present the rationale behind elements of the design and to raise questions where there are doubts. Comments and suggestions on this draft specification are most welcome.

1.1 The Network File System

The Network File System (NFS™*) has become a de facto standard distributed file system. Since it was first made generally available in 1985 it has been licensed by more than 120 companies. If the NFS protocol has been so successful why does there need to be NeFS ? Because the NFS protocol has deficiencies and limitations that become more apparent and troublesome as it grows older.

1. Size limitations. The NFS version 2 protocol limits filehandles to 32 bytes, file sizes to the magnitude of a signed 32 bit integer, timestamp accuracy to 1 second. These and other limits need to be extended to cope with current and future demands.

2. Non-idempotent procedures. A significant number of the NFS procedures are not idempotent. In certain circumstances these procedures can fail unexpectedly if retried by the client. It is not always clear how the client should recover from such a failure.

3. Unix®† bias. The NFS protocol was designed and first implemented in a Unix environment. This bias is reflected in the protocol: there is no support for record-oriented files, file versions or non-Unix file attributes. This bias must be removed if NFS is to be truly machine and operating system independent.

4. No access procedure. Numerous security problems and program anomalies are attributable to the fact that clients have no facility to ask a server whether they have permission to carry out certain operations.

5. No facility to support atomic filesystem operations. For instance the POSIX O_EXCL flag makes a requirement for exclusive file creation. This cannot be guaranteed to work via the NFS protocol without the support of an auxiliary locking service. Similarly there is no way for a client to guarantee that data written to a file is appended to the current end of the file.

6. Performance. The NFS version 2 protocol provides a fixed set of operations between client and server. While a degree of client caching can significantly reduce the amount of client-server interaction, a level of interaction is required just to maintain cache consistency and there yet remain many examples of high client-server interaction that cannot be reduced by caching. The problem becomes more acute when a client’s set of filesystem operations does not map cleanly into the set of NFS procedures.

1.2 The Network Extensible File System

NeFS addresses the problems just described. Although a draft specification for a revised version of the NFS protocol has addressed many of the deficiencies of NFS version 2, it has not made non-Unix implementations easier, not does it provide opportunities for performance improvements. Indeed, the extra complexity introduced by modifications to the NFS protocol makes all implementations more difficult. A revised NFS protocol does not appear to be an attractive alternative to the existing protocol.

Although it has features in common with NFS, NeFS is a radical departure from NFS. The NFS protocol is built according to a Remote Procedure Call model (RPC) where filesystem operations are mapped across the network as remote procedure calls. The NeFS protocol abandons this model in favor of an interpretive model in which the filesystem operations become operators in an interpreted language. Clients send their requests to the server as programs to be interpreted. Execution of the request by the server’s interpreter results in the filesystem operations being invoked and results returned to the client. Using the interpretive model, filesystem operations can be defined more simply. Clients can build arbitrarily complex requests from these simple operations.

[...]

Example: Copy a File

Make a copy of file (foo) called (bar). Both files exist in the same directory dfh. The request starts by looking up the filehandle for the file to be copied and creates a filehandle for the copy. The loop operator executes a procedure that copies the file using 1K reads and writes. It maintains a running count of the number of bytes yet to be copied.

    % Copy a file
    %
    dfh (foo) lookup /foofh exch def % get filehandle for (foo)
    dfh (bar) create /barfh exch def % create filehandle for (bar)
    /bytes foofh getattr /fsize get def % get size of (foo) so we know how much to copy
    /offset 0 def % initialize offset for (bar)
    {
        /data foofh offset 1024 read def % read up to 1K from (foo)
        barfh offset data write % write up to 1K to (bar)
        /bytes bytes 1024 sub def % decrement byte count by 1024
        bytes 0 le { exit } if % if it’s 

Re: The Unix-Haters Handbook (1994) [pdf]

#230
post #80

Earlier quoted context omitted.

This book was written long before Mac OS X.

I thought OSX was a weird Mach/BSD amalgam. In which case, not so much.

I don't follow. When the book was written it was System 7 days. That's about as far removed from UNIX as you can get. This book was also before Linux was really on the radar outside of enthusiasts. You'd get 386BSD on a CD-ROM, FreeBSD was just released by Walnut Creek. This book was mostly a response to the absolutely atrocious landscape of commercial UNIX... the catalyst for Windows NT tremendous success.
Post reply on HN