user-pic

Aaron Baugher

  • Website: aaron.baugher.biz/
  • About: I'm a programmer and Unix sysadmin who uses Perl as much as possible, operating from the Midwest USA. To hire me for sysadmin or programming work, contact me at aaron.baugher @ gmail.com or as 'abaugher' on #perl6.
  • Commented on Concurrency Weirdness
    I tried replacing the named pipe open with something else that would block -- reading a line from a pipe to grep without a filename -- to make sure it wasn't the named pipe itself causing the problem. Looks like...
  • Commented on Concurrency Weirdness
    Thanks everyone for the ideas. Yes, a named pipe blocks until a process reads from it. So that part works: as soon as I read from it, that loop continues, printing the array to the filehandle, closing it, and starting...
  • Posted Concurrency Weirdness to Aaron's Perl 6 Blog

    I'm still trying to get my head around how the concurrency stuff works. I had an idea for a simple script: sometimes I run a program that dumps a lot of output, so I'd like a script that would take that as input and just hold onto the most recent X lines of it, so that they could be read at any…

  • Commented on My First Perl 6 Module: Net::SSH
    Thanks, Timo. I thought it must be something like that, since I didn't see the same thing when I looked at modules installed by Panda instead of the ones in Core. I'll use those as examples from now on. If...
  • Posted My First Perl 6 Module: Net::SSH to Aaron's Perl 6 Blog

    I've written my first Perl 6 module! I wanted to start contributing modules, but it took a while to find one that wasn't already done, but was simple enough to tackle as my first one. I also wanted to make a proper distribution for it, which was something I hadn't done before even in Perl 5, so…

  • Posted The Old Becomes New Again: A Gopher Server in Perl 6 to Aaron's Perl 6 Blog

    The web is slow. Between overloaded pages, overloaded servers, bloated browsers, and ISP throttling, it's not unusual for even simple pages to take a couple seconds to load. But you get used to it, so I was struck by how fast the Internet can actually be when I fired up a gopher client…

  • Commented on Concurrency and Channels in Perl 6
    Thanks, Timo, that does help a lot. I had a feeling I was closing the Channel in too many places. I'll see what I can do with those ideas....
  • Posted Concurrency and Channels in Perl 6 to Aaron's Perl 6 Blog

    I've been working on a Bayesian spam filter, but it keeps running out of memory, so I moved to something else for a while. The new concurrency stuff looks really interesting, but I don't understand it well yet. As a project, I came up with the idea of a password cracker, which would check a…

  • Commented on A Video-to-Song Converter in Perl 6
    Rob, thanks, I didn't know about USAGE. I didn't realize substr() was a bug, or I would have reported it; just figured that was how it worked. Thanks for the invite to #perl6. I've been hanging out there, just haven't...
  • Commented on A Video-to-Song Converter in Perl 6
    Matt, as I understand it (which may be wrong), defining the sub that way allows me to call it without parentheses (even though I didn't), and lexically scopes it (though that didn't matter here)....
  • Posted A Video-to-Song Converter in Perl 6 to Aaron's Perl 6 Blog

    Here's my longest Perl 6 script yet. I'm trying to come up with some shorter ideas for future articles.

    I have a directory full of music videos in MP4 format, and wanted to convert the audio to MP3 files. I also wanted to insert the title and artist, which are generally found in the file…

  • Commented on Starting to Learn Regexes in Perl 6
    Mike, I didn't even realize you could use a single dollar sign like that, except in the $.method format. Something to look into, thanks....
  • Commented on Starting to Learn Regexes in Perl 6
    Thanks, Brad. Named captures are nice; I need to get in the habit of using them. And the way you're breaking the values out of the hash on two levels in your second for loop is really cool. I don't...
  • Posted Starting to Learn Regexes in Perl 6 to Aaron's Perl 6 Blog

    So I was looking for a script to convert that had a regex, to play with some of the new regex stuff. I picked one that I thought was laughably simple and small, and I'm glad I did, because it still took a while to convert.

    The script is a little thing I wrote to play audio/video files f…

  • Commented on Mystery Line in Proc Input in Perl 6
    Cool, I'll have to look and see how; I haven't gotten into the underlying stuff yet....
  • Commented on Mystery Line in Proc Input in Perl 6
    Yeah, I tracked both cases to the same line in IO::Handle which calls `nqp::p6box_s(nqp::readlinefh($!PIO)).chomp`, and hadn't figured out yet where to go from there, but I guess it's at the NQP layer....
  • Commented on Mystery Line in Proc Input in Perl 6
    I notice that if I save the output of k8temp into a file (which does end with a \n), then have my script read from that file with: my @l = "temps".IO.lines; @.perl.say; Then the array only gets two elements,...
  • Commented on Mystery Line in Proc Input in Perl 6
    Thanks, Rob. I've been meaning to say hi on #perl6; will do soon....
  • Posted Mystery Line in Proc Input in Perl 6 to Aaron's Perl 6 Blog

    Here's something odd; not sure if it's a bug or just something I don't understand.

    I have a utility on my system called k8temp which reports the temperature of the CPUs. It reports it in Celsius, so I thought I'd write a little wrapper that converts the te…

  • Commented on Using Unicode in Emacs for Perl 6
    Very nice, thanks. I just mapped my caps-lock key to be the Compose key with: setxkbmap -option compose:caps and also put it in the keyboard section of my xorg.conf for future runs of X: Option "XkbOptions" "compose:caps"...
  • Posted Benchmarking index() and regex in Perl 6 to Aaron's Perl 6 Blog

    I noticed Perl 6 has a Benchmark module already, so I was wanting to use it, and Liz's suggestion of using index() rather than a regex in my last script gave me an excuse. The results were striking.

    The script and results are below. Benchmark.pm6 doesn't have a cmpthese() routine, but ti…

  • Commented on Refactoring Very Old Perl 5 in Perl 6
    Ok, thanks. I see it on the Proc page now, in the section on new(). It just doesn't have its own =head section, so it doesn't show up in the method list at the top. Now I need to read...
  • Commented on Refactoring Very Old Perl 5 in Perl 6
    ugexe, are you sure about that? I find run() listed as a method on the IO page, not on the Proc page. Am I misunderstanding something?...
  • Commented on Refactoring Very Old Perl 5 in Perl 6
    Yeah, I realized later that trim() wasn't doing anything for me anyway, since none of my lines had whitespace at the beginning and they're being autochomped. Good to know words() trims, though, and those are some nice improvements; thanks! This...
  • Posted Refactoring Very Old Perl 5 in Perl 6 to Aaron's Perl 6 Blog

    Back when I was first learning Perl, I'd been doing Unix system administration for a couple years, and one command I ran a lot was this one:

    ps auxww | grep something
    

    (On some systems it was 'ps -ef'.) That would get a full listing of all runn…

  • Commented on Simple Game in Perl 6
    Oh, you mean the lack of repetition is only guaranteed within a single call to .pick(), not multiple calls! Yes, that's definitely a problem. Thanks for straightening me out on that....
  • Commented on Minor Issue with Perl 6 Install on CentOS 6
    That makes sense. I guess the right thing to do would be to offer a patch to have it check those /etc/*release files for the info if lsb_release doesn't work....
  • Commented on Getting Started
    I suppose we're spoiled from having such comprehensive, accessible documentation built up over more than two decades. This isn't just a Perl 6 thing; when I work with other languages and APIs developed in the last several years, the documentation...
  • Posted Minor Issue with Perl 6 Install on CentOS 6 to Aaron's Perl 6 Blog

    I had a little hiccup while installing Perl 6 on a CentOS system, and thought I'd leave the details here in case it happens to anyone else.

    [Update: This has already been fixed by one of the Perl 6 devs, who isn't able to login here to comment. Panda installs without needi…

  • Commented on Simple Game in Perl 6
    Thanks for correcting that; I didn't say it very well. As you say, .pick() doesn't modify the array. That's why, if I were doing it in Perl 5, I probably would have copied @deck to a separate variable and spliced...
Subscribe to feed Recent Actions from Aaron Baugher

Subscribe to feed Responses to Comments from Aaron Baugher

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.