[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]

python thread

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: 21
Thread images: 2

File: python-training-devmentor.jpg (10KB, 1200x600px) Image search: [Google]
python-training-devmentor.jpg
10KB, 1200x600px
python thread
>>
File: 1487544235001.png (42KB, 707x354px) Image search: [Google]
1487544235001.png
42KB, 707x354px
>>59781876
>>
i wont lerning python.
where to begin
>>
>>59781961
the latest Humble Bundle
>>
Is python the worst performing programming language ever made?
>>
>>59782776
Quite the opposite actually
>>
>>59781894
learn how to use a text editor?
>>
Why is python more popular than ruby?
>>
>>59782776
It's not THAT bad. And if you're worried about performance, then run your script in pypy.
>>
>>59782776
no, but it's probably the worst performing popular language so far
>>59782789
Quite the opposite actually

>>59782794
Because of brainlets.
>>
>>59782797
And without further modification that won't give a significant improvement.
Same applies to every AOT compiler.
>>
python is the chad of programming languages
>>
>>59782860
more like javascript is the chad of programming languages
>>
>>59781894
>I'm too stupid to use whitespaces or smart IDE for my indentation.
(you)
>>
>>59782871
More like JavaScript is the pajeet of programming languages
>>
>>59782847
>pypy won't give significant improvement without further modification
taking as an example, that sum all primes below two million meme that seems to keep getting posted on this board. I get a speed-up of 4.5 times going from cpython to pypy. Pypy's own somewhat broader benchmarks seem to suggest a geometric average speedup of 7.3 times. That doesn't really seem 'insignificant'
>>
>>59782776
Python is amazing for non-performance intensive small scripts. No 'real' program should be made in Python unless it's deep learning (I've heard Python has some very good libraries for that). It's perfectly acceptable to program in Python recreationally. I do wish they would create a 'Python 4' without the whitespace syntax though, it is slightly anoying.
>>
>>59782941
Then what's jQuery?
>>
>>59783339
a. that's insignificant, given Python is up to 500 times slower than C and comparable languages
b. it's insignificant since your benchmark is a trivial numeric benchmark, one of the easy things to optimize for in just in time compilers
The only thing that's significant is the amount of work that went into PyPy to squeeze out such little performance improvements of the script-only tier Python semantics.

They should have gone the Crystal way up front instead of rigging better semantics in the half-assed way they did with Cython.
>>
>>59783339
>speedup of 7.3 times
Woah. I just coded up a shit test to sum the primes under 2 million, and I get a 7.3x speedup with pypy on my machine.

import time
start = time.time()

n = 2000000
sieve = [False] * 2 + [True] * (n-2)
for i in xrange(int(n**0.5)+1):
if sieve[i] == True:
for j in xrange(i*i, n, i):
sieve[j] = False
print sum([i for i, j in enumerate(sieve) if j == True])

print '%s seconds' % (time.time()-start)

>poop.py
142913828922
1.31999993324 seconds

>pypy poop.py
142913828922
0.180000066757 seconds
>>
>>59782791
>>59782903
You are the retards. He made (or copied) a quine program, that prints its own content. The program had a (deliberate) indenting error, which caused the interpreter to print an error message, which is the same as the code.

The answer to the question whether it is actually a legal quine depends on how you define a quine program.
Thread posts: 21
Thread images: 2


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