It's a pity but Jython development is terribly slow. It was one of the first alternative languages in the JVM. Last stable version dates from August 2012, and now we are in April 2014.
One of the best things in the open source world is the big quantity of inter-operable alternatives.
In the JVM world, we have: All of the are of good quality and free (IDEA has also a paid option, but the free one is quite powerful). I haven't had time to test seriously NetBeans, but I've been many years with Eclipse. Eclipse has many available plugins. I've even created successfully RCP apps, i.e., applications that use the infraestructure of the IDE as a framework. Lately, I'm using a lot IDEA, due to its Scala support, simplicity and it has been chosen by Google as the reference IDE for Android development. IDEA looks like lighter. Recently, in version 13.1, the Python support has been made free. You can work simultaneously in the same project with all of them if you wish, with no problems and no interferences, making use of the strength of each one. Now we are migrating to GIT from SVN. We're very happy with GIT (but a little confused at first). One problem is selecting in Jenkins a branch. Jenkins available plugins don't help for this task. Luckily, I've found this wonderful article that has helped me. But I've improved a little, and instead of launching a cron job for gathering the available branches, I calculate them on the fly. I've created a parameter of type Extensible Choice, and added this script in other to feed it: def ej(cmd) { def proc = cmd.execute(null, new File("/home/jenkins/jobs/MyProject/workspace")) def sb = new StringBuffer() proc.waitForProcessOutput(sb, sb) def cod = proc.exitValue() if (cod != 0) throw new Exception("Error ${cod} when invoking '${cmd}':\n${sb}") sb.toString() } ej("git fetch --all") ej("git remote prune origin") def re = ~/->/ ej("git branch -r").tokenize("\n").grep({!re.matcher(it).find()}).collect() { it.replace("origin/", "").trim() } Even though, I'm not an expert in Groovy, it works ok.
It's easy to debug thanks to the button Run the Script Now. Now you can easily select a branch with a combo box!!. Currently I'm using OMD, a Nagios compatible monitoriing package that let's you easily switch from different implementations.
I've chosen to work with Shinken as the core monitoring, Thruk as the web interface and PNP4Nagios as the chart package. It works ok, but some charts a never shown for most services, even if I restart all the services. I don't know which component to blame for the bad behaviour. After some painful research, I've discovered that the solution was rather simple: I had to delete this file: /omd/sites/mysite/var/shinken/retention.dat, and all the charts reappeared again. I use mainly Maven, Ant, and Bash scripts for automating tasks in Jenkins. In this way, non-tech people can start complex tasks with a simple GUI, and you have a log of all activity. Now, I've used another possibility, and it's about running Scala scripts, thanks to this plugin: jenkins-scala-plugin. Even though it isn't in the official repository of Jenkins and you have to compile it, it works flawlessly. Or you can simply use t scala path/myscalascript.scala arg1 arg2 I prefer for non-trivial scripts to use an external editor, instead of using an embedded script.
Después de haber ensayado con Google +, Blogger y Wordpress, me he decidido por weebly por su potencia y facilidad de uso, en su versión gratuita.
Blogger también me gusta, y ya lo llevo usando desde hace varios años en ámbitos no profesionales, y quería probar otro diferente para aprender. Si tuviese hosting propio, seguramente optaría por Wordpress, debido a la gran cantidad de plugins. Ahora voy a migrar mis primeras entradas realizadas a Wordpress a este sistema. Una forma sencilla de experimentar es usando el REPL interactivamente, tras teclear el comando "scala" desde una consola. Aún mejor si usamos el Worksheet View de IDE tales como IDEA o Eclipse, pues tiene la ventaja de que tenemos la asistencia del IDE, resalte de sintaxis con colores y ver el resultado interactivamente. IDEA tiene un editor bastante completo, y es el que suelo usar. En los foros responden rápido, y lo actualizan frecuentemente, resolviendo problemas y añadiendo características. Además la Community Edition tiene soporte gratuito para Scala, a través de un plugin que debe ser descargado aparte. También se puede usar el Scala IDE, que usa Eclipse. Para un uso más serio, he escrito algunos guiones en Scala, en concreto para Linux, aunque se podría también en otros sistemas como Windows. Para ello debemos comenzar el guión con esta cabecera: #!/bin/sh DIR=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd) exec scala "$0" "$DIR" "$@" !# val dir :: resto = args.toList println(s"Estoy ubicado en el directorio: $dir") println(s"Mis argumentos son: $resto") A base de println(), se puede depurar fácilmente. Al igual que un guión en Bash, Python o Perl, no hace falta compilar, lo hace automáticamente.
Debo confesar que estoy obsesionado con el lenguaje de programación Scala. Tras algo más de un par de años probándolo, y siguiendo de cerca su evolución, estoy convencido de su futuro y productividad.
Me gusta Scala por los siguientes motivos:
Mi objetivo es migrar una aplicación grande, básicamente en Jython (la versión de Python para JVM) y una cantidad menor de Java, en Scala. A través de ejemplos, ya iré explicando más ventajas. He trabajado con lenguajes dinámicos y estáticos, y he llegado a varias conclusiones sobre sus ventajas e inconvenientes: Ventajas de los dinámicos
Ventajas de los estáticos
Esto hace que prefiera en muchas situaciones lenguajes estáticos, si tienen inferencia de tipos y características como genéricos.
|