Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-23 Thread Dave Whipp
Darren Duncan wrote: I don't quite follow you. Are you saying your version of sqrt is an implicit declaration; maybe I don't understand how that differs from an explicit definition in this case? In any event, right at this moment I can't think of an answer to your question. Go ahead with

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-23 Thread Darren Duncan
Dave Whipp wrote: I actually agree that your explicit definition (a simple/efficient implementation in terms of other operators) is better for prelude than my declarative form (which isn't really declarative, because Perl6 isn't a declarative language). My only disagreement was with your

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-22 Thread Dave Whipp
Darren Duncan wrote: Dave Whipp wrote: sub sqrt(Num where { 0 = $_ = Real::Max } $x) { (0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 } } So do you really mean as declarative a manner as possible? Or would you consider this example to go beyond possible? I would declare

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-22 Thread Darren Duncan
Dave Whipp wrote: Darren Duncan wrote: Dave Whipp wrote: sub sqrt(Num where { 0 = $_ = Real::Max } $x) { (0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 } } So do you really mean as declarative a manner as possible? Or would you consider this example to go beyond possible?

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-20 Thread Dave Whipp
Darren Duncan wrote: 1. What we *should* be doing with the Prelude, like with STD.pm, is write under the assumption that the implementation is also written in Perl 6. We should write the Prelude in as declarative a manner as possible, saying *what* we want to happen rather than how, such as

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-18 Thread ajr
The Prelude could be helpful for training. I've been trying to work out a logical path into Perl 6 for quite some time, not least because it's been a moving target. If there's a set of definitions that a computer can follow, humans should be able to move along that path too. -- Email and

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-16 Thread Jonathan Scott Duff
On Thu, Jan 15, 2009 at 8:31 PM, Jon Lang datawea...@gmail.com wrote: Forgive my ignorance, but what is a Prelude? -- Jonathan Dataweaver Lang The stuff you load (and execute) to bootstrap the language into utility on each invocation. Usually it's written in terms of the language you're

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread Geoffrey Broadwell
On Thu, 2009-01-15 at 16:03 -0800, Darren Duncan wrote: Patrick R. Michaud wrote (on p6c): On Thu, Jan 15, 2009 at 08:53:33AM +0100, Moritz Lenz wrote: Another thing to keep in mind is that once we start to have a Perl 6 prelude, we might decide to be nice neighbors and share it with other

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread Darren Duncan
Geoffrey Broadwell wrote: The problem with this method is that there are usually *several* ways to implement each feature in terms of some number of other features. The creators of the shared prelude are then stuck with the problem of deciding which of these to use. If their choices do not

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread Jon Lang
Forgive my ignorance, but what is a Prelude? -- Jonathan Dataweaver Lang

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread Darren Duncan
Jon Lang wrote: Forgive my ignorance, but what is a Prelude? The Prelude is a file written in Perl 6 that defines some Perl 6 built-ins. See http://perlcabal.org/svn/pugs/view/src/perl6/Prelude.pm for what AFAIK is the newest version. -- Darren Duncan

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread Jon Lang
On Thu, Jan 15, 2009 at 6:45 PM, Jonathan Scott Duff perlpi...@gmail.com wrote: On Thu, Jan 15, 2009 at 8:31 PM, Jon Lang datawea...@gmail.com wrote: Forgive my ignorance, but what is a Prelude? -- Jonathan Dataweaver Lang The stuff you load (and execute) to bootstrap the language into

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread jason switzer
On Thu, Jan 15, 2009 at 8:59 PM, Jon Lang datawea...@gmail.com wrote: OK, then. If I'm understanding this correctly, the problem being raised has to do with deciding which language features to treat as primitives and which ones to bootstrap from those primitives. The difficulty is that

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-15 Thread Darren Duncan
Following some responses I've seen, I'll try to clarify my proposal. Basically its like this. A significant subset of Perl 6 native features, eg types and operators, native meaning they are declared and described in the Perl 6 Synopsis documents, have been implemented under Pugs by being