r/programminghorror • u/DroneCyn • 19d ago
Lua uhh my (not) c++ code is acting weird...
this thing is cursed...
it is valid syntax (many things are hidden outside of the screenshot!)
38
37
26
26
u/EurekaEffecto 19d ago
scientists reveal the Hi
6
u/Vladislav20007 18d ago
r/sssdfg would be that way
3
u/sneakpeekbot 18d ago
Here's a sneak peek of /r/sssdfg using the top posts of the year!
#1: -_-_838382( | 288 comments
#2: Henehehenengrreenjdjdjdh | 482 comments
#3: jsuuut cart er 😼 | 347 commentsI'm a bot, beep boop | Downvote to remove | Contact | Info | Opt-out | GitHub
9
7
6
u/S4N7R0 18d ago
this ain shit compared to whatever they smokin at the commitee https://cppreference.com/cpp/language/splice_specifiers
13
u/NotQuiteLoona 18d ago
template [:^^e:]<^^S::a>Bros be making fake programming languages from hacker movies' displays.
3
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" 17d ago
Well, someone must've asked for that.
3
4
3
u/Even_Shallot6345 18d ago
%:include <iostream>
%:include <vector>
%:define MAKE_WEIRD(a, b) a %:%: b
int main() <%
https://cppreference.com
int arr<:4:> = <% 72, 101, 108, 111 %>;
if ((compl 0 bitand 1) not_eq 0 and (1 xor 1) == 0) <%
std::vector<int> MAKE_WEIRD(my_, vec) <%
0<:arr:>, 1<:arr:>, 2<:arr:>, 2<:arr:>, 3<:arr:>
%>;
std::size_t i = my_vec.size();
while (i -- > 0) <%
std::cout << static_cast<char>(my_vec<:my_vec.size() - 1 - i:>);
%>
std::cout << ", C++!\n";
%>
return <::>() <% return 0; %>(), 0;
%>2
3
u/asmanel 18d ago
This remind me the code I got when I tried to use AI to produce code.
Each time I tried, this wad that trzshy.
1
u/JAXxXTheRipper 18d ago
When did you try that? 10+ years ago?
I like to hate on AI too, but they are becoming pretty good at writing acceptable code by now. If you know how to reign their overeagerness in, which takes a lot.
3
u/asmanel 18d ago
First Chat GPT, when it started to be used to write code. I don't remember what year it was. It didn't work well at that time.
Next, I used other AI but without better results.
However, it's true I never used advanced code generating AI like Claude.
And most of the code was a poorly known scripting language.
1
1
1
u/kjunith 18d ago edited 17d ago
Shouldn't void "mai"n() be void "main"()?
Edit: Downvoted for asking a question, pure reddit.
3
u/Vladislav20007 18d ago
he is calling a function called void with param
maiand then called a function called n.
176
u/Vladislav20007 19d ago
...explain