Re: Bit ops on strings

2004-05-25 Thread Jeff Clites
On May 25, 2004, at 12:26 PM, Dan Sugalski wrote: At 12:30 PM +0100 5/25/04, Nicholas Clark wrote: I may be misremembering what I've read here but I thought that Dan said that for variable length encodings (such as shift-JIS) parrot would store the byte(s) in memory in constant size 16 or 32 bit

Re: [perl #29509] Perl6: /examples/life.p6 is broken

2004-05-25 Thread Allison Randal
Leo wrote: > Fixed. > > The code in smallobject.c that allocates new buffer memory did assume > that it gets zeroed memory, which of course depends on the OS and the > arena size. Now C, which is used during GC, is cleared > explicitely. Yup, that fixed it. Thanks! Allison

Re: Style question

2004-05-25 Thread stevan little
Francisco, Personally I like to have tests that depend upon one another in a single file. However, that is not always possible or easy to do. In your case though, I would suggest you use mock objects for your database instead of a real database. This would allow your tests to be run independent

Re: [perl #29509] Perl6: /examples/life.p6 is broken

2004-05-25 Thread Nick Glencross
Looks very much like my bug 29246, and a very similar example. Nick Allison Randal wrote: This is the smallest bit of code I could get to segfault in my linux dev box: sub main () { my $string = "*

Re: Temporarily Overriding subs

2004-05-25 Thread Ovid
--- Adrian Howard <[EMAIL PROTECTED]> wrote: > Hook::Lexwrap? > > It's what I normally use for this sort of thing, and you can > short-circuit the original method in a pre- wrapper. Ah, never knew about the short-circuiting. Thanks! Cheers, Ovid = Silence is Evilhttp://users.e

Re: Please become ID verified.

2004-05-25 Thread Robert Spier
At Tue, 25 May 2004 10:36:24 -0400, Aaron Sherman wrote: > > On Mon, May 24, 2004 at 09:48:45PM -0400, Uri Guttman wrote: > > > > is there a paypal PMC in the plans? will it be multi-accounted? will it > > have built in auth support? what about rounding errors? > > In case it was not obvious, th

Re: Bit ops on strings

2004-05-25 Thread Dan Sugalski
At 8:30 PM +0100 5/25/04, Nicholas Clark wrote: On Tue, May 25, 2004 at 03:26:45PM -0400, Dan Sugalski wrote: Yup. UTF8 is Just another variable-width encoding. Do anything with it and we convert it to a fixed-width encoding, in this case UTF32. Does this mean that we won't be verifying the valid

Re: Bit ops on strings

2004-05-25 Thread Nicholas Clark
On Tue, May 25, 2004 at 03:26:45PM -0400, Dan Sugalski wrote: > Yup. UTF8 is Just another variable-width encoding. Do anything with > it and we convert it to a fixed-width encoding, in this case UTF32. Does this mean that we won't be verifying the validity of UTF8 on input? And instead pitching

Re: Bit ops on strings

2004-05-25 Thread Dan Sugalski
At 12:30 PM +0100 5/25/04, Nicholas Clark wrote: I may be misremembering what I've read here but I thought that Dan said that for variable length encodings (such as shift-JIS) parrot would store the byte(s) in memory in constant size 16 or 32 bit integers, rather than the (external) variable length

Re: [perl #29844] [PATCH] Win32 Socket support

2004-05-25 Thread Dan Sugalski
At 6:42 PM -0700 5/24/04, [EMAIL PROTECTED] (via RT) wrote: This patch adds socket, connect, send and recv functions to the win32 io Layer. Applied, thanks. -- Dan --"it's like this"--- Dan Sugalski

Re: JIT problem on Cygwin revisited

2004-05-25 Thread Joshua Gatcomb
--- Leopold Toetsch <[EMAIL PROTECTED]> wrote: > It looks like that the Cygwin libs have some > assumption how the floating > point stack is used. I'll try to insert a C > instruction before > math lib functions are called. > > > leo Well, it only happens under JIT for the following functions (i

attention: new library location

2004-05-25 Thread Jens Rieks
Hello everybody! All libraries are now in runtime/parrot/library. Everything in the old library directory will be removed in a few days. Everything should work without modifications. If you have changed any file in library/, please commit the modified file in runtime/parrot/library. runtime/pa

Re: Style question

2004-05-25 Thread Paul Johnson
On Tue, May 25, 2004 at 07:58:21PM +0200, Francisco Olarte Sanz. wrote: > 1st of all, thanks everyone for the prompt response regarding my > previous question about return values. > > Now a style question. I'm doing a database oriented module, and I have > rouhly the following tests: > > 1.- Tes

Re: Style question

2004-05-25 Thread Ricardo SIGNES
* "Francisco Olarte Sanz." <[EMAIL PROTECTED]> [2004-05-25T13:58:21] > ? Which aproach is better, have a single independent huge test file or > several interdependent smaller ones ( w/ notes in the readme stating > test dependence ) ? The better approach is the one that makes it most likely for yo

Style question

2004-05-25 Thread Francisco Olarte Sanz.
1st of all, thanks everyone for the prompt response regarding my previous question about return values. Now a style question. I'm doing a database oriented module, and I have rouhly the following tests: 1.- Test wether module can load ( just a require inside an eval ). 2.- Test a bunch of funct

Re: Temporarily Overriding subs

2004-05-25 Thread Adrian Howard
On 25 May 2004, at 18:31, Ovid wrote: [snip] So I wrote a little module, Sub::Override, to do that for me. I can replace subs, explicitly restore them to their original value or just let the object fall out of scope and have the subs automatically restored. However, this seems like such an obvi

Standard library behaviour

2004-05-25 Thread Dan Sugalski
Now that Jens is digging into the architecture of the standard library and all that entails, we need to think some about what is and isn't going to go into the library, and how it should behave. A good place to start is with the library loading code. This is in the works, and something we need,

Temporarily Overriding subs

2004-05-25 Thread Ovid
Many times in test suites I don't want to mock up an entire class or package. Instead, there are only one or two target subroutines that I want to change. I get awfully tired of doing the following, though: { no warnings 'redefine'; my $message; local *Foo::bar = sub { $message =

Re: Test functions return values.

2004-05-25 Thread Andy Lester
On Tue, May 25, 2004 at 09:16:51AM -0700, chromatic ([EMAIL PROTECTED]) wrote: > On Tue, 2004-05-25 at 06:58, Francisco Olarte Sanz wrote: > It's a reliable feature. If it's not documented, it should be. It should also be stated so that folks who use Test::Builder know to make their functions ret

Re: Test functions return values.

2004-05-25 Thread chromatic
On Tue, 2004-05-25 at 06:58, Francisco Olarte Sanz wrote: > I've been looking at the documentation for the test modules (Test::More, > Test::Simple, Test::Builder ), and I've found nothing regarding the return > value of the ok(), is(), etc... functions/methods. Browsing through the > sourc

Re: parrotlib is working

2004-05-25 Thread Dan Sugalski
At 4:06 PM +0200 5/25/04, Jens Rieks wrote: Hi, On Tuesday 25 May 2004 14:52, Leopold Toetsch wrote: The following patch fixes the problem: Wow, thank you very much, Leo! :-) The code is now working as expected. I'll now add a makefile rule to generate runtime/parrot/include/parrotlib.pbc from run

Re: First draft, IO & event design

2004-05-25 Thread Dan Sugalski
At 8:09 PM -0400 5/24/04, Uri Guttman wrote: > "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes: DS> Parrot has a unified event and IO system--indeed events are nothing DS> but satisfied IO requests. (Or, alternately, IO requests are nothing DS> but solicited events with external data) th

Re: [perl #29837] Register spilling needs a last-gasp give-up scheme

2004-05-25 Thread Dan Sugalski
At 4:29 PM +0200 5/25/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: I can see that helping in some circumstances (though not mine) but the code that the register allocator's having fits with has no .local declarations at all. It's all $x register usage from beginning to end.

Re: JIT problem on Cygwin revisited

2004-05-25 Thread Leopold Toetsch
Joshua Gatcomb <[EMAIL PROTECTED]> wrote: > Sorry - still a problem. I am attaching a more > descriptive debugging session where I show the floats > and registers at every step. Not sure if this will be > useful, but I figured it couldn't hurt. It looks like that the Cygwin libs have some assump

Re: [perl #29837] Register spilling needs a last-gasp give-up scheme

2004-05-25 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > I can see that helping in some circumstances (though not mine) but > the code that the register allocator's having fits with has no .local > declarations at all. It's all $x register usage from beginning to end. Don't you have something like variables, wh

Re: Please become ID verified.

2004-05-25 Thread Aaron Sherman
On Mon, May 24, 2004 at 09:48:45PM -0400, Uri Guttman wrote: > > is there a paypal PMC in the plans? will it be multi-accounted? will it > have built in auth support? what about rounding errors? In case it was not obvious, the "Paypal" message was a scam to get people's passwords. The offending

parrotlib is working

2004-05-25 Thread Jens Rieks
Hi, On Tuesday 25 May 2004 14:52, Leopold Toetsch wrote: > The following patch fixes the problem: Wow, thank you very much, Leo! :-) The code is now working as expected. I'll now add a makefile rule to generate runtime/parrot/include/parrotlib.pbc from runtime/parrot/library/parrotlib.imc Is i

Test functions return values.

2004-05-25 Thread Francisco Olarte Sanz
Hi everybody. I'm new in this list, don't know wheter this is a FAQ ( I've tried but bot found any FAQ ), so if it's please just point me towards it. I've been looking at the documentation for the test modules  (Test::More, Test::Simple, Test::Builder ), and I've found nothing regarding the re

Re: First draft, IO & event design

2004-05-25 Thread Dan Sugalski
At 10:31 AM +0200 5/25/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: An unsolicited event, on the other hand, is one that parrot generates as the result of something happening external to itself, or as the result of some recurring event happening. Signals and GUI events, for

Re: [perl #29837] Register spilling needs a last-gasp give-up scheme

2004-05-25 Thread Dan Sugalski
At 9:43 AM +0200 5/25/04, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: It's possible to get the register allocator in what is essentially an infinite loop, where it runs forever or until it blows memory and dies. It needs to have a means to check for too many iterations and fa

Re: Stat in

2004-05-25 Thread Leopold Toetsch
Jens Rieks <[EMAIL PROTECTED]> wrote: > The _parrotlib bytecode is working, but it disables DOD ATM :-( The problem is that now the runloop is entered already in the lexer for the first time (for loading includes). When entering the run loop the first time, the stack top is set, which is now some

Re: JIT problem on Cygwin revisited

2004-05-25 Thread Joshua Gatcomb
--- Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Joshua Gatcomb <[EMAIL PROTECTED]> wrote: > > > 4 print N3 > > gdb> p N3 > > $2 = 4.4942328371557898e+307 > > > If both N1 and N2 are not set prior to cosh, then > > everything works fine. > > I've checked in a possible fix for this. Please

Re: Stat in

2004-05-25 Thread Dan Sugalski
At 12:01 PM +0200 5/25/04, Jens Rieks wrote: On Tuesday 25 May 2004 01:35, Dan Sugalski wrote: We can add more to this as we go, but this should be enough to get Jens going. Theres no stat op yet, is there? Ah, dammit--I was too careful with the commit and missed some files. Update to CVS and yo

Re: Bit ops on strings

2004-05-25 Thread Nicholas Clark
On Sun, May 02, 2004 at 11:37:31AM -0700, Jeff Clites wrote: > Two more things to keep in mind: > > On May 1, 2004, at 4:54 PM, Aaron Sherman wrote: > > >If Perl defaults to UTF-8 > > People need to realize also that although UTF-8 is a pretty good > interchange format, it's a really bad in-mem

Re: Non-flow-control logical tests

2004-05-25 Thread Nicholas Clark
On Thu, May 20, 2004 at 06:47:57PM +0100, Jon Shapcott wrote: > On Thu, May 20, 2004 at 10:18:06AM -0700, Brent 'Dax' Royal-Gordon wrote: > > Dan Sugalski wrote: > > > istrue I0, P5# I0 = 1 if P5 is true > > > isgt I0, P5, P6 # I0 = i if P5 > P6 > > > > By all means! I've thought

Re: Stat in

2004-05-25 Thread Jens Rieks
On Tuesday 25 May 2004 01:35, Dan Sugalski wrote: > We can add more to this as we go, but this should be enough to get Jens > going. Theres no stat op yet, is there? Shall I write it? The current parrotlib bytecode uses C to test if a file exists, I'll modify the code to use C then. Or should I

Re: [perl #29509] Perl6: /examples/life.p6 is broken

2004-05-25 Thread Leopold Toetsch
Allison Randal <[EMAIL PROTECTED]> wrote: > #0 0x401571b7 in memcpy () from /lib/libc.so.6 > #1 0x08158c41 in compact_pool (interpreter=0x82ebf90, pool=0x82ec770) > at src/resources.c:341 Fixed. The code in smallobject.c that allocates new buffer memory did assume that it gets zeroed memory

Re: First draft, IO & event design

2004-05-25 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > An unsolicited event, on the other hand, is one that parrot generates > as the result of something happening external to itself, or as the > result of some recurring event happening. Signals and GUI events, for > example, are unsolicted as are recurring tim

[perl #29844] [PATCH] Win32 Socket support

2004-05-25 Thread via RT
# New Ticket Created by [EMAIL PROTECTED] # Please include the string: [perl #29844] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=29844 > This patch adds socket, connect, send and recv functions to the win32 io Layer.

Re: [perl #29509] Perl6: /examples/life.p6 is broken

2004-05-25 Thread Allison Randal
Alex Gutteridge wrote: > > The example Perl6 'Game of Life' program > (parrot/languages/perl6/examples/life.p6) is broken. As it stands it > doesn't parse correctly but this is easily fixed by adding the correct > string concatenation operator '~': I've checked in your update to the concat operat

Re: Questions about Embedding Parrot / mod_parrot

2004-05-25 Thread Leopold Toetsch
Chromatic <[EMAIL PROTECTED]> wrote: > On Mon, 2004-05-24 at 03:43, Leopold Toetsch wrote: >> Yep. The main problem is that by far not all internal code paths are >> using exceptions so that you could interfer the exit handling. This >> needs of course being fixed somewhen. > Is this as simple an

Re: JIT problem on Cygwin revisited

2004-05-25 Thread Leopold Toetsch
Joshua Gatcomb <[EMAIL PROTECTED]> wrote: > 4 print N3 > gdb> p N3 > $2 = 4.4942328371557898e+307 > If both N1 and N2 are not set prior to cosh, then > everything works fine. I've checked in a possible fix for this. Please try again after cvs update. Thanks for your analysis, leo

Re: [perl #29837] Register spilling needs a last-gasp give-up scheme

2004-05-25 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > It's possible to get the register allocator in what is essentially an > infinite loop, where it runs forever or until it blows memory and > dies. It needs to have a means to check for too many iterations and > fall back to a slow-but-working version with t