gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Painter Fuzzy Node in github


From: Gregory Casamento
Subject: Re: Painter Fuzzy Node in github
Date: Wed, 17 Dec 2014 12:04:55 -0500

On Wed, Dec 17, 2014 at 12:01 PM, Johan Ceuppens <address@hidden> wrote:
> Hello,
>
> 2014-12-17 17:34 GMT+01:00 David Chisnall <address@hidden>:
>>
>> On 17 Dec 2014, at 17:23, Johan Ceuppens <address@hidden> 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 didn't know. I thought init was part of NSObject.
>
>>
>> >        //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.
>
>
> The factory pattern makes for a static if you like, it's interface is like :
> <code>
> @interface OpalFuzzyDTreeFactory
> {
>         OpalFuzzyInference *_inference;
> }
> - (id) makeDTree;
> - (id) makeADT:(OpalFuzzyPredicate*)p with:(Class)adt;
> - (id) makeAtom:(OpalFuzzyPredicate*)p;
> - (id) makeVar:(OpalFuzzyPredicate*)p;
> - (id) makeNumber:(OpalFuzzyPredicate*)p;
> - (id) makeCompound:(OpalFuzzyPredicate*)p;
> - (id) compileToTree:(InferenceADT*)adt;
> //_inference wrapper
> - (id)createInferenceManipulator;
> @end
>  </code>
>>
>>
>> >
>> >         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?
>>
>
> If it's in Foundation OK then.
>
>>
>> >
>> >         //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:
>>
>> - You can communicate with other developers
>> - You can write useable code
>>
>
> Don't worry, I'll do that off-list :-)
>

I would prefer that you do it on-list if possible.   Becoming a
contributor is something the maintainers will have to come to a
consensus about.  At this point I concur with David.  You need to more
fully explain what it is you're trying to accomplish.

GC
-- 
Gregory Casamento
GNUstep Lead Developer / OLC, Principal Consultant
http://www.gnustep.org - http://heronsperch.blogspot.com
http://ind.ie/phoenix/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]