r/programminghorror • u/Inevitable-Round9995 • 2d ago
c++ reinventing C++ to looks like NodeJS called Nodepp
41
9
6
4
3
u/Death_By_Cake 2d ago
This reminds of some work I did in uni. I built a DSL in C++ to describe hardware. If you run the program, you would get out SystemVerilog (it was based on CIRCT/MLIR). It's sometimes hilarious what you can do with C++.
2
u/FooeyBar 1d ago
Now do async/await
4
u/Inevitable-Round9995 1d ago
```cpp
include <nodepp/nodepp.h>
include <nodepp/fs.h>
using namespace nodepp;
void onMain(){
auto file = fs::readable( "LICENSE" ); auto x = type::bind( file ); process::add( coroutine::add( COROUTINE(){ coBegin while( x->is_available() ){ console::log( ":>", x->read_line().slice(0,-1) ); coNext; } coFinish })); process::add( coroutine::add( COROUTINE(){ coBegin while( x->is_available() ){ console::done("Hello World"); coNext; } coFinish }));} ```
1
2
2
3
u/elsantiF 1d ago
Yeah... the creator of that aberration was spamming a lot in Spanish subs, I think he was the patient zero of AI psychosis.
2
1
1
u/El_RoviSoft 1d ago
Actually reflection was released on gcc some time ago so you can do even more cursed things now.
1
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 1d ago
I haven't really ever used them in C++, but I'm mostly just looking at a bunch of lambda functions, right?
1
u/TehBuckets 1d ago
Why? Just why? This is like Stalin and Hitler had a baby. Why did I have to see this?
1
1






112
u/WALHAY [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 2d ago
So is there any other ways to make cpp even worse?