Re: pluralization idea that keeps bugging me

2008-02-10 Thread Richard Hainsworth
Brandon S. Allbery KF8NH wrote: On Feb 9, 2008, at 11:43 , Richard Hainsworth wrote: I posted an idea about pluralisation could be handled in a way that would not be English-centric (Subject: interpolation contextualisation). There were no responses to the idea. Was it so bad? Did no one

Re: pluralization idea that keeps bugging me

2008-02-10 Thread Ryan Richter
On Sun, Feb 10, 2008 at 12:56:14PM +0300, Richard Hainsworth wrote: How - in sketch form - would I go about creating a module to do what I suggest? I am not suggesting someone writes a module I have suggested, but the barebones steps to creating a new metacharacter. I have written infix

Re: pluralization idea that keeps bugging me

2008-02-09 Thread Richard Hainsworth
Warnocked! I posted an idea about pluralisation could be handled in a way that would not be English-centric (Subject: interpolation contextualisation). There were no responses to the idea. Was it so bad? Did no one see it? Was it too un-perlish? Was the title too horrible? The basic idea

Re: pluralization idea that keeps bugging me

2008-02-09 Thread Fagyal Csongor
Hi, Warnocked! Indeed :) I posted an idea about pluralisation could be handled in a way that would not be English-centric (Subject: interpolation contextualisation). There were no responses to the idea. Was it so bad? Did no one see it? Was it too un-perlish? Was the title too horrible?

Re: pluralization idea that keeps bugging me

2008-02-09 Thread Brandon S. Allbery KF8NH
On Feb 9, 2008, at 11:43 , Richard Hainsworth wrote: I posted an idea about pluralisation could be handled in a way that would not be English-centric (Subject: interpolation contextualisation). There were no responses to the idea. Was it so bad? Did no one see it? Was it too un-perlish?

Re: pluralization idea that keeps bugging me

2008-01-31 Thread David Green
On 2008-Jan-26, at 9:58 am, Larry Wall wrote: My first thought is that this is such a common idiom that we ought to have some syntactic sugar for it: say Received $m message\s. I've always wanted a magic-S (and I don't think the anglocentrism matters, because Perl is already pretty

Re: pluralization idea that keeps bugging me

2008-01-31 Thread Mark Overmeer
* David Green ([EMAIL PROTECTED]) [080131 08:48]: I've always wanted a magic-S (and I don't think the anglocentrism matters, because Perl is already pretty anglocentric -- more so than plural S's, which apply to some other languages anyway). In the good old days all computer OSes were

Re: pluralization idea that keeps bugging me

2008-01-31 Thread David Green
On 2008-Jan-31, at 2:38 am, Mark Overmeer wrote: * David Green ([EMAIL PROTECTED]) [080131 08:48]: I've always wanted a magic-S (and I don't think the anglocentrism matters In the good old days all computer OSes were anglo-centric. They are not like that anymore. But Perl still is.

Re: pluralization idea that keeps bugging me

2008-01-28 Thread Ron
On 26 Jan., 17:58, [EMAIL PROTECTED] (Larry Wall) wrote: Last night I got a message entitled: yum: 1 Updates Available. Of course, that's probably just a Python programmer giving up on doing the right thing, but we see this sort of bletcherousness all the time. After a recent exchange on

Re: pluralization idea that keeps bugging me

2008-01-27 Thread Moritz Lenz
Larry Wall wrote: Last night I got a message entitled: yum: 1 Updates Available. Of course, that's probably just a Python programmer giving up on doing the right thing, but we see this sort of bletcherousness all the time. After a recent exchange on PerlMonks about join, I've been thinking

Re: pluralization idea that keeps bugging me

2008-01-27 Thread Mark Overmeer
* Larry Wall ([EMAIL PROTECTED]) [080126 16:58]: Last night I got a message entitled: yum: 1 Updates Available. After a recent exchange on PerlMonks about join, I've been thinking about the problem of pluralization in interpolated strings, where we get things like: say Received $m

Re: pluralization idea that keeps bugging me

2008-01-27 Thread Richard Hainsworth
Perl - when I first met it - was great because it handled text easily and 'naturally'. I now use perl for everything, even when another language would probably be better. Perl6 has gone a long way to making things more universal by using UNICODE, (The difficulties of non-Latin fonts and

pluralization idea that keeps bugging me

2008-01-26 Thread Larry Wall
Last night I got a message entitled: yum: 1 Updates Available. Of course, that's probably just a Python programmer giving up on doing the right thing, but we see this sort of bletcherousness all the time. After a recent exchange on PerlMonks about join, I've been thinking about the problem of

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Amir E. Aharoni
On 26/01/2008, Larry Wall [EMAIL PROTECTED] wrote: After a recent exchange on PerlMonks about join, I've been thinking about the problem of pluralization in interpolated strings, where we get things like: say Received $m message{ 1==$m ?? '' !! 's' }. ... Any other cute ideas? No

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Jonathan Lang
Larry Wall wrote: Any other cute ideas? If you have '\s', you'll also want '\S': $n cat\s fight\S # 1 cat fights; 2 cats fight I'm not fond of the 'ox\soxen' idea; but I could get behind something like '\sox oxen' or 'ox\sen'. '\sa b' would mean 'a is singular; b is plural' '\sa' would be

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Austin Hastings
Jonathan makes an excellent point about s and S. In fact, there's probably a little language out there for this. I don't think it needs to be in the core, though. But you could put in some kind of hook mechanism, so that detecting the presence of \s or whatever caused the string to be treated

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Dr.Ruud
Jonathan Lang schreef: I'm not fond of the 'ox\soxen' idea; but I could get behind something like '\sox oxen' or 'ox\sen'. $n ox\s en $n\sone multiple no cat\s s fight\s s s ;) -- Affijn, Ruud Gewoon is een tijger.

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Fagyal Csongor
Amir E. Aharoni wrote: On 26/01/2008, Larry Wall [EMAIL PROTECTED] wrote: After a recent exchange on PerlMonks about join, I've been thinking about the problem of pluralization in interpolated strings, where we get things like: say Received $m message{ 1==$m ?? '' !! 's' }. ... Any

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Yuval Kogman
To me this sounds like use Lingua::EN::Pluralize::DSL; which would overload your grammar locally to parse strings this way. However, due to i18n reasons this should not be in the core. It might make sense to ship a slightly modernized Locale::MakeText with Perl 6 so that it can be used

Re: pluralization idea that keeps bugging me

2008-01-26 Thread chromatic
On Saturday 26 January 2008 08:58:43 Larry Wall wrote: That would cover most of the cases for English speakers using regular nouns, but I wonder whether there's some kind of generalization that would help for cases like:     say There was/were $o ox/oxen That makes me wish for a

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Darren Duncan
At 8:58 AM -0800 1/26/08, Larry Wall wrote: My first thought is that this is such a common idiom that we ought to have some syntactic sugar for it: say Received $m message\s. I don't think that a feature like this should be in the core language; it is too complicated as well as an

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Patrick R. Michaud
On Sat, Jan 26, 2008 at 08:58:43AM -0800, Larry Wall wrote: After a recent exchange on PerlMonks about join, I've been thinking about the problem of pluralization in interpolated strings, where we get things like: say Received $m message{ 1==$m ?? '' !! 's' }. My first thought is that

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Gianni Ceccarelli
On 2008-01-26 Larry Wall [EMAIL PROTECTED] wrote: Last night I got a message entitled: yum: 1 Updates Available. [snip a lot] I think that probably handles most of the Indo-European cases, and anything more complicated can revert to explicit code. (Or go though a localization dictionary...)

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Richard Hainsworth
Its only English centric if the idea is fixed to plurals, because its only for plurals where English words are mutated by grammar rules. In other languages, words are mutated by other factors, such as the gender of the word, the case, and the number. The problem can be quite difficult, say

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Jonathan Lang
Gianni Ceccarelli wrote: Please don't put this in the language. The problem is harder than it seems (there are European languages that pluralize differently on $X % 10, IIRC; 0 is singular or plural depending on the language, etc etc). -snip- I know Perl is not minimal, but sometimes I feel

Re: pluralization idea that keeps bugging me

2008-01-26 Thread jesse
On Sat, Jan 26, 2008 at 08:58:43AM -0800, Larry Wall wrote: Last night I got a message entitled: yum: 1 Updates Available. Of course, that's probably just a Python programmer giving up on doing the right thing, but we see this sort of bletcherousness all the time. Any other cute ideas?

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Jonathan Lang
Yuval Kogman wrote: You can subclass the grammar and change everything. Theoretically that's a yes =) Right. One last question: is this (i.e., extending a string's grammar) a keep simple things simple thing, or a keep difficult things doable thing? -- Jonathan Dataweaver Lang

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Yuval Kogman
On Sat, Jan 26, 2008 at 18:43:50 -0800, Jonathan Lang wrote: Right. One last question: is this (i.e., extending a string's grammar) a keep simple things simple thing, or a keep difficult things doable thing? I'm going to guess somewhere in between. It should be about the same level of

Re: pluralization idea that keeps bugging me

2008-01-26 Thread Yuval Kogman
On Sat, Jan 26, 2008 at 18:12:17 -0800, Jonathan Lang wrote: This _does_ appear to be something more suitable for a Locale:: module. I just wonder if there are enough hooks in the core to allow for an appropriately brief syntax to be introduced in a module: can one roll one's own string