And the other one is named Deimos (terror); thus he was making a deliberate reference to the Martian moons. Deimos and Phobos are both sons of Ares (Mars), which explains the choice.
Actually that was a poor explanation on my part; I meant "the scalar foo" and "the array foo" but mentally I pronounce them as "dollar foo" and "at foo". The sigil is not really a part of the name but a type indicator for the expression, and the actual storage accessed for an identifier is inferred from the way it's used (e.g. the brackets). More here: http://slashdot.org/comments.pl?sid=3415413&cid=42726695
I'm really curious about Perl 6; it will take some (un-)learning and I'm not whether it can succeed among Python, Ruby, and Perl 5 (I doubt that legacy code can simply be reused).
Yup, that was inaccurate; I came up with it only to tell Viol8 (599362) that the sigils are not there just for fun. I wrote a better-thought explanation in another post for someone who already knows Perl:
Sorry, the 'sigil part of the name' explanation only meant that in my head there's a foo array and a foo scalar. As I understand it, the sigil is a type indicator for the expression and which object is accessed is 'inferred'. The messier ones demonstrate it more "clearly" (!), e.g. those where you enclose everything in %( ).
So @foo{('curly','larry','moe')} actually means something like "the list of values resulting from looking up ('curly', 'larry', 'moe') in some hash foo (implied by the { })"; it will throw an error or warning if there is no hash foo to apply the { } to. The same way, @foo means "a list of values from foo", so there had better be an array named foo.
Maybe a real Perl monk will correct me. A few concepts in Perl are peculiar, like "every expression ultimately yields a flat list", and references, but Perl is a language for the long run and you get used to them.
Sorry, the 'sigil part of the name' explanation only meant that in my head there's a foo array and a foo scalar. As I understand it, the sigil is a type indicator for the expression and which object is accessed is 'inferred'. The messier ones demonstrate it more "clearly" (!), e.g. those where you enclose everything in %( ).
Maybe Perl 6 should be called something else. For what I know it's different enough from Perl 5 to require rewriting code, but OTOH that may decrease resistance to adoption among PHBs ("so it's a new version, right?") and it may sound like "venerable, proven language updated". If it ever comes out.
Not to someone who already knows Perl, because by the time he sees that he's already familiar with $foo, @foo, $foo[2] (third element in @foo), %foo, $foo{'bar'} (value stored in %foo under 'bar'), though it IS bad form. Yes, it's not for the casual observer and *really* messy code can be written, but good style helps a lot.
$foo is one (scalar) variable, which is not the same as @foo (array), and %foo (hash) and foo (file handle), which can coexist without interference, and no Perl programmer will be confused by that (we actually think of the sigil as *part* of the name, as in "dollar foo" and "percent foo"). So it's not redundant syntax, which Perl avoids like the plague.
They're also there to ensure that you're getting the right kind of value when you build an expression, like @stooges = @people{('curly','larry','moe')} (stooges is an array, people is a hash). That is the kind of compact syntax that makes it popular as opposed to iterating over the keys to add the values to the array.
consider their debt to society paid when they have served their sentence. In civilized societies
That's a concept that never made sense to me. How is sitting in jail "paying" or redressing the damage? Dissuasive punishment in some cases, preventive reeducation in some others, but sure nobody's getting compensated beyond some ill talionic reward.
Killing them is a sharper example of this futile sense of "justice", beside making that society less civilized.
Textbook code is meant to illustrate only the thing being discussed. A book would be less readable if every snippet contained the proper boilerplate for exception handling, pre-execution checks, malloc+free tracking, etc... That's usually covered in separate sections, and the professional coder should be aware of the need even if K&R didn't lecture him on it.
My general approach is googling until I get a hang of the concepts and terms. Then I can make more efficient queries, and if that fails I'm better equipped to ask the right questions in a forum / IRC channel (desperate measure).
My big peeve with browsing/searching forums is that the answer may lie in post #xxx of any of several threads, buried in chatter, missed shots and solutions that no longer apply.
If you had, you'd know that he's against about discriminatory data caps, such as "150 GB on anything but our [partner's] streaming video services":
“A covered internet service provider may not, for purposes of measuring data usage or otherwise, provide preferential treatment of data that is based on the source or the content of the data,” (.pdf) Wyden’s bill reads.
It goes further to question data caps in general, but that's a pricing scheme and has nothing to do with neutrality.
Thanks. Looks like a StackExchange clone, which should show up along with the dozens of other sites (LinuxQuestions, $DISTRO-forums, $DISTRO-wiki, *-HQ...) in a Google search.
apropos is usually equivalent to 'man -k' - search the short descriptions of all commands. 'man -K' searches the bodies of all manpages (yup, slow), and none account for synonyms or subtleties like "filesystem" vs "file system". That makes Google a nice choice, especially since most likely someone has gone through the same before; filtering by date and refining with extra words and exclusions helps the toughest cases.
Asking in a forum. Some answers will only point you to the manpage, but likely someone will give you a pre-chewed answer. Not much actual learning, but certainly easier.
That approach falls short when: * You don't know *what* program does what you need ("man -k" and "apt-cache search" are not always helpful) * There's a quirk / unexpected behaviour / bug (man pages seldom admit the former) * You don't even know the right terms to start searching * You lack understanding of something too fundamental for a manpage (e.g., initrd) * The docs are downright poor
OTOH, fora are terrible: full of obsolete hints (especially in rapid-changing distros), awful S/N ratio. To me, wikis are the way to share knowledge (updatable, searchable, concise) and fora are for: * asking for pointers to that knowledge * suggesting one-off solutions * troubleshooting * tossing ideas about Once something is settled, there is no reason why a forum thread should be its repository; it irks me every time I read "use the search function, you'll find a whole thread dedicated to that".
Incidentally, I'm an Ubuntu user and many times the clearest, most comprehensive help I've found is an Arch wiki page.
That's partly because it was your first (or one of your few) programs in Perl. You likely made things more complicated than needed for lack of knowledge and experience. I've always said that Perl is a good fit for programmers who can recall dozens of "idioms" (memes), and keep their understanding of its unique semantics fresh. Things like keys %{ {map {$_=>1} @list} } (implementing unique(@list)) and internalizing that every expression is ultimately evaluated as a list. Some are silly, but there's little argument about its expressiveness and flexibility.
And the other one is named Deimos (terror); thus he was making a deliberate reference to the Martian moons. Deimos and Phobos are both sons of Ares (Mars), which explains the choice.
Was it any different in, say, the Middle Ages, maybe worse?
Stop blaming TV for human nature, specifically conformism in this case.
Actually that was a poor explanation on my part; I meant "the scalar foo" and "the array foo" but mentally I pronounce them as "dollar foo" and "at foo". The sigil is not really a part of the name but a type indicator for the expression, and the actual storage accessed for an identifier is inferred from the way it's used (e.g. the brackets). More here: http://slashdot.org/comments.pl?sid=3415413&cid=42726695
I'm really curious about Perl 6; it will take some (un-)learning and I'm not whether it can succeed among Python, Ruby, and Perl 5 (I doubt that legacy code can simply be reused).
Yup, that was inaccurate; I came up with it only to tell Viol8 (599362) that the sigils are not there just for fun. I wrote a better-thought explanation in another post for someone who already knows Perl:
Sorry, the 'sigil part of the name' explanation only meant that in my head there's a foo array and a foo scalar. As I understand it, the sigil is a type indicator for the expression and which object is accessed is 'inferred'. The messier ones demonstrate it more "clearly" (!), e.g. those where you enclose everything in %( ).
So @foo{('curly','larry','moe')} actually means something like "the list of values resulting from looking up ('curly', 'larry', 'moe') in some hash foo (implied by the { })"; it will throw an error or warning if there is no hash foo to apply the { } to. The same way, @foo means "a list of values from foo", so there had better be an array named foo.
Maybe a real Perl monk will correct me. A few concepts in Perl are peculiar, like "every expression ultimately yields a flat list", and references, but Perl is a language for the long run and you get used to them.
Sorry, the 'sigil part of the name' explanation only meant that in my head there's a foo array and a foo scalar. As I understand it, the sigil is a type indicator for the expression and which object is accessed is 'inferred'. The messier ones demonstrate it more "clearly" (!), e.g. those where you enclose everything in %( ).
Maybe Perl 6 should be called something else. For what I know it's different enough from Perl 5 to require rewriting code, but OTOH that may decrease resistance to adoption among PHBs ("so it's a new version, right?") and it may sound like "venerable, proven language updated". If it ever comes out.
Not to someone who already knows Perl, because by the time he sees that he's already familiar with $foo, @foo, $foo[2] (third element in @foo), %foo, $foo{'bar'} (value stored in %foo under 'bar'), though it IS bad form. Yes, it's not for the casual observer and *really* messy code can be written, but good style helps a lot.
$foo is one (scalar) variable, which is not the same as @foo (array), and %foo (hash) and foo (file handle), which can coexist without interference, and no Perl programmer will be confused by that (we actually think of the sigil as *part* of the name, as in "dollar foo" and "percent foo"). So it's not redundant syntax, which Perl avoids like the plague.
They're also there to ensure that you're getting the right kind of value when you build an expression, like @stooges = @people{('curly','larry','moe')} (stooges is an array, people is a hash). That is the kind of compact syntax that makes it popular as opposed to iterating over the keys to add the values to the array.
consider their debt to society paid when they have served their sentence. In civilized societies
That's a concept that never made sense to me. How is sitting in jail "paying" or redressing the damage? Dissuasive punishment in some cases, preventive reeducation in some others, but sure nobody's getting compensated beyond some ill talionic reward.
Killing them is a sharper example of this futile sense of "justice", beside making that society less civilized.
http://en.wikipedia.org/wiki/FOS (see Science)
Wikipedia is best for acronyms
Or just use some level of solid compression and the problem solves itself.
I know this is an old peeve, but still: this story is about kids drugging parents to get $THING. Is it on /. only because $THING == Internet?
You may find consolation in a half-liter being slightly more :-)
In the UK it doesn't matter since they held onto their pint and standardized the hell out of it: http://en.wikipedia.org/wiki/Pint_glass#United_Kingdom_law
He meant ms-dos, and don't call him Shirley.
I'm surprised it was up for a full 3 minutes.
Must... resist...
That's what SHE said!
Sorry, had to.
The Atlantic: Bad software runs the World
Textbook code is meant to illustrate only the thing being discussed. A book would be less readable if every snippet contained the proper boilerplate for exception handling, pre-execution checks, malloc+free tracking, etc... That's usually covered in separate sections, and the professional coder should be aware of the need even if K&R didn't lecture him on it.
My general approach is googling until I get a hang of the concepts and terms. Then I can make more efficient queries, and if that fails I'm better equipped to ask the right questions in a forum / IRC channel (desperate measure).
My big peeve with browsing/searching forums is that the answer may lie in post #xxx of any of several threads, buried in chatter, missed shots and solutions that no longer apply.
If you had, you'd know that he's against about discriminatory data caps, such as "150 GB on anything but our [partner's] streaming video services":
“A covered internet service provider may not, for purposes of measuring data usage or otherwise, provide preferential treatment of data that is based on the source or the content of the data,” (.pdf) Wyden’s bill reads.
It goes further to question data caps in general, but that's a pricing scheme and has nothing to do with neutrality.
The only way I know is typing HTML entities: ...
< FILE
Thanks. Looks like a StackExchange clone, which should show up along with the dozens of other sites (LinuxQuestions, $DISTRO-forums, $DISTRO-wiki, *-HQ ...) in a Google search.
Only in scripts, for clarity in a read loop:
... several lines ... more lines
cat FILE | while read LINE; do
#
#
done
As opposed to putting the input file at the end.
If it's just piped commands, a lovely idiom is
...| ... [> outfile]
< infile grep foo | sed s/bar/baz/ |
apropos is usually equivalent to 'man -k' - search the short descriptions of all commands. 'man -K' searches the bodies of all manpages (yup, slow), and none account for synonyms or subtleties like "filesystem" vs "file system". That makes Google a nice choice, especially since most likely someone has gone through the same before; filtering by date and refining with extra words and exclusions helps the toughest cases.
Asking in a forum. Some answers will only point you to the manpage, but likely someone will give you a pre-chewed answer. Not much actual learning, but certainly easier.
That approach falls short when:
* You don't know *what* program does what you need ("man -k" and "apt-cache search" are not always helpful)
* There's a quirk / unexpected behaviour / bug (man pages seldom admit the former)
* You don't even know the right terms to start searching
* You lack understanding of something too fundamental for a manpage (e.g., initrd)
* The docs are downright poor
OTOH, fora are terrible: full of obsolete hints (especially in rapid-changing distros), awful S/N ratio. To me, wikis are the way to share knowledge (updatable, searchable, concise) and fora are for:
* asking for pointers to that knowledge
* suggesting one-off solutions
* troubleshooting
* tossing ideas about
Once something is settled, there is no reason why a forum thread should be its repository; it irks me every time I read "use the search function, you'll find a whole thread dedicated to that".
Incidentally, I'm an Ubuntu user and many times the clearest, most comprehensive help I've found is an Arch wiki page.
That's partly because it was your first (or one of your few) programs in Perl. You likely made things more complicated than needed for lack of knowledge and experience.
I've always said that Perl is a good fit for programmers who can recall dozens of "idioms" (memes), and keep their understanding of its unique semantics fresh. Things like keys %{ {map {$_=>1} @list} } (implementing unique(@list)) and internalizing that every expression is ultimately evaluated as a list. Some are silly, but there's little argument about its expressiveness and flexibility.