Discuss Scratch

I_LOVE_TO_MAKE_STUFF
Scratcher
1000+ posts

what is the best overall programming language?

I_LOVE_TO_MAKE_STUFF wrote:

Ever tried malbolge?
“Hello World”:
(=<`#9]~6ZY327Uv4-QsqpMn&+Ij"'E%e{Ab~w=_:]Kw%o44Uqp0/Q?xNvL:`H%c#DD2^WV>gY;dts76qKJImZkj
SomeoneOnThelnternet
Scratcher
1000+ posts

what is the best overall programming language?

In my opinion, probably Python, JavaScript, and HTML. They're simple and easy to use.
Chiroyce
Scratcher
1000+ posts

what is the best overall programming language?

Comparing speed, C++ VS Python

Printing Hello World!:

C++: 0.002s
Python: 0.035s

C++ is 17.5x faster

Printing Hello World! 10 times:

C++: 0.002s
Python: 0.088s

C++ is 44x faster

Adding a number 10,000 times with another

C++: 0.002s
Python: 0.115s

C++ is 57.5x faster

Again, these tests mean nothing in the real world, this just shows that compiled and performance focused languages are obviously faster than interpreted and non-performance focused languages (though, Python 3.11 might be a lot more faster, I used 3.7 to test and clang for compiling C++)

starhero5697
Scratcher
1000+ posts

what is the best overall programming language?

I_LOVE_TO_MAKE_STUFF wrote:

I know only HTML, CSS, and Scratch, but an official (or whatever) language I like CSS since it's very customizable, but I'm learning JS, so maybe my answer will change…
HTML and CSS are markup languages and not programming languages.

In my opinion, JavaScript is the best. It is easy to learn and implement.
k0d3rrr
Scratcher
1000+ posts

what is the best overall programming language?

Chiroyce wrote:

Comparing speed, C++ VS Python

Printing Hello World!:

C++: 0.002s
Python: 0.035s

C++ is 17.5x faster

Printing Hello World! 10 times:

C++: 0.002s
Python: 0.088s

C++ is 44x faster

Adding a number 10,000 times with another

C++: 0.002s
Python: 0.115s

C++ is 57.5x faster

Again, these tests mean nothing in the real world, this just shows that compiled and performance focused languages are obviously faster than interpreted and non-performance focused languages (though, Python 3.11 might be a lot more faster, I used 3.7 to test and clang for compiling C++)

C++ = Harder than Python.
Although the maths doesn't make sense…
mybearworld
Scratcher
1000+ posts

what is the best overall programming language?

BF of course!
Here's a simple BF program that plays rps with you and always wins:
,>+++++++++++++++++++++++[<----->-]<[>+++++++++++++++++[<--------------->-]<++[[-]>+++++++++++[<+++++++++++>-]<---------.>]<>++++++++++++[<++++++++++++>-]<[-----------------------------.>]<[-]->]<+[>+++++++++++[<+++++++++++>-]<--------.>]<

Here's the code in an even simpler form:
Rock Paper Scissors program in BF
,
Cell 0 now should be:  r = 114
                       p = 112
                       s = 115
> +++++ +++++ +++++ +++++ +++
[
    < -----
    > -
] <
Decrease Cell 0 115 times; this will result in: r = 255
                                                p = 253
                                                s =   0
[
    > +++++ +++++ +++++ ++
    [
        < ----- ----- -----
        > -
    ] < ++
    Decrease Cell 0 another 253 times; this will result in: r = 2
                                                            p = 0
    [
        [-]
        > ++++ ++++ +++
        [
            < ++++ ++++ +++
            > -
        ] < --- --- ---
        . >
        Output p
    ] <
    If Cell 0 is non zero (eg 2); the input was r; therefore p (112) has to be outputted
    Now Cell 0 is: r = 112
                   p =   0
    > ++++ ++++ ++++
    [
        < ++++ ++++ ++++
        > -
    ] <
    Increase Cell 0 144 times; this will result in: r = 0
                                                    p = 114
    [
        ---- ---- ---- ---- ---- ---- ---- -
        . >
        Output s
    ] <
    If Cell 0 is non zero (eg 144); the input was p; therefore s (115) has to be outputted
    Now Cell 0 is: r = 0
                   s = 115
    
    [-] -
    Set Cell 0 to 255
    >
] <
If Cell 0 is non zero (eg 253~255); input was either r or p
Now Cell 0 is: r = 255
               p = 255
               s = 0
+
Increment Cell 0; now Cell 0 is: r = 0
                                 p = 0
                                 s = 1
[
    > ++++ ++++ +++
    [
        < ++++ ++++ +++
        > -
    ] < --- --- --
    . >
] <
If Cell 0 is non zero (eg 1); input was s; so output r (114)
Can you win against it?

You have to give input as r,p,s.

in all seriousness, this is really fun to program in!

Last edited by mybearworld (May 26, 2022 10:03:36)

MagicCrayon9342
Scratcher
1000+ posts

what is the best overall programming language?

Python, literally different syntax than every other language. Slower than every other language. Who would choose Python as a main language, its just plains slow!

Anyway, the obvious choice is C or C++.
Chiroyce
Scratcher
1000+ posts

what is the best overall programming language?

MagicCrayon9342 wrote:

Python, literally different syntax than every other language. Slower than every other language. Who would choose Python as a main language, its just plains slow!
- Readability
- Simplicity
- Thousands of open source PyPi Packages
- Has one of the best MVC software (Django) and is the best language for AI/Data Science/Machine Learning (Numpy, Tensorflow, Pandas, etc)
- Easy to learn and use
- Fast enough for anyone who isn't making high end games or embedded systems (requires running on a low level)

I use Python and NodeJS on the server side, both are equally fast in terms of response time, Node is just a tiny bit faster on highly repeated operations. JavaScript has a nicer syntax, but Python is much easier to read/understand.

The thing I hate the most about Python is that indentation is a requirement, and the interpreter will raise a SyntaxError if you mess up indentation by even one space/tab, refusing to run your code.

Last edited by Chiroyce (May 26, 2022 14:06:39)

MagicCrayon9342
Scratcher
1000+ posts

what is the best overall programming language?

Chiroyce wrote:

MagicCrayon9342 wrote:

Python, literally different syntax than every other language. Slower than every other language. Who would choose Python as a main language, its just plains slow!
- Readability
- Simplicity
- Thousands of open source PyPi Packages
- Has one of the best MVC software (Django) and is the best language for AI/Data Science/Machine Learning (Numpy, Tensorflow, Pandas, etc)
- Easy to learn and use
- Fast enough for anyone who isn't making high end games or embedded systems (requires running on a low level)
Python is slow. It's interpreted, so it is slow. You can compare C++ to Python doing even the simplest tasks and Python will STILL be slow. Python is a beginner language.
Vaibhs11
Scratcher
1000+ posts

what is the best overall programming language?

Now everyone knows that there is no answer, all programming languages have it's own features, uses and difficulty.
I apologize for my past behavior, promoting C and finding negatives in all other programming langua-

MagicCrayon9342 wrote:

the obvious choice is C.
ez win
c is the best!!!!
python slow, java too long, js too popular, lua is roblox not real pl, bf boggles ur brain

Last edited by Vaibhs11 (May 26, 2022 14:22:53)

mybearworld
Scratcher
1000+ posts

what is the best overall programming language?

Vaibhs11 wrote:

bf boggles ur brain
nonono bf is very simple!
uwv
Scratcher
1000+ posts

what is the best overall programming language?

personally i think typescript is the only language you will ever need because typescript just works (this is a lie) and also typescript compiled to machine code is very fast (working on a full very cool project to compile typescript into native binaries for any system)
bunnyCoder16
Scratcher
500+ posts

what is the best overall programming language?

scratch
ToastersUnited
Scratcher
1000+ posts

what is the best overall programming language?

MagicCrayon9342 wrote:

Python, literally different syntax than every other language. Slower than every other language. Who would choose Python as a main language, its just plains slow!

Anyway, the obvious choice is C or C++.
GDscript, lua, rust and various other language take some inspiration from Python.
ToastersUnited
Scratcher
1000+ posts

what is the best overall programming language?

Vaibhs11 wrote:

lua is roblox not real pl,
Lua is not just roblox. Roblox uses a dialect of lua.
Lua was created by a few Brazilians to be a general purpose programming language, that's easy to learn. It's fully capable, and us really really fast.
Steve0Greatness
Scratcher
1000+ posts

what is the best overall programming language?

JavaScript. It is everything.
uwv
Scratcher
1000+ posts

what is the best overall programming language?

Steve0Greatness wrote:

(#77)
JavaScript. It is everything.
typescript > javascript
Steve0Greatness
Scratcher
1000+ posts

what is the best overall programming language?

uwv wrote:

Steve0Greatness wrote:

(#77)
JavaScript. It is everything.
typescript > javascript
>:(
mybearworld
Scratcher
1000+ posts

what is the best overall programming language?

Steve0Greatness wrote:

(#79)

uwv wrote:

Steve0Greatness wrote:

(#77)
JavaScript. It is everything.
typescript > javascript
>:(
Actually, <=:(

Last edited by mybearworld (May 28, 2022 15:30:36)

Powered by DjangoBB