Live data from Hacker News

Zellij – A Terminal Workspace and Multiplexer

zellij.dev

131–140 of 248 posts

Re: Zellij – A Terminal Workspace and Multiplexer

#131

Earlier quoted context omitted.

Non-rhetorical questions: why not use the language itself so people can leverage features like autocomplete, type-checking, linting, and intuitive error handling in an IDE? Is there anything about Rust that makes it impractical for representing config/dependencies/etc?

Yep. Rust is a compiled language with monomorphized generics. It's slow to compile, and also you'll need to carry rustc everywhere. rustc is huge.

Or, one could embed Chez Scheme, the compiler of which is like 800 kB in size and compiles stuff very quickly.

Re: Zellij – A Terminal Workspace and Multiplexer

#132
post #59

The idea of using WebAssembly for their plugins is really impressive (they are using Wasmer!). It allows to have fully sandboxed code that interact with their code safely and fast. I think more projects will start following the same direction soon!

I'm confused. Zellij uses wasmer and wasmer-wasi. Wasmer may use cranelift for compilation (dont know if Zellij does). "Fast & Safe. Wasmer runs WebAssembly at near-native speed in a fully sandboxed environment." ( https://github.com/wasmerio/wasmer ) But ... "Cranelift does not yet perform mitigations for Specter or related security issues, though it may do so in the future." ( https://github.com/bytecodealliance/wa…

Can you elaborate on the threat model that requires your terminal multiplexer to have rowhammer mitigations?

Re: Zellij – A Terminal Workspace and Multiplexer

#133
post #87

Earlier quoted context omitted.

> It's fashionable to hate XML because it was used in a lot of places it was a bad fit in the 00s, but at least it's a pretty good document language. > YAML though is always a bad fit. If you want machine readable config, use JSON; human readable, use TOML. When does YAML ever fit? https://twitter.com/carlmjohnson/status/1372224080749993988

I never got this stance; JSON sucks for config files, because as a user, if there is anywhere that I need and am more thankful for comments, is in a configuration file. And TOML is maybe a good substitute for INI formats, but it doesn't really support nested data like JSON would, so suggesting to use TOML instead of JSON is misleading except for the simplest and most basic needs. If replacing JSON is the objective, I…

Could your problem be partially resolved by having a key called description or comments where you could provide some clarification?

Re: Zellij – A Terminal Workspace and Multiplexer

#134
post #101
post #89

Earlier quoted context omitted.

I feel like in this case those kinds of things are up to Zellij. If you run wasmer within the same process and share memory with the main Zellij process then yes wasmer/cranelift/wasmtime/wasm doesn't protect you from various speculative execution attacks. However, Zellij could run plugins in separate processes and apply things like seccomp to get further protections provided at the operating system level. This is st…

WASM and Wasmer are not intrinsically anymore secure, except for simplicity, than any other editor plugin system. Vimscript and Emacs-lisp basically have the same security characteristics as using WASM for plugins. It's not a step in any direction, except for whatever environment Zellij exposes to the plugins by default.

I'm not sure how this is true. I don't know anything about vimscript and emacs-lisp plugin systems, but at a cursory glance it looks like plugins might be able to do things like launch shell commands?

Zellij seems to be using WASI, a standard set of syscalls. Currently, wasi syscalls (or at least the version of wasi that is running in wasmer) can't really access the network, can't fork/exec, can provide a chroot view of the filesystems (without root access), can limit access to certain types of functionality. These kind of secure defaults seem like an improvement to me compared to most plugin systems I'm familiar with.

Maybe vimscript/emacs-lisp has these things.

Re: Zellij – A Terminal Workspace and Multiplexer

#135
post #59

Earlier quoted context omitted.

I'm confused. Zellij uses wasmer and wasmer-wasi. Wasmer may use cranelift for compilation (dont know if Zellij does). "Fast & Safe. Wasmer runs WebAssembly at near-native speed in a fully sandboxed environment." ( https://github.com/wasmerio/wasmer ) But ... "Cranelift does not yet perform mitigations for Specter or related security issues, though it may do so in the future." ( https://github.com/bytecodealliance/wa…

Can you elaborate on the threat model that requires your terminal multiplexer to have rowhammer mitigations?

I think OP is just arguing and saying "fully sandboxed" might imply that kind of security.

Re: Zellij – A Terminal Workspace and Multiplexer

#136
post #75

Earlier quoted context omitted.

YAML sucks but so does TOML, especially when it comes to nested data structures like the layout.yaml shown on the front page. There are no good configuration languages in existence and there never will be. We have rejected Lisp/sexp so now we must suffer endlessly.

I think JSON would be perfect if it a) allowed comments, and b) had multi-line strings. It has exactly five data types, each with very clear and distinct notation that nests consistently (the top level isn't somehow "special" and there's no messing with significant whitespace). Only two collection types: keyed, and unkeyed. In some sense it feels like the apotheosis of untyped data-modeling.

I just wish JSON had fixed decimal numbers, a timestamp type, and a binary blob type :/

Re: Zellij – A Terminal Workspace and Multiplexer

#137
The resizing algorithm looks cool: panes are no longer in a grouped hierarchy of vertical and horizontal splits, as in tmux or vim, and pretty much every other customizable layout tool. In a grid of four squares, a corner can either be resized in either direction and only modify one other pane. (It's hard to explain; it's shown in the demo gif.) I wonder if you can make "holes"...

Rearranging a layout with more than 3 panes in tmux or vim is always difficult. In tmux it's at least easy to swap panes (C-prefix '{' or '}'), but vim doesn't have any simple way to do something similar. I wonder if Zellij's approach makes it any easier. Maybe it's a UX pattern that is made easier with a mouse.

Re: Zellij – A Terminal Workspace and Multiplexer

#138
post #48

You have a problem and you need a configuration language, so you pick YAML. Now you have two problems. Take a leaf out of Rust's book and use something simple and sane like TOML, YAML is a mess. See: https://github.com/cblp/yaml-sucks Otherwise this looks like a great project, please don't ruin it with YAML.

I think the biggest problem with YAML is not YAML itself but what people use it for. It's very flexible and readable for smaller files (much more than TOML - which is awful for hierarchical data). A bigger problem is that so many things are using config files that should be proper DSLs or libraries, but no one wants to maintain a library (or create RCE as a service by accident) and no one wants to write a parser/inte…

My beef with YAML is that configuration should be flat, not hierarchical. There should be at very most one layer of nesting, to facilitate categories. INI files are fine.

People do unholy things with it like nest bash scripts in it that should never be done. Text files should never have more than one syntax needing parsing. It's bad enough, say, embedding SQL into some python. But doing that with YAML is just the worst.

You should be able to use regexes to deal with non-code text files. JSON, YAML, the whole motley crew require parsing. Don't get me started on JSON log files.

Post reply on HN