Bc (programming language): Difference between revisions

Content deleted Content added
Add information about a fourth implementation of bc: an independent implementation by Gavin Howard which is included in Android, FreeBSD, and macOS.
Line 25:
bc first appeared in [[Version 6 Unix]] in 1975. It was written by [[Lorinda Cherry]] of [[Bell Labs]] as a front end to [[dc (computer program)|dc]], an arbitrary-precision calculator written by [[Robert Morris (cryptographer)|Robert Morris]] and Cherry. dc performed arbitrary-precision computations specified in [[reverse Polish notation]]. bc provided a conventional programming-language interface to the same capability via a simple [[compiler]] (a single [[yacc]] source file comprising a few hundred lines of code), which converted a [[C (programming language)|C]]-like syntax into dc notation and [[Pipeline (Unix)|piped]] the results through dc.
 
In 1991, [[POSIX]] rigorously defined and standardized bc. ThreeFour implementations of this standard survive today: The first is the traditional Unix implementation, a front-end to dc, which survives in Unix and [[Plan 9 from Bell Labs|Plan 9]] systems. The second is the [[free software]] [[GNU]] bc, first released in 1991 by Philip A. Nelson. The GNU implementation has numerous extensions beyond the POSIX standard and is no longer a front-end to dc (it is a [[bytecode interpreter]]). The third is a re-implementation by [[OpenBSD]] in 2003. The fourth is an independent implementation by Gavin Howard<ref name=":1">[https://git.gavinhoward.com/gavin/bc An implementation of Unix dc and POSIX bc with GNU and BSD extensions]</ref> that is included in [[Android (operating system)]]<ref name=":2">https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md</ref><ref name=":3">https://android.googlesource.com/platform/external/bc/</ref>, [[FreeBSD]] as of 13.3-RELEASE<ref name=":4">https://forums.freebsd.org/threads/freebsd-13-3-whats-new-and-how-did-we-get-here.92596/</ref><ref name=":5">https://man.freebsd.org/cgi/man.cgi?query=bc&apropos=0&sektion=1&manpath=FreeBSD+14.1-RELEASE&arch=default&format=html</ref><ref name=":6">https://cgit.freebsd.org/src/tree/contrib/bc</ref>, and [[macOS]] as of 13.0<ref name=":7">https://opensource.apple.com/releases/</ref><ref name=":8">https://github.com/apple-oss-distributions/bc/tree/main/bc</ref><ref name=":9">https://gavinhoward.com/2023/02/my-code-conquered-another-os/</ref>.
 
==Implementations==