[perl #58150] Doing split on the result of a slurped empty file results in a Null PMC Access in rakudo
# New Ticket Created by Carl Mäsak # Please include the string: [perl #58150] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58150 r30374: $ echo -n empty $ empty ./perl6 -e 'say $*IN.slurp' # works, empty line $ empty ./perl6 -e 'say $*IN.slurp.WHAT' # yes Str $ empty ./perl6 -e 'say $*IN.slurp.perl' # yes $ $ empty ./perl6 -e 'say split(\n, a\nb\nc).perl' # this works too [a, b, c] $ empty ./perl6 -e 'say split(\n, $*IN.slurp)' # but this fails Null PMC access in get_integer() [...] Segmentation fault
[perl #58170] Exception Handler Issues
# New Ticket Created by Stephen Weeks # Please include the string: [perl #58170] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58170 There are some issues that need to be resolved for resumable exceptions. The first issue I've run into is that Parrot_cx_find_handler_local marks the exception handler as used when it finds it and ignores already-used exception handlers. The following PIR fails: .sub main :main say start push_eh handler $P0 = new 'Exception' $P0 = Exception 1 throw $P0 $P0 = new 'Exception' $P0 = Exception 2 throw $P0 pop_eh say end exit 0 handler: .local pmc exception .local string message .local pmc continuation .get_results(exception,message) continuation = exception['retcont'] print handled exception: say message continuation() .end Parrot_cx_find_handler_local uses an iterator for handlers for Exceptions, but just walks all the handlers ignoring used ones for everything else. It looks like maybe if everything stored their handlers in an iterator, as the comment suggest is possible, we could discard the used check? A few experiments into this turn up segfaults and other odd behavior. Maybe we need to have a 'cleanup' function for exception handlers to call instead?
[perl #58188] [TODO] Parrot_find_encoding_converter
# New Ticket Created by Andrew Whitworth # Please include the string: [perl #58188] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58188 The function src/encoding.c:Parrot_find_encoding_converter is a stub with the note XXX: Apparently unwritten. This probably needs to be documented. I've updated the function to throw an exception stating that it isn't implemented. --Andrew Whitworth
[perl #58184] [TODO] Cannot load charsets
# New Ticket Created by Andrew Whitworth # Please include the string: [perl #58184] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58184 The function src/charset.c:Parrot_load_charset is basically an empty stub, and does nothing except throw an exception saying that we can't load charsets yet. I assume this has to be implemented, eventually. --Andrew Whitworth
Re: Allowing '-' in identifiers: what's the motivation?
On Tue, 19 Aug 2008 23:59:50 +0200, Aristotle Pagaltzis wrote: That said, I really *really* like the idea of embedded dashes in identifiers (not least because underscores offend my amateur typophile self), but the idea of being able to embed other operator-ish symbols in identifiers leaves me utterly cold. I strongly doubt that if they are put in, it'll cause the end of Perl 6, as you argue, but I also don't care at all about whether they are allowed. I'm not going to use them anyway. Well that'll make *your* programs easy to read, at least :-) My point is this: punctuation serves a valuable purpose that shouldn't be diluted. It doesn't look like letters and digits (oatmeal) and in Perl, it means something different too. That correspondence is very valuable for reading programs; that when one sees an asterisk, it means multiplication or splat or a few other possibilities, but it isn't part of an identifier. Identifiers form a large proportion (most?) of a program's text, and being able to tell *quickly* where they begin and end is crucial to reading code. Having to keep at the back of one's mind the possibility that some symbols with other meanings are also overloaded with identifier-ness seems to me such a large loss as to outweigh the gain from permissiveness. Even if a program doesn't exercise that permission, the possibility that it *might* introduces extra caution in reading code. Even if subconsciously, even if measured in milliseconds, I contend that is important. Just because some other languages do it doesn't mean Perl should, unless you know of some studies showing that readability hasn't been impaired. I'm willing to be surprised. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/
Re: Parrot 0.7.0 Severe Macaw - permissions
2008/8/20 Allison Randal [EMAIL PROTECTED]: Will Coleda wrote: Please open a ticket tracking this if we're not going to apply it right now so we don't miss it for next release. CPAN is great for distributing Perl modules, but simply can't handle Parrot. As soon as we have the alternate FTP site up, we're done with CPAN. The issue is not the CPAN SW, which can easily be fixed somewhen (no-index), the CPAN mirror network and the popularity is what parrot should look forward to, IMHO -- Reini Urban http://phpwiki.org/ http://murbreak.at/
Re: Resumable exceptions
Not long ago, Patrick R. Michaud proclaimed... Here's a simple test for resumable exceptions that I'm trying to get to work. I'm probably coding/understanding something wrong, so any suggestions or pointers would be greatly appreciated. .sub main :main push_eh catcher 'foo'() pop_eh say 'ok 4' .return () catcher: .get_results ($P0, $S0) $P1 = $P0['retcont'] $P1() .end .sub 'foo' say 'ok 1' $P0 = new 'Exception' throw $P0 say 'ok 2' $P0 = new 'Exception' throw $P0 say 'ok 3' .end What I'm trying to do is to test the ability to resume after exceptions thrown by Cfoo. The Cmain sub above sets up a handler to catch exceptions, then calls Cfoo. The handler simply resumes any exception that is caught. The Cfoo sub prints 'ok 1', throws an exception, prints 'ok 2', throws another exception, and prints 'ok 3'. I can resume the first exception but not the second: $ ./parrot x.pir ok 1 ok 2 No exception handler and no message current instr.: 'foo' pc 46 (x.pir:20) called from Sub 'main' pc 29 (x.pir:10) $ Suggestions and corrections to my code welcomed. Check RT #58170 for this. Let me know if you need more detail on what's happening.
[perl #58186] [TODO] Cannot load encodings
# New Ticket Created by Andrew Whitworth # Please include the string: [perl #58186] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58186 The function src/encoding.c:Parrot_load_encoding currently does nothing except throw an exception to say that it does nothing. This probably needs to be implemented eventually. --Andrew Whitworth
Re: arrayref/hashref in spectest suite
Patrick R. Michaud wrote: my $foo = [ 42 ]; my $bar = { a = 23 }; $foo[1] = $bar; TSa (Thomas Sandlaß) wrote: I would also opt for copy semantics whenever = is used for assignment. But C$foo[1] = $bar *does* use copy semantics. The thing on the right is a reference to a hash, and that reference is copied (by value) into C$foo[1]. It seems what you're really requesting is for the assignment operator to auto-dereference references. But if you can't copy references, they become pretty useless. =thom
Re: [TODO] Cannot load encodings
On Aug 21, 5:57 am, [EMAIL PROTECTED] (Andrew Whitworth) wrote: # New Ticket Created by Andrew Whitworth # Please include the string: [perl #58186] # in the subject line of all future correspondence about this issue. # URL:http://rt.perl.org/rt3/Ticket/Display.html?id=58186 The function src/encoding.c:Parrot_load_encoding currently does nothing except throw an exception to say that it does nothing. This probably needs to be implemented eventually. --Andrew Whitworth I want to join your group. Can I MAHESH D [EMAIL PROTECTED] htt://groups.google.com/group/maheshd
Re: Parrot 0.7.0 Severe Macaw - permissions
On Thu, Aug 21, 2008 at 4:07 PM, Reini Urban [EMAIL PROTECTED] wrote: the CPAN mirror network and the popularity is what parrot should look forward to, IMHO --
[svn:perl6-synopsis] r14576 - doc/trunk/design/syn
Author: larry Date: Thu Aug 21 12:58:24 2008 New Revision: 14576 Modified: doc/trunk/design/syn/S12.pod Log: remove failover from methods to subs Modified: doc/trunk/design/syn/S12.pod == --- doc/trunk/design/syn/S12.pod(original) +++ doc/trunk/design/syn/S12.podThu Aug 21 12:58:24 2008 @@ -12,9 +12,9 @@ Maintainer: Larry Wall [EMAIL PROTECTED] Date: 27 Oct 2004 - Last Modified: 5 Aug 2008 + Last Modified: 21 Aug 2008 Number: 12 - Version: 62 + Version: 63 =head1 Overview @@ -1036,14 +1036,21 @@ !$obj; # same as $obj.prefix:! -A method call first considers methods (including multi-methods and submethods) -from the class hierarchy of its invocant, and fails over to the subroutine -dispatcher as a last resort only if no method can be found in the class -hierarchy. +A method call considers only methods (including multi-methods and submethods) +from the class hierarchy of its invocant, and fails if none is found. The +object in question is in charge of interpreting the meaning of the method +name, so if the object is a foreign object, the name will be interpreted +by that foreign runtime. A subroutine call considers only visible subroutines (including -submethods) of that name. There is no fail-over from subroutine -to method dispatch. However, you may use Cis export on a method +submethods) of that name. The object itself has no say in the +dispatch; the subroutine dispatcher considers only the types the +arguments involved, along with the name. Hence foreign objects passed +to subroutines are forced to follow Perl semantics (to the extent +foreign types can be coerced into Perl types, otherwise they fail). + +There is no fail-over either from subroutine to method dispatch or +vice versa. However, you may use Cis export on a method definition to make it available also as a multi sub. As with indirect object syntax, the first argument is still always the invocant, but the export allows you to use a comma after the invocant instead of
[svn:perl6-synopsis] r14577 - doc/trunk/design/syn
Author: larry Date: Thu Aug 21 13:38:48 2008 New Revision: 14577 Modified: doc/trunk/design/syn/S12.pod Log: Clarification that categories change the choice of dispatcher on method names Modified: doc/trunk/design/syn/S12.pod == --- doc/trunk/design/syn/S12.pod(original) +++ doc/trunk/design/syn/S12.podThu Aug 21 13:38:48 2008 @@ -1062,6 +1062,32 @@ which will import the multi sub lexically, after which you can call it using normal subroutine call syntax. +Note that explicit use of a syntactic category as a method name +overrides the choice of dispatcher, so + +$x.infix:*($y) + +and + +infix:*($x,$y) + +are exactly equivalent. That is, both calls use the subroutine/multi +dispatcher, not the method/single dispatcher. Likewise + +foo($bar) + +can be written + +$bar.prefix:foo() + +with the same meaning. To get single dispatch of that method +name to a foreign function, you must say: + +$bar.'prefix:foo'() + +Most foreign languages are not going to understand such a method name, +however. + =head1 Multi dispatch Multi submethods work just like multi methods except they are constrained
Re: The False Cognate problem and what Roles are still missing
On Wednesday 20 August 2008 15:16:12 Aristotle Pagaltzis wrote: It therefore seems necessary to me to specify dispatch such that method calls in the Dog role invoke the original Dog role methods where such methods exist. There also needs to be a way for a class that assumes a role to explicitly declare that it wants to override that decision. Thus, by default, when you say that Mutant does both Dog and Tree, Dog’s methods do not silently mutate their semantics. You can cause them to do so, but you should have to ask for that. How much of this does compile-time role method collision detection provide? If Dog and Tree both provide the bark method, the performing entity must disambiguate them. (I thought we had some syntax for When invoked as a Dog, do this and when invoked as a Tree, do that but I'm far too lazy to look that up at this moment.) -- c
Re: [svn:parrot] r30430 - branches/pdd27mmd/src/pmc
On Thursday 21 August 2008 15:08:22 [EMAIL PROTECTED] wrote: Mostly minor codingstd nits. Modified: branches/pdd27mmd/src/pmc/multisub.pmc Log: [pdd09gc] add basic (and probably wrong) implementations for MultiSub:get_pmc_keyed and MultiSub:get_pmc_keyed_string --- branches/pdd27mmd/src/pmc/multisub.pmc(original) +++ branches/pdd27mmd/src/pmc/multisub.pmcThu Aug 21 15:08:21 2008 @@ -86,13 +86,22 @@ return list; } -/* +/* I don't really know how to implement these if they need something + special, so I'll sort the sub list and defer processing to the + ResizablePMCArray's VTABLE methods of the same names */ VTABLE PMC *get_pmc_keyed(PMC *key) { +PMC * list = Parrot_mmd_sort_manhattan(INTERP, SELF); This should be *list. +if(PMC_IS_NULL(list)) There should be a space between if and the parentheses. +Parrot_ex_throw_from_c_args(INTERP, NULL, 1, No applicable methods.\n); If there's no appropriate EXCEPTION_* constant, we should add one for MMD (instead of 1). -- c
November
We are now live at: http://www.november-wiki.org I have created a test-account. With user test-account and pass Iw4ntinPLZ. This is a _very_ early prototype. There are lots of things that don't work. I am aware of two things at the moment: 1. Non-ascii characters makes our parser bail out. So please don't use them when editing pages, unless you want to block them. 2. Logging out don't work, or rather, it works partially. We remove the cookie from the browser but there's a bug in rakudo (which I still haven't submitted) that stops us from removing the session in a reasonable way. And oh, don't excpect created content to stay for now. This is more to show what we have done and how far we have come. Enjoy! -- Johan Viklund