Re: [perl #131492] Camelia produces different error message from commandline

2017-06-07 Thread Benjamin Goldberg via RT
On Monday, June 05, 2017 5:05 PM, Will Coleda via RT wrote: > On Fri, 02 Jun 2017 23:29:40 -0700, ben-goldb...@hotmail.com wrote: > > On #perl6 IRC, I typed this: > > > > m: my \foo = Callable but role :: { }; > > <+camelia> rakudo-moar ef9872: OUTPUT: «X::Method::NotFound exception > > produced

Re: [perl #131492] Camelia produces different error message from commandline

2017-06-07 Thread Benjamin Goldberg
On Monday, June 05, 2017 5:05 PM, Will Coleda via RT wrote: > On Fri, 02 Jun 2017 23:29:40 -0700, ben-goldb...@hotmail.com wrote: > > On #perl6 IRC, I typed this: > > > > m: my \foo = Callable but role :: { }; > > <+camelia> rakudo-moar ef9872: OUTPUT: «X::Method::NotFound exception > > produced

RE: Lessons to learn from ithreads (was: threads?)

2010-10-16 Thread Benjamin Goldberg
Date: Tue, 12 Oct 2010 23:46:48 +0100 From: tim.bu...@pobox.com To: faw...@gmail.com CC: ben-goldb...@hotmail.com; perl6-langu...@perl.org Subject: Lessons to learn from ithreads (was: threads?) On Tue, Oct 12, 2010 at 03:42:00PM +0200, Leon Timmermans wrote: On Mon, Oct 11, 2010 at

Re: Junctions Set Theory

2003-09-02 Thread Benjamin Goldberg
Luke Palmer wrote: Wow, what an old thread... Jonadab the Unsightly One writes: Abhijit A. Mahabal [EMAIL PROTECTED] writes: On the other hand, if you wanted to say true for all except exactly one value, I can't think of a way. Easy. The following two statements are

Re: [RfC] vtable-dump

2003-09-02 Thread Benjamin Goldberg
Leopold Toetsch wrote: [snip] [1] when we want to thaw/clone big structures, we should have some means to estimate the amount of needed headers. If we will not have enough, we do a DOD run before clone/thaw and then turn DOD off - it will not yield any more free headers anyway. This can avoid

PIO Questions.

2003-09-02 Thread Benjamin Goldberg
I'm looking for, but not finding, information regarding the character type and encoding on parrot io objects. As an example of why... I found this in io.ops : op write(in PMC) { PMC *p = $1; STRING *s = (VTABLE_get_string(interpreter, p)); if (s) { PIO_write(interpreter,

Re: serialisation (was Re: [RfC] vtable-dump)

2003-09-01 Thread Benjamin Goldberg
Nicholas Clark wrote: On Sat, Aug 30, 2003 at 10:13:02PM -0400, Benjamin Goldberg wrote: Nicholas Clark wrote: The attacker can craft a bogus CGITempFile object that refers to any file on the system, and when this object is destroyed it will attempt to delete that file

Re: [RfC] vtable-dump

2003-09-01 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: class freezer { class thawer { class cloner { [ big snip ] Do you expect that these are overridden by some languages using parrot? I.e. that ponie tries to implement a freezer that writes output

Re: [RfC] vtable-dump

2003-08-31 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: Actually, I think the following interface would be better: void freeze(PMC *freezer); void thaw (PMC *thawer); I'm thinking of (in horrible pseudo code ;-): [snip] Above functionality does IMHO match your

Re: serialisation (was Re: [RfC] vtable-dump)

2003-08-31 Thread Benjamin Goldberg
Nicholas Clark wrote: On Fri, Aug 29, 2003 at 05:30:37PM +0200, Leopold Toetsch wrote: I think, we need a general solution for freeze, dump and clone. As shown I don't know if this is relevant here, but I'll mention it in case. For perl5 there isn't a single good generic clone system.

Re: lvalue cast warnings

2003-08-31 Thread Benjamin Goldberg
Leopold Toetsch wrote: Nicholas Clark [EMAIL PROTECTED] wrote: -#define PMC_sub(pmc) ((parrot_sub_t)((pmc)-cache.pmc_val)) +#define PMC_sub(pmc) (*((parrot_sub_t *)((pmc)-cache.pmc_val))) This seems to work. Thanks for the patch. (the tcc tinderbox seems to be missing a make

Re: [RfC] vtable-dump

2003-08-30 Thread Benjamin Goldberg
Dan Sugalski wrote: On Fri, 29 Aug 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: I think we'd be better served getting the freeze/thaw stuff in and We were just discussing this in the f'up. I read those, but I wanted to make sure the discussion went this way. :)

Re: [RfC] constant PMCs and classes

2003-08-29 Thread Benjamin Goldberg
Leopold Toetsch wrote: We currently have constant Key and Sub PMCs both created from the packfile at load time. They live in the constant_table pointing to a constant PMC pool. But we need more. We have allover the core code like this: string_from_cstring(interpreter, pIt, 0)

Re: [RfC] constant PMCs and classes

2003-08-29 Thread Benjamin Goldberg
Juergen Boemmels wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Benjamin Goldberg [EMAIL PROTECTED] wrote: #define PARROT_DECLARE_STATIC_STRING(name, cstring) \ [ big snip ] While Juergen's original or your proposal are fine, they don't work (or not as proposed). First

Re: What the heck is active data?

2003-08-29 Thread Benjamin Goldberg
Dan Sugalski wrote: I've talked about this before and generally I've assumed that people know what I'm talking about, but that's not true anymore, so an explanation of this is in order. Active Data is data that takes some active role in its use--reading, writing, modifying, deleting, or

Re: What the heck is active data?

2003-08-29 Thread Benjamin Goldberg
Piers Cawley wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: [snip] Reading or writing from the hash does a lookup in the backing database and reads or writes from it. A handy thing, with the variable getting in the way of reads or writes to itself. However, you can do this with plain

Re: [RfC] constant PMCs and classes

2003-08-26 Thread Benjamin Goldberg
Juergen Boemmels wrote: Leopold Toetsch wrotes: We currently have constant Key and Sub PMCs both created from the packfile at load time. They live in the constant_table pointing to a constant PMC pool. But we need more. We have allover the core code like this:

Re: String API

2003-08-25 Thread Benjamin Goldberg
Dan Sugalski wrote: At 12:07 AM -0400 8/19/03, Benjamin Goldberg wrote: There are a number of shortcomings in the API, which I'd like to address here, and propose improvments for. You're conflating language level strings with low-level strings. Don't. STRINGs, the parrot structure

Applying regexen/grammars to foo objects (was Re: String API)

2003-08-25 Thread Benjamin Goldberg
Gordon Henriksen wrote: Now, I don't really have much of an opinion on compound strings in general. I do want to address one particular argument, though—the lazily slurped file string. On Thursday, August 21, 2003, at 07:22 , Benjamin Goldberg wrote: A foolish question: can you imagine

Re: Applying regexen/grammars to foo objects (was Re: String API)

2003-08-25 Thread Benjamin Goldberg
Gordon Henriksen wrote: Benjamin Goldberg wrote: Gordon Henriksen wrote: [snip] [3] Unshift hack #1: Where commit appears in the above, exit the grammar, trim the beginning of the string, and re-enter. (But that forces the grammar author to discard the regex state, whereas commit

Re: Embedding Parrot in Perl

2003-08-25 Thread Benjamin Goldberg
Luke Palmer wrote: I started working on some XS code for embedding a Parrot interpreter in Perl. I ran into a few problems: 1) I don't know XS :-) (good way to learn, though) 2) What do I put as stacktop in Parrot_init()? I can't just use a local variable in the

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-24 Thread Benjamin Goldberg
Gordon Henriksen wrote: Taking a thread from Perl 6 Internals. Will Perl 6 support this behavior? $ perl 'EOT' my @ary; my $ref = \$ary[0]; $$ref = value; print '$ary[0] : ', $ary[0], \n; EOT

Re: [CVS ci] PackFile-15: print warning location

2003-08-24 Thread Benjamin Goldberg
Robert Spier wrote: The HLL doesn't know, how many ops one source line will need. Not *normally*, but if it's including code which is already literal assembler, it does: Imagine a version of lex/yacc wherein the the blocks of code you give are imcc or pasm (instead of C). Clearly,

Re: Method call parameters

2003-08-24 Thread Benjamin Goldberg
Togos wrote: What's the reasoning behind putting the object a method is being called on in P2 instead of in the first parameter of the method? I have a feeling that putting it as the first parameter of the method would make the lives of the python folks a little bit easier. Would it make

Re: Weak References?

2003-08-24 Thread Benjamin Goldberg
Gordon Henriksen wrote: On Saturday, August 23, 2003, at 08:17 , Benjamin Goldberg wrote: The reason this is safe to do is because it's *only* created by the dod, Allocating memory during garbage collection? Why not? Or at least, why not for sys_mem_allocate()d memory? -- $a=24

Re: Weak References?

2003-08-24 Thread Benjamin Goldberg
Dan Sugalski wrote: At 9:27 PM -0400 8/21/03, Benjamin Goldberg wrote: I would like for Parrot to have some way of creating Weak References; I think that this is probably a vital feature. No, it isn't, and we've discussed this before. (You were involved, as I recall) Weak references can

Re: Weak References?

2003-08-24 Thread Benjamin Goldberg
I dislike replying to myself, however, it seems I haven't been clear enough in describing how I think this (c|sh)ould be implemented. Let's abstract DoD to the following psuedocode: function markalive(p) { if(!p.is_alive) interpreter-dod_queue.enqueue(p); } for p in all

Re: [CVS ci] PackFile-15: print warning location

2003-08-24 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: In other words, setline and setfile ops in source don't translate to actual ops in the bytecode, but instead translate to additions/changes to the debugging segment? Exactly. (+ Csetpackage, which isn't done yet

Re: [CVS ci] PackFile-15: print warning location

2003-08-24 Thread Benjamin Goldberg
Juergen Boemmels wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: Normal processors also don't have setline and setfile operations. They use an extra segment in the *.o file, which is only used by the debugger. This could also be done in parrot. In other words, setline

Re: Weak References?

2003-08-24 Thread Benjamin Goldberg
Juergen Boemmels wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: But suppose that at the end of DoD, the object we're weakly referring to gets marked as alive? Now, we would need to look through that object's list of destroy-functions, and remove all of the weakref-callbacks

Re: Should I target Parrot?

2003-08-22 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: inline op mthread_create(inconst INT) { opcode_t *dest = PTR2OPCODE_T(CUR_OPCODE + $1)); PMC * p = new_ret_continuation_pmc(interpreter, dest) Please note that the ret_continuation is intended

Re: Should I target Parrot?

2003-08-22 Thread Benjamin Goldberg
Michal Wallace wrote: On Thu, 21 Aug 2003, Benjamin Goldberg wrote: I hope you aren't planning on serializing just a single isolated microthread... that wouldn't work well with what I've got in mind due to how much stuff comes along when you serialize a continuation -- you'd get

Re: Weak References?

2003-08-22 Thread Benjamin Goldberg
Juergen Boemmels wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: I would like for Parrot to have some way of creating Weak References; I think that this is probably a vital feature. The way I envision this is as follows. The following typedef and new function would be added

Re: Weak References?

2003-08-22 Thread Benjamin Goldberg
Juergen Boemmels wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: I would like for Parrot to have some way of creating Weak References; I think that this is probably a vital feature. The way I envision this is as follows. The following typedef and new function would be added

cancel 3F46B0AD.F217054@hotpop.com

2003-08-22 Thread Benjamin Goldberg
This message was cancelled from within Mozilla.

Re: [CVS ci] PackFile-15: print warning location

2003-08-22 Thread Benjamin Goldberg
Juergen Boemmels wrote: Leopold Toetsch [EMAIL PROTECTED] writes: Further: The Csetline and Csetfile opcodes are suboptimal, they impose runtime penalty on each run core, so they will go finally. The Cgetline and Cgetfile can map to the functionality used in warnings.c. Normal

Re: String API

2003-08-21 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg wrote: Leopold Toetsch wrote: Not having an INTERP argument severely limits us, even in other ways. The INTERP argument is fine. The user defined encoding is/was my problem. As in, you think we shouldn't have any, at all? Similarly

Re: Should I target Parrot?

2003-08-21 Thread Benjamin Goldberg
Tom Locke wrote: OK, here's what I'm hoping Parrot can provide for the language I'm building. My big requirement is for lightweight microthreads (hopefully *very* lightweight - I'm considering one scheduler that can handle *millions* of threads on a single machine). Hmm, I can envision

Weak References?

2003-08-21 Thread Benjamin Goldberg
I would like for Parrot to have some way of creating Weak References; I think that this is probably a vital feature. The way I envision this is as follows. The following typedef and new function would be added: typedef void (*pobject_died_cb)(INTERP, PMC* who_asked, Pobj* weakref, void

Re: [PATCH 2]Build system

2003-08-21 Thread Benjamin Goldberg
Juergen Boemmels wrote: Vladimir Lipskiy [EMAIL PROTECTED] writes: [...] sub runstep { my $inc = 'include/parrot'; my @headers=( sort map { m{\./$inc/(.*)} } glob ./$inc/*.h ); in a non clean tree the generated files are picked up

Re: PerlHash.get_pmc_keyed of non existing key

2003-08-21 Thread Benjamin Goldberg
Leopold Toetsch wrote: IMHO is $a = \$h{a}; print $$a; $$a = xxx\n; $a = $h{a}; print $a; the same as: new P1, .PerlHash set P0, P1[a] print P0 set P0, xxx\n set P2, P1[a] print P2 end (PMCs have reference semantics[1]) Shouldn't that

Re: Timely Destruction: An efficient, complete solution

2003-08-20 Thread Benjamin Goldberg
Dave Mitchell wrote: On Sun, Aug 17, 2003 at 05:48:14AM -0600, Luke Palmer wrote: Here comes that ever-reincarnating thread again, sorry. This is a proposal for an efficient solution to the timely destruction problem, which doesn't use refcounting, and fits in to the current scheme

Re: String API

2003-08-20 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: There are a number of shortcomings in the API, which I'd like to address here, and propose improvments for. To allow user-defined encodings

Re: Timely Destruction: An efficient, complete solution

2003-08-20 Thread Benjamin Goldberg
Dave Mitchell wrote: On Wed, Aug 20, 2003 at 06:40:51PM -0400, Benjamin Goldberg wrote: Dave Mitchell wrote: On Sun, Aug 17, 2003 at 05:48:14AM -0600, Luke Palmer wrote: Here comes that ever-reincarnating thread again, sorry. This is a proposal for an efficient solution

Re: String API

2003-08-19 Thread Benjamin Goldberg
Luke Palmer wrote: Benjamin Goldberg writes: [snip] 9/ New ops which provide access to the string iterator API. Yes. What is going to be used to store an iterator. An I reg, a P reg? If it's a PMC, would it be possible to just implement the iterator itself as a PMC, and use

Re: String API

2003-08-19 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: There are a number of shortcomings in the API, which I'd like to address here, and propose improvments for. To allow user-defined encodings, and user-defined transcoding, (written in parrot) the first parameter of all

Re: String API

2003-08-19 Thread Benjamin Goldberg
Tim Bunce wrote: On Tue, Aug 19, 2003 at 12:07:22AM -0400, Benjamin Goldberg wrote: There are a number of shortcomings in the API, which I'd like to address here, and propose improvments for. Just to be sure people are keeping it in mind, I'll repost this from Larry: On Wed, Jan 30

Re: What the heck is: timely destruction

2003-08-18 Thread Benjamin Goldberg
Michael G Schwern wrote: [snip stuff, including a mention of refcounting and it's (dis)advantages] So Parrot is going with something else. Don't ask me what it is, I don't know. Parrot will do it like Java -- a mark-and-sweep garbage collector -- with the difference that garbage collection

String API

2003-08-18 Thread Benjamin Goldberg
There are a number of shortcomings in the API, which I'd like to address here, and propose improvments for. Not so much the string_* functions, but rather with how they work (the encoding API, the transcoding functions). To allow user-defined encodings, and user-defined transcoding, (written in

Re: Parrot 0.1.0 -- what's left?

2003-08-18 Thread Benjamin Goldberg
Steve Fink wrote: In light of the insane amount of work that's gone into Parrot recently, I'd say it's about time to cut another release. What else would people like to slip in? This is not a freeze announcement yet -- I want to know what people think of the state of things they're working

Re: set vs. assign, continued: 'add' vs. 'add!'

2003-08-17 Thread Benjamin Goldberg
Benjamin Goldberg wrote: Brent Dax wrote: TOGoS: # When I say in IMCC: # # $P0 = $P1 + $P2 # # , I expect it to create a new value and store it in # $P0, not give me a segfault because I didn't say # # $P0 = new figure out what the heck type # $P0 is supposed

Re: there's no undef!

2003-08-17 Thread Benjamin Goldberg
Michal Wallace wrote: Uh-oh. I just went to implement del x and there's no op to remove a variable from a lexical pad! :) Why would you want to remove a variable from a lexical pad? Surely the right thing to do would be to create a new pad (scope), then add your 'x' variable which you

Re: Calling parrot from C?

2003-08-17 Thread Benjamin Goldberg
Togos wrote: --- Sean O'Rourke [EMAIL PROTECTED] wrote: Luke Palmer [EMAIL PROTECTED] writes: How does one call a parrot Sub from C and get the I'd vote for stuffing args into the interpreter, calling the sub's invoke() method, then digging through the registers to pull

Re: Timely Destruction: An efficient, complete solution

2003-08-17 Thread Benjamin Goldberg
Luke Palmer wrote: Here comes that ever-reincarnating thread again, sorry. This is a proposal for an efficient solution to the timely destruction problem, which doesn't use refcounting, and fits in to the current scheme pretty well. It is based on the fact that 90% of the time (or

Re: set vs. assign, continued: 'add' vs. 'add!'

2003-08-17 Thread Benjamin Goldberg
Luke Palmer wrote: Benjamin Goldberg writes: Hmm... I just thought of something. Since 'set' semantics can be easily simulated when we have only ops for 'assign' semantics, maybe imcc itself could do this for us. That is, by default, $P0 = $P1 + $P2 will be translated by imcc

Re: there's no undef!

2003-08-17 Thread Benjamin Goldberg
Michal Wallace wrote: On Sun, 17 Aug 2003, Benjamin Goldberg wrote: Michal Wallace wrote: Uh-oh. I just went to implement del x and there's no op to remove a variable from a lexical pad! :) Why would you want to remove a variable from a lexical pad? Surely the right

Re: set vs. assign, continued: 'add' vs. 'add!'

2003-08-15 Thread Benjamin Goldberg
Brent Dax wrote: TOGoS: # When I say in IMCC: # # $P0 = $P1 + $P2 # # , I expect it to create a new value and store it in # $P0, not give me a segfault because I didn't say # # $P0 = new figure out what the heck type # $P0 is supposed to be based # on

Re: [PATCH] Win32 env.pmc fixes

2003-08-15 Thread Benjamin Goldberg
In the second chunk of the patch [classes/env.pmc], what is free_it set to if the else branch is taken? IOW, I think you should have free_it initialized to 0 when you declare it. In the last part of the patch [config/gen/platform/win32.c], why do you set *free_it to 0 even when you return NULL?

perlnum.pmc

2003-08-14 Thread Benjamin Goldberg
Shouldn't the get_number() method use string_from_num, instead of calling sprintf/snprintf? -- $a=24;split//,240513;s/\B/ = /for@@=qw(ac ab bc ba cb ca );{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print [EMAIL PROTECTED] ]\n;((6=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))redo;}

Re: Packfile stuff

2003-08-14 Thread Benjamin Goldberg
Luke Palmer wrote: Leopold Toetsch writes: Juergen Boemmels [EMAIL PROTECTED] wrote: what still fails is pbc2c.pl (This needs Parrot::Packfile, which can only read format 0 (old assemble.pl) bytecodes). This is obsoleted by Daniel's exec patches. Sadly. I mean, the exec

pmc.c ([constant_]pmc_new_noinit)

2003-08-14 Thread Benjamin Goldberg
In pmc_new_noinit, I see a switch() which decides whether or not to do add_pmc_ext. Why not have that information (whether or not an ext is needed) defined in each of the .pmc files, and stuck in the vtable? That would allow other cache-only pmcs to avoid getting an unnecessary chunk of bytes

Re: Perl 6's for() signature

2003-08-14 Thread Benjamin Goldberg
Jonadab The Unsightly One wrote: John Siracusa [EMAIL PROTECTED] writes: Did this ever get resolved to anyone's satisfaction? While reading EX6, I found myself wonder exactly what for() would look like in Perl 6 code... A for loop[1] is basically syntax sugar for a while loop. In

Re: Set vs. Assign..?

2003-08-14 Thread Benjamin Goldberg
Having read this thread, I think that the real problem is not just that there are multiple assignment semantics -- it's that the names set and assign are not really meaningful -- that is, they *look* to english speakers as if they are synonyms... their names alone aren't enough info to know what

Re: [perl #23276] Prefixing #define names

2003-08-14 Thread Benjamin Goldberg
Michael G Schwern wrote: On Mon, Aug 11, 2003 at 01:45:35AM -0700, Ask Bjoern Hansen wrote: We totally need to have Parrot running on this thing when it comes out. :-) http://www.xgamestation.com/ Great idea, shame the hardware is crap. :( Third-generation Motorola 68HCS12

Re: Set vs. Assign..?

2003-08-14 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: I would suggest the opnames/categories mutate, alias, and create. IMHO, we could leave PASM syntax as it is and create opcode aliases inside

Re: #define name collisions -- yet another small project

2003-08-14 Thread Benjamin Goldberg
Dan Sugalski wrote: Well, it turns out that at least some compilers (AIX's) are really unhappy about redefined #defines in the C source. This turns out to be a problem with things like HAS_STDLIB_H, which is common enough to cause collisions. So, we need to go name-prefix all the #defines.

Re: QUERIES: Questions about Unanswered Elderly or Recent Issues Eventually Solvable

2003-08-14 Thread Benjamin Goldberg
Dan Sugalski wrote: At 11:06 AM +0200 8/8/03, Leopold Toetsch wrote: [snip] PMC methods --- ParrotIO has methods via find_method/invoke. Should that be a general mechanism in default.pmc with one vtable slot for the meth hash? We're going to want lexially nested method caches, so

Re: assign opcodes

2003-08-11 Thread Benjamin Goldberg
Brent Dax wrote: TOGoS: # Personally, I would like = to mean 'set', and # maybe - do 'assign'. I usually think of registers as variables with fixed names, so the Perl 6 part of my brain suggests: $P0 = $P1 #assign $P0 := $P1 #set Which is why I suggested,

Re: parrot bug: continuations/multiple return

2003-08-10 Thread Benjamin Goldberg
Michal Wallace wrote: [snip] def f(): return g() [snip] # f from line 3 .pcc_sub _sub1 non_prototyped .local object res1# (visitReturn:528) find_lex $P2, 'g' # (callingExpression:325) newsub $P3, .Continuation, ret0#

Re: parrot bug: continuations/multiple return

2003-08-10 Thread Benjamin Goldberg
Michal Wallace wrote: Benjamin Goldberg wrote: Michal Wallace wrote: [snip] Also... why is $P2 merely an imcc temporary, without a real name? That is, why not do: .pcc_sub _sub1 non_prototyped .local object sub1 find_lex sub1, 'g' .pcc_begin non_prototyped

Re: Set vs. Assign..?

2003-08-09 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: I would suggest the opnames/categories mutate, alias, and create. IMHO, we could leave PASM syntax as it is and create opcode aliases inside the assembler ... You mean leave the old ops with their names, but merely

Re: assign opcodes

2003-08-09 Thread Benjamin Goldberg
Togos wrote: Anyway: assign Px, {Iy,Sy,Ny} are not needed IMHO, these end up as set_type_native and are identical to set Px, {Iy,Sy,Ny}. Yes, but as we were discussing in the Set vs. Assign thread, it makes more sense to call them 'assign', as it morphs the existing value

Re: assign opcodes

2003-08-09 Thread Benjamin Goldberg
Leopold Toetsch wrote: I hopefully got the semantics of assign Px,Py right now. The LHS gets the value of RHS, eventually morphing itself to the source type. Anyway: assign Px, {Iy,Sy,Ny} are not needed IMHO, these end up as set_type_native and are identical to set Px,

set_pmc vs clone?

2003-08-09 Thread Benjamin Goldberg
What's the difference between VTABLE_set_pmc and VTABLE_clone? -- $a=24;split//,240513;s/\B/ = /for@@=qw(ac ab bc ba cb ca );{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print [EMAIL PROTECTED] ]\n;((6=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))redo;}

Re: Infant mortality

2003-08-07 Thread Benjamin Goldberg
Juergen Boemmels wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: [snip] Except that generational_dod_helper is much simpler and faster -- it doesn't mark anything as alive or free, it only adjusts the generation of those pmcs that were created in C functions which we have since

Re: Infant mortality

2003-08-04 Thread Benjamin Goldberg
Juergen Boemmels wrote: Benjamin Goldberg [EMAIL PROTECTED] writes: I was recently reading the following: http://www.parrotcode.org/docs/dev/infant.dev.html It's missing some things. One of which is the (currently used?) way of preventing infant mortality: anchor right away

Re: Infant mortality

2003-08-04 Thread Benjamin Goldberg
Having applied a bit more thought, having the generation field as part of the PMC isn't all that great -- it makes PMCs larger, but it's really only needed for new/neonate pmcs. Instead of attatching the generation directly to the pmc, have a global (per-interpreter) stack of neonate pmcs. Each

Re: string.c questions

2003-08-03 Thread Benjamin Goldberg
Luke Palmer wrote: Benjamin Golberg writes: Actually, these are mostly questions about the string_str_index function. Uh oh... I've some questions about bufstart, strstart, bufused, strlen and encoding-characters? In string_str_index_multibyte, the lastmatch variable is

Re: string.c questions

2003-08-03 Thread Benjamin Goldberg
Leopold Toetsch wrote: Benjamin Goldberg [EMAIL PROTECTED] wrote: Also, although we're told at the top of string.c to not look at s-bufstart or s-buflen, I'd like to know if we are allowed to assume/assert that for all strings, the following is true: s-encoding-skip_forward( s

Ultra bootstrapping :)

2003-08-03 Thread Benjamin Goldberg
Considering that parrot is now emitting an executable (on some platforms)... and IIRC, C will be one of the languages we plan to have parrot support for... will parrot be able to compile itself? :) -- $a=24;split//,240513;s/\B/ = /for@@=qw(ac ab bc ba cb ca );{push(@b,$a),($a-=6)^=1 for

Infant mortality

2003-08-03 Thread Benjamin Goldberg
I was recently reading the following: http://www.parrotcode.org/docs/dev/infant.dev.html It's missing some things. One of which is the (currently used?) way of preventing infant mortality: anchor right away, or else turn off DoD until the new object isn't needed. This document doesn't

Re: As soon as she walked through my door...

2003-08-03 Thread Benjamin Goldberg
Miko O Sullivan wrote: Congratulations to Damian on a great opening in Ex 6. Anybody can spoof the classic detective novel setup, but it takes real talent to have it actually make sense in the context of a technical document. How long till Ex 6 is online, for those of us who weren't there?

string.c questions

2003-08-02 Thread Benjamin Goldberg
Actually, these are mostly questions about the string_str_index function. I've some questions about bufstart, strstart, bufused, strlen and encoding-characters? I *think* that -characters is a fuction which gets passed a pointer to the start of a buffer, and the number of bytes in the buffer,

rx.ops

2003-08-02 Thread Benjamin Goldberg
Since I don't see anything to save/restore the instack on subroutine calls, I am wondering what happens if a regex has a (?{ CODE }), and that CODE calls a regex. Are we garunteed that after a regex completes (either succeeds or fails) that the intstack is in the same state it started? If not

Re: Macro arguments themselves

2003-08-02 Thread Benjamin Goldberg
Larry Wall wrote: [snip] Nope. $x and $p are syntax trees. blink Macros are passed syntax trees as arguments, but return coderefs? That's... odd. I would expect that a macro would be expected to *return* a syntax tree... which could then undergo (more) macro-expansion. Sortof like how in

Re: approaching python

2003-08-01 Thread Benjamin Goldberg
Joseph F. Ryan wrote: Benjamin Goldberg wrote: Joseph Ryan wrote: Benjamin Goldberg wrote: [snip] Hmm... If imcc is smart enough, (or perhaps I should say, when the flow control is simple/clear enough) it should be able to see when a value is pushed onto the stack, and later popped off

Re: approaching python

2003-08-01 Thread Benjamin Goldberg
Benjamin Goldberg wrote: [snip] If someone's code emits something like: save $P1 restore $P2 Then IMCC should be able to optimize that to: $Ptemp = $P1 $P2 = $Ptemp Actually, that (sometimes) should be able to be changed to: $P2 = $P1 noop or: noop

Re: [perl #23039] [PATCH] event handling-2

2003-08-01 Thread Benjamin Goldberg
Leopold Toetsch wrote: OK here it is. Again the description for the record: 1) Initialization: - normal core: build op_func_table with all opcode #4 [1] - CG core: build ops_addr[] filled with this opcode - prederef cores: build a list of (backward) branch instructions

Re: approaching python

2003-07-27 Thread Benjamin Goldberg
K Stol wrote: - Original Message - From: Michal Wallace [EMAIL PROTECTED] To: Luke Palmer [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, July 24, 2003 12:01 PM Subject: Re: approaching python On 24 Jul 2003, Luke Palmer wrote: Klass-Jan Stol

Slightly foolish question... :)

2003-07-24 Thread Benjamin Goldberg
What kind of semantics do we want for perl6, if we have: my $fh1 = fdopen( $n ); do { my $fh2 = fdopen( $n ); }; # is $fh1 valid or not at this point? For that matter, what about: for(1..2) { my $fh = fdopen( $n ); # does this succed the second time? } Should

Re: approaching python

2003-07-24 Thread Benjamin Goldberg
K Stol wrote: - Original Message - From: Michal Wallace [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 4:48 PM Subject: approaching python Hey all, I've been thinking about the compiling python to parrot concept. Right now it looks like the

Re: Events

2003-07-23 Thread Benjamin Goldberg
Dan Sugalski wrote: [snip] Here's what we *are* doing. We are going to do all I/O under the hood asynchronously. Completed async IO puts an event in the event queue. We are going to have a single unified event queue. All IO, timer, signal, and UI events go in it. All of 'em. We aren't

Re: The Perl 6 Summary -- preprocessors

2003-07-23 Thread Benjamin Goldberg
Luke Palmer wrote: grammar Grammars::Languages::C::Preprocessor { rule CompilationUnit { ( Directive | UnprocessedStuff )* } rule Directive { Hash ( Include | Line | Conditional | Define ) Continuation* } rule

Re: [perl #23025] [PATCH] env.t doesn't test the env ops on solaris (and others)

2003-07-23 Thread Benjamin Goldberg
Lars Balker Rasmussen wrote: # New Ticket Created by Lars Balker Rasmussen # Please include the string: [perl #23025] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=23025 There's no reason to test for the

Re: Small perl task for the interested

2003-07-19 Thread Benjamin Goldberg
Josh Wilmes wrote: At 12:48 on 07/14/2003 +0200, Lars Balker Rasmussen [EMAIL PROTECTED] wrote: I've taken this very simple approach to the problem. A perl-wrapper for the CC lines in makefiles/root.in .c$(O) : $(PERL) tools/dev/cc_flags.pl $(CC) $(CFLAGS) ${cc_o_out}$@

Re: Events

2003-07-18 Thread Benjamin Goldberg
Damien Neil wrote: [snip] Also, given that asynchronous IO is a fairly unpopular programming technique these days (non-blocking event-loop IO and blocking threaded IO are far more common), I would think long and hard before placing support for it as a core design goal of the VM. If there is

Re: Aliasing an array slice

2003-07-18 Thread Benjamin Goldberg
David Storrs wrote: Thinking about it, I'd rather see lvalue slices become a nicer version of Csplice(). my @start = (0..5); my @a = @start; @a[1..3] = qw/ a b c d e /; print @a; # 0 a b c d e 4 5 What would happen if I used 1,2,3 instead of 1..3? Would it do

Re: Aliasing an array slice

2003-07-18 Thread Benjamin Goldberg
Luke Palmer wrote: David Storrs wrote: Thinking about it, I'd rather see lvalue slices become a nicer version of Csplice(). my @start = (0..5); my @a = @start; @a[1..3] = qw/ a b c d e /; print @a; # 0 a b c d e 4 5 What would happen if I

Re: Aliasing an array slice

2003-07-18 Thread Benjamin Goldberg
Dave Whipp wrote: Luke Palmer wrote: Benjamin Goldberg wrote: David Storrs wrote: @a[1..3] = qw/ a b c d e /; print @a; # 0 a b c d e 4 5 What would happen if I used 1,2,3 instead of 1..3? Would it do the same thing? Of course. I tend to agree, I think

Re: [WIP PATCH] core.ops split-up

2003-07-18 Thread Benjamin Goldberg
With this increase in the number of files, I'm going to ask for something I've thought of for a while, but not had the guts to ask for. Could we try and clean up the parrot/ directory? Specifically, I'd like all of the source code itself moved into a single subdirectory, leaving at the toplevel

  1   2   >