Search the web
Sign In
New User? Sign Up
snobol
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
SNOBOL at YAPC, the Perl conference   Message List  
Reply | Forward Message #827 of 883 |
Re: SNOBOL at YAPC, the Perl conference

--- In snobol@yahoogroups.com, Mike Radow <mikeradow@...> wrote:

> _Thanks_ for the incisive comments, Mr. Aksjghkajshd! ?Are you _actually_
Scott Walters? No surprise if "yes"... ,,,and,,,:

Yes, I'm Scott Walters. Or SWALTERS on CPAN. I have a strong typing (C++ or
Java style types) implementation for Perl, among other things.

Yahoo! was deleting my accounts left and right for a while, for reasons not
clear to me, so I became lazy in filling in details when creating new ones.

> When early specs came out for Perl 6, several of us looked into using a
SNOBOL4 program to scan Perl 5 _source_, at least to scan for conflicts. This,
we reasoned, would be useful _even_if_ a complete conversion was not possible.
In many cases, tho' admittedly not all, it did look like a large portion of
programs _could_ be fully "automatically" converted. Of course, there are likely
numerous (pathological) cases which we missed. (My Dad used to call these
abusive "corner cases" with a special name: ''Sharp corner cases''.)

Interesting. I'm sure you've heard the saying, "only perl can parse Perl"
(referring to the name of the interpreter and the name of the language
respectively).

There's PPI, which is a pretty good Perl 5 grammar implemented in Perl 5.
Creating that was quite a project. That's unable to deal with a lot of things
still though. The approach that would probably be taken would be a "from the
inside" one, where Perl 5 parsers a program and then runs code that inspects the
bytecode to generate the translation. Larry Wall's own work runs closer to this
direction, combined with fixing up the parser and bytecode to preserve even more
information than it already does. For illustration purposes, this already
works:

perl -MO=Deparse -e 'print "hi\n" for 1..10;'

# outputs:

print "hi\n" foreach (1 .. 10);

The B module makes this possible by providing an OO interface to inspecting the
bytecode of the compiled program:

http://search.cpan.org/~nwclark/perl-5.8.9/ext/B/B.pm

> Since Perl 6 will be implemented for Parrot (?is this the correct
terminology?), there will be a natural _reuse_ of CPAN modules which were
converted by "regular" Perl 6 users, who have not interest nor contact with the
Parrot implementation. This would speed the availability of CPAN modules to
Parrot users, through no effort of their own.

Yes, that terminology is correct. But this brings up another problem with
translation... XS. Most Perl modules are written entirely in Perl, but many,
including many of the most useful ones, are partially implemented in C. This
includes but isn't limited to bindings to system libraries. Those "XS" modules
rely on details of Perl 5 internals that need to change and cannot easily be
translated. The XS interface has held back core Perl 5 cleanups and prevented
Perl 5's growth. It's something of a paradox. Getting rid of it means breaking
half of CPAN but keeping it means no future growth for Perl. Breaking the XS
interface is perhaps more of a radical step for Perl going from 5 to 6 than
changing the language's syntax.

> BTW: The "pugs" implementation is extremely clever. I'd have expected that the
Haskell-based implementation would run very slowly, but this is not the case. So
much, I guess, for the common wisdom that "functional languages are always
slow".

ghc is getting very good at optimizing. I'm not sure if the Pugs page mentions
this, but the original plan was to make Pugs self hosting by rewriting the
Haskell in Perl 6. As it is though, the project has mostly run out of steam.
Perl 6's constant revisions to specification haven't helped matters there.

> For the curious, please see...:
> +
> http://en.wikipedia.org/wiki/Pugs

> Sorry to go on so long. In these (economic) days, I don't have much time for
more than infrequent reading of emails and postings, with almost no time to
write posts...

Understood. I had been meaning to make time to say "hello" here for some time.

>
> I hope that something above is of interest / use to S4LS members.
>
> Mike

Regards,
-scott





Sun Jun 28, 2009 7:43 am

aksjghkajshd
Offline Offline
Send Email Send Email

Forward
Message #827 of 883 |
Expand Messages Author Sort by Date

http://yapc10.org/yn2009/talk/1988 I really wanted to but I failed to make it to this talk. Three days is too few. I wind up averaging 2 or 3 hours of sleep...
aksjghkajshd
Offline Send Email
Jun 25, 2009
8:18 pm

I'm interested what "one" feature of SNOBOL supposedly isn't in Perl... My suspicion is that there is a lot more than that, including things like user-defined...
Gordon Peterson
gep_2
Online Now Send Email
Jun 25, 2009
11:06 pm

On Thu, Jun 25, 2009 at 4:06 PM, Gordon Peterson<gep2@...> wrote: [snip] ... Perl has an object system, which is how a Perl programmer would ...
Andru Luvisi
glomek
Offline Send Email
Jun 26, 2009
12:01 am

Well, one of the great things about S'BOL is the comparatively simple, regular, orthogonal structure and syntax, which makes S'BOL so comparatively ...
Gordon Peterson
gep_2
Online Now Send Email
Jun 26, 2009
5:14 am

... Don't preach to the choir... take the message to the streets! There used to be a newsletter circulating not long ago with clever SNOBOL and applications...
aksjghkajshd
Offline Send Email
Jun 26, 2009
9:41 pm

... I don't consider it particularly "interesting" to do anything to support Perl, not even in a left-handed way. If you actually start trying to do that,...
Gordon Peterson
gep_2
Online Now Send Email
Jun 27, 2009
4:00 am

Hi Gordon, et al. I had to reply to this for i have been a long lover of Snobol/Spitbol and it pains no one more than me that it has not garnered the praise...
Russell Urquhart
russurquhart1
Offline Send Email
Jun 26, 2009
12:22 pm

... I don't follow the Python and Ruby communities very closely, but this "especially Perl" intrigues me. I sent over links to two talks at Perl cons about...
aksjghkajshd
Offline Send Email
Jun 26, 2009
9:08 pm

... Well, the feature in question was user defined operators, something that Perl users would *love* to have and talk about often. I know there's more than one...
aksjghkajshd
Offline Send Email
Jun 26, 2009
3:43 pm

- ... - ... - Nicely put & I concur 100%. The result, after more than a decade of users' contributions, is a *huge* and accessible repository. + It is called...
mikeradow@...
mikeradow
Offline Send Email
Jun 28, 2009
2:33 am

A few quick reactions.... 1) the same inter-operability would seem to apply to .NET-compatible languages. And (at least initially) there are probably more of...
Gordon Peterson
gep_2
Online Now Send Email
Jun 28, 2009
2:55 am

... http://pmichaud.com/2009/pres/ has some good talks on getting started with PGE, the Parrot Grammar Engine, and the other tools for bootstrapping languages...
aksjghkajshd
Offline Send Email
Jun 28, 2009
3:23 am

- ... - ... - I'll _support_ anything that makes life easier! The magnitude of projects like Parrot (and Mono and Portable, too) makes it remarkable that a...
Mike Radow
mikeradow
Offline Send Email
Jun 28, 2009
4:35 am

... Yes, I'm Scott Walters. Or SWALTERS on CPAN. I have a strong typing (C++ or Java style types) implementation for Perl, among other things. Yahoo! was...
aksjghkajshd
Offline Send Email
Jun 28, 2009
7:43 am

FWIW, it is my understanding that the Ada routines for pattern matching implement a subset of full SNOBOL pattern matching capabilities, and even that with...
Gordon Peterson
gep_2
Online Now Send Email
Jun 29, 2009
4:30 am

... My Python package depends on my C translation of the Ada routines, which could be embedded into Perl as well, by writing "XS" g(l)ue (or any other means of...
Phil Budne
pbudne2
Offline Send Email
Jul 1, 2009
1:47 pm

- ... - ... - ... - Figured as much, from your knowledge & informed comments about Perl... [big snip] ... - I did _not_ know this: The source of the CPAN...
Mike Radow
mikeradow
Offline Send Email
Jun 29, 2009
3:16 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help