Rosetta Code/Rank languages by popularity: Difference between revisions
Content deleted Content added
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="
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
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
#include <stdio.h>
Line 6,724:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
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
1 Wren 1,
3 Julia 1,
4 Raku 1,
5
6
7
8
9 J 1,
10
11
12
13
14
15
16
17
18
19
20
21 Sidef 1,
22
23
24
25
26
27
28 Scala
29
30
30 = Rust 940
</pre>
|