Rosetta Code/Rank languages by popularity: Difference between revisions

m
→‎{{header|Wren}}: Minor tidy and rerun
(Added Visual Basic .NET)
m (→‎{{header|Wren}}: Minor tidy and rerun)
Line 6,470:
{{libheader|Wren-fmt}}
An embedded program so we can use libcurl.
<syntaxhighlight lang="ecmascriptwren">/* rc_rank_languages_by_popularityRosetta_Code_Rank_languages_by_popularity.wren */
 
import "./pattern" for Pattern
Line 6,531:
var langs = findLangs.call()
langs.sort { |a, b| a[1] > b[1] }
System.print("Languages with most examples as at 113 SeptemberFebruary, 20222024:")
var rank = 0
var lastScore = 0
Line 6,550:
<br>
We now embed this script in the following C program, build and run.
<syntaxhighlight lang="c">/* gcc rc_rank_languages_by_popularityRosetta_Code_Rank_languages_by_popularity.c -o rc_rank_languages_by_popularityRosetta_Code_Rank_languages_by_popularity -lcurl -lwren -lm */
 
#include <stdio.h>
Line 6,724:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "rc_rank_languages_by_popularityRosetta_Code_Rank_languages_by_popularity.wren";
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
Line 6,745:
Showing just the top thirty.
<pre>
Languages with most examples as at 113 SeptemberFebruary, 20222024:
1 Wren 1,570665
2 1 = Phix 1,569665
3 Julia 1,538638
4 Raku 1,518608
5 Go Nim 1,496576
6 PerlGo 1,467547
7 PythonPerl 1,405540
8 Nim Python 1,402497
9 J 1,276413
10 C Java 1,211318
11 MathematicaC 1,178293
12 REXXC++ 1,149258
13 HaskellRuby 1,139235
14 Java Mathematica 1,137200
15 Kotlin FreeBASIC 1,133185
16 C++ Haskell 1,123166
17 RubyREXX 1,103152
18 RacketKotlin 1,089143
19 FreeBASICRacket 1,070099
20 ZklJq 1,011081
21 Sidef 1,003051
22 Factor11l 985 1,016
23 DZkl 9791,011
24 TclFactor 9751,001
25 11lD 962 990
26 AdaALGOL 68 919986
27 CTcl sharp 917 983
28 Scala 897948
29 RustDelphi 880945
30 LuaAda 878940
30 = Rust 940
</pre>
 
9,476

edits