<?xml version="1.0" encoding="windows-1252"?>
<node id="137386" title="blokhead" created="2002-01-09 03:56:48" updated="2009-01-12 11:25:25">
<type id="15">
user</type>
<author id="137386">
blokhead</author>
<data>
<field name="doctext">
&lt;h2&gt;About me:&lt;/h2&gt;

My sig (similar in spirit to [id://290607]):

&lt;code&gt;
perl -le 'exp tr qw s my not vec eq abs do le chop q ge print
          lc if sort s qq socket y qx cmp s q qq or rand chop'
&lt;/code&gt;

Here is a related hello world:


&lt;code&gt;
sort cos or s qq q and s
m m print chr ord for qw
q hex eval le lt oct q m
and eval xor uc print lc
qq m m and eval qq x not
sin print chr ord for qw
q warn open ref le do qx
xor sleep log print qq q
q if localtime sqrt chop
&lt;/code&gt;

&lt;!-- ####################################### --&gt;
&lt;h2&gt;My bookmarks:&lt;/h2&gt;

I tend to bookmark nodes related to theoretical topics like applied discrete math, algorithms, computability &amp; complexity.

&lt;ul&gt;
  &lt;li&gt;[id://25833]
  &lt;li&gt;[id://134202]
  &lt;li&gt;[id://224866] (expressivity of Perl regexes)
  &lt;li&gt;[id://227909] (except that [id://227946|this reply] is dead wrong)
  &lt;li&gt;[id://273638] (joint Kolmogorov complexity approximation)
  &lt;li&gt;[id://428614] (halting problem undecidability proof in 3 lines of perl)
  &lt;li&gt;[id://428794] (modern computers = finite state machines)
  &lt;li&gt;[id://432598] (NP-complete subset sum in disguise)
  &lt;li&gt;[id://436872] ("NP-complete" &amp;ne; "don't bother")
  &lt;li&gt;[id://493575] (algorithmic analysis &amp; assumptions)
  &lt;li&gt;[id://496388] (NP-complete bin-packing in disguise)
  &lt;li&gt;[id://540810]
  &lt;li&gt;[id://573138]

&lt;/ul&gt;

And a handful of fallacious uses of theoretical computer science (the hall of shame!):

&lt;ul&gt;
  &lt;li&gt;[id://227946] (n/2 &amp;ne; log(n))
  &lt;li&gt;[id://284516] (decision properties of regular languages are decidable)
  &lt;li&gt;[id://436070] (halting problem &amp;ne; infinite loop)
  &lt;li&gt;[id://501536] (halting problem &amp;ne; Church-Turing thesis)
&lt;/ul&gt;

I also have a soft spot for iterators that generate combinatorial objects:
&lt;ul&gt;
  &lt;li&gt;[id://386571|Partitions of integers &amp; sets]
    &lt;ul&gt;
    &lt;li&gt;[id://533530]
    &lt;li&gt;[id://533164]
    &lt;li&gt;[id://621859]
    &lt;/ul&gt;
  &lt;li&gt;[id://406984|Restricted integer partitions] (i.e, making change for an amount)
    &lt;ul&gt;
    &lt;li&gt; [id://546438]
&lt;!--   &lt;li&gt; [id://546465] (callback-based) --&gt;
    &lt;/ul&gt;
  &lt;li&gt;[id://371228|Combinations] (subsets of a fixed size)
  &lt;li&gt;[id://128293|Power set] (all subsets)
  &lt;li&gt;[id://29374|Permutations] (works for multisets, too)
  &lt;li&gt;[id://519815|Derangements] (permutations with no fixed points)
    &lt;ul&gt;
    &lt;li&gt; See also [id://728778] for how to uniformly sample derangements
    &lt;/ul&gt;
&lt;/ul&gt;

Techniques/inspiration for writing iterators in general:

&lt;ul&gt;
  &lt;li&gt;[http://www.perl.com/pub/a/2005/06/16/iterators.html|Understanding &amp; Using Iterators] (writing encapsulated iterators; offsite)
  &lt;li&gt;[id://458418] (converting recursions into callback-based iterators).
  &lt;li&gt;[id://522316] (callback-based iterators with NestedLoops)
  &lt;li&gt;[id://640390] (another general-purpose iterator transformation)
  &lt;li&gt;[http://www.theory.cs.uvic.ca/~cos/cos.html|Combinatorial Object Server] (offsite)
&lt;/ul&gt;


Other miscellaneous useful nodes:

&lt;ul&gt;
  &lt;li&gt;[id://284436]
  &lt;li&gt;[id://273638] (approximation of mutual information, using compression)
    &lt;ul&gt;
    &lt;li&gt;[id://640714]
    &lt;/ul&gt;
  &lt;li&gt;[id://541740] (Y combinator)
    &lt;ul&gt;
    &lt;li&gt;[http://use.perl.org/~Aristotle/journal/30896|Aristotle's use.perl journal entry] on Y combinators
    &lt;/ul&gt;
  &lt;li&gt;[id://553889]
  &lt;li&gt;[http://www.dangermouse.net/esoteric/intelligentdesignsort.html|My new favorite sorting algorithm] (offsite, not safe for the humor-deficient)
  &lt;li&gt;[http://www.securiteam.com/securityreviews/6D0042AEUQ.html|Perl Format String Vulnerabilities] -- good overview of s/printf security issues (offsite)
    &lt;ul&gt;
    &lt;li&gt;[id://330838]
    &lt;li&gt;[id://406717]
    &lt;/ul&gt;
&lt;/ul&gt;


&lt;h2&gt;My contributions:&lt;/h2&gt;

Here are some of my highest-ranked nodes:

&lt;ul&gt;
&lt;li&gt; [id://290607]
&lt;li&gt; [id://329492]
&lt;li&gt; [id://298341]
&lt;li&gt; [id://298877]
&lt;li&gt; [id://433169]
&lt;li&gt; [id://438118]
&lt;li&gt; [id://583727]
&lt;/ul&gt;

Code snippets I've posted that might be of general interest (and things I keep having to search for):

&lt;ul&gt;
  &lt;li&gt;[id://242751]
  &lt;li&gt;[id://301122]
    &lt;ul&gt;
     &lt;li&gt;See also solutions to [http://osdir.com/ml/lang.perl.qotw.discuss/2005-01/msg00003.html|Perl QOTW]
    &lt;/ul&gt;
  &lt;li&gt;[id://312367]
  &lt;li&gt;[id://325389]
  &lt;li&gt;[id://357826] (see very bottom 2 lines)
  &lt;li&gt;[id://371228]
  &lt;li&gt;[id://386571]
  &lt;li&gt;[id://453733]
  &lt;li&gt;[id://463519]
    &lt;ul&gt;
    &lt;li&gt;[id://544766] (with captures)
    &lt;/ul&gt;
  &lt;li&gt;[id://475645] (ranking &amp; unranking combinations)
    &lt;ul&gt;
    &lt;li&gt;[id://608176]
    &lt;/ul&gt;
  &lt;li&gt;[id://522270]
  &lt;li&gt;[id://528524] (representing arithmetic expressions for pretty-printing)
  &lt;li&gt;[id://533530]
  &lt;li&gt;[id://547026] (code for calculating GCD with [http://mathworld.wolfram.com/BezoutNumbers.html|Bezout coefficients]; i.e, the extended Euclidean algorithm)
  &lt;li&gt;[id://621859]
&lt;/ul&gt;

I like to ramble about theoretical mumbo-jumbo:

&lt;ul&gt;
  &lt;li&gt;[id://348555] (NP-complete problem in disguise)
  &lt;li&gt;[id://347536] (secret-sharing and information theory)
  &lt;li&gt;[id://390969] (information theory)
  &lt;li&gt;[id://406290] (universality of computational models)
  &lt;li&gt;[id://423543] (decision problems of regular languages)
    &lt;ul&gt;
    &lt;li&gt;[id://531742]
    &lt;li&gt;[id://588368] 
    &lt;li&gt;[id://757306] 
    &lt;/ul&gt;
  &lt;li&gt;[id://433921] (decision tree learning)
&lt;!--  &lt;li&gt;[id://453676] (dynamic programming, even though my assumptions about the problem were wrong: see [tilly]'s response) --&gt;
&lt;!--  &lt;li&gt;[id://458197] (dynamic programming) --&gt;
  &lt;li&gt;[id://498965] (pseudorandom generation)
  &lt;li&gt;[id://508728] (recasting a problem in terms of regular languages)
  &lt;li&gt;[id://644964] (an application of biconnectivity in graphs)
&lt;/ul&gt;



&lt;!-- ####################################### --&gt;
&lt;h2&gt;Evolutionary algorithms links:&lt;/h2&gt;

In a previous life, I was very interested in evolutionary algorithms. Here are some (biased) links, which are by now terribly out-of-date:

&lt;p&gt;

Perl Modules:
  &lt;ul&gt;
&lt;li&gt;[http://search.cpan.org/dist/Algorithm-Evolve/|Algorithm::Evolve], by me! Flexible enough for lots of experimenting, but not comprehensive.
&lt;li&gt;[http://opeal.sourceforge.net/|Algorithm::Evolutionary] probably most complete (and complex).
&lt;li&gt;[http://search.cpan.org/dist/AI-Genetic/|AI::Genetic] also looks like a good choice, though I haven't looked at it throroughly.
&lt;li&gt;[id://81678], no crossover operators.
&lt;li&gt;[http://www.skamphausen.de/software/AI/ga.html|AI::GA], little control over selection/replacement. String chromosomes only.
  &lt;/ul&gt;

Other articles/resources with a decidedly Perl flavor:

  &lt;ul&gt;
&lt;li&gt;[id://298877] by yours truly.
&lt;li&gt;[http://www-106.ibm.com/developerworks/linux/library/l-genperl/?open&amp;l=805,t=grl,p=genPerl|Genetic algorithms applied with Perl], from IBM's "Cultured Perl" column
&lt;li&gt;[http://geneura.ugr.es/~jmerelo/evolutionary-computation-perl/book1.html|Evolutionary computation in Perl] and some [http://geneura.ugr.es/~jmerelo/yapc-europe-slides/text0.htm|YAPC presentation slides] from the author of [http://opeal.sourceforge.net/|Algorithm::Evolutionary]
&lt;li&gt;Online lecture notes: [http://www.math.iastate.edu/danwell/ma378/math378.html|Optimization &amp; Modelling With Artificial Life], by Dan Ashlock (my old professor)
  &lt;/ul&gt;

Misc:

 &lt;ul&gt;
  &lt;li&gt;[id://31147]. I also wrote a reimplementation of this idea using my [cpan://Algorithm::Evolve] module. It's included in the distribution's examples.
  &lt;li&gt;[id://432801]
  &lt;/ul&gt;



&lt;h2&gt;Random:&lt;/h2&gt;

What famous people had to say about me:

&lt;ul&gt;

&lt;!-- http://www.lhup.edu/~dsimanek/muirbook.htm --&gt;
&lt;li&gt;&lt;i&gt;"The vanity of teaching doth oft tempt a man to forget he is a blockhead."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- George Savile, first Marquis of Halifax, 1633-1695

&lt;!-- http://www.brainyquote.com/quotes/keywords/blockhead.html --&gt;
&lt;li&gt;&lt;i&gt;"The great person is ahead of their time, the smart make something out of it, and the blockhead, sets themselves against it."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Jean Baudrillard
    
&lt;li&gt;&lt;i&gt;"A learned blockhead is a greater blockhead than an ignorant one."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Benjamin Franklin

&lt;li&gt;&lt;i&gt;"No man but a blockhead ever wrote except for money."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Samuel Johnson

&lt;li&gt;&lt;i&gt;The bookful blockhead, ignorantly read
    &lt;br&gt;With loads of learned lumber in his head.&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Alexander Pope

&lt;li&gt;&lt;i&gt;"The liar at any rate recognizes that recreation, not instruction, is the aim of conversation, and is a far more civilised being than the blockhead who loudly expresses his disbelief in a story which is told simply for the amusement of the company."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Oscar Wilde

&lt;li&gt;&lt;i&gt;"A grave blockhead should always go about with a lively one - they show one another off to the best advantage."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   -- William Hazlitt

&lt;!-- http://www.giga-usa.com/quotes/topics/blockhead_t001.htm --&gt;

&lt;li&gt;&lt;i&gt;"A blockhead cannot come in, nor go away, nor sit, nor rise, nor stand, like a man of sense."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Jean de la Bruyere

&lt;li&gt;&lt;i&gt;"There never was any party, faction, sect, or cabal whatsoever, in which the most ignorant were not the most violent; for a bee is not a busier animal than a blockhead."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Alexander Pope

&lt;li&gt;&lt;i&gt;"Being a blockhead is sometimes the best security against being cheated by a man of wit."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- François, Duc De La Rochefoucauld

&lt;li&gt;&lt;i&gt;"When there is sympathy, there needs but one wise man in a company and all are wise,—so, a blockhead makes a blockhead of his companion. Wonderful power to benumb possesses this brother."&lt;/i&gt;
&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;    -- Ralph Waldo Emerson



&lt;/ul&gt;

&lt;!-- ####################################### --&gt;
Silly Perlmonks milestones:

&lt;ul&gt;
&lt;li&gt;2003-10-12 &amp;bull; 197 posts &amp;bull; 3000 xp &amp;bull; 228th saint
&lt;!-- &lt;li&gt;2004-02-02 &amp;bull; 224 posts &amp;bull; 4186 xp &amp;bull; &lt;tt&gt;$blokhead-&gt;{xp} == $[merlyn]-&gt;{writeups}&lt;/tt&gt; --&gt;
&lt;li&gt;2004-05-13 &amp;bull; 278 posts &amp;bull; 5000 xp
&lt;li&gt;2004-09-06 &amp;bull; 334 posts &amp;bull; 6000 xp
&lt;li&gt;2004-10-28 &amp;bull; 360 posts &amp;bull; 6400 xp &amp;bull; top 100
&lt;!-- &lt;li&gt;2005-02-22 &amp;bull; 375 posts &amp;bull; 6817 xp &amp;bull; 10^6 points until level [vroom] --&gt;
&lt;li&gt;2005-03-10 &amp;bull; 385 posts &amp;bull; 7000 xp
&lt;li&gt;2005-10-04 &amp;bull; 437 posts &amp;bull; 8000 xp
&lt;!-- &lt;li&gt;2006-02-27 &amp;bull; 475 posts &amp;bull; 8675 xp &amp;bull; top 90 --&gt;
&lt;li&gt;2006-04-29 &amp;bull; 489 posts &amp;bull; 9000 xp &amp;bull; 90th Prior
&lt;li&gt;2007-03-24 &amp;bull; 526 posts &amp;bull; 10000 xp
&lt;li&gt;2007-12-17 &amp;bull; 575 posts &amp;bull; 11000 xp
&lt;li&gt;2009-10-14 &amp;bull; 631 posts &amp;bull; 12000 xp &amp;bull; 102nd Monsignor (I sure have slowed down!)
&lt;/ul&gt;

Monks I've met in meatspace:

&lt;ul&gt;
&lt;li&gt; [ryddler] ([http://cmi.pm.org|cmi.pm])
&lt;li&gt; [kutsu]
&lt;li&gt; [bobf]
&lt;li&gt; [perlfan]
&lt;/ul&gt;

&lt;p&gt;
&lt;style type=text/css&gt;&lt;!--
.main_content table table tr + tr + tr td + td :after { content: " ± \03B5"; }
.main_content table table tr + tr + tr + tr td + td :after { content: ""; }
//--&gt;&lt;/style&gt;</field>
<field name="lasttime">
2011-09-23 14:11:44</field>
<field name="experience">
12463</field>
<field name="user_scratchpad">
358374</field>
<field name="imgsrc">
0</field>
<field name="timeformat">
%A, %B %e, %Y, %l:%M %p</field>
<field name="numwriteups">
654</field>
<field name="location">
Montana</field>
<field name="timezone">
America/Denver</field>
<field name="codewrapoff">
on</field>
<field name="codewraplength">
80</field>
<field name="codeautowrap">
</field>
<field name="codeprefix">
</field>
<field name="codebig">
</field>
</data>
</node>
