Beta

×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Perl 6: Apocalypse 6 Released

CmdrTaco posted more than 11 years ago | from the dodging-a-pack-of-camels dept.

Perl 247

data64 writes "The latest Apocalypse talks about subroutines. Looks like we finally get type signatures which are way more powerful than the rudimentary prototypes available with Perl5."

cancel ×

247 comments

Sorry! There are no comments related to the filter you selected.

LAST POST, BIZNATCH! (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480188)

Peek into the anus.

Apocolypse Now Redux (-1, Offtopic)

caluml (551744) | more than 11 years ago | (#5480189)

Is this the Apocolypse Now Redux I have heard about?

Re:Apocolypse Now Redux (0, Offtopic)

caluml (551744) | more than 11 years ago | (#5480219)

Gaaaad. I knew it didn't look right. Apoc_a_lypse. Apoc_a_lypse.

Sickly today (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480199)

I am still sick.

BUT, I am going to DDR at Station Square.

4th Mix Plus!

First post! (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480203)

First post, baby! w00t. This rocks my socks.

And you will enjoy Perl 6, or the camel shall eat you.

Re:First post! (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480228)

YOU FAILED IT!

You are a loser.

Peek into the anus. [anus.com]

Will this work on Debian? (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480207)

Perl 5 is broken on the Potato and Woody builds... any luck of getting Perl 6 to work?

Re:Will this work on Debian? (1, Insightful)

Anonymous Coward | more than 11 years ago | (#5480230)

Doubtful... The Debian crew has always held that simplicity is best (Occam's Razor). They typically do all their scripts in Python.

20-odd pages... (0, Offtopic)

albalbo (33890) | more than 11 years ago | (#5480213)

... so unlikely to be able to be whored for karma in it's entirety without a lot of work :o)

Perl6 is looking amazing, though. It's looking a lot less crufty than perl5 in a number of ways, and actually looks a very modern language now. Plus, it's still Perl. Woo!

So long as we get a foreach() mechanism with in-built index into the array it's looping over, I'll be happy. That's my biggest problem at the moment..

Re:20-odd pages... (2, Informative)

data64 (300466) | more than 11 years ago | (#5480278)

So long as we get a foreach() mechanism with in-built index into the array it's looping over, I'll be happy. That's my biggest problem at the moment.

You mean something like:

foreach my $elem (@list ) {
print "$elem\n"
}

This works in Perl5.

Re:20-odd pages... (2, Interesting)

albalbo (33890) | more than 11 years ago | (#5480322)

No no no no no. I know that :) I mean:

foreach (@list) { $list[$i] = 'No jam today!' if ($_ =~ /jam/); }

... where $i is an index into the array. Like a for() loop, but without the gatepost error possibility. Yes, you can do it yourself with my $i=0 and $i++ in the loop, but it's a mess, especially if you next or last anywhere in there - it means you have to put the $i++ at the top, and start at $i = -1, which is bizarre.

Re:20-odd pages... (1)

Paul Cameron (3633) | more than 11 years ago | (#5480437)

Yes, indexing would be great, but what you want (modifying the current element being iterated over) is possible without indexing, as 'foreach' aliases the current element to the actual element in the list being processed.

Relevant text from perlsyn:
The "if" and "unless" modifiers have the expected seman tics, presuming you're a speaker of English. The "fore ach" modifier is an iterator: For each value in EXPR, it aliases "$_" to the value and executes the statement.
Illustrative code examples:
perl -le 'my @a = qw(1 2 3 4); $_++ for @a; print "@a"' perl -le 'my @a = qw(1 2 3 4); for my $x (@a) { $x++ }; print "@a"'
Both output "2 3 4 5".

So, your code, and another possible way of achieving it (without over obfuscation), would be:
foreach (@list) { $list[$i] = 'No jam today!' if ($_ =~ /jam/); } vs foreach (@list) { $_ = 'No jam today!' if /jam/; }

Re:20-odd pages... (-1)

BarrettAnderson (622397) | more than 11 years ago | (#5480488)

give this one a try:

while($i eq $i) {
print "hahahahahaha!!!\n";
}

I think that solves your problem. It seems rather simple, but just plug it in and trust my genius.

Re:20-odd pages... (1)

Istealmymusic (573079) | more than 11 years ago | (#5480866)

You can omit the condition in a while() loop if its always true.

Re:20-odd pages... (2, Informative)

tramm (16077) | more than 11 years ago | (#5480937)

albalbo wrote:
foreach (@list) { $list[$i] = 'No jam today!' if ($_ =~ /jam/); }
While I understand your desire for the array index in question, it is not necessary in your example. $_ is an alias to the current list element and is writable. You can do your example as:
foreach( @list ) { $_ = 'No jam today!' if /jam/ }
You're correct that tracking the index on your own will be confusing due to last, next, redo, etc.

Re:20-odd pages... (2, Informative)

wirelessbuzzers (552513) | more than 11 years ago | (#5480326)

No. He means he wants to:
foreach my $elem (@list) {
do something with $elem;
do something with the index of $elem;
}
Right now, that looks like:
foreach my $index (0..$#list) {
$elem = $list[$index];
do something with $elem;
do something with $indexd;
}

Re:20-odd pages... (1)

zephc (225327) | more than 11 years ago | (#5480424)

python rules:

for i in list:
do something with i

Re:20-odd pages... (1)

sumengen (230420) | more than 11 years ago | (#5480647)

and the index is where? is i the index or the element?

Re:20-odd pages... (1)

smallpaul (65919) | more than 11 years ago | (#5480721)

The Python you gave doesn't solve the problem illustrated. Here's the real solution [python.org] . It's a new Python 2.3 feature.

Re:20-odd pages... (1)

terraformer (617565) | more than 11 years ago | (#5480317)

It won't need a mirror. It is hosted by O'Reilly and they are hardly schlubbs with a beat up pentium 200 running RH 6.2 [slashdot.org] or a Vic 20 [slashdot.org] ...

Apocalypse Now (3, Funny)

nizcolas (597301) | more than 11 years ago | (#5480214)

I love the smell of sub routines in the morning

Re:Apocalypse Now (4, Funny)

rob-fu (564277) | more than 11 years ago | (#5480247)

I love the smell of sub routines in the morning

...and it smells like unwashed, dirty programmers.

Re:Apocalypse Now (0, Troll)

$$$$$exyGal (638164) | more than 11 years ago | (#5480483)

Kurtz: We train young men to write Java and C code, but their commanders won't allow them to write "perl" on their airplanes because it's obscene!

Willard and Kurtz discuss refactoring... (1)

Dan-DAFC (545776) | more than 11 years ago | (#5480849)

Willard: They say your methods are unsound.
Kurtz: Are my methods unsound?
Willard: I don't see... any method... at all, sir.

But where does Elmer Fudd fit in (0)

Anonymous Coward | more than 11 years ago | (#5480440)

Every damn time I see that movie, in the scenes that lead up to the infamous "I love the smell" line where the helicopters attack to Wagner, I see:

An image of Elmer Fudd dressed as a female Viking singing "Kill da Wabbit! Kill da Wabbit!".

Apocalypse? (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480226)

http://www.villagevoice.com/issues/0108/tolan.php

Why not see what your tax money is going towards? Still can't figure out why suicide bombers exist?

Listen to Osama: Clinton == suicide bombers (0)

Anonymous Coward | more than 11 years ago | (#5480947)

No shit.

Clinton's fine examples of "leadership" during impeachement are one of Osama's biggest examples of why he needs to kill us.

Python is better. (-1, Troll)

MisterFancypants (615129) | more than 11 years ago | (#5480242)

Python is MUCH better than Perl, in every way. If you agree, mod me down.

Re:Python is better. (0, Flamebait)

MisterFancypants (615129) | more than 11 years ago | (#5480288)

There you have it. Proof positive that Python is much better than Perl.

Re:Python is better. (0)

Anonymous Coward | more than 11 years ago | (#5480370)

lol

Perl Smerl (-1)

anonymous coword (615639) | more than 11 years ago | (#5480245)

how about yaxpsttnowuefafllm 0.1 (Yet another cross platform scripting tookit that no one will use except for a few lamers like me).

Perl is teh ghey (-1)

gonadware (630179) | more than 11 years ago | (#5480258)

Perl faggots rank up there with mac users.

More Information (3, Informative)

Anonymous Coward | more than 11 years ago | (#5480264)

The Previous Apocolypses [perl.org] as well as some more info (who's who, list summaries). Read up!

On another note, is Perl 6 even going to be relevant with next-generation languages like Ruby and Python already fairly mature? ;-)

OT: Kudos for France (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480269)

Acording to yahoo.com: President Chirac said that France was prepared to veto the U.S.-backed resolution on Iraq.

You Americans accuse France of cowardness but I find that the french attitude is very bold; France is the only country which dare to say that the insane policy of your actual administration is nefarious for all the world..

Flame at will, France rocks!!

Re:OT: Kudos for France (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#5480308)

France is also willing to invest 4 billion in Saddams regime! How brave of them to be willing to overlook mass murders, rapes, and tortures for a potential profit.

Re:OT: Kudos for France (0)

Anonymous Coward | more than 11 years ago | (#5480529)

dont forget about the 5000 people killed with nerve gas, or the 2200 gallons of anthrax.

Re:OT: Kudos for France (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5480546)

Yeah, Just like they were sooooo bold to let the Germans kick their asses. Twice!


Just like they're soooo bold as to not shave or bathe


Just lke they're soooo bold as to try to end all sanctions against Iraq in 1992.


Let's give it up for the bold French [goatse.cx] !

Mirror (1, Informative)

zachlipton (448206) | more than 11 years ago | (#5480276)

It wouldn't be slashdot without a mirror:

http://www.zachlipton.com/apocalypse6.html [zachlipton.com]

Re:Mirror (1, Funny)

Anonymous Coward | more than 11 years ago | (#5480373)

It also wouldn't be slashdot without a karma whore like you, who mirrors a page sitting at a fat pipe that has no risk of getting slashdotted to earn karma points.

Re:Mirror (0)

Anonymous Coward | more than 11 years ago | (#5480569)


Speaking of fat pipes, how wide is your bunghole, Mr Goat?

Re:Mirror (1)

Second_Derivative (257815) | more than 11 years ago | (#5480588)

But then it doesn't use O'Reilly's brainfucked CSS so it's actually useable under Konqueror. So, I dunno, I'm thankful at least.

The Last Apocolypse... (1, Funny)

Anonymous Coward | more than 11 years ago | (#5480284)

... was 9 months ago! [perl.org] I knew Perl was slow, but that's just bad! 8^)

Just kidding, great work guys!

subroutines (1)

zephc (225327) | more than 11 years ago | (#5480313)

In Star Trek, they always call new functionality as 'subroutines', which leads me to think that the LCARS system was written in Perl (Perl 2000 Xtreme?). A scary thought indeed...

Re:subroutines (2, Funny)

CoolVibe (11466) | more than 11 years ago | (#5480385)

Other languages have subroutines too, you know, like BASIC? LCARS in Visual Basic, now _THAT_ is a scary thought. I'd rather debug it in C or in perl.

Who cares? (-1, Flamebait)

Anonymous Coward | more than 11 years ago | (#5480316)

It's not like you see announcements for new versions of COBOL or BASIC on slashdot? Why an outdated language like Perl?

Ruby and Python For3va!

Perl is turning into a completely new language (4, Interesting)

siewsk (603269) | more than 11 years ago | (#5480323)

I remenber the days of perl 5.004 and boy was that good and compact! Then as time so pass, more and more "features" are added into perl 5.004 and the result is that now you have too many features spoils the broth. As perl 5.004 it is PERFECT for replacing bourne shell, sed and awk. But instead of being stable (and not changing), it kept on changing. This is bad from a system admin point of view because you want to be sure that the script you wrote in 1999 will work in 2019 without any changes (just like bourne shell).

Instead if Perl kept on changing then you can't be sure and when you have literally thousands of little perl scripts everywhere this is intolerable.

Perhaps they should have kept Perl 5 as /usr/bin/perl5 and make sure that it stays static for all eternity. There are values in things which do not change, things you can depend on year after year without fear.

Re:Perl is turning into a completely new language (1)

wirelessbuzzers (552513) | more than 11 years ago | (#5480340)

There is something like this in perl 6, although I don't remember what it is. Probably something like require Perl5;

Re:Perl is turning into a completely new language (4, Interesting)

terraformer (617565) | more than 11 years ago | (#5480420)

Then as time so pass, more and more "features" are added into perl 5.004 and the result is that now you have too many features spoils the broth.

No, most of these "features" as you call them are not added into perl, they are added in as bundled modules. Perl's core is kept small for this very reason. As for Perl 6, that is going to be radically different but perl5 will be able to live on the same machine as perl 6 and I would imagine that a great deal of people will keep both around and maintain both for a great while.

It's open. You can do whatever you want... (2, Informative)

Wee (17189) | more than 11 years ago | (#5480520)

Perhaps they should have kept Perl 5 as /usr/bin/perl5 and make sure that it stays static for all eternity.

Here's your solution:

[siewsk@hostname siewsk]$ tar zxvf perl-5.0.0.4.tar.gz; cd perl-5.0.0.4; rm -f config.sh Policy.sh
[siewsk@hostname siewsk]$ /bin/sh Configure --prefix=/usr/bin/perl5.0.0.4
[siewsk@hostname siewsk]$ make; make test
[siewsk@hostname siewsk]$ sudo make install
[siewsk@hostname siewsk]$ sudo ln -s /usr/bin/perl5.0.0.4/bin/perl /usr/bin/perl5

You now have /usr/bin/perl5 forever and ever, as long as you use #!/usr/bin/perl5 at the top of your scripts.

-B

Re:Perl is turning into a completely new language (5, Funny)

Enoch (86158) | more than 11 years ago | (#5480535)

Then as time so pass, more and more "features" are added into perl 5.004 and the result is that now you have too many features spoils the broth.

I'm sorry. I think you are looking for this every-feature-is-in-the-core [php.net] language.

Glad to point you in the right direction!

enoch

Backwards support is a key Perl6 requirement (1)

Ars-Fartsica (166957) | more than 11 years ago | (#5480595)

Your perl5 scripts will not be stranded. There are many ways this will be accomodated - by force or by detection of certain perl 5 tokens (like the package keyword).

Re:Perl is turning into a completely new language (3, Informative)

antis0c (133550) | more than 11 years ago | (#5480774)

You obviously aren't aware of exactly what Perl 6 is. It's more than just a language, it's a whole runtime environment similar to .NET or Java. When Perl 6 comes out you can continue to use your Perl 5 scripts with it, or write scripts in Pascal, or in C, or in Java, or in BrainFuck. The compiler and runtime are completely separated.

Re:Perl is turning into a completely new language (4, Insightful)

Istealmymusic (573079) | more than 11 years ago | (#5480830)

I'm reminded of a quote:
We biologists have a special word for stable. It is "dead".

ughgh (3, Interesting)

Anonymous Coward | more than 11 years ago | (#5480331)

This is why I hate Perl

multi *caller (?$where = &CALLER::_, Int +$skip = 0, Str +$label)

my brain can't grok that

Re:ughgh (1, Insightful)

stratjakt (596332) | more than 11 years ago | (#5480391)

This is why perl will disappear.

I can understand some obscurity in lower level languages, like C, or as low as ASM itself. But a higher level scripting language should be as close to english (or another human language) as possible.

I dont see the inherent advantage in desinging a language thats hard to read. Frankly I'd rather see scripts written in VBScript than perl.

Re:ughgh (0)

Anonymous Coward | more than 11 years ago | (#5480487)

Like C has disappeared? I agree with the sentiment, but I doubt it will become reality.

And once you've been doing it long enough you become mentally deformed and it starts to look completely natural...

Re:ughgh (2, Insightful)

wdr1 (31310) | more than 11 years ago | (#5480494)

The problem with the English language is that it's too ambiguous. While that makes for wonderful poetry, literature, and stories, it makes for horrible programming syntax or anything relating strictly to logic. Think of why mathematicians had to create the word "iff."

It can also make things *harder*. The grammar and syntax of English is very fast and loose, but well known to it's speakers. Most likely the English-based programming language won't be able to mimic every little natural-language nuance, leaving the developer the headache of remember what rules are followed in which and when. When one says "or" in common, everyday conversation, it generally means an exclusive "or." When I say "or" in just about programming language, it means an inclusive "or." In an English language development language do you worry about conjugating verbs? What about tenses? Etc. You get the drift.

Using English keywords is great & helps simplify the problem, but as someone way smarter than me said "Things should be made as simple as possible -- but no simpler."

-Bill

Re:ughgh (1)

maugt (3520) | more than 11 years ago | (#5480559)

Mathematicians created iff because we're lazy. Thats it. Nothing to do with the english language.

Oh, and we like confusing people who know nothing about math by having our own syntax.

Re:ughgh (0)

Anonymous Coward | more than 11 years ago | (#5480586)

And other abreviations like QED, and the three-dots 'therefore' are the same. It's shorthand for english, not an obfuscation of the language.

Re:ughgh (1)

Guignol (159087) | more than 11 years ago | (#5480922)

well, it's a shorthand for latin actualy,
but yeah :)

Re:ughgh (3, Interesting)

Kaa (21510) | more than 11 years ago | (#5480500)

But a higher level scripting language should be as close to english (or another human language) as possible

No. That's conceptually wrong.

A (programming) language should make it easy to construct solutions for problems it has been designed to solve. Natural languages, such as English, are good for certain sets of problems and quite bad for other sets of problems.

Would you like to replace math notation with sentences in English?

Re:ughgh (1)

Guppy06 (410832) | more than 11 years ago | (#5480741)

"Would you like to replace math notation with sentences in English?"

I'll go for the one that actually has keys on my keyboard. Until I start seeing Cyrillic on my QWERTY, I'm stuck with "the partial derivative of..."

And the last thing I'm going to do is make up new symbols just because they're not on my keyboard.

Re:ughgh (0)

Anonymous Coward | more than 11 years ago | (#5480514)

This is why you will disappear.

I can understand some obtuseness in lower level geeks, like my freshmen, or as low as high schoolers. But a higher level geek should be as close to the programmer efficiency (or another real performance measure) as possible.

I dont see the inherent advantage in talking to you. Frankly I'd rather beat the bishop than read your posts.

Re:ughgh (1, Insightful)

Anonymous Coward | more than 11 years ago | (#5480518)

You can write readable code in perl. It's just that a lot of scripters like to make their code as compact as possible, sacrificing readability for...I don't know what. When I write perl scripts, I write them so that I'll understand what I was doing when I look at it 6 months later.

Re:ughgh (1)

tinrib (632120) | more than 11 years ago | (#5480572)

there are plenty of situations where legibilty and maintainability are not as important as fast results (i.e. quickly coded). In this area perl SHINES and is not going anywhere. Myself, I would think very carefully before writing anything more than a few hundred lines at most in perl, but for short scripts etc. where the most important thing is getting the thing written ASAP, perl is unbeatable. To say that perl will disappear is naive at best.

Why perl will survive: (3, Informative)

mcc (14761) | more than 11 years ago | (#5480632)

I dont see the inherent advantage in desinging a language thats hard to read.

This is what's great about perl 6. Yes, it has so many insane features and rediculous complex rules and bizarre exceptions to its rules that when reading code with someone else's programming style, you may as well be reading a different programming language (Quick! What's the difference between "sub foo will do { something() }" and " { something() } " ?).

But the real strength in perl 6 is that it's just about infinitely configurable. You can redefine the grammar to fit your needs or whims. This is going, naturally, to cause 17 year olds who load their grammars up so much with wierd macros that their programs will become literal line noise that ceases to function if you change one character, but it will also mean that in the "enterprise", you can be completely shielded from the messiness. All it takes is defining a specialized version of "use strict" that reduces the language down to what you need, and suddenly perl 6 is some very simple, simple, easy to understand language. As long as the speed's OK, people enforce standardized coding within an organization and the default -w is really careful to warn you if you say { 1, 2, 3 => "a" } and it looks like what you probably meant was hash { 1, 2, 3 => "a" } , i don't see it being a real problem. And from a compatibility stndpoint, having one language with EVERYTHING and the ability to cut out what you don't need in wide swaths is way better than recurring situations where people go "well.. i want to use java, but i need feature X" and wind up using some funky third-party jvm compiler that produces huge executables and requires funky tricks to incorporate into my build cycle."

Perl 6 is as hairy as you want it to be, and no more.

Perl 6 is going to be the bestest second system ever! ^_^

When did obfuscated code kill a language? Never (4, Interesting)

Ars-Fartsica (166957) | more than 11 years ago | (#5480635)

Gee, they hold an obfuscated C contest every year. You think C would vanish by now given the disgusting crap the coders write for the contest.

The original poster simply pulled something similar. There is no requirement that your perl look anything like that, nor is "powerful" perl more obfuscated than plainish looking perl. This is total FUD drummed up by someone who has presented a corner case....which I can assure you can be done for any language. In fact, I wouldn't touch a language for which this didn't hold.

Perl 6 is easier than Perl 5. Really. (5, Interesting)

ChaosDiscord (4913) | more than 11 years ago | (#5480913)

But a higher level scripting language should be as close to english (or another human language) as possible.

I certainly don't look forward to COBOLScript [csis.ul.ie] .

Human languages are an ambigious mess. Computers only want unambigious constructs. Having programmed in COBOL and and a few so called "fourth generation languages", let me say that writing in something that is close to English is really irritating. It's never quire English enough to allow me to express myself. You end up having to learn a specialized language that isn't really quite English. If I'm going to learn a specialized language, I might as well learn something that is easy to type and easy to scan visually.

Perl is a big, complex language, yes. But like real languages, you can learn it with very simple steps. You can get complex, productive things done with a just a quick introduction. If you want more power, it will take more learning, but it's available. Perl 6 aims to accomplish this evem better tham Perl 5.

Yes, the example given in the article are a bit convoluted. The entire point of the article is to explore all of Perl 6, not just the commonly used bits. In fact, one of main goals of Perl 6 is to make the common case and the introductory case less confusing than in Perl 5. Really. And everything revealed so far has supported this, it's just that Larry doesn't make it too clear.

Take for example expressing that a function takes three arguments in Perl 5. The best you can do is:

sub my_function($$$) {
....my($arg1, $arg2, $arg3) = @_;
}

(The "...." represents spaces because Slashdot's code filter is crap.)

In this example, Perl will not check that callers do the right thing. In Perl 6, you get this:

sub my_fuction($arg1, $arg2, $arg3) {
}

A clear improvement, and Perl will actually verify that callers do the right thing when calling you, usually catching an error at compile time!

In general Lary's Apocalypses have been a bit obscure. He's focusing on the big picture and the little details. Damien's Exegesis's [perl.com] is generally alot easier to read for people less interested in deep thought and more interested in concrete details. Wait a week or two for Exegesis 6 and give that a read. I think you'll find that the common case is slightly simplier and more obvious than in Perl 5, while the system also allows for more complex expressions that weren't well supported in the Perl 5.

Re:ughgh (3, Insightful)

Su||uSt (151462) | more than 11 years ago | (#5480513)

Heres the thing though, sure I have no idea what that says, but that's just because somebody decided to be very clever/brief/or both. Half my job is to write Perl scripts and sure there are about a million neato tricks that I could use to make my code really short and impossible to read but I never learned them and have no intention to. If you want, Perl can look more or less exactly like C, or if you want it can look like the above. It's all a matter of what you want out of perl.

When they say theres more than one way to do it, syntax is included in there too.

Re:ughgh (3, Insightful)

vadim_t (324782) | more than 11 years ago | (#5480691)

I think I have been trolled, but I'll reply anyway.

Once I was bored and wrote one line of C code that iterated over an array, and printed its elements separating then with commas, and printed an "and" instead of a comma for the last element. The code consisted of a for, a printf, and ? :'s in it.

Now, don't try to tell me it was readable. Every language can be used to write horrible code.

Besides, that doesn't even look as Perl. "?$where" makes no syntactical sense, variables have names like $where and that's it, "Str + $label" makes no sense either, unless Str is a constant, and "Int +$skip = 0" makes about as much sense as in C, because supposing it's comparing an addition with 0 it should be using ==.

Don't forget Parrot (5, Insightful)

Ars-Fartsica (166957) | more than 11 years ago | (#5480346)

The VM is showing 10x speed improvements in preliminary tests. Couple that in with Moore's law and Perl (or any languages that compiles to the Parrot VM) becomes a very attractive language for more types of problems.

Re:Don't forget Parrot (1, Redundant)

taliver (174409) | more than 11 years ago | (#5480383)

However, you'll always be sacrificing speed for readability. Even if you think it's 'good enough', you should still hope that noone wants that extra order of magnitude in performance you can get with a truly compiled language.

Just look at what happens everytime someone goes about writing an OS in Java. Someone invariably points out that the same thing would run 300% faster if C had been used instead.

And, I'm sorry to say, there will always be a need for performance.

Always.

Re:Don't forget Parrot (1, Troll)

data64 (300466) | more than 11 years ago | (#5480417)


Perl (or any languages that compiles to the Parrot VM) becomes a very attractive language for more types of problems.


I guess this is becoming something like the CLR [microsoft.com] .


Re:Don't forget Parrot (0)

Anonymous Coward | more than 11 years ago | (#5480523)

CLR is for statically-typed langauges. Parrot solves a different set of problems (and has an interesting register-based approach a little reminiscent of the deeply proprietary Tao/Amiga VM)

All that said, I'd still rather use a Common Lisp native compiler like CMUCL.

Re:Don't forget Parrot (2)

mlinksva (1755) | more than 11 years ago | (#5480458)

10x speed improvement over what?

Perl, the new ADA (5, Interesting)

ajm (9538) | more than 11 years ago | (#5480371)

I used to think that perl might become the new COBOL. Now it looks like it's going to be the new ADA. Lots of nice features but such complexity and cleverness that even the people who use it don't like it. ADA's a good language, but no one uses it. It would be a shame if perl 6 went the same way.

Perhaps the cleverness of the ideas are not being tempered by real use at this point. A language does not become great by adding new syntax and semantics for each feature but by refining it to the essential units needed to express all the rest. We should not celebrate the fact that "will" and "is" are very similar ways to express traits in perl 6. We should ask instead why do we need both? Further, is it possible for me to define a new "wont" statement in perl, or are "will" and "is" special things only language designers can implement?

Re:Perl, the new ADA (2, Informative)

TimToady (52230) | more than 11 years ago | (#5480418)

The entire syntax is redefinable, including removing will if you hate it.

Re:Perl, the new ADA (2, Insightful)

j3110 (193209) | more than 11 years ago | (#5480700)

and that's a good thing?

I don't know about you, but I like my languages to be pretty static. You can't really learn a language that's different everyday. Also, I don't like languages that let you do things 80 different ways. There are enough fights over where the curley braces go. Perl is not a team sport. Open source perl scripts are slightly less open than open source programs.

Now, if Parrot has only one instruction for things like "until" and "while", and someone wrote a decompiler that supported each person's own style of programming, then we may be in business :) (assuming it saves as much info as Java does in the byte-code)

This is kind of like the whole .Net issue. If the program can be converted between the languages that the CLR supports, it would be infinitely more useful. If Perl can convert between any of the million dialects that any given user will use, then it stands a chance of making it much easier for people to share perl code.

php.net does documention like no other (1)

apachetoolbox (456499) | more than 11 years ago | (#5480406)

I'd love to see perl documented in the same manner as php.net documents PHP. How about it www.perl.com guys?

perldocs already far beyond php.net docs (3, Informative)

Ars-Fartsica (166957) | more than 11 years ago | (#5480574)

perldoc -f $FUNC

Does php provide anything like this?

What I typically hear and feel myself is that the php site documentation is sparse to a fault, with a great deal of useful information simply left out. Check out how many holes are filled in by contributors at the bottom of each page of the php.net site docs. These are glaring ommissions.

Re:perldocs already far beyond php.net docs (1)

L7_ (645377) | more than 11 years ago | (#5480987)

http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF -8&q=php+FUNC&btnG=Google+Search

Re:perldocs already far beyond php.net docs (1)

ChaosDiscord (4913) | more than 11 years ago | (#5480998)

While perldoc (especially perldoc -f functionname) is keen, for those of us who like scroll bars, proportionally spaced fonts, and links, check out perldoc.com [perldoc.com] . It has documentation for multiple versions and a solid search engine. It also documents almost everything in the insanely useful CPAN.

This kind of subroutine? (-1)

BarrettAnderson (622397) | more than 11 years ago | (#5480426)

1 way to piss off your host:

while("go forever" eq "go forever")
{
$me = 1;
}

I've fried a few servers with that one... (only works on young hosts without protection for that sorta stuff).

Is this a joke? (0, Flamebait)

nosferatu-man (13652) | more than 11 years ago | (#5480436)

What, Perl didn't have ENOUGH syntax before?

Sweet creeping zombie Jesus. At least the world of computing can take comfort in the fact that this trainwreck of a project will never ever see the light of day.

'jfb

holy fuck is perl ugly! (-1, Troll)

Anonymous Coward | more than 11 years ago | (#5480495)

if it were any more l33t, it'd be brainfuck++!

Perl 6: Replacing old cruft with new cruft! (3, Insightful)

wackybrit (321117) | more than 11 years ago | (#5480554)

I am a Perl fanatic. I love Perl. But what is going on with Perl 6? The guys working on the Parrot [parrotcode.org] VM for Perl 6 are doing such an amazing job, but I'm pretty dismayed about the language development on Perl 6 itself.

Perl 6 was meant to be a total rewrite. Nothing was meant to be sacred, cruft could disappear, and we'd be left with a mean language, true to its roots, and working on a hot new VM.

Instead we get stuff like this:

sub *print (*@list)

Talk about confusing! * signifies a glob, but in the above example the first * signifies a sort of 'package wildcard' meaning that the subroutine is global! The second *, however, is a glob, as in Perl 5. WTF? Perl 6 looks almost as inconsistent as PHP already, and it's only in draft!

Each page of this Apocalypse presented me with a new piece of cruft to look horrified about. Slurpy arrays!? Oh my god. Wall even goes on about 'psychological reasons' for syntax! 'Default values' and 'Rules' are things that are easily done with existing code.. it's not even as if they result in particularly crufty code in Perl 5.

I'm still looking forward to Perl 6, but it really does seem as if Parrot is where the true action is. Perl 6 really does look as if it is being designed by committee.

Use what you need (4, Insightful)

Ars-Fartsica (166957) | more than 11 years ago | (#5480679)

Perl 5 already contains enough crap to confuse even perl "experts", yet this doesn't stop adoption. Take Bjarne's advice and only use the parts of a language you need, ignore the esoterica. Something else confuse you? Ignore it. Chances are you don't need it anyway.

Perl has always had a lot of esoterica. Don't let it bog you down. You can be amazingly productive in perl without ever knowing what a typeglob is.

Re:Use what you need (0)

Anonymous Coward | more than 11 years ago | (#5480955)

Until you have to use someone else code. Then you must know what they liked from the language.

Re:Use what you need (0)

Anonymous Coward | more than 11 years ago | (#5480975)

well thats why you're getting paid. stop whining and open a book.

Re:Perl 6: Replacing old cruft with new cruft! (3, Interesting)

gmuslera (3436) | more than 11 years ago | (#5480919)

Instead we get stuff like this:
sub *print (*@list)
Talk about confusing! * signifies a glob, but in the above example the first * signifies a sort of 'package wildcard' meaning that the subroutine is global! The second *, however, is a glob, as in Perl 5. WTF? Perl 6 looks almost as inconsistent as PHP already, and it's only in draft!

Perl is more based in natural languages than in "traditional" programming languages. In natural languages, what you are saying depend on the context, the same words say different things if they are used in diffeerent situations or positions inside a phrase.

Well, in perl that also happens (in perl 5 you'll find a lot more examples of this, starting with the "$" in $a, $a[1] and $a{"red"}).and I think that it was more common in the previous versions (at least in Perl 6 I believe you'll have $a, @a[1] and %a{"red"})

Perl obit? (0, Redundant)

pongo000 (97357) | more than 11 years ago | (#5480563)

Looks like we finally get type signatures which are way more powerful than the rudimentary prototypes available with Perl5.

If I want function signatures, I'll reach for the C compiler. Otherwise, I don't want to be encumbered with having to keep track of data types. That's the (former) beauty of Perl: Powerful yet simple.

I think Perl 6 will be the end of the Perl dynasty as we know it. What a shame.

well... (0)

Anonymous Coward | more than 11 years ago | (#5480585)

G.W Bush is nearer to make Apocalyse than Perl is!

Perl breaking Greenspun's 10th rule? (0)

Anonymous Coward | more than 11 years ago | (#5480600)

Most scripting languages tend towards lisp in the end (just look at python - replace the whitespace with parens and whammo! 90% lisp).

But perl...

Perl is the first direct violation of Greenspun's 10th!. Perl 6 is the ANTI-LISP...

Just look at that syntactic MESS, just look at the wilful misunderstanding and abuse of Computer Science concepts and terminology.. or don't, because it will BURN OUT YOUR EYES. AAAAARGHHHH!!!.

Will Perl 6 lead to Slashcode 3? (2, Insightful)

mhesseltine (541806) | more than 11 years ago | (#5480602)

Considering all the features available, it seems like this would be the ideal time to freshen up slashcode. Then, maybe we'd see valid HTML 4, CSS support, layout without n-level deep tables, etc.

Seeing the forest through the trees (5, Interesting)

RichDice (7079) | more than 11 years ago | (#5480667)

On first glace, the P6 syntax looks... scary. And I'm even someone who's been into P6 (at least marginally) for a few years now.

What I think though is important to remember is that if all you look at is the syntax, you won't appreciate the power -- and simplicity -- of the idioms. Taken out of context and put into cooked up examples meant to show off the new syntax, it looks bad... really bad. But once you actually start programming in it, you'll find that most of what you want and need to do will actually come quite simply.

That vast majority of all this new syntax will be applied in the vast minority of programming cases. Much of it will get sucked up into modules, classes, etc., that you'll use without worrying about what's actually going on under the hood. And "the rest of us" will just have an incredibly powerful language that is actually easier to program.

Cheers,
Richard

Write Only Language (2, Flamebait)

Opiuman (172825) | more than 11 years ago | (#5480739)

This is not meant as flame-bait -- I've really tried to learn Perl. Even though I'm a 'real' programmer, I am not biased against scripting languages -- in fact, I think that the so-called 'duct-tape' languages are super-useful and important to technology in general.
Having said that, IMHO:
a) Perl, in the quick-and-dirty sense, is too dirty and not quick enough.
b) Have you ever seen C-obfuscation championship code? Now have you seen a Perl program that does anything more than "Hello World"? Notice the similarities?
Now I know that you can write bad code in any language, but bad-code in Perl is what I call 'job-security encryption' as you will never be able to fire the person who wrote the code, no matter how bad it is, because no one else will be able to read it. Either you re-write completely it or you keep that hacker...
On a side note, speed optimization in Perl tend to create spaghetti code with weird symbols for meat-balls. And I love meat-balls.

The shortest distance to a solution (2, Interesting)

Ars-Fartsica (166957) | more than 11 years ago | (#5480877)

Perl provides syntactic shortcuts and people use them. You do not need to use them. You can write Ada/Java-like incredibly verbose muck in Perl if you like. No one is forcing you to take the shortcuts....yet people do. Why is this? Because time is more valuable than code to many people.

GCC Larry.pl -Wall (2, Interesting)

smitty_one_each (243267) | more than 11 years ago | (#5480852)

I'm waiting for Perl6 before I get too serious about Perl, as I don't want to have a lot of unlearning to do
Got about 10 pages into it before the /.ing. What a provocative language.

Question regarding:
my %pet is Hash of Array of Array of Hash of Array of Cat;

why not:
typedef my Hash of Array of Array of Hash of Array of Cat %pet;
IMHO, without typedef, C++ would be lost, particularly when the STL is on the loose...

Larry, your Boss is as good as mine... ;)

Forget the interpreter... (3, Insightful)

jkauzlar (596349) | more than 11 years ago | (#5480969)

When does the book come out? Larry Wall's Perl 5 manual was the most fun I've had reading a computer book. Is he going to top it with the Perl 6 book?

Wall's writing style (1)

cbogart (154596) | more than 11 years ago | (#5480997)

I'm getting worried about Perl 6 being too crufty, but I have to say I love Wall's writing style. "Disintertwingled" indeed. (p. 4)
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?
or Connect with...

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>