What's so special about Zig?
We know that Rust is supposed to be the next great language, but Zig???
To get a feel for how Zig fits into the scheme of things, this chat between two programmers is very informative. Quite long but very watchable:
...you don't need to understand all the concepts discussed; after all these guys are professional programmers, university-trained. But easy to pick up the salient points.
1. A better C compiler than gcc, with all libc's builtin
2. Cross-compile builtin, not just for different CPUs but also OSs (Linux, Mac, Windows, Android).
3. Build system supposedly much better than autotools, cmake, etc.
4. Very simple language compared with Rust
Those two guys also recorded another video discussing point-3.
I posted a brief intro to Zig, with links, to my blog:
I found about this some time ago and trying it is somewhere in my TODO list. A lightweight IDE with LSP support and not just basic syntax highlighting sounds perfect to me.
I found about this some time ago and trying it is somewhere in my TODO list. A lightweight IDE with LSP support and not just basic syntax highlighting sounds perfect to me.
Dude the Builder shows how to setup NeoVim with ZLS, Zig's language server:
Personally, I would prefer an editor with a GUI. NeoVim is a text-mode app.
I did try neovim-qt, but it hardly adds any GUI functionality.
ZLS is just an executable, /usr/bin/zls
I've included it in the devx in latest EasyOS; just need to find an editor to use it with.
Re: The Zig language
Posted: Wed Oct 30, 2024 10:12 am
by BarryK
Sublime text editor works really well with Zig. Snapshot:
sublime-zig.png (109.23 KiB) Viewed 966 times
Sublime is a commercial product, free for personal use.
They say even for personal use supposed to pay, but there is no cutout date for free usage.
Not compiled by me, it is their official x86_64 tarball. I put the Zig and Nim plugins into the PET.
In EasyOS, the script build-rox-sendto now recognises Sublime and sets up mime-handling, so right-click on a text file and Sublime will be in the menu.
For other distros, you might want to edit /usr/share/applications/sublime.desktop with a MimeType entry, like this:
Current directory:
/root/zig
Press ENTER key to execute,
or, type commandline parameters then ENTER:
# ./hello
Hello, Zig! Ready to revolutionize systems programming?