laziness, impatience, and hubris PerlMonks

### Re: When I'm arguing with a fool...

by papidave (Monk)
 on Sep 06, 2007 at 16:16 UTC ( #637471=note: print w/ replies, xml ) Need Help??

in reply to When I'm arguing with a fool...

Proverbs 26:4-5:
Do not answer a fool according to his folly, or you will be like him yourself.

Answer a fool according to his folly, or he will be wise in his own eyes.

I'm not terribly good with implementing nondeterministic logic myself, but I think we could do it with the following snippet:
```   my \$folly = \$fool->folly;
if ( fork() )
{
# child process
}
else
{
# parent process
}
Comment on Re: When I'm arguing with a fool...
Replies are listed 'Best First'.
Re^2: When I'm arguing with a fool...
by papidave (Monk) on Sep 07, 2007 at 21:43 UTC
I had some time to think about it, and realized that my code isn't valid. My earlier example depends on a race condition to select one state or the other. What I _should_ have done is implement a solution that acts both ways without interference:
```  my \$folly = \$fool->folly;
my \$tabby = new Cat( owner => 'Schroedinger' );

answer( \$folly ) if ( \$tabby->alive );
answer( not \$folly ) unless ( \$tabby->alive );
The problem I've been running into is that the first time I call Cat::alive(), the quantum decoherence collapses, and it only invokes answer() once. Does anyone have a method for measuring the "alive" state of \$tabby without actually looking into the box? I think I need to modify the implementation of sub alive() ...
```use Quantum::Superpositions;

any( 0, 1 )
}

+es();
A word spoken in Mind will reach its own level, in the objective world, by its own weight

Create A New User
Node Status?
node history
Node Type: note [id://637471]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2016-05-02 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
What font do you use for programming?

Results (41 votes). Check out past polls.