3 ms·
Agreed. I find some (little) value in getting throwaway code done. What is useful is asking chatgpt instead of googling and then checking the results - which
by philipswood 3y ago
Agreed.
I find some (little) value in getting throwaway code done.
What is useful is asking chatgpt instead of googling and then checking the results - which feels like faster googling, i.e. it's a familiar process, just streamlined.
What I find useful and new is the ability to do a quick occasional consult on a tool or on what code does,
e.g.:
I thought a makefile should be reading something from an environment variable - it wasn't - so I had this quick chat:
ChatGPT 3.5
User:
Hi again
:wave:
as usual I like terse replies
lets understand makefiles
ChatGPT:
:wave: Sure, makefiles are used for building and managing projects...
>8-------redacted non-terse makefile summary
User:
What does this mean/do?
```Makefile
$(eval TERRAFORM_VERSION:=1.4.5)
```
ChatGPT:
In this Makefile snippet, the $(eval ...) function is used to evaluate the expression and set the variable TERRAFORM_VERSION to the value 1.4.5. The eval function in a Makefile is a way to perform variable assignments dynamically during the execution of the Makefile.
So, after this line is executed, TERRAFORM_VERSION will be defined with the value 1.4.5. This can be useful for specifying and managing the version numbers or other variables in a Makefile, allowing for more flexibility and easy updates.
User:
so 1.4.5 is constant - it doesn't look at the environment variable?
ChatGPT:
Yes, that's correct. In the given Makefile snippet, the TERRAFORM_VERSION is explicitly set to the constant value 1.4.5. It doesn't dynamically look at the environment variable or any other external source; rather, it directly assigns the specified value to the variable during the evaluation of the Makefile. If you want to make it dynamic and read from an environment variable, you would use a different approach.