Links for quick reference

2021-Feb-11: saw erzuuli CB [abbr://PM], so now I must test: try [abbr://PM] = PM or [abbr://Auto Abbrev|After Pipe] = After Pipe or [abbr://SSCCE] = SSCCE

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 = [| 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 -- BUK's includes windows memory usage sub mem { `tasklist /nh /fi "PID eq $$"`=~ m[(\S+ K)$] }
  • 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 test structure, with GitHub Actions
  • 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

    Login With ...

    After recent discussions of Mojolicious::Lite login examples (first steps with Mojolicious::Lite and RFC / Audit: Mojo Login Example), and some of my recent thoughts about LDAP, the Need help with AWS Cognito question caught my eye: I would love to see one of the example M::L apps updated to use Login with Google, Login With Facebook, and similar for other OAuth providers (preferrably multiple providers at once).

    This article shows how he did a quick login-with-Google, which might be a good starting point.

    Post Re: LWP::Authen::OAuth2 terminology describes possible procedure for using LWP::Authen::OAuth2 to login with google or similar

    Even better, I decided to search Mojo for "OAuth2" and found Mojolicious::Plugin::OAuth2, which is exactly what I was thinking about without having to re-invent the wheel.


    I had seen mention of FFI::Platypus before, but Re^2: Modernizing the Postmodern Language? had me take a quick look from a different perspective -- I had thought it was supposed to provide a way to access external libraries, but from the documentation I had linked before, I got too confused. This time, I was able to find an example of accessing kernel32.dll ... and with that, it _might_ be possible to replace my monster amalgamation of Win32::API, Win32::GUI, and Win32::GuiTest -- though I might still want GuiTest separate during the module tests, because it's a pretty clean way for remote-controlling the GUI

    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, 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
    Re^3: first steps with Mojolicious::Lite
    haukex's scratchpad -- has multiple Mojo/Mojo::Lite examplesP
    Dataflow programming on CPU and GPU using AI::MXNet
    Converting Hashes to Objects
    dear Mom -
    [RFC] Discipulus's step by step tutorial on module creation with tests and git
    How to merge two different coverage reports remotely