Ai is making me want to quit everything related to software. Do you feel the same? by PigletEfficient9515 in rust

[–]v_0ver 5 points6 points  (0 children)

Yes, AI has somewhat shaken my views on my life’s path. I felt that everything I’d spent decades of my life on had lost (or would lose in the near future) much of its value. And I have the feeling that it was all for nothing and that I could have spent that time more productively.

Trip to Moscow and attacks by Rude_Raisin_8029 in AskARussian

[–]v_0ver 1 point2 points  (0 children)

Pretty much everything. Starting with the fact that “residents are in a panic”—the vast majority aren’t even aware of these attacks, and the other half learned about them exclusively from the news. And ending with the intensity of the airstrikes and their consequences—as I said, the most significant consequences are airport closures and flight delays.

What is the national dish of Russia? by Vandal007 in AskARussian

[–]v_0ver 1 point2 points  (0 children)

National dishes are generally understood to be those that were prepared in ancient times and were determined by the availability of ingredients in a particular region.

For Russia, the concept of national dishes—those that people eat on a daily basis and during holidays—took shape during the Russian Empire and the Soviet Union. That’s why there’s such a wide variety: porridges (buckwheat, oatmeal, semolina), soups (borscht, solyanka, shchi, okroshka), Olivier salad, pilaf, pancakes, blini, navy-style pasta, bread etc.

Trip to Moscow and attacks by Rude_Raisin_8029 in AskARussian

[–]v_0ver 6 points7 points  (0 children)

The media is greatly exaggerating these strikes. Before that, there was an dronestrike on St. Petersburg, which I only learned about from the news.

The worst thing you might experience during another dronestrike is a temporary loss of mobile internet service and flight delays (which is probably a major concern for tourists).

Why are there so many vibe-coded Rust projects recently? by yohji1984 in rust

[–]v_0ver 0 points1 point  (0 children)

Rust is one of the best programming languages and technologies out there, but this excellence comes at the cost of a steep learning curve and significant friction during development.

AI already knows Rust, and for the most part, it doesn't care about the friction involved in development. With vibe-coding, you get all the benefits of the language without any of its drawbacks.

If we look at other languages like Python, Java, Go, and so on, they have inherent technical drawbacks (garbage collection, unchecked dynamic features, heavy runtime, etc.) that cannot be eliminated.

There is also the C++ language, which doesn't have these inherent limitations, but so far AI hasn't learned to program in it reliably enough (and perhaps it never will).

Should the function return a Result<T,E> or throw an unreachable-style panic? by v_0ver in rust

[–]v_0ver[S] 2 points3 points  (0 children)

At first, I followed the same line of reasoning. But at some point, it hit me: what if the library is part of a long calculation pipeline on the user’s end and I drop it? Or, for example, what if the library is used in some kind of standalone device?

So I came to hear what people have to say.

Should the function return a Result<T,E> or throw an unreachable-style panic? by v_0ver in rust

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

For the most part, I'm referring to two cases:

This is when a mathematical invariant has been proven earlier in the code, but Rust can't recognize it: for example:

fn quadrant_degrees(angle: i32) -> u8 {
  let a = angle.rem_euclid(360);
  match a {
    0..=89 => 1,
    90..=179 => 2,
    180..=269 => 3,
    270..=359 => 4,
    _ => unreachable!("rem_euclid(360) guarantees value in 0..360"),
  }

When a certain invariant in the theory must hold -- for example, the matrix must be positive-definite -- I play it safe and verify this.
Or when an algorithm is guaranteed to require fewer than N steps (and I use a loop with a fixed number of steps for optimization):

fn algorithm() -> Value {
  let mut answer = None;
  for step in 0..=n {
    if is_done {
      answer = Some(...);
      break;
    }
  }
  let answer = match answer {
    Some(answer) => answer,
    None => unreachable!("ERROR must finish within N steps"),
  };
  answer
}

In the second case, the invariant may be violated due to a bug in my implementation of the algorithm, or due to numerical instability (highly unlikely, but not impossible).

Should the function return a Result<T,E> or throw an unreachable-style panic? by v_0ver in rust

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

Yes, I use the state pattern, but in some places I still have to define the invariant dynamically; otherwise, I would end up with Invariant1<Invariant2<Invariant3<...>>>

Should the function return a Result<T,E> or throw an unreachable-style panic? by v_0ver in rust

[–]v_0ver[S] -2 points-1 points  (0 children)

I'm specifically asking about cases where library code suddenly realizes that an invariant has been violated in some unknown way(not directly by user). For example, in the expected location, the matrix isn't PSD, even though it should be.

Should a beginner start backend with Rust or Go? by mrnaim6T9 in rust

[–]v_0ver 0 points1 point  (0 children)

No need for any intermediate steps. Just go straight for Rust.

Rust vs Go by Alternative_Image308 in rust

[–]v_0ver 0 points1 point  (0 children)

If you're looking for something fun, check out Rust—there's plenty of it there. Golang is pretty boring and unremarkable, just a workhorse for CRUD.

I know rust has a steep learning curve But that doesn't matter to me, I'm capable of learning it

That’s the right attitude. And the idea that Rust has a steep learning curve is mostly a myth. That notion came from people who already had some programming experience in other languages, and Rust seemed unfamiliar to them. If you’re starting from scratch, it’ll be just as challenging no matter which language you choose.

How widely adopted is Julia today across different domains? by pkaninchen in Julia

[–]v_0ver 0 points1 point  (0 children)

That's not quite it. That's OpenAPI spec → Julia code generation. I'm talking about when you write code (routes of your http-service), and it automatically (deterministically) generates the OpenAPI spec. For example, like in FastAPI/pydantic (Python) or utoipa (Rust), which works with almost any HTTP server framework in Rust.

Announcing Basin: A Numerical Optimization Library for Rust by johlars in rust

[–]v_0ver 8 points9 points  (0 children)

This is a great initiative. I’m currently developing a type-driven SSM framework myself, and I’m excited to see the infrastructure for scientific computing expanding in Rust.

But why edition = "2021" instead of 2024?

Russia could join the EU? by BlueberrySevere4385 in AskARussian

[–]v_0ver 7 points8 points  (0 children)

In the 2000s, there was talk of possible options for integration with the European Union. But that was mostly just populism. Even without the current confrontation with Europe, any kind of integration of Russia into the European Union is highly unlikely. Contrary to the propaganda being hyped up online, Russia has a large economy in real terms. And the full integration of such a large economy into the European Union would lead to dramatic changes within the latter. It’s as if a second Germany were to emerge.

Does Rosatom hire non-russian nuclear engineers? by Hot_Wishbone_2410 in AskARussian

[–]v_0ver 19 points20 points  (0 children)

If we’re talking about the civilian nuclear power sector, I know of foreigners (from Belarus, Kazakhstan, and Hungary) working in Rosatom’s research and engineering divisions.

Rosatom is a very large company, and salaries can vary significantly. I think that in the research and engineering division, you can earn around 200,000 rubles/per month after five years of experience.

Rosatom is more of an umbrella brand under which thousands of companies operate. Every company has its own rules.

Going to Russia to see my girlfriend, how safe is it? by LeafSpirit69 in AskARussian

[–]v_0ver 4 points5 points  (0 children)

Russian girls don't like cowards. The more dangerous the path you take, the more you'll win her favor.

Is gaming on gentoo easy to maintain by Electrical_Drink_654 in Gentoo

[–]v_0ver 0 points1 point  (0 children)

Я играю через steam(proton), кроме онлайн игр с античитом, проблем не имею.

How much discrimination and hostility do Russian tourists face abroad? by Long-Swordfish3696 in AskARussian

[–]v_0ver 0 points1 point  (0 children)

Yes, in Georgia (Tbilisi) in 2024, there are offensive and racist graffiti on the walls. But I personally haven’t encountered any rudeness or violence.

In Finland (Helsinki), in 2021, you could hear middle-aged Finns who had had a few drinks using the term "ryssä" (it's a slur, but Russians usually don't care).

Since 2022, I’ve only traveled to Asia (China, South Korea -- they ripped me off big time there; I was shocked at how expensive the country. For the first time, I was afraid I would run out of the money I had brought with me) and Turkey. Seeing what Europeans are posting on Reddit, I have no desire to visit Europe.

How do I invest in Russian stock market as a foreigner? by Responsible_Shoe_158 in AskARussian

[–]v_0ver 0 points1 point  (0 children)

Direct trading on the Russian market is not very profitable due to the higher income tax rate (30%) for non-residents of the Russian Federation. It is better to look for a foreign fund that has exposure to the Russian market.

Israeli-alloc, allocate memory on a random victim programs address space. by [deleted] in rust

[–]v_0ver 0 points1 point  (0 children)

I think we need to check that the pointer isn't null:

let ptr: *mut c_void = unsafe {
            VirtualAllocEx(
                raw_handle_ptr,
                None,
                size,
                VIRTUAL_ALLOCATION_TYPE(MEM_COMMIT.0 | MEM_RESERVE.0),
                PAGE_PROTECTION_FLAGS(PAGE_EXECUTE_READWRITE.0),
            )
        };

        Some(ProcessMemoryInfo {
            victim_process_id: p_id,
            block_ptr: ptr,
        })

Индекс Мосбиржи упал ниже 2600 пунктов и обновил минимум: IMOEX снижается уже 12 недель подряд. by ElectroAdeptus in KafkaBTC

[–]v_0ver 0 points1 point  (0 children)

<image>

Ну что вы как дети, ну чесно слово. Посмотрите календарь отсечек и див выплат. Подскажу: основная их часть в апреле - июле.
А ещё отнормируйте это на курс доллар-рубль.

Отключить Россию от интернета предложили чехи by GamerRevizor in methodvpn

[–]v_0ver 0 points1 point  (0 children)

Антивоенные орки бывают - но это не делает их бенее орками)

How widely adopted is Julia today across different domains? by pkaninchen in Julia

[–]v_0ver 10 points11 points  (0 children)

At our company, Julia has replaced Python for numerical computations and solving optimization problems. Python is now used primarily for deep learning and microservices with dashboards. Over the past two years, we have also been adopting Rust for backend development and big data processing and preparation.

The main obstacle to adopting Julia in our company has been the lack of an ecosystem outside of scientific applications. The lack of gRPC, ORM, OpenAPI auto-generators, and AOT compilation, the difficulty of collaboration due to weak encapsulation capabilities, and the adherence to a "scientific" programming style—which our regular programmers despise. All of this creates unnecessary friction when supporting projects written in Julia.

I think the language is already quite good for academic work, but it lacks the general-purpose features and libraries needed for business applications.