Turing+
1 program
Added 2026-02-27T18:31:23Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled
Evidence
Report issue
View issues
Aliases: Turing Plus, TPlus
Provenance: commit a11fed9d78 · authored 2026-02-27T19:31:54+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
3 sources · pl_id:
pl/turing-2Related languages
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
Bubble Sort with Modules
Provenance: commit a11fed9d78 · authored 2026-02-27T19:31:54+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
% Turing demonstration - modules and functions
% Bubble sort a random list of integers
% How many elements of what range of values?
const * nelements := 12
const * maxval := 50
% Hide data inside a module
module elements
export lessthan, swap, print
% The data list
var list : array 1 .. nelements of int
% Initially fill it with randome values
randomize
for i : 1 .. nelements
randint (list (i), 1, maxval)
end for
% Is element i less than element j?
function lessthan (i, j : 1 .. nelements) : boolean
result list (i) < list (j)
end lessthan
% Swap elements i and j
procedure swap (i, j : 1 .. nelements)
const t := list (i)
list (i) := list (j)
list (j) := t
end swap
% Print the list
procedure print
for i : 1 .. nelements
put list (i), " " ..
end for
put ""
end print
end elements
% Generic bubble sort, which doesn't even know what it's sorting!
procedure sort
for decreasing i : nelements - 1 .. 1
for j : i .. nelements - 1
if elements.lessthan (j + 1, j) then
elements.swap (j, j + 1)
end if
end for
end for
end sort
% Main program
put "Unsorted list: " ..
elements.print
sort
put "Sorted list: " ..
elements.print