Jump to content

Rosetta Code/Rank languages by popularity: Difference between revisions

PascalABC.NET
m (→‎{{header|Wren}}: Minor tidy and rerun)
(PascalABC.NET)
Line 3,673:
</pre>
Note: If MC++ and µC++ are the same, they should/could be added together to get 501 languages.
 
=={{header|PascalABC.NET}}==
Using web scraping. May 2024.
<syntaxhighlight lang="delphi">
uses System.Net;
 
begin
ServicePointManager.SecurityProtocol := SecurityProtocolType(3072);
var wc := new WebClient;
wc.Encoding := Encoding.UTF8;
var s := wc.DownloadString('https://rosettacode.org/wiki/Special:Categories?limit=5000');
s.Matches('([^><]+)</a>.+\(([\d,]+) member')
.Select(x -> (x.Groups[1].Value,x.Groups[2].Value.Replace(',','').ToInteger))
.Where(x -> not x[0].StartsWith('Pages'))
.OrderByDescending(pair -> pair[1]).Numerate.Take(10)
.PrintLines(x -> $'Rank: {x[0],3} ({x[1][1]} entries) {x[1][0]}')
end.
</syntaxhighlight>
{{out}}
<pre>
Rank: 1 (1682 entries) Phix
Rank: 2 (1675 entries) Wren
Rank: 3 (1652 entries) Julia
Rank: 4 (1622 entries) Raku
Rank: 5 (1577 entries) Nim
Rank: 6 (1552 entries) Go
Rank: 7 (1548 entries) Perl
Rank: 8 (1531 entries) Python
Rank: 9 (1416 entries) J
Rank: 10 (1343 entries) Java
</pre>
 
=={{header|Oz}}==
46

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.