<commit_before>---
version: 1.2.1
title: Basics
---

Getting started, basic data types, and basic operations.

{% include toc.html %}

## Getting Started

### Installing Elixir

Installation instructions for each OS can be found on elixir-lang.org in the [Installing Elixir](http://elixir-lang.org/install.html) guide.

After Elixir is installed, you can easily confirm the installed version.

    % elixir -v
    Erlang/OTP {{ site.erlang.OTP }} [erts-{{ site.erlang.erts }}] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

    Elixir {{ site.elixir.version }}

### Trying Interactive Mode

Elixir comes with IEx, an interactive shell, which allows us to evaluate Elixir expressions as we go.

To get started, let's run `iex`:

    Erlang/OTP {{ site.erlang.OTP }} [erts-{{ site.erlang.erts }}] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

    Interactive Elixir ({{ site.elixir.version }}) - press Ctrl+C to exit (type h() ENTER for help)
    iex>

Let's go ahead and give it a try now by typing in a few simple expressions:

```elixir
iex> 2+3
5
iex> 2+3 == 5
true
iex> String.length("The quick brown fox jumps over the lazy dog")
43
```

Don't worry if you don't understand every expression yet, but we hope you get the idea.

## Basic Data Types<commit_msg>Update basics.md (#2503)<commit_after>---
version: 1.2.1
title: Basics
---

Getting started, basic data types, and basic operations.

{% include toc.html %}

## Getting Started

### Installing Elixir

Installation instructions for each OS can be found on elixir-lang.org in the [Installing Elixir](http://elixir-lang.org/install.html) guide.

After Elixir is installed, you can easily find the installed version.

    % elixir -v
    Erlang/OTP {{ site.erlang.OTP }} [erts-{{ site.erlang.erts }}] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

    Elixir {{ site.elixir.version }}

### Trying Interactive Mode

Elixir comes with IEx, an interactive shell, which allows us to evaluate Elixir expressions as we go.

To get started, let's run `iex`:

    Erlang/OTP {{ site.erlang.OTP }} [erts-{{ site.erlang.erts }}] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

    Interactive Elixir ({{ site.elixir.version }}) - press Ctrl+C to exit (type h() ENTER for help)
    iex>

Note: On Windows PowerShell, you need to type `iex.bat`.

Let's go ahead and give it a try now by typing in a few simple expressions:

```elixir
iex> 2+3
5
iex> 2+3 == 5
true
iex> String.length("The quick brown fox jumps over the lazy dog")
43
```

Don't worry if you don't understand every expression yet, but we hope you get the idea.

## Basic Data Types
{'fraction_non_alphanumeric': 0.13701578192252512, 'fraction_numerical': 0.023672883787661407, 'mean_word_length': 3.9450354609929077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3486924', 'n_tokens_mistral': 1039, 'n_tokens_neox': 985, 'n_words': 342}