It now just hits me I should've called this video "No step on snek" with an appropriate accompanying thumbnail. Maybe next Python-related video.
@GoodOwl0
5 жыл бұрын
>says Python is slow >clears the fact that he doesnt hate Python with a video >gets a better video title and thumbnail idea after uploading the video >Python slowed him down
@stephensmith346
5 жыл бұрын
I speak parseltongue lol
@0M9H4X_Neckbeard
5 жыл бұрын
YOU CAN RENAME VIDEOS AFTER THE FACT - DO IT
@juliangawronsky9339
5 жыл бұрын
It not a matter of the language being relatively slower on account of certain design parameters, people often excuse it because its 'dynamically typed' and 'garbage collected', notion being its not a production ready language and the decision involved in creation prioritized usability over performance. The counter example is common lisp, common lisp shares those feature as lisps did invent them. In these benchmarks[1] you can see how well it performs in relation to Java and even C; obviously slower but far from python. 1: benchmarksgame-team.pages.debian.net/benchmarksgame/faster/lisp.html
@illuminous4986
5 жыл бұрын
@baby turtleOh your words said them all-- you got my vote for the next Python-Talk!
@TheSwissGabber
5 жыл бұрын
pure python is slow, this is why you use libraries which do the work outside of python. Like numpy.
@Mostlyharmless1985
5 жыл бұрын
I'm not computer carpenter, but if you are using python to glue together different sets of libraries, why wouldn't you just glue them together with something fast?
@MadaxeMunkeee
5 жыл бұрын
Mostlyharmless1985 because you’re trying to do it as easily as possible. There’s no need for the glue code to be fast because practically none of the run time gets spent there. It’s very common practice for python programmers to let other faster languages do the heavy lifting. The code might still be slow, but if it’s 100 ms instead of 1 ms, a python programmer isn’t going to care. Our workloads don’t punish us as quickly for slow code, most of the time the computer is doing nothing while we think of what to write next.
@ov3rcl0cked
5 жыл бұрын
@@Mostlyharmless1985 You could use a faster language, but the added complexity of using another language which will take more time to create that code is often not worth the several milliseconds you get. Speed comes at a cost of losing useful features. Say I wanted to open up and edit the brightness of a million photos, writting something in python might take me a day, writing something in C would take me a week, and they'd probably be almost equally fast the python one might take a few more MB of memory. Python one is probably using a C lib to edit the image which is where most of the runtime is spent. I could probably write some really clever C code that could outperform the python library, but that might take me a few months. The reality is if I need something done and I use Python it'll probably get done faster, I'd probably have modified all million images with python before I got done writing my application in another language to find out that the time I spent never actually benefited anyone. Same thing applies to user software, I can get you features and fix bugs faster, and the few miliseconds you wait for it to open aren't upsetting anyone, much less so than the thing not working or missing a very important feature. Python might be slow in relative terms, but it's fast enough most of the time.
@smittywerbenjagermanjensen1051
5 жыл бұрын
@@Mostlyharmless1985 Because that's optimizing the cold loop. You want to speed up the portion that takes 99% of the computing time.
@nobytes2
4 жыл бұрын
@@Mostlyharmless1985 is a trade off, you want to spend 1 year figuring out how to write a c program. Or do you want to do it in a day with python. Most comparisons about speed rarely matter for the everyday user.
@rolfingbomb
5 жыл бұрын
Breaking news: Different languages have different use cases.
@Supperesed
5 жыл бұрын
rolfingbomb yes ant pyhton its no use
@sigxfsz
5 жыл бұрын
Fake news. Everything is written in one language. Other languages are just applications written in it. 6 degrees from assembler. ;)
@Master-yn6ie
5 жыл бұрын
Wonder why Java can do it all, or even c++... Hmmm, But python can only do one shit.
@sigxfsz
5 жыл бұрын
@@Master-yn6ie With great power comes great responsibility. Python has training wheels for a reason. I've cleaned up plenty off messes from C noobs who couldn't use pointers correctly or manage memory. Java might be a hair better on those two points but GC or the data type management is still too much for many younger developers. This doesn't even touch on the fact that after syntax and mastering the fundamentals of the language that everything can be ruined by bad architecture of OOP patterns... I've seen people go OO in scenarios flat procedural or functional would have fit the task better. They tool doesn't just match the job, but the skill level of the developer. Some developers don't need to be assigned some jobs or use some tools. Python is a prototyping, middle ware, and RAD tool in my book. I've also used it to make more powerful upgrades to scripts that could go cross platform... I've used the exact same script interchangeably in some cases on VMS, Win, Multiple Linux, and Mac without having to change it for on the fly production/operations/automation purposes. I could rambles more. One language to rule them all and in the darkness bind your project.
@Master-yn6ie
5 жыл бұрын
@@sigxfsz , Some guys just learn cmake and replace python with it, LOL, seriously.
@MMedic23
5 жыл бұрын
>let's have a computer science 101 >puts on sunglasses
@johnstamos5948
3 жыл бұрын
His vision is augmented
@toastybread_ch
3 жыл бұрын
@@johnstamos5948 maybe you should try getting a job
@ard-janvanetten1331
4 жыл бұрын
Should C feel bad for being a slow language? This comment was brought to you by assembly gang
@magnusanderson6681
3 жыл бұрын
Should assembly programmers feel bad for writing their code less efficiently than the C compiler? This comment was brought to you by post-1990 gang
@patryk_49
3 жыл бұрын
Computers that run on code should feel bad for being slower than hardware designed for specific task.
@basedfacistman
3 жыл бұрын
@Kartikey Kushwaha gnu btfo, this post was made by llvm gang
@drygordspellweaver8761
2 жыл бұрын
Hehe you’d be surprised how badly a compiler can muck up. Especially a windows compiler or incompetent c++/java programmer at the wheel. There are cases when C is faster than asm.
@jamesthompson7694
2 жыл бұрын
What syntax bro?
@MrJackojc90
5 жыл бұрын
There are two types of languages. The ones people argue about and ones nobody uses.
@bjarnestronstrup9122
4 жыл бұрын
Well people usually complain about things that are overused. Python was designed as a scripting language and it should be used as one. Scripting languages are meant to be used for small little programs that glue things together not for designing large sophisticated systems.
@porky1118
3 жыл бұрын
@@bjarnestronstrup9122 Not necessarily. Why would you need object orientation and meta classes if it was meant just for glue?
@bjarnestronstrup9122
3 жыл бұрын
@@porky1118 Object orientation and meta programming are both abstraction that are tools to represent various types of logic and storage structuring. However one can live without these abstractions happily, using everything in moderation is always good for the purpose of writing software that could be easily understood. Going through piles of verbose compile errors or running into problems due to complex structuring of dense inheritance hierarchical trees is not always pleasant or even productive..
@kitsunedude
2 жыл бұрын
@@bjarnestronstrup9122 prefer bash for scripting. OOP always gave my mind fits, prefer functional programming
@bjarnestronstrup9122
2 жыл бұрын
@@kitsunedude To be quite honest , I hated OOP for a very long time and I still resent it a little bit but I have realized that both functional and OOP are just ways to structure logic and both of them come with their pros and cons. It really depends on the problem at hand, and you should choose whatever is suited for the task better.
@mtothem1337
5 жыл бұрын
One thing to note Luke. when people talk about programming languages and their benefits and downsides. it's very often purely one language. you can do some amazing things by mixing things. for example i use Python to write the core to some of my programs. but then i write the process intensive stuff in Rust. which i then call with Python. This means that the whole flow of my program is handled by Python. it's extremely quick to change, add or remove things. and all the things that would be slow normally. is fast due to them being handled by a quick compiled language. I have one operation that takes 43 seconds for example in pure Python. it takes 1.3 seconds in pure Rust. and when i combine the two. i get all the benefits of Python. while having it still only take ~1.4 seconds, which is not a noticable difference. Edit. Also like you mention with shell scripting. you can make small hyper efficient executables that you call like that as well. to speed things up. if you are doing something that you want to be fast.
@meepisdispenser5651
3 жыл бұрын
How do you even execute rust from a pythok script lol
@mobrine8659
3 жыл бұрын
@@meepisdispenser5651 He is supposedly executing (using system call) the rust program and using pipes or sockets to communicate between it and the python master program
@elliotalderson6609
3 жыл бұрын
What benefits? Let's say I write C code, that works with directories, so will it run on another OS? I guess we should recompile that subcode for another OS
@mrtransistor6173
3 жыл бұрын
I don't like the idea of multiple languages for one project. To me, anyway, thats just increasing complexity and making things more annoying to deal with. I'd rather write everything in C or C++ and use a simple make files as a build system. But thats just me.
@bamberghh1691
3 жыл бұрын
@@mobrine8659 It is possible to extend python by c (and the other way around) by linking your library against cpython's library. Then you can call c functions from that extension as fast as built in functions. NumPy works that way for example.
@mz-pd5hw
5 жыл бұрын
Python is easy to the human and hard on the CPU, C hard on the human and easy on the CPU. I'm lazier than my CPU :)
@spagootest2185
5 жыл бұрын
try assembly
@ichaa3tech
4 жыл бұрын
@@spagootest2185 as an electrical engineer I find it easier than python , i just don't know how to start with it
@gaurangshukla8235
4 жыл бұрын
@@ichaa3tech if you know programming then go with "The C Programming Language" by K&R.
@ichaa3tech
4 жыл бұрын
@@gaurangshukla8235 already done king
@مقاطعمترجمة-ش8ث
3 жыл бұрын
@@spagootest2185 developing whole system in Assembly will take years , a simple text editor take from us the whole semester to learn .
@CarusKyle
5 жыл бұрын
When the data scientists choose a method that performs poorly by even a fraction of a second, the performance becomes very noticeable after iterating through a few billion observations.
@emanuelriquelme1133
2 жыл бұрын
Those computations are being performed on c/c++ in the background not native python,also they are using GPU acceleration. Then you can test the model and if it performs well you can save it and import it to c/c++.
@Clutter.monkey
5 жыл бұрын
don’t thread on me
@thingyee1118
5 жыл бұрын
Use assembly it’s much faster kek. In fact use binary even faster.
@jpalacios117
4 жыл бұрын
Assembly is just spicy binary
@bubbyroosh4038
4 жыл бұрын
@@jpalacios117 binary is just de-spicied electricity
@MrRenanwill
3 жыл бұрын
Its possible to make a high level language beeing as fast as a low level: haskell, for example might be faster than C. Having good programming skills is way better than choosing a faster language.
@finnianquail8881
3 жыл бұрын
@@MrRenanwill Is Haskell faster than C for useful tasks like file IO or networking? IO in general
@finnianquail8881
3 жыл бұрын
sounds aggressive but this is genuine
@2DReanimation
3 жыл бұрын
To add on to this: knowing how to read C/C++ code and being able to write it well, is way more rewarding than having the same level of proficiency in Python. But I'm still disappointed in C++ libraries, with Boost being such a huge beast, with messy, unintuitive syntax, and then the standard libraries not being flexible enough. Like the process of the Thread class being completely bound to its constructor. With just having an "exec(function)" function, it could be used easily to make a worker thread, or a non-convoluted thread-pool (just initiate the worker threads of the pool, then feed it functions to execute).
@binglemcbawb
3 жыл бұрын
My first language was Java, but coming into upper level CS courses (or just in general) a lot of my professors use Python. I think it also has to do with having a language that researchers can communicate with, since those in other disciplines also tend to err toward Python when working on simple programs for their own work. At least that's something I've noticed during my academic sojourn
@pigm0730
5 жыл бұрын
Python is a "non compiled" language it's an interpreted language, of course it's slower than C but it's not made to do the same thing so it's incomparable. Actually you can use both to make a program. I used python to handle user input because user is always slower than the machine ^^, and multiple C program were launch by the python front end to do the work fast. You can prototype anything with it before going low level.
@kris10an64
5 жыл бұрын
You're basically repeating what he said.
@kris10an64
5 жыл бұрын
@Mr Maestro 87505 Kinda yeah
@exapsy
5 жыл бұрын
it is not incomparable. I've had a team member leave from the team because he wanted to write a Chat bot that would operate on thousands of servers in Python. He compared the speed of python with the speed of NodeJS (NodeJS is incredibly fast on http requests because of its asychronous nature, but for sure there are better alternatives out there like Golang). When I presented him a thousand articles that suggested not to use python on real-time applications, after of course having discussed the issue for like 3 times, he just left. And what he said? "I have far more experience than you and I know better, Python is not slow". Python is not incomparable. You can technically program anything you can with C or C++ or with NodeJS. And people will get on to that. I wish it was incomparable so people would not have to compare python with other tools that are more right for the job instead of using python just because they feel comfortable with it. PS. Just use the right tool for the right job you guys. Python is great for some things, and not great for others. Like any other language, what a suprise. Just do not get suprised when people tell you a disadvantage of "your favourite language" and why you shouldnt use it in a specific job/project.
@Jupiter__001_
5 жыл бұрын
The Python interpreter was actually written and compiled in C, interestingly enough.
@exapsy
5 жыл бұрын
Yep, and everything is eventually compiled to Assembly. :P I hope that would make all languages faster :D
@FedericoGalatolo
5 жыл бұрын
Python is slow because it is not supposed to be used for computations. It is just as an elegant wrapper for the low level operations. Nobody ever wanted to perform matrix multiplications in plain python. For whatever you want to do there is a python library written in C that does it as fast as C.
@LambOfDemyelination
4 жыл бұрын
Python was 'supposed' to be an educational language for beginners, actually. For thin wrappers and interfaces with languages like C/C++, *Lua* was 'supposed' to be that, for example, and it does a much better job of it than Python. In the end it doesn't matter, what does matter is what people actually end up using it for.
@MathewGuest
5 жыл бұрын
My 2c: While C often does blow Python away in pure computational potential, for many applications this requires an order of magnitude in development effort as a cost. The analogous argument is made between C and assembly as well; if you hand-code something in assembly it will be extremely fast and use almost zero memory. It also won't have any features because it's like programming through a telescope. C is an investment, sometimes it's worth paying the cost in exchange for the advantages of C. For many business applications, having a process execute with a split-second of latency is a cheap price to pay to save numerous hours of expensive developer time. I will say though, those split-second lag times on frequently used desktop applications bug the crap outta me too. Regardless, every variety of language you learn will go a long way to make you a better programmer in all languages!! Loves the videos, Luke! Just found your channel and am already learning a ton! P.S. I love ranger as a full-featured, badass terminal file-browser!!
@rothbardfreedom
5 жыл бұрын
Write your performance-critical code in C and the rest (90% of most apps) in Python - calling C from Python.
@davidhusicka8440
4 жыл бұрын
Some people are actually calling assembly from C to get some performance boost (at least embedded programmers and programs for early computers). Times has changed.
@hejhejmonika9787
4 жыл бұрын
@@davidhusicka8440 In blender too they made the GUI in python and use C for shaders and other internal working.
@1ar
5 жыл бұрын
python is great for scientific research (biomedical engineer here), evaluation of data, initial prototyping of algorithms. it is as a more flexible and free substitution to matlab/scilab.
@nicolareiman9687
5 жыл бұрын
No julia is better than python in those things. In both performances and readability
@rebane2001
5 жыл бұрын
There is an advantage to Python (over shellscripting) and that is that it's cross-platform I have many valid reasons for why I *have* to use Windows and it's nice to have my scripts written on Linux run on Windows and vice-versa Yes, WSL exists, but it's not really convenient to use
@rebane2001
4 жыл бұрын
@JosephTheEngineer Most people in the world
@rebane2001
4 жыл бұрын
@JosephTheEngineer did you even read my comment?
@imahumanbeing61
2 жыл бұрын
no
@ThatGastrodon
5 жыл бұрын
There actually is an OS written in Python, called "Sugar". It's the OS that runs on the laptops made by the "One Laptop Per Child" project, and it's made that way to encourage kids to mess around and edit the OS.
@raymundhofmann7661
2 жыл бұрын
This sounds so woke. I rather think it is to prevent them from getting any skills as Python makes this "One Laptop Per Child OS" super slow, memory and power hungry. If someone is motivated and competent, he will ditch this Python do gooder crap and go right to the basics, like Linus Torvalds did, for example.
@ianbridges6040
2 жыл бұрын
Comparing literal children to Linus Torvalds, one step at a time man.
@raymundhofmann7661
2 жыл бұрын
@@ianbridges6040 You want to read about what he did as a kid? en.wikipedia.org/wiki/Linus_Torvalds
@marcossidoruk8033
2 жыл бұрын
@@raymundhofmann7661 oh wow I bet that because you are speaking like this you did exactly the Same kind of mid boggling stuff linus did as a child right? O what are you saying? You did not? Oh right, not everyone gets to be born as a fucking child prodigy, who would have thought? 🤡
@nishadkadam8533
4 жыл бұрын
In my point of view, python itself is an application. as an example I use pandas because MS office and pretty much any GUI programs are bloat. For me, pandas in python is the application. Python is a language which can make day to day tasks easier. But I don't think it is intended for making applications based on it. Just use other low level languages for that !!
@bruderdasisteinschwerermangel
5 жыл бұрын
Python is horribly slow at runtime, and the lack of typing physically hurts me as a Software Engineer But, every language has its benefits, and its downsides. While python is slow, it is incredibly easy to write code in, and there are plenty of nicely made libraries and APIs. For example, the Image Manipulation library, called Pillow (sometimes "PIL"), is really nice to use, and it's really easy to get something done. If you look at the github of that library, you can see that 38% of the repo was made with C. So the parts that are heavy on processing power are made with C, and python interfaces with it. Would you be faster if you did everything with let's say C, C++, Go or D? Most likely yes, but you would probably have to spend twice the amount of time to actually write the code It boils down to usage, some languages are better in certain situations than others. Want to a make a complex-ish script that you want to use on the command line? You're probably gonna use perl, python or maybe lua. Want to write a webserver backend because you dont like nginx? You're probably gonna use C, C++, C#, Java, ...
@alessandroceloria
5 жыл бұрын
Isn't C less typed that python tho? I'm no programmer, but IIRC C is not a very type safe language
@bruderdasisteinschwerermangel
5 жыл бұрын
@rvi 64 in both C and python primitive data types exist, like for example integer types (8, 16, 32, 64 Bit) the difference is when creating a variable, or making a function with parameters, in C you have to explicitly specify what kind of type you want, for example int x; x = 4; this variable will never change its type, it will always be int. in python you only write x = 4 now it's some sort of numerical type, probably int however, you can overwrite it at any point x = "hello" now it's a string while this might seem convinient for people who are new to coding, but many (including me) don't like it It also makes things a bit slower. When passing a variable as a parameter, at some point you might have to check the type of the passed object, as you're not guaranteed that the object that was passed is actually of the type you want. although this dynamic typing (I hope this is the correct term for it), is fairly common in interpreted languages like python, javascript, lua, perl, php and so on.
@bruderdasisteinschwerermangel
5 жыл бұрын
@rvi 64 C is more low-level that's true C++ is a bit different to be noted The length of integers can wary, depening on platform and compiler settings char for example, is the smallest addressable unit on the system, which to my knowledge, is an unsigned 8-Bit integer in 99% of the cases But that's not what my point was, these changes are dependent on compiler settings, and probably which header files are used. My point was, that python will just freely allocate a different type to a variable that originally had a different one. About the arrays, the classic "C arrays" are what you mentioned here. They always have a fixed size, which has to be hardcoded if I remember correctly. C++ has a custom array that can be initialized at runtime with a variable length
@matj12
5 жыл бұрын
Pillow is a fork of PIL for Python 3, PIL is only for Python 2.
@michaelmamic4682
5 жыл бұрын
I agree with most of what you said except that Lua is a blazingly fast exception. Under LuaJIT, most Lua programs run better than C ones, but C still beats Lua when optimization is a main target.
@bendover4728
5 жыл бұрын
I think it's kind unfair to compare an interpreted language vs a compiled one. If you compare Bash to C, Bash is hundreds of times slower also.
@milkyway208O
2 жыл бұрын
Still slow
@SSouper
5 жыл бұрын
just write everything in Rust and get CoC'd
@FunMaker39
5 жыл бұрын
@Grug Berrypicker Rustafarian sounds so much better than rustacean.
@kuhosawszerszen8839
5 жыл бұрын
@rvi 64 RedoxOS is open source operating system written in Rust only - from kernel through package manager to web browser.
@sho3bum
5 жыл бұрын
I didn't see your comment there.
@ezioarno15
5 жыл бұрын
I'm a systems programmer i recently started getting into rust and i gotta say i love it
@thomasna5158
5 жыл бұрын
@rvi 64 Im pretty sure its turing complete, so yea
@virushunter83
5 жыл бұрын
I love Python but you're right about a lot of things in this video are totally right. Python has its place and too many people are misusing it
@zebnat
5 жыл бұрын
I remember seeing php scripts for server management tasks instead of shell scripts in my last company. It was a small startup with a few ppl so sometimes coding productivity was more important than them learning shell scripting because it works by default on all machines... that was getting shit done lol
@jordixboy
2 жыл бұрын
and that folks, is all what matters, getting shit done.
@lolisamurai
5 жыл бұрын
you can make python much faster by using alternative implementations like pypy, but it's annoying because then you have to install pypy everywhere while python 2.6+ is usually bundled with most linux distros out of the box and even on macOS. but yeah, python is damn slow. i remember translating a heavily I/O bound program from C to python and js: python was 10 times slower, while javascript was only like 50% slower. that's why you often have bindings to C code to do the heavy lifting
@rteja764
5 жыл бұрын
Go is also as readable as python and close to c in speed.
@RedFenceAnime
5 жыл бұрын
Makes me think of the computerphile video where they unroll loops to get a page to print 5x faster for a apple presentation.
@MirceaIliePloscaru
5 жыл бұрын
9:30 you just described *nim lang* right there :) For python lovers who also want perf. I'd recommend it.
@errvega2705
5 жыл бұрын
Oh man I give u some perf
@pendergastj
4 жыл бұрын
Luke what are your thoughts on C++, heresy?
@johnkelfy7256
4 жыл бұрын
Literally the same
@igorswies5913
3 жыл бұрын
@@johnkelfy7256 same as Python or same as C
@albarshini490
5 жыл бұрын
Where the woods at?
@alessandroceloria
5 жыл бұрын
Police searching for unabomber after his last talking-in-the-woods video Jk
@SoundsFromSound
5 жыл бұрын
Python is just slow enough to not be too slow to not be able to do anything you need it to do.
@maximood-tired
5 жыл бұрын
nice
@toby3084
3 жыл бұрын
There’s a linux distro called snake ware which is a good example of this, insanely unique distro where almost everything is in python
@luka95kovach
5 жыл бұрын
Luke, can you tell me the model of that keyboard you are using in this video? I want to buy one :)
@perhaps8250
3 жыл бұрын
unicomp endura pro
@852derek852
3 жыл бұрын
In python theres this great function called "import" that lets you delegate cpu intensive stuff to precompiled libraries. If you write CPU bound loops in python, you are using it wrong
@iflowlikewater
5 жыл бұрын
Snakes rise up!
@novoehuevoe9340
5 жыл бұрын
Hissss
@georgesb5289
5 жыл бұрын
Tunnel Snakes Rule!
@matrikater
4 жыл бұрын
how dare you, grow up and join the big boys table in big boy languages like java c# c++ and c 😐
@guyguy7714
3 жыл бұрын
Hiss
@OpenSourceSauce
5 жыл бұрын
Agree that for sys admin stuff & text files processing it's much easier use linux shell. Just my view as a support engineer.
@hermes-on-hardware830
5 жыл бұрын
> Uses "Sanic" meme to empathize speed of Python > Probably does not know that there is a Python web framework called "Sanic" that is the fastest async web framework up to this day. Anyway I KEK when you said "Micro agressions"
@froge8121
4 жыл бұрын
Hermes-on-hardware ever heard of actix-web?
@mbvalency
5 жыл бұрын
I'm working as a software test automation developer and the problem we have is not the speed of our Python code, but the speed of content being delivered TO and rendered IN the webbrowser instead. We chose Python3 (with Selenium, BeautifulSoup etc.) to build a powerful test automation framework. 3 years after the beginning, we are still glad, we decided for Python. Nothing to compile. Platform independent. (Fill in some more benefits here - I'm not a salesman :D) I would not want to switch to another language right now...
@_chip
5 жыл бұрын
@LukeSmith you should look into Julia for high performance high level languages .... Just FYI
@LNTutorialsNL
5 жыл бұрын
Luke, where did you purchase your keyboard?
@janis.berzins
5 жыл бұрын
C/C++ are compiled languages, while Python is an interpreted language.
@zyptoskid
4 жыл бұрын
Nim is both intuitive as Python and fast as C btw. Well because it *is* C. ALSO "Make it work, make it fast, make it pretty" -- People seem to stop at the first step in this development process. And forget that Python is best suited for *prototyping* and *automation* not to write full-on programs/services in.
@skiz8848
5 жыл бұрын
It took me about 2 seconds to read a data table with around 200 elements. I thought the IDE crashed at first but no, python's just slow.
@freddief939
3 жыл бұрын
@Luke, Correct me if I'm wrong here: The webpage / stats you are referring to is comparing the compiled languages such as C to interpreted languages such as Python.
@hasen_judi
3 жыл бұрын
Imagine thinking bash is elegant. smh.
@MatojoLedesma
5 жыл бұрын
Hey, are you going to do those tutorials for making a web server at home? Keep it up!
@garrygoodrege255
2 жыл бұрын
Hello Luke, what you may say about PERL in modern days? will you use this lang, if not, please talk about it..
@ajdinekmescic2638
5 жыл бұрын
Luke, in your video about Social media upcummies you mentioned you don’t use Google News anymore. Where do you get your news/info from ?
@MattyFez
5 жыл бұрын
Luke are you going to do a video on zsh?
@sauce3165
5 жыл бұрын
I feel like teaching beginner programmers Python leads to them seeing the computer as some kind of magical black box that's much more complicated than it really is; if you learn c after python basic memory management and stuff can look really complicated. If you learn c from the beginning you can compile, look at the assembly and have some kind of understanding of exactly what the computer is doing, without any "magic" going on
@MemeScreen
5 жыл бұрын
saucysirloin I learned python first and then c. I only realized how bad python is after I learned it.
@ramblingrobot4599
5 жыл бұрын
I agree. The common argument is that "Programmer time is more expensive", it doesn't seem very smart to spend 30 minutes longer writing it more efficient or in a faster language only to get a 3 second speedup. However that's only true if you're only gonna use it once. Once you start sharing it with others it starts costing more than just your time, if over 600 people use it you're already "stolen" more that 30 minutes of time in total. It's even worse when it's used as a component in a larger system, eventually you'll end up with this whole stack of scripts goblins each only stealing just a few seconds or milliseconds but you'll end up with a sluggish system. Second, that time you spend writing it better is an investment. It's something you learn from and next time you'll be able to write it even faster. Also, C is not a low level programming language.
@VictorRodriguez-zp2do
5 жыл бұрын
If C is not a low level programming language then what is it? It's used to write operating systems and requires you to do memory management
@5slight
5 жыл бұрын
@rvi 64 Assembly and machine code are the only low level languages by definition that I know of. People like to call languages like C and C++ low level but historically and by definition they are high level. They create an abstraction from the machine code and are not one to one with lines of code. C is nothing like Assembly.
@5slight
5 жыл бұрын
@rvi 64 Just terminology man. I'm talking about the computer science definitions of a low level language and high level language. C would be classed as high level language. C gives you low level access to system memory and is fairly basic in features but it is still a high level language by definition. Check the wikipedia page on low level programing languages. It even has a comparison with a assemberly and c. Also has an interesting section about low level programming in high level languages.
@wanderingwanderer1016
5 жыл бұрын
What are your thoughts on programming in Rust?
@sockpuppet5453
Жыл бұрын
As an experience developer, I'd like to say Python is not particularly intuitive or easy for beginenrs compared to other languages. Unfortunately Python also helps teach some pretty bad practices to new developers, like the weird global variables, and unusual alternative terminology for common CS things, like hashmaps being called dictionaries. I can't really think of a scenario where I'd use Python over another language, C, Bash, Kotlin, Javascript and Haskell cover basically every usecase. It seems like Python is used by people who don't really want to program, to accomplish something a bit more complex than a spreadsheet and they've kinda fallen for the "Python is easy, it's good for beginners" meme.
@dimitrioskioroglou4316
5 жыл бұрын
I'm afraid that you don't really understand why python is so pupolar language. If it was just for its simplicity (aka less verbosity), then why other scripting languages haven't overtaken its popularity (rhetorical question)? Also your comparison of python to a shell scripting language is a bit inaccurate. Shell scripting language is quite limited, inflexible and inelegant outside the system administration area. In order to understand the popularity of a language, in this case python, you have to dedicate time in learning all its ins and outs. A few "hello world" scripts and some speed benchmarks won't help. There are too many "it depends" regarding performance, efficiency, productivity etc. that need to be discovered.
@err0r-completion
5 жыл бұрын
Its surprising to see not many people talking about PHP7. I am not a developer but a DevOps guy.. I work with developers day in and out and the results of PHP7.2 have been astounding during the past few months.
@ikickss
4 жыл бұрын
* Some HP printer "device drivers" are written in python. I don't think OS written in python is not that far fetched. * If python is slow, look into numpy and itertools. If your python program needs snappy GUI, look into wxpython or kivvy.
@4.0.4
5 жыл бұрын
Python is a *LOT* faster... _...than Ruby!_
@LambOfDemyelination
4 жыл бұрын
Not these days, no. Ruby used to be a tree walking interpreter a long time ago, while Python was a bytecode interpreter. Now Ruby is a bytecode interpreter too. They're about equally as fast, and Ruby's getting a JIT soon too, which'll in fact make it much faster than Python. Keep in mind, when I'm talking about these languages, I'm talking about their official reference implementations, since it makes no sense to say that a 'language', on its own, is slow.
@Veri7a
5 жыл бұрын
I'm only in @ 2:50, but I thought Python was meant for quick prototyping, not speed. Hence the easy (human) legibility, etc.
@JaihindhReddy
5 жыл бұрын
08:26 elegance reminds me of Clojure. Once you cross the learning barrier, bash seems primitive (which it is). You manipulate data structures in general purpose programming languages whereas everything is strings in bash (Not saying bash doesn't have data structures. That's not how idiomatic bash scripts look like)
@jamesthompson7694
2 жыл бұрын
Isn't Clojure Microsoft controlled?
@thought2007
5 жыл бұрын
The advantage of python scripting is that it will run on unix and windows, more or less. If I have a unix only script just for myself, then yes go for bash.
@Demodude123
4 жыл бұрын
I think perl is a good middleground for scripts that need more functionality than shells provide but also don't need to take the leap of python, where you're completely detached from the shell world. I think perl still holds some relevance there.
@rodhash
3 жыл бұрын
I know your pain! I've seen a friend doing the same thing whenever I said something against Python .. we both started programming w/ Python and while he stayed on a single lang I decided to explore others (including c++) and whenever I said something against Python, things got very werid .. People are too sensitive.. I still use Python for 90% of my work stuff but it's crazy people getting offended by a fact.
@Phasma6969
2 жыл бұрын
Because we have prehistoric emotions. Better to view communication differently from facts, then the languages as mere tools.
@مقاطعمترجمة-ش8ث
3 жыл бұрын
Me translating bash script to C just to have one click excitable file that directly executed by the OS , C FTW .
@TheIronfirewall
3 жыл бұрын
Im actually one of the people that dont like python because of its syntax. I started programming in Java and i really got used to a more strict syntax since i find it much easier to read the code.
@aeronautisch
3 жыл бұрын
same
@not_herobrine3752
3 жыл бұрын
same, except im more familiar with c and c++
@notjulesatall
5 жыл бұрын
You might as well write C++ code if you don't mind slower compilation times : no memory management, higher order everywhere, pretty much all the beauty of functional programming but with an unmatched level of performance
@kirschkern8260
4 жыл бұрын
Is it same on Arm ? Is there diffrance in compiling on X86 or Arm ? Because RiSC and CiSC are diffrent . So Maybe there its not fair to say it ultimately. It depends on CPU hardware , Or Hardware-Software interaction.
@planeshaperman
2 жыл бұрын
Most python extensions (including the python standard library and professional libraries like numpy and tensorflow) are compiled C and run very fast. Used properly, python is just a frontend to fast C code. But if you just write vanilla python without invoking any extensions, yeah it is going to be 100x slower than C for the same task.
@mbk0mbk
4 жыл бұрын
FYI python compiles to binary just like c because it uses cpython, binary compiled to pycache ,it is used as long as original python file data remains same else it is recompiled and used . which make it same speed as c compiled code.
@LukeCollins
5 жыл бұрын
Python being more "high level" than C is not why it is slow. Python itself isn't slow, it's just another language. The way code is converted to binary is the problem here ― by default, python is not compiled, it's interpreted line by line, allowing for very little optimisation. C on the other hand, is typically compiled with programs such as gcc or clang, where many optimisations are carried out. There are ways to compile Python though! That way it can be just as fast as C.
@KingJellyfishII
5 жыл бұрын
Python is not "interpreted line by line" it is actually converted to bytecode somewhat like Java. Except that it isn't optimised bytecode, unlike Java.
@rahulnair7714
5 жыл бұрын
Python isn't the approach if you are looking for speed. But there is nothing which comes close when it comes to quick prototyping, and if that prototype is quick enough for your use case considering future scalability, then, by all means, go for it. If you know C, which is a BIG plus, then write the speedy bits in that, and use Python as a wrapper.
@Dusta_Rhymes
5 жыл бұрын
You have some really nice posture at your computer dude
@mladenmilosavljevic6449
5 жыл бұрын
I use python. Its easy, it slow and its awesome. If there wasnt python i would not be programmer today. I learned a lot after python but i would not introduce myself to coding without python.
@PreyMa
5 жыл бұрын
I love python for quick scripting, but for anything serious i prefer c++
@igorswies5913
3 жыл бұрын
you can use shell scripts for that tho
@PreyMa
3 жыл бұрын
@@igorswies5913 Yes you can, but I neither like bash/shell nor is it crossplattform. I often switch between linux and windows... :)
@GertBoers
5 жыл бұрын
You are right on process intensive programs, there Python is much slower. But for me and my use-cases where you have to collect small bits from a database and sometimes waiting for user input, Python is excellent! For scripting I use bash with command line tools. Each tool for it's own purpose.
@dmsalomon
5 жыл бұрын
Mostly correct, but I have a nitpick. There are many workloads (such as IO-bound workloads) where python will perform comparable to c, and so python can be better choice for rapid development. Even CPU intensive workloads can be mitigated by using numpy and other computational packages. One of the most compute intensive workloads is deep learning, and practically all of that software is written in python. (Of course it's actually c/c++ thats doing the heavy lifting behind the scenes). That said, I agree that python has inherently higher latency than c, and should avoided when it's a factor (ex: GUIs).
@linuxman7777
4 жыл бұрын
I remember I had a professor teaching a course in Java, and he said the main criticisms of java is that it is slow, but in reality it is quite fast.
@netbotcl586
4 жыл бұрын
Slow compared to C/C++, much faster than Python.
@jackfrasiercomedy5942
5 жыл бұрын
I chose C for low-level skills. Might do C++ for object-oriented C-style. Python for jobs and Ease of writing. Bash for linux skills. I like R as a possibility for Math and Perl for language parsing. What languages does Guru Luke Smith use and why? Also, if you could give me a good recommendation for my path based on your philosophy, that would be great! Thanks!
@jamesthompson7694
2 жыл бұрын
Good choice with C++. My experience with Java is it has the same problems as C++ then tack on garbage collection.
@shekhawat5917
5 жыл бұрын
where is the web site series
@kris10an64
5 жыл бұрын
@@pollak40 Im not sure if you responded to the right message 😅
@pollak40
5 жыл бұрын
@@kris10an64 you're absolutely right, not sure how that happened. Sorry all!
@barmetler
4 жыл бұрын
Slow != Bad Give snek some time, don't pressure him.
@igorswies5913
3 жыл бұрын
bloaaaaaaaaaat
@adamkrivka6713
5 жыл бұрын
What do you think about Go?
@arkadianriver
5 жыл бұрын
So, there's a diff between compiled languages and scripting languages, which isn't covered in the video. Ada is easier to read than C, but once compiled, it's way faster than even a cryptic C-style scripting language like Perl.
@RockTheCage55
5 жыл бұрын
So usually i agree with you but this is an opinion i have to disagree with (mostly). I don't think calling python easy is accurate. I think python is easier is more correct. No programming is easy. I am a programmer by trade. People don't just use python because its easier but because its an extremely productive language. For a lot of things execution speed don't matter. So if whatever your doing takes 2ms or 200ms programmed in python is it going to make a difference? You definitely are talking about an edge case (Mandelbrot set) in that it takes a lot of math. If i could do the same thing on the GPU by hand coding everything and it took 20 ms instead of 2 seconds with C but it took me a week to do and code was a lot more temperamental would it be worth it? Maybe/maybe not. A good example would be a lot of business code connects to the database and is mostly waiting on the database to perform operation (complex queries). So python has its place (and so does ruby which has similar execution speed). Sure i'm not going to write kernel code in python. I 100% agree with you when you were talking about just do it with a shell script.
@KakugenKun
5 жыл бұрын
Do not worry you offended no one :) I would say that I love C but i prefer to use Python because it easy to understand, quicker to code and now with "numba" you can almost have the speed of C super easily :)
@ryuusel
5 жыл бұрын
Check out lf. The UI is exactly like ranger but it's written in Go so it's actually tolerable to use.
@Pabloparsil
4 жыл бұрын
Modern python programming leverages numpy and JIT compilers. If you don't use them it's super slow, but that's not how people code. The thing about python is developer speed, not execution speed, but it has that too if you leverage its ecosystem and don't stick with just base Python.
@Pabloparsil
4 жыл бұрын
I forgot to mention cython, which is also used a lot.
@GeorgijTovarsen
5 жыл бұрын
afaik Cython can be used in two ways, you can either program just as in python (in which case it would not be any faster than simple python) or it can be used as C (you can use types for example) in which case it stops being actual python. I may be wrong, I've never used Cython myself in my life.
@inside91
5 жыл бұрын
If you use python you need to know about vectorization...
@geeksy2278
5 жыл бұрын
Hey Luke! Let me tell you that a language is never slow. A language is just formal. The python interpreter is slow. JIT Compilation is of course faster. If you compile Python code it can be fast, it depends on the implementation. For further information look at the google repositories, where you can find some ways google used to run high performant python.
@damnstupidoldidiot8776
2 жыл бұрын
No, even if Python is compiled like C, it's still slow. Python, by its design, must be slow. Python does a lot of work for you that you can't opt out of.
@geeksy2278
2 жыл бұрын
@@damnstupidoldidiot8776 No it's not. You can write anything in C or CPP and use it in Python (look at numpy and pandas) even in webdev world with uvicorn (which is as fast as go)
@crusaderACR
Жыл бұрын
@@geeksy2278 This isn't true. Certain design decisions on languages can make it much slower. Things like garbage collection, strong vs duck typing, OOP, FP, etc.
@slmjkdbtl
4 жыл бұрын
i think system scripting in bash vs python are 2 totally different ideologies, bash scripting makes heavy use on other programs and redirecting input/output, while python uses ordinary programming logic, no concept of piping
@furiousfellow1583
3 жыл бұрын
I use python because it has libraries for most of the things I need, that's what makes it easy (fro me), syntax its weird AF if you come from another language
@lucasblotta9930
5 жыл бұрын
#1 reason to use Python (or Perl, or Ruby, etc) over shell script: data structures. In Bash, try creating a multi-dimensional array or an associative array that has an array as value. Also, Golang's channels and io interfaces allow for some interesting "piping" capabilities
@ShivamPatel-ey9re
4 жыл бұрын
I wish python had means to access underlying pointers.
@karimblog
5 жыл бұрын
‘D-J-A-N-G-O. The D is silent.’
@nobytes2
4 жыл бұрын
Terminator terminal is written in python. The thing about python is that you can use c/c++ libraries too from the comfort of python. Yes, pure python is slow, is not a compiled language. Is just a fact.
@atimholt
3 жыл бұрын
Python isn't closer to human thought if you study a low-level language and get fluent [taps temple]. (My favorite language is modern C++, but I've been meaning to look into Rust. I'm really antsy for C++20.)
@johnkelfy7256
4 жыл бұрын
I love python I use it all the time tho . I respect your point and may even agree with you xddd
@MetalCoola350
5 жыл бұрын
I would say that those languages have different use cases. For example, the web: Python is the king here, with other languages such as PHP, Ruby or Javascript. On the other hand, C or C++ are more adequate for another tasks, more related to hardware intensive examples.
@thought2007
5 жыл бұрын
You can also try Cython if you want to make your code go faster. Or just use NumPy. For calculations it's more likely to run faster and even can use parallelism 'for free'. To hand code the same in C you'll have to look up the right intrinsics, parallel algorithms and so on.
Пікірлер: 502