4 ms·
Show HN: Rift (Flexible Translator) – Build Languages in Days, Not Years
Text:
Hi HN! I'm Nnamdi from OBINexus Computing. RIFT stands for "RIFT Is a Flexible Translator" – a compiler toolchain that's a direct competitor to YACC, but designed for rapid language development.
The Problem: YACC takes 6 months to learn and 6 months to build a prototype. That's a year just to start. It's not compile-time safe, and it's painful to work with.
RIFT's Solution:
Configuration-based language building (not code generation)
Compile-time safety through token triplets (type, memory, value)
Stage-bound execution pipeline (0-6 stages)
R-syntax for inline regex without escape hell
Build a working language prototype in days
Key Innovation: The token triplet system ensures compile-time safety:
ctypedef struct {
token_type; // identifier, keyword, constant
token_memory; // static, dynamic, fluid
token_value; // immediate, deferred, computed
} rift_token_t;
Real Usage: I'm using RIFT to build GosiLang – a polyglot language that talks to any programming language (interpreted or compiled). What took a year with YACC now takes weeks.
Technical Details:
Written in C (migrating to Rust for R-syntax support)
Stage-bound configuration: .riftrc.N files
Error zones: 0-3 (OK), 3-6 (Warning), 6-9 (Critical), 9-12 (Panic)
Detach mode for full language independence
Currently building the community around RIFT philosophy. Looking for "RIFTers" who want to build languages without the traditional pain.
GitHub: https://github.com/obinexus/rift https://github.com/obinexus/rift
Video walkthrough: https://www.youtube.com/watch?v=rLkzHF7LXUA https://www.youtube.com/watch?v=rLkzHF7LXUA (28min technical deep dive)
Ecosystem: https://github.com/stars/obinexus/lists/the-rift-ecosystem https://github.com/stars/obinexus/lists/the-rift-ecosystem
- mdaniel 1y agoFriend, I don't think a readme constitutes a "Show HN"
- vidarh 1y agoSorry, but 6 months to learn YACC? And 6 months to build a prototype? Parsing is the easy part of creating a language, and you're seriously overstating the complexity of YACC. You can write your own YACC-like parser generator in far less than the time you claim it takes to learn YACC.