[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: python.png (51 KB, 694x702)
51 KB
51 KB PNG
>>
>>106714470
its not a great programming language, but its a great tool
>>
>>106714470
It certainly does. Love me some Python.
>>
File: 1525962625947.gif (124 KB, 400x480)
124 KB
124 KB GIF
>>
>>106714470
i cannot understand any scripting language. i mean, where the fuck is the main function?
>>
yea it's comfy but sucks that microsoft's lsp is properietary
>>
>>106714470
>no static typing
I can live with it I guess
>>
>>106714523
It's optional.
#!/usr/bin/env python3

def hello(greeting='Hello, world!'):
print(greeting)

def main():
hello()

if __name__ == '__main__':
main()
>>
>>106714529
Then don't use it
>>
>>106714523
main functions are largely pointless. if you're in a situation where you need one just define one. honestly of all the gripes people have with python this might just be the dumbest I've heard in a while.
>>
>>106714662
debugging scripting langs is literally a cancer if you try to develop a serious software with them. have you tried?
>>
>>106714694
also performance issue of course
>>
>>106714477
I've made good looking gui apps with it.
>>
>>106714694
use enums, and type hint everything. Put validation everywhere. Log debug everywhere. Seperation of every piece of logic

there you have it, problem solved
>>
>>106714645
I don't but I'd like to, I complain because it doesent't work on VSCodium even
>>
>>106714470
Anyone bother with type hinting?
>>
>>106715154
You're talking about Pyright, right? Isn't there a "community" version or mirror you can install with pip?

>>106715168
Always whenever I write Python.
>>
>>106714470
>it just works
literally unusable before uv was a thing
>virtual environments
>poetry
>pipx
>anaconda
>jupyter notebooks
>docker as a dev env
truly dreamt up by the criminally insane
>>
>>106715168
yes because if you make a variable call "file" and you don't type hint its ambigous. It may be refering to a filebyte object, string, Path etc...
>>
>>106714523
in pythons case it's the first line you write that is not a function
>>
>wrong version of python
>dependencies are not compatible with others
>pip removed working version and installed some other version
Most of the time I try to run python projects, they don't work.
>>
>>106714470
give it a year or two, and chances are the same code will not work.
python is literally the worst mainstream language in that regard.
i've been burnt by this myself because i decided to use a python-based build system for one of my projects, and a random python update broke it (might have been 3.12).
>>
>>106714470
I only use python for simple tasks like decoding hex values, quick math, and cleaning up directories. What do you guys actually use this language for?
>>
>>106715624
its where most of the ml libraries are at sadly
>>
>>106715565
you should never use update obsessed software, that's always a red flag
>>
Python is a scripting language, and you make scripts with it. if you are using it to develop a website, no matter what framework, you are retarded
>>
>>106715973
So the people who develop Instagram, Reddit, Pinterest are retarded? lmao
>>
>>106716082
exactly. python is pretty slow and if all of these were made in a proper language then they would be faster. i guess all of these companies have millions of $$$ so they can afford python being shit.
>>
>>106716082
NTA, yes. Personally I think its a hindsight thing. When they developed those things, dynamic typing were new and likely all the rage and fast for prototyping. These days its proven to be shit
>>
>>106716114
it doesn't matter, spa websites are slow by convention
>>
>>106714470
It's shit but companies have invested several countries's GDP worth of money into making libraries for it (yet they had to rely on some literal who's startup with a Rust toy to fix the atrocious package management) so you have to use it. Be either Tensorflow or Puppeteer or Spark, or whatever.
>>
>>106716114
>>106716176
What projects have you built where python performance was not enough, how many concurrent users did you hit?. No docker/kubernetes, just python and a web server.
>>
>>106716176
>Spark
Just use Scala bro
>>
>>106716213
Isn't about performance is about maintaince. Like 90% of the time where performance matters Python is an API to call a C or C++ or FORTRAN library where everything important is being computed, you won't ever hit a bottleneck by the language itself if you use it for CRUD operations either, but Python code ages poorly. 6 months for now a project may need a rewrite.
>>
>>106716276
so, you haven't built anything lmao.
>>
>>106716213
I don't want to waste my server's resources to begin with, no matter the userbase.
>>
>>106716398
>>106716368
>>
>>106716426
I don't want to waste my server's resources to begin with. Let me repeat that- to BEGIN with. Even if I have 300 users, I still don't want to code it in a shitty slow scripting language.
>>
>>106716458
have fun building your 10 concurrent user app in c++ kek
>>
>>106716826
Why would I ever use C++? PHP is dead simple to write. I could also use Ruby if I wanted. These languages are a good compromise between the shit that is Python and writing C++.
>>
>>106716876
>ruby
>php
you don't even know what are you talking about kek
>>
File: 1758741125949617.jpg (40 KB, 504x495)
40 KB
40 KB JPG
>>106716938
PHP is faster than python, you don't know what you are talking about
>>
>>106716964
enjoy getting pwned
>>
>>106716876
>good compromise
its a different flavor of shit and just as hard to maintain
>>
>>106717012
>php is insecure
if you are using PHP 5.6, yes
if you are using 8.4 and you aren't writing shit code, then no
in fact, the site you are using right now runs on PHP, and it only went down because it was using PHP 5.6.
>>
awful language all around
>>
File: julia-vscode.png (32 KB, 1024x685)
32 KB
32 KB PNG
>>106714470
the the only good thing about Python is the syntax in the imperative part of the language.
the OO syntax is shit. the double underscore syntax of the built in functions looks like shit.
Guido purposely left out any usable functional programming features
Python has the worst package management system ever, I dont see how any intelligent person can take pip and venv seriously, its horrible to work with.
Python is just a toy language that hooks people with deceptively simple looking syntax
its an out of date language that can never be upgraded or fixed
its slow as shit

anyone with any kind of intelligence has moved on to Julia
>>
>>106715973
You use scripting languages to write websites(or any other i/o bound app), you nigger. What is JS? PHP? Ruby? Scripting languages... You're the dumbest, most retarded gorilla nigger I ever seen.
>>
If I ever have to work for food and do webdev again I'd rather work on the most boring Java project than any Python/Django hell. It's that bad

https://www.youtube.com/watch?v=3cNeatFn3q0
>>
>>106717762
you shouldn't
maybe js but only because google spent a fortune making a fast runtime for it
php is fully retarded, ruby is the slowest language ever to exist, python is second slowest
>>
>>106715208
no, Pyright works. MS builds on top of it
>>
>>106715132
3d or 2d? what lib do you use?
>>
>>106714470
it werks but terribly
>>
>>106717906
this. pretty much the idea guy lang but can't make a proper application
>>
>>106717891
PHP le fast scripting language
Python le slow scripting language
>>
>>106715234
What's a good language that got a sane dev env on their first try? Aside from C
>>
>>106718715
>sane dev env
>C
C has no package manager, nor dependency management. It effectively and practically does not have any "dev env".
>>
>>106718715
Go and Rust are pretty ok
>>
>>106717852
Years of programming language development and Java is still the most preferrable choice
>>
>>106714529
>>106715208
>>106717898
https://docs.basedpyright.com/latest/
thank me later



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.