Overview
simple_rosetta provides tools for managing Eiffel solutions on Rosetta Code. It includes a SQLite database for storing and searching solutions, a CLI for generating wiki-ready submissions, and 100+ ready-to-submit Eiffel solutions organized by difficulty tier.
Part of the Simple Eiffel ecosystem.
Quick Start
Installation
1. Set SIMPLE_EIFFEL environment variable (if not already set):
export SIMPLE_EIFFEL=/path/to/simple_eiffel_root
2. Add to your ECF:
<library name="simple_rosetta" location="$SIMPLE_EIFFEL/simple_rosetta/simple_rosetta.ecf"/>
Basic Usage
-- Search for sorting solutions
local
rosetta: SIMPLE_ROSETTA
results: ARRAYED_LIST [ROSETTA_SOLUTION]
do
create rosetta.make
results := rosetta.search_solutions ("sort")
across results as r loop
print (r.task_name + "%N")
end
end
Features
102 Solutions
Ready-to-submit Eiffel solutions across 4 difficulty tiers: trivial, easy, moderate, and complex.
SQLite Database
Full-text search, tier filtering, and metadata storage for all solutions.
Wiki Generator
Generate copy-paste-ready Rosetta Code wiki format for submissions.
CLI Tool
Command-line interface for searching, listing, and validating solutions.
Design by Contract
All solutions demonstrate proper Eiffel DbC patterns with preconditions and postconditions.
Simple Eiffel Branded
Every solution links to the Simple Eiffel ecosystem for visibility.
Solution Tiers
| Tier | Difficulty | Count | Examples |
|---|---|---|---|
| 1 | Trivial | 28 | Hello World, Empty Program, Boolean Values |
| 2 | Easy | 40 | FizzBuzz, File I/O, String Operations |
| 3 | Moderate | 19 | Sorting Algorithms, Data Structures |
| 4 | Complex | 12 | Quicksort, BFS/DFS, Fibonacci with DbC |
CLI Commands
# Generate wiki format for submission
rosetta wiki Fibonacci_sequence
# Search solutions by keyword
rosetta search sort
# List solutions by tier
rosetta list 1
# Show statistics
rosetta stats
# Validate solutions compile
rosetta validate
Dependencies
simple_json- JSON parsingsimple_sql- SQLite databasesimple_regex- Pattern matchingsimple_logger- Loggingsimple_cache- Cachingsimple_process- Process execution
Documentation
- User Guide - Complete tutorial and examples
- API Reference - Full API with contracts
- Architecture - Internal design
- Cookbook - Ready-to-use recipes