返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: JSynth – Visual Programming Editor for Julia

A visual editor for Julia. Wire inputs, functions and plots together on a canvas, run the design with Julia, and see every value on its node. Any design can be exported as a plain Julia script.

Hacker News 最新ozanbora2026/10/18 · 19 天前17 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

A visual editor for Julia. Wire inputs, functions and plots together on a canvas, run the design with Julia, and see every value on its node. Any design can be exported as a plain Julia script.

JSynth runs on Windows and Linux, including WSL.

The install scripts download the latest release, install what it needs, and add it to the Start menu or applications menu. They install Julia too, with juliaup, if it isn't there yet.

irm https://raw.githubusercontent.com/ozanbora/JSynth/master/install/install.ps1 | iex

Linux (x64) and macOS (Apple Silicon), in a terminal:

curl -fsSL https://raw.githubusercontent.com/ozanbora/JSynth/master/install/install.sh | sh

On Linux, this installs fontconfig with your package manager (asking for your password) if it's missing. JSynth goes in %LOCALAPPDATA%\Programs\JSynth on Windows, and in ~/.local/share/jsynth with a jsynth command in ~/.local/bin elsewhere. To serve JSynth over VNC as well, add --vnc (sh -s -- --vnc; -Vnc doesn't apply on Windows, where VNC needs nothing more). To remove it, run the script again with --uninstall (Windows: download it and run .\install.ps1 -Uninstall); your settings and designs stay.

You can also download a release yourself and unpack it: the release page says what each system needs.

Wiring an output into an input passes the value along. Press F5, and JSynth turns the design into a Julia script and runs it in a Julia session it keeps open. Each node then shows its value, a ✓ or ✗ badge and how long it took. The output panel lists every value by its variable name.

Designs can also work through data as it comes:

Parameters panel: put inputs in it to set them with sliders and boxes. The design runs again a moment after each change.

Names: an input given a name keeps it as its variable in the script (loan = 250000.0 rather than x1), so the output says which value is which.

Breakpoints: pause a run on a wire (F9), optionally on a condition, see the value, then continue (F5) or step to the next value (F10).

Frames and groups: frames are titled boxes around nodes. Groups turn several nodes into one node. Double-click a frame's title to make it a group, and use the group's ⧉ button to open it again.

Library: save nodes and groups under a name, and add copies of them to any design.

Tabs: several designs open at once, each with its own undo history. A tab can open in a window of its own.

Packages: packages a design uses but doesn't have are offered for installation.

Arranging: Ctrl+Shift+A arranges the nodes, keeping each frame's nodes together.

Saving: designs autosave a moment after each change. A design never saved is kept and reopened at the next start.

Export: export the design as a Julia script, or as a PNG image of the canvas.

Look: a light or dark theme, following the system's setting unless one is chosen. The interface uses Julia's colours.

File → Examples and the start page open these. Examples with large datasets ask before downloading them, and to where.

Keys Does

F5 Run, or continue from a breakpoint

Shift+F5 Stop

F9 Pause on the selected wire

F10 To the wire's next value

Ctrl+N / Ctrl+O / Ctrl+S / Ctrl+Shift+S New, open, save, save as

Ctrl+T / Ctrl+W / Ctrl+Tab New tab, close tab, next tab

Ctrl+B Show or hide the sidebar

Ctrl+Z / Ctrl+Y Undo, redo

Ctrl+C / Ctrl+X / Ctrl+V / Ctrl+D Copy, cut, paste, duplicate

Ctrl+Shift+C Copy the selection as Julia code

Ctrl+G / Ctrl+Shift+G Group the selection, open a group

Ctrl+Shift+A Arrange the nodes

Ctrl+A / Delete / Esc Select all, delete, clear the selection

Ctrl+wheel, Ctrl+0 Zoom, back to 100%

On the canvas, a drag pans, Ctrl+drag selects with a box, and right-click adds nodes.

.NET SDK 10 or newer (the projects target net10.0). global.json enforces this.

Julia, preferably through juliaup. JSynth looks for it on the PATH and in the usual install folders. You can also choose the Julia program from the sidebar, or with Run → Choose Julia….

Build and run

dotnet run --project JSynth.Desktop dotnet test JSynth.Tests

Some tests run real Julia, and skip themselves when Julia isn't found. Tests using an example's downloaded data skip themselves when the data isn't there.

Run dotnet run --project JSynth.Desktop -- --help for the command-line options:

Settings, the library, a design never saved and the logs (Logs) are kept in %AppData%\JSynth on Windows and ~/.config/JSynth on Linux.

JSynth runs on Linux, including Ubuntu under WSL 2 with WSLg (Windows 11 shows the window on the Windows desktop).

sudo apt install libfontconfig1

Install .NET. Ubuntu 22.04's apt doesn't offer SDK 10, so use Microsoft's install script:

curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh bash dotnet-install.sh --channel 10.0 --install-dir /.dotnet export PATH=/.dotnet:$PATH DOTNET_ROOT=~/.dotnet

Install Julia with curl -fsSL https://install.julialang.org | sh.

Under WSL, clone the repository into the Linux file system (for example ~/JSynth) rather than building from /mnt/c, so Linux and Windows builds don't share bin and obj folders.

Alternatively, publish a self-contained build from Windows and run it in WSL with only libfontconfig1 installed:

dotnet publish JSynth.Desktop -c Release -r linux-x64 --self-contained -o publish/linux-x64

Troubleshooting

The window has a taskbar icon but nothing shows, and its title starts with [WARN:COPY MODE]. WSLg couldn't set up the shared memory it uses to send windows to Windows; /mnt/wslg/weston.log shows rdp_allocate_shared_memory: Failed to open .... This affects every Linux app, not only JSynth. Restart WSL from Windows with wsl --shutdown (this stops all running distros), then start JSynth again.

The app exits at startup with Unable to load shared library 'libSkiaSharp'. Install libfontconfig1 (step 1 above).

The build fails with A compatible .NET SDK was not found. The .NET SDK is older than 10; check with dotnet --version and install a newer one (step 2 above).

Project layout

Folder Holds

JSynth The app: the node model and script generator (Model), view models and the examples (ViewModels), views and styles (Views, Controls, Styles), fonts and icons (Assets)

JSynth.Runtime The Julia side: finding Julia, the session that runs scripts, and the reports of values

JSynth.Desktop The program: command-line options and platform setup

JSynth.Tests xUnit tests, run headless with Avalonia's headless platform

It is built with Avalonia 12, ReactiveUI, AvaloniaEdit for the code editor, and ScottPlot for plots.

Fonts, all under the SIL Open Font License:

Data the examples download. Each download writes the full attribution next to the files.

Bug reports and pull requests are welcome: see CONTRIBUTING.md for building, running the tests and what a pull request needs.

JSynth is under the MIT License. The fonts and the example data keep their own licenses, listed above.

JSynth is not affiliated with or endorsed by the Julia project. Julia is a trademark of JuliaHub, Inc.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →