Hi, I took out the fuzzy out of gnustep-fuzzy and am trying to make it work by reducing warnings. There's only prolog-decision tree code in the makefile now as this is where Ivan sent me to CALayer updating and wont a tree and said the thing should not be too cumbersome.
2014-12-17 17:34 GMT+01:00 David Chisnall <thera...@sucs.org>: > > On 17 Dec 2014, at 17:23, Johan Ceuppens <enrytheer...@gmail.com> wrote: > > > Hello, > > > > I am writing a small prolog system with a decision tree which > understands "not x" and "x" for now. This can be used in the CALayer as > said before by Ivan here. > > > > The interface is as follows : > > //make predicates which is an NSString > > OpalFuzzyPredicate *pred = [[OpalFuzzyPredicate alloc] init]; > > //initialize it with a string which in this case is multi-worded > > [pred initWithString:@"update full window"; > > Sending an init-family method to an object that has already been > initialised is usually undefined behaviour. > > I took everything out that way. > > //so it becomes a compound, which gets parsed and > > //adds comp to compound DB and compiles it into the tree > > InferenceCompound *comp = [factory makeCompound:pred]; > > What is factory? In Objective-C classes are usually factories, there's > little need for the factory pattern in a language where class methods can > be overridden. > > > > pred = [[OpalFuzzyPredicate alloc] init]; > > //initialize it with a string which in this case is multi-worded > > [pred initWithString:@"not update full window"; > > Once again. And why would you want to do this rather than reuse > NSPredicate, which can already represent and operate on predicates? > > Still have to look that up but I am not sure I want to use it as my predicate needs to be small at the handle. > > > > //so it becomes a compound, which gets parsed and > > //adds comp to compound DB and compiles it into the tree > > InferenceCompound *comp = [factory makeCompound:pred]; > > > > I will try to get this in if I can do it. > > Given your unwillingness to fully explain what you're doing and the > appalling quality of your code (some of the diffs you've posted obviously > wouldn't even compile due to mismatched braces, the rest is broken due to > poor understanding of Objective-C conventions), I'd be very hesitant about > your having commit access to a GNUstep repository until you've demonstrated > that: > > I implement by heart, I do not enter repetitive debugging phases. diffs are out, I upload to github, see below. > - You can communicate with other developers > Which I am doing. > - You can write useable code Tryout http://github.com/gnustep/gnustep-fuzzy it should work. Best regards, `Enry
_______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev