Discuss Scratch

__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

bigspeedfpv wrote:

__Falcon-Games__ wrote:

Here we'll navigating through the flow of array to the add function. This is part of the scope flow shortened to scope which contains the entirety of our objects and their attributes in a flow.

There's also another flow which is the instruction flow, we flow through different parts of our program.
For example when in a function we return like in series, we push the return value onto the flow which the assignment operator can assign to a value. Actually all the assignment operator does is create an item in the scope with program flow. It's a way to attach a value that is not stored anywhere right now to a part of the scope.
congratulations you just made functional programming but worse
It isn't worse, I put a lot of consideration into this idea and I think it's good. Why do you think it's worse?

Last edited by __Falcon-Games__ (Sept. 18, 2023 06:48:44)

rdococ
Scratcher
1000+ posts

why isn't every programming language easy to learn

ToastersUnited wrote:

rdococ wrote:

Syntax is the least important part of a programming language. You'll get over it with time.
don't retropost, this died in early february of last year
Oops, thought it was on the front page.

__Falcon-Games__ wrote:

-snip-
I'm not sure what you mean by the flow, but there are some interesting design decisions in there. Is there a difference between the “x.add(2)” dot and “array->add(i)” arrow syntax?

Last edited by rdococ (Sept. 18, 2023 15:28:43)

__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

rdococ wrote:

__Falcon-Games__ wrote:

-snip-
I'm not sure what you mean by the flow, but there are some interesting design decisions in there. Is there a difference between the “x.add(2)” dot and “array->add(i)” arrow syntax?
Oh sorry that was a mistake on my part. It was supposed to be x->add(2).
I choose the -> operator since it felt like we're moving through which reflects on the flow idea.
davidtheplatform
Scratcher
500+ posts

why isn't every programming language easy to learn

__Falcon-Games__ wrote:

ajskateboarder wrote:

__Falcon-Games__ wrote:

fun series(nth) {
def array = []

repeat (nth) {
array->add(i)
}

--> array
}
Is “i” a globally scoped variable? Would be nice to have a name for the iterated item
It's a special variable that is used for iterators every time you are in a loop.
So can you nest loops?
__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

davidtheplatform wrote:

__Falcon-Games__ wrote:

ajskateboarder wrote:

__Falcon-Games__ wrote:

fun series(nth) {
def array = []

repeat (nth) {
array->add(i)
}

--> array
}
Is “i” a globally scoped variable? Would be nice to have a name for the iterated item
It's a special variable that is used for iterators every time you are in a loop.
So can you nest loops?
Well when you use a variable it looks in the current scope so it will look in your loop scope so yes, if your in a nested loop the i would refer to the nested loop's iteration level and if your in the parent loop the i would refer to the parent loop's iteration level.

Last edited by __Falcon-Games__ (Sept. 18, 2023 16:51:13)

davidtheplatform
Scratcher
500+ posts

why isn't every programming language easy to learn

What if I want to do something like this:
for (int x = 0; x < 5; x++) {
    for (int y = 0; y < 5; y++) {
        printf("x * y is %d", x * y);
    }
}
__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

davidtheplatform wrote:

What if I want to do something like this:
for (int x = 0; x < 5; x++) {
    for (int y = 0; y < 5; y++) {
        printf("x * y is %d", x * y);
    }
}
Huh, well you could do this.
repeat (5) {
x = i
repeat (5) {
y = i
printf("x * y is {0}", [x * y])
}
}
Notice: Couldn't send it before because Scratch's servers went down.
bigspeedfpv
Scratcher
500+ posts

why isn't every programming language easy to learn

__Falcon-Games__ wrote:

bigspeedfpv wrote:

congratulations you just made functional programming but worse
It isn't worse, I put a lot of consideration into this idea and I think it's good. Why do you think it's worse?
there's no like actual backing to it
how would you for example write a string parser?
davidtheplatform
Scratcher
500+ posts

why isn't every programming language easy to learn

__Falcon-Games__ wrote:

davidtheplatform wrote:

What if I want to do something like this:
for (int x = 0; x < 5; x++) {
    for (int y = 0; y < 5; y++) {
        printf("x * y is %d", x * y);
    }
}
Huh, well you could do this.
repeat (5) {
x = i
repeat (5) {
y = i
printf("x * y is {0}", [x * y])
}
}
Notice: Couldn't send it before because Scratch's servers went down.
Do you have a working compiler for this? If so that would be pretty cool
For the loops, i would do this:
repeat (x=0..5) { whatever; }
So then you get to choose the variable name
__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

bigspeedfpv wrote:

__Falcon-Games__ wrote:

bigspeedfpv wrote:

congratulations you just made functional programming but worse
It isn't worse, I put a lot of consideration into this idea and I think it's good. Why do you think it's worse?
there's no like actual backing to it
how would you for example write a string parser?

davidtheplatform wrote:

__Falcon-Games__ wrote:

davidtheplatform wrote:

What if I want to do something like this:
for (int x = 0; x < 5; x++) {
    for (int y = 0; y < 5; y++) {
        printf("x * y is %d", x * y);
    }
}
Huh, well you could do this.
repeat (5) {
x = i
repeat (5) {
y = i
printf("x * y is {0}", [x * y])
}
}
Notice: Couldn't send it before because Scratch's servers went down.
Do you have a working compiler for this? If so that would be pretty cool
For the loops, i would do this:
repeat (x=0..5) { whatever; }
So then you get to choose the variable name

I am working on a compiler. Also good idea.
DifferentDance8
Scratcher
1000+ posts

why isn't every programming language easy to learn

The hypotehtical easiest language to learn would be an entirely NLP-based one, but since that doesn't exist at this current moment…
__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

Please someone help me, I just added meshing to my lexer and now it doesn't work.
ajskateboarder
Scratcher
1000+ posts

why isn't every programming language easy to learn

DifferentDance8 wrote:

The hypotehtical easiest language to learn would be an entirely NLP-based one, but since that doesn't exist at this current moment…
Didn't you make one of those?
rdococ
Scratcher
1000+ posts

why isn't every programming language easy to learn

DifferentDance8 wrote:

The hypotehtical easiest language to learn would be an entirely NLP-based one, but since that doesn't exist at this current moment…
Say this to ChatGPT:
Roleplay as a programming language that compiles everything I write into python code. Respond with the code and only the code itself, with no expository text.
Bam, an NLP-based programming language.

Last edited by rdococ (Sept. 20, 2023 14:28:35)

__Falcon-Games__
Scratcher
1000+ posts

why isn't every programming language easy to learn

rdococ wrote:

DifferentDance8 wrote:

The hypotehtical easiest language to learn would be an entirely NLP-based one, but since that doesn't exist at this current moment…
Say this to ChatGPT:
Roleplay as a programming language that compiles everything I write into python code. Respond with the code and only the code itself, with no expository text.
Bam, an NLP-based programming language.
Give it a name and docs, and you have just created a programming language transpiler!
TheSecondGilbert
Scratcher
100+ posts

why isn't every programming language easy to learn

DifferentDance8 wrote:

The hypotehtical easiest language to learn would be an entirely NLP-based one, but since that doesn't exist at this current moment…
Bonus points if it doesn't use any type of neural networks.

Last edited by TheSecondGilbert (Sept. 21, 2023 08:29:54)

TheSecondGilbert
Scratcher
100+ posts

why isn't every programming language easy to learn

(oops, double posted)

Last edited by TheSecondGilbert (Sept. 21, 2023 08:29:40)

DifferentDance8
Scratcher
1000+ posts

why isn't every programming language easy to learn

ajskateboarder wrote:

DifferentDance8 wrote:

The hypotehtical easiest language to learn would be an entirely NLP-based one, but since that doesn't exist at this current moment…
Didn't you make one of those?
Yeah, but it was kinda hard to use.
-Cubism007-
Scratcher
500+ posts

why isn't every programming language easy to learn

Socialix wrote:

its so hard
Depends on how you're going to use them…

In fact, here's some important advice: If you don't know programming, inspect people's codes to learn more…

“AhHh, This is SkId” DON'T CARE IF IT'S A SKID, in fact, we all started in programming being skidders (in fact, no one is born knowing )
ajskateboarder
Scratcher
1000+ posts

why isn't every programming language easy to learn

-Cubism007- wrote:

In fact, here's some important advice: If you don't know programming, inspect people's codes to learn more…

“AhHh, This is SkId” DON'T CARE IF IT'S A SKID, in fact, we all started in programming being skidders (in fact, no one is born knowing )
I don't think a single person has called programmers who learn from other people's code “skids” except for Terry Davis, maybe

Powered by DjangoBB