Releases: PikachuHy/pscm
PikachuHy's Scheme support Continuation now
Release Date: 20251214
We are pleased to announce the release of pscm v0.5.0.
This is a significant milestone release. Almost all of the code was written with AI assistance in Cursor after commit 8380f9c , demonstrating the power of AI-assisted development in building complex language implementations.
This version implements complete Scheme core functionality with approximately 11,000+ lines of code. Designed with reference to Guile 1.8, it provides continuation support based on setjmp/longjmp, enabling advanced control flow patterns that are essential for Scheme programming.
🎉 What's New
Complete Scheme Core Implementation
- Full type system with 17 data types
- Comprehensive parser and evaluator
- Continuation support via
setjmp/longjmp - Rich built-in function library
- Enhanced error handling with stack traces
Key Features
- Type System: Unified
SCMtype supporting 17 data types includingNIL,LIST,NUM,FLOAT,RATIO,CHAR,STR,SYM,BOOL,PROC,FUNC,CONT,MACRO,HASH_TABLE,VECTOR,PORT - Continuation Support: First-class continuations implemented using
setjmp/longjmpwithdynamic-windsupport - Parser: Hand-written recursive descent parser with full Scheme syntax support
- Evaluator: Tail-recursive optimized evaluator with modular special form handling
- Error Handling: Enhanced error reporting with source location tracking and call stack traces (up to 20 levels)
📦 Core Functionality
Data Structures
- Lists with dotted pair support
- Lexical scoping with environment chains
- Hash tables with three equality modes (
eq?,eqv?,equal?) - Fixed-length vectors with random access
Built-in Functions
Comprehensive library including:
- Type predicates:
procedure?,boolean?,null?,pair?,char?,number? - List operations:
car,cdr,cons,list,append,set-car!,set-cdr! - Numeric operations:
+,-,*,/,expt,abs(with mixed integer/float/ratio support) - String and character operations
- Vector operations
- Hash table operations
- Port operations (file and string ports)
- System operations:
exit
Special Forms
define, lambda, if, cond, case, and, or, begin, let/let*/letrec, do, for-each, map, quote, quasiquote, apply, call/cc, call-with-values, dynamic-wind
C/C++ Integration
Guile 1.8-compatible function registration:
- Fixed parameters:
scm_define_function - Generic functions:
scm_define_generic_function - Variadic functions:
scm_define_vararg_function
⚠️ Known Limitations
- Memory Management: No garbage collection (GC) implemented yet. All allocated memory is not freed, which may cause memory leaks.
- Error Handling: Most errors result in
exit(1), lacking graceful error recovery mechanisms (though call stack tracing is available). - Performance: Environment lookup uses linear search (O(n)), and symbol comparison uses
memcmp. - Missing Features: Module system, file loading functions (
load), Guile API compatibility layer.
🚀 What's Next
High Priority
- Implement garbage collection mechanism
- File loading functions (
load,primitive-load) - Guile API compatibility layer (C API interface)
Medium Priority
- Module system (code organization)
- Enhanced error handling (exception catching, currently has call stack tracing)
- More Scheme standard features (
delay/force, etc.)
📚 Documentation
🙏 Acknowledgments
Special thanks to all contributors and the AI-assisted development tools that made this release possible!
Note: pscm is still in an early stage. Please use with caution in production environments.
PikachuHy's Scheme support Unicode now
PikachuHy's Scheme support Vau now
see: http://forum.texmacs.cn/t/run-vau-success-with-pscm/1480
That's one small step for TeXmacs, one giant leap for PikachuHy's Scheme (pscm).
Highlight:
- run Vau success
- support android and ios
PikachuHy's Scheme support R4RS now
Today I released pscm v0.2.0.
Highlight:
- almost support r4rs
- a new build system pscm-build
PikachuHy's Scheme is Here
I'm very happy to announce the first release of pscm.
Highlight:
- support continuation
- support wasm
