Template talk:Convert/Archive December 2007

message: Please can the template be updated to permit commas in the numerical field. This would:
* make it simpler for manual cut and paste
* make script coding a lot simpler
* make the raw edit text marginally easier to read
* make the raw edit text more consistent with the output text
Thanks Lightmouse 14:24, 2 December 2007 (UTC)
replies: text: I'm afraid I don't think that that's possible.  Include the commas and the number is no longer recognised as such. --Jɪmp 14:57, 2 December 2007 (UTC)
replies: text: The only thing I can think of would be to comment the commas out, e.g.  (which still gives ).  It doesn't achieve all of your aims, of course. --Jɪmp 17:51, 3 December 2007 (UTC)
replies: text: OK. I will continue to remove commas before pasting. Thanks for the response. Lightmouse 19:00, 3 December 2007 (UTC)

text: 06-Dec-2007: The template/language processing in December 2007 is still handled by MediaWiki version 1.6, which has no parser functions to look inside a numeric field.  Wikipedia is based on MediaWiki 1.6 software which is, unfortunately, still a beta-level technology, somewhat at the level of stub articles which still have spelling/grammar errors.  Like stub articles drafted by novices, the MediaWiki 1.6 language is NOT at the level of computer-language technology developed 30 or 40 years ago: it cannot "substring" values to check for commas, and it does not allow local variables to be defined in a template, even though both options would be trivial to implement, even by a college freshman.  Because other computer-language technology today is very advanced, a revolution in Wikipedia software might happen within a few years, if experienced computer scientists work on the MediaWiki software.  The current MediaWiki 1.6 software is very primitive: it doesn't even allow a trivial search-and-replace when editing an article, and such string-substitution can be implemented in less than 3,000 lines of computer program code, with "undo" treated as multiple inserts. Anyway, thank you for your patience in tolerating today's limited Wikipedia software.  -Wikid77 (talk) 14:32, 6 December 2007 (UTC)
replies: text: I have found a crude work around. I let the script copy and paste the numerical value including the commas. Then I search for convert templates containing commas and fix them. It is ugly but seems to work. Lightmouse (talk) 17:29, 6 December 2007 (UTC)
thread_title:  Feature request: commas in numerical field 

message: 06-Dec-2007: I have changed the documentation subpage in Purpose and Usage to clearly mention "optional abbreviation or slash" along with "optional U.S. spellings or hyphenation" to quickly alert users to the wider range of capability.  It seemed obvious that the spelling of "metres" might quickly deter U.S. users unless also mentioning "optional U.S. spellings" (also the issue of being "quickly deterred" might itself be a concern in some parts of the U.S. rather than worldwide).  The Notes section now briefly summarizes options as "abbreviated units (abbr=on), or U.S. spellings (sp=us for "meter"), or slash separation (disp=slash), or hyphenation (adj=on)" for similar rapid information. As major options are implemented, the documentation should probably also reflect those in a succinct manner. -Wikid77 (talk) 13:00, 6 December 2007 (UTC)
thread_title: Summarized optional parameters in doc

message: 06-Dec-2007: Because implementation is handled by selecting a few small subtemplates, very little is used of the overall template-processing resources (in the MediaWiki 1.6 language).  In the rare event that template resources are exhausted, the message "Template:Convert" has appeared, repeated for each instance of the template:
:::Template:ConvertTemplate:ConvertTemplate:ConvertTemplate:Convert
:::Template:ConvertTemplate:ConvertTemplate:ConvertTemplate:Convert
However, the source of the problem is likely to be another, somewhat large, template used on the same page, which has exceeded template resources.  With most large templates, even used several times on a page, the Convert template can still be used over 150 times per page. -Wikid77 (talk) 13:50, 6 December 2007 (UTC)
thread_title: Anomaly/error conditions

message: 06-Dec-2007: The issue of limited template-processing resources (although a very-huge limit) occurs in the MediaWiki 1.6 template/parser language: it might not be such a problem in some future release, probably beyond MediaWiki 1.8.2.  The problem also involves the infamous noinclude-tag ("<noinclude>") which is implemented, internally, to actually do the exact opposite and include the skipped text within the template-processing buffers.  The included noinclude text, such as "Category:" links and interwiki language links accumulates in the template buffers to allow error-traceback linked to that text. When a template is invoked 100 times, then 100 copies of that noinclude Category/ interwiki text are stored in the processing buffers: the only reason it doesn't typically matter is that the template-processing buffers are absolutely, phenomenally huge (perhaps over 1.5 megabytes or 1536kb or over 24,000 lines of accumulated template text) for a single page.
The accumulation problem is related to the concept of a "memory leak" because each time a template is invoked, resources are eroded, and there is less buffer memory for processing the next template.  Thinking of an article page as a template-expansion buffer is an analogy that illustrates the processing: rather than process templates serially, and accumulate only the results of expressions or if-statement logic, consider the page buffer as an expansion of all templates, all at once, until the entire page buffer is "de-templated" as a giant glob of inline text.  In that analogy, all templates, as invoked, are duplicated umpteen times, repeating all if-statements and Category/interwiki links, over and over across the entire page buffer.  There is a limit to that.
When space is critical, in a utility template used over 200 times, avoid Category-link and interwiki links, which should be moved to the "/doc" subfile, not included in the actual template as "noinclude" text: it is included during internal processing.
The hope for the future, from computer science, is that future versions of the MediaWiki language might process templates in serial fashion, deallocating intermediate space when a nested template is finished, and truly "nonincluding" the "<noinclude>" text as being totally omitted from the internal buffers.  The current processing, however, is basically expanding each and every template (including noinclude-tag text) as a flat-text file into the template-processing buffers.
For those reasons, in MediaWiki 1.6, there is a limit to how many times template Convert can be invoked on one page, but the limit is over 300 times. -Wikid77 (talk) 13:50, 6 December 2007 (UTC)
thread_title: Limited template resources

message: Is there a bot available that could search articles and replace 'auto' conversion templates with this one where there is duplication? Lightmouse (talk) 15:05, 7 December 2007 (UTC)
replies: text: Mine should be able to do that, but it will be a while before I could/can program it.  —MJCdetroit (talk) 16:03, 7 December 2007 (UTC)
replies: text: OK. Clearly it is not urgent. It is merely on the wishlist. Thanks. Lightmouse (talk) 16:06, 7 December 2007 (UTC)
replies: text: Mark those templates as deprecated with —MJCdetroit (talk) 16:19, 7 December 2007 (UTC)
replies: text: Hold off on  for the moment. --Jɪmp 20:13, 7 December 2007 (UTC)
replies: text: I don't agree with doing that for any of them without discussion. Certainly not without discussion of it on those template pages. I don't recall the editors creating this template being given any mandate in this regard, nor for issueing a different implementation.  Gene Nygaard (talk) 18:55, 12 December 2007 (UTC)
thread_title:  Eliminating duplicate 'auto' conversion templates 

message: I have used this template to add a conversion to the St Albans article. However, I am slightly concerned that the output appears as 750 metres (820 yd). I believe the singular yd makes this look slightly odd. How do I change this to the plural yds (or yards) using this template? Andrew (My talk) 20:13, 10 December 2007 (UTC)
replies: text: You can't.  At least not that I'm aware of.  The reason that it is 'yd' and not 'yds' is because that is what the Manual of style's section on Units says to do.  That point in the MOSNUM is not likely to change anytime soon.  If it still bothers you, then maybe you can switch the order to  as most of the article is already imperial (metric).  —MJCdetroit (talk) 21:16, 10 December 2007 (UTC)
replies: text: Okay, thanks for your help. Andrew (My talk) 23:28, 10 December 2007 (UTC)
replies: text: No, you can't.  Of course, it would be a simple matter to make this an option but since it's against the MoS, I won't.  If you're changing the order, why use   at all?  Instead, just type it out longhand and with a footnote stating that the metric value was the original (if this is the case). Jɪmp 23:37, 10 December 2007 (UTC)
replies: text: Don't be switching the orders willy-nilly either.  Generally, the original measurement should come first. Gene Nygaard (talk) 18:59, 12 December 2007 (UTC)
replies: text: No. Jɪmp 20:21, 12 December 2007 (UTC)
thread_title:  Pluralisation 

message: CHain would be usefull for railways and Fathom for ships.--Kitchen Knife (talk) 13:43, 12 December 2007 (UTC)
replies: text: So much so they are already done.--Kitchen Knife (talk) 13:46, 12 December 2007 (UTC)
replies: text: Yep, they're all there.  Fathoms had been missing from the list. Jɪmp 20:23, 12 December 2007 (UTC)
thread_title: [[Chain (unit)|Chains]], [[Rod (length)|Rod]]s and Perches + [[Fathom]]