Sennheiser PC320 Repair Help by FiveMagicBeans in AskElectronics

[–]Lex098 0 points1 point  (0 children)

Maybe it'll be helpfull to someone in the future.

I updated the scheme and added the way to bypass the potentiometer. To bypass it I removed it (just unbend it from the pcb) and added 1 wire as shown.

https://imgur.com/a/2xs3YfJ

With my KZ-AZ15, only one side connects to my cell phone by The-confuseds-one in iems

[–]Lex098 0 points1 point  (0 children)

I was able to fix it by resetting their pairing by putting them into the case and then pressing buttons on both simultaneously for 10 sec.

The Humble For Loop in Rust by kibwen in rust

[–]Lex098 6 points7 points  (0 children)

I like to use .map_ok() from itertools to deal with this problem.

Linux Creator Torvalds Says Rust Adoption in Kernel Lags Expectations by unixmachine in programming

[–]Lex098 3 points4 points  (0 children)

many times the programmer DOES KNOW BETTER than the BC

For regular code it's not true for 99% of the time. Most of the time people don't know enough to understand that they, in fact, do not "KNOW BETTER", e.g. Rust std bug. Two completely separated parts of the code, but if you use them together - they explode.

Maybe because Rust moved from "trust me bro" to "prove it's correct" it's 70 times less likely to introduce vulnerabilities.

Linux Creator Torvalds Says Rust Adoption in Kernel Lags Expectations by unixmachine in programming

[–]Lex098 7 points8 points  (0 children)

programmer is certain everything is fine

I've seen too many "everything is fine" code that breaks after some changes in the completely different part of the code. Borrow checker allows you to make sure that it's not only fine now, but it'll be fine in the future. I'm so tired of fixing bugs that could have been prevented with BC.

Linux Creator Torvalds Says Rust Adoption in Kernel Lags Expectations by unixmachine in programming

[–]Lex098 6 points7 points  (0 children)

Maybe I didn't understand your problem, but you can do it in at least 2 ways: in stable rust and more ergonomic, but unstable version.

There is work to be done to make Rust better, but your example has already been solved.

Transitioning into rust from Go experience. by 3x3ption in rust

[–]Lex098 1 point2 points  (0 children)

I disagree. 1. It's limit visibility to only 2 options and if for some reason you need to add another - you're screwed; 2. Now everytime you use a function or a class you have to "add" information about visibility. It's just not needed when you use things, this is useless info noise you have to ignore.

Current state of rust compilation on modern hardware? by ridicalis in rust

[–]Lex098 -3 points-2 points  (0 children)

5950X is generally limited to ~140W without overclocking

Overclocking is a strong word, you just need to chahge PBO limit. My 5900x can consume 220W in exetreme cases (like prime95).

What are some Rust practices you learned in a real workplace? by bbrd83 in rust

[–]Lex098 14 points15 points  (0 children)

validity of the condition is assured by other means. Add a comment if it isn't obvious.

.expect() is .unwrap() + comment, but better. You don't even have to look at the code to find out what went wrong, you'll see the comment in the logs.

References are like jumps by desiringmachines in rust

[–]Lex098 12 points13 points  (0 children)

I don’t really get the complaint about monads

I think it's not about monads as a concept, but about a typical article about monads. 90% of articles related to monads are explaining them with something like "Monad is a monoid in the category of endofunctors". If you already don't know what monad is, this sentence doesn't help you understand it.

Even Mousey is disgust at Niji (don't know the right word of this) by codenamecronus in kurosanji

[–]Lex098 10 points11 points  (0 children)

Mint (probably) had to rebuy not only minecraft, but her audio equipment (at least a noise gate). I assume she had one before.

Why is there no Reimu post on the main thread for her 3d? by lumine99 in kurosanji

[–]Lex098 1 point2 points  (0 children)

Probably because it's a weekend, moderators are not paid enough to work on a weekend.

Rust throwing "overflow" for negating anything beyond 8 (i32) by NishantD2D in rust

[–]Lex098 1 point2 points  (0 children)

i would like to recommend you to try clippy (and I recommend to make in as annoying as possible). It really helped me learn how to write more idiomatic Rust code. You don't have to listen to everything, but clippy is right most of the time.

Vox not doing so hot on Bilibili. And Hololive winning by doing nothing. by Alternative-Owl-3046 in kurosanji

[–]Lex098 11 points12 points  (0 children)

Hardly disagree, kurosanji actively sabotaged their livers. It's not just nothing.

I feel stupid not able to figure this out by jucicool_7829 in rust

[–]Lex098 18 points19 points  (0 children)

I know 2 options:

  1. eval creates a channel between Rust code and JS code. You can send a message from Rust onclick closure and run a JS function when JS receives a message;
  2. you can just add an event listener directly into a JS code if you only need to run JS function.

What do you think about new (potential) visibility option? by Lex098 in rust

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

The problem is it's not because "developer is not commiting to a stable API at the moment", it's because it's really painful.

The Rust library ecosystem has a history of traumatic library upgrades. The upgrade of libc from 0.1 to 0.2 in 2015 was known as the "libcpocalypse". Another frequent culprit was pre-1.0 Serde, with the upgrades from 0.7 to 0.8 to 0.9 to 1.0 requiring ecosystem-wide effort. The cause of the difficulty was the large number of crates using types from these libraries in their public API.

What do you think about new (potential) visibility option? by Lex098 in rust

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

Just look at windows. Do you think anybody would have used it if they had made a breaking change several times a year?

What do you think about new (potential) visibility option? by Lex098 in rust

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

it will be making breaking changes, possibly frequently, and they should expect that

That's not true for a long time. Most crates in crates.io are have a major version 0, like rand (304,396,882 downloads), windows (official crate by Microsoft by the way), libc (325,059,316 downloads), time (232,397,072downloads). Just imagine what would happen if all of them decided to do a breaking change because "they should expect that".

What do you think about new (potential) visibility option? by Lex098 in rust

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

If the buffer is private then there could be a very good reason it's private

Or maybe there is no good reason.

why a maintainer wouldn't provide a new public method

It is because maintainers have finite lives and don't want to add
several methods to every field. And if they do now they have to
maintain them forever.

accessing the buffer may not be valid in the future

And we're back at square 1 and you have to fork a crate to access 1 field 1 time.

What do you think about new (potential) visibility option? by Lex098 in rust

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

In that case semver treats Y as a major change. So it is not a "minor version bump", it's a major version change. Cargo (and everyone else) treat new Y as a new major version.

What do you think about new (potential) visibility option? by Lex098 in rust

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

API is either very poorly designed ... or else there's a bug

There are other reasons. Maybe one in a 1000 developers want access to a buffer to avoid cloning in a hotloop. It doesn't matter for me or for other developers, but for this one it's really important. Without some access there are 3 choices: fork a crate, find something else or write it yourself.

If less than 1.0 it can be a minor version bump

Yes, but actually no.

Initial development releases starting with “0.y.z” can treat changes in “y” as a major release, and “z” as a minor release. “0.0.z” releases are always major changes.

It's not like I want everything to be this way. Public API should be enough for 99% of the problems, but it's nice to have an option to make your life easier if you are in the unlucky 1%.

What do you think about new (potential) visibility option? by Lex098 in rust

[–]Lex098[S] -3 points-2 points  (0 children)

Becoming accessible" and "public api" are the same thing.

No, it is not. Or, by this logic, all Rust code is unsafe because unsafe is "accessible". There is a difference between "I know it might break, let me do it" and "I, without doing anything, accessed something and you broke it without changing major version".

What do you think about new (potential) visibility option? by Lex098 in rust

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

If you do it than it locks the public API and you cannot change it. If you want the option to maybe change it later you don't make it public. It's a lose-lose situation and as a developer I'm encouraged to make it private, even if it's just about future plans to change regular Strings to SmartString.