{"id":31757394,"url":"https://github.com/osbm/programming-languages","last_synced_at":"2025-10-19T01:03:08.914Z","repository":{"id":311262527,"uuid":"1043197231","full_name":"osbm/programming-languages","owner":"osbm","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-16T12:16:24.000Z","size":1813,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-16T13:35:58.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osbm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-23T10:44:10.000Z","updated_at":"2025-09-03T16:18:25.000Z","dependencies_parsed_at":"2025-09-16T13:22:52.235Z","dependency_job_id":null,"html_url":"https://github.com/osbm/programming-languages","commit_stats":null,"previous_names":["osbm/programming-languages"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/osbm/programming-languages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbm%2Fprogramming-languages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbm%2Fprogramming-languages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbm%2Fprogramming-languages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbm%2Fprogramming-languages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osbm","download_url":"https://codeload.github.com/osbm/programming-languages/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osbm%2Fprogramming-languages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001944,"owners_count":26083244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-09T19:59:11.492Z","updated_at":"2025-10-09T19:59:12.449Z","avatar_url":"https://github.com/osbm.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Programming Languages Collection\n\nA comprehensive Nix flake that contains examples of different programming languages, all implementing the same algorithm for easy comparison.\n\n## 🎯 Overview\n\nEach example prints \"hello world!\" and performs a computation about the **Collatz Conjecture**. All implementations are kept as similar as possible to showcase language differences while maintaining algorithmic consistency.\n\n## 🔧 Usage\n\nYou can build and run any language example using Nix:\n\n```bash\n# Build and run Python example\nnix run github:osbm/programming-languages#python\n\n# Or you can first build and then run to compare compilation and execution times\nnix build github:osbm/programming-languages#rust\nnix run github:osbm/programming-languages#rust\n```\n\n## 🐳 Docker Usage\n\n### Pre-built Images (Recommended)\n\nPre-built Docker images are automatically published to GitHub Container Registry:\n\n```bash\n# Run any language directly from GitHub Container Registry\ndocker run --rm ghcr.io/osbm/programming-languages-python:latest\ndocker run --rm ghcr.io/osbm/programming-languages-rust:latest\ndocker run --rm ghcr.io/osbm/programming-languages-cpp:latest\n```\n\n### Building Your Own Images\n\nYou can also build and run the examples as Docker images locally:\n\n```bash\n# Build a Docker image for C++ on x86_64-linux\nnix build .#dockerImages.x86_64-linux.cpp\n\n# Load the image into Docker\ndocker load \u003c result\n\n# Run the Docker container\ndocker run --rm programming-languages-cpp\n```\n\nAvailable Docker images for each supported architecture:\n- `x86_64-linux` - Intel/AMD 64-bit Linux\n- `aarch64-linux` - ARM 64-bit Linux\n- `x86_64-darwin` - Intel/AMD 64-bit macOS\n- `aarch64-darwin` - ARM 64-bit macOS (Apple Silicon)\n\n**Note:** CUDA does not work idk why...\n\n\n## 📊 What Each Program Does\n\n1. **Prints \"hello world!\"**\n2. **Computes Collatz sequences** for numbers 1 to 1,000,000\n3. **Finds the longest sequence** and reports:\n   - `n*` - The starting number with the longest sequence\n   - `steps` - Number of steps in that sequence\n   - `peak` - Highest value reached during computation\n   - `xor_steps` - XOR checksum of all step counts\n\n## 🎨 Implemented Languages\n\n- ✅ **Assembly** - Low-level programming\n- ✅ **Bash** - Shell scripting\n- ✅ **Bun** - Fast JavaScript runtime\n- ✅ **C** - Classic systems programming\n- ✅ **C (assembly)** - C with partial assembly implementation (contributed by [bdrtr](https://github.com/bdrtr))\n- ✅ **C-Zig** - Zig calling C functions for computation (contributed by [bdrtr](https://github.com/bdrtr))\n- ✅ **C++** - Object-oriented systems programming\n- ✅ **C#** - .NET object-oriented programming\n- ✅ **Clojure** - Lisp dialect for JVM\n- ✅ **Crystal** - Ruby-like syntax, C-like performance\n- ✅ **Cuda** - GPU programming\n- ✅ **Cython** - Python with C extensions\n- ✅ **D** - Systems programming with garbage collection\n- ✅ **Dart** - Client-optimized programming\n- ✅ **Deno** - Modern JavaScript/TypeScript runtime\n- ✅ **Elixir** - Concurrent functional programming\n- ✅ **Erlang** - Fault-tolerant concurrent programming\n- ✅ **F#** - .NET functional-first language\n- ✅ **Fish** - Friendly shell scripting\n- ✅ **Fortran** - Scientific and numerical computing\n- ✅ **Gleam** - Type-safe for Erlang VM\n- ✅ **GLSL** - Graphics shader language\n- ✅ **Go** - Concurrent systems programming\n- ✅ **Go (concurrency)** - Go but with concurrency  (contributed by [bdrtr](https://github.com/bdrtr))\n- ✅ **Haskell** - Pure functional programming\n- ✅ **Java** - Enterprise object-oriented programming\n- ✅ **JavaScript (Node.js)** - Web and server scripting\n- ✅ **Julia** - High-performance scientific computing\n- ✅ **Kotlin** - Modern JVM language\n- ✅ **Lisp** - Classic functional programming\n- ✅ **Lua** - Lightweight scripting\n- ✅ **Nim** - Efficient, expressive systems programming\n- ✅ **Nix** - Functional package management language\n- ✅ **Nushell** - Modern shell with a focus on data\n- ✅ **OCaml** - ML family functional language\n- ✅ **Octave** - MATLAB-compatible mathematical programming\n- ✅ **Perl** - Text processing and scripting\n- ✅ **PHP** - Web development scripting\n- ✅ **PowerShell** - Object-oriented shell\n- ✅ **Prolog** - Logic programming\n- ✅ **Python** - General-purpose scripting\n- ✅ **PyPy** - High-performance Python implementation\n- ✅ **R** - Statistical computing\n- ✅ **Racket** - Modern Lisp/Scheme\n- ✅ **Ruby** - Elegant scripting language\n- ✅ **Rust** - Memory-safe systems programming\n- ✅ **Scheme** - Minimalist Lisp dialect\n- ✅ **TypeScript** - Typed JavaScript\n- ✅ **V** - Simple, fast compilation\n- ✅ **Zig** - Simple, fast systems programming\n\n\n## 🎯 Remaining Languages\n\n- 🔄 **Bend** - Parallel programming language\n\n\n## 🏆 Example Output\n\nAll programs produce identical output (though some programs do not count all the way up to 1,000,000 due to performance constraints):\n\n```\nhello world!\ncollatz_longest(1..1000000)\nn*=837799\nsteps=524\npeak=2974984576\nxor_steps=880\n```\n\n## 🛠️ Requirements\n\n- **Nix** with flakes enabled\n- **Internet access** (nix will take care of fetching dependencies)\n\n## 📈 Contributing\n\nFeel free to contribute new language implementations! Each language should:\n\n1. Print \"hello world!\"\n2. Implement the Collatz conjecture algorithm\n3. Produce the exact same numerical output\n4. Be buildable with Nix\n5. Follow the existing project structure\n\n## 📜 License\n\nThis project is open source and available under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosbm%2Fprogramming-languages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosbm%2Fprogramming-languages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosbm%2Fprogramming-languages/lists"}