Python popularity

Why the hell is python becoming so popular? I keep reading about its growing trend, but all signs point at it being slow as fuck. Wouldn't javascript be a better scripting language? I mean, you can embed both into anything, so why python?

Attached: jsvsp.jpg (348x145, 10.07K)

Other urls found in this thread:

docs.perl6.org/type.html
youtube.com/watch?v=2Op3QLzMgSY
eloquentjavascript.net/
python.org/dev/peps/
loomcom.com/blog/0097_the_wats_of_javascript.html
theregister.co.uk/2016/03/23/npm_left_pad_chaos/
news.ycombinator.com/item?id=14271355
twitter.com/SFWRedditVideos

Ease of use in regards to data analysis and machine learning.
JS is more a web-building thing, not a "BIG DATA" thing.

Why the hell is OP still such a faggot? I keep reading his threads and all signs point to him being a total faggot. Wouldn't OP be better off if he became a trap? I mean, you can suck cock doing both, so why choose to be a faggot?

Attached: Boogie Peg Furry.mp4 (1280x720, 2.97M)

Python is fine, but Jesus don't make a game with it.

I'm not saying it doesn't work. I'm asking why isn't a (seemingly) better scripting language like javascript preferred in all or most cases. I don't buy that it's big data mostly.

Reading into it, people say it's simple and easy and therefore more readable and maintainable, but it's not like javascript is any harder, in my experience.

I use both, JS is horrible to use compared to python.

Attached: 1c03616581dd3282df67f7175649a4542a6efb0d4283f4127153ee24f85ffc86.jpg (800x689, 42.06K)

It can be done(pic related), and with pygame you can make simple 2D side-scrolling games.

Attached: Severance Blade of Darkness.png (256x354, 48.32K)

Python is the best language for server-side web app development, and that is the most popular tech sector nowadays

Because it is used in many introduction to programming courses.

Because of libraries or simplicity of use?

use the format, json
ignore everything else

It has an easy syntax, doesn't do retarded things like JavaScript and it has a massive selection of libraries. Speed is not really an issue if you use libraries which have the performance-critical part written in C, so you can use it for heavy number crunching as well.

And really, what is the alternative if you want to throw a simple script together? Python is basically pseudocode you can actually run.

Good game. Had a lot of features that hadn't been in games before, and some that haven't been seen since.
Was fun too. The multiplayer didn't really work though, nothing only on lans.

it one of the main languages used for machine learning and big data analysis

slowpoke.jpg

sh + awk, Perl, TCL. But if you want a typed scripting language, I don't know, there's probably something out there.

Now that I think about it, why not Go? It seems like the Python killer (except for the lack of libraries).

Go isn't as friendly to the tech illiterate.

Perl 6 has data types.

docs.perl6.org/type.html

Actually one of it's best features is custom data types, which makes it a good language for database programming.

slow and can obliterate your system very easily, and syntax can be awkward. BUt POSIX tools are great
Python is a better perl than perl for anything except golf
tcl is slow and the syntax can be esoteric. Even jim tcl is slow.

Also, Go can actually be quite annoying

What form of crack have you been consuming, OP?

Aside from pointing out you're intentionally misinterpreting the context of the word "embedded", here's two embedded-device embeddable implementations off the top of my head:
For esp8266, esp32, pyboard, micro:bit, probably some other embedded boards
64k bytes implementation of most of Python

Well not everyone has your experiences. Python is 100% the most used language for beginner courses the world over, and when you have students that become very familiar with it for a few years it will be their natural go to for any scripting purposes. It was designed to look as clean and easy to read as possible, it can be OOP and it doesn't use pointers, so it's easy to teach. There aren't any glaring issues with it's design since most python programs are at most a couple hundred lines dealing with simple text based data manipulation any bitching about slowness or bad garbage collection are moot. It's a glove that's a perfect fit for it's intended audience.

Attached: snake sweater.jpg (1024x768, 145.91K)

You better not use slow as an argument when searching for an alternative to Python. Honestly, the only thing I use in the bunch I mentionned in sh + awk, and it indeed needs great knowledge to build something not too shabby.

tcc + C, unironically. Or common lisp.

Awk is waaaay faster than python.

If you write your shell scripts as "glue scripts" for running awk, they run pretty damn quickly.

First python has been around for over a decade, more on the the side of two. If you /knew/ python you'd know that the syntax lends itself to data analysis. Libuv has only been worth while recently.

Not to mention ubiquity. Python is found in probably every distro as a standard scripting platform. Node.js? Not so much.

Then look at pip/virtualenv versus npm. This is where I go, "Neck yourself."

Finally Cython. Integrating a performant computational module in Python is far easier than Node.

Syntax is another reason, with all the truthy bullshit in JS, its horrendous for scientific purposes. Python has already developed specific constructs for typed structures (check out numpy).

Finally all the infrastructure and support for computational and data analysis already exists for python. Scikit-learn, matplotlib, numpy, numba, etc. etc.

Parallelism is also alot easier with Python than with javascript without all the restrictions of webworkers or piping through different processes.

You are a massive faggot, QED.

Fuck off back to /g/

Depends on what you're used to and what background you have. But in general, yes dynamically typed languages tend to be less annoying to beginners who were taught the "a variable is like a box" stuff.

Really? I've never heard of any of that.
All the languages I've heard of as being used in embedded stuff are C, C++, Forth and the like.
P. cool what people can do these days

What? All of the firms I know do their work in c. On top of that, the very idea that a language is "good" at one thing, and therefore has acceptable flaws is retarded. You either have no idea what you are talking about or you know full well and are ignoring the truth.

If that were true, there would be no need for different programming languages. I sure hope you aren't trying to imply that this mythical flawless language that is a perfect fit for any use case is C.

Attached: 8d7afe4918f76c075cc130b228cfd8688daa2b78d77326a2d0fad1dc271420a2.gif (827x926, 528.63K)

It's easy to learn as a first programming language and has lots of useful libraries. What more do you want if popularity is the goal?

It is a very abstracted language.The language itself is easy to learn and it's easy to teach.
Try teaching Lecture 6.001 to the new generation and a lot of them won't follow (even tho it's easy as fuck).
youtube.com/watch?v=2Op3QLzMgSY

Fuck off back to /g/

Perl can do more and faster than python. However it's a language designed for level 99+ wizards.

Attached: perl-scripts-done.jpg (600x425, 27.21K)

It shouldn't be.

Because it's easy. It's an ugly fucking language though. The future is statically typed though.

my own reasons:
it has lots of libraries and is relatively easy to write for windows/and/or/linux

...I am writing some "impossible coding" :D on Win10 that I will eventually transfer over to a linux pc. I looked at java but the serial library in java was questionable, where the pyserial one was much more up-to-date.

I don't find python to be particularly 'easy'. just different. the idea of un-typed variables is rather odd, since in my usual languages, where you declare the variable is also what sets the variable scope. ...python makes it really easy to use the same variable name for many different instances--but I've never had any time in the past when I wanted to do that. it seems counter-productive to combating the disorganization you face with any large project
....
and I cannot say in all my years of cobol, c++ or java coding,,, did I ever have the need to store a function in a variable. some of the more-unique features of python I will probably never have use for

with some of these languages--they tried to simplify the architecture, and they ended up with a number of odd effects of doing that. So then they try to sell those oddball effects as "advantages that you can use". Nevermind that you probably never wanted them, and they must construct special examples in the documentation to show just how to use them.

really nigerian?

the reason is that python interfaces easily with C and most of the real "work" done in python scripts is done by a C back-end.

Any reason why python is used instead of, say, LuaJIT? Or did it just end up as a standard?

The majority of python users used to be intelligent programmers. Once the industry noticed that, demand for python developers went up. The rising demand attracted new less skilled programmers. ........

I don't even need to say anything.

Python has major support for OO.


You don't need to, but it doesn't matter, because you're a nogrammer. If you're complaining about a language based on minor syntax details, like whitespace indentation, you are too stupid to ever become a programmer

TensorGlow

In Python, a variable is like a box. It's just a name that refers to an object and can be changed at will.

It's not "minor" you fucking cockgoblin. The trannies in charge of python are stuffing their personal style preference down everyone's throat. Heaven forbid you try writing Python in any editor besides a bloated as fuck IDE designed for that kind of shit. Why stop there, how about forcing space padding on all sides of function arguments or some ridiculous shit like that? Who is the arbiter of what kind of inane style policing is considered "minor"?

read: it's not quite as bad as Perl's support, but it's still pretty shit.

his point applied to any non-industry language. His point is basically anti-Zig Forums: the best of us are memelang users

endless unjustified propaganda that coincided with a general surrender on the field of battle that was observed only by its competition.
Perl: "everyone read MJD's article about how advocacy rots your brain so now we won't say why you should use Perl even though its position vs. python is enormously advantageous [some of that persisting even to this day, it's shocking how shit python is]"
Ruby: "matz is too polite to tell you why you should use Ruby even though it's 10000% the language Python is, and only suffers from less technical and social investment [even at the time, although the gap was much smaller then]

Python is just pseudo-code that actually compiles. If you're a computer scientist rather than an engineer, that's all you need.

Likewise, Python is probably the best lang to teach students compsci because it is so divorced from the irrelevant architectural realities of computers themselves. Either that or Scheme.

Javascript is fucking retarded.

anything will look popular if you place it next to javascript.

Lua: "Look at the shitshows at those other languages. Don't fucking say a word about Lua you goddamn idiots"

Then you haven't tried hard enough.
[code]enum node_type {
enum node_type {
NODE_POO,
NODE_LOO,
// and so on
};

struct node {
node_type type;
char *data;
};

// I don't know the exact syntax for an array of function pointers, and I
// couldn't be arsed to look it up right now
(void *) dispatch_table[] = {
[NODE_POO] = what_to_do_in_the_loo,
[NODE_LOO] = where_to_poo,
};

// And now we dispatch on the node type:
struct node my_node;
dispatch_table[my_node.type]();}

This is not very impressive with only two entries in the table, but if you have a large amount you can find the right function to call in constant time and using much fewer lines than if you were using a switch statement. You can also pass functions as arguments to other functions, like passing a filtering predicate to a filtering function.

I made the thread because I keep seeing articles talking about the increasing adoption of python.

The syntax of the language is easy to iteratively sling data around as well as pivot alogirithms with metaprogramming.

And I already mentioned cython for the tight loops. Remember the 80/20 rule? Still holds for alot of things.

In terms of syntax, performance, and paralellizability, Julia outclasses Python as a language for data analysis

Python's syntax has been pretty consistent since Guido released it in the 90s. You're such a stupid fucking faggot.

Most builtins on types are implemented using classes, most of the language is class based, you just don't see it


Rumor has it for more than a handful of elements, gcc -o1(+) will optimise a swicth into a jump table

it's not just about performance, it's about readability. I find having a table like this much more readable than a switch statement that goes on for fifty lines full of boilerplate code. One missed "break" can ruin your whole program, and good luck finding that. Plus, you can change the entries in a table at runtime, but you cannot change a switch statement.

Oh, agreed. Jump tables are infinitely better. Was just saying, a compiler will fix a switch to be constant time

^ typical Python 'programmer'. Only knows Python. Thinks basic shit like this is special.

get toilet paper that's mostly 1-ply but it has some 2-ply spots for when shit comes up
get slick hardcover that are half-softcover because nobody cares about the back flap of the cover anyway
make sure your roof doesn't leak over your food and over your bed--the rest of the house is fine to leak on
HOW ABOUT USING TOOLS THAT DON'T SUCK

I barely write Python. But it has major support for OO, it's not "basic shit that's special", whoever I was replying to claimed the support for OO was shit and that's demonstrably wrong

^ typical barely-writes Python 'programmer'. Only barely-knows Python. Thinks a language having basic shit means that the language isn't shit.
what, do you also barely-know Fortran77 or something? Are you impressed by Python's OO supremacy vs. COBOL?

It's easy, there's a lot of libraries for it, you can get a job with django.

Javascript has brackets and is therefore a real programming language. Python has significant whitesapce and is therefore a worthless piece of trash meme language for hipsters and faggots. I bet they use RPN calculators too.

Both are trash and all of its users should be hung.

Python is the solution to the brogrammer problem.

Based bracketbro

I don't "barely know" Python. I barely write Python. Someone, I assume you, denied Python's support for OO was major, and that is demonstrably wrong.

What the fuck are you even talking about? You can write python in notepad.exe and it would run fine. You don't need an IDE to indent code.

Okay buddy, have fun keeping a constant mental note of how timed you need to press tab on the next like to appease the python gods.
Or you could just save yourself the inconvenience by using a language that doesn't blow ass.

It's so easy to make KoOl ApPs!!!!! Why would i want language to find errors??

Lua - distinct syntax for binding (o.f(x) and (o.f)(x) - no binding, o:f(x) binds, (o:f)(x) syntax error)
Python - binds of attribute access.
JS - '.()' is de-facto distinct operator, but no indication of it. Nice and clear indeed.

Yep. Nothing says simple and easy as large integers being silently corrupted. And god-damn IEEE abominations instead of exceptions.

Because x=Decimal('10'); x*=Decimal('2.123') would be too confusing.

Could be worse. At least it's not $@. Except when it's 'arguments' (or how that shit is called)

Kek

Reminder: nodejs is newer than python3. Year when using JS for anything other than adding useless shit to web and 'nudezz.jpeg.js' WSH worms, python was already usable for two decades.

Attached: 61693-160302-e42b5bb4b44c08aff080bfab94900cb4.jpg (333x499, 64.11K)

Here are the answers
(easy to learn compared to JS's BS)
(easy to maintain, moar cleaner libraries)
(ease of prototyping vs optimization)
(the bad environment of its competitors)

JS has two warts: 'this' and 'with'. Most people don't even know the second one is part of the language. Although JS in practice, with the DOM and framework-du-jour is a total mess, the language itself is very small and well-designed and easy to grasp. Brendan Eich > (Guido + Infinity). Read eloquentjavascript.net/ and you've got it. It's easy. The standards updates aren't perfection but they do manage to massively improve how the language is used and they're signposted and infrequent and your old knowledge never actually rots.
Python? Oh watch out that book is about oldversion and we're on an incompatible new version now. And why are we incompatible? Because the language is dense with rarely-connected features introduced over time by PEPs --and just fucking look at them: python.org/dev/peps/
Python being 'easy' is
1. pure propaganda
2. oh I learned Python and it was easy also it's my first/only language and I have no context whatsoever for saying other languages are harder
3. except I tried to learn C++ once and nearly committed suicide. Most languages are probably about at C++'s level
4. massive, unrelenting, shameless propaganda
5. although due to #1 and #4 there are lots of books so pick your poison, one of them has to not be shit
6. ooh but that one it's not compatible anymore

> PHP-tier type inconsistencies loomcom.com/blog/0097_the_wats_of_javascript.html
> Bad default libraries requiring external int64 and string operations theregister.co.uk/2016/03/23/npm_left_pad_chaos/
> NPM itself is shit compared to Conda news.ycombinator.com/item?id=14271355

Python 3 killing Python is the best thing ever. I hate legacy BS.

You mean Python-tier. It's all the same shit at Python's level. I remember people making cute little charts with Python under 'Strong, Dynamic' and Perl under 'Weak, Dynamic'. That's like the south-facing houses in a cul-de-sac in a homogenous suburb thinking that the north-facing houses in that cul-de-sac must, by their distance, hail from a completely alien and incompatible culture.

Python is a killer language. It's not even in my top 5 of languages most often used, but it's really good for plenty of things. A family member of mine is a research scientist (a nogrammer) and I recently helped him replace a spreadsheet macro with a Python script which generates plotted data and some statistical analyses. After like two weeks of working with him, he's writing his own code and barely asking me questions. The libraries available are excellent; SciPy and NumPy make Matlab look like a joke.

I'm an expert in JS and trust me, it's a hunk of shit.

I regularly write JS for work (we use React.js for our frontend), it's insanely prone to bugs, I would rather write in literally anything else. Python's strong typing is a blessing from God.

Prove it then, faggot. JS's type system is just as bad as Ruby and PHP.


Another satisfied programmer.


In-browser Python subset, I hope that is the future

and Python. That's the point. If you want a real improvement, then you have to crawl out of the scripting language developmental hole.

Bullshit, Ruby actually tells you when types don't match.

i dunno this is the first time i've read that python is a growing trend. maybe all these mentions that "python is a growing" trend are isolated to your own bubble

no, fuck off.

...

what I meant was...
nevermind
Python became an acceptable scripting language when it added += operators
the propaganda just annoys me.

Attached: nevermind.png (1718x904, 264.92K)

You are actually fucking stupid. HIT THE TAB KEY, RETARD. It's one extra button press. You're a nocoder and you will never write anything useful.

Correct, I don't "code" because I'm not a gay estrogen swilling numale python user.

Why would I do
for(var i; i < 10; i++){
console.log("Hello, world!");
}

When I could do
for i in range(10):
print("Hello, world")

Why would I use
function Dog( breed ) {
this.breed = breed;

this.bark = function() {
console.log(“Woof!");
};

When I could use
class Dog:
init(self, breed):
self.breed = breed

bark(self):
print("Woof!")

Throw in all python's libraries and you'll get my general motivation.

Get the fuck out of here and go back to Reddit you stupid faggot. Kill yourself and do us a favor.

traps are still gay though

Both of you fuck off back to /g/

when you get a lot of python in one file, it just looks like a wall of featureless code that defies the ability of your eye to scan it comfortably.
when you get a lot of python in one project, it spreads out and uses Zebra camouflage to protect the herd against any predators trying to figure where shit even fucking happens. There's just file after file of do-nothing class definitions.
JS doesn't need semicolons except
1. when the next line begins with an array literal or similar (begin the line itself with a semicolon)
2. when the next line begins with a self-invoking function (begin the line itself with a semicolon)
all of the arguments in favor of semicolons are, if you pay attention, massively retarded. Yes, even the arguments by the You Don't Know JS guy and the I-Invented-JSON-LOL guy.

Why do that when you can use Haskell.
for_ [1..10] $ const $ putStrLn "Hello, world!"
and
Data Dog = Dog { breed :: Breed }
bark = putStrLn "Woof!"

Have you ever looked at more than 10 lines of code in your life

HOW ABOUT USING THE RIGHT TOOL FOR EACH JOB
one hammer does not make a toolbox - even if you're used to bashing everything in with it

programming isn't so advanced that you can put anything like a proper toolbox together. We're like apes that have barely just figured out that we can pick bugs out of a nest with a bit of stick. Any kind of 'right tool for the job' mentality in programming is going to have you staring at a box full of bent screwdrivers with heads that don't fit any screws in use, ratchets that can't maintain a grip on any bolt, and hammers that you have to hold by the head because the head is the weakest part.

all the time. To find code worse than Python you have to go back to pre-structured languages.

class Barking a where bark :: a -> IO ()instance Barking Dog where bark _ = putStrLn "Woof!"

Because compiled, statically typed language is not always good replacement for dynamic one.

Haskell doesn't need to be compiled before it is run. Your program can even hook into ghc and compile / interpret Haskell from within your own application.

You're being too kind to JavaScript in the object-oriented example. You forgot to assign `this` to a local variable such as `that`, in order to access instance members within nested scopes.

How about you stop being OOP faggots and use object literals.

t. skiddie