Re: Extending Parrot NCI callback functionality

2008-01-20 Thread Allison Randal

chromatic wrote:

On Friday 18 January 2008 20:25:16 Allison Randal wrote:


It's true that the generalized solution for varying callback signatures
doesn't exist yet, but it's easy enough to create your own C callback
layer, with a separate C function for each callback you need. (Note, not
one-per-signature, but one-per-callback.) The callback functions can
invoke a Parrot sub that they lookup by name, register a callback sub
with the concurrency scheduler, or simply directly perform the actions
needed.


I'm not even sure *that* will work.  To invoke a Sub PMC from C, you need to 
pass in an Interp as well as the PMC.  Unless you know both of those at 
compile time, I'm not sure how to make the callback mechanism work.


The concurrency scheduler stores the interp, so it's not a problem for 
invoking the PIR callback Sub. But, the current way of looking up the 
concurrency scheduler is through the interpreter, so that just pushes 
the problem back a step.


Really, any scheduler will do, since it can pass a message to all the 
other schedulers. So, the C callback function can just grab the 0th 
interpreter from the global interp array and send a callback event to 
that scheduler. The actual PIR Sub for the callback can be registered as 
a handler in the scheduler, and invoked by the scheduler as a handler 
for the callback event.


Allison


Re: Crazy NCI Callback Solution Idea

2008-01-20 Thread Allison Randal

chromatic wrote:

Here's my crazy idea.

When you register a callback into PIR from C, you need to pass a few 
arguments: the interpreter into which to call, the PMC Sub to call, and the C 
signature of the C function which gets called from C.


I presume that the PIR function will get called through one of the external 
API calls which need to know the interpreter, the PMC to invoke, and the C 
signature of the incoming arguments.


The callback registry stores this information in a hash (or array) or other 
registry and...


Replace "callback registry" with "concurrency scheduler" and we're on 
the same page.


.. looks up a function pointer in a table of precompiled function pointers 
keyed off of C signatures.  These functions call a "return a varargs pointer 
from my arguments" function, then call the "invoke registered PIR callback" 
function with the varargs and an identifier.  (I'll get to where the 
identifier comes from in a moment.)


Instead of returning that function pointer directly, the registry copies it 
(we have to know its size somehow, but I think we can guess pretty well) and 
changes one spot which records its identifier.  It's an integer, probably 
unsigned.


Relying on a JIT might make this easier, but I think we can use this scheme 
with a fair degree of ease.  We do need to make sure that the copied 
functions are on executable and writeable memory pages, but otherwise I think 
we're fine.


I have doubts about how stable/cross-platform compatible any solution 
that involves rewriting parts of a function pointer in memory will be. 
It's likely to cause problems on exactly the same platforms that have 
trouble with the JIT solution. Between the two, the JIT solution seems 
preferable. But, feel free to prototype it.



Also, no, I never wrote viruses.  Why do you ask?


Stack smasher,
Allison


[perl #50018] [BUG] rakudo segfaults after "No scope found for PAST::Var" error

2008-01-20 Thread via RT


binuwGK8zseFj.bin
Description: 


[svn:parrot-pdd] r25030 - in trunk: . docs/pdds/draft

2008-01-20 Thread simon
Author: simon
Date: Sat Jan 19 21:55:18 2008
New Revision: 25030

Added:
   trunk/docs/pdds/draft/pdd28_character_sets.pod   (contents, props changed)

Changes in other areas also in this revision:
Modified:
   trunk/MANIFEST
   trunk/MANIFEST.SKIP

Log:
[docs] A start on the charsets PDD. Will write more over the coming week.


Added: trunk/docs/pdds/draft/pdd28_character_sets.pod
==
--- (empty file)
+++ trunk/docs/pdds/draft/pdd28_character_sets.pod  Sat Jan 19 21:55:18 2008
@@ -0,0 +1,98 @@
+# Copyright (C) 2001-2005, The Perl Foundation.
+# $Id$
+
+=head1 NAME
+
+docs/pdds/pdd28_character_sets.pod - Strings and character sets
+
+=head1 ABSTRACT
+
+This PDD describes the conventions expected for users of Parrot strings,
+including but not limited to support for multiple character sets,
+encodings and languages.
+
+=head1 VERSION
+
+$Revision$
+
+=head1 DESCRIPTION
+
+Here is a summary of the design decisions described in this PDD.
+
+=over 3
+
+=item *
+
+Parrot supports multiple string formats, and so users of Parrot strings
+must be aware at all times of string encoding issues and how these
+relate to the string interface.
+
+=item *
+
+The native Parrot string format is an array of 32-bit Unicode codepoints
+in B. (NFG)
+
+=item * 
+
+NFG is defined as a normalization which allocates at most one codepoint
+to each visible character.
+
+=item *
+
+An interface is defined for interacting with Parrot strings and converting 
+between character sets and encodings.
+
+=back
+
+=head2 Encoding awareness
+
+Parrot was designed from the outset to support multiple string formats.
+Unlike other such projects, we don't standardize on Unicode internally.
+This is because for the majority of use cases, it's still far more
+efficient to deal with whatever input data the user sends us, which,
+equally in the majority of use cases, is something like ASCII - or at
+least, some kind of byte-based rather than character-based encoding.
+
+So internally, consumers of Parrot strings have to be aware that there
+is a plurality of string encodings going on inside Parrot. (Producers of
+Parrot strings can do whatever is most efficient for them.) The
+implications of this for the internal API will be detailed in the
+implementation section below, but to put it in simple terms: if you find
+yourself writing C<*s++> or any other C string idioms, you need to stop
+and think if that's what you really mean. Not everything is byte-based
+any more. 
+
+However, we're going to try to make it as easy for C<*s++>-minded people
+as possible, and part of that is the declaration of a Parrot native
+string format. You don't have to use it, but if you do all your dreams
+will come true.
+
+=head2 Native string format
+
+Dealing with variable-byte encodings is not fun; for instance, you need
+to do a bunch of computations every time you traverse a string. In order
+to make programming a lot easier, we define a Parrot native string
+format to be an array of unsigned 32-bit Unicode codepoints. 
+
+=head2 Grapheme normalization form
+
+=head1 IMPLEMENTATION
+
+=head2 Changes required to current string implementation
+
+=head2 String access API
+
+=head2 Normalization form
+
+=head2 String encoding API
+
+=head1 REFERENCES
+
+List of references.
+
+=cut
+
+__END__
+Local Variables:
+  fill-column:78
+End:


[perl #50010] [BUG]: make failure: conflicting types for 'Parrot_set_executable_name'

2008-01-20 Thread James Keenan via RT
On Sat Jan 19 21:05:32 2008, petdance wrote:
> 
> On Jan 19, 2008, at 10:59 PM, James Keenan via RT wrote:
> 
> > Occurs on Darwin as well: r25026.
> 
> This should be OK now.  I fixed the prototype.
> 
Yes, make is now passing on both Linux and Darwin.  Thanks.


[perl #50004] README refers to missing Reporting Problems section in intro.pod

2008-01-20 Thread Will Coleda via RT
Thanks for the ticket.

Updated README (r25035) to point to a section in submissions.pod which serves a 
similar 
purpose to the missing documention.





[perl #48142] [DEPRECATED] class_type vtable

2008-01-20 Thread Paul Cochrane via RT
On Tue Dec 04 20:12:24 2007, coke wrote:
>  From PDD17:
> 
> =item class_type
> 
>INTVAL class_type(INTERP, PMC* self)
> 
> Return the integer type of the PMC. [NOTE: will be deprecated when type
> IDs are deprecated.]

The attached patch removes this vtable entry.  The only thing still
which seems to use class_type is dotnet, however, it fails its tests in
exactly the same manner with and without this patch (dotnet does need
some work...).

If this patch is ok, please say so, otherwise I'll apply it in three days.

Paul


Index: DEPRECATED.pod
===
--- DEPRECATED.pod	(revision 25016)
+++ DEPRECATED.pod	(working copy)
@@ -74,10 +74,6 @@
 
 See RT #47011.
 
-=item * C [post 0.5.1]
-
-See RT #48142.
-
 =item * C  [post 0.5.1]
 
 See RT# 48144. Replaced by C.
Index: src/vtable.tbl
===
--- src/vtable.tbl	(revision 25016)
+++ src/vtable.tbl	(working copy)
@@ -349,7 +349,6 @@
 void set_attr_keyed(PMC* key, STRING* idx, PMC* value) :write
 
 PMC* get_class()
-INTVAL class_type()
 
 void add_parent(PMC* parent) :write
 void remove_parent(PMC* parent) :write
Index: docs/pdds/pdd17_pmc.pod
===
--- docs/pdds/pdd17_pmc.pod	(revision 25016)
+++ docs/pdds/pdd17_pmc.pod	(working copy)
@@ -563,12 +563,6 @@
 C object (or other high-level class object). For low-level PMCs,
 this returns a C object.
 
-=item class_type [deprecated: See RT# 48142]
-
-  INTVAL class_type(INTERP, PMC* self)
-
-Return the integer type of the PMC. 
-
 =item pmc_namespace [deprecated: See RT# 48144]
 
   PMC* pmc_namespace(INTERP, PMC* self)


[perl #42375] [TODO] deprecate pmcinfo op

2008-01-20 Thread Paul Cochrane via RT
On Sat Jan 12 04:42:26 2008, allison wrote:
> This opcode has been superseded by 'inspect'.

The pmcinfo opcode is removed by the attached patch.  I would have
committed this directly however, I'm not 100% sure that removing the:
'Class PMCs also have the "I am a class" flag set on them.'
test was the right thing to do.  Something tells me that it should be
rewritten to use 'inspect' instead, but I don't know how to do this...

Feedback most definitely appreciated,

Paul
Index: DEPRECATED.pod
===
--- DEPRECATED.pod	(revision 25038)
+++ DEPRECATED.pod	(working copy)
@@ -132,10 +132,6 @@
 
 See RT #48310.
 
-=item * C [post 0.5.2]
-
-See RT #42375.
-
 =back
 
 =head1 Class Features
Index: src/ops/experimental.ops
===
--- src/ops/experimental.ops	(revision 25016)
+++ src/ops/experimental.ops	(working copy)
@@ -400,27 +400,6 @@
   goto NEXT();
 }
 
-=item B(out INT, invar PMC, inconst INT)
-
-Extract some information about PMC $2 and store it in $1.
-Possible values for $3 are:
-
-=over 4
-
-=item .PMCINFO_FLAGS Get the PMC's flags.
-
-=back
-
-RT#42375 move/officalize this opcode at next op cleanup.
-
-=cut
-
-op pmcinfo(out INT, invar PMC, inconst INT) {
-  if ($3 == PMCINFO_FLAGS)
-  $1 = PObj_get_FLAGS($2);
-  goto NEXT();
-}
-
 
 
 =item B(invar PMC, invar PMC, invar PMC, inconst INT)
Index: include/parrot/pmc.h
===
--- include/parrot/pmc.h	(revision 25016)
+++ include/parrot/pmc.h	(working copy)
@@ -96,14 +96,6 @@
 
 /* HEADERIZER END: src/pmc.c */
 
-/* pmcinfo parameters */
-
-/* &gen_from_def(pmcinfo.pasm) */
-
-#define PMCINFO_FLAGS4  /* see also STRINGINFO_FLAGS */
-
-/* &end_gen */
-
 #endif /* PARROT_PMC_H_GUARD */
 
 /*
Index: t/pmc/class.t
===
--- t/pmc/class.t	(revision 25016)
+++ t/pmc/class.t	(working copy)
@@ -17,10 +17,8 @@
 =cut
 
 
-.const int TESTS = 49
-.include 'pmcinfo.pasm'
+.const int TESTS = 48
 
-
 .sub 'main' :main
  load_bytecode 'Test/More.pir'
  .local pmc exporter, test_ns
@@ -30,7 +28,6 @@
 
  plan(TESTS)
  'new op'()
- 'class flag'()
  'name'()
  'new method'()
  'attributes'()
@@ -59,21 +56,6 @@
 isa_ok(class, 'Class')
 .end
 
-
-# L
-.sub 'class flag'
-.local pmc class
-.local int class_flags, class_flag_set
-.const int POBJ_IS_CLASS_FLAG = 536870912  # 1 << 29
-
-new class, 'Class'
-class_flags = pmcinfo class, .PMCINFO_FLAGS# XXX op currently experimental
-class_flag_set = class_flags & POBJ_IS_CLASS_FLAG
-ok(class_flag_set, 'Class PMC has "I am a class" flag set')
-.end
-
-
-
 # L
 .sub 'name'
 .local pmc class, result
Index: t/pmc/pmc.t
===
--- t/pmc/pmc.t	(revision 25016)
+++ t/pmc/pmc.t	(working copy)
@@ -7,7 +7,7 @@
 use lib qw( . lib ../lib ../../lib );
 
 use Test::More;
-use Parrot::Test tests => 20;
+use Parrot::Test tests => 19;
 use Parrot::PMC qw(%pmc_types);
 
 =head1 NAME
@@ -364,22 +364,6 @@
 42
 OUTPUT
 
-pasm_output_is( <<'CODE', <<'OUTPUT', "pmcinfo_i_p_ic" );
-.include "pmcinfo.pasm"
-new P0, 'Integer'
-pmcinfo I0, P0, .PMCINFO_FLAGS
-shl I2, 1, 9# PObj_is_PMC_FLAG s. pobj.h
-band I1, I0, I2
-if I1, ok
-print "PMC flag not set\n"
-end
-ok:
-print "ok\n"
-end
-CODE
-ok
-OUTPUT
-
 # Local Variables:
 #   mode: cperl
 #   cperl-indent-level: 4


[perl #48024] [DEPRECATED] type ids

2008-01-20 Thread Paul Cochrane via RT
Completed as per r25053.


Re: [perl #48260][PATCH] - compilers/imcc/main.c

2008-01-20 Thread ajr

The attached patch should quieten some of the grumbling. It's entirely
comments, so should not have any functional impact.


--

Email and shopping with the feelgood factor!
55% of income to good causes. http://www.ippimail.com



Re: [perl #48260][PATCH] - compilers/imcc/main.c

2008-01-20 Thread Paul Cochrane
Alan,

> The attached patch should quieten some of the grumbling. It's entirely
> comments, so should not have any functional impact.

The patch wasn't attached.  Could you try again?

Thanks,

Paul


Instance and Class disambiguation?

2008-01-20 Thread Ovid
If I call this:

  if $class.^can('wibble') { ... }

Does Perl 6 return false if that's only an instance method?  Will the
WALK iterator returned by .^can return references to instance methods?

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog - http://use.perl.org/~Ovid/journal/


Re: [perl #49836] [BUG] segfault in ascii_compare

2008-01-20 Thread Will Coleda
On Jan 19, 2008 10:27 PM, chromatic <[EMAIL PROTECTED]> wrote:
> On Saturday 19 January 2008 19:20:22 Will Coleda via RT wrote:
>
> > Original command line has a slight red herring: the duplicated file name is
> > irrelevant:
> >
> > ./tclsh t/cmd_after.t
> >
> > causes the same issue. (chromatic++ fixing the tclsh binary!)
>
> I can't reproduce it on x86 GNU/Linux.
>
> Did 24163 expose it?  Is 24162 okay?  I have a suspicion.
>
> -- c
>

24162 & 24163 both suffer from dyld: Symbol not found: _Parrot_register_pmc

-- 
Will "Coke" Coleda


[svn:parrot-pdd] r25067 - trunk/docs/pdds/draft

2008-01-20 Thread allison
Author: allison
Date: Sun Jan 20 12:43:51 2008
New Revision: 25067

Modified:
   trunk/docs/pdds/draft/pdd09_gc.pod

Log:
[pdd] A full rehash of the GC PDD.


Modified: trunk/docs/pdds/draft/pdd09_gc.pod
==
--- trunk/docs/pdds/draft/pdd09_gc.pod  (original)
+++ trunk/docs/pdds/draft/pdd09_gc.pod  Sun Jan 20 12:43:51 2008
@@ -7,205 +7,406 @@
 
 =head1 ABSTRACT
 
-This PDD describes how DOD/GC systems work, and what's required of PMC classes.
+This PDD specifies Parrot's garbage collection subsystems.
 
 =head1 VERSION
 
 $Revision$
 
+=head1 DEFINITIONS
 
-=head1 DESCRIPTION
+=head2 Garbage collection (GC)
 
-Doing DOD takes a bit of work--we need to make sure that everything is
-findable from the root set, and that we don't go messing up data shared
-between interpreters.
+Garbage collection is a process of freeing up memory that is no longer used by
+the interpreter, by determining which objects will not be referenced again and
+can be reclaimed.
 
-=head1 GC TERMS
+=head2 Simple mark
 
-=head2 GC Schemes
+All reachable objects are marked as alive, first marking a root set, and then
+recursively marking objects reachable from other reachable objects. Objects
+not reached are considered dead. After collection, all objects are reset to
+unmarked, and the process starts again.
 
-There are basically three general schemes to achieve garbage collection.
+=head2 Tri-color mark
 
-=over 4
+Instead of a simple separation of marked (as live) and unmarked (dead), the
+object set is divided into three parts: white, gray, and black. The white
+objects are presumed dead. The gray objects have been marked as live by some
+other object, but haven't yet marked the objects they refer to. The black
+objects are live, and have marked all objects they directly refer to. 
+
+In the initial run, all objects start as white and the root set is marked gray.
+The marking process changes white objects to gray (marking them from another
+gray object), and gray objects to black (when all object they refer to are
+marked). When the gray set is empty, all live objects have been marked, and
+the white set can be collected. After a collection run, all black objects are
+reset to white, the root set to gray, and the process begins again.
+
+The advantage of a tri-color mark over a simple mark is that it can be broken
+into smaller stages.
+
+=head2 Mark-and-sweep
+
+In this GC scheme, after all reachable objects are marked as live, a sweep
+through the object arenas collects all unmarked objects.
+
+=head2 Mark-and-don't-sweep
+
+In this scheme, all objects are marked black (live) when created. White objects
+are free memory available for allocation. When no white objects remain (out of
+memory), the black objects are all changed to white, and a marking process runs
+to mark all reachable objects as live. Any unreachable objects are left white,
+and available for allocation.
+
+In some implementations, the change from black to white is made by simply
+changing the interpretation of the mark bit, for example, from 1 == black to 1
+== white.
+
+=head2 Copying collection
+
+In this scheme, live objects are copied into a new memory region. The entire
+old memory region can then be reclaimed.
+
+=head2 Compacting collection
+
+In this scheme, live objects are moved closer together, eliminating fragments
+of free space between live objects. This compaction makes later allocation of
+new objects faster, since the allocator doesn't have to scan for fragments of
+free space.
+
+=head2 Reference counting
+
+In this scheme, all objects have a count of how often they are refered to by
+other objects. If that count reaches zero, the object's memory can be
+reclaimed. This scheme doesn't cope well with reference loops--loops of dead
+objects, all referencing one another but not reachable from elsewhere, never
+get collected.
+
+=head2 Stop-the-world
+
+A common disadvantage of a simple mark implemenation is that the entire system
+(including all threads that use the same memory pools) must be suspended while
+the whole memory set is examined during marking and collection.  Normal
+operation continues only after the whole GC cycle is performed. This can lead
+to arbitrary long pauses during program execution.
+
+=head2 Incremental
+
+Rather than suspending the system for marking and collection, GC is done in
+small increments intermittent with normal program operation. Some
+implementations perform the marking as part of ordinary object access.
 
-=item Reference counting
+=head2 Real-time
+
+The pauses caused by GC don't exceed a certain limit.
+
+=head2 Generational
+
+The object space is divided between a young generation (short-lived
+temporaries) and one or more old generations. Only young generations are reset
+to white (presumed dead). Avoiding scanning the old generations repeatedly can
+considerably speed up GC.
+
+Generational collection does not guarantee that all unr

[svn:parrot-pdd] r25069 - in trunk: . docs/pdds docs/pdds/draft

2008-01-20 Thread allison
Author: allison
Date: Sun Jan 20 12:52:42 2008
New Revision: 25069

Added:
   trunk/docs/pdds/pdd09_gc.pod
  - copied unchanged from r25067, /trunk/docs/pdds/draft/pdd09_gc.pod
Removed:
   trunk/docs/pdds/draft/pdd09_gc.pod

Changes in other areas also in this revision:
Modified:
   trunk/MANIFEST

Log:
[pdd] Launching the GC PDD.



Re: [perl #48260][PATCH] - compilers/imcc/main.c

2008-01-20 Thread ajr

Sorry, finger trouble with the mailer lost the attachment. I will try
again later.


--

Email and shopping with the feelgood factor!
55% of income to good causes. http://www.ippimail.com



mod_parrot 0.4

2008-01-20 Thread Jeff Horwitz

From my journal:


I'm pleased to announce that after 2 years of hiatus and 6 months of 
coding, mod_parrot 0.4 has been released. It's been worth the wait, as we 
now have working mod_perl6 and PHP proof-of-concepts, per-vhost
interpreter pools, the framework for a more comprehensive test suite, and 
even 64-bit support. You can download the full distribution at 
http://www.smashing.org/mod_parrot/dist/mod_parrot-0.4.tar.gz. The 
comprehensive list of changes is below. Enjoy!


0.4January 20, 2008
   * Support for Parrot 0.5.1 (Hatachi) and later
   * Many fixes for 64-bit platforms
   * Begin transition to server-side tests
   * Keep testing infrastructure on make clean (versus distclean)
   * Update PIR syntax and types that have changed since mod_parrot 0.3
   * Convert classes to new object model
   * Convert to nested namespaces
   * Remove apxs from compile and link phases to add flexibility
   * Search Parrot runtime path for mod_parrot init code
   * Remove underscore prefix from HLL handler subs
   * Map Apache MIME types to HLLs
   * Map Apache handler names to HLLs
   * Initialize interpreter at the earliest possible Apache phase
   * Per-server context pools for virtual hosts (default is per-process)
   * Properly merge server configs
   * Can pass a PMC note via pmc_notes()
   * Implement mod_perl-like cleanup handlers
   * Use proto-objects make mod_parrot classes instantiable from an HLL
   * New ModParrot;Context class for accessing mod_parrot data structures
   * New ModParrot;Interpreter class for interpreter introspection
   * New TODO list replaces the outdated ROADMAP
   * Update documentation and examples
   * New example HLL handlers:
 - Perl 6
 - PHP/Plumhead
 - NQP
 - Perl 1/Punie
   * New example handlers in eg
   * New Apache directives:
 - ParrotIncludePath
 - ParrotAddType
 - ParrotAddHandler
 - ParrotOptions
   o Parent
   o Enable


[perl #50032] rakudo's "make spectest" complains about missing util/fudgeall

2008-01-20 Thread via RT
# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #50032]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=50032 >


in languages/perl6/ the command "make spectest" complains about
util/fudgeall which can't be found:

make spectest
cd t/spec && svn up
Skipped '.'
/usr/bin/perl t/harness \
t/spec/S02-literals \
t/spec/S03-operators \
t/spec/S04-statements \
t/spec/S29-str \

/usr/bin/perl util/fudgeall rakudo t/spec/S02-literals
t/spec/S03-operators/autoincrement.t t/spec/S03-operators/comparison.t
t/spec/S03-operators/equality.t t/spec/S03-operators/relational.t
t/spec/S04-statements t/spec/S29-strCan't open perl script
"util/fudgeall": No such file or directory
t/00-parrot/01-literalsok

...

I guess this is because util/fudgeall lives in the pugs svn, and should
be fetched from there before it can be executed.

-- 
Moritz Lenz
http://moritz.faui2k3.org/ |  http://perl-6.de/



signature.asc
Description: PGP signature


GC PDD launched

2008-01-20 Thread Allison Randal

I've launched the GC PDD out of draft. Comments and suggestions welcome.

Allison


Re: [perl #50032] rakudo's "make spectest" complains about missing util/fudgeall

2008-01-20 Thread jerry gay
On Jan 20, 2008 1:23 PM, via RT Moritz Lenz
<[EMAIL PROTECTED]> wrote:
> # New Ticket Created by  Moritz Lenz
> # Please include the string:  [perl #50032]
> # in the subject line of all future correspondence about this issue.
> # http://rt.perl.org/rt3/Ticket/Display.html?id=50032 >
>
>
> in languages/perl6/ the command "make spectest" complains about
> util/fudgeall which can't be found:
>
> make spectest
> cd t/spec && svn up
> Skipped '.'
> /usr/bin/perl t/harness \
> t/spec/S02-literals \
> t/spec/S03-operators \
> t/spec/S04-statements \
> t/spec/S29-str \
>
> /usr/bin/perl util/fudgeall rakudo t/spec/S02-literals
> t/spec/S03-operators/autoincrement.t t/spec/S03-operators/comparison.t
> t/spec/S03-operators/equality.t t/spec/S03-operators/relational.t
> t/spec/S04-statements t/spec/S29-strCan't open perl script
> "util/fudgeall": No such file or directory
> t/00-parrot/01-literalsok
>
> ...
>
> I guess this is because util/fudgeall lives in the pugs svn, and should
> be fetched from there before it can be executed.
>
looks to me like the 'clean' target in the makefile should delete the
t/spec directory (it doesn't currently.) if you delete that directory
yourself, then the next run of spectest should Just Work. let me know
if it doesn't. i'll fix the makefile target in the next 24 hours,
unless somebody beats me to it.
~jerry


Perl 6 wiki: (new) "Perl 6 Marketplace" and "Perl 6 Books and Media"

2008-01-20 Thread Conrad Schneiker
Latest changes below. As always, your contributions are solicited. (You can
send me info if you don't have time to add it yourself.)

>> New:

"Perl 6 Marketplace" (for products, services, training, off-wiki job info)
http://www.perlfoundation.org/perl6/index.cgi?perl_6_marketplace

"Perl 6 Books and Media" (existing and forthcoming)
http://www.perlfoundation.org/perl6/index.cgi?perl_6_books_and_media

>> Updated:

"Perl 6 Articles and Presentations"
http://www.perlfoundation.org/perl6/index.cgi?perl_6_articles_and_presentati
ons

"Perl 6 People"
http://www.perlfoundation.org/perl6/index.cgi?perl_6_people

>> Thanks:

to Michal Jurosz (http://perl6.cz/wiki/Perl_6_and_Parrot_links) for lots of
useful info.

Best regards,
Conrad Schneiker

www.AthenaLab.com

http://www.perlfoundation.org/perl6  - Official Perl 6 Wiki
http://www.perlfoundation.org/parrot - Official Parrot Wiki
http://www.perlfoundation.org/perl5  - Official Perl 5 Wiki




Re: [perl #42375] [TODO] deprecate pmcinfo op

2008-01-20 Thread Allison Randal

Paul Cochrane via RT wrote:

On Sat Jan 12 04:42:26 2008, allison wrote:

This opcode has been superseded by 'inspect'.


The pmcinfo opcode is removed by the attached patch.  I would have
committed this directly however, I'm not 100% sure that removing the:
'Class PMCs also have the "I am a class" flag set on them.'
test was the right thing to do.  Something tells me that it should be
rewritten to use 'inspect' instead, but I don't know how to do this...

Feedback most definitely appreciated,


Okay, in r25076, I added a 'flags' option to the inspect vtable 
functions in class.pmc and in default.pmc. You can change the "I am a 
class" test to match the new test I added to t/pmc/default.t.


Otherwise, patch looks good and commit at will!

Allison


Re: [perl #50010] [BUG]: make failure: conflicting types for 'Parrot_set_executable_name'

2008-01-20 Thread Matisse Enzer


On Jan 20, 2008, at 5:48 AM, James Keenan via RT wrote:


On Sat Jan 19 21:05:32 2008, petdance wrote:


On Jan 19, 2008, at 10:59 PM, James Keenan via RT wrote:


Occurs on Darwin as well: r25026.


This should be OK now.  I fixed the prototype.


Yes, make is now passing on both Linux and Darwin.  Thanks.


Is there someone with a Darwin box who is willing to run a buildbot  
build slave on it?

If so, please let me know and I'll add it to my build master at 
http://buildbot.eigenstate.net:8040/

-M

---
Matisse Enzer <[EMAIL PROTECTED]>
http://www.matisse.net/  - http://www.eigenstate.net/





Re: [perl #50038] [BUG] t/src/extend.t failing

2008-01-20 Thread chromatic
On Sunday 20 January 2008 19:04:12 James Keenan wrote:

> Failed at r25076.  Here's the output of 'prove -v' on i386-inux.  I
> got similar failures on ppc-darwin.  AFAICT, these developed in last
> 24 hours.

It'll fail everywhere; the culprit is r25029.

These headers and declarations are messy.

-- c


[perl #50038] [BUG] t/src/extend.t failing

2008-01-20 Thread via RT
# New Ticket Created by  James Keenan 
# Please include the string:  [perl #50038]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=50038 >


Failed at r25076.  Here's the output of 'prove -v' on i386-inux.  I  
got similar failures on ppc-darwin.  AFAICT, these developed in last  
24 hours.

t/src/extend1..17
# 'cc  -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-D_GNU_SOURCE -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  
-DHASATTRIBUTE_FORMAT  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  
-DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  
-DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 
-mno-accumulate-outgoing-args -W -Wall -Waggregate-return -Wbad-function-cast 
-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment 
-Wdeclaration-after-statement -Wdisabled-optimization -Wextra 
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit 
-Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self -Winline 
-Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations 
-Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-prototypes 
-Wnested-externs -Wno-endif-labels -Wno-shadow -Wno-unused -Wnonnull -Wpacked 
-Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare 
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs 
-Wundef -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -g  -I./include -c 
-o t/src/extend_1.o t/src/extend_1.c' failed with exit code 1
# Failed to build 't/src/extend_1.o': In file included from t/src/extend_1.c:4:
# ./include/parrot/embed.h:41: error: expected declaration specifiers or '...' 
before 'Parrot_String'
not ok 1 - set/get_intreg

# Failed test (t/src/extend.t at line 29)
# 'cc  -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-D_GNU_SOURCE -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  
-DHASATTRIBUTE_FORMAT  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  
-DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  
-DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 
-mno-accumulate-outgoing-args -W -Wall -Waggregate-return -Wbad-function-cast 
-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment 
-Wdeclaration-after-statement -Wdisabled-optimization -Wextra 
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit 
-Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self -Winline 
-Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations 
-Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-prototypes 
-Wnested-externs -Wno-endif-labels -Wno-shadow -Wno-unused -Wnonnull -Wpacked 
-Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare 
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs 
-Wundef -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -g  -I./include -c 
-o t/src/extend_2.o t/src/extend_2.c' failed with exit code 1
# Failed to build 't/src/extend_2.o': In file included from t/src/extend_2.c:4:
# ./include/parrot/embed.h:41: error: expected declaration specifiers or '...' 
before 'Parrot_String'
not ok 2 - set/get_numreg

# Failed test (t/src/extend.t at line 60)
# 'cc  -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-D_GNU_SOURCE -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  
-DHASATTRIBUTE_FORMAT  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  
-DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  
-DHASATTRIBUTE_WARN_UNUSED_RESULT  -falign-functions=16 
-mno-accumulate-outgoing-args -W -Wall -Waggregate-return -Wbad-function-cast 
-Wc++-compat -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment 
-Wdeclaration-after-statement -Wdisabled-optimization -Wextra 
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit 
-Wimplicit-function-declaration -Wimplicit-int -Wimport -Winit-self -Winline 
-Winvalid-pch -Wmain -Wmissing-braces -Wmissing-declarations 
-Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-prototypes 
-Wnested-externs -Wno-endif-labels -Wno-shadow -Wno-unused -Wnonnull -Wpacked 
-Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare 
-Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wtrigraphs 
-Wundef -Wunknown-pragmas -Wvariadic-macros -Wwrite-strings -g  -I./include -c 
-o t/src/extend_3.o t/src/extend_3.c' failed with exit code 1
# Failed to build 't/src/extend_3.o': In file included from t/src/extend_3.c:4:
# ./include/parrot/embed.h:41: error: expected declaration specifiers or '...' 
before 'Parrot_String'
# t/src/extend_3.c: In function 'main':
# t/src/extend_3.c:16: warning: implicit declaration of function 'PIO_eprintf'
# t/src/extend_3.c:16: warning: nested extern declaration of 'PIO_eprintf'
not ok 3 - Parrot_new_string

# Failed test (t/src/extend.t at line 92)
# 'cc  -pipe -I/usr/local/include -D_LARGEFILE

Re: [perl #50032] rakudo's "make spectest" complains about missing util/fudgeall

2008-01-20 Thread Patrick R. Michaud
On Sun, Jan 20, 2008 at 03:06:34PM -0800, jerry gay wrote:
>
> looks to me like the 'clean' target in the makefile should delete the
> t/spec directory (it doesn't currently.) 

I don't think that 'make clean' should remove t/spec.  Because we now
grab t/spec via 'svn co', someone might have local modifications
to test files that they wouldn't want a 'make clean' to erase.

Pm


[perl #48024] [DEPRECATED] type ids

2008-01-20 Thread Will Coleda via RT
On Sun Jan 20 08:57:52 2008, ptc wrote:
> Completed as per r25053.

The ticket is for removing the ability to do this, not merely removing the 
instances where it is 
done.

Re-opening ticket; Thanks for all the cleanup work, however,  that should make 
it easier to rip 
out the actual code.


[perl #49836] [BUG] segfault in ascii_compare

2008-01-20 Thread Will Coleda via RT
On Sun Jan 20 13:17:03 2008, coke wrote:
> On Jan 19, 2008 10:27 PM, chromatic <[EMAIL PROTECTED]> wrote:
> > On Saturday 19 January 2008 19:20:22 Will Coleda via RT wrote:
> >
> > > Original command line has a slight red herring: the duplicated
> file name is
> > > irrelevant:
> > >
> > > ./tclsh t/cmd_after.t
> > >
> > > causes the same issue. (chromatic++ fixing the tclsh binary!)
> >
> > I can't reproduce it on x86 GNU/Linux.
> >
> > Did 24163 expose it?  Is 24162 okay?  I have a suspicion.
> >
> > -- c
> >
> 
> 24162 & 24163 both suffer from dyld: Symbol not found:
> _Parrot_register_pmc

Remembering that this issue only presents itself on an unshared parrot (on 
osx/intel), and 
that those revs are old enough that they default to unshared, I tried this 
again.

First: I undid 24163 against svn HEAD; still segfaults.

Then: downgraded to 24162, realcleaned, built shared ... still segfaults.







[perl #50038] [BUG] t/src/extend.t failing

2008-01-20 Thread James Keenan via RT
On Sun Jan 20 19:15:49 2008, [EMAIL PROTECTED] wrote:
> 
> It'll fail everywhere; the culprit is r25029.
> 

... and that revision was the fix proposed for RT 50010.



Re: [svn:parrot] r25075 - in trunk/languages/perl6/src: builtins classes

2008-01-20 Thread Patrick R. Michaud
On Sun, Jan 20, 2008 at 04:36:37PM -0800, [EMAIL PROTECTED] wrote:
> Modified: trunk/languages/perl6/src/builtins/list.pir
> [...]
> Modified: trunk/languages/perl6/src/classes/List.pir

FWIW, I think that the both the method version and the global
subroutine wrapper should be placed in classes/List.pir .

As a general rule I'm hoping to reduce the number of entries
in src/builtins/ as much as we can.

Pm


Re: [svn:parrot] r25072 - trunk/languages/perl6/src/classes

2008-01-20 Thread Patrick R. Michaud
On Sun, Jan 20, 2008 at 03:34:33PM -0800, [EMAIL PROTECTED] wrote:
>  test = exists self[ind]
>  if test == 0 goto false
>true:
>  res = get_hll_global ['Bool'], 'True'
>  goto done
>false:
>  res = get_hll_global ['Bool'], 'False'
>  goto done
>done:
>  .return (res)

Anytime we're wanting to return a boolean value, I think it may be
better to invoke prefix:? than to make an explicit if/then.  The
above then becomes:

test = exists self[ind]
.return 'prefix:?'(test)

Pm


Re: [svn:parrot] r25070 - in trunk/languages/perl6/src: builtins classes

2008-01-20 Thread Patrick R. Michaud
[Oops, I meant this to go to perl6-compiler.  --Pm]

On Sun, Jan 20, 2008 at 01:33:30PM -0800, [EMAIL PROTECTED] wrote:
> +.sub keys :multi('List')
> +  .param pmc list
> +  .local pmc res
> +
> +  res = list.'keys'()
> +
> +  .return(res)
> +.end

Better is to use a tailcall:

.sub 'keys' :multi('List')
.param pmc list
.return list.'keys'()
.end

Pm


Re: [perl #48142] [DEPRECATED] class_type vtable

2008-01-20 Thread Will Coleda
On Jan 20, 2008 10:33 AM, Paul Cochrane via RT
<[EMAIL PROTECTED]> wrote:
> If this patch is ok, please say so, otherwise I'll apply it in three days.

Mission Control: Buckaroo, The White House wants to know is everything
OK with the alien space craft from Planet 10 or should we just go
ahead and destroy Russia?

Buckaroo Banzai: Tell him yes on one and no on two.

Mission Control: Which one was yes, go ahead and destroy Russia... or number 2?

-- 
Will "Coke" Coleda


Re: [perl #50002] [PATCH] Merge src/objects.c Into src/oo.c

2008-01-20 Thread Will Coleda
On Jan 19, 2008 10:28 PM, via RT chromatic
<[EMAIL PROTECTED]> wrote:
> Because this patch is large and in charge, I'd like to hear some success
> reports from a couple of non-x86 and non-Linux platforms before I commit it.
>
> -- c

osx/x86 has no new failures with this patch applied.

-- 
Will "Coke" Coleda


[perl #39196] [TODO] tests - need to test addmethod

2008-01-20 Thread Will Coleda via RT
On Fri Jan 11 13:25:21 2008, [EMAIL PROTECTED] wrote:
> On Wed Feb 21 05:47:29 2007, kjs wrote:
> > On Wed May 24 05:26:22 2006, coke wrote:
> > > New addmethod opcode needs tests.
> > > 
> > > --
> > > Will "Coke" Coleda
> > > [EMAIL PROTECTED]
> > > 
> > > 
> > Attached a patch that adds a test for "addmethod".
> > 
> 
> Coke:  Did this patch DWYM?

Patch no longer applies cleanly; kjs, can you rebase? 





Re: Instance and Class disambiguation?

2008-01-20 Thread Jonathan Lang
Ovid wrote:
> If I call this:
>
>   if $class.^can('wibble') { ... }
>
> Does Perl 6 return false if that's only an instance method?  Will the
> WALK iterator returned by .^can return references to instance methods?

As I understand it, Perl 6 generally doesn't bother with the
class-vs-instance distinction.  Instead, it uses an "objects and
prototypes" paradigm, much like the distinction between proper nouns
and common nouns.

-- 
Jonathan "Dataweaver" Lang


[svn:perl6-synopsis] r14492 - doc/trunk/design/syn

2008-01-20 Thread pmichaud
Author: pmichaud
Date: Sun Jan 20 21:23:36 2008
New Revision: 14492

Modified:
   doc/trunk/design/syn/S29.pod

Log:
Update location of S29 to point to new repositories
(the old openfoundry.org address is way out of date).
Reported by diakopter++ .


Modified: doc/trunk/design/syn/S29.pod
==
--- doc/trunk/design/syn/S29.pod(original)
+++ doc/trunk/design/syn/S29.podSun Jan 20 21:23:36 2008
@@ -17,6 +17,7 @@
 This pod is just a placeholder for the draft of Synopsis 29 that
 currently lives at
 
-http://svn.openfoundry.org/pugs/docs/Perl6/Spec/Functions.pod
+http://svn.pugscode.org/pugs/docs/Perl6/Spec/Functions.pod
+http://perlcabal.org/syn/S29.html
 
 =for vim:set expandtab sw=4:


[perl #50046] [BUG] Parrot::Distribution ignores PIR files in t/

2008-01-20 Thread via RT
# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #50046]
# in the subject line of all future correspondence about this issue. 
# http://rt.perl.org/rt3/Ticket/Display.html?id=50046 >


pir_source_files in Parrot::Distribution is only looking for *.pir
files: this skips all the .t files that are pure PIR.

-- 
Will "Coke" Coleda


[perl #49836] [BUG] segfault in ascii_compare

2008-01-20 Thread Will Coleda via RT
Spent some more time trying to track this down. On OSX/86, I was able to 
reproduce the 
segfault with much less tcl code:

%cat foo.tcl
after 10
%./tclsh foo.tcl

if I ran:

%../../parrot -G tcl.pbc foo.tcl

The segfault goes away, which smells like a GC issue.

However, I can't duplicate it with --runcode=gcdebug on feather.perl6.nl; Any 
suggestions on a 
plan of attack?