[-] autumn64 5 points 1 week ago

No but you're just so pretty!

[-] autumn64 8 points 1 month ago

I didn't make the meme, but it's definitely trans positive while also making fun of transphobes

[-] autumn64 2 points 4 months ago
409
Charles II Rule (lemmy.blahaj.zone)
submitted 1 year ago by autumn64 to c/196
121
Rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
[-] autumn64 1 points 2 years ago

There's still quite a few software written in C that does exactly as I did though. Look at OpenSSL's EVP library. I'm not sure about what you mean by "OOP but worse", wouldn't everything be worse than OOP since C isn't an OOP language? Anyways. As I said, what I did is way more common than it seems at least in C, so I get your point but still I can't seem to be able to see what's inherently wrong with it. I would appreciate if you shared any better ideas you might have, though!

[-] autumn64 4 points 2 years ago

C programmer here. I can't code in Rust and although I do have some interest in learning it, C is still the best one to me. Probably not the best way to do it, but I'd do something like this (based on the code in your ss):

typedef struct Player{
      float pos_x;
      float pos_y;
      float rotation;
} Player;

Player player_new(){
      Player player;
      player.pos_x = 0.0;
      player.pos_y = 0.0;
      player.rotation = 0.0;
      return player;
}

void player_move(Player *player, float x, float y){
      player->pos_x += x;
      player->pos_y += y;
      return;
}

void player_rotate(Player *player, float by){
      player->rotation += by;
      return;
}

int main(int argc, char *argv[]){
      Player player1 = player_new();
      player_move(&player1, 10.0, 10.0);
      player_rotate(&player1, 180.0);

      return 0;
}

I would probably move the struct Player and the functions player_new, player_move and player_rotate to another file (like player.c or sth), I'd create its respective header file with the definitions of each thing and with that I basically created a simple interface to create and handle players without needing OOP. English is not my native language, so I'm not really sure about what's the name of the programming paradigm used in C (which definitely is not OOP), but in my native language we call it "programación estructurada", which in English would be something like "structured programming".

Tbh I code in both non-OOP and OOP languages (most of the time C, JS and Python) and to me both paradigms are just fine. You can pretty much do anything in either, but each of them might work better for you on different situations and depending on your needs. I also use Vim btw.

710
rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
97
btw :3 (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/unixsocks
[-] autumn64 1 points 2 years ago
486
rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
457
Jack Sparrow rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
895
earth rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
879
smoke machine rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
541
Open-source rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
454
English rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
183
Torrent rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
204
W rule (lemmy.blahaj.zone)
submitted 2 years ago by autumn64 to c/196
[-] autumn64 2 points 2 years ago

I use InnerTune and it's just wonderful. I don't really care about translations and that stuff so I use the FOSS version and I never had any problems with it.

[-] autumn64 2 points 2 years ago

Yeah I also do see a lot more content of the communities I'm subbed to than of the instance I created my account in.

[-] autumn64 2 points 2 years ago

Lmao 💀💀

[-] autumn64 2 points 2 years ago* (last edited 2 years ago)
[-] autumn64 2 points 2 years ago

Yes, I use K-9 for my outlook/365 accounts and it works fine. I also have my NAVER account there but I can't send emails because I've been too lazy to configure the SMTP settings properly.

view more: ‹ prev next ›

autumn64

joined 2 years ago