Dev [pdf which includes some python code I asked about.pdf] feel free to ask any questions!

Me Aha, I knew python was just pdf in disguise

Dev PDF? as in probability density function? 🤔

Me Ok not about code but python in general: Any reason I shouldn’t install the 100 or 300 or 1000 most common libraries just so I never have to think about it again? Like why isn’t this standard? Laptop has most of 1TB storage remaining

Dev It isn’t standard because dependencies can conflict between them and you need to keep dependencies updated you’re better off just learning to use a modern tool for managing python environments, like poetry (or conda, if that’s your tune)

Me Yea so just import the right ones right? And no way I’m not adding any more complexity nothing ever works as is

Dev basically, my workflow (and the workflow of most senior python developers) is that when you create a project, you create a new environment You just add the dependencies to the environment as you need them So in my case, I just poetry add dependency whenever I need something By example, for this project, Poetry auto-defined these dependencies:

pic

By doing this (having a defined environment) you avoid a huge amount of headaches associated with conflicting dependencies and versioning It’s a habit I’ve built by force

Me pip install * Lol fr though thanks a bunch! I might throw more amateur questions at u but don’t feel any need to answer or answer quickly haha

Dev If you do pip install all the time, then you’re going to last a couple of months before you have to reinstall python 😭

Me Wait how else do u get the package

Dev

pic

hopefully we have an xkcd about it Using Poetry or Conda! You can also use pip if you’re using something like venv, but it’s hard to use

Me Poetry is just an English noun to me and conda is plan B when pip install is weird for some reason but idk what it is in the slightest Tf is brew Plan A is pip Plan B is brew Plan C is conda

Dev ok so

Me Plan A is pip Plan B is brew Plan C is conda Plan D is give up Plan E is a weird long ass zsh command starting with sudo that chatGPT cooked up

Dev You have general-purpose package managers like brew and port (in macOS), and then you have python package managers. The default Python package manager is pip (which stands for pip install pakages ✨) which is pretty good if you want to install things globally, that is to your entire computer However, whenever you actually need to build things and share your work with other people, most python developers don’t install things to the global environment But rather, create an environment (a collection of packages) for a particular project, and then install all the packages they need to that project environment Traditionally, that used to be done with tools like venv + pip, but nowadays there are modern tools like Poetry or Conda, which try to make your life easier and handle all of the hard stuff for you Poetry is my favorite, because you only need to learn two commands, and once you start using it you can make everything from disposable projects to publishable python libraries with it https://python-poetry.org

Me Fuck no pip cannot stand for pip install packages unless we’re getting theological

Dev it actually does

Me ok what did the first pip stand for

Dev it’s a recursive backronym the first pip didn’t stand for anything, which is why it’s a backronym but the backronym is recursive en.wikipedia.org Recursive acronym - Wikipedia

Me Ok fine that does make sense But then it should be eg: pi numpy the thing should be pi and there shouldn’t be a second word Who do I submit a complaint to

Dev I have great news for you

pic

hopefully we have an xkcd about it Using Poetry or Conda! You can also use pip if you’re using something like venv, but it’s hard to use

Me Tf is via Tf is the snake doing

Dev JDFKGKJDFG i’ve tweaked my terminal

Me ah

Dev so it shows the activated versions of different programming languages

What’s a terminal I’m only 2/3 joking

Dev the thing that you type commands to like i’m pretty sure that’s close to the technical definition

Me Ok then what about shell command line and console

Dev ok so that is where it gets messy

They’re all the same 😭 Yeah I’ve gathered

Dev basically terminal used to be the physical interface which you used to interact with a computer nowadays terminal really means terminal emulator, which is a program that emulates that textual interface

Me What language is it when I’m talking to the thing underneath bash called “base” I think

Dev a console is another word for virtual terminal and then shell is the program that answers what you write

Me Oy vey

Dev or rather, the program that coordinates how to answer whatever you write there’s nothing underneath bash bash is bash

Me Fake news

Dev when you write bash code, you’re just writing bash

Dev What if I uninstall bin/bash And then open the terminal app

Dev depending on what computer you have you’ll either ruin your computer or nothing will happen

Me Lmao

Dev if you have an up to date mac, you probably think you’re using bash when you’re actually not you’re probably using something called zsh which is made to look like bash while being actually better bash will still be installed for compatibility reasons, but AFAIK most apps no longer use it if you want to know what you’re using you can type echo $SHELL on your terminal and it’ll tell you what is running

Me lol u think I’m not an expert computer programmer?? Gotta go now but really thanks sm, hope u could tolerate my cope humor