The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Dan Cross <crossd@gmail.com>
To: Larry McVoy <lm@mcvoy.com>
Cc: The Eunuchs Hysterical Society <tuhs@tuhs.org>
Subject: [TUHS] Re: interesting case of not getting the point: dc on a mac
Date: Mon, 23 Jan 2023 08:43:00 -0500	[thread overview]
Message-ID: <CAEoi9W6Ax6je6BuxBgAR2BX6u80WiVQo_Tk4k7ep7ednQHTMfQ@mail.gmail.com> (raw)
In-Reply-To: <20230123031111.GX12196@mcvoy.com>

On Sun, Jan 22, 2023 at 10:11 PM Larry McVoy <lm@mcvoy.com> wrote:
> On Mon, Jan 23, 2023 at 02:07:14PM +1100, Dave Horsfall wrote:
> > On Sun, 22 Jan 2023, Steve Nickolas wrote:
> >
> > > I think there was one particular dc clone...guy whose name started with
> > > a G? and his version did that.
> >
> > On my ancient MacBook Pro (13-inch, mid 2010, High Sierra 10.13.6):
> >
> >     mackie:~ dave$ dc
> >     (^D)
> >     mackie:~ dave$ dc -V
> >     dc (GNU bc 1.06) 1.3
> >
> > On my ancient FreeBSD server:
> >
> >     aneurin% dc
> >     (^D)
> >     aneurin% dc -V
> >     dc (BSD bc) 1.3-FreeBSD
> >
> > Nil prompt in both cases.
> >
> > > Most Linux versions use GNU's which Does The Right Thing???????.
>
> I know this is about dc (which I think is under bc or is it the other way
> around?)

The other way around. `bc` is a little interpreter that accepts infix
notation and has a fairly complete language built into it that
generates `dc` and delegates to that to do the actual mathematics.

> but to pick on GNU:
>
> slovax ~ 'bc'
> bc 1.06.95
> Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
> This is free software with ABSOLUTELY NO WARRANTY.
> For details type `warranty'.
> slovax ~ alias bc
> alias bc='bc -ql'
>
> because, well, the same reason I run vi in terse mode.

Agreed. The copyright banner every time I run `bc` is excruciating.

The `-l` argument came up not too long ago elsewhere; someone asked
why `bc -l` is not the default. For those that don't know, `bc -l`
loads a library of math functions (sine/cosine, arctan, and a couple
of transcendentals) and sets the scale to 20 decimal points. It's very
useful, but I suspect the reason this wasn't the default is that
loading that library cost RAM and real cycles on a PDP-11 and for most
simple uses that wasn't necessary.

        - Dan C.

  reply	other threads:[~2023-01-23 13:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-22 23:39 [TUHS] " ron minnich
2023-01-22 23:41 ` [TUHS] " ron minnich
2023-01-22 23:50   ` Warner Losh
2023-01-22 23:49 ` Steve Nickolas
2023-01-22 23:57   ` Joseph Holsten
2023-01-23  0:07     ` Steve Nickolas
2023-01-23  3:07   ` Dave Horsfall
2023-01-23  3:11     ` Larry McVoy
2023-01-23 13:43       ` Dan Cross [this message]
2023-01-23 13:59         ` ron minnich
2023-01-23  3:32     ` Steve Nickolas
2023-01-23  3:38       ` George Michaelson
2023-01-23  3:39         ` George Michaelson
2023-01-23  3:40           ` George Michaelson
2023-01-23 14:15             ` Dan Cross
2023-01-23 21:08               ` Joseph Holsten
2023-01-24  0:59                 ` Adam Thornton
2023-01-23  0:15 ` Bakul Shah
2023-01-23  0:20   ` ron minnich
2023-01-23  0:23     ` George Michaelson
2023-01-23  0:26     ` Joseph Holsten
2023-01-23  0:39     ` Bakul Shah
2023-01-23  1:32       ` Rob Pike

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEoi9W6Ax6je6BuxBgAR2BX6u80WiVQo_Tk4k7ep7ednQHTMfQ@mail.gmail.com \
    --to=crossd@gmail.com \
    --cc=lm@mcvoy.com \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).