Patrick R. Michaud wrote:
How does one create a new class with a name determined dynamically
at runtime?
For example, suppose I have a string like 'PGE::Perl6Grammar', and
from that I want to create a ['PGE';'Perl6Grammar'] class. The code
$ cat z1.pir
.sub main :main
$S0 = 'PG
I just haven't gotten to enabling arrays as a valid input. You'll have
it this afternoon.
Allison
Patrick R. Michaud wrote:
How does one create a new class with a name determined dynamically
at runtime?
For example, suppose I have a string like 'PGE::Perl6Grammar', and
from that I want to cre
How does one create a new class with a name determined dynamically
at runtime?
For example, suppose I have a string like 'PGE::Perl6Grammar', and
from that I want to create a ['PGE';'Perl6Grammar'] class. The code
$ cat z1.pir
.sub main :main
$S0 = 'PGE::Perl6Grammar'
$P0
On Sat, Jun 30, 2007 at 06:21:39PM +0100, Jonathan Worthington wrote:
> Patrick R. Michaud wrote:
> >This presumes that every PMC class also has a Namespace PMC associated
> >with it that points to the class. I'm not sure that's true for Parrot PMC
> >classes.
> >
> It's what I've implemented,
Patrick R. Michaud wrote:
This presumes that every PMC class also has a Namespace PMC associated with it
that points to the class. I'm not sure that's true for Parrot PMC classes.
It's what I've implemented, though whether it's The Design is another
question that I'm not clear on the answer
On Fri, Jun 29, 2007 at 11:45:18AM -0700, jerry gay wrote:
> On 6/29/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >On Fri, Jun 29, 2007 at 11:23:46AM -0700, jerry gay wrote:
> >> On 6/28/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >> >.HLL "perl6", ""
> >> >...
> >> >
On 6/29/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
On Fri, Jun 29, 2007 at 11:23:46AM -0700, jerry gay wrote:
> On 6/28/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >Another question about pdd15...:
> >
> >If I'm in a different HLL namespac
On Fri, Jun 29, 2007 at 11:23:46AM -0700, jerry gay wrote:
> On 6/28/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >Another question about pdd15...:
> >
> >If I'm in a different HLL namespace (e.g., via a .HLL directive), how do
> >I get a PMC
On 6/28/07, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
Another question about pdd15...:
If I'm in a different HLL namespace (e.g., via a .HLL directive), how do
I get a PMC class from the 'parrot' HLL namespace?
Here is an example (which obviously won't work):
Another question about pdd15...:
If I'm in a different HLL namespace (e.g., via a .HLL directive), how do
I get a PMC class from the 'parrot' HLL namespace?
Here is an example (which obviously won't work): I'm creating a
'perl6;Str' class and then attempting
gt;new method or or override an existing method on a metaclass instance
>[a class], then how do I do that?
>
> AFAICS, there isn't currently a good way to do that. (Depending, of
> course, on whether you think Jonathan's suggestion qualifies. ;-)
>
On Wed, Jun 20, 2007 at 10:38:08PM -0400, Bob Rogers wrote:
>From: "Patrick R. Michaud" <[EMAIL PROTECTED]>
>On Wed, Jun 20, 2007 at 09:41:00PM -0400, Bob Rogers wrote:
>>Patrick R. Michaud wrote:
> > > My first question is
gt;Hi,
>
>Patrick R. Michaud wrote:
>> My first question is "How do I add a class method?" -- i.e.,
>> a method that operates on a class instance as opposed
>> to an object instance of that class . . .
>
> A method
On Wed, Jun 20, 2007 at 09:41:00PM -0400, Bob Rogers wrote:
>From: Jonathan Worthington <[EMAIL PROTECTED]>
>Date: Thu, 21 Jun 2007 00:05:00 +0100
>
>Hi,
>
>Patrick R. Michaud wrote:
> > My first question is "How do I add a class method?"
From: Jonathan Worthington <[EMAIL PROTECTED]>
Date: Thu, 21 Jun 2007 00:05:00 +0100
Hi,
Patrick R. Michaud wrote:
> My first question is "How do I add a class method?" -- i.e.,
> a method that operates on a class instance as opposed
> to an obje
Hi,
Patrick R. Michaud wrote:
My first question is "How do I add a class method?" -- i.e.,
a method that operates on a class instance as opposed
to an object instance of that class. Ideally the answer
would contain explanations/examples for defining such
methods in PIR and also as P
As mentioned during today's #parrotsketch meeting, I have
a number of questions about the specifics of performing
certain operations in the new object model given by pdd15.
These are all generally "how do I...?" types of questions,
where I have something I want to do but in r
Leopold Toetsch wrote:
And, I do think making the PASM and PIR compilers capable of being used
as standard compiler objects is a superior solution.
We currently can't pass any arguments to PASM/PIR compilers. You can't change
trace or debug options for "eval". This is a serious limitation, w
Am Mittwoch, 15. November 2006 22:38 schrieb Allison Randal:
> Leopold Toetsch wrote:
> > Please don't. Opcodes are very limited re calling conventions. Mehthods
> > are by far more flexible when it comes to pass arguments to compilers.
>
> I believe we've been through this conversation before. I d
Leopold Toetsch wrote:
Please don't. Opcodes are very limited re calling conventions. Mehthods are by
far more flexible when it comes to pass arguments to compilers.
I believe we've been through this conversation before. I don't mean
coding a completely different opcode, I just mean using th
Am Mittwoch, 15. November 2006 05:52 schrieb Allison Randal:
> We might want to resurrect the 'compile' opcode as an indirect syntax
> for making the 'compile' method call.
Please don't. Opcodes are very limited re calling conventions. Mehthods are by
far more flexible when it comes to pass argum
Patrick R. Michaud wrote:
We might want to resurrect the 'compile' opcode as an indirect syntax
for making the 'compile' method call.
Maybe, but I can't see that this is worthy of a special opcode
(and presumably a vtable slot?). There's just not a lot of
difference between:
$P0 = compi
On Tue, Nov 14, 2006 at 08:52:47PM -0800, Allison Randal wrote:
>
> Also for the record from the weekly meeting (which was actually today,
> just a very long today): Yes, compilers are objects and compilation is a
> method call. The compiler for TGE tree grammars is implemented this way,
> and
On 11/9/06, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> Opinions welcome. Personally I think I favor the "a compiler is
> an object with a 'compile' method" model, and that C gives
> us back a compiler object as opposed to a subroutine-like thing.
For the record, it was decided (Allison++) du
Patrick R. Michaud wrote:
>
Or, in claiming that compilers have an API, should we instead
say that the canonical compilation sequence is to use compreg
to obtain a compiler object (not an invokable sub), and then
compile the source via a 'compile' method on the compiler object?
For example:
On Thu, Nov 09, 2006 at 09:55:05AM -0200, Adriano Rodrigues wrote:
> On 11/9/06, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> >Opinions welcome. Personally I think I favor the "a compiler is
> >an object with a 'compile' method" model, and that C gives
> >us back a compiler object as opposed to
On 11/9/06, Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
Opinions welcome. Personally I think I favor the "a compiler is
an object with a 'compile' method" model, and that C gives
us back a compiler object as opposed to a subroutine-like thing.
Would it not be possible to support both? A comp
Historically Parrot has considered a compiler to be an
invokable subroutine, such that the canonical sequence for
compiling something is:
.local string perl6_source
.local pmc perl6_compiler
perl6_compiler = compreg 'Perl6'
$P0 = perl6_compiler(perl6_source)
However, pdd21_namespa
On Wed, Apr 20, 2005 at 08:39:02AM +0200, Leopold Toetsch wrote:
: Larry Wall <[EMAIL PROTECTED]> wrote:
: > On Tue, Apr 19, 2005 at 02:02:41PM +, Ingo Blechschmidt wrote:
:
: >: # Possibility #2
: >: multi sub *postcircumfix:<'[', ']'>(TiedArray $self, $index) {
: >: # Body as a
Larry Wall <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 19, 2005 at 02:02:41PM +, Ingo Blechschmidt wrote:
>: # Possibility #2
>: multi sub *postcircumfix:<'[', ']'>(TiedArray $self, $index) {
>: # Body as above
>: }
> None of those are quite right, because you have to be prepar
# New Ticket Created by Andy Dougherty
# Please include the string: [perl #31674]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org:80/rt3/Ticket/Display.html?id=31674 >
The INSTALL file in languages/m4/INSTALL says:
'libpcre' is required.
but, un
Jerry Gay <[EMAIL PROTECTED]> wrote:
> thanks all for the clarifications...
>> > and they aren't listed in > ops.num yet,
>>
>> They are listed in ops.num #1374 - #1385 since quite a time.
>>
> this morning i performed a 'cvs co parrot' and ran make (win32 - msvc,)
> which generated the following
thanks all for the clarifications...
> > and they aren't listed in > ops.num yet,
>
> They are listed in ops.num #1374 - #1385 since quite a time.
>
this morning i performed a 'cvs co parrot' and ran make (win32 - msvc,)
which generated the following information, leading to my statement above:
Jerry Gay <[EMAIL PROTECTED]> wrote:
> On Tuesday, March 16, 2004 7:32 AM, Jens Rieks wrote:
>> You can also use another namespace:
>> store_global "TCL::InternalData", "globals", the_hash
>> ...
>> find_global the_hash, "TCL::InternalData", "globals"
> is there a good reason why t
On Tuesday 16 March 2004 16:00, Gay, Jerry wrote:
> On Tuesday, March 16, 2004 7:32 AM, Jens Rieks wrote:
> > You can also use another namespace:
> > store_global "TCL::InternalData", "globals", the_hash
> > ...
> > find_global the_hash, "TCL::InternalData", "globals"
>
> is there a goo
On Tuesday, March 16, 2004 7:32 AM, Jens Rieks wrote:
> You can also use another namespace:
> store_global "TCL::InternalData", "globals", the_hash
> ...
> find_global the_hash, "TCL::InternalData", "globals"
is there a good reason why the signatures are different for 'store_glo
Jens Rieks wrote:
Because global variables in tcl are different than global state
internal to my interpreter, and it would probably be sporting of me to
only expose the variables defined in the language, rather than those
used internally by the bytecode - so, if global opcodes are the way to
store
Hi,
On Tuesday 16 March 2004 08:49, Will Coleda wrote:
> On Tuesday, March 16, 2004, at 02:01 AM, Leopold Toetsch wrote:
> > Well just use the global ops.
> >
> > global "tcl_globals" = the_hash # store
> > ..
> > pref = global "tcl_globals" # fetch
> >
[snip]
> >
> > Why not just u
tate, then?
Well just use the global ops.
global "tcl_globals" = the_hash # store
..
pref = global "tcl_globals" # fetch
PerlHash that maps command names to the builtin functions). I suppose
I
could create my own pad, or even an object... but then how do I
ust use the global ops.
global "tcl_globals" = the_hash # store
..
pref = global "tcl_globals" # fetch
> PerlHash that maps command names to the builtin functions). I suppose I
> could create my own pad, or even an object... but then how do I access
> it with
" way to store
my interpreter's global state, then? (for example, I have a global
PerlHash that maps command names to the builtin functions). I suppose I
could create my own pad, or even an object... but then how do I access
it without storing it in a global?
--
Will "Coke" Coledawill at coleda
dot com
Michal Wallace <[EMAIL PROTECTED]> wrote:
> On Thu, 8 Jan 2004, Leopold Toetsch wrote:
>> $ perldoc docs/pdds/pdd15_objects.pod
>> /TRANSLATION AND GLOSSARY
> So let me see if I have this right. Attributes
> are slots in a class, that get created on each
> instance. Properties don't have predefin
On Thu, 8 Jan 2004, Leopold Toetsch wrote:
> Michal Wallace <[EMAIL PROTECTED]> wrote:
>
> > What exactly is the difference between an
> > attribute and a property?
>
> $ perldoc docs/pdds/pdd15_objects.pod
> /TRANSLATION AND GLOSSARY
Thanks. Don't mind me. I'm going to go make
a card that says "
Michal Wallace <[EMAIL PROTECTED]> wrote:
> What exactly is the difference between an
> attribute and a property?
$ perldoc docs/pdds/pdd15_objects.pod
/TRANSLATION AND GLOSSARY
> Michal J Wallace
leo
On Thu, 8 Jan 2004, Leopold Toetsch wrote:
> Michal Wallace <[EMAIL PROTECTED]> wrote:
>
> > I'm not even trying to get objects working yet. I just
> > need something that'll let me run setprop on it
>
> You can attach properties to all PMCs. And WRT object instantiation:
> t/pmc/object*.t but onl
Michal Wallace <[EMAIL PROTECTED]> wrote:
> I'm not even trying to get objects working yet. I just
> need something that'll let me run setprop on it
You can attach properties to all PMCs. And WRT object instantiation:
t/pmc/object*.t but only integer attributes are done.
leo
On Wed, 7 Jan 2004, Luke Palmer wrote:
> Er, sorry, that's IMCC's fault. This works:
>
> new felix, $I0
Yep! Thanks!
Here's a short example of the final script:
.sub _main
.local object Cat
.local object felix
newclass Cat, "Cat"
find_type $I0, "Cat"
new felix, $I0
$P0 =
Michal Wallace writes:
> On Wed, 7 Jan 2004, Luke Palmer wrote:
>
> > Should go something like this:
> >
> > .sub _main
> > .local object Cat
> > .local object felix
> > newclass Cat, "Cat"
> > find_type $I0, "Cat"
> > felix = new $I0
> > # ...
>
On Wed, 7 Jan 2004, Luke Palmer wrote:
> Should go something like this:
>
> .sub _main
> .local object Cat
> .local object felix
> newclass Cat, "Cat"
> find_type $I0, "Cat"
> felix = new $I0
> # ...
> .end
Thanks, but that doesn't work eit
jects.c) that
> > creates a new object instead.
>
> Well, cool! How do I this from parrot?
>
> I've been trying things along the lines of:
>
> .sub _main
>.local object Cat
>.local object felix
>newclass Cat, "Cat"
>P2 = Cat
>
Well, cool! How do I this from parrot?
I've been trying things along the lines of:
.sub _main
.local object Cat
.local object felix
newclass Cat, "Cat"
P2 = Cat
S0 = "init"
callmeth
felix = P0
#...
end
.end
... But haven't figured ou
On Mon, 01 Dec 2003 22:28:00 -0500, Melvin Smith
<[EMAIL PROTECTED]> wrote:
>2) printf/sprintf - we do need it (and implemented in C) since it is a
>staple and is the
>reasonable hook for HLL implementors to do interpolation without having
>to write a special native method or PMC for each languag
At 10:28 PM -0500 12/1/03, Melvin Smith wrote:
2) printf/sprintf - we do need it (and implemented in C) since it is
a staple and is the
reasonable hook for HLL implementors to do interpolation without having
to write a special native method or PMC for each language.
Okay, once I get the object stu
>>At 5:38 PM + 11/27/03, Pete Lomax wrote:
At 12:02 PM 11/27/2003 +, Pete Lomax wrote:
>Perl6 already does interpolation without special support from IMCC.
>>>I'll rephrase. Is there anything knocking about which would help with
>>>eg:
>>>printf (pFile, "Amount %12.3f [%-10.10s]\n",
At 01:14 PM 11/27/2003 -0500, Dan Sugalski wrote:
At 5:38 PM + 11/27/03, Pete Lomax wrote:
On Thu, 27 Nov 2003 09:52:10 -0500, Melvin Smith
<[EMAIL PROTECTED]> wrote:
At 12:02 PM 11/27/2003 +, Pete Lomax wrote:
Perl6 already does interpolation without special support from IMCC.
I'll rephras
At 5:38 PM + 11/27/03, Pete Lomax wrote:
On Thu, 27 Nov 2003 09:52:10 -0500, Melvin Smith
<[EMAIL PROTECTED]> wrote:
At 12:02 PM 11/27/2003 +, Pete Lomax wrote:
Perl6 already does interpolation without special support from IMCC.
That's nice for it. Where do I go crib from?
?
-Melvin
I'll
On Thu, 27 Nov 2003 09:52:10 -0500, Melvin Smith
<[EMAIL PROTECTED]> wrote:
>At 12:02 PM 11/27/2003 +, Pete Lomax wrote:
>>Perl6 already does interpolation without special support from IMCC.
>>
>>That's nice for it. Where do I go crib from?
>
>?
>
>-Melvin
>
I'll rephrase. Is there anything kn
At 12:02 PM 11/27/2003 +, Pete Lomax wrote:
Perl6 already does interpolation without special support from IMCC.
That's nice for it. Where do I go crib from?
?
-Melvin
Perl6 already does interpolation without special support from IMCC.
That's nice for it. Where do I go crib from?
Pete
> I think separating the IMCC and parrot programming FAQs, or making the
> IMCC faq a section of a larger Parrot FAQ, would be better. The IMCC FAQ
> really ought to be about syntax rather than semantics.
Patches welcome.
:-J
-R
On Mon, 24 Nov 2003, Melvin Smith wrote:
> We DO need a Parrot Programming FAQ. I propose the IMCC faq functions
> as just that. We can still have the current Parrot FAQ, which is
> great at answering generic questions for people who haven't swallowed
> the blue pill yet. (Or was it the red pill,
At 07:18 PM 11/24/2003 +0100, Jerome Quelin wrote:
Dan Sugalski wrote:
> On Mon, 24 Nov 2003, Jerome Quelin wrote:
> > * How does one launch an exception? trap an exception?
> > * How does one create a class? instanciate an object?
> With the exception of the second bullet item, these are generic
>
At 06:49 PM 11/24/2003 +0100, Jerome Quelin wrote:
Jerome Quelin wrote:
> Melvin Smith wrote:
> > I just checked in an intial IMCC faq (parrot/imcc/docs/imcfaq.pod)
> Great job. Attached you'll find some corrections for typos.
And of course I forgot the patch file. Here it is.
Thanks, applied!
Als
Dan Sugalski wrote:
> On Mon, 24 Nov 2003, Jerome Quelin wrote:
> > * How does one retrieve arguments given on the command-line?
> > * How does one call a function? With arguments? With a variable
> > number of arguments? Get the return value(s) of a sub?
> > * How does one read from a file? stdin?
On Mon, 24 Nov 2003, Jerome Quelin wrote:
> Ok, here are some more (some questions are easy - but a faq should also
> have some easy items -, others are not yet possible, but anyway):
>
> * How does one retrieve arguments given on the command-line?
> * How does one call a function? With arguments?
At 06:48 PM 11/24/2003 +0100, Jerome Quelin wrote:
Melvin Smith wrote:
> I just checked in an intial IMCC faq (parrot/imcc/docs/imcfaq.pod)
Great job. Attached you'll find some corrections for typos.
Thanks. BTW Robert has linked the HTML FAQ to the site.
You can get to it from the Resources tab, o
Jerome Quelin wrote:
> Melvin Smith wrote:
> > I just checked in an intial IMCC faq (parrot/imcc/docs/imcfaq.pod)
> Great job. Attached you'll find some corrections for typos.
And of course I forgot the patch file. Here it is.
Jerome
--
[EMAIL PROTECTED]
Index: imcfaq.pod
===
Melvin Smith wrote:
> I just checked in an intial IMCC faq (parrot/imcc/docs/imcfaq.pod)
Great job. Attached you'll find some corrections for typos.
> The FAQ is small, but it at least answers all of the above.
As I see it, the faq will grow fast... Maybe we'll have to split it in
different pa
At 03:18 PM 11/21/2003 -0500, Dan Sugalski wrote:
These could use some documenting (and yes, I know the answer to many) for
future use for folks generating PIR. (Hint, hint -- documentation is a
good thing)
*) How do I declare an externally visible subroutine?
*) How do I store a global variable
IR. (Hint, hint -- documentation is a
> > good thing)
> >
> > *) How do I declare an externally visible subroutine?
> >
> > *) How do I store a global variable
> >
> > *) How do I load a global variable
> >
> > *) How do I call an external
At 03:18 PM 11/21/2003 -0500, Dan Sugalski wrote:
These could use some documenting (and yes, I know the answer to many) for
future use for folks generating PIR. (Hint, hint -- documentation is a
good thing)
I will make an attempt at answering all of these regarding how it is today,
as opposed to ho
Dan Sugalski wrote:
These could use some documenting (and yes, I know the answer to many) for
future use for folks generating PIR. (Hint, hint -- documentation is a
good thing)
*) How do I declare an externally visible subroutine?
*) How do I store a global variable
*) How do I load a global
These could use some documenting (and yes, I know the answer to many) for
future use for folks generating PIR. (Hint, hint -- documentation is a
good thing)
*) How do I declare an externally visible subroutine?
*) How do I store a global variable
*) How do I load a global variable
*) How do I
"Clinton A. Pierce" wrote:
[snip]
> DEBUGGER:
> if one-stepping, DEBUG
> # Loop over break list
> if current statement is on global break list, DEBUG
> # End loop
> ret
No comment on your *particular* problem, but might I suggest that you
keep your b
(This is mostly a platform-specific question, as I've written a few and
just need to know what I'm doing wrong.)
The design for BASIC's debugger I've got now resembles this:
.sub _main
.local foo
.local bar
[...rest of declarations...]
[PIR for statement 1...]
I really screwed this up, who has editable rights for the pages.
( .htaccess ?? )
76 matches
Mail list logo