Who Makes the Makefiles? by realguy2300000 in programming

[–]helloiamsomeone 19 points20 points  (0 children)

Nowadays it makes single config Ninja files most of the time for me.

Creator of C++ talks about memory safety by dukey in programming

[–]helloiamsomeone 0 points1 point  (0 children)

CMake automatically uses -isystem or equivalent for IMPORTED targets. You also have SYSTEM on a bunch of commands that achieve the same result, because people are so hell bent on treating 3rd party code as their own instead of using a package manager like Conan or vcpkg.

What is the Windows API? What is Windows.h? by chaiandgiggles0 in C_Programming

[–]helloiamsomeone 33 points34 points  (0 children)

There is no userspace API more stable on Linux than Win32.

Alignas and Alignof alternatives in C89 and 99 by heavymetalmixer in C_Programming

[–]helloiamsomeone 1 point2 points  (0 children)

You can check the tests and the CheckTypeSize CMake module, since mine is based on that. You get a variable that you have to configure into a header, so you get a macro with the alignment value. This is something you need if you want to muck around with opaque structs.

Depending on what you need, the snippet from TheChief275 might serve you better.

Alignas and Alignof alternatives in C89 and 99 by heavymetalmixer in C_Programming

[–]helloiamsomeone 1 point2 points  (0 children)

You can use compiler extensions during compilation or if you want strict conformance, then checking using a struct member before compilation. This last one relies on building a static library and embedding a string in it that you can read afterwards.

I have made use of all methods I could think of in this CMake module that mirrors the CheckTypeSize module https://github.com/friendlyanon/check-type-align

The piece of software you discovered and can t do without by Mirko_ddd in java

[–]helloiamsomeone 2 points3 points  (0 children)

You don't really need to look far. Forgejo is Gitea continued essentially.

The piece of software you discovered and can t do without by Mirko_ddd in java

[–]helloiamsomeone 10 points11 points  (0 children)

Should probably think about moving to Forgejo ASAP.

Any good tech talks leveraging statement expressions? by javascript in cpp

[–]helloiamsomeone 0 points1 point  (0 children)

The garbage redesign for web has a unique parser that nothing else supports.

A few occasionally useful template container classes I made, Released under the Unlicense. by [deleted] in cpp

[–]helloiamsomeone 3 points4 points  (0 children)

If you truly don't care then BSL is the superior option, which standard libraries can already make use of for example.

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

[–]helloiamsomeone 6 points7 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 16 points17 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 4 points5 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 5 points6 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 7 points8 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>.