From 52e24115ea5a8f91983a79c8625823effcfcd8ab Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Wed, 23 Nov 2005 04:16:18 +0000 Subject: [PATCH] factoroids did not load --- TODO.FACTOR.txt | 35 ++++++++++++++----------------- examples/factoroids/bodies.factor | 8 +++---- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 49a882fc99..94639ce4bd 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -12,25 +12,18 @@ - adding/removing timers automatically for animated gadgets - saving image with UI open - fix up the min thumb size hack - -- make-pane: if no input, just return pane-output - -- bug: click tutorial, full screen, the right-most arrow icon - loses the vertical bar -- signal handler should not lose stack pointers - callbacks -- FIELD: char key_vector[32]; -- FIELD: union { char b[20]; short s[10]; long l[5]; } data; -- MEMBER: long pad[24]; -- floating point intrinsics -- new basic block optimizer -- declare slot types for built-ins -- split: return vectors -- set-path: iterative - better prettyprinting of cond +- investigate if rehashing on startup is really necessary +- remove word transfer hack in bootstrap +- the invalid recursion form case needs to be fixed, for inlines too +- what about tasks and timers between image restarts + ui: +- bug: click tutorial, full screen, the right-most arrow icon + loses the vertical bar +- make-pane: if no input, just return pane-output - keyboard completion - get outliner working with lots of lines of output - listener continuations @@ -53,11 +46,13 @@ + misc - code walker & exceptions -- investigate if rehashing on startup is really necessary -- remove word transfer hack in bootstrap +- signal handler should not lose stack pointers + ffi: +- FIELD: char key_vector[32]; +- FIELD: union { char b[20]; short s[10]; long l[5]; } data; +- MEMBER: long pad[24]; - C structs, enums, unions: use new-style string mode parsing - smarter out parameter handling - clarify powerpc passing of value struct parameters @@ -70,17 +65,21 @@ + compiler: +- floating point intrinsics +- new basic block optimizer +- declare slot types for built-ins - check that set-datastack and set-callstack compile correctly in the face of optimization - [ ] [ throw ] ifte ==> should raise 'unbalanced branches' error - remove dead code after a 'throw' - flushing optimization - [ [ dup call ] dup call ] infer hangs -- the invalid recursion form case needs to be fixed, for inlines too - compile continuations + sequences: +- split: return vectors +- set-path: iterative - slice: if sequence or seq start is changed, abstraction violation - specialized arrays - search: slow @@ -100,8 +99,6 @@ - reader syntax for byte arrays, displaced aliens - out of memory error when printing global namespace - merge timers with sleeping tasks -- what about tasks and timers between image restarts -- there is a problem with hashcodes of words and bootstrapping - delegating generic words with a non-standard picker - code gc diff --git a/examples/factoroids/bodies.factor b/examples/factoroids/bodies.factor index c36c2ae415..4c9176b86f 100644 --- a/examples/factoroids/bodies.factor +++ b/examples/factoroids/bodies.factor @@ -7,6 +7,10 @@ angle-delta direction ; GENERIC: tick ( time obj -- ) +: update-direction ( body -- ) + dup body-angle deg>rad dup sin swap cos 0 swap 3array + swap set-body-direction ; + C: body ( position angle size -- ) [ set-body-size ] keep [ set-body-angle ] keep @@ -39,10 +43,6 @@ C: body ( position angle size -- ) [ [ scaled-velocity ] keep body-position v+ ] keep set-body-position ; -: update-direction ( body -- ) - dup body-angle deg>rad dup sin swap cos 0 swap 3array - swap set-body-direction ; - : body-tick ( time body -- ) [ update-angle ] 2keep [ update-velocity ] 2keep