user-pic

Brad Gilbert

  • About: I blog about Perl.
  • Commented on A smaller, faster, more agile Perl
    I was going through my RSS backlog when I read this. I'm not proud to say that I didn't realize it was posted on April 1st until the PL/1 paragraph....
  • Commented on The Road to Hell is Paved With Good Intentions
    Well = isn't a valid comparison operator, perhaps you meant ==....
  • Commented on Why code style is important
    I believe this is part of the reason C/C++ programmers put the braces on a new line, to make them stand out. Whereas when you program in Perl, you know the brace is there otherwise it wouldn't compile....
  • Commented on Perl and Me, Part 11: Please Mr. Perl, Will You DWIM?
    I think that the reason C/C++ programmers put the braces on a new line is that you can omit them in some circumstances. You can't omit them in Perl the same way, so there is no need to make them...
  • Commented on Perl and Me, Part 7: The Most Powerful Weapon Which You Can Use to Change the World
    That still isn't a reason to not work on the Perl core. My first patch was to convert while( readdir($dh) ){...} into while( defined( $_ = readdir($dh) ) ){...} I don't even (really) know how to program in C. I...
  • Commented on Lexical closures with END blocks warn, but Just Work
    You could add the values to a state variable. sub print_it { my $value = shift; print "During execution, got [$value]\n"; state $old = []; # Uses push instead of unshift # because push is probably faster on long arrays....
  • Commented on Tool tip: looking at a module's source
    I usually type out komodo $(pm_which -q Some::Module) ( The -q is in case I mistyped the module. ) I have thought about writing a script that opens the file in komodo if it is running, and otherwise open it...
  • Commented on List Assignment in Scalar Context
    There is a way to get what you were looking for in your last few paragraphs. (my($input, $output) = @ARGV) == 2 or die "Usage: $0 "; Although I would generally separate out the argument count checking from the assignment....
  • Commented on Great Mystic Mystery Revealed
    As Paul "LeoNerd" Evens stated: It was originally a quick (hack), a limit of the parser used to pull out the package names. But so many people have now relied on it, that it's become a feature that won't be...
  • Commented on Great Mystic Mystery Revealed
    Actually I think that PAUSE only parses the modules if it can't find META.json or META.yml Since the DBD-Oracle distribution uses Dist::Zilla, it was actually Dist::Zilla which added it. You could have also added some lines to the dist.ini file...
  • Commented on Keeping up to date.
    cpanp 'o;i *'...
  • Commented on Perl and Me, Part 1: The Road So Far
    There are a couple of reasons I haven't ever pursued working on the Perl internals despite my C background, and time is certainly a big one. I've picked up a enough perlguts to know that learning how the interpreter works...
  • Commented on Perl and Me, Part 1: The Road So Far
    You might like D. It's basically a re-write of C++, in a similar way to how Perl6 is a re-write of Perl5. Also since you know C you could help improve the Perl internals, if your not too busy....
  • Commented on Comparing Apples and Oranges - rubygems vs cpan part 2
    I agree that it could be made easier to upload modules. I think we should strive for higher quality of code on CPAN; rather than on sheer quantity. So I think we should have a few minor hurdles to jump...
  • Commented on How do we know when a CORE module is deprecated?
    It is not deprecated. I think mst misread an email from Ricardo Signes to the P5P list....
  • Commented on Holy bloat, Batman!
    I have sent a patch to Perl5 Porters to remedy this situation. Based on the comment just before "*{chr 256} = \3;" this should have been reworked after the next dev release (5.15.4). - # Before this makes its way...
  • Commented on Holy bloat, Batman!
    The offending line: *{chr 256} = \3; which is only used for: if (exists ${__PACKAGE__."::"}{"\xc4\x80"}) { delete ${__PACKAGE__."::"}{"\xc4\x80"}; *_DOWNGRADE = sub () {1}; } else { delete ${__PACKAGE__."::"}{chr 256}; *_DOWNGRADE = sub () {0}; } Thank you for bringing this...
  • Commented on pathed - munge the Bash PATH
    Marcel, Env is actually a really small module. Especially since it works on many different systems....
  • Commented on Swampy.pm6
    Why would you do all kinds of difficult work, when you can easily cheat? ( Like using the elevator instead of the stairs ) Perl has stolen many ideas from other languages. Why not cheat when you are writing answers...
  • Commented on Think Python, But Perl 6 - Chapter 3: Functions
    Exercise 3 is slightly wrong. It doesn't take into account that Unicode characters have different widths. This is of-course a problem with the question, not with your answer....
  • Commented on PAUSE permissions should be case-insensitive
    This is (of-course) also a problem on Windows....
  • Commented on Bringing Perl5 to GitHub
    I know there was a project that imported their entire bug-report database into GitHub. ( may have actually been Rakudo )...
  • Commented on A very small script to check the masking information for each of the cloned devices.
    Instead of copying the commands into batch file, why don't you just execute them? (using one of the following) system "symmask -sid $symmid list assign -devs $+{source}"; `symmask -sid $symmid list assign -devs $+{source}`; system 'symmask', '-sid', $symmid, qw'list assign...
  • Commented on My Prediction
    Changing the version to 7 will probably cause more problems than it solves. I also doubt that just changing the version number will (by itself) really change things enough for it to be worth it....
  • Commented on Q: When not to use Regexp? A: HTML parsing
    http://stackoverflow.com/a/1732454/1337...
  • Commented on OT: Reset/Use Another Netflix Streaming Server
    I think this would only work if your modem gets a new IP address. Some people pay to have a static IP address....
  • Commented on A Look At Arrays
    Perl arrays are not implemented using linked lists. See PerlGuts Illustrated....
  • Posted Perl 6 and D separated at birth to Brad Gilbert

    When I first learned of Perl6 and D, They seemed to me to have similar sensibilities.

    One of the motto’s of the Perl community is to “Make easy things easy and hard things possible”. I find it interesting that …

  • Commented on On defined(@array) and defined(%hash)
    All of the use cases for defined except defined($scalar) are better done with exists, scalar,!! or just removing defined. defined &func === exists &func defined func === exists &func if defined @array === if @array $def = defined @array ===...
  • Posted Strings: Characters vs Data to Brad Gilbert

    I’ve been thinking, why is it that Character strings, and Binary strings are mostly the same in Perl. If you read in a binary file, why would you want it to behave as if it were a Character file?

    The main difference currently, is that Unicode Character strings have the ="p…

Subscribe to feed Recent Actions from Brad Gilbert

  • Buddy Burden commented on Perl and Me, Part 11: Please Mr. Perl, Will You DWIM?
    I think that the reason C/C++ programmers put the braces on a new line is that you can omit them in some circumstances. You can't omit them in Perl the same way, so there is no need to make them stand out.

    Well, as I say, I like my braces (and other matching parend-like punctuation) to line up vertically. That's just easier to read, to me.

    Smart match has some problems which are mostly because it came from Perl6 where they have a more specific type system.

    Possibly. And it's still possible that smartmatch will be retained, …

  • Gabor Szabo commented on Why code style is important

    I find it funny that this would be warned about just by setting -Wall.


    Our Wall would not accept such code.

  • Ovid commented on Why code style is important

    And this is why, when I'm hacking on Javascript, I always put the curly braces on if statements, even if the body is only a single line.

  • Ether commented on Why code style is important

    This looks like something that could have happened from a git merge, without someone manually reviewing the result of the merge.

    The same thing would have happened if braces were used like this:

    if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
    { goto fail; }
    { goto fail; }

    Only if the braces were on a different line would we either have gotten a
    detectable merge conflict, or a second goto operation that did no harm:

    if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) {
    goto fail;

  • byterock commented on The Road to Hell is Paved With Good Intentions

    yes '=' is not valid but it worked oddly enough with some versions of 'Test::More'

Subscribe to feed Responses to Comments from Brad Gilbert

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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.