@crunklord420 Do you have actually any resources you find good for learning/improving C knowledge? I have the standard K&R book, other than that I have no clue.
@crunklord420 yeah I put it in if to check for the specific chars to cover the negative and float cases.
atof would return 0 if it is trash, but how do i know if it is trash or number 0 in input?
Is there a better way to do this?
I am trying to do is implement a function that gets a set of numbers from which 1 number is missing. Say input is "50 a 100". Depending on which position the number is missing(2nd in this case), diff things are supposed to happen. For that i first need detection.
@crunklord420 I want fastest and most autistic way in C to parse through CL arguments to find all numbers. Is this correct?
#include <ctype.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]){ int k; for (argc; argc>1; argc--) { k = 0; while (*(argv[argc-1]+k)) { if (!isdigit(*(argv[argc-1]+k))) { break; } k++; } if (!*(argv[argc-1]+k)) printf("%.5f\n",atof(argv[argc-1])); } }
@crunklord420 I want to write a CLI program in C. The idea is that once i run this program from a terminal, I am put in a CLI program where I can type various commands with arguments that I defined and they will be executed. What is the best/fastest way for such a program to work? Should i just make switch statements where each one is just the string of the command? And then if the string matches, I call the corresponding function? Or is there a better way to do this?
@crunklord420 I feel everyone cares far less about debates/elections, not sure if it is actually true.
My personal feeling is that there is strong fatigue from both sides, as if no one really has any strong desire for anything. Maga crowd already had Trump in office, it did jack shit. The Cathedral did everything they wanted, what is there even left for them to desire? Everyone has already done and tried everything they could think of and we seem to be at a collective middle-age crisis.
@crunklord420 I want to try building a home server, primarily as a hobby. Uses will include file backup/network-wide filtering of ads/maybe email and small website hosting/potentially other uses. I want to keep it simple, low poert consumption but still have enough options to tinker around and try stuff. Is there any hardware you would suggest? Would, say, raspberry pi 5 be good starting point?
@crunklord420@NonPlayableClown@alex Well it's not for me about being biggest, I personally would not want that anyway. But let's say we are in our current situation, where, effectively, as you said, kfcc can't exist. So how would then the fediverse be a solution? Do I understand you correctly that you think fediverse protocol can be improved/upgraded to make that possible?
@crunklord420@NonPlayableClown@alex so what's your idea or let's say ideal way you'd like for the things to develop? I mean when it comes to internet communication forums/social stuff.
@crunklord420@NonPlayableClown@alex Where do you personally see all of this going? do you think fediverse does indeed have potential or will these problems outweigh any benefits in the future?
@NonPlayableClown@crunklord420 Is there no other protocol besides the fediverse that can work? Is it not sensible to develop something that would work under these conditions?