For pure Common Lisp UI libraries that aren't bindings and favor declarative patterns like Model-View-Update (MVU), CLOG and CLIM are the primary candidates, though they differ in approach:
Declarative Web-Based UI: CLOG
CLOG (GitHub) is a browser-rendered GUI framework written entirely in Common Lisp. It enables declarative UI development using HTML/CSS/JavaScript abstractions while allowing direct Lisp control:
Pure Lisp: No external dependencies or bindings; renders UIs via a local web browser.
Declarative Syntax: UIs are defined using Lisp macros that mirror HTML structure, e.g.:
MVU-like Patterns: Supports reactive programming through event handlers and state management, aligning with declarative paradigms.
Cross-Platform: Works on Linux, Windows, and macOS without requiring external GUI toolkits[3][5][7].
Native Declarative Framework: CLIM
The Common Lisp Interface Manager (CLIM) provides a Lisp-native GUI toolkit with declarative elements:
Presentation Types: Declaratively define UI components and their interactions using CLOS.
McCLIM (a modern implementation) supports dynamic UI updates and layout abstractions, though it traditionally follows a more imperative style[3][5][7].
Platform Requirements: May require X11 on Linux/Windows, limiting "pure" out-of-the-box deployment[3].
Other Considerations
cells-gtk: A declarative GTK+ wrapper, but it relies on GTK bindings[2][7].
LIL (Lisp Interface Library): Focuses on data structures (pure/stateful) in Interface-Passing Style, not directly a UI library[1].
Web-Based Alternatives: Libraries like cl-gui or cl-icebox use web tech but lack CLOG's active development and feature set[2][7].
For a non-binding, declarative approach, CLOG is the strongest choice, offering modern web-based UI development entirely in Lisp. CLIM provides a native alternative but with a steeper learning curve.
User
Does it make sense to create new gui framework in lisp?
Assistant
Creating a new GUI framework in Lisp could be justified if it addresses specific gaps in the ecosystem, but the decision depends on balancing Lisp's unique strengths with existing solutions and practical challenges:
Advantages of a Lisp-Based GUI Framework
Interactive Development: Lisp's REPL and hot-reloading enable rapid GUI prototyping and real-time adjustments, a significant advantage over statically compiled languages[2][7].
Declarative Potential: Lisp macros allow creating domain-specific languages (DSLs) for declarative UI definitions, aligning with modern paradigms like MVU[5][7].
Cross-Platform Native Code: Common Lisp compiles to efficient native binaries, avoiding reliance on virtual machines or interpreters[1][4].
Challenges and Existing Alternatives
Current Options
CLOG: A pure Lisp, browser-based framework with declarative HTML/CSS abstractions and reactive programming[3][5].
CLIM/McCLIM: A native toolkit with presentation types and dynamic updates, though complex and lacking modern backends[3][5].
Bindings (GTK, Qt, IUP): Functional but require interfacing with C libraries, complicating deployment and limiting Lisp-specific optimizations[2][3].
Proprietary Tools (CAPI): LispWorks' cross-platform framework is robust but closed-source[3][4].
Key Gaps
Native Declarative Frameworks: Most native options (e.g., CLIM) follow imperative patterns or lack active development[5][7].
Documentation and Adoption: Existing tools suffer from sparse examples and small communities, hindering onboarding[2][3].
Mobile Support: Only proprietary solutions (e.g., LispWorks) offer iOS/Android GUIs[4].
When Does a New Framework Make Sense?
Targeting Niche Use Cases:
If the goal is to leverage Lisp's macros for a highly specialized DSL (e.g., scientific visualization), a new framework could outperform generic solutions.
Modernizing CLIM:
Enhancing McCLIM with native backends (e.g., Vulkan/Skia) or simplifying its API could revive its relevance[5].
Bridging Web and Native:
A framework combining CLOG's web-based ease with native rendering (via WebView or WASM) might attract developers seeking cross-platform simplicity[3][5].
Risks and Considerations
Ecosystem Fragmentation: Competing with established tools like CLOG or CLIM could split the community[3][5].
Maintenance Overhead: GUI frameworks require long-term commitment to handle OS updates, drivers, and bug fixes[2][7].
Adoption Barriers: Convincing developers to adopt a new framework in a niche language is challenging without clear advantages over Python/Qt or JavaScript/Electron[1][7].
Conclusion
A new Lisp GUI framework is worthwhile only if it:
Fills an unmet need (e.g., declarative native mobile GUIs).
Builds on existing efforts (e.g., extending CLOG for native rendering or simplifying CLIM).
Otherwise, contributing to mature projects like CLOG or McCLIM may yield better ecosystem returns.