User:Thundergnat: Difference between revisions
→Language Stats:: update stats table
(→Language Stats:: an apology) |
Thundergnat (talk | contribs) (→Language Stats:: update stats table) |
||
Line 38:
Note that this is purely for my own entertainment and curiosity. I strenuously want to avoid people making efforts to optimize for one metric or another. Many of these are heavily influenced by a particular stylistic choice made by a prolific entry author. None of these are good or bad. Just observations.
Comments aren't filtered out
▲Comments aren't filtered out either, so entries that have lots of comments will have higher character counts. That isn't a bad thing though. Quite the opposite in fact. The whole point of Rosettacode is to learn how different languages can accomplish the same task. Lots of comments is a good thing.
How the various metrics are calculated / what they mean. Averages are the sum of all of that item in every entry divided by the total number of tasks with an entry, rounded to the nearest integer or percentage.
Line 51 ⟶ 49:
* Average percent non-alpha-numerics - What percentage of the non-white space characters are not alphabetic or numeric? (Punctuation, symbols, etc)
* Average percent non-ASCII - What percentage of the non-white space characters are not ASCII characters?
* Syntax highlighting - What syntax highlighter does it use in order from most to least common. (Note that some variation is expected, especially for tasks like [[Call a foreign-language function]]
{|class="wikitable sortable"
|+ As of 2022-02-
!Language!!Task<br>Count!!Avg. #<br>Lines / Entry!!Avg. #<br>Characters!!Avg. %<br>White space!!Avg. %<br>Alphanumerics!!Avg. %Non<br>Alphanumerics!!Avg. %<br>Non-ASCII!!Syntax
|-
||Phix||
|-
||Wren||
|-
||Julia||
|-
||Raku||
|-
||Go||
|-
||Perl||
|-
||Nim||1398||
|-
||Python||
|-
||C||1193||78||
|-
||REXX||
|-
||Kotlin||1131||47||1363||33.21 %||77.62 %||22.38 %||0.04 %||scala kotlin Kotlin C c java HTML5
|-
||Java||
|-
||Haskell||1110||
|-
||
|-
||
|-
||Racket||1090||33||
|-
||Ruby||1087||32||824||26.23 %||76.49 %||23.51 %||0.06 %||ruby Ruby bash html5 c foo
|-
||C++||
|-
||zkl||1011||19||688||17.98 %||69.69 %||30.31 %||0.03 %||zkl c bash r
|}
Second pass through after a lot of minor patches to the site and custom syntax highlighting filtering added. Should be a lot <strike>more accurate</strike> less inaccurate now. Numbers probably still don't ''mean'' anything, but they aren't quite as large outright whoppers. J numbers are still way overstated due to the very common decision to just include the output inside the language tags rather than in a separate output section. Not really sure what if anything to do about it (if anything.) I '''''really''''' don't want to take on trying to untangle that mess. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 21:29, 13 February 2022 (UTC)
<div style="padding:1em;background:#eeeeff;"><h3>Older commentary</h3>
Some observations: Phix numbers are completely bogus due to the custom syntax highlighting code polluting every entry. Eventually I'll look into filtering. This is a very preliminary first whack at it.
I expected Raku to have a higher percent of non-ASCII characters and was very surprised by J and REXX having so much. On closer investigation, J and REXX entries make heavy use of box line drawing characters... which aren't ASCII. Syntax highlighting directives are all over the place. Case doesn't matter but spelling nominally does. Though, to be fair, most of the syntax highlighting are very minor variations, so getting it wrong probably doesn't change much. There are a whole bunch of obvious typos in there too though. Sigh. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]), 08 February
:Sorry about the Phix syntax highlighting mess. I'd love to use standard Geshi, and in fact do on my own site, but waited 6 years and nothing happened. In a lovely world there would be a special page on RC containing the geshi highlighting files for all languages, that anyone could edit in the usual way with the usual single-click to undo any vandalism, and periodically (bi-annual would be plenty) some admin pushes updates into the geshi dir. I guess you could even have a <nowiki><lang PhixRC></nowiki> mechanism whereby "release candidate" geshi updates could be tried out on selected pages without risking damaging the whole site. Alternatively it should actually be fairly straightforward for a man of your talents to html-strip the Phix entries (just sayin), and/or I'm not above being tasked to go and clean up my own mess, which one day I still hope to be able to do (trust me, I too despise my own minor updates showing up as complete gobbledeygook). I also wonder if it would be at all useful for the syntax highlighting column to contain (first/random) links to offending pages, so I could find out what page it thinks is using say "PL/1" or "Phi"? --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 10:04, 10 February 2022 (UTC)</div>
|