Sign in or Join FriendFeed
FriendFeed is the easiest way to share online. Learn more »

Paul Miller › Comments

Paul Miller
Re: perl -MCPAN -e shell help - http://perlmonks.org/...
It would probably be wise to watch and see what it's doing... but yes, those very (very) old CPANs will install new versions of perl, sometimes without asking. The very best way to deal with this would be to install a newer version of perl (if possible) from a solaris binary repo. -Paul - Paul Miller
Paul Miller
Datamining for terrorists would be lovely if it worked – Bad Science - http://www.badscience.net/2009...
This guy is very much worth reading. This article in particular is the kind of thinking that led me to the guy. - Paul Miller
Paul Miller
Slashdot Entertainment Story | The Definitive Evisceration of The Phantom Menace *NSFW* - http://entertainment.slashdot.org/story...
If for some reason you haven't yet watched all seven parts of this, you really owe it to yourself to take the 40 minutes to do so immediately. Drop everything and watch these. I'm completely serious. - Paul Miller
Paul Miller
Re: Testing for C library status at perl binding build time? - http://perlmonks.org/...
I've been using [mod://Devel::CheckLib] with great success. -Paul - Paul Miller
Paul Miller
Re: String Match Use of $1 Uninitialized - http://perlmonks.org/...
You second regex doesn't have any ()s in it. The $1 is populated from the ()s. Rather than saying RTFM, I'll say R this part of TFM: [href://http://perldoc.perl.org/perlret... matches]. -Paul - Paul Miller
Paul Miller
cortesi - The impact of language choice on github projects - http://corte.si/...
This is just a very cool list of shit. - Paul Miller
Paul Miller
Re: substitution "0" in decimals - http://perlmonks.org/...
You can use some kind of [doc://sprintf|number formating] or you can learn about regular expressions ([doc://perlretut]). Heck, I think you can even do this with $x = $old + 0. Cheers. -Paul - Paul Miller
Paul Miller
Re: Help!!! How to find duplicates? - http://perlmonks.org/...
Traditionally, RE can't do this kind of balanced matching. Modern perl 5.10s have special support for it and even older perls have special (?{ code }) matchers than can do the counting for you. What you really want is a parser. Your best bet is probably: [mod://Text::Balanced] rather than RE. Although, to be honest, I've done it both ways and prefer using (?{ code }) to T::B as I find it difficult to operate. -Paul - Paul Miller
Paul Miller
LHC update: it’s now all-powerful - http://blogs.discovermagazine.com/badastr...
I love LHC news. - Paul Miller
Paul Miller
"Bandwidth hogs" join unicorns in realm of mythical creatures - http://arstechnica.com/tech-po...
This is relevant to my job... - Paul Miller
Hmm relevant the same way, but also applies here! - Ace
Paul Miller
Re: Catching STDIN and STDERR on the fly - http://perlmonks.org/...
See [mod://IPC::Open3]. Should solve the problem nicely — although it may require some thought. There are also really nice [mod://POE] solutions for this, particularly if you want to do something event based instead of polling the inputs/outputs. -Paul - Paul Miller
Paul Miller
Re: To bless or not to bless - http://perlmonks.org/...
Autoloads are less popular without a good reason these days. They certainly have a purpose, but it should be fairly rare. If you want to avoid some of the work of blessing by hand, check out [mod://Moose] — it's the new cool thing. I'm thinking I may have missed the question though, so perhaps I'm not 100% relevant. Still, if you haven't already: check out Moose. It's the new cool thing. -Paul - Paul Miller
Paul Miller
NSA Iraqi Computer Attacks And U.S. Defense - Hacked Off - Dark Reading - http://darkreading.com/blog...
This is an interesting read on the US cyber war tech. - Paul Miller
Paul Miller
Re: $@ can't be relied on? - http://perlmonks.org/...
That's correct. There are rare cases where it doesn't work. The correct way to do this is as follows: my $res = eval { might_explode(); 1 }; die "omgish: $@\n" unless $res; # Also, why invoke print and exit when this will do? Note that die $@ if $@ almost always works. I can't recall the example case I saw, but it's reproducible stuff. It's not like it just randomly doesn't work. Well, maybe with threads. -Paul - Paul Miller
Paul Miller
More Freedom Necessary as Top Developers Abandon iPhone - http://www.eff.org/deeplin...
Fuck Apple. - Paul Miller
Paul Miller
Re: C-like structures parsing and validation - http://perlmonks.org/...
Feels like an opportunity to use [mod://Inline::C]. -Paul - Paul Miller
Paul Miller
» Proof Google is God - Church of Google - http://www.thechurchofgoogle.org/Scriptu...
This is better than noodly appendages. - Paul Miller
Paul Miller
SU - Neil Gaiman: The most famous writer youve never heard of - Times Online - http://www.stumbleupon.com/s...
I like this article and Gaiman — prolly not enough to read the kids books though. - Paul Miller
Paul Miller
Groklaw - Microsoft Patents Sudo?!! - http://www.groklaw.net/article...
OMFG - Paul Miller
Paul Miller
Rick Astley gets jailbroken privileges on Aussie iPhone virus attack - News - PC Authority - http://www.pcauthority.com.au/News...
haha - Paul Miller
Paul Miller
Re^4: CPAN non-root questions - http://perlmonks.org/...
Hey, thanks for this information. But for future reference, 5 yeas after the fact, I totally figured it out already. Thanks. -Paul - Paul Miller
Paul Miller
Re: real time open(HANDLE,"cmd |"); - http://perlmonks.org/...
This is the usual document on the topic: [href://http://perl.plover.com/FAQs... from buffering]. -Paul - Paul Miller
Paul Miller
Official Google Blog: Transparency, choice and control — now complete with a Dashboard! - http://googleblog.blogspot.com/2009...
There's nothing in here you couldn't already get to via the service control panels, but I still like it. - Paul Miller
Paul Miller
Re: using regex to capture a string and an array - http://perlmonks.org/...
That /g is making the whole regex try to match again. I don't think it's helping you here. Try the non-greedy anything match instead and get specific about your delimiter. You *said* what you wanted. It looks like this: my ($site, $digits) = $String =~ m{ ^(.{3}) # the site code .+? # noise, as little as possible though (\d+) # the digits (keepers) \. # the delimiter }x; -Paul - Paul Miller
Paul Miller
I'm actually aware of a podcast episode between the bad astronomer and brian cox. It's great: http://www.cernpodcast.com/... - Paul Miller
Paul Miller
Slashdot Comments | Towards a Permission-Based Web - http://tech.slashdot.org/comment...
Important note about the Apple iStore: you can't co else where. Apple shits on your head for buying that. - Paul Miller
Paul Miller
Re: Moving and resizing application in X Window Manager - http://perlmonks.org/...
I use [mod://X11::GUITest] for this stuff. I used to like the KGS Go server, but I hated the way the client interacted with my linux desktop. WMS made several terrible design decisions that made it somewhat less portable than Java programmers pretend their programs should be... ... so I wrote a program to find KGS windows and move them back onto my desktop (from off the screen) and/or put them where I want them to go (instead of whatever random position WMS calculated). I won't cut and paste the whole thing, but here's basically how it worked: use strict; use warnings; use X11::GUITest ':ALL'; my $cur = GetInputFocus; sub onscreen { my ($x, $y) = @_; return 0 if $x > 1280 or $x < 0; return 0 if $y > 1024 or $y < 0; return 1; } for(;;) { my $root = GetRootWindow; for my $window (grep {defined $_->{n}} map {{id=>$_, n=>GetWindowName($_)}} GetChildWindows($root)) { if( $window->{n} =~ m/Room List/ ) { my ($x, $y, $w, $h) = GetWindowPos($window->{id}); # warn "\$x=$x, \$y=$y, \$w=$w,... - Paul Miller
Paul Miller
Re: Random numbers are not random enough on Windows - http://perlmonks.org/...
every random number generated was unique. This was expected. I had a stats teacher that would have everyone write down a coin flip sequence and then he'd explain how he could tell who cheated: not enough repeats. I guess I'd expect to see a few repeats in my sequence of random numbers. Probably not as many as you're seeing... I think there are other [href://http://portal.acm.org/citatio...] with the windows PRNG too. Maybe win7 fixed it. I guess I expected to find some things on CPAN for this, but I didn't -- unless you're willing to use cygwin. Then there seem to be a few choices. [mod://Crypt::Random] (will this work without the entropy daemon?) and [mod://Math::Random::MT::Auto] (should I be using this too?) seem fairly interesting. UPDATE: Ahh, interesting. I didn't understand the issue at all. -Paul - Paul Miller
Paul Miller
Re: Return code from calling qx - http://perlmonks.org/...
[Corion] and [ikegami] are correct. But I can never remember all the weird little things with qx and system (et al); so I just use [mod://IPC::System::Simple] and all my problems are solved for me. -Paul - Paul Miller
Paul Miller
Re: how to push 5th element from one array to another array - http://perlmonks.org/...
See [doc://splice] -Paul - Paul Miller
Other ways to read this feed:Feed readerFacebook