The Unix Heritage Society mailing list
 help / Atom feed
* [TUHS] /usr/bin/bs on HPUX?
@ 2008-12-10  0:30 lorddoomicus
  2008-12-10  9:45 ` tfb
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: lorddoomicus @ 2008-12-10  0:30 UTC (permalink / raw)


I was poking around an HP UX system at work today, and noticed a  
command I've never noticed before ... /usr/bin/bs.

I'm sure it's been there for a long time, even though I've been an  
HPUX admin for more than a decade, sometimes I'm just blind ... but  
anyway ....

I tried to search on google ... it looks like only HPUX, AIX, and  
Maybe AU/X has it.  Seems to be some kind of pseudo BASIC like  
interpreter.

Anyone ever use it for anything?  Has anyone even noticed it before?   
I'll have to boot my Crimson to see if IRIX has it.

- Derrik

Derrik Walker v2.0, RHCE
lorddoomicus at mac.com
http://www.doomd.net

"There's nothing nice about Steve Jobs and there's nothing evil about  
Bill Gates."
	-- Chuck Peddle, MOS 6502 Chip Designer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20081209/889366ac/attachment.html>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-10  0:30 [TUHS] /usr/bin/bs on HPUX? lorddoomicus
@ 2008-12-10  9:45 ` tfb
  2008-12-10 14:29 ` neozeed
  2008-12-10 18:08 ` cowan
  2 siblings, 0 replies; 11+ messages in thread
From: tfb @ 2008-12-10  9:45 UTC (permalink / raw)


On 10 Dec 2008, at 00:30, Lord Doomicus wrote:
>
> Anyone ever use it for anything?  Has anyone even noticed it  
> before?  I'll have to boot my Crimson to see if IRIX has it.
I remember a bs command (which was some kind of mini-BASIC) in the   
4.2BSD machine I first used.  However it may have been added by the  
vendor rather than have been in 4.2BSD proper.

I used it at the time, and have occasionally missed it since - nothing  
I now use regularly  (OSX and Solaris) seems to have it.

--tim



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-10  0:30 [TUHS] /usr/bin/bs on HPUX? lorddoomicus
  2008-12-10  9:45 ` tfb
@ 2008-12-10 14:29 ` neozeed
  2008-12-10 18:08 ` cowan
  2 siblings, 0 replies; 11+ messages in thread
From: neozeed @ 2008-12-10 14:29 UTC (permalink / raw)


I just fired up my copy of 4.2 on simh....

4.2 BSD UNIX (myname)
login: root
Last login: Thu Sep  8 19:45:39 on console
4.2 BSD UNIX #3: Thu Sep 8 08:46:54 PDT 1983
Would you like to play a game?
You have mail.
Don't login as root, use su
myname# cd /bin
myname# ls bs
bs not found
myname# which bs
no bs in /etc /usr/ucb /bin /usr/bin /usr/local /usr/hosts .
myname# man bs
No manual entry for bs.
myname#

Sorry that wasn't much help.....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20081210/77411812/attachment.html>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-10  0:30 [TUHS] /usr/bin/bs on HPUX? lorddoomicus
  2008-12-10  9:45 ` tfb
  2008-12-10 14:29 ` neozeed
@ 2008-12-10 18:08 ` cowan
  2009-01-09 10:51   ` vasco
       [not found]   ` <20190909001945.GA2815@akamai.com>
  2 siblings, 2 replies; 11+ messages in thread
From: cowan @ 2008-12-10 18:08 UTC (permalink / raw)


Lord Doomicus scripsit:

> I was poking around an HP UX system at work today, and noticed a  
> command I've never noticed before ... /usr/bin/bs.
> 
> I'm sure it's been there for a long time, even though I've been an  
> HPUX admin for more than a decade, sometimes I'm just blind ... but  
> anyway ....
> 
> I tried to search on google ... it looks like only HPUX, AIX, and  
> Maybe AU/X has it.  Seems to be some kind of pseudo BASIC like  
> interpreter.

That's just what it is.  Here are the things I now know about it.

0.  The string "bs" gets an awful lot of false Google hits, no matter
how hard you try.

1.  "bs" was written at AT&T, probably at the Labs, at some time between
the release of 32V and System III.  It was part of both System III and
at least some System V releases.

2.  It was probably meant as a replacement for "bas", which was a more
conventional GW-Basic-style interpreter written in PDP-11 assembly
language.  (32V still had the PDP-11 source, which of course didn't work.)

3.  At one time System III source code was available on the net,
including bs.c and bs.1, but apparently it no longer is.  I downloaded
it then but don't have it any more.

4.  I was able to compile it under several Unixes, but it wouldn't run:
I think there must have been some kind of dependency on memory layout,
but never found out exactly what.

5. I remember from the man page that it had regular expressions, and
two commands "compile" and "execute" that switched modes to storing
expressions and executing them on the spot, respectively.  That eliminated
the need for line numbers.

6. It was apparently never part of Solaris.

7. It was never part of any BSD release, on which "bs" was the battleships
game.

8. I can't find the man page on line anywhere either.

9. The man page said it had some Snobol features.  I think that meant
the ability to return failure -- I vaguely remember an "freturn" command.

10.  99 Bottles of Beer has a sample bs program at
http://www2.99-bottles-of-beer.net/language-bs-103.html .

11. If someone sends me a man page, I'll consider reimplementing it as
Open Source.

-- 
We are lost, lost.  No name, no business, no Precious, nothing.  Only empty.
Only hungry: yes, we are hungry.  A few little fishes, nassty bony little
fishes, for a poor creature, and they say death.  So wise they are; so just,
so very just.  --Gollum        cowan at ccil.org  http://ccil.org/~cowan



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS]  /usr/bin/bs on HPUX?
@ 2008-12-17 14:27 jrvalverde
  2008-12-17 15:39 ` cowan
  0 siblings, 1 reply; 11+ messages in thread
From: jrvalverde @ 2008-12-17 14:27 UTC (permalink / raw)


Bit of digging:

> 1.  "bs" was written at AT&T, probably at the Labs, at some time between
> the release of 32V and System III.  It was part of both System III and
> at least some System V releases.

And of course it is in TUHS! Remember we have 32V and SIII. For example,
look into 

	TUHS/Other/Distributions/Plexis_Sys3/
or
	TUHS/PDP-11/Distributions/usdl/SysIII/

The sources contain 'bs' under cmd/bs

The latter one (under USDL) contains also the man page under usr/src/man/man1
(as 'bs.1').

So, there. You have it.

This leads me to consider we would greatly benefit from an expanded and
indexed TUHS repository tree. I made one on my mirror long ago, but a
series of disk crashes ended with it. Maybe, if there is interest I
could do it again.

				
			    j
-- 
			EMBnet/CNB
		Scientific Computing Service
	Solving all your computer needs for Scientific
			Research.

		http://bioportal.cnb.csic.es
		  http://www.es.embnet.org



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-17 14:27 [TUHS] /usr/bin/bs on HPUX? jrvalverde
@ 2008-12-17 15:39 ` cowan
  2008-12-17 16:14   ` lyricalnanoha
  0 siblings, 1 reply; 11+ messages in thread
From: cowan @ 2008-12-17 15:39 UTC (permalink / raw)


Jose R. Valverde scripsit:

> And of course it is in TUHS! Remember we have 32V and SIII. For example,
> look into 
> 
> 	TUHS/Other/Distributions/Plexis_Sys3/
> or
> 	TUHS/PDP-11/Distributions/usdl/SysIII/

As I pointed out in my previous post, both of these directories have
been removed from minnie, presumably because there is doubt about
the licensing status of System III.  Among the listed mirrors
at http://minnie.tuhs.org/TUHS/archive_sites.html , at least
unix-archive.pdp11.org.ru still has copies.

-- 
Go, and never darken my towels again!           John Cowan
        --Rufus T. Firefly                      http://ccil.org/~cowan



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-17 15:39 ` cowan
@ 2008-12-17 16:14   ` lyricalnanoha
  2008-12-17 16:35     ` cowan
  0 siblings, 1 reply; 11+ messages in thread
From: lyricalnanoha @ 2008-12-17 16:14 UTC (permalink / raw)


On Wed, 17 Dec 2008, John Cowan wrote:

> Jose R. Valverde scripsit:
>
>> And of course it is in TUHS! Remember we have 32V and SIII. For example,
>> look into
>>
>> 	TUHS/Other/Distributions/Plexis_Sys3/
>> or
>> 	TUHS/PDP-11/Distributions/usdl/SysIII/
>
> As I pointed out in my previous post, both of these directories have
> been removed from minnie, presumably because there is doubt about
> the licensing status of System III.  Among the listed mirrors
> at http://minnie.tuhs.org/TUHS/archive_sites.html , at least
> unix-archive.pdp11.org.ru still has copies.

Hm.  I had it already.

*grovels through the source*

it's using a very bizarre form of longjmp()... was that the normal syntax 
in sys3?  it's using a struct, instead of the two parameters glibc wants.

(yeah yeah, I know, EW GNU, but I just wanted to see what I was up 
against.  That's the only thing spitting errors but there's a ton of 
warnings.)

-uso.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-17 16:14   ` lyricalnanoha
@ 2008-12-17 16:35     ` cowan
  2008-12-17 23:55       ` lorddoomicus
  0 siblings, 1 reply; 11+ messages in thread
From: cowan @ 2008-12-17 16:35 UTC (permalink / raw)


lyricalnanoha scripsit:

> it's using a very bizarre form of longjmp()... was that the normal syntax 
> in sys3?  it's using a struct, instead of the two parameters glibc wants.

v7 wants two parameters too.  This was probably some attempt at cleanup that
didn't survive.

To fork a hacker nursery rhyme:

System III!  System III!
See how it runs!  See how it runs!
Its longjmp() loses so totally,
It runs all its programs in 'I & D',
It's made by our fav'rite monopoly,
System III!

-- 
"Well, I'm back."  --Sam        John Cowan <cowan at ccil.org>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-17 16:35     ` cowan
@ 2008-12-17 23:55       ` lorddoomicus
  0 siblings, 0 replies; 11+ messages in thread
From: lorddoomicus @ 2008-12-17 23:55 UTC (permalink / raw)



On Dec 17, 2008, at 11:35 AM, John Cowan wrote:

> lyricalnanoha scripsit:
>
>> it's using a very bizarre form of longjmp()... was that the normal  
>> syntax
>> in sys3?  it's using a struct, instead of the two parameters glibc  
>> wants.
>
> v7 wants two parameters too.  This was probably some attempt at  
> cleanup that
> didn't survive.
>
> To fork a hacker nursery rhyme:
>
> System III!  System III!
> See how it runs!  See how it runs!
> Its longjmp() loses so totally,
> It runs all its programs in 'I & D',
> It's made by our fav'rite monopoly,
> System III!


Yea, I got the same thing when I tried compile it under OS X.  I know  
HPUX has it, so I checked the man page for longjmp under HPUX, and  
like OS X, it takes two parameters.  So, someplace, there is a version  
of the bs source that has the correct longjmp system call.   But, it  
may only be in the HPUX source tree.  I should boot up one of my SGI's  
and have a look to see if it has bs, and what version of longjmp it  
uses.

- Derrik

Derrik Walker v2.0, RHCE
lorddoomicus at mac.com
http://www.doomd.net

"There's nothing nice about Steve Jobs and there's nothing evil about  
Bill Gates."
	-- Chuck Peddle, MOS 6502 Chip Designer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20081217/0fe17bbe/attachment.html>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] /usr/bin/bs on HPUX?
  2008-12-10 18:08 ` cowan
@ 2009-01-09 10:51   ` vasco
       [not found]   ` <20190909001945.GA2815@akamai.com>
  1 sibling, 0 replies; 11+ messages in thread
From: vasco @ 2009-01-09 10:51 UTC (permalink / raw)


John Cowan pisze:
> Lord Doomicus scripsit:
>
>   
>> I was poking around an HP UX system at work today, and noticed a  
>> command I've never noticed before ... /usr/bin/bs.
>>
>> I'm sure it's been there for a long time, even though I've been an  
>> HPUX admin for more than a decade, sometimes I'm just blind ... but  
>> anyway ....
>>
>> I tried to search on google ... it looks like only HPUX, AIX, and  
>> Maybe AU/X has it.  Seems to be some kind of pseudo BASIC like  
>> interpreter.
>>     
>
> That's just what it is.  Here are the things I now know about it.
>
> 0.  The string "bs" gets an awful lot of false Google hits, no matter
> how hard you try.
>
> 1.  "bs" was written at AT&T, probably at the Labs, at some time between
> the release of 32V and System III.  It was part of both System III and
> at least some System V releases.
>
> 2.  It was probably meant as a replacement for "bas", which was a more
> conventional GW-Basic-style interpreter written in PDP-11 assembly
> language.  (32V still had the PDP-11 source, which of course didn't work.)
>
> 3.  At one time System III source code was available on the net,
> including bs.c and bs.1, but apparently it no longer is.  I downloaded
> it then but don't have it any more.
>
> 4.  I was able to compile it under several Unixes, but it wouldn't run:
> I think there must have been some kind of dependency on memory layout,
> but never found out exactly what.
>
> 5. I remember from the man page that it had regular expressions, and
> two commands "compile" and "execute" that switched modes to storing
> expressions and executing them on the spot, respectively.  That eliminated
> the need for line numbers.
>
> 6. It was apparently never part of Solaris.
>
> 7. It was never part of any BSD release, on which "bs" was the battleships
> game.
>
> 8. I can't find the man page on line anywhere either.
>
> 9. The man page said it had some Snobol features.  I think that meant
> the ability to return failure -- I vaguely remember an "freturn" command.
>
> 10.  99 Bottles of Beer has a sample bs program at
> http://www2.99-bottles-of-beer.net/language-bs-103.html .
>
> 11. If someone sends me a man page, I'll consider reimplementing it as
> Open Source.
>
>   
You will find public domain basic interpreter in Coherent archive mwcbbs

at

lynx gopher://rachael.dyndns.org/1

It is for pdp11, vax, coherent , motorola etc.

Andrzej



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [TUHS] capturing history of bs(1) command / programming language
       [not found]   ` <20190909001945.GA2815@akamai.com>
@ 2019-09-30 19:29     ` Dave Plonka
  0 siblings, 0 replies; 11+ messages in thread
From: Dave Plonka @ 2019-09-30 19:29 UTC (permalink / raw)
  To: tuhs

Hi TUHS folks,

Earlier this month I did a fair bit of research on a little known Unix
programming language - bs - and updated the wikipedia pages
accordingly.

   https://en.wikipedia.org/wiki/Bs_(programming_language)

Thanks for solving some bs mysteries goes to its author, Dick Haight,
as well as those that got us in touch: Doug McIlroy, Brian Kernighan,
and John Mashey.

Apart from what is in the aforementioned wikipedia page, in exchanging
email with me, Dick shared:

q(
I wrote bs at the time Unix (V 3?) and all of the commands were being
converted from assembler to C. So Thompson’s bas became my bs — sort
of. I included snobol’s succeed/fail feature (? Operator/fail return).
[...]

No one asked me to write bs. [...] I tried to get Dennis Ritche to add
something like “? / fail” to C but he didn’t. This is probably part of
why I wrote bs. I wasn’t part of the Unix inner circle (BTL Computing
Research, e.g., Thompson, Ritchie, McIlroy, etc). Neither were Mashey
& Dolotta. We were “support”.
)

The Release 3.0 manual (1980) mentions bs prominently on page 9:

   Writing a program. To enter the text of a source program into a
UNIX file, use ed(1). The four principal languages available under
UNIX are C (see cc(1)), Fortran (see f77(1)), bs (a
compiler/interpreter in the spirit of Basic, see bs(1)), and assembly
language (see as(1)).

Personally, some reasons I find bs noteworthy is (a) it is not much
like BASIC (from today's perspective) and (b)  as mentioned in the
wikipedia page, "The bs language is a hybrid interpreter and compiler
and [an early] divergence in Unix programming" (from Research Unix
mentioning only the other three languages):

q(
The bs language was meant for convenient development and debugging of
small, modular programs. It has a collection of syntax and features
from prior, popular languages but it is internally compiled, unlike a
Shell script. As such, in purpose, design, and function, bs is a
largely unknown, modest predecessor of hybrid interpreted/compiled
languages such as Perl and Python.
)

It survives today in some System III-derived or System V-derived
commercial operating systems, including HP-UX and AIX.

If you have additional information that might be useful for the
wikipedia page, please do share it.

Peace,
Dave

P.S. Here is a 2008 TUHS list discussion, "Re: /usr/bin/bs on HPUX?":

On Wed, Dec 10, 2008 at 01:08:26PM -0500, John Cowan wrote:
> Lord Doomicus scripsit:
>
> > I was poking around an HP UX system at work today, and noticed a
> > command I've never noticed before ... /usr/bin/bs.
> >
> > I'm sure it's been there for a long time, even though I've been an
> > HPUX admin for more than a decade, sometimes I'm just blind ... but
> > anyway ....
> >
> > I tried to search on google ... it looks like only HPUX, AIX, and
> > Maybe AU/X has it.  Seems to be some kind of pseudo BASIC like
> > interpreter.
>
> That's just what it is.  Here are the things I now know about it.
>
> 0.  The string "bs" gets an awful lot of false Google hits, no matter
> how hard you try.
>
> 1.  "bs" was written at AT&T, probably at the Labs, at some time between
> the release of 32V and System III.  It was part of both System III and
> at least some System V releases.
>
> 2.  It was probably meant as a replacement for "bas", which was a more
> conventional GW-Basic-style interpreter written in PDP-11 assembly
> language.  (32V still had the PDP-11 source, which of course didn't work.)
>
> 3.  At one time System III source code was available on the net,
> including bs.c and bs.1, but apparently it no longer is.  I downloaded
> it then but don't have it any more.
>
> 4.  I was able to compile it under several Unixes, but it wouldn't run:
> I think there must have been some kind of dependency on memory layout,
> but never found out exactly what.
>
> 5. I remember from the man page that it had regular expressions, and
> two commands "compile" and "execute" that switched modes to storing
> expressions and executing them on the spot, respectively.  That eliminated
> the need for line numbers.
>
> 6. It was apparently never part of Solaris.
>
> 7. It was never part of any BSD release, on which "bs" was the battleships
> game.
>
> 8. I can't find the man page on line anywhere either.
>
> 9. The man page said it had some Snobol features.  I think that meant
> the ability to return failure -- I vaguely remember an "freturn" command.
>
> 10.  99 Bottles of Beer has a sample bs program at
> http://www2.99-bottles-of-beer.net/language-bs-103.html .
>
> 11. If someone sends me a man page, I'll consider reimplementing it as
> Open Source.
>
> --
> We are lost, lost.  No name, no business, no Precious, nothing.  Only empty.
> Only hungry: yes, we are hungry.  A few little fishes, nassty bony little
> fishes, for a poor creature, and they say death.  So wise they are; so just,
> so very just.  --Gollum        cowan at ccil.org  http://ccil.org/~cowan

-- 

dave@plonka.us  http://www.cs.wisc.edu/~plonka/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, back to index

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-10  0:30 [TUHS] /usr/bin/bs on HPUX? lorddoomicus
2008-12-10  9:45 ` tfb
2008-12-10 14:29 ` neozeed
2008-12-10 18:08 ` cowan
2009-01-09 10:51   ` vasco
     [not found]   ` <20190909001945.GA2815@akamai.com>
2019-09-30 19:29     ` [TUHS] capturing history of bs(1) command / programming language Dave Plonka
2008-12-17 14:27 [TUHS] /usr/bin/bs on HPUX? jrvalverde
2008-12-17 15:39 ` cowan
2008-12-17 16:14   ` lyricalnanoha
2008-12-17 16:35     ` cowan
2008-12-17 23:55       ` lorddoomicus

The Unix Heritage Society mailing list

Archives are clonable: git clone --mirror http://inbox.vuxu.org/tuhs

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.tuhs


AGPL code for this site: git clone https://public-inbox.org/ public-inbox