The Internet Archive hosts among other vintage PC games a copy of Star Wars TIE Fighter.
I got the game to run under GNU/Linux using DOSBox. I only got it to run using a Joystick.
The mouse controls didn't seem to work properly.
Download TIE Fighter from here and place the files SWTieCD/cd/SWTIECD.cue and SWTieCD/cd/SWTIECD.BIN in a directory of your choice.
Also rename them to lower case (i.e. swtiecd.cue and swtiecd.bin).
Here is an example on how to encode a DVD using MEncoder.
You can get hints for the audio id, supported languages, aspect ratio, and other values by playing the DVD with mplayer dvd://1 and inspecting the resulting console output.
dvd://1: read the main track of the DVD. Sometimes the main video is on another track (e.g. dvd://3, dvd://5, dvd://81, ...).
-o test.avi: selects the output file and AVI as container format. You could also specify an MP4 file here.
-ss 120 -endpos 10: this tells the encoder to skip the first 120 seconds and then stop after encoding 10 seconds of video. This is used initially to test on a small representative part of the video that the encoding options are correct. Afterwards you can drop these options.
-alang en: choose the English audio track.
-slang en: add the English subtitles to the video.
-aid 130: choose the audio track with id 130. Specifying this is not necessary in most cases.
-psprobe 1000000: use this option to force MEncoder to extend the search for the audio stream. Only necessary if MEncoder says no audio stream found.
-vf crop=720:446:0:66: you can use this to crop of black borders.
-aspect 1.78: often it is necessary to set the pixel aspect ratio of the output video.
-af volume=15: with many DVDs it is necessary to boost the audio volume.
-ovc x264 -x264encopts crf=21:threads=2: this selects the H.264 video encoder and configures it.
-oac mp3lame -lameopts q=2: this selects the MP3 audio encoder and configures it. You can also use -oac faac -faacopts quality=300 if you prefer to use the AAC codec.
Once you have found the right options, rerun the command without the -ss and -endpos option to encode the full video.
Currently I am looking into register allocation using graph colouring
(also see Chaitin's paper on the subject). The graph colouring problem also occurs when
trying to colour countries in a political world map where adjacent countries must have different colours.
I thought it would be interesting to try a minimal implementation in Scheme.
Feel free to suggest improvements in the comment section below .
A (undirected) graph is usually represented by a list of nodes (vertices) and a list of edges.
If there are no insular nodes, a list of edges is sufficient.
In Scheme (here GNU Guile implementation) one can do this as follows.
Using the argument of the minimum one can determine the node with lowest adjacency count.
Now one can recursively remove the node with lowest adjacency count and then assign colours starting with the last node and working backwards.
If an adjacent node has a colour already, another colour must be used.
And here is an example of coloring a graph with a few more nodes.
Having worked with the Ruby programming language for many years I started to get
interested in Scheme. The Scheme programming language has a small and powerful
core supporting closures, hygienic macros, first-class continuations, and of
course the famous interpreter functions eval and apply.
However one thing I don't like about Scheme is that there are different function
names for each type of arguments. E.g. adding numbers is done with +, adding
lists is done with append, and adding strings is done with string-append.
The same program would be much less verbose if + was extended to work with
strings and lists, too:
GOOPS: The Guile extension for object-oriented programming
It turns out that GNU Guile (the Scheme interpreter of the GNU project) has
a mature extension which facilitates this. GOOPS is inspired by the
Common Lisp Object System (CLOS). GOOPS not only provides polymorphic
methods, it even lets you replace existing functions with polymorphic ones:
The define-class method is the normal way to define a class. GOOPS requires
you to define the instance attributes when defining the class. The following
example defines a class <a> with attribute x and a + method. The
make method is used to create the instance a of the class <a>.
Constructors and the next method
One can define a shorthand for instantiating objects. E.g. one can define a
method which sets the attribute #:x to the argument multiplied by two.
IMHO it is better though to define a modified constructor directly. This is more
involved but also possible.
Note the call to next-method. This essentially calls the
next less specialized method for that generic function. Here is another
example using an inheriting class <b> to illustrate the concept.
Note that GOOPS does not implicitly create a metaclass. The following example
shows how to define a metaclass <m<c>> with a class method.
One can also use GOOPS to change the way how objects get displayed and what the
REPL writes to the terminal. E.g. one can define the method write for
the class <a> to change the way the Guile REPL displays objects of that
Furthermore one can implement the method display to define the way objects
get displayed in formatted output.
I have now used GOOPS for a little while. Coming from Ruby there are a few
gotchas when using GOOPS and Guile's module system. For example one needs to use
a #:re-export statement when using a module to replace the core binding for
the + operator.
All in all GOOPS makes quite a mature impression and I think it makes Scheme much
more amenable to developers who are used to thinking in terms of objects and
To quote Guile's foreign function interface documentation:
The more one hacks in Scheme, the more one realizes that there are
actually two computational worlds: one which is warm and alive, that
land of parentheses, and one cold and dead, the land of C and its ilk.
Any comments and suggestions are welcome
If necessary it is also possible to create objects, classes, and metaclasses
dynamically. The following example instantiates the object v of class
<v> of metaclass <m<v>>. Furthermore the generic test is
implemented for <v>.