Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

pryrt's scratchpad

by pryrt (Prior)
on Mar 18, 2016 at 23:38 UTC ( #1158293=scratchpad: print w/replies, xml ) Need Help??

Links for quick reference

include the codified version for easy copy/paste

  • Short, Self-Contained, Correct Example = [id://1177642]
  • Floating Point

  • What Every Computer Scientist Should Know About Floating-Point Arithmetic = [https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html| What Every Computer Scientist Should Know About Floating-Point Arithmetic]
  • Data::IEEE754::Tools = [metamod://Data::IEEE754::Tools]
  • ?node_id=3989;BIT=floating;a=pryrt = [href://?node_id=3989;BIT=floating;a=pryrt]
  • Devel::Peek::Dump() for showing NV, IV, ...

  • To help me

  • Help for Free Nodelet Settings = Free Nodelet help
  • Good Intentions: Wikisyntax for the Monastery = Free Nodelet code to allow WikiSyntax for posting in the Monastery

    Long-Term Bookmarks

  • Book: Higher Order Perl
  • Perl REPL suggestions
  • Re: Moving from scripting to programming
  • bug in eval: eval { die }; if($@) {...} might not work; use eval { die; 1 } or do {...} or Try::Tiny instead
  • Handling Windows 'Junctions'
  • KeePass
          ▶ KeePassRest: access KeePass via REST-ful API (from thread Best way to store passwords)
          ▶ Excellent discussion of passwords in scripts / w/ keepass
  • CGI: FCGI + CGI::Fast | alt hippo++ | CGI::Lite (core) CGI::Simple CGI::Minimal CGI::Thin | Mojolicious::Lite Tutorial and Cookbook | Mojo+ParPacker | includes link to some mojo docs I haven't looked at
  • afoken's root-config-file editing daemon description
  • Getopt::Long + POD::Usage combo
  • stevieb's test structure, with Travis-CI
  • stevieb's creating XS from Inline::C
  • stevieb's cpan -autobundle for using same modules across perl distros
  • BrowserUK's math: 3d screw | HSV sigmoid
  • SQL over SSH Tunnel
  • Re^4: Turning a questionable string into a numberRe^3: unicode in windows → for win32 unicode access of files, use open(my $fh, '<...', $fn) or open(my $fh, '>...', $fn), where ... is :raw:utf8, :raw:encoding(utf16le), or :raw:encoding(utf16be) (as appropriate): modern note: open shows :encoding(UTF-8) as well; PerlIO indicates that :utf8 doesn't validate sequences on input, so :encoding(UTF-8) should be used instead (PerlIO::encoding)
  • Re^2: Find Created and Last Modified Date of Excel xls file
  • Re: Avoid keeping larger lists in Memory
  • Re: Eliminating userid/passwords in code
  • Re^5: Using a controllerless servo on the Raspberry Pi with Perl
  • Automated CPAN Testers reporting on Mac OS X available => 1nickt will run perlbrew--exec cpamn My::Module, and auto-load results to CPANTS
  • Re: regex for nested "<"/">' => choroba's simple and understandable example of Marpa::R2 grammar parser in action
  • Silence CPAN Testers on obviously broken platforms? => CPAN Testers: PASS/FAIL vs UNKNOWN vs NA (and how to return each to CPAN Tester Matrix)

  • Windows and PAR::Packer

    Inspired by this blog (which was linked from dasgar's post):

    C:\TEMP> mkdir tmp C:\TEMP> echo blah >> tmp\a.txt C:\TEMP> echo blah blah >> tmp\a.txt C:\TEMP> echo blah blah blah >> tmp\a.txt C:\TEMP> pp -o hello.exe -a tmp -e "use File::Spec; BEGIN { if(exists +$ENV{PAR_TEMP}) { my $d = File::Spec->catfile($ENV{PAR_TEMP}, 'inc'); + chdir $d or die qq(chdir '$d' failed: $!); }; }; open my $fh, '<', 'tmp/a.t +xt' or die qq(tmp/a.txt: $!); foreach (<$fh>) { print qq(a: $_); }" C:\TEMP> cd .. C:\> TEMP\hello.exe a: blah a: blah blah a: blah blah blah

    That's pretty cool. While testing that out, I was using both my "system" strawberry perl and my berrybrew perls, and discovered that I need to cpanm --force PAR::Packer, because of a compiler warning/error during one of the testing steps (of sha1.c). It installs and seems to work, but given the message

    gcc -c -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS +-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-alias +ing -mms-bitfields -I"C:\usr\local\apps\strawberry\perl\lib\CORE" - +DPARL_EXE=\"parl.exe\" -DPAR_PACKER_VERSION=\"1.036\" -s -O2 boot.c In file included from mktmpdir.h:85:0, from mktmpdir.c:1, from boot.c:10: sha1.c: In function 'sha_transform': sha1.c:146:2: warning: right shift count >= width of type T >>= 32; ^
    ... I am not sure that it will properly hash. (the 32bit perl installations didn't have that error, and so didn't need --force)

    PAR::Packer quirks


    Auto-added links


    High Performance Game of Life
    Re^2: How has Perl affected you?
    Re: Command Shell
    gpg using Crypt::OpenPGP
    function fitting


    EU::MM prereqs: specifying recommends and suggests (recommends is stronger than suggests, if I read it correctly)
    Re: perl create database with folder system
    Re: Execution hangs on File::Find: thanks to this article, and the linked http://perldoc.perl.org/perlvar.html#%24%7B%5EWIN32_SLOPPY_STAT%7D, I think I might be able to use that variable to speed up my at-home backup script...
    Perl, Android web app, AJAX, JSON
    Polygon Creation -- Request for Algorithm Suggestions
    RFC: 100 PDL Exercises (ported from numpy)
    Basic Neural Network in PDL
    Conways Game of Life in PDL












    Re^2: searching polygons not merged

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (7)
    As of 2020-04-03 19:33 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The most amusing oxymoron is:
















      Results (31 votes). Check out past polls.

      Notices?