Re: MMD as an object.

2005-03-11 Thread Leopold Toetsch
Bob Rogers <[EMAIL PROTECTED]> wrote: >From: Leopold Toetsch <[EMAIL PROTECTED]> >1) is there a MultiSub object with one short name that holds all >possible long names (and function references)? >If yes, who is creating it: the Perl6 compiler emits code to do so or >it's up to

Re: MMD as an object.

2005-03-11 Thread Leopold Toetsch
Rod Adams <[EMAIL PROTECTED]> wrote: > Leopold Toetsch wrote: >>Discussion seems to have went off into esoteric cases of locally >>overriden dispatcher policies and what not. > I don't think it's as esoteric as you might think. Consider: > package Foo; > use MMD::Random; > our &bar

Re: Junctions - feedback and desires

2005-03-11 Thread Leopold Toetsch
Rod Adams <[EMAIL PROTECTED]> wrote: > Well > if 10 < $j < 1 { ... } > if 10 < $j { if $j < 1 { ... }} > Could easily wind up with the same opcodes. No. In the first case $j is evaluated just once. In the second case it's evaluated twice. leo

Re: Regarding status of Parrot and pure perl Perl6 compiler

2005-03-11 Thread Millsa Erlas
Markus Laire wrote: I've been following the development of pugs (http://pugscode.org/), so I can give a short answer based on that. While pugs is currently written in Haskell, roadmap does mention the idea to eventually port pugs to perl6 if needed, which would give us a Perl 6 compiler writte

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Leopold Toetsch
Michal Jurosz <[EMAIL PROTECTED]> wrote: > Failed TestStatus Wstat Total Fail Failed List of Failed [ 50 failing ] > imcc/t/imcpasm/opt1.# Failed test (imcc/t/imcpasm/opt1.t at line 626) > # got: '_main: > # set N0, 1.6e+022 > # end > # ' > # expected: '_main: > #

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Leopold Toetsch
Matt Diephouse wrote: On Thu, 10 Mar 2005 22:23:07 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: Matt Diephouse <[EMAIL PROTECTED]> wrote: Some of these same tests are failing on debian, fedora, and freebsd (fresh checkouts). It looks like someone broke something. Release or current CVS? Curr

Re: MMD as an object.

2005-03-11 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: Ok. If you'd really need such random dispatch, it could be done like this, when I interpret A12 correctly: sub run_random_bar($x) { my @meths = WALKMETH($x, :method('bar')); my $meth = @meths[rand(@meths.elems)]; $meth($x); } or even with my sub bar($x) {...}

[PUGS] patch - few hyperops

2005-03-11 Thread Markus Laire
This patch adds these binary-hyperops to pugs: »+« »*« »/« »x« »xx« This is my first patch ever, so could someone check if this is OK or not. This only adds few hyperops, as I'm not 100% sure if this is the right way to do it. Also currently this code emits following warning while compiling: src

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Peter Sinnott
On Fri, Mar 11, 2005 at 10:19:55AM +0100, Leopold Toetsch wrote: > Matt Diephouse wrote: > >On Thu, 10 Mar 2005 22:23:07 +0100, Leopold Toetsch <[EMAIL PROTECTED]> > >wrote: > > > >>Matt Diephouse <[EMAIL PROTECTED]> wrote: > >> > >> > >>>Some of these same tests are failing on debian, fedora, and

Re: Junctions - feedback and desires

2005-03-11 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: Well if 10 < $j < 1 { ... } if 10 < $j { if $j < 1 { ... }} Could easily wind up with the same opcodes. No. In the first case $j is evaluated just once. In the second case it's evaluated twice. You're right. I just di

Re: Problem with Readonly and Devel::Cover

2005-03-11 Thread James E Keenan
Kevin Scaldeferri wrote: Anyone seen this message with Readonly running under Devel::Cover: Invalid tie at (eval 22)[/usr/local/lib/perl5/site_perl/5.8.0/Readonly.pm:338] line 9 It's a little spooky... my tests used to be fine, but then I made a couple innocuous changes in one test file (changin

Re: MMD as an object.

2005-03-11 Thread Rod Adams
Leopold Toetsch wrote: Ok. If you'd really need such random dispatch, it could be done like this, when I interpret A12 correctly: sub run_random_bar($x) { my @meths = WALKMETH($x, :method('bar')); my $meth = @meths[rand(@meths.elems)]; $meth($x); } or even with my sub bar($x) {...} #

Object patches summary

2005-03-11 Thread Leopold Toetsch
The first bunch of patches is in. The visible part is a new opcode: op get_mro(out PMC, in PMC) This returns the array reference of the MRO (Method Resolution Order) Array. This is basically the same as the list of ISA strings, except that the MRO array contains class PMCs and abstract base cla

[PROPOSAL] MMD: multi sub syntax

2005-03-11 Thread Leopold Toetsch
I prefer test first programming. Therefore we need some syntax to get multi subs into the assembler. Albeit we even have two sets of MMD function registering opcodes (object.ops:mmd* , pmc.ops:mmdvt*) these are not adequate to implement a general MMD scheme. The opcodes allow just 2-dimensional

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Leopold Toetsch
[EMAIL PROTECTED] wrote: Strangely all the tests ( well pyclass pycomplex and pyfunc so far ) pass on freebsd but do so very very slowly and parrot is eating memory like there is no tomorrow. Gets above 300meg during each of the tests. That's really strange. During make test top shows around 5

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Peter Sinnott
On Fri, Mar 11, 2005 at 11:26:09AM +0100, Leopold Toetsch wrote: > [EMAIL PROTECTED] wrote: > >Strangely all the tests ( well pyclass pycomplex and pyfunc so far ) > >pass on freebsd but do so > > very very slowly and parrot is eating memory like there is no tomorrow. > >Gets above 300meg during

Re: Adding linear interpolation to an array

2005-03-11 Thread Thomas Sandlaß
Doug McNutt wrote: A word of caution: Just as in "vector operators" had their names changed to pacify the > mathematicians - thank you - there is a conflict in terms. Covariant and > contravariant tensors are the meat of Einstein's formulation of relativity. > It all has to do with transformation

Re: Adding linear interpolation to an array

2005-03-11 Thread Thomas Sandlaß
HaloO David, you wrote: I appreciate you attempting to explain this, but it remains clear as mud, at least to me. Could you please try again, using very short, very non-technical words and not assuming a mathematical or scientific background on the part of your reader? Ok, second attempt! The <: i

Re: MMD as an object.

2005-03-11 Thread Leopold Toetsch
Rod Adams <[EMAIL PROTECTED]> wrote: > If I were to need a different policy for a given method .bar, I would > likely create something called .bar much like your "run_random_bar", > which then dispatches amongst methods I name something like ._bar . > I see some detractions to this approach: > 1)

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Matt Diephouse
Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Is there any chance that parrot picked up an old installed version of > the shared libs? > > If you have done "make install" once and Configured with the defaults > you continue running the installed version of the shared libs. I have never run "make

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Matt Diephouse
Peter Sinnott <[EMAIL PROTECTED]> wrote: > > Probably should have tried this earlier but I have a little too > much faith in compilers. When I use gcc-2.95 it works(well all > tests pass) and memory is ok. With gcc-3.3 the tests fail > and memory usage is way up. The freebsd gcc is also 3.3.3 so th

Re: Adding linear interpolation to an array

2005-03-11 Thread Larry Wall
On Fri, Mar 11, 2005 at 03:58:13PM +0100, Thomas Sandlaß wrote: : Int @i; : Num @n = @i; # type error? I think the naive user is going to expect that to work, and I also suspect the naive user is right to expect it, because it makes sense. This may be one of those areas where we can successfully h

Re: SEND + MORE = MONEY (works now in pugs with junctions!)

2005-03-11 Thread Larry Wall
There's no doubt that the QM view of extended entanglement is very useful. After all, that's what the whole universe runs on. But most mortals will want the classical view to be the default, so we'll require some kind of explicit markup or pragma if you want to extend entanglement further out tha

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Leopold Toetsch
Peter Sinnott wrote: [ ~300 Meg memory in t/dynclasses used ] Probably should have tried this earlier but I have a little too much faith in compilers. When I use gcc-2.95 it works(well all tests pass) and memory is ok. With gcc-3.3 the tests fail and memory usage is way up. The freebsd gcc is also

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-11 Thread Nicholas Clark
On Fri, Mar 11, 2005 at 06:11:25PM +0100, Leopold Toetsch wrote: > Peter Sinnott wrote: > Can someone run this through valgrind or some other memory debugger please. I'm not sure if this test is the one you want. The fun output is near the end. $ valgrind ./parrot --gc-debug "/home/nick/Parrot/p

Re: SEND + MORE = MONEY (works now in pugs with junctions!)

2005-03-11 Thread Luke Palmer
Larry Wall writes: > There's no doubt that the QM view of extended entanglement is very > useful. After all, that's what the whole universe runs on. But most > mortals will want the classical view to be the default, so we'll > require some kind of explicit markup or pragma if you want to extend >

Parrot questions

2005-03-11 Thread theUser BL
I have already written this to perl6-all, but it seems, that it doesn't was send. I wanted to know, if any other scripting langue is plans to use parrot. Your plan of Parrot - as I have understood it - is to have not only a VM for Perl. You want to have a VM for diffeent languages, like the Java

Re: Strings - takers wanted

2005-03-11 Thread Aldo Calpini
Leopold Toetsch wrote: > 1) ICU should be optional > > If configured --without-icu the Makefile shouldn't contain ICU stuff, > and function calls to ICU (mainly in string_primitives) should be > wrapped inside #if PARROT_HAS_ICU. I'm gonna take this one (unless Steven Schubiger is already working o

Re: Adding linear interpolation to an array

2005-03-11 Thread Juerd
Larry Wall skribis 2005-03-11 8:45 (-0800): > On Fri, Mar 11, 2005 at 03:58:13PM +0100, Thomas Sandlaß wrote: > : Int @i; > : Num @n = @i; # type error? > I think the naive user is going to expect that to work, and I also > suspect the naive user is right to expect it, because it makes sense. > Th

Re: [PUGS] patch - few hyperops

2005-03-11 Thread Markus Laire
Thanks, applied. :) -- Markus Laire

Re: [PUGS] patch - few hyperops

2005-03-11 Thread Larry Wall
On Fri, Mar 11, 2005 at 12:53:45PM +0200, Markus Laire wrote: : This is my first patch ever, so could someone check if this is OK or : not. This only adds few hyperops, as I'm not 100% sure if this is the : right way to do it. It is good to have a general mechanism for wrapping any binary op up

Re: MMD as an object.

2005-03-11 Thread Rod Adams
Leopold Toetsch wrote: Rod Adams <[EMAIL PROTECTED]> wrote: If I were to need a different policy for a given method .bar, I would likely create something called .bar much like your "run_random_bar", which then dispatches amongst methods I name something like ._bar . I see some detractions t

Re: Parrot questions

2005-03-11 Thread [EMAIL PROTECTED]
>From one Perl6/Parrot lurker to another: On Fri, 11 Mar 2005 14:47:14 +, "theUser BL" <[EMAIL PROTECTED]> said: > Your plan of Parrot - as I have understood it - is to have not only a VM > for > Perl. You want to have a VM for diffeent languages, like the JavaVM (with > the languages Nice a

Codification of the defintion of time()

2005-03-11 Thread James Mastros
Hello, p6c-folks: As of about 5 minutes ago, time() in pugs was changed to give the number of seconds since Jan 1, 2000 rather then since Jan 1, 1970, based on Larry's post http://xrl.us/fet6. However, this doesn't appear in the Synopses, Apocalypses, or Exegeses at all. Can we get it stuck int

Codification of the defintion of time()

2005-03-11 Thread James Mastros
Hello, p6c-folks: As of about 5 minutes ago, time() in pugs was changed to give the number of seconds since Jan 1, 2000 rather then since Jan 1, 1970, based on Larry's post http://xrl.us/fet6. However, this doesn't appear in the Synopses, Apocalypses, or Exegeses at all. Can we get it stuck

Re: Parrot questions

2005-03-11 Thread Timm Murray
On Friday 11 March 2005 08:47 am, theUser BL wrote: > I have already written this to perl6-all, but it seems, that it doesn't was > send. > > I wanted to know, if any other scripting langue is plans to use parrot. > > Your plan of Parrot - as I have understood it - is to have not only a VM > for Pe

TAP and skip_rest

2005-03-11 Thread Jim Cromie
There is no skip_rest(), but skip_all() can do that job, with a tiny enhancement sub skip_all { -if (@_) { - print STDOUT "1..0 # Skipped: @_\n"; +if ($test == 1) { + if (@_) { + print STDOUT "1..0 \# Skipped: @_\n"; + } else { + print STDOUT "1..0\n"

Re: TAP and skip_rest

2005-03-11 Thread Michael G Schwern
On Fri, Mar 11, 2005 at 03:40:41PM -0700, Jim Cromie wrote: > There is no skip_rest(), but skip_all() can do that job, with a tiny > enhancement I would really rather it be called skip_rest(). There's no reason to wedge two different bits of functionality into one function.

Re: TAP and skip_rest

2005-03-11 Thread Andy Lester
On Fri, Mar 11, 2005 at 03:40:41PM -0700, Jim Cromie ([EMAIL PROTECTED]) wrote: > I think this is open to interpretation, at least its not specifically > excluded in > http://www.petdance.com/random/tap.html#skipping_tests Eeek, let's not refer to that any more. http://search.cpan.org/dist/Test-

Re: Parrot questions

2005-03-11 Thread MrJoltCola
At 09:47 AM 3/11/2005, theUser BL wrote: (with the languages Nice and Groovy) and .net, but written esecialy for scripting-languages. True, Parrot is slanted toward dynamic scripting languages that recompile and eval themselves on the fly, but it does provide low-level registers and features that

[Pugs] Should the int() function truncate or round?

2005-03-11 Thread Andrew Savige
Running this program with perl 5: my $i = int(1.9); print "i=$i\n"; produces the answer 1 (i.e. it truncates) while running it with Pugs produces the answer 2 (i.e. it rounds). Is this a bug or a feature? If a feature, how does one truncate with Pugs/Perl6? /-\ Find local movie times and trai

Re: [Pugs] Should the int() function truncate or round?

2005-03-11 Thread Darren Duncan
At 1:47 PM +1100 3/12/05, Andrew Savige wrote: Running this program with perl 5: my $i = int(1.9); print "i=$i\n"; produces the answer 1 (i.e. it truncates) while running it with Pugs produces the answer 2 (i.e. it rounds). Is this a bug or a feature? If a feature, how does one truncate with Pugs/P

Re: [Pugs] Should the int() function truncate or round?

2005-03-11 Thread Autrijus Tang
On Sat, Mar 12, 2005 at 01:47:24PM +1100, Andrew Savige wrote: > Running this program with perl 5: > > my $i = int(1.9); > print "i=$i\n"; > > produces the answer 1 (i.e. it truncates) while running it with Pugs > produces the answer 2 (i.e. it rounds). > > Is this a bug or a feature? It is a c

Re: [Pugs] Should the int() function truncate or round?

2005-03-11 Thread Andrew Savige
--- Autrijus Tang wrote: > It is a closed bug. :) Day 43: > > http://use.perl.org/~autrijus/journal/23524 > > "The int primitive now properly truncates, instead of rounds, the operand." > > 6.0.11 will be out in a couple days that includes this fix. Thanks. In case you're interested, I stu

Re: [PUGS] patch - few hyperops

2005-03-11 Thread Autrijus Tang
On Fri, Mar 11, 2005 at 12:25:28PM -0800, Larry Wall wrote: > It is good to have a general mechanism for wrapping any binary op > up as a hyper op. We'll eventually have to extend that idea into > the parser as well so that we don't have to dup all the operators, > but first things first. Yup, my

Re: SEND + MORE = MONEY (works now in pugs with junctions!)

2005-03-11 Thread Rod Adams
Sam Vilain wrote: I've changed examples/sendmoremoney.p6 in the pugs distribution to use junctions correctly to demonstrate that they *can* be used to solve these sorts of problems, and that it is just a matter of semantics and writing code correctly. However, poor semantics can make the task of wr