Wednesday, August 22, 2012
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
System.out.println("hello");
and you are done.
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
System.out.println("hello");
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 :
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.
Specifically, I wanted to use these diagrams to think about various things like :
- Factories
- Economies
- Chemical reaction networks
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.
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.
- Open Eclipse and go to Help/Install New Software
- Press Add to add a software repository
- See the box appear that asks for the URL...
- ...which you find here http://subclipse.tigris.org/ and go to Download and Install
- (On this page you will see official instructions for adding Subversion)
- 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).
- paste that url back into the box in Eclipse
- Choose all the available software to be installed and go forward until it starts installing
- Restart Eclipse
- Go to Window/Preferences and click on Team/SVN
- in the SVN interface chose (Pure Java).
- The configuration location should be default
- Go to Window/Open Perspective...other and click on SVN Repository and click OK.
- 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.
- Give your password when prompted and this should complete the process.
- 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...
Subscribe to:
Posts (Atom)