Page 1 of 1

Rules of programming?

Posted: Tue Oct 19, 2004 10:11 pm
by newdep
If we would 'let the rules the rules and define order in a different way then it
should be possible to have functions like ->

'perhpas 'maybe 'couldbe ....

An intresting theory it is that the basics of computer calculation is based on
the black/white should/is mustbe/cantbe and 1/0 perspective...

I already broke my mind on this issue when i used rebol for it and ended up
creating loops. just because programming languages arent realy fit for it and
the basis is not designed for it...

still i like to give it an extra try ;-)
could a function like 'perhpas 'maybe and 'couldbe survive ?
the next question is directly Is it usefull :)

(couldbe (!= 1 1) 'true 'nil 'perhpas)

Dont take it too seriously...
Norman.

Posted: Tue Oct 19, 2004 10:17 pm
by pjot
Well a 'maybe' is undefined... how can a computer make a decision based on maybe?

If you look at this issue in a trinairy way, maybe you can get somewhere:

(define maybe (and (!= x 0)(!= x 1)) true)

Posted: Tue Oct 19, 2004 10:25 pm
by newdep
Well yes and no...because a 'maybe = 'couldbe as where a 'shouldbe
is always true or 'nil in newlisp...

...still a 'False could become a 'couldbe in newlisp...

(if (= 1 1) 'true 'nil 'couldbe ) In not all situations we can say for sure that a value
'willbe 1 or 0 thus that gives us the 'perhaps factor...

'couldbe is not a randomizer ist also not fully a 'perhpas...

'couldbe "could be fitting into".. is a good descritpion i think...

still implanting a 'couldbe into a program 'wouldbe asking for true or nil in the
end anyway... ;-) Which does not take away that a 'couldbe result isnt there!

Posted: Tue Oct 19, 2004 10:29 pm
by newdep
Actualy how many "if then else/perhpas" statements
does/could a 'couldbe function have?

Posted: Tue Oct 19, 2004 10:35 pm
by pjot
You try to do something impossible -> you want to catch something which is undetermined into a determined structure...

Posted: Tue Oct 19, 2004 10:39 pm
by newdep
Yes/..thats what i said... the basis is not oke ;-)

Aaaa forget it... i know the answer already anyway ;-)

Posted: Wed Oct 20, 2004 1:48 am
by Lutz
You just reinvented "Fuzzy Logic". There are in fact computer algorithms working along these lines of 'could be', etc. Fuzzy Logic tries to re-formulate logic principles in a probabilistic fashion. It is mostly the Japanese industry which has taken advantage of this. Algorithms to focus your electronic camera and 'many embedded systems' control algorithms employ 'fuzzy logic' and/or 'fuzzy programming' for decision making and feedback control tasks.

Lutz

ps: not to be confused with 'Fuzzy Thinking' after too much beer consumption :-)