#perl - Sat 21 Apr 2007 between 14:45 and 14:56



magic_userseesm alot eh
f00li5hi hear so
Ani-_You liar.
f00li5hmagic_user: well, without torrents, i used about 500Mb/month
i've done 6 or 8 gig this month since i got my server (and torrent client) running
Ani-_85% goes to porn. 10% to torreents, 5% to other crap and 1241564% to spam.
dazjorzAni-_: MySQL.
f00li5hAni-_: oh, i was assuming that all the porn was on torrents
Ani-_f00li5h: what you use is irrelevant...
f00li5hwell, half of the porn was torrents
actionjjore calls floating point on Ani-_.
jjorecalls floating point on Ani-_.
Ani-_f00li5h: you are using only 10 gig
dazjorz: show processlist; or show full processlist; or tail /var/log/mysql.log
f00li5hAni-_: yes, my stats are a small sample
Ani-_: can't find the url, please disgard stats
solussdhow can i turn "Joe Smith" into "jsmith". ie, print first initial and last name given full name?
f00li5hsolussd: a regular expression
Ani-_What about "Joe Foo Smith" ?
solussdtrying to figure out how to set up the regex
no middle names, i dont think--
Ani-_solussd: also: is it one scalar or two?
solussdone
Ani-_solussd: you think... First make sure.
solussdok. i'm sure-
i'll make sure there arent any. :)
actionf00li5h gets out his wide problem solving paint brush
f00li5hgets out his wide problem solving paint brush
Ani-_solussd: ok, so what you want to match: the start of the string, a single character, an un-specified amount of non space characters, a space character, the rest.
actionjjore figures you'd just do ( $first, $last ) = split ' '; $nm = lc( substr( $first, 0, 1 ) . $last );
jjorefigures you'd just do ( $first, $last ) = split ' '; $nm = lc( substr( $first, 0, 1 ) . $last );
solussdyes
jjore: that dounds good
*sounds
Ani-_jjore: add a LIMIT in that split.
jjoreWhy Ani-_?
Ani-_jjore: so it works for "John Smith Foo"
actionjjore coughs: split /(?#LIMIT) +/
jjorecoughs: split /(?#LIMIT) +/
Ani-_: Nope. I'm utterly disclaiming that problem.
Ani-_Ofcourse another way to do it: substr($x, 0, 1) . substr($x, index($x, " ") + 1); # ofcourse that would fail if there is no space in the string
callums/^(\w)\w*\s(\w+)$/\L$1$2/ is good too?
jjoreAt that point, Ani-_, I'd start wanting dictionaries to guess which lname parts were really middle names or were lname parts.
Ani-_callum: I would use \S* and \S+

Page: 5 12 19 26 33 40 47 54 61 68 

IrcArchive