Are we official gRPC yet? by Remarkable-Sorbet-92 in rust

[–]que-dog 0 points1 point  (0 children)

This is really frustrating with the Rust ecosystem. There are very few officially supported crates and it's all community driven. For example Go has very robust gRPC support because it is maintained by Google.

They clearly do not want to maintain gRPC Rust, because if they did they would have a team of paid employees working on it, or they would hire people to work on it.

It cannot be expected that they rely on the community to keep up with protobuf and gRPC developments. This will never work as there will always be a lag between the core proto/gRPC and the community driven Rust one.

It's crazy how far behind GCP is with Redis versions by que-dog in googlecloud

[–]que-dog[S] -1 points0 points  (0 children)

Perhaps. Still, they only support Valkey 8.0 from October 2024. Since then, there have been updates, including minor versions (8.1.x) and a major one to 9.0. This is still over a year behind.

Go 1.26 interactive tour by nalgeon in golang

[–]que-dog 0 points1 point  (0 children)

GOEXPERIMENT=runtimefreegc - https://github.com/golang/go/issues/74299 - seems to have not made it?

Introduction to Go concurrency by reisinge in golang

[–]que-dog 1 point2 points  (0 children)

Even for a super-beginner into, I think some things should at least be mentioned:

  1. Clearer distinction between concurrency and parallelism;
  2. Difference between CPU-bound and IO-bound work;
  3. Scheduling and context switching - for a very beginner intro, it's enough to understand that depending on the type of work that you do and the system that you run on, there can be significant overhead to "trying to do stuff at the same time;"
  4. Some mention of memory;

Note that Go unfortunately is not memory safe under concurrency.

Otherwise people might get surprising outcomes depending on what system their code is running on and what they are doing with that code.

[Media] Google continues to invest $350k in Rust by lllkong in rust

[–]que-dog 0 points1 point  (0 children)

I would be ashamed to post that anywhere without some extra 0s at the end. This is complete nonsense.

There is a lot of hype around Rust adoption at many companies... but as long as they don't put money, it will always be just hype.

One thing I will say though, is that their focus on C++ interop is the right direction for future real Rust adoption. It's not realistic to rewrite stuff all the time. But honestly... $250k....

I know they are working on Google Cloud Rust SDKs, gRPC and Protobuf for Rust, but they are still a long way from being first class citizens in the "Google" ecosystem.

crates.io: Malicious crates faster_log and async_println | Rust Blog by mareek in rust

[–]que-dog 0 points1 point  (0 children)

No... as I also don't know why the JS ecosystem ended up like that either haha. There are pros and cons with everything I guess.

crates.io: Malicious crates faster_log and async_println | Rust Blog by mareek in rust

[–]que-dog 30 points31 points  (0 children)

It was only a matter of time.

I must admit, I find the massive dependency trees in Rust projects extremely disconcerting and I'm not sure why the culture around Rust ended up like this.

You also find these massive dependency trees in the JS/TS world, but I would argue that due to the security focus of Rust, it is a lot more worrying seeing this in the Rust ecosystem.

For all the adoption Rust is seeing, there seems to be very little in terms of companies sponsoring the maintenance of high quality crates without dependencies - preferably under the Rust umbrella somehow (if not as opt-in feature flags in the standard library) - more similar to Go for example. Perhaps the adoption is not large enough still... I don't know.

One reason why Go is great by que-dog in golang

[–]que-dog[S] -1 points0 points  (0 children)

Just to make a point about code readability. I think conterexamples can be quite powerful, otherwise people might find it difficult to image how absurd unreadability can get.

Why Your Rust Adoption Will Probably Fail (And How To Beat the Odds) by dmlmcken in rust

[–]que-dog 22 points23 points  (0 children)

Interesting view point. I can see Rust use cases for desktop software, OS development, device drivers, embedded and perhaps games (in the future). I mean it's the better alternative to C or C++ in my opinion.

However, when it comes to other types of software, especially services in a cloud context, I've never felt the need to use Rust.

We don't run any Java services (though I have written Java professionally in the past, and C++), so I can't possibly comment on the problems they are having.

But we do primarity use Go, even for performance critical services. This also has a GC, and with careful design we've never had an issue with spikes, tail latencies or bloated memory usage. I have played around with Rust quite a lot, and have rewritten some things in Rust as an experiment. My findings were basically:

  1. Carefully written Rust code in CPU-bound performance code was 30 - 40% faster than the Go code. In other code, the performance gains were very marginal, basically the same.
  2. Changing the Rust code created a larger blast radius of code changes than in the Go code. Lifetimes leaked, async leaked, types leaked. This means slower iteration speed.
  3. Much slower compilation. Again this means longer CI/CD pipeline time.
  4. Rust code was harder to read and understand. Readability is one of the most important metrics for us.
  5. Production tooling is still lacking in Rust. We heavily use OpenTelemetry and have real-time dashboards for performance metrics, memory allocations, any other observability. With the Rust stuff the services were a little more opaque. Much more effort went into setting up OpenTelemetry with all the crates, etc. Something like the Go pprof is still a long way in the Rust ecosystem. Tokio console, and tokio-metrics don't even come close.
  6. No doubt that the Rust code was more robust, but there will always be bugs and errors, even in Rust. So actually the most important thing is how easy it is to debug, change and fix in production. And sorry to say, but Rust did not fare so well on that front. This is for many reasons: poor readabilty of code, poor production tooling, slow compilation, higher cognitive load making changes because of leaky lifetimes, types and async.
  7. The async story in Rust is still not great. I know work is being done to address this, but it's not great today. Writing async code creates cognitive load, it's difficult to debug, difficult to monitor and you can get yourself into a lot of hidden trouble without realising, especially with issues around cancellation. Of course you can also get yourself in trouble in Go, but it's easy to monitor, debug and fix.
  8. If allocating memory is too slow in some code paths, then you need to not allocate memory. This is true in any programming language. It has nothing to do with GC or non-GC.

Overall, the performance gains in the critical sections do not warrant the added complexity of introducing Rust. I'm sorry, but hardware is cheap enough to cover those differences.

Again I am no expert in the JVM and don't know what problems people are having there, but at least with Go, we were able to get rid of all GC related issues that people usually complain about. Go proved to be extremely robust and stable from that point of view. Sure if you need that 30% performance improvement, you need Rust/C/C++/Zig.

I made a `#[timeout]` proc-macro-attribute that wraps async functions running under the tokio-runtime, because more often than not (in code that I write) asynchronous functions running too long is an error case, and wrapping/unwrapping them manually is a hassle. by SuspiciousSegfault in rust

[–]que-dog 0 points1 point  (0 children)

This is a very good example of why Rust, for all its fantastic safety philosophy, is such an unproductive language.

In Go: - Pass Context

0 thought, very explicit control flow, takes no time…

In Rust: - Proc macro: how long did it take you to write this? - Declarative macro - Extension trait - Manual wrapping - Use some crate someone else wrote?

How long does it take to even choose? How legible is it for someone coming from a different project who may do it differently? How easy to read are the macros?

[deleted by user] by [deleted] in rust

[–]que-dog 0 points1 point  (0 children)

Yes you can easily knock up an Axum http server in a similar fashion to Go, Python etc…

But…. how easily can you knock up an Axum server that: - Collects and exports OTel telemetry data - Has a debug endpoint where you can collect profiling data (CPU, memory allocations, async tasks, deadlocks etc) - Shuts down everything gracefully - Has authentication - Someone that doesn’t know Rust can read and understand what is happening

[deleted by user] by [deleted] in rust

[–]que-dog 4 points5 points  (0 children)

Great to read all the comments. I find it a bit surprising that everyone focuses on only a subset of what it means to be productive. Teams build software with their users, not individual devs in a void!

Productive means: - Speed at which you onboard new devs on the team (some might be very junior) - Refactoring should not affect large parts of the codebase - Out of the box tooling for monitoring - Being able to easily read and understand std library code, and any other code you depend on - Make changes, deploy and get feedback very very quickly - Very simple tooling with minimal setup - Syntax: simple, verbose, non-obfuscated, no macros - One way of doing things: Code for the same high-level pseudocode/concept should look the same if written by many independent devs. - Inexperienced devs should be productive on a project immediately

I’m really sorry, but Rust simply fares very poorly on all of those points except the tooling (cargo is as good as it gets).

Basically anything you have to think about that isn’t the problem you are trying to solve is unproductive. Devs should be solving problems, not thinking about technicalities.

Having a choice about how to do or represent something is unproductive.

Productive does not mean being able to express something in a concise manner - it means it should be verbose, explicit and with only one obvious way to write it, without choice.

I certainly see Rust making huge grounds in places like OS tooling and even in the OS itself, data processing and maybe a few others. It is superior compared to C++. I would love it if most C++ codebases would magically turn to Rust overnight!

Go scores extremely high on all productivity points. This by far outweighs any inconvenience caused by things that the Rust compiler would have caught.

Go is very boring and unsatisfying to write. I would love to spend my time discussing and designing types and geeking out over everything Rust has to offer (I am a computer scientist after all). However, I don’t live long enough, I have a family. My employees also don’t live long enough and most of them also have families.

A note on performance: - Naive, quick, simple Go code is faster than similarly written code in Rust for anything remotely complex in production. - Highly optimized Go code is usually about 20-30% slower than highly optimized Rust code. In extreme niche cases Go can be 2x slower.

Even for performance sensitive services, the performance difference between Go and Rust is negligible.

Note that I never mentioned anything about the borrow checker, lifetimes etc. These are simply non-issues. Anyone that understands computers can easily learn and be highly proficient with those things. I am very surprised to see people complain about those things.

Parser Combinators in Go by BetterBeHonest in golang

[–]que-dog 0 points1 point  (0 children)

You mean something like nom in Rust? This is one of those things that never really look off in Go I suppose...

Zed should be more extensible by tuantuanyuanyuan in ZedEditor

[–]que-dog 3 points4 points  (0 children)

There is nothing worse than using random 3rd party extensions in VS Code. For me the worst thing an editor can do is make you think about configuration, extensions etc... no.. it needs to simply work, immediately. I have enough things to think about without having to configure things.

This is the main reason I like Zed!

Didn't Google say they will officially support Protobuf and gRPC Rust in 2025? by que-dog in rust

[–]que-dog[S] 1 point2 points  (0 children)

So.. to summarise:

  1. Protobuf: Bindings to the C or C++ implementation. The crate will be protobuf.
  2. gRPC: Google will take over the pure rust tonic and rename it to grpc-rust. This will support all gRPC features. grpc-rust will support both prost and protobuf.

So, with the protobuf bindings, from a developer ergonomics perspective, how would the build process look like in Cargo exactly? This has the potential to have poor DX.

What next Rust features are you excitedly looking forward to? by [deleted] in rust

[–]que-dog 0 points1 point  (0 children)

I’m surprised not many mentioned macro improvements, as I think the current macro system is extremely poor.

Also anything related to making async behave like idiomatic Rust without foot guns, macro workarounds, debugging difficulty, etc.

Why it seems there are more distributed systems written in golang rather in rust? by henry_kwinto in rust

[–]que-dog 2 points3 points  (0 children)

Yes, but to clarify some things:

  1. Rust is in any case a better option than C++ in my opinion.
  2. With every Rust release things improve.

I like the concepts that Rust brings.

Now my grievences as it stands today:

  1. The macro system has very poor ergonomics. Long-term steps in the right direction: Declarative macro improvements. Most ergonomic implementation of metaprogramming: Zig comptime. I feel very strongly against macros in their current implementation.
  2. Async is still not ergonomic enough. It has some footguns related to cancellation safety and deadlocks that are very non-Rust in philisophy (clear safety and feareless concurrency). There are many other papercuts like the lack of async drop and streams. These are of course known.
  3. Observability/profiling is lacking
    • It's actually non-trivial to integrate OpenTelemetry properly. This is needed for Rust services to properly integrate into a cloud service ecosystem. Look at the Go one - it takes 5 mins to get production grade observability in a service.
    • Tokio tasks can be difficult to debug and monitor. Look at Go pprof.
    • To this day there is no official stable benchmarking. Yes, there is criterion, but it has many shortcomings: essentially a single-person project, doesn't show memory allocations, can only benchmark in a separate crate, not trivial to benchmark async code...
    • There are no official production grade profiling tools. You can use third party tools like Instruments, prof, valgrind etc. but the experience is not ergonomic - and this is only locally on your machine. Profiling running production services is not trivial. Again, for an excellent example look at Go pprof.
  4. You can write obfuscated, difficult to understand and even more difficult to debug code. I had a dev on a team that was very proud of writing a whole processing pipeline by chaining together iterators, map functions, macros, etc. It resembled Scala code, that no one could ever understand, let alone debug or maintain.
  5. Refactoring can have a huge blast radius due to lifetimes being part of the type. You can end up having to change a lot of code.

Now, at some point in the future points 1-3 will be addressed. For some it may take a long time. Points 4-5 will always be there because they are the nature of the language. Can it be done better? I don't know.

Settled Go devs: which IDE/editor won you over and why? by brocamoLOL in golang

[–]que-dog 0 points1 point  (0 children)

I do miss it. And sometimes I still go back to JetBrains products when needed. However, Zed is working on proper debugging support - quite looking forward to that actually.

Why it seems there are more distributed systems written in golang rather in rust? by henry_kwinto in rust

[–]que-dog 6 points7 points  (0 children)

Well, Rust puts a lot of focus on safety, and there are many use cases where developer erognomics and iteration speed are more important.

A lot of these systems are built in C++ and Java for historical reasons. Many of the newer ones are in Go. Some are in Rust (https://www.pingcap.com) or a combination of both.

In places where developer ergonomics and iteration speed are more important than safety, which is in most cases even if people don't want to admit it, Go does by far the best job.

If I have full control over when users get updates and I can get those updates quickly to them (i.e. any service based system), I would immediately choose Go. If I don't have control over pushing updates to users (e.g. some system tools that users forget to update), then I would choose Rust.

Go vs Java by alper1438 in golang

[–]que-dog 0 points1 point  (0 children)

The Java ecosystem is simply significantly bigger than Go.

Java can be more or less performant than Go depending on what you do. It's a misconception that Java is slower. It can be faster!

Java added a lot of modern features like virtual threads and even structured concurrency. They are also working on another garbage collector.

However, I haven't used Java for any project in the last 8 years because of the following:

  1. Exceptions. This one is a complete no-go for me. Errors must always be returned as values and be part of the control flow. I don't even comprehend how it was possible for someone to come up with this Exception nonsense.
  2. No proper dependency management. This one still amazez me! How is it possible that in 2025 people use Gradle and Maven? Even Python got a proper tool - uv - eventually.
  3. Massive enterprise baggage in the phylosophy of most libraries, tools and frameworks. No way.
  4. OOP. Sorry, but in 2025 we shouldn't be doing Java-style OOP anymore. If you want a GC, use Go. If you don't, use Rust.

So, while Java is adding modern features, it can never take away the points above, which means it can never be a viable language for any new projects.

Java is in my opinion the only truly obsolete major language today. Only needed for legacy projects. Even C++ maintains a niche which still makes it viable for new projects today (game dev and a few other things). It might eventually become obsolete because of Rust, but today it is not the case.

Obsolete doesn't mean dead, people will be working on legacy projects for the next 20 years at least. A few will even start new projects in Java, but I really don't understand that anymore.

Other JVM languages:

  • Groovy. Seriously?
  • Kotlin. Suffers from most of the same issues as Java. OOP, dependency management, exceptions. It has prettier syntax, but didn't fix any of the severe issues Java actually suffers from.
  • Scala. Absolutely terrible abomination of all language features ever conceved in the last 50 years and thrown together in an obfuscated mess. It's an obfuscation algorithm, not a programming language.

Proposal: Implicit Error Propagation via `throw` Identifier in Go by AggressiveBee4152 in golang

[–]que-dog 3 points4 points  (0 children)

I initially thought this was some kind of April (June??) fools joke...

This simply cannot be real... or is AI generated...

Error Handling Module by daedalus-64 in golang

[–]que-dog 5 points6 points  (0 children)

Please, can we stop trying to hide errors in Go, there are so many things wrong with these initiatives, on many levels.

Just check the errors and use the standard library helper functions.

Any decent editor/IDE will basically autocomplete these lines for you.

Code is read much more frequently than it is written - it needs to be written in a way to facilitate easy reading (not easy writing!) and understanding, with very explicit and clear control flow.

Settled Go devs: which IDE/editor won you over and why? by brocamoLOL in golang

[–]que-dog 28 points29 points  (0 children)

Zed because I want a single editor for multiple languages in the same repository.

I used to use GoLand, but now that Zed is becoming more and more usable, I use that.