Announcing "Amber for Parrot 0.2.3 (Cornwall)"

2005-08-18 Thread Roger Browne
I have released "Amber for Parrot" version 0.2.3 (Cornwall): Downloads: http://xamber.org/download.html Release history: http://xamber.org/history.html Project home page: http://xamber.org/index.html "Amber for Parrot" is an Eiffel-like scripting language for the Parrot Virtual Machine. Changes

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Leopold Toetsch
On Aug 18, 2005, at 21:54, Uri Guttman wrote: "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes: LT> Here is a plan to implement most of the needed bits. LT> # constant pi = 4 * atan2(1,1); LT> translates to LT> .sub anon_1 @IMMEDIATE, @ANON LT> $N0 = atan 1.0, 1.0 LT>

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Uri Guttman
> "LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes: LT> Here is a plan to implement most of the needed bits. LT> # constant pi = 4 * atan2(1,1); LT> translates to LT> .sub anon_1 @IMMEDIATE, @ANON LT> $N0 = atan 1.0, 1.0 LT> $P0 = new .Float LT> $P0 = $N0 LT

Re: my $pi is constant = 3;

2005-08-18 Thread Autrijus Tang
On Fri, Aug 19, 2005 at 01:36:30AM +0800, Autrijus Tang wrote: > BEGIN { > &foo := a Sub is stub { > ($a) := &?Internals::GETARGS(); > $a = 1 unless exists $a; > # real body begins here > ... > }; > } Er, sorry, the ($a) would need a my()

Re: my $pi is constant = 3;

2005-08-18 Thread Larry Wall
On Fri, Aug 19, 2005 at 01:36:30AM +0800, Autrijus Tang wrote: : On Thu, Aug 18, 2005 at 10:26:00AM -0700, Larry Wall wrote: : > Sure. Though it probably also wants to stay as metadata associated : > with the signature, since part of the reason for putting it in : > the signature in the first plac

Re: my $pi is constant = 3;

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 10:26:00AM -0700, Larry Wall wrote: > Sure. Though it probably also wants to stay as metadata associated > with the signature, since part of the reason for putting it in > the signature in the first place is so that optimizers can install > constants on the caller end, at l

Re: my $pi is constant = 3;

2005-08-18 Thread Larry Wall
On Fri, Aug 19, 2005 at 01:17:51AM +0800, Autrijus Tang wrote: : Also, preemptively -- I think the corresponding "delete $a" is insane, : as it would just lift up the constancy problem one level, defeating the : no rebinding restriction. I think in general the only time you're allowed to monkey wi

Re: my $pi is constant = 3;

2005-08-18 Thread Larry Wall
On Fri, Aug 19, 2005 at 01:15:23AM +0800, Autrijus Tang wrote: : On Thu, Aug 18, 2005 at 10:09:16AM -0700, Larry Wall wrote: : > In other words, you could desugar : > : > sub foo ($a = 1) {...} : > : > to : > : > sub foo ($a) { : > $a = 1 unless exists $a; : > ... : > } : :

Re: Serializing code

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 08:22:20PM +0300, Yuval Kogman wrote: > > sub foo { $?DOM.document.write(...) } > > BEGIN { foo() }; # error, there's no $?DOM object > ># at compile-time! > > Unless you're compiling in the browser ;-) Which... is possible, and that's

Re: Serializing code

2005-08-18 Thread Yuval Kogman
On Thu, Aug 18, 2005 at 12:24:40 +, Ingo Blechschmidt wrote: > Hi, > > Yuval Kogman woobling.org> writes: > > So now that the skeptics can see why this is important, on the > > design side I'd like to ask for ideas on how the code serialization > > looks... > > > > sub { $?DOM.docume

Re: my $pi is constant = 3;

2005-08-18 Thread Autrijus Tang
On Fri, Aug 19, 2005 at 01:15:23AM +0800, Autrijus Tang wrote: > On Thu, Aug 18, 2005 at 10:09:16AM -0700, Larry Wall wrote: > > In other words, you could desugar > > > > sub foo ($a = 1) {...} > > > > to > > > > sub foo ($a) { > > $a = 1 unless exists $a; > > ... > > } > >

Re: my $pi is constant = 3;

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 10:09:16AM -0700, Larry Wall wrote: > In other words, you could desugar > > sub foo ($a = 1) {...} > > to > > sub foo ($a) { > $a = 1 unless exists $a; > ... > } I like this. Can we go for it, at least for this week? :) Thanks, /Autrijus/ pgpj

Re: my $pi is constant = 3;

2005-08-18 Thread Larry Wall
On Wed, Aug 17, 2005 at 05:31:12PM +, [EMAIL PROTECTED] wrote: : Not only that, but what if what I want is a named constnat undef value? If we went with "bind once" rather than "write once" semantics then after my $foo is readonly := undef; $foo could not be rebound, but saying my $

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 10:02:23AM -0700, chromatic wrote: > On Wed, 2005-08-17 at 23:43 -0500, Dave Rolsky wrote: > > > But I'd really like to get this stuff done at compile time wherever > > possible. If I write this: > > > >validate( credit_card_number: $number ); BTW, the colon is on t

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-18 Thread chromatic
On Wed, 2005-08-17 at 23:43 -0500, Dave Rolsky wrote: > But I'd really like to get this stuff done at compile time wherever > possible. If I write this: > >validate( credit_card_number: $number ); > > it should blow up at compile time, right? Does that depend on how closed you want Perl 6

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-18 Thread Larry Wall
On Thu, Aug 18, 2005 at 11:03:22AM -0500, Dave Rolsky wrote: : Hurry up and finish. I want to use this language, darnit! And yes, I : know about pugs, obviously, but for production usage I need less of a : moving target ;) Yes, Perl 6 is a moving target--but one of the most bothersome facts of

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 06:00:43PM +0200, Leopold Toetsch wrote: > This shouldn't be a problem (at least when the last few globals from > imcc are gone), i.e. compilation / running code should be fully re-rentrant. Oooh, that will be much better. > BTW can you explain why the above example print

Re: Hoping that Params::Validate is not needed in Perl6

2005-08-18 Thread Dave Rolsky
On Thu, 18 Aug 2005, Autrijus Tang wrote: On Wed, Aug 17, 2005 at 11:45:52PM -0500, Dave Rolsky wrote: And another question. How will I make Perl6 not do automatic coercion for me. If I have this sub: sub date (Int +$year is required, +$month, +$day) BTW, Pugs supports the ++ syntax, whic

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Leopold Toetsch
Autrijus Tang wrote: On Thu, Aug 18, 2005 at 04:51:58PM +0200, Leopold Toetsch wrote: There was some recent discussion [1] [2] on p6l about BEGIN blocks and constant, which is executed at compile time too. Parrot has since quite a time the @IMMEDIATE subroutine pragma, which causes execution

Re: Implementing perl BEGIN blocks

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 04:51:58PM +0200, Leopold Toetsch wrote: > There was some recent discussion [1] [2] on p6l about BEGIN blocks and > constant, which is executed at compile time too. > > Parrot has since quite a time the @IMMEDIATE subroutine pragma, which > causes execution of subs during

Re: Is Configure.pl missing ICU ?

2005-08-18 Thread jerry gay
forgot to copy the list on this response -- Forwarded message -- From: jerry gay <[EMAIL PROTECTED]> Date: Aug 18, 2005 8:05 AM Subject: Re: Is Configure.pl missing ICU ? To: Adrian Lambeck <[EMAIL PROTECTED]> On 8/18/05, Adrian Lambeck <[EMAIL PROTECTED]> wrote: > Since nobody r

Implementing perl BEGIN blocks

2005-08-18 Thread Leopold Toetsch
There was some recent discussion [1] [2] on p6l about BEGIN blocks and constant, which is executed at compile time too. Parrot has since quite a time the @IMMEDIATE subroutine pragma, which causes execution of subs during compilation. But these subroutines can't return a result so it's rather

Re: Serializing code

2005-08-18 Thread Autrijus Tang
On Thu, Aug 18, 2005 at 12:24:40PM +, Ingo Blechschmidt wrote: > >- closures? > A subclass of Code, e.g. Bare. There is no Bare anymore: Code - Routine - Block Thanks, /Autrijus/ pgplvP6gLhemH.pgp Description: PGP signature

RE: Is Configure.pl missing ICU ?

2005-08-18 Thread Adrian Lambeck
Since nobody responded to my question up to now I had a look at the parrot source. Just to remind you what I was asking: Eventough parrot is compiled with icu support this does not show up when I query parrot for it (i.e. # /usr/lib/parrot-0.2.3/parrot parrot-config.imc libs). So I looked at co

Re: Serializing code

2005-08-18 Thread Ingo Blechschmidt
Hi, Yuval Kogman woobling.org> writes: > So now that the skeptics can see why this is important, on the > design side I'd like to ask for ideas on how the code serialization > looks... > > sub { $?DOM.document.write("hello world!") }.emit( > :runtime($browser_autodetect_object), >

Re: Time::Local

2005-08-18 Thread Dan Kogai
On Aug 17, 2005, at 00:29 , Larry Wall wrote: which gives us these possibilities. 大務big / (perform) duty Perl6 to people here. 太夢fat, big / dream Perl6 for the rest of us. 対夢oppose, against, pair / dream Pugs? 待夢wait / dream Perl6 to Oreilly ? 滞

Re: my $pi is constant = 3;

2005-08-18 Thread mark . a . biggar
-- Mark Biggar [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]> On Wed, Aug 17, 2005 at 08:47:18AM -0700, Larry Wall wrote: > > : >That could be made to work by defining constant to mean you can assign > > : >to it if it's undefined. But then it gets a little harder to reason > > : >about

Re: my $pi is constant = 3;

2005-08-18 Thread Adam Kennedy
Larry Wall wrote: > On Wed, Aug 17, 2005 at 01:56:35PM +1000, Adam Kennedy wrote: > : > : >: If not a special form, should this work? > : >: > : >: my $pi is constant; > : >: $pi = 3; > : > > : >That could be made to work by defining constant to mean you can assign > : >to it if it's und

RE: Ambiguity of parsing numbers with underscores/methods

2005-08-18 Thread Gordon Henriksen
Larry Wall wrote: > Yes, that's a convenient escape. But really, arguments from principle > aside, the underlying question is what someone will see if they look > at 1.e5, and I suspect most people will see a number with an exponent. > This is a spot where Ruby violates Least Surprise, at least f

Re: Time::Local

2005-08-18 Thread Braňo Tichý
Well, right now one of the great things about looking at the wall to read the clock and see the time, is that you know that based on the time of day and the time of year, and where you are, roughly how far through the actual solar day it is. It's crude, but useful. Just ask a Dairy Farmer. Do