Discuss Scratch

Maximouse
Scratcher
1000+ posts

js or python

xMysticalCoder wrote:

9gr wrote:

i use js
which one is better tho
Python is more beginner friendly and less strict.
It's actually more strict (but of course it depends on what you mean by “strict”).


This is Maximouse's signature. Learn more about signatures.
xMysticalCoder
Scratcher
1000+ posts

js or python

Maximouse wrote:

xMysticalCoder wrote:

9gr wrote:

i use js
which one is better tho
Python is more beginner friendly and less strict.
It's actually more strict (but of course it depends on what you mean by “strict”).
Python doesnt punish you for tiny mistakes, while other languages do

*By punish I mean showing errors

9gr
Scratcher
1000+ posts

js or python

html is fun
Greg8128
Scratcher
500+ posts

js or python

xMysticalCoder wrote:

Maximouse wrote:

xMysticalCoder wrote:

9gr wrote:

i use js
which one is better tho
Python is more beginner friendly and less strict.
It's actually more strict (but of course it depends on what you mean by “strict”).
Python doesnt punish you for tiny mistakes, while other languages do

*By punish I mean showing errors
Showing errors is an objectively good thing.

My best projects:

Foruminasnew2scratch
New to Scratch
37 posts

js or python

I've only really learned python, I'm not much into coding.

No. I am not @Steve0Greatness

(note - I hate the fact that as a New Scratcher you have to wait 120 minutes)
gosoccerboy5
Scratcher
1000+ posts

js or python

Greg8128 wrote:

xMysticalCoder wrote:

Python doesnt punish you for tiny mistakes, while other languages do
*By punish I mean showing errors
Showing errors is an objectively good thing.
javascript, who will silently fail if you try to do something stupid like multiply strings: *nervous sweating*

-Rex-
Scratcher
500+ posts

js or python

Python has classes and JavaScript doesn’t, so I’d say that Python is probably better designed, but I’d still rather use JavaScript because it’s easier to use in the browser and has much better general-purpose performance (Python has PyPy but it’s still slower than V8). I have seen some TypeScript but have no experience in it. I have recently experimented with C++ and Emscripten and it seems nice but somewhat overkill.

I’d still rather use C++, C# or Java over either Python or JavaScript.
gosoccerboy5
Scratcher
1000+ posts

js or python

Rendangbike2
Scratcher
1000+ posts

js or python

gosoccerboy5 wrote:

-Rex- wrote:

Python has classes and JavaScript doesn’t
ecmascript 2015 allows you to use ‘classes’ in your code that are mainly syntactical sugar
That's not JS.




gdpr5b78aa4361827f5c2a08d700
Scratcher
1000+ posts

js or python

-Rex- wrote:

Python has classes and JavaScript doesn’t, so I’d say that Python is probably better designed, but I’d still rather use JavaScript because it’s easier to use in the browser and has much better general-purpose performance (Python has PyPy but it’s still slower than V8). I have seen some TypeScript but have no experience in it. I have recently experimented with C++ and Emscripten and it seems nice but somewhat overkill.

I’d still rather use C++, C# or Java over either Python or JavaScript.
JavaScript has classes
ElsieBreeze
Scratcher
100+ posts

js or python

Rendangbike2 wrote:

gosoccerboy5 wrote:

-Rex- wrote:

Python has classes and JavaScript doesn’t
ecmascript 2015 allows you to use ‘classes’ in your code that are mainly syntactical sugar
That's not JS.
ECMAScript is the specification that the JavaScript Language follows.
Sheep_maker
Scratcher
1000+ posts

js or python

-Rex- wrote:

Python has classes and JavaScript doesn’t,
Scratch says otherwise!

Apparently in Python 2, there were some quirks with their classes resulting in a split between old- and new-style classes; presumably Python 3 took the opportunity to break backwards compatibility by only using the new-style classes

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
gosoccerboy5
Scratcher
1000+ posts

js or python

Rendangbike2 wrote:

gosoccerboy5 wrote:

-Rex- wrote:

Python has classes and JavaScript doesn’t
ecmascript 2015 allows you to use ‘classes’ in your code that are mainly syntactical sugar
That's not JS.
lol

Raihan142857
Scratcher
1000+ posts

js or python

-Rex- wrote:

Python has classes and JavaScript doesn’t, so I’d say that Python is probably better designed, but I’d still rather use JavaScript because it’s easier to use in the browser and has much better general-purpose performance (Python has PyPy but it’s still slower than V8). I have seen some TypeScript but have no experience in it. I have recently experimented with C++ and Emscripten and it seems nice but somewhat overkill.

I’d still rather use C++, C# or Java over either Python or JavaScript.
Javascript has classes

I use scratch.
GF: I'll dump you. BF: hex dump or binary dump?










Rendangbike2
Scratcher
1000+ posts

js or python

Is there a way to make a game with pure JS? No HTML allowed, just JS. Luckily, in Python; we can do that.




Maximouse
Scratcher
1000+ posts

js or python

Rendangbike2 wrote:

Is there a way to make a game with pure JS? No HTML allowed, just JS. Luckily, in Python; we can do that.
Yes, use something like node-canvas.


This is Maximouse's signature. Learn more about signatures.
Raihan142857
Scratcher
1000+ posts

js or python

Maximouse wrote:

Rendangbike2 wrote:

Is there a way to make a game with pure JS? No HTML allowed, just JS. Luckily, in Python; we can do that.
Yes, use something like node-canvas.
like my extremely readable snake game
(Z=(m=document).body).append(c=m.createElement`canvas`);F=(r=c.getContext`2d`).fillRect.bind(r);c.width=500,c.height=N=300;c.style="position:fixed;top:0;z-index:1e9";(R=_=>{s=[250],a=N,b=150,t=[b],x=1,y=0})();setInterval(`r[f="fillStyle"]='#000';F(0,0,500,N);r[f]='red';F(a,b,n=10,n);r[f]='#0F0';for(j in s)F(s[j],t[j],n,n);S=s[0]+n*x,T=t[0]-n*y;o(S,T)?R():s.unshift(S),t.unshift(T);if(o(a,b))for(;o(a,b);)a=n*(new(M=Date)%50),b=n*(new M%30);else s.pop(),t.pop();(S+n)%510&&(T+n)%310||R()`,100);m.onkeydown=e=>{k=e.keyCode-37,k^32||Z.removeChild(c);k<5&k>-1&&(x=k%2?0:x?x:k-1,y=k%2?y?y:2-k:0)};o=(A,B)=>s.some((i,j)=>i==A&t[j]==B)

I use scratch.
GF: I'll dump you. BF: hex dump or binary dump?










gosoccerboy5
Scratcher
1000+ posts

js or python

Rendangbike2 wrote:

Is there a way to make a game with pure JS? No HTML allowed, just JS. Luckily, in Python; we can do that.
rock paper scissors

Rendangbike2
Scratcher
1000+ posts

js or python

gosoccerboy5 wrote:

Rendangbike2 wrote:

Is there a way to make a game with pure JS? No HTML allowed, just JS. Luckily, in Python; we can do that.
rock paper scissors
Make Platformer.




Sheep_maker
Scratcher
1000+ posts

js or python

Raihan142857 wrote:

Maximouse wrote:

Rendangbike2 wrote:

Is there a way to make a game with pure JS? No HTML allowed, just JS. Luckily, in Python; we can do that.
Yes, use something like node-canvas.
like my extremely readable snake game
(Z=(m=document).body).append(c=m.createElement`canvas`);F=(r=c.getContext`2d`).fillRect.bind(r);c.width=500,c.height=N=300;c.style="position:fixed;top:0;z-index:1e9";(R=_=>{s=[250],a=N,b=150,t=[b],x=1,y=0})();setInterval(`r[f="fillStyle"]='#000';F(0,0,500,N);r[f]='red';F(a,b,n=10,n);r[f]='#0F0';for(j in s)F(s[j],t[j],n,n);S=s[0]+n*x,T=t[0]-n*y;o(S,T)?R():s.unshift(S),t.unshift(T);if(o(a,b))for(;o(a,b);)a=n*(new(M=Date)%50),b=n*(new M%30);else s.pop(),t.pop();(S+n)%510&&(T+n)%310||R()`,100);m.onkeydown=e=>{k=e.keyCode-37,k^32||Z.removeChild(c);k<5&k>-1&&(x=k%2?0:x?x:k-1,y=k%2?y?y:2-k:0)};o=(A,B)=>s.some((i,j)=>i==A&t[j]==B)
That doesn't use node-canvas. It requires HTML since you're using document

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }

Powered by DjangoBB