OpenGL for Parrot proof of concept
Imagine my delight upon reading this in the Perl 6 Design Team minutes: * also had a contact from someone who wants to port OpenGL to Parrot * not Geoff Broadwell * seems like a very serious approach Ouch! You wound me, sir! Just for the record, I've attached my OpenGL/GLUT proof of concept. The call_list patch must be applied to call_list.txt to add the new NCI signatures I am using (these are *FAR* from a complete set, just what I have actually used in the proof of concept code). The tarball contains the following files: runtime/parrot/library/OpenGL.pir -- PIR wrapper for GLUT/OpenGL runtime/parrot/library/gen_glut_callbacks.pl -- generates next file runtime/parrot/library/glut_callbacks.c -- GLUT callback handling examples/opengl/triangle.pir -- simple test/demo of OpenGL library make-glut -- harcoded script to make a .so from glut_callbacks.c To try this out, you should: 1. Make sure you have freeglut installed; no graceful degrading yet for really ancient GLUT implementations. 2. Update to the latest Parrot source tree (I'm on r26609 right now). 3. cd to the top level of the source tree and stay there. 4. Apply the patch for call_list.txt. 5. Configure and make Parrot. 6. Frob make-glut until it works for you; I'm on linux-i386. Sorry that I have not had time to merge this into the normal build. 7. Run ./make-glut to create runtime/parrot/dynext/libglutcb.so . 8. Run ./parrot examples/opengl/triangle.pir to test that it all worked. I believe that the GLUT callback code is complete -- that was my huge sticking point previously -- but most of the other stuff is pretty minimal. There are a few abstractions in OpenGL.pir that may be useful for other libraries, but they have not yet been factored into a separate PIR file. I have also attached a trivial patch to tools/dev/cc_flags.pl that makes it notice a DEBUG_CC_FLAGS environment variable telling it to spit out the complete command line for each cc call. This was very helpful when creating make-glut, and may be helpful for bending it to other operating systems (assuming no one just makes the real build system generate libglutcb.so properly). Anyway -- Bob, you're up. :-) -'f parrot-opengl-2008-03-28.tar.gz Description: application/compressed-tar === src/call_list.txt == --- src/call_list.txt (revision 4408) +++ src/call_list.txt (local) @@ -278,6 +278,14 @@ pptp ipt33 +# Used by OpenGL (including GLU and GLUT) +v3p +vPP +vPPi +vPPii +vfff +v + # For python iJPP === tools/dev/cc_flags.pl == --- tools/dev/cc_flags.pl (revision 4409) +++ tools/dev/cc_flags.pl (local) @@ -139,6 +139,8 @@ exit; } +print "@ARGV\n\n" if $ENV{DEBUG_CC_FLAGS}; + exit system(@ARGV) / 256; # Local Variables:
RE: [perl #51916] Error in tests after build
I'm not sure I'm really qualified to answer this, since I'm not really a Perlistanian, but in general, if something shipping with Parrot depends on something else, it should be in the Parrot tree (in either source or binary form, whichever is more convenient and/or makes the most sense). If there's a common set of "somethings" that lots of those languages depend on, then the same rule applies. I don't know the impact of creating "bundles", so I'm kinda speaking from ignorance, so take with large grain of salt. Ted Neward Java, .NET, XML Services Consulting, Teaching, Speaking, Writing http://www.tedneward.com > -Original Message- > From: James Keenan via RT [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 25, 2008 7:35 PM > To: [EMAIL PROTECTED] > Subject: [perl #51916] Error in tests after build > > On Fri Mar 21 19:23:13 2008, [EMAIL PROTECTED] wrote: > > No, and it appears not be part of Bundle::Parrot on CPAN, either. > We'll > > have to rectify this. > > > > Coke asked me to pose this question for general discussion: > > If individual languages -- as distinct from Parrot itself -- require > non-core modules from CPAN, should such modules go into Bundle::Parrot? > Should we create a Bundle::Parrot::Languages? Should we create a > Bundle::Parrot::SomeSpecificLanguage? > > No virus found in this incoming message. > Checked by AVG. > Version: 7.5.519 / Virus Database: 269.22.0/1342 - Release Date: > 3/25/2008 10:26 AM > No virus found in this outgoing message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.1/1348 - Release Date: 3/28/2008 10:58 AM
[perl #52222] Test 3 of t/dynoplibs/myops.t crashes with a bus error
# New Ticket Created by "Seneca Cunningham" # Please include the string: [perl #5] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=5 > This failure is not visible in prove -v output. herodotus:parrot seneca$ ./parrot t/dynoplibs/myops_3.pir neither here Bus error Crash report logs: Process: parrot [92490] Path:./parrot Identifier: parrot Version: ??? (???) Code Type: PPC (Native) Parent Process: bash [70067] Date/Time: 2008-03-28 22:32:16.565 -0400 OS Version: Mac OS X 10.5.2 (9C31) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x Crashed Thread: 0 Thread 0 Crashed: 0 myops_ops.bundle0x0202fe70 Parrot_hcf + 32 (myops.ops:54) 1 libparrot.dylib 0x006d6af0 runops_slow_core + 304 (runops_cores.c:219) 2 libparrot.dylib 0x006d6af0 runops_slow_core + 304 (runops_cores.c:219) 3 libparrot.dylib 0x0069e160 runops_int + 672 (interpreter.c:916) 4 libparrot.dylib 0x0069ee18 runops + 360 (inter_run.c:104) 5 libparrot.dylib 0x0069f138 runops_args + 488 (inter_run.c:230) 6 libparrot.dylib 0x0069f2dc Parrot_runops_fromc_args + 108 (inter_run.c:299) 7 libparrot.dylib 0x0067eaf0 Parrot_runcode + 784 (embed.c:941) 8 libparrot.dylib 0x0093c924 imcc_run_pbc + 324 (main.c:795) 9 libparrot.dylib 0x0093d3b8 imcc_run + 872 (main.c:1083) 10 parrot 0x2434 main + 148 (main.c:56) 11 parrot 0x2340 start + 64 Thread 0 crashed with PPC Thread State 32: srr0: 0x0202fe70 srr1: 0xd030 dar: 0x dsisr: 0x4000 r0: 0xr1: 0xb330r2: 0xr3: 0x01719208 r4: 0x017002d0r5: 0x000dr6: 0x020204f8r7: 0x00ff r8: 0x01834070r9: 0x0184d600 r10: 0x r11: 0x8fe33c48 r12: 0x0202fe50 r13: 0x r14: 0x r15: 0x r16: 0x r17: 0x r18: 0x r19: 0x r20: 0x r21: 0x r22: 0x r23: 0x r24: 0x r25: 0x r26: 0xb75c r27: 0x000c r28: 0x r29: 0x r30: 0xb330 r31: 0x006d69d8 cr: 0x82000224 xer: 0x0004lr: 0x006d6af4 ctr: 0x0202fe50 vrsave: 0x Binary Images: 0x1000 - 0x6ffb +parrot ??? (???) <7ffd39642fcd0719a153e352cf920993> /opt/src/perl6/svn-clean-only/parrot/parrot 0x9000 - 0xbffd libutil.dylib ??? (???) /usr/lib/libutil.dylib 0x73000 -0x97fdf +libreadline.5.2.dylib ??? (???) /opt/readline52_20071129/lib/libreadline.5.2.dylib 0x125000 - 0x20bff7 +libicuuc.38.dylib ??? (???) /usr/local/lib/libicuuc.38.dylib 0x24a000 - 0x26bff1 libmx.A.dylib ??? (???) /usr/lib/libmx.A.dylib 0x5f - 0x9ca2e7 +libparrot.dylib ??? (???) /opt/src/perl6/svn-clean-only/parrot/blib/lib/libparrot.dylib 0xbe - 0x16b5fff +libicudata.38.dylib ??? (???) /usr/local/lib/libicudata.38.dylib 0x202f000 - 0x2030ff7 +myops_ops.bundle ??? (???) <797b76702fc8520cde6f541b6052c82d> /opt/src/perl6/svn-clean-only/parrot/runtime/parrot/dynext/myops_ops.bundle 0x8fe0 - 0x8fe30b23 dyld 96.2 (???) <39109181acbf30fed542e6c9abcf1798> /usr/lib/dyld 0x90779000 - 0x9077eff6 libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x91b7a000 - 0x91be1ffb libstdc++.6.dylib ??? (???) /usr/lib/libstdc++.6.dylib 0x91cf1000 - 0x91d22fff libncurses.5.4.dylib ??? (???) <56daabc03ccebeaebb5e5efcbe594bd0> /usr/lib/libncurses.5.4.dylib 0x921e8000 - 0x921f3ffb libgcc_s.1.dylib ??? (???) /usr/lib/libgcc_s.1.dylib 0x95aff000 - 0x95bb9fff libcrypto.0.9.7.dylib ??? (???) <4ea3d7e9a1c28ac7b17ed80873fe6598> /usr/lib/libcrypto.0.9.7.dylib 0x96151000 - 0x962eafe3 libSystem.B.dylib ??? (???) <754231f5e52ed8418f89f1f3369caf58> /usr/lib/libSystem.B.dylib 0x8000 - 0x9703 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib -- Seneca Cunningham <[EMAIL PROTECTED]>
[perl #52224] Parrot::Test calls parrot with a bogus optimization values when run in /opt
# New Ticket Created by "Seneca Cunningham" # Please include the string: [perl #52224] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=52224 > Parrot::Test uses the full path of the test script to determine which optimization flags to pass parrot. The method used causes the bogus optimization value '/' to be extracted when running the tests in /opt/foo as the character immediately following 'opt' is '/'. The relevant code is lines 767 - 786 of lib/Parrot/Test.pm (r26609). -- Seneca Cunningham <[EMAIL PROTECTED]>
[perl #52220] Test 335 of t/op/01-parse_ops.t segfaults
# New Ticket Created by "Seneca Cunningham" # Please include the string: [perl #52220] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=52220 > herodotus:parrot seneca$ ./parrot t/op/01-parse_ops_335.pasm Bus error Crash reporter log: Process: parrot [80742] Path:./parrot Identifier: parrot Version: ??? (???) Code Type: PPC (Native) Parent Process: bash [70067] Date/Time: 2008-03-28 21:31:41.314 -0400 OS Version: Mac OS X 10.5.2 (9C31) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x003c Crashed Thread: 0 Thread 0 Crashed: 0 libparrot.dylib 0x00952b38 INS + 2104 (parser_util.c:749) 1 libparrot.dylib 0x0092d1b4 yyparse + 4276 (imcc.y:824) 2 libparrot.dylib 0x0093cf24 compile_to_bytecode + 500 (main.c:955) 3 libparrot.dylib 0x0093d2b0 imcc_run + 608 (main.c:1058) 4 parrot 0x2434 main + 148 (main.c:56) 5 parrot 0x2340 start + 64 Thread 0 crashed with PPC Thread State 32: srr0: 0x00952b38 srr1: 0x0200f030 dar: 0x003c dsisr: 0x4000 r0: 0xr1: 0xbfffedb0r2: 0xr3: 0x r4: 0x0095a694r5: 0xfefefeffr6: 0x80808080r7: 0x r8: 0xr9: 0x0008 r10: 0x62fefeff r11: 0x00808080 r12: 0x00808080 r13: 0x r14: 0x r15: 0x r16: 0x r17: 0x r18: 0x r19: 0x r20: 0x r21: 0x r22: 0x r23: 0x r24: 0x r25: 0x r26: 0xb754 r27: 0x000c r28: 0x r29: 0x01849600 r30: 0xbfffedb0 r31: 0x00952318 cr: 0x44000422 xer: 0x0004lr: 0x00952b18 ctr: 0x9615b140 vrsave: 0x Binary Images: 0x1000 - 0x6ffb +parrot ??? (???) <7ffd39642fcd0719a153e352cf920993> /opt/src/perl6/svn-clean-only/parrot/parrot 0x9000 - 0xbffd libutil.dylib ??? (???) /usr/lib/libutil.dylib 0x73000 -0x97fdf +libreadline.5.2.dylib ??? (???) /opt/readline52_20071129/lib/libreadline.5.2.dylib 0x125000 - 0x20bff7 +libicuuc.38.dylib ??? (???) /usr/local/lib/libicuuc.38.dylib 0x24a000 - 0x26bff1 libmx.A.dylib ??? (???) /usr/lib/libmx.A.dylib 0x5f - 0x9ca2e7 +libparrot.dylib ??? (???) /opt/src/perl6/svn-clean-only/parrot/blib/lib/libparrot.dylib 0xbe - 0x16b5fff +libicudata.38.dylib ??? (???) /usr/local/lib/libicudata.38.dylib 0x8fe0 - 0x8fe30b23 dyld 96.2 (???) <39109181acbf30fed542e6c9abcf1798> /usr/lib/dyld 0x90779000 - 0x9077eff6 libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib 0x91b7a000 - 0x91be1ffb libstdc++.6.dylib ??? (???) /usr/lib/libstdc++.6.dylib 0x91cf1000 - 0x91d22fff libncurses.5.4.dylib ??? (???) <56daabc03ccebeaebb5e5efcbe594bd0> /usr/lib/libncurses.5.4.dylib 0x921e8000 - 0x921f3ffb libgcc_s.1.dylib ??? (???) /usr/lib/libgcc_s.1.dylib 0x95aff000 - 0x95bb9fff libcrypto.0.9.7.dylib ??? (???) <4ea3d7e9a1c28ac7b17ed80873fe6598> /usr/lib/libcrypto.0.9.7.dylib 0x96151000 - 0x962eafe3 libSystem.B.dylib ??? (???) <754231f5e52ed8418f89f1f3369caf58> /usr/lib/libSystem.B.dylib 0x8000 - 0x9703 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib -- Seneca Cunningham <[EMAIL PROTECTED]>
Re: [perl #52220] Test 335 of t/op/01-parse_ops.t segfaults
On Fri, Mar 28, 2008 at 9:42 PM, via RT Seneca Cunningham <[EMAIL PROTECTED]> wrote: > # New Ticket Created by "Seneca Cunningham" > # Please include the string: [perl #52220] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=52220 > > > > herodotus:parrot seneca$ ./parrot t/op/01-parse_ops_335.pasm > Bus error > > Crash reporter log: > Process: parrot [80742] > Path:./parrot > Identifier: parrot > Version: ??? (???) > Code Type: PPC (Native) > Parent Process: bash [70067] > > Date/Time: 2008-03-28 21:31:41.314 -0400 > OS Version: Mac OS X 10.5.2 (9C31) > Report Version: 6 > > Exception Type: EXC_BAD_ACCESS (SIGBUS) > Exception Codes: KERN_PROTECTION_FAILURE at 0x003c > Crashed Thread: 0 > > Thread 0 Crashed: > 0 libparrot.dylib 0x00952b38 INS + 2104 > (parser_util.c:749) > 1 libparrot.dylib 0x0092d1b4 yyparse + 4276 (imcc.y:824) > 2 libparrot.dylib 0x0093cf24 compile_to_bytecode + > 500 (main.c:955) > 3 libparrot.dylib 0x0093d2b0 imcc_run + 608 > (main.c:1058) > 4 parrot 0x2434 main + 148 (main.c:56) > 5 parrot 0x2340 start + 64 > > Thread 0 crashed with PPC Thread State 32: > srr0: 0x00952b38 srr1: 0x0200f030 dar: 0x003c dsisr: 0x4000 >r0: 0xr1: 0xbfffedb0r2: 0xr3: 0x >r4: 0x0095a694r5: 0xfefefeffr6: 0x80808080r7: 0x >r8: 0xr9: 0x0008 r10: 0x62fefeff r11: 0x00808080 > r12: 0x00808080 r13: 0x r14: 0x r15: 0x > r16: 0x r17: 0x r18: 0x r19: 0x > r20: 0x r21: 0x r22: 0x r23: 0x > r24: 0x r25: 0x r26: 0xb754 r27: 0x000c > r28: 0x r29: 0x01849600 r30: 0xbfffedb0 r31: 0x00952318 >cr: 0x44000422 xer: 0x0004lr: 0x00952b18 ctr: 0x9615b140 > vrsave: 0x > > Binary Images: >0x1000 - 0x6ffb +parrot ??? (???) > <7ffd39642fcd0719a153e352cf920993> > /opt/src/perl6/svn-clean-only/parrot/parrot >0x9000 - 0xbffd libutil.dylib ??? (???) > /usr/lib/libutil.dylib > 0x73000 -0x97fdf +libreadline.5.2.dylib ??? (???) > /opt/readline52_20071129/lib/libreadline.5.2.dylib > 0x125000 - 0x20bff7 +libicuuc.38.dylib ??? (???) > /usr/local/lib/libicuuc.38.dylib > 0x24a000 - 0x26bff1 libmx.A.dylib ??? (???) /usr/lib/libmx.A.dylib > 0x5f - 0x9ca2e7 +libparrot.dylib ??? (???) > > /opt/src/perl6/svn-clean-only/parrot/blib/lib/libparrot.dylib > 0xbe - 0x16b5fff +libicudata.38.dylib ??? (???) > /usr/local/lib/libicudata.38.dylib > 0x8fe0 - 0x8fe30b23 dyld 96.2 (???) > <39109181acbf30fed542e6c9abcf1798> /usr/lib/dyld > 0x90779000 - 0x9077eff6 libmathCommon.A.dylib ??? (???) > /usr/lib/system/libmathCommon.A.dylib > 0x91b7a000 - 0x91be1ffb libstdc++.6.dylib ??? (???) > /usr/lib/libstdc++.6.dylib > 0x91cf1000 - 0x91d22fff libncurses.5.4.dylib ??? (???) > <56daabc03ccebeaebb5e5efcbe594bd0> /usr/lib/libncurses.5.4.dylib > 0x921e8000 - 0x921f3ffb libgcc_s.1.dylib ??? (???) > /usr/lib/libgcc_s.1.dylib > 0x95aff000 - 0x95bb9fff libcrypto.0.9.7.dylib ??? (???) > <4ea3d7e9a1c28ac7b17ed80873fe6598> /usr/lib/libcrypto.0.9.7.dylib > 0x96151000 - 0x962eafe3 libSystem.B.dylib ??? (???) > <754231f5e52ed8418f89f1f3369caf58> /usr/lib/libSystem.B.dylib > 0x8000 - 0x9703 libSystem.B.dylib ??? (???) > /usr/lib/libSystem.B.dylib > ouch. the contents of t/op/01-parse_ops_335.pasm should be somewhere between 2 and 12 lines. could you paste it inline? it would help us find the op(s) causing the segfault. ~jerry
[perl #52224] Parrot::Test calls parrot with a bogus optimization values when run in /opt
On Fri Mar 28 21:03:12 2008, [EMAIL PROTECTED] wrote: > Parrot::Test uses the full path of the test script to determine which > optimization flags to pass parrot. The method used causes the bogus > optimization value '/' to be extracted when running the tests in > /opt/foo as the character immediately following 'opt' is '/'. > > The relevant code is lines 767 - 786 of lib/Parrot/Test.pm (r26609). > If we simply add a forward slash after 'opt', does that solve the problem? (see attached) kid51 Index: lib/Parrot/Test.pm === --- lib/Parrot/Test.pm (revision 26580) +++ lib/Parrot/Test.pm (working copy) @@ -770,7 +770,7 @@ # output file my $out_f = per_test( '.pasm', $test_no ); -my $opt = $code_f =~ m!opt(.)! ? "-O$1" : "-O1"; +my $opt = $code_f =~ m!opt/(.)! ? "-O$1" : "-O1"; my $args = $ENV{TEST_PROG_ARGS} || ''; $args .= " $opt --output=$out_f"; $args =~ s/--run-exec//;
[perl #52154] [RFC] Remove check for repository revision number
Coke et al.: Please evaluate the patch attached for commitment to trunk. As per my most recent post, it does not eliminate Parrot::Revision completely, but it does limit its scope to 'svn'. kid51 Index: tools/build/revision_c.pl === --- tools/build/revision_c.pl (revision 26622) +++ tools/build/revision_c.pl (working copy) @@ -1,39 +0,0 @@ -# Copyright (C) 2001-2007, The Perl Foundation. -# $Id$ - -=head1 NAME - -tools/build/revision_c.pl - -=head1 DESCRIPTION - -Creates F with current rev number taken from -F<.svn/entries> or F<.svk/entries> and config rev number of last -Parrot configure run. - -=head1 SEE ALSO - -F, -F, -F - -=cut - -use warnings; -use strict; -use lib qw{lib . ../lib ../../ lib}; -use Parrot::Revision::Utils qw( -get_revision_numbers -print_src_revision_c -); - -my ($current, $config) = get_revision_numbers(); - -print_src_revision_c($current, $config, $0); - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: Index: MANIFEST === --- MANIFEST(revision 26622) +++ MANIFEST(working copy) @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Sat Mar 29 10:07:19 2008 UT +# generated by tools/dev/mk_manifest_and_skip.pl Sat Mar 29 14:17:17 2008 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. @@ -1386,6 +1386,7 @@ languages/hq9plus/README[hq9plus] languages/hq9plus/config/makefiles/root.in [hq9plus] languages/hq9plus/hq9plus.pir [hq9plus] +languages/hq9plus/lib/Parrot/Test/HQ9plus.pm[hq9plus] languages/hq9plus/lib/Parrot/Test/Hq9plus.pm[hq9plus] languages/hq9plus/src/builtins/hello.pir[hq9plus] languages/hq9plus/src/builtins/nintynine_bottles_of_beer.pir [hq9plus] @@ -2540,7 +2541,6 @@ lib/Parrot/Pmc2c/UtilFunctions.pm [devel] lib/Parrot/Pmc2c/VTable.pm [devel] lib/Parrot/Revision.pm [devel] -lib/Parrot/Revision/Utils.pm[devel] lib/Parrot/Test.pm [devel] lib/Parrot/Test/APL.pm [devel] lib/Parrot/Test/Cardinal.pm [devel] @@ -3355,8 +3355,6 @@ t/pmc/vtablecache.t [] t/postconfigure/01-options.t[] t/postconfigure/02-data_slurp.t [] -t/postconfigure/03-revision.t [] -t/postconfigure/04-revision.t [] t/postconfigure/05-trace.t [] t/postconfigure/06-data_slurp_temp.t[] t/run/README[] @@ -3615,8 +3613,6 @@ t/tools/pmc2cutils/07-open_file.t [] t/tools/pmc2cutils/08-pmc-pm.t [] t/tools/pmc2cutils/README [] -t/tools/revision/01-get_revision_numbers.t [] -t/tools/revision/02-print_src.t [] t/tools/smartlinks.t[] tools/build/addopstags.pl [] tools/build/c2str.pl[] @@ -3632,7 +3628,6 @@ tools/build/pbc2c.pl[devel] tools/build/pbcversion_h.pl [] tools/build/pmc2c.pl[] -tools/build/revision_c.pl [devel] tools/build/vtable_extend.pl[] tools/build/vtable_h.pl [] tools/dev/.gdbinit [devel] Index: lib/Parrot/Revision/Utils.pm === --- lib/Parrot/Revision/Utils.pm(revision 26622) +++ lib/Parrot/Revision/Utils.pm(working copy) @@ -1,197 +0,0 @@ -# Copyright (C) 2001-2008, The Perl Foundation. -# $Id$ -package Parrot::Revision::Utils; -use strict; -use warnings; -use lib qw( lib ); -use Parrot::Revision; -use base qw( Exporter ); -our @EXPORT_OK = qw( -get_revision_numbers -print_src_revision_c -); - -sub get_revision_numbers { -my $current = 0; -my $config = 0; -if (-e 'DEVELOPING') { -$current = $Parrot::Revision::current; -eval 'use Parrot::Config; $config = $PConfig{revision};'; -} -return ($current, $config); -} - -sub print_src_revision_c { -my ($current, $config, $script) = @_; -print <<"EOF"; -/* ex: set ro: - * !!! DO NOT ED
Re: [perl #52198] [BUG]: Test failures on Win32: t/op/arithmetics.t t/op/sprintf.t t/pmc/complex.t t/pmc/float.t
chromatic wrote: On Friday 28 March 2008 11:55:30 James Keenan via RT wrote: Am confused. What diagnostic output beyond 'prove -v' are you referring to? For example... t/op/arithmetics1..26 ok 1 - take the negative of a native integer ok 2 - take the absolute of a native integer ok 3 - add native integer to native integer ok 4 - subtract native integer from native integer ok 5 - multiply native integer with native integer ok 6 - divide native integer by native integer not ok 7 - turn a native number into its negative ... diagnostic output missing right here... ok 8 - take the absolute of a native number The test expected the output: -0.00 0.00 -123.456789 123.456789 -0.00 0.00 -123.456789 123.456789 Obviously it received something else. What did it receive? As far as I know, Visual C++ is a bit shaky on the arithmetic side with regards to +/- 0.0. For example, the constant C<-0.0> is turned into C<0.0>. One has to revert to hacks like C<-1.0 * 0.0>, if I recall correctly. t/op/arithmetics.t not ok 7 - turn a native number into its negative # Failed test 'turn a native number into its negative' # at t\op\arithmetics.t line 210. # got: '0.00 # 0.00 # -123.456789 # 123.456789 # 0.00 # 0.00 # -123.456789 # 123.456789 # ' # expected: '-0.00 # 0.00 # -123.456789 # 123.456789 # -0.00 # 0.00 # -123.456789 # 123.456789 # ' t/op/sprintf.t not ok 157 - [%.0g] C99 standard mandates minus sign but C89 does not skip: MSWin32 VMS hpux:10.20 openbsd netbsd:1.5 irix actual: >0< t/pmc/complex.t not ok 48 - sinh of complex numbers # Failed test 'sinh of complex numbers' # at t\pmc\complex.t line 1647. # got: ' # sinh(0-2i) # got 0.00-0.909297i # not -0.00-0.909297i # # sinh(0+2i) # got 0.00+0.909297i # not -0.00+0.909297i # done # ' # expected: 'done # ' t/pmc/float.t not ok 23 - neg 0 # Failed test 'neg 0' # at t\pmc\float.t line 547. # '0' # doesn't match '/^-0/ # ' Ron
[perl #52230] apparently redundant code in pmc creators
# New Ticket Created by Stephane Payrard # Please include the string: [perl #52230] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=52230 > the code pmc.ops :96-97 seems redundant: pmc_type() is called twice with the same args for no apparent reason. And it seems to be a pure function. same for another pmc creator. I recompiled the patched code and tested rakudo with non adverse effect. Index: src/ops/pmc.ops === --- src/ops/pmc.ops (revision 26593) +++ src/ops/pmc.ops (working copy) @@ -93,8 +93,6 @@ $1 = VTABLE_instantiate(interp, classobj, PMCNULL); else { INTVAL type = pmc_type(interp, classname); -if (!type) -type = pmc_type(interp, classname); if (type <= 0) real_exception(interp, NULL, NO_CLASS, "Class '%Ss' not found", classname); @@ -111,8 +109,6 @@ $1 = VTABLE_instantiate(interp, classobj, $3); else { INTVAL type = pmc_type(interp, classname); -if (!type) -type = pmc_type(interp, classname); if (type <= 0) real_exception(interp, NULL, NO_CLASS, "Class '%Ss' not found", classname); -- cognominal stef
Re: [perl #48028] [DEPRECATED] PGE::P6Regex
As of this morning only the following files still need conversion for P6Regex, P6Grammar, and/or pgc: examples/pge/all.pir languages/tap/Makefile The examples/pge/all.pir file is a very outdated example of writing parsers using PGE -- the new way of doing it is to use Perl6Grammar or some other equivalent tool. So, I vote we just remove it altogether. Similarly, languages/tap was intended as an example of parsing using pgc. We can likewise eliminate it, but I think parsing TAP is still a useful demonstration, so perhaps it's better to keep it. I can update the tap.pg grammar to use Perl6Regex syntax, but there's not a "make test" target that I can use to see if it still works. Beyond that, I think it might be even *more* useful to re-develop languages/tap by starting over with make_language_shell.pl . But I think I'll leave that as an exercise for someone else. So, at this point I'm planning to - remove examples/pge/all.pir, - leave languages/tap/ as-is for someone else to update - remove P6Regex, P6Grammar, and pgc (assuming tests still pass) - close this ticket Any objections or comments? Thanks, Pm
Re: [perl #52220] Test 335 of t/op/01-parse_ops.t segfaults
On Saturday 29 March 2008 06:50:51 jerry gay wrote: > the contents of t/op/01-parse_ops_335.pasm should be somewhere between > 2 and 12 lines. could you paste it inline? it would help us find the > op(s) causing the segfault. The code is: end yield ... and it crashes because there's no coroutine from which to yield. The attached patch fixes this (in IMCC, sigh). Is there a cleaner way? I'll apply it unless I hear objections. -- c === compilers/imcc/parser_util.c == --- compilers/imcc/parser_util.c (revision 26615) +++ compilers/imcc/parser_util.c (local) @@ -746,6 +746,10 @@ PARROT_WARNINGS_on(interp, PARROT_WARNINGS_ALL_FLAG); } else if (STREQ(name, "yield")) { +if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]) +IMCC_fataly(interp, E_SyntaxError, +"Cannot yield from non-continuation\n"); + IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->calls_a_sub |= 1 | ITPCCYIELD; }
Re: [perl #52224] Parrot::Test calls parrot with a bogus optimization values when run in /opt
On Sat, 29 Mar 2008 07:03:17 -0700 "James Keenan via RT" <[EMAIL PROTECTED]> wrote: > If we simply add a forward slash after 'opt', does that solve the > problem? (see attached) Should this code really be checking the absolute pathname? We don't have any control over where a user places a parrot checkout, and honestly, I think we should be ignoring that as much as possible. I think a safer solution is to chuck the filename through basename() before doing the match. This changes Parrot::Test's behavior: an alternate "-O" option will only be used if the *filename* contains "optN", not if a leading directory name contains it. I don't see any uses of "optN" in directory names in the parrot tree, so I think it's ok. And it fixes the bug for me. See attached. Mark Index: lib/Parrot/Test.pm === --- lib/Parrot/Test.pm (revision 26625) +++ lib/Parrot/Test.pm (working copy) @@ -263,6 +263,7 @@ use Cwd; use File::Spec; +use File::Basename; use Memoize (); use Parrot::Config; @@ -766,11 +767,12 @@ # Name of the file with test code. my $code_f = File::Spec->rel2abs( per_test( '.pir', $test_no ) ); +my $code_basef = basename($code_f); # output file my $out_f = per_test( '.pasm', $test_no ); -my $opt = $code_f =~ m!opt(.)! ? "-O$1" : "-O1"; +my $opt = $code_basef =~ m!opt(.)! ? "-O$1" : "-O1"; my $args = $ENV{TEST_PROG_ARGS} || ''; $args .= " $opt --output=$out_f"; $args =~ s/--run-exec//;
Re: [perl #52224] Parrot::Test calls parrot with a bogus optimization values when run in /opt
On Sat, 29 Mar 2008 11:59:25 -0700 Mark Glines <[EMAIL PROTECTED]> wrote: > This changes Parrot::Test's behavior: an alternate "-O" option will > only be used if the *filename* contains "optN", not if a leading > directory name contains it. I don't see any uses of "optN" in > directory names in the parrot tree, so I think it's ok. And it fixes > the bug for me. See attached. Found a second place in Parrot::Test which was doing the same thing, causing a failure in t/pmc/sub.t. Fixed in the same way, new diff is attached. Now everything in "make test" passes for me. Mark Index: lib/Parrot/Test.pm === --- lib/Parrot/Test.pm (revision 26625) +++ lib/Parrot/Test.pm (working copy) @@ -263,6 +263,7 @@ use Cwd; use File::Spec; +use File::Basename; use Memoize (); use Parrot::Config; @@ -575,6 +576,7 @@ die "Unknown test function: $func"; } $code_f = File::Spec->rel2abs($code_f); +my $code_basef = basename($code_f); # native tests are just run, others need to write code first if ( $code_f !~ /\.pbc$/ ) { @@ -583,7 +585,7 @@ # honor opt* filename to actually run code with -Ox my $args = $ENV{TEST_PROG_ARGS} || ''; -my $opt = $code_f =~ m!opt(.)! ? "-O$1" : ""; +my $opt = $code_basef =~ m!opt(.)! ? "-O$1" : ""; $args .= " $opt"; my $run_exec = 0; @@ -766,11 +768,12 @@ # Name of the file with test code. my $code_f = File::Spec->rel2abs( per_test( '.pir', $test_no ) ); +my $code_basef = basename($code_f); # output file my $out_f = per_test( '.pasm', $test_no ); -my $opt = $code_f =~ m!opt(.)! ? "-O$1" : "-O1"; +my $opt = $code_basef =~ m!opt(.)! ? "-O$1" : "-O1"; my $args = $ENV{TEST_PROG_ARGS} || ''; $args .= " $opt --output=$out_f"; $args =~ s/--run-exec//;
Re: [perl #52224] Parrot::Test calls parrot with a bogus optimization values when run in /opt
On 29/03/2008, James Keenan via RT <[EMAIL PROTECTED]> wrote: > On Fri Mar 28 21:03:12 2008, [EMAIL PROTECTED] wrote: > > Parrot::Test uses the full path of the test script to determine which > > optimization flags to pass parrot. The method used causes the bogus > > optimization value '/' to be extracted when running the tests in > > /opt/foo as the character immediately following 'opt' is '/'. > > > > The relevant code is lines 767 - 786 of lib/Parrot/Test.pm (r26609). > > > > > > If we simply add a forward slash after 'opt', does that solve the > problem? (see attached) [patch snipped] Then it simply grabs 's' and passes parrot '-Os'. With my source tree location, $code_f ends up as /opt/src/perl6/svn/parrot/t/foo/test.t -- Seneca Cunningham <[EMAIL PROTECTED]>
[perl #52150] Parrot fails to build on Cygwin (r26569) due to linking missing -lcrypto
Oops. I only reported the $extraLibs patch to the mailinglist. diff -ub ./CREDITS.orig --- ./CREDITS.orig 2008-03-16 08:15:14.0 +0100 +++ ./CREDITS 2008-03-20 11:31:01.5 +0100 @@ -514,6 +514,10 @@ E: [EMAIL PROTECTED] W: http://www.bofh.org.uk:8080/ +N: Reini Urban +E: [EMAIL PROTECTED] +D: cygwin fixes + N: Richard Tibbetts D: Divide by zero exceptions in some PMCs diff -ub ./config/gen/makefiles/dynpmc_pl.in.orig --- ./config/gen/makefiles/dynpmc_pl.in.orig2007-08-24 01:15:14.0 +0200 +++ ./config/gen/makefiles/dynpmc_pl.in 2008-03-20 11:31:20.71875 +0100 @@ -92,6 +92,8 @@ } else { $liblist = join( ' ', map { "-l$_" } keys %$libs ); +my $extraLibs = '@libs@ @icu_shared@'; +$liblist .= ' ' . $extraLibs; } return -- Reini Urban 2008-03-20 11:31:40 <[EMAIL PROTECTED]> * CREDITS: add rurban * config/gen/makefiles/dynpmc_pl.in: add extralibs. diff -ub ./CREDITS.orig --- ./CREDITS.orig 2008-03-16 08:15:14.0 +0100 +++ ./CREDITS 2008-03-20 11:31:01.5 +0100 @@ -514,6 +514,10 @@ E: [EMAIL PROTECTED] W: http://www.bofh.org.uk:8080/ +N: Reini Urban +E: [EMAIL PROTECTED] +D: cygwin fixes + N: Richard Tibbetts D: Divide by zero exceptions in some PMCs diff -ub ./config/gen/makefiles/dynpmc_pl.in.orig --- ./config/gen/makefiles/dynpmc_pl.in.orig 2007-08-24 01:15:14.0 +0200 +++ ./config/gen/makefiles/dynpmc_pl.in 2008-03-20 11:31:20.71875 +0100 @@ -92,6 +92,8 @@ } else { $liblist = join( ' ', map { "-l$_" } keys %$libs ); +my $extraLibs = '@libs@ @icu_shared@'; +$liblist .= ' ' . $extraLibs; } return
Re: [perl #52230] apparently redundant code in pmc creators
On Saturday 29 March 2008 09:01:21 Stephane Payrard wrote: > the code pmc.ops :96-97 seems redundant: pmc_type() is called twice > with the same args for no apparent reason. And it seems to be a pure > function. > same for another pmc creator. > > I recompiled the patched code and tested rakudo with non adverse effect. Thanks, applied as r26629. -- c
Re: [perl #51894] [PATCH] aligning code and localization of vars
On Wednesday 19 March 2008 06:25:32 Klaas-Jan Stol wrote: > I don't commit this myself, because I want to check whether this > practice of localizing vars. is ok, as it introduces "else" clauses. That seems reasonable. > Not sure whether which is better. My personal preference is the patch, > obviously. > Comments welcome, so I know how to do this in the future. My only comment is that it's much easier to apply patches if you create them from the root of the checkout (such that the patch is against src/io/io.c, not just io.c). Thanks, applied as r26631. -- c
Re: [perl #52150] Parrot fails to build on Cygwin (r26569) due to linking missing -lcrypto
On Saturday 29 March 2008 11:58:53 Reini Urban via RT wrote: > Oops. I only reported the $extraLibs patch to the mailinglist. Thanks, applied in full as r26632. -- c
Re: [perl #48028] [DEPRECATED] PGE::P6Regex
On Saturday 29 March 2008 09:42:55 Patrick R. Michaud wrote: > As of this morning only the following files still need conversion > for P6Regex, P6Grammar, and/or pgc: > > examples/pge/all.pir > languages/tap/Makefile > > The examples/pge/all.pir file is a very outdated example of > writing parsers using PGE -- the new way of doing it is > to use Perl6Grammar or some other equivalent tool. So, > I vote we just remove it altogether. +1 > Similarly, languages/tap was intended as an example of parsing > using pgc. We can likewise eliminate it, but I think parsing > TAP is still a useful demonstration, so perhaps it's better to > keep it. I can update the tap.pg grammar to use Perl6Regex > syntax, but there's not a "make test" target that I can use > to see if it still works. The conversion should be easy, so let's do that first. -- c
Re: [perl #52154] [RFC] Remove check for repository revision number
On Saturday 29 March 2008 07:22:35 James Keenan via RT wrote: > Please evaluate the patch attached for commitment to trunk. As per my > most recent post, it does not eliminate Parrot::Revision completely, but > it does limit its scope to 'svn'. Remove the commented-out code and +1 from me. -- c
Re: [perl #51898] nmake on cygwin
On Wednesday 19 March 2008 07:15:17 [EMAIL PROTECTED] wrote: > Attached patch favors make over nmake on cygwin only, because there's > normally no gmake, but sometimes a nmake in the PATH. Thanks, applied as r26633. -- c
Re: [perl #52202] [BUG]: Rakudo build attempted on Win32 but couldn't get to Hello World
On Friday 28 March 2008 11:14:03 James Keenan wrote: > This is one of a series of tickets reporting issues encountered at a > Parrot/Rakudo buildfest held at Toronto Perlmongers on March 27, 2008. > > On the same Win32 box mentioned in RT 52198, the developer attempted > to build Rakudo, but 'say "Hello world"' was unsuccessful. Can > anyone help diagnose the problem? See attached log. > .\perl6bool.c(192) : warning C4716: 'Parrot_Perl6Bool_ro_pop_float' : must > return a value .\perl6bool.c(198) That's awfully weird. That message tends to appear when trying to compile a PMC that hasn't been updated to PDD 17 standards. Does the problem appear with a 'make realclean'? Is this a fresh checkout? Are there local modifications? -- c
Re: wishlist for NQP
On Thursday 27 March 2008 18:20:21 Patrick R. Michaud wrote: > Actually, it can be done without subclassing via the following > > .namespace [ 'ResizablePMCArray' ] > > .sub 'unshift' :method > .param pmc list > .param pmc value > unshift list, value > .end > > .sub 'shift' :method > .param pmc list > .param pmc value > shift list, value > .end > > > I've already commented that perhaps these should be a built-in > part of the ResizablePMCArray in Parrot. However, if that's > not likely to happen, then perhaps either PCT or NQP should > go ahead and provide them, so that they're available whenever > PCT is loaded. But part of me feels that adding methods to > ResizablePMCArray is a little out of NQP's scope. > > So, our choices become: > > 1. Have NQP automatically recognize shift/unshift/push/pop > as "special functions" (keywords) and map them directly to > Parrot's shift/unshift opcodes. That's not too bad, but I'd like to reduce the amount of special magic in Parrot as a general rule. > 2. Add shift/unshift/push/pop methods to ResizablePMCArray > (or one of its superclasses) in Parrot This is my preference. It feels like a role. > 3. Have PCT and/or NQP supply the shift/unshift/push/pop methods. > > 4. Have PCT and/or NQP define their own "List" subclass > that provide shift/unshift/push/pop (this could conflict with > "List" classes in other languages). Conflicts are no fun. -- c
Re: [perl #49766] toplevel 'make perl6' needs dependency fixup.
On Wednesday 19 March 2008 06:57:46 Reini Urban wrote: > I like the idea of make perl6 only on windows. > make perl6.exe is just a file, make perl6 is a whole new world :) > > One could > > ifdef WINDIR > perl6 : $(PERL6) > endif > > for the GNU-style makefile on cygwin > and with the appropriate nmake syntax on MSWin32 Attempted in r26635. -- c
Re: [perl #48028] [DEPRECATED] PGE::P6Regex
On Sat, Mar 29, 2008 at 12:42 PM, Patrick R. Michaud <[EMAIL PROTECTED]> wrote: > As of this morning only the following files still need conversion > for P6Regex, P6Grammar, and/or pgc: > > examples/pge/all.pir > languages/tap/Makefile > > The examples/pge/all.pir file is a very outdated example of > writing parsers using PGE -- the new way of doing it is > to use Perl6Grammar or some other equivalent tool. So, > I vote we just remove it altogether. > > Similarly, languages/tap was intended as an example of parsing > using pgc. We can likewise eliminate it, but I think parsing > TAP is still a useful demonstration, so perhaps it's better to > keep it. I can update the tap.pg grammar to use Perl6Regex > syntax, but there's not a "make test" target that I can use > to see if it still works. > > Beyond that, I think it might be even *more* useful to re-develop > languages/tap by starting over with make_language_shell.pl . > But I think I'll leave that as an exercise for someone else. > > So, at this point I'm planning to > - remove examples/pge/all.pir, > - leave languages/tap/ as-is for someone else to update > - remove P6Regex, P6Grammar, and pgc (assuming tests still pass) > - close this ticket +1, except that I would delete languages/tap and leave a note in LANGUAGES.STATUS at the bottom with the dead languages. No need to keep dead code in trunk. Good work, thanks! > Any objections or comments? > > Thanks, > > Pm > > -- Will "Coke" Coleda
Re: [perl #48587] [BUG] pmc.num contains missing PMCs
On Thursday 13 December 2007 19:32:11 Will Coleda wrote: > For example, parrotclass.pmc, parrotobject.pmc. > > ... Should this file be auto-generated? That's not easy, because config/auto/pmc.pm uses it to allow people to select at configuration time which PMCs to include and exclude. I'm not suggesting that that's a good idea. (Is this a negative litotes? Perhaps.) > If not, a test should be > written to insure that the items in here are complete and up to date. > (Assuming this file is used by anything) I'm having trouble figuring out how useful it is. -- c
Typo in S06?
S06.pod says (line 2698): : Ordinarily a top-level Perl "script" just evaluates its anonymous : mainline code and exits. During the mainline code, the program's : arguments are available in raw form from the C<@ARGS> array. At the end of : the mainline code, however, a C subroutine will be called with : whatever command-line arguments remain in C<@ARGS>. This call is : performed if and only if: Should these be C<@*ARGS> instead? Pm
Re: [perl #47289] [PATCH] Move executable code out of jit/i386/exec_dep.h
On Friday 09 November 2007 00:24:43 Paul Cochrane wrote: > I'll have a go at testing against the exec runcore and see what turns > up. This is likely something we should be testing more often right? Definitely. I ran a fulltest with this patch applied, and everything's fine on x86 (where it matters). Thanks, applied as r26636. -- c
Query re: duction and precedence.
In general, is [op] (p1,p2,p3,p4...) expected to return the same result as p1 op p2 op p3 op p4... including precedence considerations? That is, should [**](2,3,4) return 2^(3^4)=2^81, or (2^3)^4 = 4096? -- Mark J. Reed <[EMAIL PROTECTED]>
[svn:perl6-synopsis] r14529 - doc/trunk/design/syn
Author: larry Date: Sat Mar 29 20:16:29 2008 New Revision: 14529 Modified: doc/trunk/design/syn/S06.pod Log: fossil noticed by pmichaud++ Modified: doc/trunk/design/syn/S06.pod == --- doc/trunk/design/syn/S06.pod(original) +++ doc/trunk/design/syn/S06.podSat Mar 29 20:16:29 2008 @@ -2695,9 +2695,9 @@ Ordinarily a top-level Perl "script" just evaluates its anonymous mainline code and exits. During the mainline code, the program's -arguments are available in raw form from the C<@ARGS> array. At the end of +arguments are available in raw form from the C<@*ARGS> array. At the end of the mainline code, however, a C subroutine will be called with -whatever command-line arguments remain in C<@ARGS>. This call is +whatever command-line arguments remain in C<@*ARGS>. This call is performed if and only if: =over @@ -2755,7 +2755,7 @@ Common Unix command-line conventions are mapped onto the capture as follows: - On command line... $ARGS capture gets... + On command line... $*ARGS capture gets... -name :name -name=value:name
Re: Query re: duction and precedence.
On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote: : In general, is : : [op] (p1,p2,p3,p4...) : : expected to return the same result as : : p1 op p2 op p3 op p4... : : including precedence considerations? : : That is, should : : [**](2,3,4) : : return 2^(3^4)=2^81, or (2^3)^4 = 4096? Yes, in fact the section on Reduction Operators uses exponentiation obliquely in one of its examples of something that should work right-to-left. Admittedly it's not clearly stated there... But the basic idea is always that the reduction form should produce the same result as if you'd written it out with interspersed infixes. It's a linguistic construct, not a functional programming construct. It's not intended to be in the same league as foldl and foldr, and is only just slightly beyond a macro insofar as it can intersperse however many operators it needs to for an arbitrarily sized list. It's not making any attempt to deal with anonymous first-class functions though. Call a real function for that. :) Larry
Re: Query re: duction and precedence.
You anticipated me. So, is there a core method for foldl/foldr/inject/reduce, or do you have to roll your own as in p5? On 3/29/08, Larry Wall <[EMAIL PROTECTED]> wrote: > On Sat, Mar 29, 2008 at 10:18:53PM -0400, Mark J. Reed wrote: > : In general, is > : > : [op] (p1,p2,p3,p4...) > : > : expected to return the same result as > : > : p1 op p2 op p3 op p4... > : > : including precedence considerations? > : > : That is, should > : > : [**](2,3,4) > : > : return 2^(3^4)=2^81, or (2^3)^4 = 4096? > > Yes, in fact the section on Reduction Operators uses exponentiation > obliquely in one of its examples of something that should work > right-to-left. Admittedly it's not clearly stated there... > > But the basic idea is always that the reduction form should produce > the same result as if you'd written it out with interspersed infixes. > It's a linguistic construct, not a functional programming construct. > It's not intended to be in the same league as foldl and foldr, and > is only just slightly beyond a macro insofar as it can intersperse > however many operators it needs to for an arbitrarily sized list. > It's not making any attempt to deal with anonymous first-class > functions though. Call a real function for that. :) > > Larry > -- Sent from Gmail for mobile | mobile.google.com Mark J. Reed <[EMAIL PROTECTED]>