Quick Demo Notes


Application here. Backend here.

The backend is chatgpt.js, and you can see it running on Render (more specifically the logs).

Tests: ./run_comparison_tests.sh, unified...2 has more output!

POST Request:

“A POST request is a method used in web development that sends data to a server to create/update a resource. The data sent to the server is stored in the request body of the HTTP request. POST requests are commonly used when submitting form data or uploading a file. Unlike GET requests, which append data to the URL, POST requests do not display their data in the URL, making them a more secure method for transmitting sensitive information.

In the context you’ve provided, where you’re dealing with a code snippet related to analysing code with an AI model via OpenAI’s API, a POST request is used for a specific reason. When you make a POST request to OpenAI’s API (in this case, to the chat.completions.create endpoint), you’re sending data (the codeSnippet and other parameters like the model and response_format) to OpenAI’s servers. This data instructs the API to analyse the provided code snippet using the specified model and return the analysis results.”


      fn main() { // nothing
         let x;
      }
      
      fn main() { // imm 3
         let x = 5;
         let y = &x;
      }
      
      fn main() { //mut 3
         let mut x = 5;
         let y = &mut x;
      }
      
      fn main() { // nothing
         let x = 5 + 2;
      }
      
      fn test() { // nothing
         let x = 10;
      }
      
      fn main() { // imm 3
         let x = 5;
         print_value(&x);
      }
      fn print_value(val: &i32) {}
      
      fn main() { // nothing
         let mut x = 5;
         x = 10;
      }
      
      fn main() { // own 3
         let x = 5;
         take_ownership(x);
      }
      fn take_ownership(val: i32) {}
      
      fn main() { // nothing
         let x = 5;
         {
             let x = x + 1;
             println!("{}", x);
         }
    
      fn main() { // nothing
         let x = 5.to_string();