memesearch
ChatGPT Finds the Wrong C++ Files

ChatGPT Finds the Wrong C++ Files

Download Find similar pictures
Text on the meme
Write perl script to find *.cpp files without *.g.cpp pair file in directory recursively Here's a Perl script that recursively searches a directory for `*.cpp` files that don't have a corresponding `*.g.cpp` file: #!/usr/bin/perl use strict; use warnings; use File::Find; my %cpp_files; sub process_file { return unless /\.cpp$/; my $cpp_file = $File::Find::name; my $g_cpp_file = $cpp_file; $g_cpp_file =~ s/\.cpp$/.g.cpp/; if (-f $g_cpp_file) { $cpp_files{$cpp_file} = 1; } else { print "$cpp_file\n"; } } my $dir = shift; find(\&process_file, $dir); for my $cpp_file (sort keys %cpp_files) { print "$cpp_file\n"; }
What it means

На скриншоте показан запрос к ChatGPT написать Perl-скрипт для поиска файлов .cpp без соответствующих .g.cpp. Ответ выглядит убедительно, но условие и вывод перепутаны: скрипт печатает файлы, у которых соответствующий .g.cpp есть, а не отсутствует. Это реакционный мем о том, как ИИ уверенно выдаёт код с логической ошибкой. EN: The screenshot shows a request for ChatGPT to write a Perl script that finds .cpp files without corresponding .g.cpp files. The answer looks convincing, but the condition and output are reversed: the script prints files that do have a corresponding .g.cpp file instead of files that lack one. It is a reaction meme about AI confidently producing code with a logical error.

Objects
Tags
Source
Type
image
Size
284×800 · 41.5 KiB
Mood
саркастичный, ироничный
Language
en
Added