Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: Make Forth Small Again! Date: Thu, 23 Mar 2017 00:57:33 -0400 Organization: Aioe.org NNTP Server Lines: 53 Message-ID: <20170323005733.4b30baca@_> References: <78b86419-1284-411d-92a7-d04f76d45183@googlegroups.com> NNTP-Posting-Host: ZTD62cW/Uw8bymX5ok+0NA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:56157 On Wed, 22 Mar 2017 04:04:32 -0700 (PDT) Helmar Wodtke wrote: > Am Mittwoch, 22. M=E4rz 2017 06:56:17 UTC+1 schrieb hughag...@gmail.com: > The process of trying to minimize the needed words is some process of > thinking how things work. Thinking? Is it required? What if I use a Forth optimizer? ... It uses a brute-force algorithm to find the shortest sequence, first. > I personally do have some idea to extremely minimize words that are > useful to implement a system. Do you want as small as is reasonable, but no further? Or, do you want as absolutely as small as is possible? E.g., reasonable would be using AND OR XOR since microprocessors implement that functionality. Whereas, absolute minimalism would use NAND and NOR to create AND OR and XOR . > I think in "build patterns" - like ": 2DUP OVER OVER ;" If I > implement a system that optimizes last compilation result, it would > recognize "OVER OVER". And it would have to recognize it. ROLL and > PICK are words for example, that are by first looking at it, > relatively slow. But they are build patterns. If you use only DUP > OVER SWAP >R R> etc. there is a much more complicated idea behind of > for example PICK - automated recognition is not possible for this > without extreme efforts. If programmers use DUP DROP SWAP OVER >R R> frequently but almost never use PICK and ROLL then should you spend time optimizing PICK and ROLL ? ... (dynamic instruction frequency) There are all sorts of posts on comp.lang.forth on minimal Forth wordsets: https://groups.google.com/d/msg/comp.lang.forth/ESZD4h1prcw/jFXN7dvtCFMJ Message-ID: <1332@massormetrix.ida.liu.se> https://groups.google.com/d/msg/comp.lang.forth/QXNYicMS26U/gZTvERGgzSIJ Message-ID: <3883@cosmo2.UUCP> https://groups.google.com/d/msg/comp.lang.forth/KHw28PKZXUk/JrXcjrYshxAJ Message-ID: Rod Pemberton --=20 All it takes for humanity to conquer the world's toughest problems is to hope, to believe, to share, and to do, in cooperation.