Rules of programming?

Started by newdep, October 19, 2004, 03:11:08 PM

Previous topic - Next topic

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.
-- (define? (Cornflakes))

pjot

#1
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)

newdep

#2
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!
-- (define? (Cornflakes))

newdep

#3
Actualy how many "if then else/perhpas" statements

does/could a 'couldbe function have?
-- (define? (Cornflakes))

pjot

#4
You try to do something impossible -> you want to catch something which is undetermined into a determined structure...

newdep

#5
Yes/..thats what i said... the basis is not oke ;-)



Aaaa forget it... i know the answer already anyway ;-)
-- (define? (Cornflakes))

Lutz

#6
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 :-)