<div dir="ltr">Hi everyone!<div><br></div><div>You may have seen <a href="http://lewisandquark.tumblr.com/">http://lewisandquark.tumblr.com/</a>, the blog of a researcher who uses deep neural networks to generate proverbs, Harry Potter fanfiction, plausible names for kittens, bands, Star Wars planets, etc. The author of the framework used takes it even further at <a href="http://karpathy.github.io/2015/05/21/rnn-effectiveness/">http://karpathy.github.io/2015/05/21/rnn-effectiveness/</a>, using neural networks to generate <i>algebraic geometry papers in LaTeX that damn' near compiles first time</i>, making it a better LaTeX coder than most mathematicians - and the text makes about as much sense as most algebraic geometry papers, too*.</div><div><br></div><div>Inspired by this, and James Mickens' comments about Perl in his essay The Night Watch (<a href="https://www.usenix.org/system/files/1311_05-08_mickens.pdf">https://www.usenix.org/system/files/1311_05-08_mickens.pdf</a> - read the whole thing), I thought I'd try using a neural network to generate Perl. I downloaded Karpathy's char-rnn framework onto an AWS deep-learning high-GPU instance and trained it on the Perl 5.16 core modules for an hour or so. Here are some results, at successive stages of training:</div><div><br></div><div><br></div><div><div>Af opdiir fust be deturn</div><div>i perless use sige-C. 5., in ored: foiny purger arl be 2il zefsip dule dx</div><div>- use C<$ndmriv qw 1,@.</div><div><br></div><div>=item C<chrel;</div><div>is jch</div><div><br></div><div>use MOCE_TE L SEMP => 0, CAK;</div><div>use CFCOUK_> is 'st cut asher dir by $_,..), char fuvpe ar a ure subgs</div><div>ItO; my constant ond (and dastpinatian as</div><div>meuod.</div></div><div><br></div><div><br></div><div>Sampled from Acme::Chaucer, perhaps?</div><div><br></div><div><br></div><div><div>sub _close_name { require $did, \&not; even( $cx . ', ) to join " map"", 24%]\n") }</div><div>sub point_files_tok { 1 cloar</div><div>                # _uilops made above a value</div><div>        # sqrt( f.) as number inhernal dow recorst from read1 nece_lanc/Qirds"</div><div>        unless ($x eq 'SPEC')      (sqrt(1),->[0]);             # 25s"</div><div>      }</div><div>      degain @{$n->[1]}' },</div><div>                        | pA<(  [x,s[r,));</div><div>           $parser{$sing} = $textdomain if $options{$cunc};</div><div>        # indectvilication of</div><div>                # Make toherride</div><div>                    $class .= defined $pp in $cv ? "$_[1]", \$typecislation]';</div><div>                return "\"   /exists eq "[\\L\\\\[",</div><div>                          hex $$prcf)";</div><div>        return undef $sytv{$r};</div><div>        }</div><div>}</div><div>@invlistS->out;</div><div># tigetlest of a does no level, or thy offset:</div></div><div><br></div><div><br></div><div>Getting warmer, though still a little Shakespearean.</div><div><br></div><div><div><br></div><div>=head1 SYNOPSIS</div><div><br></div><div>  use Time::Local;</div><div><br></div><div>  my $index = $obj - $self->{'Thispara'} ? $arg->batch_mode($recode, $port);</div><div>  return '...'s</div><div>  - if index & no open2: $obj, host';</div><div>  $num_short = svent();</div><div>  return 1;</div><div>  }</div><div><br></div><div>  return   grep ! $singhe > 10 );</div></div><div><br></div><div><div><br></div></div><div>Moving on...</div><div><br></div><div><br></div><div><div>sub set_use_utf8_stringy_for_cases</div><div>{</div><div>    my ($self, $url, $array, $_line,  $subseq) = @_;</div><div><br></div><div>    if ($self->{"seq"} eq $self->{"pid"}) {</div><div>        $ip = $self->is_pageap($self->pitpath_size($path, $retvals);</div><div>            DEBUG > 1 and print " PerlCaintor_head for some storain time with Reven Reposition!\n" if sall error with "#reviae""</div><div>              $arg->{name})) if $self->{undef_text} || "';</div><div>            $path = $self->DEE Windows --$initial_tabunt+Otigs_msg;                   );</div><div>        }</div><div>    });</div><div>}</div></div><div><br></div><div><br></div><div>And here's some output from the most recent checkpoint:</div><div><br></div><div><br></div><div><div>modichion(), for $x > 2)</div><div><br></div><div>Month did not copy the directory as ASCII.<br></div><div><br></div><div>This will need to use the copy to disable them misleven.</div><div><br></div><div>=cut</div><div><br></div><div># GetOptions_argument spaces may still already yet, [. no command @cnd->register_unix_rc_file</div><div><br></div><div>sub do({})$KB::binwhost} {</div><div>    require POSIX*text    bull if @_;</div><div>    eval { dtack => 000000 };</div><div>    my $code = caller;</div><div>    $obj->EVERY::LangVarAdate($fh, $flag);</div><div>    $space .= '|doesn' or tagname => '$local_addr' };</div><div><br></div><div>Pod::Simple::DEBUG (server extension tree and whenever every unexpandid.</div><div><br></div><div>=head1 NAME</div></div><div><div><br></div><div>Pod::Simple objects in in pre-same as Procusesen-regex</div><div><br></div><div>use Config;</div><div>if $_[0] {</div><div>    local(*>), pack(" glob),</div><div>              SCALAR => [Metackeque_legator,</div><div>                The Perl scalar data local *OS/TODE::/own.gat/params";</div><div>        next if %s</div><div>        carp _command_syscopy($fn), @files ],</div><div>                = @global;</div><div>        sub import</div><div><br></div><div>        "Digest 's 2-lingain\n",</div><div>                = package;</div><div>            if (exists $tryopen) {</div><div>            $self->{targless} = $tabstop - 1;</div><div>        }</div><div>        elsif ( $</div><div>                      {</div><div>            unshift @to_unget,</div><div>                                           );</div><div>                return ();</div><div>    }</div><div>#    }</div></div><div><div>    $to_ungers->{$output} ||= 0;</div><div>}</div><div><br></div><div>=item $_</div><div><br></div><div>The function named scopy "i.png") or one of the integer hasnct</div><div>system until the file can be interested and executed to commony then the destination constructor is imperred,</div><div>or the sqrt_data</div><div>is translined directory. It is not match from this object rmrithed</div><div>succeditions (e.g. C<utf8::is_scope(...)> in their object.</div><div>Instead of a file, but this is with the I<scalar_hash>. They increases C<@ARGV>, B<tabrit></div><div>are passed.</div></div><div><br></div><div><br></div><div>I'll train it a bit longer and see what happens :-)</div><div><br></div><div>Miles</div><div><br></div><div>* IANAAG</div></div>