tag:blogger.com,1999:blog-160598072024-03-13T01:29:33.989+01:00Sistema de programación ZeroInvestigación en el paradigma de orientación a objetos basada en prototipos, y persistencia.Unknownnoreply@blogger.comBlogger73125tag:blogger.com,1999:blog-16059807.post-32381464073233447882013-06-04T15:19:00.000+02:002013-06-04T15:19:03.977+02:00Source code published<p>I have released the source code of the Zero programming system today.</p>
<p>Yes, I'm afraid that means this project is ended. I won't develop it anymore. This does not mean that it would not be possible to develop interesting tasks of polishing, improvement and new functionality. However, you have to say enough at some time, and actually the subject that motivated this software is not even active anymore.</p>
<p>And it should be noted that the software is good enough, i.e. it can be used for what it was initially designed (though it is true that the <b>Prowl</b> and <b>J--</b> compiler could use a rewriting), and its inner workings can be perfectly shown.</p>
<p>Actually the source code contains a folder called <b>prowlc</b>, which is a true multiplatform compiler. Unfortunaltely, it is not complete, as it lacks decision and looping structures.</p>
<p>This has been an interesting story, in which I've learned a lot. I've learned it so well that I am perfectly sure I wouldn't had started this project if I knew (like today I know) the amount of work needed. I've also realised the problems related to multiplatform software: problems will arise there where you would not expect them to happen.</p>
<p>In the end, the important thing is that his software has accomplished its designed task. And probably, it will be useful for a few years still to come.</p>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-86037323125936502552013-06-04T15:10:00.000+02:002013-06-04T15:10:21.988+02:00Código fuente liberado<p>Hoy he puesto el código fuente de Zero a disposición de cualquiera que le interese.</p>
<p>Sí, esto significa que este proyecto está acabado. No seguiré desarrollándolo. Esto no quiere decir que no se pudieran hacer labores interesantes de pulido, de mejora, y sobre todo, añadirle más funcionalidades. Sin embargo, en algún momento hay que decir basta, y lo cierto es que ya ni siquiera la asignatura que motivó este software está en activo.</p>
<p>Y en cualquier caso, el software es "suficientemente bueno", esto es, se puede usar para lo que se diseñó inicialmente (si bien los compiladores <b>Prowl</b> y <b>J--</b> necesitarían una reescritura) y se puede mostrar el funcionamiento perfectamente.</p>
<p>El código incluye una carpeta <b>prowlc</b>, que es un compilador multiplataforma real, a medio escribir, es decir, es perfectamente funcional pero no soporta estructuras de decisión y repetición.</p>
<p>Ha sido una anadadura interesante, en la que he aprendido muchísimo. Tanto, que estoy perfectamente seguro que de saber inicialmente el trabajo que supondría, no lo habría abordado. También me ha permitido darme cuenta de las penalidades involucradas en crear software multiplataforma: las vías de agua surgen allí donde menos te lo esperas.</p>
<p>En fin, lo importante es que el software ha cumplido, y seguirá cumpliendo durante al menos algunos años más, su cometido.</p>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-81385258249846009782012-12-11T14:36:00.000+01:002014-03-28T14:15:30.826+01:00PooiAunque no está directamente relacionado con Zero, sí está relacionado con la programación basada en prototipos, por lo que he pensado que merecía la pena comentarlo aquí.
<p>
<a href="http://webs.uvigo.es/jbgarcia/prys/">Pooi</a> es un intérprete de objetos basados en prototipos. Lleva bastante tiempo en desarrollo, aunque justo hasta ahora no soportaba métodos... ¡Ahora está completo!
<p>
Hay también disponible un tutorial sobre Pooi, que permite adentrarse en este interesante mundillo.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-26253580975384629832012-12-11T14:33:00.001+01:002014-03-28T14:15:56.187+01:00PooiThough not directly related to Zero, it is related to object-oriented, prototype-based programming, so I think it can be interesting.
<p>
<a href="http://webs.uvigo.es/jbgarcia/prys/">Pooi</a> is a prototype-based object-oriented interpreter. It has been in development for a while, and until now it did not support methods. Now is complete! There is also a nice tutorial to follow available.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-35522207014028501352012-12-07T20:47:00.001+01:002014-03-28T13:27:51.781+01:00Persistencia en Zero<p>
He actualizado el tutorial (también práctica de la asignatura Tecnología de Objetos de la <a href="http://www.esei.uvigo.es/">ESEI</a>), sobre persistencia cuasi-ortogonal en Zero.
<p>
El tutorial ahora incluye un nuevo ejemplo, mucho más sencillo, como introducción, y explica cómo se pueden guardar objetos con un programa y recuperarlos con otro, y, aprovechando la existencia de la excepción <b>EObjectNotFound</b>, fusionar ambos programas en uno, como de hecho hace la agenda telefónica, presente al final del tutorial.
<p>
La implantación de persistencia, y su uso educativo como muestra de cómo debería haberse implantado persistencia mediante sistemas operativos orientados a objetos, son la verdadera razón de ser del sistema de programación Zero. La mayor influencia sobre Zero para su sistema de persistencia proviene de <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.100.2390">Barbados</a>. El PS (almacenamiento persistente) se divide en contenedores, que guardan los objetos como si de directorios se tratase. El objetivo es no padecer el problema de que los <i>spaghetti pointer</i> hagan que sacar un solo objeto del PS suponga llevarse, eventualmente, todos los objetos residentes en él.
<p>
El tutorial comienza con un primer ejemplo muy sencillo, que se reproduce a continuación.
<p>
Supóngase que se desea almacenar un objeto como el punto:
<p><code><pre><b>object</b> Punto
<b>attribute</b> + x = 0;
<b>attribute</b> + y = 0;
<b>method</b> + set(a, b)
{
x = a;
y = b;
<b>return</b>;
}
<b>method</b> + toString()
{
<b>reference</b> toret = x.toString();
toret = toret.concat( ", " );
toret = toret.concat( y.toString() );
<b>return</b> toret;
}
<b>endObject</b>
</pre></code><p>
Así, para guardar un objeto en el almacenamiento persistente es necesario crear un contenedor, e introducir el objeto en él.
<p><code><pre>
<b>object</b> GuardaPunto: ConsoleApplication
<b>method</b> + doIt()
{
<b>reference</b> p = Punto.createChild( "p" );
<b>reference</b> c = ContainerInstance.copy( "PruebaPunto" );
// Rellenar el punto
p.set( 100, 150 );
// Hacerlo persistente
c.add( p );
psRoot.add( c );
<b>return</b>;
}
<b>endObject</b>
</pre></code><p>
Lo lógico sería hacer ahora un programa para recuperarlo, aunque sucede que este programa es extremadamente sencillo:
<p><code><pre>
<b>object</b> RecuperaPunto: ConsoleApplication
method + doIt()
{
System.console.writeLn( psRoot.PruebaPunto.p );
<b>return</b>;
}
<b>endObject</b>
</pre></code><p>
Resulta mucho más lógico y coherente fusionar ambos programas en uno, aprovechándose del hecho de que se lanzará una excepción si no se encuentra el objeto en el PS, pasando por tanto a crearlo.
<p><code><pre>
<b>object</b> RecuperaPruebaPersistenciaPunto: ConsoleApplication
<b>method</b> + crea()
{
<b>reference</b> p = Punto.createChild( "p" );
<b>reference</b> c = ContainerInstance.copy( "PruebaPunto" );
// Rellenar el punto
p.set( 100, 150 );
// Hacerlo persistente
c.add( p );
psRoot.add( c );
<b>return</b>;
}
<b>method</b> + recupera()
{
<b>return</b> psRoot.PruebaPunto.p;
<b>onException</b>( e ) {
System.console.writeLn( "Creando punto..." );
this.crea();
return psRoot.PruebaPunto.p;
}
}
<b>method</b> + doIt()
{
System.console.writeLn( this.recupera() );
<b>return</b>;
}
endObject
</pre></code><p>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-56133598332267867132012-06-06T12:32:00.001+02:002014-03-28T14:16:47.735+01:00The history of ZeroIt is curious how fast time goes by. I started Zero in 2003, with the assembler and bytecode specifications, and the next year, around this dates, Zero will turn 10.
<p>
The development of Zero is not competely stopped. I still have the PROWL compiler very present, obtaining a lot more stability and portability, specially with Windows 7 (it seems that with Win7 it does not feel comfortable, in contrast to the Linux version, maybe the first example of a non-deterministic program). It is nevertheless true that the system is quite complete since a few years ago, and it has been used for the practices part of an undergraduate subject, as a multilanguage, programmable systems offering dynamicity and persistence. Students have also volunteered with exercises written in PROWL, such as polish calculator, interactive fiction, etc.
<p>
The question I have been more frequently asked during these years is about the VM's registers... why so few? The answer is that, when I designed it, I was trying to make it as minimalist as possible, and that within the reasonable, to be as simple as possible so its characteristics and registers could easily be mapped to the x86 family, with a possible JITter in mind. So, it presents the __ip, i.e., the program counter, hidden but modified by JMP, JOT and JOF; __exc holding a reference to the object describing the exception thrown. It could be used as a generic, extra register, but this would be more hacking that anything else. The accumulator, or __acc, working as in x86, since the result of any assembler opcode goes there (I was however, more romatically inspired by the Z80; this chip derives from the 8080, and that is the father of the x86 family ).
<p>
There are four general purpuse registers, abbreviated as gp: __gp1, __gp2, __gp3 and __gp4. Finally, the __rr register holds a references to the result returned by a given method. This register is of course manipulable during the method execution, provided that the it holds the final result at the end of the method (it is directly set by RET, which must be the last instruction in the method).
<p>
The programmer can also count with __this, which references the object executing the method (not the method containing the method, that's another, rather different concept). It won't be a good idea to manipulate that, unless you exactly now what you're doing.
<p>
The meaning of general purpose for registers has something anecdotical: the now famous jeep of the USA army during WWII have their name deriving from exactly "general purpose" -> "gp" -> "jeep". Actually, the name of this cars does not mean anything specific. The name of the Zero's registers then is general purpose 1, general purpose 2... and for me, just jeep1, jeep2...
<p>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-12088876944419192162012-06-06T11:22:00.001+02:002014-03-28T13:28:24.868+01:00Anécdotas sobre ZeroEs curioso como pasa el tiempo. Comencé Zero en el 2003, con la especificación del ensamblador y del bytecode. El año que viene serán ya 10 años los que se cumplan desde aquel nacimiento.
<p>
El desarrollo en Zero no está parado del todo, sigo teniendo muy presente el compilador de PROWL, que proporcionará muchísima más estabilidad, y compatibilidad con Windows 7 (parece que con Win7 no acaba de funcionar bien, en contraste con Linux, es el primer ejemplo de programa no determinista). Lo que sí es cierto es que hace ya algunos años que el sistema está ya lo bastante completo como para que se utilice en las prácticas de la asignatura, como un ejemplo de sistema programable multilenguaje que presenta dinamicidad y persistencia. Los alumnos también lo han utilizado, creando prácticas como aventuras conversacionales, calculadoras polacas, etc.
<p>
Una de las preguntas que más me han realizado a lo largo de estos años es sobre los registros... ¿por qué tiene tan pocos? La respuesta es que, cuando la diseñé, pensaba en que fuera lo más minimalista posible, y que, dentro de lo razonable, pudiesen mapearse con facilidad los registros de Zero a los registros de la arquitectura x86 (pensando en un futuro JITer). Así, tiene los siguientes registros: __ip (contador de instrucciones, que es oculto pero modificado por JMP, JOT y JOF), __exc, que lleva la referencia al objeto de descripción de excepciones cuando se produce una (se podría usar de manera genérica, aunque eso ya sería más para hacking que para cosas normales). El __acc, el acumulador, que funciona efectivamente como en un 486, ya que el resultado de cualquier operación va ahí (aunque yo me inspiré más en un Z80 de Zilog cuando lo diseñé, quizás por algún sentimiento romántico [por otra parte, el z80 "viene del" 8080, y el 8080 es la base de todos los 80x86, especialmente el 8086).
<p>
Hay cuatro registros de propósito general (general purpose), ó gp: __gp1, __gp2, __gp3 y __gp4. Finalmente, el registro __rr lleva la referencia a devolver por un método. También se puede manipular durante la ejecución de un método, siempre que al final tenga lo que se quiere devolver.
<p>
También está __this, que señala al objeto que está ejecutando el método. No creo que sea muy buena idea manipularlo, a no ser que se sepa exactamente lo que se está haciendo.
<p>
Por cierto, lo de "general purpose" tiene un significado anecdótico: los famosos jeep del ejército estadounidense deben su nombre a "general purpose" -> "gp" -> "jeep". En realidad, es un coche sin un nombre realmente significativo. Así, para mi "__gp1" es "jeep1", "__gp2", es "jeep2"... etc.
<p>
Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-54357593626733725362012-05-08T08:55:00.002+02:002012-05-08T08:55:23.874+02:00The scite-bin-* package has been updated, and the color schema improved, with a better (monospaced) font.
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-3SeP2Ntr5ms/T6jDVQyY4jI/AAAAAAAAAFs/lgBfqgE9_94/s1600/zero-scite.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="200" width="150" src="http://4.bp.blogspot.com/-3SeP2Ntr5ms/T6jDVQyY4jI/AAAAAAAAAFs/lgBfqgE9_94/s200/zero-scite.png" /></a></div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-50481955655573660572012-05-08T08:53:00.000+02:002012-05-08T08:53:58.568+02:00Actualizado el paquete scite-bin-*, de tal forma que se ha actualizado tanto el editor como el esquema de colores y la fuente utilizada, ampliamente mejorada.
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-bkN5on6nx2o/T6jC-PfD0tI/AAAAAAAAAFg/UF8_UYcG2YM/s1600/zero-scite.png" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="200" width="150" src="http://2.bp.blogspot.com/-bkN5on6nx2o/T6jC-PfD0tI/AAAAAAAAAFg/UF8_UYcG2YM/s200/zero-scite.png" /></a></div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-36636773566929780712011-04-07T19:26:00.003+02:002014-03-28T13:25:55.712+01:00Prowl 2.0The development of the new Prowl compiler is steaming at good pace, only lacking:<br /><br />- decission: <span style="font-style:italic;">if</span><br />- loops: <span style="font-style:italic;">for</span>, <span style="font-style:italic;">foreach</span>, <span style="font-style:italic;">do... while</span> y <span style="font-style:italic;">while</span>.<br />- Dynamic inheritance.<br /><br />It is already fully implemented:<br /><br />- definition of local references<br />. messages<br />. assignments<br /><br />It is able to compile most programs except those with loops and decisions<br /><br />Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-40997497904890090542011-04-07T19:20:00.004+02:002014-03-28T13:26:47.576+01:00Prowl 2.0El desarrollo del compilador sigue avanzando, y en este momento sólo le faltan:<br /><br />- decisión: <span style="font-style:italic;">if</span><br />- repetición: <span style="font-style:italic;">for</span>, <span style="font-style:italic;">foreach</span>, <span style="font-style:italic;">do... while</span> y <span style="font-style:italic;">while</span>.<br />- Herencia dinámica<br /><br />Estando ya implementado:<br /><br />- definición de variables locales<br />. mensajes<br />. asignaciones<br /><br />Es capaz de compilar la mayoría de programas, excepto aquellos con decisiones o repeticiones<br /><br />Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-49722753672750734542011-03-08T20:41:00.002+01:002011-03-08T20:49:00.540+01:00prowlc<span style="font-weight:bold;">prowlc</span>, the new compiler for <span style="font-weight:bold;">PROWL</span>, said: <span style="font-style:italic;">¡Hola, mundo!</span><br /><br />With this program as input:<br /><br /><pre><br />/*<br /> Hola, mundo desde PROWL<br /><br /> jbgarcia@uvigo.es<br />*/<br /><br /><br />obj HolaMundo: ConsoleApplication {<br /> mth + doIt()<br /> {<br /> System.console.writeLn( "¡Hola mundo!" );<br /> return;<br /> }<br />}<br /></pre><br /><br />There are a few minor syntax changes. Before, the end of the object was marked with the reserved word <span style="font-style:italic;">endObject</span>, while now it is possible to use the curl braces. Before, the programmer had to write <span style="font-style:italic;">object</span>, <span style="font-style:italic;">method </span>and <span style="font-style:italic;">attribute</span>, when <span style="font-style:italic;">obj</span>, <span style="font-style:italic;">atr </span>and <span style="font-style:italic;">mth </span>are just as valid. As it can be inferred from this, the old syntax is still valid as well.<br /><br /><span style="font-weight:bold;">prowlc</span> published:<br /><br /><pre><br />Prowl - PROtotype-Writing Language - A Zero's programming language<br /> v2.0 20100831<br /><br /><br />f: 'HolaMundo.pwl'<br />Compilando...<br />Generando...<br /><br />Obj(s): 1<br />EOF('HolaMundo')<br /></pre><br /><br />Generating...<br /><br /><pre><br />OBJ HolaMundo ConsoleApplication<br /><br />MTH + doIt<br />STR ¡Hola mundo!<br /><br />ASG __gp1<br />MTH System.console writeLn __gp1 <br />RET<br />ENM<br /><br />ENO<br /></pre><br /><br />Though it is not finished (not at all, only some kind of messages are allowed), it is a big first step. The objective is to have a compiler as stable as the virtual machine. Unfortunately, the current compiler was developed by a student and it has too many cumbersome cases.<br /><br />About implementation, it is not lex&yacc based, nor it is based in any of its variants. PROWL has a simple syntax that allows to write a simple syntax and semantic analyzers. The different behaviours of the linux and windows versions of the current compiler decided me about this.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-15504814049735651922011-03-08T20:40:00.001+01:002011-03-08T20:40:54.504+01:00prowlc<span style="font-weight:bold;">prowlc</span>, el nuevo compilador de <span style="font-weight:bold;">PROWL</span>, ha dicho: <span style="font-style:italic;">¡Hola, mundo!</span><br /><br />Ante este programa:<br /><br /><pre><br />/*<br /> Hola, mundo desde PROWL<br /><br /> jbgarcia@uvigo.es<br />*/<br /><br /><br />obj HolaMundo: ConsoleApplication {<br /> mth + doIt()<br /> {<br /> System.console.writeLn( "¡Hola mundo!" );<br /> return;<br /> }<br />}<br /></pre><br /><br />Nótese que hay algunos cambios de sintaxis. Antes, el fin de objeto se marcaba con endObject, mientras que ahora se pueden usar llaves. Antes, era necesario teclear <span style="font-style:italic;">object</span>, <span style="font-style:italic;">method </span>y <span style="font-style:italic;">attribute</span>, cuando <span style="font-style:italic;">obj</span>, <span style="font-style:italic;">atr </span>y <span style="font-style:italic;">mth </span>son igual de válidas. Tal y como se deduce de lo escrito, la antigua sintaxis sigue siendo perfectamente válida.<br /><br /><span style="font-weight:bold;">prowlc</span> ha dicho:<br /><br /><pre><br />Prowl - PROtotype-Writing Language - A Zero's programming language<br /> v2.0 20100831<br /><br /><br />f: 'HolaMundo.pwl'<br />Compilando...<br />Generando...<br /><br />Obj(s): 1<br />EOF('HolaMundo')<br /></pre><br /><br />Y ha generado esto:<br /><br /><pre><br />OBJ HolaMundo ConsoleApplication<br /><br />MTH + doIt<br />STR ¡Hola mundo!<br /><br />ASG __gp1<br />MTH System.console writeLn __gp1 <br />RET<br />ENM<br /><br />ENO<br /></pre><br /><br />Aunque no está terminado, ni mucho menos (sólo soporta algunos tipos de mensajes en este momento), es un gran primer paso. El objetivo es tener un compilador de prowl tan estable como la máquina virtual. Desgraciadamente, el compilador actual fue desarrollado por una estudiante y tiene demasiados casos particulares.<br /><br />Sobre la implementación, decir que no está basado en Lex & Yacc o variantes. De hecho, no está basado en nada: todo ha sido construido desde el principio. La gramática de PROWL es suficientemente sencilla como para no tener que escribir una analizador léxico y sintáctico complicadísimo, y la diferencia de comportamiento entre las versiones de Linux y Windows del actual compilador me decidieron en este sentido. No me arrepiento, desde luego.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-10557025682074351902009-12-29T21:20:00.002+01:002014-03-28T14:14:02.130+01:00Instalador para ZeroDesde hoy, está a disposición de aquellos interesados en Zero, o en probar la persistencia, y la programación orientada a objetos basada en prototipos, de un instalador que permite bajarse y probar Zero en segundos, en lugar de descargar y descomprimir cada paquete manualmente.<br /><br />Necesita de Java para funcionar, aunque es un software que está instalado en casi todas las máquinas hoy en día.<br /><br />Como siempre, disponible en la página de descargas del <a href="http://webs.uvigo.es/jbgarcia/prys/">Proyecto Zero</a>.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-83341639049913209622009-12-29T21:16:00.002+01:002014-03-28T14:14:23.355+01:00Zero installerFrom today on, people wishing to learn about persistence, and Prototype-based object-oriented programming, or simply interested in Zero, can use the Zero installer in order to test it, instead of downloading and decompressing the packages manually.<br /><br />The Zero installer is written in Java, though today that software is installed in nearly any machine.<br /><br />You can find that in the download page:<br /><br /><a href="http://webs.uvigo.es/jbgarcia/prys/">Zero project</a>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-48737036555175920612009-09-25T12:44:00.002+02:002009-09-25T12:48:33.545+02:00PROWL compiler for LinuxThe PROWL compiler for Linux has shown various strange errors. They are strange because they don't show in Windows, and it has been compiled from the same sources.<br /><br />The strangest of all of them is that two instructions (messages) as simple as the following ones make the compiler (oddly) complain:<br /><br /><code><br />System.console.writeLn( "Hola" );<br />System.console.lf();<br /></code><br /><br />They'll have to be substituted with similar instructions, in which the return value must be stored.<br /><br /><code><br />reference retVal;<br />// ...<br />retVal = System.console.writeLn( "Hola" );<br />retVal = System.console.lf();<br /></code><br /><br />While it is true that this compilers (prowl and J--) have been excelent for showing Zero's capabilities, they have turned out to be not very stable, thus making the need to replace them in the medium-term.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-67416435374000265892009-09-25T12:39:00.002+02:002009-09-25T12:44:16.371+02:00Compilador de PROWL para LinuxEl compilador de PROWL para linux tiene varios errores extraños, puesto que es compilado con los mismos fuentes que el compilador para Windows.<br /><br />El más raro de todos ellos es que dos instrucciones (mensajes) tan simples como estas provocan error:<br /><br /><code><br />System.console.writeLn( "Hola" );<br />System.console.lf();<br /></code><br /><br />Teniendo que ser sustituidas por sentencias similares, pero guardando el valor de retorno.<br /><br /><code><br />reference retVal;<br />// ...<br />retVal = System.console.writeLn( "Hola" );<br />retVal = System.console.lf();<br /></code><br /><br />Lo cierto es que estos compiladores (prowl y J--), pese a ser excelentes en cuanto a que han demostrado características de Zero, no han resultado ser demasiado estables, lo que supone la necesidad de relevarlos a término medio.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-72254041402796590492009-09-25T12:38:00.001+02:002009-09-25T12:39:21.882+02:00Small correction of the standard libraryI've fixed some problems in the standard library (IntStdLib). The source and the compiled files are now corrected in the current pacckages for the 3.2 version of Zero: zero-bin-3.2-xxx.zipUnknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-22398273929290055802009-09-25T12:36:00.001+02:002009-09-25T12:37:56.709+02:00Pequeña corrección de la librería estandarHe corregido algunos problemas en la librería estándar (IntStdLib). Tanto la fuente como el ensamblador modificado están en la web, en los paquetes para Windows y Linux zero-bin-3.2-xxx.zipUnknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-23410892787290000582008-05-30T15:55:00.001+02:002008-05-30T15:56:53.862+02:00Nueva versión de ProwlEl compilador Prowl ha sido mejorado, en cuanto a estabilidad.<br />La nueva versión es la 1.31, sólo es necesario bajarse los paquetes Prowl-bin-win32-1.3.zip, o Prowl-bin-linux-1.3.zip.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-36474560249674477522008-05-30T15:54:00.001+02:002008-05-30T15:55:27.164+02:00New Prowl versionThe Prowl compiler has been a little bit improved, about stability.<br />The new versión is 1.31, you do only have to download the same Prowl-bin-win32-1.3.zip package, or Prowl-bin-linux-1.3.zip.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-56703735551456832372008-05-06T12:44:00.002+02:002008-05-06T12:45:21.483+02:00New publicationsSince another paper about Zero in a valuable journal is about to be published, "Journal of Visual Languages & Computing", I've updated the academic publications page about Zero.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-40472033823655689622008-05-06T12:42:00.001+02:002008-05-06T12:43:50.800+02:00Nuevas publicacionesA raiz de la próxima publicación de un artículo en una importante revista, "Journal of Visual Languages & Computing", he actualizado la sección de publicaciones académicas sobre Zero.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-70546341669194321562007-12-04T13:45:00.000+01:002007-12-04T13:51:53.974+01:00Pool of primitive objects in ZeroSo far, each primitive object employed (integer, real or string), was created and destroyed on the fly, just for each moment in which it was needed. For example:<br /><br /><code><br />x = x.sum( 1 );<br /></code><br /><br />That would be translated to:<br /><br /><code><br />INT 1<br />MSG x sum __acc<br />ASG x<br /></code><br /><br />Would make the VM, with <code>INT 1</code>, to create a new integer value (with its corredponding Zero object, and, after the MSG opcode, when the accumulator <code>__acc</code> changed, it would be destroyed.<br /><br />With these new pools of objects, (integers, floats and strings) are created on the bootstrap of the VM, and (re)used (again and again) under requirement. For example, integers and floating point numbers are created on the beginning, from zero to 20. This technique gives better performance, in general, on any program.Unknownnoreply@blogger.comtag:blogger.com,1999:blog-16059807.post-35718263195787878102007-12-04T11:38:00.000+01:002007-12-04T13:43:27.503+01:00Pool de objetos primitivos en ZeroHasta ahora, cada objeto primitivo que se empleaba, era creado y destruido al efecto.<br />Así, una instrucción como:<br /><br /><code><br />x = x.sum( 1 );<br /></code><br /><br />Que se traduciria como:<br /><br /><code><br />INT 1<br />MSG x sum __acc<br />ASG x<br /></code><br /><br />Provocaría con <code>INT 1</code> la creación de ese valor numérico entero, y después del mensaje, al pasar a valer <code>__acc</code> (el acumulador), el nuevo valor de <i>x</i>, su destrucción.<br /><br />Así, con los nuevos <i>pool's</i> de objetos para enteros, flotantes, y cadenas, se crean en el arranque una serie de objetos primitivos predefinidos (en el caso de los enteros y flotantes, del 0 al 20), que son empleados en el lugar de uno nuevo original en caso de que se produzca una situación como la anterior. Ésto hace que no sólo no se cree el objeto en este caso, sino que tampoco se destruya tras ejecutar el opcode MSG, ganando en rendimiento para aquellos casos más habituales (con diferencia, el cero y el uno).Unknownnoreply@blogger.com