user-pic

Yary

  • Website: apicom.com
  • About: Programming for decades, and learning something new every day.
  • Commented on To compute a constant of calculus</br><small>(A treatise on multiple ways)</small>
    ℇ💻😀 Love this article! Thanks....
  • Commented on Signatures vs. Methods
    One can think of arity as part of the name, in which case foo/1 will never fall back to foo/0. Since this is Perl we're talking about with arity being fluid, a forward declaration to me seems to be "foo/*"...
  • Commented on Splitting on a change in Perl6
    O M G Perl6 regular expressions come with <same> as a built-in character class, now a very brief answer is say "ABBBCDEEF".split(/<!same>/); I am still interested to know what's going on with questions 1 2 3, and am considering opening...
  • Posted Splitting on a change in Perl6 to Yary

    I had more thoughts about splitting on character changes, partly thanks to a mailing list thread, which led to…

  • Commented on UTF-16 and Windows CRLF, oh my
    yay! Glad it's helping....
  • Posted Splitting on a change, Challenge 20 Task 1 to Yary
    I like reading the Perl Weekly Challenge even if I rarely participate. It struck me that task 1 of Week 20 asked "to accept a string from command line and split it on chang…
  • Commented on Introducing CPANParty
    What happens when you add a module to cpanparty (great name btw)- do you write integration tests? Or is the idea to "crowd-source" perl people to write tests for modules?...
  • Commented on Playing games with outthentic dsl
    Is your stream example code correct? It looks the same as the example above it, with "between", "regexp:", and "code:"; why is @{match_lines} an array of scalars in the first but becomes an array of arrayrefs in the second?...
  • Commented on Apropos proto: Perl6.c multi thoughts
    As you pointed out S06 specifies .push($candidate) Adds $candidate to the list of candidates for this proto ... Protos created by calling Proto.new() should be able add candidates at run-time. which means, the spec does allow for a Proto class,...
  • Posted Apropos proto: Perl6.c multi thoughts to Yary

    Multi routines are pretty neat, but seem incomplete to me. Some background- one can compute factorials this way:
    multi fac(0) { 1 }
    multi fac(Int $n where 1..Inf) { $n * fac( $n-1 ) }
    say fac(4); # 24

    Now what if we want to pass our recursive-mult…

  • Commented on Text, Grammar, Tree- the 3
    Wow, jnthn's done all the heavy lifting with Grammar::Generative already! Or at least he got a proof-of-concept up, which looks promising. thanks for the tip!...
  • Commented on Simplest way of serving local files over HTTP?
    According to this PerlMonks node you can use "http_this", which is this code: plackup -MPlack::App::Directory -e 'Plack::App::Directory->new->to_app' Though even that doesn't start with Perl. The web has also yielded perl -MMojolicious::Lite -MCwd -e 'app->static->paths->[0]=getcwd; app->start' daemon -l http://*:8000 perl -Mojo...
  • Posted Text, Grammar, Tree- the 3 to Yary

    I think of text, grammars that parse the text, and the syntax trees (data) generated by a parser as a triangle. Most of the time in computerland, people doing something with this triangle are interested in converting a text into a tree using a parser.

  • Commented on Focussing Haskell on Perl 6
    I like the concept, but can the syntax be made to look more like the binding operator and less like a comparison? eg $a :< $lens >: $b; # Either side triggers change in other $a << $lens >: $b;...
  • Commented on UTF-16 and Windows CRLF, oh my
    Right and in fact, in Windows cmd shell (the good old DOS-heritage one) no quoting at all is needed around the -M option, since in that shell the $ sign has no special meaning! And yes, this tip is good...
  • Posted UTF-16 and Windows CRLF, oh my to Yary

    I recently had to do some quick search/replace on a bundle of Windows XML files. They are all encoded as UTF-16LE, with the Windows \n\r line endings encoded as 0D 00 0A 00.

    Perl can handle UTF-16LE just fine, and it handles CRLF endings on windows out-of-the-box, but the…

  • Commented on Fixed 5.22 problems during my compiler port
    ++dly Thanks for the good description of mentoring vs. badgering. Alas, transferring skills is another layer of talent and effort on top of employing those skills. At the moment this split seems healthy for all, though I share your hope...
Subscribe to feed Recent Actions from Yary

  • melezhik commented on Introducing CPANParty

    First of all, thanks for question, Yary!

    > cpanparty (great name btw)
    Thanks! ... yeah, I like it to! ;)


    > do you write integration tests? Or is the idea to "crowd-source" perl people to write tests for modules?

    For the time being all the tests are written by me, but of course I would like other people will join the party ;) Already added test suites could be good start point ( as examples ) for cpanparty beginners, as writing tests implies using dedicated frameworks (swat or outthentic)

    Another idea behind cpanparty tests are kind of specifi…

  • redcoder commented on UTF-16 and Windows CRLF, oh my

    This blog post saved my day! I was getting frustrated at my code for massaging UTF-16 XML files on Windows because I noticed extra CR being added for some reason. Changed the file open to :raw:encode(utf16) and it just worked. So easy. Came across the post on reddit. Thanks again!

  • Aristotle commented on Signatures vs. Methods

    If you have any interest in interoperating with Perl code written before this new syntax then none of this arity-based dispatch is even on the table. How is this going to be reflected in the package stash? With an arity-mangled name? Is method call supposed to fall back to the unmangled name glob for old-style code? What is the timing of that fallback supposed to be? Or do you want to extend globs and somehow bung all of the arities into the same glob? (And then how does it work with coderefs?)

    I’m inclined to take the position that Perl 5 is Perl 5 and if you want Perl&#…

  • haj commented on Signatures vs. Methods

    While I can imagine several scenarios where multiple inheritance would come in handy, method resolution based on arity seems to be a bad idea in all of them.

    If all three classes in question belong to the same project and are unlikely to be used somewhere else, then relying on a resolution method which only works if the methods in question happen to have a different number of arguments is indeed a code smell. Consider renaming DrunkenMother::shout to echo instead.

    If, on the other hand, at least one of the parent classes leads a life of its…

  • vel commented on To compute a constant of calculus</br><small>(A treatise on multiple ways)</small>

    What a beautiful way to learn Perl 6. Thanks a lot for these articles!

Subscribe to feed Responses to Comments from Yary

About blogs.perl.org

blogs.perl.org 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.