sjustinas
Joined 13 years ago
Joined 13 years ago
$ nix-shell -p nodejs_20
[nix-shell:~]$ node --version
v20.18.1
Oh, the UX horror![1]: https://coffee-and-dreams.uk/development/2022/06/24/akkoma.h...
> What kind of behavior do you expect?
Defined behavior, I assume. If V uses C as an intermediate, and the generated C code invokes undefined behavior, then V can not guarantee "no UB" in that case at all. It is completely up to the C compiler what happens. Even if the compiled app behaves "properly, like Go" with the specific C compiler, with the specific flags, on that specific machine, does not mean this behavior is defined and consistent.
> Option and Result are now separate types: ?Foo and !Foo respectively. Old code will continue working for 1 year and will result in a warning/hint.
Yet, doc/docs.md still states:
> V combines Option and Result into one type, so you don't need to decide which one to use.
Is there an up-to-date doc, or how does one find out more about these types? I found parts of the RFC overhauling the error handling [0] pretty bizarre, so I'm interested to see how the implementation turned out.
[0]: https://github.com/vlang/rfcs/pull/7
edit: linked to the wrong RFC initially.
I've used rust-u2f in the past, although it seems to be Linux only. https://github.com/danstiner/rust-u2f
For me, the benefits outweigh the quirks of the language. As my alternatives to manage multiple machines consist of: wonky Bash scripts, similar tooling but bolted-on on top of the distro and with no built-in rollbacks (Ansible, Puppet, etc.), or trying to get everything right manually, Nix does not seem like the worst out of this bunch.
https://doc.rust-lang.org/std/string/struct.String.html#meth...