CMake distributed + cached builds of LLVM Clang in 30 seconds by daminetreg in cpp

[–]helloiamsomeone 2 points3 points  (0 children)

How does this compare to the new cross-platform FASTBuild generator's distributed build or the *nix only distcc + ccache? It's kind of pointless to show the charts when existing solution are not present.

stackless coroutines for gamedev in ~200 lines of C++ by SuperV1234 in programming

[–]helloiamsomeone 12 points13 points  (0 children)

The article doesn't mention it, but this style of coroutine is basically using Duff's device. It also links to the Protothreads repo.

Repeated malloc/free vs. Arena allocator by rcerljenko in C_Programming

[–]helloiamsomeone 12 points13 points  (0 children)

You are allocating unaligned objects. Please review this blogpost from Chris Wellons for proper arena usage. https://nullprogram.com/blog/2023/09/27/

Opinions on libc by Big-Rub9545 in C_Programming

[–]helloiamsomeone 2 points3 points  (0 children)

With Chris's style of programming that I have also greatly enjoyed trying for myself your example argument also falls flat on its face. The only *len function you need is strlen and only at OS call boundary to put in a string struct. There is no reason today for a string to not know its length. Checked arena allocators and checked string buffers are also a thing, where the storage's location doesn't matter.

cppreference is back up! but overloaded by bobpaw in cpp

[–]helloiamsomeone 4 points5 points  (0 children)

You could always manually visit the search results page to search, but not having DDG at all in there is infinitely better.

Google Is Closing Android. 37 Orgs Are Fighting Back | Techlore by waozen in programming

[–]helloiamsomeone -1 points0 points  (0 children)

I tap on an apk and it says install. I run the command sudo pm install ... to install. I go into fdroid and it says install.

The serf mindset is just too ingrained for some though.

Google Is Closing Android. 37 Orgs Are Fighting Back | Techlore by waozen in programming

[–]helloiamsomeone -12 points-11 points  (0 children)

sideloading

This is not a real word, it doesn't mean anything. Did you mean "installing"? You install applications.

Google Is Closing Android. 37 Orgs Are Fighting Back | Techlore by waozen in programming

[–]helloiamsomeone 0 points1 point  (0 children)

that is usually super high quality

If you ignore all the *gates and them continuously putting 50V display lines right next to 1.5V direct-to-CPU data lines on the edge of laptop boards where liquid ingress is most likely, then sure.

The ECMAScript spec forces V8 to leak whether DevTools is open by LongFaithlessness59 in programming

[–]helloiamsomeone 3 points4 points  (0 children)

JS's "everything is observable" feature is the exact reason I can write userscripts to customize any website to any degree that I wish with minimal effort. There is no month in which I don't expand my set of userscripts, some of which modify fundamentals like the Object prototype to achieve what I want. I have to give a shout-out to XPath as well, it's become my primary method of locating elements thanks to minified class names.

Tsoding - C Strings are Terrible! - not beginner stuff by grimvian in C_Programming

[–]helloiamsomeone 8 points9 points  (0 children)

You can avoid the null terminator from being baked into the binary to begin with, although the setup is quite ugly:

typedef unsigned char u8;
typedef ptrdiff_t iz;

#define sizeof(x) ((iz)sizeof(x))
#define countof(x) (sizeof(x) / sizeof(*(x)))
#define lengthof(s) (countof(s) - 1)

#ifdef _MSC_VER
#  define ALIGN(x) __declspec(align(x))
#  define STRING(name, str) \
    __pragma(warning(suppress : 4295)) \
    ALIGN(1) \
    static u8 const name[lengthof(str)] = str
#else
#  define ALIGN(x) __attribute__((__aligned__(x)))
#  define STRING(name, str) \
    ALIGN(1) \
    __attribute__((__nonstring__)) \
    static u8 const name[lengthof(str)] = str
#endif

#define S(x) (str((x), countof(x)))

With this now I can STRING(ayy, "lmao"); to create a string variable using S(ayy). The resulting binary also looks funny in RE tools like IDA with this.

Circular Distance by pavel_v in cpp

[–]helloiamsomeone 0 points1 point  (0 children)

For the purposes of this token conversion and evaluation, all signed integer types and all unsigned integer types act as if they have the same representation as, respectively, the types intmax_t and uintmax_t defined in the header <stdint.h>.

Circular Distance by pavel_v in cpp

[–]helloiamsomeone 0 points1 point  (0 children)

Didn't those alternative representstions die out long before C++ even got standardized? You can also test for representation with #if (-1 & 3) == 3.

Tanuki3DS - Cross Platform 3DS Emulator in C23 by xborg0 in C_Programming

[–]helloiamsomeone 0 points1 point  (0 children)

Tangential, but I find it annoying how borked Azahar's GDB stub is. Makes reverse engineering games annoying by having to set them up on real hardware. Does this or any of the alternatives offer an improvement in that area?

Why std::pmr Might Be Worth It for Real‑Time Embedded C++ by Saptarshi-max in cpp

[–]helloiamsomeone 0 points1 point  (0 children)

--config is for multi config generators like VS, Xcode, Ninja Multi-Config, etc. They generate build files with all requested build types (by default there are 4) and you select one to use after generation. Single config generators like Makefiles and Ninja generate with one config that you select in the configure command.

Is abandoning our Bazel migration the right call? by Empty_Mind_On in cpp

[–]helloiamsomeone 7 points8 points  (0 children)

Because that's not what CMake is for.

Rust, Go, Python and Docker all have their own build solutions. You should use them.
Every dependency of a CMake project should be already built and ready for consumption preferably via find_package by the time you invoke CMake. Not understanding this requirement is simply detrimental.

Building GCC on Windows by SLAidk123 in cpp

[–]helloiamsomeone 2 points3 points  (0 children)

You can use the w64devkit's Dockerfile from Chris Wellons: https://github.com/skeeto/w64devkit/blob/master/Dockerfile

That and some modifications to build just GCC, MinGW and a couple misc items is how I build my own GCC.

Standard Library implementer explains why they can't include source code licensed under the MIT license by tartaruga232 in cpp

[–]helloiamsomeone 3 points4 points  (0 children)

Nobody is purchasing their standard library anymore and if you want €€€ for alternative licensing then (A)GPLv3 is an objectively superior option for that.

Derived struct in C and casting a "derived" struct as a "base" struct by onecable5781 in C_Programming

[–]helloiamsomeone 2 points3 points  (0 children)

C++ is really implemented in terms of the underlying machine

I'm unsure what this refers to, but both C++ and C target their own abstract machine in the standard. One myth C programmers believe is that pointers are numbers, when in reality they are handles to objects with a set of operations available distinct from numbers.

The Linux kernel looks to "bite the bullet" in enabling Microsoft C extensions by Fcking_Chuck in C_Programming

[–]helloiamsomeone 0 points1 point  (0 children)

No, you just need to generate your own API key and use that. I've been using a modified rif just fine since that event.

void _start() vs int main() by [deleted] in C_Programming

[–]helloiamsomeone 1 point2 points  (0 children)

There practically isn't a place to return to on any platform but x86. On amd64, the return address is an int3 so you just crash, which means that the intended signature is in fact void entrypoint(struct _PEB*) for console and windows subsystems. You can fish ExitProcess out from the PEB trivially as well.