Freedom, economy and information technology.
Random header image... Refresh for more!

Clojure Review

This entry is part 1 of 7 in the series Programming Languages

Book review by Stefano Fago:
This book introduce one of most interesting  language of new wave of functional programming. You will find a complete overview of clojure language focusing in functional paradigm that can be the real obstacle for a standard developer. The author try to follow you on learning different subject with a lot of examples but sometimes it need more reflection and time to master some arguments and a syntax that may seems obscure. The book is a good starting point to introduce you to a new way of programming but also to learn some particulars aspect of Java. To consider a complete but not easy reading. However a book to have!

February 6, 2010   No Comments

Erlang Book Review

This entry is part 2 of 7 in the series Programming Languages

After reading an interesting article on Erlang  and Java interoperability, I have decided to dedicate my spare time to Erlang.

O’Reilly has just published a wonderful book on Erlang, so I decided to dive into it.

[Read more →]

July 19, 2009   1 Comment

JRuby and Jython: the easy way

This entry is part 3 of 7 in the series Programming Languages

The revamp of Jython 2.5, the python interpreter written in Java, is a very good news, because give us the chance to think of a new way of coding. Looking at Google trends,  JRuby and Jython are emerging as key  pieces of a new puzzle.

OOP revolution take years to become active, and Java success is based on about 15 years of trials, errors and refinements.

After some considerations, at Gioorgi.com we are evaluting a new approach to java  programming.
New methodology emerge slowly, and it is not easy to find what is userful to day-by-day programming. One of the true success of OOP is the reduced mantenance costs, because OOP has a stronger isolation of related concepts.

So let’s start from academic research, to see what can help us to reduce maintenance costs.

If you take a look to  Traits: Composable Units of Behaviour, published on 2003 by Nathanael Scharli, Stephane Ducasse, Oscar Nierstrasz, and Andrew P. Black, you read:

[...]A trait is essentially a group of pure methods that serves as a building block for classes and is a primitive unit of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising from the different variants of inheritance[...]

Traits differ from classes in that they do not define any kind of state,
and that they can be composed using mechanisms other than inheritance.

Building dynamic traits is an interesting approach to programming, similar to Aspect Oriented Programming (AOP).

Anyway both ideas (traits and AOP) have been proved a bit unsuccessful in the day-by-day programming. After looking at the implementations,   a small peak on google shows only experimental projects.

A web framework based on dynamically service composition, can be an interesting step for shortening Java coding time.

In this context, the Java-Python bridge (Jython) a dynamic interpreter, is a better solution then a compiler, because give us more freedom. Also JRuby shares a similar approach.

Let’s see the key point of this idea:

  • There is no need of learning a new library, but it is possible reusing as much as possible JDK know-how.
  • Python offers lambda functions, a powerful way of defining scoped and parametric functions. This is impossible in Java, and similar approach (based on CGLIB or Spring for instance) are  slow to set up, understand and debug. Teams need to be trained a lot, and this can increase development costs.
  • The ability to extend Java classes via  python code gives you a strong flexibility
  • The dynamic aspect of python simplify coding of prototype parts and mock objects
  • Python has several advantages on its own:
    • Python is older then similar dynamic scripting languages.
      Python was created in the early 1990s by Guido van Rossum at Stichting Mathematisch Centrum.  Also Ruby has a similar born date, but it has grown slowly.
    • Python code is easy to understand compared to more mature scripting languages (like perl)
    • Python library is rich
    • Python community process (PEPS) is well established, and live
  • The security model of Java protect us from abuse. This has been a problem in python. For instance a web framework written in pyton (called Zope) suffers from this lack of security and isolation. This issue is common also to Ruby as a dynamic language.
  • Java memory management  is stronger then the Python one.
  • Java multi-processing abilities can leverage python lacks on this area
  • Java is slowly moving toward scripting languages. JSR 223 is an example. At the moment, there are the following scripting engines:

For these reason, Jython/JRuby look promising for prototyping and developing.

References

February 9, 2009   No Comments

Python 3.0 Release

This entry is part 4 of 7 in the series Programming Languages

Python 3.0

We are pleased to announce the release of Python 3.0 (final), a new production-ready release, on December 3rd, 2008.

Python 3.0 (a.k.a. “Python 3000″ or “Py3k”) is a new version of the language that is incompatible with the 2.x line of releases. The language is mostly the same, but many details, especially how built-in objects like dictionaries and strings work, have changed considerably, and a lot of deprecated features have finally been removed. Also, the standard library has been reorganized in a few prominent places.

Python 3.0 Release

We are happy for Python 3.0 roll out, although we are not confortable with it, because it is incompatible with the previous python version.

It is too early to be sure, but we hope Python 3.0 will help the growth of the python community.
Try it!

December 4, 2008   No Comments

Commodore BASIC as a Scripting Language Open Source

This entry is part 5 of 7 in the series Programming Languages

Commodore BASIC as a Scripting Language for UNIX and Windows – now Open Source:

Here is a little background:

This application is a recompiled version of the original Commodore 64 binary – it is not a reimplementation, so while it runs at pretty much the maximum possible speed, it is still 100% compatible. The huge C file in the archive has been produced by feeding the original 6502 code into my static recompiler and optimizing it with LLVM. The original operating system interface (character I/O, LOAD, SAVE etc.) has been reimplemented in native C, so Commodore BASIC interfaces nicely with OS X/Windows/Unix – you can use pipe I/O, and you can pass the filename of a BASIC program on the command line.

Yes, you could also just run a standard C64 emulator, but it wouldn’t be nearly this speed, and everything would run inside a sandbox; and there would be no way to interface this to your OS.

pagetable.com » Blog Archive » Commodore BASIC as a Scripting Language for UNIX and Windows – now Open Source.

This is our Friday relaxing news!
To get the complete list, please look at the relax tag.

November 21, 2008   No Comments

Python functional programming

This entry is part 6 of 7 in the series Programming Languages

This article is a work in progress: it will be expanded by your comments…

Python is a very curios programming languages: it give you classes but also a strong function-oriented environment to play with. So, if you like functional programming (read: you like  Lisp and/or Erlang)  you should give python a closer look.

[Read more →]

February 23, 2010   No Comments

Closure in Java: fast and nice!

February 26, 2010   1 Comment