Archive for January, 2008

Mon manuscrit de thèse sera rédigé en LaTeX (le premier qui me parle de Word se fera frapper avec violence ;-) ) et histoire d’automatiser les choses, j’ai écrit un script de compilation en Ruby.

J’aurai pu utiliser un Makefile, un des scripts existants (il y en a un très bien en Perl dont j’ai oublié le nom), du Python, du Groovy… mais ce script là me va très bien !

#!/usr/bin/env ruby
 
require 'optparse'
require 'fileutils'
 
MAIN_FILE = "phd-thesis"
PDFLATEX  = "pdflatex #{MAIN_FILE}.tex"
BIBTEX    = "bibtex #{MAIN_FILE}.aux"
 
def build_pdf
  return unless system PDFLATEX
  return unless system BIBTEX
  callcc do |stop_build|
    3.times do
      status = system PDFLATEX
      stop_build.call unless status
    end
  end
end
 
def single_compilation
  system PDFLATEX
end
 
def clean_artifacts
  extensions = %w[blg log pdf aux bbl lof lot out toc tps]
  files = extensions.map { |ext| "#{MAIN_FILE}.#{ext}" }
  FileUtils::Verbose::rm files, { :force => true }
end
 
def open_pdf(how)
  system "#{how} #{MAIN_FILE}.pdf"
end
 
def run
  options = {
    :command => :pdf
  }
  OptionParser.new do |opts|
    opts.banner = "Usage: build.rb [options]"
 
    opts.on("--pdf", "Build the PDF output (default)") do |pdf|
      options[:command] = :pdf
    end
 
    opts.on("--oneshot", "Single LaTeX compilation") do |oneshot|
      options[:command] = :oneshot
    end
 
    opts.on("--clean", "Clean the build artifacts") do |clean|
      options[:command] = :clean
    end
 
    opts.on("--open-pdf [HOW]", "Open the generated PDF with HOW)") do |how|
      options[:openpdf] = how
    end
 
    opts.on_tail("-h", "--help", "Show this message") do
      puts opts
      exit
    end
  end.parse!
 
  case options[:command]
 
  when :pdf
    build_pdf
    open_pdf(options[:openpdf]) if options[:openpdf]
 
  when :oneshot
    single_compilation
    open_pdf(options[:openpdf]) if options[:openpdf]
 
  when :clean
    clean_artifacts
 
  end  
 
end
 
run

Je ne garanti pas que le code soit parfait, alors n’hésitez pas à émettre des critiques constructives !

Comments 2 Comments »

gf-izpack-inputpanel.png

The next release of the IzPack-based GlassFish installer will bring the following enhancements:

  1. Solaris (x86, sparc) support
  2. ability to tweak the default domain creation (uses UserInputPanel, see the screenshot above)
  3. ability to start the created domain and open a web browser on the administration console
  4. support for creating the domain with the cluster script.

Note: the data entered on the above panel is validated :-)

I have yet to test it on other platforms than Mac OS X (Tiger), so feel free to try it from http://izpack.org/showcases/glassfish-v2/experimental-glassfish-install.jar and report issues! (as the name suggests, this is highly experimental)

Comments 4 Comments »

I’m glad to announce that following our tradition of meritocracy and open development, the project has now 2 new developers: Piotr Skowronek and Jeff Gordon.

Welcome on board guys ;-)

Update: Matthew Fudge has now joined the project as well!

Comments No Comments »

OpenOffice Draw est un bon outil pour construire des figures scientifiques. On peut sans aucun doute faire mieux (OmniGraffle est un bijou sous Mac OS X), mais en tant qu’outil opensource, multi-plateformes, avec un éditeur de formules mathématiques et disponible gratuitement, il est plus que respectable :-)

Il y a néanmoins une chose qui m’agace plus que les autres (au hasard devoir retailler les pages pour avoir un PDF à la taille de la figure …) : l’inclusion d’une image externe se fait par défaut en liaison. Dit plus simplement, si je fait un drag&drop d’une image externe dans ma figure, OpenOffice la lie au document au lieu de l’importer dans le fichier du document.

La subtilité est de taille : le chemin de l’image est stocké en dur dans le fichier, si bien que lorsque l’on ouvre le fichier depuis une autre machine, l’image est manquante :-(

Bien évidemment il y a la possibilité de passer par le menu insérer et ne pas cocher la case de liaison, mais le drag&drop est quand même bien plus confortable.

J’ai fini par trouver la solution pour que OpenOffice embarque les images :

  1. utiliser le drag&drop
  2. finaliser sa figure
  3. aller dans le ménu Edit > Links puis supprimer tous les liens, ce qui a pour effet d’embarquer les images dans le document !

A mon humble avis, le comportement par défaut devrait être d’embarquer les images plutôt que de les lier. Je suppose en effet que l’utilisateur lambda doit tomber facilement sur ce problème sans jamais trouver la solution.

Comments 2 Comments »

Jonathan Schwartz (Sun Microsystem CEO) has reassured people like me in his latest blog post: after having bought MySQL, they apparently stay committed to PostgreSQL as well :-)

What happens to your commitment to PostgreSQL?

It grows. The day before we announced the acquisition, and within an hour of signing the deal, I put a call into Josh Berkus, who leads our work with Postgres inside of Sun. I wanted to be as clear as I could: this transaction increases our investment in open source, and in open source databases. And increases our commitment to Postgres - and the database industry broadly. The same goes for our work with Apache Derby, and our JavaDB.

Josh says it exactly right on his blog - Sun wants to be the leading provider of datacenters. Not just MySQL datacenters. Exactly.

Comments No Comments »