Thursday, April 01, 2010

So nmr isn't entirely safe??

This arrived in the lab today. So maybe I can't describe NMR as absolutely safe any more...


have a moral easter

Tuesday, June 23, 2009

whats good about galileo

Well its amazing the latest eclipse release train has come round the tracks and to use an old marketing cliché 'its good to talk'. So what about the new version whats good

well I have been doing an awful lot of emf work and this has improved a lot

  1. much faster conversion of genmodels into java source code. I used to watch this menu bar a lot (tens of minutes)



    Its now much much faster, which is great when you have really big models...

  2. Also since I tend to keep up with the M[1-7] versions this one looks like an excellent addition. I will have to try soon (as soon as I can get through to the friends of eclipse server or get a good torrent feed)




  3. Links in java doc headers yeah! but still no search function in the external html viewer which is hard to setup if you are offline...
  4. rectangular selections, I won't suffer from nedit withdrawal pangs any further




  5. p2 the replacement for the update manager is much better, much more reliable. However, the UI is still a bit strange



    • why do you type to add to the site selection, rather than filter the selection?
    • why is the menu item in help called 'Install New Software...' when it leads to a dialog to 'Install and Manage Software...'?


Some pain points

when generating code with emf, debugging problems can be truly painful
  • errors appear in projects that are hidden,
  • errors get reported in dialog boxes which refer to line numbers in source text which doesn't have line numbers and has to be cut into other editors for analysis.
  • errors which don't have line numbers or filenames
  • errors in dialog boxes rather than in problem problem panes
  • its really hard to rerun a source generation run from a gen model
  • no usable text editor for jet
  • limitations in jet and no sign of jet2
  • etc
also
  • you can't jump to a super class in the ecore editor
  • navigating the ecore editor doesn't have the keyboard shortcuts the navigator has
  • in mint if you go the ecore file from the genmodel it doesn't take you to the item you right clicked on
  • the ecore sample editor doesn't notice resource changes...
now don't get me wrong these are all minor niggles compared to the size and breadth of the features implemented this year especially for example the introduction of emf databinding....

so all I have to do now for next year is to participate more and look forward to a sunny helios

regards
gary

Friday, July 04, 2008

A problem of layout?

Today there has been a certain amount of debate about the lack of visibility for certain projects on the Eclipse Ganymede download page so here is a 'quick fix' with all the other packages as a pseudo package

Monday, June 23, 2008

Looking for the Wood not the Trees

So what do I like about eclipse Ganymede? Its new sparkly and has lost of new features (in fact there so many neat tweaks that I can't keep up with them and I expect I won't use some just because they are too hard to find)

Diversity

So why the excitement? Well I don't think its the bling, its the fact that there is a faster more versatile version of the platform that I use for so many things. You see it used to be that I used to have a range of strategies for editing and dealing with the heterogeneous data and programming languages that I use.


Can we say nedit, Komodo, IntelliJ IDEA, wing etc. Most of them were open source thought I must admit I used IntelliJ IDEA (and damn good it was too [eclipse still isn't as polished but is more versatile and open]). However, now I have one tool suite that allows me to deal with most of these at the same time within the same editing environment, so I have less things to remember less windows to find on my desktop and more support for what I am doing there's more...


Community & Open Source


I have found the eclipse community (and especially the emf mailing list http://www.eclipse.org/newsportal/thread.php?group=eclipse.tools.emf and especially Ed Merks) to be quite wonderful. Dealing with a newbie, who makes quite few mistakes and still being friendly helpful and authoritative all at the same time is a wonderful skill.


Having an open source platform has also been a vital asset so on the project I have been working on. For example how do I replace <%packageA.packageB.Class%> with the correct declaration in a custom jet template? Go look at the source code ;-) (though it would be even nicer if I could go and look at the javadoc!) (see the getBody function). So another one of my answers is its the whole, not the trees.

In conclusion Where else could I have work flow that goes python->model-> java all in the same environment, with such ease?

Sunday, March 23, 2008

How do ccpn data models get written

Here are my brief results from digging around the ccpn data-model production software (v2.1) from source forge to see how data-model writing gets carried out (note these are my random doodlings and may not represents how it really works i.e. ymmv)

  1. you call python makeJavaApi.py from the command line which lives in ccpn/python/memops/scripts_v2
  2. This then uses XmlModelIo.readModel() to read the pure ccpn metamodel which returns the root meta-package as its result
  3. a thing called the ModelPortal gets constructed from the meta-model. (This seems to provide functions that access the meta-model in particular ways, examples include for example leafPackagesByImport - leaf packages sorted by import (imported before importing), dataTypesByInheritance - data types sorted by inheritance (supertype before subtype), dataObjTypesAlphabetic - data types sorted alphabetically by name etc...)
  4. JavaFileModelAdapt.processModel(modelPortal) processes the model-portal (and its owned meta-model) to adapt it to the idiosyncrasies of the requirements of the java language
  5. the class method JavaFileApiGen.writeApi gets called with the model-portal as its first parameter and information in the other parameters about where to store the model the version.
  6. finally inside JavaFileApiGen.writeApi we do some more setup create a JavaFileApiGen object and then call processModel() on it this then calls a general meta-model traverser which is in the class ModelTraverse.processModel
  7. now comes the interesting bit! This then causes a series of callbacks on the JavaFileApiGen class to be called. Using the following hack I think I can work out most of them...
    grep def ../metamodel/ModelTraverse_py_2_1.py | tr '(' ' ' | awk '{print $2}'
  8. this then visits the following list of apparently interesting methods
    • processBranchPackage
    • initLeafPackage
    • processLeafPackage
    • endLeafPackage
    • processDataType
    • processConstant
    • processException
    • initClass
    • processClass
    • endClass
    • initDataObjType
    • processDataObjType
    • endDataObjType
    • processAttribute
    • processRole
    • initOperation
    • processOperation
    • endOperation
    • processParameter
    which seem to correspon well with the parts of the datamodel... ;-)

Don't invite eclipse euorpa to the feast!

Eclipse is a wonderful thing and the update manager can make life easy. However, if you want to install something a little out the way and unsupported you can so easily get in a mess under Europa (I guess this is why P2 is such a big thing for Ganymede)

Why Europa isn't my quartermaster!
    1. If you have the wrong platform bundles installed ie x86 rather than x86_64 specifically
      • org.eclipse.core.filesystem.linux.x86_64_1.0.100.v20070510.jar
      • org.eclipse.equinox.launcher.gtk.linux.x86_64_1.0.2.R331_v20071019
      • org.eclipse.platform.source.linux.gtk.x86_64_3.3.2.R33x_v20071022-_19UEksF-G8Yc6bUv3Dz
      • org.eclipse.rcp.source.linux.gtk.x86_64_3.3.2.R33x_r20071022-8y8eE9CEV3FspP8HJrY1M2dS
      • org.eclipse.swt.gtk.linux.x86_64_3.3.2.v3347.jar

        the error message you get on startup is very obtuse


      exit code code=13 is about as friendly as my favourite error message 'an unknown error occurred at an unknown location'

    2. I can't see where it says i have the wrong platform modules here... isn't this something the launcher should check for?
Then things can get worse ;-)

I tried to swap the x86 bundles for the X86_64 versions I had lying around and then got this...



now if you understand what you have just done this is OK. However, it's still not the most useful message! What should a launchers companion library be called (Yhe Charlotte Bartlett.dll)

So how did you get me in this mess Stanley?

Now the way I got into this mess wasn't so obvious either....

I decided I wanted to play with emf and use the Soyatec eUML2 free editor. This all seems well and fine so I did what they asked and added the Soyatec website to my update site list and tried to install the eUML2 component. Thats when the hell started as I tried to get the right set of dependencies for the soyatec product to work with the other plugins on the Europa Discovery Site and failed over and over on dependencies on gmf and ocl so for example I would get

eUML2 (*.*.*.*) requires feature ***.***.gmf (x.x..xxxx) or compatible.

where x.x..xxxx was a lower version number than the one I already hadinstalled....

More heartache

So having got into dependany hell where did I go next. I remembered that Yoxos/Inoopract has this damn neat Yoxos on demand service and stuff me it does what it says on the jar:

  • it sorted my dependencies like a treat
  • it made me my own custom eclipse which I can go back to
  • it was free
  • Yoxos has its own provisioning which is available inside eclipse and works again like a dream. It resolves dependencies and just making it all work (in actual fact this plug-in appears to be very much related to the online experience which appears to be a RAP version of the Yoxos provisioning plug-in)
so can you see the problem (remembering the problems I discussed above), here is a screen shot of the yoxo online provisioning web app that might give you a clue:



Yep I am Linux_x86_64 whereas the button here is effectively Linux_86. I guess this is something Innoopract/Yoxos need to solve or at least they do need to flag that they don't support x86_64 linux.

Wrapup

So what can we conclude from this trip round the houses?

  • getting the right versions of eclipse plug-ins can still be a hassle even with the update manager and the newest dependency management tools
  • If you have a system which doesn't exactly match the rest of the world (though i might say come on x86_64 isn't that rare ;-) you can easily end up in trouble
  • the best laid plans of mice and men fail especially when you plan to 'just quickly' install a piece of software (alway a bad move)
Random thoughts

  • I suceeded in the end by doing the off-line Soyatec installation which included all the required dependencies at the right version. Heres the picture to prove it:


  • Why is the update manager in the help menu??? It always seemed strange to me; File maybe Window maybe but help no way!!
  • Why doesn't the eclipse Updates window have a maximize button some of the package names are long enough....



    (and yes I know I can expand it it just isn't convenient)

  • why don't I blog more often (no don't ask me to answer that one)


Friday, July 14, 2006

installing scipy and numpy with analysis

scipy and numpy provide sophisticated and fast mathematical routines for python and installing them with analysis should be a breeze. However, it wasn't quite as simple as it seemed ;-) Specifically analysis is built with narrow unicode support and scipy/numpy require wide support....

so you have to add --enable-unicode=ucs4 to the python configure command line when compiling python for analysis using the supplied python. This command this is at about line 346 in installCode.py fro analysis 1.0.10

cmds = []
cmds.append('./configure --enable-unicode=ucs4 --prefix=%s/%s' % (top_dir,python_rel_dir))
cmds.append('make')
cmds.append('make install')
runCmds(cmds)

in the function def compilePython(x11_abs_dir, tcl_abs_dir, tk_abs_dir):

Monday, June 26, 2006

what to do if an update fails

ccp analysis has a very nice update feature. However, if it fails you can get in a state where you can't start analysis to get the updates. So here are two simple cures (one is from Tim and uses a python interface, the second is just how to get to the update site with a web browser to pull down raw files).

To run the update agent without analysis running

  1. initialise you analysis environment so the ccpn root directory is set e.g. setenv
    CCPN_HOME ... in csh syntax or export CCPN_HOME='...' in sh syntax
  2. if need be setup you pythonpath to include the ccpn directories
  3. python $CCPN_HOME/python/ccpnmr/update/UpdatePopup.py and proceed as usual

to use a web browser...

  1. http://www.bio.cam.ac.uk/~ccpn/ccpNmrUpdate
  2. this directory will contain files of the form python__temp_ccpnmr__temp_analysis_.py where would be Util for Util.py for example
  3. download save and install