Update by Steven
Hello internet, sorry for letting the website become so….DERELICT
Hello internet, sorry for letting the website become so….DERELICT
Posting this for anyone unlucky enough to have to set this up, and for anyone desperate enough to be searching the blogosphere for help…
Setting up XINU in VirtualBox
XINU is a teaching tool, as such, users will want to make changes to it quickly and frequently. Using VirtualBox, and open-source virtual machine sandbox program, development and back-end environments can be created and linked on an internal network. The development machine will act as a standardized programming machine. It is a basic Debian install that contains the XINU source code. The back-end machine will boot from VirtualBox’s internal network and run the compiled version of the code.
Installing VirtualBox (Linux / OSX )
VirtualBox can be freely downloaded from https://www.virtualbox.org/wiki/Downloads be sure to download the correct version for the distribution you are using.
Alternatively, VirtualBox can be downloaded using a software package manager such as aptitude or apt-get. (sudo apt-get install virtualbox)
Installing VirtualBox (Windows)
VirtualBox can be freely downloaded from https://www.virtualbox.org/wiki/Downloads be sure to download the correct version for the distribution you are using.
Obtaining XINU
XINU is available for many different systems and architectures. The current focus of development is to bring it to even more. This guide focuses on the Virtual Machine implementation.
The VM implementation of XINU is available as two “virtual appliances”, essentially pre configured virtual machine settings, in the public FTP of the University of Purdue.
Connect using FTP to ftp.cs.purdue.edu
Use anonymous login when prompted
execute the ‘bin’ command, for binary transfer
get ‘xinu-appliance.tar.gz’ this contains the two VirtualBox appliances
untar the package
Importing and Configuring XINU
Once the XINU package have been downloaded and extracted, there should be two appliances, develop-end.ova and back-end.ova . Import these two appliances into the newly installed VirtualBox.
Leave all the settings as their defaults, and repeat the import for the second appliance.
In settings, under serial ports, you will want to set BOTH appliances to the same settings, with the addition of checking “Create pipe” for the development machine.
The path setting will vary depending on the operating system you are using. For instance,
in windows, use “\\. \pipe\xinu_com1”. Linux/OSX users will enter something like “/tmp/xinu_com” . This is the link between the two machines. The back-end machine is by default set to boot from the network. Once these settings are edited, you are ready to compile and run XINU!
Running XINU in VirtualBox
XINU is run by first compiling and “uploading” the resulting binary file to a location that the back-end can boot from.
Start the develop-end VM
When prompted, enter ‘xinu’ for the username, and ‘xinurocks’ for the password
Once the system has completed loading, there will be a folder titled xinu-x86-vm
cd xinu-x86-vm/compile
make clean
make
run the upload script with sudo ./upload.sh
XINU has now been placed in the proper location for the back-end to boot when started. However, in order to see the CONSOLE of XINU, you will have to connect using minicom.
sudo minicom
back in the VirtualBox menu, start the backend appliance. XINU will start, and run it’s main process, which by default will start the shell module. Congratulations, XINU is now running!
glhf
SHORT POST TIME. Which means I thought of this off-hand (and it’s certainly not new information, but is kind of fun).
Coding theory is concerned with encoding messages in a way so as to minimize their length for transmission over some sort of channel. The mathematical formalization of this goes all the way back to Shannon’s Information Theory, so I’ll give some basics and then mention the RANDOM CONNECTION.
Here’s the idea. We have two parties, Alice and Bob, who are trying to communicate over some sort of digital channel. (For convenience, let’s assume that the channel communicates every message that is sent across without corruption). Alice has a message M that she wants to send, and the message is drawn from some alphabet . Concretely, let’s assume the message is drawn from the English alphabet
where we use # as a placeholder for a blank space. Let denote the set of all messages we can compose out of the symbols in the alphabet . For example,
Now, suppose the channel is binary, so it can only send 0s and 1s. Obviously, Alice needs some way to encode her alphabet into the alphabet to send over pressing messages to Bob.
To bring this about, let’s define a binary code to be a function
That is, a binary code is any map from our source alphabet to a sequence of bits. Note that if we have a binary code C we can easily extend it to messages (i.e. to elements of ) by defining, for any sequence of symbols , the map
Now, most codes are useless. Indeed, under our above definition, the map for every English letter is a code. Unfortunately, if Alice used this code over their channel Bob would have a tough time decoding it.
So, we need some condition that allows us to actually decode the bloody things! We’ll start with a useful type of code called a prefix-free code.
Definition: A binary code is prefix-free if, for every pair of symbols neither is a prefix of nor vice-versa.
An example of a prefix-free binary code (for the first four letters of the English alphabet) could be the following:
Let’s encode a message with C: if Alice encoded the message via C and sent it to Bob, Bob would receive
100111110010.
Now, the beautiful property of prefix-free codes is the following: Bob can actually decode this message online. That is, he can do the following: iterate through each of the bits in sequence, and store what order they came in. Once his stored bit sequence matches a sequence in the code, he can automatically decode that character and keep going!
To illustrate, Bob first reads a 1 off the string. He convinces himself that 1 is not the code for anything, so he reads the next bit, a 0. He now has the string “10″, which is a code for b. Now, is it possible that this could be the beginning of a code for another letter? NO! Because “10″ is the code for b and is not the prefix of any other code. So Bob can translate the b, and move on.
We define nonsingular codes to be the set of codes that can actually be decoded. After seeing the above example, it’s clear that prefix-free codes are non-singular. However, is it possible for there to be non-prefix-free, non-singular codes? That is, are there codes that are decodable, but require us to read the entire message before we can decode them? (NOTE: These codes are practically useless, from an efficiency point of view. This is just a thought experiment to test the definition.)
The answer is YES, and a natural example are Gödel numberings! Here is how it works: for each letter in the alphabet choose a distinct positive integer . Now, to encode a message
let M be the positive integer defined as
where is the nth prime number. We then send the binary expansion of M as our message.
How does Bob decrypt it? Easily: he reads ALL of M, factors it, and reads off the powers of the exponents: the order of the message is preserved if we read off in order of lowest prime to highest, where the power of the ith prime is the code of the ith symbol in the message. Bob has to read all of the message (and he has to make sure he’s transcribed it correctly), or else he cannot recover any of it! Marvelously useless.
OR IS IT USELESS? Similar ideas lurk under regular RSA encryption which everyone uses a billion times a day without even realizing it (thank you blaggerwebs). If factoring integers is as hard as complexity theorists believe it is, then Alice has just sent Bob a frustratingly uncrackable message.
I was explaining something in probability theory to somebody last night, and I offhandedly said the following remark:
You know, it’s interesting what sorts of mathematics come up. For example, a usual exercise in undergraduate probability is the following: Flip a coin repeatedly until a heads comes up. What’s the expected number of coin flips required?
The person asked me what the number was, and I realized that I actually didn’t know. I gave an offhand guess of three, since we’re asking about a very particular sequence of coin flips (which has exponentially small density in the measure of all sequences of coin flips, and so it should be small). I sat down to work on it before bed, and rather quickly derived the following expression.
Let be the random variable in with the interpretation that if the th coin flip in a sequence of flips is a head after tails. It’s straightforward to calculate — assuming we’re flipping a fair coin, the probability of getting tails followed by a single head is . This means our expected value will be
And, wait a minute, but this sum is not trivial to evaluate! At first I did what any self-respecting mathematician/computer scientist would do (i.e. HIT IT WITH YOUR HARDEST SLEDGEHAMMERULTRATOOL AND DYNAMITE THE PROBLEM TO ACCESS IT’S SWEET GOOEY INSIDES) and applied generating functions.
This (alas) didn’t work and I fell asleep dejected.
And I woke up with the cutest solution!
To begin, here’s a secret that your math teacher just won’t ever bloody tell you:
(1) Every inequality/sum/identity in the history of mathematics just comes from writing the same thing in two different ways.
Of course, with our friend hindsight bias this is obvious — once we have the identity in front of us, it’s easy to say “oh, well of COURSE , it’s so obvious, duh!”.
Now, here is a second secret that your math teacher won’t ever bloody tell you:
(2) Every result ever obtained in mathematics can be broken down to a sequence of tiny, local, or otherwise easy steps.
When you say something as simple as I did in these two principles the questions of mathematics suddenly become significantly less daunting. To illustrate both of these principles, I’ll use them to evaluate our sum from the probabilistic puzzle above. First, let’s recall what an infinite sum actually is, as it’s kind of easy to forget: the sum
is really defined as a limit of partial sums
So, applying our first principle from above, we’re going to rewrite as another function so that we can actually evaluate the limit above.
Now, how do we do this? First, just to simplify notation for ourselves, let Let’s apply our second principle from above — what are some really stupendously obvious facts about the sum ? Well, since it’s a frigging sum, we know that
Alright, here is a start. If we can apply our first principle to the sum and write it down in another way then maybe we’ll end up somewhere interesting. Well, what about this sum? Let’s write it down explicitly, so that we can actually see some of the structure of the terms. I’m also going to make the substitution and instead write
Time for a side rant. Now, a math teacher, jerks as they are, will tell you to do this kind of substitution because your result is more general (or, even worse, tell you nothing at all, leaving you swimming in a soup of variables/indeterminates with no flotation device).
As usual, this is the correct information but stated in a way so that humans can’t understand it. Another way to say this “generality” assumption is, simply, people hate magic numbers! Notice that NOTHING! about the sums we’ve considered so far have needed the 2 to be there (other than the fact that our problem happens to be about coins). Well, if there’s no reason for it to be there, then why should it be there? The sum is even a bit easier to swallow visually. Anyways, side rant over.
Back on track, here are the sums and , both written down explicitly:
Well, recall that I said that we were trying to rewrite in a way other than
Applying our first principle — and this is really the leap of intuition — let’s just transform into in another way! How? Well, multiply by and compare it to :
We’ve almost got ! The only thing that’s missing is a single copy of each term in the sum! Phrased mathematically, we now have the identity
Now, the sum is a geometric sum which has a simple formula (fact: this simple formula can be derived in a way similar to our current investigation):
So, substituting in this new simple formula gives
and then, finally finishing our application of the first principle, we can apply our early “stupid” identity for and get
The rest is algebra/boilerplate. Collecting the terms on the left hand side, we get
then dividing both sides by finally gives
Taking the limit as and using our knowledge that , we see that the terms involving will disappear. This leaves
Substiting in , we get
And we’re done. In expectation, you will see a heads after 2 coin flips.
You see, math is not mystical. Unless you’re a Newton or an Euler (viz. an absolutely genius), math proceeds pretty much the same for everybody. There are underlying principles and heuristics that help you do math that every established mathematician actually uses — the secret is that no one ever tells you them. Of course, I have a sneaking suspicion that this due to the fact that our high school math teachers don’t actually understand the principles themselves (while this may seem like a bit of an attack, I did graduate with people who were going to be math teachers. Most of those people should not have been math teachers).
Additionally, if the router (in bridge mode) is plugged into any other type of outlet such as a power bar or splitter, it will not properly renew the IP.
…you realize if anyone walked in and saw you, that they would run away screaming.
Holy crap cshouse! Posts aplenty,
the guts
So I recently been tasked with the job of writing some benchmarking tools for the iphone4 for a game that I am currently porting. Since we are porting from some insanely old engine to unity3d, I’m building these tools with that. More on this later… possibly… doubtfully. Anyways since Unity3d just gave out a castrated version of there android + ios licences I figured I would also try to run it on my galaxy nexus. Naturally as with all my previous android ADT/SDK experience nothing worked immediately.
Firstly just as a heads up Unity as of june 5th 2013, hates revision 22 of the ADT/SDK so you should us this ###insert link to patch### I’ll do this once I get the files put into tho stockpile. lols on June 6th unity released a update to version 4.1.4, this update resolves the issues with revision 22 of the android SDK.
INSERT MONTAGE OF LATE NIGHT COMPUTER MONITOR RADIATION, AND FRANTIC GOOGLE SEARCHING.
So here is a quick study of what you probably need to do without going into resetting pathnames, and all that other stuff I immediatly disregarded as overkill, because where ever you read that you need to install the drivers through windows device manager.
what they really mean is don’t use the windows feature I have the drivers in a folder on my computer obviously, they mean,
use this other button, that sais I want to select from a list of drivers on my computer which I naturally assumed was the wrong one, and thinking to myself, “I know exactly what folder those drivers are in” I kept using the first one, which was pointed right at the ~/somefilepath>/android/skd/extras/google/usb-something.
Inwhich you will be givin a terrible list of things that are not your phone but don’t fret, cliq on the Have disk button, then browse to the url where the drivers are.
Then browse to the desired path at ~/somefilepath>/android/skd/extras/google/usb-something. , and lo and behold, your drivers will show up in a list, I mashed install on the first one out of excitement, and there we have it drivers for my Galaxy Nexus finally installed.
No word of a lie, I think I rather be using ndiswrapper to fix wireless… thats not true.
I don’t know if because I am not really a windows power user, this doesn’t seem like an obvious way to install drivers, mainly when you are given the option to point at a file, but maybe the blame falls on Google for packaging it non-standard. Either way I’m glad that it’s working now.
Night folks.
csHouse has turned to the dark(er) side of canadian internet providers, and is now running on the Rogers Extreme High Speed Internet Package which boasted a modest 35Mbps down, 3Mbps up.
Not too shabby right? Not quite FiberOP, but will get everything up and running. Good stuff.
HOWEVER!
The service tech gave me a box containing their latest model of modem/router, and out popped the CGN2-ROG, looking like it was steeped in the 90s, and had plenty of ‘tude.
Flashing it’s massive, pointless LEDs, it sputtered to life and began sending and receiving data slower then I could have delivered it by hand. Great.
It turns out this badboy is completely incapable of routing, so, lets just offload that task onto a much better router.
IF YOU ARE HERE FROM GOOGLE, AND FOUND THIS SITE BY TYPING IN A WORD SALAD OF RAGE AND ROUTING ISSUES, YOU CAN BEGIN READING NOW.
So, you’ll need your crappy CGN2-ROG, another router (In my case, it was the RT-N56U), and an ethernet cable (CAT6) to connect them.
You should notice an immediate improve in speed and stability, and are free to use any router you want.
Here I was, minding my own business, when I picked up my Kobo Mini to do some reading and suddenly I heard a rattle.
Not in my house, I thought.
So, off comes the back, and here is what greeted me:
Considering that the Kobo Mini does not claim to have extensible memory, I popped out the SD card, tried turning the e-reader back on, and was (in retrospect, a little too) surprised to discover that nothing happened. I guess it’s cheaper to use an SD card for secondary memory and just not tell your customers that it’s there. I mean, most people would beat the crap out of this tiny plastic rectangle while trying to get the back off — not to mention the intense technical skill that goes into copying the OS files from one SD card to a slightly larger one.
And in case your wondering, the piece responsible for the rattle was this guy:
It appears that the tiny piece of plastic which makes the Kobo’s nigh-unseeable LED slightly more visible had broken off and was tap-dancing on the motherboard. Sigh.
This may be the GALLONS of coffee… but I think the theology of retribution is a paradox. Neat eh? Like, the theology of retribution relies on the assumption that when God created the cosmos in the beginning (bere’shit…heh. Bible joke…), He finished it. A finished creation implies some degree of self-sufficiency based on established order. However, based on the existence of chaos in the world (Job 38:26-27), and things like innocent suffering and evil (Genesis 4), it is reasonable to conclude that God must take an active role in maintaining his creations and the balance between order and chaos (this is further explored in Job 38-41, see Behemoth and Leviathan). This suggests that creation is an ongoing, fluid process. The theology of retribution holds that the good are rewarded and the wicked are punished. It is DEPENDENT on a view of order in the world, and therefore, a completed or finished creation. But, as is overwhelmingly evident in the Book of Job, the traditional view is that the theology of retribution is an active act of God, He will not (in theory) harm the pious. SO, paradoxically, the theology of retribution depends on the view that the universe is self-sufficient, but also that God is the chess master. My head is spinning.