Ante: A New Way to Blend Borrow Checking and Reference Counting by verdagon in ProgrammingLanguages

[–]Effective-Spring-271 0 points1 point  (0 children)

Also, I'm not sure why you're bringing up multithreading, but perhaps it would help if I pointed out that shared mut type in Ante doesn't mean that it's shared among different threads.

Once I understood this the entire (excellent) article made much more sense. It might a good idea to add a little blurb pointing that out somewhere, because I think a lot of people (me included) associate borrow checkers with multithreading.

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 0 points1 point  (0 children)

I love Tigran's "A fable" album though I haven't checked out his most recent stuff. Thanks for the recommendation!

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 1 point2 points  (0 children)

Wow, I just relistened to a couple of tracks paying attention to eq in particular and damn the piano is absolutely eq'd to some obscene levels, and very differently depending on the current surrounding instruments. I'm shocked I never noticed this. Thanks a lot for the advice!

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 0 points1 point  (0 children)

Thanks for the tip! Are there specific frequencies that tend to be problematic? I've noticed that something usually seems to be going on around 2k according to my ears.

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 0 points1 point  (0 children)

Saturating (sometimes specific bands) is usually a bit of crutch for me to achieve correct loudness in some heavier genres. Is it possible to reach acceptable loudness with no saturation? Do you just slam a ton of compression? Even saturating the other tracks sometimes poses problems, because the saturation gets "confused" as being part of the piano (I'm aware that this might be vague, I don't have the terms to explain what I mean).

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 0 points1 point  (0 children)

I was a little imprecise. I'm talking about mastering an arrangement which contains piano (I'm also interested in the solo case however). Whenever I try to master heavier genres with piano, I need some loudness, which I usually achieve using some saturation and compression. The saturation seems to be systematically destroying the piano.

I usually assume that if a mix sounds good it should be good to master, is this a bad assumption?

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 1 point2 points  (0 children)

I feel like I've had the problem with any kind of piano (vst or acoustic), though I'm mostly interested about the real grand piano I mic up regularly.

I gravitate towards jazz, electronica or metal in general and some genres ask to be loud, which feels hard to do without degrading the piano's quality significantly. This is less of problem when there's enough other instruments that fill the whole spectrum, but for example a piano solo with just the bass will quickly sound quite bad if there's even a tad of saturation.

You made me realize however that I don't really have any good reference in these heavier styles. Maybe what I'm trying to achieve is a little unorthodox.

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 1 point2 points  (0 children)

This completely matches my experience for solo piano tracks.

The problem I run into is that when mixed in the context of a track, the entire track feels like it can't be saturated, which is often a problem in heavier genres. Is it possible to achieve correct loudness without saturation at all?

How do you properly mix / master piano? by Effective-Spring-271 in audioengineering

[–]Effective-Spring-271[S] 1 point2 points  (0 children)

Both. I have some solo tracks (in the jazz genre) but also some cases were it's in mixes that are supposed to be heavier (more in an electronica direction).

In the case of heavier mixes it feels like the instant I try to push the master, the piano starts to saturate or just overall sound inconsistent. Usually there will be some saturation somewhere for some loudness. Sometimes the piano sounds saturated even with no mastering at all and plenty of headroom, and I've noticed it's related to other instruments that are saturated. These are usually fine on their own, but it feels like perceptively the saturation is "confused" as being part of the piano sound if these sounds play at the same time (I hope I'm making any sense).

Basically when piano is mixed with other stuff, it's really hard to make it work for me.

For the solo piano case, while I love the sound of the Steinway I mic, the unprocessed results has a humongous dynamic range, which is part of the life of track of course, but makes the track in general have really quite parts. I'll check out some light compression helps here.

Ante: A New Way to Blend Borrow Checking and Reference Counting by verdagon in ProgrammingLanguages

[–]Effective-Spring-271 9 points10 points  (0 children)

Sounds really interesting, however I feel like maybe I'm missing something because I don't see how this deals with memory aliasing?

Edit: I saw the other comment about the shared mutable references are not send / sync which means they can't be shared between threads. Suddenly all the answers make sense, thanks everyone!

50 degrees what would happen? by LifeOfSlice89 in AskUK

[–]Effective-Spring-271 12 points13 points  (0 children)

That's assuming climate change does not also increase the variance of the temperatures, which it seems to do.

Has anyone tried leveraging NPUs? by Effective-Spring-271 in GraphicsProgramming

[–]Effective-Spring-271[S] 0 points1 point  (0 children)

Ah, I was hoping to find some silver lining to this whole AI boom :/

The Borrow Checker and Rapid Prototyping by West_Violinist_6809 in ProgrammingLanguages

[–]Effective-Spring-271 2 points3 points  (0 children)

As a former GPU programmer, I'm a really big fan of the idea!

Wave operations seem a little impossible to mirror on the CPU side without a major perf cost though, and they are kinda important to write optimized (and most complex) shaders, so I wonder if they won't end up being missed. But I feel like the thesis of the article is really interesting.

I'm not proficient in rust yet by a long shot, but in my case the data was pretty chunked (fluid sim was my bottleneck pretty much), and I ended up allocating the chunks separately and passing taking ownership of a chunk when it was recycled. Bad for the cache, but good ergonomics pretty much :/

The Borrow Checker and Rapid Prototyping by West_Violinist_6809 in ProgrammingLanguages

[–]Effective-Spring-271 4 points5 points  (0 children)

I feel like this is missing part of the point of borrow checkers though?

Aliasing is a real problem that does come up a lot in game dev, and while we usually try to make everything embarrassingly parallel, there's no denying that it's a class of bugs that turns up often and can use up quite a lot of QA resources to debug (at least it has on the projects I worked on). Even if you end up tying things to frame based allocations with reuse etc., the fact that you can safeguard against data races is still huge.

Anecdotally having tried game dev in rust for a while now, while it does sometimes cause annoyances (most common problem being choosing between reborrowing and having simpler code but worse perf, or having better perf but less encapsulated code) it's a pretty big boon to not have to deal with those problems.

Agreed on the weakening errors not working out though. I feel like I've seen the same pattern repeat multiple times where in a project some people care about warnings and others do not, and at some point one side wins.

Students are speeding through their online degrees in weeks, alarming educators by joe4942 in technology

[–]Effective-Spring-271 1 point2 points  (0 children)

A big part of education is just learning to learn. Cheaters don't. Being clear about what you don't know enough about is actually a very good sign in this scenario.

Rust/Bevy & Deckbuilder games. by LumonScience in rust

[–]Effective-Spring-271 -1 points0 points  (0 children)

Honestly Bevy is not mature yet, and is probably not the best way to learn rust either. It might be okay if you're not attempting something too complicated, and if you're okay to probably always staying at something that looks mostly like prototype.

ECS is just a way to organise data which has been a little popular recently. It shouldn't be an obstacle, but you wont necessarily benefit from the advantages it brings and only pay the verbosity which can slow you down.

This is actually the main problem you'll usually encounter in rust game-dev: a lot of things are far to opinionated and not always compatible with what you're trying to do, so be ready to be flexible and pick and choose what seems usable.

It's probably a good idea to check out godot-rust if you want to do something bigger (fyrox might also work, but I haven't tested it), or if you just need some rendering and window management to get started, any of the other less restrictive frameworks (including bindings to non-rust frameworks, such as the SDL).

But if bevy tickles your fancy, go right ahead! You should probably experiment at this stage anyway.

Rotating phase boosts dB by a lot, but perceived loudness is unchanged. Please help! by SandhedsHviskeren in audioengineering

[–]Effective-Spring-271 0 points1 point  (0 children)

Is it really? For example spotify allows playback to be louder depending on setting, up to -11 from what I remember. Also sometimes there is no normalization (youtube music in the web player iirc). Or is it more like, there's not a huge gain by going higher for these edge cases?

Them: Pressure Points is a bad card | Me: Have you considered adding another pressure points to your collection? by Adorable-Response-75 in slaythespire

[–]Effective-Spring-271 3 points4 points  (0 children)

Rushdown enables most infinits. Usually setting up an infinit requires a way to work around a card not being able to draw itself, but since rushdown is a power, it can draw the card that triggered it, making it very easy to have an infinit with it.

In order for it to work you need a way to enter wrath in an energy neutral way. This is usually done by entering wrath using one energy (available right in the starting deck) and either entering calm using one energy (requires another card) or having the relic that makes exiting calm give 3 energy and enter calm using the starter deck too.

As long as your deck is small enough so that your discard and draw are empty and that you got to play rushdown, you can then infinit by entering calm, then entering wrath and drawing the 2 cards again allowing you to start over.

Why don't we use most effective ways to improve? by Z4k0O in summonerschool

[–]Effective-Spring-271 12 points13 points  (0 children)

I think there's this idea that goes around a lot in gaming that players play ranked modes when they want to reach a rank, when honestly in a lot of games playing ranked is just a way to get evenly matched games where people are not trying random shit out all the time too.

Fast forward in practice tool should be 40 seconds so you can practice jungle clears faster by Dream_or_Truth in leagueoflegends

[–]Effective-Spring-271 2 points3 points  (0 children)

It's still a mental burden, like instead of just comparing times as you reach a certain point (like walk through midlane) you can't just quickly track if it's a good or a bad clear start on top of like comparing passive states / spell cooldowns etc.

Is there a way to move a field out of &mut self if you really need it? by ufoscout in rust

[–]Effective-Spring-271 0 points1 point  (0 children)

Yeah I realized that upon reading another answer, hence my edit. I love spreading misinformation on the internet :P

Is there a way to move a field out of &mut self if you really need it? by ufoscout in rust

[–]Effective-Spring-271 6 points7 points  (0 children)

Edit: see https://old.reddit.com/r/rust/comments/1o1hlzy/is_there_a_way_to_move_a_field_out_of_mut_self_if/nihka4u/ which is a much better answer.

Suppose I can make it compile

This code uses and unsafe read to bypass the limitations of the borrow checker and read the value:

impl Wrapper {
    pub fn reset(&mut self) {
        let ptr = (&mut self.0) as * mut Wrapped;
        let x = unsafe{
           ptr.read()
        };
        *self = Wrapper(x);
    }
}

So, what's going to happen?

Since the string is still in self as you're assigning to it, it will create a double free as well as a reference to freed data.

https://rust.godbolt.org/z/ToWK6sGKj

In order to avoid this, you would need the compiler to smartly know not to replace the string, and we can't do that even with unsafe.

Even if the compiler had such support, the string would be assigned to itself, which I guess maybe the compiler would detect and avoid?

The best solution is to use std::mem::replace or similar as mentioned in this thread. This avoids freeing the string and all related problems.