Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Piers Cawley <[EMAIL PROTECTED]> wrote: > Dan Sugalski <[EMAIL PROTECTED]> writes: >>>And what control stack? The continuation chain is the control stack, surely? >> >> Nope. There's the exception handlers, at the very least. > Just add a field to the continuation structure "NextExceptionHandler"

Re: [PATCH] add bnots (string bitwise not) ops

2004-03-22 Thread Leopold Toetsch
Goplat <[EMAIL PROTECTED]> wrote: > Parrot seems to be missing the bitwise-not for strings. Attached patch adds a > string_bitwise_not function, bitwise_nots vtable, and "bnots" ops. Thanks, applied. leo

Re: [Patch] add hints to ops files

2004-03-22 Thread Leopold Toetsch
> attached is a patch to add hints to the ops files. > Additionally to adding the hints it does: > *.ops: > - update the copyright year > object.ops: > - add "unimplemented" comment to singleton, removeattribute, adddoes, > removedoes Thanks, applied. leo

Safe execution core and ops classification

2004-03-22 Thread Leopold Toetsch
With the patches of Jens it's no more far away to provide a Safe run-core option. Still a lot todo, but... 1) Opcode classes perl5 hasn't really many different: perldoc Opcode | grep ' :[a-z]* - do we need base_loop? It's IMHO useless - turning off branching ops will break any non-trivival p

Re: Funky «vector» operator

2004-03-22 Thread Larry Wall
On Mon, Mar 22, 2004 at 10:36:32PM -0800, David Wheeler wrote: : I'll wait and see what I hear back from the Emacs developers. Well, it's too bad the emacs developers are lagging behind the vim developers in this area, but it might (or might not) have something to do with the fact that certain obn

Re: Funky «vector» operator

2004-03-22 Thread David Wheeler
On Mar 22, 2004, at 10:28 PM, Piers Cawley wrote: (require 'cl) somewhere before that code chunk. I thought everyone already did that. Thanks. I put only the code you sent me in my .emacs, and a handy Unicode file I have still doesn't display properly. *sigh* I'll wait and see what I hear back

Re: Funky «vector» operator

2004-03-22 Thread Piers Cawley
David Wheeler <[EMAIL PROTECTED]> writes: > On Mar 22, 2004, at 5:02 PM, Piers Cawley wrote: > >> Try this: >> >> (cond >> ((eq window-system 'mac) >> (when (string= default-directory "/") >> (setq default-directory "~/")) >> (setq mac-command-key-is-meta t >> mac-reverse-ctrl-meta n

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 12:59 AM + 3/23/04, Piers Cawley wrote: >>Leopold Toetsch <[EMAIL PROTECTED]> writes: >> >>> Dan Sugalski <[EMAIL PROTECTED]> wrote: >>> ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anythin

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Austin Hastings writes: > > ->Â @cp makes about as much sense as subÂ(@cp). C returns a > > list of array references, right? So it binds each one to @cp (the right > > of -> is a subroutine parameter list, remember?). > > Are you saying that subÂ(@cp) is not, in fact, an alias for C ? > > Anyw

RE: Outer product considered useful

2004-03-22 Thread Austin Hastings
> -Original Message- > From: Luke Palmer [mailto:[EMAIL PROTECTED] > > Austin Hastings writes: > > Before this gets simonized, let me add that this seems genuinely > > useful: It provides a way of constructing a loop in a dimension that > > is not really accessible, except via recursion.

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Austin Hastings writes: > Before this gets simonized, let me add that this seems genuinely > useful: It provides a way of constructing a loop in a dimension that > is not really accessible, except via recursion. > > Luke: Would that have to be > > for outer([EMAIL PROTECTED]) ->Â @cp {...} >

Re: Some questions about operators.

2004-03-22 Thread Larry Wall
On Tue, Mar 23, 2004 at 07:35:39AM +1100, Damian Conway wrote: : However I do think that, now we have C to carry the load of "exists : uniquely", Larry will probably decide that C is strictly binary, and : hence generalizes to the "parity" form in the n-ary case. Hmm, I probably will. :-) But

Re: Funky «vector» operator

2004-03-22 Thread David Wheeler
On Mar 22, 2004, at 5:02 PM, Piers Cawley wrote: Try this: (cond ((eq window-system 'mac) (when (string= default-directory "/") (setq default-directory "~/")) (setq mac-command-key-is-meta t mac-reverse-ctrl-meta nil process-connection-type nil mac-keyboard-text-encoding kTextEncoding

Re: Classes and metaclasses

2004-03-22 Thread chromatic
On Tue, 2004-03-16 at 11:57, Dan Sugalski wrote: (I forgot to reply to this last week) > At 11:51 AM -0800 3/16/04, chromatic wrote: > >Just to be sure, if Class Y inherits from Class X, is X on Y's does > >list? > > If class X does X, then yes. (I *really* should've picked better > names) Cla

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread ozone
On 23/03/2004, at 12:24 PM, Matt Fowles wrote: I could be getting things mixed up here, but I thought I read that GHC (Glasgow Haskell Compiler) is part of GCC (GNU Compiler Collection). Although I might be misreading this paper slightly http://home.in.tum.de/~baueran/thesis/ GHC can optionally

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Matt Fowles
All~ I am not sure that I understand why we deal with exception handlers at all. Why not just make exception handlers a second continuation passed to all functions. Then you call continuation 1 for successful returns and continuation 2 for exceptions. This will not introduce overhead to the

RE: Outer product considered useful

2004-03-22 Thread Austin Hastings
> -Original Message- > From: [EMAIL PROTECTED] > > [EMAIL PROTECTED] (Austin Hastings) writes: > > Before this gets simonized, let me add that this seems > genuinely useful: It provides a way of constructing a loop in a > dimension that is not really accessible, except via recursion. > > Oh

[PATCH] add bnots (string bitwise not) ops

2004-03-22 Thread Goplat
Parrot seems to be missing the bitwise-not for strings. Attached patch adds a string_bitwise_not function, bitwise_nots vtable, and "bnots" ops. __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html? config_lib.p

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Matt Fowles
I could be getting things mixed up here, but I thought I read that GHC (Glasgow Haskell Compiler) is part of GCC (GNU Compiler Collection). Although I might be misreading this paper slightly http://home.in.tum.de/~baueran/thesis/ I would greatly support adding a Haskell compiler and would be wi

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 12:59 AM + 3/23/04, Piers Cawley wrote: Leopold Toetsch <[EMAIL PROTECTED]> writes: Dan Sugalski <[EMAIL PROTECTED]> wrote: ... If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. BTW: which stacks: Register frames of course. What

Re: Using Ruby Objects with Parrot

2004-03-22 Thread Larry Wall
On Tue, Mar 23, 2004 at 12:53:57AM +, Piers Cawley wrote: : Personally, I've always wished that Perl5 *had* done that. I've toyed : with the idea of blessing Stashes, but never got around to actually : implementing anything. Well, hey, we had to leave something to fix in Perl 6. What? Oh, ri

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread ozone
On 23/03/2004, at 6:23 AM, Matt Fowles wrote: If I recall correctly, GCC supports Haskell, which is an ideal language for Parrot. GCC doesn't support Haskell -- perhaps the compiler you're thinking of is GHC? (Glasgow Haskell Compiler). I'm starting to look at implementing a Haskell to Parrot

Re: Funky «vector» operator

2004-03-22 Thread Piers Cawley
David Wheeler <[EMAIL PROTECTED]> writes: > On Mar 20, 2004, at 1:32 PM, Calle Dybedahl wrote: > >> You don't need Unicode display « and », just plain old ISO 8859-1. > > True, but I'd like to get Unicode working for other projects, as well. > >> They're characters number 171 and 187 there. And AF

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Dan Sugalski <[EMAIL PROTECTED]> wrote: > >> ... If we go with a one >> frame stack chunk then we don't have to bother with COW-ing >> *anything* with the stack. > > BTW: which stacks: Register frames of course. What about Pad, User, and > Control? I

Re: Using Ruby Objects with Parrot

2004-03-22 Thread Piers Cawley
Nick Ing-Simmons <[EMAIL PROTECTED]> writes: > Mark Sparshatt <[EMAIL PROTECTED]> writes: >> >>I'm not 100% certain about the details but I think this is how it works. >> >>In languages like C++ objects and classes are completely seperate. >>classes form an inheritance heirachy and objects are ins

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Matt Fowles
I can try, although I do not know Haskell very well. Haskell is a functional language (like Scheme or ML), thus it needs support for things like closures and continuations. This also means that having an interpreter to provide higher level feature like memoizing thunks is very useful. Haskell

Re: Outer product considered useful

2004-03-22 Thread Simon Cozens
[EMAIL PROTECTED] (Austin Hastings) writes: > Before this gets simonized, let me add that this seems genuinely useful: It provides > a way of constructing a loop in a dimension that is not really accessible, except > via recursion. Oh, it *is* useful, and it's extremely nice to know that someth

RE: Outer product considered useful

2004-03-22 Thread Austin Hastings
> -Original Message- > From: Luke Palmer [mailto:[EMAIL PROTECTED] > ... > Using a permutations module I could make that shorter, but I figure that > since we're already providing C to make looping easier, why not > provide C (perhaps spelled Â)? The outer function would provide >

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Luke Palmer writes: > Which is of course wrong. > > sub _outer_coro(@prev, @data) is coroutine > { > if (@data) { > _outer_coro([ @prev, @data[0] ], @data[1...]) > } > else { > yield [EMAIL PROTECTED]; > } > } > > sub outer([

Re: Outer product considered useful

2004-03-22 Thread Luke Palmer
Luke Palmer writes: > I believe it could be programmed lazily. Like this: > > sub _outer_coro(*$first is context(Scalar), > [EMAIL PROTECTED] is context(Scalar)) > is coroutine > { > if @rest { > _outer_coro [EMAIL PROTECTED]; > }

Outer product considered useful

2004-03-22 Thread Luke Palmer
I found myself writing a perl script today in which I did (I'll perl6-ize it for sake of discussion): for 98,99 -> $i { for 0..255 -> $j { # testing IP addresses with $i.$j } } I was thinking about what would happen if I allowed the user to input those ranges,

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Gerald E Butler
Could you please give a little more insight on Haskell and why it is/would be so good? I've never heard of it. On Mon, 2004-03-22 at 14:23, Matt Fowles wrote: > All~ > > If I recall correctly, GCC supports Haskell, which is an ideal language > for Parrot. > > Matt > > Simon Glover wrote: > >

Re: Some questions about operators.

2004-03-22 Thread Damian Conway
John Macdonald wrote: if ($a xor $b xor $c) {...} should succeed only when exactly one of ($a, $b, $c) is true. That's not the definition of xor that I learned in school. It's taking a simplified form of the definition that works for two arguments and then expanding it to multiple arguments -

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 8:33 PM +0100 3/22/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: D'oh! (I should edit this all out but, well...) If we go with a one frame stack chunk then we don't have to bother with COW-ing *anything* with the stack. W

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: > D'oh! (I should edit this all out but, well...) If we go with a one > frame stack chunk then we don't have to bother with COW-ing > *anything* with the stack. Which makes the differentiation between a > re

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > ... If we go with a one > frame stack chunk then we don't have to bother with COW-ing > *anything* with the stack. BTW: which stacks: Register frames of course. What about Pad, User, and Control? leo

Re: [CVS ci] more PIR codegen improvements

2004-03-22 Thread Dan Sugalski
At 7:11 PM +0100 3/22/04, Leopold Toetsch wrote: Sterling Hughes <[EMAIL PROTECTED]> wrote: On Mar 22, 2004, at 11:42 AM, Leopold Toetsch wrote: * end is now inserted in @MAIN if missing perhaps this should be a compiler warning instead? If both C<@MAIN> and C are missing, we could compile a

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Matt Fowles
All~ If I recall correctly, GCC supports Haskell, which is an ideal language for Parrot. Matt Simon Glover wrote: On Mon, 22 Mar 2004, Butler, Gerald wrote: The important point is that the starting language must have semantics which treat variables, object, etc. as abstract entities to be ma

RE: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Simon Glover
On Mon, 22 Mar 2004, Butler, Gerald wrote: > The important point is that the starting language must have semantics which > treat variables, object, etc. as abstract entities to be manipulated not > *memory locations* to be accessed arbitrarily. Then, the parse stage must spit This requirement p

Re: [CVS ci] more PIR codegen improvements

2004-03-22 Thread Leopold Toetsch
Sterling Hughes <[EMAIL PROTECTED]> wrote: > On Mar 22, 2004, at 11:42 AM, Leopold Toetsch wrote: >> * end is now inserted in @MAIN if missing > perhaps this should be a compiler warning instead? If both C<@MAIN> and C are missing, we could compile a module. So sometimes you'll get a warning an

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
At 7:00 PM +0100 3/22/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: Since this has gotten to be an issue... Making a continuation conceptually has three steps. One must: 1) Copy the current environment contents to the continuation 2) Note the bytecode address at which the

Re: Continuations, stacks, and whatnots

2004-03-22 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Since this has gotten to be an issue... > Making a continuation conceptually has three steps. One must: > 1) Copy the current environment contents to the continuation > 2) Note the bytecode address at which the continuation should run > 3) Mark the stacks

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Steve Hay
Steve Hay wrote: >Arthur Bergman wrote: > > > >>This is Ponie, development release 2 >> >> >> >> >How does one build this on Win32 with MSVC++? > >Running the top-level "perl Configure.pl" got me nowhere, so I cd'd into >parrot and ran "perl Configure.pl" there. That ran OK, so I tried >

Re: [CVS ci] more PIR codegen improvements

2004-03-22 Thread Sterling Hughes
On Mar 22, 2004, at 11:42 AM, Leopold Toetsch wrote: * end is now inserted in @MAIN if missing perhaps this should be a compiler warning instead? -sterling

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Leopold Toetsch
Jens Rieks <[EMAIL PROTECTED]> wrote: > Hi, [ rx.ops hints patch ] Thanks, applied. leo

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Leopold Toetsch
Steve Hay <[EMAIL PROTECTED]> wrote: > but linking parrot.exe fell over with three unresolved externals: > asctime_r, gmtime_r and localtime_r. These are not present in the VC++ > header files. These are fixed in Parrot CVS. Though I don't know, if ponie uses it unaltered. > - Steve leo

Continuations, stacks, and whatnots

2004-03-22 Thread Dan Sugalski
Since this has gotten to be an issue... We've definitely got performance issues with continuations. This is Not Good, since we're using them for control flow. Leo's hacked in a performance fix, but it's got its own issues. I think it's time for some thought, and a more unified solution. Making

Re: z ip

2004-03-22 Thread James Mastros
Mark J. Reed wrote: One obvious reason for reaching out to unicode characters is the restricted number of non-alphanumeric characters in ASCII. But why do infix operators have to be non-alphanumeric? They don't - but they do have to "look like operators". Thanks to the multiplication symbol, lowe

Re: Dates and times again

2004-03-22 Thread Leopold Toetsch
Nick Ing-Simmons <[EMAIL PROTECTED]> wrote: > Larry Wall <[EMAIL PROTECTED]> writes: >>..., but I darn well better *know* that I can't sleep(.25), or >>strange things are gonna happen. > But you can fake sleep() with select() or whatever. $ cat sl.pasm sleep 0.1 end $ time parrot sl.pasm

[CVS ci] more PIR codegen improvements

2004-03-22 Thread Leopold Toetsch
* end is now inserted in @MAIN if missing * in @MAIN P1 isn't moved around * -Oc: replace savetop with up to 3 pushtopX ops It's a good idea to declare the main function: .sub _main @MAIN ... .end leo

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Goplat
--- Steve Hay <[EMAIL PROTECTED]> wrote: > Arthur Bergman wrote: > > >This is Ponie, development release 2 > > > > > How does one build this on Win32 with MSVC++? > > Running the top-level "perl Configure.pl" got me nowhere, so I cd'd into > parrot and ran "perl Configure.pl" there. That ran

Re: Funky «vector» operator

2004-03-22 Thread David Wheeler
On Mar 20, 2004, at 1:32 PM, Calle Dybedahl wrote: You don't need Unicode display « and », just plain old ISO 8859-1. True, but I'd like to get Unicode working for other projects, as well. They're characters number 171 and 187 there. And AFAIK every Emacs version released in the past ten years ha

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Jens Rieks
Sorry, this mail was meant to go directly to Leo. On Monday 22 March 2004 17:05, Jens Rieks wrote: > Hi, > > On Monday 22 March 2004 15:46, Leopold Toetsch wrote: > > > Ist rx.ops noch aktuell? Wenn ja schaue ich da auch mal durch. > > > > Ob es so verwendet wird weiß ich nicht. Es sind aber etlic

Re: CPAN Upload: A/AB/ABERGMAN/ponie-2.tar.gz - Ponie Development Release 2

2004-03-22 Thread Steve Hay
Arthur Bergman wrote: >This is Ponie, development release 2 > > How does one build this on Win32 with MSVC++? Running the top-level "perl Configure.pl" got me nowhere, so I cd'd into parrot and ran "perl Configure.pl" there. That ran OK, so I tried "nmake" next. It almost worked. The compi

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 15:46, Leopold Toetsch wrote: > > Ist rx.ops noch aktuell? Wenn ja schaue ich da auch mal durch. > > Ob es so verwendet wird weiß ich nicht. Es sind aber etliche branch ops > dabei. Done. Hab bei diff nur -w genommen um den Patch klein zu halten. jens Index: rx.ops ===

RE: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Dan Sugalski
At 9:54 AM -0500 3/22/04, Butler, Gerald wrote: OK, I think I'm starting to get a better picture of what needs to happen. Does this sound more reasonable? With the caveat that I know nothing about gcc's internals, it seems at least reasonable. :) -- Dan ---

Re: [PROPOSAL] C opcode and interface

2004-03-22 Thread Dan Sugalski
At 3:23 PM + 3/22/04, Nick Ing-Simmons wrote: Dan Sugalski <[EMAIL PROTECTED]> writes: At 11:12 AM -0800 3/10/04, Brent \"Dax\" Royal-Gordon wrote: Dan Sugalski wrote: Which, unfortunately, will end up making things a hassle, since there's no platform-independent way to spawn a sub-process, dam

Re: Using Ruby Objects with Parrot

2004-03-22 Thread Nick Ing-Simmons
Mark Sparshatt <[EMAIL PROTECTED]> writes: > >I'm not 100% certain about the details but I think this is how it works. > >In languages like C++ objects and classes are completely seperate. >classes form an inheritance heirachy and objects are instances of a >particular class. > >However in some lan

Re: Dates and times again

2004-03-22 Thread Nick Ing-Simmons
Larry Wall <[EMAIL PROTECTED]> writes: > >That would seem like good future proofing. Someday every computer will >have decentish subsecond timing. I hope to see it in my lifetime... It isn't having the sub-second time in the computer it is the API to get at it... > >My guess is that eventuall

Re: [PROPOSAL] C opcode and interface

2004-03-22 Thread Nick Ing-Simmons
Dan Sugalski <[EMAIL PROTECTED]> writes: >At 11:12 AM -0800 3/10/04, Brent \"Dax\" Royal-Gordon wrote: >>Dan Sugalski wrote: >>>Which, unfortunately, will end up making things a hassle, since >>>there's no platform-independent way to spawn a sub-process, dammit. >>>:( >> >>Unixen seem to support

Re: [PROPOSAL] C opcode and interface

2004-03-22 Thread Nick Ing-Simmons
Dan Sugalski <[EMAIL PROTECTED]> writes: >At 10:11 AM -0800 3/10/04, Brent \"Dax\" Royal-Gordon wrote: >>Josh Wilmes wrote: >>>It's also quite possible that miniparrot is a waste of time. I'm >>>pretty much of the opinion myself that it's an academic exercise at >>>this point, but one which keep

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Simon Wistow
On Mon, Mar 22, 2004 at 09:54:56AM -0500, Butler, Gerald said: > The important point is that the starting language must have semantics which > treat variables, object, etc. as abstract entities to be manipulated not > *memory locations* to be accessed arbitrarily. Then, the parse stage must spit >

RE: GCC for PARROT (GCC Compiling itself to PARROT, then compilin g all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Butler, Gerald
OK, I think I'm starting to get a better picture of what needs to happen. Does this sound more reasonable? Java, C#, Fortran(???), (Managed???)C++, (Other languages with appropriate non-direct memory access) ==> GCC Parser ==> Parse Tree ==> Enhanced RTL (where e

Re: Dates and times again

2004-03-22 Thread Nick Ing-Simmons
Dan Sugalski <[EMAIL PROTECTED]> writes: >In an attempt to drain the swamp... > >So far as I can see, we need, in descending order of importance (and >speed) (And if there's stuff missing, add them): > >1) A timestamp value >2) A way to chop the timestamp to pieces >3) A way to turn the timestamp

Re: z ip

2004-03-22 Thread Mark J. Reed
Juerd: your message arrived in my inbox as an attachment due to a mail server along the way not recognizing the "charset" value. It should be "utf-8" with the hyphen, not "utf8". Also for that reason all the non-ASCII characters (like the Yen symbol) came through as '?' here. > Kara Perlistoj,

Re: Funky «vector» operator

2004-03-22 Thread Mark J. Reed
On 2004-03-20 at 22:32:18, Calle Dybedahl wrote: > You don't need Unicode display « and », just plain old ISO 8859-1. > They're characters number 171 and 187 there. And AFAIK every Emacs > version released in the past ten years handles ISO-8859-1 out of the > box. It's more likely that you're usin

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Ilya Martynov wrote: There is a small typo in comment for second test case: Thanks, fixed. Plus another test and checks that I3 is really 11. leo

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Jens Rieks <[EMAIL PROTECTED]> wrote: > Hi, > On Monday 22 March 2004 13:54, Leopold Toetsch wrote: >> And P3 := overflow_args ? >> P0 := the_sub ?? >> P1 := return_continuation ? >> S0 := method_name ? > Sounds okay. Maybe its better to either alias return_continuation to the > regis

This week's Summary

2004-03-22 Thread Piers Cawley
The Perl 6 Summary for the week ending 2004-03-21 Spring is sprung, the Equinoctal gales seem to have blown themselves out, I'm a proud step grandfather and life is generally grand. "So, what's been going on in perl6-internals?" I hear you ask. Let's find out shall we? Parrot gr

Re: Optimization in context

2004-03-22 Thread Dan Sugalski
At 12:13 PM -0500 3/21/04, Mitchell N Charity wrote: Someday we will set aside our optimization focus. Our architectural validation probe will be complete. We will have established that yes, the parrot design can support the required speed. Further optimization will be seen as premature optimiz

Re: Variadic functions questions

2004-03-22 Thread Ilya Martynov
> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes: LT> Ilya Martynov wrote: >> Prints 'P3 is not NULL' LT> Yep, some minutes ago I've fixed it. Thanks for the test, I've added LT> it plus another one to CVS. There is a small typo in comment for second test case: Index: imcc/t/syn/pcc.t =

Re: Variadic functions questions

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 13:54, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > First a note: P3 is now cleared, if P15 is reached. So havin 11 args can > be distinguished from having more then 11 arguments. > > > Leo, is it easy to alias them as argc[ISPN]? > > Yes. It's the

Re: Variadic functions questions

2004-03-22 Thread Ilya Martynov
> "JR" == Jens Rieks <[EMAIL PROTECTED]> writes: JR> Hi, JR> On Monday 22 March 2004 10:44, Ilya Martynov wrote: >> Hello all, >> >> 1) First question is how to tell if variadic function recieved 11 or >> 12 or more params (for simplicity let's suppose that we use only >> pmc parameters). >>

Re: Variadic functions questions

2004-03-22 Thread Ilya Martynov
> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes: LT> Ilya Martynov <[EMAIL PROTECTED]> wrote: >> Hello all, >> 1) First question is how to tell if variadic function recieved 11 or >> 12 or more params (for simplicity let's suppose that we use only >> pmc parameters). >> According callin

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Jens Rieks <[EMAIL PROTECTED]> wrote: First a note: P3 is now cleared, if P15 is reached. So havin 11 args can be distinguished from having more then 11 arguments. > Leo, is it easy to alias them as argc[ISPN]? Yes. It's the same as aliasing C to P2. If we can agree on the variable names, this i

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Ilya Martynov wrote: Prints 'P3 is not NULL' Yep, some minutes ago I've fixed it. Thanks for the test, I've added it plus another one to CVS. leo

Re: Variadic functions questions

2004-03-22 Thread Dan Sugalski
At 12:50 PM +0100 3/22/04, Jens Rieks wrote: > ops/set.ops has setp_ind op which allows to write to register by its number but it seems there is no op to read register by its number. I had the same problem, too. That needs fixing. If you want to throw together a patch, by all means go for it. --

Re: GCC for PARROT (GCC Compiling itself to PARROT, then compiling all supported languages to PARROT from PARROT)?!?!

2004-03-22 Thread Dan Sugalski
At 11:33 AM -0500 3/20/04, Gerald E Butler wrote: Hello all, I've been investigating the possibility of creating a MACHINE DESCRIPTION (aka BACK-END) for GCC to target PARROT. My thinking is this: If a satisfactory GCC back-end targeting PARROT is created -and- PARROT is efficient enough (whic

Re: Optimizations for Objects

2004-03-22 Thread Leopold Toetsch
Piers Cawley <[EMAIL PROTECTED]> wrote: > How hard would it be to stick all continuations onto a 'weak' > continuation stack (not seen by DOD) then, during DOD, mark the freed > continuations (or the live ones). The current code is much simpler. s. void add_to_retc_free_list(Parrot_Interp, PMC*)

Re: Variadic functions questions

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 10:44, Ilya Martynov wrote: > Hello all, > > 1) First question is how to tell if variadic function recieved 11 or >12 or more params (for simplicity let's suppose that we use only >pmc parameters). > > According calling conventions (pdd03) first 11 params end up

Re: Variadic functions questions

2004-03-22 Thread Leopold Toetsch
Ilya Martynov <[EMAIL PROTECTED]> wrote: > Hello all, > 1) First question is how to tell if variadic function recieved 11 or >12 or more params (for simplicity let's suppose that we use only >pmc parameters). > According calling conventions (pdd03) first 11 params end up in P5-P15 > regi

Re: Optimizations for Objects

2004-03-22 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Dan Sugalski <[EMAIL PROTECTED]> wrote: >> Okay, as I see it there are two big things that we can do to speed >> objects up. (Well, besides speeding up the creation of continuation >> PMCs, which I am, at the moment, sorely tempted to put in a special

Re: typeof ParrotClass

2004-03-22 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Should this really print "ParrotClass": > newclass P0, "Foo" > typeof S0, P0 > print S0 > print "\n" > find_type I0, "Foo" > new P1, I0 > typeof S0, P1 > print S0 > print "\n" > end > ParrotClass > Foo

RE: Some questions about operators.

2004-03-22 Thread Paul Johnson
Austin Hastings said: > Let's look at boolean xor: > > if ($a xor $b xor $c) {...} > > should succeed only when exactly one of ($a, $b, $c) is true. I think it is generally accepted that xor is true iff an odd nnumber of its argumnets are true. -- Paul Johnson - [EMAIL PROTECTED] http://www.

Re: Optimizations for Objects

2004-03-22 Thread Leopold Toetsch
Piers Cawley <[EMAIL PROTECTED]> wrote: > Leopold Toetsch <[EMAIL PROTECTED]> writes: >> And finally: I really don't know, if a Continuation needs just pointers >> to the stacks (and to which) or (COWed) copies (to which). > If a 'single object per stack frame' approah, the continuation only > ne

Re: [perl #27833] IMCC parser chokes on empty sub

2004-03-22 Thread Leopold Toetsch
Ilya Martynov <[EMAIL PROTECTED]> wrote: > IMCC parser chokes on empty subs. Simple test case: > .sub _main > _foo() > end > .end > .sub _foo for now just insert a: noop > .end I can imagine that there are a lot of places, where at least one instruction is assumed to be in t

Variadic functions questions

2004-03-22 Thread Ilya Martynov
Hello all, 1) First question is how to tell if variadic function recieved 11 or 12 or more params (for simplicity let's suppose that we use only pmc parameters). According calling conventions (pdd03) first 11 params end up in P5-P15 registers and leftover goes into array in P3. The problem

[perl #27814] Perl6 Syntax - parrot-0.1.0 - array definition bug

2004-03-22 Thread Graciliano M. P.
# New Ticket Created by "Graciliano M. P." # Please include the string: [perl #27814] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=27814 > This syntax won't work for array definition: my @l = ('a' , 'b' , 'c') ; ##

Re: Funky «vector» operator

2004-03-22 Thread Calle Dybedahl
> "David" == David Wheeler <[EMAIL PROTECTED]> writes: > Nice to know, even though my Emacs only displays empty squares for > these characters. I have yet to figure out how to get it to properly > display Unicode You don't need Unicode display « and », just plain old ISO 8859-1. They're char

Re: Some questions about operators.

2004-03-22 Thread John Macdonald
On Sat, Mar 20, 2004 at 03:09:15PM -0500, Austin Hastings wrote: > Let's look at boolean xor: > > if ($a xor $b xor $c) {...} > > should succeed only when exactly one of ($a, $b, $c) is true. This corresponds > roughly to constructing and then collapsing a one() junction: That's not the defin

Re: Optimizations for Objects

2004-03-22 Thread Leopold Toetsch
Piers Cawley <[EMAIL PROTECTED]> wrote: > Leopold Toetsch <[EMAIL PROTECTED]> writes: >> C becomes C if only P-registers are used. Saving only >> 3 or 5 registers isn't possible yet. We have no opcodes for that. > save Pn > save Pm Well, these are already used for pushing items onto the user

Re: Optimizations for Objects

2004-03-22 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: >> Leopold Toetsch <[EMAIL PROTECTED]> writes: > >>> You seem to be mixing up different issues with that statement. Using >>> plain Continuation PMCs for returning just from subroutines was dead >>> slow, w or w/

[perl #27833] IMCC parser chokes on empty sub

2004-03-22 Thread via RT
# New Ticket Created by Ilya Martynov # Please include the string: [perl #27833] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=27833 > - IMCC parser chokes

Re: Optimizations for Objects

2004-03-22 Thread Piers Cawley
Leopold Toetsch <[EMAIL PROTECTED]> writes: > Piers Cawley <[EMAIL PROTECTED]> wrote: > >> The thing is, 'pushtop' is almost certainly the wrong thing to do. You >> should only push the registers you care about onto the register >> stacks. > > Yes: > > $ time parrot -j oofib.imc > fib(28) = 31781