Welcome to the TDLN examples! These demonstrate what we've discovered so far β and hint at what's still possible.
-
Core Usage (01_core_usage/)
- Basic .tdln policies
- Standard PolicyBit composition
- Context evaluation
- Discovery: Fractal structure makes nesting intuitive
-
Custom Operators (02_custom_operators/)
- Domain-specific operators (AudioFFT, ImageConv, etc.)
- Extending Expression types
- Discovery: SemanticOp::Custom("name") enables infinite domains
-
Custom Types (03_custom_types/)
- New data types (Tensors, Graphs, etc.)
- Type validation
- Discovery: Fork spec to add types, maintain determinism
-
Custom Backends (04_custom_backends/)
- Target platforms beyond default
- WebAssembly, Python, Rego
- Discovery: Same .tdln β multiple execution environments
-
Integrations (05_integrations/)
- REST APIs
- Python/JavaScript libraries
- Database triggers
- Discovery: TDLN plugs into existing systems seamlessly
Can TDLN be used for:
- Network packet filtering?
- Compiler optimization passes?
- Scientific workflow orchestration?
- Game AI decision trees?
- Financial trading rules?
- Your idea?
Platforms we haven't tried:
- Kubernetes admission controllers
- Serverless functions (Lambda, Cloud Functions)
- Message queues (Kafka, RabbitMQ)
- Blockchain smart contracts
- Edge compute (Cloudflare Workers, Fastly Compute)
Questions we can't answer yet:
- What's the largest policy graph that's practical?
- How does performance scale with nesting depth?
- Can we parallelize policy evaluation?
- What's the sweet spot for caching?
Each category has a README with:
- What the example demonstrates
- How to run it
- Expected output
- Performance characteristics (if known)
- Copy a similar example as starting point
- Modify the .tdln structure
- Validate against schema:
jsonschema -i your-example.tdln specs/tdln-core-v2.0.schema.json - Test and measure
- Share your discovery!
Found something interesting? We want to know!
- New use case: Open an issue describing it
- Performance findings: Include benchmarks
- Integration patterns: Show the code
- Unexpected behaviors: Document edge cases
- Create a new file in the appropriate category
- Include inline comments explaining decisions
- Add expected output
- Document any dependencies
- Submit a PR
- Formal verification: Can we prove policy correctness?
- Complexity analysis: What's the computational class?
- Optimization bounds: Theoretical limits?
- Type theory: Is TDLN a typed lambda calculus?
- Debugging: How to trace policy execution?
- Profiling: Where are bottlenecks?
- Visualization: Graph rendering of policy composition?
- Tooling: IDE support, linters, formatters?
Purpose: Learn TDLN fundamentals
Audience: Beginners
No customization β pure protocol usage
Purpose: Domain-specific extensions
Audience: Domain experts
Customization: New operators, same structure
Purpose: Type system extensions
Audience: Advanced users
Customization: Fork spec, extend types
Purpose: Target new platforms
Audience: Platform integrators
Customization: New CodeGenerator implementations
Purpose: Real-world deployments
Audience: Engineers
Customization: API wrappers, libraries, plugins
Share your findings! Open a discussion to:
- Report surprising behaviors
- Propose new example categories
- Share performance optimizations
- Document integration patterns
Every example here started as someone's experiment. Yours could be next.
The best discoveries are the ones we haven't made yet. Let's find them together. πβ¨