LWN.net Logo

Chromatic: Goodnight, Parrot

Perl developer Chromatic has posted a post-mortem of sorts for the Parrot virtual machine. "Because volunteer time and interest and skills are not fungible, some of the people working Parrot had goals very different from mine. I wanted a useful and usable Perl 6 which allowed me to use (for example) PyGame and NLTK from Python and (if it had existed at the time) a fast CSS traversal engine from a JavaScript implementation. Other people wanted other things which had nothing to do with Perl 6. I won't speak for anyone else, but I suspect that the combination of a deliberate distancing of Parrot from Perl 6, including separate repositories, the arm's length of a six month deprecation policy, and an attempt to broaden Parrot's focus beyond just Rakudo created rifts that have only widened by now."
(Log in to post comments)

Chromatic: Goodnight, Parrot

Posted Feb 10, 2013 17:03 UTC (Sun) by marduk (subscriber, #3831) [Link]

I wonder if the Rakudo folks will consider to port to RPython à la Topaz.

Chromatic: Goodnight, Parrot

Posted Feb 10, 2013 17:08 UTC (Sun) by rahulsundaram (subscriber, #21946) [Link]

There is a very recent port to JVM apparently

https://6guts.wordpress.com/2013/02/02/a-look-at-the-prep...

If someone could fill in the rest of us on what this means for the future of Perl 6, it would be good to know.

Chromatic: Goodnight, Parrot

Posted Feb 11, 2013 18:23 UTC (Mon) by raiph (guest, #89283) [Link]

I like and follow Perl 6.

Rakudo is the leading Perl 6 compiler. Imo, at least in the short term (2013), where Rakudo goes, Perl 6 goes.

1. Getting to Rakudo on JVM
===========================

* First, I recommend folk consider reading the outstanding blog post rahulsundaram linked.
* http://pmichaud.com/2012/pres/yapcna-perflt/slides/slide3... is a slide from a fun 5 minute lightning talk (video at http://pmthium.com/2012/09/a-rakudo-performance/). This slide shows the ratios of the four languages used to implement the Rakudo compiler: Perl 6, NQP (a mini Perl 6), C, and PIR (Parrot Intermediate Representation) code. The sliver of PIR is a few weeks from being driven to zero.
* Once the NQP port to JVM is done the Rakudo Perl 6 compiler can be ported (jnthn clearly expects the whole Rakudo to be ported by yapcna, Austin TX, June 3-5.).

2. What Rakudo on the JVM means for Rakudo
==========================================

* As http://perl6.org/compilers/features shows, Rakudo is deficient on Unicode and related items, native types, and threads. (It's arguably ahead of Perl 5 on all three of these, but it's deficient relative to the Perl 6 spec.) Rakudo devs claim these had been held up by problems related to Parrot and that the JVM will provide a suitable backend to get these functionality pieces nailed down. Note that JVM functionality that enabled completion of the Perl 6 spec and Rakudo implementation, not speed, was the primary reason for porting to the JVM.
* Larry Wall recently said that speed is the #1 blocker of mass adoption of Perl 6. Although Rakudo has recently closed the speed gap in most regards compared to Niecza (another Perl 6 compiler that targets .NET) it's still dog slow in many ways. However, there are reasons to believe Rakudo on the JVM may be faster, perhaps an order or two magnitude faster, than Parrot. (chromatic seems to dispute this.) Imo, if Rakudo substantially speeds up it will be a game changer.

3. What a fast, complete Rakudo will mean for Perl 6
====================================================

Larry recently said he hopes to publish a Perl 6 equivalent of "Programming Perl" (the bible for Perl 5) around the end of this year. In mid 2009 I predicted Perl 6 would reach a generally robust state around the end of 2014. I think I was about right and folk will begin adopting Perl 6 in earnest during late 2014 or early 2015.

Goodbye, duct tape

Posted Feb 12, 2013 0:10 UTC (Tue) by man_ls (subscriber, #15091) [Link]

So, what are the implications of depending on two different proprietary virtual machines for Perl6? I guess that the JVM could be said to be Free software if one counts the OpenJDK, but then you have to explicitly target the OpenJDK -- and trust that Oracle keeps it open, or target another JVM and expect that Oracle does not sue it for some bogus reason.

There are many other languages that run exclusively on the JVM, but they are mostly esoteric -- the most popular of those seems to be Scala.

There are other issues like memory usage and startup time. Perl5 used to be the duct tape of the internet; requiring a JVM for Perl6 will make it unfit for that particular purpose (which for me is filled nicely by Python 2 anyway).

Goodbye, duct tape

Posted Feb 12, 2013 1:18 UTC (Tue) by raiph (guest, #89283) [Link]

> So, what are the implications of depending on two different proprietary virtual machines for Perl6?

Huh? Perl 6 has never depended and will never depend on anything proprietary.

Just because you can install non-free device drivers on a Linux system does not mean Linux is now suddenly dependent on that non-free software. It just means the Linux developers have not gone out of their way to stop people doing what they want to do.

If folk want to run Perl 6 on the JVM maybe to compare it with current options (Parrot, mono, Javascript) they will soon be able to. And that's a good thing.

> There are other issues like memory usage and startup time.

Indeed. The 2013 focus on speed and memory is needed. But, as even the originally very skeptical dskoll specifically recognized in this thread with a "wow" after he acually tried it again, Rakudo is improving on about the pace the devs suggested it would around 2 years ago.

Having it both ways

Posted Feb 12, 2013 11:32 UTC (Tue) by man_ls (subscriber, #15091) [Link]

I am missing something. In my simplistic reading, there are two leading Perl6 compilers; one (niecza) targets the CLR and thus the .NET runtime, which is proprietary (although there is a Free software reimplementation called Mono, the spec is still proprietary and patented by Microsoft). The other (rakudo) targets Parrot which apparently is an evolutionary dead-end and has lots of performance and encoding problems; the way out of these problems is Rakudo on the JVM, which is again proprietary or depends on a lawsuit-happy company (Oracle in this case). I see no mention of a JavaScript backend on the front page of either compiler.

Given that there isn't a single official runtime, I see a maze with just dead ends and proprietary options. It is like the situation with Linux a few years ago when graphics drivers were either unusable or proprietary; the community worked on it and now we have very good free drivers for popular boards. Is the Perl6 community similarly worried, or happy with the situation?

Having it both ways

Posted Feb 12, 2013 12:03 UTC (Tue) by epa (subscriber, #39769) [Link]

Oracle's JVM may be proprietary software (depending on what you download), but there are plenty of free virtual machines to run the language. It's not an open standard in the sense of being collaboratively developed by a standards body, but nor are lots of good and free things (X is an open standard; Wayland is not). More or less the same remarks apply to .NET.

Having it both ways

Posted Feb 12, 2013 13:50 UTC (Tue) by raiph (guest, #89283) [Link]

> I am missing something. In my simplistic reading, there are two leading Perl6 compilers; one (niecza) targets the CLR ... other (rakudo) targets Parrot ... [and soon] JVM ... I see no mention of a JavaScript backend

Indeed you are missing something. While you didn't see a mention of a JavaScript backend, it's plausible pmurias will have it done before jnthn completes the JVM port. And what about swarley's Go port?

Goodbye, duct tape

Posted Feb 12, 2013 2:31 UTC (Tue) by wahern (subscriber, #37304) [Link]

I think you're unintentionally conflating the JVM with the JDK.

A nice JVM is http://jamvm.sourceforge.net/. It's not the gargantuan, unportable mess that other JVMs are, which typically aim for speed first and sanity later.

Something like JamVM should also be quick to start up, too. But I completely agree that common JVMs suck for general scripting tasks. Solaris, I believe, tries to optimize this by sharing JVM instances. But "scripts" which require the JVM are still dog-slow.

Goodbye, duct tape

Posted Feb 12, 2013 2:33 UTC (Tue) by wahern (subscriber, #37304) [Link]

It begs the question, though, whether Perl6 on the JVM will require the JDK.

Goodbye, duct tape

Posted Feb 12, 2013 11:37 UTC (Tue) by man_ls (subscriber, #15091) [Link]

That is a very good point; it may address the speed and memory issues. It is not a very active project though; last release was in January 2010. But my argument as to "proprietariness" remains similar: the official JVM is proprietary and heavily patented by lawsuit-happy Oracle, which has sued other implementors (Google). If I had to take the decision to port to the JVM I would not take it lightly.

Goodbye, duct tape

Posted Feb 12, 2013 14:00 UTC (Tue) by raiph (guest, #89283) [Link]

Porting to the JVM is a pragmatic short term call not a strategic long term one.

As jnthn recently said:

"The way Perl 6 progresses in terms of its language design is thanks to people using the bits of it that are implemented so far and providing feedback. While a great deal of the language spec is now very stable, that has come after a great deal of feedback. We’ve some areas where we’ve not been able to build and try out certain things on Parrot, a big one being concurrency. Parrot lacked any kind of threads for years, and what it has now is not a great basis for building much on, sadly. That still leaves aside async operations, which should be considered in with all of this. Meanwhile, the JVM can offer well tested, widely used, battle-hardened building blocks for looking into these things, which will allow us to focus on the Perl 6 aspects of things without having to worry (much) about hitting VM bugs."

Once the JVM port is done I've no doubt that ports to other backends will start landing, and I've no doubt most will be non-proprietary.

Goodbye, duct tape

Posted Feb 13, 2013 19:34 UTC (Wed) by wahern (subscriber, #37304) [Link]

I believe the reason it hasn't had a recent release is because it's feature complete and stable. It's not stagnant, just a well executed project.

However, it implements an older spec of the JVM, v2 instead of "Java SE 7 Edition" (i.e. v3). But if you just want a nice, portable JVM, it's a good target, or at least a good place to start.

Chromatic: Goodnight, Parrot

Posted Feb 11, 2013 17:20 UTC (Mon) by raiph (guest, #89283) [Link]

A couple days ago fijal tried to persuade the #perl6 channel of the merits of doing an RPython backend. jnthn, the Rakudo dev currently porting NQP to the JVM (the main step toward porting Rakudo), said he was interested but wanted to wrap this first port before spending much time thinking about further ports.

Chromatic: Goodnight, Parrot

Posted Feb 12, 2013 3:01 UTC (Tue) by raiph (guest, #89283) [Link]

s/thinking about/talking much about/

(He's spent years thinking about portability issues and otherwise preparing for ports to VMs other than Parrot and I'm sure that'll be going on as he completes the JVM port.)

Should be: Goodnight, Perl 6.

Posted Feb 10, 2013 17:14 UTC (Sun) by dskoll (subscriber, #1630) [Link]

I don't mean to sound negative, but I think it's time the Perl 6 developers faced reality and just abandoned the project. The PHP folks had the courage to more-or-less abandon PHP 6.

All the Perl 6 energy could better be spent cleaning up and improving Perl 5, which is a perfectly useful language and likely to be around for many more years.

Should be: Goodnight, Perl 6.

Posted Feb 10, 2013 23:34 UTC (Sun) by tjc (subscriber, #137) [Link]

Or maybe they could take another run at it with a much smaller scope, armed with the wisdom that can be gained from really messing something up.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 0:44 UTC (Mon) by rqosa (subscriber, #24136) [Link]

Starting over from scratch at this point would be madness, since Rakudo is almost feature complete. They've just got to turn the last few red and yellow boxes green, and then it's all done.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 0:55 UTC (Mon) by dskoll (subscriber, #1630) [Link]

They've just got to turn the last few red and yellow boxes green, and then it's all done.

I don't think so. It has admittedly been a while since I looked at Rakudo, but when I did look at it it was unbelievably slow and huge compared to Perl 5.

Getting Rakudo to "work" in the sense of implementing the Perl 6 spec may be doable. Getting it to be a viable and useful language comparable to Perl 5 in size and speed? I'm not holding my breath.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 3:10 UTC (Mon) by HelloWorld (guest, #56129) [Link]

Well, doing better than Perl5 shouldn't be that hard. I mean, come on, it can't even collect reference cycles. In 2013. It doesn't have bloody subroutine signatures. And let's not mention WTFs like "Variable "$foo" will not stay shared".
That said, the field of "dynamically typed" (read: unityped), object-oriented programming languages is crowded enough already; I don't think we need Perl 6 either. Parrot would have been interesting if it had actually delivered as the "one dynamic VM to rule them all", so that code can be shared between different languages. But the article seems to indicate otherwise. Perhaps PyPy will be more successful, given the recent development of Topaz.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 5:34 UTC (Mon) by eru (subscriber, #2753) [Link]

Perl5 [...] I mean, come on, it can't even collect reference cycles ... subroutine signatures ...

Who cares, for the kinds of things Perl was originally intended to, and where it excels? It works fine as a "better sh" or a "better awk". I have found it to be just about the perfect language for small programs in the range of 100 ... 1000 lines that do some file manipulations and/or launch other programs. For large programs there exist several more suitable options, so there is no point in extending Perl beyond its original design.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 7:27 UTC (Mon) by tpo (subscriber, #25713) [Link]

In another thread someone asked, commenting on your tone, whether your account couldn't just be deleted:

> I don't think we need Perl 6 either.

Perl6 does have some interesting ideas (like being able to change the language parser from within a program). That phrase of you is scolding.

I'd say you did not read the original article or when you read it, did not digest one of its main points: Chromatic says there that developer motivation and interest is not fungible and that once it was not fun any more the negative comments (among others things) made him quit.

So what's the point of you commenting? With your negative comments making people quit doing what they like and that way showing the superiority of your opinions?

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 18:03 UTC (Mon) by HelloWorld (guest, #56129) [Link]

I'm writing comments to express my opinions. The fact that some people seem not to like them doesn't bother me very much.

> So what's the point of you commenting? With your negative comments making people quit doing what they like and that way showing the superiority of your opinions?
You make it sound as if it were a bad thing. When I see someone doing things that I consider harmful, and my comments stop them (which, btw, I consider unlikely), I won't feel bad for that.

That said, my comment isn't as negative as you imply. I said that I like the idea of sharing code written in different languages through a common VM like Parrot; how is that negative? It's a sad fact it didn't deliver in that regard; the Parrot Wiki [1] doesn't list a single language that is maintained and considered production-ready except for HQ9+, which is a joke language.

And yes, I said that I don't think we need Perl 6. What people don't seem to realise is that there's a cost associated with having more choice than necessary. When people write code in Perl 6, I can't reuse their code in whatever language I happen to use and vice versa, so everybody loses. And if I really want to rewrite my program's AST, I can do that with Clojure and use all kinds of Java libraries along the way. But actually, I don't like so-called dynamic languages for the reasons mentioned in [2]. Statically-typed languages like Scala or Haskell make DSELs easy enough for my taste.

[1] http://trac.parrot.org/parrot/wiki/Languages
[2] http://existentialtype.wordpress.com/2011/03/19/dynamic-l...

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 8:23 UTC (Mon) by epa (subscriber, #39769) [Link]

I think the point being made was not about the quality of the language so much as the implementation. The Perl 5 implementation is old technology: it doesn't have dynamic native code compilation, or even a real garbage collector, as you noted. But the upside of that is that it is mature and, for what it does, pretty fast. A complex algorithm implemented in Perl will never run as fast as Javascript with the latest engines, but programs that do a small amount of processing around builtin C routines (such as the regexp engine) have decent performance and not excessive memory usage. The Unicode support is nowadays very good too. Rakudo being something new hasn't been optimized to the same extent.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 8:53 UTC (Mon) by khim (subscriber, #9252) [Link]

I mean, come on, it can't even collect reference cycles.

Why is it a problem? Refcounting it probably the best compromise between predictability and convenience. Note how MacOS is losing the much lauded ability to handle reference cycles.

Sure, you get an instrument which is less pleasing from the abstract beauty POV but which is infinitely more usable: you can use it to track external resources, you know exactly how much memory is used at any particular moment, etc. And it's not as if you can't leak memory with "proper" garbage collector. Proponents of "full-blown" garbage collectors start foaming at this point and explain how these memory leaks are not memory leaks at all but the fact remains: when your program runs out of memory it does not matter if your leaks are "real" (and can be removed by a "proper" garbage collector) or "unreal" (and thus will be around no matter what you do).

If you know and can guarantee that all the references to "dead" data structures will be eliminated then usually it's easy to do the next extra step and break cycles apart, too, and if your data structures are so complex that you can't tear up the cycles then usually your program will consume endless amount of memory for "non-leaks" in some cases anyway.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 9:23 UTC (Mon) by alankila (subscriber, #47141) [Link]

The stated justification for losing the capability is to align even OS X developers with the iOS way of the world, where GC is apparently thought to be too expensive. Funnily though, Android phones show that GC is entirely feasible on mobile. I guess they should have tried harder.

And the "leaks" possible with garbage collector are usually not your father's memory leaks. The runtime doesn't lose track of the objects, it just can't release them because programming mistake prevents that. It's usually not hard to track down and fix, because you can capture snapshot of the heap and work out which objects are around by large numbers at the end of the day. (I do not think I've ever had to do this, whereas I've crashed production applications because of inadvertently introduced reference cycles. It shows to me which problem is more severe.)

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:35 UTC (Mon) by khim (subscriber, #9252) [Link]

Funnily though, Android phones show that GC is entirely feasible on mobile.

Sure, if you'll throw dual-core 1.2GHz CPU on the task which works perfectly fine on 600MHz iPhone 3GS you'll get the expected result. But is it really wise use of resources?

The stated justification for losing the capability is to align even OS X developers with the iOS way of the world, where GC is apparently thought to be too expensive.

Which is kind of strange because iPhone 5 specs are about half of what desktop Mac had when garbage collection was introduced in MacOS X 10.5, isn't it? And next iPhone will probably be more powerful then these macs. No, I think they just found that garbage collection is just unacceptable: it introduces jitter which is not easily observable on a desktop with mouse but is a big problem for touchscreen. But of course there are PR and to say that all these decades of GC-science were just waste of time is not politically correct thing to do.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 20:55 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link]

>Sure, if you'll throw dual-core 1.2GHz CPU on the task which works perfectly fine on 600MHz iPhone 3GS you'll get the expected result. But is it really wise use of resources?
First Android phones had 300MHz CPUs and were pretty snappy.

That's because Dalvik should be used as a glue system for native code and the UI layer.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 21:27 UTC (Wed) by khim (subscriber, #9252) [Link]

>Sure, if you'll throw dual-core 1.2GHz CPU on the task which works perfectly fine on 600MHz iPhone 3GS you'll get the expected result. But is it really wise use of resources?
First Android phones had 300MHz CPUs and were pretty snappy.

Sorry, but no. Not sure which 300MHz you are talking around but I still have G1 which has 528MHz - and it's laggy as hell. Sometimes it does not react on click for a second or more when you just adjust alarm time!

And when I need couple of seconds to go from "new SMS arrived" to the content of said SMS from the home screen... on an idle device with 192MB of RAM? No, it's the exact opposite of snappiness.

Now, that's true that not all these freezes are caused by GC, but many of these are indeed a GC freezes. Especially when you scroll something. Basically the only way to have smooth scrolling on G1 was to allocate all the objects once and then reuse them as was noted before. I seriously doubt that's GC creators imagined it's use but in practice it's often the only thing that works reliably.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 22:46 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

Try to connect to it and do GC debugging. You'd be surprised.

Most of pauses happen because there's very little RAM on the phone so it has to load applications every time you try to access them. And while Dalvik was specifically designed to make this fast, crappy flash layer often makes it slow.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 21:30 UTC (Wed) by khim (subscriber, #9252) [Link]

That's because Dalvik should be used as a glue system for native code and the UI layer.

But UI code is the code where latency is more important then throughput! It does not matter if you render new frame 10 milliseconds or 15 milliseconds, but if you usually render it in 5 milliseconds but occasionally need 50 then you have a problem - and this is exactly what typical GC does to your program.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 22:44 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

GC in G1 rarely took more than 20ms _and_ it was designed to be interruptible. I've actually debugged laggy applications on G1 and most of lags were caused by the native libraries taking too much time to do stuff.

Flash drive on G1 is also pretty crappy and can sometimes pause for a long time even on simple operations.

GC or not GC

Posted Feb 13, 2013 23:04 UTC (Wed) by marcH (subscriber, #57642) [Link]

> GC in G1 rarely took more than 20ms _and_ it was designed to be interruptible. I've actually debugged laggy applications on G1 and most of lags were caused by the native libraries taking too much time to do stuff.

In fact the real problem that this discussion demonstrates is the lack of transparency. Not just developers but semi-technical, "power users" should be able to do basic "lag troubleshooting" with relative ease, on the field, not requiring a PC and remote debugger.

GC or not, Android or iOS, all these systems should have basic self-monitoring and logging features *built-in* producing clear, power-user readable reports of all events like "ran out of memory, terminated X while Y was using 100M" and "ran GC for 2 seconds", etc.

Nothing beats name and shame. This is how Powertop multiplied by 2 or 3 the battery life of many Linux laptops.

GC or not GC

Posted Feb 13, 2013 23:08 UTC (Wed) by Cyberax (✭ supporter ✭, #52523) [Link]

You can get GC logs without debugger. But why do you need them? Debugging lags is not really a stuff that power users should do.

> GC or not, Android or iOS, all these systems should have basic self-monitoring and logging features *built-in* producing clear, power-user readable reports of all events like "ran out of memory, terminated X while Y was using 100M" and "ran GC for 2 seconds", etc.
Android has something like it, it can estimate the power use by application. You can use various apps to view these stats.

GC or not GC

Posted Feb 14, 2013 0:42 UTC (Thu) by marcH (subscriber, #57642) [Link]

> Debugging lags is not really a stuff that power users should do.

It's the only way to identify the guilty applications/services/system configurations/etc

As another example Windows' Resource Monitor (from Vista onwards) totally changed my Windows experience. I used to struggle against bloatware, taking random shots in the dark. Thanks to the Resource Monitor I am now doing surgical and very successful strikes in no troubleshooting time at all.

Too bad there is no "bootchart for Windows" yet. Or isn't there? Autoruns is nice but just a list.

Any complex and professional system has monitoring features built-in. Why not smartphones too? They are certainly complex enough to deserve this.

> Android has something like it, it can estimate the power use by application. You can use various apps to view these stats.

These are averages - the opposite of latency measurements.

GC or not GC

Posted Feb 15, 2013 0:04 UTC (Fri) by marcH (subscriber, #57642) [Link]

> Android has something like it, it can estimate the power use by application. You can use various apps to view these stats.

In fact what's needed is something very similar to this. An interface just as simple that displays the list of what the CPU/memory/network/applications were too busy doing in the last minute or so when it failed to react quickly.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 22:53 UTC (Wed) by nybble41 (subscriber, #55106) [Link]

There are two general ways to deal with GC pauses in programs requiring a near-realtime response. You can use a realtime GC algorithm which amortizes the GC work across all allocations and guarantees a bounded response time, or you can guarantee that there is sufficient free memory available to run the critical path without invoking the GC. The latter is most suitable when the program can expect a certain amount of idle time, e.g. between frames. It should be a simple matter of determining how much memory is needed to render a frame and then adding a call to the GC just before going idle to free at least that much space for the next frame.

Realtime GC algorithms are rare, because they're not usually required and they tend to have more overhead. While Java has System.gc(), it's apparently not very well defined (could be anything from a no-op to a stop-the-world full GC pass), and JavaScript has no standardized control over the GC at all, probably for security reasons. The end result is that while GC response time is manageable in principle, applications written in the most popular GC languages are not provided with the necessary tools for the job.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 22:29 UTC (Mon) by marcH (subscriber, #57642) [Link]

> No, I think they just found that garbage collection is just unacceptable: it introduces jitter which is not easily observable on a desktop with mouse but is a big problem for touchscreen.

A problem so big that it prevents Android from selling in any significant numbers. Oh, wait...

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 20:17 UTC (Wed) by efraim (subscriber, #65977) [Link]

It does not prevent Android from being sold in great numbers. It is however annoying as hell to have a freaking dial pad stall for several seconds on a 512 MiB RAM phone. I don't remember such basic functionality annoying me to no end on S40 phones with ~0.5MiB RAM.

Regardless, the greatest problem with GC IMHO is that they don't really collect memory. They collect objects, which reference resources. Those resources are typically much more scarce than memory - think DB connections, file locks. (ouch!) And an application which unpredictably does not free those resources will behave in a buggy way. Worse yet, most of the managed (either .NET or JavaScript) code I've seen is written with an attitude that GC will take care of resource disposal no matter what - and only the expected code execution path has a thought-through way of releasing those resources. If any exception shall occur, all bets are off. So the GC does not really help you. You still need to take care of all those resources - which means lots and lots of catching and rethrowing, not unlike C code which tries not to leak. So you either have an ugly code or exceptionally fragile code. (btw, have a look at the mess which is IDisposable in .NET framework - Microsoft developers had to decide whether to implement IDisposable when they designed each base class and interface in the standard library - based on an idea what those *inheriting* those classes might want to do - guess how many times they got that wrong; I do not blame them for it, seems like GC is simply the wrong idea if you want robust code which uses any external resources)

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 20:52 UTC (Wed) by marcH (subscriber, #57642) [Link]

> It is however annoying as hell to have a freaking dial pad stall for several seconds on a 512 MiB RAM phone. I don't remember such basic functionality annoying me to no end on S40 phones with ~0.5MiB RAM.

Agreed but, once again, I never saw any definitive proof that GC was to blame for that. It could just be too many background apps/daemons starting simultaneously when you just wake up the phone to make a call - an entirely different problem.

By the way and for some fun try to google "slow ipad" or "slow iphone".

> So the GC does not really help you. You still need to take care of all those resources

A typical application has an order of magnitude less network connections and files than memory objects, so GC means a LOT less to worry about.

> which means lots and lots of catching and rethrowing, not unlike C code which tries not to leak.

Which language does better and how? Please give some pseudo code example.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 0:25 UTC (Thu) by HelloWorld (guest, #56129) [Link]

> Worse yet, most of the managed (either .NET or JavaScript) code I've seen is written with an attitude that GC will take care of resource disposal no matter what - and only the expected code execution path has a thought-through way of releasing those resources.
This is not a problem with garbage collection but with developers who don't know which problems a garbage collector solves and which it doesn't.

> You still need to take care of all those resources - which means lots and lots of catching and rethrowing, not unlike C code which tries not to leak.
Pretty much every language out there offers features to avoid the catch-and-rethrow mess: with statements in Python, using statements in C#, destructors in C++, even Java has try-with-resources nowadays! And let's not mention finally blocks which have been around forever...

> (btw, have a look at the mess which is IDisposable in .NET framework - Microsoft developers had to decide whether to implement IDisposable when they designed each base class and interface in the standard library - based on an idea what those *inheriting* those classes might want to do - guess how many times they got that wrong; I do not blame them for it, seems like GC is simply the wrong idea if you want robust code which uses any external resources
The right way to use IDisposable is through a using statement, not through the GC.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 6:46 UTC (Thu) by efraim (subscriber, #65977) [Link]

>>The right way to use IDisposable is through a using statement, not through the GC.

using statement is only useful under *very* limited circumstances. Far more
often the code allocating the resource is not the top-level process to whom the resource use is limited. Also, often the resource holding object is shared. using provides no method of handling shared ownership of a resource.

So according to what you say, modern GC languages have no way of handling shared resource problem (unlike, uh, C++, which has reference-counted RAII patterns at least)

Another problem is that .NET allows you to reference (not weak references, the real thing) IDisposable objects from non-IDisposable ones. So you may perfectly well be referencing a zombie object which has been disposed of, but not GC'ed.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 8:30 UTC (Thu) by alankila (subscriber, #47141) [Link]

Combine using with a refcount then, so you can reference the same thing in multiple using-statements. Or pool the object. It's not like this is intractable problem.

Altogether these claims sound strange to me. I've never run into it myself. I pass the objects from the scope that has the 'using' downwards to all parties that need it. This makes sense for me because it's usually database connection and I need to commit or rollbak transaction by the end of it.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 17:11 UTC (Thu) by HelloWorld (guest, #56129) [Link]

> using statement is only useful under *very* limited circumstances.
> [...]
> So according to what you say, modern GC languages have no way of handling shared resource problem (unlike, uh, C++, which has reference-counted RAII patterns at least)

The using statement is useful under the *exact* same circumstances where a C++ destructor is useful: it's just a way to call a function as soon as a certain local variable goes out of scope.

> her problem is that .NET allows you to reference (not weak references, the real thing) IDisposable objects from non-IDisposable ones. So you may perfectly well be referencing a zombie object which has been disposed of, but not GC'ed.
If you do the same mistake in C++, you'd have a dangling pointer, how is that any better?

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 17:42 UTC (Thu) by efraim (subscriber, #65977) [Link]

>> The using statement is useful under the *exact* same circumstances where a C++ destructor is useful: it's just a way to call a function as soon as a certain local variable goes out of scope.

As I've already told you, using cannot be used in certain situations where reference counting can.

>> If you do the same mistake in C++, you'd have a dangling pointer, how is that any better?

You wouldn't, because you'd use a ref-counting pointer such as std::shared_ptr.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 20:24 UTC (Thu) by HelloWorld (guest, #56129) [Link]

> As I've already told you, using cannot be used in certain situations where reference counting can.
That's like saying that C++ destructors cannot be used in certain situations where refcounting can: it doesn't make any sense. Refcounting works just as well in C# as it does in C++, you just have to implement the refcounting logic in your Dispose method, similar to how shared_ptr implements its refcounting logic in the destructor. And actually, alankila already pointed this out, so I don't even know why I bother repeating it...

> You wouldn't, because you'd use a ref-counting pointer such as std::shared_ptr.
You would, because if you end up holding a reference to an object with refcount 0, that means you forgot to increase the reference count at some point, and that is perfectly possible with a shared_ptr<T>. You could call .get() on the shared_ptr<T> and store the returned T* somewhere. Or, more subtly, you can write a function that takes a T& and then stores that reference somewhere else. Then you pass *t (where t is a shared_ptr<T>) to that method and you've blown it.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 21:01 UTC (Thu) by efraim (subscriber, #65977) [Link]

>> Refcounting works just as well in C# as it does in C++, you just have to implement the refcounting logic in your Dispose method, similar to how shared_ptr implements its refcounting logic in the destructor. And actually, alankila already pointed this out, so I don't even know why I bother repeating it...

Yes alankina already pointed it out, and it is wrong. Refcounting simply does not work in C#. Because all the helper classes, collections e.t.c, do NOT implement IDispose. That's the point. You cannot implement refcounting when half the standard library is working against you.

>> You would, because if you end up holding a reference to an object with refcount 0, that means you forgot to increase the reference count at some point, and that is perfectly possible with a shared_ptr<T>. You could call .get() on the shared_ptr<T> and store the returned T* somewhere. Or, more subtly, you can write a function that takes a T& and then stores that reference somewhere else. Then you pass *t (where t is a shared_ptr<T>) to that method and you've blown it.

Both would be really stupid things to do and any non-newbie programmer in C++ knows better.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 23:49 UTC (Thu) by HelloWorld (guest, #56129) [Link]

Yes alankina already pointed it out, and it is wrong. Refcounting simply does not work in C#. Because all the helper classes, collections e.t.c, do NOT implement IDispose. That's the point. You cannot implement refcounting when half the standard library is working against you.
Well, it's not all that bad. You can write an extension method for IEnumerable that will return an object whose Dispose method disposes of the objects contained within the collection. Then you can write something like
using (myCollection.Disposer()) {
    ...
}
Anyway, C++ still has the advantage that an object will implicitly call its member objects' destructors after running its destructor, and that it'll call the destructors of the already-constructed member objects when an exception is thrown within a constructor. So yeah, point taken, C++ probably does somewhat better in that regard.
Both would be really stupid things to do and any non-newbie programmer in C++ knows better.
I wish! People mess up simple things like that all the time.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 23:54 UTC (Thu) by marcH (subscriber, #57642) [Link]

> Both would be really stupid things to do and any non-newbie programmer in C++ knows better.

How many non-newbie C++ programmers have you met for real? Three? Five?

Should be: Goodnight, Perl 6.

Posted Feb 15, 2013 8:26 UTC (Fri) by efraim (subscriber, #65977) [Link]

Assuming you are asking this in good faith (as opposed to, say, condescension) actually around twenty. Of course in this day and age you don't really have to meet a programmer "for real" to know they exist - just look at the number of people giving competent C++ answers on stackoverflow.com.

Should be: Goodnight, Perl 6.

Posted Feb 15, 2013 20:26 UTC (Fri) by marcH (subscriber, #57642) [Link]

It's hard not to make any harmful mistake in C++, much harder than in other languages. As a consequence good C++ programmers are few and a very large number of C++ programmers in service can be considered as newbies. You cannot dismiss mistakes as being "too stupid to do" in C++ as easily as in other languages.

Should be: Goodnight, Perl 6.

Posted Feb 15, 2013 22:33 UTC (Fri) by efraim (subscriber, #65977) [Link]

While you are right that there are many gotchas in C++ which can trip newbies, pointers are pretty easy to get right by simple ownership rules:

1. If you get a shared_ptr or unique_ptr you can store it for use later.

2. Otherwise (if you get a raw pointer or a reference) you have to assume that you do not own the resource and can only use it in the method's scope.

3. By calling .get() you are saying you are going to take care of ensuring the object's existence during your use of the pointer - i.e. you get no help all bets are off.

Moreover other languages have much more subtle traps in basic parts of language than C++ does - look at JavaScript and PHPs type-casting rules - while wildly different, both are very counter-intuitive and prone to creating security issues.

Should be: Goodnight, Perl 6.

Posted Feb 16, 2013 1:01 UTC (Sat) by marcH (subscriber, #57642) [Link]

I know nothing about JavaScript besides this funny description I've read some day: a functional language disguised behind curly brackets and some object-orientation not to scare away people afraid of maths :-)

http://javascript.crockford.com/javascript.html

You are probably right about JavaScript dangers. On the other hand, I know enough about PHP not to even consider it as programming language. Otherwise the differences between all other languages become negligible and they all become equally excellent

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad...

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 0:16 UTC (Tue) by HelloWorld (guest, #56129) [Link]

> garbage collection is just unacceptable: it introduces jitter
No it doesn't, not if you do it right. Incremental garbage collectors have been around for years, and measurements have generally shown that performance doesn't suffer significantly as long as enough memory is available, even with conservative garbage collectors like Boehm GC. Otoh, what people continuously push to the back of their mind is that calling free(3) isn't free. It does take time to free a big data structure.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 1:33 UTC (Tue) by wahern (subscriber, #37304) [Link]

Incremental garbage collectors don't remove jitter, they just help to mitigate it. Like generational collecting, it's an optimization. But there will always be jitter associated with GC. Whether you can perceive it or not is another matter.

What sells me on GC is the ability to handle things like lexical closures without trouble. Closures really cry out for GC, otherwise it's much too easy create cycles (as happens in Perl 5, often).

And the ability to manage external resources is largely a red-herring. A properly implemented C or C++ class will use reference counting internally, so that script references merely holds a lease, and don't control the lifetime, per se.

"Improperly" implemented classes however... well, if you're just tossing garbage C code into your application, then I have no sympathy for you. And adding a simple ref count should be easy enough.

As for GC memory leaks, AFAIU these are usually associated with caches, where you can create undetectable cycles between the key and the value in the cache. These can be solved by "ephemeron tables", although they're not computationally cheap. But then again, nothing is preventing you from manually breaking the cycle.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 20:48 UTC (Mon) by zlynx (subscriber, #2285) [Link]

Please don't use Android as a shining example of good garbage collection. I curse Android RAM management every time an app goes out to lunch and stops responding to finger input for a couple of seconds.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 22:30 UTC (Mon) by marcH (subscriber, #57642) [Link]

I think you are confusing Garbage Collection and swapping.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 0:15 UTC (Tue) by zlynx (subscriber, #2285) [Link]

No, I've seen the performance logs. It is GC. When the machine hits the limits it goes off and does serious GC, ie, not incremental but full.

Sometimes it also has to run out and kill off background tasks which seems to be time consuming. Does it wait for them to exit or something? KILL -9!

Many Android apps hits this problem when scrolling because they're dropping lots of objects from use and creating new ones. Then to fix that leads them into crazy object reuse schemes which start to make C++ look quite nice.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 1:25 UTC (Tue) by alankila (subscriber, #47141) [Link]

There is no swapping on android. It runs something like OOM killer that hunts for a process to murder based on some rules.

I do not see those long pauses reported here myself. My experience of a GC cycle is that it takes about 2 ms to do, though no doubt there are longer cycles occasionally.

IMHO larger problems are with the physical limits of the touchscreens and poor UI decisions. For instance, it takes some sampling to determine at suitable precision where the finger is, and that requires some low-pass filtering, making every UI movement already lag by default. Some UIs try to use doubleclick and singleclick for completely different actions, requiring singleclick processing to be delayed until it is known that doubleclick was not intended.

My personal #1 annoyance with my phone, a galaxy s2, is to do with the fact that the hardware takes around 1 second to wake up from sleep after I push the power button. That is a long time to wait. I once tried to logcat to see why, but it seems that waking up the hardware simply takes that long, whatever the reason.

And honestly, my phone has 1 GB of memory. It's hard to see it getting used up any time soon, because I'm just not the sort of power user these things are made for. Current shipping phones appear to have 2 GB. If you compare that to around 24 MB heap limit for most android applications, it's evident that something like 50 should be able to exist concurrently without system being even pressed for memory.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 21:01 UTC (Wed) by marcH (subscriber, #57642) [Link]

> There is no swapping on android. It runs something like OOM killer that hunts for a process to murder based on some rules.

I have a (too) cheap, Android 2.2 tablet with too little memory and it is slow because they enabled swap on it. I know for sure because they were honest about it and told about it in an official changelog. I also know because I installed another, non official build on it, disabled swap and it became much faster.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 12:35 UTC (Mon) by Cyberax (✭ supporter ✭, #52523) [Link]

An interpreted dynamic language without GC is a dinosaur. Refcounting often misses even the obvious cycles in simple closures - and that's something that shouldn't happen.

iOS is losing GC because it never was feasible in the first place. Objective-C requires a conservative GC that fully scans the app's RAM for all possible pointer-like data - and that is not really a good idea on a small device. Precise GCs in Android, WebOS and WinPhone do not suffer from this.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 12:28 UTC (Mon) by dskoll (subscriber, #1630) [Link]

What practical difference does lack of subroutine signatures make? Or the fact that Perl can't break reference cycles? Who really cares?

Perl 5 followed Larry Wall's philosophy of making something that works, even if it isn't "beautiful" from an abstract computer science point of view.

Perl 6 is going completely in the opposite direction: All sorts of amazingly cool features that thrill language designers but result in an unusable and horribly complex impractical lumbering beast.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 23:29 UTC (Mon) by raiph (guest, #89283) [Link]

> What practical difference does lack of subroutine signatures make?

An example in Perl 6 is that signatures are integral to the FFI solution and the upshot is that using C libraries from Perl 6 is truly trivial. http://justrakudoit.wordpress.com/2011/01/28/zavolaj/

> Perl 5 followed Larry Wall's philosophy of making something that works, even if it isn't "beautiful" from an abstract computer science point of view. Perl 6 is going completely in the opposite direction: All sorts of amazingly cool features that thrill language designers but result in an unusable and horribly complex impractical lumbering beast.

I think you're viewing Perl 6 through the lens of dissatisfaction of trying it years ago.

Partly because the effort is pretty much directed by Larry Wall, the Perl 6 result is increasingly delivering all the practical goodness of Perl 5, plus an enormous bunch of extra *practical* goodies, combined with doing it right from a computer science point of view.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 14:14 UTC (Mon) by dskoll (subscriber, #1630) [Link]

So... I built rakudo star 2013-01 and wow... they are making progress!

My original measurements showed perl6 taking 553 times as long as perl 5 to start and consuming 27 times as much memory.

Now perl 5 is bigger and slower than back then, and rakudo is smaller and faster, so... perl6 takes only 50 times as long to start as perl 5 and uses a mere 8 times as much memory. I'm not trying to be sarcastic here... I really am impressed they've been able to improve it this much.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 17:50 UTC (Mon) by bronson (subscriber, #4806) [Link]

So, if you extrapolate based on these two points, how long will it take for it to reach parity? :)

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:10 UTC (Mon) by dskoll (subscriber, #1630) [Link]

Ah, well! :) Do you extrapolate linearly? Exponentially? That's the $64k question.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:15 UTC (Mon) by raiph (guest, #89283) [Link]

That's on Parrot, which is terribly expensive in some ways in terms of both speed and memory.

You might be interested in my Feb 2nd post to perlmonks about the outlook for the speed of Perl 6 in 2013: http://www.perlmonks.org/?node_id=1016758

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 20:45 UTC (Mon) by dskoll (subscriber, #1630) [Link]

That's an interesting post. However, if the answer to "make this go faster" is to target a different VM, then I'm not filled with confidence. That's a huge change to make in a software project that's supposed to be at the optimization phase of its development.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 22:11 UTC (Mon) by raiph (guest, #89283) [Link]

It just so happens that one of the pieces that's happening anyway -- a port to the JVM so they can complete threads, NFG/Unicode, and native types -- looks set to have a big impact on speed and memory. So it definitely warrants at least a mention.

But no, the answer to making it go faster and be less wasteful of memory is not to port to a different VM. It's mostly about realizing the speed and memory efficiency already inherent in the design. This is something the team is only just now starting to do because they've followed the correct approach which is to make things work, make them work correctly, and only then focus on speeding things up.

There are several examples in the perlmonks thread I linked. Implementing sink/void context had no impact on semantics but sped up some operations by enormous factors (think thousands of times faster) and saved vast amounts of memory (think reducing usage from N gigabytes to N megabytes). This is the sort of thing they're now doing at an accelerating pace.

Fwiw the JVM port is not a huge change at all. Or rather it is, but they've already done the huge changes over the last few years. If you read jnthn's excellent blog post (http://6guts.wordpress.com/2013/02/02/a-look-at-the-prepa...) you'll understand this point.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 2:40 UTC (Tue) by alankila (subscriber, #47141) [Link]

Java has a lot of "industrial-strength" libraries. It would be very interesting to be able to use them from a language such as Perl6 natively. All of Java's stuff would be a vast addition to CPAN.

One of the reasons that really irritated me about programming in Perl 5 some 3-4 years ago was that it was clearly falling behind in terms of supporting some xml-based technologies, or pdf generation, or microsoft excel interoperability, and all such stuff which the primary competition in that space (java) had no trouble with, and which were features that the customers were requesting. I have no reason to think the situation has got any better, because my impression is that Perl's popularity has been falling further since.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 3:35 UTC (Mon) by bronson (subscriber, #4806) [Link]

> They've just got to turn the last few red and yellow boxes green

Remember when Perl6 felt close enough that they published a book about it? That was eight years ago.

No, it doesn't matter how many red or green lights you see, Perl6 is still a very long way from general use. It seems like it's been on a constant-time-to-completion schedule for almost its entire life.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 3:46 UTC (Mon) by bronson (subscriber, #4806) [Link]

I'm wrong, looks like we can celebrate the ten year birthday of Perl6 Essentials on June 27th of this year. A full decade.

Quick bump to a fine LWN article of antiquity: https://lwn.net/Articles/200075/

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 4:29 UTC (Mon) by rqosa (subscriber, #24136) [Link]

When that book was published there was no implementation, at all. Now there's an approximately 88% feature-complete implementation. That's a big difference.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 6:14 UTC (Mon) by bronson (subscriber, #4806) [Link]

It went from unusable to useless. Not such a big difference from where I sit.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 6:38 UTC (Mon) by rqosa (subscriber, #24136) [Link]

If you can't explain why you think Rakudo is "useless", then posting comments like that is just needless hostility towards its developers.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 8:46 UTC (Mon) by alankila (subscriber, #47141) [Link]

As a 10 year old perl 5 programmer, the way I see it is that Perl 6 is the last dinosaur men buit. (I know, so very optimistic of me...) It is so incredibly complicated that I suspect that only very few would be capable of learning to use it in full, and discover the most suitable abstraction to use in each specific type of problem. Everybody else will make do with some random but unique subset of the language, so everybody's programs will look different. That is not a good thing, imho.

I'd argue it is unwelcome even if there was a 100% functioning implementation that did not show poor performance characteristics. As in, nobody should ever use it. Why? Because Perl6 design is so complicated that there is probably not much room for new features or taking the language in new directions. It's really the same problem as with Perl5: a lot of bloat and ill thought out features that can never be changed because backwards compatibility.

I think Perl6's idea was to make a core so flexible that it has no limitations, and that makes it almost textbook case of Second System Syndrome. I also suspect it's the primary reason why it has taken so long: designing fully generic schemes for doing everything are a lot more work than just designing something according to reasonable guess of what your average programmer might want or need. Usually these designs prove out to be less flexible than hoped, and that effort was all a colossal waste.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:30 UTC (Mon) by raiph (guest, #89283) [Link]

> It is so incredibly complicated that I suspect that only very few would be capable of learning to use it in full

The same could be said of Perl 5. A big difference is that it's less true of Perl 6.

Perl 6 is a simpler language than Perl 5 in most ways. But, like Perl 5, there is scope for a full range of fluencies from baby to advanced. If you don't like that, you don't like Perl.

> Perl6 design is so complicated that there is probably not much room for new features or taking the language in new directions.

Again, this is arguably true of Perl 5. It's definitely not of Perl 6.

> I think Perl6's idea was to make a core so flexible that it has no limitations

You didn't get that idea from the actual project.

> I also suspect it's the primary reason why it has taken so long.

The reasons for it taking so long are legion. It was and is ambitious, no doubt about it.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 2:03 UTC (Tue) by alankila (subscriber, #47141) [Link]

"Perl 6 is a simpler language than Perl 5 in most ways."

Well, maybe for someone who is in the zen. Perl5 certainly wasn't pretty, though I could live with it apart from its scalars using so much memory and the language generally being so slow.

I'll assume what you say is true, though on the surface it seems to have a lot more syntax to deal with that is new to Perl6.

"You didn't get that idea from the actual project."

It is hard to remember stuff clearly from a decade ago, but I got the impression from the apocalypses where I thought that the common theme was "this is something that was difficult in perl5, let's remove this limitation [through some very complicated scheme for no clear reason]", and I got sick of it all when I learnt about the runtime reconfigurable syntax parsing. In my mind, that is a sign of language design going off the deep end. I get it that semantics sometimes have to be redefined to support features like operator overloading (whatever the merits and faults of this technique), but syntax too? I really don't look forwards to seeing code that makes use of that feature.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 3:02 UTC (Tue) by cmccabe (subscriber, #60281) [Link]

> Perl5 certainly wasn't pretty, though I could live with it apart
> from its scalars using so much memory and the language generally
> being so slow.

Let's be fair. Perl5 is still faster than a lot of the languages in common use: Python, Ruby, and Bash. (JRuby might be another story, but it's not widely used.)

My favorite new language is Golang. I've been using it in places where I formerly used Python (and before that... Perl) and it just... works so much better. It's really refreshing how quickly it starts up and runs, and the fact that it's compiled and type-checked. You don't have to live in terror of the next version silently breaking your code. And of course, there's a better concurrency story than just "run multiple VMs in parallel."

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 9:21 UTC (Tue) by alankila (subscriber, #47141) [Link]

Of course Perl is not the slowest language there is, but its speed and memory consumption nevertheless proved prohibitive for my needs. In general the problem had most to do with using a scripting language at all. Most of all I needed the struct packing efficiency and execution speed of a precompiled language, and the ability to spend just 4 bytes for an int. Hash tables (extremely fat objects) and 40 byte scalars (even if it was a single integer value) as perl typically does just wouldn't scale.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 5:16 UTC (Tue) by raiph (guest, #89283) [Link]

> "Perl 6 is a simpler language than Perl 5 in most ways."
> Well, maybe for someone who is in the zen.

Consider the comparison of baby Perl 5 and baby Perl 6 (the card deck code of pages/slides 16 thru 29) in this presentation by Carl Mäsak: http://masak.org/carl/fosdem-2013-flying-car/talk.pdf

> I got sick of it all when I learnt about the runtime reconfigurable syntax parsing.

Oh dear. That stuff (all the way through slangs) is pretty core to Perl 6 and stars in many of its triumphs as a DSL for producing DSLs. If you don't like that you dislike one of its unique strengths. Not to worry, there are many more. :)

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 9:32 UTC (Tue) by alankila (subscriber, #47141) [Link]

To me this perl5 vs 6 example you cite reads like someone came up with the syntax specifically to do those tasks. So there's a method that just happens to pick any number of array items? A lot of us would call those features bloat.

Cross operator such as "X~" which appears to mean something like 'combine two lists in every possible way with 2 implied for loop, then stringify every item, then return the list' sure is powerful, but I'm a boring stick-in-the-mud and do not really see that as much of an improvement over the two for loops. More to the point, assuming we really do want to get rid of explicit for loops, then why not compose the functionality out of functions from some Perl module?

Think of: cross(@a, @b) yielding some Pair objects of the two lists, rather than @a X @b. And rather than some weird operator like X~, perhaps there should be a stringify(cross(@a, @b)). I guess it's just not the Perl way, though, but I know which language I'd rather write.

Ditto for expressions like (1, 2, 3) >>+<< (3, 2, 1) yielding (4, 4, 4). This seems like rank madness to me. Python's NumPy would do the same with something like array((1,2,3)) + array((3,2,1)) yielding array(4, 4, 4). Why not use the existing library facilities and overloading capability to build this stuff?

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 11:14 UTC (Tue) by niner (subscriber, #26151) [Link]

The nice thing about hyper operatiors is that they allow automatic parallelization and they work with all operators even ones you define yourself. The compiler simply has much better optimization possibilities this way. That the code becomes very compact is a nice side effect.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 9:44 UTC (Wed) by k8to (subscriber, #15413) [Link]

But a generic method of applying functions to data can achieve the same thing while being syntactically regular and expressively clearer.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 17:27 UTC (Wed) by raiph (guest, #89283) [Link]

> But a generic method of applying functions to data can achieve the same thing

Can it?

First, Perl 6 operators compile down to function application. Folk are free to write directly in the function application style. So at some level these appear to be equivalents.

But, aiui, there are at least three big impacts:

* you need syntax to control order of evaluation;
* the pragmatics of optimization are profoundly changed;
* understanding it uses a different part of our brain.

> while being syntactically regular and expressively clearer.

Most languages allow a + b as well as add(a,b) and I'd say most folk find the a + b option expressively clearer in most situations.

===================

To drill down in to the details of evaluation, consider the Perl 6 expression "@ X~ @b" which for our purposes I'll say means to create the array result of a crosswise combination of the elements of the array variables @a and @b, concatenating each pair.

Now consider how to express that in a function application style, in particular how the compiler, syntax and programmer deal with order of evaluation, parallelization, optimization, and laziness.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 17:59 UTC (Wed) by andrel (subscriber, #5166) [Link]

Have there been psychology experiments proving that understanding the different syntax uses a different part of the brain, or is that still informed conjecture?

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 19:21 UTC (Wed) by raiph (guest, #89283) [Link]

> Have there been psychology experiments proving that understanding the different syntax uses a different part of the brain, or is that still informed conjecture?

Aiui there have been lots of brain scan experiments demonstrating that understanding spoken natural language uses different synaptic circuits to process different syntax elements. I hope to get some time to find more useful answers to your question this weekend and post back in this thread.

Use of our natural language processing neural mechanisms for reading, writing, understanding computer languages

Posted Mar 7, 2013 21:27 UTC (Thu) by raiph (guest, #89283) [Link]

I've just hunted around starting from a google for "understanding syntax" "brain scans". I've not yet found stuff specifically discussing how natural language syntax processing neural mechanisms impact our processing of computer language, but here's one that A) confirms use of some such mechanism in processing of music notation and B) suggests that such mechanisms would/can also be used used in reading, writing, understanding computer languages.

"These combined results suggest that [an area of the brain], known to be crucial for syntax processing in [natural] language, plays also a functional role in the processing of musical syntax. Hence, the present findings are consistent with the notion that Broca's area supports the processing of syntax in a rather domain-general way." (from http://www.ncbi.nlm.nih.gov/pubmed/20570253)

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 19:01 UTC (Wed) by k8to (subscriber, #15413) [Link]

Claims 1 and 2 are false on their face, because (as you point out yourself) the execution is equivalent.

You don't typically need to control order of application of the function to the items, which is why it's fast. You do of course need to control order of function application, but with function syntax it's all the more clear.

Optimization meanwhile is the same, except for the most degenerate of examples such as "we hand-crafted the machine code of this operator for this one case".

But a typical implementation of combining two arrays in all permutations would be something like

permute(NIL, a, b)

so the compiler can see that there's no action required but to combine them, and it's a trivial matter to parallelize the combination across N cores or computers. Indeed there were functional compilers capable of fully optimizing this problem in the early 90s.

As for item 3 I will have to say that I doubt you are right, but I cannot claim either way since there is of course no evidence presented, and probably no research.

I do find infix to be pleasant for colloquial, familiar expressions. I find it to be personally extremely counterproductive for comprehension with unusual constructions.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 20:26 UTC (Wed) by raiph (guest, #89283) [Link]

> Claims 1 and 2 are false on their face, because (as you point out yourself) the execution is equivalent.

Heh. It appears you didn't interpret the word "appear" as I intended...

> You do of course need to control order of function application, but with function syntax it's all the more clear.

So, is it concat(cross(@a,@b)) or cross(concat(@a,@b)), or something else, and what is the result?

> Optimization meanwhile is the same, except for the most degenerate of examples such as "we hand-crafted the machine code of this operator for this one case".

Are you suggesting it's degenerate to specifically atomically optimize a crosswise concatenate?

> As for [understanding a+b uses a different part of our brain than add(a,b)] I will have to say that I doubt you are right, but I cannot claim either way since there is of course no evidence presented, and probably no research.

I'd be surprised if there was no research but my own investigations have been of brain science as it relates to natural language, not computer languages. The "aiui" was partly because I've taken Larry's word (he was a linguist) that similar principles apply. I hope to dig in to this this weekend and post back here, with a focus on comparing add(a,b) and a + b.

> I do find infix to be pleasant for colloquial, familiar expressions.

I'm going to assume here you mean in computer languages. As in, you find a + b in computer code pleasant.

For me @a X @b ("array a crossed with array b") felt natural and pleasant as did @a X~ @b ("array a cross concatenated with array b").

> I find it to be personally extremely counterproductive for comprehension with unusual constructions.

So a+b works well instead of add(a,b) but a**b fails compared to power(a,b) (or something like that)?

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 12:21 UTC (Thu) by fatrat (subscriber, #1518) [Link]

How does this differ from the Haskell (or Python version)

ghci> [ x+y | x <- [1,2,3], y <- [4,5,6] ]
[5,6,7,6,7,8,7,8,9]

which seems cleaner.

In Haskell, that can also deal with lazy lists etc

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 17:41 UTC (Thu) by hummassa (subscriber, #307) [Link]

Cleaner than

> 1, 2, 3 X+ 4, 5, 6
5 6 7 6 7 8 7 8 9

? ok then.

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 18:22 UTC (Thu) by raiph (guest, #89283) [Link]

> How does this differ from the Haskell (or Python version)
> ghci> [ x+y | x <- [1,2,3], y <- [4,5,6] ]
> [5,6,7,6,7,8,7,8,9]

That's the same.

One issue is whether you prefer, from an expressivity point of view, x+y or something like add(x,y). I usually prefer x+y. It looks like, for the "familar" function/operator add/+, we all agree: x+y is generally preferable.

So what about "unfamiliar" functions/operators? I'm going to guess at the haskell syntax for a zipped string concat:

zipwith (++) ["foo", "bar"] ["sing", "song"].

Perl 6 uses ~ instead of ++ and supports infix notation so one can write:

["foo", "bar"] Z~ ["sing", "song"]

It seems alankila and k8to (and you?) consider the Z~ infix notation for zipped string concat to be less clear.

Let's assume for a moment that this is just a syntax sugar issue. (Regardless of whether the sugar seems sweet or not to any given writer/reader.) Given that Perl 6 is aiming at (among other things) being a metaDSL (a language for easily expressing and combining DSLs) then sugar matters and it's potentially important to make it trivial to use a wide range of expressivity, including infix notation, for user defined functions/operators (as well as builtins of course).

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 19:34 UTC (Thu) by nybble41 (subscriber, #55106) [Link]

Haskell doesn't let you mix letters and symbols in operator names, but apart from that it's simple to define an operator similar to Z~ which works on any nested list type, including lists of strings ([[Char]]):

infixr 6 ++~
(++~) = zipWith (++)

["foo", "bar"] ++~ ["sing", "song"]

Should be: Goodnight, Perl 6.

Posted Feb 14, 2013 21:40 UTC (Thu) by fatrat (subscriber, #1518) [Link]

I think my issues is that the [ ... ] list/monad comprehension approach is very general, and, as nybble41 points out, can be specialised as needed.

The Perl6 approach seems to lead to a proliferation of operators, and consequent maintenance issues.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 13:29 UTC (Tue) by raiph (guest, #89283) [Link]

> To me this perl5 vs 6 example you cite reads like someone came up with the syntax specifically to do those tasks.

I routinely see both example and $dayjob code that reads as if the syntax and builtins were made just to make that bit of code nicer to write and read. But I've watched the relevant discussions so I can see this is the natural outcome of a good language design process rather than Larry Wall focusing on parlor tricks.

> So there's a method that just happens to pick any number of array items?

Yes. It picks randomly and does not repeat an element. Handy for selecting threads from a pool, for example.

> A lot of us would call those features bloat.

Imo it is suitably huffmanized and pushed as far out of the technical core as is reasonable. I see it as excellent design.

> Cross operator such as "X~" which appears to mean something like 'combine two lists in every possible way with 2 implied for loop, then stringify every item, then return the list' sure is powerful, but I'm a boring stick-in-the-mud and do not really see that as much of an improvement over the two for loops.

More or less. If an infix X is followed by another operator it applies the operator pairwise for every operand combination and returns the list of results.

But you can still write two for loops if that's what you prefer...

> More to the point, assuming we really do want to get rid of explicit for loops, then why not compose the functionality out of functions from some Perl module?

That's more or less how it already works. String concatenation (~) and many other operators (+, -, etc.) ship with the stock Perl 6 but you (or others) can add more (which will then automatically combine with the range of metaops).

> Think of: cross(@a, @b) yielding some Pair objects of the two lists, rather than @a X @b. And rather than some weird operator like X~, perhaps there should be a stringify(cross(@a, @b)). I guess it's just not the Perl way, though, but I know which language I'd rather write.

Folk can write code long hand if they want. You can write add(3, 4) instead of 3 + 4 if you want.

But key things get lost in the translation you suggest. The metaops like X parallelize. And what if @a and/or @b are lazy or infinite lists? And what about an optimization specific to crosswise string concatenation?

> Ditto for expressions like (1, 2, 3) >>+<< (3, 2, 1) yielding (4, 4, 4). This seems like rank madness to me. Python's NumPy would do the same with something like array((1,2,3)) + array((3,2,1)) yielding array(4, 4, 4). Why not use the existing library facilities and overloading capability to build this stuff?

How do you parameterize the operation of the + op? For example, how would you control the +'s handling of unequally shaped arrays? Hang on, let me go check this. ... Ah. With NumPy, "the size of the trailing axes for both arrays in an operation must either be the same size or one of them must be one" or an exception is raised. The Perl 6 syntax allows more refined control of what NumPy calls broadcasting.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 17:45 UTC (Mon) by bronson (subscriber, #4806) [Link]

Zero hostility toward developers at all. All new languages are useless when they first start out (for varying definitions of "first start out").

As for why, I tried switching some of my easier Perl5 scripts to Perl6 a few years ago, and they got a little shorter and a lot harder to read. I loved Perl5 -- it's hard not to like a project that puts you in the authors file for a few patches -- but Perl6 appears to be going in exactly the opposite direction than I would choose. That plus the perpetual vapor makes it awfully hard for me to find a use for it.

I'll close with the hopeful sentence at the end of my comment from 4 years ago: https://lwn.net/Articles/330101/ Though, I've tried Perl6 since then, and I'm less excited about it now.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:38 UTC (Mon) by raiph (guest, #89283) [Link]

> I'll close with the hopeful sentence at the end of my comment from 4 years ago: https://lwn.net/Articles/330101/ Though, I've tried Perl6 since then, and I'm less excited about it now.

When did you last try it and is there some reason other than it taking so long that is why you are less excited?

It's important to accept the real pace of development rather than what might be hoped. As I said, also 4 years ago, "as hard to stomach as it may be, the story remains, even though they've taken a decade to get this far, they may well take ... five [years] to get to Perl 6.0.0 and a generally robust status". I continue to follow Perl 6 and I think that estimate was a good one.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 11:31 UTC (Mon) by NAR (subscriber, #1313) [Link]

It is said that for any project the last 10% takes 90% of the time. Based on this metric Perl6 will be ready in the next century...

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 5:21 UTC (Tue) by raiph (guest, #89283) [Link]

Or, as Carl Mäsak puts it, the Perl 6 project is currently on the third 80%.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 5:00 UTC (Mon) by theophrastus (guest, #80847) [Link]

yeah i bought that book too (man, what a sucker!)

i think it's time that someone who has managed projects like this to write a useful autopsy/analysis. was it the case of trying to take too big a step away from the time-honored version? too many high-level add-on features? was perl(5) already too syntax bound to back out? was the polyglot backend (which == 'Parrot', i think...) the downfall? too many cooks not enough benevolent dictator? what killed it???

i loved perl. (it got me through the data analysis on my thesis) i'm sorry to see it sink away. but to deny that it has isn't going to help at this point.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:47 UTC (Mon) by raiph (guest, #89283) [Link]

I realize that denying Perl is dying is useless at this point.

So instead I'll note that Perl is very much alive and kicking, with Perl 6 set to roll out in triumph over the next few years, and leave it to history to show that those who base their opinions on lots of data, rather than theory, tend to be much better at predictions. :P

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 18:51 UTC (Tue) by dskoll (subscriber, #1630) [Link]

I realize that denying Perl is dying is useless at this point.

Perl is not dying. Perl 6 is likely to be stillborn and even the Perl 6 developers take pains to say that Perl 6 is a different language from Perl (which everyone nowadays understands to mean Perl 5.)

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 1:23 UTC (Wed) by raiph (guest, #89283) [Link]

> Perl is not dying.

Right. If you notice the very next thing I said was "Perl is alive and kicking". I made the mistake of being sarcastic and, worse, forgot an appropriate emoticon.

> Perl 6 is likely to be stillborn and even the Perl 6 developers take pains to say that Perl 6 is a different language from Perl (which everyone nowadays understands to mean Perl 5.)

I've never heard a Perl 6 developer say that Perl 6 is a different language from Perl, just from Perl 5. In particular, Larry Wall has made it clear he reserves the right to the name "Perl".

Being stillborn is no longer one of the possible outcomes. It's most complete; it's in great shape technically; sixers are in great spirits; productivity reflects the good vibe; Larry Wall is writing his first Perl 6 book and is aiming to publish it about a year from now; there's still $100K in grant money set aside specifically for marketing and further funding of Perl 6 when it's ready for prime time; and so on. It might not be the future of Perl 5, but it is pretty much unstoppable at this point.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 12:43 UTC (Wed) by dskoll (subscriber, #1630) [Link]

I've never heard a Perl 6 developer say that Perl 6 is a different language from Perl

It seems this point is still debated.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 17:36 UTC (Wed) by raiph (guest, #89283) [Link]

The section you've linked notes that "some people" feel Perl 6 isn't Perl. I've heard some of these folk. None have been Perl 6 devs.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 18:14 UTC (Wed) by dskoll (subscriber, #1630) [Link]

I won't post a long quote from here, but in essence it says:

The "commonly used Perl language" is also known as Perl 5.

"Perl 6 is different from Perl 5"

Which as a programmer, I read as Perl == Perl5 && Perl6 != Perl5 which implies Perl6 != Perl.

But maybe I'm being a bit pedantic. :)

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 19:10 UTC (Wed) by raiph (guest, #89283) [Link]

I have read the entire "What about Perl 6?" page and agree with all of it.

> The "commonly used Perl language" is also known as Perl 5.
> "Perl 6 is different from Perl 5"
> Which as a programmer, I read as Perl == Perl5 && Perl6 != Perl5 which implies Perl6 != Perl.

You missed out "commonly used". If you will it's CU Perl == Perl5 && Perl6 != Perl5 which implies Perl6 != CU Perl, which is true enough.

Perl6 is Perl, but it's not "the commonly used Perl".

> But maybe I'm being a bit pedantic. :)

Perhaps not pedantic enough. :)

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 19:30 UTC (Wed) by dskoll (subscriber, #1630) [Link]

:)

It depends on whether you interpret "the commonly-used Perl language" as "The Perl language, which is commonly used, ..." or "The commonly-used Perl language (as opposed to some not-commonly-used language also known as Perl)"

I think we can agree we are splitting hairs here, just as Perl 6 is splitting heirs wrt the Perl branding.

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 23:50 UTC (Wed) by raiph (guest, #89283) [Link]

"splitting heirs" :)

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 12:44 UTC (Wed) by dskoll (subscriber, #1630) [Link]

Being stillborn is no longer one of the possible outcomes.

How so? Do you consider Chandler not to be stillborn even though it was "completed"?

Should be: Goodnight, Perl 6.

Posted Feb 13, 2013 18:55 UTC (Wed) by raiph (guest, #89283) [Link]

Who wanted Chandler written enough to freely give time and money to do it? Primarily Mitch Kapor. Who thought they wanted to try it bad enough that they would ignore its problems? Almost no one. What happened when Mitch gave up and the product wasn't sufficiently high quality? It died.

Who wants Perl 6 to be written enough to freely give time and money to do it? Boatloads of people, including many Perl 5 heavy hitters. These folk are generally quiet but have made it clear (behind the scenes) that they are waiting till the time is right to get involved. For example Nicholas Clark began contributing (by testing) a few months ago.

Who thinks they want to use Perl 6 bad enough to put up with its problems? It's clear that millions of hackers are or would be open to it, including many Perl 5 users. These folk are generally quiet and just want whatever works. If Perl 6 meets their needs, they'll try it out. And it's clearly nearly there. As Larry recently said, the only big problem left is speed, and the prognosis for addressing that this year is excellent.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 12:11 UTC (Mon) by niner (subscriber, #26151) [Link]

You obviously don't understand: the Perl 6 energy _is_ spent on improving Perl 5. Perl 6 is the best thing that could have happened to Perl 5. It's probably the reason why Perl 5 is still thriving and growing.

Perl 5 developers have used the experience and ideas from the Perl 6 development to improve Perl 5. There has been a very healthy back and forth between those two languages. And even if Perl 6 would have never been used in any real life program, the whole effort would already have paid off. But on top of that, Perl 6 is a very nice language on it's own and becoming more and more useful and used.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 16:37 UTC (Mon) by dskoll (subscriber, #1630) [Link]

You obviously don't understand: the Perl 6 energy _is_ spent on improving Perl 5. Perl 6 is the best thing that could have happened to Perl 5. It's probably the reason why Perl 5 is still thriving and growing.

I'm sorry, I don't see the connection. You are theorizing that without Perl 6, the nice ideas from Perl 6 wouldn't have found their way into Perl 5. But maybe they would have anyway, and via a far less circuitous route.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 17:12 UTC (Mon) by niner (subscriber, #26151) [Link]

Rather than me theroizing, it's what people behind modern Perl 5 like Matt Trout and Stevan Little said.

And I really, really can't understand, how people (and on lwn.net most oft all) still think that removing people from project X means more people on the "more important" project Y in free software. It doesn't. Period.

The people working on Perl 6 all have stated repeatedly, that they would not be interested in working on Perl 5. They're there for Perl 6. Ending development of Perl 6 would mean, that they would move elsewhere, not to Perl 5.

Removing Perl 6 would diminish the Perl world. That's what the people involved with developing both languages say. Of course you're free to hypothesize any other way.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 19:12 UTC (Mon) by dskoll (subscriber, #1630) [Link]

And I really, really can't understand, how people (and on lwn.net most oft all) still think that removing people from project X means more people on the "more important" project Y in free software. It doesn't. Period.

OK, point taken. However, I think the Perl 6 debacle (and believe me, from outside the Perl community it really does look like a debacle) has hurt the Perl brand. So even if it hasn't hurt Perl technically, it's definitely hurt the perceptions of Perl.

I own a company whose products are largely written in Perl 5. I've given up trying to find good programmers with Perl experience; instead, I just look for good programmers and get them to learn Perl. The shrinking appeal of Perl is eventually going to start hurting us.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 20:07 UTC (Mon) by raiph (guest, #89283) [Link]

> However, I think the Perl 6 debacle (and believe me, from outside the Perl community it really does look like a debacle) has hurt the Perl brand.

Right. It is emphatically *not* a debacle, but it sure has been made to look like one and that hurts the brand.

> So even if it hasn't hurt Perl technically, it's definitely hurt the perceptions of Perl.

Look how you're framing things. Hasn't hurt Perl technically?!? Why are you discounting the huge positive impact of things like Moose or the testing revolution?

> I own a company whose products are largely written in Perl 5. I've given up trying to find good programmers with Perl experience; instead, I just look for good programmers and get them to learn Perl. The shrinking appeal of Perl is eventually going to start hurting us.

That's why Perl 6 was started by folk who wanted something that *was* appealing. And, even though most folk currently think otherwise (invariably based on ignorance, not knowledge), the Perl 6 language *is* appealing to Perl's original audiences and several new ones too.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 20:40 UTC (Mon) by dskoll (subscriber, #1630) [Link]

Why are you discounting the huge positive impact of things like Moose...

Moose, IMO, is a giant negative impact. It hugely increases the memory footprint of Perl. Our product cannot possibly use Moose because of this.

And it has caused CPANhell... some modules want Moose and others still don't, so you end up with Moose and with traditional blessed-hash object models. And it also means we can use fewer CPAN modules because anything that drags in Moose is no good.

The Perl developers even recognized this which is why we have Moose, Mouse, Moo and Mo. And even the joke-class M.

As a Perl developer, I look at all this crap and run away screaming. It's a total mess.

... the testing revolution

It seems to me that testing was always a strength of Perl since way before Perl 6, so I don't understand what you mean by this supposed benefit of Perl 6.

the Perl 6 language *is* appealing to Perl's original audiences

It's not that appealing to me. And although the Perl 6 language may be cool, the implementation (or should that be "implementations"? Why do something once if you can do it twice?) suck.

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 23:16 UTC (Mon) by raiph (guest, #89283) [Link]

> Moose, IMO, is a giant negative impact. It hugely increases the memory footprint of Perl. Our product cannot possibly use Moose because of this. And it has caused CPANhell ... Moose, Mouse, Moo and Mo.

OK. Notice that the problems you see with it are all due to limitations in the Perl 5 toolchain, p5p process, and Perl 5 CPAN culture. Perl 6 can't fix that. In the meantime, many Perl 5 folk have expressed thanks for Moose and other technologies derived from the Perl 6 project.

> It seems to me that testing was always a strength of Perl since way before Perl 6, so I don't understand what you mean by this supposed benefit of Perl 6.

Perl was pro-testing in the 90s but the Perl 6 project focus on it was a big part in the transformation of the Perl community take on testing to another level in the 2000s.

> Perl 6 is not that appealing to me.

Perhaps not for you. But, imo, for all the current anti-Perl5 and anti-Perl6 sentiment, over the next few years a lot of existing and potential Perl users will take to Perl 6 in much the way past users took to Perl 5.

> And although the Perl 6 language may be cool, the implementation (or should that be "implementations"? Why do something once if you can do it twice?) suck.

I see a very high quality implementation reaching maturity, with the one remaining major weakness -- the Parrot backend -- being sorted out this year. What about it sucks that isn't due to Parrot?

You can't stop folk spending their time doing what they want to do. There's a specification that anyone can see and several folk wanted to write a Perl 6 compiler so several were written. (That said, Rakudo is clearly the leader.) Volunteer time isn't fungible so what's the problem?

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 2:22 UTC (Tue) by dskoll (subscriber, #1630) [Link]

If developers want to work on Perl 6, good luck to them. However, the Perl 6 project has (IMO) severely damaged the Perl brand.

If Perl 6 had been called "Rakudo" or "SpongeBob" or any other name that had no connection to "Perl", that would have been fine because it wouldn't have damaged Perl's reputation.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 2:32 UTC (Tue) by apoelstra (subscriber, #75205) [Link]

> If Perl 6 had been called "Rakudo" or "SpongeBob" or any other name that had no connection to "Perl", that would have been fine because it wouldn't have damaged Perl's reputation.

As someone who rarely uses Perl, I have to say that I haven't heard anything about Perl 6 since its early days (ten years ago now, apparently). Then there wasn't a usable implementation by the time the hype had died down, and people went back to saying "Perl" as a synonym for "Perl 5".

So I'm not convinced there's been any damage to Perl's reputation because of the version 6 situation. Perl's reputation has perhaps dwindled because other languages can do a lot of the "glue" stuff without as much room for pathological syntax.

Effect on Perl 5

Posted Feb 12, 2013 4:54 UTC (Tue) by corbet (editor, #1) [Link]

Somewhat relevant: I've been keeping an eye on a discussion on the perl5 list wherein some developers, at least, are feeling frustrated. Seems they would like to move beyond the "perl 5" name which, they say, adds to the impression that the language has stagnated. But what to move to? It seems somebody else has already grabbed "perl 6". So they feel stuck, and not everybody is happy about it.

Effect on Perl 5

Posted Feb 12, 2013 11:52 UTC (Tue) by alankila (subscriber, #47141) [Link]

Renaming perl 5 to perl 7 sounds like it might increase sales of popcorn worldwide.

Effect on Perl 5

Posted Feb 12, 2013 12:57 UTC (Tue) by mpr22 (subscriber, #60784) [Link]

Heck, that stunt would probably make America's corn lobby shut up about ethanol.

Effect on Perl 5

Posted Feb 12, 2013 16:04 UTC (Tue) by dskoll (subscriber, #1630) [Link]

I think a far more entertaining choice would be to call it Perl 6 and register a domain like "perl-6.org" :)

Effect on Perl 5

Posted Feb 12, 2013 16:20 UTC (Tue) by pboddie (subscriber, #50784) [Link]

This has happened with other products. For example, after one company acquired some rights to the proprietary microcomputer operating system RISC OS and bumped the version from 3.x to 4, a few years later another company acquired some other rights to the original code and released their version as RISC OS 5, even though it was mostly version 3.something with hardware compatibility revisions (incorporating some code that may have originated from Linux as a "Hardware Compatibility Layer" in a way that prompted allegations of GPL violation). There was no love lost between those organisations.

What concerns me with these big re-workings of existing projects and the "inheritance" of those projects' names in favour of the "next big thing" is that apart from the confusion that a lack of backwards-compatibility might bring to each of the brands in general, they also send the signal to anyone who doesn't embrace the next big thing - those who continue developing the existing versions - that they no longer have the right to use such names. After all, those people will just "run out" of versions unless they rename their project or play leapfrog.

But I suppose that if someone has already pushed in front of you and tabled a claim to the next major version number, playing leapfrog is just payback.

Effect on Perl 5

Posted Feb 13, 2013 1:36 UTC (Wed) by raiph (guest, #89283) [Link]

> if someone has already pushed in front of you and tabled a claim to the next major version number, playing leapfrog is just payback.

The "someone" is Larry Wall, who made the name "Perl" up, has spent 25 years volunteering most of his spare time, and frequently a lot more than that, to developing Perl, and has always been clear that he's not relinquishing his BDFL role in relation to the brandname "Perl" and is not interested in renaming Perl 6.

Imo it would be good if Perl 5 were renamed Perl 7 and then Perl 6 and Perl 5 merged back together with them becoming fully reintegrated at around Perl 11. But Larry sees things differently and I respect his view and his BDFL status.

Effect on Perl 5

Posted Feb 14, 2013 12:49 UTC (Thu) by pboddie (subscriber, #50784) [Link]

Well, part of what I am trying to communicate is that the right to use a name is not always seen in the same way by everyone involved. I don't doubt Larry Wall's commitment to Perl, and he can make a dialect of COBOL and call it Perl for all I care, but when other people feel that they too have a stake in the brand, they get rather upset if things start to change under their feet. One sees this even with brands like Coke where disgruntled customers with no involvement in the making of the product get upset at changes in the form of the product.

To summarise, someone can be completely entitled to control a brand but they have to live with the consequences of their decisions. We've seen this with KDE and GNOME, of course, but also with Python and Zope. The interesting thing about Zope is that the project's output was actually renamed from Zope 3 to BlueBream precisely because the people with the right to use the name felt that continuing to do so was confusing to people.

Effect on Perl 5

Posted Feb 14, 2013 18:55 UTC (Thu) by raiph (guest, #89283) [Link]

> Well, part of what I am trying to communicate is that the right to use a name is not always seen in the same way by everyone involved.

I hear what you are saying (and totally agree).

> I don't doubt Larry Wall's commitment to Perl, and he can make a dialect of COBOL and call it Perl for all I care

He wouldn't do that because he is very committed to Perl. Perl 6 is very clearly Perl, not COBOL.

> but when ... people feel that they too have a stake in the brand, they get rather upset if things start to change under their feet.

Think about that with Larry and sixers where the ... appears. They have put 12 years in to producing a worthy new Perl. Rather than help get it production ready most folk are happier to complain about the name.

Now think about it with "others" as you originally wrote where the ... appears. What has changed under their feet and who changed it?

> To summarise, someone can be completely entitled to control a brand but they have to live with the consequences of their decisions.

Right. I think Larry understands that Perl 6 solves pretty much all the problems with Perl 5 while retaining its essence and he's not going to let pent up frustration with how long its taken and its changes in syntax derail the efforts of the last 12 years.

Should be: Goodnight, Perl 6.

Posted Feb 12, 2013 1:39 UTC (Tue) by HelloWorld (guest, #56129) [Link]

> And I really, really can't understand, how people (and on lwn.net most oft all) still think that removing people from project X means more people on the "more important" project Y in free software. It doesn't. Period.
And putting "Period." behind a sentence doesn't make it any more true than it would otherwise be. Period.

Should be: Goodnight, Perl 6. Period.

Posted Feb 13, 2013 19:18 UTC (Wed) by speedster1 (subscriber, #8143) [Link]

> And putting "Period." behind a sentence doesn't make it any more true than it would otherwise be. Period.

Period. Typically that would be phrased "following a sentence" rather than "behind", which implies the reverse ordering. Perhaps you are a non-native English speaker who is not familiar with the use of "Period." for emphasis?

Should be: Goodnight, Perl 6. Period.

Posted Feb 14, 2013 0:41 UTC (Thu) by HelloWorld (guest, #56129) [Link]

I'm not a native speaker, but I am familiar with the use of "Period." for emphasis. I just happen to think it's stupid. If you have a good point to make, it'll speak for itself, and if you don't, then appending "Period." won't make it any more convincing. That's really all I was trying to say (while ironically using that phrase myself); it seems it didn't really work out due to the behind/following confusion.

Should be: Goodnight, Perl 6. Period.

Posted Feb 14, 2013 17:53 UTC (Thu) by speedster1 (subscriber, #8143) [Link]

Do you feel the same way about the habit of using swear words for emphasis? I knew some people back in my student days who engaged in that habit to the point of ridiculousness. One instance of a linguistic gimmick for emphasis within several posts seemed a little underwhelming in comparison, so that's why I suggested you might have been unfamiliar with the usage rather than really been annoyed...

Should be: Goodnight, Perl 6. Period.

Posted Feb 14, 2013 20:49 UTC (Thu) by HelloWorld (guest, #56129) [Link]

I disagree with niner's original point, that's probably why his use of "Period." annoyed me more than it otherwise would have.

Should be: Goodnight, Perl 6. Period.

Posted Feb 14, 2013 21:32 UTC (Thu) by niner (subscriber, #26151) [Link]

Usually people make the wrong assumption, that they can somehow dictate a concentrated effort on a project they see as important by stopping people from working on other projects. They make this assumption and don't further think about it but assume it must be right. This comes up so often that it's getting boring and I would like to get rid of it once and for all - hence the period.

But as you seem to knowingly disagree, I would very much like to hear your explanation on why you think that the Perl 6 people would work on Perl 5 if Perl 6 were abandoned even though they all very clearly stated that they wouldn't. You're not even making an assumption here, you're flatly denying their statements.

Should be: Goodnight, Perl 6. Period.

Posted Feb 15, 2013 1:54 UTC (Fri) by HelloWorld (guest, #56129) [Link]

The probability of a developer doing useful work while working on a useless project is essentially zero, while it'll be non-zero if he stops working on that useless project. So, in my opinion, there is value in shutting down obsolete or otherwise useless projects.

Granted, this doesn't contradict what you have been saying, but still I think it's a point that should be made.

Should be: Goodnight, Perl 6. Period.

Posted Feb 16, 2013 0:52 UTC (Sat) by raiph (guest, #89283) [Link]

On this page you have said:

> I disagree with niner's original point, that's probably why [niner using an idiom I don't like] annoyed me more than it otherwise would have.

It's not absolutely clear if you were confessing to emotional dysfunction or were justifying your behavior. You appear to be doing the latter without realizing it's the former. If that's wrong, please accept my apologies.

> I'm writing comments to express my opinions. The fact that some people seem not to like them doesn't bother me very much.

Again, is that confessing to emotional dysfunction or justifying your behavior?

> When I see someone doing things that I consider harmful, and my comments stop them (which, btw, I consider unlikely), I won't feel bad for that.

Do you consider all your opinions to be timeless classics or do you sometimes change your mind in light of evidence? If it's the latter, how do you square that with what you've just said? Do you think you just apologize when you find out you're wrong?

> The probability of a developer doing useful work while working on a useless project is ...

... roughly the same as the chance you will understand how ignorant it is, in a dialog like this, to use an opinion that others don't agree with as a premise from which to logically draw further conclusions.

Granted, what I've said so far doesn't contradict what you have been saying, but still I think it's a point that should be made.

I think many of your sentences on this page reflect ignorance bordering on stupidity. And they're annoying. So presumably the tone of this response is justified. Right?

I'm sorely tempted to say I won't be much bothered if you haven't enjoyed this comment. Instead I'll say I hope you get something useful out of it. :)

Should be: Goodnight, Perl 6.

Posted Feb 11, 2013 18:54 UTC (Mon) by raiph (guest, #89283) [Link]

Give up?!? I can tell that you have not taken a close look at the Perl 6 project, at least not recently. If you follow #perl6 (http://irclog.perlgeek.de/perl6/today) you'll find a great vibe. I'd say they smell victory and are as far from any notion of "giving up" as it's possible to be.

Chromatic: Goodnight, Parrot

Posted Feb 10, 2013 18:25 UTC (Sun) by leifbk (subscriber, #35665) [Link]

Any reference to Monty Python and dead parrots would of course be highly inappropriate.

Chromatic: Goodnight, Parrot

Posted Feb 10, 2013 23:24 UTC (Sun) by tjc (subscriber, #137) [Link]

Your comment triggered a memory from the remote past of what Borland used to do in the index pages of their compiler manuals:

dead parrots — see parrots, dead

Coincidentally, there never was any such thing as Turbo Perl 6...

Chromatic: Goodnight, Perl6

Posted Feb 12, 2013 19:33 UTC (Tue) by martin.langhoff (subscriber, #61417) [Link]

As a Perl 5 lover, and early Perl 6 enthusiast (I have the Perl 6 Essentials, first edition!), I am so sad to see the state of P6 ten years later.

Other posters have said, fittingly, "second system effect". There are reasonable reasons for Perl6 to be late, but it is a little bit more than late and the developers seem to have forgotten about deliverying a single easy-to-deploy runtime.

Articles about Perl6 development talk about devs wanting to experiment with this and that, not about being desperate to bring something finished to actual users. This is beyond disappointing.

In the meantime, I have used PHP (I hold my nose, but it ate Perl's lunch over mod_perl+embperl, and webapps like Moodle are solid products). I use Python extensively at OLPC (you couldn't build Sugar in Perl). Ruby is a good thing when I want to feel I am using something Perl6-ish. Yet I go back to Python (whitespace grammar is not for me, can I add curly brackets here?).

I have built programs big and small in Perl5. Country-wide DNS backends for DNS registrars. National election backends for voter rolls and vote tallies. Piles of glue between systems that didn't like each other. Heard of the slightly insane git-cvsserver? It is Perl5!

Will Perl6 be a real usable widely deployed runtime I can build stuff upon? Will {yum,apt-get} install perl6 result in a predictable installed runtime, with known features and quirks, with a decent dependency chain? Perl5 is part of Debian's base IIRC.

My 8-ball says "not likely".

Maybe let Perl6 (and its dev team) continue to run as a research project, and land some useful bits into a Perl7 that is real and runnable?

~m

Chromatic: Goodnight, Perl6

Posted Feb 12, 2013 20:40 UTC (Tue) by rodgerd (guest, #58896) [Link]

Your comment about Ruby is spot-on, I think. Ruby was sold to a lot of perl refugees as "Perl5 done right/Perl 6 here now".

Chromatic: Goodnight, Perl6

Posted Feb 12, 2013 21:04 UTC (Tue) by martin.langhoff (subscriber, #61417) [Link]

Yeah, Ruby claims to be Perl6 but when I tried it, it wasn't there in performance nor stability. The modules/extensions you want are there, but always somewhat incomplete.

I dislike Python's whitespace, but it is so far better in quality and completeness, compared to Ruby. Compare and contrast things like subprocess.Popen(). Python has all the variants, quirks and options you need in real life; just like Perl5 has.

I have not revisited Ruby in depth for a while now. I keep hearing of performance, scalability and stability issues with various Ruby-based tools (Puppet, RoR) so it's hard for me to find clear examples that Ruby has matured into the kind of rock-solid engines Perl5 or Python 2.x are.

Such maturity is truly useful... and dead boring. It's more fun for developers to keep finding new cool things to experiment with, instead of delivering something the world can rely on.

Chromatic: Goodnight, Perl6

Posted Feb 13, 2013 8:47 UTC (Wed) by alankila (subscriber, #47141) [Link]

My dark suspicion is that Perl6 isn't finished because it isn't finishable. Some simple kick-the-tire microbenchmarks still indicate >10x slower performance than perl5, so releasing it as a very slow and bloated language would be just embarrassing. But on the longer term, it can't be kept in this "still in development" limbo forever, either.

Some of the blame lands on parrot, some on rakudo. I think chromatic once said that rakudo's generated PIR is so register heavy that it will bring any register allocator to its knees. But, this being undated information it may now be obsolete.

I do struggle to see what role Perl has left, if the low end was eaten by PHP and the higher end by other languages. Is it just a bash replacement? Can it compete against any one of the established players? Will it be better than python or ruby for web development? In fact, can any one of our scripting languages survive the onslaught of Javascript as it is fueled by the ever-present web?

If Perl6 is released as a JVM language, it will go straight into java culture that expects interoperability with all the java libraries there are, and goes against those alternative languages that have found some real-world use: rhino, clojure, jython, scala, gosu... Perhaps the performance would be acceptable, but I would find it unlikely for Perl to retain its role as unix system glue if the future holds no native implementation.

Chromatic: Goodnight, Perl6

Posted Feb 13, 2013 23:39 UTC (Wed) by raiph (guest, #89283) [Link]

> My dark suspicion is that Perl6 isn't finished because it isn't finishable.

I was a Mozilla contributor in the dark days of doom before Firefox shipped so I'm familiar with such suspicions. :)

> Some simple kick-the-tire microbenchmarks still indicate >10x slower performance than perl5

I'd say 10x is generous even given the >. Many folk would say >100x slower. It was *another* 100x or so slower 2 years ago. 100x was a good rule of thumb a few months ago. SSSSLLLLOOOWWW!

The Perl 6 team has been disciplined in sticking to their overall strategy: get it working, make sure it works right, then speed it up. They are just beginning serious speed up work. In the last few months they have begun regularly landing changes that significantly, sometimes dramatically, speed it up or shrink memory usage.

> releasing it as a very slow and bloated language would be just embarrassing.

Heh. They've already released it. There have been over 60 monthly releases. There are Perl 6 apps that have been running for years. (Slowly.)

> But on the longer term, it can't be kept in this "still in development" limbo forever, either.

Right. I've watched what Larry Wall says since the 90s. He has specifically and repeatedly refused to set a release date for Perl 6 for over a decade. And then, last year, he said it was time to "productize" it over the next "year or two" and a few weeks ago he revealed he's planning to publish his first Perl 6 book in the next year or so. I think that will likely mark 6.0.0.

> I think chromatic once said that rakudo's generated PIR is so register heavy that it will bring any register allocator to its knees. But, this being undated information it may now be obsolete.

I recall seeing someone else mention that recently. But my googles are only turning up this thread. Aiui chromatic hasn't been working on Parrot for at least a couple of years.

> I do struggle to see what role Perl has left

Language development is over! C# to see out the end of the world! :P

I recall folk suggesting lisp had no role left in the 80s.

> I would find it unlikely for Perl to retain its role as unix system glue if the future holds no native implementation.

Do you mean no VM? Perl 5 has a VM.

Or is the problem that you're thinking that Perl 6 will only run on the JVM? It's just another backend. pmurias is working on a JavaScript backend, swarley a Go one, fijal recommends RPython, etc.

Chromatic: Goodnight, Perl6

Posted Feb 14, 2013 11:47 UTC (Thu) by alankila (subscriber, #47141) [Link]

As to whether Perl6 is released: I guess I'll believe it when someone on slashdot writes "Perl 6 finally out", with the obligatory jokes about Duke Nukem Forever and "at least it reached 1.0 before GNU Hurd did". (N.B.: By 1.0 I mean "the first release wide number of people would consider production ready with no obvious shortcomings".)

As to the question about role, people with Unix heritage are likely to be quite resistant to anything that needs a JVM to run, so that makes Perl 6 unusable for traditional sysadmin tasks where Perl 5 was clear upgrade from bash, awk, sed, etc. I personally appreciate the idea of using JVM, because one really good thing about java is that there's a ton of good libraries written for this language, so that would immediately seed a pretty big "JPAN" for Perl 6. However, in order to *really* benefit from that, the usage of those classes should be as transparent and easy as humanly possible. And of course it requires an IDE that is capable of handling Perl6 while completing java types and method arguments... With 6, is it still true that only perl can parse Perl?

You see, I've griped before about Perl 6's reprogrammable syntax, or about overly complex syntaxes in general. It makes it hard for tools to work out what to autocomplete, where syntax errors are if the expression is not valid, etc. Of course, with reprogrammable syntax I guess any hope for parsing anything is lost unless your parser happens to be a Perl 6 compiler.

Chromatic: Goodnight, Perl6

Posted Feb 15, 2013 0:23 UTC (Fri) by raiph (guest, #89283) [Link]

> people with Unix heritage are likely to be quite resistant to anything that needs a JVM to run

Perl 6 does not need a JVM to run.

I agree that many who might accept a technically adequate Rakudo/Parrot might balk at a technically adequate Rakudo/JVM that was (perceived to be) proprietary.

> I personally appreciate the idea of using JVM

There will likely soon be a Rakudo/JVM.

> one really good thing about java is that there's a ton of good libraries written for this language, so that would immediately seed a pretty big "JPAN" for Perl 6. However, in order to *really* benefit from that, the usage of those classes should be as transparent and easy as humanly possible.

Rakudo/JVM is supposed to just be a stepping stone to A) completion of the Perl 6 spec (in particular concurrency) and B) porting to other backends. It's not necessarily interesting to jnthn (the guy doing the port) beyond these short term roles. But you're right that it may get more interesting than that. We'll see.

> With 6, is it still true that only perl can parse Perl?

From a theoretical perspective, the situation is basically the same. (Perl 6 has gone further down this road, with features like lisp-style macros that mean that Perl 6, just like Perl 5, just like lisps, just like haskell with Template Haskell, theoretically isn't parseable without a full language implementation.)

From a practical perspective, the situation is much better. One shift is what Larry Wall has phrased as "only Perl 6 can parse Perl 6". Note the extra capital 'P', reflecting the fact that Perl 6 is a specification not an implementation which makes a big practical difference. Another is that Perl 6 is a much more regular language than Perl 5.

Also see http://stackoverflow.com/questions/5916194/can-only-perl6...

> Of course, with reprogrammable syntax I guess any hope for parsing anything is lost unless your parser happens to be a Perl 6 compiler.

Heh. You've let theory overrun your sense of pragmatics.

(Quick test. Perl 6 contains a function is-prime that will occasionally return the wrong answer. Does that make it useless?)

Rob Hoelzro has written a syntax highlighter in python. As far as I know it works without errors on everything that's been thrown at it.

Chromatic: Goodnight, Perl6

Posted Feb 13, 2013 6:13 UTC (Wed) by raiph (guest, #89283) [Link]

> As a Perl 5 lover, and early Perl 6 enthusiast (I have the Perl 6 Essentials, first edition!), I am so sad to see the state of P6 ten years later.

I empathize with your sadness in respect to hopes from back then. I, for one, hoped Perl 6 would refresh the Perl toolchain and brand before these became more than the pressing problems I felt they were even in 1999. But it already feels years too late for that.

I can't but help think your feelings of sadness are coloring your perspective on the state of Perl 6 right now.

Too little, too late, irrelevant, whatever, the Perl 6 project is in the best shape it's ever been.

> developers seem to have forgotten about deliverying a single easy-to-deploy runtime.

I assure you they haven't. If this is a reference to the JVM port, I hear what you mean while also disagreeing. If not, what prompts your comment?

> Articles about Perl6 development talk about devs wanting to experiment with this and that, not about being desperate to bring something finished to actual users. This is beyond disappointing.

I do not accept that you really want them to post about how desperate they feel. Illegitimi non carborundum applies.

> In the meantime, I have used PHP (I hold my nose, but it ate Perl's lunch over mod_perl+embperl, and webapps like Moodle are solid products). I use Python extensively at OLPC (you couldn't build Sugar in Perl).

Perl 6 has a well designed internals architecture and the build and packaging options are improving. I expect Perl 6 to become competitive in places beyond the reach of Perl 5.

> I have built programs big and small in Perl5. Country-wide DNS backends for DNS registrars. National election backends for voter rolls and vote tallies. Piles of glue between systems that didn't like each other.

The intent is for Perl 6 to eventually compete in all three scenarios (critical, large, and glue).

> Will Perl6 be a real usable widely deployed runtime I can build stuff upon? Will {yum,apt-get} install perl6 result in a predictable installed runtime, with known features and quirks, with a decent dependency chain?

Without doubt, eventually. This year will see it speed up, run on the JVM, and continue evolution much as before. Maybe Larry will publish his upcoming Perl 6 book.

> Maybe let Perl6 (and its dev team) continue to run as a research project, and land some useful bits into a Perl7 that is real and runnable?

Er, let the team continue? It's a self-organizing volunteer effort. They are unstoppable.

Land useful bits in a Perl 5 descendant? Sure! Perl 6 is all Artistic License (and GPL too I think). Folk are free and indeed welcome to steal or backport as per Moose and cousins.

Chromatic: Goodnight, Perl6

Posted Feb 13, 2013 13:53 UTC (Wed) by martin.langhoff (subscriber, #61417) [Link]

Thanks raiph for a good comment. Still, I can't fully hop on your boat.

I truly don't want to be trolling you or anyone here. But some essential principles apply, IMHO.

The team is all volunteer, and that warrants a lot of respect. However, if the team doesn't have as its top goal providing a rock solid runtime that is competitive... then they won't. Filling in Perl5/Python shoes is incredibly hard, and it won't happen while meandering through tasks that volunteers find interesting.

Just like completing a release isn't something that happens "naturally", regardless of the paid or volunteer status of programmers. You need leaders to set clear goals, make hard tradeoffs on the project direction and seduce people to follow them even though the tasks might be boring.

You need release managers to be tough at times and reject fixes, push hard for the release criteria (calendar-based, quality-based, whatever).

My comment about "devs not being desperate to complete a product" speaks about that. Current Perl6 devs seem, by all reports, to be having an interesting time. So perhaps Perl6 is a fun research and (personal) development project. That is swell, and in some cases it can overlap with delivering a performing, working product (see git, for example).

Sometimes it doesn't. Lack of clarity and a strong release ten years into it tell me Perl6 is right now an example of the "doesn't" case.

You say that Perl6 will be competitive, and able to fill in Perl5 shoes. IMHO, the current course won't lead there. Targetting the JVM means Perl6 won't be part of any distro's "base" install, as Perl5 is now on Debian, or Python is on Fedora/RH. It means apt-get install perl6 will show a dep chain that will scare sysadmins. Means you'll start arguing about which JVM to install (with the package manager, with people), and which webserver JVM setup too.

This in turn means that the quirks of Perl6 runtime will be all over the place -- when someone reports a bug, instead of just asking "which perl6 release?", you'll be asking "what JVM? version? using tomcat or mod_java or... ?". It is a horrible place to be, so far up the stack.

And it means that you'll be at most as fast/efficient/performant as Java. That's spectacularly uninteresting to me.

Perl5 set the bar so high it is hard to be competitive in that space. My worry here is not that the Perl6 team carps on how hard it is to get so good. It is that the Perl6 team doesn't seem to be interested in achieving the key goals of what Perl5 achieved.

Perhaps I am a grumpy old man. Don't let the bastards get to you. But also don't forget to decide and tell the world whether your top goal is a fun research project or a useful product. Key distinction between the top goal and secondary goal(s).

(Here, ISTR Larry or Damian saying that Perl6 development was optimized for the fun and enjoyment of the developers. If that is true, then that management style has a risk of forgetting to deliver something of relevance to the outside world...)

Chromatic: Goodnight, Perl6

Posted Feb 14, 2013 3:06 UTC (Thu) by raiph (guest, #89283) [Link]

> if the team doesn't have as its top goal providing a rock solid runtime that is competitive... then they won't.

Aiui you think the only worthwhile Perl 6 deliverable is one that bundles a front and back end in a form that competes with the current perl. I get that and will return to that but first I need to clear up some confusion.

For most of a decade there have been two projects that are distinct though with overlapping concerns. A front end language project (Perl 6) and a back end VM project (Parrot). A few folk are involved with both, but for the most part they are/were separate cultures.

Rakudo is a leading Perl 6 compiler. It has always used Parrot as its VM. After the Rakudo team concluded in 2009 that the Parrot project might not deliver what Rakudo needs in a reasonable timeframe, the Rakudo team began preparing to be able to port to other backends. (Aiui this pissed off chromatic.) By late 2012 the Rakudo team were ready to port to other backends. In November 2012 jnthn began a port to the JVM as a first step in targeting multiple backends. He seems fairly confident he'll have something solid to show at yapcna this June.

In the meantime, the Parrot project kept rolling along. For example, they landed a IO refactor (with regressions) late last year and got a form of threads working a few weeks ago that jnthn says isn't what Rakudo needs. Then a few days ago the Parrot project declared itself stalled and possibly dead. The Rakudo team may need to update their strategy for how they deliver with a solid runtime, but they've had less than a week to react to the news.

Then chromatic writes a post "Goodnight, Parrot" (even though several credible folk have said they want to continue Parrot). Finally, dskoll here at LWN adds insult to injury by renaming this thread "Goodnight, Perl6".

> You need leaders to set clear goals, make hard tradeoffs on the project direction and seduce people to follow them even though the tasks might be boring.

A good description of Larry's brilliant leadership. 12 years in and the productivity is astonishing. Yes Perl 6 was incredibly ambitious but they've basically pulled it off and the result is extraordinary.

> So perhaps Perl6 is a fun research and (personal) development project.

I do see a lot of folk enjoying themselves, learning as they go. I also see a lot of folk doing boring stuff, year in, year out. I see TimToady, jnthn, Moritz, masak, japhb and dozens of others writing amazingly high quality code amazingly quickly. And folk like swarley who's gotten amazingly far in doing a Go port in the less than 2 weeks or so since s/he appeared on the scene.

> (Here, ISTR Larry or Damian saying that Perl6 development was optimized for the fun and enjoyment of the developers. If that is true, then that management style has a risk of forgetting to deliver something of relevance to the outside world...)

Audrey Tang coined the phrase "optimized for fun". In her opinion it was important to do whatever it takes to make devs *productive*. It includes nurturing newbies, creating LHF files (lists of "low hanging fruit"), being liberal with commit bits, encouraging bursts of silliness, whatever gets hackers moving fast and being supremely productive. It works.

Chromatic: Goodnight, Perl6

Posted Feb 14, 2013 3:42 UTC (Thu) by martin.langhoff (subscriber, #61417) [Link]

> Aiui you think the only worthwhile Perl 6 deliverable is one that bundles a front and back end in a form that competes with the current perl.

Pretty much, yes. Everything else is details I should not know unless I plan to hack on Perl6. Or do advanced debugging/diagnostics, I guess.

All the parrot/rakudo/VMs and blah is internals. Good for an in-depth LWN article, but not for when people like me ask about using Perl6 in production.

It is ok to have fun, while being productive. However, your definition of productive does not seem to include delivering a "product" in the form of a /usr/bin/perl6 in a reasonable timeframe.

This all probably sounds more bitter than I intend it.

So I will say: I like the Perl6 syntax and some of its abstraction ideas. Maybe one day Perl6 will be a language I can use for widely-deployed programs. Current directions don't seem promising to me... but I have been wrong before, and will be more than glad if I am wrong on this one :-)

Chromatic: Goodnight, Perl6

Posted Feb 14, 2013 16:55 UTC (Thu) by chromatic (guest, #26207) [Link]

I think you're rewriting history.

Rakudo's spent half of its life thinking about switching away from the one platform where it runs at all to another platform which may or may not even work out. I wanted to deploy Perl 6 to actual paying customers.

I'm sure the developers are having fun, but from the potential user point of view, it's a waste of my time to worry about when the software will actually reach a deployable state. The project's history suggests that's not a priority.

Chromatic: Goodnight, Parrot

Posted Feb 12, 2013 19:46 UTC (Tue) by jond (subscriber, #37669) [Link]

I'm much more excited about perl7.

Chromatic: Goodnight, Parrot

Posted Feb 15, 2013 3:23 UTC (Fri) by chip (subscriber, #8258) [Link]

I think Perl 7 is when Perl really hit its stride.

I could tell you more, but the Temporal Prime Directive is not to be taken lightly.

PS: Y2K38 was fun

Chromatic: Goodnight, Parrot

Posted Feb 15, 2013 15:43 UTC (Fri) by sorpigal (subscriber, #36106) [Link]

Clearly to appease all parties involved the next Perl after 6 has to be 11, because Perl5+Perl6==Perl11.

Chromatic: Goodnight, Parrot

Posted Feb 15, 2013 18:24 UTC (Fri) by Cyberax (✭ supporter ✭, #52523) [Link]

Hm. I thought that Perl5+Perl6=Perl5Perl6.

Chromatic: Goodnight, Parrot

Posted Feb 15, 2013 20:02 UTC (Fri) by khc (subscriber, #45209) [Link]

that's clearly Perl5.Perl6

Chromatic: Goodnight, Parrot

Posted Feb 15, 2013 20:07 UTC (Fri) by sorpigal (subscriber, #36106) [Link]

Actually Perl5 + Perl6 is either 0 or "Argument "Perl5" isn't numeric in addition" (warnings) or "Bareword "Perl5" not allowed while "strict subs" in use" (strict).

But this sort of presumes that the future Perl 11 is a perl5 core with perl6 added to it.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds