I refused to stand by and let my kids 'learn' that "elemeno" and "and" are two of the 24 letters of the English alphabet, as so many children 'learn' from the ubiquitous Alphabet Song. The transformation of the song is nearly trivial, using the exact same tune, and can be illustrated by drawing out the two versions, two characters per beat:

Cool vi macro: @p runs Perl code between #! and __END__ lines on any text after the __END__, preserving the perl code. The "let" command to set @p only works in vim, but the macro (drop the quotes and replace \r with ^V^M -- probably by typing ^V^V^V^M) works in any reasonable vi-alike.

L goes to the bottom of the current screen so that the next bit is unlikely to fail (which would halt the macro); ?^#! searches for the first line of the 'script'; /^__END__ searches for the end of what needs to be pasted because it won't be output when perl is run; y'' yanks from the __END__ through the #! line; '' jumps back to the __END__; p pastes the perl code (so the original copy above can remain in the editor buffer); !Gperl runs the bottom of the file (the freshly pasted Perl code and the text to be filtered). G goes to the bottom of the results after filtering.

For example, when processing error logs (which are usually too verbose for any one task), I'll trim the log repeatedly, often reusing parts of saved trimming code (in part because I prefer Perl regexes). Part of the value of this method is if I get such code wrong, I can just "u" (undo), adjust the code, and try again. (But I also often have filters that makes sense to apply more than once.)

dynamic_cast support is optional and our group has chosen to turn
it off (not sure what the pay-off for that is), see /GR-

the data type of that last expression should resolve to
const char* (the return type of the operator) but it instead
complains that the type of GetStreamString() can be converted to that

My guess is that the second item is simply a compiler bug.

Anyway, perhaps someone else will find it useful.

#!/usr/bin/perl -w
use strict;
sub X() { 0 }
sub Y() { 1 }
# Given a line segment from point A to point B:
my @A= splice @ARGV, 0, 2;
my @B= splice @ARGV, 0, 2;
# And another point P:
my @P= splice @ARGV, 0, 2;
# Translate point A to be the origin of the
# plane (subtract A from the other points):
my @B1= ( $B[X]-$A[X], $B[Y]-$A[Y] );
my @P1= ( $P[X]-$A[X], $P[Y]-$A[Y] );
# Rotate the plane so B is on the X axis:
# (Also expands the plane by a factor
# equal to the length of the line segment)
@P1= ( $P1[X]*$B1[X] + $P1[Y]*$B1[Y],
$P1[Y]*$B1[X] - $P1[X]*$B1[Y] );
@B1= ( $B1[X]*$B1[X] + $B1[Y]*$B1[Y], 0 );
# You can now find the closest point on the line:
# (let $t=0 represent A and $t=1 represent B)
my $t= $P1[X]/$B1[X];
my @I= ( (1-$t)*$A[X] + $t*$B[X],
(1-$t)*$A[Y] + $t*$B[Y] );
# And/or, find the length of the line segment
# and the distance from the point to the line:
my $len= sqrt( $B1[X] );
# Add abs() if you don't want to know
# which side of the line the point is on:
my $dist= $P1[Y]/$len;
# Might as well compute the area of our triangle:
my $area= $len*abs($dist)/2;
print "I=( $I[X], $I[Y] ) t=$t\n";
print "dist=$dist len=$len area=$area\n";

based on graphic (cc) by Jeff Zucker, jZed
the estatat mantra: It is by will alone I set your things in motion. It is by the signature that wills acquire legitimacy, the fingers acquire stains, the stains become an eyesore. It is by will alone I set your things in motion.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other