Bits of Randomness
I'm getting more motivated at work. I have ONE script that needs debugging... in a language I don't "speak". This is actually fun.
The car place still has my car. Had to skip the gym this morning for lack of car. It @#$ing well better have air conditioning when they're through with it. They replaced nearly every part in the A/C system just weeks ago.
Quote of the day: "WARNING: The consumption of alcohol may leave you wondering what the hell happened to your bra."
The car place still has my car. Had to skip the gym this morning for lack of car. It @#$ing well better have air conditioning when they're through with it. They replaced nearly every part in the A/C system just weeks ago.
Quote of the day: "WARNING: The consumption of alcohol may leave you wondering what the hell happened to your bra."
no subject
no subject
no subject
no subject
Or with no hands.
no subject
no subject
Okay, I admit I stole it.
no subject
no subject
no subject
no subject
Naah. I wouldn't turn down the drink, but this is just one of those humor tidbits that goes around the net. It was followed by a list of ten more gems, including "...may cause you to think you can sing" and "...may make you think you are whispering when you are not". :-)
no subject
I have got to stop taking the stairs.
no subject
no subject
I had to laugh! :-)
The script is indeed in Perl. I'm taking this opportunity to learn some of the basics, at long last. I'm surprised at how much I like it. Most of my previous experience with Perl has been of the form "some guy who mistakenly believes he's better than everyone else likes this language", so for a while I was reluctant to learn it.
no subject
Though Perl was used for years before the web was around, it was only known by a few crusty Unix people that normal humans probably wouldn't communicate with. (Apologies to those of you who fit this mold who are probably reading this. You know who you are. :-) I claim partial exemption being one of them myself.) Perl was an obvious choice for a lot of web interactivity, particularly with the release of Perl 5, about simultaneous with AOL putting people on the net and the web exploding.
Anyway, Perl is ultimate among languages that let you do a great deal with very little. Because of this, and books like Learn Perl in 8 Seconds Without Thinking, probably by Sams, a lot of non-programmers picked up a little syntax and were actually able to produce sorta-working stuff.
I think most of the thinkers of the thoughts that you've described are people who fall into this category. They're people without a solid grounding in computing, have little experience with other languages and probably lack the skill required to easily pick up other languages and tools. The swagger is a little defensive in most of the people who have it.
Now... that said, Perl does all kinds of rule. If you're actually good at programming, and happen to be working in the problem spaces at which Perl excels (which used to be a smallish space, but now includes mostly things not graphically oriented or very low level where the overhead of Perl becomes important), Perl is in my ever so humble opinion the best choice. It's flexibility, power and speed of development are just hard to rival with any other language.
no subject
My own theory is that a swagger is almost always defensive whether in a Perl coder or not :-) but that's another topic.
Many many thanks for the offer of help! I'm enjoying tweaking this thing, and I just may take you up on your offer if I get stuck.
no subject
And you're welcome about the offer to help. I have a lot of fun with Perl, and even more fun with people who are new to learning it. I'd be happy to be of any assistance that I can.
no subject
For actual serious coding I've defected to the Ruby camp, though there's still nothing to touch cpan.
no subject
This is mildly clever. I'll disect it for the benefit of readers who may not be able to parse it.
Square brackets are an anonymous list constructor in Perl. What results is a scalar value that is a reference to a list. So:
$foo = [1,2];
is the same as:
@foo = (1,2);
$foo = \@foo;
=> is syntactic sugar, and is a synonym for ',' , so what you've done with the first part of the expression is an (anonymous) reference to a list containing $a and $b. It is a cool way to write it because it looks like numeric comparison, but actually does nothing of the sort.
Now, the '->' is the arrow operator used to dereference in Perl. When followed by square brackets, it is expects to dereference a list reference. For instance, with our foo example above, we'd get the first (zeroth, actually) value of @foo with:
$foo->[0];
So... $max = [$a=>$b]->[...];
intends to dereference the anonymous list and access the numerical value indicated by '...'. What is actually contained in that is, this time, an actual numeric comparison is being done with $a<=$b, which if false, will generate 0, the zeroth element, and if it is true, it will be equivalent to 1, giving the other element of the list.
And in more general terms, you are correct... there is more of this in Perl than anywhere else I've ever played, and it is among the multitude of reasons that I love Perl and Perl culture.
If you disliked this bit of fun, you are almost certain to not enjoy the Fun With Perl mailing list, accessible from http://lists.perl.org/ . This list has frequent mailings of things of this sort, along with other things like Perl Golf contests. These last are seeing who can perform a specified task in the fewest number of (key)strokes. You'd be amazed what Perl masters can do in 60 or strokes... I've never seen a problem posed that took more than that. Of course, the winning solution always look like this:
-ni
$_=$#@*(%(#$@#___;eval
so it has little value until you get enough the hang of it to be able to parse those things... but once you have the basics, decoding those and asking questions about them is extremely educational.
I personally suck at these in that I've been programming Perl too long to justify entering those contests in the "beginner" category and yet I can't generally score well even for a beginner, let alone with the main group.
no subject
(Anonymous) 2002-07-25 07:17 am (UTC)(link)perl has made inroads into the dos space, via ActiveState, especially on the web side of things... but vb/vbscript covered a lot of the "needs more scripting" niche, much to the horror of unix geeks :-)
but yeah, you can always ask for help, even "don't tell anyone I asked, but..." form; you just risk getting long digressions about how some feature evolved from perl 3 :-)
"perl is the yiddish of programming languages"
_Mark_
no subject