Re: [Factor-talk] Specializing new?

2016-08-19 Thread John Benediktsson
Well, when you specify ``M: no-news``, you are telling the system to dispatch off an instance of the ``no-news`` class. So this works as you expect in your example: IN: scratchpad T{ no-news } new . T{ no-news f "same one" } That's because ``no-news`` is a tuple-class: IN:

[Factor-talk] Specializing new?

2016-08-19 Thread fede s
Hi I see "new" is a generic word, with the regular behavior set as a method for object.I tried specializing it on other tuple class, but it didn't work.    TUPLE: no-news field ;   : same-one ( -- t ) T{ no-news f "same one" } ;  M: no-news new  drop same-one ; I expect this:   no-news new  

Re: [Factor-talk] database integration - foreign keys ?

2016-08-19 Thread Georg Simon
Thank you. It works. Am Thu, 18 Aug 2016 08:54:46 -0700 schrieb John Benediktsson : > If you look through the tests in > ``basis/db/tuples/tuples-tests.factor`` you can see some uses of > foreign keys: > >