Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Looking for testers who use Microsoft compilers

by syphilis (Bishop)
on Feb 03, 2020 at 11:10 UTC ( #11112316=perlmeditation: print w/replies, xml ) Need Help??

Hi,

As this is essentially a request for some testing to be done, I thought "Meditations" was probably the best place for it.
I'm not actively seeking wisdom with this post but, of course, receiving wisdom is always fine, even if it hasn't been requested ;-)

If you have a perl that you've built using a Microsoft Compiler, I'd be most interested to learn of any problems or failures involved in running:
cpan -i List::Uniqnum
In fact, feel free to provide feedback for any build of perl that you have.
The cpantesters smokers have been happily chewing on List-Uniqnum-0.04 for a couple of days, but there are very few Windows smokers out there.
And, AFAIK, none of those smokers employ Microsoft compilers.

Of course, Darwin and Solaris are probably also missing from those cpantesters systems - so join in with them, too .... or anything else that takes your fancy.

I released List::Uniqnum to test changes that I want to make to the dual-life module List::Util's uniqnum() function - in order to improve that function's portability.
A new release of List::Util (Scalar-List-Utils-1.54) hit cpan over the weekend. It still doesn't utilize the changes I was hoping would be included.
If you run cpan -i List::Util you'll probably find that it passes all tests and installs cleanly.

List-Util-1.54's uniqnum function actually works correctly on Linux, unless perl was built with -Duselongdouble or -Dusequadmath - in which case the test suite still passes, but only because it doesn't run tests that will reveal the problem.
1.54 works fine on Windows, too, but again only if perl's nvtype is double.
For it to work correctly on Windows if perl's ivtype is long long, it also requires that perl was built with __USE_MINGW_ANSI_STDIO, which only started happening wih the release of 5.26.0.
Thankfully, Strawberry Perl 5.26 onwards is built with __USE_MINGW_ANSI_STDIO defined.
Try cpan -i List::Util on a 64-bit-integer build of Strawberry perl-5.24.0 or earlier, and you'll see a test failure.

If you want to know what's failing with your particular installation of List::Util's uniqnum function, here is something you can run:
use Config; # for test 5 use strict; use warnings; use List::Util qw(uniqnum); #use List::Uniqnum qw(uniqnum); my $count; # test 1 if(1.4142135623730951 != 1.4142135623730954) { $count = uniqnum(1.4142135623730951, 1.4142135623730954); print "test 1 failed (returned $count)\n" unless $count == 2; } # test 2 if(10.770329614269008063 != 10.7703296142690080625) { $count = uniqnum(10.770329614269008063, 10.7703296142690080625); print "test 2 failed (returned $count)\n" unless $count == 2; } # test 3 if(1005.1022829201930645202916159776901 != 1005.10228292019306452029161597769015) { $count = uniqnum(1005.1022829201930645202916159776901, 1005.10228292019306452029161597769015); print "test 3 failed (returned $count)\n" unless $count == 2; } # test 4 $count = uniqnum(0, -0.0); print "test 4 failed (returned $count)\n" unless $count == 1; # test 5 if($Config{ivsize} == 8) { # These 2 (the first is an IV, the second is an NV) # both exactly represent the value 762939453127 * (2 ** 21) $count = uniqnum(100000000000262144, 1.00000000000262144e+17); print "test 5 failed (returned $count)\n" unless $count == 1; }
It only announces failures. If there's no output, then everything is good.
If you install List::Uniqnum, you can then modify the script to test List::Uniqnum.
If you do that, and it produces some output, please let me know.

Cheers,
Rob

Replies are listed 'Best First'.
Re: Looking for testers who use Microsoft compilers
by choroba (Archbishop) on Feb 03, 2020 at 14:20 UTC
    I tried running your example code in my version of blead perl (5.31.6) on Linux, compiled with mostly default settings, using List::Util 1.53. It fails tests 1, 4, and 5.
    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
      fails tests 1, 4, and 5

      Yes - if you upgraded to version 1.54 on that particular build of perl it would pass all 5 tests.
      On Linux, it's only when $Config{nvsize} exceeds 8 that you'll generally get either test 2 or test 3 (depending upon $Config{nvtype}) to fail with 1.54.
      (Note that this particular script doesn't correctly test IBM doubledoubles because I figured it's not going to encounter any of those rare types here.)

      Thanks, choroba.

      Cheers,
      Rob
        Confirmed. After the upgrade, all tests pass.

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re: Looking for testers who use Microsoft compilers
by Anonymous Monk on Feb 19, 2020 at 10:35 UTC

    Hi Rob,

    L::U is successfully installed by cpan -i on my visperl. ;) Here is my perl -V
    Summary of my perl5 (revision 5 version 30 subversion 1) configuration +: Platform: osname=MSWin32 osvers=10.0.17763.1039 archname=MSWin32-x64-multi-thread uname='' config_args='undef' hint=recommended useposix=true d_sigaction=undef useithreads=define usemultiplicity=define use64bitint=define use64bitall=undef uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cl' ccflags ='-nologo -GF -W3 -TP -EHsc -O1 -MD -Zi -DNDEBUG -GL -fp:p +recise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_S +ECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_ +NO_WARNINGS -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_I +MPLICIT_SYS' optimize='-O1 -MD -Zi -DNDEBUG -GL -fp:precise' cppflags='-DWIN32' ccversion='19.24.28316' gccversion='' gccosandvers='' intsize=4 longsize=4 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=undef longlongsize=8 d_longdbl=define longdblsize=8 longdblkind=0 ivtype='__int64' ivsize=8 nvtype='double' nvsize=8 Off_t='__int64' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='link' ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpat +h:"D:\visperl\lib\CORE" -machine:AMD64 -subsystem:console,"5.02"' libpth="D:\Program Files (x86)\Microsoft Visual Studio\2019\Commun +ity\VC\Tools\MSVC\14.24.28314\\lib\x64" libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib +comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi3 +2.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib o +dbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.l +ib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib net +api32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.l +ib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib ucrt.lib libc=ucrt.lib so=dll useshrplib=true libperl=perl530.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs dlext=dll d_dlsymun=undef ccdlflags=' ' cccdlflags=' ' lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg - +libpath:"D:\visperl\lib\CORE" -machine:AMD64 -subsystem:console,"5.0 +2"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF USE_THREAD_SAFE_LOCALE Built under MSWin32 Compiled at Feb 19 2020 16:07:25 @INC: D:/visperl/site/lib D:/visperl/lib
      Oh, thank you !!
      That's helpful.

      If you have any perls (the actual perl version is not important) built using earlier versions of a Microsoft Compiler, and those perls were also built with:
      ivtype='__int64' ivsize=8
      could you post the output of perl -V:ccversion for them ?

      Somewhere between ccversion='16.00.30319.01' and ccversion='19.24.28316' a significant change in the MS C runtime occurred. (That change has relevance to List::Uniqnum.)
      But I don't know exactly when that change occurred, and I'd like to find out.

      Thanks again.

      Cheers,
      Rob

        Somewhere between ccversion='16.00.30319.01' and ccversion='19.24.28316' a significant change in the MS C runtime occurred.

        Sorry, I only have installed Visual studio 2017 and 2019 on my server. most of time I've used strawberry perl.





        I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://11112316]
Approved by marto
Front-paged by marto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2020-03-29 21:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (171 votes). Check out past polls.

    Notices?