Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

last hour of cb

by Tanktalus (Canon)
on Jan 26, 2007 at 20:59 UTC ( #596792=document: print w/ replies, xml ) Need Help??

Updates more-or-less every 5 minutes (except when there is no activity). Extracted from Tanktalus' CB Stats' database. Feedback
Shows the last hour or so, but never more than will fit in 64k, nor over two hours. Other sources of cb history
Last update: Jul 28, 2014 at 15:30 UTC

Previous message (not shown): Jul 28, 2014 at 13:51 UTC
[deMize]I'm having a brain fart. Is there a way to loop through a hash ref by values, but sorting by keys. foreach $val ( sort keys %$hr ){...} The key is not in the list of values, so it seems like sort {...} values %$hr won't work.
[deMize]I'd like to not do foreach $key ... {$val=$hr->{$key};}
[MidLifeXis]First statement inside of the loop could be my $val = $hash{$key};, or you could do a ....
[tye]@$hr{ sort keys %$hr }, note that this gives you aliases so be wary of modifying $val in your loop
[Voronich]eww.
[MidLifeXis]for my $val ( map { $hr->{$_} } sort keys %$hr ) {...}
[deMize]So it's ugly enough to just avoid doing that? :)
[tye]my $val = $hr->{$key}; is a good general approach. If you want to modify values in the hash, then I'd use the hash slice (which I don't find ugly).
[MidLifeXis]The hash slice is a nice approach (imo), but the alias implications that tye mentioned are necessary to be aware of.
[deMize]tye don't want to modify, but I don't want to generate future complications
[MidLifeXis].oO( What freepin idiot thought that hiding the file size on an attribute screen used by administrators was a good idea? )
[deMize]MidLifeXis burr
[MidLifeXis]Which idiom is easier to understand? Hash slice, map, or assignment? Remember the future maintainer of this code as well. :-)
[mr_mischief]David St. Hubbins: It's such a fine line between stupid, and uh... Nigel Tufnel: Clever. David St. Hubbins: Yeah, and clever.
[Corion]Corion feels trolled.
[mr_mischief]I find the linguistics of "trolling" from its fishing roots through to a "troll" being the person and the fairytale bridges sometimes being mentioned fascinating.
[mr_mischief]There's quite a mishmash of etymology with that term online.
[mr_mischief]The "This Is Spinal Tap" quote is, by the way, referring to maintainability down the road.
[MidLifeXis]Which relates directly to any of my comments earlier as well ;-)
[Voronich]Voronich has to concede he never thought to think about it. But that actually is pretty interesting. The accident of a homonym and all.
[GotToBTru]something for the linguists of the future to ponder
[Voronich]Voronich has to shut down for a few hours. o7
[MidLifeXis]take care, V. o/
[mr_mischief]I always wondered if the conflation of "imp" meaning "young shoot or graft" with some sort of small demon had to do with a back-formation of "pious/piety"->"impious/impiety"->"imp-ious/imp-iety"
[mr_mischief]Oh, where is Tim Toady this morning? lol.
[mr_mischief]err, TimToady, even.

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2014-07-28 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (204 votes), past polls