Fuze for Nintendo Switch: An easy-to-learn text-based programming language
fuze.co.uk
fuze.co.uk
The legitimacy of the company that produced Mario, etc. will rub off onto a new generation of kids and make them feel like they are really playing with the big boys.
I don't know how to explain this right. I know that I myself still get this feeling when I see something I wrote running on an actual Atari Jaguar because I was such a fan of that console when I was a kid. It's like, "wow, I'm actually a real developer! I made it!"
I start thinking about all the things I can do and all of the possibilities that are more than just firing pixels on a screen.
It's a form of technological empowerment, and it's something that makes a huge difference in a kid's life. I know it did for me when I first discovered BASIC on the Commodore.
This is about telling stories with your kids - it's a canvas in your living room for everyone to see, give ideas and encourage - all packed in a box you have positive emotions towards.
It's not "any device" that can connect to the TV - it's your Switch, and you can make games on it now!
Fuze can make programming fun :)
Yes, I've tried many ways to get them interested on how the stuff they enjoy actually works, but they prefer to use digital stuff just for entertainment.
But I get the instant gratification part - which this language, if was well built, should have small milestones do display progress.
Mine's a different example, but I know exactly what you mean. It was my first opportunity to make a place of my own on a website and almost 20 years later I'm a web developer and the feeling that website gave me had a lot to do with me getting where I am.
I missed the generation of computers where writing BASIC was just a part of owning one. I think it's a shame that writing code isn't a more integral part of life, but I understand why it isn't anymore.
[1] - http://20megsfree.com/
It was without a doubt significantly easier to start programming when the process consisted of hook the Commodore up to the TV, plop in your disks/tape, and write in a dead simple language that can be largely described in a few short pages. We haven't had anything like that for years; a spiritual successor to BASIC on a set hardware and software environment (the Switch) is as close as we'll probably come in this day and age.
A teaching technique as old as teaching - find something the kid is actively interested in and excited about, and sneakily teach them stuff using that.
Which was a few years old then, the games such as they where never held any interest but a machine that could be told what to do was magic to me.
I could write programs on a ZX Speccy before I could read (properly) and that started a life-long love (and career) in software development.
Not wrong, per se, but a super-technical HN reader was not the target of Dropbox, and I feel like it's the same situation here.
While you could, I guess, plug your HDMI cable from your computer running your first hello world python program onto a screen, I think there's something much more tangible and incredible to a child to run their own code on the device they usually play video games on. As a 10 year old, I would flux around with the debugger cheat in my Star Wars n64 game and think "well obviously these numbers change the color of fog, but how on earth did they code the actual game? The characters? The lasers?" What's being demonstrated here is "look kids, it IS possible for YOU to write code and run it on a video game console! YOU can become a game developer, if you learn about this stuff!"
Another anecdote - my uncle gave me his old computer to pull to pieces, I wanted to know how it went from circuits to showing Windows on the screen. I finally get to what he kept calling the "motherboard" and "processor," which he said is where most of the work is happening. So I pulled off the processor, disappointed at just seeing more circuits. He said there was even more circuitry inside it, so I cracked it open to find a black blob of I guess silicon. Nothing revealing how it worked! "What'd you expect to find," he asked, "a brain?" Imagine if the gap had someone been bridged by the existence of arduinos back then, or even just redstone in minecraft - a direct link between logic gates and, say, a calculator working.
Even for highly technical users, "pay someone else to do something trivial for me, because they do it well" is still a huge draw.
You do realize that people play game on PC too? The main issue that you are trying to address, i think, is whether there are other frameworks in teaching kids programming with games?
In, fact the part of world where i live in, it is much more expensive to buy a nintendo switch than to assemble a computer and hook it up to your tv and use scratch to teach the kids.
Besides, games are not important. They are really fun, but things like medicine, art, literature and mathematics are way more important. All of which programs can empower, sure.
I know we all here love code, but objectively speaking, it's not the best thing in the world unless a person has a specific inclination towards it (like I do, but not all do, and it's totally fine).
I feel like statements such as
>games are not important
are very unfair. Same with your assumption that a game developer will be I guess a capitalist slave? What about indie developers? Crowdfunded developers? Dwarf Fortress?
Some indie games that have exploded, off the top of my head:
* Flappy Bird
* Shovel Knight (crowdfunded)
* Divinity and Divinity 2 (crowdfunded)
* Stardew Valley (single developer)
* Minecraft (was a one man passion project)
* Terraria
> I know we all here love code, but objectively speaking, it's not the best thing in the world
What gives you this perspective? Speaking as someone who has tried art/literature, I think it's a false narrative that the "starving artist" is happier because their work is more "fulfilling" or something. I tried that, and yea I loved my art and I loved pursuing it, but it didn't pay the bills, and I still had to have just a regular job to keep it up. A sales job, keeping me at a healthy but relatively insignificant 40k/year, limiting my travel options and forcing most of my time to be spent sustaining my ability to eat and pay rent.
Then I discovered programming - still a creative endeavor! I can work for a company, freelance, work from home, work much better hours, and at that paygrade I could afford to get solid savings that grants me the confidence that I can retire at some point to pursue my writing full time, if I want.
As for medicine, my conversations with friends who have to put up with 10+ years of medical schooling at massive costs only to suffer through 60-80hr workweeks and claw their way up the medical ladder have convinced me that that path is not something I would like to entertain.
If you want to hack on the code, there's a mirror for the original RTB source here: https://github.com/scruss/rtb
It diverged from FUZE back in 2013, though, so it will be quite different but may be fun for anyone who's more interested in the guts of the interpreter than the language itself.
They write the "print" statement like it's damn Java. A simple `print(outstring)` would have been sufficient, instead of two lines of Java-esque sys.stdout.write nonsense.
Not to mention something like `colored` and `colorama` or `click` would solve the colored text thing. Though I'll admit having globals like INK and PAPER makes things a bit more intuitive for kids.
But the fact that they go out of their way to make the Python example more intimidating is a little... annoying.
This smacks of the writers trying to intentionally make their comparison language look obtuse. A pattern I've seen elsewhere and am never a fan of.
import random
import time
while True:
col = random.randint(30, 48)
print("\x1b[{}m{}\x1b[0m".format(col, "Hello World"))
time.sleep(1)
Which is still pretty obtuse, but the "random colours" task seems hand-picked to penalize Python.It neglects to mention that Fuze has virtually no utility beyond an educational curio, too, versus Python which is used for many, many things.
I'd like to see a satire done in a code-golf style: you think writing a line to a file in Python is easy? Think again, after you read this 400-character line of lambdas, string interpolation, and chained ternary operators!
Assembly code could be made to look like the sane alternative at the (il)logical extreme.
More appropriate would be to compare with some Python programming kit that had similar graphic environment abstractions:
fontsize(4)
while True:
ink = rndcolor()
paper = rndcolor()
text("Hello, world!")
sleep(1)
But even then, unless you wrap Python with something that handles imports/globals/etc for you (a la Processing), doing this in Python is still going to take a bunch of extra gunk.But you're right, a fairer comparison would be against a Python learning environment that sweeps some of the cruft and gotchas under the rug, and complexity is very tough for beginners.
Speaking from experience running and helping in workshops, I found a lot of Python learners would name their code "somemodule.py" after the module they're learning about, and this would subsequently break "import somemodule". So there's a lot of merit in "safer" environments.
I am, however, a little concerned about one of Dijkstra's "unpleasant truths"[0]:
> It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
I'm not qualified to interpret Dijkstra, so how serious of a warning or truth is this? Is he just generally polemical?
[0] http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EW...
My experience may nor count for much, as I didn’t dive too deep to either of the first two basics. But I’ve read far too many stories of good programmers getting started on BASIC from code samples they read on books and magazines. So I would say it’s fine.
Also, for all the great things that can be said if Dijkstra, he wasn’t exactly known as a positive motivator, so I’d take his statement with huge grains of salt.
Mental models are important. Life would be better for everyone if people started learning programming with LISP, Smalltalk, or at least C#'s LINQ in LINQPad.
I have only recently realised that my terrible misunderstanding of programming is slowing me a lot.
Functional programming is a completely different conceptual model and even if you don't use it day to day it teaches you some important principles.
Is it good if I rebuild my foundation on JS? I feel like JS is a bit, uh, messy.
Understand JavaScript deeply.
Write your applications in TypeScript.
Function scope is good.
Closures are good.
Higher order functions are good.
Partial function application is good :-)
Warning: if you get too used to FP style programming in JS, Java will feel quite painful afterward.
If you want to learn about functional programming, something like this could give you fun and relatively painless head start: http://www.4clojure.com/ . Also, you could try to download LINQPad and look at code examples.
If you want to learn about real OOP, I would recommend looking into Smalltalk, learning about design principles behind Xerox Alto/Star and listening to some OOP seminars from mid-80s.
If you want to learn about high-level system design, here are some intelligent people I would listen to: Alan Kay, Rich Hickey, Peter Norvig, Salvatore Sanfilippo.
I would also recommend every programmer to watch through at least one introductory AI class. Not because they necessarily need to work with AI algorithms, but because those classes teach to solve programming problems in a better way than just "write more logic and abstractions".
https://ocw.mit.edu/courses/electrical-engineering-and-compu...
https://www.youtube.com/watch?v=mkBM4jvrhzk&list=PLAwxTw4SYa...
Hope this helps.
Consider the language reference for Altair BASIC (linked at http://www.swtpc.com/mholley/Altair/Altair_Basic.htm) - almost all of the flow control is by line number references.
By contrast, FUZE (https://fuzebasic.com/bin/FUZEBASIC_Programmers_Reference_Gu...) looks like it has all of the modern affordances you'd expect, like block IF statements, local variables, and the ability to refer to subroutines by name instead of by line number.
I'd love to put my Lua-based programming IDE on the Switch, which turns out is a bit similar to this Fuze project .. but I'm un-certain just how much of the Switch is locked down and how much is available. Do I have to register to get full features as a developer, or something?
That would make sense, as I think there's plenty of cases where a device hasn't been selective enough with the marketplace initially, and the deluge of crap makes people think the market isn't worth using. It's much easier to shovel crap out the door immediately than it is to deliver a polished product, so early markets can be quite bad.
Everything I've heard is that Nintendo is really trying to keep the quality bar high on the Switch e-shop though, which I can definitely appreciate. Sucks for really small shops that don't have the ability to jump through all the hoops and get approved, but its nice as a player to know the games probably aren't going to just be gimmicks. That said, the initial release of NBA Playgrounds on Switch was pretty abysmal... Fortunately they've been working to clean it up. I guess Nintendo probably just didn't want to be left out on their initial release and felt like an arcadey basketball game would be a perfect fit for the Switch demographic.
They've also been very quiet about whether the Nintendo Web Framework, a HTML / JS based set of APIs for the Wii U, would be available for Switch. I hope it is. Unity is great but the NWF would be great for prototyping etc.
Homebrew is still brewing (excuse the pun). There are two toolchain being developed, libtransistor and libnx. To run the code, We have one public exploit for 3.0.0, and a private full system compromise for 1.0.0 all the way to 3.x, which should be published Soonish.
Disclaimer: I am heavily invested into libtransistor. This toolchain is still in the early days, but an snes emulator, doom and SDL got ported to it, with visual output (software rendered), audio and input.
Work is ongoing to get hardware acceleration, c++ support, and various other things. Some people are trying to port Love2D to the switch, allowing for homebrew written in lua just fine.
And a lot of the console is documented. Check the switchbrew.org wiki out.
They're still in the early stages, but it's promising considering it's from the same team that made the successful Citra 3DS emulator. I know it's not technically "developing on the Switch", but it might give some insight.
Codea is great. Lua, not basic. Great asset management for games. Pythonista is pretty good. Python, not basic. Swift Playgrounds is pretty great. Swift, not basic. You can do pretty much anything, including 3D and AR.
Continuous .NET C# and F# IDE by Krueger Systems, Inc.
and
LowRes Coder by Timo Kloss
Visual programming languages like Scratch et al have risen for a reason.
http://github.com/antirez/load81.gitMy 5th grade son has been out of school sick this week, and he wanted to "learn to code" while he was out. Monday he started with scratch on RPi. He quickly hit the wall there; dragging blocks around was tedious and (from my perspective) the event model isn't obvious enough or rich enough to what he wanted (a simple space shooter).
He asked if he could try something where he could type his code. I decided to let him try swift playgrounds. As of this morning he's worked through the chapters on commands, composition, functions, for loops, and conditionals. He's completely baffled by the logic chapter -- he was in tears trying to understand the concept of NOT, and so I asked him to take a break from it. (I don't get it... he understand booleans fine, but the idea of negating the boolean is clearly throwing him.) He skipped ! and did fine with && so shrug. Fifth graders aren't going to get everything.
I have quibbles with the content progression in the Swift Playground lessons but overall it's working as intended. It's pretty buggy though -- sometimes the animated character is clearly on the wrong squares due to an apple bug and that really hurts learning comprehension.
The real carrot for him, though, is that he's learning the language that iOS apps are made in. That's really motivating him.
With his older siblings I helped them learn Codea and while Lua is great for learning, they got hung up on the concept of per-frame update functions, which is not a Lua thing but a Codea thing. I think an OOP model is a better metaphor for learners. They had fun in Codea but none of it stuck with them.
My six year old daughter is also working (slowly) through swift playgrounds. She asked me for help and when I did she berated me for not using camel case. God help me when she learns about tabs versus spaces.
Anyway: screw BASIC.
Perhaps Scratch is good for the first couple days of learning, but I think the ceiling hits pretty fast especially if the kids are really understanding the principles.
It also says it retails at 30 USD. I think it's a legit app for the Switch.
and THAT sounds fun
How about, you know, paying the artist?
Anyway, it doesn't inspire confidence - developing a game and getting it published (especially on a physical Switch cartridge) is much more expensive than hiring an artist. How do they expect to succeed? Why aren't they crowdfunding?
Sounds like a worse idea to me. Lots of people do work and only a handful win. With their current offer, lots of people can do work and lots of people can win.
Also, the Switch is perfectly capable of using the internet, and has onboard storage. There is no technical barrier to them choosing 25 winners a month and offering them as download packs even after release.
and the fact that it's for the switch doesn't make one automatically assume it's part of the visual programming group because most of the switch games were probably programmed with text based languages.
Smartphones aren't the Nintendo Switch, and (for me, at least) wallpapering over the differences in hardware platforms is not an exciting part of the learning-to-code experience.