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.

Where do libertarians organize online now?

No.99724784 View ViewReplyOriginalReport
Cuckservatives have /pol/
Leftards have /leftypol/

Where do libertarians go that isnt completely dead? There's still some online.
2 posts omitted

i was prepared for the world to be evil and cruel

No.99707146 View ViewReplyOriginalReport
but damn... i was never prepared for it to be this gay and stupid.
44 posts and 5 images omitted

damn yo shit's all fucked up

No.99721094 View ViewReplyOriginalReport
42 posts and 4 images omitted

No.99722019 View ViewReplyOriginalReport
why can't modern languages beat C?
24 posts and 2 images omitted

/aicg/ - AI Chatbot General

No.99724234 View ViewReplyLast 50OriginalReport
132 posts and 18 images omitted

/twg/ - Tech Workers General

No.99716896 View ViewReplyLast 50OriginalReport
206 posts and 29 images omitted

how can the unix philosophy be applied to graphical software

No.99708067 View ViewReplyOriginalReport
hello /g/. so I quite like the idea of the unix philosophy of writing small programs that solve one problem and using text as an interface to communicate between them and perform complicated tasks.
I find this approach pretty pleasant when performing any tasks that deal with text.

I understand that unix was developed during a time when computers were not available to everyone, they were limited to a few very well educated people who knew how to program. it was normal for people to throw together small little programs to solve a problem then discard them afterwards or keep them in their toolbox for potential use later. computers were mostly used to do academic computational work and mostly dealt with text as input and output.

but I fail to see how this philosophy could be implemented with software that doesn't deal with text. this could be graphical software that deals with images and videos, or software that deals with audio or any other form of binary data.
and what about GUI programs (TUI isn't any different from GUI in this regard, it's just a GUI for non graphical systems)
there are a few examples of good unixy GUI tools. like dmenu for example. but dmenu still deals with text only.
I can't tell how that might work for something like gimp, and how would these small GUI programs communicate with each other.
you can probably build the components of something like gimp as separate programs. separate view picker, layer manager, image viewer, effects, brush selector etc... but how would such small programs work together and communicated.

any ideas?

sorry for the typos
43 posts and 8 images omitted

/dpt/ - Daily Programming Thread

No.99724403 View ViewReplyOriginalReport
Old thread: >>99689281

What are you working on, /g/?
8 posts and 1 image omitted

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.
8 posts and 1 image omitted

No.99723751 View ViewReplyOriginalReport
Reminder that a version of 8**** still exists.
38 posts and 5 images omitted