Rosetta Code/Count examples: Difference between revisions
m
→{{header|Wren}}: Minor changes (though see Talk Page re encoding of '+')
m (→{{header|Python}}: More readable logging) |
m (→{{header|Wren}}: Minor changes (though see Talk Page re encoding of '+')) |
||
Line 3,565:
{{libheader|Wren-pattern}}
An embedded program so we can use the libcurl library.
<syntaxhighlight lang="
import "./pattern" for Pattern
Line 3,608:
for (m in matches) {
var title = m.capsText[0].replace("'", "'").replace(""", "\"")
var title2 = title.replace(" ", "_").replace("+", "\%
var taskUrl = "https://www.rosettacode.org/w/index.php?title=%(title2)&action=raw"
var taskContent = getContent.call(taskUrl)
Line 3,619:
<br>
which we now embed in the following C program, build and run.
<syntaxhighlight lang="c">/* gcc
#include <stdio.h>
Line 3,793:
WrenVM* vm = wrenNewVM(&config);
const char* module = "main";
const char* fileName = "
char *script = readFile(fileName);
WrenInterpretResult result = wrenInterpret(vm, module, script);
Line 3,814:
Just showing the first 25 'full' tasks:
<pre>
100 doors :
100 prisoners :
15 puzzle game :
15 puzzle solver :
2048 :
21 game :
24 game :
24 game/Solve :
4-rings or 4-squares puzzle :
9 billion names of God the integer :
99 bottles of beer :
A+B :
Abbreviations, automatic :
Abbreviations, easy :
Abbreviations, simple :
ABC problem :
Abelian sandpile model :
Abelian sandpile model/Identity :
Abstract type :
Abundant odd numbers :
Abundant, deficient and perfect number classifications :
Accumulator factory :
Achilles numbers :
Ackermann function :
Active Directory/Connect : 29 examples
....
|