oren โ€” 7/6/2022, 10:01:14 PM

Advice to all Python users: learn JavaScript

โ™ฅ 13 โ†ฉ 5 ๐Ÿ’ฌ 51 comments

comments

lxs:

completed that mission, https://www.youtube.com/watch?v=bcSDtpfMP68

11/5/2022, 6:36:28 AM
gilbert189:

Iโ€™ve done that. Now what?

10/20/2022, 11:46:55 AM
portalpower:

ong

10/20/2022, 5:17:07 AM
theglasspenguin:

what if iโ€™m using both?

10/20/2022, 3:48:52 AM
oren:

~

10/20/2022, 1:56:38 PM
pkmnq:

i already did, itโ€™s cool but i want 1/0 to actually raise an error

10/19/2022, 10:36:15 PM
lily:

too bad, js only has a catch-all Number type, so Infinity is the right response for 1/0

10/20/2022, 2:06:32 PM
pkmnq:

JS has Error types, it can throw them. In fact, they can throw them inside the / operator itself. Watch.

x = {valueOf:1}
1/x
10/21/2022, 1:00:35 AM
bluuxolotl:

ok

10/19/2022, 8:34:42 PM
copperfish:

no

10/19/2022, 6:48:08 PM
copperfish:

no

10/19/2022, 6:48:08 PM
non-biased-news:

noooooooop

10/19/2022, 6:27:03 PM
late-is-cool:

screw you im gonna learn python so i can learn gdscript ๐Ÿ˜ค๐Ÿ˜ค๐Ÿ˜ค๐Ÿ˜ค๐Ÿ—ฟ๐Ÿ—ฟ๐Ÿ—ฟ๐Ÿ—ฟ๐Ÿ—ฟ๐Ÿ—ฟ๐Ÿ—ฟ๐Ÿ“ฎ๐Ÿ“ฎ๐Ÿ˜ข๐Ÿ“ฎ

7/8/2022, 5:36:44 AM
late-is-cool:

better yet, im gonna start using Lua (and Luau [๐Ÿ…ฑoblox moment]) to code ๐Ÿฆ†๐Ÿฆ†๐Ÿฆ†๐Ÿฆ†

7/8/2022, 5:39:49 AM
vercte:

broโ€™s learning python for gdscript ๐Ÿ’€

(I am proud JS and Godot user)

7/10/2022, 6:32:57 AM
late-is-cool:

๐Ÿ˜Ž

7/11/2022, 5:37:58 PM
quantum-codes:

Any real reason other than making front-end?

7/7/2022, 3:23:04 PM
oren:

Frontend yes but also for frameworks like svelte, express, nuxt. And python really sucks ngl compared to js. JavaScript is just a lot more... Capable?

7/7/2022, 3:34:16 PM
quantum-codes:

Python has Django framework, Flask for simplicity. capable in what way though? I donโ€™t think thereโ€™s anything that JS can do but py cant

7/7/2022, 3:45:39 PM
chiroyce:

webservers like express are much faster than flask. also frameworks like nuxtjs/svelte/etc with minimal api functions are pretty cool.

10/20/2022, 12:28:57 PM
miam_le_chocolat:

And fastapi

10/26/2022, 1:23:29 PM
copperfish:

no

7/6/2022, 11:09:00 PM
non-biased-news:

ewwww no

7/6/2022, 10:28:37 PM
oren:

Why not

7/6/2022, 10:51:22 PM
non-biased-news:

python is better, you can make better malware :P

7/6/2022, 10:53:16 PM
grippins:

Yeah but at least JS doesn't require indents

7/6/2022, 11:10:43 PM
non-biased-news:

neither does python :P

example: def func():print('helloworld')

7/7/2022, 2:39:03 PM
grippins:

Also, indents have to be 4 spaces, can't be 2

7/7/2022, 2:40:30 PM
non-biased-news:

they can be anything as long as they are consistent

7/7/2022, 2:41:41 PM
grippins:

I'm not sure what you're using but it isn't standard python

7/7/2022, 2:42:14 PM
non-biased-news:

Python doesn't mind whether you use two spaces or four spaces (or any other number of spaces) as long as you are consistent. For example if you start off using four spaces for an indent, then you should always use four spaces.

7/7/2022, 2:44:35 PM
grippins:

What version is this?

7/7/2022, 2:46:34 PM
non-biased-news:

๐Ÿคทโ€โ™‚๏ธ https://www.futurelearn.com/info/courses/programming-101/0/steps/48649#:~:text=Python%20doesn't%20mind%20whether,should%20always%20use%20four%20spaces.

7/7/2022, 3:04:32 PM
quantum-codes:

I use 2 always

7/7/2022, 3:22:03 PM
non-biased-news:

Me too

7/23/2022, 10:38:55 PM
gilbert189:

Usually I use 4, but for Colab I use 2.

10/20/2022, 12:03:49 PM
tnix:

PEP 8 guidelines say otherwise

7/21/2022, 10:42:33 AM
gilbert189:

It is just a guideline.

10/20/2022, 11:48:16 AM
tnix:

Yes, but please use it, it makes it easier for you and other devs to maintain, and just makes your code look nicer.

10/20/2022, 9:46:12 PM
gilbert189:

I agree.

10/21/2022, 7:11:50 AM
gilbert189:

https://tio.run/##bZA9C8JADIZn/RWhiwri4ubi7KA4CM5pG2lQc8clfv7581pLrdBMGZ73yYd/WeVkGSOf4BButBpDKh9YbJptpCQxBRbYNxxgIJkYoIJa4KLp2ECJrrrIZk34z9RzFU6U1ZIRlN@k65bvkJ1LncsvdB1UjVpsy08wzBVQSlCPxU/VIXimeq8KvScZtvUGDxghHcvf8zt5L3Gs0OhOYQ4PgtLVPynSb9KkGD8

10/20/2022, 12:04:49 PM
non-biased-news:

lol

10/20/2022, 8:27:34 PM
quantum-codes:

Honestly indenting makes the code looks better and more readable.

7/7/2022, 3:22:34 PM
chiroyce:

yes but its annoying that the indention is necessary

10/20/2022, 12:29:31 PM
quantum-codes:

Yea true

10/20/2022, 12:30:55 PM
doey:

you do realize that node and deno exist, right?

7/7/2022, 4:59:33 AM
non-biased-news:

no, also what is deno?

7/7/2022, 2:38:26 PM
doey:

https://deno.land/

7/7/2022, 4:26:14 PM
non-biased-news:

hmm weird

7/7/2022, 4:35:13 PM
coolkat:

Why

7/6/2022, 10:07:04 PM
grippins:

It's kind of better

7/6/2022, 10:12:27 PM