>Date: Mon, 09 Jan 2017 08:45:47 -0700
>From: arnold(a)skeeve.com
>To: rochkind(a)basepath.com
>Cc: tuhs(a)tuhs.org
>Subject: Re: [TUHS] Unix stories, Stephen Bourne and IF-FI in C code
>Message-ID: <201701091545.v09FjlXE027448(a)freefriends.org>
>Content-Type: text/plain; charset=us-ascii
>
>I remember the Bournegol well; I did some hacking on the BSD shell.
>
>In general, it wasn't too unusual for people from Pascal backgrounds to
>do similar things, e.g.
>
> #define repeat do {
> #define until(cond) } while (! (cond))
>
>(I remember for me personally that do...while sure looked weird for.
>my first few years of C programming. :-)
>
>(Also, I would not recommend doing that; I'm just noting that
>people often did do stuff like that.)
When the Philips computer division worked on MPX (multi-processor
UNIX) in late 80tish they had an include file 'syntax.h' which did a
lot of that Pascal-like mapping.
Here part of it:
/* For a full explanation see the file syntax.help */
#define IF if(
#define THEN ){
#define ELSIF }else if(
#define ELSE }else{
#define ENDIF }
#define NOT !
#define AND &&
#define OR ||
#define CASE switch(
#define OF ){
#define ENDCASE break;}
#define WHEN break;case
#define CWHEN case
#define IMPL :
#define COR :case
#define BREAK break
#define WHENOTHERS break;default
#define CWHENOTHERS default
#define SELECT do{{
#define SWHEN }if(
#define SIMPL ){
#define ENDSELECT }}while(0)
#define SCOPE {
#define ENDSCOPE }
#define BLOCK {
#define ENDBLOCK }
#define FOREVER for(;;
#define FOR for(
#define SKIP
#define COND ;
#define STEP ;
#define LOOP ){
#define ENDLOOP }
#define NULLOOP ){}
#define WHILE while(
#define DO do{
#define UNTIL }while(!(
#define ENDDO ))
#define EXITWHEN(e) if(e)break
#define CONTINUE continue
#define RETURN return
#define GOTO goto
I was in building 5 at Sun when they were switching to SVr4 which became
Solaris 2.0 (I think). Building 5 housed the kernel people at Sun.
John Pope was the poor bastard who got stuck with doing the bring up.
Everyone hated him for doing it, we all wanted it to fail.
I was busting my ass on something in SunOS 4.x and I was there late into
the night, frequently to around midnight or beyond. So was John.
We became close friends. We both moved to San Francisco and ended up
commuting to Mountain View together (and hit the bars together).
John was just at my place, here's a few pictures for those who might
be interested. He's a great guy, got stuck with a shitty job.
http://www.mcvoy.com/lm/2016-pope/
--lm
> On Jan 9, 2017, at 6:00 PM,"Steve Johnson" <scj(a)yaccman.com> wrote:
>
> I can certainly confirm that Steve Bourne not only knew Algol 68, he
> was quite an evangelist for it.
Bourne had led the Algol68C development team at Cambridge until 1975. See http://www.softwarepreservation.org/projects/ALGOL/algol68impl/#Algol68C .
> if-fi and case-esac notation from Algol came to shell [via Steve Bourne]
There was some pushback which resulted in the strange compromise
of if-fi, case-esac, do-done. Alas, the details have slipped from
memory. Help, scj?
doug
All, I'm not sure if you know of Walter Müller's work at implementing
a PDP-11 on FPGAs: https://wfjm.github.io/home/w11/. He sent me this e-mail
with an excellent source code cross-reference of the 2.11BSD kernel:
P.S.: long time ago I wrote a source code viewer for 2.11BSD and OS with
a similar file and directory layout. I made a few tune-ups lately
and wrote some sort of introduction, see
https://wfjm.github.io/home/ouxr/
Might be helpful for you in case you inspect 2.11BSD source code.
Cheers all, Warren
I was amused this morning to see a post on the tack-devel(a)lists.sourceforge.net
mailing list (TACK = The Amsterdam Compiler Kit) today from David Given,
who writes:
>> ...
>> ... I took some time off from thinking about register allocation (ugh)
>> and ported the ABC B compiler to the ACK. It's now integrated into the
>> system and everything.
>>
>> B is Ken Thompson and Dennis Ritchie's untyped programming language
>> which later acquired types and turned into K&R C. Everything's a machine
>> word, and pointers are *word* address, not byte addresses.
>>
>> The port's a bit clunky and doesn't generate good code, but it works and
>> it passes its own tests. It runs on all supported backends. There's not
>> much standard library, though.
>>
>> Example:
>>
>> https://github.com/davidgiven/ack/blob/default/examples/hilo.b
>>
>> (Also, in the process it found lots of bugs in the PowerPC mcg backend,
>> now fixed, as well as several subtle bugs in the PowerPC ncg backend; so
>> that's good. I'm pretty sure that this is the only B compiler for the
>> PowerPC in existence.)
>> ...
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
> Date: Fri, 6 Jan 2017 20:09:18 -0700
> From: Warner Losh <imp(a)bsdimp.com>
> To: "Greg 'groggy' Lehey" <grog(a)lemis.com>
> Cc: Clem Cole <clemc(a)ccc.com>, The Eunuchs Hysterical Society
> <tuhs(a)tuhs.org>
> Subject: Re: [TUHS] SunOS vs Linux
>
>> On Friday, 6 January 2017 at 9:27:36 -0500, Clem Cole wrote:
>>
>> I think that if SunOS 4 had been released to the world at the right
>> time, the free BSDs wouldn't have happened in the way they did either;
>> they would have evolved intimately coupled with SunOS.
>
> With the right license (BSD), I'd go so far as to saying there'd be no
> BSD 4.4, or if there was, it would have been rebased from the SunOS
> base... There were discussions between CSRG and Sun about Sun donating
> it's reworked VM and VFS to Berkeley to replace the Mach VM that was
> in there... Don't know the scope of these talks, or if they included
> any of the dozens of other areas that Sun improved from its BSD 4.3
> base... The talks fell apart over the value of the code, if the rumors
> I've heard are correct.
>
> Warner
Since I was involved with the negotiations with Sun, I can speak
directly to this discussion. The 4.2BSD VM was based on the
implementation done by Ozalp Babaoglu that was incorporated into
the BSD kernel by Bill Joy. It was very VAX centric and was not
able to handle shared read-write mappings.
Before Bill Joy left Berkeley for Sun, he wrote up the API
specification for the mmap interface but did not finish an
implementation. At Sun, he was very involved in the implementation
though did not write much (if any) of the code for the SunOS VM.
The original plan was to ship 4.2BSD with an mmap implementation,
but with Bill's departure that did not happen. So, it fell to me
to sort out how to get it into 4.3BSD. CSRG did not have the
resources to do it from scratch (there were only three of us).
So, I researched existing implementations and it came down to
the SunOS and MACH implementations. The obvious choice was SunOS,
so I approached Sun about contributing their implementation to
Berkeley. We had had a lot of cooperation about exchanging bug
fixes, so this is not as crazy as it seems.
The Sun engineers were all for it, and convinced their managers
to push my request up the hierarchy. Skipping over lots of drama
it eventually got to Scott McNealy who was dubious, but eventually
bought into the idea and cleared it. At that point it went to the
Sun lawyers to draw up the paperwork. The lawyers came back and
said that "giving away SunOS technology could lead to a stockholder
lawsuit concerning the giving away of stockhoder assets." End of
discussion. We had to go with MACH.
Kirk McKusick
​This is a history list and I'm going to try to answer this to give some
historical context and hopefully end this otherwise a thread that I'm not
sure adds to the history of UNIX much one way of the other. Some people
love GPL, some do not.​ I'll gladly take some of this off list. But I
would like to see us not devolve TUHS into my favorite license or favorite
unix discussion.
On Thu, Jan 5, 2017 at 9:09 PM, Larry McVoy <lm(a)mcvoy.com> wrote:
> That makes sense to me, the GPL was hated inside of Sun, it was considered
> ​ ​
> a virus. The idea that you used a tiny bit of GPLed code and then
> everything
> ​ ​
> else is GPLed was viewed as highway robbery.
>
​I'm not lawyer, nor play one. I am speaking for myself not Intel here so
take what I have to say with that in mind. Note I do teach the required
"GPL and Copyright Course"​ of all Intel SW folks so I have had some
training and I do have some opinions. I also have lived this for 5 start
up, and a number of large firms both inside and as the a consultant.
Basically, history has shown that they both viral an non-viral licenses
have their place. Before I worked Intel I admit I was pretty much
negative on the GPL "virus" and I >>mostly<< still am. IMHO, it's done
more damage than it has helped and the CMU/MIT/BSD style "Dead Fish"
license has done for more positive *for the industry @ large *than the GPL
in the long run. But I admit, I'm a capitalist and I see the value in
letting some one make some profit for their work. All I have seen the
virus do in the long run is that firms have lawyers to figure out how to
deal with it.
There is a lot of miss information about the term "open source" .... open
source does not mean "free" as in beer. It means available and "open" to
be read and modified. Unix has >>always<< be open and available - which
is why their are so many versions of Unix (and Linux). The question was
the *price* of the license and who had it. Most hacker actually did have
access as this list shows -- we had from our universities for little money
or our employees for much more. GPL and the virus it has, does not protect
any one from this diversity. In fact, in some ways it makes it harder.
The diversity comes from the market place. The problem is that in the
computer business, the diversity can be bad and keeping things "my way" is
better for the owner of the gold (be it a firm like IBM, DEC, or Microsoft)
or a technology like Linux.
What GPL is >>supposed<< to do it ensure that secrets are not locked up and
ensure that all can see and share in the ideas. This is a great idea in
theory, the risk is that if you have IP that you want to some how protect,
as Larry suggests, the virus can put your IP in danger. To the credit of
firms like Intel, GE, IBM et al, they have learned how to try to firewall
their >>important<< IP with processes and procedures to protect it (which
is exactly what rms did not want to have happen BTW). [In my experience,
it made the locks even tighter than before], although it has made some
things more available. I now this rankles some folks. There are
positives and negatives to each way of doing things.
IMO, history has shown that it has been the economics of >>Clay
Christiansen style disruption<<, not a license that changed things in our
industry. When the price of UNIX of any version (Linux, *BSD, SunOS,
MInux, etc...) and the low cost HW came to be and the "enough" hackers did
something. Different legal events pushed one version ahead of others, and
things had to be technology "good enough" -- but it was economics not
license that made the difference. License played into the economics for
sure, but in the end, it was free (as in beer) vs $s that made it all work.
Having lived through they completely open, completely closed, GPLed and
dead-fish world of the computer industry, I'm not sure if we are really any
farther ahead in practice. We just have to be careful and more lawyers
make more money - by that's my being a cynic.
Anyway, I hope we can keep from devolving from really history.
Clem