Hi, John! I see, those "primitives" have roots in the C++ VM implementation.
This leads me to another question that I've been wanting to ask for a while now. In Slava's Google Talk I heard him explaining how Factor is a compiled language, and has great performance (the fractals demo). How does that statement relate to the fact that there is a VM involved (presumably, with an interpreter)? Is there a whitepaper on the Factor architecture you could refer me to? 15.09.2015, 12:49, "John Benediktsson" <mrj...@gmail.com>: > Hi Alexander, > > The "primitive registration system" is a little more involved than PRIMITIVE: > but we defined that as syntax so we could grep and keep track of our > primitives better and as a placeholder for some future cleanup. > > When you make a new "primitive", it needs several things including this in > Factor (which we hope PRIMITIVE: will replace someday): > > * core/bootstrap/primitives.factor (make-primitive) > * basis/stack-checker/known-words/known-words.factor (define-primitive) > > And this in the VM: > > * vm/vm.hpp (defined) > * vm/primities.hpp (exported) > * vm/*.cpp (implemented) > > We have an issue for improving this, although we won't likely get to it right > away: > > https://github.com/slavapestov/factor/issues/1134 > > Thanks, > John. > > On Tue, Sep 15, 2015 at 2:03 AM, Alexander Ilin <ajs...@yandex.ru> wrote: >> Hello! >> >> I was looking at some words, like <wrapper>, and I saw PRIMITIVE: >> >> IN: scratchpad \ <wrapper> see >> IN: kernel >> PRIMITIVE: <wrapper> ( obj -- wrapper ) foldable flushable >> >> But when I tried to look up PRIMITIVE:, here's what I saw: >> >> If I do IN: scratchpad \ PRIMITIVE: see >> USING: kernel ; >> IN: syntax >> SYNTAX: PRIMITIVE: >> "Primitive definition is not supported" throw ; >> >> Is this the actual definition of PRIMITIVE:? To throw an error? How can >> the <wrapper> work then? >> >> If it is not the actual definition, please help me find the real one. >> >> ---=====--- >> Александр >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Factor-talk mailing list >> Factor-talk@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/factor-talk > , > > ------------------------------------------------------------------------------ > , > > _______________________________________________ > Factor-talk mailing list > Factor-talk@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/factor-talk ---=====--- Александр ------------------------------------------------------------------------------ _______________________________________________ Factor-talk mailing list Factor-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/factor-talk