Profiles System
Janus Profiles System
Section titled “Janus Profiles System”Janus profiles are capability sets that adapt the language to different use cases while maintaining identical semantics. Think of them as different lenses through which you view the same language.
Profiles restrict language complexity, not capability. Every profile speaks the same grammar; only the available features change.
The Profile Matrix
Section titled “The Profile Matrix”Janus operates on two orthogonal axes: Capability Set and Execution Mode.
EXECUTION MODE strict fluid ┌──────────────┬──────────────┐ core │ :core │ :script │ Teaching/Scripting ├──────────────┼──────────────┤ service │ :service │ :service! │ Backend Services CAPABILITY ├──────────────┼──────────────┤ SET │ :cluster │ :cluster! │ Distributed Logic ├──────────────┼──────────────┤ compute │ :compute │ :compute! │ NPU/GPU Kernels ├──────────────┼──────────────┤ sovereign │ :sovereign │ (N/A) │ Systems Programming └──────────────┴──────────────┘- No suffix = strict mode (Monastery: AOT compiled, explicit)
!suffix = fluid mode (Bazaar: JIT/interpreted, sugared)
The Six Profiles
Section titled “The Six Profiles”:core — The Teaching Subset
Section titled “:core — The Teaching Subset”Status: 100% Complete | Feels like: Python
| Aspect | Specification |
|---|---|
| Types | i64, f64, bool, String, Array, HashMap |
| Constructs | func, let, var, if, else, for, while, return |
| Concurrency | None (single-threaded) |
| Publishable | Yes |
Perfect for: Learning, CLI tools, embedded systems.
:script — The Gateway Drug
Section titled “:script — The Gateway Drug”Status: Planned | Feels like: Lua/Julia
| Aspect | Specification |
|---|---|
| Base | All :core capabilities |
| Sugar | Implicit types, returns, allocators |
| REPL | Interactive evaluation |
| Top-level code | Allowed |
| Publishable | No (must migrate to :core) |
Perfect for: Rapid prototyping, data science, exploration.
:service — Application Engineering
Section titled “:service — Application Engineering”Status: 100% Complete | Feels like: Go
| Aspect | Specification |
|---|---|
| Base | All :core capabilities |
| Error Handling | Error-as-values, result types |
| Concurrency | CSP channels, nurseries, async/await, select |
| Resources | using statement, CancelToken, defer |
| Generics | Simple generics with constraints |
Perfect for: Web services, APIs, microservices, backend systems.
func fetch_all(urls: []string) do nursery |n| do for url in urls do n.spawn(async fetch(url)) end end // All tasks complete or cancel here.end:cluster — Distributed Systems
Section titled “:cluster — Distributed Systems”Status: Planned | Feels like: Erlang/OTP
| Aspect | Specification |
|---|---|
| Base | All :service capabilities |
| Actors | Traditional ephemeral actors |
| Grains | Virtual actors with auto-lifecycle |
| Supervision | OTP-style supervision trees |
| Location | Transparent (runtime decides placement) |
Perfect for: Distributed systems, game servers, chat, resilient backends.
:compute — Parallel Compute
Section titled “:compute — Parallel Compute”Status: Planned | Feels like: Julia/CUDA
| Aspect | Specification |
|---|---|
| Base | All :core capabilities |
| Tensors | tensor<T, Dims> types |
| Memory Spaces | on sram, on dram, on vram |
| Device Targeting | on device(npu), on device(gpu), on device(auto) |
Perfect for: AI/ML workloads, scientific computing, GPU/NPU kernels.
:sovereign — Total Control
Section titled “:sovereign — Total Control”Status: Planned | Feels like: Zig/Rust
| Aspect | Specification |
|---|---|
| Base | All capabilities from all profiles |
| Raw Pointers | *T with manual memory management |
| Comptime | Full compile-time metaprogramming |
| Effects | Complete effect system with capabilities |
| Unsafe Blocks | unsafe { } for raw operations |
Perfect for: Operating systems, device drivers, high-performance systems.
Execution Modes
Section titled “Execution Modes”Strict Mode (Monastery) — Default
Section titled “Strict Mode (Monastery) — Default”Compiled ahead-of-time with explicit semantics. All types declared, allocators visible.
Fluid Mode (Bazaar) — Opt-in
Section titled “Fluid Mode (Bazaar) — Opt-in”Append ! to profile name for sugared execution. Types inferred, allocators implicit, top-level code allowed.
{.profile: service!.} // Fluid mode shorthandMigration Paths
Section titled “Migration Paths”Beginner to Professional:
:script → :core → :service → :cluster → :sovereign (play) (learn) (build) (scale) (master)Go Developer to Distributed:
:service → :clusterData Scientist to ML Engineer:
:script → :core + :compute → :sovereign + :computeCompatibility Guarantees
Section titled “Compatibility Guarantees”- Upward Compatible —
:corecode compiles identically in all higher profiles - Stable Semantics — Enabling features never changes
:corebehavior - Alias Stability — Profile names work forever
- Desugar Truth — Every sugar has published, queryable desugaring
Next Steps
Section titled “Next Steps”- [Quick Start]/learn/getting-started/ — Write your first program in
:core - [Why Janus?]/learn/introduction/ — The philosophy behind the design
Janus Profiles = Capability Sets × Execution Modes
One language, many lenses — eternal harmony.