A video in which I try to explain what merging and rebasing really are, to help you understand what is going on when Git presents you with scary-looking conflict messages. I also explain why you shouldn’t panic because it’s hard to lose your work, and how to get you work back if you really mess up:
A commit represents the state of the world (and the history leading up to that state). A commit is not a diff.
Merging means making a new commit with two (or more) “parents” (previous commits) that represents the result of merging the changes from two different threads of development that happened separately. None of the already-committed commits are modified – you just get a new commit on top. History is more complicated, but true.
Rebasing means modifying the history of one thread of development so it looks like it happened after the other one. This involves modifying all the commits in that thread. There is no extra merge commit, so you lose the history of the merge that happened. History is simple, but it’s a lie, and if you messed up the rebasing process, you can’t get back to where you were (once your old commits have been garbage-collected).
Apache HTTPD receives the request, and runs the CGI script that does the magic.
The CGI script (written in Bash) generates some BASIC code that provides the HTTP meta-vars (e.g. PATH_INFO for the path of the request) as DATA statements and wraps some other boilerplate around the code of the .basic file asked for in the request, and writes out another .basic file which is ready to be executed.
Then it uses BAS2TAP (my mirror here) to create an audio tape file representing the program.
Next it launches the Fuse spectrum emulator (inside an Xvfb wrapper to make it think it has a display), telling it to load from the audio tape and run the program.
The program runs, and writes its HTTP responses to the Spectrum printer using LPRINT statements.
Fuse uses very basic OCR to understand what characters are printed, and writes them into a text file.
The CGI script monitors the output file, waiting for a line containing an end marker (“ENDSPECTRUMBASIC”). When it finds it, it kills the emulator (since it can’t made to auto-exit, I think).
The CGI script sends the contents of the output file (minus the end marker) back to Apache, which returns it as a response.
Originally designed to demonstrate how Docker can help isolate other services from “interesting” dependencies, this became a bit of a labour of love.
I’ll never stop being grateful to the designers of the ZX Spectrum, or the authors of “Further Programming for the ZX Spectrum”.
public void Press_the_home_button_api10_causes_pause()
Tester t = new Tester( activity1 );
t.in.onSaveInstanceState( activity1 );
t.in.onPause( activity1 );
t.in.onStop( activity1 );
// When we press home, we must at least pause (really we stop)