Live data from Hacker News

Bitwarden compatible server written in Rust

github.com

101–110 of 116 posts

Re: Bitwarden compatible server written in Rust

#101
post #99

Earlier quoted context omitted.

> And unlike Go or C, I don't have to remember to check the error every single time. How do you mean? I’ve been writing Rust frequently lately and you still have to check the case. Do you mean that the compiler will nag you if you stunt so you don’t have to remember to do it because you’ll be reminded? That’s one of the things common Go linters do that I wish was built into the compiler. It’s silly that an unused dep…

I mean that in Rust, you have to work kinda hard to drop an error on the floor and leave it unhandled. It's easy and idiomatic to write code which calls `unwrap`, so that's what everybody does when they don't want or need to write sophisticated error handling code. But that's not the same as forgetting to check a return value — when something goes wrong, `unwrap` panics. I mean, if you're determined you can definitel…

I learned rust before go and I was shocked by the (lack of) error handling in go.

unwrap feels lazy, but it's obvious what is doing and it's impossible to do nothing. With go error handling is entirely optional.

Re: Bitwarden compatible server written in Rust

#103
post #43

Earlier quoted context omitted.

I personally don’t see the appeal of Go. With Rust, I can write a concurrent, safe, and C-performant program with modern programming features like matches, generic programming, and a dedicated package manager (never understood go get). To boot, Rust has a strong ecosystem and the fastest web framework out there (Actix). It takes roughly the same amount of code to do networking stuff in Rust and Go, but with Rust it i…

Good to know! I've been looking at Go because it's "smaller, lighter, faster" than C# but from this description Rust might be a better next language to learn. Thank you!

All those quotes are funny. "Smaller" as in the amount of keyword? Because you definitely need to type a lot more to get the same thing done. "Lighter" as in executable size? I'll give you this for the basic hello world apps. "Faster" ? That's just not true.

Re: Bitwarden compatible server written in Rust

#104
post #77

Earlier quoted context omitted.

The only people who did that was the Go team itself, and they did so in contravention of the usual interpretation of the term, as by it they meant either the completely meaningless "you can built systems with it", or that you could build systems services or utilities (which is not what is usually meant by "systems language").

I'm not aware of any official or standard definition of system programming. There's application programming and anything which doesn't fit in there is system programming which can be low-level, middleware, etc. Go is appropriate for writing services / daemons, command line tools, servers, etc. It's not well suited for writing operating system code and very performance-intensive code (databases, audio/video, etc), but…

golang is absolutely capable of writing databases and audio/video code. the libraries just dont really exist for the audio/video stuff.

but there are DBs written in go.

Re: Bitwarden compatible server written in Rust

#105

Earlier quoted context omitted.

This is true for basically every budding community. "Rustaceans" writing tools for writing rust, in rust, seems like a gimmick, but every language goes through this period. JavaScript is probably the single biggest offender I can think of, but other examples include rewriting Vim plugins in Lua even though neovim supports vimscript, rewriting literally anything in Go, rewriting python libraries in Julia, etc.

I don't think the example of rewriting python in Julia is the same. Most python libraries get re-written (or implemented) in a faster language. If your choice is rewriting in C++/Fortran, or writing rewriting in Julia, The Julia version will be way nicer to use, and will probably be faster than calling the low level library from python.

You're talking about rewriting performance sensitive code when it makes sense to do so. I'm talking about rewriting random libraries because developers like to wallow in their tooling.

Re: Bitwarden compatible server written in Rust

#106
post #84

Earlier quoted context omitted.

Java is way more expressive and better designed than golang. So no, golang is not Java with less memory. It's also possible to deploy Java as a single JAR file.

Is this more a matter of preference? Some people feel it is more expressive, others feel it is too verbose. Some people prefer the object oriented design principles, others are turned off by them and really just want structs. I agree the single file argument is not extremely convincing. Especially because engineers are often on Mac on Windows machine and compiling for Linux. While Go does support this, as soon as you…

> Is this more a matter of preference?

No it isn't. On many times I've been able to simplify golang code that is dozens of line long into something that is only a few lines long in Java, while improving readability and reliability. This is especially useful when exploring a new code base and spending a lot of time perusing boilerplate trying to figure out what's going on.

Re: Bitwarden compatible server written in Rust

#107
post #51
post #4

As cool as a native code back-end for Bitwarden would be I would be more interested in seeing vendor native mobile apps (Swift/Xcode, Kotlin/Android Studio) and putting the Xamarin code out to pasture. Would also like to see an improvement in the desktop Electron app as well or at least get it to feature parity with the web vault. All of that said Bitwarden is a fantastic product and I recommend that over every other…

> All of that said Bitwarden is a fantastic product and I recommend that over every other server-based password manager out there. Do you want to share what makes you think Bitwarden is superior to other selfhosted, open-source solutions (e. g. Passbolt, Passwork, Psono)?

There is some serious thought going into Bitwarden.

For example, what happens if I get hit by a bus? Oh, they've already thought of that: https://bitwarden.com/help/article/emergency-access/

The peculiar problems faced by families, work organisations, 2fa - they've put some time into thing about every sub-problem I've come up with.

Well, just about everything. I'd love if they would let me run my own read only backup servers - ie, a server that mirrors my data stored on theirs, that my device will connect to if theirs isn't up, and that supports a read only version of the web interface.

Re: Bitwarden compatible server written in Rust

#108

I applaud and encourage anything that rewrites managed junk code to proper native code But in this particular case, i think GO would have been a much better alternative, we'll see how it goes in the long term

Why do you think so?

because it's CPU and memory efficient

no GC no JIT, server starts instantly, you need to allocate less resources, and it's easier to install, no runtime dependencies, usually, if done correctly

Re: Bitwarden compatible server written in Rust

#109

Earlier quoted context omitted.

Why do you think so?

because it's CPU and memory efficient no GC no JIT, server starts instantly, you need to allocate less resources, and it's easier to install, no runtime dependencies, usually, if done correctly

Why did you write Go would be a better alternative then? You say "no GC" as an advantage, but Go relies on GC.

Re: Bitwarden compatible server written in Rust

#110

Earlier quoted context omitted.

because it's CPU and memory efficient no GC no JIT, server starts instantly, you need to allocate less resources, and it's easier to install, no runtime dependencies, usually, if done correctly

Why did you write Go would be a better alternative then? You say "no GC" as an advantage, but Go relies on GC.

i listed above my preferences; as to why i applaud anything rewritten that meet those requirements

but i am not closed minded, i understand pros/cons of each features

in that particular case, a GC is helpful even though i'm personally against it

i'm being objective rather than subjective whenever i have to make a choice or a suggestion

Post reply on HN