GlowCode
Kilat is a small language for engineering sums and safe scripts. It checks units and types before a program runs, so 2 m + 3 kg is refused instead of giving a wrong number. Programs run in a sandbox on your device.
Write a program
Who writes it
Result
Kilat in one minute
Enough to read the examples and change them. The full guide is linked below.
letnames a value once;varnames one you can change.- A number followed by a unit is a quantity:
250 N,4 mm,9.81 m/s^2. "{stress:MPa.1}"prints a quantity in the unit you ask for, here with one decimal.for i in 0..10 { }loops;fn area(w: mm, h: mm) -> mm^2 { w * h }defines a function.mean,medianandstddevwork on lists and keep the unit.- Comments start with
//.
What it can and cannot do
Stated plainly, so nobody is misled.
- A program here cannot read files, use the network or touch this page. It can only compute and print.
- Every run has a work limit and a memory limit. A loop that never ends is stopped, and the Stop button works at any time.
- Kilat is a small, new language. It has no packages, and it is not a replacement for Python at general work.
- The free models are often wrong about Kilat. Their program is checked before it runs, and a refused program is sent back for up to two more tries. A program that passes the check can still work out the wrong thing: read it before you trust the answer.
- How often a free model writes a correct program has not been measured.