[conspire] vi (was: Re: Technical Interview Performance by Editor/OS/Language - Triplebyte Blog)

Rick Moen rick at linuxmafia.com
Mon Mar 11 14:48:02 PDT 2019


Quoting Michael Paoli (Michael.Paoli at cal.berkeley.edu):

> 7th Edition, circa 1979 was the first Unix I used (I first used it
> in 1980).
> 
> >I believe the code to Bills original vi was ALWAYS opensource as it was
> >developed on the university machines,
> 
> Not quite.  The portions Bill Joy contributed, copyright University
> of California --> BSD, etc.
> However classic vi contains some ed source code, which was copyright
> Bell Labs, etc.  So only after that was eventually finally open
> sourced, did classic vi finally become fully open source - and that wasn't
> all that horribly long ago (long after vim and [n]vi and many other
> vi "clones").

For those who are determined to run Bill Joy's primordial vi and ex
code, for antiquarian or any other reasons, source code is available
here:  http://ex-vi.sourceforge.net/

As the notice on the index page says, the code was finally liberated by
Caldera International (during the sequence of events that turned that
firm into the newer itertion of 'SCO').  Quoting the announcement:

  January 23, 2002

  Dear UNIX enthusiasts,

  Caldera International, Inc. hereby grants a fee free license that
  includes the rights use, modify and distribute this named source code,
  including creating derived binary products created from the source code.
  The source code for which Caldera International, Inc. grants rights are
  limited to the following UNIX Operating Systems that operate on the
  16-Bit PDP-11 CPU and early versions of the 32-Bit UNIX Operating
  System, with specific exclusion of UNIX System III and UNIX System V and
  successor operating systems:

  32-bit 32V UNIX
  16 bit UNIX Versions 1, 2, 3, 4, 5, 6, 7

The licence was a BSD variant with noxious advertising clause.

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met:

  Redistributions of source code and documentation must retain the above
  copyright notice, this list of conditions and the following disclaimer.
  Redistributions in binary form must reproduce the above copyright
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

  All advertising materials mentioning features or use of this software
  must display the following acknowledgement: This product includes
  software developed or owned by Caldera International, Inc.

  Neither the name of Caldera International, Inc. nor the names of other
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

  USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA
  INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR
  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR
  ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGE.

https://www.tuhs.org/Archive/Caldera-license.pdf

Caldera's full initial 2002 code dump, with some updates, as hosted by
the Unix Heritage Society (tuhs.org), is here:  
https://www.tuhs.org/Archive/



Why run traditional vi (1976)?  Dunno, people have their reasons, or
maybe they just want to for no particular reason, or to have a vi even
tinier than Keith Bostic's nvi (released as part of 4BSD in 1980, 
https://www.oreilly.com/openbook/opensources/book/kirkmck.html ).

Personally, I think Bostic improved on Bill Joy's original, but OTOH I'm
one of those vim heretics, so what would I know?  ;->



On another personal note, when I first encountered vi during summer
sessions at Evans Hall, UCB in the 1970s and 1980s, I bounced off it
hard for all the usual reasons of user-hostileness.  I remember buying
at the bookstore near the Bear's Lair a vi tutorial printout I thought a
bit opaque at the time, and it might have been this one by Bill Joy:
http://ex-vi.sourceforge.net/viin/paper.html
Tips for building it on Debian:
http://forums.debian.net/viewtopic.php?t=130599

With some determination, I was able to get by in vi on ADM3 terminals
(IIRC) connected to Evans Hall's BSD-equipped VAXen, but barely, and I
pretty much hated the editor.  Finally, at the end of the 1980s, I ended
up running Unixes on my own machines and finally learned the thing
properly, at which point the hatred went away.  This would have happened
sooner if someone had said 'If you're new to vi, when in doubt hit the
Esc key, just to make sure you are in a known mode.'

vim's default of always displaying your program mode in the lower left
is a godsend in this department, IMO.


Suggestion for Michael especially, in the vein of 'Go big or go home': 

# apt-get install simh
# mkdir /usr/local/wayback
# chown rick:rick /usr/local/wayback  #Change if you're unlucky and thus not rick.
# cd /usr/local/src
# wget http://simh.trailing-edge.com/kits/uv7swre.zip
# exit
$ cd /usr/local/wayback
$ unzip -d uv7 ../src/uv7swre.zip
$ php11

PDP-11 simulator V3.8-1
sim> set cpu 11/45
sim> set tto 7b
sim> att unix_v7_rl.dsk
boot rl
@boot
New Boot, known devices are hp ht rk rl rp tm vt 
: rl(0,0)rl2unix
mem = 177856
#
mkdir /tmp
chmod 777 /tmp
mkdir /usr/dmr
chown dmr /usr/dmr
chgrp 3 /usr/dmr
^D

Now login (as dmr, no password necessary) to your emulated PDP11 running
Unix V7.  

Welcome to 1979.  Don't forget your bellbottoms.  Stay away from Iran,
Afghanistan, Thatcher's Britain, Northern Ireland in particular, Uganda,
Nicaragua, and Three Mile Island.  For extra credit, try just-released
VisiCalc.


Bonus humour link (in which I see myself):
https://www.reddit.com/r/linux/comments/8udel5/what_is_a_deadgiveaway_that_someone_is_an/






More information about the conspire mailing list