Looking forward to see what you come up with. I do mix in a role into both
Attribute and ClassHOW. But delving into the core didn't help to find a better
approach than the one I finally took. Two subtle aspects are to be kept in
mind: support for roles; and knowing the object attribute is belong
> The M in Moose is for Metamodel, and if I wanted custom object behavior in
> Perl6, I would subclass it's standard metamodel and then override what needs
> changing eg STORE/FETCH.
>
> No idea how to do that, or it's feasiblity. Just have the impression that the
> point of having a metamod
> In Vadim's recent post about his AttrX::Moo module he describes his P6
> solution for bringing functionality he was used to having in P5 via Moo.
>
> (In another post I've asked about the option and relevance of using
> Moo:from in P6. If you reply to this post please consider also
> replyi
Let me correct you in one aspect. It's not my company which is using Perl. It's
me. My department is nothing about programming but VoIP and whatever else
around it. Use of Perl for supportive tasks is my own choice. Yet, mixing of
languages is definitely something I'm trying to avoid at least in
FWIW, I have been trying to get
https://modules.perl6.org/dist/Object::Trampoline to work with lazy attributes:
so far this has gotten me into an infiniloop . Perhaps you can find out why
:-)
> On 5 Sep 2018, at 23:10, Simon Proctor wrote:
>
> So I have a thought for how to do lazy attribut
So I have a thought for how to do lazy attributes without Proxy objects. It
is late so I'll try and poke about at it tomorrow but I think we can Mixin
a role to the Attribute using a trait.
The role will track if the attribute was set to a value at build and if not
call a block it's given when fir
I have currently worked around the issue by changing the order of conditions in
my code so just testing for DefiniteHOW and SubsetHOW first. But generally it
arose from a need to determine base type of a typed attribute. Because there is
common method for this each particular case must be consid
I agree to the most of your writing. Just a couple of notes.
> > my Array[Str] $a = ["a", "b", "c"];
> > my Str @a = ["a", "b", "c"];
> >
> First, there's co/contra variance of sub-typing. The first paragraph of
> wikipedia page is
> https://en.wikipedia.org/wiki/Covariance_and_contravariance_(
The M in Moose is for Metamodel, and if I wanted custom object behavior in
Perl6, I would subclass it's standard metamodel and then override what
needs changing eg STORE/FETCH.
No idea how to do that, or it's feasiblity. Just have the impression that
the point of having a metamodel is for this sor
Lets take the question of 'do I really need AttrX::Mooish' out of the scope and
postulate for now that I do need it; and no, I don't want to use any of Perl5
solutions. Just to focus more on Proxy itself.
What other approaches to implement laziness in Perl6?
Method based. It could either be red
This one is easy to explain. My primary selling point of using Perl6 is its
multithreading capabilities. The final code would have to deal with a really
big number of devices and parallel processing is of a great help here.
Resource-vise it's way more reasonable to have a single process with ten
In Vadim's recent post about his AttrX::Moo module he describes his P6
solution for bringing functionality he was used to having in P5 via Moo.
(In another post I've asked about the option and relevance of using
Moo:from in P6. If you reply to this post please consider also
replying to that one. T
Well today I've done a bit of Perl5, some Perl6 (mostly fixing the bug I
released last night but I non have 1 service written in Perl6 using that
module) and just did some Python.
So yeah the mental gymnastics jumping between them get fun.
I spent a chunk of this morning writing some Moo code and
My last post in response to Vadim's recent post.
Vadim is one of those exploring introduction of P6 in a company that makes
significant use of P5.
> I have a work project on my hands which I wanna implement in Perl6. Yet,
I have an internal framework for such projects written in Perl 5.
I wanted
This is another follow up to Vadim's post.
Vadim, you didn't touch upon the `use Moo:from;` approach.
As you noted, you wanted to avoid P5.
And you've already created AttrX::Moo.
So perhaps you see anything related to Inline::Perl5 as doubly moot.
Regardless, I really would love to hear your t
Vadim wrote:
> BTW, while researching the core sources I discovered a potential problem
with DefiniteHOW and SubsetHOW. They both define their own find_method()
which is re-delegating to their base type HOW.find_method. But they don't
support named parameters. Combined with classes with FALLBACK t
Hi Vadim,
This is for you and anyone else interested in a little bit about tricky
aspects of sub-types, of P6, of my perspective on learning in response to
WTF? moments, and P6 strengths and weaknesses in relation to the foregoing.
Vadim wrote:
> my Array[Str] $a = ["a", "b", "c"];
> my Str @a =
The real problem is that, in the absence of Proxy, rakudo can optimize a
bunch of things away because it knows it has full control of the value. But
if it encounters a Proxy, it has to assume that the Proxy might be
manipulating state outside of the current thread, or even outside of
rakudo, that m
This is the first in a series of a half dozen responses to Vadim's
AttrX::Moo post that replace a couple earlier failed attempts to post here.
I apologize if there end up being repeats or my following up with several
responses is inappropriate.
Hi Vadim. I'm making this my first post because it as
19 matches
Mail list logo