[HN Gopher] GameShell: A game to learn or teach the Unix shell
___________________________________________________________________
GameShell: A game to learn or teach the Unix shell
Author : asicsp
Score : 180 points
Date : 2022-05-25 11:19 UTC (11 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| avgcorrection wrote:
| Learn?
|
| I would sooner forget.
| mathieu_joly wrote:
| I just made the first 10 missions on a Mac. It's all in French,
| which is not a big deal for me, and I confess it's pretty fun!
| mathieu_joly wrote:
| In a similar fashion and great for wannabes would be Hacknet,
| but unfortunately less challenging...
| https://store.steampowered.com/app/365450/Hacknet/
| aronhegedus wrote:
| I really liked https://overthewire.org/wargames/bandit/ when I
| was starting out! Basically 30 levels of capture the flag,
| starting with `ls -lrth`, then going up to scanning ports etc
| f0e4c2f7 wrote:
| Wow this seems really cool especially as a teaching tool. Will
| take a look later, thanks for sharing.
| hothead334 wrote:
| Addictive. I'm been going for about 3 hours!
| bitwize wrote:
| When I first started learning Unix -- way before Linux (I'm that
| old) -- there was a program called 'learn' that came with the OS.
| 'learn' taught you how to use the shell in a series of distinct
| lessons, each of which was capped off by an exercise in which you
| were dropped into a fake shell environment and instructed to
| achieve some task. Only by successfully completing the task (the
| program checked the state of the fake file system against the
| desired state) could you proceed to the next lesson.
|
| I'd been hoping for a program like 'learn' for modern
| environments. This looks like it comes close.
| marcodiego wrote:
| Interesting! Never heard about it. Can you give some sources or
| more info?
| RALaBarge wrote:
| Google is your friend
|
| https://www.unix.com/man-page/bsd/1/LEARN/
| marcodiego wrote:
| Sure. I just couldn't think of a way to convince google to
| find the right answer. Anything like "on unix learn tool"
| or "unix learn command" wouldn't bring me it. What search
| did you use to find it on google?
| lordgrenville wrote:
| Not OP but I found this with "unix man learn" (without
| the quotes). It took a few tries though.
| kulikalov wrote:
| I saw many games trying to teach programming, but never heard of
| any of them gaining significant popularity. I wonder why?
|
| I guess "play games instead of reading books" idea attracts
| audience with low motivation?
| hiccuphippo wrote:
| Factorio looks like a very popular game.
| shadowofneptune wrote:
| Games which present you with a text box and ask you to write in
| a language to solve a problem feel too much like being tricked
| into eating your vegetables. That's not saying that programming
| games can't work, but thinking about it as programming can get
| in the way. Dijkstra's famous quote is that computer science is
| no more about computers than astronomy is about telescopes, and
| games are proof of that.
|
| Factorio is often given as an example of managing complexity,
| as another response said. TIS-100 has the aesthetics of
| assembly programming but the substance is actually a game that
| teaches hardware parallelism. Even something as simple as
| having students act out the 'dining philosophers' problem can
| be thought of as a game.
| agentwiggles wrote:
| > I guess "play games instead of reading books" idea attracts
| audience with low motivation?
|
| This seems a little uncharitable in its premise to me. I've
| never had all that much success learning from programming
| books, and the success I've had seemed to happen mostly when I
| would take the examples and run them and pull them apart and
| break them and fix them (etc, etc, etc).
|
| From the other side, well designed games are remarkable in
| their ability to teach concepts to a player (even if, in the
| general case, they're not concepts with applicability outside
| the game).
|
| It seems obvious to me that some kind of interactivity is
| really helpful in learning. Not too much of a stretch from
| there to guess that the best form of programming education
| might be some kind of game/book hybrid.
| curioussavage wrote:
| Ha, I never heard of any textbooks gain significant popularity
| either. I guess reading textbooks attracts audience with low
| motivation.
|
| In seriousness though why do you think any educational game
| would ever gain popularity anywhere close to popular video
| games.And what the popularity of the material even have to do
| with the motivation of its consumers???
| vultour wrote:
| There are (used to be?) widely recommended books for certain
| topics, such as K&R's "The C Programming Language". I don't
| think any programming games are anywhere near the popularity
| of these books.
| TulliusCicero wrote:
| I think CodeCombat is pretty widely recommended
| specifically for teaching coding to kids. Not sure if it
| counts -- it's more coding lessons that are gamified in
| overall structure, and also the lessons themselves have
| gaming aesthetics (e.g. "Write code to move your hero to
| kill these orcs and open treasure chests").
|
| There's a ton of resources for this area now though, I'm
| not sure I can point to any one thing as a standard.
| TulliusCicero wrote:
| I suppose that depends on what you mean by popularity.
|
| * CodeCombat is gamified programming lessons and seems to be
| reasonably popular with kids.
|
| * Human Resource Machine teaches assembly language programming
| and was popular -- it even got a sequel, Seven Billion Humans.
|
| * Robot Turtles was a kickstarted code-teaching board game that
| became popular enough to become a ThinkFun staple (you can tell
| because of how cheap it is).
| bravetraveler wrote:
| Typically because they lean daunting, not as fun/engaging as
| the proposed audience expected.
|
| There are quite a few popular ones. Bitburner encouraged this
| JS hater (me) to give it a try.
| schwartzworld wrote:
| We all have different ways of getting motivated and learning.
| You shouldn't yuck other peoples' yum.
|
| I've definitely heard of some games that teach programming
| skills getting popular. For example, https://flexboxfroggy.com/
| http://www.flexboxdefense.com/ for teaching css layout.
|
| https://www.freecodecamp.org/ isn't marketed as a game, but
| absolutely feels like one when you are going through the
| program.
|
| https://www.hackthebox.com/ is another great example.
|
| As to reading books, I used a lot of resources to become a
| programmer, but books weren't one of them. I'd wager hardly
| anybody uses books today.
| rustyminnow wrote:
| I really liked https://mastery.games/flexboxzombies/
| [deleted]
| asr21 wrote:
| I learnt CSS Grid and CSS flexbox using those froggy game.
|
| But yeah, just one data point in millions who don't use games.
| [deleted]
| zokier wrote:
| For learning shell it would be neat for the inputs to be
| adversarial and unknown beforehand, so you learn to handle all
| the ugly edge cases properly.
| Layke1123 wrote:
| If you dont like running foreign code on your machine, you can
| run docker and then run foreign code on your machine.
|
| Did anyone else catch this in the article? Doesn't it seem like
| this makes it even more likely to get infected? No one
| understands Docker in entirety let alone this random game. It
| seems like all this stuff should just be automatically done
| behind the scenes and yet it's not.
| lapinot wrote:
| ^ bot? Doesn't make any sense to me, OP link is not an article.
| lordgrenville wrote:
| Their first line is a quote from the README.
| lapinot wrote:
| Ah, ok. In any case I was TA with Pierre teaching that
| class at Chambery this semester, to run the gamesaves from
| the student without being too worried about my files i just
| ran the thing inside a bubblewrap bash session:
|
| bwrap --dev /dev --ro-bind /usr/bin /usr/bin --ro-bind
| /usr/lib /usr/lib --symlink usr/bin /bin --symlink usr/lib
| /lib64 --unshare-user --uid 256 --gid 512 --bind TP2 /TP2
| /usr/bin/bash
| 3np wrote:
| > It seems like all this stuff should just be automatically
| done behind the scenes and yet it's not.
|
| ...what stuff?
| mninm wrote:
| Back in the 90's I remember my family got a new Compaq (I think)
| PC. On it it came preloaded with this great dos tutorial that was
| essentially a fake terminal that would walk the user through DOS
| commands letting them try various things in a safe environment
| and let them see the effects.
|
| It was definitely effective in teaching my young self the basics
| of DOS and was a big step on my path to becoming proficient with
| a computer.
| thesuperbigfrog wrote:
| Looks like fun!
|
| Reminds me Terminal Quest:
|
| https://github.com/KanoComputing/terminal-quest
| Akronymus wrote:
| Also, lists and lists, in terms of learning something via a
| text game. (cant check the actual link atm because work
| firewall) http://eblong.com/zarf/ftp/lists.tar.Z
| joyhumin wrote:
| thanks for sharing! this is really interesting!
| Annatar wrote:
| Maybe before starting to teach others, you should teach yourself
| how to cleanly package your software into OS packages, instead of
| peddling around MS-DOS style shell scripts with a .sh extension.
| Didn't anybody teach you that UNIX-like operating systems
| _purposely_ do not use extensions, in order to abstract the
| implementation language of the executable from the user?
|
| How the hell are you going to properly teach others, if you have
| such knowledge gaps yourselves?
|
| It's blind leading the blind again; boy does this make me mad.
| havblue wrote:
| I'm confused as to why you're choosing this hill to die on.
|
| I also use ".sh" at the end of bash script files for usability:
| at a glance it's obvious how run "build.sh" and exactly what it
| does without the person building it having to read a readme or
| an email that you authoritatively sent months ago regarding the
| optional build processes.
| Annatar wrote:
| agentwiggles wrote:
| Thank goodness that all the many people I've learned from over
| my life didn't have to meet some arbitrary gold standard of
| knowledge before they were allowed to teach me! Hardly anyone
| could have ever taught me anything by this standard.
|
| Similarly, thank goodness I've had the opportunity to expand
| and solidify my own knowledge by teaching people things I knew,
| even if I wasn't sure of all the details. I can't count the
| number of times I've had to stop mid-explanation and say "wait
| a second, that thing I just said doesn't really make sense.
| Let's take a deeper look and figure it out together."
| drchickensalad wrote:
| https://github.com/torvalds/linux/tree/master/scripts
| Twisell wrote:
| I'm sure you'll be wholeheartedly welcomed if you submit a
| push request to fix this heretical use of suffix!
| JadoJodo wrote:
| > boy does this make me mad.
|
| I'm not sure that I can add much beyond what's already been
| said in reply, but I do want to say:
|
| If something this (arguably) trivial does, truly, make you mad,
| I would encourage you to reflect on _why_ and perhaps talk it
| over with a friend or colleague.
| feralfoo wrote:
| that's a pretty toxic attitude you have there...
| havblue wrote:
| I read the post with a Christopher Lee villain voice which
| made it entertaining.
| silviot wrote:
| I (25 years working with GNU/Linux) usually name my bash
| scripts `something.sh`. I think it's debatable wether it's
| always good or bad, and when specifically it can be a good idea
| to leave out the `.sh`.
|
| Also, it doesn't look like you looked into the game and came
| out with some conclusions. It looks more like you superficially
| had a look, you had a thougt and rushed to comment here about
| what you believe is a deadly sin. I personally never enjoy this
| kind of comment, as there's not much thought behind them.
|
| I tried it (before recommending to a teammate) and I also
| noticed some things that could be improved. But it never
| crossed my mind to post a judgement on the project after trying
| it out for just five minutes.
| Annatar wrote:
| primitivesuave wrote:
| It may benefit you to read the HN Guidelines:
| https://news.ycombinator.com/newsguidelines.html,
| specifically the "In Comments" section.
|
| > Be kind. Don't be snarky. Have curious conversation;
| don't cross-examine. Please don't fulminate. Please don't
| sneer, including at the rest of the community.
| franknstein wrote:
| It seems like you are teaching others how to teach. Is that
| your area of expertise?
| Tr3nton wrote:
| I'm glad you're mad, but based on this comment and the rest of
| your comments in this thread it seems that's just your normal
| operating state. Your argument seems to be that unless someone
| uses a computer exactly as you do, and has your exact selection
| of knowledge in their brain, then they're incapable of sharing
| any knowledge at all. Furthermore, there aren't many Unix/Linux
| users that operate in a vacuum, and often you'll be using files
| with extensions that come from other OSes that use extensions;
| and additionally, file extensions are a useful fast way of
| knowing exactly what kind of data the file contains. You're a
| mega idiot who deserves to be constantly seething
| arky527 wrote:
| I find the use of a 'sh' file suffix a useful convention to
| follow in helping identifying what is an isn't a shell script
| on my local machine
| Annatar wrote:
| You are not supposed to "identify" anything on UNIX-like
| operating systems; that is what the file(1) command is for,
| specifically, especially so since the entire concept of UNIX
| is that everything is _a stream of bytes_.
|
| Attempting to manually manage files in this way defeats the
| purpose of the OS abstracting it away for the user; and the
| users of your executable _should not_ have to care what your
| executable is written in because you grew up on a PC-bucket
| whose operating system stems from CP /M -> MS-DOS!
| delta_p_delta_x wrote:
| As someone who _did_ grow up on Windows and still uses it
| regularly alongside Linux, I want to respond to this
| comment just to play the Devil 's advocate (i.e. infuriate
| you).
|
| > especially so since the entire concept of UNIX is that
| everything is a stream of bytes.
|
| I consider this an archaic, anachronistic, ancient,
| outdated, primitive (they all mean the same thing; I just
| used a thesaurus to really drive home my point) file model.
| While it made sense for the limited computers of the early
| 1970s, it is extremely hobbling today and the fact that no
| one really complains about it is... quite astounding. If
| every file is merely a bag of bytes, then every native
| program shall have its own file-parsing/byte-parsing
| routine. What a waste of effort, writing and rewriting
| parsers over and over again.
|
| The fact that one has to write a shell script that is
| interpreted, and _itself_ calls not one, but _three_ other
| binaries (cat, grep, awk) with arcane, not-easily-
| remembered flags _just_ to extract out certain words in the
| last several lines of a file is... ridiculous. That you
| have to call 'file' instead of _directly querying the OS
| or shell for file attributes_ is farcical. Consider
| PowerShell or Python as alternatives to shell scripting. In
| the former, the _entire_ .NET library is available; in the
| latter, the default libraries may be imported as one sees
| fit, and additional libraries are available online.
|
| > defeats the purpose of the OS abstracting it away for the
| user
|
| The UNIX philosophy does a poor job of 'abstracting it away
| from the user'. For well-abstracted OSes, see any
| smartphone today (especially iPhones).
|
| Furthermore, not every UNIX/Linux user interacts with their
| computer solely over the command line; I use KDE Plasma,
| for instance. In general, when I see a file on Linux with
| no extension, I expect it to be a binary; I am surprised
| when it is, in fact, a shell script.
| Annatar wrote:
| disintegore wrote:
| Oh, hey, I used that. During the OS 101 course at UQAM. It was
| alright. Less of a game and more of a tool to wrap around
| learning exercises though.
___________________________________________________________________
(page generated 2022-05-25 23:01 UTC)