Re: r29976 - docs/Perl6/Spec

2010-03-12 Thread Neville Dempsey
On Mar 10, 9:49 am, la...@wall.org (Larry Wall) wrote:
> On Wed, Mar 10, 2010 at 10:10:29AM +1100, Timothy S. Nelson wrote:
> :       Algol 68 is notorious as a failure.  Let's hope things are
> : different here.
So they say: 
http://www.google.com.au/search?q=site:www.cs.utexas.edu/~EWD+algol-68

There may be some similarities with perl6.

I speculate that if Algol68 was named something else, then the Algol60
implementers
would not have gotten their noses so far out of joint.

BTW: "notorious as a failure" is a good way of describing Algol68 as
it was not exactly a failure.
For example several Operating Systems were written in Algol68
variants:  DRA's Flex, ICL's VME,
the Soviet Эльбрус-1 and the Cambridge CAP computer.
c.f. 
http://www.reddit.com/r/programming/comments/bbcoc/ancient_operating_system_written_in_algol68_with/

It google is looking for a

> Alternately, they probably would have bootstrapped Algol into its
> own ubiquitous language had the Open Source movement existed back then.
> History would have been much different.
Moot point...  to this day it is virtually impossible to get
sufficient access to the
source code to the classic Algol68 compilers.  The only exception
being the
partial release of Algol68RS (missing the format/transport/io
libraries)



> Incidentally, I programmed in Algol W on a Burroughs machine once,
> long, long ago in a galaxy far away...
Algol W was my first HLL too. There is a Algol-W to C implementation:
aw2c: http://www.jampan.co.nz/~glyn/
It is opensource - save for the test suite.

I think the original Algol-W compile's source - written in PL/360 has
long since been lost.

N





Re: r29976 - docs/Perl6/Spec

2010-03-12 Thread Neville Dempsey
On Mar 10, 9:49 am, la...@wall.org (Larry Wall) wrote:
> Algol68 would have done much better had it been Open Source software...

If Algol68 was *GPL* Open-Source, then I could take the Zilog Z80
implementation Algol68C and have a HLL on my TI-84 _Pocket_ Calculator
(rather the existing choice of "TI-BASIC" or asm... sigh):
* http://en.wikipedia.org/wiki/TI-84_Plus_series
* http://www.80bus.co.uk/publications/magazines/LSG3.pdf - R Anderson
Pg52

Using Algol68 on a pocket calculator must then set some kind of record
as
being the longest "long-gestated Bubble Bobble" ever:
* http://en.wikipedia.org/wiki/Bubble_Bobble

> Incidentally, I programmed in AlgolW on a Burroughs machine once,
> long, long ago in a galaxy far away...
SNAP.  AlgolW was my first HLL. But I suspect you mean a IBM 360.
Maybe
you can find more details of a Burroughs implementation? (esp source
code)
c.f. http://www.everything2.com/index.pl?node=Algol%20W

The only other AlgolW implementation I know of it is the 2008
translator
by Glyn Webster: http://www.jampan.co.nz/~glyn/

NevilleDNZ



Re: r29976 - docs/Perl6/Spec

2010-03-09 Thread Brandon S. Allbery KF8NH

On Mar 9, 2010, at 18:10 , Timothy S. Nelson wrote:
	Algol 68 is notorious as a failure.  Let's hope things are  
different here.



As a programming language, it was a failure, in large part because it  
was a bit too forward-looking for the available compiler technology.   
(It's still a bit tough, but a lot easier than it was in the late 60s,  
and there is an open source Algol 68 compiler.)  However, it shaped an  
entire generation of programming languages, and the URL I posted  
earlier demonstrates that language design that ignores Algol 68 is  
prone to reinvent its concepts, poorly.


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part


Re: r29976 - docs/Perl6/Spec

2010-03-09 Thread Larry Wall
On Wed, Mar 10, 2010 at 10:10:29AM +1100, Timothy S. Nelson wrote:
: On Mon, 8 Mar 2010, Carl Mäsak wrote:
: 
: >Meanwhile, the uncanny similarities between Perl 6 and Algol 68
: >continue to strike me:
: >
: > (]):
: >] ALGOL 68 [...] was conceived as a successor to the ALGOL 60 programming
: >] language, designed with the goal of a much wider scope of application and 
more
: >] rigorously defined syntax and semantics.
: 
:   Algol 68 is notorious as a failure.  Let's hope things are
: different here.

Algol 68 would have done much better had it been Open Source software
written in some other ubiquitous language.  But back then people
thought you could sell computer languages, or at least proprietary
compilers for computer languages.  And there was no language
sufficiently ubiquitous and sufficiently low cost to write a portable
language in until C came along later.  (You'll note that I did not,
in fact, call C a portable language. :)

Alternately, they probably would have bootstrapped Algol into its
own ubiquitous language had the Open Source movement existed back then.
History would have been much different.

Incidentally, I programmed in Algol W on a Burroughs machine once,
long, long ago in a galaxy far away...

Larry


Re: r29976 - docs/Perl6/Spec

2010-03-09 Thread Mark J. Reed
I think of p6 as more like the Ada of the 21st century.  Whether it
was a success or not depends on whom you ask, but it had similar
criticisms and delays.  And was commissioned to be the US federal
govt's answer to Algol 68.  Which may not have been a big hit, but it
had a profound effect on language design, so "failure" may be
overstating it.


On Tuesday, March 9, 2010, Timothy S. Nelson  wrote:
> On Mon, 8 Mar 2010, Carl Mäsak wrote:
>
>
> Meanwhile, the uncanny similarities between Perl 6 and Algol 68
> continue to strike me:
>
>  (]):
> ] ALGOL 68 [...] was conceived as a successor to the ALGOL 60 programming
> ] language, designed with the goal of a much wider scope of application and 
> more
> ] rigorously defined syntax and semantics.
>
>
>         Algol 68 is notorious as a failure.  Let's hope things are different 
> here.
>
>         :)
>
>
> -
> | Name: Tim Nelson                 | Because the Creator is,        |
> | E-mail: wayl...@wayland.id.au    | I am                           |
> -
>
> BEGIN GEEK CODE BLOCK
> Version 3.12
> GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ 
> R(+) !tv b++ DI D G+ e++> h! y-
> -END GEEK CODE BLOCK-
>

-- 
Mark J. Reed 


Re: r29976 - docs/Perl6/Spec

2010-03-09 Thread Timothy S. Nelson

On Mon, 8 Mar 2010, Carl Mäsak wrote:


Meanwhile, the uncanny similarities between Perl 6 and Algol 68
continue to strike me:

 (]):
] ALGOL 68 [...] was conceived as a successor to the ALGOL 60 programming
] language, designed with the goal of a much wider scope of application and more
] rigorously defined syntax and semantics.


	Algol 68 is notorious as a failure.  Let's hope things are different 
here.


:)


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-


Re: r29976 - docs/Perl6/Spec

2010-03-08 Thread Brandon S. Allbery KF8NH

On Mar 8, 2010, at 11:04 , Carl Mäsak wrote:

commitbot (), Brandon (>>>), Mark (>>), Carl (>):
+has $!age is ref;   # BUILD will automatically use ref  
binding, not copy


Perl6 isn't done until it has reinvented Algol 68?


[...]

I'm not sure what exactly the repercussions of doing attribute
initialization with 'is ref' are apart from that. Brandon, if your
oblique reference to Algol 68 meant something more than what I
uncovered above, feel free to enrich the discussion by sharing what
you know about the possible consequences of spec'ing things this  
way.


I imagine Brandon was more referring to pass-by-reference, which was
introduced into procedural HLLs by Algol-68.


Oh! It was that simple.


Right.  And just a joke, not a complaint about the language.


Meanwhile, the uncanny similarities between Perl 6 and Algol 68
continue to strike me:


And *that* is why I'm cracking Algol 68 jokes here.  :)

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part


Re: r29976 - docs/Perl6/Spec

2010-03-08 Thread Brandon S. Allbery KF8NH

On Mar 8, 2010, at 06:23 , Carl Mäsak wrote:

commitbot (>), Brandon (>>):
+has $!age is ref;   # BUILD will automatically use ref  
binding, not copy


Perl6 isn't done until it has reinvented Algol 68?


Unaware of what Algol 68 represents in programming language history, I
perused Wikipedia's article on Algol 68:


Actually, I was riffing on the 'is ref' stuff, since Algol68 did some  
interesting things with the "ref" keyword (and the way the language  
report described it was somewhat less than clear).  And as such, it  
was a joke gone awry.


(And as to it being complex, I'm tempted to invoke PL/I.  It's less  
complex than most people think; it was just described *really poorly*.)


Chew on this article instead of Wikipedia:  
http://www.cowlark.com/2009-11-15-go/


 (]):
] ALGOL 68 has been criticized, [...] for abandoning the simplicity of
] ALGOL 60 [and instead] becoming a vehicle for complex or overly
] general ideas, and doing little to make the compiler writer's task  
easy,

] [...]


The former sounds like the whining of a Scheme user; the latter, a  
holdover from ancient times.  (What would the folks who complained  
about it not making compiler writers' lives easy have said about C++?)


--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part


Re: r29976 - docs/Perl6/Spec

2010-03-08 Thread Carl Mäsak
commitbot (), Brandon (>>>), Mark (>>), Carl (>):
 +    has $!age is ref;   # BUILD will automatically use ref binding, not 
 copy
>>>
>>> Perl6 isn't done until it has reinvented Algol 68?
>>
>> [...]
>>
>> I'm not sure what exactly the repercussions of doing attribute
>> initialization with 'is ref' are apart from that. Brandon, if your
>> oblique reference to Algol 68 meant something more than what I
>> uncovered above, feel free to enrich the discussion by sharing what
>> you know about the possible consequences of spec'ing things this way.
>
> I imagine Brandon was more referring to pass-by-reference, which was
> introduced into procedural HLLs by Algol-68.

Oh! It was that simple.

Going back and doing ack on the spec, I see that this actually
constitutes the only mention of 'is ref'. My confusion possibly stems
from the fact that we (IIRC) used to have a param trait with this
name.

Anyway, the change is still pretty fresh, and we'll see if it
survives. In the meantime, feel free to point out why passing by
reference is a bad idea, and why getting double layers of array in the
attributes would be a lesser evil.

Meanwhile, the uncanny similarities between Perl 6 and Algol 68
continue to strike me:

 (]):
] ALGOL 68 [...] was conceived as a successor to the ALGOL 60 programming
] language, designed with the goal of a much wider scope of application and more
] rigorously defined syntax and semantics.

// Carl


Re: r29976 - docs/Perl6/Spec

2010-03-08 Thread Mark J. Reed
I imagine Brandon was more referring to pass-by-reference, which was
introduced into procedural HLLs by Algol-68.

On Monday, March 8, 2010, Carl Mäsak  wrote:
> commitbot (>), Brandon (>>):
>>> +    has $!age is ref;   # BUILD will automatically use ref binding, not 
>>> copy
>>
>> Perl6 isn't done until it has reinvented Algol 68?
>
> Unaware of what Algol 68 represents in programming language history, I
> perused Wikipedia's article on Algol 68:
>
>  (]):
> ] ALGOL 68 has been criticized, [...] for abandoning the simplicity of
> ] ALGOL 60 [and instead] becoming a vehicle for complex or overly
> ] general ideas, and doing little to make the compiler writer's task easy,
> ] [...]
>
> I wish I knew how to follow up that with something witty, but it would
> seem the quote more than speaks for itself.
>
> But instead of fruitlessly agreeing or disagreeing with a value
> judgement, let me try to summarize the discussion on-channel that led
> up to this particular spec change.
>
> When you initialize an Int attribute with an Int, you get that Int put
> inside the attribute container.
>
> $ perl6 -e 'class A { has Int $.foo }; say A.new(:foo(42)).foo'42
>
> Similarly, when you initialize a Hash attribute with a Hash, you get
> that Hash put inside the attribute container.
>
> $ perl6 -e 'class A { has %.foo }; say A.new(:foo(bar => 42)).foo.perl'
> {"bar" => 42}
>
> $ perl6 -e 'class A { has %.foo }; say A.new(:foo{bar => 42}).foo.perl'
> {"bar" => 42}
>
> *However*, according to the way the old spec did things, and according
> to current Rakudo alpha and Rakudo master, when you initialize an
> Array attribute with an Array, you get that Array put inside *another*
> Array inside the attribute container.
>
> $ perl6 -e 'class A { has @.foo }; say A.new(:foo[1,2,3]).foo.perl'
> [[1, 2, 3]]
>
> (The reason for this has to do with attribute initialization having
> ordinary assignment semantics, meaning that internally it translates
> to something like `...@!foo = [1, 2, 3];`, which would indeed place the
> [1, 2, 3] array as the first element in @!foo rather than make that
> the whole array. Hashes don't suffer from this problem because `%!foo
> = { bar => 42};` does the right thing and assigns the hash to %!foo.)
>
> The discussion, starting at [1] and continuing at [2] and [3], mostly
> consisted of me repeating the same question until the above
> unintuitive quirk went away. It should now just create one layer of
> Array upon initialization.
>
> [1] http://irclog.perlgeek.de/perl6/2010-03-06#i_2070655
> [2] http://irclog.perlgeek.de/perl6/2010-03-07#i_2073494
> [3] http://irclog.perlgeek.de/perl6/2010-03-07#i_2073717
>
> I'm not sure what exactly the repercussions of doing attribute
> initialization with 'is ref' are apart from that. Brandon, if your
> oblique reference to Algol 68 meant something more than what I
> uncovered above, feel free to enrich the discussion by sharing what
> you know about the possible consequences of spec'ing things this way.
>
> Now if you'll excuse me, I'll go back to doing little to make the
> compiler writers' task easy. :-P
>
> // Carl
>

-- 
Mark J. Reed 


Re: r29976 - docs/Perl6/Spec

2010-03-08 Thread Carl Mäsak
commitbot (>), Brandon (>>):
>> +    has $!age is ref;   # BUILD will automatically use ref binding, not copy
>
> Perl6 isn't done until it has reinvented Algol 68?

Unaware of what Algol 68 represents in programming language history, I
perused Wikipedia's article on Algol 68:

 (]):
] ALGOL 68 has been criticized, [...] for abandoning the simplicity of
] ALGOL 60 [and instead] becoming a vehicle for complex or overly
] general ideas, and doing little to make the compiler writer's task easy,
] [...]

I wish I knew how to follow up that with something witty, but it would
seem the quote more than speaks for itself.

But instead of fruitlessly agreeing or disagreeing with a value
judgement, let me try to summarize the discussion on-channel that led
up to this particular spec change.

When you initialize an Int attribute with an Int, you get that Int put
inside the attribute container.

$ perl6 -e 'class A { has Int $.foo }; say A.new(:foo(42)).foo'42

Similarly, when you initialize a Hash attribute with a Hash, you get
that Hash put inside the attribute container.

$ perl6 -e 'class A { has %.foo }; say A.new(:foo(bar => 42)).foo.perl'
{"bar" => 42}

$ perl6 -e 'class A { has %.foo }; say A.new(:foo{bar => 42}).foo.perl'
{"bar" => 42}

*However*, according to the way the old spec did things, and according
to current Rakudo alpha and Rakudo master, when you initialize an
Array attribute with an Array, you get that Array put inside *another*
Array inside the attribute container.

$ perl6 -e 'class A { has @.foo }; say A.new(:foo[1,2,3]).foo.perl'
[[1, 2, 3]]

(The reason for this has to do with attribute initialization having
ordinary assignment semantics, meaning that internally it translates
to something like `...@!foo = [1, 2, 3];`, which would indeed place the
[1, 2, 3] array as the first element in @!foo rather than make that
the whole array. Hashes don't suffer from this problem because `%!foo
= { bar => 42};` does the right thing and assigns the hash to %!foo.)

The discussion, starting at [1] and continuing at [2] and [3], mostly
consisted of me repeating the same question until the above
unintuitive quirk went away. It should now just create one layer of
Array upon initialization.

[1] http://irclog.perlgeek.de/perl6/2010-03-06#i_2070655
[2] http://irclog.perlgeek.de/perl6/2010-03-07#i_2073494
[3] http://irclog.perlgeek.de/perl6/2010-03-07#i_2073717

I'm not sure what exactly the repercussions of doing attribute
initialization with 'is ref' are apart from that. Brandon, if your
oblique reference to Algol 68 meant something more than what I
uncovered above, feel free to enrich the discussion by sharing what
you know about the possible consequences of spec'ing things this way.

Now if you'll excuse me, I'll go back to doing little to make the
compiler writers' task easy. :-P

// Carl


Re: r29976 - docs/Perl6/Spec

2010-03-07 Thread Brandon S. Allbery KF8NH

On Mar 7, 2010, at 09:42 , pugs-comm...@feather.perl6.nl wrote:
+has $!age is ref;   # BUILD will automatically use ref binding,  
not copy



Perl6 isn't done until it has reinvented Algol 68?

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allb...@kf8nh.com
system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu
electrical and computer engineering, carnegie mellon universityKF8NH




PGP.sig
Description: This is a digitally signed message part