RE: AOP

2001-10-24 Thread David Whipp
Aaron Sherman wrote: > All of this is still coming into focus for me, and I want to spend > more time reading the articles later, but for now I just wanted > to see if anyone else has been thinking these thoughts I do like the idea of AOP; but I think the mechanism you suggest are too clumsy.

flex perl mess

2001-10-24 Thread Nadim Khemir
Hi, I found a thread which started with A proposal for more powerful text processing to be built in to Perl: Flex and Pushdown Expressions. > One of the great strengths of Perl is that, more than any other > language I know, it helps you cross between the "data" space and the > "program" space:

Re: flex perl mess

2001-10-24 Thread Aaron Sherman
On Tue, Oct 23, 2001 at 02:53:19PM +0200, Nadim Khemir wrote: > > Don't we already have that in Perl 5? > > > > if ( /\G\s+/gc ) {# whitespaces } > >elsif ( /\G[*/+-]/gc ) { # operator } > >elsif ( /\G\d+/gc ) {# term } > >elsif ( /\G.+/gc ) { # unrecognized

Re: flex perl mess

2001-10-24 Thread Graham Barr
On Wed, Oct 24, 2001 at 09:06:14AM -0400, Aaron Sherman wrote: > On Tue, Oct 23, 2001 at 02:53:19PM +0200, Nadim Khemir wrote: > > > > Don't we already have that in Perl 5? > > > > > > if ( /\G\s+/gc ) {# whitespaces } > > >elsif ( /\G[*/+-]/gc ) { # operator } > > >elsif (

AOP

2001-10-24 Thread Aaron Sherman
In reading the Oct'01 issue of Communications of the ACM, I find myself intrigued by the concept of aspect oriented programming (AOP). The basic idea is that some methods in an object tree have simillar concerns even though they are in different objects. AOP is an attempt to make such "crosscuttin

RE: Windows compile problems

2001-10-24 Thread Brent Dax
Andy Dougherty: # In perl.perl6.internals, you wrote: # # >+#else # >+ # >+ /* Win32 doesn't have gettimeofday or , so just use # >normal time w/o microseconds # >+ XXX Is there a Win32 equivalent to gettimeofday? */ # # Yes. See ext/Time/HiRes/HiRes.xs in perl-current. Whoa. That is just

Re: Revamping the build system

2001-10-24 Thread Russ Allbery
Russ Allbery <[EMAIL PROTECTED]> writes: > I'm not sure what there is to expand on. I've looked at 2.50, and it > definitely doesn't look like an unmitigated evil hack to me. It looks > like a collection of tests for various standard things that packages need > to know to compile, put together

RE: Revamping the build system

2001-10-24 Thread Espen Harlinn
Here is just a proposal: 1. Place os neutral code in one directory 2. place os dependant code in platform specific directories 3. create an initial SIMPLE makefile and a config.h for each supported platform/compiler combination I know this isn't hightech, but it works like a charm. 4. write all

Re: Are threads what we really want ???

2001-10-24 Thread Michael L Maraist
On Wednesday 24 October 2001 08:28 pm, you wrote: > I’ve just spent some time looking through the various RFC’s for Perl 6. > > IMHO: The various proposals dealing with multi threading, synchronization > and RPC can be solved in a different way. > > Instead of thinking about multiple threads, one

RE: Revamping the build system

2001-10-24 Thread Brent Dax
Espen Harlinn: # Here is just a proposal: # # 1. Place os neutral code in one directory # 2. place os dependant code in platform specific directories What about little inline things? AUTO_OP sleep(i|ic) { #ifdef WIN32 Sleep($1*1000); #else sleep($1

Re: Windows compile problems

2001-10-24 Thread Alex Gough
On Wed, 24 Oct 2001, Simon Cozens wrote: > On Wed, Oct 24, 2001 at 01:56:01PM -0700, Brent Dax wrote: > > After thinking about this for a couple minutes, I came up with a > > solution involving a macro (I can hear the groans from here): > > #define VTABLE_CALL(vfunc, type) > > ((op_func_t)((INTVA

Re: Revamping the build system

2001-10-24 Thread Russ Allbery
Brent Dax <[EMAIL PROTECTED]> writes: > What about little inline things? > AUTO_OP sleep(i|ic) { > #ifdef WIN32 > Sleep($1*1000); > #else > sleep($1); > #endif > } This reminds me. gcc is slowly switching over to writing code like that as: if

RE: Windows compile problems

2001-10-24 Thread Brent Dax
Dan Sugalski: # At 10:20 PM 10/24/2001 +0100, Simon Cozens wrote: # >On Wed, Oct 24, 2001 at 01:56:01PM -0700, Brent Dax wrote: # > > core_ops.obj : error LNK2019: unresolved external # symbol _sleep # > > referenced in function _Parrot_sleep_i # > > test_prog.exe : fatal error LNK1120

Are threads what we really want ???

2001-10-24 Thread Espen Harlinn
I’ve just spent some time looking through the various RFC’s for Perl 6. IMHO: The various proposals dealing with multi threading, synchronization and RPC can be solved in a different way. Instead of thinking about multiple threads, one could think about multiple execution contexts. Each instance

Beating string numerification to death [Was: Re: the handiness of undef becoming NaN (when you want that)]

2001-10-24 Thread Glenn Linderman
Damian Conway wrote: > Have I missed anything? Perhaps you've missed one thing. It was kind of in a different branch of the thread, about string numerification yielding NaN when given input that is "bad" according to some definition of "badness". It was clear from discussion that various contr

Re: AOP

2001-10-24 Thread Aaron Sherman
On Wed, Oct 24, 2001 at 10:42:09AM -0700, David Whipp wrote: > Aaron Sherman wrote: > > All of this is still coming into focus for me, and I want to spend > > more time reading the articles later, but for now I just wanted > > to see if anyone else has been thinking these thoughts > > I do li

RE: AOP

2001-10-24 Thread David Whipp
> If Perl is going to have data hiding (I think I read that this was a > goal), then you cannot declare these relationships outside of the > class that defines the method. That would be like putting a "friend" > delcaration only on the foriegn class in C++. It simply should not > work that way. I

RFC: Anonymous classes

2001-10-24 Thread Aaron Sherman
Is it too late for RFCs? How does one get approved for submission these days? Or, do we just mail them off to [EMAIL PROTECTED]? =head1 TITLE Anonymous classes =head1 VERSION Maintainer: Aaron Sherman <[EMAIL PROTECTED]> Date: 24 October 2001 Version: 1 Mailing List: perl6-language N

Re: AOP

2001-10-24 Thread Piers Cawley
You have seen Aspect.pm haven't you? Aspect Oriented Programming for Perl 5, built on top of Hook::LexWrap and very, very cool. -- Piers "It is a truth universally acknowledged that a language in possession of a rich syntax must be in need of a rewrite." -- Jane Austen?

Re: AOP

2001-10-24 Thread Aaron Sherman
On Wed, Oct 24, 2001 at 11:50:05AM -0700, David Whipp wrote: > > If Perl is going to have data hiding (I think I read that this was a > > goal), then you cannot declare these relationships outside of the > > class that defines the method. That would be like putting a "friend" > > delcaration only

Re: AOP

2001-10-24 Thread Leon Brocard
Aaron Sherman sent the following bits through the ether: > It is not. That's exactly the point to AOP, to bring the two May I suggest that all discussion move to the perl-aspects list and that everyone take a look at the Aspect module on CPAN. The language does not need to be changed to enable A

Re: Beating string numerification to death [Was: Re: the handiness of undef becoming NaN (when you want that)]

2001-10-24 Thread Damian Conway
Glenn wrote: > > Have I missed anything? > > Perhaps you've missed one thing. > >[snip] > > Perl 6 could provide a pragma to produce a warning on the first > run-time auto-numerification (compile time would be really hard to > do), together with a selection of diff

Re: Revamping the build system

2001-10-24 Thread Andy Dougherty
On 24 Oct 2001, Russ Allbery wrote: > Dan Sugalski <[EMAIL PROTECTED]> writes: > > > Making the build system (past the initial bootstrap of microparrot) all > > perl would make building modules on systems without a build system of > > their own (like, say, the Mac, as I found trying to install C

Re: Windows compile problems

2001-10-24 Thread Simon Cozens
On Wed, Oct 24, 2001 at 01:56:01PM -0700, Brent Dax wrote: > After thinking about this for a couple minutes, I came up with a > solution involving a macro (I can hear the groans from here): > #define VTABLE_CALL(vfunc, type) > ((op_func_t)((INTVAL)vfunc+(INTVAL)type)) This is entirely my fault; I

Re: Windows compile problems

2001-10-24 Thread Dan Sugalski
At 10:20 PM 10/24/2001 +0100, Simon Cozens wrote: >On Wed, Oct 24, 2001 at 01:56:01PM -0700, Brent Dax wrote: > > core_ops.obj : error LNK2019: unresolved external symbol _sleep > > referenced in function _Parrot_sleep_i > > test_prog.exe : fatal error LNK1120: 1 unresolved externals >

Memory bug: new_string_header() and free_string()

2001-10-24 Thread R. O'Neil
I noticed recently that calling pdump on a pbc file, in this case mops.pbc, causes a segfault. I traced this down to calling free_string() in resources.c. It just so happens that calling mem_allocate_aligned() in new_string_header() makes the STRING pointer unacceptable for free(). This ca

Re: Memory bug: new_string_header() and free_string()

2001-10-24 Thread Dan Sugalski
At 11:10 AM 10/24/2001 -0700, R. O'Neil wrote: >I noticed recently that calling pdump on a >pbc file, in this case mops.pbc, causes a >segfault. I traced this down to calling >free_string() in resources.c. It just so >happens that calling mem_allocate_aligned() >in new_string_header() makes the

RE: Revamping the build system

2001-10-24 Thread Dan Sugalski
At 01:46 PM 10/24/2001 -0500, Garrett Goebel wrote: >From: Dan Sugalski [mailto:[EMAIL PROTECTED]] > > At 11:33 PM 10/23/2001 -0700, Russ Allbery wrote: > > >Configure doesn't really deal with portability to non-Unix > > >systems either, being a shell script itself. Per

RE: Windows compile problems

2001-10-24 Thread Dan Sugalski
At 09:37 AM 10/24/2001 -0700, Brent Dax wrote: >It's probably a problem. Configure.pl creates a macro >HAS_HEADER_SYSTIME in config.h--why isn't Parrot respecting it? Parrot bug. I'll go fix unless someone beats me to it. Dan

RE: Revamping the build system

2001-10-24 Thread Garrett Goebel
From: Dan Sugalski [mailto:[EMAIL PROTECTED]] > At 11:33 PM 10/23/2001 -0700, Russ Allbery wrote: > >Configure doesn't really deal with portability to non-Unix > >systems either, being a shell script itself. Perl seemed > >to just bypass it in favor of pre-generated results. > > Configure still

RE: Windows compile problems

2001-10-24 Thread Brent Dax
Dan Sugalski: # At 09:37 AM 10/24/2001 -0700, Brent Dax wrote: # >It's probably a problem. Configure.pl creates a macro # >HAS_HEADER_SYSTIME in config.h--why isn't Parrot respecting it? # # Parrot bug. I'll go fix unless someone beats me to it. Patch below my sig fixes this; however, after this

Re: Revamping the build system

2001-10-24 Thread Russ Allbery
Dan Sugalski <[EMAIL PROTECTED]> writes: > Making the build system (past the initial bootstrap of microparrot) all > perl would make building modules on systems without a build system of > their own (like, say, the Mac, as I found trying to install Coy and > Quantum::Superposition on the 5.6.1 al

RE: Windows compile problems

2001-10-24 Thread Brent Dax
Bent Dax: # vtable_ops.c(37) : error C2296: '+' : illegal, left operand has type # 'add_method_t' ... # AUTO_OP add (p, p, p) { # ((op_func_t)((INTVAL)$2->vtable->add_1 + # (INTVAL)$3->vtable->num_type))($2,$3,$1); # } Okay, this is going to be a blow-by-blow of my littl

Re: Windows compile problems

2001-10-24 Thread Andy Dougherty
In perl.perl6.internals, you wrote: >+#else >+ >+ /* Win32 doesn't have gettimeofday or , so just use >normal time w/o microseconds >+ XXX Is there a Win32 equivalent to gettimeofday? */ Yes. See ext/Time/HiRes/HiRes.xs in perl-current. -- Andy Dougherty [EMAIL PROTECTED

Re: Revamping the build system

2001-10-24 Thread Dan Sugalski
At 11:33 PM 10/23/2001 -0700, Russ Allbery wrote: > >> I've looked inside a lot, and I definitely do not agree. But maybe you've > >> not seen autoconf 2.50 and later? > > > Russ- Could you expand on this? 2.50 seems to be at least 80% the same > > as the previous versions, with very similar m4

Re: [PATCH] pbc2c.pl causing make problems with mops.pbc

2001-10-24 Thread R. O'Neil
Oops, attached the wrong file. Here is the diff. --- "R. O'Neil" <[EMAIL PROTECTED]> wrote: > Here is a fix for that. The interpreter was not > getting passed in as it should. > > -Ryan __ Do You Yahoo!? Make a great connection at Yahoo! Per

Windows compile problems

2001-10-24 Thread Jaen Saul
Hi, I can't compile on a Win XP 26.00 machine with Microsoft Visual Studio 6.0 (no service packs), but I could compile it a while ago. Nmake says: cl -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -I./

Re: PackFile_unpack in pdump.c is missing the first arg

2001-10-24 Thread Gregor N. Purdy
Ryan -- Thanks. Applied. -- Gregor On Tue, 2001-10-23 at 11:51, [EMAIL PROTECTED] wrote: > I fixed this with the patches below, so everything at least will make. However >calling pdump on a pbc file will segfault at the end. > > Index: pdump.c > ==

Re: [PATCHES] make problems

2001-10-24 Thread R. O'Neil
Please ignore this, I sent these out early yesterday in two different mails. They never ended up being posted so I assumed the problem was on my end. Apparently there was just intense lag. Sorry for the multiple posts... -Ryan __ Do You Yahoo!?

Silly little demo

2001-10-24 Thread Dan Sugalski
I just checked in examples/assembly/life.pasm. Inspired by Damian's truly evil SelfGOL, and the need to have a working demo for last night's Boston.PM meeting (which I didn't manage--there was a dopey logic problem I missed until just *after* the meeting, of course) I cobbled up a program to p

Re: Windows compile problems

2001-10-24 Thread Dan Sugalski
At 06:14 PM 10/23/2001 +0200, Jaen Saul wrote: >I checked, there is NO sys/time.h header in the CRT include directories... >Is this just me or is this really a problem? It's really a problem. :( >BTW. I'm making a little Object Oriented Basic compiler in Python for >Parrot. Y'know, there's just

[PATCH] Bugfix for pbc2c.pl

2001-10-24 Thread talisman580
pbc2c.pl is generating some problems when deconstructing mops.pbc. The patch is simple: Index: pbc2c.pl === RCS file: /home/perlcvs/parrot/pbc2c.pl,v retrieving revision 1.2 diff -r1.2 pbc2c.pl 124c124 < c = PackFile_Constant_

Re: Silly little demo

2001-10-24 Thread Gregor N. Purdy
Dan -- > I just checked in examples/assembly/life.pasm. Inspired by Damian's truly > evil SelfGOL, and the need to have a working demo for last night's > Boston.PM meeting (which I didn't manage--there was a dopey logic problem I > missed until just *after* the meeting, of course) I cobbled up

Re: Windows compile problems

2001-10-24 Thread Andy Dougherty
In perl.perl6.internals, you wrote: >At 06:14 PM 10/23/2001 +0200, Jaen Saul wrote: >>I checked, there is NO sys/time.h header in the CRT include directories... >>Is this just me or is this really a problem? > >It's really a problem. :( Yes. Parrot should probably be respecting Perl5's Configure

RE: Windows compile problems

2001-10-24 Thread Brent Dax
Jaen Saul: # I can't compile on a Win XP 26.00 machine with Microsoft # Visual Studio 6.0 # (no service packs), but I could compile it a while ago. Nmake says: # # cl -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT # -DHAVE_DES_FCRYPT # -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS # -DPER

Re: PackFile_unpack in pdump.c is missing the first arg

2001-10-24 Thread talisman580
I fixed this with the patches below, so everything at least will make. However calling pdump on a pbc file will segfault at the end. Index: pdump.c === RCS file: /home/perlcvs/parrot/pdump.c,v retrieving revision 1.3 diff -r1.3 pdu

[PATCH] pbc2c.pl causing make problems with mops.pbc

2001-10-24 Thread R. O'Neil
Here is a fix for that. The interpreter was not getting passed in as it should. -Ryan __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com pbc2c.pl Description: pbc2c.pl