r/Python • re-learning after a 10 years stop • Dec 09 '18

Congratulations, we are (a bit) over 300K

Post image
1.2k Upvotes

47 comments sorted by

31

u/misterlight re-learning after a 10 years stop Dec 09 '18

Too bad Javascript is over 450k...

20

u/Itakitsu Dec 09 '18

Too bad two communities can’t be mutually successful...

10

u/sorlafloat Dec 09 '18

But what's the exchange rate?

18

u/TraditionalVegetable Dec 09 '18

What is the exchange rate between schrute bucks and Stanley nickels?

5

u/dogooder202 Dec 09 '18

same as the "ratio of unicorns to leprechauns."

24

u/[deleted] Dec 09 '18

Well. It does power the web. Maybe one day...

7

u/__xor__ (self, other): Dec 10 '18 edited Dec 10 '18

For real though it would be absolutely amazing if they made a frontend python language. Chrome devs need to make this happen stat.

<script type="webpython">
if 'name' in URI.params:
    for element in DOM.find('h5'):
        element.text = 'Hello, {}'.format(URI.params['name'])

def say_hello():
    field = DOM.get(id='name_text_field')
    alert('hello, {}'.format(field.value))

btn = DOM.find('button').first()
btn.on_click(say_hello)
</script>

If they can turn Javascript into a backend language with node then they can turn python into a frontend language like javascript.

6

u/abrazilianinreddit Dec 10 '18

It's nothing official or a standard, but there are some projects that do just that.

2

u/Zegrento7 Dec 11 '18

Skulpt is pretty cool too. If only there was an official wasm port of Python...

3

u/nulleq Dec 10 '18

My issue with the front end isn’t with JavaScript — syntactically it’s not that different from Python; it’s with HTML and CSS and how that interacts with JS.

1

u/notquiteaplant Dec 10 '18

However Python is strongly typed and JS isn't, which is the source of many woes

1

u/[deleted] Dec 10 '18

As someone with mostly backend Python experience that has struggled with JS, can you explain to me what those woes are?

I have also dreamed of a world where the web runs on python

2

u/notquiteaplant Dec 11 '18

JS is weakly typed, which means values don't have a single defined type, and will implicitly cast between types to make things work out. For example, '3' == 3 and '5' - 1 == 4 - strings with only digits will act like numbers when you do number-like things on them. The problem is when different types have different semantics for the same operators, and JS has to choose, because it will be inconsistent with at least one of them. For example, number + number adds numerically, and string + string concatenates; for string + number, do you coerce the string to a number and add numerically, or coerce the number to a string and concatenate? (JS concatenates, which is inconsistent with the rules of adding numbers, e.g. '1' + 1 == '11' == 11.)

Python is strongly-typed, and avoids these problems by erroring in any ambiguous situation. This ensures you get what you ask for by making you ask for the behavior you want (by calling str or int/float).

1

u/[deleted] Dec 11 '18

is there anything about this that actually helps JS for frontend applications? ive never really understood how JS got so far ahead of python on the web. is it just a head start thing? because it does seem far less intelligible as a language.

1

u/notquiteaplant Dec 11 '18

I think it was just a head start too. If you consider that it will keep on going for as long as possible without erroring (a la PHP) as a benefit, then that, but otherwise no as far as I can tell.

71

u/iXP_Waste Dec 09 '18

Having subbed around 3 hours ago, I feel somewhat proud.

19

u/quasarj Dec 09 '18

Thanks for your contribution! We couldn't have done it without you! 😉

15

u/jaakhaamer Dec 10 '18

Actually... we'd still have 130 to spare.

2

u/[deleted] Dec 10 '18

I subbed a few days ago

34

u/[deleted] Dec 09 '18

Uhm, 131 is an 8-bit value, 3 of them set.

6

u/jaakhaamer Dec 10 '18 edited Dec 10 '18

But...

300000 == 0b1001001001111100000

and...

300131 == 0b1001001010001100011

so actually we are not even a bit over 300000. :(

This joke brought to you by bin. Now have a good 5.

2

u/cgautreau Dec 10 '18

Damnit you beat me

11

u/__I_know_nothing__ Dec 09 '18

print('congrats') or print 'congrats'?

19

u/XaTTaX Dec 09 '18

from __future__ import print_function

print('congrats')

Obviously.

7

u/__I_know_nothing__ Dec 09 '18

#nice

or

'''

nice

'''

?

3

u/shinitakunai Dec 10 '18 edited Dec 10 '18

# Nice

I find stupid to use triple quotes for just one-line comments.

2

u/Ruben_NL Dec 10 '18

You can. Just type "\#Nice"

1

u/shinitakunai Dec 10 '18

Fixed. Thank you :D

2

u/__xor__ (self, other): Dec 10 '18
logger.debug('congrats')

7

u/avy0010 Dec 09 '18

I'm proud of this community

3

u/spazz_monkey Dec 09 '18

I joined last week, so I helped. Woo.

3

u/[deleted] Dec 09 '18

I subbed a few hours ago. I’m compelled to think I had something to do with it lol

2

u/Ferentzfever Dec 10 '18

~80o F for us 'Mericans.

1

u/HeadMushroom Dec 09 '18

Congratulations 🖤🔥

1

u/willmachineloveus Dec 09 '18

hey, time to celebrate! congrats!

1

u/RANDVR Dec 09 '18

Subbed a couple weeks ago and love this community. Learned tons since I started visiting here.

1

u/[deleted] Dec 09 '18

More like half a byte over

1

u/code_x_7777 Dec 09 '18

3M is coming!

1

u/tycooperaow 3.9 Dec 09 '18

I see what you did there

1

u/[deleted] Dec 10 '18

I hope Verilog / FPGA has over 400k subscribers too one day 😊

1

u/alcalde Dec 09 '18

I don't know; /r/delphi has 1,379 subscribers. I say we need to add some more or we're in danger of being overtaken by Pascal.

3

u/sorlafloat Dec 09 '18

How can Delphi have a fraction of a subscriber? Why are they even using floats?!

1

u/alcalde Dec 11 '18

Why are they using floats? Let me tell you this... in Delphi, a datetime type is stored as a float. No one knows why. Until 2010 you could get floating point errors doing time calculations! Obviously nothing is timezone aware either.

-1

u/[deleted] Dec 09 '18

Esketit