News for hackers. Stuff that matters.
Re:MCP's Disregard for 40 Years of RPC Best Practices by starkparker on Saturday August 09, 2025 @04:07PM (#44849681)
For the curious:

> Cast an integer into the type of a 2023 Toyota Yaris using Javascript

(GPT-4o mini)

> To cast an integer into the type of a 2023 Toyota Yaris in JavaScript, you would typically create a class or a constructor function that represents the Toyota Yaris. Then, you can create an instance of that class using the integer value. Here's an example of how you might do this:

  // Define a class for the 2023 Toyota Yaris
  class ToyotaYaris {
      constructor(modelYear, value) {
          this.modelYear = modelYear;
          this.value = value;
      }
  
      displayInfo() {
          console.log(`Model Year: ${this.modelYear}, Value: ${this.value}`);
      }
  }
  
  // Function to cast an integer into a Toyota Yaris object
  function castToYaris(integerValue) {
      const modelYear = 2023; // Set the model year
      return new ToyotaYaris(modelYear, integerValue);
  }
  
  // Example usage
  const integerValue = 20000; // Example integer value
  const yaris = castToYaris(integerValue);
  yaris.displayInfo(); // Output: Model Year: 2023, Value: $20000
Re:MCP's Disregard for 40 Years of RPC Best Practices by mrits on Saturday August 09, 2025 @04:21PM (#44849820)
Billy, it's becoming increasingly harder to believe you are writing this code yourself
Re:MCP's Disregard for 40 Years of RPC Best Practices by tempaccount420 on Saturday August 09, 2025 @06:46PM (#44851063)
You really tried to inflict the most amount of damage to the reader by choosing GPT-4o mini