[TUHS] Etymology of bc(1)

Mark Longridge cubexyz at gmail.com
Fri Sep 12 12:35:23 AEST 2014


> There's likely even older versions than the V6 one, but that's the earliest
> source I have online on my PC for easy access.

There's nothing in the Unix v5 manual about bc and there's no code for
it either. If there's an older version I can't find it.

I have a version of Unix v6 that has a file called /usr/doc/bc that
describes bc at length and it mentions both Lorinda Cherry and Robert
Morris.

There's even a file called /usr/doc/bca which is titled "Appendix"
with even more info.

Bob's Calculator seems plausible enough.

Mark

On 9/11/14, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:
>     > From: Dave Horsfall <dave at horsfall.org>
>
>     > On the *nix systems to which I have access, bc(1) is a standalone
>     > program on FreeBSD and OSX, but pipes to dc(1) on OpenBSD. I cannot
>     > check my Penguin box (Ubuntu)
>
> Dude! Trying to answer questions about the origins of BC by looking at
> systems this late is like trying to learn Latin by studying Italian! :-)
>
> I looked at the Version 6 source, and it's a bunch of YACC code, but it
> pulls
> the same technique of using a pipe to an instance of DC, viz:
>
> 	pipe(p);
> 	if (fork()==0) {
> 		close(1);
> 		dup(p[1]);
> 		close(p[0]);
> 		close(p[1]);
> 		yyinit(argc, argv);
> 		yyparse();
> 		exit();
> 	}
> 	close(0);
> 	dup(p[0]);
> 	close(p[0]);
> 	close(p[1]);
> 	execl("/bin/dc", "dc", "-", 0);
>
> There's likely even older versions than the V6 one, but that's the earliest
> source I have online on my PC for easy access.
>
> 	Noel
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs
>



More information about the TUHS mailing list