Not Quite C
1 program
Added 2025-11-05T08:44:09Z
Model: google/gemini-2.5-proTemp: 0.4
Evidence
Report issue
View issues
Aliases: NQC
Provenance: commit 9dad99ebdc · authored 2025-11-05T09:44:10+01:00 · model google/gemini-2.5-pro
Sources mentioning this language
3 sources · pl_id:
pl/not-quite-cRelated 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.
Simple Line Following Robot
Provenance: commit 9dad99ebdc · authored 2025-11-05T09:44:10+01:00 · model google/gemini-2.5-pro · Temp 0.4
// LineFollow.nqc - a simple line following program
// by David Baum
// This program will cause the robot to follow the
// left edge of a black line on a white surface.
// A light sensor should be connected to sensor 2.
// The sensor should be calibrated so that it returns
// a value of around 40-45 on the white surface, and
// a value of 60-65 on the black line.
task main()
{
SetSensor(SENSOR_2, SENSOR_LIGHT);
// this is the 'black' threshold
int threshold = 55;
while(true)
{
if (SENSOR_2 < threshold)
{
// on white, turn left
OnFwd(OUT_C);
OnRev(OUT_A);
}
else
{
// on black, turn right
OnFwd(OUT_A);
OnRev(OUT_C);
}
}
}