From wjm1 at caa.columbia.edu Wed May 1 11:43:11 2019 From: wjm1 at caa.columbia.edu (William Michels) Date: Wed, 1 May 2019 11:43:11 -0700 Subject: [sf-perl] push() practice: misplaced semicolon creates list elements within array? In-Reply-To: <3807b0ba-098b-b0d3-58db-37ee3b264141@gmail.com> References: <3807b0ba-098b-b0d3-58db-37ee3b264141@gmail.com> Message-ID: Hello Richard and thank you for your comment, I'm not sure I have clarity on the use of semicolons in Perl 6. Most references in the documentation refer to the semicolon as a statement separator. Many references point out where semicolons are optional (e.g. particular lines within blocks). Now for multi-dimensional arrays, I see commas being used as 'dimensional-separators", and semicolons used to slice a multi-dimensional array. >From RosettaCode: # Multi dimension arrays may be predeclared which constrains the indices to the declared size: >my @dim5[3,3,3,3,3]; #Creates a preallocated 5 dimensional array where each branch has 3 storage slots and constrains the size to the declared size. #It can then be accessed like so: @dim5[0;1;2;1;0] = 'Perl 6'; say @dim5[0;1;2;1;0]; # Perl 6 https://rosettacode.org/wiki/Multi-dimensional_array#Perl_6 Seems to be different from the push() issue. --B. On Sun, Apr 14, 2019 at 12:39 AM Richard Hainsworth wrote: > > A semicolon is the syntax used for multidimensional arrays. > > See https://docs.perl6.org/language/subscripts#Multiple_dimensions > > > On 14/04/2019 15:07, William Michels via perl6-users wrote: > > Hello, > > > > I've been working through Patrick Michaud's excellent videos from the > > The Perl Conference 2016. At about 35:45 of the following 2016 video > > (Part 1 of 2), Patrick discusses arrays: > > > > https://www[dot]youtube[dot]com/watch?v=ySch4xpoPA0 > > > > At this point in the video, Patrick also discusses push() and pop() > > calls on arrays. For practice I tried pushing and popping strings in > > the REPL. However, I discovered an unusual property when I misplaced a > > semicolon during call to push(). See what happens below when a > > semicolon is included within the parentheses of push(): > > > > "This is Rakudo version 2018.12 built on MoarVM version 2018.12 > > implementing Perl 6.d." > > > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries.push("Finland"); > > [UK Spain Slovakia Sweden Finland] > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries.push("Finland";) > > [UK Spain Slovakia Sweden (Finland) ()] > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries.push("Finland";); > > [UK Spain Slovakia Sweden (Finland) ()] > > > > Misplacing a semicolon within the push() call adds two elements to the > > array. When I examine these two elements, I see that they are both > > "List" elements: > > > >> @countries[3].WHAT > > (Str) > >> @countries[4].WHAT > > (List) > >> @countries[5].WHAT > > (List) > > > > Apparently, multiple semicolons within push() will add multiple list > > elements to the end of the intended array: > > > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries.push("Finland";;); > > [UK Spain Slovakia Sweden (Finland) () ()] > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries.push(;;;;;;;); > > [UK Spain Slovakia Sweden () () () () () () () ()] > > > > It is surprising to me that "List" elements are appended to the array > > with push() as described above. If one tries to add one or more > > elements via indexing and there 'aren't enough elements' so to speak > > (by accident or design), the array grows by inserting "Any" elements, > > not "List" elements: > > > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries[5] = "Finland"; > > Finland > >> say @countries > > [UK Spain Slovakia Sweden (Any) Finland] > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries[6..7] = "Finland", "Norway"; > > (Finland Norway) > >> say @countries > > [UK Spain Slovakia Sweden (Any) (Any) Finland Norway] > > > > I've briefly checked pop() to see if there are similar issues, but 1) > > placing a string within the parentheses of pop() will throw an error, > > and 2) placing a semicolon within the parentheses of pop() will throw > > an error. However, these error message are slightly different. A > > string argument to pop() will result in an error that says "Too many > > positionals passed; expected 1 argument but got 2" while a semicolon > > argument to pop() will result in an error that says "Too many > > positionals passed; expected 1 argument but got 3". > > > >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; > > [UK Spain Slovakia Sweden] > >> @countries.pop("Finland") > > Too many positionals passed; expected 1 argument but got 2 > > in block at line 1 > > > >> @countries.pop(;) > > Too many positionals passed; expected 1 argument but got 3 > > in block at line 1 > > > > > > Any help appreciated, > > > > Bill. > > > > William Michels, Ph.D. > > > > PS Thanks to Joe Brenner for talking over this Perl6 code with me. From wjm1 at caa.columbia.edu Wed May 1 14:39:53 2019 From: wjm1 at caa.columbia.edu (William Michels) Date: Wed, 1 May 2019 14:39:53 -0700 Subject: [sf-perl] push() practice: misplaced semicolon creates list elements within array? In-Reply-To: References: Message-ID: Thank you yary. I'm not sure we've seen any clarification on this. There's a reference to "Literal Lists" in the Perl 6 docs that looks related, but I don't have a "plain-speak" explanation for how semicolons, lists, push() and arrays inter-relate. https://docs.perl6.org/language/list Hoping a Perl_6 guru can chime in? Thank you. --Bill. On Sun, Apr 14, 2019 at 1:26 PM yary wrote: > Looks like perl6 semicolon has different meaning in a list vs a capture. > In a list, it "makes sense to me" > > > perl6 --version > This is Rakudo Star version 2018.10 built on MoarVM version 2018.10 > implementing Perl 6.c. > >perl6 > To exit type 'exit' or '^D' > > ('a').perl > "a" > > ('a';).perl > "a" > > ('a', 'b' ;).perl > ("a", "b") > > ('a', 'b' ; 'c').perl > (("a", "b"), "c") > > ('a', 'b' ; 'c' ;).perl > (("a", "b"), "c") > > ('a', 'b' ; 'c' ; ;).perl > (("a", "b"), "c", Nil) > > ('a', 'b' ; 'c' , ; ;).perl > (("a", "b"), ("c",), Nil) > > - the rule "a single thing is a scalar, a single thing followed by a comma > is a list" applies in the last example > > But there's inconsistency with captures. > > >\('a').perl > \("a") > > \('a';).perl; # Unexpected empty list at end > \(("a",), ()) > > \('a', 'b' ;).perl; # Unexpected empty list at end > \(("A", "b"), ()) > > \('a', 'b' ; 'c').perl; # unexpected "c" as list > \(("a", "b"), ("c",)) > > \('a', 'b' ; 'c' ;).perl; # "c" as list, and empty list at end > \(("a", "b"), ("c",), ()) > > \('a', 'b' ; 'c' ; ;).perl; # "c" as list, and 2 empty lists instead of > single nil at end > \(("a", "b"), ("c",), (), ()) > > \('a', 'b' ; 'c' , ; ;).perl; # 2 empty lists instead of single nil at > end > \(("a", "b"), ("c",), (), ()) > > This cries for an explanation, or a bug report. > > -y > > > On Sun, Apr 14, 2019 at 11:57 AM Joseph Brenner wrote: > >> Just in case it wasn't clear from Bill's discussion, I think the >> reason this case seems weird is normally we expect trailing separators >> to be ignored, as with the extra comma here: >> >> > my @monsters = ('ghidora', 'mothera', 'wolfman', 'zuckerberg',); >> [ghidora mothera wolfman zuckerberg] >> >> If you do this, and type in a trailing semi-colon in the wrong place, >> you stumble across some odd behavior: >> >> > @monsters.push('tingler';) >> [ghidora mothera wolfman zuckerberg (tingler) ()] >> >> It seems a bit LTA, though it might be unavoidable because this is valid: >> >> my @monsters = ('ghidora', 'mothera'; 'frankenstein', >> 'wolfman';'purple-people-eater') >> [(ghidora mothera) (frankenstein wolfman) purple-people-eater] >> >> Though even here, the behavior seems a bit strange, because >> "purple-people-eater" ended up as an element in the top-level list. >> Hm, no empty list is appended if you do this: >> >> my @monsters = ('ghidora', 'mothera'; 'frankenstein', 'wolfman';) >> [(ghidora mothera) (frankenstein wolfman)] >> >> But the push method seems to interpret it differently: >> >> @monsters.push('purple-people-eater';) >> [(ghidora mothera) (frankenstein wolfman) (purple-people-eater) ()] >> >> >> >> On 4/14/19, William Michels via perl6-users wrote: >> > Hello, >> > >> > I've been working through Patrick Michaud's excellent videos from the >> > The Perl Conference 2016. At about 35:45 of the following 2016 video >> > (Part 1 of 2), Patrick discusses arrays: >> > >> > https://www[dot]youtube[dot]com/watch?v=ySch4xpoPA0 >> > >> > At this point in the video, Patrick also discusses push() and pop() >> > calls on arrays. For practice I tried pushing and popping strings in >> > the REPL. However, I discovered an unusual property when I misplaced a >> > semicolon during call to push(). See what happens below when a >> > semicolon is included within the parentheses of push(): >> > >> > "This is Rakudo version 2018.12 built on MoarVM version 2018.12 >> > implementing Perl 6.d." >> > >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries.push("Finland"); >> > [UK Spain Slovakia Sweden Finland] >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries.push("Finland";) >> > [UK Spain Slovakia Sweden (Finland) ()] >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries.push("Finland";); >> > [UK Spain Slovakia Sweden (Finland) ()] >> > >> > Misplacing a semicolon within the push() call adds two elements to the >> > array. When I examine these two elements, I see that they are both >> > "List" elements: >> > >> >> @countries[3].WHAT >> > (Str) >> >> @countries[4].WHAT >> > (List) >> >> @countries[5].WHAT >> > (List) >> > >> > Apparently, multiple semicolons within push() will add multiple list >> > elements to the end of the intended array: >> > >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries.push("Finland";;); >> > [UK Spain Slovakia Sweden (Finland) () ()] >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries.push(;;;;;;;); >> > [UK Spain Slovakia Sweden () () () () () () () ()] >> > >> > It is surprising to me that "List" elements are appended to the array >> > with push() as described above. If one tries to add one or more >> > elements via indexing and there 'aren't enough elements' so to speak >> > (by accident or design), the array grows by inserting "Any" elements, >> > not "List" elements: >> > >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries[5] = "Finland"; >> > Finland >> >> say @countries >> > [UK Spain Slovakia Sweden (Any) Finland] >> >> >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries[6..7] = "Finland", "Norway"; >> > (Finland Norway) >> >> say @countries >> > [UK Spain Slovakia Sweden (Any) (Any) Finland Norway] >> > >> > I've briefly checked pop() to see if there are similar issues, but 1) >> > placing a string within the parentheses of pop() will throw an error, >> > and 2) placing a semicolon within the parentheses of pop() will throw >> > an error. However, these error message are slightly different. A >> > string argument to pop() will result in an error that says "Too many >> > positionals passed; expected 1 argument but got 2" while a semicolon >> > argument to pop() will result in an error that says "Too many >> > positionals passed; expected 1 argument but got 3". >> > >> >> my @countries = "UK", "Spain", "Slovakia", "Sweden"; >> > [UK Spain Slovakia Sweden] >> >> @countries.pop("Finland") >> > Too many positionals passed; expected 1 argument but got 2 >> > in block at line 1 >> > >> >> @countries.pop(;) >> > Too many positionals passed; expected 1 argument but got 3 >> > in block at line 1 >> > >> >> >> > >> > >> > Any help appreciated, >> > >> > Bill. >> > >> > William Michels, Ph.D. >> > >> > PS Thanks to Joe Brenner for talking over this Perl6 code with me. >> > >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpchrist at holgerdanske.com Sat May 11 23:28:28 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Sat, 11 May 2019 23:28:28 -0700 Subject: [sf-perl] ANNOUNCE: Dist::MultiMaker - maker for multiple libraries Message-ID: <32838935-1c33-8bf2-30b4-f3a5ad66b2d6@holgerdanske.com> hello, world! I have created a new Perl 5 library (distribution): http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Please review and comment. Thank you, David From shlomif at shlomifish.org Mon May 13 01:33:24 2019 From: shlomif at shlomifish.org (Shlomi Fish) Date: Mon, 13 May 2019 11:33:24 +0300 Subject: [sf-perl] ANNOUNCE: Dist::MultiMaker - maker for multiple libraries In-Reply-To: <32838935-1c33-8bf2-30b4-f3a5ad66b2d6@holgerdanske.com> References: <32838935-1c33-8bf2-30b4-f3a5ad66b2d6@holgerdanske.com> Message-ID: <20190513113324.1cc45bf4@telaviv1.shlomifish.org> Hi David, On Sat, 11 May 2019 23:28:28 -0700 David Christensen wrote: > hello, world! > > I have created a new Perl 5 library (distribution): > > http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ > > > Please review and comment. 1. It is good that the .html file does not require JS to be read. 2. This seems quite useful. 3. Does it accept "perl Makefile.PL" arguments? 4. It reminds me of the symlinks' DSL I defined for https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/setup-all/setup-all.pl Regards, Shlomi > > > Thank you, > > David > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > https://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ https://github.com/shlomif/what-you-should-know-about-automated-testing Bugs are too afraid to reproduce on Chuck Norris? computer. As a result, when he uses Microsoft Windows, it behaves just like a Linux system. ? http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply . From dpchrist at holgerdanske.com Mon May 13 13:11:37 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Mon, 13 May 2019 13:11:37 -0700 Subject: [sf-perl] ANNOUNCE: Dist::MultiMaker - maker for multiple libraries In-Reply-To: <20190513113324.1cc45bf4@telaviv1.shlomifish.org> References: <32838935-1c33-8bf2-30b4-f3a5ad66b2d6@holgerdanske.com> <20190513113324.1cc45bf4@telaviv1.shlomifish.org> Message-ID: On 5/13/19 1:33 AM, Shlomi Fish wrote: > Hi David, Hi Shlomi. Thank you for taking the time to look at my distribution. > On Sat, 11 May 2019 23:28:28 -0700 > David Christensen wrote: > >> hello, world! >> >> I have created a new Perl 5 library (distribution): >> >> http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ >> >> >> Please review and comment. > > 1. It is good that the .html file does not require JS to be read. Agreed. > 2. This seems quite useful. I hope so -- I've been going around in circles for years trying to find a light weight solution for building inter-dependent functions, modules, and/or distributions. The idea for this distribution grew out of a solution Joe Brenner showed me (he has a massive PERL5LIB set by a script that crawls his development tree). > 3. Does it accept "perl Makefile.PL" arguments? Yes -- arguments received by 'perl Makefile.PL' are passed through to the recursive 'perl Makefile.PL' invocations. At this point, the only argument I am aware of is 'verbose' (per 'perldoc ExtUtils::MakeMaker): 2019-05-13 12:51:41 dpchrist at tinkywinky ~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB $ PERL5LIB=/home/dpchrist/perl5/lib/perl5:/home/dpchrist/src/perl5/Dist-MultiMaker/lib && perl Makefile.PL verbose Reading file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.opt' Reading file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.PERL5LIB' Reading file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/MANIFEST' Processing line '../../../A/Makefile.PL' Writing file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A/.MultiMaker.opt' ABSTRACT_FROM => q[lib/Dist/MultiMaker/Example/A.pm] AUTHOR => [q[David Paul Christensen ]] BUILD_REQUIRES => { } CONFIGURE_REQUIRES => { } INSTALL_BASE => q[/home/dpchrist/perl5] LICENSE => q[perl] NAME => q[Dist::MultiMaker::Example::A] PREREQ_PM => { } TEST_REQUIRES => { } VERSION_FROM => q[lib/Dist/MultiMaker/Example/A.pm] Using PERL=/usr/bin/perl Generating a Unix-style Makefile Writing Makefile for Dist::MultiMaker::Example::A Writing MYMETA.yml and MYMETA.json Skip blib/lib/Dist/MultiMaker/Example/A.pm (unchanged) Manifying 1 pod document Reading file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/MANIFEST' Processing line '../../../B/Makefile.PL' Writing file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B/.MultiMaker.opt' ABSTRACT_FROM => q[lib/Dist/MultiMaker/Example/B.pm] AUTHOR => [q[David Paul Christensen ]] BUILD_REQUIRES => { } CONFIGURE_REQUIRES => { } INSTALL_BASE => q[/home/dpchrist/perl5] LICENSE => q[perl] NAME => q[Dist::MultiMaker::Example::B] PREREQ_PM => { Dist::MultiMaker::Example::A=>q[0] } TEST_REQUIRES => { } VERSION_FROM => q[lib/Dist/MultiMaker/Example/B.pm] Using PERL=/usr/bin/perl Generating a Unix-style Makefile Writing Makefile for Dist::MultiMaker::Example::B Writing MYMETA.yml and MYMETA.json Skip blib/lib/Dist/MultiMaker/Example/B.pm (unchanged) Manifying 1 pod document Writing file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.PERL5LIB' Writing file '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/Makefile' Similarly, arguments to 'make' are passed through: 2019-05-13 12:51:49 dpchrist at tinkywinky ~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB $ make PERL5LIB=${PERL5LIB}:`cat .MultiMaker.PERL5LIB` && \ for d in /home/dpchrist/src/perl5/Dist-MultiMaker/example/A /home/dpchrist/src/perl5/Dist-MultiMaker/example/B ; do \ make -C $d all ; \ done make[1]: Entering directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' Manifying 1 pod document make[1]: Leaving directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' make[1]: Entering directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' Manifying 1 pod document make[1]: Leaving directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' 2019-05-13 13:08:59 dpchrist at tinkywinky ~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB $ make test TEST_VERBOSE=1 PERL5LIB=${PERL5LIB}:`cat .MultiMaker.PERL5LIB` && \ for d in /home/dpchrist/src/perl5/Dist-MultiMaker/example/A /home/dpchrist/src/perl5/Dist-MultiMaker/example/B ; do \ make -C $d test ; \ done make[1]: Entering directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t t/Dist-MultiMaker-Example-A.t .. 1..2 ok 1 - use Dist::MultiMaker::Example::A; example_a called from main t/Dist-MultiMaker-Example-A.t 5 ok 2 ok All tests successful. Files=1, Tests=2, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.03 cusr 0.00 csys = 0.07 CPU) Result: PASS make[1]: Leaving directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' make[1]: Entering directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t t/Dist-MultiMaker-Example-B.t .. 1..2 ok 1 - use Dist::MultiMaker::Example::B; example_b called from main t/Dist-MultiMaker-Example-B.t 5 example_a called from Dist::MultiMaker::Example::B /home/dpchrist/src/perl5/Dist-MultiMaker/example/B/blib/lib/Dist/MultiMaker/Example/B.pm 19 ok 2 ok All tests successful. Files=1, Tests=2, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.02 cusr 0.00 csys = 0.06 CPU) Result: PASS make[1]: Leaving directory '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' > 4. It reminds me of the symlinks' DSL I defined for > https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/setup-all/setup-all.pl DSL? Could you please describe the concept of the script and/or show an example of its use? David From dpchrist at holgerdanske.com Tue May 14 09:58:30 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Tue, 14 May 2019 09:58:30 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.03 Message-ID: <548f0a2d-430a-5948-d7c0-c67d781c4cee@holgerdanske.com> hello, world! I have updated Dist::MultiMaker -- updated POD to indicate that arguments to Makemaker.PL and make(1) are passed through, added a README for the examples, added EXAMPLE make sessions for the examples, and dropped references to Module::Build: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Please review and comment. Thank you, David From shlomif at shlomifish.org Wed May 15 02:47:06 2019 From: shlomif at shlomifish.org (Shlomi Fish) Date: Wed, 15 May 2019 12:47:06 +0300 Subject: [sf-perl] ANNOUNCE: Dist::MultiMaker - maker for multiple libraries In-Reply-To: References: <32838935-1c33-8bf2-30b4-f3a5ad66b2d6@holgerdanske.com> <20190513113324.1cc45bf4@telaviv1.shlomifish.org> Message-ID: <20190515124706.60937141@telaviv1.shlomifish.org> Hi David, On Mon, 13 May 2019 13:11:37 -0700 David Christensen wrote: > On 5/13/19 1:33 AM, Shlomi Fish wrote: > > Hi David, > > Hi Shlomi. Thank you for taking the time to look at my distribution. > > > > On Sat, 11 May 2019 23:28:28 -0700 > > David Christensen wrote: > > > >> hello, world! > >> > >> I have created a new Perl 5 library (distribution): > >> > >> http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ > >> > >> > >> Please review and comment. > > > > 1. It is good that the .html file does not require JS to be read. > > Agreed. > > > > 2. This seems quite useful. > > I hope so -- I've been going around in circles for years trying to find > a light weight solution for building inter-dependent functions, modules, > and/or distributions. The idea for this distribution grew out of a > solution Joe Brenner showed me (he has a massive PERL5LIB set by a > script that crawls his development tree). > > > > 3. Does it accept "perl Makefile.PL" arguments? > > Yes -- arguments received by 'perl Makefile.PL' are passed through to > the recursive 'perl Makefile.PL' invocations. At this point, the only > argument I am aware of is 'verbose' (per 'perldoc ExtUtils::MakeMaker): > nice. > 2019-05-13 12:51:41 dpchrist at tinkywinky > ~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB > $ > PERL5LIB=/home/dpchrist/perl5/lib/perl5:/home/dpchrist/src/perl5/Dist-MultiMaker/lib > && perl Makefile.PL verbose > Reading file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.opt' > Reading file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.PERL5LIB' > Reading file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/MANIFEST' > Processing line '../../../A/Makefile.PL' > Writing file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A/.MultiMaker.opt' > ABSTRACT_FROM => q[lib/Dist/MultiMaker/Example/A.pm] > AUTHOR => [q[David Paul Christensen ]] > BUILD_REQUIRES => { } > CONFIGURE_REQUIRES => { } > INSTALL_BASE => q[/home/dpchrist/perl5] > LICENSE => q[perl] > NAME => q[Dist::MultiMaker::Example::A] > PREREQ_PM => { } > TEST_REQUIRES => { } > VERSION_FROM => q[lib/Dist/MultiMaker/Example/A.pm] > Using PERL=/usr/bin/perl > Generating a Unix-style Makefile > Writing Makefile for Dist::MultiMaker::Example::A > Writing MYMETA.yml and MYMETA.json > Skip blib/lib/Dist/MultiMaker/Example/A.pm (unchanged) > Manifying 1 pod document > Reading file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/MANIFEST' > Processing line '../../../B/Makefile.PL' > Writing file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B/.MultiMaker.opt' > ABSTRACT_FROM => q[lib/Dist/MultiMaker/Example/B.pm] > AUTHOR => [q[David Paul Christensen ]] > BUILD_REQUIRES => { } > CONFIGURE_REQUIRES => { } > INSTALL_BASE => q[/home/dpchrist/perl5] > LICENSE => q[perl] > NAME => q[Dist::MultiMaker::Example::B] > PREREQ_PM => { Dist::MultiMaker::Example::A=>q[0] } > TEST_REQUIRES => { } > VERSION_FROM => q[lib/Dist/MultiMaker/Example/B.pm] > Using PERL=/usr/bin/perl > Generating a Unix-style Makefile > Writing Makefile for Dist::MultiMaker::Example::B > Writing MYMETA.yml and MYMETA.json > Skip blib/lib/Dist/MultiMaker/Example/B.pm (unchanged) > Manifying 1 pod document > Writing file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/.MultiMaker.PERL5LIB' > Writing file > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB/Makefile' > > > Similarly, arguments to 'make' are passed through: > > 2019-05-13 12:51:49 dpchrist at tinkywinky > ~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB > $ make > PERL5LIB=${PERL5LIB}:`cat .MultiMaker.PERL5LIB` && \ > for d in /home/dpchrist/src/perl5/Dist-MultiMaker/example/A > /home/dpchrist/src/perl5/Dist-MultiMaker/example/B ; do \ > make -C $d all ; \ > done > make[1]: Entering directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' > Manifying 1 pod document > make[1]: Leaving directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' > make[1]: Entering directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' > Manifying 1 pod document > make[1]: Leaving directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' > > 2019-05-13 13:08:59 dpchrist at tinkywinky > ~/src/perl5/Dist-MultiMaker/example/Lib/MultiMaker/AB > $ make test TEST_VERBOSE=1 > PERL5LIB=${PERL5LIB}:`cat .MultiMaker.PERL5LIB` && \ > for d in /home/dpchrist/src/perl5/Dist-MultiMaker/example/A > /home/dpchrist/src/perl5/Dist-MultiMaker/example/B ; do \ > make -C $d test ; \ > done > make[1]: Entering directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' > PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" > "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef > *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t > t/Dist-MultiMaker-Example-A.t .. > 1..2 > ok 1 - use Dist::MultiMaker::Example::A; > example_a called from main t/Dist-MultiMaker-Example-A.t 5 > ok 2 > ok > All tests successful. > Files=1, Tests=2, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.03 cusr > 0.00 csys = 0.07 CPU) > Result: PASS > make[1]: Leaving directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/A' > make[1]: Entering directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' > PERL_DL_NONLAZY=1 PERL_USE_UNSAFE_INC=1 "/usr/bin/perl" > "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef > *Test::Harness::Switches; test_harness(1, 'blib/lib', 'blib/arch')" t/*.t > t/Dist-MultiMaker-Example-B.t .. > 1..2 > ok 1 - use Dist::MultiMaker::Example::B; > example_b called from main t/Dist-MultiMaker-Example-B.t 5 > example_a called from Dist::MultiMaker::Example::B > /home/dpchrist/src/perl5/Dist-MultiMaker/example/B/blib/lib/Dist/MultiMaker/Example/B.pm > 19 > ok 2 > ok > All tests successful. > Files=1, Tests=2, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.02 cusr > 0.00 csys = 0.06 CPU) > Result: PASS > make[1]: Leaving directory > '/home/dpchrist/src/perl5/Dist-MultiMaker/example/B' > > > > 4. It reminds me of the symlinks' DSL I defined for > > https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/setup-all/setup-all.pl > > > > DSL? > See https://en.wikipedia.org/wiki/Domain-specific_language > > Could you please describe the concept of the script and/or show an > example of its use? > See https://github.com/shlomif/shlomif-computer-settings/ - you can try running the "wget https://shlom.in/setup && perl setup" procedure in a new user and/or a new VM. It sets up a bunch of symlinks in ~ pointing to the configuration resources. For example: https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/git/setup.symlinks.manifest.txt . > > David > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > https://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/open-source/resources/tech-tips/ Chuck?s idea of a short walk is to the Andromeda Galaxy and back. ? http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply . From dpchrist at holgerdanske.com Thu May 16 23:36:32 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Thu, 16 May 2019 23:36:32 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.04 Message-ID: hello, world! Dist::MultiMaker release 0.04 is now available: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Changes: - Putting temporary files in MANIFEST target directories causes ExtUtils::Manifest manicheck() and filecheck() to fail. Use temporary directory $HOME/tmp/Dist/MultiMaker instead. - Add t/make-example.* scripts to generate all EXAMPLE files. - Add example/README file and update POD. Please review and comment. Thank you, David From dpchrist at holgerdanske.com Thu May 16 23:46:23 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Thu, 16 May 2019 23:46:23 -0700 Subject: [sf-perl] ANNOUNCE: Dist::MultiMaker - maker for multiple libraries In-Reply-To: <20190515124706.60937141@telaviv1.shlomifish.org> References: <32838935-1c33-8bf2-30b4-f3a5ad66b2d6@holgerdanske.com> <20190513113324.1cc45bf4@telaviv1.shlomifish.org> <20190515124706.60937141@telaviv1.shlomifish.org> Message-ID: On 5/15/19 2:47 AM, Shlomi Fish wrote: > Hi David, > > On Mon, 13 May 2019 13:11:37 -0700 > David Christensen wrote: > >> On 5/13/19 1:33 AM, Shlomi Fish wrote: >>> Hi David, >> >> Hi Shlomi. Thank you for taking the time to look at my distribution. >> >> >>> On Sat, 11 May 2019 23:28:28 -0700 >>> David Christensen wrote: >>> >>>> hello, world! >>>> >>>> I have created a new Perl 5 library (distribution): >>>> >>>> http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ >>>> >>>> >>>> Please review and comment. >>> 4. It reminds me of the symlinks' DSL I defined for >>> https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/setup-all/setup-all.pl >> Could you please describe the concept of the script and/or show an >> example of its use? > > See https://github.com/shlomif/shlomif-computer-settings/ - you can try running > the "wget https://shlom.in/setup && perl setup" procedure in a new user and/or > a new VM. It sets up a bunch of symlinks in ~ pointing to the configuration > resources. > > For example: > https://github.com/shlomif/shlomif-computer-settings/blob/master/shlomif-settings/git/setup.symlinks.manifest.txt > . Okay. I wrote a much simpler script that creates symlinks to all subdirectories of directories specified on the command line. Writing a DSL takes it to a whole new level. :-) David From james at actionmessage.com Fri May 17 14:58:27 2019 From: james at actionmessage.com (James Briggs) Date: Fri, 17 May 2019 14:58:27 -0700 Subject: [sf-perl] SF Perl in general - couple of talk topics In-Reply-To: References: Message-ID: <20190517215311.M21276@actionmessage.com> On Fri, 5 Apr 2019 08:45:11 -0700, Joseph Brenner wrote > By the way, if anyone's got any suggestions for meeting topics, > formats, etc, I'd be glad to hear them. Hi Joseph. I can do 2 talks: 1) "Writing REST API Servers with Perl and OpenAPI" Slides are ready, ready to present anytime. 2) "Writing Advanced Forms-based Web Applications with CGI::Application" I'm the unofficial maintainer now for this amazing framework. Thanks, James Briggs james at actionmessage.com cell +1 408 429 3017 From dpchrist at holgerdanske.com Fri May 17 21:36:31 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Fri, 17 May 2019 21:36:31 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.05 Message-ID: <7d2b6755-10e8-1e67-68bd-d529aa6fa6dc@holgerdanske.com> hello, world! Dist::MultiMaker release 0.05 is now available: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Changes: - Rethink example generation scripts and tests. - Expand command-line options and environment variables. - Update and expand POD. Please review and comment. Thank you, David From dpchrist at holgerdanske.com Fri May 17 21:46:15 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Fri, 17 May 2019 21:46:15 -0700 Subject: [sf-perl] SF Perl in general - couple of talk topics In-Reply-To: <20190517215311.M21276@actionmessage.com> References: <20190517215311.M21276@actionmessage.com> Message-ID: On 5/17/19 2:58 PM, James Briggs wrote: > On Fri, 5 Apr 2019 08:45:11 -0700, Joseph Brenner wrote >> By the way, if anyone's got any suggestions for meeting topics, >> formats, etc, I'd be glad to hear them. > > Hi Joseph. > > I can do 2 talks: > > 1) "Writing REST API Servers with Perl and OpenAPI" > > Slides are ready, ready to present anytime. > > 2) "Writing Advanced Forms-based Web Applications with CGI::Application" > > I'm the unofficial maintainer now for this amazing framework. > > Thanks, > James Briggs > james at actionmessage.com > cell +1 408 429 3017 I plan to attend the meetup this Sunday. If you attend, I am interested in both of your talks: https://www.meetup.com/San-Francisco-Perl/events/rfwfxqyzhbzb/ David From rajiyengark at gmail.com Sat May 18 06:37:06 2019 From: rajiyengark at gmail.com (Raj Iyengar) Date: Sat, 18 May 2019 06:37:06 -0700 Subject: [sf-perl] Unsubscribe. Message-ID: -- Cheers Raj Iyengar -------------- next part -------------- An HTML attachment was scrubbed... URL: From dpchrist at holgerdanske.com Sun May 19 22:45:04 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Sun, 19 May 2019 22:45:04 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.06 Message-ID: <9d392988-b775-c30a-a983-37b694432782@holgerdanske.com> hello, world! Dist::MultiMaker release 0.06 is now available: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Changes: - Rework to accept unset PERL5LIB environment variable. - Add argument and return value assertions in key functions. Please review and comment. Thank you, David From dpchrist at holgerdanske.com Sun May 19 23:33:34 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Sun, 19 May 2019 23:33:34 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.07 Message-ID: <9f45acc6-5cb6-987b-a909-125bb9a5c3f3@holgerdanske.com> hello, world! Dist::MultiMaker release 0.07 is now available: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Changes: - Fix default value for --tmp option. Please review and comment. Thank you, David From dpchrist at holgerdanske.com Mon May 20 00:12:38 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Mon, 20 May 2019 00:12:38 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.08 Message-ID: <823b2400-e590-89d2-f78e-6db6c2b243b6@holgerdanske.com> hello, world! Dist::MultiMaker release 0.08 is now available: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Changes: - PERL5LIB needs to be exported prior to recursive make Please review and comment. Thank you, David From dpchrist at holgerdanske.com Mon May 20 13:44:46 2019 From: dpchrist at holgerdanske.com (David Christensen) Date: Mon, 20 May 2019 13:44:46 -0700 Subject: [sf-perl] ANNOUNCE: Dist-MultiMaker-0.09 Message-ID: <13ca46f2-1de6-fddc-60d9-dc423d50d672@holgerdanske.com> hello, world! Dist::MultiMaker release 0.09 is now available: http://holgerdanske.com/pub/dpchrist/perl5/Dist-MultiMaker/ Changes: - Improve 'clean' and 'realclean' make(1) targets - Use /tmp for temp files when run as superuser Please review and comment. Thank you, David