$foo =~ s/baz/bum/;
Linky:
Email: aardvark at saintaardvarkthecarpeted dot com |
I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers.Wed Apr 18 09:46:18 PDT 2007 This is how I imagine Samuel L. Jackson leading off a conversation with the writers of the PHP language (edited to be less obscene and offensive). In the name of all that is holy and right, please explain to me why the fuck PHP's preg_replace() takes delimiters for the first argument, but not the second. IOW, Perl's $foo =~ s/baz/bum/; becomes preg_replace('/baz/', 'bum', $foo);
Yes, I should've just RTFM. You're completely right. But this just bit me in the ass, after spending 10 minutes wondering WTF was going wrong, and a little fucking consistency goes a long fucking way. Why botherTue Apr 17 08:40:12 PDT 2007 …trying to report a phishing email to a bank whose website:
Because it's The Right Thing(tm). But that doesn't make it fun. In case you hadn't read the newsletterMon Apr 16 19:48:57 PDT 2007 From Bruce Schneier's newsletter comes this blog entry suggesting that there simply aren't that many serious spammers. Interesting data. Managed to get the Perl/PHP parser extended so that it would see nested PHP arrays and translate them to the proper hash/array references in Perl. It was good to do that, but then other problems arise — like the fact that, as the parser stands right now, it simply stops parsing if it finds something it doesn't understand. This could be something like a comment in a nested array, or something like if ($debug == 1) { $foo = "bar"; } else { … }. Again, I'm concluding that this would all be much, much easier if it was in a database…just have PHP and Perl suck out the data and do what they want. Either that, or just start writing everything in Perl… Update: Also, this is not what I expect to see at the top of Planet Solaris — though maybe this should've prepared me. Rockwood's coworker's post is worth reading too. Update2: Just for completeness, I'll mention that Ben's updates and comments are also worth reading. That's it from the Obvious Dep't. Dude!Fri Apr 13 15:57:14 PDT 2007 One of the things I've been doing at work is writing registration forms for conferences. Natch, each one is slightly different, and I've never been quite sure I've been doing it right. Thus, WWW::Mechanize has been a fucking godsend to me. But, as each of the forms are slightly different, each script is slightly different as well. If only my test script could parse the form's configuration file. Too bad the config file, like the form itself, is written in PHP. Or is it? For what to my lumbering (yes, they lumber) eyes should appear, but CPAN's PHP parser and PHP::Include, which I think is more my size. Sweet! Been reading:Thu Apr 12 20:52:29 PDT 2007 Someone builds a Perl shell using Moose which led to a response to this article which cited this article and this response, which just made me laugh ("Mental Disorders (Can you say @_ = shift $1->Whuahahahahaha();)"), but not as much as the concept of yak shaving, which just made me laugh and cringe in recognition. No, I don't usually just list what I've been reading lately…it's a quarterly thing. Nexenta: next year in Jerusalem!Mon Apr 9 15:13:43 PDT 2007 I think I'm going to have to end my experiment with Nexenta. I've been running it for a couple months now on my desktop machine, and for the most part it does everything I'd want it to do. Sound doesn't work (built-in Intel chipset, 945 I think), but I haven't really looked into it too hard; the screen resolution keeps changing back to 1400x1200 for me in IceWM, but again I haven't really looked into it too hard. Firefox runs fine, xterms work, Emacs is there, and since it's a 2.8GHz P4 (cf. the 500MHz P3 I was running before), it's all ver' fast. But when I started using it, I had visions of helping get it released; there are 90 bugs to knock down, and I could help with that. I can — I did (a little) — but with a 9-month old kid to help take care of, my time is et up pretty damn quick. A couple of hours on the weekend is the sum of my spare time right now, and that's for everything. Why do I mention that? Because OpenSolaris needs a lot of learning, and Nexenta/GNU/Solaris needs a lot of work to get a beta release out the door. I thought I'd learn dtrace; I thought I'd knock down a half-dozen bugs while a growing community joined in. That turns out not to be the case. And it's a damned shame, and I'm not helping matters any by giving up. I love the idea of Solaris + Debian. I'd like to see it up and running and grabbing people's attention and all the rest, but it's just not happening right now. And so, in a few minutes I think I'm going to install Debian on here. It has what I want and lots more. There are plenty of people involved in the project, covering for my slacking. I'll be running testing, 'cos I've been doing it so long that it seems foolish to stop now :-). When I finally get around to upgrading the server that prompted this digression, I'll make it stable. I'll probably replace SuSE at work with stable, too. And now for teh big finish… |