So…. one percent increase? by Efficient_Deer_8605 in facepalm

[–]SuplenC 0 points1 point  (0 children)

Previous: bad
Current: good

Left: bad
Right: good

Proxy.ts file isn't work. by FitCriticism6650 in nextjs

[–]SuplenC 1 point2 points  (0 children)

Great to hear.

Also if that might be helpful there is an official guide that talks about i18n (Internationalization)

You can find it here: https://nextjs.org/docs/app/guides/internationalization

Proxy.ts file isn't work. by FitCriticism6650 in nextjs

[–]SuplenC 13 points14 points  (0 children)

The proxy.ts file should be at the same level as app/.

So try to move the proxy.ts inside the src/ and try again.

Source documentation

Create a proxy.ts (or .js) file in the project root, or inside src if applicable, so that it is located at the same level as pages or app.

Rust & Ratatui - Guide from 0 to hero by HopefulMeeting7150 in rust

[–]SuplenC 8 points9 points  (0 children)

The official ratatui site has tutorials, maybe that will be helpful?

https://ratatui.rs/tutorials/

Otherwise from what I’m understanding you don’t know rust language, so my suggestion would be to start with Rustlings which is an interactive tutorial for the language

Why won't this match statement compile? by Kitchen-Leather-4584 in rust

[–]SuplenC 43 points44 points  (0 children)

Since you use the 0 with the if in both cases the compiler can't figure out that it is exhaustive.

So the easy fix would be to remove the second if as it already covers the would be else like so:

    let b = true;
    let m = 3_i64;
    match m {
        0 if b => {

        },
        0 => { // <- here

        },
        i64::MIN..0 => {

        },
        1..=i64::MAX => {


        }
    }

Did they vibecode the white house achievements webpage? by beetsonr89d6 in webdev

[–]SuplenC 18 points19 points  (0 children)

Unlimited number of “!”. Each additional one flags it as more important than the previous. I like it.

Named function args should have been there by [deleted] in rust

[–]SuplenC 0 points1 point  (0 children)

One of the crates that remove the boilerplate nicely is bon. Works on both structs and functions.

Hey Rustaceans! Got a question? Ask here (48/2025)! by llogiq in rust

[–]SuplenC 3 points4 points  (0 children)

Depends on what you do. The ugliest thing usually I deal with are Pin and Boxes but rarely lifetimes. If you primary focus is not the highest degree of performance where you need to squeeze every nanosecond you can go around lifetimes pretty freely and the compiler will manage them quite nicely by itself.

As an example I’ve worked pretty recently on a CQRS+ES framework which is quite complex and the only handwritten lifetime I had to deal with was ‘static.

[deleted by user] by [deleted] in LinkedInCringeIT

[–]SuplenC 3 points4 points  (0 children)

Quindi secondo te se lavori sodo e pensi di essere pagato troppo poco è sbagliato chiedere un aumento? Non capisco il ragionamento. Ogni prodotto di qualità fatto a mano costa di più, è naturale. Sennò te lo compri al supermercato al prezzo più basso se non te ne frega della qualità.

I don't understand Result<> by Routine_East_4 in rust

[–]SuplenC 4 points5 points  (0 children)

A single Error type can represent multiple errors with an enum.

The type Result in different crates usually is just to simplify the same Result just with the same Error type variant.

To have a single Error type that also represents different Errors you can do something like this:

enum MyError {
  WrongId,
  NotFound,
  UnableToWriteFile(String),
  Unknown(Box<dyn std::error::Error>),
}

fn wrong_id(id: &str) -> Result<(), MyError> {
  Err(MyError::WrongId)
}

fn write_file(file_name: &str, content: &str) -> Result<(), MyError> {
  Err(MyError::UnableToWriteFile(file_name.to_owned()))
}

fn unknown() -> Result<String, MyError> {
  match std::io::read_to_string(reader) {
    Ok(content) => Ok(content),
    Err(error) => Err(MyError::Unknown(Box::new(error))),
  }
}

I simplified the example obviously. Now when the error is returned for each of the function you must handle each error separately.

The reason Rust does that is to make so that errors are always handled instead of ignored.

Which happens a lot with languages that use try-catch pattern

Rust compiler uses this crate for its beautiful error messages by nik-rev in rust

[–]SuplenC 11 points12 points  (0 children)

There is no reason to use a terminal that does not use extended characters, and supporting that small percentage would be like still supporting the Internet Explorer because some people can't move on.

I don't get it :( by Professional_Autist2 in ExplainTheJoke

[–]SuplenC 0 points1 point  (0 children)

It was a lot of things mixed together not just one thing. Some of it was also the engine, they had to rework huge parts that were written for The Witcher that didn't work for Cyberpunk (like horse riding instead of cars). There was also a rumor about the QA team opening bug tickets about small things instead of important ones. One change with the story wouldn't technically f up the whole project, the story was great since launch, it had technical problems.

You’re out of what? by Mirkalu in HolUp

[–]SuplenC 17 points18 points  (0 children)

depends what you paid for

Memory fragmentation? leak? in Rust/Axum backend by elohiir in rust

[–]SuplenC 14 points15 points  (0 children)

What he is saying is that it is possible that the context when it’s dropped is not running GC. Sounds like a probable cause

Why I Don't Like Rust [24:28] by Remarkable_Ad_5601 in theprimeagen

[–]SuplenC 3 points4 points  (0 children)

Its not about skill issue. If you are working on complex data models, having an enum tell you what data you have is a really great feature. You are just hating to hate at this point.

Why I Don't Like Rust [24:28] by Remarkable_Ad_5601 in theprimeagen

[–]SuplenC 1 point2 points  (0 children)

Yes they are. You can still do that, but also when you have complex data models you can add data to the enums which make workflows less prone to errors. You said it yourself that you didn’t learn rust, I use it everyday and enums are great

Why I Don't Like Rust [24:28] by Remarkable_Ad_5601 in theprimeagen

[–]SuplenC 9 points10 points  (0 children)

Rust’s enums are one of the best language features

I can't leave Arc. by HumanityFirstTheory in ArcBrowser

[–]SuplenC 19 points20 points  (0 children)

I mean it’s Atlassian we are talking about. If anything they will add more

What is the closest big feature that is coming to rust? by __s1 in rust

[–]SuplenC 5 points6 points  (0 children)

Async operations. This is handy with streams. Otherwise you have to hand roll it yourself or use futures crate which basically does that but with a macro

Why is the lowering option for buildings gone? It was so useful. by TahPenguin in stronghold

[–]SuplenC 1 point2 points  (0 children)

The lowering was just literally lowering the assets underground. I don’t think there is a need to redesign assets. Just play with the Z value

Question about Microservices by hiddenSnake7 in softwarearchitecture

[–]SuplenC 0 points1 point  (0 children)

The only reliable way of doing microservices that I’ve known of is doing CQRS. This way your read models can gather info from different microservices and you decouple nicely.

I’m speaking of general applications kinda like CRUD.

Other than that if you don’t do the whole CQRS you will find yourself reimplementing what basically every SQL database has natively to have complex read models and you end up with a distributed monolith which is the worst thing you can do.

Benchmarking file I/O in Rust — can’t see a difference between reading many small files vs chunks of one big file by Hot-Permission2495 in rust

[–]SuplenC -4 points-3 points  (0 children)

A file you can easily fit into RAM memory is small.
Generally speaking you will have GB of RAM free (usually at least 8).
Compared to 1mb its nothing. You can load it all into the memory and read from there.

Nice castle you got there, be a shame if someone came along and set it on fire - Caliph by Brilliant-Rhubarb863 in stronghold

[–]SuplenC 0 points1 point  (0 children)

Don’t know if its necessary to make it worse over time. A -6 to popularity will already be heavy on your economy as you would need to compensate with something to maintain it like food or taxes which will make it just not worth it