pseudo-lang/pseudo: transpile algorithms/libs to idiomatic JS, Go, C#, Ruby @GitHub
in python, last updates 5 years ago, MIT license
Pseudo takes an algorithm / a simple program and generates idiomatic code for it in Python, JavaScript, C#, Go and Ruby.
Pseudo achieves that with translation on two layers: it uses the target language syntax and it can express standard library methods/api of language X using language Y's native standard library
Gemini's take:
Yes, Pseudo is a fascinating project, but as you might have noticed from its commit history, it is effectively abandoned (last major activity was years ago).
If you want tools that actually work today and are maintained, here are the best modern alternatives that share that "Write Once, Transpile to Many" philosophy.
1. The "Industrial Strength" Successor: Haxe
If you want a tool that is production-ready and widely used, Haxe is the answer. It is a strictly-typed high-level language that compiles directly into source code for other languages.
Input: Haxe (syntax looks like a mix of TypeScript and C#).
Outputs: JavaScript, C++, C#, Java, Python, Lua, PHP, and Flash (historically).
Best For: Writing complex logic or entire applications (games, UI, servers) that need to run everywhere.
Why it's better than Pseudo: It has a real compiler, type safety, and a massive standard library that works across all targets.
class Main {
static function main() {
var people = ["I", "you"];
for (p in people) trace("May " + p + " be happy.");
}
}
2. The "Algorithmic" Specialist: Progsbase
This is the closest spiritual successor to Pseudo. Progsbase is designed specifically to build "timeless" libraries (algorithms, data processing) that have zero dependencies and can be instantly translated into any language.
Input: A restricted subset of Java (called "Simple Java").
Outputs: C, C++, C#, Java, JavaScript, Python, PHP, Ruby, TypeScript, and Go.
Best For: Writing a math library, a parser, or a data validation utility once and distributing it to every team in your company regardless of their language.
Philosophy: "Write the logic once, use it natively everywhere."
3. The "Modern" approach: Nim
Nim is a powerful language that compiles to C, C++, and JavaScript.
While it doesn't target every language (like Python or Java), its ability to compile to C means it can interface with almost anything (via FFI).
Why choose it: If you need high performance (C/C++) but also need to run in the browser (JS), Nim handles both beautifully with a Python-like syntax.
4. The "Concept" Tool: OneLang
OneLang is a project very similar to Pseudo. It allows you to write in a "universal" syntax (TypeScript-like) and converts it to C++, C#, Go, Java, JavaScript, Perl, PHP, Python, Ruby, and Swift.
Status: It works as a proof-of-concept but is less stable than Haxe. It's great for quick snippets but risky for production code.
Website: ide.onelang.io (You can try it directly in the browser).
Summary: Which one should you use?
| "I want to build a real app/game across platforms." | Use Haxe. It is the gold standard. |
| "I want to write a helper library (math/logic) for my team." | Use Progsbase. It keeps code clean and dependency-free. |
| "I just want to play with the concept." | Try OneLang or the abandoned Pseudo. |
| "I want a modern language that runs on C and Web." | Use Nim.
|
Here are the links to the projects discussed, categorized by their current status and best use case.
1. Haxe (The "Gold Standard")
Status: Production-Ready / Active
Best For: Full cross-platform applications (Games, UI, CLI tools).[1]
2. Progsbase (The "Algorithmic" Specialist)
Status: Active
Best For: Creating "timeless" libraries (math, data processing) with zero dependencies.
3. Nim (The Modern System Language)
Status: Production-Ready / Active
Best For: High-performance apps that need to run on C/C++ targets and the Web (JS).[1]
4. OneLang (The "Concept" Tool)
Status: Experimental (Proof of Concept)
Best For: Converting small logic snippets between languages quickly.
5. Pseudo (The one you found)
Status: Abandoned / Archive
Claude.ai's take
Interesting find! Pseudo takes a unique approach — it defines its own intermediate AST and transpiles to idiomatic code in multiple languages (Python, JS, Go, C#, Ruby). The key differentiator is generating human-readable code using each language's native standard library rather than a runtime.
Here are similar tools that share this "write once, generate idiomatic code" philosophy:
Direct Transpiler / AST-Based
- Haxe — mature cross-compiler to JS, C++, C#, Java, Python, Lua, PHP. Uses its own language, generates reasonably idiomatic output
- Nim — compiles to C, C++, JS, with readable output
- Fable — F# to JavaScript transpiler, generates clean JS
- Scala.js / Kotlin/JS / Kotlin/Native — compile to JS or native with decent output quality
- GopherJS / TinyGo — Go to JS / WebAssembly
Algorithm/Logic Focused
- Progsbase — specifically designed for algorithm portability across languages
- ANTLR — parser generator that outputs parsers in Java, C#, Python, JS, Go, C++, Swift
- Tree-sitter — generates parsers in C with bindings for many languages
DSL / Model-Driven
- JetBrains MPS — define DSLs that generate code in multiple target languages
- Xtext — DSL framework with code generation capabilities
- Acceleo — model-to-text transformation, generates from UML/EMF to any language
- StringTemplate — template engine often used for multi-language code generation
Academic / Research
- Coconut — Python superset that transpiles to clean Python (single target but similar philosophy)
- Ü (U-lang) — experimental systems language targeting multiple backends
The closest in spirit to Pseudo are probably Haxe (more mature but heavier) and Progsbase (similar algorithm-portability focus). Would any of these directions be useful for your template learning / data extraction work?
Here are the links for those tools:
Direct Transpiler / AST-Based
Algorithm/Logic Focused
DSL / Model-Driven
Other