Tuesday, November 8, 2011

VirtualBox Shared Folder (Mac OS X 10.6)

I believe it's generally a good idea to set up a shared folder if you're doing virtual machines (VM's) like VirtualBox.  Particularly:

  • If you have limited disk space (like me), you'd want to make your virtual disk fixed-sized. But at the same time, you recognize you may do a lot of work with your VM, so you want some way to store your data without quickly hitting the capacity of your virtual disk.
  • You may have some files you'll be working on both in your VM OS, and your host/main OS. So you need a way to transfer/access the files between the two OS'es.
Here are the steps to set up your shared folder for VirtualBox (version 4.1.4 as of this writing) with Mac OS X 10.6 as host, with Xubuntu 11.10 in the VM:
  1. Launch VirtualBox - don't run your VM yet.
  2. Select the VM you want to add your shared folder to.
    1. Go to Settings > Shared Folder
    2. You should only see "Machine Folder" in the list box if your VM is off. If you see "Transient Folder" in the list, that means your VM is running. Turn it off.
    3. To the right of the list box, click on the Folder-with-Plus-Sign icon to add the folder.
    4. Select the folder you want to use as your shared folder (create one if you like/necessary). For example, name the folder: "SharedFolder" (creative, I know). Check the Auto-mount option.
    5. Accept, OK, and close the Settings window.
  3. Run your VM.
  4. Log in. (You can skip step 5 and go to step 6 - I'm just showing that the Shared Folder is not yet accessible at this point)
  5. Open the File Browser/Explorer and try to access the shared folder at: /media/sfSharedFolder. You will get a "Permission denied" error. Don't panic - follow the next step.
  6. Open a Terminal window.
  7. Add yourself to the group: vboxsf.  E.g.
    ~$ usermod -g vboxsf
    You might need to become root before you can do it:
    ~$ sudo usermod -g vboxsf
  8. Check that the group vboxsf has been added to your group list:
    ~$ groups
  9. Now this is important: Log out, then log back in. You won't be able to access the shared folder if you don't.
  10. After you log in, you should now be able to access your shared folder (/media/sfSharedFolder) without the "Permission Denied" error.
Hope that helps.
 

Sunday, November 6, 2011

The Ten Virgin Brides

It's a glorious foggy morning
This morning, the Gospel reading is on Jesus' parable of the ten virgin brides; five wise, and five foolish.

'Then the kingdom of Heaven will be like this: Ten wedding attendants took their lamps and went to meet the bridegroom.
2 Five of them were foolish and five were sensible:
3 the foolish ones, though they took their lamps, took no oil with them,
4 whereas the sensible ones took flasks of oil as well as their lamps.
5 The bridegroom was late, and they all grew drowsy and fell asleep.
6 But at midnight there was a cry, "Look! The bridegroom! Go out and meet him."
7 Then all those wedding attendants woke up and trimmed their lamps,
8 and the foolish ones said to the sensible ones, "Give us some of your oil: our lamps are going out."
9 But they replied, "There may not be enough for us and for you; you had better go to those who sell it and buy some for yourselves."
10 They had gone off to buy it when the bridegroom arrived. Those who were ready went in with him to the wedding hall and the door was closed.
11 The other attendants arrived later. "Lord, Lord," they said, "open the door for us."
12 But he replied, "In truth I tell you, I do not know you."
13 So stay awake, because you do not know either the day or the hour.
(Source: http://catholic.org/ Matthew 25:1-13 for November 6, 2011)

It looks like in this version, they changed the original "virgins" to "wedding attendants" - whatever. This is one of Jesus' parables that seemingly have a darker side to the story, but one have to keep in mind that: a) the context (time and place) where these things make sense, and b) Jesus used a parable to make a point, and only one point. So, don't get caught up in the details and missing the whole picture. The following points are based on Fr. Ignatius' homily (the presider for today's mass) and what I understood from it.

First interesting point: there were ten virgins. Why would a bridegroom have ten virgins? What kind of bridegroom is this? Well, this is a parable; Jesus often illustrates the relationship between God and mankind as to be as intimate as the relationship between a bride and bridegroom. And in those times, marriage ceremonies are big events that lasts for days - it is supposed to be a big, joyful occasion. Hence, the relationship between God and mankind is to be like one in a marriage: through good times, and bad times. The number of virgins? Doesn't matter.

Second point: did you notice how selfish the wise virgins are? Those bastards won't share their oil and help their poor, oil-less companions. Are they really companions? Well, if you put it in the context of the coming of the bridegroom as the end of times, the 'oil' is your 'good deeds' that you did in your life. 'Being prepared' then means doing good deeds as you prepare for the end of times. If good deeds are your Trophies (for those of you PS3 gamers) or Achievements, how are you to share those with others who don't have any when it's time to tally? You can't. So the issue of selfishness is irrelevant for this parable.

Third point: when the 'foolish five' came late to the wedding, the bridegroom denied them by saying he did not know them. How dare he! Well, I don't have a good explanation for this one. But if you think about it, how late did they come? What if the main part of the ceremony already passed? In a sense, it's kind of disrespectful to the bridegroom, the guests, and the ceremony itself.

Lastly, all ten virgins fell asleep and none of them knows when the bridegroom is coming. In those days, the bridegroom need to make preparations for the wedding with the parents of the bride before coming for the bride. This process can be quick, or it can take a while. Thus, the bride is just left waiting until it is done, but not knowing when it will be done. The point is: both the wise and foolish virgins all fell asleep - waiting. Same thing: none of us know when the Second Coming (if you believe in that term) or the end of times is. I frankly would rather not knowing anyway. Whatever - just. be. prepared. THIS is the main point of the parable.

I thought it was an interesting parable. At first it sounds like it has a bunch of darker twists to it, but once you look closer, the twists are not the point Jesus was trying to make. And it's very easy for us to focus on the twists and missing the whole point of the parable - and believe me, the Evil One is masterfully tricky and will use it to his advantage.
Mass at St. Michael the Archangel Church, Portland, OR
Study/Research
Made a bunch of progress this week. Brzozowski's original Derivatives of Regular Expression paper was actually difficult to comprehend! Luckily my adviser had written a paper that gives the gist of it with examples. So it makes sense now.

In another news, made a lot of progress with Lisp programming. Made a Breadth-First Search and Depth-First Search program, and learned how to use structs (defstruct ...), which is useful in programming the A* search, and a bunch of other Lisp functions. Next up: either a program for Brzozowski's method or some sort, fuzzy logic, genetic algorithm, genetic programming, and maybe neural nets if I have time.

But first, I need to get a mobile platform for my robot. Maybe getting one of these:

(Source: Stingray Chassis Kit)
Now this is FASCINATING. The idea of a structure that is not random, but does not have a repeating pattern. Who knew that this property is what makes a sonar ping works best?! At this point I can't explain this very well, but I am going to use this for my research for using patterns and other properties in music to change the behaviors/movements of a robot.



I'm going to have to research this more, and I think it's going to be awesome.