News for hackers. Stuff that matters.
Re:Show HN: New visual language for teaching kids to code by layer8 on Tuesday November 21, 2023 @02:51PM (#38369087)
Is there a good reason to require `var`, `set`, and `call` keywords? BASIC doesn’t have those. From my (admittedly dim) memories starting programming as a kid, those keywords would have been an unnecessary complication.

For example in LOGO, you’d just write

    forward 10
    left 90
In comparison,

    call paint.forward(10)
    call paint.left(90)
seems excessive and noisy.
Re:Show HN: New visual language for teaching kids to code by csmeyer on Tuesday November 21, 2023 @03:50PM (#38369899)
The keywords are there on every line to make them easy to verbally read. This is most important in the case of set x = 7, the keyword makes it clear that we're trying to mutate a variable, not assert equality.

Even though technically we could make forward() a method at the top level in the context of a paint program, we chose to make things more OOPy to prepare them for later when students get to the 2D game engine and there can be multiple sprites to control.

Re:Show HN: New visual language for teaching kids to code by wruza on Tuesday November 21, 2023 @05:52PM (#38371679)
I always wanted `set` in regular languages instead of (or in addition to) =/==.

Edit: well actually, I want a whole development studio like this for professional development. You are the closest of anything else to my vague idea of what programming should look like. I feel bad for the kids who later will have to move from this to what we call "our software development stacks".

Re:Show HN: New visual language for teaching kids to code by mikeravkine on Tuesday November 21, 2023 @06:41PM (#38372261)
Pascals := is concise and intuitively obvious, so obviously it never caught on.
Re:Show HN: New visual language for teaching kids to code by avarun on Tuesday November 21, 2023 @09:42PM (#38374023)
Hard to type though
Re:Show HN: New visual language for teaching kids to code by Yasuraka on Wednesday November 22, 2023 @02:43AM (#38376184)
Re:Show HN: New visual language for teaching kids to code by kaba0 on Wednesday November 22, 2023 @03:41AM (#38376663)
So now Go has a single good feature!
Re:Show HN: New visual language for teaching kids to code by fsckboy on Wednesday November 29, 2023 @11:02PM (#38469452)
>Pascals := is ...

:= is Algol's. Algol had a much bigger European influence than American, and other euro languages like Pascal followed its traditions

Re:Show HN: New visual language for teaching kids to code by runlaszlorun on Wednesday November 22, 2023 @01:13AM (#38375348)
> I always wanted `set` in regular languages instead of (or in addition to) =/==.

TCL ftw!

Re:Show HN: New visual language for teaching kids to code by postalrat on Tuesday November 21, 2023 @03:13PM (#38369393)
So "forward" is something you click and it shows all possible expressions for a new line?
Re:Show HN: New visual language for teaching kids to code by secret-noun on Tuesday November 21, 2023 @05:30PM (#38371357)
I felt like the naming was a little unintuitive here. `forward` and `left` seem to be directions of movement (especially if I want the painter to "move left"). Instead, `forward` means to draw/move, while `left` is a CCW rotation (even though it supports a negative argument)

  call paint.draw(10)
  call paint.rotate(90) // or even rotate("up")
speaks better to me.
Re:Show HN: New visual language for teaching kids to code by layer8 on Tuesday November 21, 2023 @06:01PM (#38371791)
The LOGO terminology is an abbreviation of "move forward 10 steps, turn left 90 degrees", omitting "move"/"turn" and the units, as those are implied. LOGO uses a "turtle" as an avatar carrying out the instructions, like a little robot you program. See https://en.wikipedia.org/wiki/Turtle_graphics.

Python also comes with an implementation: https://docs.python.org/3/library/turtle.html

I agree that the paint prefix doesn’t quite match that conception.

Re:Show HN: New visual language for teaching kids to code by CoastalCoder on Tuesday November 21, 2023 @05:57PM (#38371743)
Guess I'm showing my age, but the first version of BASIC that I learned had the "gosub" command [1] for subroutine calls.

N.B.: I'm using one-based indexing for my links here because that's apparently what early BASICs used [2] :)

[1] https://picaxe.com/basic-commands/program-flow-control/gosub...

[2] https://alandix.com/blog/2021/07/27/a-brief-history-of-array...

Re:Show HN: New visual language for teaching kids to code by layer8 on Tuesday November 21, 2023 @06:05PM (#38371834)
Yes, but the built-in commands don't use that. You write

    PRINT "Hello"
and not

    GOSUB PRINT "Hello"
Rather, you'd write

    GOSUB 690
to run your subroutine that starts at line 690.
Re:Show HN: New visual language for teaching kids to code by hurryer on Tuesday November 21, 2023 @07:42PM (#38372914)
The Basic I used had

    LET X=10
Re:Show HN: New visual language for teaching kids to code by stevekemp on Tuesday November 21, 2023 @11:54PM (#38374881)
ZX Spectrum?

I remember that when I had to enter code printed in magazines/books it always seemed the Spectrum was the one that required that particular modification.

(Usually there would be a BASIC listing with modifications for C64, BBC, Spectrum, and other systems. "On line 30 add LET", etc.)

Re:Show HN: New visual language for teaching kids to code by runlaszlorun on Wednesday November 22, 2023 @01:21AM (#38375433)
Yes! I had a Timex Sinclair. We had no cassette player, etc so, if you wanted to play a game, you were typing it in. There was one we’d always go back to. It prob wasn’t more than 50 line, tbh. But we typed it in so many times, we started to be able to do it from memory. I’m guessing it was a great way for a kid to internalize programming at a young age.
Re:Show HN: New visual language for teaching kids to code by CalRobert on Wednesday November 22, 2023 @01:12AM (#38375340)
When I was first learning to program as a kid I really liked having LET x = 2, or Perl's sigils, etc. It helped remind me of things as simple as assignation being left to right.
Re:Show HN: New visual language for teaching kids to code by trealira on Wednesday November 22, 2023 @12:30PM (#38382208)
Out of curiosity, why did Perl's sigils help? I don't see what they have to do with assignments being left to right.
Re:Show HN: New visual language for teaching kids to code by CalRobert on Wednesday November 22, 2023 @02:41PM (#38384080)
Mostly it made it obvious which terms were variables. Of course, this was something like 30 years ago so I don't remember well.
Re:Show HN: New visual language for teaching kids to code by zx8080 on Wednesday November 22, 2023 @01:49AM (#38375698)
It will be added as kool syntactic sugar later in v2! Stay tuned for updates!

</s>

Totally agree, it was my first thought too on call/var nonsense.

Re:Show HN: New visual language for teaching kids to code by whazor on Wednesday November 22, 2023 @02:08AM (#38375875)
I think it is needed for easily moving the code up and down. Notice that the kids don’t have to write the code. So because everything is clickable, it helps to have the keywords there in the design.
Re:Show HN: New visual language for teaching kids to code by layer8 on Wednesday November 22, 2023 @02:11AM (#38375903)
I realize that, but it’s still complicated and noisy from a reading perspective.
Re:Show HN: New visual language for teaching kids to code by jurgenaut23 on Wednesday November 22, 2023 @02:17AM (#38375969)
Agreed, this was my first impression as well. I spend my whole day in front of much more complex code, but trying to put myself in the shoes of a young kid, I would be really misled by this (unnecessary) noise.