• a plain English "FizzBuZZ" idiom

    From Mike Gonta@mikegonta@gmail.com to comp.lang.misc on Fri Mar 1 20:06:05 2024
    From Newsgroup: comp.lang.misc

    Here is a plain English "FizzBuZZ" idiom (AKA pseudo code).
    Not coincidentally, it's also written in the idiom programming language
    which compiles to machine code as a Win32 PE.
    In fact, this entire post (including this and the following commentaries)
    will compile as is.
    [

    to fizz buzz up to a number is:
    loop
    break when a counter is past the number;
    set a flag;
    if the counter is divisible by 3 then
    display "Fizz"; clear the flag;
    and then;
    if the counter is divisible by 5 then
    display "Buzz"; clear the flag;
    and then;
    if the flag is set ? display the counter;
    display "\n";
    repeat;

    ]
    the-idiom has reached the end of the line, where all good things must end. There is no "end" in idiom, for idiom is an end in itself.

    Mike Gonta
    look and see - many look but few see

    https://mikegonta.com
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Bruce Axtens@snetxa@hotmail.com to comp.lang.misc on Thu Mar 21 09:26:07 2024
    From Newsgroup: comp.lang.misc

    On 2/03/2024 4:06 am, Mike Gonta wrote:
    if the counter is divisible by 3 then

    The counter is always divisible by 3. It is not always *evenly*
    divisible by 3. Maybe you want to make that more obvious.

    -Bruce

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Gonta@mikegonta@gmail.com to comp.lang.misc on Thu Mar 21 06:22:23 2024
    From Newsgroup: comp.lang.misc

    On 2024-03-20 9:26 p.m., Bruce Axtens wrote:
    On 2/03/2024 4:06 am, Mike Gonta wrote:
         if the counter is divisible by 3 then

    The counter is always divisible by 3. It is not always *evenly*
    divisible by 3. Maybe you want to make that more obvious.

    -Bruce

    Thanks Bruce, you're absolutely right.
    [
    to decide if a number is evenly divisible by another number is:
    divide the number by the other number returning a quotient number and
    a remainder number;
    return true if the remainder is null;
    ]
    Of course, in plain English idiom, the opposite (in this case) return
    false default statement should be obvious (as it is to the-idiom) and
    need not be written.

    there is no "end" in idiom, for idiom is an end in itself;
    --
    Mike Gonta
    look and see - many look but few see

    https://mikegonta.com

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Tim Rentsch@tr.17687@z991.linuxsc.com to comp.lang.misc on Fri Mar 22 06:05:54 2024
    From Newsgroup: comp.lang.misc

    Bruce Axtens <snetxa@hotmail.com> writes:

    On 2/03/2024 4:06 am, Mike Gonta wrote:

    if the counter is divisible by 3 then

    The counter is always divisible by 3. It is not always *evenly*
    divisible by 3.

    In mathematics standard terminology uses "a is divisible by b"
    to mean "a is an integer multiple of b". The "evenly" is not
    needed.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Gonta@mikegonta@gmail.com to comp.lang.misc on Fri Mar 22 11:56:40 2024
    From Newsgroup: comp.lang.misc

    On 2024-03-22 9:05 a.m., Tim Rentsch wrote:
    Bruce Axtens <snetxa@hotmail.com> writes:

    On 2/03/2024 4:06 am, Mike Gonta wrote:

    if the counter is divisible by 3 then

    The counter is always divisible by 3. It is not always *evenly*
    divisible by 3.

    In mathematics standard terminology uses "a is divisible by b"
    to mean "a is an integer multiple of b". The "evenly" is not
    needed.

    Thanks Tim, that's an excellent point.
    And while some think that redundancy in grammar is bad, it definitely
    has it's uses. Since plain English idiom is more grammar than math,
    the-idiom can be very forgiving.
    [
    to decide if a number is divisible by another number is:
    to decide if a number is evenly divisible by another number is:
    divide the number by the other number returning a quotient number and
    a remainder number;
    return true if the remainder is null;
    ]
    Now you can have your cake and eat it too.
    There is no "end" in idiom, for idiom is an end in itself.

    --
    Mike Gonta
    look and see - many look but few see

    https://mikegonta.com

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Tim Rentsch@tr.17687@z991.linuxsc.com to comp.lang.misc on Sat Mar 23 10:54:42 2024
    From Newsgroup: comp.lang.misc

    Mike Gonta <mikegonta@gmail.com> writes:

    On 2024-03-22 9:05 a.m., Tim Rentsch wrote:

    Bruce Axtens <snetxa@hotmail.com> writes:

    On 2/03/2024 4:06 am, Mike Gonta wrote:

    if the counter is divisible by 3 then

    The counter is always divisible by 3. It is not always *evenly*
    divisible by 3.

    In mathematics standard terminology uses "a is divisible by b"
    to mean "a is an integer multiple of b". The "evenly" is not
    needed.

    Thanks Tim, that's an excellent point.
    And while some think that redundancy in grammar is bad, it definitely
    has it's uses. [...]

    I feel obliged to point out that the word here is "its", not "it's".
    The word "it's" is a contraction for "it is". "It" is a personal
    pronoun, and the possessive forms of personal pronouns are always
    spelled without apostrophes, as for example "he" and "his". The
    word "it" follows this rule.

    If you feel a need to add some redundancy, I suggest

    if the counter is divisible by 3 (meant in the mathematical
    sense of being an integer multiple of 3)

    In answer to your other question, thank you for asking. My
    preference is not to be attributed in your website pages.
    The more impersonal form "It was pointed out that ..." conveys
    the most important information, and focuses readers' attention
    on that information without distracting them with extraneous
    information about who did the pointing.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Lawrence D'Oliveiro@ldo@nz.invalid to comp.lang.misc on Fri Mar 29 07:27:14 2024
    From Newsgroup: comp.lang.misc

    On Thu, 21 Mar 2024 09:26:07 +0800, Bruce Axtens wrote:

    The counter is always divisible by 3.

    Not if you require the result to be in the integers.

    If the OP had said “integer” rather than “number”, that would have helped.
    --- Synchronet 3.20a-Linux NewsLink 1.114