Wednesday, August 22, 2012

This post will hopefully be the first of many posts that will cover my most recent work in theoretical physics.

Monday, April 23, 2012

Getting Java in Eclipse running

First, get your Java runtime engine JRE and  your Java development kit JDK.  The simple JDK is what you want.  Install Eclipse, which is just a matter of downloading the latest version and putting the files somewhere.  You have to set the path so that eclipse can call Java.  To set your path follow the instructions at step 4 at this link.

If you have done all this, now you simply have to start eclipse and create a new Java project.  To make a HelloWorld, create a project, then a package, and then in that package create a class and just be sure to click on "Public static void main" checkbox.  In the main body write


 and you are done.

Saturday, June 18, 2011

Coecke's Diagramatic Calculus: from factories to autocatalysis

Just today, I was thinking about using the diagramatic calculus of Coecke and Joyal and Penrose to think about different aspects of day to day life. A typical diagram in the calculus is like this:

Specifically, I wanted to use these diagrams to think about various things like :
  1. Factories
  2. Economies
  3. Chemical reaction networks
In the case of a factory, there are always many sub-assemblies that are made before they are assembled into the final product. Each sub-assembly is a process and all these processes hook together and probably make a diagram like those that Coecke uses to talk about Quantum protocols. In the case of an economy, we simply take each factory as a single process which has a bunch of material inputs (plus energy input) and spits out something and then all these factories link together in a network which is probably like the ones Coecke uses.
Then I started thinking about chemical processes and I wondered if you can bend a wired around back and attach it to the input of a box. That is something you definitely do in the diagrammatic calculus.

I then realized by looking at the diagram that what I had invented was the catalyst, in an abstract sense. This means that catalysts, when seen in networks of chemical processes are actually traces in the category. This also kind of indicates that chemical process networks should be modeled as these kinds of diagrams. But then this only makes sense since chemical reactions are exactly maps in the category of Hilbert spaces and the axioms of this category are equivalent to the rewrite axioms of these diagrams.
Looking around online for anything written about this, I didn't find anything so I wrote about it here. What I did find was the concept of autocatalysis. This is where the product of a process is its own catalyst and that diagram is demonstrated here:

We see that there is no output except the catalyst. This means that the process itself is simply there to encourage more of itself. Some say that this has something to do with life itself. The metaphor would be something like: life is a process that simply makes stuff that increases the likelihood of that process happening again.
I am wondering if diagrams like this exist in Coecke's diagrammatic calculus and I think they must.

Wednesday, July 21, 2010

Using subversion 2: Getting your project from the repository

Suppose you are working on some brand new machine. You've just installed Eclipse and you want to get your source from the repository. It's easy. Just go to the SVN perspective and add the repository. Find your source and right click and choose checkout. Now you have the source on your local machine.
Next, you will want to save your changes. This you do by committing, though I think I already mentioned it. Another common thing you will want to do is get any new changes from the server. Suppose both you and a friend are working on the same project and you have been waiting for him to complete a particular class so that you can use it. Once he's finished and committed his changes, you can add them to your working copy of the source by going to the java perspective, right clicking on the project going to team and clicking UpdateToVersion.

Tuesday, July 20, 2010

Using subversion

The first, simplest thing to do in subversion is to add your code to the repository. To do this, go your Java perspective and right click the project you want to add to the repository. Go to Team and then choose Share Project. Once it is shared, you will not see it in the repository. You have to commit your changes, and everything you have written so far is a change. So go back to the Java perspective, right click on your project and go to Team/Commit. Now everything you have written in that project will be added to the repository.

subversion SVN

So this is my first, technical computer sciency blog post. It concerns what is called a versioning system. A versioning system allows you to have access to a large, shared collection of written work (like programs, or documents) in such a way that any new additions are kept organized. For instance, appartently though I have not managed to do it yet, with a SVN like Subversion for Eclipse, if you make a change to your code it is saved but so is the old version. You can, theoretically, see all instances of the code back to its inception. If you want to undo a change, you simply go the version that does not include that change. In any case, this little blurb is actually about how to install the versioning system known as Subversion in Eclipse.
  1. Open Eclipse and go to Help/Install New Software
  2. Press Add to add a software repository
  3. See the box appear that asks for the URL...
  4. ...which you find here and go to Download and Install
  5. (On this page you will see official instructions for adding Subversion)
  6. Scroll down a bit to find the various urls and chose the newest one :1.6 (though it depends on the version of Eclipse you have).
  7. paste that url back into the box in Eclipse
  8. Choose all the available software to be installed and go forward until it starts installing
  9. Restart Eclipse
  10. Go to Window/Preferences and click on Team/SVN
  11. in the SVN interface chose (Pure Java).
  12. The configuration location should be default
  13. Go to Window/Open Perspective...other and click on SVN Repository and click OK.
  14. In the blank space in the SVN repositories view right click New/Repository Location where you will enter the location of your repository which you should get from your administrator.
  15. Give your password when prompted and this should complete the process.
  16. I fyou have any problems, you might solve them by deleting your entire Eclipse install and reinstalling the latest one

Tuesday, July 6, 2010

version control

Marcus got me onto some free version control software. I am going to try to use it for my project. The software is called Git and I have never used a VCS before. I'm sure it will make me pull my hair out at first, but let's just see...