# Alice — Curiouser and faster.

> The joy of Ruby. The power of .NET. A little less ceremony. A lot more possibility.

Alice is an open-source programming language for .NET. Its Ruby/Crystal-inspired syntax combines blocks, pattern matching, and domain-specific languages with inferred static types, nil-safety, and compile-time data-race checks. Alice compiles through C# and Roslyn to .NET IL.

- Homepage: https://fac1255b.alice-lang.pages.dev/
- Source: https://github.com/alicelanguage/alice
- Language guide: https://github.com/alicelanguage/alice/blob/main/docs/language.md
- Getting started: https://github.com/alicelanguage/alice/blob/main/docs/getting-started.md
- Releases: https://github.com/alicelanguage/alice/releases

## Hello, Wonderland

```ruby
def greet(name : String) : String
  "Hello, #{name}!"
end

puts greet("Wonderland")
```

Expected output: `Hello, Wonderland!`

## Why Alice

- Express more: Ruby-inspired syntax, blocks, and patterns.
- Worry less: inferred static types, nil-safety, and compile-time data-race checks.
- Go further: optimized eligible loops, .NET performance, and existing NuGet packages.

## What can you build?

### Web & APIs

Build on ASP.NET Core. Use the .NET libraries you already know, straight from Alice.

Tools: ASP.NET Core, NuGet, System.Text.Json.

```ruby
using Microsoft.AspNetCore.Builder
using Microsoft.AspNetCore.Http

record Health(status : String)

builder = WebApplication.CreateBuilder(ARGV)
app = builder.Build()

app.MapGet("/health", -> {
  Results.Ok(Health.new("ok"))
})

app.Run()
```

[Explore the example](https://github.com/alicelanguage/alice/tree/main/examples/web/aspnet)

### Data & compute

Express a pipeline. Alice fuses eligible operations into loops, with vectorization and safe parallelism.

Tools: SIMD, Parallel loops, .NET collections.

```ruby
# A pipeline, lowered to a fused loop.
total = (1..1_000_000)
  .map { |i| i.to_i64 * i }
  .select { |x| x % 2 == 0 }
  .sum

puts "total=#{total}"

# Inspect the generated C#:
# alice emit squares.al
```

[Explore the example](https://github.com/alicelanguage/alice/blob/main/README.md)

### Games & graphics

Work with MonoGame and raylib. Bring your game loop, graphics, and a little imagination.

Tools: MonoGame, raylib, Value types.

```ruby
using Microsoft.Xna.Framework
using Microsoft.Xna.Framework.Graphics

class HelloGame < Game
  def initialize
    GraphicsDeviceManager.new(self)
    self.Window.Title = "Hello, Wonderland"
  end

  def Draw(time : GameTime)
    GraphicsDevice.Clear(Color.CornflowerBlue)
    super
  end
end

HelloGame.new.Run
```

[Explore the example](https://github.com/alicelanguage/alice/tree/main/samples/BounceGame)

### Little languages

Blocks, yield, and Ruby-style DSLs turn your domain into a language of its own.

Tools: Blocks & yield, Pattern matching, RSpec-style tests.

```ruby
# From the Wonderland adventure sample.
World.build do |w|
  w.room "rabbit hole" do |r|
    r.instance_eval do
      describe "A tiny door glows below."
      exit "east", "hall"
      exit "down", "garden"
      item "watch"
    end
  end
end
```

[Explore the example](https://github.com/alicelanguage/alice/tree/main/samples/wonderland)

## Made with Alice

- [Parallel ray tracer](https://github.com/alicelanguage/alice/tree/main/samples/raytracer): reflective spheres, lighting, and shadows.
- [Mandelbrot explorer](https://github.com/alicelanguage/alice/tree/main/samples/fractal): a parallel fractal zoom.
- [Wonderland adventure](https://github.com/alicelanguage/alice/tree/main/samples/wonderland): a text adventure using a Ruby-style DSL.

## Get started

Install the [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0), then build from source:

```sh
git clone https://github.com/alicelanguage/alice.git
cd alice
dotnet build Alice.sln --configuration Release
dotnet run --project src/Alice.Cli -- run examples/basics/hello.al
```

Release archives are available for Linux x64, Windows x64, macOS x64, and macOS arm64. See the [release installation guide](https://github.com/alicelanguage/alice/blob/main/docs/releases.md).

## Project status

Alice is under active development. See the repository's current documentation and release notes for supported features and limitations. The front page's browser effects are decorative; it does not execute Alice programs in the browser.

## License and attribution

Source code: [Apache License 2.0](https://fac1255b.alice-lang.pages.dev/LICENSE).

The Alice name, rabbit mark, and brand images are © 2026 Julia Klee, all rights reserved. They are not covered by the code license. See the [brand assets license](https://fac1255b.alice-lang.pages.dev/brand/LICENSE.md).

## Community

- [Contribute](https://github.com/alicelanguage/alice/blob/main/CONTRIBUTING.md)
- [Report an issue](https://github.com/alicelanguage/alice/issues)
