<commit_before>## ŠARAL 2.0 - ŠARIŠ ALGORITMIK LENGVIDŽ 2.0

[Slovensky](README-SK.md)

> I would like to introduce you with newest top level evolution in information crunching. It is a problem-science-tech-oriented programming language Šaral. The famous [šariš](https://en.wikipedia.org/wiki/%C5%A0ari%C5%A1)-american company IBM have always been trying to create a language, which a computer would understand as good as human understands

*Not all features all currently supported. Full specification [here](specification.md)*

### Compiler
We need to have [`maven`](https://maven.apache.org/) installed.

Šaral source files have `srl` extension and we can compile it to JVM bytecode. It outputs `class` file. 

`java com.pidanic.saral.Compiler <saral_source_file.srl>`

Then run compiled program. 

`java <saral_source_file.class>`

### Program
It is for JVM, but you do not need to have `class`es. We declare few variables with `meňak` and print them to the console with `ciskaj`-
```
meňak neskutočné numeralio five = 5
ciskaj five
meňak slovo hello = "hello"
ciskaj hello
```

### Data Types
There are 2 data types supported - `neskutočné numeralio` (integer) a `slovo` (string).


### Procedures
Do we repeat same code? No problem, we have procedures.
```
bar iDoSomething()
{
   meňak neskutočné numeralio three = 3
   ciskaj three
}
```

With `bar`, we declare procedure with name `iDoSomething`. It is without parameters. 

We can add parameters. They need to be in supported data types.
```
bar iDoSomethingElse(neskutočné numeralio x)
{
    ciskaj x
}
```

We call the procedure with `paľ do baru`
```
paľ do baru iDoSomething()

meňak neskutočné numeralio five = 5
paľ do baru iDoSomethingElse(five)

```

### Functions
Do we repeat same code? Do we want to return a calculated value? We have functions.
```
bar neskutočné numeralio returnSomething()
{
    meňak neskutočné numeralio pejc = 5
    vrac pejc
}
```

Function arguments are supported.
```
bar slovo returnString(slovo x)
{
    vrac x
}
```

We call the function with `vrac z baru`
```
vrac z baru returnSomething()

meňak slovo hello = "hello"
vrac z baru returnString(hello)

```

### Odsadenie
The Šaral language separates blocks of code with spaces or tabs on a new line (similar as [Python](https://www.python.org/)).
<commit_msg>Updated english docs<commit_after>## ŠARAL 2.0 - ŠARIŠ ALGORITMIK LENGVIDŽ 2.0

[Slovensky](README.md)

> I would like to introduce you with newest top level evolution in information crunching. It is a problem-science-tech-oriented programming language Šaral. The famous [šariš](https://en.wikipedia.org/wiki/%C5%A0ari%C5%A1)-american company IBM have always been trying to create a language, which a computer would understand as good as human understands

*Not all features all currently supported. Full specification [here](specification.md)*

### Compiler
We need to have [`maven`](https://maven.apache.org/) installed.

Šaral source files have `srl` extension and we can compile it to JVM bytecode. It outputs `class` file. 

`java com.pidanic.saral.Compiler <saral_source_file.srl>`

Then run compiled program. 

`java <saral_source_file.class>`

### Program
It is for JVM, but you do not need to have `class`es. We declare few variables with `meňak` and print them to the console with `ciskaj`-
```
meňak neskutočné numeralio five = 5
ciskaj five
meňak slovo hello = "hello"
ciskaj hello
```

### Data Types
There are 2 data types supported - `neskutočné numeralio` (integer) a `slovo` (string).


### Procedures
Do we repeat same code? No problem, we have procedures.
```
bar iDoSomething()
   meňak neskutočné numeralio three = 3
   ciskaj three
```

With `bar`, we declare procedure with name `iDoSomething`. It is without parameters. 

We can add parameters. They need to be in supported data types.
```
bar iDoSomethingElse(neskutočné numeralio x)
    ciskaj x
```

We call the procedure with `paľ do baru`
```
paľ do baru iDoSomething()

meňak neskutočné numeralio five = 5
paľ do baru iDoSomethingElse(five)

```

### Functions
Do we repeat same code? Do we want to return a calculated value? We have functions.
```
bar neskutočné numeralio returnSomething()
    meňak neskutočné numeralio pejc = 5
    vrac pejc
```

Function arguments are supported.
```
bar slovo returnString(slovo x)
    vrac x
```

We call the function with `vrac z baru`
```
vrac z baru returnSomething()

meňak slovo hello = "hello"
vrac z baru returnString(hello)

```

### Indentation
The Šaral language separates blocks of code with spaces or tabs on a new line (similar as [Python](https://www.python.org/)).

{'fraction_non_alphanumeric': 0.09522776572668112, 'fraction_numerical': 0.005639913232104121, 'mean_word_length': 4.374125874125874, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1487391', 'n_tokens_mistral': 1578, 'n_tokens_neox': 1485, 'n_words': 596}