News for hackers. Stuff that matters.
Re:John Carmack's son's game in Racket by bliti on Monday August 24, 2015 @03:13PM (#10112322)
My 7 year old is learning on a Raspberry Pi that does not load X by default. She gets around the terminal pretty well (changing, dirs, calling python scripts, etc.). The GUI is just overwhelming at this point. She prefers the terminal. In fact, she will boot it up and type:

    nano story.txt
To start writing simple stories (she loves doing that). And yes, she saves it by pressing Ctrl-x, y, and enter. :D
Re:John Carmack's son's game in Racket by bbcbasic on Monday August 24, 2015 @07:32PM (#10113472)
> And yes, she saves it by pressing Ctrl-x, y, and enter. :D

As a child there is no bias as to 'oh it must be hard doing that because I am use to clicking X in Windows' they just learn stuff and get on with it. We should all remember to be like children sometimes. Explore ... not language wars!

Re:John Carmack's son's game in Racket by jsingleton on Monday August 24, 2015 @03:57PM (#10112591)
You can set a Raspberry Pi to boot straight into Scratch. It's a great introductory graphical programming language.

The next step is usually Python but I'm not sure kids will get the significant whitespace. Go is an option or maybe BASIC (on RISC OS perhaps).

Re:John Carmack's son's game in Racket by hodwik on Monday August 24, 2015 @06:29PM (#10113271)
>Go is an option

Drink the koolaid, fine, but don't drink THAT MUCH of the koolaid.

Re:John Carmack's son's game in Racket by jsingleton on Tuesday August 25, 2015 @05:32AM (#10115334)
Never used Go and have no plans to in the near future either. I have found C to be a useful training language but it can get tricky once you get to pointers.

Just not discounting Go based on what I've read. e.g. https://news.ycombinator.com/item?id=10054270

Re:John Carmack's son's game in Racket by bliti on Monday August 24, 2015 @04:03PM (#10112627)
We tried scratch, but it bored her for whatever reason. Its a nice environment, though. Python is something she is slowly learning through command line games like rock, paper, scissors. Go, well, I don't want to have her suffer through Go's syntax just yet. BASIC is outdated and too verbose. She has typed C code before and found it fun. Dunno, I don't want her to be anything but herself. This is just a way to spend time together.
Re:John Carmack's son's game in Racket by jsingleton on Monday August 24, 2015 @04:11PM (#10112666)
You might find some hardware add-ons make it more fun. GPIO is the killer feature of the Pi. You can use a lot of the HATs from Scratch as well as Python. http://wiki.scratch.mit.edu/wiki/Hardware_That_Can_Connect_t...
Re:John Carmack's son's game in Racket by bliti on Monday August 24, 2015 @04:16PM (#10112692)
I do plan to introduce her to GPIO stuff. Maybe mix it in with a video game of sorts. She does have experience with the Arduino, so the concept of sensors is not new to her.
Re:John Carmack's son's game in Racket by grayclhn on Monday August 24, 2015 @04:13PM (#10112673)
It's kind of out of place in a pure text environment, but Processing[1] might be fun to play with. It's designed for visual arts.

[1]: https://processing.org/

Re:John Carmack's son's game in Racket by pekk on Monday August 24, 2015 @04:43PM (#10112821)
There is nothing harder to understand about indentation levels than curly braces, if you haven't already developed a preference for curly braces. Go is really not designed as a tool for new programmers, you are just projecting your preferences onto kids.
Re:John Carmack's son's game in Racket by pbhjpbhj on Monday August 24, 2015 @05:30PM (#10113030)
>There is nothing harder to understand about indentation levels than curly braces //

At the start of this year I finished a first course in Python to learn in anticipation of [possibly] using it for home learning with my kids (it seems widely used for education). As I'm familiar with programming I searched for an IDE as I started. It told me when I had dropped a space or used a tab by accident. I tried several different environments including my standard editor choices - nano and Kate - revealing non-printing characters was a clear advantage. Others (primarily adults) who were starting fresh in programming had lots of problems with errant spaces.

With braces you can see more clearly when there is an error of addition or omission, not so much with spaces. Like I tried to say above: this is clearly tractable with the right tools but the demarcation - I feel - of braces can be a more clear and obvious sign of separation than whitespace. For younger people with less spatial reasoning and less accurate perception of text lining up it rather seems it could be pretty much harder to use whitespace structuring.

Personally I like the overall "clean" appearance of Python compared to PHP (say), debugging with tools is fine, when I was testing different environments and tripped on whitespace problems it was a nightmare rather reminiscent of trying to debug HTML tables some years back.

Re:John Carmack's son's game in Racket by mfisher87 on Monday August 24, 2015 @07:47PM (#10113524)
My intuition is that indentation is more readily apparent. You can tell that a group of lines or an individual line is indented or not at a glance. It's natural to see that they are grouped. With braces, you have to search for the opening and closing brace, and furthermore you must search within those braces to ensure another brace set isn't being opened, in case you missed one. You have to learn both -- about how to designate a set of statements as grouped using opening and closing braces, and how to detect a common class of errors related to nesting braces.
Re:John Carmack's son's game in Racket by vidarh on Tuesday August 25, 2015 @05:00AM (#10115241)
The thing is, those of us who prefer braces or other syntax elements also indent. It's not either/or. I want the redundancy. I can more easily see how things line up.

> With braces, you have to search for the opening and closing brace

It's probably been 20-30 years since I used an editor that couldn't highlight the matching brace, and that wouldn't show me which opening brace the closing brace I just put down matches up with.

But it's just been a day since the last cut and paste "accident" left me with a badly mis-indented piece of code... which I happily could auto-format back to sanity with a couple of keystrokes because the indentation was not all the editor had to go by.

Re:John Carmack's son's game in Racket by bliti on Monday August 24, 2015 @04:51PM (#10112853)
Python can be a handful due to the weird whitespace rules. Its one of the things I hate about the language, and I use it every day. Dunno if I'd put curly braces in it, but the Hy language (a pseudo lisp in pythonish) really feels good to these old eyes.
Re:John Carmack's son's game in Racket by eru on Tuesday August 25, 2015 @03:53AM (#10115063)
Haskell has similar whitespace rules to Python, and no one ever complains about them.

(Haskell does support {} and ; for those in need, though. Also, it has lots of other stuff for people to complain about first.)

Re:John Carmack's son's game in Racket by vidarh on Tuesday August 25, 2015 @05:02AM (#10115249)
You answer yourself - it has too many other issues for people to complain about. And its terseness prevents most of us from ever seriously using it.
Re:John Carmack's son's game in Racket by jsingleton on Tuesday August 25, 2015 @05:22AM (#10115311)
Never used Go although I've used a lot of C style languages that use braces and line terminators. I also use Python and like it a lot.

My hesitation for using it with kids comes from anecdotal evidence (both written and in person). Kids seem to have trouble with significant whitespace (such as with Python ifs/loops/functions).

It may be better to use BASIC or Ruby. This way you avoid many of the braces and semicolons. You can still end a line with just a CR/LF but it makes it obvious where statements, functions and loops end.

Re:John Carmack's son's game in Racket by CyberDildonics on Thursday August 27, 2015 @08:31AM (#10128986)
One very good option that I haven't seen mentioned yet is Love2D. It is basically Lua with solid game libraries wrapped into very simple interfaces. load sound, play sound. load image, display image, etc. while under the hood is SDL, DevIL and other libs that make it run fast.
Re:John Carmack's son's game in Racket by 616c on Monday August 24, 2015 @04:55PM (#10112874)
I am so jealous when I hear these damn stories. Another 5 or more years to go.

Does anyone have a book about the method they develop? I bet that, following it to the T or not, it would sell here with the HN crowd.

Re:John Carmack's son's game in Racket by Rabidgremlin on Monday August 24, 2015 @05:03PM (#10112920)
I started putting together a "book" when I was teaching my 6 year old a bit about coding. It uses a BBC Micro emulator and BBC BASIC as the intro language. Never got around to finishing it... http://c4k.rabidgremlin.com/
Re:John Carmack's son's game in Racket by Rabidgremlin on Monday August 24, 2015 @05:18PM (#10112987)
However it did encourage him to want to make games... this is the first one: http://ackson.nz/

I did the coding but it was his concept, he did all the graphics (scanned pictures he drew), the font (generated from his handwriting) and sound effects (that's him making all the sounds).

He also built the levels and used a music generator to create the background music (not in the version that is on the website yet). This was all done in Unity with a lot of prefabs to make it easy for him to build the levels.

I'm totally going to introduce him to PICO-8 (see link below) next to see how he gets on :)

Re:John Carmack's son's game in Racket by bliti on Monday August 24, 2015 @05:40PM (#10113072)
Nice game! Its super fun. Wll be playing it with my kid when she gets home later today. May you share the source code? I haven't dabbed in unity and it would be nice to see how you built it (and maybe hack it a bit).
Re:John Carmack's son's game in Racket by Rabidgremlin on Monday August 24, 2015 @06:34PM (#10113292)
Glad you liked it. He'll be super-stoked to know that people are playing his game :)

I'll see what I can do re sharing the source code...

Re:John Carmack's son's game in Racket by flipmonk on Monday August 24, 2015 @05:35PM (#10113046)
holy camoly that is adorable!
Re:John Carmack's son's game in Racket by Rabidgremlin on Monday August 24, 2015 @06:36PM (#10113296)
Totally.. he even invented the company "Ackson" (for Ackerman & Son) and the company logo you can see in the corner of the main screen (him and I holding hands).

He is a pretty awesome kid :)

Re:John Carmack's son's game in Racket by zeckalpha on Monday August 24, 2015 @05:28PM (#10113021)
https://en.wikipedia.org/wiki/Suzuki_method may be adapted for programming.
Re:John Carmack's son's game in Racket by jonahx on Monday August 24, 2015 @03:34PM (#10112452)
I still feel the same way as your daughter.
Re:John Carmack's son's game in Racket by platz on Monday August 24, 2015 @03:53PM (#10112556)
I find this fascinating given that kids are exposed to things like the iPads which are purely graphical
Re:John Carmack's son's game in Racket by bliti on Monday August 24, 2015 @03:59PM (#10112610)
She has an iPad, but treats it like I used to treat a TV back when I was her age in the 80s. The RPi is to her what the C64 was to me. Tablets and phones are entertainment (read music, video and games) gadgets. The RPi is more like something to tinker with. However, just like Carmack's son, the environment where she learns is heavily biased towards technology. Having designed and built her own little robot at age six because I build robots myself. She also breadboards for fun because all the required parts are at her reach. If I had a quarter for every LED she has burnt...
Re:John Carmack's son's game in Racket by platz on Monday August 24, 2015 @04:41PM (#10112813)
very cool, thanks for sharing
Re:John Carmack's son's game in Racket by fr0styMatt2 on Monday August 24, 2015 @08:30PM (#10113685)
I had one of those "I must be getting old!" moments (I'm not that old, but still!). My niece is four and she's had iPads pretty much forever, so it was funny watching her sit at my desktop machine and immediately start swiping at the screen trying to drag things around and having the most puzzled look on her face of "why isn't this doing anything?".

Keyboard.... how quaint! :)

Re:John Carmack's son's game in Racket by Joeri on Tuesday August 25, 2015 @06:31AM (#10115488)
I was a keyboard only user back in the day, but I've spent too long on touch screen laptops, and now find myself getting frustrated every time I'm dropped behind a non touch laptop. Every single time I find myself tapping the screen to dismiss a dialog. I guess it's what you're used to that determines what you find user friendly.
Re:John Carmack's son's game in Racket by bliti on Tuesday August 25, 2015 @07:01AM (#10115572)
Its happened to my kid, too. What really shocked me is telling her that books were what existed before the internet. Her response? "There was no youtube?"
Re:John Carmack's son's game in Racket by alanh on Monday August 24, 2015 @05:36PM (#10113053)
As opposed to Ctrl-o, y, enter?
Re:John Carmack's son's game in Racket by jbenner-radham on Monday August 24, 2015 @10:27PM (#10114184)
That is super awesome.