in reply to Re^8: Is there a way to reduce Data::Dumper's output size? (Sereal on winz too)
in thread Is there a way to reduce Data::Dumper's output size?

... stuff ...

Um, yeah, when BrowserUk says "not for win32" a lot of the time he says "its not on ppm" cause the version that is on ppm is very old and/or not available to everyone

luckily, you can "strawberryperl" your activeperl by installing http://code.activestate.com/ppm/MinGW/ ... and then you should be able to compile Sereal just as if you were using strawberry perl .... Maybe

OTOH, you can always install strawberryperl :)

  • Comment on Re^9: Is there a way to reduce Data::Dumper's output size? (Sereal on winz too)

Replies are listed 'Best First'.
Re^10: (Do you trust a C programmer who ignores warnings; any more than you trust a Perl programmer who does?)
by BrowserUk (Patriarch) on Feb 13, 2015 at 09:21 UTC
    Um, yeah, when BrowserUk says "not for win32" a lot of the time he says "its not on ppm" cause the version that is on ppm is very old and/or not available to everyone

    Not so:

    C:\perl64\packages\Sereal-Decoder-3.005>nmake Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. cp lib/Sereal/Performance.pm blib\lib\Sereal\Performance.pm cp lib/Sereal/Decoder/Constants.pm blib\lib\Sereal\Decoder\Constants.p +m cp lib/Sereal/Decoder.pm blib\lib\Sereal\Decoder.pm C:\Perl64\bin\perl.exe C:\perl64\site\lib\ExtUtils\xsubpp -ty +pemap C:\Perl64\lib\ExtUtils\typemap -typemap typemap Decoder.xs > D +ecoder.xsc && C:\Perl64\bin\perl.exe -MExtUtils::Command -e mv -- Dec +oder.xsc Decoder.c cl -c -I. -nologo -GF -W3 -MD -Zi -Ox -GL -fp:precise -DWIN3 +2 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DUSE_SITECUSTOMIZ +E -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - +DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -Ox -GL -fp:precise -DVE +RSION=\"3.005\" -DXS_VERSION=\"3.005\" "-IC:\Perl64\lib\CORE" -DND +EBUG Decoder.c Decoder.c Decoder.xs(311) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(312) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(313) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(314) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(315) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(316) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(317) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(318) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(319) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(320) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(321) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(322) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(323) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Decoder.xs(390) : warning C4996: 'sprintf': This function or variable +may be unsafe. Consider using sprintf_s instead. To disable deprecati +on, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(366) : see declaration of 'sprintf' Decoder.xs(397) : warning C4996: 'sprintf': This function or variable +may be unsafe. Consider using sprintf_s instead. To disable deprecati +on, use _CRT_SECURE_NO_WARNINGS. See online help for details. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Include\ +stdio.h(366) : see declaration of 'sprintf' cl -c -I. -nologo -GF -W3 -MD -Zi -Ox -GL -fp:precise -DWIN3 +2 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DUSE_SITECUSTOMIZ +E -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - +DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -Ox -GL -fp:precise -DVE +RSION=\"3.005\" -DXS_VERSION=\"3.005\" "-IC:\Perl64\lib\CORE" -DND +EBUG srl_decoder.c srl_decoder.c c:\perl64\packages\sereal-decoder-3.005\snappy\csnappy.h(19) : fatal e +rror C1083: Cannot open include file: 'stdint.h': No such file or dir +ectory NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 9.0\VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop. C:\perl64\packages\Sereal-Encoder-3.005>nmake Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. cp lib/Sereal/Encoder.pm blib\lib\Sereal\Encoder.pm cp lib/Sereal/Encoder/Constants.pm blib\lib\Sereal\Encoder\Constants.p +m C:\Perl64\bin\perl.exe C:\perl64\site\lib\ExtUtils\xsubpp -ty +pemap C:\Perl64\lib\ExtUtils\typemap -typemap typemap Encoder.xs > E +ncoder.xsc && C:\Perl64\bin\perl.exe -MExtUtils::Command -e mv -- Enc +oder.xsc Encoder.c cl -c -I. -nologo -GF -W3 -MD -Zi -Ox -GL -fp:precise -DWIN3 +2 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DUSE_SITECUSTOMIZ +E -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - +DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -Ox -GL -fp:precise -DVE +RSION=\"3.005\" -DXS_VERSION=\"3.005\" "-IC:\Perl64\lib\CORE" -DND +EBUG Encoder.c Encoder.c Encoder.xs(153) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(154) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(155) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(156) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(157) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(158) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(159) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(160) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(161) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(162) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(163) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(164) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(165) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(166) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(167) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(168) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(169) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(170) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(171) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(172) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data Encoder.xs(173) : warning C4244: 'initializing' : conversion from 'UV' + to 'U32', possible loss of data cl -c -I. -nologo -GF -W3 -MD -Zi -Ox -GL -fp:precise -DWIN3 +2 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DUSE_SITECUSTOMIZ +E -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - +DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -Ox -GL -fp:precise -DVE +RSION=\"3.005\" -DXS_VERSION=\"3.005\" "-IC:\Perl64\lib\CORE" -DND +EBUG srl_encoder.c srl_encoder.c c:\perl64\packages\sereal-encoder-3.005\snappy\csnappy.h(19) : fatal e +rror C1083: Cannot open include file: 'stdint.h': No such file or dir +ectory NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 9.0\VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop.

    And if I edit both copies of snappy.h and comment out the #include stdint.h:

    C:\perl64\packages\Sereal-Decoder-3.005>nmake Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. cl -c -I. -nologo -GF -W3 -MD -Zi -Ox -GL -fp:precise -DWIN3 +2 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DUSE_SITECUSTOMIZ +E -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - +DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -Ox -GL -fp:precise -DVE +RSION=\"3.005\" -DXS_VERSION=\"3.005\" "-IC:\Perl64\lib\CORE" -DND +EBUG srl_decoder.c srl_decoder.c c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(68 +) : warning C4244: 'return' : conversion from '__int64' to 'int', pos +sible loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(24 +5) : warning C4244: '-=' : conversion from '__int64' to 'int', possib +le loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(26 +9) : warning C4244: 'initializing' : conversion from '__int64' to 'co +nst int', possible loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(28 +7) : warning C4244: 'initializing' : conversion from '__int64' to 'co +nst int', possible loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(30 +0) : warning C4244: 'initializing' : conversion from '__int64' to 'co +nst int', possible loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(34 +4) : warning C4244: '=' : conversion from '__int64' to 'int', possibl +e loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(35 +7) : warning C4244: '=' : conversion from '__int64' to 'int', possibl +e loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(36 +0) : warning C4244: '=' : conversion from '__int64' to 'int', possibl +e loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(36 +5) : warning C4244: '=' : conversion from '__int64' to 'int', possibl +e loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(37 +2) : warning C4244: '=' : conversion from '__int64' to 'int', possibl +e loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(38 +0) : warning C4244: '=' : conversion from '__int64' to 'int', possibl +e loss of data c:\perl64\packages\sereal-decoder-3.005\snappy/csnappy_decompress.c(38 +5) : warning C4244: '=' : conversion from '__int64' to 'uint32_t', po +ssible loss of data srl_decoder.c(294) : warning C4244: 'function' : conversion from 'IV' +to 'I32', possible loss of data srl_decoder.c(430) : warning C4267: 'function' : conversion from 'size +_t' to 'uint32_t', possible loss of data srl_decoder.c(442) : warning C4267: 'function' : conversion from 'size +_t' to 'uint32_t', possible loss of data srl_decoder.c(473) : warning C4267: '=' : conversion from 'size_t' to +'mz_ulong', possible loss of data srl_decoder.c(479) : warning C4267: 'function' : conversion from 'size +_t' to 'mz_ulong', possible loss of data srl_decoder.c(1053) : warning C4244: 'initializing' : conversion from +'IV' to 'U32', possible loss of data srl_decoder.c(1127) : warning C4146: unary minus operator applied to u +nsigned type, result still unsigned srl_decoder.c(1236) : warning C4244: 'function' : conversion from 'UV' + to 'I32', possible loss of data srl_decoder.c(1309) : warning C4244: '=' : conversion from 'IV' to 'I3 +2', possible loss of data srl_decoder.c(1313) : warning C4244: '=' : conversion from 'IV' to 'I3 +2', possible loss of data srl_decoder.c(1369) : error C2143: syntax error : missing ';' before ' +type' srl_decoder.c(1370) : error C2065: 'tag' : undeclared identifier srl_decoder.c(1374) : error C2065: 'tag' : undeclared identifier srl_decoder.c(1388) : error C2065: 'tag' : undeclared identifier srl_decoder.c(1390) : error C2065: 'tag' : undeclared identifier srl_decoder.c(1398) : error C2065: 'tag' : undeclared identifier srl_decoder.c(1401) : error C2065: 'tag' : undeclared identifier srl_decoder.c(1543) : warning C4244: '=' : conversion from 'UV' to 'U3 +2', possible loss of data srl_decoder.c(1550) : warning C4244: '=' : conversion from 'UV' to 'U3 +2', possible loss of data TRANSITION_REGEXP NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 9.0\VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop. C:\perl64\packages\Sereal-Encoder-3.005>nmake Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. cl -c -I. -nologo -GF -W3 -MD -Zi -Ox -GL -fp:precise -DWIN3 +2 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DUSE_SITECUSTOMIZ +E -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS - +DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -Ox -GL -fp:precise -DVE +RSION=\"3.005\" -DXS_VERSION=\"3.005\" "-IC:\Perl64\lib\CORE" -DND +EBUG srl_encoder.c srl_encoder.c c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(447) + : warning C4244: 'return' : conversion from 'uint64_t' to 'uint32_t' +, possible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(501) + : warning C4334: '<<' : result of 32-bit shift implicitly converted +to 64 bits (was 64-bit shift intended?) c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(550) + : warning C4244: '=' : conversion from '__int64' to 'uint16_t', poss +ible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(560) + : warning C4244: 'function' : conversion from '__int64' to 'int', po +ssible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(581) + : warning C4244: 'function' : conversion from '__int64' to 'int', po +ssible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(589) + : warning C4244: '=' : conversion from '__int64' to 'uint16_t', poss +ible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(593) + : warning C4244: '=' : conversion from '__int64' to 'uint16_t', poss +ible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(603) + : warning C4244: 'function' : conversion from '__int64' to 'int', po +ssible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(634) + : warning C4244: '+=' : conversion from '__int64' to 'uint32_t', pos +sible loss of data c:\perl64\packages\sereal-encoder-3.005\snappy/csnappy_compress.c(650) + : warning C4244: '+=' : conversion from '__int64' to 'uint32_t', pos +sible loss of data c:\perl64\packages\sereal-encoder-3.005\srl_compress.h(61) : warning C +4244: '=' : conversion from 'UV' to 'unsigned char', possible loss of + data c:\perl64\packages\sereal-encoder-3.005\srl_compress.h(143) : warning +C4267: 'function' : conversion from 'size_t' to 'uint32_t', possible +loss of data c:\perl64\packages\sereal-encoder-3.005\srl_compress.h(144) : warning +C4267: 'function' : conversion from 'size_t' to 'mz_ulong', possible +loss of data srl_encoder.c(405) : warning C4244: '=' : conversion from 'UV' to 'U32 +', possible loss of data srl_encoder.c(439) : warning C4244: '=' : conversion from 'IV' to 'int +', possible loss of data srl_encoder.c(904) : error C2143: syntax error : missing ';' before 'c +onst' srl_encoder.c(906) : error C2065: 'compress_flags' : undeclared identi +fier srl_encoder.c(913) : error C2065: 'compress_flags' : undeclared identi +fier srl_encoder.c(927) : error C2065: 'compress_flags' : undeclared identi +fier srl_encoder.c(927) : warning C4244: 'function' : conversion from 'IV' +to 'const int', possible loss of data srl_encoder.c(936) : error C2065: 'compress_flags' : undeclared identi +fier srl_encoder.c(948) : error C2143: syntax error : missing '{' before '* +' srl_encoder.c(950) : error C2371: 'srl_dump_data_structure_mortal_sv' +: redefinition; different basic types c:\perl64\packages\sereal-encoder-3.005\srl_encoder.h(61) : se +e declaration of 'srl_dump_data_structure_mortal_sv' srl_encoder.c(965) : warning C4133: 'return' : incompatible types - fr +om 'SV *' to 'int *' srl_encoder.c(968) : warning C4133: 'return' : incompatible types - fr +om 'SV *' to 'int *' srl_encoder.c(1057) : warning C4244: 'function' : conversion from 'UV' + to 'const char', possible loss of data srl_encoder.c(1068) : warning C4244: 'function' : conversion from 'UV' + to 'I32', possible loss of data srl_encoder.c(1069) : error C2143: syntax error : missing ';' before ' +type' srl_encoder.c(1069) : error C2065: 'svt' : undeclared identifier srl_encoder.c(1076) : error C2143: syntax error : missing ';' before ' +type' srl_encoder.c(1076) : error C2065: 'svt' : undeclared identifier srl_encoder.c(1096) : warning C4267: '=' : conversion from 'size_t' to + 'int', possible loss of data srl_encoder.c(1132) : warning C4244: 'function' : conversion from 'UV' + to 'const char', possible loss of data srl_encoder.c(1176) : error C2143: syntax error : missing ';' before ' +type' srl_encoder.c(1176) : error C2065: 'svt' : undeclared identifier srl_encoder.c(1185) : error C2143: syntax error : missing ';' before ' +type' srl_encoder.c(1185) : error C2065: 'svt' : undeclared identifier srl_encoder.c(1198) : warning C4244: 'function' : conversion from 'UV' + to 'const char', possible loss of data srl_encoder.c(1210) : error C2143: syntax error : missing ';' before ' +type' srl_encoder.c(1210) : error C2065: 'svt' : undeclared identifier srl_encoder.c(1519) : warning C4244: 'function' : conversion from 'UV' + to 'U32', possible loss of data srl_encoder.c(1523) : warning C4244: 'function' : conversion from 'UV' + to 'U32', possible loss of data NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual S +tudio 9.0\VC\Bin\amd64\cl.EXE"' : return code '0x2' Stop.

    And investigating the first ERRORs in both cases shows:

    srl_decoder.c(1369) : error C2143: syntax error : missing ';' before ' +type' srl_decoder.c(1370) : error C2065: 'tag' : undeclared identifier srl_read_refn(pTHX_ srl_decoder_t *dec, SV* into) { SV *referent; ASSERT_BUF_SPACE(dec, 1, " while reading REFN referent"); U8 tag= *(dec->pos); /* Look ahead for special vars. */

    And:

    srl_encoder.c(904) : error C2143: syntax error : missing ';' before 'c +onst' srl_encoder.c(906) : error C2065: 'compress_flags' : undeclared identi +fier srl_dump_data_structure(pTHX_ srl_encoder_t *enc, SV *src, SV *user_he +ader_src) { enc = srl_prepare_encoder(aTHX_ enc); const U32 compress_flags= SRL_ENC_HAVE_OPTION(enc, SRL_F_COMPRESS_ +FLAGS_MASK);

    Basically, the source files are not C language compliant: You cannot have declarations after executable statements within a block.

    It seems that gcc allows this, but I don't use gcc, so.

    (I'd also say that having been forced to inspect the code; I see no reason to trust this code more than Storable, and quite a few reasons to trust it less. IMO: Any C programmer who ignores that many warnings, is like a Perl programmer who doesn't use strict or warnings.)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked
      Did you file a bug report about this?
        Did you file a bug report about this?

        Apart from the fact that it had already been reported 3 days earlier; I'd seen enough by then to realise that it wasn't worth the effort.

        Viz: 8 months on and there has been no action whatsoever.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
        In the absence of evidence, opinion is indistinguishable from prejudice.