3 ms·
It's not that bad. I turn on my computer and type: echo "This is nice." and it does. Then, I type: for i in {1..10}; do echo "This works too! Number $
by phaemon 9y ago
It's not that bad. I turn on my computer and type:
echo "This is nice."
and it does.
Then, I type:
for i in {1..10}; do
echo "This works too! Number $i"
done
And it does.
- beagle3 9y agoI appreciate this response... As you say, it's not too bad, although the {1..10} and the semicolon would be more confusing to the uninitiated (based on the fact that they are confusing to many bash veterans as well...) Now, how do you replicate SAVE "myprogram" and a later LOAD "myprogram" RUN without having to teach vi, redirection, chmod, source, $PATH, and friends? My point is that the old environments, while limited, scaled from zero to useful with much less requirements than today's environments, which scale much higher at the expense of a beginner's joy of experimentation.
- phaemon 9y agoI do get what you mean; my 48k Spectrum was certainly a simpler machine than my current laptop! But I still think there are simple things that beginners can do. The whole SAVE, LOAD, RUN concepts also had to be learned. And you only need to know some text editor to be able to save a file. It can then be run with `bash myprogram`. And then later you can add the concepts of adding a shebang and making the file executable. Also, the huge advantage of teaching shell commands is that it is actually, currently useful. I use those commands every day at work, despite having learnt them initially on an old Sun server many moons ago. I can't say the same for Spectrum Basic! :)
- flukus 9y agoYou raise a good point, but we could replicate that with a couple of trivial shell scripts too. Throw a curses library (https://bashsimplecurses.readthedocs.io/en/latest/ https://bashsimplecurses.readthedocs.io/en/latest/) into the default profile and you've got an environment capable of simple apps and games too.
- jlebrech 9y agoruby is your shell and you have no password?
- zcoyle 9y agoThat's bash
- phaemon 9y agoAs zcoyle said, it's bash. Why did you think it was Ruby when you correctly guessed it was a shell? AFAIK, the closest in Ruby would be something like: for i in 1..10 do puts "This works too! Number " + i.to_s end As for passwords, I boot directly into single-user mode and start the network manually. It's the only way to be sure.