Skip to content

Conversation

@ThatXliner
Copy link

@ThatXliner ThatXliner commented Oct 16, 2023

Description

Checklist

  • I have read and followed the instructions in the README
  • I have put the language I am adding in the name of this PR
  • I have created a file named donut in the donuts folder with the proper file extension
  • I have added a new key/value pair to info.json with the proper metadata

The thing is, I need to verify the rust-chatgpt code (this was ChatGPT's zero-shot output)

@joeskeen
Copy link
Contributor

Happy to help out with this one if needed - I have written enough Rust to make myself dangerous.

@ThatXliner
Copy link
Author

works like a donut now

@ThatXliner ThatXliner marked this pull request as ready for review October 22, 2023 20:05
@ThatXliner
Copy link
Author

The thing is, half of it is a comment. I wonder if that's fine. I can shrink it if needed.

@EvanZhouDev
Copy link
Owner

Nope, all good!

@ThatXliner
Copy link
Author

Ok it doesn't work again because I think I forgot to copy another lien of code... I'll have to reformat all of this all over again. Perhaps we can just close this and use @joeskeen's PR? Here's a functional one-liner if that helps:

use std::thread;use std::time::Duration;fn main(){let mut A:f64=0.0;let mut B:f64=0.0;loop{let mut s=vec![' ';1760];let mut t=vec![0.0;1760];A+=0.05;B+=0.07;let o=A.cos();let e=A.sin();let n=B.cos();let c=B.sin();for o in 0..1760{s[o]=match o{o if o%80==79=>'\n',_=>' ',}}for i in (0..628).step_by(7){let r=(i as f64*0.01).cos();let a=(i as f64*0.01).sin();for i in (0..628).step_by(2){let l=(i as f64*0.01).sin();let f=(i as f64*0.01).cos();let A=r+2.0;let B=1.0/(l*A*e+a*o+5.0);let d:f64=l*A*o-a*e;let m=(40.0+30.0*B*(f*A*n-d*c))as i32;let v=(12.0+15.0*B*(f*A*c+d*n))as i32;let I=(m+80*v)as usize;let h=(8.0*((a*e-l*r*o)*n-l*r*e-a*o-f*r*c))as usize;if v<22&&v>=0&&m>=0&&m<79&&B>t[I]{t[I]=B;s[I]=".,-~:;=!*#$@".as_bytes()[h]as char;}}}print!("\x1b[J\x1b[H{}",s.iter().collect::<String>());thread::sleep(Duration::from_millis(50));}}

@ThatXliner
Copy link
Author

I’m not gonna work on this

@Rudxain
Copy link

Rudxain commented Jan 9, 2025

What about this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants