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


Thread archived.
You cannot reply anymore.



Convince me to not take the Pythonpill
>>
>>71837186
It's pretty awkward to do concurrent programming in Python.
>>
>>71837186
python is slow as fuck to run
>>
why tf you need to be convinced? just stick with it if you like it and shut your stupid ass.
>>
>>71837220
t.pythonbabby
>>
I have nothing bad to say about Python
>>
Encourage bad practices and the "pythonic" style is gay.
>>
>>71837186
do it. put it all over your resume. Please I'm begging you. for the love of god push python to it's maximum so people will realize faster that it was destined to be a dead language from the start
>>
>>71837213
You can compile it to fucking machine code retard
>>
>>71837419
What bad practices?
>>
>>71837186
Is this pic a meme? Like how the fuck would you eliminate 5 jobs let alone 1?
>>
>>71837471
Not him but how would you do that? It seems there are only small projects hacked together. https://stackoverflow.com/questions/138521/is-it-feasible-to-compile-python-to-machine-code
>>
>>71837186
Suppose you want to write some simple tool to automate X task for your normie friends with a simple half decent interface, ideally allowing the tool to be cross-platform but without cross-compilation, or even better any compilation at all. Is it Python the ultimate language for this kind of situation?
>>
>>71837765
Yeah, probably.
>>
>>71837765
No, perl does all that and secures you a job if you obfuscate it well enough
>>
>>71837186
why does that nigger have a coax on his monitor
>>
>>71837207
really concurrent or actually parallel?
>>
>>71837186
I hate that monster flavor, it kind of tastes to mint or something
>>
>>71837186
Why do you doubt of python in first place?
Where do you plan to use it?
>>
What about using python for machine learning/neural networks? Don't tell me you guys use lisp
>>
>>71837527
by writing 10 lines of python script

did you even read the post?
>>
You'd have to get a job first before you can replace 5 others with Pyton.

The market is red hot for Azure/.NET devs right now. Python is more of a hobby for regular people because the positions that do require it are mid to senior and are almost always hired from within. This is just my perspective of course.
>>
>>71837471
its still slow as shit compared to c++ (or any other statically typed / non managed language)
>>
Python is rare in the sense that if you know ecosystem very well you can achieve so much without being actually very clever person. Basically more time you spend in this ecosystem the more capable you are. That is fair to me since not everyone was born gifted
>>
You take the scripting programming pill, a language is easy to learn if you know your way around a compiler and know basic English
>>
perl easier than Python
less data types
>>
>>71837220
this. works well enough for a lot of shit, if you ever get into topics where it starts becoming too inefficient you'll realize it by yourself and won't need anyone else to tell you.
and even then you can just replace the bottleneck routine with fortran or whatever.
>>
>>71840474
You just described all human technological progress.
>>
File: hue.gif (1.89 MB, 400x201)
1.89 MB
1.89 MB GIF
Python is just a shitty version of javascript
>>
>>71840577
Are you kidding me? Prototypical inheritance cluster fucks? Nigger, if I want a class (which I don't) but if I did - I would choose a class
>>
File: kets.jpg (165 KB, 1200x1000)
165 KB
165 KB JPG
>>71840577
DELET THIS RIGHT NOW
>>
>>71840577
Python is a lot older than JS you know
>>
>>71837207
>What is multiprocessing
>>
>>71840665
True, recent python also has coroutines and generators which are simple af to use. It's the whole 'async await' that you would use in Node / promises. theres also the more recent shit with multiple python interpreters. but that would fall more under parallelism than concurrency.
>>
>>71838525
>perl

lol
>>
>>71840609
javascript is new version of Python
>>
>>71837186
idk he is sitting in front of a television with a can of monster, he probably is doing a 24h fortnite stream or something
>>
>>71837207
>i dont know what concurrent means
>>
>>71837538
Look up Cython or Nuitka. C-like performance with rapid production is very useful.
>>
>>71840341
>Source: My ass
>>
>>71840267
Totally would, except the fancy C++ libraries that Python uses still haven't been fully wrapped.
>>
Python is babby noob shit for babies
>>
>>71837207
As a python user, this
>>
>>71837186
The userbase is full of autists who can't imagine that people have a use case that requires speed and minimalism. And low level programming in python is a bitch/impossible.
>>
>>71837765
Yes, that is what its best at.
>>
>>71845330
>The userbase is full of autists who can't imagine that people have a use case that requires speed and minimalism. And low level programming in python is a bitch/impossible.
You know that you can call C functions directly from Python, right?
>>
slap a diddie
>>
>>71845389
You know I can just do it all in C instead because at no point do I actually need any of the python libraries.
>>
>>71837765
JavaScript
>>
>>71845389
>speed and minimalism
Proof in point. Pythonfags are actually retarded.
>>
>>71841782
No, javascript is a new version of LISP.

And good lord it's way better.
>>
File: what.png (46 KB, 603x538)
46 KB
46 KB PNG
>>71837186
There is no reason not to. It's the defacto these days for admin scripting and it's even highly represented outside of that in areas where it shouldn't be.

Considering it takes a week to learn the syntax completely.. no reason whatsoever to not.
>>
>>71845406
Well, good for you, but I highly doubt that if you're not a systems programmer that you're never going to run into a situation where having an easy to use standard library with efficient implementations of algorithms to fit a huge variety of common use cases isn't going to reduce the time you need to either prototype or deploy something that doesn't need to rely heavily on low-level shit.
>>
>>71845406
rofl
t. neet
>>
>>71837213
>>71840341

If the execution speed is appropriate for the context then it's sufficient. In many real life scenarios, development and testing cost supersedes execution speed. This is something that the "muh compiled language" set can't accept.
>>
>>71845527
Yeah, too bad I run into that literally all the time.
You know, because my job is to actually do things that aren't already done by typing
>import library
>>
>>71845468
You sacrifice a little bit of speed for code readability. That's reality, there's no free lunch. In the ideal python deployment the difference in run-time is trivial compared to the difference in deployment time, ease of unit testing and debugging.

You sacrifice a run-time minimalism for flexibility, which again, greatly lowers deployment time. You don't have to reinvent the wheel for everything, and you can express your ideas in a succinct and clear fashion.
>>
>>71843435
Not him but it's common sense if you know the first thing about programming. While Python can indeed be compiled to C via nuitka, there is a lot of overhead and no optimization
>>
>>71845627
It also defeats the entire purpose. Also you're still just proving the point.
>I have need for X
>well you dont really need X so python is good enough!

Pythonfags are literal retards.
>>
>>71845602
Again, good for you.
Every use case you have for a language is so niche and performance critical that even prototyping isn't viable with Python's standard library.

The language just isn't the tool for your highly specialized needs.
>>
>>71845724
And that's my point. Python is fine, but people need to stop acting like it's always useful for everything. My needs aren't even that unique. Anyone that does low level or system programming has minimal use for python.
>>
>>71845758
You would think that people on a technical forum understand this and they just use the best tools for the job, like technically adept usually do. But we have this discussion here daily, multiple times. Incredible
>>
>>71837213
https://wiki.python.org/moin/PythonGames
look how many fucking games are written in python or big part of it
>>
>>71845696
Does every car need to accelerate as fast as a Ferrari, and be as minimal as a formula one?

Python isn't built for high-performance use cases. You can get performance that's good enough for a huge variety of use cases with it, but it's not some magic, universal language that's the best choice for everything. That language doesn't exist, and anyone that acts like their favorite language is that is lying through their teeth.
>>
>>71845879
C is unironically the best choice for everything except for brainlets who are incapable of using it properly.
>>
>>71838640
It's a television, not a monitor
>>
>>71845952
Man, I really hope you don't work on a team.
>>
>>71845952
the things that you code in C in one week are one day in Python
>>
>>71840590
But JS has classes.
>>
>>71845952
i would love to see some of your epic C projects
>>
>>71837186
Python is fucking shit. EVEN LUA performs better and is easier to use. C++ is far more usable and eons faster.
(mashes tab button 200 times to make 4 if() statements)
>>
>>71846109
Sure, its this little thing called the unix kernel.
>>
>>71846126
>(mashes tab button 200 times to make 4 if() statements)
?
>>> x = 0
>>> def start(x):
... if x == x:
... if x == x:
... if x == x:
... if x == x:
... print x



why the hell do you need more than if elif else in your code
are you a fucking nooby?
>>
>>71846203
Closed PR or it didn't happen.
>>
>>71846229
>Linux
>PR
pythonfags are so fucking dumb
>>
No
>>
>>71846211
you clearly have never done anything beyond "hello world" in any language
real-world control logic requires as many or more nested if() statements than you put in your pic
>>
>>71846281
Requires? No. That's just how shitty pajeets write code
>>
>>71846281
cringe
>>
>>71846248
Basically any proof, on github, that your code actually gets integrated into linux.
>>
>>71846126
>(mashes tab button 200 times to make 4 if() statements)
kek ever heard of IDE?
>>
>>71846281
and you want to say that your actually work with real-world scale projects or just copy and paste them or modify theme?
imagine 1000 teams of pajeets coding those if statements for you to work with
>>
>>71838525
Nobody creates new solutions in Perl and that makes it bad to find interesting jobs.
>>
>>71846310
Uh, yeah sure m8 I'll just dox myself by showing you stuff I work on for my job at fb's kernel team
>>
>>71837186
- Deployment across multiple system sucks without using something like pyenv.
- Performance of the language isn't scalable in and of itself, you need to use libraries written in C.
- Syntactic sugar lowkey ruins the "one way of doing things" mantra.
- GIL means you have a builtin bottleneck in terms of concurrent code execution. You can avoid I/O blocking but processing will always block.
- Mud can build a hut in a day, but it takes steel to make towers.
- Just because smart people use Python doesn't mean using Python makes you smart.
- At times the error handling merely yields unreadable stack unwinds with no meaningful message to what went wrong.

I actually like Python a whole lot though and suggest using it.
>>
>>71846345
Alright, so let's get this straight:
You work for fb's kernel team, but you don't understand that different languages suit different needs, and you actively spend work hours (assuming you're in the U.S.) shitposting on 4chan about it.
>>
File: 1561527229194.jpg (142 KB, 1200x900)
142 KB
142 KB JPG
>>71837186
>be intern
>have to setup system that takes test results and uploads them to jira in jabbascript
>jabbascript can suck my dick
>download python and write the script in 5 mins
>call python from jabbascript to avoid headache
>???
>profit
>>
>>71846381
Python is just a shitty scripting language. I understand the need for scripting languages but that niche has already been satisfied
>>
>>71838640
Sorry buddy but you have to be intelligent to post here.
>>71841782
Lmao@frontendkiddies
>>
>>71846339
kek, sounds comfy
>>71846330
>python IDE
i'll pass, i don't want to become gay
>>
>>71846426
>be intern
>given opportunity to learn JS
>make a big pajeet mess instead
Based. You're not getting a return offer though
>>
>>71837186
it's not a lisp dialect
>>
>>71846442
get back to work, zuckerbro
>>
>>71837207
Yup, the only things they give you is locks and queue. They advice against globals, so how are you gonna do a shared variables? Something I've tried to figure out for a long time.
>>
>>71846465
i learn stuff like other languages and frameworks on my own time. i go to work to get shit done. everyone offloads their shit on me because meetings are more important obviously. also, i already got an offer. js sucks and i want to use it as little as possible.
>>
>Python
>When you could be using superior Perl
$loling @ $you
>>
>>71843435
python is literally made in C retard, it won't be able to compete vs C/C++ in terms of performance natively
>>
>>71846776
>Js sucks
Yeah idk why /g/ needs to have such insecurities about this like /v/ does about consoles.

Not knowing Java can only hurt you.
>>
File: super-saiyan-2-goku.jpg (55 KB, 1080x720)
55 KB
55 KB JPG
facebook niggers are scare of me..... they believe that i can drop facebook by self, but they also said to me that i am not that important. too much incoherence in 2 years..... but i hope they delete all my persona data from their data base.....
>>
File: download.jpg (6 KB, 300x168)
6 KB
6 KB JPG
but a comment relater to the threat. Python is the best. easy and powerful. :)
>>
>>71837186
It's pretty good, but I'd pick Go over Python in current year desu.
>>
>>71847170
js is not java though but java (the lang) sucks too.
>idk why /g/ needs to have such insecurities about this
i'm not insecure about it. i just don't like using js. i'd rather use something like ruby for test automation. i want to kill myself whenever i use node/js.
>>
>>71845566

But doesn't the dynamic typing in Python cause more expenditure of testing?
>>
>>71845486
how is it a new version of lisp? I can't see much relation apart from clojurescript.
>>
>>71837186
the main strength of Python, in my opinion, is the libraries. whatever it is that you're looking for, there's a library for it. this makes it easy to put together a project with little to no effort.

start with version 3.6. it's worth learning - also there's nothing much to learn. it's very intuitive.
>>
>>71847393
if dynamic typing is gonna be an issue. instead of teting and type checking, try changing the code to use contracts.
you can also try, cython which has statically typed objects.
>>
>>71847366
What about it don't you like?
>>
>>71837186
Imagine writing nontrivial software in a programming language that fails on misspelled variables in the middle of runtime.
>>
>>71837765
That or Java. Depends on what you need.
>>
>>71846281
No. You ignorant wannabe pajeet.
>>
>>71848693
syntax is really retarded. even java is better in this regard. node modules are ass to work with but i guess you learn to work with them with time. debugging longer scripts sucks and there are plenty of those written by webdevs who don't know any other lang.
>>
>>71845500
this

I tried to write a bash script the other day and stopped and started over in python.

also powershell but people have been known to cry about that.
>>
>>71847034
Look at the stats. It outperforms C++ with most tasks because the C compiler optimises the python code so well. Retard. Why do you talk out your ass before checking?
>>
>>71850987
i was going to respond seriously to this but i'm just going to laugh
Why are python brainlets so egotistical, anyways?
Is it just that their language is for simpletons and they have nothing to do most of the time?

C++hads are usually too busy figuring out how to calculate something at compile time using esoteric template metaprogramming techniques like compile time state to waste time on ego.
>>
>>71845486
based retard
>>
>>71845566
This is wrong.
The majority of programs these days depend on fast execution. Take for example game engines, interpreters (like python itself), compilers, audio engines, embedded software, operating systems, drivers, renderers, etc.

Its just that people who write in python /high-level languages only know about "high level" applications (because that's all they get to make), so they don't realize just how important speed is for all the software that lies "underneath" their comfy IDE's and SDK's.
>>
>>71846753
from threading import Lock

shared_var_lock = Lock()
the_var = None

def var_mutex(func):
def wrapper(*args, **kwargs):
with shared_var_lock():
return func(*args, **kwargs)
return wrapper

@var_mutex
def set_var(set_val):
global the_var
the_var = set_val
>>
>>71845389
That moment when you wish there was a Python library for necking your retarded self
>>
>>71845627
>code readability

Imagine being this gay
>>
>>71845627
what about documentation?
>>
I have an irrational hate for python's syntax and indentation. I think I would blow my brains out if I had to use it daily. Thank you for reading my blog.
>>
>>71852899
For third party libraries, documentation is actually good. If you use Jupyter, VScode and other editors you can access the documentation while you're writing.
>>
>>71837186
>picture
reminds me of a guy I consulted for, except it was lua and about 50 lines
LUA
>>
>>71852702
That's why people use Python as glue so all the heavy work is done by C, C++, Fortran and so on.
>>
>>71851934
>I was going to respond to this but then I realised I have no actual understanding or argument
>>
>>71852702
None of those things are the "majority of programs these days". They're important, but only a tiny handful of people work on things like that. High level applications are by far the majority. That's why everybody uses high level languages that are well suited to developing them.
>>
>>71852892
Imagine being this unemployed
>>
File: DO IT.png (128 KB, 216x292)
128 KB
128 KB PNG
>>
so many pyfags in here
it sure is summer
>>
>>71837186
i wanna fuck a python
>>
>>71855115
more like where do you even respond with something that stupid
the python interpreter isn't an optimizing compiler for one, and python literally does not out-perform C++ at anything, lmao
>>
I don't know why so many people in this thread act like python and native code is mutually exclusive, numpy is a great example of how python and C/C++ work together really well. Do the expensive shit in native code and just use python to write scripts quickly.
At work we have this too where we have our models evaluated in C++ but it's much easier to setup the model using python then just feed it to the binding to a C++ call.
>>
>>71855193
Mostly because people who want interop between native and a scripting language use lua, because it's literally made for that, interop is insanely easy.
Export one symbol and you're done.
Even more so with luajit's FFI lib, which includes a C99 compiler and can just call C functions exported in .dll/so's directly.
Python, on the other hand, was originally made as a shell replacement for simple automation, and suffers for it.
Also, lua's syntax is more C-like and more comfortable to anyone with a brain.

Python is not C-like, in fact, it's completely unlike any real programming language at all, and thus doesn't appeal in any way shape or form to native developers.
It only appeals to people who are either new to programming or dumb.
>>
>>71837213
Is JAVA the supreme language for efficiency?
>>
Interpreted languages are slow and honestly it's not even that more convenient than something like C#. Significant whitespace is also awkward as fuck.
>>
>>71856708
You can compile it to be faster than C++. Faster production and fast execution is valuable.
>>
>>71855166
>Reading comprehension.

it's not the python interpreter or Python outperforming C++. It's python compiled to machine code. Retard.
>>
>it's another muh language is better than yours thread
holy shit, I hate this board
>>
>>71837765
Good enough to not fuss over it. Python is broadly used and useful so you won't regret learning it.
>>
File: DWxIiaPUQAAxDr6.jpg (25 KB, 430x378)
25 KB
25 KB JPG
>>71857709
>You can compile it to be faster than C++
I didn't know it was possible to be this retarded
>>
>>71837186
Take multiple, it's a tool not a lifestyle.
>Convince me not to take the hammerpill
>>
>>71857731
> b-but python is faster than c++!!
> y-you just have to compile it to machine code!!!
>>
>>71857731
>it's not the python interpreter or Python outperforming C++. It's python compiled to machine code
????
Do you even know just how aggressive c++ compilers are? It's literally the fastest language out there. Modern C++ compilers are so good at optimizing that c++ programs outperform natively written assembly programs. Even if you compile python to machine code it won't run anywhere near as fast as c++.
>>
>>71837765
No, because your normie friends won't have Python installed and won't know how to install it, and if you send them a link they'll somehow install the wrong version. If you don't give normies an exe, they'll never get it to work.
Python is the ultimate language for glue in an environment you control. Once you step outside of writing glue, use something else, preferably with a real type system. Once you step outside your controlled environment, support becomes a disaster.
>>
>>71860084
well look at youtube-dl they ship exe and it is nice
everyone loves it
>>
>>71861159
I finally understand why it takes 5 seconds for youtube-dl to initialize on my i7+nvme
>>
>>71861159
youtube-dl is an exception. It's been masterfully engineered by tons of people to make it work well. Achieving that quality with a shitty script is more trouble than it's worth.
>>
>>71863350
well anyone can look at source code and learn then it becomes easy
>>
>>71845839
I once found a 2D metroid clone game which after going fullscreen started dropping frames on a fucking GTX 1060 and Ryzen 1600.
>>
>>71863734
t. pajeet
Literally cargo cult thinking.
>>
>>71848693
Not him, but the list is extensive. It's an insane language. At the very least, use Typescript. It's eliminated many of the easy to fall in pitfalls.
Just a few of the weird things: https://wtfjs.com/
>>
>>71837765
no, the language you are looking for is unironically VBA (that shit macros in Excel)
But depends on tasks as Python has libraries, on the other side everybody already has Excel in their computer



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.