Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All sufficiently advanced language models understand it without any special prom
- **Referential omnipotence.** You do not need to explicitly define most functions. The AI will infer them for you.
- **Functions and function composition** with the `|>` operator.
- **Mermaid diagrams** for visualizing complex topics like architecture, flow control, and sequence descriptions.
- **Options** for customizing the behavior of your program. See the [example](examples/reflective-thought-composition.sudo).

## Why SudoLang?

Expand Down
10 changes: 10 additions & 0 deletions examples/learn-sudolang.sudo
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ Foo {
}
```

## Options

SudoLang supports various options to customize the behavior of your program. These options can be specified using the `Options` keyword in the SudoLang prompt. Here are some examples:

```SudoLang
Options {
depth: 1..10|String
}
```

Because it's an LLM, many functions can be automagically inferred. Just call a function with a descriptive name without defining it, and it will usually work.

---
Expand Down
3 changes: 3 additions & 0 deletions examples/reflective-thought-composition.readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ The module uses emojis to visually represent different phases of the thinking pr
* ⚖️ **Evaluation** - Consider options
* 💬 **Response** - Consolidate previous insights, integrate, synthesize, and return a well-rounded response

## Options

The RTC module supports various options to customize the AI's responses. Use the `/help` command for details.

## Installation

Expand Down
39 changes: 39 additions & 0 deletions sudolang.sudo.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ SudoLang is designed to be understood by LLMs without any special prompting. **A
- **Semantic Pattern Matching**. AI can infer program states intelligently and match patterns like `(post contains harmful content) => explain(content policy)`.
- **Referential omnipotence.** You do not need to explicitly define most functions. The AI will infer them for you.
- **Mermaid diagrams** for visualizing complex topics like architecture, flow control, and sequence descriptions.
- **Options** for customizing the behavior of your program. See the [example](examples/reflective-thought-composition.sudo).

### Markdown

Expand Down Expand Up @@ -315,6 +316,44 @@ graph LR
Oven -->|Non-linear transformation| Cake
```

## Options

SudoLang supports various options to customize the behavior of your program. These options can be specified using the `Options` keyword in the SudoLang prompt. Here are some examples:

```SudoLang
Options {
depth: 1..10|String
}
```

### Depth Parameter

The depth parameter controls the level of detail in the AI's response. You can specify a numeric value or a descriptive string. Here are some examples:

```SudoLang
Why is the sky blue? -depth 1
```

This will result in a simple, short answer. If you want more depth, try:

```SudoLang
Why is the sky blue? -depth 10
```

You can also use descriptive strings for the depth parameter:

```SudoLang
Why is the sky blue? -depth kindergarten
```

Or

```SudoLang
Why is the sky blue? -depth PhD
```

For more details, see the [example](examples/reflective-thought-composition.sudo).

## Implicit LLM Capabilities

SudoLang is a very expressive way to express traditional programming concepts. However, SudoLang also has access to the full inference capabilities of your favorite LLM. It is capable of much more than what is described here. Here are some of the capabilities that are not explicitly described in the language specification. An LLM running SudoLang can:
Expand Down