GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - programmersd21/perm: ๐Ÿš€ sorting, tui-fied

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
assets/screenshots
assets/screenshots
 
 
docs
docs
 
 
examples
examples
 
 
perm
perm
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation


Perm screenshot
Perm

Terminal-first sorting visualizer, benchmarker & trace debugger

PyPI Downloads License Python Ruff
Stars Last commit

Wireshark for sorting โ€ข htop for sorting โ€ข Blender-level observability

Features โ€ข Installation โ€ข Quick Start โ€ข Commands โ€ข Configuration โ€ข Plugins โ€ข Architecture โ€ข Benchmarks


Features

๐ŸŽฏ Core

  • 13+ sorting algorithms - From Bubble to PDQSort, each fully instrumented
  • 8 dataset generators - Random, reversed, nearly sorted, organ pipe, sawtooth, gaussian, adversarial
  • 8 visualization modes - Bars (CAVA-style gradient), horizontal, dots, heatmap, braille, block, numeric, motion trails
  • Real-time metrics - Comparisons, swaps, writes, reads, allocations, recursion depth
  • Live complexity overlay - Watch O(n), O(n log n), O(nยฒ) emerge in real-time

๐Ÿ”ฌ Analysis

  • Full operation tracing - Every compare, swap, write, read captured with msgspec
  • Statistical benchmarking - Warmup phase, outlier removal, percentile metrics
  • ELO tournament arena - Algorithms compete in round-robin with ELO ratings
  • Trace replay - Step forward/backward through any recorded sort with debugger-like controls

๐Ÿ–ฅ Terminal UI

  • Responsive Textual dashboard - Real-time updates at 60 FPS
  • Keyboard-driven - All controls accessible without a mouse
  • Theme support - Dark/light themes with rich color schemes
  • Live visualization - Watch sorting algorithms execute element-by-element

๐Ÿ”Œ Extensibility

  • Plugin system - Add algorithms, datasets, and visualizers without modifying core
  • Multi-format export - JSON, CSV, Markdown, HTML
  • Session recording - Save and restore complete experiments

Installation

pip install perm # coming soon...

Or install from source:

git clone https://github.com/programmersd21/perm.git
cd perm
pip install -e ".[dev]"

Quick Start

Run the Terminal UI

perm-ui

Run a Single Sort

perm run --algorithm QuickSort --dataset Random --size 100

Watch Sort Animation (CAVA-style)

perm run --algorithm QuickSort --dataset Random --size 50 --viz

Cycle through visualization modes during animation:

perm run --algorithm QuickSort --dataset Random --size 50 --viz --viz-mode dots
perm run --algorithm QuickSort --dataset Random --size 50 --viz --viz-mode heatmap
perm run --algorithm QuickSort --dataset Random --size 50 --viz --viz-mode braille
perm run --algorithm QuickSort --dataset Random --size 50 --viz --viz-mode block

Adjust animation speed:

perm run --algorithm QuickSort --dataset Random --size 100 --viz --fps 60

Benchmark an Algorithm

perm benchmark --algorithm QuickSort --dataset Random --size 10000 --iterations 10

Run an Algorithm Tournament

perm arena BubbleSort QuickSort MergeSort --datasets Random Reversed --sizes 1000 5000

Replay a Trace

perm replay trace.permdata

Export Results

perm export --format json --algorithm QuickSort --dataset Random --size 10000

Commands

Command Description
perm run Run a single sort and display results. Use --viz for CAVA-style live animation, --viz-mode to switch visualizer, --fps to control speed
perm benchmark Run statistically sound benchmarks
perm arena Run algorithm tournaments with ELO rankings
perm replay Replay a sorting trace
perm datasets List or generate datasets
perm export Export benchmark results
perm plugins Manage plugins
perm config View or edit configuration
perm-ui Launch the Textual terminal UI

Configuration

Perm uses a perm.toml configuration file:

[perm]
theme = "dark"
fps = 60
visualizer = "heatmap"
dataset_size = 10000
benchmark_iterations = 10
benchmark_warmup = 3
trace_buffer_size = 1000000
replay_fps = 30
bar_max_elements = 200
export_dir = "./exports"
plugin_dirs = ["./plugins"]

Config file search order:

  1. $PERM_CONFIG_DIR/perm.toml
  2. ./perm.toml
  3. ~/.config/perm/perm.toml
  4. ~/.perm.toml

Visualization Modes

Bars (CAVA-style)

Beautiful gradient bars with state-colored highlights and smooth Unicode block edges:

โ–‚โ–ƒโ–…โ–‡โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‡โ–…โ–ƒโ–‚โ–

Gradient transitions from deep blue (bottom) โ†’ cyan (middle) โ†’ pale white (top).

Keybinding Action
Space Play/Pause animation
โ†’ Step forward one frame
โ† Step backward one frame
Home Jump to start
End Jump to end
q / Escape Quit

Horizontal Bars

Left-to-right gradient bars, each row is one element:

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ

Dots

ยท ยท โ€ข โ€ข โ— โ— ยท ยท โ€ข

Heatmap

โ–‘ โ–’ โ–“ โ–ˆ โ–“ โ–’ โ–‘

Braille

High-density dot-matrix rendering using Unicode braille characters:

โฃ€โฃ„โฃ†โฃ‡โฃคโฃฆโฃงโฃทโฃฟ

Block

Multi-row block rendering with partial block characters:

โ–ˆโ–ˆโ–ˆโ–ˆ
โ–ˆโ–ˆโ–ˆโ–ˆ
 โ–ˆโ–ˆ

Numeric

42 17 85 3 91 56

Motion Trails

Track element movement history with fading trails.


Algorithms

Category Algorithm Complexity
Basic Bubble Sort O(nยฒ)
Basic Selection Sort O(nยฒ)
Basic Insertion Sort O(nยฒ)
Intermediate Merge Sort O(n log n)
Intermediate Quick Sort O(n log n)
Intermediate Heap Sort O(n log n)
Intermediate Shell Sort O(n logยฒ n)
Advanced TimSort O(n log n)
Advanced IntroSort O(n log n)
Advanced PDQSort O(n log n)
Advanced Radix Sort O(nk)
Advanced Bitonic Sort O(logยฒ n)
Advanced Cycle Sort O(nยฒ)

Plugins

Create a file in the plugins/ directory:

from perm.plugins.base import AlgorithmPlugin
from perm.algorithms.base import SortAlgorithm

class MySort(SortAlgorithm):
    name = "MySort"
    def sort(self, data): return sorted(data)

class MyPlugin(AlgorithmPlugin):
    name = "my-sort"
    def get_algorithm(self): return MySort

See the Plugin Guide for details.


Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                   CLI (Typer)                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                   TUI (Textual)                   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Algorithms โ”‚ Datasets โ”‚ Tracing โ”‚ Metrics        โ”‚
โ”‚  Visualizer โ”‚ Benchmarks โ”‚ Arena โ”‚ Replay         โ”‚
โ”‚  Exporters โ”‚ Plugins โ”‚ Config                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

See Architecture Docs for details.


Benchmarks

QuickSort on 10,000 elements:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Mean:    1.234 ms     P95:    1.456 ms           โ”‚
โ”‚  Median:  1.210 ms     P99:    1.567 ms           โ”‚
โ”‚  StdDev:  0.089 ms                                โ”‚
โ”‚  Comparisons:  147,210   Swaps:  42,118           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Performance

  • 100,000+ elements - Handled with ease
  • Millions of trace events - Efficient msgspec serialization
  • 60 FPS visualization - Non-blocking async Textual rendering
  • Sub-millisecond timing - Nanosecond precision instrumentation

Contributing

Contributions are welcome! See the Developer Guide.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -am 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing)
  5. Open a Pull Request

License

MIT


GitHub Topics

Add these 20 tags to the repository for discoverability:

sorting-visualization, sorting-algorithms, algorithm-visualization, terminal-app,
cli-tool, benchmarking, data-structures, python, textual, rich,
algorithm-analysis, performance-analysis, educational, developer-tools,
sorting-algorithm-visualizer, ascii-animation, cava-style, data-visualization,
profiling, debugger

Perm - The Sorting Observatory
Built with Python, Textual, Rich, NumPy, msgspec, and โค๏ธ

About

๐Ÿš€ sorting, tui-fied

Topics

algorithm-analysisalgorithm-visualizationascii-animationbenchmarkingcavacli-tooldata-structuresdata-visualizationdeveloper-toolseducationalperformance-analysisprofilingpythonrextualsorting-algorithmssorting-visualizerterminal-appterminal-uituivisualization

Resources

Readme
Activity

Stars

2 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.