Announcement
Collapse
No announcement yet.
Python 3.12 Released With Linux Perf Integration, Performance Improvements
Collapse
X
-
Originally posted by szymon_g View Post
out of curiosity, as a non-developer- how is that solved in other interpreted languages?
Python really isn't built with this in mind, there are too many holes to plug. While something like wasm on the other end of the spectrum can't do anything outside it's own memory and code by default, everything else has to be explicitly exposed to it by the host program.
- Likes 1
Comment
-
Originally posted by timofonic View Post
What about this?
https://docs.rs/constime/latest/constime/
- Likes 1
Comment
-
Originally posted by timofonic View Post
What would you suggest? Perl? Haskell? Lua?
As a language to embed for scripting within another application?
Well, Perl is shittier in every way.
Haskell is known by too few, mostly in academia, it is not mainstream and for scripting you would want something with broad appeal that is commonly known, so that would be Python.
Lua offers better performance than Python so if that is important, then Lua is a good choice, but Python is known by more people.
If you didn't ask for a suggestion for a language to embed, then for system-level programming I would suggest Rust or Zig. For application and business applications I would suggest C# on the .NET platform.
Don't get me wrong though, I am not saying that you shouldn't use Python or that Python is horrible and that it sucks. I find myself coding in Python too, and there are things to like about it too, I am just saying that Python has a couple of weak points, and things that I wish were better. Other languages got drawbacks and warts too.
Just a couple of days ago, I started writing a new Python script.
Originally posted by partcyborg View Post
I agree this sucks, but given that classes aren't strongly typed in python I don't think it would be possible to write a generic deserializer.
Originally posted by cl333r View Post
What's your opinion about Zig (the programming language)? I just found out about it.
Now you cant compare it to Python because Python is a high-level interpreted language while Zig is a low-level, compiled system language so you would have to compare Zig with C, C++, D and Rust.
Zig is way nicer than C.
If you have coded in C then you should defeinitly check out Zig, it is great!
If you're into low level programming and systems programming then you should definitely check out Zig, it is great!
If you're into high level languages like Python or JavaScript then while Zig is good, it might not be something you would appreciate because it is not as easy.
But if you like Python then do Python. I've criticized Python some, but I am not saying it is an all bad language or that other languages are better. Other languages got their warts too.
- Likes 2
Comment
-
Originally posted by Weasel View PostThe worst in this aspect. Nothing comes close with its dependency hell and versions.
I haven't used Perl much recently either, but I think it is pretty bad too. They got like CPAN, something very old.
Then there is JavaScript where you use Node.js and if you want to fetch one little dependency you'll end up with 100k files in your node_modules directory.
Then you have .NET Framework where in larger solutions with many project references you could end up with dependencies that had incompatible version requirements so would end up with runtime crashes that you had to track down and attempt to solve with BindingRedirects, it was hell. Modern .NET (since .NET Core, not .NET Framework) is great though.
Originally posted by geearf View Post
I too have always enjoyed writing stuff in python (well apart from working around the GIL, and what I thought was a very ugly async syntax, but I think that may have been fixed since), but is this still true today vs Go and alike? These languages too are pretty simple but they are quite faster.
Personally, I don't like Go though, mostly because of minor things though that has to do with syntax though, such as you have to put functions that belong to a struct outside of the struct instead of within the struct. Oh, and how the code formatter doesn't want you to have any space between braces or brackets.
Originally posted by szymon_g View Post
out of curiosity, as a non-developer- how is that solved in other interpreted languages?
I haven't worked much with embedding scripts in other applications so I don't know much about it.
I have limited experience only with having my Python application running Python scripts and it is not secure, those scripts can do anything on the system and modify and do anything within the application it runs.
- Likes 2
Comment
-
Originally posted by uid313 View PostI haven't used Ruby much, but we had to use it briefly at work and we experienced dependency problems with RubyGems, so we moved away Middleman written in Ruby to Hugo written in Go.
I haven't used Perl much recently either, but I think it is pretty bad too. They got like CPAN, something very old.
Then there is JavaScript where you use Node.js and if you want to fetch one little dependency you'll end up with 100k files in your node_modules directory.
Then you have .NET Framework where in larger solutions with many project references you could end up with dependencies that had incompatible version requirements so would end up with runtime crashes that you had to track down and attempt to solve with BindingRedirects, it was hell. Modern .NET (since .NET Core, not .NET Framework) is great though.
The problem with Python is so big it even created "virtual environments" to solve this problem, somewhat. Problems that stem not just from libraries that have conflicting versions (e.g. X works with Y version 5, but not 5.5, while another one needs Y 5.5), but also python itself (e.g. 3.11 vs 3.12 may be totally incompatible with some dependencies and packages), venv store even the python executables. It's disgusting (and I know first hand from trying to setup various AI workloads, which for some reason they all use python, and it's the worst nightmare I ever had with anything so far in my life).
.NET is bad, mostly because it supplies each independent minor version of libraries/deps, but at least you can mix and match them, unlike in Python. It's more bloated though (as in disk space), which is also disgusting.
Comment
-
Originally posted by schmidtbag View PostI've had more of such issues with PHP. I haven't had them with Python - either stick with your distro's repo or use pip. Of course, maybe with Windows it's a bit harder.
Comment
Comment