./method as a shorthand for $?SELF.method. Larry calls it terminally cute, and I promptly implemented it in Pugs. Juerd++!
Lots of OO works were done today after I got my laptop back:
class Foo is Bar { ... }method :foo { ... }.:methodhas $:attr"$obj.hello() World".method foo returns Hash of Int. I need to ask about how to define such parameterised classes some day...@{...} and %$foo etc.
Much thanks to Stevan, eric256, Darren and chromatic for their early adoption of Pugs OO. I'm happy to see that Locale::KeyedText, the first non-core Perl 5 module ported to Perl 6, is back to ext/ as it works now. Was it really only two months ago?
In other news, in non-embedded mode (such as on Win32, by neccessity), Pugs 6.2.3 spawns one Parrot process for each Perl 6 rule match, which is horribly slow. I've written some more PIR so only one Parrot process is kept now.
Juerd helpfully informed me that the use of infix:<!> to construct none() junctions has been denied, so it's gone from Pugs.
eric256 p6ified life.p6 a bit, but notes that it's still slow. Well, that's what the Prarot compilation backend is for. Speak of which...
mod_pugs working in mod_parrot. Hrm, should we call Pugs/Parrot people lambdabirds?
scook0 and bsb diligently added more Haddock to Prim, Run and Monads modules. skew begins looking into the type tree implementation in Context.hs; hopefully we'll making it a proper directed graph some day to facilitate faster queries.
Stevan started writing tests for Test::Builder, which is dangerously close to fully functional now. He also updated meta_meta_classes.pod with a snippet of discussion between gaal and him, to explain the raison d'être of MetaMetaModels.
The ever-inventive iblech implemented an IRC log to HTML converter in Perl 6. It's not huge -- 300ish lines -- but neatly shows how real world Perl 6 scripts looks like.
Oh, and I submitted two talks to Euro OSCON today: Perl 6 in the Real World, and Learning Haskell. I think I may be a bit overboard on the description for the latter:
What's faster than C++, more concise than Perl, more regular than Python, more flexible than Ruby, more typeful than C#, more robust than Java, and has absolutely nothing in common with PHP? It's Haskell!
Tired of writing unit tests to cover corner cases? Let the computer write them for you with QuickCheck. Find regex-based parsing unmaintainable? Learn how to write a complete parser for Perl 6's grammar in 15 minutes with Parsec. Stuck in deadlocks and race conditions? STM solves all your concurrency woes. XS and SWIG gives you headaches? FFI lets you embed C code quickly and safely.
Haskell is an emerging general-purpose functional language, with unique features that enables extremely rapid development of bug-free, concise and maintainable code. This talk shows how to apply Haskell to day-to-day tasks, tips for integrating it with other languages, and secrets for boosting your productivity by an order of magnitude.
I blame the poignant why the lucky stiff for the influence.
meta-meta-classes (Score:1)
Suppose you have a class Book. You refer to the class as Book, and instances of the class as Books. The same name is used interchangeably without confusion. I think that the same should apply to 'meta-class'. Just as Books are instances of the Book class, I think meta-classes are instances of the meta-class class.
AFAIK The C<Class> class is the meta-class class in perl 6, and meta-classes are instances of C<Class> (what you ge
Re:meta-meta-classes (Score:2)
Re:meta-meta-classes (Score:1)
As Autrijus pointed out, the meta-meta-class is not accesible in the "user space", but a language implementation level object. And the reason we are calling it the meta-meta-class is that it actually is not MetaClass itself, but a MetaClass is an instance of the MetaMetaClass. (it's confusing I know)
To expand on your example: the
class Book {}can be called "Book". When you call themetamethod on Book, you will get an instance of the Class metaclass for Book, not the Class class.At some point
-stvn
Re:meta-meta-classes (Score:1)
Thanks for your detailed response and amazing work getting oo going in pugs. Still twisting my brain into the right shape to fit this stuff in
As you say, calling C<meta> on the C<Book> class yields an instance of the C<Class> metaclass that describes the C<Book> class. My example takes this one step further by calling the C<meta> method on this metaclass and (by my assumption) getting an instance of the C<Class> metaclass that describes the C<Class> class. T
Re:meta-meta-classes (Score:1)
Let me first say that we are venturing into unspecced territory here. So anything I say is subject to the whim of @larry.
What said you is correct, with one minor adjustment. You said:
But you missed a few metas :)
-stvn
Haskell for the Masses? (Score:1)
Re:Haskell for the Masses? (Score:2)