[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 / qa] [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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1715681730287917.png (133 KB, 1064x893)
133 KB
133 KB PNG
>simple and easy to learn
>slower than languages from the 80s but speed is free now so "muh speed" is irrelevant now
There's a reason MIT starts with Python
>>
>>103224410
I do use it when I have a use case but most of my personal programming outside work is either js to tweak my browser (userscripts) or shell scripts for personal utilities.
>>
Rust suits my needs better. I replaced every bit of python scripting I had back in 2016-17.

It's way too slow and a complete pain in the ass to manage dependencies/deployment. The people in charge of python package management are absolute retards who are incapable of solving problems.
>>
>>103224410
they lost me with python3
>>
I use it for basic scripts, but anything beyond that and problems become painfully apparent.
>>
>>103224410
Simple on the surface, intractable mess beneath. Interop with more performant languages is clunky. Dynamic typing is a mistake and the white space based indentation is poorly executed. The gentle initial learning curve and massive number of libraries are nice. And list comprehension is cool, even though it’s also botched (you should be writing [f(x) for x in y for y in z] instead of [f(x) for y in z for x in y])
>>
>>103224478
Same, Python3 wasn't worth using until 3.4 and most packages I used weren't usable until around 3.6. There were a lot of issues with breaking changes between versions that I just got fed up and stopped bothering.
>>
The only reason why MIT should start with Python is to show how shit shouldn't be done. Then you're off to learning C.
>>
>>103224504
I do prefer seeing at least braces in code as visual indicators of logical blocks. Maybe if I became more python-brained the whitespace would start to look like blocks.
JS without semicolons bothers me too, even though they're optional I always put them in. It's like grammar in writing.
>>
>>103224410
I am.
But I don't use it for EVERYTHING.
>>
>>103224543
I look more for the indentation than the braces even in languages that have them, since that’s how everyone formats their code anyway. Not that I think this is a big deal, either one works just fine and it’s more about familiarity than anything. Kinda same with semicolons, I’ve used languages with and without and the line change is typically the actual marker where the thought ends.
>>
>>103224583
> I look more for the indentation than the braces even in languages that have them, since that’s how everyone formats their code anyway.
I guess you don't have to work with any boomers. Guy on my team is like 55 and I swear he must use notepad or something with no auto-indent and just hits space and tab randomly like some kind of OCD tick.
>>
Don't see much reason to use it. I dislike it more than even JavaScript and doesn't help that most Python code out there is written in so retarded manner that it simply actively puts me off

there is no reason to use classes in Python, EVER
>>
>>103224593
Oof, yeah I don’t. I mostly work on research code where the biggest hassle is to convince people to use variable names with more than three letters
>>
File: 1000000684.jpg (3 KB, 125x107)
3 KB
3 KB JPG
>>103224410
Why would I

I'm a twine guy using sugarcube

Topkek
>>
>>103224609
dataclasses are one of my favorite python features.
Especially useful when dealing with pandas.
>>
File: RA.jpg (115 KB, 971x1200)
115 KB
115 KB JPG
>>103224410
Pyhton and C is all you really need. Python to get things done fast, and C to get things done right. Throw in bash to work and assembler if you're working directly on the processor/ micro controller or for really crucial timing and this is literally as good as it can be.

Especially C++, C#, Haskell, Pascal and Fortroons niggers don't need to apply. Yeah, it's not better or safer or faster than C. It's just that you learned programming at Pajeet's Youtube School of Coding.
>>
>>103224410
Because there is no forwards nor backwards compatibility. Easy means python users are retarded and create retarded projects so you need pyenv and venv for every fucking thing. Want to run a project?
>your python3 is too old
>your python3 is too new
>you need 3.9.5, you can't use 3.9.4 nor 3.9.6
>>
>>103224848
Venv is not a huge blocker to productivity. The only issue I’ve ever had with python is indentation
>>
>>103224699
python is for paejets too
white men use perl
>>
>>103224699
>Pascal
don't you dare shit on Pascal
>>
>>103224880
you got filtered by the tab key?
>>
A lot of nocoders in this thread
The advantages of Python are much harder to see if you don't write any code
>>
>>103224410
>simple and easy to learn
Which is exactly why I avoid it, it's a normie magnet, only for retards who want to larp as programmers.
>>
>>103224410
>>slower than languages from the 80s but speed is free now so "muh speed" is irrelevant now
retarded or bait
>>
File: defold_logo.jpg (8 KB, 225x225)
8 KB
8 KB JPG
>>103224410
Because Lua.
>>
>>103224410
>speed is free now
Not when you have a billion rows
>>
File: 1730388121211429.png (363 KB, 828x683)
363 KB
363 KB PNG
>>103226821
>>
>>103226858
okay, well what are you doing with a billion rows?
>>
>>103227867
basic daily work in a manufacturing facility? why don't you have a billion rows?
>>
>>103227924
I don't think you'll ever need 1b rows in memory, will you? Have Python call your db, and get the subset of data you need. 50 million rows is nothing to worry about, and all you'll likely need
>>
>>103224410
1. It's dynamic typed
2. It's slow
>>
>>103228079
yes but youre assuming things make sense in an enterprise. reality has 20 retarded layers of security that only get in the way of productive work
>>
>>103228153
>reality has
not my problem
>>
>pip install
>no candidate for package
>>
>>103224410
>4 times slower than php
>20 times slower than js
>75 times slower than c
>>
>>103229131
the thing you want to minimize is

(developer time)*(developer hourly rate) + (expected number of times run)*(runtime)*(cost per appropriate time unit of compute)

for a lot of things, python wins hands down because you get fast feedback and bultin general purpose data structures.
>>
File: 1717101882808.jpg (49 KB, 896x491)
49 KB
49 KB JPG
>>103229131
cite 'em
>>
>>103229189
the c number is about right based on my experience. depends on what youre doing, of course
>>
>>103229203
I'm gooning
>>
>>103224410
>but speed is free now
>>
>>103229214
with ascii art?
>>
>>103224410
i am. did you just discover it?
>>
>>103229241
with Lisa Su
>>
>>103225316 (OP)
I like Python, it's the best language for getting shit done along with JS, Java and C#.

C++, Rust, Go trannies can btfo.
>>
>>103229189
i've seen 100-200x+ speedups on scripts rewritten from python to rust and c
>>
File: 1655871565279.jpg (72 KB, 604x555)
72 KB
72 KB JPG
>>103229277
i regularly speed up my jeet coworkers python scripts by that much because theyre fucking jeets and shouldn't be allowed near computers.
>>
>>103229131
Oh no, my Python code to analyze and modify a neural network graph for better edge inference is a bit slow.
Oh wait, it actually doesn't matter at all. And if it ever does, eventually a code monkey will go through what I wrote line by line and rewrite it in C++. Or maybe Copilot will do it.
>>
File: 1611494852170.png (35 KB, 552x511)
35 KB
35 KB PNG
>>103229374
hi anna. how is single motherhood treating you?
>>
>>103229374
>he thinks "analyze and modify a graph" is data science
next time try not to fail out of CS, i see the upper level courses stumped you
>>
>>103229359
you can easily hit cases where your data and processing doesn't dip into some c fast path so it takes a long time to do something even if you do it the proper way. python is shockingly slow in a lot of cases with 1 to 1 translations to other languages
>>
>>103229430
Oops, meant for >>103229395
>>
>>103224410
I use Python quite a bit (several projects I'm currently supporting use it) and I hate it.
I double hate how easy it is to make horribly slow and flaky code in it, even though it does mean I'm definitely going to be in work until retirement.
>>
>>103224410
Go is as simple without the performance cost.
>>
>>103224520
Dude get a job.
>>
File: 1611494777186.png (38 KB, 552x571)
38 KB
38 KB PNG
>>103229430
she got a masters degree from the university of texas. i keep trying to tell my texan friends that their universities are jokes, but they don't listen to me.
>>
>>103224410
What benefits does Python have that JavaScript/Node.js doesn't?
>>
File: 1725638676595953.png (65 KB, 374x272)
65 KB
65 KB PNG
>>103229572
it isn't js
>>
>>103229611
Pretty sure JS is faster though
>>
File: 1620918547868.jpg (43 KB, 520x589)
43 KB
43 KB JPG
>>103229658
this thread has established that if you are using python you don't care about speed
>>
>>103229572
>Better syntax
>Better standard library
>Better type casting semantics; does not assume that programmers are morons who don't know that numbers and strings are different
>Better C/C++ interop
>Better ecosystem of fast numerical libraries (Numpy, Pytorch etc)
Javascript is the result of a race to the bottom between different browsers in the 00s competing to accept as much broken and poorly written code as possible. It should not be used for anything.
>>
>>103229675
I would remove floating point operations from that pic because everyone always focuses on them (most languages have the same behavior) and pretends to ignore the other examples.
>>
>>103229675
>>103229695
If somebody doesn't like implicit type conversion, they could just not use variables of different types with operators.
>>
File: 1631738799959.jpg (63 KB, 796x718)
63 KB
63 KB JPG
>>103229715
feel free to remake it. i picked it up from /g/ many years ago
>>
>>103229787
Anon, the pic in >>103229675 is not about how implicit type conversion is bad. It's about how Javascript is bad.
What if I do like implicit type conversion? This still makes no sense:
9 + "1"
"91"
91 - "1"
90

This can only be described as a bug. And implicit type conversion bugs are really dangerous because they will quietly work 90% of the time, until they don't. Which is the entire philosophy that Javascript built on, and why it works that way. It's not acceptable for anything outside of webshit.
>>
>>103224662
they are ok
I mostly dislike the unnecessary class based separation of things when you have perfectly fine file based encapsulation of things available
>>
>>103229838
File-based encapsulation is not fine. The users of your library don't and shouldn't care which file within the library a value came from.
>>
i do use python when i need what somebody else wrote down in c or c++ for it.
>>
>>103229820
I agree that "+" shouldn't have been used for string concatenation. Everything else though is stuff that would never actually be a problem (except for the floating point stuff but that's not a JS problem).
>>
>>103229675
You should never use an equality test on floating point numbers in the first place.

Perhaps you should avoid weird edge cases and write code that makes sense in the first place.
>>
Python is nice but for my use case Elixir+Phoenix is much better. I also programmed like 10 years with python and django. Still like it for the trivial stuff.
>>
What should I program me myself
>>
>>103229923
or, we should all get in a line and kick bill kahan in the junk as he walks by. ieee754 is fucking retarded.
>>
>>103224410
Not doing data science. So it doesn't really matter which scripting language I use. They are all samey.
>>
>>103224464
>The people in charge of package management are absolute retards who are incapable of solving problems.
But enough about Rust
>>
>>103224699
>Pascal
I used Pascal on my Amiga in the 90s. I recently looked at some code I'd written and I can't understand any of it.
>>
>>103230071
I've a better plan: we just kick (You) in the junk instead. What's more, I think I can get funding to make that a reality! Getting paid to do something I'd happily do for free: that's the life!
>>
File: goated.png (36 KB, 1137x814)
36 KB
36 KB PNG
>>103224410
>Why don't you use python
Because I'm white and use picrel
>>
>>103230565
i know all about 754. i've been fighting its retardation for the last 20 years. bill kahan is an asshole. and if you think testing fabs(x-y) < tol is the "right" way to test for foating point "equality", so are you
>>
File: IMG_0097.gif (38 KB, 618x640)
38 KB
38 KB GIF
>>103224410
>why aren’t you using python
I am.
>>
>>103230721
How else would you do it?
>>
>>103230813
x-y suffers from cancellation. you can have the result of x-y in ieee754 come back as zero when it is actually a huge number.
https://en.wikipedia.org/wiki/Unit_in_the_last_place
>>
>>103224410
>Why aren't you using Python
but I AM using it. it's a very versatile language and my go-to choice for anything that doesn't require another platform for some specific reason. most of the time you can get more than enough performance out of it, especially if you know your way around numpy.
>>
File: apu_celebrate.jpg (73 KB, 1000x712)
73 KB
73 KB JPG
>>103229572
a type system
>>
>>103229902
you're still using python at the end of the day. all things considered it's piss easy to write some code that does a thing in C++ and then compile python bindings for it, which then lets you use it without the hassle of having to write C++ again.
>>
>>103230935
yeah but then you have to deal with boost and the whole being a tranny thing
>>
>>103230966
trannies like you always use esoteric bs languages because they're 0.001% better at some schizoid metric some faggot invented in a paper published back in 1958

python is as heteronormative as they come. it does the job and that's that, GIL and all.
>>
>>103230983
I use C and python. Using c++ turns people tranny, ive seen cppcon videos
>>
>>103231011
What feature is common among C++ and Rust which makes its users remove their genitalia?
>>
File: 1731789930598979.png (18 KB, 1024x1024)
18 KB
18 KB PNG
>>103231023
i don't know if python threads pull them in like C threads do. hopefully we can get an answer before this thread 404s
>>
File: 1725123142940913.png (1.07 MB, 800x1300)
1.07 MB
1.07 MB PNG
>>103231011
C++ is a cishet white mans language.
>>
>>103224410
I use mojo
>>
>>103224410
>speed is free
what in tardation
>>
>>103231228
meme lang
>>
>>103224543
I too prefer seeing brestes.
>>
>>103231554
Faster than your snail lang
>>
>>103224662
>features
shoehorned in class decorator because built-in classes with the inane dunder methods is just unnecessary most of the time.
>>103224410
Guido has nothing but bad ideas and is surrounded by yes-men which helps make this truly one of the most miserable languages you can actually write code in.
>>
>>103231771
it was fine until the trannies pushed beaz, raymond, tim, and the other 2.x core devs out
>>
>>103231561
Python is plenty fast for anything you will do.
>>
I like Python. It is simple and easy to work with, and its package support is, as far as I know, unmatched. I never got why people use classes so much in Python until I put in the time to get a more decent undestanding of them. Now I always use them.
>>
>>103224410
I just don't know the use case. What do you use Python for? I'm sure that if you have a use case and Python makes it easier, you'll use it, just like some people use Bash, SQL, C, Rust, etc
>>
>>103224410
>>
File: 1646950994157.gif (820 KB, 420x544)
820 KB
820 KB GIF
>>103224410
>python
I was using it to make pixel detection auto clicker "bot" scripts for osrs. and I learned some of the basics in general. I stopped and it's been months since then. I feel like i'd have to start all over again.
>>
brotier tomboy pilotfu
>>
>>103224504
>And list comprehension is cool, even though it’s also botched (you should be writing [f(x) for x in y for y in z] instead of [f(x) for y in z for x in y])

It's done that way so that you can write multi-line list comprehensions. When each for loop is on its own line, it looks just like a normal for loop.

Otherwise, whenever you convert nested for loops to a list comprehension, you'd have to rearrange everything.

>>103224464
What scripting are you doing that requires speed?

Also, python virtual environments have been around since 2007, not sure what your problem is. Better yet, use docker.
>>
I have a Python class in college that I'm taking for some easy credits. I don't even go to class, I just fuck around doing random projects on my computer and that will probably be more than enough to ace the exam
>>
>>103224464
I did this too. I started using rust to see how bad it was and now I use it for everything.
>>
>>103236260
>Also, python virtual environments have been around since 2007, not sure what your problem is.
If they solved the problem, there wouldn't have been multiple competing solutions like pipenv and conda. They all suck

>Better yet, use docker.
So you know they're broken and act like they're not
>>
>>103236586
Literally all of Linux dependency management is broken dude, that's why docker is great.

I agree conda sucks ass.
>>
>>103224699
>shills python
>calls other langs pajeet
What?
>>
File: pepethon.png (44 KB, 320x256)
44 KB
44 KB PNG
>>103229189
https://www.youtube.com/watch?v=VioxsWYzoJk
>>
File: ok.png (96 KB, 400x300)
96 KB
96 KB PNG
>>103224410
The world would be such a good place if we only used one language.
and of course that language would be
C++.
>>
>>103237989
ywnbarw
>>
>>103230850
If that happens the mistake happened much earlier when for example lengths were measured in nm instead of km or some multiple of a characteristic length.
>>
File: 20230814_165050.jpg (2.25 MB, 2458x1997)
2.25 MB
2.25 MB JPG
should I not learn python ;w; I just gotta start something bros i'm ngmi....
>>
>>103234261
>What do you use Python for?
Scientific workflow engines that coordinate calls to some very large and complex solvers (that are mostly in Fortran and aren't my problem).
>>
File: freedom.jpg (138 KB, 800x600)
138 KB
138 KB JPG
>>103231011
A real C++ coder loves freedom and guns.
Those are rusters, saboteurs, trying to ruin the language with their mental illness.
>>
File: stop being retarded.webm (3.55 MB, 1360x752)
3.55 MB
3.55 MB WEBM
>>103229695
>>
>>103229675
always trips me up



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