How the AI Engineering Curriculum Supports Multiple Programming Languages: Python, TypeScript, Rust, and Julia

The curriculum implements a language-agnostic lesson contract that mandates parallel implementations in separate files (main.py, main.ts, main.rs, main.jl) within each lesson's code/ directory, validated by front-matter declarations and enforced by automated audit tooling.

The rohitg00/ai-engineering-from-scratch repository teaches AI engineering through a multi-language approach that treats Python, TypeScript, Rust, and Julia as first-class citizens. Rather than favoring a single stack, the curriculum stores runnable implementations side-by-side, allowing learners to compare syntax, memory management, and performance characteristics across runtimes.

Language-Agnostic Lesson Contract

The curriculum's architecture rests on a strict contract defined in AGENTS.md and LESSON_TEMPLATE.md. Every lesson must include a docs/en.md file whose front-matter explicitly lists supported languages via the **Languages:** field, which must correspond exactly to the source files present in the lesson's code/ directory【AGENTS.md†L73-L81】.

The code/ Directory Structure

According to LESSON_TEMPLATE.md, the code/ folder contains parallel implementations for each supported language: main.py for Python, main.ts for TypeScript, main.rs for Rust, and main.jl for Julia【LESSON_TEMPLATE.md†L12-L31】. This rigid structure ensures that learners can locate the equivalent implementation in their preferred language immediately without navigating complex subdirectories.

Per-Language Implementation Standards

To maintain pedagogical consistency, the curriculum enforces a standard-library-only policy for most languages. Rust implementations must use only the standard library, while Python, TypeScript, and Julia draw from a carefully curated whitelist of dependencies【AGENTS.md†L56-L61】. This constraint forces algorithms to be built from first principles, making performance comparisons between languages meaningful and debugging more transparent.

Side-by-Side Source Files

When a lesson covers algorithms like linear algebra operations, the source files appear side-by-side in the same directory. For example, the linear algebra intuition lesson includes both vectors.py and vectors.jl in phases/01-math-foundations/01-linear-algebra-intuition/code/, allowing direct comparison of Python and Julia syntax for identical mathematical operations【glob result†L1-L2】.

Development Environment Configuration

The curriculum provides explicit tooling guidance in the "Dev-environment" lesson (phases/00-setup-and-tooling/01-dev-environment/docs/en.md), which walks users through installing Python 3.11+, Node 20+ (for TypeScript), Rust, and Julia【README.md†L22-L23】【README.md†L39-L41】. This ensures every learner can execute code in any of the supported runtimes without environment conflicts or version mismatches.

Practical Example: Dot Product Implementation

The following implementations demonstrate how the same algorithm appears across languages. Both files reside in the lesson directory and implement an identical dot-product calculation.

Python implementation (vectors.py):

def dot(a, b):
    """Return the dot product of two equal-length vectors."""
    return sum(x * y for x, y in zip(a, b))

print(dot([1, 2, 3], [4, 5, 6]))   # → 32

Julia implementation (vectors.jl):

dot(a, b) = sum(x * y for (x, y) in zip(a, b))

println(dot([1, 2, 3], [4, 5, 6]))   # → 32

The lesson's front-matter lists Python, Julia as supported languages, matching the files present in the code/ directory【grep result†L6-L7】.

Summary

  • The curriculum uses a language-agnostic lesson contract enforced by front-matter declarations in docs/en.md that must match files in the code/ directory.
  • Each lesson contains parallel implementations named main.py, main.ts, main.rs, and main.jl according to the template defined in LESSON_TEMPLATE.md.
  • A standard-library-only policy ensures algorithms are implemented from first principles across all languages, enabling valid performance comparisons.
  • Source files for different languages reside side-by-side in lesson directories, such as vectors.py and vectors.jl in the linear algebra foundation phase.
  • The setup documentation requires Python 3.11+, Node 20+, Rust, and Julia to ensure full runtime compatibility for all four languages.

Frequently Asked Questions

How does the curriculum ensure code quality across multiple languages?

The repository uses automated audit tooling that validates the **Languages:** field in each lesson's front-matter against the actual main.* files present in the code/ directory. This enforcement, documented in AGENTS.md, prevents lessons from claiming language support without providing runnable implementations【AGENTS.md†L73-L81】.

Can learners mix languages within a single lesson?

While each lesson provides implementations in multiple languages, the curriculum expects learners to work through the version matching their chosen runtime. The side-by-side file structure allows comparison, but the lesson contract requires specific file naming conventions (main.py, main.rs, main.ts, main.jl) to maintain clarity and tooling compatibility【LESSON_TEMPLATE.md†L12-L31】.

What dependencies are allowed when implementing algorithms in different languages?

The curriculum restricts most languages to their standard libraries or a minimal whitelist. Rust implementations must use only the standard library, while Python, TypeScript, and Julia have approved dependency lists. This policy ensures that performance differences reflect language characteristics rather than external library optimizations【AGENTS.md†L56-L61】.

Which language versions does the curriculum require?

According to the dev-environment setup guide in phases/00-setup-and-tooling/01-dev-environment/docs/en.md, learners need Python 3.11 or higher, Node.js 20 or higher (for TypeScript execution), plus current stable versions of Rust and Julia. These requirements are listed in the repository's README.md to prevent runtime errors【README.md†L22-L23】【README.md†L39-L41】.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →