You might be interested to know that I am now working on YAMP (Yet Another Mop Prototype) (I really should do something to link all the prototypes, perhaps merge up all the separate git repos into a single repo with branches for each prototype, hmm, anyway, that is for later). At the moment it is in the VERY VERY VERY VERY VERY VERY early stages, so please be careful to not infer too much about what the final version might look like or how it might behave.
As for mop::minus, I totally agree with you, the previous (no longer current) prototype (and the one before that) was too complicated and requires to many things to be added to the Perl core. In this latest prototype I am looking to add the absolute minimum amount of code, behavior and syntax possible to the Perl core while still providing a powerful MOP when needed. I am also trying keep my objectivity as much as possible. My own opinions tend toward the be "strict, verbose & theoretically correct" side, but a core MOP should not enforce that opinion (perhaps the optional syntax layer will, but that is still to be determined).
Yours, Stevan
]]>Nothing makes me miss all the wonderful folks in the Perl community as not being able to get to YAPC::NA. So while I have not yet watched all of the videos, I did watch the 6 (count them, six!!!) keynotes, and I wanted to just post about my impressions of them.
]]> Lets start with Mark Keating's monday morning keynote. As usual Mark's production values were top notch, having both music and video in his presentation. His goal was — I believe — to show with numbers that Perl is not only not dead but it is growing, and that much of the metrics out there are quite simply, ... utter crap. I think he did just that, in his always entertaining way, bravo Mark. Also it was nice to see that I wasn't the only person to have trouble with slides during a YAPC keynote.Then came Larry's keynote — as he has many times before — he showed off some of the new and exciting features of Perl 6. It is really good to see Larry in good health and back to his old self again, the world has not yet extracted all the precious weirdness that is in his brain and it would have been far too early to say good bye to someone as interesting and awesome as him, Long Live Larry! I look forward to the many more Perl 6 Christmases to come.
After that was ... HOLY SHIT THEY GOT CHARLIE STROSS TO DO A KEYNOTE! This was the biggest reason I found myself kicking myself constantly over my choice of moving dates. I would have really loved to see this talk in person, but oh well, I guess I will just have to wait until YAPC::NA 2034 instead.
Once again Matt Trout gave his State of the Velociraptor talk, and by once again, I mean he gave like 1/3 of the talk he gave last year. Does this mean we are stagnating by 33% or did Matt just decide to slack off and drink at the pub 33% more, who knows, but it is good to see "Grandma" mst up and mobile after his hip accident.
Then, ... the joy I experienced in watching Sawyer give his first Keynote entitled the "The Joy in What We Do". I have only known Sawyer for a couple years now, I think we first really hung out at the YAPC::NA in Madison, WI, which was followed by hanging out at YAPC::EU in Frankfurt later that year, and still more hanging out in Amsterdam, very soon to be followed by daily hugs at the offices of Booking.com. I can think of very few people — aside from my 4 year old toddler — who have as much energy as Sawyer, and watching him express that both physically and through his talk subject was great, seriously great.
Lastly, the honorable Dr. John S. J. Anderson gave what I would have to say is one of the best talks I have seen at YAPC in a long time (if ever). I've known John for a while now and we've spent many a Perl conference hanging out and talking (and drinking and talking & talking and drinking), we were also co-workers for almost 2 years (until I had to up and quit, #dammitstevan). I know that this talk has been aging inside John's head for a number of years and I have to say this YAPC::NA was the best time to un-cask it. As John said, he was the speaker coordinator this year, and he did his best to create the YAPC that he wanted to go to. Based on the talks I have watched and the feedback I have heard, he absolultely succeeded. John's idea that we, as a community, are maturing for the better, is something I think a lot of us who have been around a while knew but didn't know how to articulate (I guess that is what a PhD buys you). I really only have one thing to say to John, and that is "Thank You".
And the last thing I wanted to mention was that last year I gave a keynote entitled "Perl - The Detroit of Scripting Languages" and this year an effort was made to revive the Detroit Perl Mongers group. I think this effort to bring back Detroit.pm is actually a perfect metaphor for this years YAPC::NA. I choose Detroit for a number of reasons which I explained in the talk, but one in particular was that there were people who hadn't given up on Detroit, who were working hard to rebuild it. Maybe not to what it once was, but instead to something different and better.
The Reboot of Detroit.pm, the Reboot of YAPC::NA, the Reboot of IRC.perl.org and the Reboot of the Perl community totally just proves John's point all the more, our community is mature, resilient and ready to take it to the next level.
I look forward to seeing all of you on IRC and again in real life at future YAPC::{NA,EU,Asia,etc}!
]]>Roles are not multiple inheritance and in the MOP will not be implemented with multiple inheritance. You should do some reading up on Roles and how they work, I fear you do not understand them well enough.
]]>Also, we dropped the inside-out thing, now it is going to be an opaque C pointer.
]]>However, your reasoning is incorrect. With a meta-circular object model, everything is an object, a class (as represented in the mop) is simply an instance of the class "Class" (and yes, the class "Class" is itself an instance of the class "Class", which is where the bootstrap comes in).
]]>You have looked at the guts of Perl 5 right?
Unless you are a full-on Unix neckbeard of the highest order then the only sensible reaction is to not want to wade into that swamp.
]]>I personally have high hopes for my latest approach mostly because I am now (finally) really diving into the guts of perl and trying to write something at that level, rather then trying to add something new on top. In hindsight, I believe that approach was a large part of the reason why the first prototype ultimately failed and why I am currently shelving the second prototype.
I designed the original p5-mop to be a totally independent object system that strove to not mix with the existing core. As I said, the design failed because I had spent too much time focusing on keeping the p5-mop object system separated, that I failed to notice some serious show stopping flaws in the ways in which it ultimately did have to connect to the perl guts (this was all explained here for those interested in the gritty details). This outcome was disappointing to say the least, all the effort I (and others) had put into designing the syntax and semantics felt as if they were for naught. Some people tried to encourage me to take a step back and try a simpler approach, but as my family will tell you, I can be very stubborn; so I instead decided to go off the deep end and propose a re-write of the core.
The Moe project started off with a bang, but as I soon quickly realized Perl (the language) was not Perl without the CPAN and the CPAN was not possible without perl (the interpreter), or more specifically XS. My announcement, in the end, turned out to be extremely premature as I hadn't yet done the analysis of CPAN to see what would need to be written (and re-written) in order to make Moe a viable replacement for Perl (spoiler: pretty much everything on CPAN). After doing that, and realizing that it ultimately would not work, I re-dubbed Moe "a thought experiment" and proceeded to work on it without care of any backwards compatibility concerns. While this project failed its original goal of replacing perl, it succeeded in making me realize that my original "keep them separated" p5-mop approach was all wrong and gave me a much deeper appreciation of the perl core. Then while watching Pete Martini's excellent talk at YAPC::NA something clicked in my brain! I realized that I needed to work much more "inside the box", meaning I needed to approach p5-mop with a better understanding of (and a deeper respect for) how perl (the interpreter) actually worked.
On the plane home from YAPC::NA that year I started to sketch out an idea for a different approach in which I attempted to stay true to the perl internals (as I understood them at the time). This became the p5-mop-redux project which I worked on feverishly for several months refining the original vision more and more. In this project, I made sure to learn from one of the core mistakes of its predecessor; very early on in the project I ported a decent sized perl module. The process of doing this allowed me to shake out a number of bugs and work out details for key elements of the design. After a few months we actually released a version of this to CPAN and encouraged people to try it out (and many actually did). Before the second release, my co-conspirators, Jesse Luehrs and Florian Ragwitz, removed all but one dependency and re-wrote a significant portion of it in XS, which we knew was a necessary step. Then came the holidays and other $work based distractions and the project stalled as myself and the other contributors simply got too busy.
During that busy time I had very little time to program, but I had a lot of time to think and learn. I realized that I really needed to wrap my head around XS and C otherwise my further contributions would be severely limited. I began by pulling out my dusty old copy of the K&R book, and progressed through that into perlxstut, perlxs, perlguts and finally the perlapi docs themselves. I even ordered a used copy of "Extending and Embedding Perl" and pretty much read it cover to cover. After several months, I felt that I was finally ready to jump in and pick up the p5-mop-redux project from where we left off. Then after spending a few days staring at the design I realized that, once again, I had built something which failed to integrate well with the perl core. The assumptions I had made in the original design seemed perfectly reasonable when viewed from the perspective of a Perl programmer, but when viewed from my new perch atop the perl guts, it had some serious flaws.
All this is not to say that the two prototypes and the Moe experiment were a waste, quite the contrary, this journey has been a very humbling and extremely interesting learning experience for me. When I first set out on the goal of designing a new object system for Perl, my own ignorance (and arrogance) lead me to believe it was best to stay separate from the core. Perl, the immovable rock of backwards compatibility that it is, would ultimately not allow me to do this until I showed the proper respect and humility. And so was born p5-mop-XS, which I hope will be the final prototype if for no other reason then the fact that hopefully "the third time is the charm".
]]>mst: so, is -redux now "the last prototype" and p5-mop-XS "the current hopefully-not-just-a-prototype" ?
stevan: hehe
stevan: so here is the official line
stevan: p5-mop was the first (overly ambitious) prototype in which I ignored Perl and went my own way
stevan: Moe was my (somewhat childish) reaction to that not working
stevan: p5-mop-redux was me getting my head out of my ass to realize that I needed to bring my design closer to how Perl does things internally, ... without actually knowing shit about the internals
stevan: p5-mop-XS is me spending 6 months learning C and the Perl internals and now trying to write something that is actually designed from the ground up to be put in core stevan: also, not sure if you've heard, but i am leaving Infinity and starting at Booking this summer
stevan: WE WILL BE PRACTICALLY NEIGHBORS!
stevan: hmm, perhaps that deserves a blog post (the p5-mop stuff, not my job stuff)
stevan: also, the plan with p5-mop-XS is to write a really REALLY low level C api (what you see there now) then put a thin OO meta layer on top of it (think https://github.com/stevan/p5-mop-XS/blob/master/t/001-basic/100-theoretical-bootstrap.t but written in XS)
stevan: and after all that, make an optional syntax layer ... so in theory I could write a Moose style front end for this fairly easily
stevan: anyway, need to get dinner ready
Anyway, obviously I will be really (no, like REALLY) busy over the next few months, but I am finally starting to feel like I have a good foundation going here (famous last words, I know).
]]>Of course, we also need the p5-mop, but that hasn't been touched in a while; I hope it's not dead.
... and that reminded me I really needed to write a blog post to update folks on the status of the p5-mop effort, so here goes.
]]> While I did release the 0.03-TRIAL version of p5-MOP at the recent AmsterdamX hackathon, not much actual work has been done on it for about 4 months. There are two reasons for the slowdown.First, both Jesse and myself have been busy with work (and before that, the holidays) so finding enough time to hack on it has been hard. Of course this is a good problem to have for $work work, but a bad problem for our open source work. Such is the curse of volunteer open source labor, sometimes we need to take a break in order to make a living.
Second, I personally, don't know XS, and Jesse (with the help of Florian "rafl" Ragwitz) ported much of the internals over to XS/C prior to our 0.02 release. This helped speed things up quite a bit and reduced our dependencies down to only one non-core module, Devel::CallParser, which hopefully will make it into core eventually.
But all is not lost, what I have been doing is spending all available cracks of time over the last two months cramming my brain full of C, XS and Perl internals (oh, the horror!). My hope is that when work lightens up for me (hopefully) towards the end of this month, I will be able to dive back in even deeper this time. In the meantime, we are still looking for people to port modules, write tests and generally just bang on it.
So please, be patient, p5-MOP is neither dead or a dead end, it is just taking a little breather while I tend to work and life.
]]>