Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk
Tim (): I'd be grateful for feedback on any of the slides, but I'm especially interested in updates for: page 73 - Perl 6 implementations I've added Mildew, with links, to the SMOP line anything I should add / change / remove? What's the status of KindaPerl6? I think Elf could very well be added to those. page 77 - quantity of code writen in Perl 6 are there any other significant perl6 codebases? Again, Elf is a nice, large example. :) Counting up the lines of code in November: $ find lib -name \*.pm | xargs wc [...] 16185351 46558 total So 1600. But as always it depends on how you count: * Blank lines, comments... * We have another 1697 lines of tests. * We've factored out the module HTML::Template so that it sits in its own project, but those 500 lines of code could still be considered to be part of November, since they're run when November is. Depending on what you mean by significant, I'd also like to direct your attention towards SVG::Plot, proto, Gamebase, CSV, Druid, Form, HTTP::Daemon, Perl6::SQLite and Web.pm. All of those can be downloaded via proto. Anything else I should add, change or remove? I'm especially interested in verifyable metrics showing effort, progress, or use. Ideally graphical. Any interesting nuggets that fit with the theme will be most welcome. Moritz++ and I were talking about making a graph showing the increase of Perl 6 projects lately. Proto's project.list contains all the pertinent history, so half an hour with git-log and SVG::Plot ought to be able to produce something nice. If no-one else takes that as a hint, I might look at it soonish. :) // Carl
Re: [PATCH] Add .trim method
Jonathan (), Ovid (), Larry (): Can't say I really like the negated options though. They smell funny. Agreed, but ltrim and rtrim will disappoint Israelis and dyslexics alike. Suggestions welcome as I can't think of anything better. The .Net framework calls 'em TrimStart and TrimEnd (and has a Trim that does both). So maybe trim_start and trim_end if we wanted to take that lead... How about .trim(:start) and .trim(:end)? // Carl
Re: [PATCH] Add .trim method
Ovid (): =item trim our Str multi Str::trim ( Str $string ) Removes leading and trailing whitespace from a string. =cut I could optionally make the following work: $string.trim(:leading0); $string.trim(:trailing0); Setting leading or trailing to false (they default to true) would result in either leading or trailing whitespace not being trimmed. Setting both to false would be a no-op. Unless someone protests loudly, I can add this to S29, and I (or someone else with tuits) can implement it in Rakudo. // Carl
[perl #61256] examples/library/md5sum.pir is out of date
# New Ticket Created by Carl Mäsak # Please include the string: [perl #61256] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61256 masak ./parrot examples/library/md5sum.pir empty_file masak Class 'ParrotIO' not found masak current instr.: '_main' pc 43 (examples/library/md5sum.pir:54) masak what am I doing wrong? pmichaud one or more of your files is out of date pmichaud ParrotIO was removed a couple of days ago. masak ah. masak the PIR file itself references ParrotIO
Re: [perl #59112] Failing test in t/examples/library.t
James (): Can you report what results you are currently getting when you run: prove -v t/examples/library.t ? $ prove -v t/examples/library.t t/examples/library.t 1..4 ok 1 - examples/library/getopt_demo.pir ok 2 - examples/library/md5sum.pir 7.7 Failed to load libpcre current instr.: 'parrot;PCRE;init' pc 99 (library/pcre.pir:111) called from Sub 'parrot;PCRE;main' pc 215 (examples/library/pcre.pir:39) not ok 3 - examples/library/pcre.pir not ok 4 - ncurses_life.pir # TODO ncurses_life.pir not testable yet # Failed (TODO) test 'ncurses_life.pir' # at t/examples/library.t line 77. # Failed test 'examples/library/pcre.pir' # at t/examples/library.t line 67. # got: '' # expected: 'asdf =~ /as/ # 1 match(es): # as # ' # Looks like you failed 1 test of 4. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests Test Summary Report --- t/examples/library.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 3 Non-zero exit status: 1 Files=1, Tests=4, 1 wallclock secs ( 0.01 usr 0.01 sys + 0.12 cusr 0.06 csys = 0.20 CPU) Result: FAIL
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
I pried r32189 apart to see which chunk of it breaks my compilation. The commit consists of two additions and one change. The two additions compile fine, but as soon as I make the change (attached), I can't compile. the-chunk.patch Description: Binary data
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
Is there anything else I can do to help track down the bug? To get Parrot to compile, I can still use the trick of downdating src/multidispatch.c to r32188, but this gives me 7 failing tests, not surprizingly.
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
Uh, and this might have something to do with the third last line of the failing make being gmake[1]: *** Deleting file `PGE.pbc'
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
$ gdb ../../parrot GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-apple-darwin...Reading symbols for shared libraries . done (gdb) run ../../runtime/parrot/library/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg Starting program: /Users/masak/svn-work/hobbies/parrot/parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg Reading symbols for shared libraries +++... done Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x001f 0x000443ce in __gmpz_cmp () (gdb) bt #0 0x000443ce in __gmpz_cmp () #1 0x0084c39e in bigint_cmp (interp=0xf13600, self=0x387cc8, value=0xee47f8) at bigint.pmc:223 #2 0x0084dfff in Parrot_BigInt_multi_cmp_BigInt (interp=0xf13600, pmc=0x387cc8, value=0xee47f8) at bigint.pmc:1075 #3 0x0072d92a in pcf_I_JPP (interp=0xf13600, self=0x10449d4) at src/nci.c:719 #4 0x0083d280 in Parrot_NCI_invoke (interp=0xf13600, pmc=0x10449d4, next=0x0) at nci.pmc:312 #5 0x0071f20a in Parrot_pcc_invoke_sub_from_sig_object (interp=0xf13600, sub_obj=0x10449d4, sig_obj=0xee47dc) at src/inter_call.c:2662 #6 0x007294fd in Parrot_mmd_multi_dispatch_from_c_args (interp=0xf13600, name=0x97b188 cmp, sig=0x98bf7c PP-I) at src/multidispatch.c:597 #7 0x007f3cb2 in Parrot_default_cmp (interp=0xf13600, pmc=0x387cc8, value=0xee47f8) at default.pmc:2446 #8 0x006a29e0 in Parrot_lt_p_ic_ic (cur_opcode=0xe2a64c, interp=0xf13600) at cmp.ops:294 #9 0x00762927 in runops_slow_core (interp=0xf13600, pc=0xe2a64c) at src/runops_cores.c:222 #10 0x00721e8f in runops_int (interp=0xf13600, offset=586) at src/interpreter.c:938 #11 0x00722822 in runops (interp=0xf13600, offs=586) at src/inter_run.c:101 #12 0x00722ac4 in runops_args (interp=0xf13600, sub=0x34a618, obj=0x387e6c, meth_unused=0xea734, sig=0x976bb4 S, ap=0xb464 ?\0037) at src/inter_run.c:236 #13 0x00722e5a in Parrot_run_meth_fromc_args (interp=0xf13600, sub=0x34a618, obj=0x387e6c, meth=0xea734, sig=0x976bb4 S) at src/inter_run.c:426 #14 0x008e943a in Parrot_Object_get_string (interp=0xf13600, pmc=0x387e6c) at src/pmc/object.c:2970 #15 0x006be126 in Parrot_set_s_p (cur_opcode=0xe301f8, interp=0xf13600) at set.ops:148 #16 0x00762927 in runops_slow_core (interp=0xf13600, pc=0xe301f8) at src/runops_cores.c:222 #17 0x00721e8f in runops_int (interp=0xf13600, offset=22) at src/interpreter.c:938 #18 0x00722822 in runops (interp=0xf13600, offs=22) at src/inter_run.c:101 #19 0x00722ac4 in runops_args (interp=0xf13600, sub=0x34bbdc, obj=0x1042378, meth_unused=0x0, sig=0x9871e0 P, ap=0xb63c ) at src/inter_run.c:236 #20 0x00722bf9 in Parrot_runops_fromc_args (interp=0xf13600, sub=0x34bbdc, sig=0x9871e0 P) at src/inter_run.c:300 #21 0x00757ed0 in run_sub (interp=0xf13600, sub_pmc=0x34bbdc) at src/packfile.c:496 #22 0x00758125 in do_1_sub_pragma (interp=0xf13600, sub_pmc=0x34bbdc, action=PBC_MAIN) at src/packfile.c:588 #23 0x007583a1 in do_sub_pragmas (interp=0xf13600, self=0xf2bc60, action=PBC_MAIN, eval_pmc=0x0) at src/packfile.c:722 #24 0x0075ca09 in PackFile_fixup_subs (interp=0xf13600, what=PBC_MAIN, eval=0x0) at src/packfile.c:3815 #25 0x00962920 in imcc_run_pbc (interp=0xf13600, obj_file=0, output_file=0x0, argc=3, argv=0xb7f4) at compilers/imcc/main.c:787 #26 0x009633dd in imcc_run (interp=0xf13600, sourcefile=0xb8c8 ../../runtime/parrot/library/PGE/Perl6Grammar.pir, argc=3, argv=0xb7f4) at compilers/imcc/main.c:1078 #27 0x1d99 in main (argc=3, argv=0xb7f4) at src/main.c:61
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
Will (): Here's the offending line: ../../parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg To figure out why this is causing a bus error, try: $ cd compilers/pge $ gdb ../../parrot gdb run ../../runtime/parrot/library/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg boom gdb bt and let us know what the backtrace is? It doesn't get as far as a backtrace. $ gdb ../../parrot GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct 2 04:07:49 UTC 2007) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i386-apple-darwin...Reading symbols for shared libraries . done (gdb) run ../../runtime/parrot/library/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg Starting program: /Users/masak/svn-work/hobbies/parrot/parrot ../../runtime/parrot/library/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg Reading symbols for shared libraries +++... done load_bytecode couldn't find file 'PGE.pbc' current instr.: 'parrot;PGE;Perl6Grammar;Compiler;__onload' pc 22 (../../runtime/parrot/library/PGE/Perl6Grammar.pir:72) called from Sub 'parrot;PGE;Perl6Grammar;Compiler;main' pc -1 ((unknown file):-1) Program exited with code 01. (also, I presume you've done a make realclean and tried again, and haven't installed parrot on this machine in the past, no local modifications, etc.) I always do realclean, I never 'make install' Parrot, and I did have one local modification when I reported, but that's gone now and the problem remains.
[perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
# New Ticket Created by Carl Mäsak # Please include the string: [perl #60178] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60178 I'm running Mac OS X 10.5.4, and can't compile Parrot r32189. I managed to compile the latest revision (r32196), but only after updating src/multidispatch.c down to r32188. The make output for the failing builds is long and not evidently informative, so I hesitate to post it. $ make --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i386-apple-darwin9.0
Re: [perl #60178] Commit r32189 breaks Parrot on Mac OS X 10.5.4
Will (), James (): This will be difficult to diagnose unless we do see 'make' output, so please attach a file. Alternative, go to IRC #parrot and use 'nopaste' to post. To limit the verbosity, you could run make 2x and just send us the output of the second run, as presumably the interesting failure will be in that, and none of the pesky stuff that worked. Good suggestions. Here we go: http://nopaste.snit.ch/14409.
Re: [perl #59112] Failing test in t/examples/library.t
James (): Let's start with an elementary question: What does Configure.pl say for you at this step: auto::pcre - Does your platform support pcre auto::pcre - Does your platform support pcreyes, 7.7. // Carl
[perl #59112] Failing test in t/examples/library.t
# New Ticket Created by Carl Mäsak # Please include the string: [perl #59112] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=59112 In Parrot r31286: $ perl t/examples/library.t 1..4 ok 1 - examples/library/getopt_demo.pir ok 2 - examples/library/md5sum.pir 7.7 Failed to load libpcre current instr.: 'parrot;PCRE;init' pc 110 (library/pcre.pir:111) called from Sub 'parrot;PCRE;main' pc 279 (examples/library/pcre.pir:39) not ok 3 - examples/library/pcre.pir # Failed test 'examples/library/pcre.pir' # at t/examples/library.t line 67. # got: '' # expected: 'asdf =~ /as/ # 1 match(es): # as # ' not ok 4 - ncurses_life.pir # TODO ncurses_life.pir not testable yet # Failed (TODO) test 'ncurses_life.pir' # at t/examples/library.t line 77. # Looks like you failed 1 test of 4.