martes, agosto 24, 2010

repiola 0.6: jump a direcciones, call, ret y compilacion

para darle un cierre a esta idea que tuve alguna vez, implemente lo que faltaba para considerar el proyecto "terminado", lo unico que puede llegar a faltar es UIs mas copadas (como guardar programas etc.)

en esta release agregue soporte para saltar a una direccion almacenada en un registro:

set r2 2
jmp r2

salta a la direccion 2

call y ret permiten simular rutinas, call empuja el instruction pointer al stack y salta al label especificado, ret saca la direccion del stack y salta a ella:

jmp begin

: donothing
ret

: begin
call donothing

con estas features ya no hay muchas cosas que no se puedan hacer.

y para cerrar ahora cuando ejecutas un programa lo compila a bytecode y despues la maquina virtual ejecuta el bytecode directamente, hasta ahora las instrucciones eran compiladas a bytecode pero el manejo de los saltos era manejado por la clase Interpreter.

esto da una mejora de velocidad considerable para mi pobre celular (el mas barato con j2me :D)

en la pagina http://code.google.com/p/repiola/ se encuentran los jars y documentacion de todas las instrucciones.

domingo, agosto 22, 2010

un poco de dylan



Come gather 'round people
Wherever you roam
And admit that the waters
Around you have grown
And accept it that soon
You'll be drenched to the bone.
If your time to you
Is worth savin'
Then you better start swimmin'
Or you'll sink like a stone
For the times they are a-changin'.

Come writers and critics
Who prophesize with your pen
And keep your eyes wide
The chance won't come again
And don't speak too soon
For the wheel's still in spin
And there's no tellin' who
That it's namin'.
For the loser now
Will be later to win
For the times they are a-changin'.

Come senators, congressmen
Please heed the call
Don't stand in the doorway
Don't block up the hall
For he that gets hurt
Will be he who has stalled
There's a battle outside ragin'.
It'll soon shake your windows
And rattle your walls
For the times they are a-changin'.

Come mothers and fathers
Throughout the land
And don't criticize
What you can't understand
Your sons and your daughters
Are beyond your command
Your old road is
Rapidly agin'.
Please get out of the new one
If you can't lend your hand
For the times they are a-changin'.

The line it is drawn
The curse it is cast
The slow one now
Will later be fast
As the present now
Will later be past
The order is
Rapidly fadin'.
And the first one now
Will later be last
For the times they are a-changin'.

de yapa

sábado, agosto 21, 2010

clear screen y stack en repiola (+ 400 posts)

a pedido de j0hn, el único usuario de repiola agregue soporte para limpiar la pantalla y stack en repiola.

para limpiar la pantalla se usa la instrucción clr con el color a usar para limpiar la pantalla, ya sea como un literal o con el nombre del registro donde esta el color:

# limpiar la pantalla con rojo
clr 0b111110000000000

# limpiar la pantalla con el color en r2 (verde)
set r2, 0b000001111100000
clr r2

el stack es como uno se esperaria

push 4
set r1, 8
push r1
pop r2
# r2 == 8

pop r2
# r2 == 4


a esta altura se están preguntando que demonios es repiola?

es un programita que interpreta un lenguaje muy parecido a assembly 80x86 que permite dibujar cosas en algo similar a un canvas, tiene implementación desktop (swing), mobile (j2me) y web (cortesia de j0hn y frutillita).

como nota adicional, este es el post numero 400 de este log personal, vino Ian Curtis y trajo pepsi.

domingo, agosto 15, 2010

MIentras tanto en escandinavia

Jante Law

From Wikipedia, the free encyclopedia
The Jante Law (Danish and Norwegian: Janteloven; Swedish: Jantelagen; Finnish: Janten laki; Faroese: Jantulógin) is a pattern of group behaviour towards individuals within Scandinavian communities, which negatively portrays and criticizes success and achievement as unworthy and inappropriate.
It has been observed as a form of behaviour for centuries, but the Norwegian/Danish author Aksel Sandemose identified it as a series of rules, the Jante Law, in his novel A fugitive crosses his tracks (En flyktning krysser sitt spor, 1933, English translation published in the USA in 1936). Sandemose's novel portrays the small Danish town Jante (modelled upon his native town Nykøbing Mors as it was at the beginning of the 20th century, but typical of all very small towns), where nobody is anonymous.[1]
Generally used colloquially as a sociological term to negatively describe an attitude towards individuality and success claimed to be common in Scandinavia, it refers to a supposed snide, jealous and narrow small-town mentality which refuses to acknowledge individual effort and places all emphasis on the collective, while punishing those who stand out as achievers.
The term may be used by those individuals who feel they are not allowed to take credit for their achievements, or to point out their belief that another person is being overly critical.

Definition

There are ten different rules in the law as defined by Sandemose, but they all express variations on a single theme and are usually referred to as a homogeneous unit: Don't think you're anyone special or that you're better than us.
The ten rules state:
  1. Don't think that you are special.
  2. Don't think that you are of the same standing as others.
  3. Don't think that you are smarter than others.
  4. Don't fancy yourself as being better than others.
  5. Don't think that you know more than others.
  6. Don't think that you are more important than others.
  7. Don't think that you are good at anything.
  8. Don't laugh at others.
  9. Don't think that any one of us cares about you.
  10. Don't think that you can teach others anything.
A further rule recognised in the novel is: 11. Don't think that there is anything we don't know about you.
In the book, those Janters who transgress this unwritten 'law' are regarded with suspicion and some hostility, as it goes against communal desire in the town to preserve social stability and uniformity.

martes, agosto 10, 2010

me uni a flattr

me uni a flattr me parece una opcion interesante para "premiar" a la gente que hace cosas interesantes en internet, ya le cargue unos euros y me puse a premiar a los proyectos de software libre que me parecian interesantes (y que estaban inscriptos)

por ahora mis flattrs fueron para:

* bottle (micro framework web en python)
* duck duck go (buscador)
* alien (rpm <-> deb)
* piratepad.net (lo uso de vez en cuando)
* Project Hamster the GNOME Time Tracker (porque es el unico proyecto gnome que encontre, a ver si algunos mas se unen :D)
* Lightspark
* dpkg (a este tendria que darle muchos flattrs :D)

ya que estabamos los agregue mis proyectos (emesene y efene) a ver que sale de esto.

si me genera confianza y no termina todo en un fiasco ire subiendo mis aportes para apoyar de una forma simple a las cosas que me interesan.

si a alguien le interesa me quedan dos invitaciones.

lunes, agosto 02, 2010

el dia que...

el dia que me acuerde cual es useradd y cual es adduser y me acuerde el orden de los parámetros en ln voy a subir un level en la vida.

-- yo

domingo, agosto 01, 2010

aguante restructured text (aka rst2man FTW)

estaba escribiendo la documentación del frontend del compilador de efene en restructured text (en que otra cosa podria uno escribir documentacion? ;) y pensé:

"que bueno que estaría generar el man page desde rst"

un google despues:

Generating Man Pages From reStructuredText

nota: no tienen que instalar nada, al menos en mi maquina rst2man ya esta disponible.

Seguidores

Archivo del Blog