A serious stab at regexes

2001-11-04 Thread Brent Dax
Okay, this bunch of ops is a serious attempt at regular expressions. I had a discussion with japhy on this in the Monastery (http://www.perlmonks.org/index.pl?node_id=122784), and I've come up with something flexible enough to actually (maybe) work. Attached is a patch to modify core.ops and add

Re: Yet another switch/goto implementation

2001-11-04 Thread Michael Fischer
On Nov 04, Daniel Grunblatt <[EMAIL PROTECTED]> took up a keyboard and banged out > First of all you miss typed: > -if ($c{do_opt_t} eq 'goto' and $c{cc} !~ /gcc/i ) { > +if ($c{do_op_t} eq 'goto' and $c{cc} !~ /cc/i ) { hmm. Thats not what my diff has. Point is, if you chose 'goto', $c{cc} /isn'

RE: [Patch] Win32 Parrot_floatval_time Improved (1/1)

2001-11-04 Thread Richard J Cox
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Brent Dax) wrote: > Richard J Cox: > # Firstly, 8am code this morning builds on Win32 without > # problem, other than > # configure.pl not knowing that link is the linker (which > # appears to be down > # to ActiveState not knowing). > > Does it

Win32 build and WINVER

2001-11-04 Thread Richard J Cox
Currently for a Win32 build WINVER is not being set, this leads to it being set in Windef.h (included by Windows.h) to 0x0500, or "build for Windows 2000". This is OK, until (for whatever) reason a Win2k only API is called, at which point the built exe will not run on earlier versions of Windo

Revised yet another goto/switch...etc.

2001-11-04 Thread Michael Fischer
Ok, thanks to Daniel Grunblatt for pointing out the obvious mis-adjustment of #including... That bit is fixed, and low, a whopping less-than-%10 improvement in speed with the switch() version of DO_OP. Hmm. OTOH, my implementation of goto, based on Paolo's post back when, is clearly broken in so

FW: Compiler Warnings? (1/1)

2001-11-04 Thread Brent Dax
The patch attached is courtesy of Richard J. Cox. It fixes the VC++ warnings about functions declared to return a value but not actually returning one. I'll apply it in a couple hours if there aren't any objections. --Brent Dax [EMAIL PROTECTED] Configure pumpking for Perl 6 When I take action

Re: [PATCH] Computed goto, super-fast dispatching.

2001-11-04 Thread Daniel Grunblatt
Yes, you are right on that, but that is only on linux, not on *BSD (where I tried it). I still don't know why is these, Can you try using gcc 3.0.2? For the compiled version, please read both mops.c you will see there is no difference except for the definition of the array which if no missing som

Re: vmem memory manager

2001-11-04 Thread Benoit Cerrina
> > dan at his recent talk at boston.pm's tech meeting said he was leaning > towards a copying GC scheme. this would be the split ram in half design > and copy all objects to the other half at CG time. the old half is > reclaimed (not even reclaimed, just ignored!) in one big chunk. > This schemes

Re: Opcode numbers

2001-11-04 Thread Dan Sugalski
At 09:57 PM 11/3/2001 -0500, Brian Wheeler wrote: >On Sat, 2001-11-03 at 21:40, Gregor N. Purdy wrote: > > > > None of these are issues with the approach I've been working on / > > advocating. I'm hoping we can avoid these altogether. > > > > >I think this is a cool concept, but it seems like a lo

Re: Yet another switch/goto implementation

2001-11-04 Thread Dan Sugalski
At 12:19 PM 11/4/2001 -0500, Michael Fischer wrote: >On Nov 04, Daniel Grunblatt <[EMAIL PROTECTED]> took up a keyboard >and banged out > > First of all you miss typed: > > -if ($c{do_opt_t} eq 'goto' and $c{cc} !~ /gcc/i ) { > > +if ($c{do_op_t} eq 'goto' and $c{cc} !~ /cc/i ) { > >hmm. Thats no

Re: [PATCH] Computed goto, super-fast dispatching.

2001-11-04 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Daniel Grunblatt <[EMAIL PROTECTED]> wrote: > All: > Here's a list of the things I've been doing: > > * Added ops2cgc.pl which generates core_cg_ops.c and core_cg_ops.h from > core.ops, and modified Makefile.in to use it. In core_cg_ops.c resides >

RE: [perl6]RE: Helping with configure

2001-11-04 Thread Dan Sugalski
At 10:36 PM 11/3/2001 -0800, Brent Dax wrote: >Well, for now we're using Perl for Configure, but that won't be possible >in the final version. Nasty bootsrapping issues with that. :^) You'd be surprised... :) Seriously, miniparrot, enough to do simple file ops, spawn external programs and che

Regex helper opcodes

2001-11-04 Thread Dan Sugalski
While I'm not going to dive too deep into regexes (I like what little sanity I have left, thanks :), here are a few opcodes I've been thinking of for making REs faster: =begin proposed_opcodes =item makebitlist sx, sy Makes the string in X a bitmap, with one bit set in it for each character

Re: Win32 build and WINVER

2001-11-04 Thread Dan Sugalski
At 05:26 PM 11/4/2001 +, Richard J Cox wrote: >This of course leads to the question of what is the earliest Win32 version >that Perl6 will support? Currently, I don't want to promise back before Win98, though if Win95 is no different from a programming standpoint (I have no idea if it is) th

Re: Yet another switch/goto implementation

2001-11-04 Thread Daniel Grunblatt
On Sun, 4 Nov 2001, Michael Fischer wrote: > On Nov 04, Daniel Grunblatt <[EMAIL PROTECTED]> took up a keyboard and banged >out > > First of all you miss typed: > > -if ($c{do_opt_t} eq 'goto' and $c{cc} !~ /gcc/i ) { > > +if ($c{do_op_t} eq 'goto' and $c{cc} !~ /cc/i ) { > > hmm. Thats not wh

Re: vmem memory manager

2001-11-04 Thread Dan Sugalski
At 07:34 PM 11/4/2001 +0100, Benoit Cerrina wrote: > > > > dan at his recent talk at boston.pm's tech meeting said he was leaning > > towards a copying GC scheme. this would be the split ram in half design > > and copy all objects to the other half at CG time. the old half is > > reclaimed (not ev

Re: Revised yet another goto/switch...etc.

2001-11-04 Thread Michael Fischer
And now, with the patch Michael -- Michael Fischer 7.5 million years to run [EMAIL PROTECTED]printf "%d", 0x2a; -- deep thought diff -ur parrot/Configure.pl dispatcher-11-04/Configure.pl --- parro

RE: Regex helper opcodes

2001-11-04 Thread Brent Dax
Dan Sugalski: # While I'm not going to dive too deep into regexes (I like what little # sanity I have left, thanks :), here are a few opcodes I've Oh, c'mon, they're not that bad. It's basically just "if this works, do the next thing, otherwise go back and do some stuff over". "Do some stuff ov

Re: Yet another switch/goto implementation

2001-11-04 Thread Michael Fischer
On Nov 04, Daniel Grunblatt <[EMAIL PROTECTED]> took up a keyboard and banged out > > > On Sun, 4 Nov 2001, Michael Fischer wrote: > > > On Nov 04, Daniel Grunblatt <[EMAIL PROTECTED]> took up a keyboard and >banged out > > > I really suggest that you do a do_op.c and a do_op.h and that you c

RE: [perl6]RE: Helping with configure

2001-11-04 Thread Brent Dax
Dan Sugalski: # At 10:36 PM 11/3/2001 -0800, Brent Dax wrote: # >Well, for now we're using Perl for Configure, but that won't # be possible # >in the final version. Nasty bootsrapping issues with that. :^) # # You'd be surprised... :) # # Seriously, miniparrot, enough to do simple file ops, spaw

RE: Yet another switch/goto implementation

2001-11-04 Thread Brent Dax
Michael Fischer: # In the goto case, we spin. And perhaps I am broken there. End # really wants to return, not just set the pc, but I hadn't thought # of a clever way to do that corner case, and wanted to see what # the behavior would be without it. I suspect I need it. Can't you just break()? -

Re: Revised yet another goto/switch...etc.

2001-11-04 Thread Daniel Grunblatt
You miss typed yet again :) : +prompt("Opcode dispatch by switch or function ('switch' or 'goto' or 'func')", +'do_op_t'); + +if ($c{do_opt_t} eq 'goto' and $c{cc} !~ /gcc/i ) { do_op_t +my $not_portable = " +'goto' opcode dispatch available only with gc

Re: A serious stab at regexes

2001-11-04 Thread Angel Faus
Brent Dax : > Okay, this bunch of ops is a serious attempt at regular expressions. I > had a discussion with japhy on this in the Monastery > (http://www.perlmonks.org/index.pl?node_id=122784), and I've come up > with something flexible enough to actually (maybe) work. Attached is a > patch to

Re: Rules for memory allocation and pointing

2001-11-04 Thread Benoit Cerrina
> There will be a mechanism to register PMCs with the interpreter to note > they're pointed to by something that the interpreter can't reach. (For > example, a structure in your extension code, or via a pointer stashed in > the depths of a buffer object, or referenced by another interpreter) This

RE: [perl6]RE: Helping with configure

2001-11-04 Thread Dan Sugalski
At 11:12 AM 11/4/2001 -0800, Brent Dax wrote: >Dan Sugalski: ># At 10:36 PM 11/3/2001 -0800, Brent Dax wrote: ># >Well, for now we're using Perl for Configure, but that won't ># be possible ># >in the final version. Nasty bootsrapping issues with that. :^) ># ># You'd be surprised... :) ># ># Se

Re: Yet another switch/goto implementation

2001-11-04 Thread Michael Fischer
On Nov 04, Brent Dax <[EMAIL PROTECTED]> took up a keyboard and banged out > Michael Fischer: > # In the goto case, we spin. And perhaps I am broken there. End > # really wants to return, not just set the pc, but I hadn't thought > # of a clever way to do that corner case, and wanted to see what >

RE: Regex helper opcodes

2001-11-04 Thread Dan Sugalski
At 11:06 AM 11/4/2001 -0800, Brent Dax wrote: >Dan Sugalski: ># While I'm not going to dive too deep into regexes (I like what little ># sanity I have left, thanks :), here are a few opcodes I've > >Oh, c'mon, they're not that bad. It's basically just "if this works, do >the next thing, otherwise

Re: Yet another switch/goto implementation

2001-11-04 Thread Benoit Cerrina
> I think your approuch is much better and cleaner than mine, my brain was > limited to unix :) so I never worried about anything besides gcc. > It would also be nice if you can decide which dispatch method use instead > of asking. Hum, I think you mean linux, maybe BSD, but the other unixes com

Re: Rules for memory allocation and pointing

2001-11-04 Thread Dan Sugalski
At 08:32 PM 11/4/2001 +0100, Benoit Cerrina wrote: > > There will be a mechanism to register PMCs with the interpreter to note > > they're pointed to by something that the interpreter can't reach. (For > > example, a structure in your extension code, or via a pointer stashed in > > the depths of

Re: Yet another switch/goto implementation

2001-11-04 Thread Daniel Grunblatt
Did you put an eye on my implementation? what's the point in using computed goto when tracing, checking bounds or profiling? Daniel Grunblatt. On Sun, 4 Nov 2001, Michael Fischer wrote: > On Nov 04, Brent Dax <[EMAIL PROTECTED]> took up a keyboard and banged out > > Michael Fischer: > > # In th

Re: Yet another switch/goto implementation

2001-11-04 Thread Dan Sugalski
At 02:33 PM 11/4/2001 -0300, Daniel Grunblatt wrote: >Did you put an eye on my implementation? what's the point in using >computed goto when tracing, checking bounds or profiling? There's not a huge amount of win over a switch, but there is a benefit over the function dispatch method.

Re: Yet another switch/goto implementation

2001-11-04 Thread Daniel Grunblatt
So, on those other unixes that come with cc we can't use computed goto? Daniel Grunblatt. On Sun, 4 Nov 2001, Benoit Cerrina wrote: > > > > I think your approuch is much better and cleaner than mine, my brain was > > limited to unix :) so I never worried about anything besides gcc. > > It would

Re: [perl6]RE: Helping with configure

2001-11-04 Thread Andy Dougherty
On Sat, 3 Nov 2001, Zach Lipton wrote: > parrot. The idea is to have the Configure.pl script itself run .cm files > located in Config/, these .cm files (configuremodule) would do the actual > work of configuration. The Conf.pm module would contain a set of API's for > the .cm files to call. (this

Re: Yet another switch/goto implementation

2001-11-04 Thread Dan Sugalski
At 02:37 PM 11/4/2001 -0300, Daniel Grunblatt wrote: >So, on those other unixes that come with cc we can't use computed goto? Computed goto is, at the moment, a GCC-specific feature. It's not OS specific, just compiler-specific. Dan -

Re: Rules for memory allocation and pointing

2001-11-04 Thread Benoit Cerrina
> While the PMC structures themselves don't move (no real need--there of > fixed size so you can't fragment your allocation pool, though it makes Sorry can you expand on this. I don't see the relation between the data being fixed size and the memory not becomming fragmented. > generational colle

Re: Yet another switch/goto implementation

2001-11-04 Thread Daniel Grunblatt
Sure, I alredy knew that, may be I'm just having a hard time to make my self clear. What I mean was: On those unixes, with cc (NOT GCC), that Benoit Cerrina pointed, Can we use computed goto? or in other words: Is there any other compiler besides gcc that implements computed goto? Daniel Grun

Re: Rules for memory allocation and pointing

2001-11-04 Thread Dan Sugalski
At 09:36 PM 11/4/2001 +0100, Benoit Cerrina wrote: > > While the PMC structures themselves don't move (no real need--there of > > fixed size so you can't fragment your allocation pool, though it makes >Sorry can you expand on this. I don't see the relation between the data >being fixed size and

Re: Yet another switch/goto implementation

2001-11-04 Thread Dan Sugalski
At 02:45 PM 11/4/2001 -0300, Daniel Grunblatt wrote: >Sure, I alredy knew that, may be I'm just having a hard time to make my >self clear. > >What I mean was: > >On those unixes, with cc (NOT GCC), that Benoit Cerrina pointed, Can we >use computed goto? No. And Unix generally doesn't enter into i

Re: Yet another switch/goto implementation

2001-11-04 Thread Daniel Grunblatt
Yes, and thanks to Michael Fischer I'm already working on that as I described on a previos mail. I hope to post it in a few hours. Daniel Grunblatt. On Sun, 4 Nov 2001, Dan Sugalski wrote: > At 02:45 PM 11/4/2001 -0300, Daniel Grunblatt wrote: > >Sure, I alredy knew that, may be I'm just having

RE: A serious stab at regexes

2001-11-04 Thread Brent Dax
Angel Faus: # Since your ops are much complete and better documented that # the ones I sent, # I was trying to adapt my previous regex compiler to your ops, # but I found # what i think might be a limitation of your model. # # It looks to me that for compiling down regexp to usual # opcodes there

Re: Rules for memory allocation and pointing

2001-11-04 Thread Michael L Maraist
On Sunday 04 November 2001 02:39 pm, Dan Sugalski wrote: > At 08:32 PM 11/4/2001 +0100, Benoit Cerrina wrote: > > > There will be a mechanism to register PMCs with the interpreter to note > > > they're pointed to by something that the interpreter can't reach. (For > > > example, a structure in you

Re: vmem memory manager

2001-11-04 Thread James Mastros
On Sun, Nov 04, 2001 at 01:47:44PM -0500, Dan Sugalski wrote: > I've not made any promises as to what type of GC system we'll use. I'm > gearing things towards a copying collector, but I'm also trying to make > sure we don't lock ourselves out of a generational scheme. I'd really like to hear th

Re: Win32 build and WINVER

2001-11-04 Thread James Mastros
On Sun, Nov 04, 2001 at 01:38:58PM -0500, Dan Sugalski wrote: > Currently, I don't want to promise back before Win98, though if Win95 is no > different from a programming standpoint (I have no idea if it is) then > that's fine too. Win 3.1 and DOS are *not* target platforms, though if > someone

Re: [PATCH] Computed goto, super-fast dispatching.

2001-11-04 Thread Tom Hughes
In message <[EMAIL PROTECTED]> Daniel Grunblatt <[EMAIL PROTECTED]> wrote: > Yeap, I was right, using gcc 3.0.2 you can see the difference: I've just tried it with 3.0.1 and see much the same results as I did with 2.96 I'm afraid. I don't have 3.0.2 to hand without building it from sou

Re: [PATCH] Computed goto, super-fast dispatching.

2001-11-04 Thread Daniel Grunblatt
Do you want me to give you an account in my linux machine where I have install gcc 3.0.2 so that you see it? Daniel Grunblatt. On Mon, 5 Nov 2001, Tom Hughes wrote: > In message <[EMAIL PROTECTED]> > Daniel Grunblatt <[EMAIL PROTECTED]> wrote: > > > Yeap, I was right, using gcc 3.0.2

Re: Rules for memory allocation and pointing

2001-11-04 Thread Michael L Maraist
On Sunday 04 November 2001 03:36 pm, Benoit Cerrina wrote: > > While the PMC structures themselves don't move (no real need--there of > > fixed size so you can't fragment your allocation pool, though it makes > > Sorry can you expand on this. I don't see the relation between the data > being fixe

Re: vmem memory manager

2001-11-04 Thread Benoit Cerrina
- Original Message - From: "James Mastros" <[EMAIL PROTECTED]> To: "Dan Sugalski" <[EMAIL PROTECTED]> Cc: "Benoit Cerrina" <[EMAIL PROTECTED]>; "Uri Guttman" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 05, 2001 12:03 AM Subject

[PATCH] Computed goto detected at Configure.pl

2001-11-04 Thread Daniel Grunblatt
- Message Text - All.- Now I'm sending: * A modification to Configure.pl and Makefile.in to detect if the compiler accepts computed gotos, also added testcomputedgoto_c.in. * A modification to runcore_ops.c and interpreter.c adding an ifdef. * The same ops2cgc.pl and the same modificat

Re: [PATCH] Computed goto detected at Configure.pl

2001-11-04 Thread James Mastros
On Sun, Nov 04, 2001 at 07:27:01PM -0300, Daniel Grunblatt wrote: > * A modification to Configure.pl and Makefile.in to detect if the compiler > accepts computed gotos, also added testcomputedgoto_c.in. Is there some reason that this is an _c.in file? I've noticed that both this and testparrotsiz

Rounding?

2001-11-04 Thread Zach Lipton
I'm working on learning some parrot asm, but if I write something like this: set N0,2 set N1,2 add N3, N0, N1 print N3 I get: 4.00 Is there any way to round this, or at least chop the 0's off the end? Zach

Re: Rounding?

2001-11-04 Thread Michael L Maraist
On Sunday 04 November 2001 10:59 pm, Zach Lipton wrote: > I'm working on learning some parrot asm, but if I write something like > this: > > set N0,2 > set N1,2 > add N3, N0, N1 > print N3 > > > I get: > > 4.00 > > Is there any way to round this, or at least chop the 0's off the end? since pr

[PATCHES] Multiple operation tables

2001-11-04 Thread Jeff
This (rather large) set of patches adds the ability for parrot to use multiple operation libraries. It's currently adding 'obscure.ops' and 'vtable.ops' to the list of operations the interpreter can perform, though vtable.ops is not tested for obvious reasons. While this likely should be done in

Re: Rules for memory allocation and pointing

2001-11-04 Thread Benoit Cerrina
> >- Original Message - >From: "Michael L Maraist" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Sunday, November 04, 2001 10:10 PM >Subject: Re: Rules for memory allocation and pointing > > >On Sunday 04 November 2001 03:36 pm, Benoit Cerrina wrote: >> > While the PMC structures the

Re: Rules for memory allocation and pointing

2001-11-04 Thread Benoit Cerrina
>At 09:36 PM 11/4/2001 +0100, Benoit Cerrina wrote: > >> > While the PMC structures themselves don't move (no real need--there of >> > fixed size so you can't fragment your allocation pool, though it makes >>Sorry can you expand on this. I don't see the relation between the data >>being fixed siz

Re: [PATCH] Computed goto, super-fast dispatching.

2001-11-04 Thread Daniel Grunblatt
Yeap, I was right, using gcc 3.0.2 you can see the difference: Without my patch: linux# ./test_prog examples/assembly/mops.pbc Iterations:1 Estimated ops: 3 Elapsed time: 20.972973 M op/s:14.304124 With the patch: linux# ./test_prog examples/assembly/mops.pbc Itera