Mathnerd314

u/Mathnerd314


r/diyaudio•

I've been looking at passive crossovers and they just look like capacitors and inductors to me... apparently every pro system using DSP and an active crossover. So I've been thinking, why not DIY my own crossover? Class-D Amplifier boards on AliExpress are about as expensive as those heavy electronic components.

So the plan is something like:

  • Buy a XMOS Multichannel USB-I²S PCB and a bunch of I²S ribbon cable
  • Wire it up to PCM5102A I²S DAC breakout board + XH-M562 TPA3116D2 amplifier board
  • Build/buy some passive speakers and skip/rip out the passive crossover. Leave a high-pass capacitor on the tweeters for protection.
  • Wire up each amplifier channel to its own driver
  • Spend weeks
1114

In this post my goal is to prove that the OO notion of inheritance is counterintuitive and has better alternatives. In particular you should think twice about including it in your language - do you really want another footgun? Let it be known that this is by no means a minority viewpoint - for example James Gosling has said that if he could redo Java he would leave out the extends keyword for classes.

First I should define inheritance. Per Wikipedia inheritance is a mechanism for creating a "child object" that acquires all the data fields and methods of the "parent object".

2293

Return type overloading is in a few statically typed languages, like Haskell, Rust, and Swift. An example in Rust:

trait MyTrait {
  fn get_something() -> Self;
}
impl MyTrait for i64 {
  fn get_something() -> Self { 2 }
}
impl MyTrait for &str {
  fn get_something() -> Self { "hey" }
}

fn main() {
  let x : i64 = MyTrait::get_something();
  println!("x: {}", x);
  let y : &str = MyTrait::get_something();
  println!("y: {}", y);
}

The idea is that MyTrait::get_something() is overloaded, so it returns something different depending on the type expected. So far so good, it seems like a useful idea.

The proble

2938

r/Zig•

A global maximum is also a local maximum, so this also means to avoid global maximums. So is this some kind of "The perfect is the enemy of the good" principle where Zig aims to be continually mediocre? Or am I reading too much into basic calculus definitions and this actually means that Zig aims to be the best language ever and not get stuck in dead ends?

65

r/Comcast_Xfinity•

My bill today said

Regular monthly charges have increased by $1.30 as a result of service change(s) made to Your Xfinity package.

I didn't make any changes, so I fear this is the expiration of the 12-month Term Agreement that I got from here last year. Can I get a new contract for close to what I've been paying, or is it time to make the switch?

I'll send my account details in a modmail with a link to this post.

28


r/Comcast_Xfinity•

I signed up a while ago for Comcast, on the Performance Plus internet-only plan at the 29.99/mo new customer price. Then I moved, keeping the plan and the price. So I wasn't sure exactly when the promotional pricing expired but apparently it's this month, as my bill has nearly doubled.

Reading the comments of other Redditors it seems like the straightforward thing to do is to cancel the service and have one of my roommates sign up as a new customer, but I figured I'd post here first to ask "Is this a legitimate practice?"

And I'm also not sure what to do with the free self-install kit that comes with signing up as a new customer so if there's a Comcast person with a reasonably priced reten

06