Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine
it's not giving it its own OS, all it is is shipping the script with a tarred up rootfs

:goonsay:

Adbot
ADBOT LOVES YOU

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
i mean its true

Zlodo
Nov 25, 2006

CRIP EATIN BREAD posted:

it is if you’re not a braindead moron

but then I wouldn't use python???

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

Carthag Tuek posted:

amazon elastic beanstalk really loves moving your environment to another host about 30 minutes after you deploy a new version

so i push my thing & ssh there to run a long job and almost without fail theyll shut it down right in the middle so i have to start over

and obvs i will have to type the command again because bash history is lost when that happens

fuckers

I don't really know anything about elastic beanstalk but this sounds like a suboptimal use

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



pokeyman posted:

I don't really know anything about elastic beanstalk but this sounds like a suboptimal use

yeah idk what gives

it doesnt happen all the time, but it happens enough that i dread it every time

Sapozhnik
Jan 2, 2005

Nap Ghost
autoscaling and manual intervention into the things being autoscaled seems like a bad combo to me

have you considered spawning an unmanaged ec2 vm instead op

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
you should never be logging into a server

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



yea i know, i know

but the server has some backend functions that take a while to run so even if i wasnt logged in but did them via web, it would still get shut down no?

Destroyenator
Dec 27, 2004

Don't ask me lady, I live in beer
aws cloud9 has been fine for stuff like that for me before

Sapozhnik
Jan 2, 2005

Nap Ghost

Carthag Tuek posted:

yea i know, i know

but the server has some backend functions that take a while to run so even if i wasnt logged in but did them via web, it would still get shut down no?

then you need some sort of batch scheduling service.

if it's something you periodically do manually then deploy your server application on a regular-rear end manually-spawned ec2 somewhere

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



tbh it doesnt matter so much cause the project will probably finish soon anyway so ehh im just gonna power thru

its just annoying

cool av
Mar 2, 2013

chaosbreather posted:

the correct way to run a bunch of code is to give it its entire own virtual computer with its own bytecode and instruction set and loving everything. java runs on the jvm, .net on the clr, elixir on erlang vm. that happens all the time. merely timesharing some OS bits and bobs is actually much less drastic if you think about it

i thought about it and no it’s definitely more drastic


docker is simple enough for anybody but just novel enough that when it clicks it really rewards the programmer brain. not that it’s bad but ppl love it more than it deserves

Convoolio
Oct 31, 2005

GenJoe posted:

can someone smarter than me help solve the problem where building a new container every time you need to run your python script just thrashes the disk with a ton of built images, and then you have to manually purge the image cache every day or two? is this me setting things up in a dumb way? or have other people run into this

I've also run into a similar problem with podman where I have to frequently destroy the podman vm and do podman machine init again because the storage on the VM fills up with images super quickly

Both of those tools have a prune command to delete dangling images, but I assume you've tried that?

code:
docker image prune

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



apt purge docker -y

12 rats tied together
Sep 7, 2006

cool av posted:

docker is simple enough for anybody but just novel enough that when it clicks it really rewards the programmer brain. not that it’s bad but ppl love it more than it deserves

i would simply install the programming language onto my computer, and if i encountered a problem, i would read the documentation

Sapozhnik
Jan 2, 2005

Nap Ghost
i would simply email a tarball to the ops team shared mailbox

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

12 rats tied together posted:

i would simply install the programming language onto my computer, and if i encountered a problem, i would read the documentation

Job has these containers people are supposed to do work in. But they don't have any man pages installed lol.

For that and other reasons I dev locally and just test in the container env.

Corla Plankun
May 8, 2007

improve the lives of everyone

12 rats tied together posted:

i would simply install the programming language onto my computer, and if i encountered a problem, i would read the documentation

i've managed to break pip 5-6 times when i was running it on my main dev environment. whether this is an indictment of my skills or python is left as an exercise to the reader

FlapYoJacks
Feb 12, 2009
pro-tip: Don’t update pop

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



tro-pip: dont

12 rats tied together
Sep 7, 2006

Sapozhnik posted:

i would simply email a tarball to the ops team shared mailbox

and the ops team shared mailbox runs off of a postfix service that pipes your tarball to a dpkg build script, and then all the servers can simply apt-get update your bullshit. none of the moving parts of this build pipeline have changed since 1997.

Corla Plankun posted:

i've managed to break pip 5-6 times when i was running it on my main dev environment. whether this is an indictment of my skills or python is left as an exercise to the reader

i have no reason to be especially mean or nasty to anyone itt, the terrible programming/ers thread, but after the 2nd time i rendered my dev environment unusable i would have taken a moment to seek help and understand the tools. that feels like a reasonable expectation of someone who gets paid to make the computer do things correctly on average

outhole surfer
Mar 18, 2003

if you can't develop using only system packages, you're weaksauce

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


some idiot PMs hired some consultants to gently caress up a workflow app and all that got produced was a pile of documentation and a sharepoint site so one of the generalist teams we have built them a new and actually pretty cool frontend to it using python except that the idea there is that it's self contained (so they have to run it locally) and user supported and just lmao at the idea of business users supporting python

I looked at it (because it is now coming my way because they're my users, even though we don't have any python devs) and the html generation in it is *insane*, just incredibly verbose and fiddly compared to separating model and view and keeping close to just raw html with razor templates

outhole surfer
Mar 18, 2003

12 rats tied together posted:

none of the moving parts of this build pipeline have changed since 1997.

true story:

on-boarding for my current gig, I asked about an internal build/configuration management system that was mentioned in our wiki. response was not to worry about that system as it was legacy and had been replaced by the current build/configuration management system.

in 1992.

Deffon
Mar 28, 2010

12 rats tied together posted:

and the ops team shared mailbox runs off of a postfix service that pipes your tarball to a dpkg build script, and then all the servers can simply apt-get update your bullshit. none of the moving parts of this build pipeline have changed since 1997.

i have no reason to be especially mean or nasty to anyone itt, the terrible programming/ers thread, but after the 2nd time i rendered my dev environment unusable i would have taken a moment to seek help and understand the tools. that feels like a reasonable expectation of someone who gets paid to make the computer do things correctly on average

Trying things out has been the best way to learn tools for me.
Making mistakes should not be seen as fatal, it's good to have guard rails so you're not afraid to try new things. That's the same reason why we write automated tests, and run them on environments that resemble the live environment. We should strive to do better than "Works on my machine".

I work on different projects that have various levels of maintenance. That means I might have to install multiple versions of JDK (JDK 17 is apparently not fully backwards-compatible with 11) and Node.js.
You can either use project-specific containers or tools like sdkman, nvm or poetry to solve this problem locally. What will not work is relying on system dependencies no matter how much you read some "documentation".

12 rats tied together
Sep 7, 2006

the python documentation has had sections on how to manage packages for multiple applications in it for over a decade. there are a lot of tools for it outside of those mentioned on the official documentation, as a working professional who needs to interact with python you should be aware of them and you should understand at least one slice of them

a good default to pick would be the ones in the documentation, even if venv kind of sucks rear end, you're not equipped to understand why poetry might be better until you understand the source issue: how python loads packages, where it finds them, where they install to, and so on.

approaching your dev environment as an artifact of having read and run commands from a bunch of github readmes basically mandates that you must use docker, but that's a solution to a problem that doesn't need to exist

Deffon
Mar 28, 2010

12 rats tied together posted:

the python documentation has had sections on how to manage packages for multiple applications in it for over a decade. there are a lot of tools for it outside of those mentioned on the official documentation, as a working professional who needs to interact with python you should be aware of them and you should understand at least one slice of them

a good default to pick would be the ones in the documentation, even if venv kind of sucks rear end, you're not equipped to understand why poetry might be better until you understand the source issue: how python loads packages, where it finds them, where they install to, and so on.

approaching your dev environment as an artifact of having read and run commands from a bunch of github readmes basically mandates that you must use docker, but that's a solution to a problem that doesn't need to exist

This particular problem seems to be more prominent in Python than other languages from my experience.

Not having a project-centric view from the beginning made it much easier to install system packages with pip, which you now might do by accident outside of a virtual environment or by copy-pasting commands from some tutorial out of context.
Node.js require an explicit flag to install global packages, and I don't think think I've seen a basic tutorial referring to the JDK extension directory.

I can see the need to learn about all this for Python specifically due to its' ecosystem, but preferably the ecosystem should improve so you can fall in the pit of success. If you think Docker isn't a silver bullet for that, then I agree.

Zlodo
Nov 25, 2006

12 rats tied together posted:

the python documentation has had sections on how to manage packages for multiple applications in it for over a decade. there are a lot of tools for it outside of those mentioned on the official documentation, as a working professional who needs to interact with python you should be aware of them and you should understand at least one slice of them

a good default to pick would be the ones in the documentation, even if venv kind of sucks rear end, you're not equipped to understand why poetry might be better until you understand the source issue: how python loads packages, where it finds them, where they install to, and so on.

approaching your dev environment as an artifact of having read and run commands from a bunch of github readmes basically mandates that you must use docker, but that's a solution to a problem that doesn't need to exist

I would simply use a programming language that generate binaries that can be executed without requiring the end user to install a bunch of clown shoes interpreters/package managers/frameworks

Asleep Style
Oct 20, 2010

12 rats tied together posted:

the python documentation has had sections on how to manage packages for multiple applications in it for over a decade. there are a lot of tools for it outside of those mentioned on the official documentation, as a working professional who needs to interact with python you should be aware of them and you should understand at least one slice of them

a good default to pick would be the ones in the documentation, even if venv kind of sucks rear end, you're not equipped to understand why poetry might be better until you understand the source issue: how python loads packages, where it finds them, where they install to, and so on.

approaching your dev environment as an artifact of having read and run commands from a bunch of github readmes basically mandates that you must use docker, but that's a solution to a problem that doesn't need to exist

imo the correct choice is pyenv with the pyenv-virtualenv plugin. probably deploy with docker anyway

FlapYoJacks
Feb 12, 2009

Zlodo posted:

I would simply use a programming language that generate binaries that can be executed without requiring the end user to install a bunch of clown shoes interpreters/package managers/frameworks

Languages such as????

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Zlodo posted:

I would simply use a programming language that generate binaries that can be executed without requiring the end user to install a bunch of clown shoes interpreters/package managers/frameworks

lmao at using google products, you absolute buffoon

Zlodo
Nov 25, 2006

FlapYoJacks posted:

Languages such as????

c++, maybe rust for the hipsters

12 rats tied together
Sep 7, 2006

Deffon posted:

I can see the need to learn about all this for Python specifically due to its' ecosystem, but preferably the ecosystem should improve so you can fall in the pit of success. If you think Docker isn't a silver bullet for that, then I agree.

Totally agree that the pip default should be to install things like node does, instead of that needing to be an optional switch.

It's worth noting though that it's not python-the-language's fault that system python exists. If you're creating some kind of "environment parity" abstraction, you're explicitly opting into and accepting that system python is present, and this remains true if you have a vagrant vm, a dedicated dev server in a rack somewhere, or if you run it in a container.

I don't want to seem like I'm harping on the OP unnecessarily, I actually want to applaud them as being one of the only people ITT ballsy enough to actually post a concrete thing instead of a tired snipe, but even if you "FROM python:3" you're still running your application in an environment that has 2 different pythons installed, is based on debian unless you specify otherwise, and which comes with its own set of tradeoffs and assumptions about things that will exist on the system, packages that will be available, etc.

Someone, at some point, has to understand the system that the language runs on top of, this is true for every language.

Asleep Style posted:

imo the correct choice is pyenv with the pyenv-virtualenv plugin. probably deploy with docker anyway
agree, these two should be stdlib and featured heavily in the documentation. that they aren't is criminal. disagree about docker, how your code runs is an ops concern, you should let your ops team care about it.

if you are your own ops team, go hog wild

FlapYoJacks
Feb 12, 2009

Zlodo posted:

c++, maybe rust for the hipsters

Ah yes, C++, the language famous for not requiring the end user to install a bunch of things. Shared libraries do not exist.

psiox
Oct 15, 2001

Babylon 5 Street Team

Asleep Style posted:

imo the correct choice is pyenv with the pyenv-virtualenv plugin. probably deploy with docker anyway

i really hate that every ecosystem has reinvented rbenv

just use https://github.com/asdf-vm/asdf, people. as a bonus it's trivially easy to write plugins for and support your own in-house whatevers through it.

Zlodo
Nov 25, 2006

FlapYoJacks posted:

Ah yes, C++, the language famous for not requiring the end user to install a bunch of things. Shared libraries do not exist.

people using c++ are usually considerate enough to ship whichever shared libraries they use along with the main binary. on linux distros like to split it out into a bunch of packages but the package managers deal with that poo poo just fine

shared libraries and distro's package managers do not constitute "clown shoes interpreters/packages managers/frameworks". they are of the non clown shoes variety and are therefore fine

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



12 rats tied together posted:

Someone, at some point, has to understand the system that the language runs on top of, this is true for every language.

12 rats tied together
Sep 7, 2006

FlapYoJacks posted:

Languages such as????

imo the secret to the success of the .net ecosystem is that microsoft has been doing the hard work in this area for so long that even the windows admins dont know what the gac is anymore

Asleep Style
Oct 20, 2010

12 rats tied together posted:

agree, these two should be stdlib and featured heavily in the documentation. that they aren't is criminal. disagree about docker, how your code runs is an ops concern, you should let your ops team care about it.

if you are your own ops team, go hog wild

:madmax: I was until we recently hired a devops person

I've never worked at a place big enough to have a large separate ops organization, so take this with a grain of salt, but it seems like to make effective decisions about how to write my software I also need to have some idea of what it's going to run on and the constraints of that system

also a major point in dockers favor here is how easy it makes it to spin up a local environment that closely mimics prod for troubleshooting and testing. yes this can all be done with vms but it's slower and less convenient at every place I've ever been

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
Docker is nice for self-contained deployment but I don't know if I'd do local development with it.

Fedora has a really nice thing called toolbox these days where it creates a big fat podman container that is fully desktop-integrated and sees your home directory. You can install whatever you want in there with standard package managers and you have fake root in there. But it doesn't pollute your main filesystem outside of /home and you can have more than one. In theory it can support distributions other than Fedora but in practice only a Fedora installation is provided at the moment. X11 and Wayland apps work transparently. But you do need to do development under desktop linux for best results there.

For instance I can create a toolbox and install some Python garbage in there and then install vscode in there and run vscode from within the toolbox, and all the autocompletion and debugging things are fully integrated with whatever toolchain you have installed because it's all running in the same container. I can launch a dev webserver and it shows up on localhost without any need to explicitly forward any ports. I can have that dev environment connect to a separate postgres container, again without any port forwarding or virtual network nonsense.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply