Monday, March 10, 2014
Looking at energy efficient software

3/10/2014 2:46:43 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Thursday, January 16, 2014
1/16/2014 10:12:47 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Thursday, April 26, 2012

It's been a long time. I went back to work and had zero time for this blog. But I'd like to get back to it.

4/26/2012 7:44:26 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Thursday, January 21, 2010
I just tried out Eclipse/CDT with gcc on the Mac with Snow Leopard and it fights back. You have to specify -arch i386 on both linker and compiler flags for it to work because Snow Leopard is now making 64-bit binaries by default (which I did not know until today!)

Mac
1/21/2010 6:18:28 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Friday, January 15, 2010

This blog entry only makes sense if you've read Chapter 14 of the Bucky Book.

I have a Mac Book Pro with Snow Leopard. I tried with both Eclipse 3.5.1 and Eclipse 3.6M4. It works with neither. It does work, however, with Linux (Ubuntu) and Eclipse 3.5.1. I haven't tried Eclipse 3.6M4 on Linux.

Installation Issues

There's something going on with installation that I don't understand. I think of the Buckminster installation as having three steps.

Why is the headless SVN Subclipse client from the cloudsmith site and not from eclipse.org? The Bucky Book refers to the software as

The headless integrations for Subclipse and Subversion contain plug-ins has licenses which prohibits them from being redistributed from Eclipse.org. Instead, we distribute them from Cloudsmiths website. The update site can be found at http://download.cloudsmith.com/buckminster/external. (page 233)

When I worked with Eclipse 3.6M4, I used the site http://download.eclipse.org/tools/buckminster/updates-3.6 instead of http://download.eclipse.org/tools/buckminster/updates-3.5

Now I cannot install all three of the above into the same eclipse.

I cannot install both the Buckminster SVN Support (Subclipse) from http://download.eclipse.org/tools/buckminster/updates-3.5 and the headless SVN Subclipse client from http://download.cloudsmith.com/buckinster/external. This problem does not depend on the order in which I install them.

To get the exmple to work I need Buckminster and the headless SVN Subclipse client.

Buckminster, headless SVN Subclipse client, Buckminster SVN Support (Subclipse)

If I install Buckminster, then the headless SVN Subclipse client, and then try (fail) installing Buckminster SVN Support (Subclipse), I get the following error.

Cannot complete the install because of a conflicting dependency.
Software being installed: Buckminster - Subclipse support 1.0.0.r11055 (org.eclipse.buckminster.subclipse.feature.feature.group 1.0.0.r11055)
Software currently installed: Buckminster - Subclipse based SVN support for headless operation 1.0.0.r10759 (org.eclipse.buckminster.subclipse.headless.feature.feature.group 1.0.0.r10759)
Only one of the following can be installed at once:
Buckminster Subclipse Support Plug-in 1.0.0.r10356 (org.eclipse.buckminster.subclipse 1.0.0.r10356)
Buckminster Subclipse Support Plug-in 1.0.0.r11055 (org.eclipse.buckminster.subclipse 1.0.0.r11055)
Cannot satisfy dependency:
From: Buckminster - Subclipse support 1.0.0.r11055 (org.eclipse.buckminster.subclipse.feature.feature.group 1.0.0.r11055)
To: org.eclipse.buckminster.subclipse [1.0.0.r11055]
Cannot satisfy dependency:
From: Buckminster - Subclipse based SVN support for headless operation 1.0.0.r10759 (org.eclipse.buckminster.subclipse.headless.feature.feature.group 1.0.0.r10759)
To: org.eclipse.buckminster.subclipse [1.0.0.r10356]
 

Buckminster, Buckminster SVN Support (Subclipse), headless SVN Subclipse client

If I install Buckminster, then the Buckminster SVN Support (Subclipse), and then try (fail) installing the headless SVN Subclipse client, I get the following error.

Cannot complete the install because of a conflicting dependency.
Software being installed: Buckminster - Subclipse based SVN support for headless operation 1.0.0.r10759 (org.eclipse.buckminster.subclipse.headless.feature.feature.group 1.0.0.r10759)
Software currently installed: Buckminster - Subclipse support 1.0.0.r11055 (org.eclipse.buckminster.subclipse.feature.feature.group 1.0.0.r11055)
Only one of the following can be installed at once:
Buckminster Subclipse Support Plug-in 1.0.0.r10356 (org.eclipse.buckminster.subclipse 1.0.0.r10356)
Buckminster Subclipse Support Plug-in 1.0.0.r11055 (org.eclipse.buckminster.subclipse 1.0.0.r11055)
Cannot satisfy dependency:
From: Buckminster - Subclipse support 1.0.0.r11055 (org.eclipse.buckminster.subclipse.feature.feature.group 1.0.0.r11055)
To: org.eclipse.buckminster.subclipse [1.0.0.r11055]
Cannot satisfy dependency:
From: Buckminster - Subclipse based SVN support for headless operation 1.0.0.r10759 (org.eclipse.buckminster.subclipse.headless.feature.feature.group 1.0.0.r10759)
To: org.eclipse.buckminster.subclipse [1.0.0.r10356]

What I need for the example

The example consists of creating an rmap and a cquery and then bringing up the cquery in the Component Query Editor and selecting Resolve and Materialize. For this Resolve and Materialize to work I need Buckminster and the headless SVN Subclipse client installed.

If I install just Buckminster and Buckminster SVN Support (Subclipse) and try to Resolve ad Matrialize, I get an the following error.

ERROR [0001] : No suitable provider for component org.demo.hello.xml.world was found in resourceMap http://www.eclipse.org/buckminster/samples/rmaps/demo.rmap
ERROR [0001] : No suitable provider for component org.demo.hello.xml.world was found in searchPath default
ERROR [0001] : Rejecting provider svn(http://dev.eclipse.org/svnroot/tools/org.eclipse.buckminster/trunk/org.eclipse.buckminster/demo/{0}): No component match was found
ERROR Unable to load default SVN Client
Errors and Warnings
E [0001] : No suitable provider for component org.demo.hello.xml.world was found in resourceMap http://www.eclipse.org/buckminster/samples/rmaps/demo.rmap
E [0001] : No suitable provider for component org.demo.hello.xml.world was found in searchPath defaultE [0001] : Rejecting provider svn(http://dev.eclipse.org/svnroot/tools/org.eclipse.buckminster/trunk/org.eclipse.buckminster/demo/{0}): No component match was found: Unable to load default SVN Client

Results of running the example

First of all, note that I am installing Buckminster and the headless SVN (Subclipse) client. To run the example, you must Resolve and Materialize the cquery. Three projects are created: org.demo.hello.xml.world, org.demo.xml.provider, and org.demo.worlds. Then, run org.demo.hello.xml.world as an Eclipse application.

If I do this on my Mac with Eclipse 3.6M4, I get the following error when I try to Resolve and Materialize.

If I do this on my Mac with Eclipse 3.5.1, I can Resolve and Materialize, but I fail when I try to run the example as an Eclipse application. I get the following error. This may not be so unreaonable because the Mac is a 64-bit machine.



If I do this on Linux with Eclipse 3.5.1 (my Linux is running vitutally on my Mac under Parallels), it actually works. Here's what the example look like when running in the runtime workbench as an Eclipse application.




Reproducing the example

If I delete (projects and contents) of the three created projects and then Resolve and Materilize, I get the following error.

ERROR [0001] : CSpec se.tada/tada-sax has no action, group, or local artifact named java.binary.archives
CSpec se.tada/tada-sax has no action, group, or local artifact named java.binary.archives
TAG-ID 0001 = Query for org.demo.hello.xml.world

Can I fix this? Sort of. I tried first by reinstalling Eclipse, but this did not solve the problem. If I delete the workspace and make a brand new one, even remaking the project with its rmap and cquery files, the example works. Apparently just deleting the projects is not enough. Even going into the workspace directory and cleaning it out with command lines apparently is not enough.




1/15/2010 11:50:44 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Thursday, January 14, 2010

So I want to try out Buckminster. I got the book, Eclipse Buckminster, The Definitive Guide by Hendrik Lindberg (affectionately called the Bucky Book). It's a pdf downloadable from the Buckminster site, http://www.eclipse.org/buckminster/ . It's at version 0.6, but hasn't been updated since July, 2009.

I'm running Eclipse 3.6M4 on a Mac with Snow Leopard. To get Buckminster, go to the Buckminster site and click on Downloads. You get the screen below. I took the Buckminster updates-3.6 for the 3.6 bleeding edge.




Then, go to Help -> Install New Software and put in the Buckminster update site.




What follows is a record of my running the example in Chapter 13 of the Bucky Book. This example builds a p2 update site for a simple plugin.

Create a plugin (File New Other Plugin Project) called org.demo.demoplugin and a feature (File New Other Plugin Development Feature Project) called org.demo.demofeature and choose org.demo.demoplugin as the plugin for the feature.

But then the key seems to be that you make another Feature Project called org.demo.demosite for the update site. This describes the update site. This feature (called the site feature) does not itself get published.

For the site feature,

  • Specify the Included Features to include org.demo.demofeature.
  • Add category lines to this feature's build.properties.
category.id.org.demo.democategory=Cool Features (demo)
category.members.org.demo.democategory=org.demo.demofeature
category.description.org.demo.democategory=Cool stuff build in a Buckminster demo

  • Create a buckminster.properties file. I added the file to the project org.demo.demosite.
# Where all the output should go
buckminster.output.root=${user.home}/BuckyFiles/BuckyDemo/demosite
# Where the temp files should go
buckminster.temp.root=${user.home}/BuckyFiles/BuckyDemo/tmp/demosite.tmp
# How .qualifier in versions should be replaced
qualifier.replacement.*=generator:lastRevision

Then, create the update site by right-clicking on org.demo.demosite, selecting Buckminster Invoke Action and pointing action properties to buckminster.properties, then choosing site.p2 as the action.



Click OK.




The update site gets made at /Users/ted/BuckyFiles/BuckyDemo/demosite/org.demo.demosite_1.0.0-eclipse.feature/site.p2.

Then, you can use the new p2 update site by pointing to file:/Users/ted/BuckyFiles/BuckyDemo/demosite/org.demo.demosite_1.0.0-eclipse.feature/site.p2/. Note that the / after site.p2 is important.




Click Next, then Finish. I get a warning that I am installing unsigned content. Click OK. Restart Eclipse, and when it comes up, do a Window -> Show View -> Other and choose the Demoplugin View.



 

This is the default Plugin with a View. To uninstall it, go to Help ->Install New Software and click on already installed. Then, select Demofeature and click Uninstall. Confirm the Uninstall Details and click Finish. Restart Eclipse.


1/14/2010 12:15:54 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Tuesday, January 12, 2010

I want to get ECF code from the Eclipse CVS repository. First, open up a CVS Repositories view and create a new repository location. I choose pserver (for anonymous checkout) and leave the password field blank. If you're a committer, you choose extssh and enter your name and password.

Or sometimes, you're a committer and you just want to use pserver. Note, however, that there is a time lag between extssh and pserver. Usually this is irrelevant. But you might miss the very latest checkins if they are close to when you checkout with server. And sometimes this can cause a build to fail.

The reason there is this time lag is so that extssh can be more performant.



Then, from the CVS Repositories view, checkout org.eclipse.ecf.releng. The result is that there is a org.eclipse.ecf.releng project shown in Package Explorer.

Right click in Package Explorer and choose Import .... Select Team Project Set and click Next. Then, in the window that appears, click the Browse button beside File name: and browse to the file projectSet-anonymous.psf.

Click Finish. A window appears asking if you want to overwrite org.eclipse.ecf.releng. Choose No (although it really doesn't matter).

A bunch of projects get checked out. I make a run configuration and call it Eclipse ECF. For Location, I put in ${workspace_loc}/../runtime-Eclipse_ECF. For Program to Run, I choose Run a product and specify the product as org.eclipse.sdk.ide. Then, I click Run.



 

The runtime workbench comes up. I can customize the perspective to show the ECF menu. This is cool. However, if I drop down the ECF menu and try to connect to Eclipse IM, XMPP, or XMPPS, I get an error. It does not accept my credentials. I think this is a known bug, namely https://bugs.eclipse.org/bugs/show_bug.cgi?id=291797

The IRC provider works just fine.




Click Finish. No password is needed.




1/12/2010 11:37:55 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Sunday, January 10, 2010

First of all, get the git bundle.

newtricks:~ ted$ cd ~/Library/Application\ Support/TextMate/Bundles
newtricks:Bundles ted$ git clone git://gitorious.org/git-tmbundle/mainline.git Git.tmbundle
Initialized empty Git repository in /Users/ted/Library/Application Support/TextMate/Bundles/Git.tmbundle/.git/
remote: Counting objects: 5018, done.
remote: Compressing objects: 100% (1612/1612), done.
remote: Total 5018 (delta 3342), reused 4957 (delta 3303)
Receiving objects: 100% (5018/5018), 634.79 KiB | 181 KiB/s, done.
Resolving deltas: 100% (3342/3342), done.
newtricks:Bundles ted$

Then, invoke Textmate and navigate to Bundles->Git->Administration ->Update Git Bundle. The following screen appears.



Here are some references.

http://gitorious.org/git-tmbundle
http://blog.macromates.com/2008/git-bundle/

This Textmate git bundle seems to work pretty well. Here's how I tried it out. First of all use Textmate to open a file that is a member of a git repository. Make a change and save it. Then, from the Textmate window do a Bundles -> Git -> Commit.




Double click on the filename in the Choose files to commit pane. A Textmate window opens up that shows the file in a diff format.



Write a description in the Summary of changes pane. Click commit. The window with the Summary and Commit button disappears and the other window shows what happened.



I still have the two Textmate windows open. Close the one with the diff and select the one with the file. Then, from the Textmate menu do a Bundles -> Git -> Log, and the following window appears.



Git
1/10/2010 12:38:29 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback
 Saturday, January 09, 2010

The one that came with git really doesn't work well. My suspicion is that this problem has more to do with Snow Leopard than the git gui.

Type git gui on the command line. The prompt does not return. The result is variable. Today, nothing happened. Well, I got a git icon in my taskbar. For a while it bounced up and down. Now it is doing nothing. Click on it, and I get the following.



That quit button works. But the menu on the top of my desktop has the Quit Git Gui entry shaded out. In fact, most of the menu entries are grayed-out. I quit by issuing a Control-C in the command window in which I invoked git gui. The prompt returned.

Type git gui again. Now the git screen comes up; remember, it didn't before.

So I click on Open Existing Repository and browse to guess what, an existing repository and click Open.




 

Note the menu bar. It says Git Gui Apple Repository ... Now when it first came up, it didn't look like the figure below. I clicked on Amend Last Commit. This caused the filename to appear in Staged Changes. I then clicked on the filename, and its text appeared in the upper right pane. The change is shown in green.

Two things are key here. One, most of the menu entries are still disabled. Two, the menu bar is what it is. It will change soon.




 

Click on New Commit. Then, right click in the empty space of the upper right pane and choose Options. An options window appears. Click Save. The options window goes away. Now the menu entries are no longer disabled. Sigh. Does this make sense? Not to me.

Click on Repository and from the dropdown, choose Create Desktop Icon. Give the Desktop Icon a name and click Save. Then Click on Git Gui and choose Exit.

Now open the Desktop Icon. Note now that the menu bar entries are different. And now git gui seems to operate as it should.




None of this makes sense to me. This is not the gui I want to use.

So what am I going to use? I installed Textmate's git bundle. So far it looks good. I'll also check out the git plugin for Eclipse.


Git
1/9/2010 11:41:36 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |   |  Trackback