Talk:Rosetta Code/Rank languages by popularity: Difference between revisions

Content added Content deleted
(racket error?)
Line 574: Line 574:


</pre>
</pre>

== Racket code breaking ==

When I try to run the Racket code locally I get:

<pre>
substring: starting index is out of range
starting index: 9
valid range: [0, 4]
string: "Xojo"
</pre>

.. which seems to be due to [[Xojo]] appearing in [[Category:ProgrammingLanguages]] without the "Category" prefix. I'm not sure if this should be corrected in the page, in the Racket code or elsewhere.

FWIW, the Tcl solution uses <tt>regsub {^Category:} $name {}</tt> to get rid of the prefix, which seems safer than dropping the first 9 chars. I suggest Racket either do the same, or skip entries it cannot parse.