Skip Navigation
autumn64 Autumn64 @lemmy.blahaj.zone

πŸ“πŸ‡²πŸ‡½; 20 yo; πŸ³β€βš§ (she/her); [es, en, pt, fr, eo]; Developer, FOSS advocate.

Levanta la multicolor. Β‘Viva la diversidad!

About me: https://autumn64.xyz/

Posts 19
Comments 15

Rule

5

Trash rule

7

:3 rule

17

Fart rule

16

LO Satan rule

23

France rule

17
Charles II Rule
  • I know, but I didn't make the meme anyway, so πŸ€·β€β™€οΈ

  • Charles II Rule

    18

    Rule

    2
    Fellow C and Rust programmers, how do you live without classes?
  • My primary problem is that it's convention rather than rule.

    I agree, and thus I think it's safe to assume we also hate the lack of encapsulation in Python despite technically being an OOP language.

    Just don't use C if you can avoid it ;)

    I'm fine with C, and if I stop coding in C I would starve since my job depends on it, still thanks for the suggestion though! ;)

  • Fellow C and Rust programmers, how do you live without classes?
  • 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!

  • Fellow C and Rust programmers, how do you live without classes?
  • 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.

  • rule

    17

    btw :3

    0
    smoke machine rule
  • r/woooosh

  • rule

    3

    Jack Sparrow rule

    10

    earth rule

    12

    smoke machine rule

    19
    Which FOSS degoogled Android rom would you recommend?
  • I'm not sure if it's entirely degoogled, but I use LineageOS 19 without gapps and it goes quite nicely.

  • Open-source rule

    6

    English rule

    14

    Torrent rule

    2
    W rule
  • Update:

  • W rule
  • It's been 8 hours since the poll started, maybe somebody has already voted the "Other" option.

    EDIT: Yep. I just checked and 4 people have voted "Other" so far.

  • Jesse is smarter than what we give him credit for.
  • Aztec and mayan calendars iirc was 18 months of 20 days each and 5 extra days at the end of the year.

  • W rule

    38
    Linkin Park Rule
  • Clown, eggs, two, four, six, eight, gas, liquid, solid

  • Neofox rule
  • me :3

  • Neofox rule

    2
    anyone know why spmp isn't working
  • 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.

  • Oh no ...
  • 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.

  • *Permanently Deleted*
  • Lmao welcome to Linux though!

  • Oh no ...
  • I mean, do the people at the fediverse really talk mainly about Linux? I see in both Lemmy and Mastodon more people talking about US politics, LGBTQ+ stuff and furrys (lmao) than anything related to technology in general. I guess the kind of content someone sees would depend a lot on the instance someone creates their account in?

  • the video..
  • Lmao πŸ’€πŸ’€