Donations to the archive would be appreciated to help fund our server hardware & storage drives. We are looking for developers to help build new software and archives, discuss here.

/dpt/ - Daily Programming Thread

No.99689281 View ViewReplyLast 50OriginalReport
Old thread: >>99655287

What are you working on, /g/?
286 posts and 33 images omitted

/aicg/ - AI Chatbot General

No.99721163 View ViewReplyLast 50OriginalReport
130 posts and 30 images omitted

The viewbotting biz

No.99722000 View ViewReplyOriginalReport
Dunno if this is the right place to discuss. Viewbotting is tech.

Is this literally free money? There are so many people wanting to maintain stream viewship. What is the downside?

No.99706940 View ViewReplyLast 50OriginalReport
you WILL be forced to auto-upgrade to Windows 12
you WILL pay the 89.99$ monthly subscription
you WILL sell your Ryzen and mechanical keyboard
you WILL buy the Intel NPU
you WILL get a Windows Copilot certified membrane keyboard
you WILL buy 512 GB of RAM
you WILL have your CPU run at 150W idle
you WILL run Copilot locally
you WILL NOT be able to turn it off or deactivate it
you WILL accept gimped performance if you have an AMD processor
you WILL accept 2TB of unremovable bloatware
you WILL get educated about female & black empowerment on a daily basis (forced reading tests or you are locked out of your OS)
you WILL accept forced OneDrive backups of all your data you can NOT delete or deactivate
you WILL own NOTHING and you WILL be HAPPY
80 posts and 5 images omitted

No.99720202 View ViewReplyOriginalReport
mfw when I use the laptop charger power brick as a foot warmer

No.99688902 View ViewReplyLast 50OriginalReport
Nice thumbnail David. Looks great.
155 posts and 39 images omitted

is it meme tech?

No.99715992 View ViewReplyOriginalReport
37 posts and 2 images omitted

No.99722019 View ViewReplyOriginalReport
why can't modern languages beat C?

No.99722008 View ViewReplyOriginalReport
> C doesn't have arrays
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

typedef uint_least16_t FamType;

typedef struct Senpai {
size_t count;
uint_least16_t members[];
} Senpai;

size_t famSize(size_t count) { return sizeof(Senpai) + count * sizeof(FamType); }

int setFam(Senpai* senpai, FamType (*map)(int index)) {
if (senpai == NULL || senpai->count > INT32_MAX || map == NULL) return -1;
for (int idx = 0; idx < senpai->count; ++idx) senpai->members[idx] = map(idx);
return 0;
}

int makeFam(Senpai** famPtr, size_t count, FamType (*map)(int)) {
if (famPtr == NULL || map == NULL || count > INT32_MAX) return -1;
*famPtr = malloc(famSize(count));
if (*famPtr == NULL) return -2;
(*famPtr)->count = count;
if (setFam(*famPtr, map) != 0) free(*famPtr);
return 0;
}

int sumFam(Senpai* senpai, uint_fast32_t* sumPtr) {
if (senpai == NULL || senpai->count > INT32_MAX || sumPtr == NULL) return -1;
uint_fast32_t sum = 0;
for (int idx = 0; idx < senpai->count; ++idx) sum += senpai->members[idx];
*sumPtr = sum;
return 0;
}

FamType identity(int index) { return (FamType)index; }

FamType twoXplus1(int index) { return (FamType)(2 * index + 1); }

int main(void) {
Senpai* fam1 = NULL;
Senpai* fam2 = NULL;
int result = makeFam(&fam1, 13, identity);
if (result != 0) goto cleanup;
result = makeFam(&fam2, 42, twoXplus1);
if (result != 0) goto cleanup;
uint_fast32_t sum;
if ((result = sumFam(fam1, &sum)) != 0) goto cleanup;
printf("Size of fam1 = %zu, sum = %lu\n", famSize(fam1->count), sum);
if ((result = sumFam(fam2, &sum)) != 0) goto cleanup;
printf("Size of fam2 = %zu, sum = %lu\n", famSize(fam2->count), sum);
cleanup:
free(fam1);
free(fam2);
return result;
}


One more c-hater lie and myth crossed off the books.

This is a large problem in the US. Why?

No.99713483 View ViewReplyOriginalReport
In Europe there is no one using iMessage in the first place.
32 posts and 1 image omitted