
John Carmack's son's game in Racket - tesmar2
https://groups.google.com/forum/?hl=en#!topic/racket-users/yjRuIxypUQc
======
myth_buster

      Dropping a newbie into Eclipse or MonoDevelop makes them feel like 
      they are walking around in a byzantine museum, afraid to touch 
      things, while DrRacket feels closer to old-school personal computers 
      where you felt like you were in command of the machine. 
    

I think this is a very important observation. As with most things, it's
extremely important to get in during the humble beginning stage and then
tracing your way up to grok more complicated systems. Similar to the "first
principle" approach.

~~~
bliti
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

~~~
jsingleton
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).

~~~
pekk
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.

~~~
pbhjpbhj
>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.

~~~
mfisher87
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.

~~~
vidarh
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.

------
bcantrill
I imagine this sentiment is going to be very unpopular here, but as a parent
of a ten-year-old, I find this kind of fetishizing of the accomplishments of
ten-year-olds to be disturbing. I think it's great that Carmack's son has
taken an interest in programming at such a young age, but why need this be so
public? Not only does this do his son a disservice (who, despite his
precociousness, is not old enough to understand how cruel the internet can be
-- or how long its memory), it also does other children a disservice by
implicitly encouraging absurdly aspirational parenting. Witness this comment,
found in this HN discussion:

 _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._

It's great to inspire your kids to program (computational thinking is
literacy, after all), but it's deeply misguided to believe that normal ten-
year-olds exhibit the kind of intense interest that Carmack's son seems to
display here -- and indeed, believing that a "method" can yield this kind of
interest in a child can result in the kind of paternal (or maternal)
disappointment that does lasting emotional harm.

Good on Carmack's son for showing such interest and talent, but let's
encourage that to be fostered relatively privately -- and thereby allow him to
be what he is first and foremost: a ten-year-old kid.

~~~
mordrax
As a Chinese, this is pretty normal. In fact I'd push him to perform in sports
and academics as well.

On a more serious note, sadly the majority of Chinese/Asian parents i know
would take the first sentence seriously.

~~~
draugadrotten
So stereotypes and racism is OK on HN, as long as the victims are Asian?

~~~
yoz-y
Is it considered a racist stereotype if it is true though? My wife is Chinese
and most of her stories do corroborate what parent said. In big cities the
school system is very demanding and if you want to land in a good college you
have to land in a good high school and so on. With an extremely competitive
job market it is not unconceivable that parents push their kids very hard.

~~~
PavlovsCat
Sure, but there is still a difference between, say, "as someone living in a
certain section of a highly competitive environment", and "as a Chinese",
since the latter could at least be read to imply that it's a genetic trait,
which would be obviously silly. Of course it can also be a shorthand for the
more verbose way to put it, but I _suspect_ people here are talking more about
descent than the society they are most tightly integrated into.

------
Arjuna
_" Now I get to show him how there is actually a cleaner 1000 line program
hiding inside his 2000 line program."_

[https://twitter.com/ID_AA_Carmack/status/635831064846594048](https://twitter.com/ID_AA_Carmack/status/635831064846594048)

~~~
Johnny_Brahms
Ah! That constant realization. It is hard, but the "what now" feeling I get
after polishing a small stupid sideproject of mine until there is really
nothing left to do but adding features I don't need or want. I like to think
it is teaching me good habits, but that is really not very comforting.

This week I revisited my scheme automounter I have running on my raspberry pi
that I wrote when I first learned scheme. I made the code half as long and
made it not suck and now I am struggling with not starting an ever-growing
project of replacing systemd with it...

~~~
SSLy
[https://www.gnu.org/software/dmd/](https://www.gnu.org/software/dmd/)

~~~
Johnny_Brahms
Beautiful!

------
ohitsdom
> I’m still taking a little heat from my wife for using an obscure language
> instead of something mainstream that is broadly used in industry

That is hilarious.

~~~
rgawdzik
Since his son is 10 years old, he'll most likely enter the professional
industry in ~10 years. Maybe Racket will be a popular language by then.

~~~
guiomie
I doubt he will need to know a popular language to get employment
opportunities if he starts at 10.

~~~
denim_chicken
I doubt he will need to know a popular language to get employment
opportunities if he's the son of John Carmack.

~~~
lern_too_spel
I doubt employment will ever matter to him if he's the son of John Carmack.

~~~
cpach
Well, I guess even some rich kids might want to make their own fortune rather
than living off their parents.

~~~
lern_too_spel
My point was that he's more likely to work for himself, whether for increasing
his wealth or for some other goal, than care about how employable he is to
somebody else.

~~~
cpach
Ah, yes. Good point :)

------
dpcan
Awesome!

My 11 year old son submitted his first LudumDare Jam game this morning. It's a
Javascript / HTML5 clicker/incremental game (think Cookie Clicker) built on a
game engine I created. He's been getting so much better at coding all summer
long. I had to help a lot at first, but now he's implementing everything on
his own, and only comes to me when he can't hunt down a bug - which 99.9% of
the time is a missing end-quote, ) or }

I'm not sure I want him to have a public website though with photos and an
email address posted :/ I guess I'm not as trusting of... well... the entire
world. Then again, maybe it's a good idea. I don't want him to leave the house
at 18 and be surprised at how nasty the Internet can be.

~~~
wishinghand
Thinking back to my own learning curve, I'm not sure if a linter would be
helpful or harmful. On the one hand, it makes him think about the little
details, on the other hand, not having to think about it frees him up to move
on to thinking about bigger things.

------
bitwize
> DrRacket feels closer to old-school personal computers where you felt like
> you were in command of the machine.

This motivates the design of my Scheme IDE, Glass Table
[[https://github.com/bitwize/glasstable](https://github.com/bitwize/glasstable)],
which is modelled on old-school micro BASICs (notably from Microsoft).

GT is implemented as a series of hooks into the REPL, which listen to all
typed input for variable, procedure, or macro definitions and log them in a
"workspace" which can then be saved as a Scheme file. Individual definitions
in the workspace can then be edited with an inferior editor (or, if you are
working from inside emacs, with emacsclient).

Not to take anything away from DrRacket of course. Any programming tool that
puts direct, immediate command of the machine at your fingertips is a good
thing.

~~~
jshap70
I love scheme, though at first I definitely thought I would hate it. The big
issue that I have with it is the difference between interpreters and how
things that work in Petite won't always work in Gambit.

------
btzll
The son's favorite games don't include any games of his dad. That's quite
funny.

~~~
chkuendig
Maybe he's not old enough yet to play any of his dad's games :)

~~~
nailer
Keen would be age appropriate.

~~~
plumeria
Commander Keen is indeed fun, but when you lose you have to start over from
the beginning.

~~~
socceroos
They were the days.

------
vivekian2
Nice!

A bit off-topic here, but still related I guess. I have a 1 year old daughter
and I keep wondering what would be the right time to introduce her to
computers and programming in the future?

I have always thought that she should spend time reading books, playing in the
backyard and lego before she delves into computers.

Have any other programmer parents thought about this as well? Or any other
experiences on how they introduced programming to their kids?

~~~
beggi
I have a 2 year old and I'm not sure, but she's definitely not ready :) I
think we're talking 4-5 year old at least to start introducing the concepts,
then I'm guessing 7-9 to start doing some programming.

~~~
zeidrich
I have a 2 year old, and we play Minecraft, and I'd say we've started with
'concepts' already.

Simple things, but things like make a switch that turns on and off a lamp or
opens a door. Or simply building larger things out of smaller things.

I mean programming is really a matter of logic and composition. Something like
"This switch will turn off all of the lights, but these switches will turn on
and off individual lights." is a sort of "If (mainswitch is on) then {lights
settings is the same as its switch} else {light is off}"

Apart from some pretty simple logic, it's really just composition. A turing
machine is comprised of some really simple functions, and apart from that it's
just a matter of understanding how to compose those into more complex ones,
and understanding programming is just recognizing the processes of breaking
down those complex compositions into simpler ones.

------
tomphoolery

        I’m still taking a little heat from my wife for using an obscure language instead of something mainstream that is broadly used in industry,
    

That's adorable. Of course John Carmack's wife would be ribbing him about what
programming language he uses.

------
agentultra
Not only John Carmack but Mathias Felleisen in one thread? How cool is that!?

I had the same impressions as Carmack, I think, about the suitability of the
DrRacket environment for young programmers. It's nice seeing that it can work
for young, motivated programmers.

------
confiscate
Woah. Nice job Ryan

It's pretty cool how he added squealing sounds when the FLY character dies. I
died several times while being in Ghost mode. This game is hard!

When I was 10 I was probably still reading choose-your-own-adventure paperback
books. Ryan's already wrote his own game in a functional language.

Nice job!

------
Osiris
I have never done any game development and my primary programming experience
for the last few years has been JavaScript.

My 10 year old daughter has a lot of ideas for games, but since I have no game
programming experience I literally have no idea where to start with her. Does
anyone have any suggestions for a good framework / toolset to get started for
a simple game?

~~~
Tyr42
[https://processing.org/](https://processing.org/)

Processing seems pretty good.

I'm teaching my younger brother with PyGame and Python, and that's ok, but not
perfect.

~~~
Gracana
I'm a big fan of processing for learning. It does just the sort of things you
want out of the box, it comes with lots of examples, there are books available
on it, the time to get set up and running your own programs is practically
nil, and it runs the same way regardless of the platform you put it on. All
great stuff for a "toy."

------
cicero
I am beginning my second time of teaching out of HtDP/2e at the high school
level. My experience last time I taught it (3 years ago) was similar to what
Carmack describes. There are many advantages to the DrRacket environment and
the Racket language (or BSL teaching language) for teaching beginners, and I
think HtDP teaches some valuable design techniques and disciplines.

I also felt that the approach to drawing taught in HtDP became awkward as
things got complicated, so I appreciate some of the advice given in the
thread. I may try some of these things this semester. I may also try jumping
out of BSL into full Racket at some point so that we can use some more
advanced features.

------
Axsuul
That's great to see that John Carmack's son has a similar passion for
programming as his father. However, what if his son turned out differently and
didn't have it in his blood? Would John Carmack still pursue it?

~~~
nemo1618
That's a good question. Speaking from experience: I am a programmer like my
father, but my older brother is not. My dad and I discuss programming all the
time, but he doesn't take much interest in my brother's hobbies. For what it's
worth, he tried to steer me towards programming from a young age, but it never
really stuck; we never built anything interesting. I did, however, write some
simple games for my TI-83+ calculator, and finally I rediscovered serious
programming in college.

My guess is that Ryan is primarily interested in programming as a means of
making games. And since his father basically wrote the book on that topic,
he's in a perfect position to nurture that interest. If John instead wrote,
say, the world's best accounting software, I think Ryan would be more likely
to pursue a different hobby.

------
technomancy
Hopefully he will eventually share the source code. I showed it to my son who
was very interested to see how it was made. We go back and forth between
Racket and Lua Love; he thinks Love is easier, but seeing examples of Racket
that other kids had made might encourage him to explore it further.

I would love that since Racket is obviously a much better language than Lua
for learning, but Love is still a bit more approachable for graphics than
Racket's universe library.

------
drcode
For anyone interested in yet another opinion, I've had good experiences with
my young daughter using the Wonder Workshop robot as an early programming
introduction. It has pretty solid hardware and relatively flexible
programability: [https://www.makewonder.com/](https://www.makewonder.com/)

------
nickbauman
FRP notwithstanding, the comment about UIs is important in that OOP was
originally developed around the needs of user interface components with their
inherent "mutable state" and single-threadedness (ever find yourself needing
to use two mice at once?)

~~~
thaumasiotes
> (ever find yourself needing to use two mice at once?)

Yes. I tried to get that working in GNOME once, naively expecting that because
it's trivially easy to state well-defined behavior for multiple mouse cursors,
it must also be possible to _have_ multiple mouse cursors. But no. I'm still
bitter that this seemingly obvious concept seems to be so thoroughly precluded
at very basic levels.

~~~
saint_fiasco
Supposedly, it will work on Wayland.

[https://www.youtube.com/watch?v=WO2L_ihO_rI](https://www.youtube.com/watch?v=WO2L_ihO_rI)

------
Kiro
> but I’m not sure that the functional drawing paradigm ever really sank in
> while my son was working with it, rather it felt like you just drew
> everything backwards with missing parenthesis at the end

Can someone explain this? How are things drawn in functional programming?

~~~
zurn
This is the Racket library in question for context, it provides a framework
for doing world simulation in a FP way.

[http://docs.racket-lang.org/teachpack/2htdpuniverse.html](http://docs.racket-
lang.org/teachpack/2htdpuniverse.html)

------
argklm
As someone that volunteer to share computer literacy to kids, I can assure you
that kids are underestimated by a big margin. I saw a lot of kids adsorbing
concepts more easily than some adults. I'm not obviously talking about Monads;
but the concepts are still fundamental to programming. Kids can get sufficient
results to do something on their own and to really enjoy it.

The thing that I see most, and in this activity, the thing that displease me
most is: parents that work as programmers and they pretend that their children
must be programmers too. They bring them because they tried in all ways to
make them interested and didn't succeed. One parent, a programmer, was worried
with the quality of the teaching and wanted to be present a day. After the end
of the meeting(I like to call them meeting. Kids see school as prison rather
than joy, and I don't want to make them feel uneasy) the programmer seemed
pleased of the experience and made a praise about the kids being happy and
interested. He told me that he would send his son, in the hope that this time
he would listen and asked about the price. I told him the truth and true
nature of that meeting: they are all kids that really wanted it: When I am the
new batch I usually try to talk of other things and wait something that makes
me happy: a kid asking me when we begin. This is the clear sign that there is
something in the room that is happy to learn. The programmer looked a bit
puzzled and I told him my opinion. Are you sure that this is what your son
want? If you imprison your son in something, he will totally hate it, wasting
an activity that he could have enjoyed at a later time. I finished the speech
saying that I'm doing it for free. My reward is making them have a good time
and hopefully, giving them a better future. Kids in front of other people can
have problems and feel anxiety. So, Carmack, I'm worried if having an entry
bar of all the Internet watching your son, could be a burden too high. Are we
sure that this is what he wants? Is he ready to compete?

Kids are precious, they will be the mark of our efforts and their mirror. I
think that your son should enjoy as much as he can what he is doing and be
kept away from the Internet consumerism for now ...

Have a nice day.

------
pmelendez
I guess the apple doesn't fall far from the tree. Good job :)

~~~
mcbuilder
In the thread he mentions that his 10 year old is through Algebra II. That's
definitely advanced for his age.

------
tbrock
From his web page: "My new game is about a character name Barb B. Queue"

It's enough that he's an amazing 10 year old programmer but he's also funny!

------
sytelus
So we are hearing about lot of 6-8 year old writing code. I'm trying to figure
out what is normal and what are edge cases. I'm wondering...

What is the age they start reading proficiently?

What is the age they start writing effortlessly?

What is the edge they can read a web manual for, say, Racket and actually
understand it?

------
malkia

      ] 10 PRINT "HELLO"
      ] RUN
    

It was that easy from my Apple ][/c

And this was pretty much fun

    
    
      ] CALL -151
      * T

------
hauget
Man I wish I'd had this kind of experiences when I was his age... WELL DONE to
both father and son!

------
js4win
Very impressive Ryan! This kid is going places :)

------
tremendo
at 10 his son is likely in 5th grade or so, knowing Racket is going to be
handy for Math homework, especially fractions.

~~~
technomancy
Later in the thread he says his son is working through Algebra II, so I
imagine it will be useful, but not quite in the way you've described.

------
fernly
OK, grumpy person here. Awesome work for a young person, but. I launched the
mac version and pressed enter. Just as I was forming the thought, oh, flappy
bird, the flying thing went down into barrier. My macbook emitted a very loud
and unpleasant sound. Then I decided I didn't want to play, so hit cmd-q.
Nothing. cmd-q cmd-q. Nothing. Ctrl-click on the dock icon, oddly, "force
quit" isn't there. Three-finger salute, select program, force-quit. Delete.

------
ericfrederich
What a shame. When you unzip it, it looks like a Linux game made to run on
Windows but where is the Linux version?

libcairo-2.dll

libeay32.dll

libexpat-1.dll

libffi-6.dll

libfontconfig-1.dll

libfreetype-6.dll

libglib-2.0-0.dll

libgmodule-2.0-0.dll

libgobject-2.0-0.dll

libgthread-2.0-0.dll

libharfbuzz-0.dll

libiconv-2.dll

libintl-8.dll

libjpeg-9.dll

libpango-1.0-0.dll

libpangocairo-1.0-0.dll

libpangoft2-1.0-0.dll

libpangowin32-1.0-0.dll

libpixman-1-0.dll

libpng16-16.dll

ssleay32.dll

zlib1.dll

~~~
cwyers
You're really complaining that a ten-year-old kid's toy video gaming product
doesn't have a Linux port? That's what you're doing here?

~~~
ericfrederich
Not really complaining about this specific game's lack of a port. More of a
general complaint about software that leverages other open source software but
cannot run on Linux. I've never used Racket, maybe it doesn't even run on
Linux.

~~~
WolfeReader
"I've never used X, _insert certifiably false statement about X_ "

I regret that I have only one downvote to give.

~~~
outworlder
Where X is just a google search away...

