4 ms·
What I really want is a GPT who can set my dev env when I ask it to. Hey ChatGPT, you give me the definitive commands that will install a good version of pytho
by BiteCode_dev 4y ago
What I really want is a GPT who can set my dev env when I ask it to.
Hey ChatGPT, you give me the definitive commands that will install a good version of python, create a venv, install the right packages and command line tools, setup the configuration just right and let me just code?
Cause for the code, codepilot is already fantastic.
- doliveira 4y agoWhy do we still need to do all this boilerplate? I'm not even singling out Python here, I actually think that Codepilot being so amazing is kind of sad, clearly we shouldn't be needing to do all these things in 2022.
- BiteCode_dev 4y agoBecause nobody wants to do the long, ingrate, tedious work of cleaning 30 years of legacy ecosystem.
- moffkalast 4y agoChatGPT response: "Hey sorry, I may know everything but you're asking for the impossible."
- heeton 4y agoWith this language model around it, I imagine that's a trivial next step. ChatGPT was correctly self-diagnosing problems when I pasted the error codes back in. It justs needs a setup where output is looped back in, and I imagine you could start to say things like: Give me an environment where the test suite passes for this new repo I've cloned, based on all the environment config inside. - Finds versions, sets them up - Installs packages - Asks about conflicts or problems - Notes why the tests fail first time (no DB!) - Creates the DB, runs migrations - Notes why the tests fail next time (missing env variable) - Finds a similar env variable in the example file, creates and local env file - etc etc That's all possible now if you paste the messages into GPT (with some errors, which repeated attempts can resolve), it needs connecting up into a self-aware environment.
- thegabez 4y agoWhy would you want it to stop there?
- return_to_monke 4y agohey, have you ever heard about https://nixos.org https://nixos.org ?
- xcdzvyn 4y agoThis. 10-15 lines in `default.nix` followed by `nix-shell` ensures you'll have the exact same fully-functional dev environment any time, anywhere.
- BiteCode_dev 4y agoThe nixos people are truly the Jehovah Witness of software.
- return_to_monke 4y agoI think rust people beat us :)
- johnfn 4y agoIt's funny you ask this because I've been asking ChatGPT for exactly these sorts of issues. It misses sometimes, but I've gotten a couple of really good hits.
- avip 4y agoHere are the definitive commands that will install a good version of Python, create a virtual environment (venv), install the necessary packages and command line tools, set up the configuration correctly, and allow you to start coding: Install a good version of Python: # Install the latest version of Python 3 sudo apt update sudo apt install python3 Create a virtual environment (venv) for your project: # Create a virtual environment for your project python3 -m venv my_project # Activate the virtual environment source my_project/bin/activate Install the necessary packages and command line tools: # Install the necessary packages and command line tools pip install --upgrade pip pip install setuptools wheel pip install flake8 black isort Set up the configuration for your project: # Set up the configuration for your project flake8 --install-hook git black --install-hook git isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --thirdparty my_project Start coding: # Start coding in your project cd my_project nano my_project.py This series of commands will install the latest version of Python 3, create a virtual environment for your project, install the necessary packages and command line tools, set up the configuration for your project, and allow you to start coding. I hope this helps. Let me know if you have any other questions.
- jerpint 4y agoThis is incredible (I’m assuming this was chatGPT output)
- ailef 4y agoI think this fails because you need to install python3-venv too (on Debian systems I believe). So then you're back looking it up on Google.
- deleted 4y ago[deleted]
- roywiggins 4y agoThere's good odds that if you responded "hey, I got an error about virtualenv being missing, what do I need to fix that?" it will suggest that. It's a genuine chat interface; if something isn't quite right, you can point that out and ask it to correct it, and it has good odds of understanding.
- modeless 4y agoDid you try asking ChatGPT? This is its response to your verbatim question (and if it isn't exactly what you had in mind you can reply and ask it to change things, like do it on Windows or make it a script): To install Python, you can use the following command: $ sudo apt-get install python3 To create a virtual environment (venv) for your Python project, you can use the following command: $ python3 -m venv /path/to/venv To activate the virtual environment, you can use the following command: $ source /path/to/venv/bin/activate To install packages within the virtual environment, you can use the following command: $ pip install <package-name> To install command line tools, you can use the following command: $ sudo apt-get install <tool-name> To set up the configuration for your project, you will need to edit the appropriate configuration files for the tools and libraries that you are using. The specific steps for this will depend on the details of your project and the tools that you are using. Once you have set up your environment and installed the necessary packages and tools, you can start coding!
- BiteCode_dev 4y agoThis has a failure mode in each single line, even if we ignore it will not work on any OS that is not debian-like, which is most of them. First line, you don't chose which Python you install, only the 3, so you don't know if the libs you need will be available, which syntax you can use and which stdlib is at your disposable. Then, you use venv which may not be available because the first line you used doesn't install all python packages and in some debian/ubuntu versions they don't include venv, setuptools or pip in the python3 package. Then you pip install packages, which may fail if this has a c extensions which is not a wheel (E.G: you do machine learning), because you didn't get the python headers in the previous commands. Then you install command lines with apt-get, meaning your tool version may not be upgraded to match the python you used. For pylint and mypy, this means it at beast false positives, at worst crashes Of course, none of that explains how to setup your IDE to use said virtual, setup things like databases, init the git repo or put good default in config files. Don't get me wrong, it's a good start, and not worse than most tutorials I read online written by human. I don't doubt that it will get better over time though, and I can't wait. Bootstrapping is a plague to teach people.
- ralmidani 4y ago“I’m sorry, dev, I’m afraid I can’t do that. This mission is too important for me to allow you to jeopardize it.”