Releases: dliting/nlang
Release list
NLang 0.5.0 — IDE debugging in nide
NLang 0.5.0 adds a debugging suite to nide — set breakpoints, run, step and inspect directly in the IDE.
Debugging in nide
- F5 starts a debug session: the program builds, then runs to the first
breakpoint or to completion; pressing F5 again continues. Shift+F5
stops the session — a hard terminate that always works, including inside
infinite loops or native code. Run without debugging moved to Ctrl+F5. - F9 (or a gutter click) toggles a breakpoint: a filled dot is bound in
the live session, a hollow dot is not. Breakpoints persist across nide
restarts and follow file renames. - F10/F11/Shift+F11 step over/into/out. The paused line is highlighted
with a gutter arrow. - The new 调试 page shows the session status, a 抛异常时中断
(break-on-throw) switch, the call stack (clicking a frame selects it,
jumps to the line and refreshes locals) and the selected frame's locals. - Program output and error backtraces stream to the 运行输出 page.
nide drives the existing ndb through a new machine interface (ndb --machine, a tab-separated line protocol) in a child process — the IDE
never links the VM, and stopping always terminates the child.
Engine
- Loop debug anchors now fire on every iteration (gdb-aligned): a
breakpoint on awhile/forline hits per iteration. IHostIo— a host I/O seam for embedded front ends: output arrives
through a callback, and a host that declares no input makes
io.readLineraise a catchable IOException instead of consuming the
embedder's stream.DebugSessionControllerextracted as the front-end-agnostic session
core; the CLI and machine front ends are thin adapters over it.
See the docs site (在 nide 中调试) for a walkthrough, including the v1
limitations (no stdin in a session, no line-drift tracking within a
session).
NLang 0.4.0 — ndb CLI debugger
NLang 0.4.0 adds ndb, a CLI debugger for compiled modules.
ndb — ndb <module.nmod>
- Breakpoints:
b <file.n:LINE | LINE | funcName>(a bareLINEresolves in
the current frame's file),i bto list,d <id>to delete ccontinue;s/n/fstep into / over / out;btbacktrace;
frame <n>select a frame;info locals;p <name>print one locall [line]source window with a->stop marker;xdisassembly of the
selected frame with the current pc markedcatch on|off— break on throw (freezes at the throw site, before
unwinding, with the full stack and locals still alive)- Initial stop at the first statement (like gdb
start); stdin EOF behaves
likeq; ndb exits with the debugged program's exit code
VM debug hooks (for embedders)
IDebugHooks— statement and throw checkpoints;IVmDebugView— a
read-only view over the frozen state (frames, locals, display strings).
Front-end-agnostic interfaces a future DAP adapter or the IDE can reuse.- Disassembly printing extracted into a shared
Disassembler; ndisasm
output is byte-identical.
.nmod format v1.9
- Each function records its source file path — the basis for cross-file
breakpoint addressing (b file.n:LINE). - The import merge now also copies
func.locals, fixing a pre-existing GC
root-set hole where imported frames had an empty root set. - Breaking: the format floor is raised from 8 to 9 — older modules are
refused by the loader and must be recompiled.
Install
Windows: unzip the portable zip anywhere, or run the NSIS installer.
Feedback welcome at https://github.com/dliting/nlang/issues.
NLang 0.3.0
Added
- nide: the About dialog now shows the project's GitHub address
(https://github.com/dliting/nlang) as a blue underlined link; clicking
it opens the default browser.
Changed
- Language:
&&and||now short-circuit — the skipped operand is
never evaluated (no side effects, no throws), matching C/C++/Java/Python
conventions. Results stayint0/1. Operands of&&,||and!
must now beint: float/string operands were previously read as raw bits
with meaningless truthiness and are now a compile error.
Breaking: the eager OP_LogicalAnd/OP_LogicalOr bytecode instructions
were removed — old .nmod modules must be recompiled.
As with previous releases, the zip and the NSIS installer contain the same
layout: bin/ with nide, ncc, nvm, ndisasm and the Qt runtime, plus
examples/, the offline documentation site, LICENSE, CHANGELOG.md and
README.md. The installer defaults to C:\Program Files\NLang; the zip is
portable — unzip anywhere writable and run bin\nide.exe.
NLang 0.2.0
Second release.
- nide: File > Recent submenu — recent solutions, projects and files (most-recently-used, persisted across sessions, disambiguated by parent directory).
- Centralized version management: the repository-root VERSION file is now the single source of the version — tool --version output, the About dialog, the docs-site footer and package names all derive from it.
- Debuts CHANGELOG.md (Keep a Changelog format).
Windows assets: portable zip and NSIS installer. The executables link the MSVC runtime dynamically — install the VC++ Redistributable (aka.ms/vs/17/release/vc_redist.x64.exe) if Visual Studio 2022 is not on the machine.
Gates at tag time: ctest 36/36, e2e 821 passed / 0 failed, nlang-docs pytest 49 passed / 5 skipped, verify_package OK.
NLang 0.1.0
First public release of NLang.
NLang is a statically-typed scripting language extracted from a game engine I previously developed, shipped as a standalone teaching/research project: a compiler front end (ncc), a custom bytecode VM (nvm), a disassembler (ndisasm) and a Qt5 IDE (nide).
Downloads (Windows x64)
NLang-0.1.0-win64.zip— portable: unzip and runbin\nide.exeNLang-0.1.0-win64.exe— NSIS installer (Start Menu shortcut, defaults toC:\Program Files\NLang)
Both packages contain the full toolchain, runnable examples and the bundled offline documentation site (also reachable from the IDE Help menu). Packaging is verified per build: layout audit, offline docs-site audit, and a real compile-and-run smoke test of examples/hello.n with the packaged tools.
Language highlights
- Static typing with classes, structs, interfaces and enums; generics via built-in
List<K>/Dict<K,V> - Function and method references (
Func), exception handling withfinally, string interpolation,switch,foreachover arrays and collections - Explicit cross-module imports (
.nprojprojects, external.nmodmodules) - Standard library:
io/math/fsnamespaces plus built-in string methods
Notes
- The executables link the MSVC runtime dynamically — install the VC++ Redistributable if Visual Studio 2022 is not present.
- The installer defaults to
C:\Program Files\NLang(needs admin); copyexamples/to a writable folder before opening them in the IDE.
Test baseline at tag: 821 end-to-end tests and 32 ctest suites, all passing.
Building from source, the language reference and indexed examples: see the repository README.
