Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>LOIS — Language Orienting ItSelfNew to Visual Studio Code? Get it now.
LOIS — Language Orienting ItSelf

LOIS — Language Orienting ItSelf

Viral Code

|
1 install
| (0) | Free
Language support for LOIS (.is): syntax highlighting, code snippets, and run-current-file integration.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LOIS

Language Orienting ItSelf

A tutorial manual-inspired programming language designed to make programming more approachable, readable, and understandable for people.

LOIS is an experimental programming language built around a simple idea:

Programming should not feel like learning how to speak to a machine before you can express an idea.

The goal of LOIS is not to make code shorter, compete with Python, or replace established programming languages. Its goal is to make the fundamentals of programming easier to recognise and understand, especially for people who have never written code before.


Table of Contents

  1. Introduction
  2. The Philosophy Behind LOIS
  3. What Makes LOIS Different?
  4. Getting Started
  5. Your First LOIS Program
  6. Basic Syntax and Structure
  7. Variables and Assignment
  8. Input and Output
  9. Mathematical Expressions and Operators
  10. Sets and Indexed Data
  11. Conditions
  12. Loops
  13. Functions
  14. Built-in Mathematical Functions
  15. Comments
  16. Complete Examples
  17. Common Mistakes
  18. Current Capabilities and Limitations
  19. Quick Syntax Reference
  20. Project Information

1. Introduction

LOIS stands for Language Orienting ItSelf.

It is a tutorial manual-inspired programming language that attempts to make programming more approachable by using syntax that communicates what a program is doing in a way people can recognise.

Consider a simple task: displaying a message.

In many programming languages, a beginner might encounter:

print("Hello world")

Or:

console.log("Hello world");

Or:

echo "Hello world";

These commands are familiar to experienced programmers. But what do they communicate to someone who has never programmed?

Does print mean a printer? What is being echoed? Why is a command called console.log?

The commands make sense once someone learns the programming language. But the beginner must first learn what those commands mean.

LOIS approaches this differently:

output is Hello world

The intention is immediately visible.

The program is producing output. The word is connects the action with its content. Even without previous programming experience, someone can make a reasonable interpretation of the statement.

That is the central idea behind LOIS.

2. The Philosophy Behind LOIS

Programming languages are designed for computers. But who are they communicating with?

The basic foundations of programming are not necessarily unfamiliar to people.

We already understand many of the ideas behind programming:

  • Giving information.
  • Receiving information.
  • Making decisions.
  • Repeating actions.
  • Performing calculations.
  • Organising information.
  • Breaking a problem into smaller steps.

These are concepts people encounter in everyday life, mathematics, and education.

Yet learning programming can feel unnecessarily complicated because the learner must understand both the programming concept and the language-specific commands used to express it.

I began thinking about a question:

If the foundations of programming are already understandable, why does expressing them in code have to feel so unfamiliar?

Even beginner-friendly languages such as Python and Lua use established programming conventions. These languages are powerful, practical, and excellent tools. However, their syntax still expects the learner to become familiar with programming terminology and conventions.

For someone who has never written code, a command such as echo, print, or console.log may not immediately explain its purpose.

They are instructions that make sense after learning the language.

I wanted to experiment with a different approach.

Introducing LOIS

Instead of trying to make programming shorter, I tried to make it more readable.

Instead of asking how few characters a program could use, I asked how clearly a person could understand what a statement was doing.

Output

output is Hello world

Repetition

repeat 5
then output is Hello

Conditions

if age > 18
then output is Adult

Mathematics

total = 10 + 20 * 3
output = total

Loops

i is 1

while i <= 5
then output = i
then i = i + 1

These examples use familiar words and explicit connections between statements.

Why the keyword then?

Many programming languages use braces, indentation, or other structural conventions to determine which statements belong to a condition or loop.

LOIS uses the keyword then to make the relationship explicit.

For example:

if age > 18
then output is Adult

The word then communicates that the following statement belongs to the condition.

It is not necessary to understand a particular indentation style to recognise the relationship.

LOIS treats this as an explicit step in the language's structure.

Why is?

LOIS uses is for a readable form of assignment and text-oriented statements.

name is Alex

A beginner can interpret this as:

"The name is Alex."

This is one of the central design choices of LOIS.

Why not just use Python?

Python is an excellent programming language. Lua is an excellent programming language. Neither needs to be made less capable to justify the existence of LOIS.

The objective is different.

LOIS is not trying to be easier than Python in every technical sense. It is exploring whether a programming language can make its basic operations more self-explanatory to someone who has never learned programming.

The focus is not on replacing existing languages.

It is on approaching the learning experience from another direction.

LOIS is an experiment in making programming syntax orient itself toward the person reading it.

3. What Makes LOIS Different?

Design choice LOIS approach
Output output is Hello
Text assignment name is Alex
Numeric assignment age = 17
Conditions if condition
Repetition repeat
Loop bodies Explicit then statements
Mathematical expressions Familiar mathematical operators
Collections Sets using { }
Set access One-based indexing using ( )
Functions Expression-based definitions
Source files .is

These choices are intended to reduce the distance between what a beginner wants to express and what they must write.

They do not eliminate the need to learn programming concepts. They aim to make those concepts easier to recognise.

4. Getting Started

Requirements

To build and run LOIS from source, you need:

  • A C compiler supported by the project.
  • CMake.
  • A terminal or command-line environment.
  • The LOIS source code.

Clone the repository

git clone https://github.com/viral-code-x/lois.git
cd lois

Build with CMake

If your checkout includes the project's CMake configuration, use:

cmake -S . -B build
cmake --build build

On a typical Linux or GitHub Codespaces environment, the executable is expected at:

./build/lois

The exact executable location can vary depending on the build system and generator.

Run a LOIS program

Create a file with the .is extension:

hello.is

Write:

output is Hello world

Run it:

./build/lois hello.is

Expected output:

Hello world

5. Your First LOIS Program

Let's start with a complete example.

Create first_program.is:

name is Alex
age = 17

output is "Hello, " name
output is "Your age is " age

Expected output:

Hello, Alex
Your age is 17

This program demonstrates:

  • Text assignment.
  • Numeric assignment.
  • Output statements.
  • Quoted text.
  • Variable substitution.
  • Combining text and variables in output.

The important thing is that each statement is intended to be understandable on its own.

You do not need to learn an unfamiliar output command before displaying a message.

6. Basic Syntax and Structure

6.1 Statements

A LOIS program consists of statements.

Each statement describes an operation, assignment, condition, loop, or other action.

For example:

name is Alex
age = 17
output is Hello name

Statements are separated by newlines.

6.2 Indentation is not the way LOIS connects statements

LOIS uses explicit then statements for the bodies of supported conditions and loops.

This is valid:

if age > 18
then output is Adult

Do not rely on indentation to define a statement body.

The keyword then establishes the connection.

6.3 Case sensitivity

Variable and function names are case-sensitive.

For example:

age is 17
output = age

Here, age and Age are different names.

Some built-in mathematical function names are handled without case sensitivity.

6.4 Names

Identifiers can begin with a letter or underscore and can contain letters, numbers, and underscores.

Examples:

age is 17
student_name is Alex
_total = 100
number1 = 25

Avoid spaces in variable names.

7. Variables and Assignment

Variables store values that can be used later.

LOIS provides different assignment forms.

7.1 Text-oriented assignment with is

name is Alex
country is Bangladesh
message is Hello

This form is intended for readable assignment of text.

A bare word after is in this assignment context is treated as text.

For example:

name is Alex

Stores the text Alex.

Do not assume that writing first is second copies the value of a variable called second. In this form, a bare word is treated as a text literal.

7.2 Numeric assignment with =

Use = for evaluated numeric expressions.

age = 17
marks = 85
total = 10 + 20

The expression is evaluated and its result is assigned.

x = 10
y = 20
result = x + y

output = result

Output:

30

7.3 Initialising a variable with a type

The num and text type forms are supported in assignment contexts.

For example:

age is num
name is text

These initialise variables with their respective types.

The numeric form starts at zero, while the text form starts as an empty string.

7.4 Changing values

A variable can be reassigned.

score = 10
score = score + 5
output = score

Output:

15

7.5 Increment shorthand

LOIS supports ++ as a shorthand for increasing a numeric variable by one.

i is 1
i++
output = i

Output:

2

This is equivalent to:

i = i + 1

8. Input and Output

Input and output allow a program to communicate with the person using it.

8.1 Output

Use output to display information.

output is Hello world

You can also display variables:

name is Alex
output is name

When an unquoted word in an output statement matches an existing variable, LOIS substitutes the variable's value.

When an unquoted word does not match a variable, it is treated as literal text.

For example:

name is Alex
output is Hello name

Output:

Hello Alex

8.2 Combining text and variables

LOIS allows text and variable names to be placed next to each other in an output statement.

You do not need to use + just to insert a variable into a message.

name is afnan

output is "your name is " name
output is hello world

Expected output:

your name is afnan
hello world

The output statement is made of separate pieces:

  • Quoted text is displayed literally.
  • An unquoted word matching a variable displays that variable's value.
  • An unquoted word that does not match a variable is displayed as ordinary text.

This means that quoted text can contain a word that is also a variable name without substituting that variable.

For example, if name is a variable:

name is Alex

output is "The word name is written here."
output is "The person's name is " name

Expected output:

The word name is written here.
The person's name is Alex

Important: Quotation marks distinguish literal text from variable references. Spaces inside quoted text are preserved. Use a space at the end of a quoted piece when the following piece should be separated by a space.

8.3 Quoted text

Quoted strings can be used when you want to define text explicitly.

output is "Welcome to LOIS"

Quotation marks tell the output system that the enclosed content is literal text.

8.4 Output with expressions

Use = when you want to evaluate an expression.

age = 17
output = age + 1

Output:

18

The = form evaluates the expression and displays its result.

8.5 Input

Use input to receive information.

Text input:

input is name

Numeric input:

input = age

The distinction is important:

  • input is reads text.
  • input = reads a numeric value.

8.6 Input with a prompt

You can provide a prompt using with.

input is name with "Enter your name: "
output is "Hello " name

Example interaction:

Enter your name: Alex
Hello Alex

For numeric input:

input = age with "Enter your age: "
output = age

9. Mathematical Expressions and Operators

LOIS uses familiar mathematical operators.

The intention is to make mathematical expressions feel similar to the notation people already encounter in calculators and mathematics.

9.1 Basic arithmetic

Operator Meaning Example
+ Addition 10 + 5
- Subtraction 10 - 5
* Multiplication 10 * 5
/ Division 10 / 5
% Remainder 10 % 3
^ Exponentiation 2 ^ 3

Example:

a = 10
b = 5

output = a + b
output = a - b
output = a * b
output = a / b

Output:

15
5
50
2

9.2 Order of operations

LOIS evaluates mathematical expressions using operator precedence.

For example:

result = 2 + 3 * 4
output = result

Output:

14

Multiplication is evaluated before addition.

Parentheses can be used to control the order:

result = (2 + 3) * 4
output = result

Output:

20

9.3 Remainder

The % operator calculates the remainder after division.

output = 10 % 3

Output:

1

This is useful for checking whether a number is even or odd.

number = 8

if number % 2 == 0
then output is Even
else output is Odd

9.4 Comparisons

Operator Meaning
== Equal to
!= Not equal to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to

Example:

age = 20

if age >= 18
then output is Adult

9.5 Logical operators

LOIS supports:

  • and
  • or
  • not
  • !

Example:

age = 20
has_id = True

if age >= 18 and has_id
then output is Allowed

Using not:

is_raining is False

if not is_raining
then output is No rain

Logical operators use truthiness. Numbers, strings, booleans, and sets can be evaluated as true or false according to whether they represent a non-empty or non-zero value.

9.6 Comparison chains

LOIS supports chained comparisons.

age = 16

if 13 <= age <= 18
then output is Teenager

This expresses a range in a way that resembles ordinary mathematics.

9.7 Factorial

The postfix ! operator represents factorial.

output = 5!

Output:

120

Factorial is supported for non-negative integers.

The prefix ! can also be used as logical NOT:

output = !True

10. Sets and Indexed Data

LOIS uses sets to organise multiple values under one variable.

A set can contain multiple values, including numbers, text, booleans, and other sets.

10.1 Creating a set

Use curly braces { }.

numbers{1, 2, 3, 4, 5}

You can also use a set literal in an expression:

numbers = {1, 2, 3, 4, 5}

An empty set can be written as:

numbers{}

Or as an empty set literal:

numbers = {}

10.2 Accessing elements

LOIS uses parentheses for set indexing.

numbers{10, 20, 30}

output = numbers(1)
output = numbers(2)
output = numbers(3)

Output:

10
20
30

LOIS set indexing starts at 1, not 0.

Index Value
1 10
2 20
3 30

This is an intentional design choice in the language's current set system.

10.3 Changing an element

An existing element can be replaced through indexed assignment.

numbers{10, 20, 30}

numbers(2) = 99

output = numbers(2)

Output:

99

10.4 Adding an element through indexing

An element can be appended by assigning to the next available index.

numbers{10, 20, 30}

numbers(4) = 40

The new set contains:

{10, 20, 30, 40}

You cannot skip an index when appending. For example, assigning to index 6 when the set contains only three elements is not a valid append operation.

10.5 Mixed values

Sets can contain different value types.

information{
    "Alex",
    17,
    True
}

This demonstrates a set containing:

  1. Text.
  2. A number.
  3. A boolean.

10.6 Nested sets

Sets can contain other sets.

matrix = {
    {1, 2},
    {3, 4}
}

Nested indexing is supported:

output = matrix(1)(2)

Output:

2

10.7 Set rules

  • Set indexing starts at 1.
  • Indexes must be positive integers.
  • Reading an index requires that the element already exists.
  • Existing elements can be replaced.
  • The next available index can be used to append.
  • Indexes cannot be skipped during append.
  • Nested sets are supported.
  • Set values are copied when read, including nested set contents.

The current implementation uses dynamically allocated set storage. It does not impose a small fixed number of elements as the language's set size.

11. Conditions

Conditions allow a program to make decisions.

LOIS uses if, else if, but if, and else.

11.1 The if statement

age = 20

if age >= 18
then output is Adult

If the condition is true, the statement after then is executed.

11.2 The else statement

Use else to define what happens when the condition is false.

age = 15

if age >= 18
then output is Adult
else output is Minor

11.3 The else if statement

Use else if to check another condition when the previous condition was false.

marks = 75

if marks >= 80
then output is Excellent
else if marks >= 60
then output is Good
else if marks >= 40
then output is Passed
else output is Failed

The conditions are checked in order. The first matching branch is selected.

11.4 The but if statement

LOIS also supports but if as an additional conditional branch.

In the current implementation, ordinary else if checks are considered before the but if branches. A matching but if branch is used when none of those ordinary branches has matched.

Example:

score = 75

if score >= 90
then output is Excellent
else if score >= 80
then output is Very good
but if score >= 70
then output is Good
else output is Keep practising

Use this form when you specifically want the additional but if behaviour. For ordinary decision chains, else if is the simpler and more familiar choice.

11.5 Conditions with logical operators

age = 20
has_permission = True

if age >= 18 and has_permission
then output is Access granted
else output is Access denied

11.6 Conditional expressions

LOIS also supports conditional expressions inside an expression.

age = 20
status = if age >= 18 then "Adult" else "Minor"

output is status

This evaluates the selected branch and produces its value.

12. Loops

Loops allow a program to repeat instructions.

LOIS provides while, for, and repeat.

The then keyword connects the loop with the statements it executes.

12.1 The while loop

A while loop repeats as long as its condition remains true.

i is 1

while i <= 5
then output = i
then i = i + 1

Output:

1
2
3
4
5

The loop:

  1. Starts with i equal to 1.
  2. Checks whether i is less than or equal to 5.
  3. Displays the current value.
  4. Increases i by 1.
  5. Checks the condition again.

The body can contain multiple then statements.

12.2 The for loop

A for loop is useful when you know the starting value, ending value, and step.

for i = 1, 5, i++
then output = i

Output:

1
2
3
4
5

The general form is:

for variable = start, finish, step
then statement

For example, the step can also be written as an assignment:

for i = 1, 5, i = i + 1
then output = i

The current range-style loop includes its endpoint.

12.3 Counting backwards

A descending loop can use a negative step.

for i = 5, 1, i = i - 1
then output = i

Output:

5
4
3
2
1

12.4 Conditional for loops

The current parser also supports a condition-style for form.

for i = 1, i <= 5, i++
then output = i

This uses the condition as the loop's continuation test.

12.5 The repeat loop

Use repeat when you want to execute something a fixed number of times.

repeat 5
then output is Hello

Output:

Hello
Hello
Hello
Hello
Hello

This is useful when the exact number of repetitions is known.

12.6 stop

Use stop to exit the current loop.

i is 1

while i <= 10
then if i == 5
then stop
then output = i
then i++

stop ends the loop instead of continuing its repetitions.

12.7 skip

Use skip to skip the remaining statements in the current loop iteration and continue with the next iteration.

For example:

i is 0

while i < 5
then i++
then if i == 3
then skip
then output = i

The value 3 is skipped.

12.8 Loop limitations

The current runtime has a maximum iteration limit of 1,000,000 for while and for loops.

This is an implementation safeguard, not a claim that every possible loop should be limited to that number forever.

13. Functions

Functions allow reusable calculations and operations to be defined once and called when needed.

LOIS currently supports expression-based function definitions.

13.1 Defining a function

Square(x) = x * x

This defines a function named Square with one parameter, x.

13.2 Calling a function

Square(x) = x * x

output = Square(5)

Output:

25

Function calls use parentheses.

13.3 Functions with multiple parameters

Add(a, b) = a + b

output = Add(10, 20)

Output:

30

13.4 Another function definition form

LOIS also supports the function of form for a single parameter:

Square is function of x * x

output = Square(5)

13.5 Calling a function as a statement

A function call can also be used as a statement:

Add(a, b) = a + b

Add(10, 20)

The current interpreter displays the resulting value for a function-call statement.

13.6 Function behaviour and current scope

Current LOIS functions are expression-based. Their result comes from evaluating the expression in the definition.

They are not currently general multi-statement function bodies.

The language's return statement should not be confused with a conventional function return mechanism: in the current interpreter, a return statement evaluates and displays its expression rather than terminating a function body and returning a value to its caller.

Function and variable names are case-sensitive. The current implementation supports up to 256 function definitions.

14. Built-in Mathematical Functions

LOIS includes several built-in mathematical functions.

These functions accept one numeric argument.

Function Purpose
abs(x) Absolute value
round(x) Round to the nearest integer
floor(x) Round downward
ceil(x) Round upward
root(x) Square root
root3(x) Cube root
root4(x) Fourth root
root5(x) Fifth root
sin(x) Sine
cos(x) Cosine
tan(x) Tangent
log(x) Base-10 logarithm
ln(x) Natural logarithm
rad(x) Convert degrees to radians

Examples

output = abs(-10)
output = round(4.7)
output = floor(4.7)
output = ceil(4.2)

Output:

10
5
4
5

Roots

output = root(25)
output = root3(27)
output = root4(16)
output = root5(32)

Output:

5
3
2
2

Trigonometry

LOIS's trigonometric functions use degrees by default.

output = sin(30)
output = cos(60)
output = tan(45)

For calculations using radians, use rad():

angle = rad(90)
output = sin(angle)

The pi constant is also available:

output = pi

Logarithms

output = log(100)
output = ln(1)

The logarithm functions require positive input values.

Mathematical functions also validate their domains. For example, square roots of negative numbers are rejected.

15. Comments

Comments allow you to write explanations in your source code without treating them as executable statements.

LOIS supports two comment forms.

15.1 Single-line comments

Use note:.

note: This is a comment

age = 17
output = age

The text after note: is ignored until the end of the line.

The keyword is case-insensitive.

15.2 Multiline comments

Use square brackets.

[
This is a multiline comment.
It can contain several lines.
The interpreter ignores this section.
]

output is Hello world

The current lexer closes a multiline comment at the first closing ]. Nested multiline comments are not supported.

16. Complete Examples

The following examples combine the features introduced above.

16.1 Hello World

output is Hello world

16.2 Personal information

name is Alex
age = 17
country is Bangladesh

output is "Name: " name
output is "Age: " age
output is "Country: " country

Expected output:

Name: Alex
Age: 17
Country: Bangladesh

16.3 Simple calculator

a = 20
b = 10

output is Addition:
output = a + b

output is Subtraction:
output = a - b

output is Multiplication:
output = a * b

output is Division:
output = a / b

Output:

Addition:
30
Subtraction:
10
Multiplication:
200
Division:
2

16.4 Even or odd

number = 17

if number % 2 == 0
then output is Even
else output is Odd

16.5 Age classifier

age = 17

if age < 13
then output is Child
else if age <= 19
then output is Teenager
else output is Adult

16.6 Sum of numbers from 1 to 10

i is 1
total = 0

while i <= 10
then total = total + i
then i++

output is "Total: " total

Output:

Total: 55

16.7 Working with a set

numbers{10, 20, 30, 40, 50}

output is "First: " numbers(1)
output is "Third: " numbers(3)

numbers(3) = 99

output is "Updated third: " numbers(3)

16.8 A simple reusable function

Square(x) = x * x

output = Square(4)
output = Square(5)
output = Square(10)

Output:

16
25
100

16.9 A simple grade classifier

marks = 85

if marks >= 80
then output is Grade A
else if marks >= 70
then output is Grade B
else if marks >= 60
then output is Grade C
else if marks >= 40
then output is Grade D
else output is Fail

17. Common Mistakes

This section explains mistakes that beginners may encounter.

Mistake Correct approach
Using print Use output
Using echo Use output
Using console.log Use output
Using indentation as the body structure Use then
Using = for equality Use ==
Using == for assignment Use = or is, depending on the value
Accessing a set from index 0 Start at index 1
Calling a function without parentheses Use FunctionName(arguments)
Appending to a set while skipping indexes Append at the next available index
Using a non-numeric value in a numeric calculation Make sure the expression evaluates to a number

17.1 Confusing is and =

These two forms have different purposes.

name is Alex

This assigns text.

age = 17

This assigns a numeric value.

For comparisons, use:

if age == 17
then output is Correct

17.2 Forgetting then

Incorrect:

if age > 18
output is Adult

Correct:

if age > 18
then output is Adult

17.3 Using zero-based indexing

Incorrect:

numbers{10, 20, 30}
output = numbers(0)

Correct:

numbers{10, 20, 30}
output = numbers(1)

The first element is at index 1.

17.4 Forgetting to update a loop variable

A while loop must eventually reach a point where its condition becomes false, unless it is intentionally designed to continue.

For example:

i is 1

while i <= 5
then output = i
then i++

Without i++, the value of i would never change.

17.5 Using + unnecessarily in output

You do not need to concatenate ordinary output text and variables using +.

Instead of relying on:

name is Alex
output is "Hello " + name

Use the language's text-and-variable output form:

name is Alex
output is "Hello " name

Quoted text is literal, and an unquoted matching variable name is substituted.

18. Current Capabilities and Limitations

LOIS is an evolving programming language. Its current implementation supports a growing collection of fundamental programming features, but it should not be presented as a mature general-purpose language.

Current capabilities

The implementation includes:

  • A custom lexer.
  • A custom parser.
  • An interpreter.
  • Numeric and text values.
  • Boolean values.
  • Variable assignment.
  • Arithmetic expressions.
  • Comparison and logical operators.
  • Conditional statements.
  • Conditional expressions.
  • while, for, and repeat loops.
  • Loop control using stop and skip.
  • Expression-based functions.
  • Built-in mathematical functions.
  • Sets and nested sets.
  • One-based set indexing.
  • Set element replacement and append operations.
  • Text and numeric input.
  • Output formatting.
  • Single-line and multiline comments.
  • Runtime error handling.

Current implementation limits

The implementation currently has several explicit limits:

Area Current implementation
Variables Maximum of 256
Functions Maximum of 256
while loop Maximum of 1,000,000 iterations
for loop Maximum of 1,000,000 iterations
Input buffer 1,024 bytes
Output buffer 1 MiB
Error buffer 1 MiB
Set indexing Positive integer indexes, starting at 1

These are implementation details and may change as the language develops.

Features not to assume are available

The current implementation should not be assumed to provide:

  • A complete standard library.
  • A general module-loading system.
  • Classes or object-oriented programming.
  • Dictionaries or general key-value collections.
  • General file input/output from LOIS programs.
  • General multi-statement function bodies.
  • Conventional function-return semantics.
  • A complete exception-handling system.
  • A for each collection iteration system.
  • Unlimited loop execution.

The parser recognises add math and add game, but the current interpreter does not implement actual module loading for these statements.

LOIS's purpose is to develop a readable programming foundation. Its capabilities should be described according to what is actually implemented, not what may be planned for the future.

19. Quick Syntax Reference

This section provides a compact reference for common LOIS syntax.

Output

output is Hello world
output is "Hello world"
output is "Hello " name
output = 10 + 20

Variables

name is Alex
age = 17
number is num
message is text

Input

input is name
input = age
input is name with "Enter your name: "
input = age with "Enter your age: "

Arithmetic

result = 10 + 5
result = 10 - 5
result = 10 * 5
result = 10 / 5
result = 10 % 3
result = 2 ^ 3

Conditions

if condition
then statement
else statement

Multiple conditions

if condition1
then statement1
else if condition2
then statement2
else statement3

Additional conditional branch

if condition1
then statement1
but if condition2
then statement2
else statement3

While loop

while condition
then statement

For loop

for i = start, finish, i++
then statement

Repeat loop

repeat 5
then statement

Loop control

stop
skip

Sets

numbers{1, 2, 3}
numbers = {1, 2, 3}
numbers(1)
numbers(2) = 99
numbers(4) = 40

Functions

Square(x) = x * x
output = Square(5)

Mathematical functions

abs(x)
round(x)
floor(x)
ceil(x)
root(x)
root3(x)
root4(x)
root5(x)
sin(x)
cos(x)
tan(x)
log(x)
ln(x)
rad(x)

Comments

Single-line:

note: Single-line comment

Multiline:

[
Multiline comment
]

20. Project Information

Project: LOIS

Full name: Language Orienting ItSelf

File extension: .is

Implementation: C

Project type: Experimental interpreted programming language

Repository: https://github.com/viral-code-x/lois

The idea behind the name

LOIS is short for Language Orienting ItSelf.

The name reflects the project's central philosophy: rather than expecting every beginner to immediately adapt to the conventions of a programming language, LOIS experiments with a language that tries to orient its syntax toward the person reading it.

It is not a claim that programming can be learned without effort.

It is an attempt to make the first interaction with programming feel more familiar.

Final thought

Programming is a way of expressing ideas through instructions.

People already understand many of the ideas that programming is built upon. They understand numbers, decisions, repetition, information, and cause and effect.

Perhaps the first challenge should not be teaching someone to memorise unfamiliar commands.

Perhaps it should be giving them a language in which they can recognise what they are saying.

That is what LOIS is trying to explore.

LOIS — Language Orienting ItSelf.

A programming language that tries to speak in a way any person can understand.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft