Hi,

When I try to do something in Factor:
1. I look in libraries if a word do what I want (not always simple, and sometimes really hard)
2. I try to do it by myself if it is easy
3. I look at examples in extra vocabs and try to understand what is done (a great hand parsing job !)


When I began 4DNav I defined my own camera movements. I then discovered opengl.camera and I refactored my code to use this vocab (Self always looks magical for me but it woks).

When turtle disappeared due to delegation incompatibility I tried to rewrite it. The only solution I found was to merge into a single file turtle pos and ori. Not very nice but that works.

Make-matrix was easy to understand and do the job well.

Of course your new Rz code is simpler to read and reusable everywhere. It is what I always looked for.

But I am not sure that the gap between:

> : make-matrix ( quot width -- matrix ) >r { } make r> group ; inline
> (oups sorry, [ { } make ] dip group )

and

> :: [deep-cleave-quots] ( SEQ -- quot )
> [let | QUOTS [ SEQ [ quotation? ] deep- filter ] > RECIPE [ SEQ [ dup quotation? [ drop , ] [ ] if ] deep- map ] |
>    [ QUOTS cleave RECIPE bake ] ] ;
> MACRO: deep-cleave-quots ( seq -- quot ) [deep-cleave-quots] ;

is easy to cross for a newbie. Slava's solution is more readable for me, but the most difficult point is to discover that words like deep- map and deep-filter exist.



By the way I also used make-matrix for my 4D rotations, I will rewrite my code with deep-cleave-quots. Also with this new word I would now be able to implement a word for a rotation in a N dimensional space in order to factor Rx Ry Rz, 4D-Rxy, 4D-Ryw...


thanks for your precious advices

Jeff
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to