Thundergnat

Joined 24 August 2022
m
→‎Utilities I Wrote:: Update "language links" tapermonkey script to deal with new (Mediawiki 1.39) page title formatting
m (→‎Language Stats:: is there an echo in here?)
m (→‎Utilities I Wrote:: Update "language links" tapermonkey script to deal with new (Mediawiki 1.39) page title formatting)
 
(22 intermediate revisions by the same user not shown)
Line 11:
 
 
==Syntax highlighting and CSS guide==
==Reports:==
;* [[User:Thundergnat/Syntax_highlighting_and_CSS|Short guide to Rosetta Code syntax highlighting and CSS customization that I wrote]]
 
 
==Reports I Generate:==
;*[[Rosetta_Code/Rank_languages_by_popularity/Full_list|Rank languages by popularity]]
;*[[Rosetta_Code/List_authors_of_task_descriptions/Full_list|List authors of task descriptions]]
Line 21 ⟶ 25:
 
 
==Utilities I Wrote:==
'''[https://www.tampermonkey.net/ Tampermonkey]''' or '''[https://www.greasespot.net/ Greasemonkey]''' javascript applets
 
;* [https://gist.github.com/thundergnat/c5a86a6d5e0018ac67bdea3fc48786a0#file-language_links-user-js Add language parameters to Category task entry links] - See [[Rosetta_Code:Village_Pump/Add_link_anchors_to_Language_Category_pages|this Village Pump page]] for details. Presently @ version 0.78 (20212023/0601/1622)
;* [https://gist.github.com/thundergnat/5f7f36dc0cf303b110f6d7c6275fbb85#file-toggle_syntax_highlighting-user-js Syntax highlighting toggle] Toggle the task syntax highlighting off and on. Presently @ version 0.12 (20212022/0608/1022)
 
==Resources I Host:==
 
==Resources:==
;*[https://github.com/thundergnat/rc/tree/master Offsite repository of resource files for various tasks]
 
Line 44 ⟶ 47:
* Task count - The number of tasks for which there is an entry in that language.
* Average lines per entry - The average number of lines in code blocks per entry. Multiple versions under the same task all count as lines per task. (If there are four versions and each has 25 lines, it counts as 100 for that task.)
* Average number of charactercharacters - Average number of characters inside <nowiki><lang *></lang></nowiki> blocks per task including whitespace.
* Average whitespace - How many of the above characters are white space? (Including new line characters.)
* Average percent alpha-numerics - What percentage of the non-white space characters are alphabetic or numeric?
* 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.; the highlighting specifier with how many times it was seen (in parenthesis). Note that some variation is expected, especially for tasks like [[Call a foreign-language function]], [[Rosetta Code/Find bare lang tags]] or probably the largest source of oddball <nowiki><lang *></nowiki>markup tags: [[Rosetta Code/Fix_code_tags]].) In general, Pygments expects the lexer name to be all lower case.
 
{|class="wikitable sortable"
|+ As of 2022-0209-1311
!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<br>highlighting
|-
||PhixWren||15071571||5357||16951646||3231.6954 %||7875.3586 %||2124.6514 %||0.0309 %||Phixecmascript(1638) html5c(65) csharpgo(14) cjavascript(8) rpython(2) phixxml(2) javascriptAutoHotkey(1) bash(1) perl(1) text(1)
|-
||WrenPhix||14991570||55||15781782||3132.5669 %||7578.7327 %||2421.2773 %||0.104 %||ecmascriptphix(1922) c goPhix(7) javascript C foo bar xml bash python baz(1)
|-
||Julia||14791538||3334||9761011||27.8291 %||77.121 %||22.979 %||0.27 %||julia(1817) text(4) Julia python(3) ruby(3) html5(2) luacpp(1) html(1) cpplua(1) xml(1)
|-
||Raku||14611518||30||885895||28.8778 %||69.3135 %||30.6965 %||0.5759 %||perl6raku(1958) Ctext(7) bash(4) c shell(4) xml(2) html(1) XMLrust(1) bashshell(1)
|-
||Go||14551497||7776||18211809||34.4256 %||75.2723 %||24.7377 %||0.111 %||go Go(1924) html(5) text(3) bash(2) c(2) xml(2) thriftecmascript(1) protofuturebasic(1) html5(1) proto(1) thrift(1)
|-
||Perl||14281473||34||920925||27.0402 %||68.1817 %||31.8283 %||0.1 %||perl(2047) Perltext(12) bash(5) Shellshell(2) c(1) html5(1) latex(1) cPerl(1)
|-
||NimPython||13981406||4872||13262017||2430.6584 %||75.5256 %||24.4844 %||10.1204 %||Nim nim python(2669) Pythontext(13) bash(5) rubyhtml5(5) c(2) Ccmd(2) Nimrodpython3(2) $AutoHotkey(1) ebnf(1) perl(1) Python(1) qb64(1) shell(1) xml(1)
|-
||PythonNim||13431402||7148||19961332||3024.7264 %||75.4752 %||24.5348 %||01.0412 %||pythonnim(1599) Pythontext(10) bashpython(8) html5c(4) cmdNim(3) cruby(3) python3nimrod(1) xml ebnf Shell(1)
|-
||CJ||11931275||7828||1841780||2826.6493 %||7269.5673 %||30.27.44 %||06.0153 %||cj(2986) Ctext(48) cppJ(11) bash(7) XMLc(4) gosh(4) Shell perlbnf(1) html5(1) shmake(1) Assemblypython(1) makesnusp(1) dxml(1)
|-
||REXXC||11441215||5579||33581873||4028.3376 %||6872.4462 %||3127.5638 %||80.4801 %||rexxc(1656) REXXtext(48) Rexxcpp(11) cobolbash(6) C(2) xml(2) assembly(1) cafe(1) d(1) go(1) html5(1) make(1) perl(1) sh(1) shell(1)
|-
||KotlinMathematica||11311177||4712||1363422||3317.2156 %||7770.6277 %||2229.3823 %||0.04 %||scala kotlin Kotlin C cmathematica(1485) javatext(35) HTML5Mathematica(8) html5wolfram Groovylanguage(2) groovymathematica scheme(1) xmlsh(1)
|-
||JavaREXX||11241146||6656||20623373||40.33.41 %||7868.5647 %||2131.4453 %||08.0145 %||java java5 Java Java5 c xml bash html5 foo make cmd Java8 barrexx(1766) javatext(11) 12cobol(1) shellsh(1)
|-
||Haskell||11101138||4445||13471355||28.34 %||76.9284 %||23.0816 %||0.08 %||haskell(2089) Haskelltext(7) bash(3) textHaskell(3) c(1) html5(1) sh(1)
|-
||JJava||11091138||2666||7452077||2633.8252 %||6978.4956 %||3021.5144 %||60.4501 %||jjava(1273) Jjava5(223) bash shtext(6) c(4) foobash(3) %shtml5(3) xml(3) html5Java(2) java8(2) make(2) bnfcmd(1) Cjava bar12(1) SNUSPpython(1) bazshell(1)
|-
||MathematicaKotlin||11061132||1147||4091365||1733.5221 %||7077.7261 %||2922.2839 %||0.0403 %||Mathematicascala(1110) mathematicakotlin(61) fooc(4) bazgroovy(2) "~~html5(2) x~~"scheme(2) barjava(1) barf shxml(1)
|-
||RacketC++||10901115||3373||11171973||2629.4727 %||7572.0571 %||2427.9529 %||0.2902 %||racketcpp(1511) Racketc++(14) schemec(8) bashtext(4) xmlsh(3) html5(2) Casm(1) bash(1) cmake(1) d(1) cmdmake(1)
|-
||Ruby||10871103||32||824832||26.2318 %||76.49 %||23.51 %||0.06 %||ruby Ruby(1588) bash(4) c(2) html5(2) cRuby(2) foo bazrust(1) tcl(1) bar rusttext(1)
|-
||C++Racket||10701089||7334||19901155||2926.2348 %||7275.6808 %||2724.3292 %||0.0229 %||cppracket(1343) Cppscheme(18) C++text(9) c CPPbash(1) c++(1) shcmd(1) html5(1) make asm cmake text bash d Cxml(1)
|-
||zklFreeBASIC||10111073||1947||6881232||1730.9887 %||6982.6941 %||3017.3159 %||0.03 %||zklfreebasic(1128) cbasic(2) bashqbasic(2) rc(1) csharptext(1) html5zxbasic(1)
|-
||zkl||1011||19||688||17.98 %||69.69 %||30.31 %||0.03 %||zkl(1728) bash(2) c(2) html5(1)
|-
||Sidef||1003||22||545||30.82 %||70.18 %||29.82 %||0.45 %||ruby(1251) sidef(4) shell(2) html5(1)
|}
 
 
<div style="padding:1em;background:#eeeeff;"><h3>Older commentary</h3>
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 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
10,327

edits