phicode
v1.1.1
Published
Symbolic language support for Phicode (.φ files) - Python with symbolic syntax
Maintainers
Readme
(φ) Phicode
![]()
Your Code, Your Syntax, Your Environment
Overview
Phicode is a symbolic, mathematical syntax for Python that lets you write code in a more concise and expressive way using .φ files — while staying 100% compatible with standard Python.
With the Phicode VS Code extension you can:
- Write Python using symbols and mathematical notation.
- Run
.φfiles directly, or mix them seamlessly with.pyfiles in existing projects. - Convert back and forth between Phicode ⇆ Python at any time.
Simply install the runtime with:
pip install phicode…and you’re ready to use Phicode inside VS Code.
Features
Core Language Support
- Syntax highlighting for Phicode symbols and Python keywords
- Language configuration with auto-indentation and bracket matching
- File icon theme support for
.φfiles
Development Tools
- Code Formatting: Document and range formatting with configurable rules
- IntelliSense: Hover information, definition navigation, and reference finding
- Symbol Support: Document outline and workspace-wide symbol search
- Refactoring: Rename symbols across files with cross-language support
Execution & Conversion
- Code Execution: Run & debug Phicode files
- Access the benchmark suite: Run benchmark suite
- Bidirectional Conversion: Convert between Python and Phicode syntax
- Smart Tokenization: Preserves strings and comments during conversion
Productivity Features
- Interactive Tutorial: Comprehensive symbol reference with search functionality
- Code Snippets: 50+ templates for common Phicode patterns
- Configuration Support: Customizable symbol mappings and formatting options
Installation
Prerequisites
- Python 3.8+
- Phicode runtime package
Steps
- Install the Phicode runtime:
pip install phicode- Install the extension from Visual Studio Code Marketplace:
- Open VS Code Extensions view (Ctrl+Shift+X)
- Search for "Phicode"
- Install the extension
Usage
Basic Example
Create a file with .φ extension:
# Phicode
ƒ calculate_sum(n):
total = 0
∀ i ∈ ⟪(n):
total += i
⟲ total
π(calculate_sum(10))# Python
def calculate_sum(n):
total = 0
for i in range(n):
total += i
return totalCommands
Phicode: Run File- Execute current Phicode filePhicode: Debug File- Debug current Phicode filePhicode: Convert to Phicode- Convert Python to Phicode syntaxPhicode: Convert to Python- Convert Phicode to Python syntaxPhicode: Show Tutorial- Display interactive symbol reference
Context Menu
- Right click in editor or on file
Convert to Python/Phicodefor quick conversion
Keyboard Shortcuts
Ctrl+Alt+P- Convert Python to PhicodeCtrl+Alt+Shift+P- Convert Phicode to Python
Configuration
The extension supports configuration through VS Code settings:
{
"phicode.autoConvert": true,
"phicode.symbolHints": true,
"phicode.formatting.spaceAroundOperators": true,
"phicode.formatting.spaceAfterCommas": true
}Requirements
- Visual Studio Code 1.74.0 or higher
- Python 3.8 or higher
- Phicode runtime package
Roadmap
- [ ] Custom Syntax Configuration
- [ ] Linting
- [ ] Symbol insert panel
- [ ] Local API connection to engine
Support
- Documentation: Interactive tutorial included in extension
- Issues: GitHub Issues
- Source Code: GitHub Repository
Developed by Jay Baleine
