unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Should Calc predefined units table include information units?
@ 2020-10-18 17:38 Mitchell Perilstein
  2020-10-18 20:28 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Mitchell Perilstein @ 2020-10-18 17:38 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2513 bytes --]

Summary

    Calc's predefined `math-standard-units` table does not include
information units: bits, bytes,
    data rates, and SI/IEC multiples thereof.  I argue that it should, and
offer to implement them.

Motivations

    a. The predefined Calc units table is mostly physical base units and
derivations. But in recent
    times, it's been widely suspected that information theory forms reality
and somehow underlies
    those base units.

    b. Information units are encountered often by many users in daily
practical use. It's curious
    that you can use Calc to compute Yottabarns per fathom but not the
kilobytes needed to write it
    to disk.

Package vs Predefined

    The first question should be, why not make a package defining info
units to
    `calc-additional-units` and put that on Elpa? We can, and if people
think this is a bad idea I
    will put out a package.  But I'm proposing this addition belongs in
Emacs as above.

Proposed Scope

    Again from a practical standpoint, the scope can be limited to common
computing use: it might
    be too far afield to implement the exotic information units such as
Erlangs.  So I'm proposing
    a practical subset:

    * lisp/calc/calc-units.el: add to `math-standard-units` table...
        - `bits` as base unit
        - bytes `B` as derived unit.  Note Barns exists as `b` but this is
all consistent.
        - decimal derived byte units (SI), ie powers of 1000, with SI
prefixes
        - binary byte units (IEC), ie powers of 1024, with IEC prefixes
like kibi and mebi
        - bps rate unit, 1 bit/sec
        - Bps rate unit, 1 byte/sec
        - decimal derived rate units: kbps mbps gbps tbps pbps ebps zbps
ybps
        - binary derived rate units: kibps mibps gibps tibps pibps eibps
zibps yibps
    * doc/misc/calc.texi - add a paragraph in 11.3, Predefined Units,
explaining the predefined binary
      and decimal information units
    * test/lisp/calc/calc-tests.el
    * Changelog

    If the group thinks this is a good idea, I'll work on a patch as
above.  Thanks for reading.

References

    * https://www.iso.org/obp/ui/#iso:std:iec:80000:-13:ed-1:v1:en -
Unfortunately the IEC standard is paywalled
    *
https://en.wikipedia.org/wiki/Units_of_information#Units_derived_from_bit
    * https://en.wikipedia.org/wiki/Bit_rate

-- 
PGP key: 0xB869E17B71E9B43C
<http://hkps.pool.sks-keyservers.net/pks/lookup?op=vindex&fingerprint=on&search=0xB869E17B71E9B43C>
Fingerprint: 3DD7 A2E8 13E7 C09A 400A 152C B869 E17B 71E9 B43C

[-- Attachment #2: Type: text/html, Size: 3262 bytes --]

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

* Re: Should Calc predefined units table include information units?
  2020-10-18 17:38 Should Calc predefined units table include information units? Mitchell Perilstein
@ 2020-10-18 20:28 ` Stefan Monnier
  2020-10-19 14:02   ` Mitchell Perilstein
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2020-10-18 20:28 UTC (permalink / raw)
  To: Mitchell Perilstein; +Cc: emacs-devel

>     The first question should be, why not make a package defining info
>     units to `calc-additional-units` and put that on Elpa? We can, and
>     if people think this is a bad idea I will put out a package.
>     But I'm proposing this addition belongs in Emacs as above.

Please add it directly to Calc rather than as a separate add-on.

> Proposed Scope
[...]
>     If the group thinks this is a good idea, I'll work on a patch as
>     above.  Thanks for reading.

Looks like a very good plan to me, looking forward to the patch,

AFAICT you have not yet signed any copyright paperwork, so to make sure
your patch can be installed once it's ready you might like to get
started on this as well.  For that, please fill the form below and email
it to the FSF as instructed so they can send you the relevant paperwork
to sign.  Thanks,


        Stefan


Please email the following information to assign@gnu.org, and we
will send you the assignment form for your past and future changes.

Please use your full legal name (in ASCII characters) as the subject
line of the message.
----------------------------------------------------------------------
REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES

[What is the name of the program or package you're contributing to?]
Emacs

[Did you copy any files or text written by someone else in these changes?
Even if that material is free software, we need to know about it.]


[Do you have an employer who might have a basis to claim to own
your changes?  Do you attend a school which might make such a claim?]


[For the copyright registration, what country are you a citizen of?]


[What year were you born?]


[Please write your email address here.]


[Please write your postal address here.]





[Which files have you changed so far, and which new files have you written
so far?]




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

* Re: Should Calc predefined units table include information units?
  2020-10-18 20:28 ` Stefan Monnier
@ 2020-10-19 14:02   ` Mitchell Perilstein
  0 siblings, 0 replies; 3+ messages in thread
From: Mitchell Perilstein @ 2020-10-19 14:02 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 121 bytes --]

Stefan, thanks for your input.

Yes, I will proceed with this change, and yes I've filed for the assignment
form.

Best!

[-- Attachment #2: Type: text/html, Size: 219 bytes --]

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

end of thread, other threads:[~2020-10-19 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-18 17:38 Should Calc predefined units table include information units? Mitchell Perilstein
2020-10-18 20:28 ` Stefan Monnier
2020-10-19 14:02   ` Mitchell Perilstein

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).