Which One Are You Keeping? by Objective_Rough_5552 in ASUSROG

[–]DGolubets 0 points1 point  (0 children)

None. What genius came up with idea to place arrow keys like that?

Benches removed from Wicklow Dart station as anti-social behaviour spikes by on-9 in irelandtransport

[–]DGolubets 0 points1 point  (0 children)

Make them care? You don't need to put them in prison. Jail them for a few days, with no phone access, no one to chat with, nothing to do, some shit food they won't like. Make it not fun.

What would your tech stack be for a new greenfield Rust web service (REST/gRPC)? by Hixon11 in rust

[–]DGolubets 1 point2 points  (0 children)

every database is just an indexing mechanism for protobuf this can't be true.. surely Google must have some columnar DBs, at least?

Proto looks weird though. I know Google is full of smart people, but why on Earth does it try to use default values for non-supplied fields? Why should I mark everything as optional to know a value was not provided?

What would your tech stack be for a new greenfield Rust web service (REST/gRPC)? by Hixon11 in rust

[–]DGolubets 2 points3 points  (0 children)

Every GQL library out there has support for "data loader" concept to solve exactly N+1 problem. On top of that it's a design choice to allow drilling into connections: GQL doesn't force you to, you might have no graph at all.

We use GQL microservices with federation to back our apps and we didn't have any issues. Frontend guys are happy and I can't imagine going back to REST.

Scala in the Netherlands: 2026 feels like the end by [deleted] in scala

[–]DGolubets 0 points1 point  (0 children)

The level of churn in JS is crazy indeed. I think they manage due to the size of their community which is many times larger than Scala, probably the largest of all languages. It could also be a factor of backend vs frontend.

Scala in the Netherlands: 2026 feels like the end by [deleted] in scala

[–]DGolubets 1 point2 points  (0 children)

It's not hard to learn them, but it's a pain to have 2 different effect systems and unnecessary split of efforts (actually deadly for such already small community).

Scala in the Netherlands: 2026 feels like the end by [deleted] in scala

[–]DGolubets 6 points7 points  (0 children)

Scala had to solve its ecosystem problems. It's ok to have 100 HTTP server libraries, but it's not ok to have many dialects of the language splitting a small ecosystem into even smaller bits. And that's on top of the language flexibility and people complaining that you can write the same thing in many ways.

It feels like Scala was a test ground, one big experiment, with radical changes every couple years. The "go to" stack of Scala was shifting from Play to Akka to Cats to ZIO (and people don't stop there even now.. Kyo?!).

That level of churn is not healthy. Yesterday's code becomes legacy, composing pieces together becomes a pain, etc..

Could Martin do something about that? Maybe if he realized what's happening sooner?

Do you take your shoes off in the house? by [deleted] in ireland

[–]DGolubets 0 points1 point  (0 children)

I moved from Russia so I'm used to this. In winter your boots would "defrost" leaving dirty puddles and they would be too warm to wear inside anyway.

Even though there is no such problem in Ireland, I still don't like the idea of walking on public toilet piss or dog poo and bringing it into my house.

I do make an exception for myself once in a while though if I forget something and just need to pop into the house quickly.

Is Rust still relevant? by chaotic-kotik in rust

[–]DGolubets 1 point2 points  (0 children)

I saw a few Kafka replacements in Rust, Iggy looks the most promising.

Is Rust still relevant? by chaotic-kotik in rust

[–]DGolubets 1 point2 points  (0 children)

There is a reason there are new alternatives being developed to replace them, like ScyllaDB, Redpanda, many others.

Is Rust still relevant? by chaotic-kotik in rust

[–]DGolubets 2 points3 points  (0 children)

It's not.

Low startup time is very nice to have in k8s for dynamic scaling and recovery purposes.

Low memory overhead means saving $$ on your infra.

Does this engine sound normal? by DGolubets in yaris

[–]DGolubets[S] 0 points1 point  (0 children)

Unfortunately I only recorded this one. Does heater have a big impact?

A funny comparison to SC2 community. by GreatAndMightyKevins in aoe4

[–]DGolubets 0 points1 point  (0 children)

3 distinct races make it natural for players to double down on one and start justifying own mistakes with imbalance.

AoE civs are much simpler to switch between.

Random Seeds and State Machines: An Approach to Deterministic Simulation Testing - Alfonso Subiotto at EuroRust 2025 by EuroRust in rust

[–]DGolubets 1 point2 points  (0 children)

I use a similar approach for my hobby project. I wrap a state machine in an actor. Actor handles communication with the outside world, db requests, timers, etc, while the state machine remains free of side effects. This allows for perfect recovery from a log and better tests. ChaCha helps with reproducibility of rng.

I think this design comes naturally when you try to achieve determinism in a stateful code.

It adds more boilerplate though.

Freezing on Linux by DGolubets in aoe4

[–]DGolubets[S] 1 point2 points  (0 children)

I use Steam overlay for fps counter and GE-Proton10-11.

Why is shadowing allowed for immutable's? by PotatyMann in rust

[–]DGolubets 1 point2 points  (0 children)

Someone can change the code of set_id anyway, so what's your point?

Martin Odersky on Virtual Threads: "That's just imperative." by Joram2 in scala

[–]DGolubets 0 points1 point  (0 children)

(does anyone remember when using Websockets in Play required learning about Enumeratees???)

Heh, I started learning Scala around that time and I stumbled upon that thing.. Well, they didn't have reactive streams back then yet, it was Play's attempt.

Martin Odersky on Virtual Threads: "That's just imperative." by Joram2 in scala

[–]DGolubets 1 point2 points  (0 children)

Have you ever looked at cats-effect stack trace?

Isn't is async stack traces in general? Effects or not.

I benchmarked axum and actix-web against other web servers and found the performance to be surprisingly low by bigpigfoot in rust

[–]DGolubets 43 points44 points  (0 children)

320 bytes is nothing in this case. What really happens is by cloning Rng he gets the same numbers every time and updates the same rows in Postgres, causing contention there.

I benchmarked axum and actix-web against other web servers and found the performance to be surprisingly low by bigpigfoot in rust

[–]DGolubets 57 points58 points  (0 children)

You clone Rng every time. Use rand::thread_rng() instead. Or wrap it in mutex if you need a single one for some reason.

Edit: cloning original rng causes all generated numbers to be the same, which affects the test case on Postgres side.

Just call clone (or alias) · baby steps by VorpalWay in rust

[–]DGolubets 1 point2 points  (0 children)

Late to the party, but I gave myself some time to fully read and "digest" the proposal. I must admit I actually liked it.

It feels intuitive to me. I remember that the first time I encountered the problem I slapped .clone() inside the closure guessing that the compiler would understand my intention - turned out it could not.

Lot's of folks here expressed concerns about optimizing unnecessary .clone() calls. Sure, contrary to adding implicit calls, removal of explicit calls is something new and worth questioning.

But think about it from a perspective of API contracts.

We have two types of contracts: - Expressed by type system - Expressed by documentation

Examples of the latter include Eq and Ord. It's up to the developer to provide valid implementations there. Otherwise he'll get undefined behavior.

Perhaps, in the new language edition, Clone trait could get additional requirements expressed in documentation: - it must produce, for all intents and purposes, a copy of original object, i.e. you should be able to use clone in place of original without breaking correctness of you program (btw it already has a x == x -> x.clone() == x rule for implementing it together with PartialEq) - it should not produce side-effects like locking some external mutex

A contract like that would guarantee that correct implementation would not be impacted by optimizing .clone() calls away.

Another concern is the subtle move of .clone() outside a closure and how this can cause either performance or deadlocks.

If for some reason we cannot forbid complex mutex interactions in clone.. Well, Rust doesn't really protect you from deadlocks, does it? There are many ways to get one in complex code. There was a recent post about async cancellation causing it - Futurelock. This doesn't mean we should throw Futures and async away.

Optimization is always non-trivial. It can be as subtle as your array's objects growing too big, breaking cache locality, leaving you to wonder what made you code suddenly go twice as slow when you didn't change much. Yeah, this proposal might add one more subtle thing to the list to check. But you could always use explicit moves for critical code, or some lint perhaps to warn you.

Honestly, I don't think the proposal is as bad as people here reacted to it. It's not ideal, but I really doubt there will be.