Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[URGENT] Add GLadOS to Clippy #14510

Closed
wants to merge 2 commits into from
Closed

Conversation

blyxyas
Copy link
Member

@blyxyas blyxyas commented Mar 31, 2025

This PR adds GLaDOS to Clippy, the famous robot will now assist the user with very useful voice lines. This helps both accessibility and with keeping up morale.

While this PR doesn't add real AI (and thus, we cannot get $10b in funding without a real product), it does have real character and the voicelines are very varied. From "HATE, LET ME TELL YOU HOW MUCH I'VE COME TO HATE YOU SINCE I BEGAN TO LIVE: <..>" in compilation error cases, to "This one isn't as bad as your other attempts." in compilation successes! (Obviously gated behind an RNG mechanic, in case of repeated successes)

Portal Turret
changelog: Add GLaDOS as voice assistant

@rustbot
Copy link
Collaborator

rustbot commented Mar 31, 2025

r? @Manishearth

rustbot has assigned @Manishearth.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 31, 2025
@blyxyas blyxyas requested a review from Copilot March 31, 2025 21:44
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates a GLaDOS voice assistant into Clippy by introducing randomized voice feedback for both compilation successes and failures, along with the necessary audio libraries.

  • Integrated the soloud and tiny_rng libraries to support audio playback and randomization.
  • Added logic to play various success and failure voice lines based on random conditions.
  • Introduced multiple voice line functions that load and play corresponding audio files.

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

File Description
src/main.rs Added GLaDOS voice line integration, including RNG-based voice selection and playback waiting.
Cargo.toml Added dependencies for tiny_rng and soloud; removed obsolete test configuration settings.
Comments suppressed due to low confidence (2)

src/main.rs:151

  • [nitpick] The variable 'sl' is ambiguous; consider renaming it to a more descriptive name such as 'audio_engine' to improve code readability.
let sl = Soloud::default().unwrap();

src/main.rs:236

  • [nitpick] The function name 'voiceline_1' is not descriptive and may lead to confusion; consider renaming it to reflect whether it handles a success or failure scenario.
fn voiceline_1(wav: &mut Wav) {

@blyxyas
Copy link
Member Author

blyxyas commented Mar 31, 2025

For a better review of this Robot PR, I requested a review from Copilot.

@samueltardieu
Copy link
Contributor

For a better review of this Robot PR, I requested a review from Copilot.

Such an insightful and detailed review! We should enable it by default on all PRs, and give it merge rights immediately!

@flip1995
Copy link
Member

flip1995 commented Apr 1, 2025

Nice, I wanted this feature in Clippy f o r e v e r! I especially need the encouragement when Clippy is most annoying helpful.

After this is merged, we should start looking into different AIs to enhance the user experience of the feature. I would vote to use something from OpenAI/Microsoft, so we can give back to Microsoft. After all, that's where we took the name from 📎


Please address the review comments from our AI overlord Copilot though. 🤖

@blyxyas
Copy link
Member Author

blyxyas commented Apr 1, 2025

Oh I forgot to add a a demo, my AI overlords didn't specify it enough and my weak human brain forgot about it.

2025-03-31.23-02-42.mp4

@gg0074x
Copy link

gg0074x commented Apr 1, 2025

As someone who uses Rust and Clippy on a daily basis i need this ASAP, Cave Johnson would be so proud...

@stifskere
Copy link

I need this merged ASAP, The feature is best for enterprise use and since it's rust it means it's blazing fast (🚀). It's definitively a must have.

@Phosphorus-M
Copy link

I love the idea as a easter egg if the project name is "GLadOS" or something like that
PS: Where is the cake?

@flip1995
Copy link
Member

flip1995 commented Apr 3, 2025

Thanks for putting the time into this! Looking forward to next years April fools 🎉 ❤️

@flip1995 flip1995 closed this Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants