This is an old revision of the document!
I learned a lot so far. Not just an intro of compiling C, but I also learned how to make a console program through C. I learned how to compile C into an executable on pretty much any OS. Although, I still do have a lot of questions, such as, how would I go about making an OpenGL program on Windows? How would I make an OpenGL program on other OSes such as Linux and Mac OS X? How do I even use OpenGL? With the Windows Objective-C compiler, what headers can I import in? Would these headers be the same as Apple's on Mac OS X? And to what version? Can I do some evil with pointers such as specify specific memory addresses and get the value of what's in said memory addresses?
I have a lot to learn…
We did a C project where we made a program that used a trick to square two-digit numbers that ended in 5. In the trick, we left “25” at the end, and, from the first digit of the number (n) that was input, we got the hundreds place like so: ((n / 10) * ((n / 10) + 1) * 100).
This trick might be able to work with any set amount of digits by changing what's appended and what the first digit is. My question is, we have powerful computers, and they would use a lot less power if they had simply multiplied out the numbers. They are machines, not humans. I'm not sure if it's optimized more for the computer to use the human trick of two-digit squaring with numbers ending in 5, but, it's there…
We got ourselves a little bit more acquainted with the machines. Although the class has an IRC chat, I have no idea where the server is located. It is probably in the next room. With that being said…
echo “Hello, world!”
The IRC chat is nothing if you don't know how to use it proficiently. It can be a help to those that know how to use it, but, if you don't know how to use the IRC, good luck. Luckily /help command
is a thing on Irssi, and it's a very nice thing at that. What threw me off for a good couple moments was how to be able to connect to Lab46's IRC server, because that wasn't explained very well, in my honest opinion.
IRC helps, but, without documentation, it's useless. As with any piece of software. I'm talking about you here, Apple, with your out-dated non-ARC using Objective-C documentation for doing simple stuff that would be required in your new-fangled games… ugh. Your documentation sucks, Apple. To say the least.
In our latest project, we explored how to make, add files to, and compress an archive using Gzip, Tar, and Zip on UNIX/Linux systems. Using that, we took out four files from an archive and re-arranged the text in them to form a forward-facing Mudkip, or the LAIR Image Calabration System Test Image (LAIRICSTI). In order to submit a compressed tar archive (tarball), we had to archive it using tar, and then compress it with gzip.
My assumption is, tar archive files can optionally be compressed into a file with the .tar.gz file extension using gzip, but, if corruption among the network is a worry, then they can upload the uncompressed file over a secure TCP connection.
At least, that is one benefit of sepearating archival and compression into two different formats. Now, the Internet is pretty reliable and not corrupted, so we don't have to worry about corrupted compressed file uploads.
So in UNIX, you can change the end of a file name so it doesn't fit convention. For example, you can neatly name your zip archive “mytextfile.mp4” and watch IT get more and more confused. It's fun to do, in all honesty. As far as the puzzlebox project went…
* Copying file.txt into my home directory resulted in a copy of file.txt in my home directory. * file.txt appears to be ASCII text. * Reading the file with cat reports that it is, in fact, ASCII text. The file reads, “This is a simple text file. It contains ASCII text.” * GZip'ping and then using file reports that the file is now a gzip archive. * GZip'ping with the fastest compression method and then using file correctly reports that it is a gzip archive compressed at max speed.
In each respect, that lab was one of the most fun ones I've had yet, and I only hope to have more like it!