[ / / / / / / / / / / / / / ] [ dir / mde ]

/tech/ - Technology

September 2018 - 8chan Transparency Report
Email
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Flag
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 16 MB.
Max image dimensions are 15000 x 15000.
You may upload 3 per post.


File: 205f0f09a5aee35⋯.jpg (10.07 KB, 348x145, 12:5, jsvsp.jpg)

 No.982461

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?

 No.982462

>>982461

Ease of use in regards to data analysis and machine learning.

JS is more a web-building thing, not a "BIG DATA" thing.


 No.982463

File: 2c3771be83b1841⋯.mp4 (2.97 MB, 1280x720, 16:9, Boogie Peg Furry.mp4)

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?


 No.982465

>>982461

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


 No.982466

>>982465

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


 No.982467

File: 1c03616581dd328⋯.jpg (42.06 KB, 800x689, 800:689, 1c03616581dd3282df67f71756….jpg)

>>982461

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


 No.982468

File: 3af0f1ffd7305dc⋯.png (48.32 KB, 256x354, 128:177, Severance Blade of Darknes….png)

>>982465

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


 No.982470

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


 No.982471

>>982461

>Why the hell is python becoming so popular?

Because it is used in many introduction to programming courses.


 No.982472

>>982470

Because of libraries or simplicity of use?


 No.982473

use the format, json

ignore everything else


 No.982476

>>982461

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.


 No.982477

>>982468

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.


 No.982485

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


 No.982490

slowpoke.jpg


 No.982508

>>982476

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


 No.982510

>>982508

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


 No.982511

>>982510

Go isn't as friendly to the tech illiterate.


 No.982516

>>982508

Perl 6 has data types.

https://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.


 No.982517

>>982508

>sh and awk

slow and can obliterate your system very easily, and syntax can be awkward. BUt POSIX tools are great

>perl

Python is a better perl than perl for anything except golf

>tcl

tcl is slow and the syntax can be esoteric. Even jim tcl is slow.


 No.982518

>>982511

>>982510

Also, Go can actually be quite annoying


 No.982519

>>982461

>They both can be a embedded into anything

>Python

>Embedded

What form of crack have you been consuming, OP?


 No.982522

>>982519

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:

>micropython

For esp8266, esp32, pyboard, micro:bit, probably some other embedded boards

>tinypy

64k bytes implementation of most of Python


 No.982524

File: e5691e99da12b39⋯.jpg (145.91 KB, 1024x768, 4:3, snake sweater.jpg)

>>982466

>but it's not like javascript is any harder, in my experience

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.


 No.982527

>>982517

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.


 No.982528

tcc + C, unironically. Or common lisp.


 No.982531

>>982517

Awk is waaaay faster than python.

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


 No.982532

>>982466

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.


 No.982537

>>982463

Fuck off back to /g/


 No.982542

>>982518

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.


 No.982546

>>982522

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


 No.982548

>>982532

>lends itself to data analysis

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.


 No.982562

File: 8d7afe4918f76c0⋯.gif (528.63 KB, 827x926, 827:926, 8d7afe4918f76c075cc130b228….gif)

>>982548

>On top of that, the very idea that a language is "good" at one thing, and therefore has acceptable flaws is retarded

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.


 No.982564

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?


 No.982575

>>982461

>Why the hell is python becoming so popular?

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

https://www.youtube.com/watch?v=2Op3QLzMgSY


 No.982576

>>982537

Fuck off back to /g/


 No.982625

File: dc63559330b2149⋯.jpg (27.21 KB, 600x425, 24:17, perl-scripts-done.jpg)

>>982517

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


 No.982656

>>982471

It shouldn't be.


 No.982697

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


 No.982705

>>982461

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.

>javascript

really nigerian?


 No.982707

>>982466

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.


 No.982709

>>982707

>>982705

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


 No.982721

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


 No.982761

>indentation

I don't even need to say anything.


 No.982762

>>982709

Python has major support for OO.

>>982761

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


 No.982763

TensorGlow


 No.982765

>>982542

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


 No.982776

>>982762

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"?


 No.982778

>>982762

>Python

>major support for OO

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

>>982721

>I also read that Paul Graham article

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

>>982709

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]


 No.982781

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.


 No.982790

>>982461

>pic

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


 No.982798

>>982778

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


 No.982812

>>982705

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

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.


 No.982816

>>982790

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


 No.982826

>>982548

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.


 No.982909

>>982532

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


 No.983055

>>982776

>The trannies in charge of python are stuffing their personal style preference down everyone's throat.

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


 No.983057

>>982778

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

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

>>982812

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


 No.983061

>>983057

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


 No.983062

>>983061

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


 No.983063

>>983057

>most of [an OO] language is class based

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

>>982826

>write your 'tight loops' in this other language

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


 No.983066

>>983063

>typical Python programmer

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


 No.983074

>>983066

>an OO language has basic shit that's not special, which means its support for OO isn't shit

^ 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?


 No.983085

>>982461

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


 No.983090

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.


 No.983179

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


 No.983200

Python is the solution to the brogrammer problem.


 No.983206

>>983090

Based bracketbro


 No.983272

>>983074

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.


 No.983355

>>982776

>Heaven forbid you try writing Python in any editor besides a bloated as fuck IDE designed for that kind of shit.

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.


 No.983393

>>983355

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.


 No.983397

File: 1a70ca4cdcabc27⋯.jpg (64.11 KB, 333x499, 333:499, 61693-160302-e42b5bb4b44c0….jpg)

>>982461

>javascript be a better scripting language

>1+"kike" is not error

>1-"kike" is NaN

>"undefined is not callable"

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

>o.f(x) bind, (o.f)(x) do not.

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.

>no integers

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

>no operator overload

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

>Functions have variable number of arguments, signature is just a hint. No checking, no default values, no by-name argument passing,

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

>variables are set as global by default

>for-in loop iterates over object attributes, except specially marked by runtime system

>objects map only strings

Kek

>what is standard library

>libraries that become obsolete faster that soy smoothie passes through cuck's digestive tract

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.


 No.983502

>>982466

Here are the answers

>>982524 (easy to learn compared to JS's BS)

>>982532 (easy to maintain, moar cleaner libraries)

>>982826 (ease of prototyping vs optimization)

>>982778 (the bad environment of its competitors)


 No.983516

>>983502

>Python is easier to learn than JS

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 https://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: https://www.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


 No.983529

>>983516

> PHP-tier type inconsistencies https://loomcom.com/blog/0097_the_wats_of_javascript.html

> Bad default libraries requiring external int64 and string operations https://www.theregister.co.uk/2016/03/23/npm_left_pad_chaos/

> NPM itself is shit compared to Conda https://news.ycombinator.com/item?id=14271355

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


 No.983532

>>983529

>PHP-tier type inconsistencies

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.


 No.983543

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.

>JavaScript

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


 No.983559

>>982461

>Wouldn't javascript be a better scripting language?

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.


 No.983563

>>983532

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

>>983543

Another satisfied programmer.

>>983559

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


 No.983637

>>983563

>JS's type system is just as bad as Ruby and PHP

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


 No.983644

>>983563

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

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


 No.983646

>>982461

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

>>983516

>the language itself is very small and well-designed and easy to grasp.

no, fuck off.


 No.983649

>>983646

<I don't like it therefore obvious facts aren't real

>>>/r/TwoChromosomes


 No.983652

File: 68b257b0499a3cc⋯.png (264.92 KB, 1718x904, 859:452, nevermind.png)

>>983649

>private community

what I meant was...

nevermind

Python became an acceptable scripting language when it added += operators

the propaganda just annoys me.


 No.983679

>>983393

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.


 No.983683

>>983679

>You're a nocoder

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


 No.983704

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.


 No.983739

>>983649

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


 No.983750

>>982463

traps are still gay though


 No.983756

>>982537

>>982576

Both of you fuck off back to /g/


 No.983764

>>983704

>these trivial examples are short in Python

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.

>semicolons

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.


 No.983775

>>983704

Why do that when you can use Haskell.

for_ [1..10] $ const $ putStrLn "Hello, world!"

and

Data Dog = Dog { breed :: Breed }

bark = putStrLn "Woof!"


 No.983777

>>983764

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

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


 No.983781

>>983063

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


 No.983783

>>983781

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.

>>983777

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


 No.983798

>>983775

>bark = putStrLn "Woof!"


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

>Why do that

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


 No.983834

>>983798

>compiled

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.


 No.983850

>>983704

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.


 No.983907

>>983704

>>983850

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


 No.983942

>>983907

t. skiddie


 No.983983

>>983637

Not for Python's type checks

>>983644

Type coercion is illogical

>>983704

I want Python to bring back { ; } so I can code golf with it

Also indentation is shit since tabs vs spaces are not explicit rules

>>983781

>>983783

reminder that Python is general purpose, and combining that with C, Asm, Go, Haskell, Lisp and JS/Typescript you need nothing else


 No.984118

>>159166


 No.984197

File: 5a66b415ddb794a⋯.gif (151.78 KB, 400x267, 400:267, 1375857314515.gif)

>python script no longer works because you used pyqt4 to make the graphical frontend and pyqt4 is deprecated and removed from your repo so when you updated it got removed

>now have to learn pyqt5 bindings to fix it

t-thanks...


 No.984205

<lua's a much better language though

>LUA_INIT means it's not safe for sysadmin work since someone could forget this backdoor and make a script setuid

<luapower has a way to produce single executables from scripts though, and those executables ignore LUA_INIT

>they also have 5x the startup overhead of a bare 'luajit myfile.lua'

shit like this is why Python isn't dead yet


 No.984537

>Try python

>Have to use 4 spaces

Dropped it faster than a sack of hot shit.


 No.984543

>>984537

You can use any number of spaces, or even tabs, nigger.


 No.984547

>>984543

Nonsense, anon said he invested nine seconds into the language and gave up. Get on his level.


 No.984549

it is slow af, much like the pajeets, womyn, and shitskins it's designed to appeal to. was there a question OP?


 No.984980

>>984197

Qt is to blame for this


 No.984983

>>984980

>python libraries being removed by the python repo is the fault of QT despite QT4 still being usable.

checks out


 No.984985

>>984983

If Qt wants to pull a library and replace it with another you can't blame them

https://sourceforge.net/projects/pyqt/files/PyQt4/

https://www.qt.io/qt-for-python <= They want PySide2 to be standard


 No.984989

>>984985

>Letting random organizations brick your repo

you guys are almost as bad as the idiots that run NPM where one package got deleted and fucked thousands of projects


 No.984992

Does anyone here use Jupyter notebooks?


 No.984994

>>984992

no.

what do you want to know about them?

they're basically an .org file in Emacs but with better graphics. And worse languages.


 No.984995


 No.984996

>>984994

I don't know much about them, but I've dabbled in the past and quite like them.

I was skeptical before because I thought people were suggesting they replace text editors/IDEs etc...

They're more for writing documents with code that generates quick results (visual otherwise) included.


 No.984997

>>984996

visual or* otherwise


 No.984999

No surprise that there are a lot of nogrammers giving their opinions on python. Pro-tip time:

-It's shit

-It's slow

-Forced spaces/tabs

-Dynamic crap all over the place

-Which means it gets more confusing the bigger it is

-Available IDEs are fuck huge

-Trannies

The only positive is that it is paying my bills. I guess the snake motif is kinda cool, too.


 No.985011

>>984999

Switch to Julia. It's fast.


 No.985013

>>984999

>Trannies

in Python? Where? Haven't heard of them.

I thought the trannies were all over in FP langs.


 No.985014

>>983683

I just got it. Static languages are more masculine, which is why soycoders flock to python/js/ruby/php.


 No.985031

>>984999

Now compare it to JS.

- less shit

- gets stuff done

- never confusing (unless you overuse OO)

If you want to be static like >>985014 I suggest Go, Kotlin, Crystal, D, Nim or (((Rust)))

Also https://github.com/mathialo/bython is a thing

and http://python-with-braces.appspot.com/ too


 No.985032

>>985031

>- less shit

>- never confusing

decorators, list comprehensions, generators, operator overloading, metaclass bullshit, GIL

Python is stuffed with shit that doesn't make the language any better, it's not essential, it's not even the best way to do things, it's just something that someone liked once upon a time and got past Guido (which is like getting a football past a concrete bollard. You just have to not aim directly at the thing and you win.)

everything good about Python is propaganda. "There should be one-- and preferably only one --obvious way to do it." ? Ancient history.


 No.985042

>>985011

>1-indexed arrays

Disgusting.


 No.985067

File: d835df8a3a55dfd⋯.gif (354.43 KB, 500x442, 250:221, 1539059352088.gif)

>>982461

A better question is why the fuck does JS still exist?


 No.985097

>>985032

>decorators, list comprehensions, generators

>confusing

You're a brainlet. Quit programming, try McWagecucking instead.


 No.985100

>>985097

Programming brings decent money only through advanced wageslavery.


 No.985147

>>984999

>-It's slow

this doesn't matter for many general desktop application things however.

>-Forced spaces/tabs

I used to dislike the python tabbing, but overall I think it works better than the curly braces of C and Java.

The common problem I had with the braces was accidentally deleting a closing brace, and then saving the file causes the IDE to try to re-indent the whole file correctly with what was left. So now you can no longer see where the deleted brace should go. ....You do not ever get that problem in Python tabbing, since every line has its own spacing. There is no closing bracket to accidentally delete.

I kinda wish that C and Java used 'opening' and 'closing' statements. Personally I think that would be best.

such as:


function_begin: this_function_name()

// whatever code goes in here

function_end: this_function_name()

This way you avoid the need for indents but the IDE could still tell if you were trying to (incorrectly) delete the closing line of a function.

And when you type the opening line, the IDE could automatically generate the closing line for you. So usually it really wouldn't be much more typing.

A lot of newer languages seem to try to save you from typing a few keystrokes, but their syntax of the source files isn't nearly as clear.

As the code length increases the main problem you have is code clarity, not excessive typing.

Overall it is better to write the source code to be easier for people to understand, since the computer can/will generate its own version anyway.


 No.985189

>>985147

But then you can't go fast and loose with braces code-golfing (line count, not character count)


 No.985224

>>985147

>I kinda wish that C and Java used 'opening' and 'closing' statements

<Let's make C and Java even more verbose than they already are

no


 No.985243


 No.985272

>>985243

Michael Pinoy Reeves is the shit


 No.985278

>>982532

>the syntax lends itself to data analysis

What a load of horse shit.


 No.985279

>>982798

Lua: It may be shit, but at least it's fast shit.


 No.985280

>>982826

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

Pythons syntax is wholly mediocre, any dynamic language with a REPL will let you iteratively "sling data around" and Python's metaprogramming facilities are awful.

The reason python is used so often for data analysis is because of the libraries that exist for it. It's got nothing to do with the syntax, except insofar as the syntax can be cited for the reason why non-CS stem students are taught it in introduction programming classes and consequently chose to use it when writing their own software including aforementioned libraries.


 No.985281

>>985279

Lua: fast to run

Python: fast to prototype

PHP: fast as fuck boi

>>985280

The libraries will never be on par so


 No.985287

>>983637

>JS's type system is just as bad as [...] Python

I'm a python critic but that's just factually incorrect. JS has weak typing, python has strong typing. Both are dynamic, but weak dynamic is objectively worse than strong dynamic.


 No.985295

>>985281

PHP cannot keep up with LuaJIT. But that's hardly relevant since you'll just about never hear both of them proposed as possible solutions for the same problem. And for that matter, you'll hardly ever hear LuaJIT and Python proposed as possible solutions for the same problem. Basically nobody uses Lua for anything other than an embedded scripting language in another application, and you'll hardly ever hear python proposed seriously as an embedded scripting language.

>The libraries will never be on par so

I never said otherwise; I agree. Python's position is entrenched, threatened only by Julia which makes a point of supporting Python's libraries as a way of cheating the system by giving itself access to Python's ecosystem.

My point is that python's syntax isn't anything special. it's not particularly composable when compared to other dynamic languages, nor is it's metaprogramming story very good.


 No.985365

Nim and Julia are both large improvements over Python, but I think Nim beats out Julia because of static typing.


 No.985375

Python is great for little scripts on the server. Only decent thing that came from Javascript is json merely because it killed SOAP web services. Otherwise Javascript needs to die in a fire. I blame Google for resurrecting Javascript back in the mid 2000s.


 No.985435

>>985243

Wish I had heard of this guy before.


 No.985440

>>985287

>JS has weak typing

>python has strong typing

weak/strong is pure propaganda, not a meaningful description of type systems. Neither JS nor python let you do something like "pull the seventh 8-bit int out of the array of 64-bit ints". JS mainly has a very eager-to-coerce == operator. You would not 'weaken' Python's type system if you added a loose_compare function t it and used that.

Don't debate me on the precise use of these terms. Rather, don't use these terms. No matter how 'rightly' you use them, they don't help you. They're a bad meme.

JS's type system is just as bad as Python's when when you consider the sorts of errors that they can protect you from. (In JS, this means the sorts of errors after you drop == and use === everywhere like literally everyone has) ATS, which can "pull the seventh 8-bit int out of the array of 64-bit ints", has a type system that can protect you from such errors as buffer overrun. Yes, with the type system. So such errors show up at compile-time. Regardless of how 'hot' that code-path is. Such a type system is like pair-programming with an autistic genius. Python's type system is like pair-programming with a seeing-eye dog.


 No.985449

>>985440

Shutup retard


 No.985486

>>985440

>like literally everyone has

Why? I can't see any measurable difference in performance on my system.


 No.985488

>>985440

var t=1;


var p1=performance.now;
for(var i=0;i<100000;i++){
(t==2?true:false);
}
var p2=performance.now;
console.log(p2-p1);

227.80000000004657

vs


var p1=performance.now();
for(var i=0;i<100000000;i++){
(t===2?true:false);
}
var p2=performance.now();
console.log(p2-p1);

227.4999999999709

And now tell me that === is a must for performance. I would recommend only using it when you actually have to.


 No.985491

>>982625

>However it's a language designed for level 99+ wizards

And since not many people are level 99+ perl wizards, you will inevitably deal with utter trash nearly each time you come upon perl code in the wild.


 No.985493

>>985488

what?

your benchmark clearly shows that === does massively less work than ==. which should be really obvious from a description of what == even does.

Even though === is obviously much more performant, I don't say you should use it for that reason. You should use it because it's usually what you want. =='s for shit like, you want to check a member of an object you deserialized from JSON from a source that you suspect may not reliably be able to put 123 into an object instead of "123".


 No.985501

>>985493

Bullshit if you run it a few times the first one varies a bit up and down and the second one too.

HAHA I just noticed my mistake:

I posted the wrong shit for test 1 here's what I actually ran(notice that the one before doesn't even execute because of the missing parentheses after performance.now):


var p1=performance.now();
for(var i=0;i<100000000;i++){
(t==2?true:false);
}
var p2=performance.now();
console.log(p2-p1);

Each time you run it the result varies from 227 to 228.

So there is clearly no measurable difference for 100000000 cycles ON MY SYSTEM!


 No.985504

>>985501

const n = 100000000

console.time("==")
for (var i=0; i<n; i++) i==2?true:false
console.timeEnd("==")

console.time("===")
for (var i=0; i<n; i++) i===2?true:false
console.timeEnd("===")
As used
$ for x in 1 2 3; do node blah.js; done
==: 73.442ms
===: 71.837ms
==: 71.523ms
===: 74.952ms
==: 72.809ms
===: 72.116ms
so the thing you brought up on your own, performance, doesn't matter. Pick === based on it being what you actually want most of the time.


 No.985505

>>985504

if you assign a var in the loop instead of throwing the value away, and then also print that var afterwards, times jump to 130ms from those numbers. But there's still no detectable ==/=== difference.

wtf am I even writing JS benchmarks though

why did you do this to me?


 No.985506

>>985493

>you deserialized from JSON from a source that you suspect may not reliably be able to put 123 into an object instead of "123".

DOESN'T happen:

>JSON.parse("34243")

>34243

>JSON.parse('{"dfsf":34243}')

>{dfsf: 34243}

Where's your problem? All browsers do that. Don't tell me it's about IE support.

>>985504

That's what I said. Glad you agree.


 No.985509

>>985440

>weak/strong is pure propaganda

Go back to halfchan


 No.985512

>>985509

it's literally what people say when they know three languages that all have shit type systems


 No.985519

>>985365

Nim/Go will be king, and soon Python will just be a wrapper for Nim/Go, and Nim/Go will be a wrapper for C. Fuck Rust, Ruby and Julia.

>>985506

This is why Python > JS


 No.985528

>>983983

go is googleshit.


 No.985530

>>985505

That's just because console.log() itself takes a fuckton of time. You never want to be putting that shit in loops because it'll murder performance.


 No.985537

>>985530

no. try it yourself. the console.log is *outside* of the benchmarked code. node is just doing some dumb optimizations that break benchmarks but never benefit real code.


 No.985580

File: 125147a09db9c5d⋯.png (329.97 KB, 668x664, 167:166, disgusting.png)

>>985519

>Python > JS

Lua > JS > Python

Git gud

Anyone got that "object oriented" image. I can't find it anymore. I need it to make fun of OOPfags wherever I find them.


 No.985659

File: a10a91a603142ca⋯.jpg (116.81 KB, 1224x720, 17:10, 1459879567483.jpg)

>>985580

>JS > Python


 No.985667

actually programming in C++ > this shit thread


 No.985689

File: beb218584341c56⋯.png (21.43 KB, 331x286, 331:286, c7e6c0ba62635e8364c7566d88….png)

>>985659

>anon can't deny that Lua is better than Python

Found the pythonfag.

>>985667

>Pure C > Impure dirty C++

R U MAD NOW?


 No.985692

>>985580

Python is OOP in the same sense smalltalk is OOP


 No.985696

>>985692

I know about it not being based on OOP but if you ask the pythonfags why python is better they answered that it's great at OOP. One could say the same thing about JS.


 No.985711

>>985692

>python's shit OOP

>anything at all like smalltalk's OOP

you stupid motherfucker

https://www.youtube.com/watch?v=0fpDlAEQio4&t=44m


 No.985746

>>985440

JS coerces everywhere, not just for ==. "23" - 7 = 16, "23" + 7 = "237", "23.5" & 15 = 7. Compare perl: "23" + "7" = 30, "23" . 7 = "237", "23.5" & 15 = 7. Python tries it's best never to coerce implicitly except between int and float ofc. I admit it would be nice to have buffer overflows caught at compile time, but python, unlike js, will at least error at runtime not for underflows though lol.

>>985711

Python is very similar to smalltalk. eg operations on ints are just methods:

>>>(7).__add__(5)
12

ifs statements implictly call bool, for statements call iter, etc.

It has a much larger syntax, and it uses text files, but those are unrelated to the implementation of oop.


 No.985821

>>985365

You can give types in Julia if you want, but it isn't needed.

e.g. instead of

 
function f(x)
return x^2;
end

you can specify


function f(x::Float64)
return x^2;
end

https://docs.julialang.org/en/v1/manual/types/


 No.985964

>>985821

I'd prefer it to be non-optional, in the event that I'm picking up an existing codebase.


 No.986031


 No.986222

>>985746

>Python tries it's best never to coerce implicitly

You do not try to 'never coerce'. You just don't implement that stupidity.


 No.986233

>>985746

>Python is very similar to smalltalk

You mean Ruby.




[Return][Go to top][Catalog][Nerve Center][Cancer][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / mde ]