Skip to content

Commit cca12b8

Browse files
जीवनजीवन
authored andcommitted
Add tagline, crisp abstract, Quick Start, and v0.1.0 release notes
1 parent ddb39aa commit cca12b8

1 file changed

Lines changed: 59 additions & 5 deletions

File tree

README.md

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Interactive C++ Development Through Persistent Execution Contexts: A Notebook-Based Approach
22

3+
**cpp-notebook** is a native interactive C++ notebook environment that lets you write and run C++ code cell by cell with persistent state — no Python or Jupyter backend required. It's built with Dear ImGui, Markdown cells, and real-time execution context.
4+
35
![Version](https://img.shields.io/badge/version-0.1.0-blue)
46
![C++](https://img.shields.io/badge/C++-20-00599C?logo=cplusplus)
57
![Platform](https://img.shields.io/badge/platform-macOS-lightgrey)
@@ -9,18 +11,70 @@
911

1012
## Abstract
1113

12-
We present **cppnb**, an interactive notebook environment for C++ that fundamentally rethinks how compiled languages can be used for exploratory programming. Unlike traditional C++ development workflows that require complete program compilation, our system enables cell-based execution with persistent state—similar to interpreted languages like Python, but maintaining C++'s compile-time guarantees and performance characteristics.
13-
14-
The core innovation lies in our execution engine that maintains a global context across cell executions. When you define a variable in one cell, it remains accessible in all subsequent cells. When you update that variable, the change persists. This seemingly simple behavior requires solving a fundamental incompatibility: C++ is compiled, not interpreted. You can't just "remember" variables between compilations like you can with Python.
14+
**cppnb** brings Jupyter-style interactive notebooks to C++. Write code in cells, run them individually, and watch variables, functions, and classes persist across executions—just like Python, but with C++'s compile-time safety and zero-cost abstractions.
1515

16-
Our solution reconstructs a complete C++ program for each cell execution, incorporating all previously defined variables (with their current values), functions, and classes. This approach eliminates the traditional compile-link-run cycle while preserving type safety and enabling the use of templates, operator overloading, and other C++ features that make the language powerful.
16+
The key challenge: C++ is compiled, not interpreted. When a program exits, everything is gone. We solve this by maintaining an execution context that tracks all variables, functions, and classes. For each cell execution, we regenerate a complete C++ program incorporating the entire context plus the new cell code, compile it with g++, run it, and display results. To the user, it feels interactive. To the compiler, each run is a fresh, valid C++ program.
1717

18-
Built on ImGui for immediate-mode rendering and SDL2 for cross-platform support, cppnb provides a modern interface with syntax highlighting, markdown documentation cells, variable inspection, and comprehensive error reporting. The system demonstrates that compiled languages can support interactive workflows without sacrificing their core strengths.
18+
Built on Dear ImGui and SDL2, the system includes syntax highlighting, markdown documentation, variable inspection panels, and real-time error reporting. No Python. No Jupyter kernel. Just native C++ from start to finish.
1919

2020
![Screenshot: Main Interface](https://github-production-user-asset-6210df.s3.amazonaws.com/142775323/531708364-754ccb44-330f-49ce-9758-9d3bac38048e.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20260104%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260104T083504Z&X-Amz-Expires=300&X-Amz-Signature=f78ee9318a95ae6a7a8b7db49f3fd4d1e6e851b3eca0f98d207603afbc2858b9&X-Amz-SignedHeaders=host)
2121

2222
---
2323

24+
## Quick Start
25+
26+
- **Install dependencies:** `brew install cmake sdl2` (macOS) or `sudo apt-get install cmake libsdl2-dev libgl1-mesa-dev` (Linux)
27+
- **Build:** `git clone <repo> && cd cpp-notebook && mkdir build && cd build && cmake .. && make -j4`
28+
- **Run:** `./cppnb` and start writing C++ code in cells
29+
30+
---
31+
32+
## 🛠 Version 0.1.0 — First Release (March 2025)
33+
34+
This is the inaugural release of cpp-notebook: a native, interactive C++ notebook environment that brings persistent state and exploratory workflows to compiled C++.
35+
36+
### ✨ What's Included
37+
38+
**Core Features:**
39+
- Interactive notebook UI powered by Dear ImGui & SDL2
40+
- Cell-based C++ execution with persistent global context
41+
- Variables, functions, and classes survive across cell runs
42+
- Automatic program regeneration and compilation pipeline
43+
44+
**Editor & Documentation:**
45+
- Syntax-highlighted code editor (C++20 support)
46+
- Markdown cells with live preview toggle
47+
- Native keyboard shortcuts (Cmd+C/V/Z, Shift+Enter to run)
48+
49+
**Developer Tools:**
50+
- Real-time variable inspector showing types and values
51+
- Function and class outline panels
52+
- Execution timing and error reporting
53+
- Color-coded output (green for success, red for errors)
54+
55+
**Build System:**
56+
- CMake-based cross-platform build
57+
- macOS and Linux support
58+
- Dependencies: SDL2, Dear ImGui, ImGuiColorTextEdit
59+
60+
### 🚧 Known Limitations
61+
62+
- No true debugger (breakpoints/stepping)
63+
- Limited multi-file support
64+
- Compilation can be slow for large contexts
65+
- No package manager integration
66+
- Error messages need better line number mapping
67+
68+
### 🎯 What's Next
69+
70+
- Save/load notebook files (`.cppnb` format)
71+
- Export to standalone `.cpp` or markdown
72+
- ImPlot integration for visualization
73+
- Auto-completion and IntelliSense
74+
- Precompiled headers for faster compilation
75+
76+
---
77+
2478
## 1. Introduction
2579

2680
### 1.1 The Problem with C++ Development

0 commit comments

Comments
 (0)