text
stringlengths
0
1.17k
[1995.06 --> 2002.70] marshalling um you might just decide no i'm going to consume my does marshalling role and that is going to
[2002.70 --> 2008.30] consume the does json and does yaml role so i'll get all of the serialization methods all at once
[2008.30 --> 2014.66] but in theory according to the original traits research it doesn't matter how you consume those
[2014.66 --> 2020.60] how you mix and match those in roles it is possible for that contract to be violated depending upon how
[2020.60 --> 2027.44] you do it it's unusual for this to happen and you know dedicated programmers who know that you know
[2027.44 --> 2031.38] different methods should actually have different method names are really good about avoiding those
[2031.38 --> 2037.80] problems but there are still some subtle edge cases but they are in my experience more than an order
[2037.80 --> 2044.44] of magnitude less than you have the edge cases with mixins and inheritance so you probably do most of
[2044.44 --> 2051.56] your programming in pearl 5 right yes and this role basic is that what you use for your roles or because
[2051.56 --> 2055.70] you said this is your version of it there was another one out there you mentioned um but i didn't catch
[2055.70 --> 2063.00] that one though i use uh there's also a role tiny i use almost exclusively moose role because moose is
[2063.00 --> 2067.64] the most fully fledged object-oriented system out there and i'm not just talking about for pearl
[2067.64 --> 2074.54] moose is it brings a lot of the power of you know what we would typically associate with static languages
[2074.54 --> 2081.70] to dynamic languages so when i declare an attribute such as social security number i can say a social
[2081.70 --> 2086.14] security number is a and then i can define a very rigid type constraint for what that social security
[2086.14 --> 2090.42] number is and rather than you know embedding my code with a whole bunch of type checks everywhere
[2090.42 --> 2093.96] you know is a social security number really fitting the format of social security number
[2093.96 --> 2099.68] are the first three digits allowed first three digits or not i can simply declare a social security
[2099.68 --> 2103.62] type have that provide the validation and anything which consumes a social security number
[2103.62 --> 2109.82] it has to match that type or it's going to fail and this is something you often don't get
[2109.82 --> 2115.68] with many dynamic languages we tend to play fast and loose with our data but there's so many powerful
[2115.68 --> 2121.52] things you can do such as lazy evaluation of attributes so you don't create the connection
[2121.52 --> 2126.90] to the database unless you actually ask for the connection to the database or you know just being
[2126.90 --> 2130.82] able to list all of your attributes but on top of that you have meta programming so i use meta
[2130.82 --> 2136.84] programming quite heavily i built something called test class moose which is basically a an x-unit framework
[2136.84 --> 2143.48] for large scale enterprise class databases if you will and it's being used more and more and what
[2143.48 --> 2150.56] what i've done with the metadata system within moose is i'm able to inspect the methods to figure out
[2150.56 --> 2155.28] what test methods are available i'm able to find out what attributes are available i'm able to compose
[2155.28 --> 2160.66] roles into things so i can have roles defining fixtures so i can easily load fixtures on demand
[2160.66 --> 2167.70] and if you've never played with meta programming before it is hard to appreciate the power of it
[2167.70 --> 2173.06] and once you play with meta programming you never want to go back because it makes so many of your
[2173.06 --> 2181.14] problems so much simpler the cost is the software you build is simpler it is easier to write it is
[2181.14 --> 2185.52] faster right it's a little bit harder for some other people to understand it because most people
[2185.52 --> 2192.26] don't understand the concept of meta programming at first it sounds like you uh also i mean you
[2192.26 --> 2196.48] mentioned testing here a few times in that conversation obviously when you're meta programming
[2196.48 --> 2201.78] and when you have dynamic languages um testing becomes a huge part of that you know assurance that
[2201.78 --> 2206.38] things are still working the way that you wanted them to um you said you wrote a test harness that
[2206.38 --> 2211.68] ships with the language um maybe tell us about the testing story in the pearl community whether it's
[2211.68 --> 2216.52] tdd style or uh kind of what the just what the community looks like and as far as testing code
[2216.52 --> 2222.94] goes pearl has possibly i mean ruby talks about themselves just being test infected and they have
[2222.94 --> 2230.86] nothing on pearl if so cpan the um this is the central archive of pearl code that most developers tend
[2230.86 --> 2237.94] to push their code towards and if i push my code up to the cpan it's immediately pushed out to the cpan
[2237.94 --> 2243.94] testers network where people are running the tests for my code on all sorts of different flavors of
[2243.94 --> 2250.18] linux all sorts of different flavors of windows all sorts of different macs uh on aix on solaris you
[2250.18 --> 2254.00] name it my code is being tested there with tons of different operating systems tons of different
[2254.00 --> 2258.12] versions of pearl and i find out very quickly which operating systems which versions of pearl
[2258.12 --> 2265.24] my tests are failing on and this is for free and this is the sort of thing that enterprise
[2265.24 --> 2272.10] customers can pay hundreds of thousands of dollars a year for right and there are millions and millions
[2272.10 --> 2278.08] literally of test reports out there on cpan testers and when you go out there and you pull up
[2278.08 --> 2284.24] one of the versions of your module and you know my version of this module you know 1.14 happens to fail
[2284.24 --> 2291.72] on solaris with pearl 516 and then you can go and if you've written your tests well for printing out
[2291.72 --> 2296.36] good explanations of what's going on with your test you can say oh now i understand what's failing
[2296.36 --> 2300.88] and even if you don't know solaris you can contact a solaris user or perhaps a person who originally
[2300.88 --> 2306.52] ran it on their what we call smoke machines they're smokers and say my module failed on your machine with
[2306.52 --> 2311.44] this version of pearl can you help me with this and you get this powerful free feedback that is
[2311.44 --> 2318.12] virtually impossible to get otherwise and anytime i upload a new module to the cpan i get hundreds and
[2318.12 --> 2325.76] hundreds of test reports coming back very quickly and it's just phenomenal and i don't see that other
[2325.76 --> 2331.52] places if i want to install a module on my local machine i can have the option to run the tests or
[2331.52 --> 2337.44] not so if i want to run the tests i can see what's going on i can give feedback to the module authors it's
[2337.44 --> 2343.20] very easy and it's gotten to the point it's very very much frowned upon for popular modules to be
[2343.20 --> 2349.20] uploaded to cpan without tests and the test coverage is just phenomenal in many of these
[2349.20 --> 2354.60] modules and it really it's nice for me as a developer when i'm recommending you know use this
[2354.60 --> 2359.34] new module in your code base because it's going to save you a lot of time and trouble and they say
[2359.34 --> 2363.98] well is it robust and i can say look at this test suite look at all these test results and all these
[2363.98 --> 2368.76] different operating systems all these different versions of pearl look at all those green bars there
[2368.76 --> 2374.82] and it's just fantastic so i love it makes me very happy i did not know that about cpan that
[2374.82 --> 2381.86] tester what do you call it the test smokers uh the smokers um it's oh my goodness i'm trying to
[2381.86 --> 2388.72] remember the name um it's something that i've taken for granted for so long to be quite honest uh the
[2388.72 --> 2395.82] cpan reporters um i would have to go and look up the url offhand but it's you know you can go out
[2395.82 --> 2399.72] there very quickly and see all of the test reports which are available for all of your modules but
[2399.72 --> 2404.86] this is free and anything anyone uploads is automatically run through the system by just
[2404.86 --> 2409.84] dedicated volunteers so it's not something you have to sign up for it's not something you have
[2409.84 --> 2415.58] to ask for it just automatically happens for you that's awesome you know when i was back in college
[2415.58 --> 2421.12] and i was doing some pearl um i liked the language i still like it to this day i think you know i saw the
[2421.12 --> 2426.38] the value especially in the regular expression stuff back then that just was so easy comparative
[2426.38 --> 2432.48] to what i had done previously um and cpan was always boasted as you know this great thing now as
[2432.48 --> 2439.40] a fledgling young programmer i'm probably like 2001 2002 man i just could not figure cpan out um i
[2439.40 --> 2443.54] couldn't even get past like the configure step to get that thing out there i'm just trying to get
[2443.54 --> 2449.44] somebody else's code on my system um and i'm sure it's an isolated incident but maybe give us
[2449.44 --> 2455.62] um some background on cpan i know that it's it's much touted as as a great system it sounds like
[2455.62 --> 2461.30] that the automated testing thing is really cool tell us more about it so the cpan is a comprehensive
[2461.30 --> 2467.52] pearl archive network and there's a module cpan.pm which comes shipped core with pearl so when you
[2467.52 --> 2474.36] first download pearl you can run the cpan command cpan all over case and what you experienced was a
[2474.36 --> 2479.74] a long-standing problem today what it does is it says oh this is the first time you're running cpan
[2479.74 --> 2484.36] would you like me to configure as much as i can automatically you hit yes and it magically works
[2484.36 --> 2493.08] that sounds great so that's not what i was having i know yeah basically they they took the trouble to
[2493.08 --> 2498.12] make the pain go away so i often install new versions of pearl i'm playing around with different things
[2498.12 --> 2503.94] i set up cpan for the first time and if i select yes um occasionally it might pick a mirror too far
[2503.94 --> 2511.74] away from me but aside from that it works beautifully and it's not a problem you also have cpan minus
[2511.74 --> 2520.50] so app cpan so cpan min dot us um that's the site which has a very simple that has a very simple
[2520.50 --> 2525.70] command that you can run which will allow you to install cpan minus which is kind of like cpan
[2525.70 --> 2530.78] except it does even less so cpan when it downloads your code it will download all the dependencies run
[2530.78 --> 2535.16] all the tests and then you have some dependency failing on a test which is completely unrelated to
[2535.16 --> 2541.36] what you're doing or cpan minus will just take all the pain away and just build your code and install
[2541.36 --> 2546.52] it for you very quickly and it's very powerful and most of the time it just works wonderfully so we're
[2546.52 --> 2551.68] actually winding up with multiple different solutions depending upon what your particular needs are how
[2551.68 --> 2555.98] thorough do you want your test coverage to be are you not worried about that do you want to just
[2555.98 --> 2561.22] install a simple module quickly most of it's just painless and people don't have to worry about it
[2561.22 --> 2566.24] anymore so what you discovered was a long-standing complaint but it pretty much doesn't exist today
[2566.24 --> 2573.14] cool cool i just loaded up cpan minus and it redirected me to a github page which makes me which