MY PROJECTS

Idioma / Language: Español   English



- PHILOSOPHERS

   This project is based on the dining philosophers problem. One or more philosophers sit at a round table with a bowl of spaghetti in the center. Philosophers can only sleep, think, and eat.
   There are forks on the table, as many as philosophers. Each philosopher needs to pick up the fork to their right and the fork to their left to eat. After eating, they will release the forks.
   The program needs the following arguments: nb_philosophers, die, eat, sleep, [must_eat]
  • Nb_philosophers: the number of philosophers, also the number of forks.
  • Die (in milliseconds): if a philosopher doesn't start eating within time_to_die milliseconds from the start of their last meal or from the beginning of the simulation, they die.
  • Eat (in milliseconds): the time a philosopher takes to eat. During this time, they have the forks occupied.
  • Sleep (in milliseconds): the time a philosopher takes to sleep.
  • Must_eat (optional argument): if all philosophers eat at least must_eat times, the simulation stops. If not specified, the simulation stops with the death of a philosopher.

  • - FDF

       This project is about creating a simple wireframe model with a 3D representation of a landscape by connecting several points (x, y, z).
       The program should be displayed in isometric projection.
       The coordinates of the landscape are stored in a .fdf file passed as a parameter to your program.
       That file will be considered correct if it only contains numerical values. Each number represents a point in space:
  • The horizontal position corresponds to the 'X' coordinate.
  • The vertical position corresponds to the 'Y' coordinate.
  • The value corresponds to the altitude.
  • You can also use specific keys to:
  • Change the projection.
  • Zoom.
  • Translate the figure.
  • Rotate the figure.

  • - PUSH_SWAP

       Push_swap is a simple and highly effective algorithm project: you have to sort data. You have at your disposal a set of int values, two stacks, and a set of instructions to manipulate both stacks.
       The goal after executing the program is to have the stack sorted from smallest to largest and to print every movement of both stacks.
       These are the movements:
  • sa: swap a - swap the first two elements on top of stack a.
  • sb: swap b - swap the first two elements on top of stack b.
  • ss: swap a and swap b at the same time.
  • pa: push a - take the first element from stack b and put it on top of stack a.
  • pb: push b - take the first element from stack a and put it on top of stack b.
  • ra: rotate a - shift all elements of stack a up by one position.
  • rb: rotate b - shift all elements of stack b up by one position.
  • rr: rotate a and rotate b.
  • rra: reverse rotate a - shift all elements of stack a down by one position.
  • rrb: reverse rotate b - shift all elements of stack b down by one position.
  • rrr: reverse rotate a and reverse rotate b.

  • - MINITALK

       This program is a communication connection in the form of a client and a server.
       The server must be launched first, and upon launch, it should display its PID.
       The client will take the following parameters:
  • The PID of the server.
  • The string to be sent.
  •    The client must communicate the string passed as a parameter to the server. Once the string is received, the server should display it.

    - PRINTF

       This project is a replica of the 'printf' function to be able to use my own function for displaying values on the screen.
       It implements the following conversions:
       • %c Prints a single character.
       • %s Prints a string (as defined by default in C).
       • %p The void * pointer argument is printed in hexadecimal format.
       • %d Prints a decimal number (base 10).
       • %i Prints an integer in base 10.
       • %u Prints an unsigned decimal number (base 10).
       • %x Prints a hexadecimal number (base 16) in lowercase.
       • %X Prints a hexadecimal number (base 16) in uppercase.
       • % % to print the percentage symbol.

    - Get_Next_Line

       Get_Next_Line is a very useful project or function as it is capable of returning the text of a file line by line.
       It also has a bonus part that works exactly the same, but you can pass it more than one file to read from.
       To execute GNL, you will need to create a main function where you pass the file descriptor "get_next_line(int fd)".

    - Libft

       With this program, I learned to create my first library with basic C functions that have been very useful in later projects.
       Some of these useful functions include atoi, split, substr, putchar, memory functions, or list functions.

    - Other projects

       In addition to the projects published here, I have also completed some others, such as:
       
  • Born_to_be_root: It involves creating and configuring a virtual machine and learning how to perform actions that can be useful for its use.
  •    
  • HTML projects: These could include this webpage, a soccer game with basic language utilities, and specific exercises to learn the language.
  •    
  • SQL and JS: I have a certificate in basic knowledge of both languages, which is especially useful for understanding a program written in these languages.