Re: rx.ops

2003-08-03 Thread Brent Dax
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 st

Re: rx.ops

2003-08-03 Thread Luke Palmer
Brent Dax wrote: > Honestly, though, I'm no longer sure the full regex engine is a good idea. > A fast index op, a fast ord op, a character class op, and the intstack is > really all that's needed to make a regex engine from plain Parrot opcodes. I agree with you on one level. That is enough to m

generic code generator? [was: subroutines and python status]

2003-08-03 Thread Michal Wallace
On Fri, 1 Aug 2003, K Stol wrote: > > From: "Leon Brocard" <[EMAIL PROTECTED]> ... > > I don't like things becoming dead-ends. How much work do you think > > it'd be to extend it some more and update it to latest Lua? ... > 2: I misdesigned the code generator; that is, at the point where I > could

Re: generic code generator? [was: subroutines and python status]

2003-08-03 Thread K Stol
- Original Message - From: "Michal Wallace" <[EMAIL PROTECTED]> To: "K Stol" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, August 03, 2003 2:25 AM Subject: generic code generator? [was: subroutines and python status] > On Fri, 1 Aug 2003, K Stol wrote: > > > > From: "Leon Bro

Re: generic code generator? [was: subroutines and python status]

2003-08-03 Thread Michal Wallace
On Sun, 3 Aug 2003, K Stol wrote: > At this moment, I'm looking at a new version of Lua, the previous > 'pirate' compiled (well, sort of :-) Lua 4 Lua 5 has some features, > such as coroutines (If I remembered well) and all kinds of neat > stuff for which Parrot has built-in support (and it droppe

Re: subs.pod

2003-08-03 Thread Leopold Toetsch
Vladimir Lipskiy <[EMAIL PROTECTED]> wrote: > What are "-", "X", and " "(whitespace) supossed to mean there? "X" is meaning "is in context". Sorry if that is misleading, I'll update the pod. > Why is Eval not there? Does it have no context? Its not specified yet, how eval fits into the picture.

Re: string.c questions

2003-08-03 Thread Leopold Toetsch
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->strstart, s->strlen ) ==

String value semantics?

2003-08-03 Thread Luke Palmer
Is this supposed to happen? % parrot - .sub _main $S0 = "Hello\n" $S1 = $S0 substr $S1, 2, 2, "" print $S0 print $S1 end .end (EOF) Heo Heo Aren't strings supposed to follow value semantics? Luke

JIT bug with restoretop

2003-08-03 Thread Luke Palmer
(or something) The following program segfaults when run under JIT. .sub _main newsub P0, .Sub, _echo $S0 = "abcdefghij" savetop restoretop end .end .sub _echo print P5 invoke P1 .end (note that I never call _echo, but th

Re: JIT bug with restoretop

2003-08-03 Thread Simon Glover
On 3 Aug 2003, Luke Palmer wrote: > This fix has worked fine with JIT until now, so I suspect the problem > is elsewhere. > Bug confirmed here (although I need a slightly longer string to trigger it). Here's a stacktrace: --

Re: JIT bug with restoretop

2003-08-03 Thread Daniel Grunblatt
On Sunday 03 August 2003 15:27, Simon Glover wrote: > On 3 Aug 2003, Luke Palmer wrote: > > This fix has worked fine with JIT until now, so I suspect the problem > > is elsewhere. > > Bug confirmed here (although I need a slightly longer string to trigger > it). Here's a stacktrace: I couldn't r

Re: JIT bug with restoretop

2003-08-03 Thread Simon Glover
On Sun, 3 Aug 2003, Daniel Grunblatt wrote: > On Sunday 03 August 2003 15:27, Simon Glover wrote: > > On 3 Aug 2003, Luke Palmer wrote: > > > This fix has worked fine with JIT until now, so I suspect the problem > > > is elsewhere. > > > > Bug confirmed here (although I need a slightly longer st

Re: generic code generator? [was: subroutines and python status]

2003-08-03 Thread Stephen Thorne
On Sun, 3 Aug 2003 19:25, Michal Wallace wrote: > On Fri, 1 Aug 2003, K Stol wrote: > Really, there's a ton of overlap between the various > "high level" languages that parrot wants to support. > Maybe we could put together a generic code generator > that everyone could use? Obviously, it would hav

pdd03_calling_conventions.pod questions

2003-08-03 Thread Vladimir Lipskiy
Q1: Suppose I have the following call into a sub named "foo": foo($var1, $var2, $var3); What should I set in I1? Is it 3? And here: foo($var1, @arr2, %hash3); Is it still 3, since these aren't gonna be flattened? Q2: I'm calling without prototyping foo($var1, $var2, $var3, ... , $var23); He

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

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-

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 2..$a/6

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 mentio

double checking: in vs on?

2003-08-03 Thread Michal Wallace
Hey all, Python objects can have things "in" them: foo["x"] = "in" ... and it can also have things "on" them: foo.x = "on" I noticed lua treats these as the same thing and got curious about the distinction in IMCC. Coding it this way seems to work, but I'm not sure I really understood t