Larry Wall Unveils Perl 6.0.0 163
An anonymous reader writes: Last night Larry Wall unveiled the first development release of Perl 6, joking that now a top priority was fixing bugs that could be mistaken for features. The new language features meta-programming — the ability to define new bits of syntax on your own to extend the language, and even new infix operators. Larry also previewed what one reviewer called "exotic and new" features, including the sequence operator and new control structures like "react" and "gather and take" lists. "We don't want their language to run out of steam," Larry told the audience. "It might be a 30- or 40-year language. I think it's good enough."
It's about time (Score:5, Interesting)
I went to a presentation at a Unix convention in San Diego in 2000, 15 years ago, where Larry Wall talked at length about Perl 6, and how he was hard at work on it.
Well, better late than never.
Re:It's about time (Score:5, Funny)
It is the End Times. I never thought this would ever happen.
Good bye everyone, it was fun while it lasted.
I'll be writing my "Hello apocalypse!" script in perl6 shortly.
Re: (Score:2)
say 'Hello apocalypse!';
Re: It's about time (Score:1)
Re: (Score:2)
No, not yet. Half Life 3 is yet to come.
Re: (Score:1)
(Publish the fifth issue and update 1-3.) At this phase, he'll need to break the oldest human alive record several times over...
It's just too much work. If it gets finished, it won't be by him.
Re: (Score:1)
Re:It's about time 11 years after the book (Score:5, Funny)
And the book appeared more than 11 years ago [bahut.alma.ch], so indeed, it's about time. Now I only have to wait for it to appear in Debian stable ...
Re: (Score:2)
Now I only have to wait for it to appear in Debian stable ...
Re: (Score:2)
No, just a dev release. Still no production Perl 6. Larry continues to indulge in mental masturbation and add whatever catches he fancy from any and all other languages. It's like urban sprawl for a city with no zoning
Re: (Score:2)
I can beat that. I was at the announcement at TPC4.
Can't find independent verification (Score:2)
Re:Can't find independent verification (Score:5, Informative)
Here's URLs where the event was announced.
http://www.meetup.com/SVPerl/e... [meetup.com]
http://perl6releasetalk.ticket... [ticketleap.com]
How about that (Score:1)
Didn't quite believe it would ever happen.
Not that I'm eager to adopt it, we have lots of perl5 code and the conversion would be significant.
Re: (Score:2)
it hasn't happened, just a dev release. so Perl 6 not ready still, after 15 years of screwing around
The race is on (Score:4, Funny)
Perl 6 vs. Python 3 - who will get to 1000 users first?
Re: (Score:2)
I actually use Python 3 for most of my work. Once I learned to put () around my prints like in nearly every other language I was fine.
Re: (Score:1)
considering perl5 code runs in perl6... it'll happen pretty quick
Perl5 in Perl6 (Score:2)
One of the goal (longer term, so don't expect it fully working with this preview release. Maybe neither with the final at christmas) is to allow other language being accessible to Perl6.
To quote one of the links:
But Larry was especially proud of Perl's ability to drop down into other languages. ("This is why we say all languages are really just dialects of Perl 6...") Python and Lua are even included in the Inline library. And Larry pointed out a new library that adds Ruby-esque rules, so exclamation points and question marks can be used at the end of identifiers. ("If that's what it takes to make Ruby programmers happy...")
Example:
- Inline-Perl5/ [github.com] - Wraps a Perl5 interpreter as a module in Perl6 with data passing. Means perl5 and perl6 mixed *TODAY*. Works with compatibility down to all perl5's bugs/weirdness. Might still suffer limitation when passing some weird constructs around, and some speed limitation.
- v5 [github.com] - abus
Larry WOL (Score:2)
In related news, Larry has announced he is changing spelling of his name to more accurately describe his life's work:
Larry
W(rite)
O(nly)
L(anguage)
Non JVM (Score:2)
Re: (Score:2)
At the presentation last night, Larry said they'd plan to focus just on MoarVM, but they were pleased with the progress of the JVM, so there's some support for that too.
Re: (Score:2)
Bugs mistaken as features? (Score:4, Funny)
Sounds good.
| The new language features meta-programming — the ability to define new bits of syntax on your own to extend the language, and even new infix operators.
Hey Larry, I found a huge bug which could be mistaken as a feature!
Re:Bugs mistaken as features? (Score:5, Interesting)
It gets better, in addition to "comefrom" (OK, "react"), the only branching construct worse than goto, you can change operator precedence. How'd you like to maintain that code?
Re: (Score:2)
i was thinking the same thing, while i look at it and say "neat" and think about how much fun that would be to use.
Then i also stop and have to ask, Isn't it already hard enough to read someone else's perl code? with this having to pickup someone else's perl code will be a nightmare.
Re: (Score:2)
If they are shit programmers, yeah. You can write garbage in nearly any language. Perl just makes it easier to write shitty code.
-B
Re: (Score:2)
Changing operator precedence? No.
Re:Bugs mistaken as features? (Score:4, Interesting)
How'd you like to maintain that code?
No one would, which sounds like job security to me.
Re: (Score:2)
Meh... I kind of like Perl. Nobody can tell the difference between my gibberish and good code. Given my roundabout logic process I look like a straight up genius. Well, that and I can't actually manipulate data well so a flat file is about as complex as I tend to get.
Yes, yes there's a bunch of reasons I hired professionals.
Re: (Score:2)
Features like that wouldn't be so bad if there were a way to isolate their use. For example, ordinary Perl files could be .pl and not allowed to change the language. Perl files that mucked with the language in various ways would be required to have a .pld (Perl Language Definition) suffix. That way you could make rules like, "No PLD files in this project" or "only Joe has permission to change the PLD and you'd better have a damned good reason for asking him to change it".
There are legit reasons to modify
Re: (Score:2)
Larry certainly one-upped C++ operator overloading!
But of course, you could enforce just what you suggest with code reviews and a grep or two just to be sure.
Re: (Score:3)
I'm primarily a C++ guy these days. C++ has plenty of ways to write unmaintainable programs, so I'm used to having to make sure the code I write is maintainable. (I also write maintainable Perl.)
What you do not want to do is accept code from a C++ developer who knows how to use all the neat features but not when not to. This has been true of Perl, also, ever since I encountered it.
Re: (Score:1)
No Coroutines (Score:5, Insightful)
No coroutines. So sad. That still leaves Lua and Stackless Python as the only languages with symmetric, transparent coroutines without playing games with the C stack.
Neither Lua nor Stackless Python implement recursion on the C stack. Python and apparently Perl6/More implement recursion on the C stack, which means that they can't easily create multiple stacks for juggling multiple flows of control. That's why in Python and Perl6 you have the async/await take/gather syntax, whereas in Lua coroutine.resume and coroutine.yield can be called from any function, regardless of where it is in the stack call frame, without having to adorn the function definition. Javascript is similarly crippled. All the promise/future/lambda stuff could be made infinitely more elegant with coroutines, but all modern Javascript implementations assume a single call stack, so the big vendors rejected coroutines.
In Lua a new coroutine has the same allocation cost as a new lambda/empty closure. And switching doesn't involving dumping or restoring CPU registers. So in Lua you can use coroutines to implement great algorithms without thinking twice. Not as just a fancy green threading replacement, but for all sorts of algorithms where the coroutine will be quickly discarded (just as coroutines' little brothers, generators, are typically short lived). Kernel threads and "fibers" are comparatively heavy weight, both in terms of performance and memory, compared to VM-level coroutines.
The only other language with something approximating cheap coroutines is Go.
I was looking forward to Perl 6. But I think I'll skip it. The top two language abstractions I would have loved to see were coroutines and lazy evaluation. Perl6 delivered poor approximations of those things. Those approximations are okay for the most-used design patterns, but aren't remotely composable to the same degree. And of course the "most used" patterns are that way because of existing language limitations.
These days I'm mostly a Lua and C guy who implements highly concurrent network services. I was really looking forward to Perl6 (I always liked Perl 5), but it remains the case that the only interesting language alternative in my space are Go and Rust. But Rust can't handle out-of-memory (OOM). (Impossible to, e.g., catch OOM when creating a Box). Apparently Rust developers think that it's okay to crash a service because a request failed, unless you want to create 10,000 kernel threads, which is possible but stupid. Too many Rust developers are desktop GUI and game developers with a very narrow, skewed experience about dealing with allocation and other resource failures. Even Lua can handle OOM trivially and cleanly without trashing the whole VM or unwinding the entire call stack. (Using protected calls, which is what Rust _should_ add.) So that basically just leaves Go, which is looking better and better. Not surprising given how similar Go and Lua are.
But the problem with Go is that you basically have to leave the C worldbehind for large applications (you can't call out to a C library from a random goroutine because it has to switch to a special C stack; which means you don't want to have 10,000 concurrent goroutines each calling into a third-party C library), whereas Lua is designed to treat C code as a first-class environment. (And you have to meet it half way. To make Lua coroutines integrate with C code which yields, you have to implement your own continuation logic because the C stack isn't preserved when yielding. It's not unlike chaining generators in Python, which requires a little effort. A tolerable issue but doable in the few cases it's necessary in C, whereas in Python and now Perl6 it's _always_ an issue and hinderance.
Re: No Coroutines (Score:3)
Too bad Lua sucks last time I checked. Remember trying to do bitwise and integer stuff with it. It does integrate well with C but that's about all I'd say about it.
Re: (Score:2)
These days I'm mostly a Lua and C guy who implements highly concurrent network services.
Erlang?
Re: (Score:1)
Why are you arguing with yourself, uid 666? Are you insane?
Oh no (Score:1)
Saw this and had some bad flashbacks to using Perl. What a monstrosity. Even a friend of mine who loved it admitted he could read his own code later on. If you have to write a one liner, fine, but I had to maintain actual code written in Perl. It makes my skin crawl just thinking about it.
Re: (Score:2)
duh... "admitted he could NOT read his own code later on"
Re: (Score:1)
Now this can be fixed because it has:
>> ability to define new bits of syntax on your own to extend the language :-)
Re: (Score:3)
This reminds me of the old joke about Forth: Real programmers can tell the difference between Forth and line noise.
Re:Oh no (Score:4, Insightful)
Re:Oh no (Score:4, Funny)
The best part is you can append gibberish to it and tell everyone that you've done lots of work and nobody will know the difference. Hell, it might actually do something useful!
I am going to admit that I write (or have written) some Perl. I've even given it away. I'd also like to take this time to apologize for my Perl.
I wrote a "safe list" script for a friend, it was really damned simple. People signed up and sent email messages to each other for the purposes of MLM - that's not why I wrote it, that's just what people did with it. It had a small but functional administration panel. It was about as secure as a screen door. Usernames and passwords were in a plain text file - you were SUPPOSED to move it and chmod it but I don't think anyone ever did even though it was mentioned a few times in the README.TXT.
Anyhow, he wanted to sell the script. I said that was cool. I was more interested in the code so I made a few versions. It was usually purchased a few times and then hit Usenet in .zip form. They could have at least taken my email out of the damned thing if they were going to steal it. I've long since dropped that email. The last version (released in something like 2002) was free for the taking and my friend charged to install and customize it as he'd learned a little by then.
So here's the easiest to install script and the least secure thing on the internet - plain text files, indeed, and I *still* see it installed from time to time. I can only imagine that the email address still gets emails from people asking what chmod means or how to upload the file or how they put it in their C drive and nobody seems to be able to access it from the internet.
Yup... My Perl... Breaking machines, frustrating users, and being insecure for 25 years and running.
A little part of me is kind of proud of that but my formal statement is, indeed, an apology.
Re: (Score:2)
And don't try to make your script into one line unless it is in fact trivial. Just because you can do something doesn't mean you should.
"First Development Release" ? (Score:4, Interesting)
If that was the first development release, what on earth was the 2010 release of Rakudo Star?
The problem with Perl 6 was never a lack of development releases, it's 15 years of NOTHING BUT development releases.
Perl (Score:5, Insightful)
I used perl a lot over the years.
comparing it to a compiled language (C, Ada, Fortran, etc) or a web centric (java, java script, php, etc) language is not a good comparison.
when I need something done (and needed more than the shell) and I had to maintain it.
I wrote it in perl.
all sorts of sysadmin widgets.
many are still being used today (15+ years later)
I wrote clean decent code with comments & modules.
finding the cpu & disk hogs, by the day, week & month.
who was running what when the system crashed.
cgi code for low volume web server tasks
updating DNS
queueing outgoing faxes & saving history
rotating log files and saving a limited number of copies.
how much code have you written ? and had it stay running for decades ?
the people that took over my positions when I changed jobs never had a problem updating the code or using it.
Re: (Score:3)
Re: (Score:2)
If I find myself doing anything script-wise that involves manipulating data sets I'm in R. I love R.
mock horizon (Score:2)
Once a subject goes over the mock horizon, it gets pretty hard to distinguish entire discussion threads from line noise.
Why stay away from Perl (Score:2, Insightful)
- Hard to read code with multiple '$'s and '@'s on every line
- In-place string modification is asking for bugs
- Clumsy OOP
- Poor selection of publicly available libraries; some have critical bugs that have not been fixed for years
And all this before having to maintain code written by someone else, in a language better suited for one-li
Re:Why stay away from Perl (Score:5, Insightful)
- Hard to read code with multiple '$'s and '@'s on every line
I prefer to have variables differentiated (scalars, arrays and hashes) and clearly identified from other syntax or text. It makes code more readable IMHO.
- In-place string modification is asking for bugs
You mean string interpolation? This in fact is one of Perl strengths
$str = "There are $num apples".
is clearer and less busy, easier to remember than
str = "I have {a} apples".format(a=num)
- Clumsy OOP
Specifics? There are some valid criticism of Perl's 5 OOP but the success of CPAN and a long list of highly successful reusable OO modules highlights its practical side.
- Poor selection of publicly available libraries; some have critical bugs that have not been fixed for years
Now you are well into troll territory or you really haven't used Perl much. DBI, CGI, LWP, IO::Socket, HTML::Parser, GetOpt::Long, Devel::NYTProf (not really a module but a totally awesome profiler) the list goes on.
Re: (Score:2)
To be fair, Perl 5's OOO implementation does feels like it was tacked on at the very last minute. It doesn't even qualify as OOO by some definitions (lack of encapsulation, for example).
Having said that, OOO in Perl is VERY clever in the sense that it extends the language in a big way with very minor changes. bless and @ISA might look unintuitive on a first glance but are very simple at their core and integrate with existing language seamlessly.
Re: (Score:2)
This is why Perl6 is not Perl5.
Re: (Score:2)
> I prefer to have variables differentiated (scalars, arrays and hashes) and clearly identified from other syntax or text. It makes code more readable IMHO.
Not sure if that argument for perl is valid anymore, in the current age of IDEs and syntax highlighting text editors like Sublime etc. All the visual differentiation is done for you.
Re: (Score:2)
- Hard to read code with multiple '$'s and '@'s on every line
I prefer to have variables differentiated (scalars, arrays and hashes) and clearly identified from other syntax or text. It makes code more readable IMHO.
I am sorry, how is $$this->{that} for readability? If you still have doubts please show this to a non-zealot for comment.
- In-place string modification is asking for bugs
You mean string interpolation? This in fact is one of Perl strengths
$str = "There are $num apples".
is clearer and less busy, easier to remember than
str = "I have {a} apples".format(a=num)
No I do not mean interpolation, but all the regex transformations modify string in place, sometimes inadvertently destroying needed stuff. Python takes the opposite approach -- to NEVER modify string in place. Compare
$text =~ s/^ *//;
$text =~ s/ *$//;
to
text = text.strip()
Perl modified the string in-place in each line, while in Python I made an explicit assignment (normally
Re: (Score:2)
- In-place string modification is asking for bugs
Have you ever seen a program where that caused a bug? Serious question, I never have.
Re: (Score:2)
Re: (Score:2)
I don't think this is insightful, its just a repeat of the same criticisms I've heard for 15+ years. Sorry you had to work on a crappy project, but Perl can be written in a modern manner that addresses the issues you've brought up. That being said I am glad you are happy with Python. Can't you just let me be happy with Perl?
Re: (Score:2)
Re: (Score:2)
Custom syntax (Score:2)
The ability to add custom syntax.... Because regular perl syntax isn't confusing enough!!
Time to try Perl 6 on GNU/Hurd (Score:2)
Finally! :D (Score:1)
Back in 2005 I remember hearing about how the fancy new Perl 6 VM was going to be super awesome. So I waited and waited. And then I waited some more.
Meanwhile, I'm 5 years into a personal project that's nowhere near ready to ship, so I think I finally understand what took him so long.
Congratz, Larry. You da man.
p.s. Obligatory: What year is it? [knowyourmeme.com]
meta-programming...lol (Score:2)
Awesome! (Score:2)
"Unicode strings at levels other than code-points" (Score:1)
Perl6 has nothing to do with Perl5 (Score:3)
"It might be a 30- or 40-year language. I think it's good enough."
No, actually Perl6 is not 30+ years old. Its not a replacement for Perl5, no matter how much Mr. Wall would like it to be. There's a lot of working Perl5 programmers that wish the community calling itself Perl6 (which is totally distinct from the Perl5 community for all practical purposes, despite some attempts be leaders to force coordination on us) would acknowledge the fact that Perl6 is Perl Not at all, and call this language something different.
I don't know if Mr Wall realizes how much harm he's done to working Perl5 programmers by continuing to insist on calling this thing he's worked on "Perl" at all.
Duke Nukem Forever (Score:2)
Is it true that Duke Nukem Forever was the first commercial software written entirely in Perl 6?
Remember FORTH? (Score:1)
Re: (Score:3, Insightful)
Perl still has a place, however it isn't the golden child language it once was.
Perl heyday was during the mid-late 1990's when having a Relational Database was considered an expensive (in software price and/or in system requirements) so for Web Applications, that needed to do a server side data processing there was a lot of reading flat text data. Perl is still king at flat text processing. However with MySQL, PostGreSQL and Microsoft SQL Server 2000 being created and designed to be good enough to handle
Re: (Score:2)
only viable scripting language choice
FTFY
Re: (Score:2)
only viable scripting language choice
FTFY
I used ReXX, you insensitive clod!
Re: (Score:2)
Like I said. Viable.
I used REXX too, BTW. On the Amiga (which would be William S. Hawes's AREXX, of course.) The Amiga OS was the only OS where Rexx was properly integrated, IMO, along with a decent range of applications with ARexx ports you could use. It certainly isn't in Windows or Linux. Don't know about OS2, never dipped a toe in that.
I built an ARexx interface into our Imagemaster application when ARexx first came out, and every Amiga application we did thereafter (my company was one of the most broa
Re: (Score:2)
Python only viable scripting language choice
FTFY
Re: (Score:2)
That's why anyone with a clue will see statements of "only viable" with comic disdain.
Say what you will, but perl is very, very good at parsing text.
-B
Re: (Score:2)
Yes, it is. Unfortunately, it isn't maintainable the way the vast majority of programmers use it, and to do that you have to give up quite a large set of its features -- the ones that read like Sanskrit or APL. For that reason, I won't allow it to be used for any of our projects. If speed is an issue, we can always drop to c, which can be *both* maintainable *and* faster than Perl or Python. Because our style requirements don't rule out any lan
Re: (Score:2)
I do agree with you on K & R style, though. Vertical space is valuable real estate.
-B
Re: (Score:1)
So PHP, Java servlets, ASP took Perl golden child status, as they are better designed to interact with the database.
Really? IMHO, nothing beats DBI.
..., as well the ability to embed your code with your HTML simplifying the process.
Ugh, this is why I don't like PHP or ASP. MVC all the way...which Perl has many frameworks for...
Re: (Score:1)
Re: (Score:3)
Same experience here. Say what you want about Perl 5 but it is still one of the fastest interpreted languages around.
I do a lot of prototyping in Python. But if i want speed, i usually use Perl.
Re: (Score:2)
And it runs so well on all those Linux servers!
Re: (Score:3)
> So PHP, Java servlets, ASP took Perl golden child status, as they are better designed to interact with the database,
I think it has to do with readability and cost to maintain, not specific API design choices.
Re:Perl? LOL. (Score:4, Informative)
perl6 is a complete overhall of the language. It isn't merely perl5++. They are similar, but they aren't compatible, which is why the perl5 interpreter will be maintained in parallel [so stated]. It has a huge number of new features, including real classes [instead of implementing a class as a hash].
The perl6 interpreter [written in perl6, BTW], will be able to run perl5 code (e.g. it hooks on .pm or .pm6, etc.) and run a mix of the two. It will also be able to run python code, ruby, javascript, etc. if one wants to add the front end. So, in some ways, it's like .NET. You can run a program comprised of perl6, perl5, python, C, etc. all coexisting in one program. Also, on the back end, perl6 will generate true byte code, and can generate javascript, python, or other backend languages.
You can also define your own operators (e.g. "nand" for not (x and y), or do full metaprogramming.
perl6 classes can define "how they're implemented" (e.g. implement me as a C struct, python dictionary, javascript hash, or java class, etc.). In other words, if you request a C struct binding, the data will be stored that way. So, you fill in your object, then you can pass it off to a C function without any glue code. In and out, in and out, back and forth, at extreme speed.
perl5 is not my main language (e.g. I make my living writing C code), but I've been coding perl5 for 20 years [and I maintain a codebase of 250,000 lines just for my personal scripts]. I've been following the progress for a few years now and I've been waiting for perl6 to give it a try.
perl6 has ripped off concepts from just about every other language--that's a good thing. Traits, mixins, interfaces(?), multimethods, a full set functional programming operations [like Haskell, Scala, etc.], full set operators [just like python].
What I've described is merely the tip of the iceberg, done from memory of what I was reading a year or two ago.
BTW, in case you didn't already know, slashdot runs on perl5 ...
Re: (Score:1)
BTW, in case you didn't already know, slashdot runs on perl5 ...
Is that supposed to be a plus or a minus?
Re: (Score:2)
It's supposed to be ironic, considering how every N months, another "perl is dead" meme gets posted to slashdot [usually as the result of an article posted by a dice shill]. This was mentioned at a perl conference in a talk by a core developer titled [something like] "Is perl really dead?". He went on to say that there are actually more jobs in perl than a number of other languages. IIRC, MS uses perl as the master control for building either the kernel or office.
In truth, I'm actually language agnostic.
perl5 in perl6 (Score:2)
perl6 is a complete overhall of the language. It isn't merely perl5++. They are similar, but they aren't compatible, which is why the perl5 interpreter will be maintained in parallel [so stated]. The perl6 interpreter [written in perl6, BTW], will be able to run perl5 code (e.g. it hooks on .pm or .pm6, etc.) and run a mix of the two. It will also be able to run python code, ruby, javascript, etc. if one wants to add the front end. So, in some ways, it's like .NET. You can run a program comprised of perl6, perl5, python, C, etc. all coexisting in one program.
Speaking of which:
- Inline Perl5 [github.com] : hooks into the (still maintained) perl5 interpreter to run Perl5 code down to the latest bugs/weirdness.
- v5 [github.com]: (ab)uses the ultra flexible grammar and meta programming of Perl6 ('s interpreter - like Raduko) so that it can interpret Perl5 ('s language syntax).
Re:Perl? LOL. (Score:5, Insightful)
The cool kids jumped on the python bandwagon saying perl was old, but in all this time they have yet failed to:
- created a language that has libraries like perl has,
- created a scripting language that can execute sql safely like perl can,
- created a language that has regular expression support as part of the syntax (so you don't have to enter in yet another level of indirection and escape all the whatevers ' " \ / when you're trying to simply match some string easily),
- created a scripting language that is also fast.
Which are all the reasons I love and use perl.
Re: (Score:1)
I think you should be a bit more careful about saying that PHP is better designed to interact with databases. It took quite a long time for PHP to implement _any_ sort of SQL injection protection, and with as many completely different (and completely incompatible) different methods of interacting with the database it's had over the years (PDO, PearDB,et al), it's pretty difficult to argue that it's in any way superior to DBI.
Re:LOL, Perl? Seriously? (Score:5, Funny)
Actually, if you look closely, the GP is actually a Perl script for computing the Fibonacci Sequence.
Re: (Score:2)
ok, now *that* was funny :)
Re:LOL, Perl? Seriously? (Score:5, Insightful)
I got tired of writing programs that looked like line noise.
Maybe you should have written better code.
Re: (Score:2)
This guy obviously spends most his time crafting an incredibly useful computer language and gives it away to others for free.
Who cares how long it took him to come out with a new release?
The fact that he wrote his own computer language is a marvel and milestone in and of itself.