• Selling lot of Forth books on ebay

    From Jeff Bernstein@21:1/5 to All on Wed Aug 10 09:06:41 2022
    I’m selling a lot of Forth books on ebay if anyone’s interested. Non-smoking home. Titles include:

    The Complete Forth by Alan Winfield
    Threaded Interpretive Languages by R. G. Loeliger
    Mastering Forth by Martin Tracy et al.
    Starting Forth (Second Edition) by Leo Brodie
    Forth: The New Model by Jack Woehr (includes 5 1/4" floppy disk)
    Beginning Forth by Paul Chirlian (some scotch tape on the back cover) Thinking Forth by Leo Brodie (two copies)
    Starting Forth (blue cover) by Leo Brodie
    Forth Fundamentals by C. Kevin McCabe

    https://www.ebay.com/itm/255658542842

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Wed Aug 10 11:31:45 2022
    I’m selling a lot of Forth books on ebay if anyone’s interested.
    Not sure, if it's possible to buy two of them: I would be keen to get „Beginning Forth” and „Forth: The New Model”. If so — drop me a
    line, please, on my e-mail.

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for
    Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jurgen Pitaske@21:1/5 to Zbig on Wed Aug 10 11:55:35 2022
    On Wednesday, 10 August 2022 at 19:31:46 UTC+1, Zbig wrote:
    I’m selling a lot of Forth books on ebay if anyone’s interested.
    Not sure, if it's possible to buy two of them: I would be keen to get „Beginning Forth” and „Forth: The New Model”. If so — drop me a line, please, on my e-mail.

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for
    Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.

    The current eBook version on amazon is as agreed with Forth INC. Thanks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Thu Aug 11 13:04:21 2022
    On 11/08/2022 04:31, Zbig wrote:

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for
    Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.

    In the 1st ed all the function details and stack comments in the main text assumed poly-forth. I assume that remained intact in the 2nd ed? While
    the later edition may be more useful, it's possible FI doesn't own the
    updated material. What does it say on the copyright page?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jeff Bernstein@21:1/5 to dxforth on Wed Aug 10 21:49:58 2022
    On Wednesday, August 10, 2022 at 8:04:25 PM UTC-7, dxforth wrote:
    On 11/08/2022 04:31, Zbig wrote:

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy
    position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.
    In the 1st ed all the function details and stack comments in the main text assumed poly-forth. I assume that remained intact in the 2nd ed? While
    the later edition may be more useful, it's possible FI doesn't own the updated material. What does it say on the copyright page?

    Sorry, not exactly sure what you're looking for.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Jeff Bernstein on Thu Aug 11 15:03:04 2022
    On 11/08/2022 14:49, Jeff Bernstein wrote:
    On Wednesday, August 10, 2022 at 8:04:25 PM UTC-7, dxforth wrote:
    On 11/08/2022 04:31, Zbig wrote:

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy
    position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for
    Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.
    In the 1st ed all the function details and stack comments in the main text >> assumed poly-forth. I assume that remained intact in the 2nd ed? While
    the later edition may be more useful, it's possible FI doesn't own the
    updated material. What does it say on the copyright page?

    Sorry, not exactly sure what you're looking for.

    It was a reply to the off-topic question as to why Forth Inc hadn't
    made the 2nd edition of Starting Forth available as an electronic
    d/load. I don't know but suggested they may not have been entitled.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jurgen Pitaske@21:1/5 to dxforth on Wed Aug 10 23:18:10 2022
    On Thursday, 11 August 2022 at 04:04:25 UTC+1, dxforth wrote:
    On 11/08/2022 04:31, Zbig wrote:

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy
    position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.
    In the 1st ed all the function details and stack comments in the main text assumed poly-forth. I assume that remained intact in the 2nd ed? While
    the later edition may be more useful, it's possible FI doesn't own the updated material. What does it say on the copyright page?

    Forth INC owns the copyright of Starting Forth.
    Otherwise they could not have a full version on their website.
    Otherwise they could not have gven me the OK to publish as eBook.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Jurgen Pitaske on Thu Aug 11 18:22:59 2022
    On 11/08/2022 16:18, Jurgen Pitaske wrote:
    On Thursday, 11 August 2022 at 04:04:25 UTC+1, dxforth wrote:
    On 11/08/2022 04:31, Zbig wrote:

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy
    position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for
    Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.
    In the 1st ed all the function details and stack comments in the main text >> assumed poly-forth. I assume that remained intact in the 2nd ed? While
    the later edition may be more useful, it's possible FI doesn't own the
    updated material. What does it say on the copyright page?

    Forth INC owns the copyright of Starting Forth.
    Otherwise they could not have a full version on their website.
    Otherwise they could not have gven me the OK to publish as eBook.

    They gave you the rights to publish the 1st edition which was written
    at a time Brodie was still an employee.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jurgen Pitaske@21:1/5 to dxforth on Thu Aug 11 03:53:00 2022
    On Thursday, 11 August 2022 at 09:23:01 UTC+1, dxforth wrote:
    On 11/08/2022 16:18, Jurgen Pitaske wrote:
    On Thursday, 11 August 2022 at 04:04:25 UTC+1, dxforth wrote:
    On 11/08/2022 04:31, Zbig wrote:

    To Mr. Pintaske: that second edition of „Starting Forth” could be worthy
    position of your „Forth shelf”. It's more „universal” for beginner readers
    than first edition, being completed with comments and examples for
    Forth-83 and fig-Forth. The first edition was, if I'm correct, poly-Forth-oriented.
    In the 1st ed all the function details and stack comments in the main text
    assumed poly-forth. I assume that remained intact in the 2nd ed? While
    the later edition may be more useful, it's possible FI doesn't own the
    updated material. What does it say on the copyright page?

    Forth INC owns the copyright of Starting Forth.
    Otherwise they could not have a full version on their website.
    Otherwise they could not have gven me the OK to publish as eBook.
    They gave you the rights to publish the 1st edition which was written
    at a time Brodie was still an employee.

    I published what I was allowed to by Forth INC.and I am quite happy about it
    - better than what was there as eBook before.
    And a great part of my Forth Bookshelf publications https://www.amazon.co.uk/Juergen-Pintaske/e/B00N8HVEZM

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Aug 11 05:10:17 2022
    What does it say on the copyright page?

    The second edition is copyrighted by Prentice-Hall, Inc.
    „Forth Inc.” is mentioned just as co-author(?).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Aug 11 06:45:13 2022
    In the 1st ed all the function details and stack comments in the main text assumed poly-forth. I assume that remained intact in the 2nd ed?

    No, the second edition shows examples (and words) prepared for Forth 83,
    with footnotes explaining how to modify them for fig-Forth and „older systems”
    (poly-Forth?).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Thu Aug 11 23:21:37 2022
    On 11/08/2022 22:10, Zbig wrote:
    What does it say on the copyright page?

    The second edition is copyrighted by Prentice-Hall, Inc.
    „Forth Inc.” is mentioned just as co-author(?).

    Perhaps Prentice-Hall wasn't interested unless it held the
    copyright for the 2nd ed. and FI / LB agreed.

    FWIW Thinking FORTH (also Prentice-Hall) says:

    (c) 1984 by Leo Brodie

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Aug 11 07:39:05 2022
    In the 1st ed all the function details and stack comments in the main text
    assumed poly-forth. I assume that remained intact in the 2nd ed?

    No, the second edition shows examples (and words) prepared for Forth 83, with footnotes explaining how to modify them for fig-Forth and „older systems”
    (poly-Forth?).
    Forth-83 is quite sparse cf. polyForth. So 2nd ed. no longer has M+ M/ M* M*/ etc. ?

    They are listed (page 158).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Fri Aug 12 00:31:25 2022
    On 11/08/2022 23:45, Zbig wrote:
    In the 1st ed all the function details and stack comments in the main text >> assumed poly-forth. I assume that remained intact in the 2nd ed?

    No, the second edition shows examples (and words) prepared for Forth 83,
    with footnotes explaining how to modify them for fig-Forth and „older systems”
    (poly-Forth?).

    Forth-83 is quite sparse cf. polyForth. So 2nd ed. no longer has M+ M/ M* M*/ etc. ?
    That would make it about as exciting as reading a Forth Standard. 99.99% of 1st ed.
    readers couldn't afford polyForth. That made the book all the more wondrous - akin
    to possessing a book of spells but lacking the key :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Fri Aug 12 12:16:50 2022
    On 12/08/2022 00:39, Zbig wrote:
    In the 1st ed all the function details and stack comments in the main text >>>> assumed poly-forth. I assume that remained intact in the 2nd ed?

    No, the second edition shows examples (and words) prepared for Forth 83, >>> with footnotes explaining how to modify them for fig-Forth and „older systems”
    (poly-Forth?).
    Forth-83 is quite sparse cf. polyForth. So 2nd ed. no longer has M+ M/ M* M*/ etc. ?

    They are listed (page 158).

    Hopefully they're listed as not Forth-83.

    Is MOD signed?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Fri Aug 12 03:57:52 2022
    They are listed (page 158).
    Hopefully they're listed as not Forth-83.

    There isn't in every single case a remark which standard is presented;
    they are listed just as „mixed-length operators”.

    Is MOD signed?

    No such description. Just a remark: „In the Forth-83 standard, in all
    of Forth's division operators, the quotient is floored”.

    Brodie wrote in „Preface to the second edition”:
    „[..] Since the first edition was published, the Forth-83 standard has been ratified and widely adopted. Upgrading the syntax of this book to that of
    83 standard was the primary reason for undertaking this revision. [..]
    there are still a lot of fig-Forth (Forth Interest Group) systems out there.
    In this edition, I've added footnotes that flag the major differences for
    those users [..]”

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Sat Aug 13 15:20:08 2022
    On 12/08/2022 20:57, Zbig wrote:
    They are listed (page 158).
    Hopefully they're listed as not Forth-83.

    There isn't in every single case a remark which standard is presented;
    they are listed just as „mixed-length operators”.

    Is MOD signed?

    No such description. Just a remark: „In the Forth-83 standard, in all
    of Forth's division operators, the quotient is floored”.

    The stack comment should say. In the 1st edition:

    MOD (u1 u2 -- u-rem)

    */MOD (u1 u2 u3 -- u-rem u-result)

    Brodie wrote in „Preface to the second edition”:
    „[..] Since the first edition was published, the Forth-83 standard has been ratified and widely adopted. Upgrading the syntax of this book to that of
    83 standard was the primary reason for undertaking this revision. [..]
    there are still a lot of fig-Forth (Forth Interest Group) systems out there. In this edition, I've added footnotes that flag the major differences for those users [..]”

    An unenviable task. Wonder how many conversion errors/omissions :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sat Aug 13 06:53:32 2022
    The stack comment should say. In the 1st edition:

    MOD (u1 u2 -- u-rem)

    */MOD (u1 u2 u3 -- u-rem u-result)

    It's changed to n-rem.

    Brodie wrote in „Preface to the second edition”:
    „[..] Since the first edition was published, the Forth-83 standard has been
    ratified and widely adopted. Upgrading the syntax of this book to that of 83 standard was the primary reason for undertaking this revision. [..] there are still a lot of fig-Forth (Forth Interest Group) systems out there.
    In this edition, I've added footnotes that flag the major differences for those users [..]”
    An unenviable task. Wonder how many conversion errors/omissions :)

    Jeff Bernstein offers the book — so it's an opportunity to count these errors. ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Sun Aug 14 14:36:03 2022
    On 13/08/2022 23:53, Zbig wrote:
    The stack comment should say. In the 1st edition:

    MOD (u1 u2 -- u-rem)

    */MOD (u1 u2 u3 -- u-rem u-result)

    It's changed to n-rem.

    Brodie wrote in „Preface to the second edition”:
    „[..] Since the first edition was published, the Forth-83 standard has been
    ratified and widely adopted. Upgrading the syntax of this book to that of >>> 83 standard was the primary reason for undertaking this revision. [..]
    there are still a lot of fig-Forth (Forth Interest Group) systems out there.
    In this edition, I've added footnotes that flag the major differences for >>> those users [..]”
    An unenviable task. Wonder how many conversion errors/omissions :)

    Jeff Bernstein offers the book — so it's an opportunity to count these errors. ;)

    I recall being shown a 2nd edition at the time but didn't take much notice.
    From your description it's a curious oddity as it will always be compared against classic 1st edition. Today - definitely a collector's item. I'm guessing it came too late for many copies to have been sold.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Aug 14 01:11:03 2022
    I recall being shown a 2nd edition at the time but didn't take much notice. From your description it's a curious oddity as it will always be compared against classic 1st edition. Today - definitely a collector's item. I'm guessing it came too late for many copies to have been sold.

    I think it's indeed improved over the 1st edition in that it uses
    a standard (F83) adopted by several implementors, so it's easier for
    the beginner reader to find some compiler to get through the book with.
    And these remarks for fig-Forth users makes it even easier. Not being
    big fan of „standards” however I must note, that probably not that many readers of 1st edition have had chance of practice using poly-Forth. The
    better idea would be to make that 1st edition fig-Forth oriented, but
    I understand probably it had its role in promoting commercial product rather. Apart of that, essentially, it is the same book as the first edition. Well, better
    paper, better print etc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to dxforth@gmail.com on Tue Aug 16 23:02:12 2022
    In article <td7ca9$1m7i$1@gioia.aioe.org>, dxforth <dxforth@gmail.com> wrote: >On 12/08/2022 20:57, Zbig wrote:
    They are listed (page 158).
    Hopefully they're listed as not Forth-83.

    There isn't in every single case a remark which standard is presented;
    they are listed just as „mixed-length operators”.

    Is MOD signed?

    No such description. Just a remark: „In the Forth-83 standard, in all
    of Forth's division operators, the quotient is floored”.

    The stack comment should say. In the 1st edition:

    MOD (u1 u2 -- u-rem)

    */MOD (u1 u2 u3 -- u-rem u-result)

    Brodie wrote in „Preface to the second edition”:
    „[..] Since the first edition was published, the Forth-83 standard has been
    ratified and widely adopted. Upgrading the syntax of this book to that of
    83 standard was the primary reason for undertaking this revision. [..]
    there are still a lot of fig-Forth (Forth Interest Group) systems out there. >> In this edition, I've added footnotes that flag the major differences for
    those users [..]”

    An unenviable task. Wonder how many conversion errors/omissions :)

    The stack comments are wrong. All numbers are signed.
    ISO 93 leaves the decision between floored and symmetric to the
    implementor. Symmetric division is a mathematical abomination,
    and in math modulo a negative number is shunned anyway.
    There is no modern language (python, go) that uses symmetric.

    UM* and M/MOD are the exceptions handling unsigned numbers.
    These are necessary (in 16 bits forths) to print numbers of more than 16 bits. If you are not printing numbers (in 64 bits forth) above 64 bits
    (USA deficit in cents is okay), then you don't need them. 1)

    M/MOD is non-standard and a misnomer coming from figForth (polyforth?)
    and should start with an U.

    Groetjes Albert
    Albert

    1) Compatibility between 16/32/64 could be a reason to maintain those.
    Printing unsigned numbers make actually only sense in hex, and
    a separate implementation to print those is easier and faster.



    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to albert on Wed Aug 17 09:57:53 2022
    On 17/08/2022 07:02, albert wrote:
    In article <td7ca9$1m7i$1@gioia.aioe.org>, dxforth <dxforth@gmail.com> wrote:
    On 12/08/2022 20:57, Zbig wrote:
    They are listed (page 158).
    Hopefully they're listed as not Forth-83.

    There isn't in every single case a remark which standard is presented;
    they are listed just as „mixed-length operators”.

    Is MOD signed?

    No such description. Just a remark: „In the Forth-83 standard, in all
    of Forth's division operators, the quotient is floored”.

    The stack comment should say. In the 1st edition:

    MOD (u1 u2 -- u-rem)

    */MOD (u1 u2 u3 -- u-rem u-result)

    Brodie wrote in „Preface to the second edition”:
    „[..] Since the first edition was published, the Forth-83 standard has been
    ratified and widely adopted. Upgrading the syntax of this book to that of >>> 83 standard was the primary reason for undertaking this revision. [..]
    there are still a lot of fig-Forth (Forth Interest Group) systems out there.
    In this edition, I've added footnotes that flag the major differences for >>> those users [..]”

    An unenviable task. Wonder how many conversion errors/omissions :)

    The stack comments are wrong. All numbers are signed.
    ISO 93 leaves the decision between floored and symmetric to the
    implementor. Symmetric division is a mathematical abomination,
    and in math modulo a negative number is shunned anyway.
    There is no modern language (python, go) that uses symmetric.

    Intel considered symmetric division basic and sufficient. Forth Inc
    saw no need for MOD operations involving signed numbers. No idea
    what mathematics thinks but there's a paper which argues Euclidean
    signed division is superior to what forth calls floored-division.
    There can be no 'best' division as goals differ. Pick one and
    there'll be a trade-off in there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Heinrich Hohl@21:1/5 to dxforth on Wed Aug 17 00:42:55 2022
    On Wednesday, August 17, 2022 at 1:57:57 AM UTC+2, dxforth wrote:
    There can be no 'best' division as goals differ.

    I fully agree. You really need both and must choose between symmetric
    and floored division depending on the problem to solve.

    Henry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@cherry. on Wed Aug 17 09:25:18 2022
    albert@cherry.(none) (albert) writes:
    There is no modern language (python, go) that uses symmetric.

    <https://en.wikipedia.org/wiki/Modulo_operation#In_programming_languages>
    has 97 occurences of "truncated" (symmetric). Looking for languages
    that are younger (more modern?) than Python, ActionScript, C#,
    Clopjure, CoffeeScript, D, Dart and many others support symmetric
    remainder; some of them support symmetric in addition to floored
    (e.g., CoffeeScript) or Euclidean (Dart).

    UM* and M/MOD are the exceptions handling unsigned numbers.
    These are necessary (in 16 bits forths) to print numbers of more than 16 bits.

    Why would one need UM* for printing numbers?

    In Gforth I see UM* (7 occurences) in string-to-number conversion (2 occurences), MS, M*/ (2 occurences), and to compute the file position
    in the blocks wordset.

    There is no M/MOD in Gforth. Do you mean the core word UM/MOD?

    In Gforth I see UM/MOD (9 occurences) in UD/MOD, which is indeed used
    in #, in DEADLINE (which waits for an absolute time), in M*/ (2
    occurences), in the implementation of unsigned staged division (2
    occurences; used, e.g., for optimizing <const> U/), in the
    implementation of floored staged division (used, e.g., for optimizing
    <const> /), and in the implementation of BLOCK.

    M/MOD is non-standard and a misnomer coming from figForth (polyforth?)
    and should start with an U.

    Forth-94 and Forth-2012 have a core word UM/MOD.

    Why did you bring up M/MOD?

    - anton
    --
    M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
    comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
    New standard: https://forth-standard.org/
    EuroForth 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Wed Aug 17 17:57:50 2022
    In article <2022Aug17.112518@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@cherry.(none) (albert) writes:
    There is no modern language (python, go) that uses symmetric.

    <https://en.wikipedia.org/wiki/Modulo_operation#In_programming_languages>
    has 97 occurences of "truncated" (symmetric). Looking for languages
    that are younger (more modern?) than Python, ActionScript, C#,
    Clopjure, CoffeeScript, D, Dart and many others support symmetric
    remainder; some of them support symmetric in addition to floored
    (e.g., CoffeeScript) or Euclidean (Dart).

    Supporting is something different. We have SM/REM.

    Integer division has finally won over, and Python users
    are free from worrying over FM/MOD and SM/REM.

    UM* and M/MOD are the exceptions handling unsigned numbers.
    These are necessary (in 16 bits forths) to print numbers of more than 16 bits.

    Why would one need UM* for printing numbers?
    Nit picking. Number I/O.

    Why did you bring up M/MOD?
    It is a remnant of 80' figForth (polyforth?) that possibly
    lingers somewhere.


    - anton

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to none albert on Wed Aug 17 10:10:05 2022
    On Wednesday, August 17, 2022 at 5:57:55 PM UTC+2, none albert wrote:
    In article <2022Aug1...@mips.complang.tuwien.ac.at>,
    Anton Ertl <an...@mips.complang.tuwien.ac.at> wrote:
    [..]
    UM* and M/MOD are the exceptions handling unsigned numbers.
    These are necessary (in 16 bits forths) to print numbers of more than 16 bits.

    Why would one need UM* for printing numbers?
    Nit picking. Number I/O.
    Why did you bring up M/MOD?
    It is a remnant of 80' figForth (polyforth?) that possibly
    lingers somewhere.

    The only 'problematic' division word that I remember is " M/ " ...

    D:\dfwforth\examples\benchmar\MPEBench\benchm.frt(163): : M/ \ d n1 -- quot
    D:\dfwforth\examples\benchmar\MPEBench\benchm.frt(318): : $M/$ .ann ." M/" [$ /prims DUP 1+ 1 DO 1000 0 I M/ [o/n] DROP LOOP $] ;
    D:\dfwforth\examples\gnuplot\pspice.frt(61): ehandle FILE-SIZE ?FILE 1 DFLOATS M/ 2- #items 2+ / ( needed array size ) LOCAL recs
    D:\dfwforth\examples\misc\assycall.frt(97): n #25 * M/ DEC. ." clockticks per character" ;
    D:\dfwforth\examples\misc\egcd.frt(46): OVER S>D 2 PICK m M* D- n M/ ;

    ( egcd is Knuth's Algorithm E, TAOCP, Fundamental Algorithms, page 15.
    Extended Euclid's Algorithm; d = gcd(m,n) = a*m + b*n )

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to albert on Thu Aug 18 17:12:35 2022
    On 18/08/2022 01:57, albert wrote:
    In article <2022Aug17.112518@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@cherry.(none) (albert) writes:
    There is no modern language (python, go) that uses symmetric.

    <https://en.wikipedia.org/wiki/Modulo_operation#In_programming_languages>
    has 97 occurences of "truncated" (symmetric). Looking for languages
    that are younger (more modern?) than Python, ActionScript, C#,
    Clopjure, CoffeeScript, D, Dart and many others support symmetric
    remainder; some of them support symmetric in addition to floored
    (e.g., CoffeeScript) or Euclidean (Dart).

    Supporting is something different. We have SM/REM.

    Integer division has finally won over, and Python users
    are free from worrying over FM/MOD and SM/REM.

    Not according to these.

    https://stackoverflow.com/questions/3883004/the-modulo-operation-on-negative-numbers-in-python
    https://stackoverflow.com/questions/48170942/modulus-of-negative-number https://stackoverflow.com/questions/65207679/modulo-operation-with-negative-numbers-in-python

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to mhx@iae.nl on Thu Aug 18 12:56:40 2022
    In article <ff24b509-a29d-4a5c-8782-a7544b6ec680n@googlegroups.com>,
    Marcel Hendrix <mhx@iae.nl> wrote:
    <SNIP>

    ( egcd is Knuth's Algorithm E, TAOCP, Fundamental Algorithms, page 15.
    Extended Euclid's Algorithm; d = gcd(m,n) = a*m + b*n )


    \ For A B return C GCD where C*A+x*B=GCD
    : XGCD 1 0 2SWAP BEGIN OVER /MOD OVER WHILE >R SWAP
    2SWAP OVER R> * - SWAP 2SWAP REPEAT 2DROP NIP ;

    C --> m , x --> n
    You can can find x from the result of XGCD if you want.

    I remember that Elizabeth Rather was upset over this implementation.


    -marcel
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to none albert on Thu Aug 18 05:06:13 2022
    On Thursday, August 18, 2022 at 12:56:44 PM UTC+2, none albert wrote:
    In article <ff24b509-a29d-4a5c...@googlegroups.com>,
    Marcel Hendrix <m...@iae.nl> wrote:
    <SNIP>

    ( egcd is Knuth's Algorithm E, TAOCP, Fundamental Algorithms, page 15.
    Extended Euclid's Algorithm; d = gcd(m,n) = a*m + b*n )
    \ For A B return C GCD where C*A+x*B=GCD
    : XGCD 1 0 2SWAP BEGIN OVER /MOD OVER WHILE >R SWAP
    2SWAP OVER R> * - SWAP 2SWAP REPEAT 2DROP NIP ;

    C --> m , x --> n
    You can can find x from the result of XGCD if you want.

    I remember that Elizabeth Rather was upset over this implementation.
    [..]

    I guess she preferred
    : xgcd2 ( a b -- gcd x y) \ gcd = x*a + y*b
    DUP 0= IF 1 SWAP EXIT ENDIF
    TUCK /MOD >R RECURSE TUCK R> * - ;

    -marcel

    ( Remarkable how quickly hardware changes. Since 2014
    CPUs got 100x faster and made algorithms switch places. )

    ANEW -egcd ( created Tuesday 2 June, 2014 )

    -- Knuth's Algorithm E, TAOCP, Fundamental Algorithms, page 15.
    -- Extended Euclid's Algorithm; d = gcd(m,n) = a*m + b*n
    : xgcd1 ( m n -- d a b )
    0 1 1 0 0 LOCALS| q a a' b b' d c |
    BEGIN c d /MOD ( -- r q ) OVER
    WHILE d TO c TO q TO d
    a' a TO a' a q * - TO a
    b' b TO b' b q * - TO b
    REPEAT 2DROP
    d a b ;

    : xgcd2 ( a b -- gcd x y) \ gcd = x*a + y*b
    DUP 0= IF 1 SWAP EXIT ENDIF
    TUCK /MOD >R RECURSE TUCK R> * - ;

    : xgcd2b ( a b -- gcd x y) \ gcd = x*a + y*b
    DUP 0= ( a b flag)
    IF 1 SWAP ( -- a 1 0)
    ELSE TUCK ( b a b)
    /MOD ( b a mod b [a/b] )
    >R ( b a mod b )
    RECURSE ( gcd' x' y')
    TUCK R> ( gcd' y' x' y' [a/b])
    * - ( -- gcd x y)
    THEN ;

    : xgcd3 ( m n -- d a b )
    SWAP 0 1 0 LOCALS| q a' b' c |
    R 0 1 ( -- a b )
    BEGIN c R@ /MOD ( -- a b r q ) OVER
    WHILE TO q R> TO c >R ( -- a b )
    SWAP a' SWAP DUP TO a' q * -
    SWAP b' SWAP DUP TO b' q * -
    REPEAT 2DROP R> -ROT ;

    : xgcd4 ( m n -- d a b )
    SWAP DUP 1 0 LOCALS| q a' c m n |
    n >R 0 ( -- a )
    BEGIN c R@ /MOD ( -- a r q ) OVER
    WHILE TO q R> TO c >R ( -- a )
    a' SWAP DUP TO a' q * -
    REPEAT 2DROP R> SWAP ( -- gcd a )
    OVER S>D 2 PICK m M* D- n M/ ;

    0 VALUE #tested
    0 VALUE num1
    0 VALUE num2

    : SAME? ( a b -- )
    2DUP 2>R xgcd2 >S
    2R> xgcd4 >S
    D<> S> S> <>
    OR IF CR ." error: " num1 . num2 . ." test differently."
    TRUE ABORT" xgcd2 and xgcd4 not equal"
    ENDIF ;

    : OK? CLEAR #tested
    BEGIN
    RANDOM DUP TO num1 RANDOM DUP TO num2
    SAME?
    1 +TO #tested
    #tested $3FF AND
    0= IF EKEY? ELSE FALSE ENDIF
    UNTIL
    CR #tested DEC. ." numbers tested." ;

    : 1? #30000000 0 DO RANDOM RANDOM xgcd1 3DROP LOOP ;
    : 2? #30000000 0 DO RANDOM RANDOM xgcd2 3DROP LOOP ;
    : 2b? #30000000 0 DO RANDOM RANDOM xgcd2b 3DROP LOOP ;
    : 3? #30000000 0 DO RANDOM RANDOM xgcd3 3DROP LOOP ;
    : 4? #30000000 0 DO RANDOM RANDOM xgcd4 3DROP LOOP ;
    : 11? #30000000 0 DO #2659539033 #2086106244 xgcd1 3DROP LOOP ;
    : 22? #30000000 0 DO #2659539033 #2086106244 xgcd2 3DROP LOOP ;
    : 22b? #30000000 0 DO #2659539033 #2086106244 xgcd2b 3DROP LOOP ;
    : 33? #30000000 0 DO #2659539033 #2086106244 xgcd3 3DROP LOOP ;
    : 44? #30000000 0 DO #2659539033 #2086106244 xgcd4 3DROP LOOP ;

    : SPEED? ( -- )
    1 TO seed CR ." xgcd1 : " TIMER-RESET 1? .ELAPSED
    1 TO seed CR ." xgcd1 : " TIMER-RESET 11? .ELAPSED
    1 TO seed CR ." xgcd2 : " TIMER-RESET 2? .ELAPSED
    1 TO seed CR ." xgcd2 : " TIMER-RESET 22? .ELAPSED
    1 TO seed CR ." xgcd2b: " TIMER-RESET 22b? .ELAPSED
    1 TO seed CR ." xgcd2b: " TIMER-RESET 2b? .ELAPSED
    1 TO seed CR ." xgcd3 : " TIMER-RESET 3? .ELAPSED
    1 TO seed CR ." xgcd3 : " TIMER-RESET 33? .ELAPSED
    1 TO seed CR ." xgcd4 : " TIMER-RESET 4? .ELAPSED
    1 TO seed CR ." xgcd4 : " TIMER-RESET 44? .ELAPSED ;

    DOC
    (*
    \ in 2014, #300,000 times
    FORTH> speed?
    xgcd1: 3.217 seconds elapsed.
    xgcd1: 5.763 seconds elapsed.
    xgcd2: 2.971 seconds elapsed.
    xgcd2: 5.281 seconds elapsed.
    ...
    ...
    xgcd3: 3.166 seconds elapsed.
    xgcd3: 5.684 seconds elapsed.
    xgcd4: 2.908 seconds elapsed.
    xgcd4: 5.042 seconds elapsed. ok

    \ 2022, AMD Ryzen 7 5800X, #30,000,000 instead of #300,000 times
    FORTH> speed?
    xgcd1 : 2.747 seconds elapsed.
    xgcd1 : 0.937 seconds elapsed.
    xgcd2 : 3.875 seconds elapsed.
    xgcd2b: 1.247 seconds elapsed.
    xgcd2b: 3.887 seconds elapsed.
    xgcd2 : 1.311 seconds elapsed.
    xgcd3 : 3.641 seconds elapsed.
    xgcd3 : 1.252 seconds elapsed.
    xgcd4 : 2.648 seconds elapsed.
    xgcd4 : 0.927 seconds elapsed.
    *)
    ENDDOC

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)