Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk
Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given a proto commit bit. The former, while apparently a nice effort, doesn't contain any Perl 6 code as far as I can see. // Carl
[perl #69152] perl6 binary sucks up all available memory
# New Ticket Created by Torsten Blix # Please include the string: [perl #69152] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69152 Rakudo git version a9ff309e63f1df4f271847757f7f014902d26858 1) create a new test file t/bug.t with content (see also http://paste.lisp.org/display/87090): use v6; use Test; plan 1; .mine say # foo; ok(1==1, 1==1); # vim: ft=perl6 2) execute make t/bug.t and watch the perl6 binary sucking up lots of memory (around 10MB/sec) and not finishing the test. Cheers, Torsten
[perl #69160] Twin exceptions cause assertion failure and/or unrequested error message
# New Ticket Created by Bruce Gray # Please include the string: [perl #69160] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=69160 Consider these two classes, both faulty in the same way: class B0rk { say $.a }; class Chef { say $.b }; Each class makes reference to a attribute that has not been declared, and so should fail to compile: $ ./perl6 -e 'class B0rk { say $.a }; say Done;' Lexical 'self' not found $ ./perl6 -e 'class Chef { say $.b }; say Done;' Lexical 'self' not found While the error message might not be helpful, its shortcomings are not important to this issue. The important thing is that *some* error is produced, and that compilation is aborted. All is working as expected, when the classes are directly compiled. Either class, when evaled solo, behaves as expected. Execution proceeds, and the error message is placed in $!. $ ./perl6 -e 'eval q[ class B0rk { say $.a; }; ]; say Done;' Done $ ./perl6 -e 'eval q[ class Chef { say $.b; }; ]; say Done;' Done $ ./perl6 -e 'eval q[ class B0rk { say $.a; }; ]; say $!;' Lexical 'self' not found $ ./perl6 -e 'eval q[ class Chef { say $.b; }; ]; say $!;' Lexical 'self' not found All is working as expected, when the classes are evaled in isolation from each other. Evaling the classes together produces two different unexpected behaviours, depending on how the code is combined. First, we put both classes into the same string to be evaled once. $ ./perl6 -e 'eval q[ class B0rk { say $.a; }; class Chef { say $.b; }; ]; say Done;' Done Lexical 'self' not found current instr.: 'perl6;Chef;_block43' pc -1 ((unknown file):-1) called from Sub 'perl6;Perl6;Compiler;main' pc -1 ((unknown file):-1) We did not tell $! to print; the error is produced on STDERR, even though the `eval` should have trapped it. Next, we eval both classes in the same program, but in separate eval statements: $ ./perl6 -e 'eval q[ class B0rk { say $.a; }; ]; eval q[ class Chef { say $.b; }; ]; say Done;' Done src/call/pcc.c:609: failed assertion 'PObj_is_PMC_TEST(sig_pmc)' Backtrace - Obtained 24 stack frames (max trace depth is 32). 0 libparrot.dylib 0x0052836d Parrot_do_check_events + 173 1 libparrot.dylib 0x005284d7 Parrot_confess + 151 2 libparrot.dylib 0x0054171b Parrot_init_arg_op + 315 3 libparrot.dylib 0x005447c2 parrot_pass_args + 978 4 libparrot.dylib 0x00544936 parrot_pass_args + 1350 5 libparrot.dylib 0x0054a74c Parrot_runops_fromc_args + 220 6 libparrot.dylib 0x005924d5 Parrot_ComposeRole + 3461 7 libparrot.dylib 0x0059278a Parrot_ComposeRole + 4154 8 libparrot.dylib 0x00592a96 do_sub_pragmas + 406 9 libparrot.dylib 0x0059a467 PackFile_fixup_subs + 119 10 libparrot.dylib 0x00758d25 do_yylex_init + 1317 11 libparrot.dylib 0x00759165 do_yylex_init + 2405 12 libparrot.dylib 0x005595c0 Parrot_mmd_cache_destroy + 2096 13 libparrot.dylib 0x00678601 Parrot_Eval_get_isa + 2097 14 libparrot.dylib 0x004a8fa2 Parrot_str_from_int + 3650 15 libparrot.dylib 0x005a3977 enable_event_checking + 2679 16 libparrot.dylib 0x005a256a Parrot_runcore_switch + 4058 17 libparrot.dylib 0x00549705 new_runloop_jump_point + 389 18 libparrot.dylib 0x00549a26 new_runloop_jump_point + 1190 19 libparrot.dylib 0x0054a72a Parrot_runops_fromc_args + 186 20 libparrot.dylib 0x005251e1 Parrot_runcode + 337 21 perl6 0x1ba9 start + 505 22 perl6 0x19e6 start + 54 23 ??? 0x0003 0x0 + 3 Abort trap Notice that in both of the last cases, Done *did* print, so neither compilation nor execution were halted; the diagnostic output seems to have been produced during program exit. -- Hope this helps Bruce Gray (Util on IRC)
Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk
2009/9/16 Carl Mäsak cma...@gmail.com: Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ No Perl6. Only Parrot PCT. François Perrad Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given a proto commit bit. The former, while apparently a nice effort, doesn't contain any Perl 6 code as far as I can see. // Carl
Re: How can i contribute for perl 6 ?
On Tue, 15 Sep 2009, Patrick R. Michaud wrote: On Tue, Sep 15, 2009 at 10:02:02PM +1000, Timothy S. Nelson wrote: On Tue, 15 Sep 2009, Saravanan Thiyagarajan wrote: Would like to be a volunteer in working for perl-6. Can some one help me to get into right direction ? Sure. The best way to help depends on your skill-set. One place to start is at http://www.rakudo.org/how-to-help [...] See also http://use.perl.org/~masak/journal/39445 , which undoubtedly ought to be preserved somewhere on rakudo.org . +1. I have a set of 7 bookmarks that load in tabs that I call my Perl 6 bookmarks. I load this group of tabs into a separate web browser window when I'm doing Perl 6 stuff. That link is one of the 7 links. - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk
On Wed, 16 Sep 2009, Carl Mäsak wrote: Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given a proto commit bit. It doesn't work, though. That's probably one reason it wasn't in proto :). Until either we get role stubs (role foo {...}) or I figure a way to work around that, it will continue not to work. But after that, I'll be able to move forward with it (well, if I have tuits -- I hope to be back to Perl 6 stuff within the next month). I don't want to complain, though. Great work so far, Rakudo implementors! :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Workaround for role stubs (Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk)
Timothy S. Nelson wrote: On Wed, 16 Sep 2009, Carl Mäsak wrote: Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given a proto commit bit. It doesn't work, though. That's probably one reason it wasn't in proto :). Until either we get role stubs (role foo {...}) or I figure a way to work around that, If you want to stub role foo, you can simply write role foo[Int $a, Int $b, Int $c] { } or with some other parametrization signature that's never used anywhere. Role declarations are multi just like multi subs, and writing down one multi role that's never used makes the name known to Rakudo. That's a bit of an ugly hack, but it worked for me so far. Cheers, Moritz
Re: Looking for help updating Perl 6 and Parrot part of Perl Myths talk
Am Mittwoch, den 16.09.2009, 10:30 +0200 schrieb François Perrad: 2009/9/16 Carl Mäsak cma...@gmail.com: Tim (), Raphael (): Some XML related stuff: XML parser: http://github.com/fperrad/xml/ No Perl6. Only Parrot PCT. Yes, I know. But your XML grammar is Perl 6 syntax anyway ;) If you want pure Perl6, here is an other small example: http://github.com/krunen/xml But as it stand now, it's more a stub. It show that PGE is now mature enouth to start hacking on an XML Grammar close to the W3C Spec. Raphael. François Perrad Tree manipulation: http://github.com/wayland/Tree/tree/master Thanks. Any reason they're not known to proto? The latter I wasn't really aware of. It's now added to the list, and wayland has been given a proto commit bit. The former, while apparently a nice effort, doesn't contain any Perl 6 code as far as I can see. // Carl
Re: [perl #41500] [TODO] config - lib directory needs to be set appropriately for 32/64 bit archs
On Tue, 15 Sep 2009, James Keenan via RT wrote: On Sun Jul 19 12:07:24 2009, jk...@verizon.net wrote: It appears that this ticket effectively stalled two years ago for lack of testers on 64-bit platforms. However I believe that recently we have had a big increase in the amount of testing going on on AMD64 and even Win64. The fact that we haven't seen a lot of Trac tickets about incorrect 'lib install paths' (not exactly sure what that means) suggests that whatever we're doing now is sufficient and that this ticket can be closed. Could anyone who is familiar with those platforms tell us if we are doing the right thing with respect to installation paths? Can any of our developers working on 64-bit platforms help out here? Hopefully within the next month I'll be trying to build a new Parrot RPM. But I'm having one of those months at the moment -- sorry. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Perl 6 Set::Relation port desired (was Re: How can i contribute for perl 6 ?)
Moritz Lenz wrote [on perl6-language]: On Tue, Sep 15, 2009 at 09:30:13AM +0530, Saravanan Thiyagarajan wrote: Would like to be a volunteer in working for perl-6. Can some one help me to get into right direction ? I've written about various options on perlmonks [1], but I think the best thing you can do right now is to pick a simple Perl 5 module, and port it to Perl 6. If you find any bugs along the way, join us in #perl6 on irc.freenode.net and tell us about your bug. If you are sure that it's really a bug, send a mail to rakudo...@perl.org. I have a medium-sized Perl 5 module, Set::Relation ( http://search.cpan.org/dist/Set-Relation/ ) that I'd be very happy if it were translated to Perl 6, but I currently lack the tuits as I'm focusing on other related projects at the moment. So if someone else wants to do that as a way to help the Perl 6 effort, they have my blessing and support. I believe that having a native relation type in Perl 6 would be valuable because there is so much of practical value you can do with them, and Set::Relation was created largely as a working proof of concept towards this end. Set::Relation was designed from day one to be translated to Perl 6, but I made it in Perl 5 + Moose first because that was a more stable platform, and I wanted to actually /use/ it in Perl 5 programs meanwhile. Set::Relation models the same relation values that relational databases are composed from, and includes probably all of the relational operators you've ever heard of plus some. Loosely speaking, a Set::Relation object is like a Set of Mapping (or Array of Hash where all Array elements are distinct), but that there is such a thing as the Set/Array having zero elements (tuples) but it still has a known identity described by 0..N Mapping/Hash keys (r/t attribute names). Traditionally the keys/attrs have been character strings but the model still works if they are any (ideally scalar) type; the point is that relation attributes are addressed by name rather than by position, but what constitutes a name can be flexible. Currently defined are 2 roles + 2 classes; the main role defines an immutable object and the second role extends it to add mutability; the V1 class does the mutable superset while the V2 class does only the immutable subset. I strongly recommend that a porter initially just tries the immutable role and V2, and ignores V1 and the mutable role for now, as it is a lot easier to implement this thing when you don't have to worry about deep copying. The current Set::Relation is licensed LGPLv3+ but I am willing to relicense it to Artistic v2+ if that assists a porting effort. -- Darren Duncan
Re: S26 - The Next Generation
I'm jumping in on an old conversation because I only just had time to catch up last night. I have a few questions that I think are probably still pertinent. On Sun, Aug 16, 2009 at 4:26 PM, Damian Conway dam...@conway.org wrote: Executive summary: * Pod is now just a set of specialized forms of Perl 6 comment * Hence it must always parsed using full Perl 6 grammar: perl6 -doc This one seems relatively obvious, so it's probably been proposed. I skimmed a few of the responses and didn't see it, but that means little, I'm sure. This makes me wonder about other languages. I've been known to use POD in strings within other languages that lack a facility for documenting a program as a facility rather than as a collection of elements (which is the javadoc et al. trap). Should there be an explicit way to step this down to just parsing the bits that are called out as pod? For example: #!/bin/sh #=notperl :leading# :trailing\n cd $1 #=head1 ... # ... #=cut Obviously causing leading #s to be stripped when evaluating the podishness of a section of the program, up to the next newline. Similarly a CDATA block in XML might specify (on its own line) #=notperl :langxml :leading !-- and :trailing -- as the begin and end tokens of potentially valid POD sections. The evaluation of each identified section then being gated on the presence of a following = token. I can't think of a language that can't support POD in this way, but I'm sure someone will provide an example ;) Actually, in retrospect vanilla C89 might be problematic. I seem to remember that C9X introduces // so it could pull this off. I can imagine a messy solution in C using #define, but it would produce compile-time warnings in some compilers. Interestingly, this would have the side-benefit of making any program in any language into valid Perl code, given the appropriate notation at the start of the program... Kind of nifty if not strictly a practical benefit. [...] * In addition to delimited, paragraphed, and abbreviated Pod blocks, documentation can now be specified in a fourth form: my $declared_thing; #= Pod here until end of line sub declared_thing () { #=[ Pod here until matching closing bracket ] ... } There is no explicit mention in the document as to what happens at the Perl level when the closing bracket is reached at a point that is not the end of a line (i.e. it is not followed by whitespace that contains a newline character). Here's an example: my $a #-[stop the presses!] = 4; I'm not sure that I even think this is a good idea (nor a bad one, for that matter), but the documentation does not make this clear. It seems likely that the expected behavior is for Perl to treat the # as the start of a comment, even though it encounters parsable pod thereafter, and to continue to process the remaining part of the line as a comment, however this brings multi-line bracketted POD into question: sub fly($like, $to, $spirit) #=[ time keeps on slippin' ] { # error - this brace is not considered code? ... } fly(:like('eagle'), :to('sea'), :spirit('carry me')) * This new declarator block form is special. During source code parsing, normal Pod blocks are simply appended into an array attribute of surrounding Comment object in the AST (which is just $=POD, at the top level). However declarator blocks are *also* appended to the .WHY attribute of the declarator at the start of the most recent (or immediately following) line. I'd very much like to establish that at default optimization levels for execution, this information is not guaranteed to be maintained past the creation of the AST. This allows optimizations which might place declared elements into types which cannot maintain additional data (e.g. a Parrot I-register). Perhaps in some cases we would want to provide such guarantees. I wouldn't be opposed to an explicit way to request such a guarantee. For example: sub junk($things) is documented #= junk happens { ... } Now, even if junk is inlined and optimized away, we guarantee that its documentation will continue to be stored in some way that can be retrieved. This might even prevent certain classes of optimizations, but that's implementation specific. * Hence, they can be used to document code directly, which documentation can then be pulled out by introspecting either $=POD or the declarators themselves. Documented declarators look like this: Although it's something that could be added on after-the-fact, I think it's worth calling for this up-front: All of your comments about .WHY seem to indicate that it behaves recursively, walking the tree and pulling out any documentation for child nodes. That's fine, but there really should be a user-accessible and well defined way to limit that
Re: Duration of a flip-flop's flippy thing
Sounds like a spectest is in order to prevent that case from happening, didn't see one in http://perlcabal.org/syn/S03.html (not that that's the definitive place to look for tests, but that's why I'm posting instead of DIY) However, I can well imagine an implementation botching the cloning of the loop body by assuming it's static and not cloning it. That would not be Perl 6, since in Perl 6 every block is assumed to be a closure, and Cfor is assumed to work just like Cmap, which will certainly clone its closure
Re: How can i contribute for perl 6 ?
On Wed, 16 Sep 2009, Geoffrey Broadwell wrote: On Wed, 2009-09-16 at 19:49 +1000, Timothy S. Nelson wrote: +1. I have a set of 7 bookmarks that load in tabs that I call my Perl 6 bookmarks. I load this group of tabs into a separate web browser window when I'm doing Perl 6 stuff. That link is one of the 7 links. Perhaps your other Perl 6 bookmarks ought to appear on rakudo.org or perl6.org as well. :-) They probably mostly do: - rakudo.org - parrot.org - P6 specs - Moritz' blog (especially because of the monthly summaries) - #perl6 IRC logs - perl6.org - That link to Masak's blog I'm pretty sure most of those are linked somewhere. I'd actually be in favour of Masak's post being copied to the site (with attribution) and expanded, rather than just linked, if Carl is happy with the idea. Unfortunately no tuits at the moment. :) - | Name: Tim Nelson | Because the Creator is,| | E-mail: wayl...@wayland.id.au| I am | - BEGIN GEEK CODE BLOCK Version 3.12 GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+++ PGP-+++ R(+) !tv b++ DI D G+ e++ h! y- -END GEEK CODE BLOCK-
Re: Cobra Ioke Programming Languages
This is an interesting subpage under Cobra- http://cobra-language.com/docs/quality/ it actually bears a little on recent discussions about self-documenting code. I'm a Perl6 beginner so I'm making comments with expectation that others will correct where I'm wrong * Doc Strings Perl6's vision of doc strings are more powerful than what are in Cobra * Unit Tests Cobra's language-level test constructs looks cleaner then Perl's culture-level tests. * Contracts Hmmm, those look like a cross between assertions and unit tests... not sure how they fit in Perl6 * Compile-time Nil Tracking Sounds like strong-typing to me, which one can easily request in Perl6 * Assertions Pretty sure Perl6 has'em