Tacopy
Tail Call Optimization for Python
Details
- External ID
- 46094330
- Source
- HN
- Company
- —
- Product
- Tacopy
- Website domain
- github.com
- Launched
- Nov. 30, 2025
- Cohort
- —
- Upvotes
- 95
- Upvotes percentile
- 0.9050218340611353
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Enrichment
- Theme
- ML inference and model optimization
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- tail call optimization for python
- Manually corrected
- False
Could you build this?
No Tail Call Optimization (TCO) for Python requires modifying the CPython bytecode, manipulating the call stack frames, or writing custom AST/bytecode transformers. This demands deep, specialized understanding of Python's runtime internals and CPython bytecode execution.
What it would actually take: A real implementation requires either an AST transformer that rewrites tail-recursive functions into iterative while-loops or a low-level bytecode manipulation library (like bytecode or dis/opcode hacking) that inspects frames and replaces CALL/RETURN opcodes with JUMP instructions. It requires specialized knowledge of Python virtual machine internals, frame management, and edge-case preservation of stack traces and sys._getframe callers.
Discussion
20 comments analyzed.
Competitors mentioned: PyPy (alternative performance optimization approach), JavaScript engines (Safari JSC, V8, WebAssembly), Scheme/ML/PureScript (functional languages with native TCO)
Concerns raised: Breaks semantics of tail recursion within loops, Only optimizes direct self-recursion, not mutual recursion, No true Tail Call Optimization (TCO), only tail recursion optimization, Stack traces become messy (JavaScript PTC experience), Less idiomatic than loops in mainstream Python culture
Feature requests: Support mutual recursion between functions, Support true TCO with trampolines for any tail position calls, Handle tail recursion within loops correctly
Competitors
Other products that read as similar to this one — 461 launches clear the similarity bar, closest 8 shown.
Attention rank: #46 of 462 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 30 days after the earliest competitor.
- Tailsnitch · hn · 2026-01-05 · 280 upvotes · similarity 0.51
- Cachekit · hn · 2026-01-14 · 47 upvotes · similarity 0.47
- Powerful pipeline syntax for IPython and Jupyter · hn · 2026-01-04 · 5 upvotes · similarity 0.47
- Katharos Functional programming and CSP-style concurrency for Python · hn · 2026-08-02 · 37 upvotes · similarity 0.46
- Using Golang to Speed Up Monte Carlo Simulations · hn · 2026-08-26 · 5 upvotes · similarity 0.46
- Trello-Suite · github · 2026-09-22 · 93 upvotes · similarity 0.45
- Hyper-Fetch · github · 2026-09-21 · 9 upvotes · similarity 0.45
- pymacos · github · 2026-09-27 · 8 upvotes · similarity 0.44
Other launches for this product
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.