Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Leopold Toetsch
Leopold Toetsch (via RT) wrote: # New Ticket Created by Leopold Toetsch # Please include the string: [perl #20315] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=20315 > Attached is a first try towards eval. I have now

Re: Objects, finally (try 1)

2003-01-15 Thread Gopal V
If memory serves me right, Dan Sugalski wrote: > rather than attributes, but I may be incorrect here. Are the current > python instance attributes both: > > *) defined per object rather than per class > *) Essentially global, that is not hidden from parent classes or > anything. (Basically one b

Re: Objects, finally (try 1)

2003-01-15 Thread Peter Haworth
On Wed, 15 Jan 2003 01:00:59 -0500, Dan Sugalski wrote: > At 8:53 PM -0800 1/14/03, Adriano wrote: > >I think what Jonathan asked for was an operator for returning a method > >(as an object) which can be invoked later with some arguments (or even > >applied with a partial list of arguments for curr

Re: [perl #19610] [PATCH] New language support: Ook!

2003-01-15 Thread Leopold Toetsch
Jerome Quelin (via RT) wrote: - currently I'm just printing on stdout the resulting parrot code, I lack an eval instruction in Parrot. Dan, Leo? :-) $ diff -ub ~/src/parrot/languages/ook/ook.pasm ook.pasm --- /home/lt/src/parrot/languages/ook/ook.pasm Wed Jan 1 01:34:16 2003 +++ ook.pasm

RE: Objects, finally (try 1)

2003-01-15 Thread Garrett Goebel
Peter Haworth wrote: > Dan Sugalski wrote: > > Adriano wrote: > > > > > >I think what Jonathan asked for was an operator for > > >returning a method (as an object) which can be invoked > > >later with some arguments (or even applied with a > > >partial list of arguments for currying). > > > > > >

RE: Objects, finally (try 1)

2003-01-15 Thread attriel
>> > >I think what Jonathan asked for was an operator for >> > >returning a method (as an object) which can be invoked >> > >later with some arguments (or even applied with a >> > >partial list of arguments for currying). >> > > >> > >This would be a lot more useful than a yes-or-no >> > >answer ab

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Jerome Quelin
Leopold Toetsch wrote: > 1) > The call function to the compiler/assembler is kept as a NCI. Better > would be a subclass of NCI (Compiler.pmc or so), which provides > invoke_keyed(key, next) Hmm, I don't know what a NCI is. Where (which files) can I find information about them? Jerome -- [EMAI

RE: Objects, finally (try 1)

2003-01-15 Thread Jonathan Sillito
I realize this will vary from language to language, but generally we will need a PMC that encapsulates a method (and responds to the invoke vtable method like Sub, or maybe the Sub PMC could do?). This python code is interesting: class A: def f (self): print "A.f()" def g (self): print "g

Re: [perl #19610] [PATCH] New language support: Ook!

2003-01-15 Thread Jerome Quelin
Leopold Toetsch wrote: > Jerome Quelin (via RT) wrote: > > - currently I'm just printing on stdout the resulting parrot code, > > I lack an eval instruction in Parrot. Dan, Leo? :-) > $ diff -ub ~/src/parrot/languages/ook/ook.pasm ook.pasm > --- /home/lt/src/parrot/languages/ook/ook.pasm Wed Jan

RE: Objects, finally (try 1) [x-adr][x-bayes]

2003-01-15 Thread Garrett Goebel
From: attriel [mailto:[EMAIL PROTECTED]] > > >> > >I think what Jonathan asked for was an operator for > >> > >returning a method (as an object) which can be invoked > >> > >later with some arguments (or even applied with a > >> > >partial list of arguments for currying). > >> > > > >> > >This wou

RE: Objects, finally (try 1)

2003-01-15 Thread attriel
> Perhaps I'm misunderstanding Dan's meaning when he talks of invalidating > method handles. In Perl5: > > package Foo; > sub bar { print "hello world\n" } > package main; > my $cref = Foo->can('bar'); > undef *Foo::bar; > Foo->$cref(); > Foo->bar(); > 1; > > would result in: > > hello world > Can'

Re: Objects, finally (try 1)

2003-01-15 Thread Christopher Armstrong
On Wed, Jan 15, 2003 at 01:57:28AM -0500, Dan Sugalski wrote: > At 9:37 PM -0500 1/14/03, Christopher Armstrong wrote: > >But who knows, maybe it could be made modular enough (i.e., more > >interface-oriented?) to allow the best of both worlds -- I'm far too > >novice wrt Parrot to figure out what

Re: Objects, finally (try 1)

2003-01-15 Thread Dan Sugalski
At 7:11 PM +0530 1/15/03, Gopal V wrote: If memory serves me right, Dan Sugalski wrote: rather than attributes, but I may be incorrect here. Are the current python instance attributes both: *) defined per object rather than per class *) Essentially global, that is not hidden from parent clas

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Dan Sugalski
At 8:27 PM + 1/14/03, Leopold Toetsch (via RT) wrote: # New Ticket Created by Leopold Toetsch # Please include the string: [perl #20315] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=20315 > Attached is a first try towa

Re: Objects, finally (try 1)

2003-01-15 Thread Dan Sugalski
At 3:10 PM + 1/15/03, Peter Haworth wrote: On Wed, 15 Jan 2003 01:00:59 -0500, Dan Sugalski wrote: At 8:53 PM -0800 1/14/03, Adriano wrote: >I think what Jonathan asked for was an operator for returning a method >(as an object) which can be invoked later with some arguments (or even >appl

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Leopold Toetsch
In perl.perl6.internals, you wrote: > Leopold Toetsch wrote: >> 1) >> The call function to the compiler/assembler is kept as a NCI. Better >> would be a subclass of NCI (Compiler.pmc or so), which provides >> invoke_keyed(key, next) > Hmm, I don't know what a NCI is. Where (which files) can I find

Re: [perl #19610] [PATCH] New language support: Ook!

2003-01-15 Thread Leopold Toetsch
In perl.perl6.internals, you wrote: > Leopold Toetsch wrote: >> $ ../imcc/imcc -r ook.pasm hello.ook >> Hello World! > You don't seem to have checked in the compile thing... No, its not ready yet. > About the eval: you said that compile does eval here. In the future, how > should I eval after co

Re: Objects, finally (try 1)

2003-01-15 Thread Nicholas Clark
On Wed, Jan 15, 2003 at 11:17:17AM -0500, Dan Sugalski wrote: > In that case they'd correspond to our properties, and I can already > feel a massive terminology disconnect looming. Maybe we should rename > properties and attributes to frobs and thingies, just so there's no > overlap. :( We coul

Re: Objects, finally (try 1)

2003-01-15 Thread Nicholas Clark
On Wed, Jan 15, 2003 at 01:00:59AM -0500, Dan Sugalski wrote: > At 8:53 PM -0800 1/14/03, Adriano wrote: > >I think what Jonathan asked for was an operator for returning a > >method (as an object) which can be invoked later with some arguments > >(or even applied with a partial list of arguments

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Leopold Toetsch
Dan Sugalski wrote: At 8:27 PM + 1/14/03, Leopold Toetsch (via RT) wrote: Yow, Cool! We *have* to get IMCC built into parrot now. You do get this wrong - always ;-) imcc = parrot + assemble.pl - pre-processor + PIR-assembler + optimizer/10#yet & now & already With the help

RE: Objects, finally (try 1)

2003-01-15 Thread Jonathan Sillito
Sounds like we want objects *and* classes to support: static_attribs - which are defined at compile time and accessed by offset probably stored in an array. dynamic_attribs - which come and go at run time and are generally accessed by name and likely stored in a hash. -- Jonathan Sillito >

Re: Objects, finally (try 1)

2003-01-15 Thread Uri Guttman
> "JS" == Jonathan Sillito <[EMAIL PROTECTED]> writes: JS> Sounds like we want objects *and* classes to support: JS> static_attribs - which are defined at compile time and JS> accessed by offset probably stored in an array. JS> dynamic_attribs - which come and go at run time and are

Re: Array Questions

2003-01-15 Thread Simon Cozens
[EMAIL PROTECTED] (Michael Lazzaro) writes: > Great -- then I have only one more question, I think. In the words of > a certain cartoon character, what's *this* button do? > >my $b is $a; I think at this stage it's probably worth reminding everyone that not every string of characters *needs*

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-15 Thread Simon Cozens
[EMAIL PROTECTED] (Mr. Nobody) writes: > Unicode operators in the core are a very, very, very, very, very, very, very, > very, very, very, very, very, very bad idea. We've done that. -- COBOL is for morons. -- E.W. Dijkstra

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-15 Thread Simon Cozens
[EMAIL PROTECTED] (Dan Sugalski) writes: > Ah, that's a different question. Having Unicode synonyms may well be > considered reasonable thing Sounds like the good old days of trigraphs. -- A witty saying means nothing. -Voltaire

Re: L2R/R2L syntax (was Re: Everything is an object.)

2003-01-15 Thread Dan Sugalski
At 12:05 AM + 1/16/03, Simon Cozens wrote: [EMAIL PROTECTED] (Dan Sugalski) writes: Ah, that's a different question. Having Unicode synonyms may well be considered reasonable thing Sounds like the good old days of trigraphs. I was shooting for the good old days of sarcasm that people no