Mike Sanders

  • About: Nope.
  • Commented on Exercise 1. 3s and 5s.
    Don´t have no perl6 runtime here to verify it, but in your time comparison the Perl 6 solution actually gives a different result (98 instead of 78)?!...
  • Commented on Reconsidering Exercise 1
    Ain´t that wrong because of short-circuiting? I´d say you could write it as for (1..$max) { $sum += $_ if( $_ % 5 == 0 || $_ % 3 == 0 ) }...
  • Posted Postfix Deref? to Mike Sanders

    I really like the increased development pace for Perl5 starting with 5.10. It has led to many nice features in a relatively short time and I´m grateful for that. Occasionally however, the need for speed imho trumps sanity and reason...

  • Commented on Names And All That
    No, it wasn't (isn't!) a waste of time. At least not, if - by following the discussion - the powers that be realize that adding always more "use feature 'xyz'" to the perl core while maintaining backwards compatibility isn't viable...
  • Commented on Names and Numbers, Brand and Identity
    Btw.: /me actually thinks that "Raptor Perl" - cf. - could be nice: old but powerful (though "dangerous to use" could come to mind, too). There´s even orange in the image ;-)...
  • Commented on Names and Numbers, Brand and Identity
    Saw a comment somewhere (unfortunately forgot where and by whom) that - I think - got it right: Changing the name or the version numbering scheme won't do us any good, unless we're willing to go further. It might in...
Subscribe to feed Recent Actions from Mike Sanders

  • mattoates commented on Reconsidering Exercise 1

    Just did the Perl 6 example on my Macbook Air and got a very different time! I have a feeling the poster is using the JVM build without understanding that it has about ~8 seconds start up time regardless of what you do, even something like `perl6 -e ''`

    $ perl6 --version
    This is perl6 version 2013.09 built on parrot 5.5.0 revision 0

    $ sysctl -a | grep machdep.cpu.brand.string
    machdep.cpu.brand_string: Intel(R) Core(TM) i5-2557M CPU @ 1.70GHz

    $ time perl6 stuff.p6
    My multiples are: 3 5 6 9 10 12 15 18 20 21 24 25 27 30 33 35 36 ... *snip* ... 993 995 …

  • mattoates commented on Reconsidering Exercise 1

    My times for the Perl 5 version for comparison:

    real 0m0.064s
    user 0m0.010s
    sys 0m0.015s

    So my Mac has a slower time for the Perl 5 code so I'd imagine the OP would have a slightly better time than 1s for the Perl 6 code running in the latest R* parrot build?

  • Timo Paulssen commented on Reconsidering Exercise 1

    Do note that you can use @*ARGS instead of providing a sub MAIN; though the latter will give you a usage message when you don't supply the max and if you write

    sub MAIN( Int $max = 1000 )
    instead, you'll even get a helpful error message if the user writes "over nine thousand" instead of a number.

    Also, for interpolating arrays into strings, you can also just write

    "My multiples are: @multiples[]".say;

    And another thing: I think "1 ..^ $max" looks prettier than "1 .. $max-1".

  • raiph commented on Exercise 1. 3s and 5s.

    In your P6 code you have this line of code:

    unless any(@multiples) $start {

    That looks like TTIAR (two terms in a row) to me (syntax error).

  • Olivier Mengué (dolmen) commented on Exercise 1. 3s and 5s.

    The code is still mangled :(

Subscribe to feed Responses to Comments from Mike Sanders

About is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.