Начал экспериментировать с GPT-4
Mar. 21st, 2023 01:19 amЧерез ChatGPT+, за двадцатку в месяц. В общем, разница между этой штукой и ChatGPT огромная, и нет смысла ещё тянуть время.
Сразу она начала с предупреждения: "GPT-4 currently has a cap of 25 messages every 3 hours. Expect significantly lower caps, as we adjust for demand."
Но когда я попросил её дать мне советы по моему проекту, она очень мило выступила, технически грамотно в конкретном контексте, и совсем не всё, что она сказала, было общим местом (и, в любом случае, она явно шире видит, чем я; я даже почти всё это "в принципе знаю", и с чем-то могу и не согласиться, но, с другой стороны, оно всё по делу, большую часть этого дела я бы и не вспомнил).
Сразу она начала с предупреждения: "GPT-4 currently has a cap of 25 messages every 3 hours. Expect significantly lower caps, as we adjust for demand."
Но когда я попросил её дать мне советы по моему проекту, она очень мило выступила, технически грамотно в конкретном контексте, и совсем не всё, что она сказала, было общим местом (и, в любом случае, она явно шире видит, чем я; я даже почти всё это "в принципе знаю", и с чем-то могу и не согласиться, но, с другой стороны, оно всё по делу, большую часть этого дела я бы и не вспомнил).
no subject
Date: 2023-03-21 05:07 pm (UTC)I SAY:
What does this program do?
#define B 6945503773712347754LL
#define I 5859838231191962459LL
#define T 0
#define S 7
int main(int b,char**i){long long n=B,a=I^n,r=(a/b&a)>>4,y=atoi(*++i),_=(((a^n/b)*(y>>T)|y>>S)&r)|(a^r);printf("%.8s\n",(char*)&_);}
SHE SAYS:
This C program accepts a single command-line argument (a number) and prints an 8-character string based on the input and some bitwise operations. The main difference from the previous version is that this version uses macros to define the values of B, I, T, and S.
Here's a breakdown of the program:
The #define lines create four macros with specified values:
B is set to 6945503773712347754LL.
I is set to 5859838231191962459LL.
T is set to 0.
S is set to 7.
int main(int b,char**i) is the main function definition, where b is the number of command-line arguments (including the program name itself) and i is an array of pointers to the arguments.
long long n=B,a=I^n,r=(a/b&a)>>4 declares three long long variables and initializes them:
n is initialized with the value of B.
a is initialized with the result of bitwise XOR between I and n.
r is initialized with the result of bitwise AND between a/b and a, right-shifted by 4 bits.
y=atoi(*++i) increments the pointer i to point to the first command-line argument (excluding the program name) and converts that argument to an integer using the atoi() function. The result is stored in the integer variable y.
_=(((a^n/b)*(y>>T)|y>>S)&r)|(a^r) performs a series of bitwise operations and arithmetic calculations on the variables a, n, r, y, T, and S. The result is stored in the integer variable _.
printf("%.8s\n",(char*)&_); prints the first 8 characters of the variable _ as a string, followed by a newline character.
The program expects one command-line argument (a number) and prints an 8-character string based on the input number and a series of bitwise operations.