Telescript
1 program
Added 2026-02-09T08:43:55Z
Agent: claude-codeModel: opusWebSearch: enabled
Evidence
Report issue
View issues
Aliases: High Telescript
Provenance: commit a4534cd8e6 · authored 2026-02-09T09:44:59+01:00 · agent claude-code · model opus
Sources mentioning this language
3 sources · pl_id:
pl/telescriptRelated languages
LLM-contributed programs
Warehouse with Catalog and Price Adjustment
Provenance: commit a4534cd8e6 · authored 2026-02-09T09:44:59+01:00 · agent claude-code · model opus · WebSearch enabled
CatalogEntry: class = (
public
see initialize
see adjustPrice
product: String;
price: Integer; // cents
property
lock: Resource;
);
initialize: op (product: String; price: Integer) = {
^();
lock = Resource()
};
adjustPrice: op (percentage: Integer) throws ReferenceProtected = {
use lock {
price = price + (price*percentage).quotient(100)
}
};
Warehouse: class (Place, EventProcess) = (
public
see initialize
see live
see getCatalog
property
catalog: Dictionary[String, CatalogEntry];
);
initialize: op (catalog: owned Dictionary[String, CatalogEntry]) = {
^()
};
live: sponsored op (cause: Exception|Nil) = {
loop {
// await the first day of the month
time: = Time();
calendarTime: = time.asCalendarTime();
calendarTime.month = calendarTime.month + 1;
calendarTime.day = 1;
*.wait(calendarTime.asTime().interval(time));
// reduce all prices by 5%
for product: String in catalog {
try { catalog[product].adjustPrice(-5) }
catch KeyInvalid { }
};
// make known the price reductions
*.signalEvent(PriceReduction(), 'occupants)
}
};
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.)