Skip to content

Releases: pisarev/graphbuilder-npp

1.1.0 - Rebuilt against a parser whose division was wrong

Choose a tag to compare

@pisarev pisarev released this 13 Aug 12:13

The plugin itself did not change in this release. It is rebuilt, and that is the
point of it.

Rebuild it, or the numbers can be wrong

The build shipped as 1.0.9 carries a defect in the accelerator it links: with a
function call on the right of a division, a / f(b) * c was evaluated as
a / (f(b) * c). A plotted curve from such a formula was wrong rather than
merely slower. If you have 1.0.9 installed, replace it.

The same rebuild picks up the value record now being the same size on 32 and 64
bits, so a saved script is portable between them.

What is in the archive

GraphBuilder-npp-1.1.0-win64.zip holds the Lazarus build of the library, the
WebView2 loader it needs, the panel page and installation instructions. Sizes
and checksums in INSTALL.txt are computed from the very files that go into the
archive.

The Delphi build is not published. It exists so that two independent builds can
be compared export by export before a release, and that comparison is part of
the battery.

Download

GraphBuilder-npp-1.1.0-win64.zip - 1 419 700 bytes, sha256
2bcd8c45103fc87355caf282ab831715af20dbdc98edfa58d3f610d4a7b188df.

Unpack it into a folder named GraphBuilderLaz inside the Notepad++ plugins
folder, or let Plugins Admin do it. 64-bit Windows; it needs the WebView2
runtime, which Windows 11 already has. Built with Lazarus and Free Pascal.

1.0.8 - The engine underneath gets the mask on every entry

Choose a tag to compare

@pisarev pisarev released this 07 Aug 21:17

The panel is unchanged. The parser underneath it is not.

The panel computes curves on worker threads, which is what this release is about.
Compiled scripts - the arrangement the accelerator documentation recommends for
evaluating from several threads - ran without the parser's exception mask, so
division by zero raised where the library promises infinity. A parser started
from inside another parser's evaluation, which is what a formula holding Parse
or Deriv does, inherited the caller's mask instead of installing its own.

Name lookup in the parser tables no longer converts the same string to lower case
twice. Deriv costs 3.40 microseconds a call rather than 4.05.

The pascal-mathparser release for 1.0.8 has the detail and the tests.

Download

GraphBuilder-npp-1.0.8-win64.zip - 1 444 066 bytes, sha256
585b54ea5a38db3c9c24d636be4f9fa37df1a2099bfa8fc7012f1b62c2e63a70.

Unpack it into a folder named GraphBuilderLaz inside the Notepad++ plugins
folder, or let Plugins Admin do it. 64-bit Windows; it needs the WebView2
runtime, which Windows 11 already has. Built with Lazarus and Free Pascal.

The engine underneath gets three thread fixes

Choose a tag to compare

@pisarev pisarev released this 07 Aug 12:53

The panel is unchanged. The parser and the plotting engine underneath it are not.

The panel computes curves on worker threads, and that is exactly the arrangement
the main fix is about: the floating point exception mask used to belong to
whichever thread created the parser, so a worker could raise EZeroDivide where
the library promises infinity. It now belongs to the evaluation and is handed
back when the evaluation returns.

Two more from the same release. The loop guard that stops a formula which never
finishes is now armed and disarmed in a pair. A spent budget no longer refuses
whatever runs next in the same thread. The lock around Deriv and Parse is
one per parser instead of one for the whole process, and Parse holds it only
while it compiles.

The pascal-mathparser release for 1.0.7 has the detail and the tests.

Download

GraphBuilder-npp-1.0.7-win64.zip - 1 443 849 bytes, sha256
42b8f422c21717783a43d86f4c87fa511703c808e4012204419533d80771ff54.

Unpack it into a folder named GraphBuilderLaz inside the Notepad++ plugins
folder, or let Plugins Admin do it. 64-bit Windows; it needs the WebView2
runtime, which Windows 11 already has. Built with Lazarus and Free Pascal.

A hidden button is hidden for real

Choose a tag to compare

@pisarev pisarev released this 07 Aug 06:03

The thing 1.0.5 was supposed to fix, fixed - twice.

The two buttons that send the report into the editor were still showing on the
live demo, where there is no editor to send anything to. 1.0.5 taught the page
to ask the host first, and the host answers correctly - the buttons were simply
being hidden with the hidden attribute alone.

That attribute is a display: none coming from the browser's own stylesheet,
which makes it the weakest rule there is: any display of your own overrides
it. The panel sets display: grid on its buttons, and that won. Measured on the
published demo: element.hidden === true, computed display: grid, thirty
pixels wide. The markup was honest, the picture was not.

.icon-btn[hidden] { display: none; }

Fixing that uncovered a second problem it had been hiding. The panel asks the
host whether there is an editor, and the Lazarus host answered in the same
reply it uses to hand the previous session back - a command gets exactly one
reply, so whenever the panel opened with work already in it, which is nearly
always, the answer never arrived. Measured in Notepad++: with the session file
in place the panel had seven buttons, with it moved aside, nine. The greeting is
now a message of its own and goes out first.

The gate that should have caught the first one checked the markup - attribute
present, reveal tied to the host's answer - and both were true. It was checking
the intent to hide, not the result; and it never checked that the host's answer
gets through at all. It now requires the rule above, reads the hosts from the
released tree as well as the working one, and refuses an early return standing
ahead of the greeting. Two mutation tests keep it honest.

Download

GraphBuilder-npp-1.0.6-win64.zip - 1 443 438 bytes, sha256
b567a69b1c3a3c3e47851b2c2ade2f333f3a893b827f68681481be053c9640d9.

Unpack it into a folder named GraphBuilderLaz inside the Notepad++ plugins
folder, or let Plugins Admin do it. 64-bit Windows; it needs the WebView2
runtime, which Windows 11 already has. Built with Lazarus and Free Pascal.

The editor buttons appear only where an editor is

Choose a tag to compare

@pisarev pisarev released this 07 Aug 02:53

The two buttons that send the report into the editor were showing where they do
nothing.

Whether to show them was decided by "is there a host". That was never the right
question. The live demo on the site substitutes window.chrome.webview so the
page can run without a plugin, and the standalone Lazarus window is a host with
nowhere to write. In both, the buttons were visible and did nothing.

Now the host says so itself: it answers hello with "editor": true, and the
page reveals the buttons on that word. The Delphi panel says it unconditionally -
it only ever lives inside Notepad++; the Lazarus panel asks whether its owner is
the plugin, because the same panel serves the standalone window too.

The engine underneath is the 1.0.5 parser: it builds with Free Pascal 3.2.2
again, and nine functions missing from that compiler's Math unit now travel
with the library. See the pascal-mathparser release for the detail.

Download

GraphBuilder-npp-1.0.5-win64.zip - 1 442 945 bytes, sha256
38f8431bcaaaeed0f54b1e5bf5fc24a26e04ed2970e64067e8eabd65133a3325.

Unpack it into a folder named GraphBuilderLaz inside the Notepad++ plugins
folder, or let Plugins Admin do it. 64-bit Windows; it needs the WebView2
runtime, which Windows 11 already has. Built with Lazarus and Free Pascal.

The panel reads the formula under your mouse, and sends the report back

Choose a tag to compare

@pisarev pisarev released this 06 Aug 22:02

The shipping build - the Lazarus one - now picks the formula up from the editor.
Point at a line and the curve appears; select an expression and the selection
wins over the line. Until now only the Delphi build did that, and the Delphi
build is not what ships.

The report travels the other way. One button opens it in a new tab, another
drops it at the caret. It leaves as Markdown with the curve embedded as SVG -
text, so it survives in a text editor, and still a drawn curve wherever Markdown
is rendered. Markdown in Notepad++ is a user-defined language rather than a
built-in one, so the new tab is switched to it by name; if your editor does not
carry that language, the tab stays plain text and the report reads just as well.

The panel keeps one slot for whatever the editor offers, so pointing around a
file does not fill the list with formulas nobody asked for.

The line under the cursor is compiled by a parser the plugin keeps for that
alone, in the thread the editor calls from: compiling on the parser that is
drawing the graph is outside the documented thread-safe subset.

Fixed

  • The README said to select an expression and press Alt+G, which was never how
    it worked: the formula is taken from under the mouse pointer, and Alt+G only
    opens the panel.
  • Both builds now answer the same buttons. The page is shared between them, and
    the report buttons used to be visible in the Delphi build without doing
    anything.

Download

GraphBuilder-npp-1.0.4-win64.zip - 1 442 650 bytes, sha256
55a705fa1f50d328dbe0f06ff2bd3b6e87e358d8a7a6fc7efdc0827ecd1e614e.

Unpack it into a folder named GraphBuilderLaz inside the Notepad++ plugins
folder, or let Plugins Admin do it. 64-bit Windows; it needs the WebView2
runtime, which Windows 11 already has. Built with Lazarus and Free Pascal -
nothing here needs a commercial compiler.

Ready for the Notepad++ plugin catalogue

Choose a tag to compare

@pisarev pisarev released this 06 Aug 10:13

This release is what the plugin needed to be listed in the Notepad++ plugin
catalogue. Two things were in the way, and both are fixed.

The library carries version information now. The catalogue reads the
version out of the library with GetFileVersionInfo and turns down a
submission that has none. Adding a version section to the Lazarus project was
only half of it: the project source was missing the line that links the
resource in, so the version had nowhere to go. FileVersion and
ProductVersion now both read 1.0.3.0.

The archive is laid out the way Plugins Admin expects. The catalogue
matches the full path inside the zip against <folder-name>.dll exactly, and
ours carried a folder of its own. That folder was not a stylistic choice gone
wrong - Plugins Admin creates plugins/<folder-name>/ itself, so the wrapper
would have produced
plugins\GraphBuilderLaz\GraphBuilderLaz\GraphBuilderLaz.dll. The files now
sit at the root of the archive, and INSTALL.txt describes a manual install
that matches.

The plugin is rebuilt against the 1.0.3 parser, where an exit inside a
formula now reaches the evaluation it belongs to even when the formula travels
through a second parser on the way - see the
pascal-mathparser 1.0.3 notes.

Built with Lazarus and Free Pascal. Install through Plugins Admin, or unpack
the archive into a folder named GraphBuilderLaz inside the plugins folder
of a 64-bit Notepad++, with the editor closed.

GraphBuilder-npp-1.0.3-win64.zip - 1 435 443 bytes, sha256
e6e672712d52a70a7c4284dc13610b998ccb512318388db3537c945ab9cf001d.

Rebuilt against the 1.0.2 parser

Choose a tag to compare

@pisarev pisarev released this 06 Aug 02:16

The plugin rebuilt against the 1.0.2 parser: Exit inside a formula now
belongs to its own evaluation even when several worker threads sample curves
through one parser - see the
pascal-mathparser 1.0.2 notes
for the full story and the declared change around Exit in brackets.

The archive is now reproducible: timestamps inside it are pinned to the
release date, so repacking the same content gives the same checksum.

Built with Lazarus and Free Pascal. Install per INSTALL.txt inside the
archive: copy the GraphBuilderLaz folder into the plugins folder of a
64-bit Notepad++, with the editor closed.

GraphBuilder-npp-1.0.2-win64.zip - 1 435 203 bytes, sha256
110e4e6a97c1d4bed6a94ad6d11c6e782b760785d6ee61d0e30cce3d8c3312d6.

GraphBuilder 1.0.1

Choose a tag to compare

@pisarev pisarev released this 05 Aug 20:07

Interruptible loops, Win64 unwind info, and per-system formula sheets.

What changed since 1.0.0:

  • A formula that never ends can be stopped. Loops get a break flag and a turn
    budget, both off by default; a runaway formula becomes a formula error
    instead of a frozen panel or a killed worker thread.
  • Generated x86-64 code registers an unwind description on Windows, so an
    exception thrown through it reaches the handler instead of killing the
    process.
  • A deadlock on the first parse from a worker thread is fixed: the smart cache
    no longer sends a synchronous window message across threads.
  • Each coordinate system keeps a formula sheet of its own, the way the classic
    window always did, and a deliberately emptied sheet survives a restart.
  • The intersection finder keeps distinct neighbouring crossings: the duplicate
    merge radius follows the argument step, and a fast curve that crosses on
    every segment is no longer silenced as an indistinguishable stretch.
  • The library is 4 MB instead of 38: debug information lives in a separate
    file that does not ship.

Built with Lazarus and Free Pascal. The folder inside the archive is named
GraphBuilderLaz, matching the library: Notepad++ only loads a plugin from a
folder that bears its name - the 1.0.0 archive named it GraphBuilder, and a
manual install by that instruction would not load.

v1.0.0

Choose a tag to compare

@pisarev pisarev released this 04 Aug 20:13

First public release.

A function plotting plugin for Notepad++. One WebView2 page, two builds from the
same sources - Delphi and Lazarus.

The attached archive is the Lazarus/Free Pascal build. Nothing in it needs a
commercial compiler: take the sources and you can rebuild the same file
yourself. The Delphi sources are published and checked alongside, but no binary
built with Delphi is shipped.

Install: copy the GraphBuilder folder into the plugins folder of Notepad++, with
the editor closed. INSTALL.txt inside the archive spells it out and lists the
sha256 of every file.

Needs the WebView2 runtime - Windows 11 already has it.