r/programminghorror • • Sep 08 '26

c++ reinventing C++ to looks like NodeJS called Nodepp

341 Upvotes

42 comments sorted by

151

u/WALHAY [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Sep 08 '26

So is there any other ways to make cpp even worse?

3

u/TheSpiffySpaceman Sep 08 '26

Make it actually 3D print a gun pointed at your feet

1

u/Inevitable-Round9995 Sep 09 '26

mmmm, love that IDEA; just let me ask claude how to do that.

4

u/Objective_Rate_4210 Sep 08 '26 edited Sep 08 '26

make arrays of any type (ptr or like the ones on the stack) be more memory efficient by throwing each value in seemingly random positions in memory to make padding a thing of the past

2

u/jer_re_code Sep 08 '26

yes and store a seperate dictionary that contains the mapping of all the random indexes so you later know where you put them but each index is its number as a string wich spells out the number

1

u/Inevitable-Round9995 Sep 09 '26

like this?

#include <nodepp/nodepp.h>
#include <nodepp/object.h>

using namespace nodepp;

void onMain(){
        
    object_t obj ({
        { "0", "string" },
        { "1", 10 },
        { "2", array_t<object_t>({ 10, "hello world", false }) }
    });

    console::log( ">>", obj["2"][1].as<string_t>() );


}
$ time g++ -o main main.cpp -I./include ; ./main

real    0m4,472s
user    0m4,137s
sys     0m0,331s

>> hello world 

2

u/Cylian91460 Sep 08 '26

Making it compile to web assembly?

1

u/Inevitable-Round9995 Sep 09 '26

sure; I'm making a multiplayer game with it; raylib + Nodepp ( frontend/backend ) + WASM + WebRTC

- https://github.com/NodeppOfficial/nodepp-wasm
- https://github.com/NodeppOfficial/nodepp

25

u/jer_re_code Sep 08 '26

make its compiler combile to TodePond before it compiles that to binary

15

u/HugoNikanor Sep 08 '26

TodePond was renamed to Gulf of Mexico a while back

5

u/JonIsPatented Sep 12 '26

Is TodePond the same as DreamBerd? I remember DreamBerd being renamed to Gulf of Mexico.

Edit: I looked it up. TodePond has not been renamed. TodePond is the creator. The language was named DreamBerd and the language was renamed.

1

u/jer_re_code Sep 09 '26

yeah i hated that change it will now never be as funny as it was before

1

u/HugoNikanor Sep 09 '26

I think I'm missing the joke. What made the TodePond name so funny?

1

u/jer_re_code Sep 09 '26

oh i just saw that the rest of the repo is like it was before

didn't realize it

6

u/Daemontatox [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Sep 08 '26

I literally was about to say the same thing

4

u/FooeyBar Sep 08 '26

Now do async/await

7

u/Inevitable-Round9995 Sep 08 '26
#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
    }));

}

2

u/FooeyBar Sep 08 '26

Got what I needed, thanks

2

u/lapiuslt Sep 08 '26

Change o to double e.

8

u/theChaosBeast Sep 08 '26

NoDepp which means No Idiot in German... I am not convinced

8

u/elsantiF Sep 08 '26

Yeah... the creator of that aberration was spamming a lot in Spanish subs, I think he was the patient zero of AI psychosis.

5

u/Death_By_Cake Sep 08 '26

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++.

3

u/Dayshadow_ Sep 08 '26

it's almost... beautiful..

3

u/aleques-itj Sep 08 '26

I wish I disliked this more than I do

3

u/El_RoviSoft Sep 08 '26

Actually reflection was released on gcc some time ago so you can do even more cursed things now.

3

u/Fisolino Sep 09 '26

This is like a car with tires made of flesh instead of rubber

2

u/TehBuckets Sep 09 '26

Why? Just why? This is like Stalin and Hitler had a baby. Why did I have to see this?

2

u/overclockedslinky Sep 10 '26

if you want it to be like C++ stop using the _t C-ism

1

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Sep 09 '26

I haven't really ever used them in C++, but I'm mostly just looking at a bunch of lambda functions, right?

1

u/czpl Sep 09 '26

all these huge datacenters just for AI to make this..

1

u/Romejanic [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Sep 10 '26

You did it, you added promises to C++. Please leave.

1

u/nimaid Sep 11 '26

I had to stop reading this because I began having a dissociative episode.

1

u/Wooden_Web3927 Sep 13 '26

The worse of both worlds