Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

dvergin (1020)

dvergin
  (email not shown publicly)

Programmer with BigMindMedia.com living on Whidbey Island in Puget Sound in the state of Washington.

Journal of dvergin (1020)

Wednesday March 16, 2005
12:40 AM

More Perl6-Pugs feedback

First a compile problem with a recent revision. Farther down, an issue with postpositionals.

Yesterday I posted a Pugs issue simply as a record for my own use and then was surprised to see that the gods had taken notice (search on the page for "dvergin"). I applied the needed patch by hand <shrug> and am up and running again with Perl6-Pugs-6.0.11.

Thus emboldened, I located the browsable svn repository and wget'ed the package (too lazy to set up a subversion client). The version I grabbed (779) has compile probs under WinXP SP2 with ghc 6.4 again.

Here's the beginning of the (working) hand-patched Perl6-Pugs-6.0.11 install:

C:\bin\perl6\Perl6-Pugs-6.0.11>perl Makefile.PL
*** Readline support disabled.  If you want readline support,
    please install Term::ReadLine::Gnu from CPAN, as well as
    the GNU Readline headers and shared library.
Writing Makefile for Kwid
Writing Makefile for Pugs::MakeMaker
Writing Makefile for Test
Writing Makefile for Perl6::Pugs

C:\bin\perl6\Perl6-Pugs-6.0.11>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

        C:\Perl\bin\perl.exe -Iinc -MExtUtils::Command -e cp kwid C:\bin\perl6\P
erl6-Pugs-6.0.11\blib6\script\kwid
        pl2bat.bat C:\bin\perl6\Perl6-Pugs-6.0.11\blib6\script\kwid
        ghc --make -isrc -static -Wall -fno-warn-missing-signatures -fno-warn-na
me-shadowing -o pugs src\Main.hs

C:\bin\perl6\Perl6-Pugs-6.0.11>\ghc\ghc-6.4\bin\ghc.exe --make -isrc -static -Wa
ll -fno-warn-missing-signatures -fno-warn-name-shadowing -o pugs src\Main.hs
Chasing modules from: src/Main.hs
Skipping  Config           ( src/Config.hs, src/Config.o )
Skipping  Help             ( src/Help.hs, src/Help.o )
Skipping  UTF8             ( src/UTF8.lhs, src/UTF8.o )
Skipping  Cont             ( src/Cont.hs, src/Cont.o )
Skipping  Rule.Pos         ( src/Rule/Pos.hs, src/Rule/Pos.o )

But here is the same thing for Revision 779:

C:\bin\perl6\svn.openfoundry.org\pugs>perl Makefile.PL
*** Readline support disabled.  If you want readline support,
    please install Term::ReadLine::Gnu from CPAN, as well as
    the GNU Readline headers and shared library.
Writing Makefile for Kwid
Writing Makefile for Pugs::MakeMaker
Writing Makefile for Test
Writing Makefile for Perl6::Pugs

C:\bin\perl6\svn.openfoundry.org\pugs>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

        ghc --make -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing -
o ./kwid.exe ./src\Main.hs -i"./src"

C:\bin\perl6\svn.openfoundry.org\pugs\ext\Kwid>\ghc\ghc-6.4\bin\ghc .exe --make -
Wall -fno-warn-missing-signatures -fno-warn-name-shadowing -o ./kwid.exe ./src\M
ain.hs -i"./src"
Chasing modules from: ./src/Main.hs
ghc.exe: can't find file `./src/Main.hs'
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1'
Stop.
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x2'
Stop.

I did some diff's but couldn't find the source of the problem. I do notice the difference between -isrc and -i"./src" but can't find the source of this and can't dope out its implications.

-------------------------------------------

Meanwhile I have found some problems with the compiled Perl6-Pugs-6.0.11. This started out as something else involving postposition calls failing in other than simple settings. Here are a few tests that seem to demonstrate the problem:

#!/usr/bin/perl6
use v6;

require Test;

my $filename = 'tempfile';

my $out = open(">$filename");

is($out.ref,  'Handle',   'Postposition .ref works when alone');
is(ref($out), 'Handle',   'Function ref() works alone');
ok(ref($out) eq 'Handle', 'Function ref() works in a statement');
#ok($out.ref  eq 'Handle', 'But .ref crashes in a statement');
$out.close;

my $num = 2.5
is($num,          2.5, '$num is 2.5');
is(int($num),     2,   'int() works alone');
is($num.int,      2,   '.int works alone');
is($num + 1,      3.5, '$num + 1 is 3.5');
is(int($num) + 1, 3,   'int() works in a statement');
#is($num.int  + 1, 3, 'But .int crashes in a statement');

Tuesday March 15, 2005
01:46 AM

Pugs (perl6) compile fails

[ #23656 ]
I previously had Perl6-Pugs-6.0.9 working just fine. Now Perl6-Pugs-6.0.11 is out. I upgraded to GHC 6.4 and went at it.

The "perl Makefile.PL" went fine. But then no joy...

C:\bin\perl6\Perl6-Pugs-6.0.11>nmake

Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

cp lib/Perl6/Pugs.pm blib\lib\Perl6\Pugs.pm
cp lib/Kwid.pm C:\bin\perl6\Perl6-Pugs-6.0.11\blib6\lib\Kwid.pm
cp lib/perlkwid.kwid C:\bin\perl6\Perl6-Pugs-6.0.11\blib6\lib\perlkwid.kwid
        C:\Perl\bin\perl.exe -Iinc -MExtUtils::Command -e cp kwid C:\bin\perl6\P
erl6-Pugs-6.0.11\blib6\script\kwid
        pl2bat.bat C:\bin\perl6\Perl6-Pugs-6.0.11\blib6\script\kwid
cp lib/Pugs/MakeMaker.pm C:\bin\perl6\Perl6-Pugs-6.0.11\blib\lib\Pugs\MakeMaker.
pm
cp lib/Test.pm C:\bin\perl6\Perl6-Pugs-6.0.11\blib6\lib\Test.pm
        C:\Perl\bin\perl.exe -Iutil -MPugsConfig -e "PugsConfig->write_config_mo
dule" > src\Config.hs
        ghc --make -static -Wall -fno-warn-deprecations -fno-warn-missing-signat
ures -fno-warn-name-shadowing -o pugs src\Main.hs -isrc

C:\bin\perl6\Perl6-Pugs-6.0.11>\ghc\ghc-6.4\bin\ghc.exe --make -static -Wall -fn
o-warn-deprecations -fno-warn-missing-signatures -fno-warn-name-shadowing -o pug
s src\Main.hs
Chasing modules from: src/Main.hs
Could not find module `Posix':
  use -v to see a list of the files searched for
  (imported from src/Main.hs)
NMAKE : fatal error U1077: 'C:\WINNT\system32\cmd.exe' : return code '0x1'
Stop.

Here's the odd part. If I edit src/Main.hs to move the reference to Posix farther up in the list of imports near the top of the file, it loads fine and whichever import that happens to be last causes the same error as Posix did above. I could not find a fiddle that solved the problem.