[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / 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.jpg (8 KB, 296x445)
8 KB JPG
Remember when the world was still sane? Back in the 90s, anyone unironically using interpreted languages like BASIC was instantly laughed out of the room. Real devs only wrote in C and Assembly.

What the hell happened to this world that a glorified 90s BASIC clone is now more popular than C++? What happened to people?

> browse github for a cool projec
> tlook inside
> 100% Python bloatware
> "bro just pip install 2GB of dependencies to run a hello world script"

It literally makes me sick. Where did we go wrong?
>>
Yeah idk. If there is one thing I will stand on it is fuck Python. It's got such a bizarrely huge cult following for being useless for anything outside of toy apps. It isn't fast, it isn't compact, it was made for math and stats work, it's a joke.

I had a coworker at a job that tried to make us write a new microservice in Python despite our stack being .NET usually. It was a monstrous time. Would have taken 10% of the time with .NET.
>>
>boomers seething about everything.
wahhhhhhhhhhh
>>
>>109899249
You have to wonder how many years science has been set back by scientists who don't know the first thing about coding using Python. For example, it's quite possible that the Hubble tension is just some retarded bug in somebody's Python code.
>>
It's popular because the StdLib had care and forethought put into it, it's widely available on any Linux distro, and it steps up when bash scripting won't cut it or you need a RAD api endpoint for web APIs.

Also, holy shit, imagine being an application developer and bitching about python. Double my disbelief when you consider when Node.js exists.
>>
(((Dyanmic))) linking
>>
I know the only real reason you faggots hate Python is it's a cross.
>>
It's a great scripting language. People sometimes use it for projects where a scripting language doesn't make sense because it's extremely easy to read and write, but how is that python's fault?
>>
>>109899249
python like all programming is at its best when you rely on as little external dependencies as possible ones (or at least use "official and solid" ones like pyqt, wxpython, django, etc) instead of some DUUUDES random pypi project
luckily python has a fairly nice standard library which is more than most languages

distribution still sucks tho its basically package for each distro on loonux / use flatpak or pypi and use pyinstaller for everything else

>>109899285
I use bottle.py for small websloppa. Its quite limiting as your basically locked into REST & forms (has no concurrency support so no websockets) but thats likely for the best. Its really fast to develop tho and the whole "web" part of your application gets out of your way so you can focus on the business logic. Bottle has no dependencies of its own so its basically a standalone python script (bottle.py is a single python file). Idk any other web frameworks in any other languages that can do that.
Then I use django for big websloppa.

>>109899495
This. but I will instantly switch to any similarly high level language with actual static typing and a similarly sized stdlib. No I will not use nim, yes I could use C++
>>
>>109899249
>Python is the worst thing to ever happen to the tech industry
You have 5 mistakes in a word "India"
>>
>>109899632
A cross from what?
>>
python the language is mostly ok, it has some quirks from its age.
it's worst sins come from its implementation like the transition from 2 to 3, and how venvs are just copies of all the python binaries and libraries.
>>
File: IMG_2360.jpg (5 KB, 360x359)
5 KB JPG
>>109899754
God of course. Faggots hate it and thus hate Python.
>>
its OOP, you can literally do in python what you can in C#, Java etc... and apply their paradigms, patterns
>>
>>109899249
Python is the only good language in current use. It's intuitive and ez. Every other language has too much faggot boilerplate verbose bullshit. Python is closest to modeling the way I naturally think about and describe things. Everything else is for codemonkey nerd faggots.
>>
>>109899495
seriously I would kill for a language like C with the python standard library
>>
>>109899666
Digits of the Beast are totally correct. There are a lot of real problems outside the hot path that are best-solved with a scripting engine, and not everything is game dev or end-loser gui software.
>>109899467
>You have to wonder how many years science has been set back by scientists who don't know the first thing about coding using Python.
Basically zero.
Every virtually scientist using Python is using it as a scripting engine on top of software written languages like C, C++, Fortran, and CUDA, that handles the performance-sensitive elements. I have seen this pattern over and over and over again in scientific computing.
>>
>>109899937
No, but you would kill yourself if you had that.
>>
I’d you don’t build your own physical gates from scratch you are a nocoder
>>
File: python logo.png (46 KB, 320x256)
46 KB PNG
>>109899249
Anon, that is not the official python logo.
>>
>>109899249
Not as bad as Rust
>>
>>109899467
Hey Bro, let me tell you about how your profession works.
- /g/
>>
>>109899249
Python's crappy, but it isn't the worst, not when there's PHP and Javascript about.
>>
>>109900253
Fair, but one of those languages got runtime type hinting, and thenother tosses all typeing out the window suring transpiling.
>>
>>109900253
Modern PHP is pretty great, types even get enforced at runtime. Which is more than can be said for Python’s type hints or typescript.
I’d use Laravel for webshittery if I didn’t have so much rails muscle memory.
>>
>>109899249
>> "bro just pip install 2GB of dependencies to run a hello world script"
what do you thing glibc is
>>
>>109899249
Things like this are really industries fault because anything that would actually gatekeep turbo normies from entering programming like assembly, C, or Lisp would be a nightmare to corporate America's bottomline, it was basically just inevitable that they were going to dumb everything down if programming ever became big. The only thing we can do now is mostly enjoy it as a hobby sadly.
>>
>>109899768
>venvs are just copies of all the python binaries and libraries.
This is very convenient from an OS scripting perspective. It's a very nice design. Most everyone I see complaining about this are the ones trying to misuse python for application development. Either they are expecting a static language style development environment, or they are coming from the absolutely fucking insane swamp of Javascript and don't understand why they can't just sweep all their dependency bullshit under the rug.

(The real problem is that Pypi isn't vetted for shit and there's still plenty of transitive dependency problems. Not half as bad as Javascript but it's still bad)

>>109899919
>>109899937
Odin is great. Odin is basically "Pascal but actually usable for serious work, where you might otherwise use C or C++." No fanatical idealism like Rust and Zig. Not a strict hardcore language like Ada. Not a complex heavy-metaprogramming language like Blowlang/Jai and Nim. It has a "batteries included" philosophy from python where they tried to implement a very useful core library as well as building in a variety of officially-supported bindings for bundled 3rd party software. No need to install a gazillion crates just for one simple CLI tool.
>>
File: 1789624797731754.jpg (176 KB, 1206x1497)
176 KB JPG
>>109899285
>I had a coworker at a job that tried to make us write a new microservice in Python despite our stack being .NET usually.
is not the whole point of microservices that you literally can do this?
>Would have taken 10% of the time with .NET.
maybe you are not using microservices correctly then?
>>
>>109899699
>This. but I will instantly switch to any similarly high level language with actual static typing
mypy
>>
>>109899249
You are right for the wrong reasons. Scripting languages are useful, but Python despite its popularity, is not a good language.
>>
>>109899249
It's using C and C++ libraries internally for the heavy lifting so the difference isn't as great.

Just use whatever AI wants to. If the perf isn't achievable you prompted it wrong.
>>
>>109900961
Python is a great language for scripting when you want a batteries-included approach in a well-provisioned environment.
>>
File: 178934007322846.png (190 KB, 1228x1150)
190 KB PNG
>a couple paragraphs
>a few lines of markdown quotes
>a final line asking a question
/g/ is so retarded that it can't spot this AI generated thread?
>>
>>109899249
dont care it just werks
>>
>>109900167
I personally crush my own sand to make my silicon :)
>>
>>109901346
No, its not.
>modules are a nightmare you don't know what you are importing and can override globals
>you can assign a variable and then your module goes away
>can tell when an imported module is a function, a sub module, a class or anything
>everything is a dictionary retarded philosophy of interpreters cause a serious downgrade in performance
>GIL
>>
>>109901471
>>modules are a nightmare you don't know what you are importing and can override globals
??? no it does not

>>you can assign a variable and then your module goes away
dont assign variables to the name you import
>>
>>109901482
>??? no it does not
yes it does, are you retard?
>import * from mymoduledino
>>
>>109901504
you have no idea what you are doing if you ever import *
dont do that
>>
>>109901534
>blames the user
Not my fault, chud.
>>
>>109901471
>modules are a nightmare (You) don't know what (You) are importing and can override globals
>(You) can assign a variable and then (You)r module goes away
>(You) can't tell when an imported module is a function, a sub module, a class or anything
Skill issue: the post.
>muh performance/GIL
You say "scripting languages are useful" and then prove through complaints you have no idea what the overwhelming majority of scripting problems look like.
>>
>>109901672
It's literally your fault. Python is a piss-easy language and you don't have the bare minimum level of competence to use it. Your opinion has no value.
>>
>>109901672
I think the only time you would ever import * is if you are using some tool like scapy
the use cases of import * are one in a thousand
>>
>>109901672
>chud
Proof you're a faggot who only hates Python because it's a cross.
>>
>>109899249
>literally makes me sick

Someone needs to reassess their life choices me thinks. Have you considered not being a faggot?
>>
>>109899495
javascript is a much better language than python
>>
>>109901691
Oh the famous "Ad retardum" fallacy.
>Build a system that even a fool can use, and only a fool will want to use it. - George Bernard Shaw

>>109901704
Look pal, if it can cause problems then it should not exists but I guess it's the to get better performance in some cases by eliminating the module lookup so instead of "mymodule.function" (2 lookup) you only have "function" (1 lookup).

>>109901719
I don't hate it. But the language has some issues.
>>
>>109901782
>but I guess it's the to get better performance in some cases by eliminating the module lookup so instead of "mymodule.function" (2 lookup) you only have "function" (1 lookup).

from module import function

dont EVER import *
>>
>>109901819
Jesus, imagine doing that for 200 functions.
>>
>>109901829
are you legitimately using 200 imported functions/objects in a single .py file?
>>
>>109901782
Everyone with legitimate gripes about Python is facepalming, walking away, pretending they don't know you.
>>
Python has exactly two problems:
>dynamic typing
>slow
Anything else is fear of the cross.
>>
>>109901978
>>dynamic typing
basically solved by mypy
>>
>>109901989
>>109900385
mypy is NOT A SOLUTION!!!
types should be enforced by the complier/interpreter not some janky mypy/pyright/lsp crap you have to integrate with your IDE, with mypy and pyright having deeper/different analysis of the same types
if pysloppa had a --enforce-types mode then it would be solved
>>
>>109901704
>I think the only time you would ever import * is if you are using some tool like scapy
why? how is scapy structured that makes it practical?
>>
>>109902015
>crap you have to integrate with your IDE
you dont need an IDE
you just annotate your types and then run mypy from the terminal to check

you could use like a git hook to run it on commit or something if you dont want to run it manually

>>109902025
it is common to use it as an interactive tool and you want easy access to its objects like IP or TCP without having to prefix them with scapy
I have not used it in forever but it seems like you launch it with a helper-script in any case like `./scapy` and not `python3; from scapy import *` (or whatever).

but I imagine the helper-script internally runs something like from whatever import * to populate the global namespace with the stuff you would want
or it manually injects it into the __builtin__ dict or whatever it is called

it can probably also be used as a library in which case maybe import * is a convenient way to use it, not sure
bottom line is that the times when import * is the right choice is extremely exceptional
>>
>>109902052
>it is common to use it as an interactive tool
oh, i see. i never thought of doing that when i was doing SQL stuff in the repl
>>
lel, k tard. assembly is interpreted too.
>>
>>109901978
It's slow because everything is a dictionary.
>>
>>109901978
>Python has exactly two problems:
>>dynamic typing
This isn't even a problem. It's just a feature that can be helpful or harmful depending on the conditions.
>>
>>109902208
every post you make is stupid, you should stop for your own good.



[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.