user-pic

Fritz Zaucker

  • Website: www.oetiker.ch
  • About: Using Perl for (almost) all my software development.
Subscribe to feed Recent Actions from Fritz Zaucker

  • Robert Rothenberg commented on File::Slurp is broken and wrong

    it's not particularly relevant to slurping as the handle won't be shared between threads.

    It doesn't matter if the filehandle is shared. Just calling binmode will lead to a segfault.

  • plenum commented on File::Slurp is broken and wrong

    Why slurp at all?

    Before slurping I ask myself why. Not what module or how.

    • Do I actually know the possible file size? Many times processing large files I have broken modules (and needeed to replace them) because they use slurping which do not scale to large files (Megabyte to gigabyte plus).

    • Am I applying premature optimisation? In my testing the increase in speed (if any!) was outweighed by needing to take into account encodings and binmode issues - pretty much the issues described here. Just using the native methods might be better.

  • Ovid commented on The Ovidian Update

    Fritz: I'd considered writing utilities in Perl 6, or down the road, a command line client, but for now, Perl 6 is too slow and doesn't have the required libraries. Otherwise, I'd love to!

    With a MOP and non-experimental subroutine signatures, Perl 5 would handle most of my needs, though :)

  • Sterling Hanenkamp commented on The Fuse Operator - A Suggested Language Extension

    Perl 6 has a heaping pile of operators, but I do not know of one that works like this. There are some operators and conditions that may mitigate the need for this operator, though.

    Here are some examples of how I would think to write each of the examples given above for the fuse operator in Perl 6:

    $a = do with $b { .<velocity> ~ 'mph' } else { 'unknown' };
    $c = .parent.name with $d;
    $c = .<parent><name> with $d;

    I'm not certain how you would add a fuse operator to Perl 6 as it requires disabling an entire expression in midstream, which is more of contr…

  • martin commented on The Fuse Operator - A Suggested Language Extension
    Does Perl 6 have such an operator?

    Perl 6 uses the symbol ^^ for infix exclusive-or, but has no fuse operator. Interestingly, a single caret is used as a prefix and an infix operator and as a part of many other operators.

    Technically, postfix ^^ could be used in Perl 6, too. The combination of high precedence binding and low precedence short-cutting in an operator would be new for both languages.

Subscribe to feed Responses to Comments from Fritz Zaucker

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.