B4A

Mostrando las entradas con la etiqueta Pharo. Mostrar todas las entradas
Mostrando las entradas con la etiqueta Pharo. Mostrar todas las entradas

domingo, abril 05, 2015

Elegante código en Pharo

Un resumen de poderosas y elegantes sentencias, expresiones y porciones de código en Pharo Smalltalk se puede ver en esta página.


sábado, abril 04, 2015

GTPlayground

Un artículo corto e interesante que muestra las motivaciones en el desarrollo de GTPlayground y cómo intenta hacer más cómodo el trabajo que habitualmente los Smalltalkers hacemos desde un workspace.

Aquí el artículo.



sábado, enero 05, 2013

BioSmalltalk

BioSmalltalk es un proyecto de gran interés para la comunidad científica y también para nosotros los programadores, ya que a través de proyectos como este es que aportamos valor a otras ramas de la ciencia y la tecnología.


Descripción


De la página del proyecto leemos que BioSmalltalk es una biblioteca open source para trabajar en bioinformática con Smalltalk.

BioSmalltalk posibilita el desarrollo de scripts y aplicaciones bioinformáticos usando la más poderosa tecnología de objetos, es decir un ambiente Smalltalk.

BioSmalltalk es adecuado para sus proyectos bioinformáticos:
  • Si Ud quiere un lenguaje fácil de usar y de aprender (sólo 5 palabras clave).
  • Si Ud quiere explorar y manipular sus objetos interactivamente a través de herramientas creadas y testeadas desde hace más de 30 años.
  • Si Ud quiere aprender APIs de bioinformática mientras las porta a tecnología de objetos pura.
  • Si Ud quiere explorar una jerarquía de clases con sólo dos clicks.
  • Si Ud no se siente cómodo leyendo código en miles de archivos.
  • Si Ud quiere fácilmente (a través de 1 click) recorrer.
    • Remitentes de métodos.
    • Referencias a clases.
    • Implementadores de métodos.
  • Si Ud quiere refactorizar código en el mismo ambiente del navegador de clases.
  • Si Ud no quiere buscar, memorizar, analizar y tipear comandos y parámetros en una consola.
  • Si Ud no quiere complicarse más con estructuras de directorios.
  • Si Ud no quiere revisar visualmente y recorrer miles de líneas de código en un archivo.
  • Si Ud quiere codificar en el ambiente de objetos creado por el inventor de la tecnología de orientación a objetos.
  • Si Ud quiere codificar en un ambiente con tecnologías como recolector de basura generacional, compilación Just-In-Time, metáfora modelo-vista-controlador, framework de testing y muchas características más

Ambiente Puro de Objetos


Uno de los objetivos de BioSmalltalk es conciliar los beneficios de un ambiente de objetos puros con tareas relacionadas con la bioinformática. En BioSmalltalk científicos o programadores no profesionales pueden desarrollar rápidamente sin las complejidades de los entornos de programación tradicionales.
  • La reflexión computacional es de naturaleza original en Smalltalk.
  • Objetos puros, no hay mezcla innecesaria de objetos con tipos de datos primitivos. No se requiere inicialización ni conversión a objetos como en los lenguajes de tipado estático.
  • Ambiente de desarrollo único, que soporta navegación del código fuente a través de navegadores y herramientas integradas (Refactorización, Depurador, Introspección, Inspección, Exploradores, etc).

Para ver el uso y progreso del proyecto BioSmalltalk puede visitar el blog del proyecto y para los desarrolladores interesados existe una Guía de Desarrollo en la sección Descargas.


Contribuyendo

BioSmalltalk necesita su ayuda! Todos son bienvenidos; si Ud quiere suscribirse a las listas de correo existen una lista orientada a desarrolladores y otra para usuarios. El código fuente está en un repositorio de SqueakSource3. 

Estado

BioSmalltalk está actualmente bajo fuerte desarrollo y testeo en el Instituto de Veterinaria Genética (IGEVET) y patrocinado por el Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) en Argentina.

Licencia

Todo el código desarrollado y guardado en el repositorio de BioSmalltalk es licencia MIT.

domingo, abril 29, 2012

Open Projects, the financial side.

I love and believe in the open source, but happens that any person need the money to survive. No matter if was explained 1000 times, but open don't means free or, don't means that a developer developing open source software don't need money.

Many of open developers are financed by big companies that have a different scale business model, others by different sort of organizations, but others (as myself) need to administer very well the free time, to end up investing some (almost always few) hours to develop open projects, contribute with other open projects, write documentation, etc.

I know, is the backside of the open source world (and I really don't believe that the money may be made only by the support around the software. Or, if may be done, is another business, I'm a programmer, not a supporter).

This is a small thought of a sunday morning where I'm (again) trying to decide if invest my time in interesting open projects or do (boring) business stuff (As SEO optimizations, web sites updates, adwords campaigns, and many other things focused in have more sales of my closed product PasswordsPro).

Another side of the question is that if some of own open projects get some audience and are used by some people, they have needs....need new features, they need new versions and, of course, support....conforming a non easy equation for a (small and independent) open source developer.

With these thoughts in mind I decided to make here a list of open projects I'm working on and that I dedicate the time I can and also enable donations through PayPal to help me to spend more time on these projects.

The list of open projects I'm working on is:

Pharo in OpenShift: This is a project to make possible to run Pharo headless in the Red Hat Cloud PaaS OpenShift. I already proved that it's possible, but a lot of work is still needed to polish and automate the project using the DIY cartridge. Would be nice also that Red Hat could provide native support (I'm willing to help, of course!) for Smalltalk (Pharo / Squeak / Cuis) being that the Cog VM run smoothly here.

XMLRPC Support for Pharo: I need to port it to current 1.4 Pharo version and adapt to Zinc.

Crytography: We need to improve the Cryptography support in Pharo/Squeak/Cuis.

Pharo: I try to help (ok not much in the last times) in fix bugs and such sort of things.

Cuis: This is an argentinian project and I think is very promising in different aspects, but is needed adapt packages to run on it (As web servers, web frameworks, cryptography, and a long etc).

If you want to help donating some money (specially companies), here the button:


And it will be also in the specific pages of the projects.

Thanks for read!

domingo, noviembre 13, 2011

Zinc HTTP Components

From the Zinc page:


Zinc HTTP Components is an open-source Smalltalk framework to deal with the HTTP networking protocol. This is a new project (started September 1st 2010) that is currently under heavy development. Our long term goals are very ambitious: we want to reach the level of functionality, scope, architectural clarity and maturity of the Apache HTTP Components library. Our short term goal is to offer working HTTP client functionality to support fundamental features in a Smalltalk image. For the time being, Pharo is our reference platform.


Today I read a mail from the author of Zinc, Sven Van Caekenberghe in the Pharo list, about the status of the framework then I had the idea of write this small article highlighting the Zinc features and status.


Next the afore mentioned mail:


Hi,

This is a list of the most important changes to Zn since May 1st 2011:

- added brand new ZnClient to replace all other HTTP clients (who became deprecated)
 this is an object to build, execute and process HTTP client requests,
 it has a rich protocol to construct requests and to access responses,
 it has various error handling options,
 it can reuse an existing connection to a specific host:port,
 it can handle sessions, cookies, redirects and authentication,
 it has many options (settings) with sensible defaults.
 here is the simplest example:
     ZnClient new
       get: 'http://zn.stfx.eu/zn/numbers.txt'
 and here is an example using some features to make a better HTTP request:
     ZnClient new
       systemPolicy;
       accept: ZnMimeType textPlain;
       http;
       host: 'zn.stfx.eu';
       path: 'zn/numbers.txt';
       contentReader: [ :entity | entity contents lines collect: [ :each | each asNumber ] ];
       ifFail: [ :exception | self inform: 'I am sorry: ', exception printString ];
       get
- added support so that HTTPS works out of the box if Zodiac is present.
 this should work when Zodiac is loaded and the necessary plugin is present:
     ZnClient new
       url: 'https://www.google.com/search';
       queryAt: 'q' put: 'Pharo Smalltalk';
       get
- added a new subclass, ZnManagingMultiThreadedServer, that keeps track of open
 worker connections so that they can be properly closed when needed.
 to use this server with the Zn Seaside adaptor, you can do this:
     ZnZincServerAdaptor new
       port: 8080;
       serverClass: ZnManagingMultiThreadedServer;
       start
- refactored ZnNetworkingUtils, it is now (also) a factory for creating socket streams
- added ZnDispatcherDelegate for straight-forward dispatching to mapped urls (thx Nick Ager)
- cleanup of the cookie handling API
- fixed support for HTTP proxies (thx Alexandre Bergel for reporting)
- localhost URLs are now excluded from being proxied
- working around SocketStream>>#atEnd issues by using #peek
- implemented support for proxies that require authorization
- introduced ZnConnectionTimeout process variable
- added ManagedServers class variable to ZnServer to dispatch the system's
 #startUp/#shutDown messages to all server instances that are #register-ed
- implemented client side support for If-Modified-Since and Not Modified
- changed ZnMimePart>>#fieldValueString to return an empty string instead of 'nil'
 when the field is empty or absent (Thx Lukas Renggli)
- added support for dealing with certain defaults in ZnUrl
- added code to throw a ZnMissingHost exception when a bogus ZnUrl is used to connect to a HTTP host
- added ZnMimeType wildcard constants #any and #text
- added ZnHttpUnsuccessful and ZnUnexpectedContentType exceptions
- added a nice example to ZnEasy class>>#getPng: (Thx Lukas Renggli)
- added ZnUtils class>>#parseHttpDate: for use in ZnCookie>>#expiresTimeStamp
- added optional delegate #close-ing to ZnServer hierarchy
- added some Pharo 1.2 compatibility (ZnMultiThreadedServer>>#exceptionSet:)
- lots of small fixes, cleanup and improved documentation.



And don't miss the Getting Started guide!


Indeed this is a very good framework, not only by its features, but also for it technical quality and the commitment of the developer, taking care of the support and documentation.

I should reimplement XMLRPC to use Zinc. Hope to have time soon.

Pic Info: 
http://www.flickr.com/photos/kodomut/3950770038/ / License

martes, julio 12, 2011

Pharo: Smalltalk, open source, innovative, documented, what else?

Smalltalk is real objects technology, not only object oriented, the word of difference may make a world of difference. 

This means that everything in the environment is an object and the only way to communicate with an object is sending it messages. It's all, objects and messages.

In addition all the objects live in an environment (the currently named image) as en ecosystem that is alive all the time. That means that you can modify your objects and the modification happens while the object is alive on the image.

These modifications and messages are written in a language. The Smalltalk environment has a language, also called Smalltalk, very simple and easy to learn and understand.

The main barrier to people wanting to start with Smalltalk is the Objects paradigm, but after a time changing the mind a new world appear.

Pharo is an open source implementacion of Smalltalk and the mission stated in its web page is: Pharo's goal is to deliver a clean, innovative, free open-source Smalltalk environment. By providing a stable and small core system, excellent dev tools, and maintained releases, Pharo is an attractive platform to build and deploy mission critical Smalltalk applications.

Pharo is currently in the version 1.2.1 as stable, 1.3 is almost ready and 1.4 in development and it uses the traditional virtual machine but also the new, faster Cog virtual machine.

The VM is particular to each platform, but the image run unchanged between platforms. A developer could be developing in Mac and deploy in a Ubuntu server with no problems. Also any other combination of supported operating systems.

Pharo is ready to develop almost any type of application from desktop to web with plenty of frameworks ready to use. Check here some success stories.

How to install:

The easiest way is download the bundle and click it.

But also you can have you VM with lot of different images installed, because the installation is very straightforward, it's only matter of copy the images and sources in a directory, open it with the selected VM and it's all.

All the different downloads here.

You can use the already compiled vm or compile yourself. For a help building your own cog vm version check my blog post.
 
And if you need help, Pharo have several forums and this free book. What else you need to give it a try?.

viernes, septiembre 03, 2010

Building Cog VM on Ubuntu Lucid Lynx

Finally I decided to build Cog on my Ubuntu 10.04 box.


The first step is download the needed sources:

     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/platforms
     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/src
     svn co http://www.squeakvm.org/svn/squeak/branches/Cog/unixbuild



Then, I followed the 3d. instructions from Eliot, because I want to build the VM on a 64-bit OS.

I have an Ubuntu 64 bits without special installations, I mean, installed exactly as the ISO installs, with no special packages selected.

Then, the first step is install the following packages needed to compile in 32-bit mode on 64-bit ubuntu:

     lib32asound2-dev
     libgl1-mesa-dev
     libglu1-mesa-dev
     build-essential
     ia32-libs
     gcc-multilib
     g++-multilib



At this point I run the configuration script, but it failed with an error message for complaining about missing XShm.h. Doing a bit of googling I found that I probably need to do this:

    sudo apt-get install libx11-dev libxpm-dev x11proto-xext-dev libxext-dev  

Again run configure script and this time the error message was for complaining about missing X11/Intrinsic.h. Google found the solution once more time, another no istalled package:

    sudo apt-get install libxt-dev

And now, the configuration script: 


      ../../platforms/unix/config/configure CC="gcc -m32" CXX="g++ -m32" CFLAGS="-g -O2 -msse2 -D_GNU_SOURCE -DNDEBUG -DITIMER_HEARTBEAT=1 -DNO_VM_PROFILE=1 -DCOGMTVM=0" LIBS=-lpthread

run ok.

Remember to run it from unixbuild/bld directory.

And finally, execute:

    make install prefix=WhereYouWantTheVmToGo

And voila, the Cog vm is built!


Pic information:
http://www.flickr.com/photos/hugo90/1719493630/ / CC BY 2.0

viernes, julio 02, 2010

WebPostAutomation released.

A local customer contacted me to solve a repetitive task on his business.

Such task is login on a website (of a provider of him), select some options, and upload until four different file types (The server software of the website upload the files using POST method).

The task must be made lot of times by day, in the moment that each one of the four file types is generated by an internal system.

The customer wanted a program to solve this manual and time consuming task. Then I developed a small piece of software named WebPostAutomation to make this task automatic.

My system is basically a Pharo 1.0 image with WebClient loaded with some adaptations to make upload of files using multipart/form-data through POST method.

WebPostAutomation have a configuration file with the parameters that need to know to make its job.




Also, each operation of WebPostAutomation is logged using a simple log mechanism I developed to this project (The logging engines I found on Squeaksource were so complicated to my current needs). A sample of the log file next:



Being that the customer is using Windows on his daily work, I deployed WebPostAutomation with the latest Pharo VM for Windows, tweaking somethings with the configuration of the vm file.

To inform the result of each upload I parse the HTML returned by the server and log that info.

I know is a simple solution, but also is a clean solution, far better than automate the task using Internet Browser macros (that is the first obvious option).

Using WebPostAutomation is simple and straightforward and the communication is directly with the remote web server with no other pieces of software in the middle.

I wrote this article to show another possibility of make business using our lovely Smalltalk.


Pic Information:
http://www.flickr.com/photos/sepblog/3941048713/ / CC BY 2.0

miércoles, abril 07, 2010

Pharo/Squeak Tips - Counting lines of code

I will try to publish here some tips I found useful and that may be of help to others. Of course, some of them, will be very basic, but still may be useful for newbies.

Said that, a thing that I like to know is the approximate lines of code of my projects, the lines of code I write in a period of time, etc. 

To know that you can use the following code:

Being, in this case, 'G1' the two letters that identify all the classes of the project I want to measure.

The output looks like:


Ok, now you can measure how many lines of Smalltalk code you write at day! :)

sábado, noviembre 28, 2009

Porting SWT to trunk / Pharo - Report 1

I'm working on port SWT (Smalltalk Web Toolkit) to the latest versions of Squeak and Pharo.

SWT was developed and used extensively on Squeak 3.8 and I'm trying now to port it to 3.10 trunk and Pharo (Closures enabled images).


The process of install and run SWT on an image may change depending if the image has the web tools installed (Comanche, Seaside) or not.

On an image with the web tools installed, the process is very straightforward, only matter of install the packages from the repository.

On an image without the web tools, the steps are the following:
Install from squeaksource:
  1. KomServices-gc.19
  2. DynamicBindings-GiovanniCorriga.10
  3. KomHttpServer-GiovanniCorriga.50
  4. Modify the class MessageSends adding the methods #value: and #evaluateWithArguments (methods coming from Seaside).
I added these methods on a category *swt-nonseaside when the image don't have Seaside installed.

The installation of SWT and friends is so easy, only point the squeaksource repository: 


MCHttpRepository
    location: 'http://www.squeaksource.com/SWT'
    user: ''
    password: '' 
 
 
and install in order: 


  • JSON
  • Lock
  • Asteroid
  • SWT
When the installation ended, some issues appear (Are the issues I'm working on).
They are:  
1. On the web tests of ST2JS are 3 tests failing and only 1 [*] on the ST2JS Test Runner.
 
2. Starting up Asteroid and going to the default url (http://localhost:9999) the first browser connect and works ok, but trying to connect more browser windows, all remains disconnected.
3. Anyway the most of sample applications works ok, except from some encoding issue.
[*] Really exists 2 failing tests but the first one, #testSimplest is only a matter that the javascript get generated in different order than the one compared in the test:





The signaled line need to be arranged on the comparation as is generated now with new Squeak/Pharo and it's all.


Well, this is the current status of the port, but I will not be working on this in the next few weeks, because I need to come back to the work for money :)

Sorry with the bad formatting, but I'm tired of fight with these questions on blogspot (The wysiwyg editor show a thing and render another and I don't have time to edit pure html). May be is time to change my blogging platform.