LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-29-2009, 07:37 PM   #1
jayeola
Member
 
Registered: Dec 2005
Location: london, uk
Distribution: BLAG GNU/Linux
Posts: 58

Rep: Reputation: 15
when will Perl6 steal my cornflakes?


or put another way, if perl6 will not be backwards compatiable with perl5 [0], what can one do to maintain/prepare for the steady migration to perl6 when it actally happens? A /lot/ of servers require perl. I know that 6 ain't ready yet but I'd like to be there and prepared when it is.

[0] http://en.wikipedia.org/wiki/Perl_6
 
Old 03-29-2009, 08:37 PM   #2
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
The wikipedia article to which you link says that there will be a "compatibility mode", which presumably will allow your cornflakes to remain crispy without breaking, but that makes me nervous.

If you really want to migrate to Perl 6, I suspect it will be a lot of work. For example, the following:
Code:
$array[$index]=5;
will have to be changed to
Code:
@array[$index]=5;
The only hope is that someone, somewhere, will provide code to translate Perl 5 code to Perl 6 code, or at least do most of the work.

If there is a god, that code will be in LISP.
 
Old 03-29-2009, 10:20 PM   #3
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
Not to be totally snide (but a little snide) but it will probably not matter because (1) Perl 6 will never be released [that was the snide part] and (2) Perl 5 will exist for a long *long* time and more than likely some things will *never* migrate away from it. Also I'm sure there will be some effort at a conversion program, because the language is so difficult it won't work 100% (maybe not even 75%) of the time. Python has a similar converter to the new stuff for easy differences like the fact that print() is a function now but even it doesn't do it right all the time, and the changeset it has to deal with is much smaller.
 
Old 03-29-2009, 10:48 PM   #4
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
Quote:
Originally Posted by taylor_venable View Post
Perl 5 will exist for a long *long* time and more than likely some things will *never* migrate away from it.
Oh. Like COBOL. I get it.
 
Old 03-30-2009, 04:31 AM   #5
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
AFAIK, Larry Wall himself is developing Perl 5 -> Perl 6 translator.

OTOH, Perl 6 is supposed to be able to run Perl 5 code with the corresponding compiler pragma, and if it is so, the only remaining part is interfacing between the two parts, which shouldn't be that much for a sane interface.
 
Old 03-30-2009, 04:58 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Before I even started learning Perl, Perl 6 "was coming ..."

No good rushing things.
 
Old 03-30-2009, 05:05 AM   #7
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179
For additional perspectives: here, here.
 
Old 03-30-2009, 05:09 AM   #8
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by syg00 View Post
Before I even started learning Perl, Perl 6 "was coming ..."

No good rushing things.

If they do make Perl 6 "to see the light of day", it'll be really good.

I reread Perl 6 stuff after familiarizing myself with functional languages concepts and examples (Haskell, OCaml), and Perl 6 and its new compared to Perl 5 features started to make much more sense to me.

For example, lazy evaluation is widely used in functional languages like Haskell and AFAIR there is a lazy evaluation library for OCaml.

Many years ago I decided to learn Perl rather than sh, sed, awk because it made more sense to me to learn one language rather than three.

Today I am even more lazy, so learning Perl 6 instead of OCaml + Haskell would be a good thing. But, the truth is, OCaml is damn efficient in its compiled form - Perl 6 has a long way to go WRT efficiency (because of its bytecode nature at the moment).
 
Old 03-30-2009, 05:27 AM   #9
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
OT: For personal interest, you can do lazy evaluation in many languages, though the time to invent it is widely varying. R5RS Scheme has "promises" which are thunks that are memoized:
Code:
Gambit v4.4.2

> (define p (delay (begin (display "moo!") (newline) 3)))
> (force p)                                              
moo!
3
> (force p)
3
Lazy algorithms also feature prominently in Chris Okasaki's Purely Functional Data Structures (http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf) which is implemented in Standard ML. Mark Jason Dominus provides some steps towards implementing things like infinite streams in Higher Order Perl.
 
Old 03-30-2009, 06:57 AM   #10
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Perl 6 is not coming right away, and as Taylor says, quite a lot of Perl 5 code is out there and staying. So, I wouldn't worry about cornflakes.

However, for anyone who's interested in playing with Perl 6 now, you can. It's as easy as this:
Code:
git clone git://github.com/rakudo/rakudo.git
cd rakudo
perl Configure.pl --gen-parrot
make
After that, you will have your very own perl6 binary. Just subscribe to the Perl 6 Tricks and Tips mail list or read through some of this excellent blog and play.

Last edited by Telemachos; 03-30-2009 at 07:04 AM.
 
Old 03-31-2009, 01:29 PM   #11
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
Perl 6 is already there and I'd say, by the end of this year we'd see a first "real" version.

Parrot had its 1.0 release recently (which is the base of the Rakudo Perl 6 implementation) and several people are really coding like robots on Rakudo.

The "November" wiki is one of the first Perl 6 projects; check out here:

http://github.com/viklund/november/

Documentation is sparse right now, but apress has published a Perl 6 handbook and the usual suspects are writing the Perl 6 variants of Learning Perl and the other camels.

What's mostly missing is the Perl 6 version of the 20.000 CPAN modules.

Anyway, I totally love Perl 6 and Parrot - if you're used to Perl, coding is extremely smooth and very compact in Perl 6 and it's much more coherent in a "hm, I think this might work that way oh yes it really does" way.

And no, people who hated Perl 5 because of its line noise won't like Perl 6 much either.
 
Old 03-31-2009, 02:32 PM   #12
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Su-Shee View Post
Perl 6 is already there and I'd say, by the end of this year we'd see a first "real" version.

Parrot had its 1.0 release recently (which is the base of the Rakudo Perl 6 implementation) and several people are really coding like robots on Rakudo.

The "November" wiki is one of the first Perl 6 projects; check out here:

http://github.com/viklund/november/

Documentation is sparse right now, but apress has published a Perl 6 handbook and the usual suspects are writing the Perl 6 variants of Learning Perl and the other camels.

What's mostly missing is the Perl 6 version of the 20.000 CPAN modules.

Anyway, I totally love Perl 6 and Parrot - if you're used to Perl, coding is extremely smooth and very compact in Perl 6 and it's much more coherent in a "hm, I think this might work that way oh yes it really does" way.

And no, people who hated Perl 5 because of its line noise won't like Perl 6 much either.
Actually, as I see it, other languages often require a lot more to be written to express the same thought. I mean, there is often much more (line, character) noise in other languages.

Larry Wall has always promoted Huffman coding: "the most common characters using shorter strings of bits than are used for less common source symbols". Just he means bytes rather than bits WRT to programming languages, i.e. the most frequently used constructs should use minimum characters.
 
Old 04-01-2009, 02:57 AM   #13
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
Sergei, you don't have to convince me - I'm a Perl lover since version 4.something.

Anyway, this was more or less a reference to the common critique of Perl being unreadable - "The Register" dubbed Perl the only programming language capable of writing code "using nothing but punctuation".

(http://www.theregister.co.uk/2008/12...y_wall_perl_6/)

Anyone hating sigils will probably not enjoy Perl 6 very much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to steal focus? qforce Linux - Desktop 4 10-07-2008 11:42 AM
LXer: Parrot 0.5.2 Released with perl6 executable included LXer Syndicated Linux News 0 01-20-2008 05:00 PM
LXer: Steal This Wi-Fi LXer Syndicated Linux News 0 01-13-2008 09:41 PM
steal focus shortcut LucidParody Linux - General 2 10-26-2005 02:16 PM
Forward X / Steal a process sval Linux - General 0 12-30-2004 10:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration