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:
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
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
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