----------------------------------------------------------------------------------
@MSGID:
<84586256-f364-4dcd-9b34-ef354fcd834dn@googlegroups.com> c337d04d
@REPLY:
<8f99b90f-7f00-4544-8fa6-d258ee6f4ef2n@googlegroups.com> 9a79146b
@REPLYADDR Marcel Hendrix <mhx@iae.nl>
@REPLYTO 2:5075/128 Marcel Hendrix
@CHRS: CP866 2
@RFC: 1 0
@RFC-References:
<55f30e3c-a6fe-428c-a95f-02bacf08c1een@googlegroups.com> <dbfca034-8ca9-4a9b-b563-3fa9da176386n@googlegroups.com>
<51074ba9-ac74-49aa-8f12-28668d28171fn@googlegroups.com> <8f99b90f-7f00-4544-8fa6-d258ee6f4ef2n@googlegroups.com>
@RFC-Message-ID:
<84586256-f364-4dcd-9b34-ef354fcd834dn@googlegroups.com>
@TZUTC: -0700
@PID: G2/1.0
@TID: FIDOGATE-5.12-ge4e8b94
On Wednesday, September 27, 2023 at 9:10:42 PM UTC+2, Marcel Hendrix wrote:
[..]
> They forgot to quote Sergei Baranoff.
Some examples.
Fills an array with random Forth tokens and executes it in a
controlled environment. If the ``goal`` is not met, a random
substitution is made for one of the tokens (a mutation), and
we try again.
Enter .PROGRAM to find a program that meets the spec of ``1+`
:NONAME 2 + ; IS SHOULD is the way to define other goals. ok
( I didn`t claim the output was good! )
FORTH> .program
| |
813 tries.
: PROGRAM
INVERT 2+ 1-
NEGATE 1+ ; ok
FORTH> .program
\\ /
1063 tries.
: PROGRAM
OVER DUP /
2- - ; ok
FORTH> .program
\\ /
4247 tries.
: PROGRAM
DUP MAX 1+
DUP AND ; ok
FORTH> .program
\\ /
4243 tries.
: PROGRAM
ROT SWAP ROT
SWAP 1+ ; ok
FORTH> :NONAME 3 * + ; IS SHOULD ok
FORTH> .PROGRAM
| |
225456 tries.
: PROGRAM
DUP OVER +
+ + ; ok
-marcel
--- G2/1.0
* Origin: usenet.network (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441