sorry js fans, but python is what an interpreted highlevel language should be
Python
Welcome to the Python community on the programming.dev Lemmy instance!
π Events
Past
November 2023
- PyCon Ireland 2023, 11-12th
- PyData Tel Aviv 2023 14th
October 2023
- PyConES Canarias 2023, 6-8th
- DjangoCon US 2023, 16-20th (!django π¬)
July 2023
- PyDelhi Meetup, 2nd
- PyCon Israel, 4-5th
- DFW Pythoneers, 6th
- Django Girls Abraka, 6-7th
- SciPy 2023 10-16th, Austin
- IndyPy, 11th
- Leipzig Python User Group, 11th
- Austin Python, 12th
- EuroPython 2023, 17-23rd
- Austin Python: Evening of Coding, 18th
- PyHEP.dev 2023 - "Python in HEP" Developer's Workshop, 25th
August 2023
- PyLadies Dublin, 15th
- EuroSciPy 2023, 14-18th
September 2023
- PyData Amsterdam, 14-16th
- PyCon UK, 22nd - 25th
π Python project:
- Python
- Documentation
- News & Blog
- Python Planet blog aggregator
π Python Community:
- #python IRC for general questions
- #python-dev IRC for CPython developers
- PySlackers Slack channel
- Python Discord server
- Python Weekly newsletters
- Mailing lists
- Forum
β¨ Python Ecosystem:
π Fediverse
Communities
- #python on Mastodon
- c/django on programming.dev
- c/pythorhead on lemmy.dbzer0.com
Projects
- PythΓΆrhead: a Python library for interacting with Lemmy
- Plemmy: a Python package for accessing the Lemmy API
- pylemmy pylemmy enables simple access to Lemmy's API with Python
- mastodon.py, a Python wrapper for the Mastodon API
Feeds
Pythonβs major pro is its simple, straightforward syntax, which excels at data handling. This has made it popular with novices of all shades [β¦]
For first-timer coders, Python is easier to learn, understand, and adapt than many low-level programming languages [β¦]
Is python being easy to learn actually true? I can see it being easier than low-level programming. But there's other alternatives like C# and Java that certainly seem much better and easier to me. Especially when you consider the ecosystem around only writing code.
Plus, the Python language is a steadfast feature in the desktop Linux software landscape. Itβs preinstalled on most Linux distributions, boasts extensive library support, and can be used to fashion very cool (as well as very basic) Qt, GTK, and other toolkit UIs.
It's certainly available, and more readily available on Linux. The whole v2 v3 mess was lackluster. But I guess preinstalled is convenient, and more accessible than installable Java or whatever.
I've never seen JavaScript or Python popularity as evidence or correlating with actual qualities. More with a self-promoting usage. Python was being used in science, then in AI, then AI became popular. To me, it seems like a natural propagation consequence more than simplicity or features over other frameworks and languages.
Is python being easy to learn actually true?
In my experience teaching C to non computer science students It should be. They struggle a lot with variable type and the strict syntax in general, tokenization , etc, but specially ;
and {}
.
They are more visual so I think the forced identification of python helps and they can see to which block a line of code belongs and also it is easy to think one line one statement. When they forgot a semi-colon it is hard to explain that it became one logical line with the next one.
Is python being easy to learn actually true?
I've never found this to be true, I think that's partially because I don't find Python to be very fun to write in, so I don't enjoy it very much, so I don't learn new things about it very quickly.
Were just waiting on WASM to be able to access the DOM APIs directly, and then all languages will be first class citizens on the web, and then RIP JavaScript.
Is that even a stated goal? I swear we've been waiting for that to exist for the better part of a decade. It would solve so many issues and comes up in every discussion about Javascript, yet the powers that be seem to have zero interest in pushing this forward.
Delphi will be back, baby.
I don't think so - Javascript doesn't have to ship its language runtime so it will always have a size advantage.
You don't need a language runtime if your program has no runtime, right? A rust or C program is just the program, no runtime.
Well they still have runtimes, but yes they can be pretty minimal.
You're still shipping a load of libraries that come for free with JS though, e.g. with Rust WASM string formatting and unicode support always ends up being annoyingly huge, and that's built in to JS engines. There's also collections (Map
, Set
), etc.
As for data science using Python, something tells me that this has to do with memory heap capacities. I'm not sure about Python's max memory heap, but Javascript through Node.js seems to have only 512MB. I've been using Node.js to deal with big datasets and my most recent experimentation stumbled across the need of loading 100 million numbers to the RAM: while my PC has a fair amount of physical RAM (12GB) and a great part of it was available, it'll simply error when filling an array. I needed an additional parameter, --max-old-space-size
, so Node.js could deal with such amount of data. I didn't try the same task with Python because I'm used to Javascript (yet I'm done some things in Python), but I wonder how much memory can Python hold until an error like "out of memory" happens, because ML models (for example, those hosted and served in HuggingFace) loads training weights with dozens of GBs
Ok after reading the article this is bullshit. It's only because they are counting JavaScript and Typescript separately.
Typescript being that popular is great news onto itself.
We have different concept about what great news is.
Compiling to an interpreted high level language is crazy. I just refuse to believe we haven't got a better solution to yet.
Don't worry, they're planning JS0 and JSSugar (IIRC) so you're forced to compile anyway :D
As someone who works with typescript daily, you're not wrong. It's an extremely overcomplicated glorified linter that tries and mostly succeeds in catching basic type errors. But it also provides false confidence when you concoct something that shows no errors but doesn't behave how you expect.
eeew (/s)
I have a dislike for both of them. Well, for JavaScript mainly the server-side part. I'm fine with it on web scripting, where it's the only native one.
Snakes, why did it have to be snakes?
Every time I open a js file from some project I have to tweak to use on my website, I get a brain aneurysm. that shit should never have been invented. python in the browser is the dream we are not allowed to have.
ps: I am just a hobbyist ! so take it lightly.
Idk, my only experience with python is that any app written in it doesn't fucking work, throwing some esoteric error that has nothing to do with the error at hand and then me needing to look up what unholy specific version I need and manually setting up an environment for it. I dread the day when I'll want to try some random project and yet again the only way to run it will be some shady ass python script.
JS is pure crack and has no right being the backbone of the web, but python is borderline unusable in my experience.
I avoid anything written in Python. It's not the language at fault it's the ease of entry so you get a lot of low quality software.
U are not wrong.
Dependency management is tough and often frustrating. Dealing with resolving dependency conflicts is unavoidable. This area is a constant focus of development, so could see improvements over time.
Some packages to keep an eye on:
pip & setuptools
pip-tools (specifically pip-compile)
https://pypi.org/project/pip-compile-multi/
poetry
Any others i've missed?
The new king on the block: uv
. It can do everything poetry
does, while also using a standard pyproject.toml
(no more weird ^
), and it'll handle the Python version for you, so no faffing about with manually installing anything. Just uv sync
and off you go!
Downside: not compatible with virtualenvwrapper, as it'll force its .venv in the local folder.
It's also still under heavy development and breaking changes are still expected, but it's already super nice to use.
Same guys (Astral) also made ruff
the formatter/linter that they intend to eventually integrate into uv
, IIRC.
I'm running all my personal projects under uv
and am having a blast. It's so fast.
Somebody should write a python to javascript transpiler for the web...
(please don't actually do that)
There's a Python WASM runtime, if you really want to run python in a browser for some reason...
Thank god, Javascript is a mess.
Iβll still plug Scala for having the beauty of Python, the ecosystem of Java, the correctness of Rust, the concurrency of Go, and the power of Lisp.
I code both typescript and python professionally, and python is almost as much of a mess, just a different kind of mess. The package manager ecosystem is all over the place, nobody is agreeing on a build system, and the type system is still unable to represent fairly simple concepts when it comes to function typing. Also tons of libraries just ignore types altogether. I love it, but as a competitor to JavaScript in the messiness department it's not a good horse.
They ignore types all together because typing is optional in python.
All documentation is optional and ignored at runtime, that doesn't mean you shouldn't do it. If your library doesn't have type hints I'm just not gonna use it, I don't have the time to figure out what you accept or return.
anything else > python > JS
Also some projects are using web assembly to make frontend python frameworks such as this one https://github.com/kkinder/puepy
Edit: wrong project