Wednesday, April 18, 2012

Pharo 1.4 with Tiling Window Manager and more

With the release of Pharo 1.4 I've created my new custom image with TWM, Nautilus, Autotest and ProfStef. Here's the download link

Saturday, February 11, 2012

FOSDEM 2012

This was my first FOSDEM and with no hesitation that's the most fun event I've ever participated. The Hackerspace Bytenight was amazing, listening 8-bit remixed music from 90's video games, drinking good Belgian beers and talking with fun people.

I found a place to sleep for four days through CouchSurfing (I've also discovered BeWelcome recently), it seems the best way to enter Brussel's life.

On sunday John Thornton and I gave a talk on Amber Smalltalk - you can view slides online. Johnny arrived from the USA only five minutes before the talk, he's definitely an agile developer ;) We had some fun presenting Amber and the room was almost filled. We wanted to show real working code, integration with Javascript and Nodejs goodies. It's nice to use dynamic slides with Amber.

Amber Smalltalk
Photo by Damien Pollet

Marcus explained Pharo's vision before our talk. Huge work has been done, huge work ongoing. I'm looking forward to the Pharo Consortium.

After talking with several people we went back to the Smalltalk devroom. I discovered the Spoon project by Craig Latta. It's a minimal Smalltalk that can be remotely browsed from Squeak.

Then took place an introduction to Smalltalk workshop. Experienced Smalltalkers paired with newcomers to test and add new features to a Seaside application. The idea is nice and allows to listen to people feelings while discovering a new tool.

I finally put real faces on people only known on mailing-lists. Sad we did not managed to have more discussion. One day is short and so much to see...

Thank you Stephan. So nice things can emerge from a single tweet :)


Photo by Adriaan van Os

Friday, October 7, 2011

Emacs and J2EE on OSX notes

Here's how I've managed to setup Emacs for J2EE / Tomcat / Maven application development on OSX. 

Install Emacs

I use Emacs 23.3 from Emacs for OSX.


Malabar mode

Malabar mode offers easy code navigation, Maven, JUnit and Groovy integration. Download release 1.4 and extract in a directory to build it.

As the build will invoke emacs in batch mode, be sure that Emacs 23.3 is in your path (instead of using the one packaged with OSX).

What works on my machine:
unzip espenhw-malabar-mode-malabar-1.4.0-0-g35e1e5e.zip
cd espenhw-malabar-mode-1daaee4
export PATH=/Applications/Emacs.app/Contents/MacOS:$PATH
mvn package -DskipTests=true
Now in target directory there's a malabar-1.4.0-dist.zip. Unzip it where you put all your emacs librairies:

cd ~/.emacs.d/
unzip /path/to/malabar/target/malabar-1.4.0-dist.zip


Configure Emacs for Malabar

Open your .emacs and add:
(add-to-list 'load-path (expand-file-name "~/.emacs.d/malabar-1.4.0/lisp/")) 

(require 'cedet)
(require 'malabar-mode)
(setq malabar-groovy-lib-dir "/path/to/malabar/lib")
(add-to-list 'auto-mode-alist '("\\.java\\'" . malabar-mode))

(semantic-mode 1)
(require 'malabar-mode)
(setq malabar-groovy-lib-dir "~/.emacs.d/malabar-1.4.0/lib"
      malabar-load-source-from-sibling-projects t
      malabar-extra-source-locations
      '( "/absolute/path/to/project1/src" 
        "/absolute/path/to/project2/src" ) ) ;; you need to setup this 

(add-to-list 'auto-mode-alist '("\\.java\\'" . malabar-mode))

(add-hook 'malabar-mode-hook
     (lambda () 
       (add-hook 'after-save-hook 'malabar-compile-file-silently
                  nil t)))

Now open a .java file within Emacs.

Try malabar-jump-to-thing on one of your class and it should open the corresponding file.

Open a test file and try malabar-run-test. It should run maven test for this file. If all tests OK but finished with "BUILD FAILURE", then see next section


Java troubleshooting

Malabar should use java from jdk, not jde. I've tried setting JAVA_HOME and configure malabar without success. So quick dirty hack is:

cd /usr/bin
mv java java.jre
ln -s  /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java

Ressources

Entreprise Java Development With Emacs

Debugging Tomcat

Install JDIBug. In jdibug-expr.el, change the line (and to forget to byte-recompile or remove .elc):
(require 'semantic-java)
(require 'semantic/java)
Configure emacs:

(add-to-list 'load-path "~/.emacs.d/jdibug-0.5")
(setq jdibug-connect-hosts (quote ("localhost:8000"))
      jdibug-use-jde-source-paths nil
      jdibug-source-paths
      (list
			 "/path/to/project1/src" 
			 "/path/to/project2/src"  ))
(require 'jdibug)
Start Tomcat like with debugger enabled:
./bin/catalina.sh jpda start
Then try jdibug-connect to attach Emacs to tomcat.

Tuesday, July 12, 2011

TWM: Docking Windows

Using Pharo 1.4 and latest TWM packages, you can now group windows as tabs.

Use:
(ConfigurationOfTilingWindowManager project 
    version: #bleedingEdge) load



Tuesday, June 28, 2011

My Pharo image

Backup of my preferences:
Gofer it
   squeaksource: 'MetacelloRepository';
   package: 'ConfigurationOfPhexample';
   package: 'ConfigurationOfAutotest';
   squeaksource: 'TilingWindowManager';
   package: 'ConfigurationOfTilingWindowManager';
   load.
 
(Smalltalk at:#ConfigurationOfTilingWindowManager) perform: #loadDevelopment.
(Smalltalk at:#ConfigurationOfPhexample) load.
((Smalltalk at:#ConfigurationOfAutotest) project version: #development) load: 'OB'.

(Smalltalk at:#TWMUITheme) beCurrent. 
TaskbarMorph  showTaskbar: false.
TasklistMorph keepOpen: true.
(Smalltalk at:#TWMBar) perform: #showTWMBar: with: true.
(Smalltalk at: #AutotestDashboard) perform: #showAutotestDashboard: with: true.