C++ automatically generates a typedef name when it sees struct Foo { .. }
We have a few places that name the typedef with the same name
as the tag (which I don't like as style anyway), and its causing problems
when trying to compile a C++ extension lib with parrot headers.
One example:
In order to make the extension library work with C++ I had
to rename Parrot_Interp typedef to Parrot_Interp_t
I know _t was a subject of discussion, but its a quick fix so
I can move ahead. Its only really used from embed.h in
test_main.c and the extension API layer.
If there are no complaints
Native Extensions for Parrot:
Rather than talk about it at length and not get any code done, I decided,
concerning the native extension interface, to just take a simple
hello world approach with some outside library.
Qt is a great GUI lib, so I figured what the heck.
What resulted was a small
At 10:23 PM 6/1/2002 -0700, Brent Dax wrote:
Melvin Smith:
# Native Extensions for Parrot:
#
# Rather than talk about it at length and not get any code
# done, I decided, concerning the native extension interface,
# to just take a simple hello world approach with some outside library.
I would
The common way is to define our own INLINE definition and have Configure
check for it, define it null if needed, and conditionally include it into a
file
as extern if so.
Sounds like a job for. BrentDax++!
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
I just uploaded the Parrot intermediate compiler to CPAN as
well as committing it to the Parrot CVS repository.
You can find it under parrot/languages/imcc if you update
your parrot tree, or get it from CPAN shortly under
http://cpan.org/authors/id/M/ME/MELVIN/imcc/
Please read the README.
At 02:42 PM 5/28/2002 -0700, George Rhoten wrote:
Hello all,
Hopefully I won't get too burned by flames by jumping into the middle of
the conversation like this.
Fortunately this list is very low on flammable material. :)
Thanks for the helpful info. One of the concerns with using
an external
At 11:42 AM 5/24/2002 +0200, Sebastian Bergmann wrote:
Leon Brocard wrote:
Oh, this happens to be a FAQ. The main reason is:
http://www.parrotcode.org/faq/
I know the technical reason for a new VM, but this could've been a new
VM for Perl 6 only. What I'd like to know is the
I've committed the latest revisions of the Cola compiler.
Primitive OOP is supported now. See the commit notes:
Cola 0.0.6 now supports primitive OOP. You can define
class methods and call by class or instance. Instance
calls are currently faked into class calls and there
isn't yet support for
At 12:41 PM 5/22/2002 -0700, Sean O'Rourke wrote:
This is an implementation of LZW compression in Parrot assembly. The fact
that pack() can't handle null bytes makes it a bit more complicated (and
limited) than it has to be, but for just text files, it seems to work just
fine. It's probably a
store_global/find_global ops are in. Added storage of PMCs to PerlHash.
Sample:
new P0, PerlString
set P0, Melvin\n
store_global first, P0
new P0, PerlString
set P0, Smith\n
store_global last, P0
find_global P1, first
find_global P2, last
print P1
print P2
end
-Melvin
Net result is Good.
[If it wasn't clear, thanks for this, thanks for all the other good work
you've
done on parrot]
Thank you.
Seriously though - is it possible to automate testing how many ops don't
have tests? That way we could have a test that looked for untested ops, and
failed if any
At 09:11 PM 5/19/2002 -0400, Mike Lambert wrote:
This patch removes a bunch of warnings that have accumulated with MSVC
recently.
Mostly applied. Here is your rejected hunk, sir.
-Melvin
resources.c.rej
Description: Binary data
I'm remailing this idea since we haven't discussed it in a while.
I would like an elegant, easy to use solution for making the GC
play nicely.
I propose a solution that allows us to draw a electric fence around
the current scope by using some call as follows:
gc_crit();
I decided to do some profiling and tinkering and I picked the PerlInt class
since its one of the most common. There is a large gap between our
MOPS benchmarks when using the plain INT registers as opposed to
the PMC regs.
There seems to be much room for optimization in the PMC virtual
methods,
At 07:25 PM 5/18/2002 -0400, Dan Sugalski wrote:
# Flag handling, or at least feature enabling, should probably be done
# by core code. We should provide a set_feature() function
Right now we have something like this:
Parrot_setflag(interpreter, PARROT_CGOTO_FLAG, NULL);
I'm not sure
At 07:33 PM 5/18/2002 -0400, Dan Sugalski wrote:
At 7:25 PM -0400 5/18/02, Melvin Smith wrote:
Yeh I know that word is yucky and from Java land, but in this case, I
think that
system PMCs should take liberties for optimization.
*All* PMCs should take liberties for optimization. PMC vtable
I think the inc/dec op (NUM, NUM) should be (NUM, INT)
While I'm adding the PMC support for inc/dec I'll
fix that, unless I'm wrong. INC/DEC by a NUM is not
in the PDD.
-Melvin
Filled in some missing holes:
-Implement PMC inc/dec functions and add ops to engine.
'inc P0, 5' is faster than 'set P0, P1, 5' which uses a vtable.
-Corrected 'inc Nx, Ny' to 'inc Nx, Iy' as per the PDD
-Added missing 'add Nx, Ny, Iz' op
Updated mops_p.pasm to use dec op, however, the intent
on Networking support (EXPERIMENTAL) ? [Y]
Right now the easiest way is to put it in Makefile.in or config_h.in,
like the computed goto switch.
??
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
For those of you not on cvs list:
I committed a rewrite of the find_op() code generator.
You'll need to re run Configure.
Uses a sorted hash and nets about 40% of the speed of the
500k unrolled switch() statement. Feel free to tune it even more than I did.
Upside is compiles are way faster,
At 11:12 AM 5/15/2002 +0300, SlowByte wrote:
Many thanks, this really rocks on my machine with 128MB of RAM :) I think
compiles are about a minute faster now :)
Thats good to hear.
One thing that worries me is the size of the parrot executable, right now it's
about 350k and growing. When
stuff for performance.
I'm open to adding a dest_len arg or something, but consider this a
request for comments on any additional string semantics that we might
be missing that I'm unaware of.
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
Eek, I really don't talk that way, hurriedly typed messages come off
looking like I'm in 5th grade with all the spelling errors..
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
I would love to, except while I was browsing through the KEY* operations
trying to understand what was actually being done, a big snarly,
slobbering,
comment eating beast rushed out from behind some lines of code and
chased me for about a 1/2 a mile.
-Melvin Smith
IBM :: Atlanta Innovation
At 08:30 PM 5/14/2002 +0100, Leon Brocard wrote:
Here is a terribly simple genclass.pl patch to make the generated
classes actually compile. No, I don't know what to do about
the bad comment, either.
Applied. Kevin mailed the same one last week.
-Melvin
The byte-order stuff really ought to clean up after itself.
Eep, sorry. I'm gonna redo it in Perl anyway. :)
-Melvin
At 11:37 PM 5/12/2002 -0400, Jeff wrote:
With the latest checkin, the new assembler fully functions and can call
keyed operations. No operations yet, but the infrastructure is there,
and I'll see about adding some basic operations tonight.
Cheer, the barge is moving once again!
I'll work with
At 06:18 PM 5/11/2002 -0400, Bryan C. Warnock wrote:
On Sat, 2002-05-04 at 01:52, Melvin Smith wrote:
Reposted to the list so people can comment.
As per the IRC discussion with Dan.
I've made some progress, not all there, but getting there.
I have the loader handling arbitrary
/19 test scripts, 94.74% okay. 1/340 subtests failed, 99.71% okay.
make: 1254-004 The error code from the last command is 2.
One test failed, it appears to be the good old -0
Its the sign of nothing
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
The broken 64bit systems seem to be related to compiling
Parrot with a different wordsize than Perl5, since I'm currently
getting byteorder from Perl5 Config.pm.
I guess we will have to compute it ourselves after Parrot
has picked what type to use for INTVAL/opcode_t
-Melvin
I have a patch almost complete that makes Parrot handle bytecode
files across platforms (does endian and wordsize transform), but there is
one glaring non-portability, and that is that we are storing floating point
constants in native format.
We need to discuss how we want to portably store
Reposted to the list so people can comment.
As per the IRC discussion with Dan.
I've made some progress, not all there, but getting there.
I have the loader handling arbitrary byteordering, now I'm
working on wordsize transforms.
The good thing here is I'm documenting the code as I go, so
Now that Clint has Eliza running on Parrot, I propose that
from henceforth, Eliza shall field all newbie questions
and take responsibility of the FAQ.
Eliza should also field discussions concerning why we don't
add new keywords such as elloopo; if you can convince
Eliza, then the proposal shall
on, seriously? I've been watching
the Athlon XP chips drop in price and want to rebuild my single
CPU Linux box with one soon.
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
At 12:18 PM 4/28/2002 -0400, Dan Sugalski wrote:
At 8:32 AM -0400 4/26/02, Melvin Smith wrote:
I might take a look at 34 this weekend if I can finish moving.
I thought you were busy getting married and honeymooning and such? I do
*not* want to be responsible for your SO having to find
At 11:44 AM 4/28/2002 -0400, Dan Sugalski wrote:
At 7:00 AM +0100 4/27/02, Piers Cawley wrote:
Andrew J Bromage [EMAIL PROTECTED] writes:
G'day all.
On Fri, Apr 26, 2002 at 08:16:27AM -0400, Melvin Smith wrote:
I also vote for reserving some caller-save registers to make
arg passing
At 12:09 PM 4/29/2002 +1000, Andrew J Bromage wrote:
G'day all.
On Sun, Apr 28, 2002 at 09:49:35PM -0400, Melvin Smith wrote:
I don't think I and Andrew were saying we shouldn't do caller-save, we
were just discussing that the calling convention (read activation record of
a subroutine
I also vote for reserving some caller-save registers to make
arg passing faster, however, reserving 16 is probably useless, except
for symmetry.
I think most texts agree that 5 or so are about all you need.
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
I might take a look at 34 this weekend if I can finish moving.
Concerning 1, what do you mean by 'closing out'? I assume you
want ops to save and restore stack frames referenced by a PMC?
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
At 02:08 PM 4/12/2002 -0400, Dan Sugalski wrote:
At 12:49 PM +0200 4/12/02, Paolo Molaro wrote:
On 04/11/02 Dan Sugalski wrote:
I'm not sure which is worse--the amount of data we're copying around,
or the fact that we eat Mono's lunch while we do so.
:-)
Could you post the code for the
Here it is. You can cut all of the Cola support __* subs
except __strlen or just replace the bsr __strlen with the actual
op.
-Melvin
# Cola (0.0.4) generated
#
_START:
save
bsr __Main
__END:
end
__Generate: pushi
pushs
pushn
At 12:40 PM 4/10/2002 -0400, Dan Sugalski wrote:
To forestall potential incidents of Warnock's Dillemma...
I'm about to apply a whole heap 'o patches to Parrot. (With appropriate
[APPLIED] responses, I hope) If, at the end of the day, I have *not*
applied or commented on a patch you've sent,
At 10:40 PM 4/10/2002 -0400, Bryan C. Warnock wrote:
On Wednesday 10 April 2002 12:53 pm, Melvin Smith wrote:
I think there is at least one outstanding patch from Brian Warnock called:
stacks.c
Hmmm, looking in my outbox, I see only one recent patch of mine
that mentions stacks.c, and its
At 06:32 PM 4/7/2002 -0400, Roman Hunt wrote:
Hello all:
I was just begining work on the string api and was wondering what
libraries are allowed for use inside the interpreter. Mainly
I want to know if I can use stdarg.h
I would expect that should be fine, stdarg is one of the 4
At 05:49 PM 4/8/2002 -0400, Roman Hunt wrote:
hello:
and importance, but I feel up to the task. (Read: Please, be
patient with the newbie). I have begun work on
The more the merrier, its been too quiet this last week.
find the definition for the string_vtable it is
At 06:10 PM 4/8/2002 -0700, Steve Fink wrote:
On Mon, Apr 08, 2002 at 07:01:44PM -0400, Melvin Smith wrote:
At 05:49 PM 4/8/2002 -0400, Roman Hunt wrote:
find the definition for the string_vtable it is not in
Try classes/perlstring.pmc
Keep in mind there is the primitive
At 11:40 PM 4/8/2002 -0400, Michel J Lambert wrote:
2) I'm thinking of an internal stack not visible to user code that we use
for temporary PMCs and Buffers and a simple macro for entry and
exit of GC sensitive routines. I think I might have mentioned this.
What defines a
At 10:30 PM 4/8/2002 -0700, Robert Spier wrote:
Keep track of global (or interpreter local) scope with a macro
upon entry.
I shudder every time someone says macro on p6i.
perl5 has several thousand macros defined. (grep for ^#define) (over 8000
if you include all the embedding macros. it's
At 01:17 AM 4/9/2002 -0400, Michel J Lambert wrote:
The first example is the following code, which calls parrot_allocate to
create the string each time.
Might both of these be solved by using arenas?
-Melvin
At 01:48 AM 4/9/2002 -0400, Michel J Lambert wrote:
the malloc()/free() situation which is one of the primary reasons we
use garbage collection in the first place, so why reinvent the same
situation with different syntax?
Generally, malloc/free are used in more complex situations than just
Suure you will. :)
-Melvin Smith
IBM :: Atlanta Innovation Center
[EMAIL PROTECTED] :: 770-835-6984
Dan Sugalski
At 11:12 AM 1/2/1970 +0100, James A Duncan wrote:
Morning (BST) all,
I've started work on B::Parrot, which is a Perl 5 to Parrot translation
engine. Its very basic at the moment, but I've got it successfully
translating things like:
my $perliv = 10;
my $perlpv = \n;
print $perliv;
print
At 10:40 AM 3/30/2002 -0500, Melvin Smith wrote:
At 09:09 AM 3/30/2002 -0500, Dan Sugalski wrote:
At 1:03 AM -0500 3/30/02, Melvin Smith wrote:
Frame stacks now keep their size, no use in freeing the chunks; if we
reached a frame depth N once, we will typically reach N many more times
Add a 'depth' operation that returns the depth of the user stack. If
the name bothers anyone, feel free to rename it. (Some might call it
the 'height' of the stack, for instance.)
Since you mentioned it...
How about a set of ops that does complete environment save/restore.
I suppose this
At 08:05 AM 4/3/2002 +0200, Peter Gibbs wrote:
chances are very small, but not zero. Why are we passing a C-style string
around inside parrot anyway?
The IO layer is going to be stringified soon.
-Melvin
Cola now supports conditional expressions in the C#/Java form.
See cola/examples/expressions.cola
-Melvin
At 10:31 PM 4/1/2002 -0500, Josh Wilmes wrote:
What is this supposed to do? It breaks the tcc build, and generally looks
ungood to me.
sleep(1) is an optimization ?
Is this the real Simon Cozens? :)
Is this a pop quiz??
Did you see that gremlin..
-Melvin
At 01:48 AM 4/2/2002 -0500, Josh Wilmes wrote:
Added macros for working with the interpreter-flags structure, following
the _SET/_CLEAR/_TEST convention from pdd07.
Nice cleanup.
-Melvin
I just committed 0.0.4 update to the Cola compiler.
Besides minor code cleanups, new features are:
Bitwise operators , , |, , ~, ^
Logical operators , ||
Complex conditionals:
Logical expressions do lazy left right evaluation in the
standard C style.
if(i == 0 || j == 0 || k == 0) {
At 09:09 AM 3/30/2002 -0500, Dan Sugalski wrote:
At 1:03 AM -0500 3/30/02, Melvin Smith wrote:
Frame stacks now keep their size, no use in freeing the chunks; if we
reached a frame depth N once, we will typically reach N many more times.
If someone's feeling ambitious, code to check the number
At 09:38 AM 3/30/2002 -0500, Dan Sugalski wrote:
With the recent stack and GC patches, are we pretty much solid now? If so,
a 0.0.5 bugfix release may well be in order.
My crashme program crashes no more, we are 10x more stable than
a week ago. I think Peter's patch or a variation is in order,
At 04:59 PM 3/30/2002 +0200, Peter Gibbs wrote:
Dan Sugalski [EMAIL PROTECTED] wrote
With the recent stack and GC patches, are we pretty much solid now?
If so, a 0.0.5 bugfix release may well be in order.
The one outstanding issue that I know of is the mem_realloc problem in
add_pmc_to_free
At 06:45 PM 3/30/2002 +, Nicholas Clark wrote:
On Sat, Mar 30, 2002 at 10:52:35AM -0500, Melvin Smith wrote:
At 09:38 AM 3/30/2002 -0500, Dan Sugalski wrote:
With the recent stack and GC patches, are we pretty much solid now? If
so,
a 0.0.5 bugfix release may well be in order.
My
I did some browsing of the code for potential problems in compiling
for embedded platforms and/or general porting and here are some of the
things I found.
1- assert.h and use of assert()
assert is easy enough to implement we need to do this and not depend
on its existence on the target
At 09:56 PM 3/30/2002 -0800, Russ Allbery wrote:
Melvin Smith [EMAIL PROTECTED] writes:
5- Other misc includes that should be wrapped in ifdefs are:
sys/types.h, sys/stat.h, fcntl.h (btw parrot.h includes fcntl.h
twice, once inside an ifdef and then by default).
What platform
At 01:06 AM 3/31/2002 -0500, Michael G Schwern wrote:
On Sun, Mar 31, 2002 at 12:49:08AM -0500, Melvin Smith wrote:
I did some browsing of the code for potential problems in compiling
for embedded platforms and/or general porting and here are some of the
things I found.
Do embedded C
At 10:56 PM 3/30/2002 -0800, Brent Dax wrote:
Melvin Smith:
# At 01:06 AM 3/31/2002 -0500, Michael G Schwern wrote:
# On Sun, Mar 31, 2002 at 12:49:08AM -0500, Melvin Smith wrote:
Ouch. They actually expect you to be able to do anything useful without
the other headers?
Grin, I agree -- go ask
At 03:25 AM 3/29/2002 -0500, Michel J Lambert wrote:
The attached patch fixes a bunch of bugs. They are:
I've reviewed this one and I'd like to apply it the GC
portion, but I'm not sure about the PMC patch.
Are you sure the following is correct?
RCS file:
At 10:28 AM 3/29/2002 -0800, Brent Dax wrote:
# Aren't they redundant?
The cache.* is intended to just be *shortcuts* to commonly-accessed
data, *not* pointers to completely different data. That's why it's
referred to as a cache.
Ok, clear enough. Even clearer would be a comment in pmc.h
for
At 10:17 AM 3/29/2002 -0800, Steve Fink wrote:
For example:
op puts(in STR) {
if (($1) string_length($1)) {
PIO_write(interpreter, PIO_STDOUT(interpreter), ($1)-bufstart,
string_length($1));
}
goto NEXT();
}
Everywhere else the code
At 07:57 PM 3/29/2002 +0200, you wrote:
Michel J Lambert [EMAIL PROTECTED] wrote:
Attached is a .pasm file which causes some string data to be written into
the middle of the string_pool-pool_buffer list of entries, such that when
it tries to dereference foo in new_pmc_header, it's pointing
At 11:12 AM 3/29/2002 -0800, Steve Fink wrote:
On Fri, Mar 29, 2002 at 03:25:19AM -0500, Michel J Lambert wrote:
The attached patch fixes a bunch of bugs. They are:
It looks good to me, with one caveat. 'immortal' sounds wrong to me,
since that has another (useful) meaning -- the Java VM, for
Frame stacks now keep their size, no use in freeing the chunks; if we
reached a frame depth N once, we will typically reach N many more times.
-Melvin
At 10:30 PM 3/28/2002 -0800, Steve Fink wrote:
When you call pmc_new, the init() routine is run before the PMC is
anchored to the root set. This is a problem for things like
aggregates, because they are likely to want to allocate a big Buffer
during initialization. And disabling GC entirely just
At 10:50 PM 3/28/2002 -0800, Steve Fink wrote:
The string_* functions treat NULL and an empty string as equivalent, so
this saves time in case we don't actually do anything with the string.
Okay, I just checked and you're right. I ran into it because not
everything goes through the string_*
At one point I heard someone in charge say that NULLs were treated
as invalid internal state and a routine was not obligated to check for
NULL registers.
If this is no longer the case, or never was, then I was either mistaken or
missed the email. Especially since I was arguing _for_
At 02:25 AM 3/29/2002 -0500, Josh Wilmes wrote:
Try this:
http://www.mail-archive.com/perl6-internals@perl.org/
Ah great! Last time I tried this it was dead. Must have
been a temporary thing.
-Melvin
That's what confused me too. But now I think that must have been for
PMC registers only, not string registers.
From the archive:
So speaketh Dan.
I seem to remember someone unpatching a couple of if (NULL == string)
statements recently. I'll be blunt and say: DON'T DO THAT. Defensive
At 03:16 AM 3/27/2002 -0500, Michel J Lambert wrote:
Doh, sorry about that.
If it makes you feel any better (or worse), I was in the midst of writing
up the email for fixing the pushp bug you mentioned, when up pops '[PATCH]
Stack fix' in my email inbox, turning my local bug fix into a nice
At 09:47 AM 3/27/2002 +0200, Peter Gibbs wrote:
- Original Message -
From: Melvin Smith [EMAIL PROTECTED]
../parrot reverse.pbc string.c
file prints out pre-reverse call
recurse depth 0
Segmentation fault (core dumped)
This seems to caused by a nice timing problem
At 02:55 AM 3/27/2002 -0500, Michel J Lambert wrote:
Attached is a patch to implement computed-goto on gcc, taken from the
Wow, talk about timing, I was up late working on computed goto core
just now, and had hacked ops2c.pl and CGoto.pm. I had to remove
prederef stuff until I could look at it.
At 12:16 AM 3/27/2002 -0800, Brent Dax wrote:
Melvin Smith:
# At 02:55 AM 3/27/2002 -0500, Michel J Lambert wrote:
# Attached is a patch to implement computed-goto on gcc, taken from the
# Right now most of us have no clue whos doing what anymore besides Dan
# doing GC, Jeff doing unicode, Simon
As requested, I wrote a nasty little recursive program to test
strings, memory and call stacks. Immediately bad stuff happened
when the stack frames outgrew a single chunk and a new one was
allocated. When the frame stack reached FRAMES_PER_CHUNK,
the new chunk gets allocated, etc, etc. and bad
At 01:00 PM 3/23/2002 -0500, Clinton A. Pierce wrote:
For your weekend entertainment, here's a bit of parrot assembler for the
adventurous to play with. To get the code, just head to:
http://geeksalad.org/basic and download the latest tar bundle you
find. The README.basic file included in
I've just fixed several bugs in the read ops, I commited so do a cvs update.
They were in the ops, not the IO system. Hasty coding is to blame, but I'm
glad someone is actually testing this now.
I wrote a slurp test that reads in a file by line and concats each buffer
to the
main string, then
At 01:42 PM 3/23/2002 -0800, Brent Dax wrote:
and Python--languages where you can redefine the world at any time. JVM
and the CLR aren't written in a way that allows for such dynamic
behavior, so we're making a third VM that does.
... and one VM to rule them all
-Melvin
At 04:46 PM 3/23/2002 -0500, Dan Sugalski wrote:
At 4:41 PM -0500 3/23/02, Melvin Smith wrote:
At 01:42 PM 3/23/2002 -0800, Brent Dax wrote:
and Python--languages where you can redefine the world at any time. JVM
and the CLR aren't written in a way that allows for such dynamic
behavior, so we're
At 05:45 PM 3/23/2002 -0500, Clinton A. Pierce wrote:
At 04:31 PM 3/23/2002 -0500, you wrote:
I've just fixed several bugs in the read ops, I commited so do a cvs update.
They were in the ops, not the IO system. Hasty coding is to blame, but I'm
glad someone is actually testing this now.
I wrote
At 10:06 AM 3/22/2002 -0500, Joshua Nye wrote:
Doh! Applied now.
But this fails now:
set S0, test
set I0, 234
save S0
save I0
restore S1
restore I1
end
With error message: Wrong type on top of stack!
Not sure if this is intended though. I though each type (INT,NUM,PMC,STR)
has it's own stack?
Well you can now write neato string code with Parrot with standard
array notation. I mapped it onto the substr w/replace op.
// copy a string
int i = 0;
while(str[i] != )
newstr[i] = str[i++];
-Melvin
At 05:13 PM 3/21/2002 -0500, Dan Sugalski wrote:
Folks,
I've added or enabled the following ops:
clone Sx, sy
I'm not seeing the difference between clone Sx, sy and set Sx, sy
When I do:
set S30, PARROT
set S31, S30
chopn S30, 2
print S30
print \n
print S31
print \n
end
I still get:
Just committed the set Sx, iy op.
Patch at end.
Cheers,
-Melvin
Tested with following:
# Cola (0.0.1) generated
#
_START:
bsr __Main
__END:
end
__Main:
set I31, -123456789
LBL1:
ge I31, 123456789, LBL2
set S0, I31
At 08:53 PM 3/21/2002 -0800, Brent Dax wrote:
Just do $1=Parrot_sprintf_c(interpreter, %Vd, $2);. I've already
implemented this logic there; there's no sense having it in the core
twice.
Calling the sprintf routine is kind of expensive if the op is only to
convert an
int to a base10 string
Just in time for 0.0.5 :)
We need this. Check it over first. I ran various test cases on it, will write
up the test scripts ASAP.
Implements the substr with replace variation as per the Perl semantics (I
think).
I'll commit after the 0.0.4 freeze if it looks correct.
It might need another
At 11:53 PM 3/19/2002 +, Simon Cozens wrote:
Melvin Smith:
Just in time for 0.0.5 :)
I'll commit after the 0.0.4 freeze if it looks correct.
Bit late for that; 0.0.4's on CPAN. Release announcement soon. :)
*grin*, notice I said 0.0.5 :P
-Melvin
Bit late for that; 0.0.4's on CPAN. Release announcement soon. :)
Oh yeah, I forgot to sayWHOP!
-Melvin
At 07:25 PM 3/19/2002 -0500, Simon Glover wrote:
(I can send it as a patch on top of your core.ops patch if you'd prefer).
Thanks there mate! I'll patch it in and commit. :)
-Melvin
FYI I committed the new substr op.
Need to write the automated test cases for it now...
-Melvin
Here is the first version of my little languge, Cola (Java pun intended).
Its not fancy, has few warnings, but what can I say?
Please read the README and the examples before
playing with it, and please keep all criticism constructive. ;)
It has no fancy Configure script, but it builds and tests
301 - 400 of 511 matches
Mail list logo