Rules of programming?

For the Compleat Fan
Locked
newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Rules of programming?

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

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post 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)

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

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

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

Actualy how many "if then else/perhpas" statements
does/could a 'couldbe function have?
-- (define? (Cornflakes))

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post by pjot »

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

newdep
Posts: 2038
Joined: Mon Feb 23, 2004 7:40 pm
Location: Netherlands

Post by newdep »

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

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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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 :-)

Locked