Remix.run Logo
a96 3 hours ago

Rewriting it in Rust is the obvious choice.

kragen 14 minutes ago | parent | next [-]

Rust compilers are an even bigger dependency than C++ compilers.

sylware an hour ago | parent | prev | next [-]

Microsoft rust is not that much worse than c++.

That said, it seems some people get nice results at porting from c++ to C using "AI" (LLM?).

anthk 2 hours ago | parent | prev [-]

The worst choice. Rust doesn't compile under OpenBSD i386. Dillo runs even on PPC and some m68k platforms. If any, maye FLTK + C.

On C++ compilers, clang++ it's much faster than g++ under legacy platforms. Clang uses far less RAM and CPU than GCC while compiling.

I know we have no cproc/cparser or tcc for C++, but at least clang it's usable with 1GB of RAM.

kragen 14 minutes ago | parent | next [-]

I just compiled some C++ code using G++ under ulimit -v 108032, but it didn't use much of the STL. For a simple example program using iostream, vector, unique_ptr, and std::string, I needed more, but had success with ulimit -v 262144: http://canonical.org/~kragen/sw/dev3/docentes.cc.

I'm not sure how much RAM you need to compile G++ itself, though. More, I imagine. I was definitely compiling versions of GCC long before I ever saw a machine with so much RAM as 1GB, but I am guessing you probably need at least 1GiB for recent versions, maybe 4GiB. LLVM is much heavier.

sylware an hour ago | parent | prev [-]

cproc/tcc/scc/etc are C compilers not c++.

If you want to compile a recent c++ compiler (gcc/clang), you must have already a c++ compiler (one of the biggest mistake in open source software ever was to move gcc to c++, clang doing the wrong thing right from the start...).

You can start to compile gcc 4.7.4, the last gcc compiler with buggy c++98 you could compile with a C compiler (you will need to patch it, and even unroll its full SDK), then you will have to compile at least 2 gccs to reach the last gcc. This insane mess is due to the infinite versions of c++ ISO "standard", introducing tons of feature creep which will force you to "upgrade" (mostly no real good reasons, namely developer tantrums, or planned obsolescence).

This is disgusting, Big Tech grade abomination of software engineering, shame on the people who did that and those in power who are not trying to fix it (probably the GCC steering committee).

kragen 4 minutes ago | parent [-]

Rewriting GCC's C++ codebase in C is also not realistic.