ProgrammerHumor

seenYallSlanderMyGoatRecently

seenYallSlanderMyGoatRecently

I know it's difficult since we have jobs, but Java bros, it's time to fight back

https://i.redd.it/v5hx6xmcn8ef1.png
Reddit

Discussion

liquidmasl

uv ftw

7 hours ago
Puzzleheaded_Car_987

uv gang

2 hours ago
[deleted]

[deleted]

7 hours ago
mikevaleriano
:ts::py:

Just in case what...? uv works.

6 hours ago
MiigPT

Good luck using uv with pytorch and dependencies that depend on torch, spoiler: it's not fun.

But to be fair, that's not uv fault as it's also a nightmare with poetry or any other standard package manager/resolver. It's an issue of python's dependency resolution when it comes to GPUs

3 hours ago
Pyroglyph
:cs::ts::rust:

I only use Python (and by extension, uv) for local AI stuff, and I haven't had a single problem with Torch. I'm also a complete Python luddite. What's wrong with uv and Torch?

2 hours ago
romulof
:cp::py::js::j:

Is there an official doc for how to structure projects using UV?

A while ago I tried and the lack of structure and proper documentation was quite disturbing.

4 hours ago
klorophane

No offense, but that tells me you haven't ever read the uv docs... https://docs.astral.sh/uv/guides/projects/

2 hours ago
liquidmasl

unsure what exactly you are looking for there, especially in comparison to pip

3 hours ago
romulof
:cp::py::js::j:

For example: what should I use? - requirements.txt - pyproject.toml - uv lock file

3 hours ago
liquidmasl

pyproject toml, lock file is generated. No need for requirements.txt

when in a project just do uv init. it generates a starting point. add dependencies with uv add, apply them with uv sync

3 hours ago
gufranthakur OP

Never used UV, how is it better than pip?

6 hours ago
liquidmasl

way more solid and super fast dependency resolution. I was reluctant to switch for a hot minute but not looking back.

6 hours ago
Sibula97

While it's great, it has the same issue where it can't resolve package versions if your packages didn't specify their dependencies correctly.

6 hours ago
liquidmasl

tells you right away if two packages have conflicting dependencies and tells you, in seconds, its great.

6 hours ago
ElectricalMTGFusion

I was gonna say. Uv for hobby, poetry for work. Biggest issue is installing poetry honestly.

5 hours ago
lotokotmalajski

And it's slower. And doesn't take care of python version. Why would you use an inferior tool for work? Given the choice I always go for uv in new projects.

5 hours ago
ElectricalMTGFusion

Poetry does work with versioning if you use py-env cli tool and set some flags in your poetry config. Just not natively in the tool itself.

We don't use UV cause our head SE said so. They experimented with uv before I got there and for one reason of another they decided to stick to poetry.

2 hours ago
ReadyAndSalted

depending on when they looked at it, that could be fair enough. But UV has been iterating and updating so rapidly, if they checked 6 months ago then chances are UV is up to their standard now. It could however be some weird internal tooling integration like in my org, if that's the case then you just have to wait...

13 minutes ago
seba07

And then you go to C/C++ and notice that there simply isn't one standard dependency management tool.

8 hours ago
PeoplesFront-OfJudea
:cp::js::ts::py:

I AM the dependency management tool

7 hours ago
ColaEuphoria
:c::cp::py::asm::rust:

Oh there is. It's called CMake.

I know it sucks but fuck everything else. Just use CMake. Just do it and stop complaining. Any C/C++ project without a CMakeLists.txt is considered a bug and should have an issue filed over and over again until it's implemented.

7 hours ago
noaSakurajin
:cp: :gd:

A) cmake isn't THE standard it's A standard.

B) cmake isn't a package management solution it's build system with some tools for package management

Many projects are moving away from cmake for several reasons. poor package management and poor build isolation being some of them.

The closest thing to a standard system for finding and using c/c++ dependencies is pkgconfig. However it usually isn't present on windows and is not responsible for installing the dependencies only for announcing them.

If there was a standard C/C++ package management solution msys2 wouldn't exist.

7 hours ago
_a_Drama_Queen_

this last sentence is just wrong. msys2 has nothing to do with package management at all. it's an attempt to serve equivalent libraries (.dll) that may only exist on linux systems (.so) within the windows eco system. this is written on the website itself:

MSYS2 is a collection of tools and libraries providing you with an easy-to-use environment for building, installing and running native Windows software.

7 hours ago
noaSakurajin
:cp: :gd:

Yes that is the goal, however msys2 would be a rarely used tool if there was a single proper package manager for C/C++ libraries on windows.

it's an attempt to serve equivalent libraries (.dll) that may only exist on linux systems (.so)

That's not even what their own description even says. All of those libraries exist as pure windows builds, msys provides a streamlined way to fetch them and locate them on your system, like a package manager...

6 hours ago
ColaEuphoria
:c::cp::py::asm::rust:

Many projects are moving away from cmake for several reasons. poor package management and poor build isolation being some of them.

Do you have a list of projects that have 1) used CMake in the past, and 2) have then migrated away to something else, and 3) their stated reasons for doing so.

I'm not calling you a liar, but I can't help but call out your journalistic use of the weasel word "many" and "several reasons" here.

3 hours ago
noaSakurajin
:cp: :gd:

Well I personally migrated from Cmake to meson and I found a few other posts of people doing the same. For now most projects that adopted cmake tend to stick with it, unless the encounter serious problems (which I did, causing me to migrate).

The core reasons are the following:

  • more understandable syntax
  • easier to understand build scripts
  • better build isolation of subprojects
  • easier dependency management
  • better cross platform compatibility

These are the core reasons you hear from projects adopting meson or build 2. Yes by far most of them come from pure makefiles or autotools, but there are some that come from cmake.

Also in my experience meson tends to have faster setup and compile times. Due to the more sane syntax it also allows you to get started with a project more quickly.

49 minutes ago
MiracleHere
:gd::dart::hsk::rust:

X11 switched to meson. Actually a lot of projects have switched from cmake to meson.

3 hours ago
ColaEuphoria
:c::cp::py::asm::rust:

X11 never used CMake. They switched from autotools to Meson. I'm asking about projects that have used CMake and then migrated away from it.

Actually a lot of projects have switched from cmake to meson.

Could you list a few?

3 hours ago
SenoraRaton
:c::hsk::lua::rust::g:

https://conan.io/

It exists. Its not "standard", but then there will likely never be a standard C package manager because its out of the scope of the project and been that way for 40 years.

1 hour ago
noaSakurajin
:cp: :gd:

Well there is also vcpkg. Both do basically the same thing with minimal advantages over each other.

There is a chance C++ might get a package manager but C will never get an official one.

56 minutes ago
gufranthakur OP

I watch The cherno videos. He does C++ code reviews and in almost every code reviews, half of his video is fixing broken packages and CMake scripts. While I don't understand the errors on a deep level, it's what keeping me away from making C++ my primary language

7 hours ago
Cybasura

Personally I did C++ for awhile before I went into C, C has alot more control and is just better, and if you need OOP, just use C#, or golang

I guess rust is technically better than C++ but the community and the fundamental un-readable nature of the code - literally gave me a migraine that lasted for afew days - pushed me away after 2 months

6 hours ago
Sibula97

Rust isn't unreadable lol, just a little different.

Also, cargo (an actual standard for package management) is great.

6 hours ago
AdorablSillyDisorder

Arguably only strong argument in favour of C++ is templates - but it's also reason enough to use the language. I'm yet to find something comparable; various codegen/macro solutions feel much harder to write and use as you go.

And sure, it can be hard to learn and debug (those famous few-screens-long compiler errors), but when used right it's very pleasant to use, especially for unit testing - can easily do proper mocking/dependency injection while keeping dependencies resolved compile-time.

5 hours ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

I guess rust is technically better than C++ but the community and the fundamental un-readable nature of the code - literally gave me a migraine that lasted for afew days - pushed me away after 2 months

I mean the community sucks, and dependency culture sucks, but you can mostly avoid that by just not interacting with the ecosystem. And cargo makes bunch of stuff pain in the ass that’s easy in most C++ build systems, but once you figure it out, it’s not that awful.

But the language doesn’t really have a readability issue, it’s pretty easy to read… The syntax is just inelegant and approaching C++ levels of ugly… But C++ has the same problem, and lot of other languages like C# are even worse so I don’t think ugliness is ultimately what stops people from using something.

4 hours ago
ColaEuphoria
:c::cp::py::asm::rust:

What exactly sucks about the Rust community? I know that certain places like reddit and YouTube definitely have a level of circlejerking and evangelism, but when I'm looking through issues and pull requests on GitHub I just see people working.

2 hours ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

What exactly sucks about the Rust community? I know that certain places like reddit and YouTube definitely have a level of circlejerking and evangelism, but when I'm looking through issues and pull requests on GitHub I just see people working.

Evangelism is what I dislike in general. The dependency culture is bad (I want to punch through a wall everytime I see a “anyhow” dependency), there is also a lot of “invented in rust” even though it wasn’t eg. every time I see a rustacean claim that rust invented coproduct types I die inside a little.

And they wholesale adopt some of the dumbest memes from C++ community and repeat them ad naseum. Like I thought “Zero cost abstractions” has finally died and I would never have to hear that shit ever again, rust community successfully revived it and kept it alive for the last several years. They also invent new even more ridiculous ones “If it compiles, it works” is the one I keep hearing a lot and that one just drives me insane.

20 minutes ago
SenoraRaton
:c::hsk::lua::rust::g:

Look at this nonsense ->

pub async fn run_search<T>(
     args: CliArgs,
     cfg: AppConfig,
 ) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
 where
     T: for<'de> serde::Deserialize<'de>
         + HasTitle
         + HasYear
         + HasDetails
         + HasId
         + Eq
         + PartialEq
         + Promptable
         + Clone
         + Send
         + Sync
         + 'static,
     T::Details: HasRuntime,
 {
1 hour ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

I mean that’s not particularly bad, the worst thing here is the “de” for the serde lifetime, which for the record I think is a dumb name. Most of this is pretty obvious what it means… It’s ugly but readable

54 minutes ago
ColaEuphoria
:c::cp::py::asm::rust:

I had a similar experience but came to different conclusions. I started with C++ (technically GML but I wanted to learn a real™ language) and kept bashing my head with it on and off for a while until I completely burnt out with it and just went with C.

I stuck with C and got really good with it for about 10 years or so (and use C exclusively at my current job still) before I picked up Rust a few years ago.

Rust isn't an easy language but it feels less...bolted on than C++? It's hard to describe, but in a weird way I feel like learning Rust (and even Java to some extent) made learning the language features and concepts in C++ more approachable. I'll be thinking somewhat often "oh this C++ thing is like this thing in OtherLanguage™ just with clunkier syntax and more footguns. That's all."

1 hour ago
katyasparadise
:rust: :py: :cs: :c:

It's the reason I prefer Rust over C++. Cargo is so good.

6 hours ago
Shadowaker
:c::cp::py:

I hate Rust grammar, I deeply hate it

6 hours ago
katyasparadise
:rust: :py: :cs: :c:

It took few weeks to get used to it. If expressions are very neat tho.

6 hours ago
gufranthakur OP

If you mean the rust syntax, same. Although im still trying to code more and get used to it, it's a great language

6 hours ago
Shadowaker
:c::cp::py:

Yes, sorry

6 hours ago
ColaEuphoria
:c::cp::py::asm::rust:

To be frank, if you're able to, I would generally avoid C++ in this day and age anyway.

6 hours ago
awsfs

I have never ever installed something with Cmake and not had 1 million errors and had to fix them, c and c++ package management is the most garbage of any language

5 hours ago
ColaEuphoria
:c::cp::py::asm::rust:

I honestly think the lack of a de jure build and package system will be the downfall of C/C++ more than any of the footguns or warts in the language syntaxes themselves.

5 hours ago
Spaceshipable
:sw:

I quite like Conan

7 hours ago
AtomicPeng

If it wasn't moving so slowly, was less opinionated and had anything actually resembling a healthy package index (conan-center-index is a joke tbh), yeah, maybe. At least they don't use JSON for their configuration files.

5 hours ago
Gabriel55ita
:j:

Never going back after trying Meson

41 minutes ago
Cybasura

Just do it and stop complaining

And this is why C has such a fucking bad name, because of people like you

6 hours ago
Ayjayz

Yeah the world needs more complaining

53 minutes ago
Shadowaker
:c::cp::py:

Makefile is better

6 hours ago
Gorzoid

Java has a standard dependency management tool? Maven and Gradle would disagree

3 hours ago
tRfalcore

Ant has ivy

2 hours ago
romulof
:cp::py::js::j:

Ages ago Apple tried something with those .framework folders. Did you hear about it?

4 hours ago
Shadowaker
:c::cp::py:

Divided by languages, united by "Chat, please fix"

Until it deletes the db because vibe coding bad

7 hours ago
gufranthakur OP

Sure!, here's the revised code without the changes you told me to exclude!

Includes the changes I told it to exclude

7 hours ago
reallokiscarlet

When you said "Chat, please fix" it made me think of a programmer streaming on twitch, asking viewers for help.

6 hours ago
gufranthakur OP

Same lol

6 hours ago
katyasparadise
:rust: :py: :cs: :c:

Java is so boilerplate and outdated

First appearence dates:

  • Python: 1991
  • Java: 1995

🤔

6 hours ago
MinosAristos
:py: :ts: :cs:

Python started with Python 3 in 2008, the other versions are... something else

6 hours ago
Sibula97

Python 2 was fine for its time and purpose, but I wasn't a fan of it. Python 3 though, especially more recent versions, that's the good stuff.

6 hours ago
aspect_rap
:ts:

I can also make java newer by arbitrarily choosing a later version of the language as the starting point.

4 hours ago
ReadyAndSalted

I suppose their point is that python did a pretty deep and breaking change at python 3, effectively re-inventing itself to shed its bloat.

15 minutes ago
MinosAristos
:py: :ts: :cs:

Choose any starting point, you can't make Java seem modern

4 hours ago
aspect_rap
:ts:

Spoken like someone who's only knowledge on java is seeing some code example based on java8 and formed his entire opinion on the language on it.

4 hours ago
Dotcaprachiappa
:s:

Fair enough, but I've never seen someone using anything other than python 3, Java 8 on the other hand..

4 hours ago
PityUpvote
:py::rust:

You've never seen anyone use python 2.7? People were just starting to switch in 2018.

2 hours ago
Forward_Thrust963
:py::cs:

can confirm, still using 2.7

1 hour ago
ofnuts
:j::py::bash:

Just shows how good it is 😎

4 hours ago
ZORO_0071

I think the controversy should end at this point

6 hours ago
Prof_LaGuerre
:py:

You don’t blame the screwdriver for being a bad hammer if you fail to understand how to use the tool correctly.

6 hours ago
gufranthakur OP

✍️✍️✍️🔥🔥🔥

6 hours ago
ZeAthenA714

If a screwdriver required as much shenanigans to screw something as Python does to use it, I would happily screw things with a hammer instead.

4 hours ago
nextnode

Does that even happen nowadays? Seems like a 2010's thing

7 hours ago
dosadiexperiment

Happened to me last week. Depends what stuff you try to use.

Not that java is actually any better. "Write once, debug everywhere", as we used to say.

7 hours ago
gufranthakur OP

Ironically JavaScript is becoming the "write once run everywhere"

7 hours ago
anotheridiot-
:g::c::py::bash::js:

Until the build breaks for no reason.

7 hours ago
gufranthakur OP

It works on my local host tho

7 hours ago
anotheridiot-
:g::c::py::bash::js:

works_on_my_machine.png

7 hours ago
[deleted]

[deleted]

7 hours ago
gufranthakur OP

People love to hate on Maven/gradle because it's slightly more difficult, only to realise it works way better than pip and npm. If "difficult to use = bad" then rust would've been hated, contrary to its current state

7 hours ago
imforit

the biggest issue I have is when a package is in pip, figuring out what it's called in conda (if it exists).

7 hours ago
nextnode

What do you use conda for nowadays?

7 hours ago
imforit

data science. I'm using prebuilt base containers and that's what it uses.

7 hours ago
knightwhosaysnil

strongly recommend shifting off of conda or just using it to install a better dependency manager. Was nothing but trouble for our DS team until the SWE team showed them the light of UV

7 hours ago
anotheridiot-
:g::c::py::bash::js:

uv my beloved.

7 hours ago
imforit

Heard, friend. That's the beauty of containers is the moment it doesn't work I can throw it away! Using NVidia's containers. adding whatever we need in top has been easy enough.

I am curious what specific horror stories people have. I'm seeing the horor but deeply curious about the details 

3 hours ago
lolcrunchy

I use conda at work because IT's security settings break venv and uv...

6 hours ago
mavenHawk

It does because pip is still a terrible package manager. And the fact that it installs globally if you forget to activate virtual env is still a problem. Nothing 2010 about it

7 hours ago
Alphasite

Not if you’re using UV or Poetry. PiP is useless but there are legitimately good tools which make this a non issue.

6 hours ago
gufranthakur OP

Happened to me last week at work when I tried using tflite and some libraries and got mismatching numpy versions, spent a big while trying to fix it before giving up and taking an alternate route

7 hours ago
liquidmasl

just use uv, its a godsend

7 hours ago
gufranthakur OP

We had to run it on a debian-dockerised container inside of a Toradex controller. We had limited options

7 hours ago
cemanresu

I spent literally entire weeks just last year on untangling a dependency nightmare caused by some random ass cryptography library, some openssl libraries, and some conflicts way upstream of those

7 hours ago
gufranthakur OP

Python is actually incredible if you are dealing with maintained packages from good contributers and companies.

Java on the other hand, I have used some really old and outdated swing libraries that were last updated a decade ago and they still worked with my app. I was amazed

7 hours ago
Bob_Dieter

Not a Java dev, so could be wrong, but isn't Java known for its 12 page long error traces? Sounds a bit like the pot calling the kettle black.

7 hours ago
gufranthakur OP

Yep. But the error is stated right at the top, with the exact exception (if it is) which makes it easier to catch it in a try and catch statement

The "long errors" don't make sense because no one is gonna tell you to scroll down and read it all. The exception, why it occured, and the line number are all at the top in most cases.

The long errors do get annoying when you get multiple exceptions at the same time, which means that you're doing something very wrong to get multiple exceptions at the same time

6 hours ago
Sibula97

And with Python you get the same thing (exact exception, etc.) at the bottom of the trace, you know, the part you see on your terminal screen while the top of the stack trace is somewhere up there you need to scroll to.

5 hours ago
Bob_Dieter

This. Plus, you get an exact highlight of the source line that causes the exception. Honestly, this sounds more and more like a python W.

5 hours ago
nobody0163
:c::cp::cs::py::ts::asm:

I have never had any issues with just pip and no one i know has had any issues with pip.

7 hours ago
gufranthakur OP

That's good to hear, pip does work in some general scenarios but the moment you use some non-mainstream library you really need, it starts to break down. At least for me, and my colleagues at work

6 hours ago
Fiwexila

Use uv

6 hours ago
romulof
:cp::py::js::j:

I was away from Python for about 10 years and it was quite disappointing to see how things did not evolve.

NPM and Node module resolution is ages ahead of Python.

- “Oh, but node_modules is huge”

- “bla bla bla left-pad”

These are just testaments of how great is Node’s module management.

4 hours ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

I mean sure npm is probably only the second worst package management solution after pip… I would probably take CMake over either of these and CMakes package management is always a guaranteed source of severe mental distress. That’s how bad they are compared to every other ecosystem…

3 hours ago
romulof
:cp::py::js::j:

How do you organize a super fragmented ecosystem?

Make dependency management and build system almost like another programming language.

3 hours ago
j03ch1p

have you ever tried uv?

2 hours ago
romulof
:cp::py::js::j:

Yes, but there are multiple competing standards, multiple ways to do the same thing.

Even the most recent attempt of standardizing the lock file went down when uv said they won’t be using it (this info might be outdated).

2 hours ago
Slow_Ad_2674

I have been developing using python for over a decade and never had any of these issues. What are you guys developing?

6 hours ago
No_Issue_7023

python -m venv .venv

source .venv/bin/activate

pip install -r requirements.txt

Yeah it’s a real struggle

7 hours ago
arpan3t

Check out uv.

uv init

uv add package

uv run main.py

Either way, idk how ppl are having package management issues with Python these days.

7 hours ago
ShimoFox

I'm almost positive it's people who don't use venv and then get mad that they can't get the older versions of packages in their live system due to version requirements of other packages.

Venv is a lifesaver. And I think JS folks are just too used to npm defaulting to the current directory without the -g global. Whereas pip defaults to global.

I use both js and python in my work a lot. And I've watched the people on both sides complain about the package management of the other side. Lol. But the truth is, they both have issues that the power users just forget are issues because they're used to working around them.

6 hours ago
anotheridiot-
:g::c::py::bash::js:

Not compatible with your python version, sorry.

7 hours ago
nabagaca

UV venv --python {version}, or alternatively if the repo has .python-version, it's set automatically

7 hours ago
Sibula97

Better yet, use a pyproject.toml file.

5 hours ago
wutwutwut2000

uv init will automatically set up a project.toml file with a build backend and version requirements

5 hours ago
Sibula97

I meant the .python-version file, you should define the Python versions in the toml as well.

4 hours ago
wutwutwut2000

uv init does that automatically too. 

2 hours ago
Sibula97

I know, I use uv myself.

2 hours ago
the_other_brand
:j:

Oh, running this on Windows? Screw you here's an obscure error instead of a clear message telling you the library only supports Linux/Unix systems.

(This was every major AI Python library until 2023)

7 hours ago
AdmiralQuokka
:rust:

"running on Windows"

closed as user error

6 hours ago
anotheridiot-
:g::c::py::bash::js:

Baka user.

6 hours ago
gufranthakur OP

You forgot an argument? Here's the exact implementation of it in it's underlying C implementation! (But hey it does tell you the exact error at the end of the error log, thanks)

6 hours ago
gufranthakur OP

Ah, should've used python3.9 instead of python3.12

7 hours ago
HiniatureLove

Nah. This just didnt work for me at all. I literally had to go to pypi and download each whl and manually install each dependency after wrestling with the company proxy because for some reason, pip could not find any modules that are compatible with the environment. I m guessing some funky settings on uat/prod servers by the network team.

7 hours ago
dasterix

Package libobscurev3.2.1 is not available on your OS

6 hours ago
breakarobot

Right. If a dev doesn’t remember this then plz don’t be on my team.

6 hours ago
jameyiguess
:g:

Strawman. None of this is real in Python if you just use a venv... 

I don't mind Java, BTW.

5 hours ago
fryhenryj

Sometimes you dont have the luxury of using a virtual environment. Sometimes you are stuck on whatever version of python is available and whatever environment the system has access to (eg Kodi Vs xmltree = 😞)

4 hours ago
reallokiscarlet

Do you like janky syntax, supply chain attacks, and abstractions that depend on C?

That is to say, are you a python user?

Consider the crab language.

6 hours ago
gufranthakur OP

I am still trying to get used to its syntax. Although I wanna use the crab language the syntax just makes me want to quit it

6 hours ago
reallokiscarlet

It takes a lot of getting used to. I've messed with crab before but when picking it back up I struggled with the syntax nonetheless.

Like, when to let mut and when not to let mut. Sometimes, when you make a variable with a long lifetime but assign it in a smaller scope, you might get a warning or error for initializing it as mutable because you only use it after assigning it later. And if the program believes it's only ever going to be mutated once, it might just expect you to let it uninitialized and make it immutable. This can also create a warning or even an error, depending on the situation.

So then you make it immutable, only assigning it once and never mutating it afterward... Until you add more code and suddenly you're mutating it. Then you have to go back and make it mutable.

And that's the *tip* of the iceberg.

Still, after using it a while, I really think it could make a good python replacement, especially if the python version of your program was gonna ship as bytecode or a binary with the python code and interpreter jammed in anyway.

6 hours ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

Like, when to let mut and when not to let mut. Sometimes, when you make a variable with a long lifetime but assign it in a smaller scope, you might get a warning or error for initializing it as mutable because you only use it after assigning it later. And if the program believes it's only ever going to be mutated once, it might just expect you to let it uninitialized and make it immutable. This can also create a warning or even an error, depending on the situation. So then you make it immutable, only assigning it once and never mutating it afterward... Until you add more code and suddenly you're mutating it. Then you have to go back and make it mutable. And that's the tip of the iceberg.

None of this is syntax related tho? Rust is ugly… But this is all about semantics and actually the correct way to handle them anyway, there is nothing to struggle with… Like the complicated parts of rust all live in proc macros and combination of async and lifetimes.

Still, after using it a while, I really think it could make a good python replacement, especially if the python version of your program was gonna ship as bytecode or a binary with the python code and interpreter jammed in anyway.

I mean rust and python are basically diametrically opposed. The only sane reasons to ever use python is that it has great standard library and really fast iteration speed. You use rust for everything else the language has to offer in spite of having a standard library that kinda sucks and iteration in it being painfully slow even in comparison to something like C++.

3 hours ago
reallokiscarlet

None of this is syntax related tho?

In full disclosure, it was all I could think about lately because it's been driving me crazy. I could go down a long list of syntax weirdness but a lot of it boils down to "why do I need to write a novel to make this work"

iteration speed

Well now I know one thing I don't need to test in my program. Kinda sucks given matching and iteration are actually pretty fun in crab. It makes parsing things pretty easy, but it makes a lot of things that would be easy in C++ super frustrating unless I just... Ya know... Enter unsafe and drop to C.

2 hours ago
gufranthakur OP

Rust is sadly never replacing python because the extremely vast difference in syntax and their use cases. It can compete, but never replacing it unless rust announces some ground breaking changes that completely changes the way we code in rust

5 hours ago
PARADOXsquared

I use whatever language makes the most sense for a given project. I've seen both spaghetti and well-written code in both Java and Python. The fight is imaginary.

7 hours ago
gufranthakur OP

Yeah lol. I've faced issues in Java and python, and rust, and JS, and C#. Every language is a pain if you dive deep enough. It's just pick your poison

6 hours ago
moradinshammer

I can write shitty spaghetti code in over 12 languages and can reinvent the wheel in all modern frameworks.

Ready for management

6 hours ago
gufranthakur OP

I can prompt 12 AI models with "fix it" and get even more broken features in more code files

Ready for production

6 hours ago
EconomyDoctor3287

Haha, that's so real.

7 hours ago
RamonaZero

Me in my cozy corner doing x64 Assembly watching all programming languages burn :0

6 hours ago
gufranthakur OP

Just curious, what do you use assembly for currently? I was thinking about trying it for fun but never tried it

6 hours ago
Flimsy_Meal_4199

I like java

I love python

Dep mgmt is tremendously uncomplicated 99% of the time and once you dig under the hood a few times it's very concrete and predictable.

That said my local machine (personal desktop) is a disaster area loool I need to rip my installations out and re do it

6 hours ago
realqmaster

Just a friendly reminder that Python is actually older than Java.

5 hours ago
SoftwareSource

Java stack traces may be long, but if you cannot find where the error is and how it moves from it, the problem is you.

5 hours ago
northparkbv
full stack web dev, i guess :p::j::py::vb::msl:

Java 21 has 2 lines of boilerplate now

5 hours ago
jamiejagaimo

Long live Kotlin.

4 hours ago
fryhenryj

To be fair doing something like installing all the modules for python gui setup without an environment manager like anaconda to manage all the conflicting dependencies is truly painful and you will break everything.

But on the other hand curly braces, nah.

4 hours ago
theirongiant74

I heard that you liked Factory
so I put a FactoryFactory in your FactoryFactoryFactory
So you can FactoryFactoryFactoryFactory while you FactoryFactoryFactoryFactoryFactory

4 hours ago
AaronsAaAardvarks

I've never understood how the whole FactoryFactory joke was about Java as a language. Isn't that just a development pattern that everyone is welcome to not follow?

1 hour ago
oclafloptson
:py::js::ts::j::cp::c:

Why do anti Python memes always reference bullshit that's not really an issue for anyone other than first month students

4 hours ago
SleeperAwakened

Because that's exactly the same for all other languages as well.

4 hours ago
usrlibshare

The last time I had a dependenc problem was...yeah, wait a sec...ah yes, before containers became a thing 😎

7 hours ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

Because needing to ship better half of linux userland, buch of esoteric machinery to configure C groups and user permissions and depending on the underlying platform entire linux vm is a sign of a language that doesn’t have dependency management problem.

3 hours ago
usrlibshare

is a sign of a language that doesn’t have dependency management problem.

Pretty sure I never said that.

Pythons dependency management is a mess. So is its handling of multiple interpreter versions and isolation of runtime environments. I am merely stating that there is a widespread, easy-to-use way around these problems.

And besides, thanks to the good folks who make uv even managing dependencies directly on the host system is nowadays a far cry from the PITA it used to be.

3 hours ago
Bryguy3k
:c::py:

You know the number one sign of a disorganized dev who doesn’t know what they’re doing? Crying over package dependencies.

Keep your shit clean and organized bozos.

And if you use conda then you deserve the pain - that is a disaster of a project.

7 hours ago
gufranthakur OP

Yeah sorry, It was my fault for not knowing that x package was using numpy 1.8.9 and y package was using numpy 2

7 hours ago
lehvs

Requirements.txt has left the chat.

4 hours ago
no_brains101

Im not a big python user but acting like dependency management is much easier in java is a little silly.

4 hours ago
magick_68

I would love to have Java stack traces only 10 layers deep. But that explains millions of stack traces in Java apps. Java developers don't look into log files.

4 hours ago
SleeperAwakened

With the well known logging frameworks you can do this yourself.

Java supplies you with the full stack trace, you can decide what and where to log.

And Java devs look into log files if they do the ops part as well, which is common for DevOps.

4 hours ago
Mediocre_Check_2820

I've been using Python professionally for about 8 years now and I've got to say that you guys complaining about all of these errors are really just telling everyone that you are bad at using Python rather than saying anything substantial about Python. I can only infer that Java is some kind of beginner friendly baby's first language if you're holding down a job as a Java dev but can't even manage a Python venv or figure out how to resolve a ModuleNotFound error without breaking down in tears lol

3 hours ago
linuxdropout

I thought node_modules was bad until I encountered python dependency management.

Utterly insane.

2 hours ago
Xaxxus
:sw:

It always amazes me how people love all these languages with all this bad tooling/env setup.

Meanwhile you have languages like rust, go, swift that you can pretty much get up and running with a single command to fetch all your dependencies.

6 hours ago
L4ppuz

It might be because you can build a CNN in an afternoon with like five imports and python

5 hours ago
gufranthakur OP

Rust and Java always amazed me with their library management. I love cargo and Maven. Haven't used swift tho

6 hours ago
UdPropheticCatgirl
:c::ftn::sc::rust::cp::elm:

Meanwhile you have languages like rust, go, swift that you can pretty much get up and running with a single command to fetch all your dependencies.

Rust and Go, those I get, but there is none who can convince me that the swift build system isn’t giant pain in the ass, which involves ceremony after ceremony to actually get going.

3 hours ago
blackscales18

never had those problems so skill issue?

7 hours ago
gufranthakur OP

If you don't mind, what projects have you created with python as the primary language?

7 hours ago
blackscales18

Mostly computer vision, wrote the backend for my masters thesis with it for web based ar

6 hours ago
gufranthakur OP

Ah, nice

Developed on windows? I had a fairly decent experience on windows with python.

But on embedded Linux I just face way too many issues, and it's always pip and some dependency issue

6 hours ago
blackscales18

I did the dev work on windows but deployed on Linux (and eventually WSL b/c aws pricing sucks for gpu) so I have experience with both, including getting cuda to work. One of my hobby projects involves running a VLM from source so I can pull out the image embeddings, which was kind of messy too, but I didn't have any package issues that were hard to fix. I did have some trouble with the versioning of the data annotation tool I used b/c it was old but setting the version worked. I had more trouble with packages for the frontend (react js and threeJS)

5 hours ago
ZORO_0071

Ah, so you're blaming Python because you couldn’t handle dependency management on embedded Linux? Bro, that’s not a language issue, that’s a you didn't read the docs issue. Python didn’t fail — your setup did. Try using venv and poetry before throwing shade, champ.

6 hours ago
gufranthakur OP

https://developer.toradex.com/linux-bsp/application-development/machine-learning/building-machine-learning-software-with-reference-images-for-yocto-project/

"Read the docs" yes my friend, the docs asked me to run the code in python. The docs made me install certain libraries and they didn't work out, I had to make them work. You should at least know python and C are preferred for embedded Linux, and most documentation suggest it. If you're gonna come at me, at least come with proper facts, rather than a reply copied from chatGPT 🙃

5 hours ago
ZORO_0071

Blaming the language instead of learning how to handle it just proves my point

5 hours ago
gufranthakur OP

I think you completely ignored what I said in my comment lol

4 hours ago
ZORO_0071

I just didn’t see the point in blaming a language for stuff not working in embedded linux everyone who’s done serious embedded work knows things break no matter what language you use.

4 hours ago
gufranthakur OP

Have you worked in embedded Linux? If so what work?

4 hours ago
ZORO_0071

Don't act like you’re the only one who reads docs.

5 hours ago
gufranthakur OP

I never did, it was you who thought of that, I don't read docs in the first place 😄

4 hours ago
im-cringing-rightnow
:cp::py::unreal:

If you are struggling with that list you are way way WAY too green to even start joking about other languages...

5 hours ago
Alontrle

Haha Java homies rise up. I've created my own library over the last 8 years that handles all my boilerplate stuff. If I want to store a POJO in a file I just add @JsonManager("file_path.json"). There's other formats as well..

Then you just do XillaAPI.getObject(YourObject.class, "id")

And I use maven for dependency management myself.

4 hours ago
gufranthakur OP

My man 🤜🤛

4 hours ago
NoahZhyte

Managing Gradle and maven is actually much more a mess than python dependencies that are really easy to manage with tool like uv or pyenv

5 hours ago
Defiant_Recipe_5624

Tell me you are new to python without telling me you are new to python.

5 hours ago
NoWriting9513

I'm fine with some shit talking but come on, these are issues that no python dev encounters past their first month with the language.

But I mean I understand. In Java you need the first month to write all the boilerplate for the damn thing to even build.

5 hours ago
Anru_Kitakaze
:py::g:

Is that the thing from 2010's?

Skill Issue

bash uv init uv venv --python 3.12 uv add yourmodule

If it's hard for you, you are either a first year student or it's better for you to quit software development. Give up. You can't handle a few cli commands

Or you can proceed to code using Java 8 in the cave idk

Btw, using conda is a skill issue too

7 hours ago
gufranthakur OP

It's a thing from 2020's

ragebait

Post controversial meme in a meme subreddit Rage bait people People get rage baited

If it's hard for you to understand this, you are either new to the internet, or its better to get off meme subreddits. Give up. You can't handle a reused joke

Or you can proceed to get angry at all the obvious rage baits

Btw, not getting a joke is a skill issue too

7 hours ago
Anru_Kitakaze
:py::g:

Taking seriously any reply with "skill issue" is a massive skill issue. Another proof this post worth nothing, even as rage bait

Ez uncovered

7 hours ago
gufranthakur OP

I would slander you more but you also have the Go user flair. I'll let you off with this one.

6 hours ago
psaux_grep

Like Java devs have never tried getting the right maven dependency or fought with the JVM trying to figure out why shits foobar.

All languages have their foibles, but language x > y jokes are 95% unfunny. And then there’s PHP.

5 hours ago
landsharkxx

Cope and seethe

7 hours ago