B4A

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

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!

sábado, abril 21, 2012

Squeak on the BeagleBone


David Graham, the publisher of Adventures with Smalltalk and Robots, published a cool article about an experiment to run Squeak on the BeagleBone. 

It's really a very good and clear way to show the power of Smalltalk and objects interacting with the hardware while it's running.

Very cool David, I enjoy a lot this sort of experiments, a way of materialize the objects behavior.

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

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.

jueves, mayo 21, 2009

In the spirit of original Squeak

When I started with Squeak, sooner I meet Diego Gómez Deck, who introduced me on the original ideas of Alan Kay and other people who started Squeak project.

In our days, seems that Squeak has evolved to several different audiences, with an important focus on web development. And, being a Smalltalk, is very good for such target, as to almost any sort of software development.

Even though, part of the original spirit of Squeak was to be a tool to help childrens learn anything on the school. A tool to help teachers to develop new ways of teach, making possible new ways of learn.

Such spirit is alive on our days on Squeakland, were several of the original people from Squeak team continue working.

The Squeakland site is plenty of fresh resources to such sort of Squeak use. Enjoy it!

miércoles, diciembre 03, 2008

Aida/Scribo Console

In the way of make Aida/Scribo a bit more user friendly to a non smalltalker user, Janko asked on the Aida list by the development of a little operation console.

I taken the job and developed a Morphic console to operate the basic aspects detaileds on Janko's mail.

The current version of the console permits:
To have the console working on your image, you can download it from its repository and make the following changes on SwazooServer class:
  • Add the instance method #isServing (under the category testing) with the following content:
^self servers notEmpty
  • Add the instance method #watchdogOther empty (on the category private-watchdog)
The console has two different interfaces (another way to show the power of Smalltalk) as you can see on the following pics:



To show it, evaluates: ScriboConsole basicView.





To show it, evaluates:
ScriboConsole fullView.


Enjoy it!

domingo, noviembre 30, 2008

More tips to get graphics inside the image

Some time ago I already talked about this topic. But what happens when the graphics is a bit big and the usual #printString, #fullPrintString, #longPrintString only show the first 5000 chars and ends with "etc..."

We talked about this topic with Jecel on the Squeak IRC and also with Nico Petton, who suggested this way to avoid the "etc..."

The trick is having the string on a text file, and then copy from them. The code that make the job is the following:

sábado, noviembre 08, 2008

Albaplata Project first screenshots

As some readers of this blog may know , my company ArSol Software was hired by Igo Software to develop several multimedial units about culture and historic sites of Extremadura state on Spain.

To develop this project, I hired three squeakers from here, Argentina, and I'm really very happy with the results. The team is geographically disperse and I coordinated the work only by Internet, using mostly mail and some chat. Thanks you guys Alejandro, Javier and Francisco by your fantastic work!.

IGO Software provided the graphical, video and audio resources and we built the units (one Squeak application by unit) using the framework FMA, originally developed by Diego Gómez Deck.

Each unit will be available on 3 languages (Spanish, English and Portuguese) and will run on touch screens on different places of the Extremadura state. The target users are the tourists that want to have a quick trip by the historical sites, before doing the real trip.

All this project is yet in development phase, but we want to share thiese first screens of some of the units, until the moment that the Consejería de Cultura de la Junta de Extremadura release the complete applications.














The topics covered by the project are (with the names on spanish, to avoid translations errors):
  • Centro de Interpretación del Ferrocarril en Extremadura
  • Centro de Interpretación de la Ciudad Medieval de Plasencia
  • Centro de Interpretación del Campamento Romano de Cáceres el Viejo
  • Centro de Interpretación de la minería en Extremadura
  • Centro de Interpretación del Circo Romano
  • Centro de Interpretación de los Conjuntos Históricos en Extremadura
  • Centro de Interpretación del Pintor Zurbarán
These units show different sort of games, as trivia and puzzles, that the user must follow, learning lot of details of each topic. A voice help is available on any topic, to help responding.

As usual on the Extremadura projects, all the software is open sourced and is available to download from Squeaksource, under the name Albaplata project.

sábado, marzo 15, 2008

Monticello Backport to Squeak 3.4

To the work I'm doing to BluePlane, the company of Tansel Ersavas and John Magnifico I backported Monticello to run on a Squeak 3.4 image.

The easy way to have it running is download the .cs and install it on a clean stock 3.4 Squeak image.

When installing, you must respond with "yes" when ask to create the pool dictionary MCMockClassPoolRepository and press "ok" when inform about an "Erased Method".

If all goes ok, then you will have Monticello running on your 3.4 image (On the World Menu --> open --> Monticello Browser), as in the pic:


If you are interested in the details of the backport, they are:

1. Filein the source code from PackageInfo (Taken from PackageInfo-Base-avi.18.mcz).

2. When the walback with the DNU error of the TheWorldMenu appear, go to the #initialize method in the debugger, erase the line:

TheWorldMenu registerOpenCommand: {'Package List'. {self. #open}}

and replace it with something as self inform: 'Erased Method' (just a flag).

3. Filein PluggableButtonMorph (Taken from a stock 3.4 image).

4. Modify FileList of 3.4 image:

a- Adding FileReaderRegistry class variable
b- Adding on the class category "file reader registration", the method:

registeredFileReaderClasses

FileReaderRegistry ifNil: [FileReaderRegistry _ OrderedCollection new].
^ FileReaderRegistry

c- Adding on the class category "file reader registration", the method:

registerFileReader: aProviderClass
"register the given class as providing services for reading files"

| registeredReaders |
registeredReaders := self registeredFileReaderClasses.
(registeredReaders includes: aProviderClass)
ifFalse: [ registeredReaders addLast: aProviderClass ]

5. Filein the sources from from Monticello-avi.59.mcz
(Press close if a warning appear)

6. Add at CompileMethod "source code management" category, the method:

getPreambleFrom: aFileStream at: position
| writeStream |
writeStream _ String new writeStream.
position
to: 0
by: -1
do: [:p |
| c |
aFileStream position: p.
c _ aFileStream basicNext.
c == $!
ifTrue: [^ writeStream contents reverse]
ifFalse: [writeStream nextPut: c]]

7. Add at CompileMethod priting category, the method:

timeStamp
"Answer the authoring time-stamp for the given method, retrieved from the sources or changes file. Answer the empty string if no time stamp is available."

"(CompiledMethod compiledMethodAt: #timeStamp) timeStamp"

| file preamble stamp tokens tokenCount |
self fileIndex == 0 ifTrue: [^ String new]. "no source pointer for this method"
file _ SourceFiles at: self fileIndex.
file ifNil: [^ String new]. "sources file not available"
"file does not exist happens in secure mode"
file _ [file readOnlyCopy] on: FileDoesNotExistException do:[:ex| nil].
file ifNil: [^ String new].
preamble _ self getPreambleFrom: file at: (0 max: self filePosition - 3).
stamp _ String new.
tokens _ (preamble findString: 'methodsFor:' startingAt: 1) > 0
ifTrue: [Scanner new scanTokens: preamble]
ifFalse: [Array new "ie cant be back ref"].
(((tokenCount _ tokens size) between: 7 and: 8) and: [(tokens at: tokenCount - 5) = #methodsFor:])
ifTrue:
[(tokens at: tokenCount - 3) = #stamp:
ifTrue: ["New format gives change stamp and unified prior pointer"
stamp _ tokens at: tokenCount - 2]].
((tokenCount between: 5 and: 6) and: [(tokens at: tokenCount - 3) = #methodsFor:])
ifTrue:
[(tokens at: tokenCount - 1) = #stamp:
ifTrue: ["New format gives change stamp and unified prior pointer"
stamp _ tokens at: tokenCount]].
file close.
^ stamp

8. Add commentStamp accessor to class ClassOrganizer.

And in the the WorldMenu now exist the "Monticello Browser" option.

If not, may be some differences between images, that may generate other behaviours, and the need of patch some code from a stock 3.9 image.

If the World Menu don't have the option, you can open the Monticello Browser evaluating on a workspace: "MCWorkingCopyBrowser open".

domingo, noviembre 19, 2006

Notable mejora en el rendering de fonts TTF coloreados


Para quienes usan fonts Truetype de colores (como en Shout+TTF fonts o como en la imagen de Small-Land), Andreas Raab liberó un fix para un problema existente con el cacheo de esos colores.

Este fix acelera el rendering del texto coloreado con TTF notablemente.
Diego Gómez Deck tomó el fix, lo ordenó dentro de un changeset para evitar algunos problemas que existían con el fix original y se puede descargar e instalar en imágenes 3.8 y 3.9.

Abriendo un transcript ANTES de instalar el .cs se puede evaluar el siguiente código:

| text morph form|
text :=
('Hello World\' withCRs asText addAttribute: TextColor red),
('Hello World\' withCRs asText addAttribute: TextColor green),
('Hello World\' withCRs asText addAttribute: TextColor blue).
text addAttribute: (TextFontReference toFont:
((TextStyle named: 'BitstreamVeraSans') fontOfSize: 24)).
morph := TextMorph new contentsAsIs: text.
form := Form extent: morph fullBounds extent depth: 32.
Transcript cr; show: (
[1 to: 1000 do:[:i| morph fullDrawOn: form getCanvas]] timeToRun
).

el cual puede evaluarse nuevamente luego de instalar el .cs para notar las diferencias.

En mi imagen 3.8 donde desarrollo habitualmente, cargada de cosas, los valores en milisegundos fueron:

Antes: 10963
Después: 714

El thread completo, de donde bajar el .cs es este.

jueves, junio 29, 2006

Algunos tips sobre manejo de gráficos en Squeak y Seaside

Una forma de mostrar gráficos (png, jpg) es leyéndolos desde el disco rígido, sin embargo, es mucho más cómodo incluirlos en algún método de nuestros objetos en forma de código fuente, de manera que los podamos tener disponibles cada vez que instalemos nuestro código en una nueva imagen.

La forma de hacerlo es la siguiente:

myMethod



x := Form fromFileNamed:'reload.png'.

xArray := x bits asArray.



^ ShoreForm

extent: 32@32

depth: 32

fromArray: xArray

offset: 0@0.


El código es muy simple y se explica por si mismo (en el ejemplo reemplazamos el logo de ShoreComponents por uno propio).

Como usamos la clase Form para esta tarea y la misma trabaja con imágenes de tipo gif, seguramente vamos a tener problemas de definición en los íconos que veamos desde Seaside, lo cual se arregla reemplazando el método asMIMEDocument de la clase Form, de la siguiente manera:

asMIMEDocument

| aStream rw |

aStream := RWBinaryOrTextStream on: String new.

rw := PNGReadWriter on: aStream.

rw nextPutImage: self.

rw close.

aStream reset.

^MIMEDocument contentType: 'image/png' content: aStream contents

Gracias a Diego por este último tip.