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

Perl Monks User Search

( #6364=superdoc: print w/replies, xml ) Need Help??

This is where you can search for all the writeups contributed by any user. Just enter the user name and select the order for the search.

Author: Show nodes
Order by: starting at .
Node Type: Show Categorized Q&A (Why?)

Or try a Super Search

These nodes all have stuff by calebcall (showing 1-18 out of ~18?):

Node ID Writeup Created
1077789 Re^4: Parsing XML (XML::Rules xml2XMLRules ) 2014-03-11 04:29
1077788 Re^4: Parsing XML 2014-03-11 04:27
1077775 Re^2: Parsing XML 2014-03-11 01:53
1077495 Re^2: Parsing XML 2014-03-08 06:43
1077492 Parsing XML 2014-03-08 06:20
1062283 Re^2: Having a problem with my path 2013-11-13 00:16
1062125 Having a problem with my path 2013-11-12 07:04
1061807 Re^2: Trying to build a hash from a string... 2013-11-09 09:33
1061799 Trying to build a hash from a string... 2013-11-09 08:19
1058714 Trying to compare a string... 2013-10-18 08:02
1019724 Working with a very large log file (parsing data out) 2013-02-20 07:14
1019225 Re: Escaping single quote in $string 2013-02-17 22:10
1019209 Escaping single quote in $string 2013-02-17 20:44
932544 Re^2: Searching Multiple directories??? 2011-10-20 02:27
932541 Searching Multiple directories??? 2011-10-20 02:01
931832 Re: Variables with spaces and changing file extensions 2011-10-17 03:48
931819 Variables with spaces and changing file extensions 2011-10-17 02:14
837844 Net::IMAP::Simple and Email::Simple printing, sorting, emailing, and deleting messages. 2010-04-30 20:08
Log In?

What's my password?
Create A New User
[Corion]: ... gets called once. The data structure for that is just a hash of arrays, mapping the event type to a queue of registered one-shots, and the first one-shot from the queue gets removed and called.
[Corion]: But now I want to register a one-shot for two events, of which only one will arrive, so my data structure doesn't work anymore...
[Lady_Aleena]: Corion, ouchy.
[Corion]: (maybe I should write this up as a SoPW) - currently, the "most efficient" data structure I come up with is a single array which I scan for the first fitting one-shot. Not efficient but I don't expect more than five outstanding one-shots anyway
[choroba]: can't you create a meta-key corresponding to the disjunction of the events?
[robby_dobby]: Corion: Heh. This whole thing smells of Strategy Pattern or MVC pattern.
[Corion]: And performance linear to the number of registered one-shots doesn't feel that bad. Maybe I should collect statistics on how many callbacks are outstanding ;)
[Corion]: choroba: Yes, but the longer I thought about efficient hashes mapping the event type back to their callbacks, and how to keep them in sync, the more I thought that all that optimization might just not be worth it, even if it's horribly inelegant
[Lady_Aleena]: My biggest problem with hashes at the moment is one with 2,501 keys.
[choroba]: how many event types are there?

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2017-05-29 07:54 GMT
Find Nodes?
    Voting Booth?