I wonder why all these easy-to-learn languages use indentation to denote scope, not something like curly braces. Isn't it actually harder to explain?
Fifth grade teacher here. Significant whitespace is a major reason I prefer Python for teaching programming. 1. I want kids to indent their code anyway; they may not realize it (or won't admit it), but this makes the code much easier for them to read. Kids will not do this unless they have to. 2. Unbalanced brackets are a major source of mistakes and confusion for my students. Relying purely on indentation resolves t…
Mini Micro Fantasy Computer
41–50 of 88 posts
Re: Mini Micro Fantasy Computer
#42Shame there isn't a Raspberry Pi version available.
Re: Mini Micro Fantasy Computer
#43Earlier quoted context omitted.
Fifth grade teacher here. Significant whitespace is a major reason I prefer Python for teaching programming. 1. I want kids to indent their code anyway; they may not realize it (or won't admit it), but this makes the code much easier for them to read. Kids will not do this unless they have to. 2. Unbalanced brackets are a major source of mistakes and confusion for my students. Relying purely on indentation resolves t…
This is the job of a tool like go fmt. Obviously, it’s good discipline to indent, but I wouldn’t choose this as the deciding factor for picking a first programming language.
Re: Mini Micro Fantasy Computer
#44Earlier quoted context omitted.
There's an important form/function distinction here, though. Indentation is useful for human readability, but braces function to give unambiguous direction to the compiler or interpreter. I think conflating these two different purposes together is a mistake: you shouldn't risk altering or breaking the logic flow of a program simply by adjusting its visual formatting. The fact that we use whitespace for layout is prec…
I think this is probably correct for an experienced programmer but incorrect for someone who is new.
Re: Mini Micro Fantasy Computer
#45I’d love to see something like this but designed to run on esp32 or raspberry pi 2530. Either can handle basic HDMI and USB. Or a little Easy to think raspberry pi, but with a full Linux you won’t get that intrinsic understanding that you fully control the hardware, you never control the “bare metal” unless you are a much more advanced user. IMHO the feeling of not being in full control of your computing device is no…
I have been playing around with a per scanline generated display on a rp2350 outputting to a tiny LCD. I think there's potential for some pretty fancy stuff on HDMI. A 2350 with PSRAM, HDMI connector plus a MicroSD for bulk filesytem, and USB for input could be quite a fun micro PC.
I would be tempted to make somthing that had a second RP2350 with its own PSRAM sitting unutilized just as a temptation to users to figure out how to get more out of the gadget and learn about different multiprocessing architectures.
One of these https://www.waveshare.com/core2350b.htm
With one of these https://www.waveshare.com/rp2350-matrix.htm
Mounted on top, and an HDMI connector squeezed in somewhere,
I am a bit reminded of what GeoWorks Ensemble managed on a 640k 8086. Theoretically you could make a tiny system like this do even more.
Re: Mini Micro Fantasy Computer
#46Earlier quoted context omitted.
I think this is probably correct for an experienced programmer but incorrect for someone who is new.
I'm not sure I understand what you mean. How would the friction inherent in conflating layout and semantics together depend on the experience level the programmer? Different programmers might have different ways of dealing with that friction, but I'd think its existence would be a property of the language itself.
When you're starting out, the best form to express to other humans is probably the one you're expressing to the computer. This isn't literally true—I don't think beginners should write in assembly—but it's true enough that they probably shouldn't mess with indentation beyond what would naively follow from bracket placement.
Re: Mini Micro Fantasy Computer
#47“A class or object is a map with a special __isa entry that points to the parent. This is set automatically when you use the new operator.
Shape = {"sides":0}
Square = new Shape
Square.sides = 4
x = new Square
x.sides // 4
”So
- Shape is a map (it is created using the syntax defined earlier, using a literal string as key)
- Square is a class?
- x is an object?
Or is this language prototype based? If so, why mention the word “class”? If not, isn’t it confusing to use “new someMap” to create a class and “new someClass” to create an object?
I also find it curious to see that division is defined on lists and strings. What would that mean?
Edit: reading https://miniscript.org/files/Strout_iSTEM-Ed2021.pdf, it is prototype based. That’s interesting for a teaching language.
Re: Mini Micro Fantasy Computer
#48I’d love to see something like this but designed to run on esp32 or raspberry pi 2530. Either can handle basic HDMI and USB. Or a little Easy to think raspberry pi, but with a full Linux you won’t get that intrinsic understanding that you fully control the hardware, you never control the “bare metal” unless you are a much more advanced user. IMHO the feeling of not being in full control of your computing device is no…
why not just use a vintage computer or game console then?
Re: Mini Micro Fantasy Computer
#49Earlier quoted context omitted.
Fifth grade teacher here. Significant whitespace is a major reason I prefer Python for teaching programming. 1. I want kids to indent their code anyway; they may not realize it (or won't admit it), but this makes the code much easier for them to read. Kids will not do this unless they have to. 2. Unbalanced brackets are a major source of mistakes and confusion for my students. Relying purely on indentation resolves t…
This is the job of a tool like go fmt. Obviously, it’s good discipline to indent, but I wouldn’t choose this as the deciding factor for picking a first programming language.
Re: Mini Micro Fantasy Computer
#50I wonder why all these easy-to-learn languages use indentation to denote scope, not something like curly braces. Isn't it actually harder to explain?
Fifth grade teacher here. Significant whitespace is a major reason I prefer Python for teaching programming. 1. I want kids to indent their code anyway; they may not realize it (or won't admit it), but this makes the code much easier for them to read. Kids will not do this unless they have to. 2. Unbalanced brackets are a major source of mistakes and confusion for my students. Relying purely on indentation resolves t…
for i = 0 i But with a more pictorial presentation, it is easier to read the program.
for i = 0 i I'm just wondering - if we had a more pictograph based programming language would it be easier to understand?