Name: Anonymous 2015-11-08 23:54
Have you read about your VISITOR PATTERN today my fellow APPERS?
/^^^^^^^^^\ Memory Engrams Are Laid Down At The /^^^^^^^^^\
/ visual \ Advancing Front Of Consciousness / auditory \
/ memory \ _________ / memory \
| channel | / English \ | channel |
| | \ syntax /---|-------------\ |
| /--------|--------\ \_______/ | | |
| | recog-|nition | | | | |
| ___|___ | ___V__ ___V_ | ________ | |
| /image \ | / \ fex / \ | / \ | |
| / percept \---|---/Psi EnX \-----/English\----|-/ AudMem \| |
| \ engrams /---|---\concepts/-----\lexicon/----|-\ phonemes / |
| \_______/ | \______/ fin \_____/ | \________/ |
Composite (hierarchical structures) → recursive datatypes
Iterator (linear traversals over the elements of a collection) → maps
Visitor (structured traversals also exploiting the shape of a collection) → folds
Builder (separating the construction of an object from its representation) → unfolds and builds
#!/usr/bin/perl
$IQ = 0; # PERL by Example (2015), p. 17
while ($IQ < 8) { # PERL by Example (2015), p. 190
print "IQ = $IQ Enter new IQ: ";
$IQ = <STDIN>; # PERL by Example (2015), p. 50
} # End of mind.pl program for coding Strong AI in Perl
#!/usr/bin/perl
use strict; # PERL by Example (2015), p. 77
use warnings; # PERL by Example (2015), p. 85
our $IQ = 0; # PERL by Example (2015), p. 689
sub sensorium; # PERL by Example p. 351 Forward declaration
sub think; # PERL by Example p. 351 Forward declaration
while ($IQ < 8) { # PERL by Example (2015), p. 190
sensorium(); # PERL by Example p. 350: () empty parameter list
think(); # PERL by Example p. 350: () empty parameter list
} # End of main loop calling AI subroutines
sub sensorium() { # Start sensory input.
print " Sensorium: Enter new IQ: ";
$IQ = <STDIN>; # PERL by Example (2015), p. 50
} # End of sensorium subroutine.
sub think() { # Start showing output as if generated by thinking.
print "Think: My IQ is now $IQ";
} # End of mind.pl program for coding Strong AI in Perl
/^^^^^^^^^\ AI Minds Think in Three Languages /^^^^^^^^^\
/ visual \ / auditory \
/ memory \ T / memory \
| _______asso-|ciative | ________ | channel |
| /image \rec-|ognition | / GERMAN \ | |
| / percept \---|---------+ \________/ | |
| \ engram / |tag c|f __________ | |
| \_______/ | o|i / RUSSIAN \ | |
| | n|b \__________/ | |
| | c|e _________ | |
| | e|r / ENGLISH \ | |
| | p|s \_________/---|-------------\ |
| _______ | t| flush-vector| | ________ | |
| /fresh \ | ___|__ ____V__ | / \ | |
| / image \ | / Psi \-----/ En \----|-/ Aud \| |
| \ engram /---|----/concepts\---/ lexicon \---|-\ phonemes / |
| \_______/ | \________/ \_________/ | \________/ |