From 43e36b649150482afeba6c25b5bb358a4d906d03 Mon Sep 17 00:00:00 2001 From: slava Date: Fri, 10 Feb 2006 05:15:50 +0000 Subject: [PATCH] Turing machine updated --- TODO.FACTOR.txt | 15 +++++++++++---- examples/turing.factor | 12 ++++++------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 39bce1bc70..7eef53ceaf 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -19,21 +19,28 @@ - slice: if sequence or seq start is changed, abstraction violation - out of memory error when printing global namespace - delegating generic words with a non-standard picker + - pass an integer stack pos instead of a quotation - code gc - stream server can hang because of exception handler limitations - better i/o scheduler - if two tasks write to a unix stream, the buffer can overflow - make 3.4 bits>double an error - - 2220.446049250313 [ dup float? [ tanh ] when ] - call and compile-1 give C{ 0.0/0.0 0.0/0.0 } 0.0/0.0 - 2.718281828459045e+19 [ dup float? [ sech ] when ] - call/compile-1: C{ 0.0/0.0 0.0/0.0 } 0.0 - 0.0/0.0 next-power-of-2 never terminates -- comparison always returns false - 0.0/0.0 >fixnum . -> 0 0.0/0.0 >bignum . -> 0 - -- httpd crash - "localhost" 50 won't fail -- major GC while downloading files - out of memory from ffi calls - out of memory from overflow check +- x86 %unbox-struct +- amd64 %unbox-struct +- remove literal table +- callbacks +- CFBundle error handling +- autoload frameworks in cocoa class words +- document FFI +- document tools +- document conventions +- new turtle graphics tutorial diff --git a/examples/turing.factor b/examples/turing.factor index 848c7971ec..945cab37de 100644 --- a/examples/turing.factor +++ b/examples/turing.factor @@ -14,12 +14,12 @@ SYMBOL: halt ! This is a simple program that outputs 5 1's H{ - [[ [[ 1 0 ]] T{ state f 1 1 2 } ]] - [[ [[ 2 0 ]] T{ state f 1 1 3 } ]] - [[ [[ 3 0 ]] T{ state f 1 -1 1 } ]] - [[ [[ 1 1 ]] T{ state f 1 -1 2 } ]] - [[ [[ 2 1 ]] T{ state f 1 -1 3 } ]] - [[ [[ 3 1 ]] T{ state f 1 -1 halt } ]] + { [[ 1 0 ]] T{ state f 1 1 2 } } + { [[ 2 0 ]] T{ state f 1 1 3 } } + { [[ 3 0 ]] T{ state f 1 -1 1 } } + { [[ 1 1 ]] T{ state f 1 -1 2 } } + { [[ 2 1 ]] T{ state f 1 -1 3 } } + { [[ 3 1 ]] T{ state f 1 -1 halt } } } states set ! Current state