[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC] Changing the unit of an offset

From: Jose E. Marchesi
Subject: [RFC] Changing the unit of an offset
Date: Sat, 06 Feb 2021 12:53:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi people!

David Faust has been writing some Poke, and was kind to give me a lot of
feedback on the language.

While using poke, he often found himself to look at the value of some
given offset, but he would get it in bits:

  (poke) anoffset

Now, if we wanted to see that offset in byts instead (or some other
unit) we could do this:

  (poke) anoffet/#B

But that gives us a magnitude, not an offset.  It would of course be
possible to write:

  (poke) (anoffset/#B)#B

But that is too cumbersome.

So, what about having some short convenient syntax to change the unit of
an offset?

Note we would need to variants.  One equivalent to


And the other equivalent to


The first uses truncating division, the second ceiling division.

Anybody has any suggestion for the syntax?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]