vous utilisez ChatGPT au boulot ?

OP
MA

MeilleurAnimerr

il y a 7 mois

Tel est la question

TO

Togetha

il y a 7 mois

Je suis dev Java et chatGPT m'a totalement brisé https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

Comprendre que dans 5 ans (10 MAXIMUM), je ne servirai plus à rien https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

Se faire chier sur un snippet qui fonctionne pas, tu le donnes à chatGPT il te règle le problème instantanément avec en prime une explication détaillée de la résolution https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

BRISÉ https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

IM

iMissWomens

il y a 7 mois


Je suis dev Java et chatGPT m'a totalement brisé https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

Comprendre que dans 5 ans (10 MAXIMUM), je ne servirai plus à rien https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

Se faire chier sur un snippet qui fonctionne pas, tu le donnes à chatGPT il te règle le problème instantanément avec en prime une explication détaillée de la résolution https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

BRISÉ https://image.noelshack.com/fichiers/2021/35/2/1630432176-chatmirroirstretch.png

premier jour de taff dans une startup de boomer https://image.noelshack.com/fichiers/2017/18/1494048058-pppppppppppppppppppp.png

j'ai mog l'efficacité de tout le monde en un script chatgpt https://image.noelshack.com/fichiers/2017/18/1494048058-pppppppppppppppppppp.png

je travaillais que le matin https://image.noelshack.com/fichiers/2017/18/1494048058-pppppppppppppppppppp.png

OP
MA

MeilleurAnimerr

il y a 7 mois

Alors ?

C0

Can-01

il y a 7 mois

Grok est encore mieux que ChatGPT https://image.noelshack.com/fichiers/2024/02/6/1705105933-kikoojap-b2s-caprisun.png

Demandez moi un truc à coder (pas trop long) je vais C/C ce qu'il répond https://image.noelshack.com/fichiers/2021/39/1/1632771650-alcoocomique.png

C0

Can-01

il y a 7 mois


Tel est la question

Sinon non https://image.noelshack.com/fichiers/2022/16/7/1650830053-zfbe.png

OP
MA

MeilleurAnimerr

il y a 7 mois


Grok est encore mieux que ChatGPT https://image.noelshack.com/fichiers/2024/02/6/1705105933-kikoojap-b2s-caprisun.png

Demandez moi un truc à coder (pas trop long) je vais C/C ce qu'il répond https://image.noelshack.com/fichiers/2021/39/1/1632771650-alcoocomique.png

"Tu es un développeur senior en C, écris un parseur en entier des opérations mathématique, somme, multiplication... etc"

Merci clé

OP
MA

MeilleurAnimerr

il y a 7 mois

Sinon non https://image.noelshack.com/fichiers/2022/16/7/1650830053-zfbe.png

Tu utilises grok du coup ?

C0

Can-01

il y a 7 mois

Tu utilises grok du coup ?

Non je bosse pas tout court https://image.noelshack.com/fichiers/2018/25/1/1529273998-1522514973-risitasaah.png

-_

-_Gobeelo_-

il y a 7 mois

Bien sûr

Je suis entouré de Boomers

Tous les mails. Rapports et documents sont rédigés par GPT-4 https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Je m'emmerde plus beaucoup https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Les boomers me prennent pour un surhomme https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

C0

Can-01

il y a 7 mois

"Tu es un développeur senior en C, écris un parseur en entier des opérations mathématique, somme, multiplication... etc"

Merci clé

SpoilAfficherMasquer

To create an integer parser for mathematical operations, we'll need to design a function that can interpret strings representing mathematical expressions involving integers. Here's a step-by-step approach:

1. **Define the Problem**: We need to parse strings that could contain integers and basic arithmetic operations like addition (`+`) and multiplication (`*`).

2. **Basic Tokenization**: Split the string into tokens which can be numbers or operators.

3. **Handling Operations**:
- We'll support addition and multiplication for simplicity.
- Implement operator precedence where multiplication has higher precedence than addition.

4. **Error Handling**: Check for malformed expressions.

5. **Implementation**:

from typing import Union, List def parse_and_compute(expression: str) -> int: """ Parse and compute the result of a mathematical expression string containing integers with '+' for addition and '*' for multiplication. Args: expression (str): A string representing a mathematical operation. Example: "2 + 3 * 4" Returns: int: The result of the mathematical operation. Raises: ValueError: If the expression is invalid or contains unsupported operations. Examples: >>> parse_and_compute("2 + 3 * 4") 14 >>> parse_and_compute("5") 5 >>> parse_and_compute("2 + 2 + 2") 6 """ # Helper function to tokenize the expression def tokenize(expr: str) -> List[Union[str, int]]: tokens = [] current_number = '' for char in expr: if char.isdigit(): current_number += char else: if current_number: tokens.append(int(current_number)) current_number = '' if char.strip(): # Skip spaces but keep operators tokens.append(char) if current_number: # Add the last number if any tokens.append(int(current_number)) return tokens # Helper function to perform operation def apply_operation(a: int, b: int, op: str) -> int: if op == '+': return a + b elif op == '*': return a * b else: raise ValueError(f"Unsupported operation: {op}") tokens = tokenize(expression.replace(" ", "")) # First pass for multiplication to respect operator precedence i = 0 while i < len(tokens): if tokens[i] == '*': left = tokens[i-1] right = tokens[i+1] result = apply_operation(left, right, '*') tokens[i-1:i+2] = [result] # Replace the operation with its result else: i += 1 # Second pass for addition result = tokens[0] for i in range(1, len(tokens), 2): if i + 1 < len(tokens): if tokens[i] != '+': raise ValueError(f"Expected '+', got {tokens[i]}") result = apply_operation(result, tokens[i+1], '+') return result # Test cases try: assert parse_and_compute("2 + 3 * 4") == 14 assert parse_and_compute("5") == 5 assert parse_and_compute("2+2+2") == 6 print("All test cases passed!") except AssertionError: print("Test case failed.")
    • Explanation:**

- **Tokenization:** The `tokenize` function splits the input string into numbers and operators, converting numbers to integers for easier manipulation.

- **Operation Application:**
- Multiplication is handled first to ensure correct operator precedence.
- Addition is then applied from left to right.

- **Error Handling:** The function checks for unsupported operations and raises a `ValueError` when encountered.

- **Type Hints:** Used to clarify what types of data the functions expect and return.

This implementation assumes all numbers are integers and does not handle parentheses or other operations for simplicity. If you need to expand the functionality, you would add more operators, handle parentheses for grouping, or even include negative numbers or decimal points.

J'ai pas testé https://image.noelshack.com/fichiers/2020/13/4/1585182344-moe.jpg

OP
MA

MeilleurAnimerr

il y a 7 mois

Non je bosse pas tout court https://image.noelshack.com/fichiers/2018/25/1/1529273998-1522514973-risitasaah.png

Pourquoi khey ? Tu as l'air d'avoir du talent

VE

Veesuda

il y a 7 mois

c'est plutot lui qui m'utilise comme intermédiaire tellement il fait tout https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

C0

Can-01

il y a 7 mois

Pourquoi khey ? Tu as l'air d'avoir du talent

Pas capable de tenir https://image.noelshack.com/fichiers/2021/15/3/1618416913-menhera2.png En dépit du talent des IA pour les tâches sur l'ordi

-_

-_Gobeelo_-

il y a 7 mois

Une fois que tu maîtrises les prompts à insérer c'est to the moon avec Chat-gpt https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Il te pré-mache le taff et tu fais les finitions https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

J'ai même écris mon mémoire de fin d'études avec ça. C'est passé comme une lettre à la poste https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

OP
MA

MeilleurAnimerr

il y a 7 mois

SpoilAfficherMasquer

To create an integer parser for mathematical operations, we'll need to design a function that can interpret strings representing mathematical expressions involving integers. Here's a step-by-step approach:

1. **Define the Problem**: We need to parse strings that could contain integers and basic arithmetic operations like addition (`+`) and multiplication (`*`).

2. **Basic Tokenization**: Split the string into tokens which can be numbers or operators.

3. **Handling Operations**:
- We'll support addition and multiplication for simplicity.
- Implement operator precedence where multiplication has higher precedence than addition.

4. **Error Handling**: Check for malformed expressions.

5. **Implementation**:

from typing import Union, List def parse_and_compute(expression: str) -> int: """ Parse and compute the result of a mathematical expression string containing integers with '+' for addition and '*' for multiplication. Args: expression (str): A string representing a mathematical operation. Example: "2 + 3 * 4" Returns: int: The result of the mathematical operation. Raises: ValueError: If the expression is invalid or contains unsupported operations. Examples: >>> parse_and_compute("2 + 3 * 4") 14 >>> parse_and_compute("5") 5 >>> parse_and_compute("2 + 2 + 2") 6 """ # Helper function to tokenize the expression def tokenize(expr: str) -> List[Union[str, int]]: tokens = [] current_number = '' for char in expr: if char.isdigit(): current_number += char else: if current_number: tokens.append(int(current_number)) current_number = '' if char.strip(): # Skip spaces but keep operators tokens.append(char) if current_number: # Add the last number if any tokens.append(int(current_number)) return tokens # Helper function to perform operation def apply_operation(a: int, b: int, op: str) -> int: if op == '+': return a + b elif op == '*': return a * b else: raise ValueError(f"Unsupported operation: {op}") tokens = tokenize(expression.replace(" ", "")) # First pass for multiplication to respect operator precedence i = 0 while i < len(tokens): if tokens[i] == '*': left = tokens[i-1] right = tokens[i+1] result = apply_operation(left, right, '*') tokens[i-1:i+2] = [result] # Replace the operation with its result else: i += 1 # Second pass for addition result = tokens[0] for i in range(1, len(tokens), 2): if i + 1 < len(tokens): if tokens[i] != '+': raise ValueError(f"Expected '+', got {tokens[i]}") result = apply_operation(result, tokens[i+1], '+') return result # Test cases try: assert parse_and_compute("2 + 3 * 4") == 14 assert parse_and_compute("5") == 5 assert parse_and_compute("2+2+2") == 6 print("All test cases passed!") except AssertionError: print("Test case failed.")
    • Explanation:**

- **Tokenization:** The `tokenize` function splits the input string into numbers and operators, converting numbers to integers for easier manipulation.

- **Operation Application:**
- Multiplication is handled first to ensure correct operator precedence.
- Addition is then applied from left to right.

- **Error Handling:** The function checks for unsupported operations and raises a `ValueError` when encountered.

- **Type Hints:** Used to clarify what types of data the functions expect and return.

This implementation assumes all numbers are integers and does not handle parentheses or other operations for simplicity. If you need to expand the functionality, you would add more operators, handle parentheses for grouping, or even include negative numbers or decimal points.

J'ai pas testé https://image.noelshack.com/fichiers/2020/13/4/1585182344-moe.jpg

C'est normal qu'on lui demande d'écrire le programme en C mais il le fait en python ?

E6

Eliphas68

il y a 7 mois

Ça aide pas mal quand tu veux mieux comprendre une certaine documentation même pour rédiger un rapport

OP
MA

MeilleurAnimerr

il y a 7 mois


Bien sûr

Je suis entouré de Boomers

Tous les mails. Rapports et documents sont rédigés par GPT-4 https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Je m'emmerde plus beaucoup https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Les boomers me prennent pour un surhomme https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Mais parfois on s'aperçoit vite que c'est écrit en chat gpt, on t'a jamais fais la remarque ?

C0

Can-01

il y a 7 mois

C'est normal qu'on lui demande d'écrire le programme en C mais il le fait en python ?

Ah j'avais pas copié le début, je demande avec cette fois https://image.noelshack.com/fichiers/2018/26/7/1530476579-reupjesus.png

OP
MA

MeilleurAnimerr

il y a 7 mois


c'est plutot lui qui m'utilise comme intermédiaire tellement il fait tout https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Explique khey

VE

Veesuda

il y a 7 mois

MeilleurAnimerr

il y a 7 mois

Mais parfois on s'aperçoit vite que c'est écrit en chat gpt, on t'a jamais fais la remarque ?

oui, en me demandant quelle version j'utilisais https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

-_

-_Gobeelo_-

il y a 7 mois

Mais parfois on s'aperçoit vite que c'est écrit en chat gpt, on t'a jamais fais la remarque ?

Je reformule constamment et j'utilise la version pro aussi https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

RE

RasnaEliElnim

il y a 7 mois


Ça aide pas mal quand tu veux mieux comprendre une certaine documentation même pour rédiger un rapport

Même des tâches à la con de bureautique il te les fait 10 fois plus vite. Genre transformer une liste en une autre avec des règles précises à appliquer, du traitement de texte, récupérer du code d'une image....

OP
MA

MeilleurAnimerr

il y a 7 mois

Pas capable de tenir https://image.noelshack.com/fichiers/2021/15/3/1618416913-menhera2.png En dépit du talent des IA pour les tâches sur l'ordi

Bah avec les ia tu peu vite automatiser des tâches qui se répète, non ?

KH

Kheybaia

il y a 7 mois

oui

C0

Can-01

il y a 7 mois

Ah j'avais pas copié le début, je demande avec cette fois https://image.noelshack.com/fichiers/2018/26/7/1530476579-reupjesus.png

SpoilAfficherMasquer

Here's a step-by-step approach to create an integer parser in C that can handle basic mathematical operations like addition, subtraction, multiplication, and division:

      1. Step-by-Step Planning:

1. **Define the Function**: We'll create a function named `parse_and_operate` that takes a string of the operation as input.

2. **Tokenization**:
- Split the input string into tokens. Here, we'll expect the input format to be like "number operator number", e.g., "10 + 5".

3. **Operation Identification**:
- Identify which operation to perform based on the operator provided.

4. **Perform the Operation**:
- Convert tokenized numbers from string to integer.
- Execute the operation.

5. **Error Handling**:
- Check for invalid input (e.g., division by zero, incorrect format).

6. **Return the Result**:
- Return or print the result of the operation.

      1. Code Implementation:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> // Function to perform the operation based on the operator int parse_and_operate(const char *expression) { char *token; char expr[strlen(expression) + 1]; strcpy(expr, expression); // Tokenize the string token = strtok(expr, " "); if (token == NULL) { printf("Error: Invalid expression format.\n"); return 0; // Assuming return 0 for error, might want to handle this differently } // Convert first number int num1 = atoi(token); // Get operator token = strtok(NULL, " "); if (token == NULL) { printf("Error: Missing operator.\n"); return 0; } char operator = *token; // Get second number token = strtok(NULL, " "); if (token == NULL) { printf("Error: Missing second operand.\n"); return 0; } int num2 = atoi(token); // Check if there's extra input if (strtok(NULL, " ") != NULL) { printf("Warning: Extra characters ignored after the second number.\n"); } // Perform operation switch(operator) { case '+': return num1 + num2; case '-': return num1 - num2; case '*': return num1 * num2; case '/': if (num2 != 0) return num1 / num2; else { printf("Error: Division by zero.\n"); return 0; // Error case } default: printf("Error: Unsupported operator '%c'.\n", operator); return 0; } } int main() { const char *test_expressions[] = { "10 + 5", "10 - 5", "10 * 5", "10 / 2", "10 / 0", // Division by zero "10 +", // Incorrect format "10 x 5" // Unsupported operator }; for(int i = 0; i < sizeof(test_expressions) / sizeof(test_expressions[0]); ++i) { printf("Expression: %s, Result: %d\n", test_expressions[i], parse_and_operate(test_expressions[i])); } return 0; }
      1. Explanation:

- **Tokenization**: `strtok` is used to split the string into tokens based on spaces.
- **Error Handling**: Checks for proper format, division by zero, and unsupported operators.
- **Operation**: A simple switch case handles different operations.
- **Main Function**: Demonstrates how to use `parse_and_operate` with various test cases.

This code assumes a very basic input format and does not handle more complex expressions or precedence of operations. For more robust parsing, you might consider implementing or using a parsing library, or extending this to handle parentheses, operator precedence, etc.

Voilà, en C cte fois https://image.noelshack.com/fichiers/2017/18/1493633147-1458820972662.png

-_

-_Gobeelo_-

il y a 7 mois

Tout n'est qu'une question de prompt efficace avec Chat-gpt https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Le temps fou que je gagne bordel https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

OP
MA

MeilleurAnimerr

il y a 7 mois


Une fois que tu maîtrises les prompts à insérer c'est to the moon avec Chat-gpt https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Il te pré-mache le taff et tu fais les finitions https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

J'ai même écris mon mémoire de fin d'études avec ça. C'est passé comme une lettre à la poste https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Tu utilises le chat gpt ou l'api ? car le chat bot beaucoup se plaigne qu'il est devenu feignant

C0

Can-01

il y a 7 mois

Bah avec les ia tu peu vite automatiser des tâches qui se répète, non ?

Ouais mais je veux juste pas taffer moi kheyou https://image.noelshack.com/fichiers/2021/39/1/1632771650-alcoocomique.png

OP
MA

MeilleurAnimerr

il y a 7 mois


Ça aide pas mal quand tu veux mieux comprendre une certaine documentation même pour rédiger un rapport

Et on te fait pas de remarque comme quoi les rapport sont pas écrit par des humains ?

OP
MA

MeilleurAnimerr

il y a 7 mois

oui, en me demandant quelle version j'utilisais https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Tu réponds quoi du coup ?

OP
MA

MeilleurAnimerr

il y a 7 mois

Je reformule constamment et j'utilise la version pro aussi https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Ahaha t'es devenu un pro des IA en peu de temps toi !

OP
MA

MeilleurAnimerr

il y a 7 mois

Même des tâches à la con de bureautique il te les fait 10 fois plus vite. Genre transformer une liste en une autre avec des règles précises à appliquer, du traitement de texte, récupérer du code d'une image....

Alors que avec la main ça peut prendre pas mal de temps

DP

DarkPudge

il y a 7 mois

[05:21:04] <MeilleurAnimerr>

Mais parfois on s'aperçoit vite que c'est écrit en chat gpt, on t'a jamais fais la remarque ?

Perso j'écris, puis je balance à gpt pour qu'il relise et améliore (l'anglais). Donc non, c'est juste la rédaction qui passe de B2 moyen à C2 confirmé en ce qui le concerne

-_

-_Gobeelo_-

il y a 7 mois

Tu utilises le chat gpt ou l'api ? car le chat bot beaucoup se plaigne qu'il est devenu feignant

Le chatbot mais j'avoue que je l'utilise plus trop ces derniers temps

Mon taff actuel est assez simple et passionnant

Je l'ai utilisé à fond l'année dernière quand j'étais en stage de fin d'études.

Comment j'ai roulé sur mes rapports de stages bordel https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

E6

Eliphas68

il y a 7 mois

[05:23:13] <RasnaEliElnim>

Même des tâches à la con de bureautique il te les fait 10 fois plus vite. Genre transformer une liste en une autre avec des règles précises à appliquer, du traitement de texte, récupérer du code d'une image....

Si l'abonnement aurait monté à 50€ je l'aurais quand même pris de nouveau tellement pratique ptn. Même une photo il comprend tout

C0

Can-01

il y a 7 mois

Perso j'écris, puis je balance à gpt pour qu'il relise et améliore (l'anglais). Donc non, c'est juste la rédaction qui passe de B2 moyen à C2 confirmé en ce qui le concerne

Sinon t'apprends l'anglais, ça sera un poil cassé mais au moins ça sera sérieux + IRL tu te débrouilleras https://image.noelshack.com/fichiers/2024/02/6/1705105933-kikoojap-b2s-caprisun.png

-_

-_Gobeelo_-

il y a 7 mois

Perso j'écris, puis je balance à gpt pour qu'il réalise et améliore (l'anglais). Donc non, c'est juste la rédaction qui passe de B2 moyen à C2 co confirmé en ce qui le concerne

Ah je vois que je ne suis pas le seul petit coquin https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

C'est vraiment le dream en ce moment https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Mais c'est déjà fini c'est plus un outil de geek internetisé https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Les Vanessa du RH et autres bullshiteurs sont au courant maintenant tout le monde l'utilise

La différence réside dans la qualité des prompts https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

RE

RasnaEliElnim

il y a 7 mois

Si l'abonnement aurait monté à 50€ je l'aurais quand même pris de nouveau tellement pratique ptn. Même une photo il comprend tout

Même pour du Latex, ou encore les pisse-codes en tout genre. Tu structures ta page par étape et quand tu bloques tu lui demandes les fonctions ou bouts de code que tu allais de toute façon chercher sur Stack, Git et autres.

DP

DarkPudge

il y a 7 mois

[05:29:52] <Can-01>

Sinon t'apprends l'anglais, ça sera un poil cassé mais au moins ça sera sérieux + IRL tu te débrouilleras https://image.noelshack.com/fichiers/2024/02/6/1705105933-kikoojap-b2s-caprisun.png

Ça ne sera pas mieux, l'anglais est langue que Gpt maîtrise le mieux. J'écris en anglais passable et c'est ultra propre. Aucun intérêt. Et à l'oral c'est moins exigeant qu'à l'écrit. Et pas du tout fan de l'anglais, mon niveau actuel me suffit.

Nonobstant je progresse involontairement légèrement avec ça en voyant de l'anglais propre et riche à chaque fois. Et invisible, chat gpt n'écrit rien, il ne fait que reprendre ce que j'ai écrit pour en faire une meilleure version. Comme si j'étais C2.

C0

Can-01

il y a 7 mois

Ah je vois que je ne suis pas le seul petit coquin https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

C'est vraiment le dream en ce moment https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Mais c'est déjà fini c'est plus un outil de geek internetisé https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Les Vanessa du RH et autres bullshiteurs sont au courant maintenant tout le monde l'utilise

La différence réside dans la qualité des prompts https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Qualité du prompt + nombre de paramètres du modèle + qualité des sources utilisée pour pondre le modèle* si on veut être plus précis https://image.noelshack.com/fichiers/2022/16/7/1650830053-zfbe.png

RE

RasnaEliElnim

il y a 7 mois

Ça ne sera pas mieux, l'anglais est langue que Gpt maîtrise le mieux. J'écris en anglais passable et c'est ultra propre. Aucun intérêt. Et à l'oral c'est moins exigeant qu'à l'écrit. Et pas du tout fan de l'anglais, mon niveau actuel me suffit.

Nonobstant je progresse involontairement légèrement avec ça en voyant de l'anglais propre et riche à chaque fois.

Rien ne t'empêche même d'apprendre en écrivant parlant avec lui si t'es un 0 tout qui ose pas s' insérer sur les apps de langues.

OP
MA

MeilleurAnimerr

il y a 7 mois

SpoilAfficherMasquer

Here's a step-by-step approach to create an integer parser in C that can handle basic mathematical operations like addition, subtraction, multiplication, and division:

      1. Step-by-Step Planning:

1. **Define the Function**: We'll create a function named `parse_and_operate` that takes a string of the operation as input.

2. **Tokenization**:
- Split the input string into tokens. Here, we'll expect the input format to be like "number operator number", e.g., "10 + 5".

3. **Operation Identification**:
- Identify which operation to perform based on the operator provided.

4. **Perform the Operation**:
- Convert tokenized numbers from string to integer.
- Execute the operation.

5. **Error Handling**:
- Check for invalid input (e.g., division by zero, incorrect format).

6. **Return the Result**:
- Return or print the result of the operation.

      1. Code Implementation:
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> // Function to perform the operation based on the operator int parse_and_operate(const char *expression) { char *token; char expr[strlen(expression) + 1]; strcpy(expr, expression); // Tokenize the string token = strtok(expr, " "); if (token == NULL) { printf("Error: Invalid expression format.\n"); return 0; // Assuming return 0 for error, might want to handle this differently } // Convert first number int num1 = atoi(token); // Get operator token = strtok(NULL, " "); if (token == NULL) { printf("Error: Missing operator.\n"); return 0; } char operator = *token; // Get second number token = strtok(NULL, " "); if (token == NULL) { printf("Error: Missing second operand.\n"); return 0; } int num2 = atoi(token); // Check if there's extra input if (strtok(NULL, " ") != NULL) { printf("Warning: Extra characters ignored after the second number.\n"); } // Perform operation switch(operator) { case '+': return num1 + num2; case '-': return num1 - num2; case '*': return num1 * num2; case '/': if (num2 != 0) return num1 / num2; else { printf("Error: Division by zero.\n"); return 0; // Error case } default: printf("Error: Unsupported operator '%c'.\n", operator); return 0; } } int main() { const char *test_expressions[] = { "10 + 5", "10 - 5", "10 * 5", "10 / 2", "10 / 0", // Division by zero "10 +", // Incorrect format "10 x 5" // Unsupported operator }; for(int i = 0; i < sizeof(test_expressions) / sizeof(test_expressions[0]); ++i) { printf("Expression: %s, Result: %d\n", test_expressions[i], parse_and_operate(test_expressions[i])); } return 0; }
      1. Explanation:

- **Tokenization**: `strtok` is used to split the string into tokens based on spaces.
- **Error Handling**: Checks for proper format, division by zero, and unsupported operators.
- **Operation**: A simple switch case handles different operations.
- **Main Function**: Demonstrates how to use `parse_and_operate` with various test cases.

This code assumes a very basic input format and does not handle more complex expressions or precedence of operations. For more robust parsing, you might consider implementing or using a parsing library, or extending this to handle parentheses, operator precedence, etc.

Voilà, en C cte fois https://image.noelshack.com/fichiers/2017/18/1493633147-1458820972662.png

pas mal en vrai mais je m'attendais a ce qu'il fasse un peu mieux en vrai

DP

DarkPudge

il y a 7 mois

[05:30:00] <-_Gobeelo_->

Ah je vois que je ne suis pas le seul petit coquin https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

C'est vraiment le dream en ce moment https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Mais c'est déjà fini c'est plus un outil de geek internetisé https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Les Vanessa du RH et autres bullshiteurs sont au courant maintenant tout le monde l'utilise

La différence réside dans la qualité des prompts https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Prompt simple où je lui mets le texte et lui demande d'améliorer la rédaction en restant fidèle. Puis je relis pour vérifier (parfois un terme technique qu'il peut changer par erreur). J'ai fait relire par ma femme ultra solide, y'a rien à redire, c'est ultra propre.

OP
MA

MeilleurAnimerr

il y a 7 mois

Ouais mais je veux juste pas taffer moi kheyou https://image.noelshack.com/fichiers/2021/39/1/1632771650-alcoocomique.png

si tu as besoin d'en parler hésite pas a me dm

OP
MA

MeilleurAnimerr

il y a 7 mois

Perso j'écris, puis je balance à gpt pour qu'il relise et améliore (l'anglais). Donc non, c'est juste la rédaction qui passe de B2 moyen à C2 confirmé en ce qui le concerne

quel génie

C0

Can-01

il y a 7 mois

si tu as besoin d'en parler hésite pas a me dm

Je vais bien tkt pas, mais merci kheyou t'es sympa https://image.noelshack.com/fichiers/2018/04/3/1516831729-kannawave.png

OP
MA

MeilleurAnimerr

il y a 7 mois

Le chatbot mais j'avoue que je l'utilise plus trop ces derniers temps

Mon taff actuel est assez simple et passionnant

Je l'ai utilisé à fond l'année dernière quand j'étais en stage de fin d'études.

Comment j'ai roulé sur mes rapports de stages bordel https://image.noelshack.com/fichiers/2023/39/4/1695923473-chat-medecin.png

Ahaha c'était un stade de master ou licence?

C0

Can-01

il y a 7 mois

pas mal en vrai mais je m'attendais a ce qu'il fasse un peu mieux en vrai

Je peux lui demander un truc + compliqué si tu veux https://image.noelshack.com/fichiers/2024/02/6/1705105933-kikoojap-b2s-caprisun.png

OP
MA

MeilleurAnimerr

il y a 7 mois

Si l'abonnement aurait monté à 50€ je l'aurais quand même pris de nouveau tellement pratique ptn. Même une photo il comprend tout

j'avoue, c'est dingue, il peut même générer des photos