Re: propose renaming Hash to Dict
On Thursday 31 May 2007 17:36:40 Chas Owens wrote: Except of course those poor schmucks who foolishly wrote code like if (ref $arg eq 'HASH') { ... } I know you're teasing, but it *would* be nice to see that sort of code just magically go away. -- c
Re: propose renaming Hash to Dict
On Fri, Jun 01, 2007 at 11:44:53AM +0200, Thomas Wittek wrote: Larry Wall: Nope. Hash is mostly about meaning, and very little about implementation. Please don't assume that I name things according to Standard Names in Computer Science. I name things in English. Hash is just something that is disordered, which describes the associative array interface rather nicely, distinguishing it from the ordered Array interface. I'm not a native english speaker, but I've never heard or read the word hash outside CS. I suppose that as a non-native English speaker you've never eaten corned beef hash. I quote from Wikipedia: Hash is a mixture of beef (often leftovers of corned beef or roast beef), onions, potatoes, and spices that are mashed together into a coarse, chunky paste, and then cooked, either alone, or with other ingredients. It's a bit of a working-class dish, for using up your leftovers, so not the sort of thing you'd eat as a tourist, but it seems many other countries have the same sort of thing: using your leftovers is a pretty universal need. In colloquial English there's also the expression, to make a hash of something, which means to make a mess of it, to screw up. That said, the dish and the idiom are both dying out, and the current generation of school leavers might not have heard of either. I didn't make the connection until Larry described it as being disordered. As a general point, I think it's pretty easy to make a mental distinction between a 5ish hash and a hashtable, just as it's easy to remember that 5's abstracted lists and arrays aren't the same concepts as linked lists and C-style concrete arrays. -- It must be accepted as a principle that the rifle, effective as it is, cannot replace the effect produced by the speed of the horse, the magnetism of the charge, and the terror of cold steel. -- British Cavalry training manual, 1907 ::: http://surreal.istic.org/ signature.asc Description: Digital signature
Re: propose renaming Hash to Dict
On 6/1/07, Larry Wall [EMAIL PROTECTED] wrote: Nope. Hash is mostly about meaning, and very little about implementation. Please don't assume that I name things according to Standard Names in Computer Science. I name things in English. Then why did we need a separate use English pragma? :) Are you the one who originally came up with hash for %vars? IIRC, they were officially called just associative arrays through Perl4, but hash was a well-understood community nickname for them for some time before you canonized it with ref($var) eq 'HASH' in Perl5... -- Mark J. Reed [EMAIL PROTECTED]
Re: propose renaming Hash to Dict
Larry Wall: Nope. Hash is mostly about meaning, and very little about implementation. Please don't assume that I name things according to Standard Names in Computer Science. I name things in English. Hash is just something that is disordered, which describes the associative array interface rather nicely, distinguishing it from the ordered Array interface. Hm, but with which would you explain a hash in plain english? What would be the closest equivalents in the real world? I'm not a native english speaker, but I've never heard or read the word hash outside CS. I guess this ones are close: - collection (contra: doesn't imply the access to an item) - dictionary (contra: might be assumed ordered) - directory (contra: might be assumed ordered, clashes with a file directory) - index (contra: might be assumed ordered, might be too technical) The problem with the implication of an order in the real world concepts is that you probably won't find one that isn't ordered. Those things allow us to find something easily by a word. But as we first have to find that word, we have an ordered list of the words... So there is no perfect candidate in the above list. But in my opinion they are still more english than hash. Additionally I believe it would be easier to learn that it's (e.g.) a dictionary that just is not ordered than learning a whole new word like a hash (which it was for me as a non-native english speaker). -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED]
Re: propose renaming Hash to Dict
Let's not forget that the CS meaning of hash didn't spring forth fully-formed from the skull of Donald Knuth or anything. A hash function is so called because it makes a hash of the inputs. That is, its output, while deterministic, is at first glance a random rearrangement of the inputs. Hence, a hash. -- Mark J. Reed [EMAIL PROTECTED]
Re: propose renaming Hash to Dict
On Jun 1, 2007, at 5:44 , Thomas Wittek wrote: Larry Wall: Nope. Hash is mostly about meaning, and very little about implementation. Please don't assume that I name things according to Standard Names in Computer Science. I name things in English. Hash is just something that is disordered, which describes the associative array interface rather nicely, distinguishing it from the ordered Array interface. Hm, but with which would you explain a hash in plain english? What would be the closest equivalents in the real world? ...make a hash of things (meaning, a mess) corned beef hash -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED] system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED] electrical and computer engineering, carnegie mellon universityKF8NH
Re: propose renaming Hash to Dict
On Fri, Jun 01, 2007 at 07:07:06AM -0400, Brandon S. Allbery KF8NH wrote: On Jun 1, 2007, at 5:44 , Thomas Wittek wrote: Larry Wall: Nope. Hash is mostly about meaning, and very little about implementation. Please don't assume that I name things according to Standard Names in Computer Science. I name things in English. Hash is just something that is disordered, which describes the associative array interface rather nicely, distinguishing it from the ordered Array interface. Hm, but with which would you explain a hash in plain english? What would be the closest equivalents in the real world? ...make a hash of things (meaning, a mess) corned beef hash That's two people that have given the same list, but both have omitted the more common (in modern times) phrase hash browned potatos which is a hash of chopped potato, onion, and sometimetimes other things fried brown. I'll ignore the McDonald's version which hashes together just the potatos, since a collective of a single element is still a collective mathematically, but not usually considered so linguistically unless you've got a big enough advertising budget to pull it off. --
Re: propose renaming Hash to Dict
On Fri, Jun 01, 2007 at 10:30:08AM -0400, John Macdonald wrote: ...make a hash of things (meaning, a mess) corned beef hash That's two people that have given the same list, but both have omitted the more common (in modern times) phrase hash browned potatos which is a hash of chopped potato, onion, and sometimetimes other things fried brown. Well, I have eaten hash browns on many occasions, but in my mind they just don't have the same association with a disordered mess, as they are served as discrete units rather than a mass. But let's stop talking about food now. -- There once was a teacher of great renown, Gather your goods Whose words were like the tablets of stone,and follow me Because it's easier to learn than unlearn, Or you will surely die. Because we've passed the point of no return. Paul Simon, 'The Teacher' signature.asc Description: Digital signature
Re: propose renaming Hash to Dict
Daniel Hulme: Larry Wall: I name things in English. Hash is just something that is disordered I'm not a native english speaker, but I've never heard or read the word hash outside CS. you've never eaten corned beef hash. To conclude, as hash definitely tastes better than a dictionary, we should stick to that name. ;) At least nobody can say that Perl is bad taste! -- Thomas Wittek http://gedankenkonstrukt.de/ Jabber: [EMAIL PROTECTED]
Re: propose renaming Hash to Dict
On Fri, Jun 01, 2007 at 06:05:58PM +0200, Thomas Wittek wrote: : Daniel Hulme: : Larry Wall: : I name things in English. Hash is just something that is disordered : : I'm not a native english speaker, but I've never heard or read the word : hash outside CS. : : you've never eaten corned beef hash. : : To conclude, as hash definitely tastes better than a dictionary, we : should stick to that name. ;) : : At least nobody can say that Perl is bad taste! Then maybe we should rename Array to Skewer or Kabob or some such... Hmm, except it's hard to random access the middle... Maybe AntsOnALog... (celery, cream cheese/peanut butter, and raisins) Larry
Re: propose renaming Hash to Dict
On Fri, Jun 01, 2007 at 06:52:37AM -0400, Mark J. Reed wrote: : On 6/1/07, Larry Wall [EMAIL PROTECTED] wrote: : Nope. Hash is mostly about meaning, and very little about implementation. : Please don't assume that I name things according to Standard Names in : Computer Science. I name things in English. : : Then why did we need a separate use English pragma? :) We needed use English because I was temporarily drawn to the shell side of the Force. I have repented. : Are you the one who originally came up with hash for %vars? IIRC, : they were officially called just associative arrays through Perl4, : but hash was a well-understood community nickname for them for some : time before you canonized it with ref($var) eq 'HASH' in Perl5... Yes, I believe I was the one who decided that associative arrays needed a shorter name, and after a period of discussion on perl5-porters, settled on hash as the new technical term in Perl culture. But I'm not sure the mailing list archive goes back far enough to verify the exact sequence of events. Certainly I made the final decision, but it's quite possible someone else suggested it first. But I seem to recall getting extremely tired of typing associative array while working on Camel II, and that was likely the instigation. Larry
Re: propose renaming Hash to Dict
At 09:15 -0700 6/1/07, Larry Wall wrote: : To conclude, as hash definitely tastes better than a dictionary, we : should stick to that name. ;) : : At least nobody can say that Perl is bad taste! Then maybe we should rename Array to Skewer or Kabob or some such... Hmm, except it's hard to random access the middle... Maybe AntsOnALog... (celery, cream cheese/peanut butter, and raisins) Since Larry started it: Don't forget that a common form of hash as a food is SPAM in all capitals. Perhaps perl6 could get special dispensation from Hormel. -- -- From the U S of A, the only socialist country that refuses to admit it. --
[svn:perl6-synopsis] r14412 - doc/trunk/design/syn
Author: larry Date: Fri Jun 1 12:44:27 2007 New Revision: 14412 Modified: doc/trunk/design/syn/S06.pod Log: note that parsed/reparsed also influences whether trailing bracket is assumed Modified: doc/trunk/design/syn/S06.pod == --- doc/trunk/design/syn/S06.pod(original) +++ doc/trunk/design/syn/S06.podFri Jun 1 12:44:27 2007 @@ -13,9 +13,9 @@ Maintainer: Larry Wall [EMAIL PROTECTED] Date: 21 Mar 2003 - Last Modified: 30 May 2007 + Last Modified: 1 Jun 2007 Number: 6 - Version: 86 + Version: 87 This document summarizes Apocalypse 6, which covers subroutines and the @@ -1467,14 +1467,17 @@ =item Cis parsed Specifies the subrule by which a macro call is parsed. The parse -always starts after the macro's initial token. +always starts after the macro's initial token. If the operator has +two parts (circumfix or postcircumfix), the final token is also automatically +matched, and should not be matched by the supplied regex. =item Cis reparsed Also specifies the subrule by which a macro call is parsed, but restarts the parse before the macro's initial token, usually because you want to parse using an existing rule that expects to traverse the initial -token. +token. If the operator has two parts (circumfix or postcircumfix), the +final token must also be explicitly matched by the supplied regex. =item Cis cached
Re: propose renaming Hash to Dict
On 6/1/07, Doug McNutt [EMAIL PROTECTED] wrote: At 09:15 -0700 6/1/07, Larry Wall wrote: : To conclude, as hash definitely tastes better than a dictionary, we : should stick to that name. ;) : : At least nobody can say that Perl is bad taste! Then maybe we should rename Array to Skewer or Kabob or some such... Hmm, except it's hard to random access the middle... Maybe AntsOnALog... (celery, cream cheese/peanut butter, and raisins) Since Larry started it: Don't forget that a common form of hash as a food is SPAM in all capitals. Perhaps perl6 could get special dispensation from Hormel. -- -- From the U S of A, the only socialist country that refuses to admit it. -- That is just not kosher.
Re: propose renaming Hash to Dict
John Macdonald schreef: hash browned potatos which is a hash of chopped potato, onion, and sometimetimes other things fried brown. That comes from the French haché, meaning chopped. Best with lots of small pieces of beef in it as well. -- Groet, Ruud
Re: propose renaming Hash to Dict
On 6/1/07, Ruud H.G. van Tol [EMAIL PROTECTED] wrote: John Macdonald schreef: hash browned potatos which is a hash of chopped potato, onion, and sometimetimes other things fried brown. It's usually hash browns or hashed browns, and I've always assumed the former to be a shortened form of the latter. That comes from the French haché, meaning chopped. ...the past participle of hachier, which is literally to axe, from hache axe. Ultimately, yes, the English word hash comes from the French hache, but you have to go back to Norman times to get there. The word hash has been an English word for almost a millennium, and hashed browns are simply browns (browned potatoes) that have been hashed... -- Mark J. Reed [EMAIL PROTECTED]