Lispex transforms to many languages; running the output is target‑specific. Below are quick hints and common caveats.
Python
- Run:
python file.py - Virtual envs recommended for dependencies.
- Printing: use
print(...)if your snippet returns a value.
TypeScript / Node.js
- Run:
tsx file.ts(orts-node), or compiletsc && node file.js. - ESM/CJS differences can affect imports; prefer single‑file snippets.
- Printing:
console.log(...).
Go
- Run:
go run .orgo run file.go. - Module init may be required (
go mod init …) for multi‑file projects.
Rust
- Run:
cargo run(inside a crate), orrustc file.rs && ./filefor single file. - Edition/toolchain: keep
rustuptoolchain up to date.
C / C++
- Compile:
clang file.c -O2 -std=c11 -o app && ./app(adjust flags) /g++ file.cpp -O2 -std=c++17 -o app && ./app. - Mind platform‑specific line endings and
setlocaleif needed for UTF‑8.
Cross‑cutting caveats
- Encoding: assume UTF‑8; some targets need explicit locale/encoding setup.
- Newlines/paths: Windows vs POSIX differences; prefer portable path joins.
- Last value: many targets do not auto‑print — call the target’s print/log.
Open LENA code: www.lenacode.com