[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>open source >free as in freedom >easy to use and learn

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 118
Thread images: 14

File: python-logo.png (82KB, 601x203px) Image search: [Google]
python-logo.png
82KB, 601x203px
>open source
>free as in freedom
>easy to use and learn
>literally the go-to sotfware for machine learning

Is there anything she can't do?
>>
Thread parallelism
>>
>>61430947
>>open source
>>free as in freedom
That means literally nothing for a programming language. Any language with a proprietary reference implementation is usually laughed out of the room.
>>
File: 1475213807629.jpg (12KB, 258x245px) Image search: [Google]
1475213807629.jpg
12KB, 258x245px
>>61430947
>literally the go-to sotfware for machine learning

I can think of 3 languages that are better off the top of my head.
>>
>>61430973
kys
>>
>>61431001
>I can think of 3 languages that are better off the top of my head.

name them

protip: pything you can't
>>
>>61430947

switch statement
>>
have a cute anime girl mascot
>>
>>61430976
>open source means literally nothing for a programming language.

really nigger?
>>
File: trashman.gif (2MB, 580x433px) Image search: [Google]
trashman.gif
2MB, 580x433px
>>61430947
>Formatting is the syntax
>>
>>61431062
>this kills the pythoner
>>
static typing
>>
>>61430973
>>61431062
Yep.
>>
>>61431075
I should have made my statement more clear. It's important, but it's a feature that basically EVERY language has, and there is no point bringing it up.
It's just as useless as saying that a language has an FFI with C.
>>
>>61430947
It's only good for prototyping ML.
Anything serious is in C/C++
>>
>>61431089
>>61431062
>>61430973
If Python is so bad, then why is Python the #1 software for machine learning?
>>
>>61431112
Because you absolute buffoon, machine learning is just another hipster buzzword like "cloud computer" and is completely useless.
>>
>>61431112
[citation needed]
>>
File: 1478809550743.jpg (64KB, 798x770px) Image search: [Google]
1478809550743.jpg
64KB, 798x770px
>>61431133
>machine learning is just another hipster buzzword like "cloud computer" and is completely useless.
>>
>>61431170
Kill yourself, you fucking retarded frogposter.
>>
File: 1480184173875.gif (405KB, 359x371px) Image search: [Google]
1480184173875.gif
405KB, 359x371px
>>61431185
>says the retard who thinks machine learning is useless
>>
are there any languages out there that are node/blueprint based like in Unreal engine 4 (i realize underlying the blueprint system is c++).
>>
Python is great if you want an easy to use lang with a massive amount of libs. Where it fails however is with its syntax and performance, especially with threading. That said it's fine for majority of the people who use it and the ones who need raw performance are either using C anyway or have their performance-critical shit in Python as a C module (see numpy for example)
>>
>>61431112
Machine's can't learn. Machine "learning" is just a sorting algorithm. You can implement exactly the same thing in any language.
>>
>>61431112
>If Python is so bad, then why is Python the #1 software for machine learning?
Python is easy to learn and libraries like Numpy are awesome.

Numpy allows the beginner programmers to get the performance of c/c++ in array manipulation with the ease of Python programming.

Numpy is not the only reason but it is huge with many of the Python ML/Neural network content online.

The link below is a great example of how people are using Python + Numpy to get familiar with NN and ML.
https://iamtrask.github.io/2015/11/15/anyone-can-code-lstm/

Note: I am a fan of Python but outside of certain task the speed and efficiency of C/C++ is undeniable. Also, I am already a long time user of OpenMP/OpenACC and switch cases are nice.
>>
>>61430947
It's also exceptionally in demand for God knows what reason
>>
>>61431170
It's not useless, but it is absolutely a buzzword.

ML is just the CS department discovering statistics and thinking they invented something special.
>>
>>61431253
>for God knows what reason

it's better than java
>>
File: 3ad.jpg (36KB, 348x498px) Image search: [Google]
3ad.jpg
36KB, 348x498px
>>61431452
S-stop it anon
>>
>>61430947
Convince people to upgrade in a reasonable amount of time that doesn't fracture the community.
>>
>All these mad cs cucks claim python is terrible
>Literally the most common programming language among scientists who do heavy numerical computation
>>
>>61430947
>she
>>
>>61430947

>Is there anything she can't do

Be relevant beyond version 2.7
>>
be backwards compatible
fuck python
>>
>>61432923
scientists are shitty programmers
>>
>>61433483

And even terrible programmers can get shit done with python. Why bother with something that is needlessly complex for the sake of complexity with there exists a simple yet powerful alternative?
>>
>>61431112
Once people realize NumPy is just a C wrapper, and D is basically compiled Python with waaaay better metaprogramming and multithreading, the move will be made. Scientific and compute libraries are already being developed in D because it checks literally every mark for a productive scientific language.
>>
>>61432923
>Implying anyone where with a CS degree is calling python shit
>Implying anyone here has a CS degree
>>
>>61430947
Dependent types
>>
>>61431062
you don't need a switch statement
>>
>>61431254
Yea but it's only after a CS department discovered it, will it ever become massively implementable and useful.
>>
>>61431214
Theres a pretty neat language called "Scratch" that I think might be more your speed
>>
>>61430947
>threads
>SIMD
>? :
>++ and --
>>
>>61430947
It's a shit language that isn't suitable for anything more than glue code and training code monkeys
>>
>>61431062
use a dictionary, bitch
>>
>>61430947
Avoid getting banned because people make viruses with it?
>>
>>61433751
>>Once people realize NumPy is just a C wrapper
>Once people realise the entire reference implementation of python is "just a c wrapper"
>Once people realise this line of thinking is retarded
>>
File: hailpython.jpg (41KB, 700x698px) Image search: [Google]
hailpython.jpg
41KB, 700x698px
>>61430947
Python is great when you need something small.
But it's hard to maintain large scale applications.
>>
>>61431112
because it's easy for academics and researchers, nothing more
>>
>>61433751
D will never be more than a tiny, tiny niche and anybody that thinks otherwise at this point is retarded.
>>
>>61430973
/thread
>>
>>61430947
Nim is everything Python should have been actually
>>
File: Julia_prog_language.svg.png (43KB, 1200x811px) Image search: [Google]
Julia_prog_language.svg.png
43KB, 1200x811px
What about Julia?
>>
>>61436709
>Meant only for numerics
>>
>>61430947
3d or even 2d engines
>>
>>61431062
Use a dictionary.
>>
>>61431112
i use R sooo
>>
>>61430973
Fpbp
>>
>>61433388

Fuck backwards compatibility. It costs us too much. Look at god damn windows. Time to embrace containerization.
>>
>>61433751

Standard python runs C out of the box. The entire fucking thing was made as a C wrapper on purpose. Im pretty sure there is a version that works the same for java if you are sick.
>>
>>61437236
R is literally inferior to Stata
>>
>>61430947

> better than Perl

I'm sold
>>
>>61431001
>>61431055
C++? Aside from that nothing comes to mind.
Perhaps OCaml and Prolog, but they're far from being as popular as Python.
>>
>>61431112
It's #1 because most of the people in ML are pajeet-tier and use Python since it's easier to use.

Best languages for ML/similar workloads are R/matlab probably even haskell and C/C++ in terms of performance, there just aren't that many frameworks written in them because it actually takes a brain to make them and they are way more fragile than your scripting language
>>
>>61438818
>probably even haskell

Haskell has zero relevant ML libraries.
>>
>>61438851
i didn't said there are good haskell ML libraries,the reason why it's obvious, the language itself it's not that mature in comparision with the other ones.

It's only a question of when
>>
>>61431062
>>61434781
These.
> But anon, you don't need <insert convinient thing here>
> Somehow the language also 'needs' keywords like elif and map/reduce
>>
>>61438851
>Haskell has zero relevant libraries
>>
>>61439088
This. Making a competitive ML library requires a huge investment. Even GHC doesn't see that kind of cash. Haskell will NEVER be relevant.
>>
>C# programmer.

Just to get an impression of Python, how would the following C# code translate to Python?

var MercedesHorsePower = MyListOfCars.Where(c => c.BrandName == "Mercedes").Select(c => c.HorsePower).Average();
>>
>>61439360
from statistics import mean
MercedesHorsePower = mean(c.HorsePower for c in MyListOfCars if c.BrandName == "Mercedes")
>>
>>61439436
Thanks. That's pretty declarative.

Are you using list comprehension?
.. And is MercedesHorsePower an implicit type (since you don't seem to declare any type for it)?
>>
>>61439530
it's actually a generator comprehension; the runtime doesn't allocate a huge-ass list of intermediate values (i.e. Mercedes vehicles), instead producing them in O(1) space as a for loop would
Type declarations are unnecessary because Python is dynamically typed. You can optionally annotate expected types in function declarations and whatnot but that's just to help tooling catch simple errors. The runtime doesn't use those annotations for any optimization.
>>
>>61439629
Thanks.

I actually used Python for school (several years back), but I forgot all about it. Never dug into it fully, since it was just used for some assignments.

>instead producing them in O(1) space as a for loop would
As I understand you, you produce an iterator..?

In the following code:
type(c.HorsePower for c in MyListOfCars if c.BrandName == "Mercedes")


What would this return? A list? A list iterator?
.. And would it run the generator - that is, produce the list of projected items?
>>
>>61439822
It would return a generator. If you want to force the realization of a list you can pass the generator to the `list` function. The generator won't actually do anything until it is required to.
>>
>>61436825
Julia is general purpose and is not fagotry oop
>>
>>61432923

> Heavy Numerical Computation
> Not FORTRAN

kek
>>
>>61431079
underrated post
>>
>>61442204
Julia is also going nowhere and has maybe 50 users worldwide.
>>
IDLE's been hanging on me with how much data I'm feeding it. What DE do I use with Python now?
>>
>>61444380
Visual Studio Code
>>
>>61444380
pycharm or vscode
>>
>>61438851
https://github.com/tensorflow/haskell
>>
File: apu.png (9KB, 1027x731px) Image search: [Google]
apu.png
9KB, 1027x731px
>>61430973
Thanks gil

KMS
>>
>>61444380
>IDE
>for python
>>
>>61430973
There are workarounds tbqh, but they are retarded so yes. Having to duplicate memory for each worker it's a pain in the ass, especially if you have big data structures
>>
R is THE programming language for Machine Learning

It's not even a contest
>>
Offtopic: thank you op for reminding me to look for php alternatives
>>
>>61430947
>she
That's a guy.
>>
>>61445861
>not using an IDE
>>
>>61446156
Vim, with pdb for debugging. You don't need anything else.
>>
>>61431112
>why is python the #1 language for linear algebra
because there are a million good libraries for it and its easy to learn. nothing to do with actually being good.
>>
File: Screenshot_2017-07-08_00-10-31.png (134KB, 923x1163px) Image search: [Google]
Screenshot_2017-07-08_00-10-31.png
134KB, 923x1163px
>>61431062
Even bash has this. Bash is also faster than Python. Why use Python at all?
>>
>>61435107
>it's hard to maintain large scale applications.
this is true for every language in my experience.
>>
>>61446245
>bash is also faster than python
What the fuck shitty benchmarking is this?

Deducting the startup times suggests adding in elements to the python list and dict is considerably faster than bash.
Of course, this could be better established if they increased the number of elements being added by a few orders of magnitude.
>>
>>61436709
julia is not a scripting language
>>
>>61447890
Yes, but for general smalls programs and scripts, how often are you growing arrays by large amounts? You're not, and as such bash is faster.
>>
>>61446245
This has to be one of the dumbest benchmarks I've ever seen.
>>
>>61447970
Let's state things in a way that doesn't make you seem like an idiot.

Bash has a shorter startup time than python. This is a constant time task, ie it does not grow as the workload increases.

In the only attempt that benchmark makes to determine actual execution of instructions, python appears many times faster than bash, though more thoughtful testing by a less retarded person is needed to confirm.
>>
>>61447970
In general, you want the program to do "something", not just open the bash or python interpreter then quit.
>>
>>61448541
Your idiotic damage control applies just as well to the JVM. Yet most people (thankfully) don't write command line utilities in Java.
>>
>>61448518
I have just tested a large majority of my bash scripts, and nearly all complete under 50ms. If they were written in dash, they'd be up to 2.5 faster, and such rewrites are usually trivial if needed for performance/compatibility.
Many of these scripts run at boot/login, and as such replacing with CPython would guarantee ~50ms runtime per script just to get the interpreter up and running - absolutely unacceptable.
Also, keep in mind that Python compiles to bytecode, while shell does not - without bytecode, Python would be even more crippled than it already is. And as such, any performance deficiency in Python is far more relevant than in bash, because in bash it's expected, while in Python it's the usual "b-but f-faster to develop".
Basically, bash and shell is far more versatile and faster for general purpose tasks than Python is, as well as less verbose, despite the claims to the contrary by many a Python codemonkey.
>>61448541
Yes, and while bash is doing something, the Python interpreter hasn't even started. While Python is still starting up, you can sum the primes under 2 million 100 times over in C.
>>
File: mspaint_ralph.jpg (49KB, 720x644px) Image search: [Google]
mspaint_ralph.jpg
49KB, 720x644px
>>61448643
>Gets nailed on using the blanket statement "bash is faster than python"
>Desperately backtracks to "i-it's faster if you just start the interpreter then quit without really doing anything"
>then accuses others of damage control
>>
>>61448864
>Yes, and while bash is doing something, the Python interpreter hasn't even started. While Python is still starting up, you can sum the primes under 2 million 100 times over in C.
please tell us how long it takes to compute the primes under 2 million in bash
>>
>>61448911
#!/bin/bash

limit=$((2 * 10**6))
[[ ! -z $1 && $1 =~ ^[0-9]+$ ]] && limit=$1

sieve () {
declare -i sum i j
[[ $1 -ge 2 ]] && sum=2 || exit
for ((i=0; i<=$1; i++)) {
x[i]=1
}
for ((i=3; i<=$1; i+=2)) {
[[ ${x[i]} -eq 1 ]] && {
sum+=i
for ((j=i*i; j<=$1; j+=i)) {
x[j]=0
}
}
}
echo "$sum"
}

sieve $limit

$ time bash sieve.sh
142913828922

real 0m39.394s
user 0m39.312s
sys 0m0.080s

Not the most optimized code. As you can expect, loops and arrays are slow in bash. But that's not the point, the point is Python is bloated with 50ms startup, and as such for not intensive tasks, is inherently slower than bash.
>>
File: 2017-07-19-001417_412x37_scrot.png (5KB, 412x37px) Image search: [Google]
2017-07-19-001417_412x37_scrot.png
5KB, 412x37px
>>61449049
kek
ruby shits all over both of your disgusting deprecated garbage languages.
include Math

def sum_seive(n)
arr = Array.new(n, true)
sum = 0
(2..Math.sqrt(n)).each do |i|
if arr[i] == true then
c = i*i
while(c<n) do
arr[c] = false
c += i
end
end
end

(2..n).each do |i|
if arr[i] == true then
sum = sum + i
end
end
return sum
end

puts sum_seive(2000000)

and this isn't even an optimized sieve
>>
>easy to use
No it isn't, you need to install an interpreter to run Python programs and that's too hard for most normies.
>>
>>61449667
But Python comes installed by default on most Linux distributions.
>>
>>61449667
normies can't comprehend what PATH is on windows either even though it's really simple
>>
>>61449167
>.42s
Python is faster.
$ time python3 sieve_of_Eratosthenes2.py 
142913828922

real 0m0.312s
user 0m0.300s
sys 0m0.008s

Not posting my code, because you'll just copy it.
>>
>>61449761
Normies don't use LInux.
>>
Be as fast as a compiled language
>>
File: IMG_0937.png (54KB, 1344x770px) Image search: [Google]
IMG_0937.png
54KB, 1344x770px
>>
>>61449854
>ruby person: this is raw algorithm I haven't optimize it yet
>python person: sieve_of_Eratosthenes2
>2
>fucking 2

>python is faster, guy!!
>>
>>61433483
Why?
>>
>>61450143
will sepples ever recover?
>>
>>61430947
i will drop a little secret at the bottom of this thread so it stays secret

>best language GDscript
>>
File: 13.jpg (22KB, 400x400px) Image search: [Google]
13.jpg
22KB, 400x400px
>>61431086
Thread posts: 118
Thread images: 14


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.