notas de postfix
This commit is contained in:
parent
fb33351d62
commit
3526ecf92b
|
@ -8,6 +8,12 @@ si lo prefieres, puedes seguir las (y más) actualizaciones via git:
|
|||
|
||||
=> https://tildegit.org/sejo/lentejanumerica repositorio git con scripts y archivos fuente
|
||||
|
||||
|
||||
## sjm-1661d1
|
||||
|
||||
página nueva:
|
||||
=> ./postfix.gmi {postfix}
|
||||
|
||||
## sjm-1660d7
|
||||
|
||||
páginas nueva:
|
||||
|
|
|
@ -5,10 +5,20 @@
|
|||
<title>🧆 ln: updates en el sitio</title>
|
||||
<author><name>sejo</name></author>
|
||||
<generator>a mano</generator>
|
||||
<updated>2021-05-26T12:00:00Z</updated>
|
||||
<updated>2021-05-27T12:00:00Z</updated>
|
||||
<link href='https://quesomango.neocities.org/actualizaciones.xml' rel='self'/>
|
||||
<link href='https://quesomango.neocities.org/actualizaciones.html' rel='alternate'/>
|
||||
|
||||
<entry>
|
||||
<id>https://quesomango.neocities.org/actualizaciones.html#sjm-1661d1</id>
|
||||
<title>sejmana-1661, día 1</title>
|
||||
<updated>2021-05-27T12:00:00Z</updated>
|
||||
<link href='https://quesomango.neocities.org/actualizaciones.html#sjm-1661d1' rel='alternate'/>
|
||||
<summary>
|
||||
página de postfix
|
||||
</summary>
|
||||
</entry>
|
||||
|
||||
<entry>
|
||||
<id>https://quesomango.neocities.org/actualizaciones.html#sjm-1660d7</id>
|
||||
<title>sejmana-1660, día 7</title>
|
||||
|
|
|
@ -8,10 +8,7 @@ recordatorios de procesos
|
|||
|
||||
## computacionales
|
||||
|
||||
### cli
|
||||
|
||||
comandos de línea (de comandos)
|
||||
|
||||
=> ./imagemagick.gmi {imagemagick}
|
||||
=> ./ffmpeg.gmi {ffmpeg}
|
||||
=> ./imagemagick.gmi {imagemagick}
|
||||
=> ./ed.gmi {ed}
|
||||
=> ./postfix.gmo {postfix}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
=> ./ffmpeg.gmi {ffmpeg}
|
||||
=> ./gemini.gmi {gemini}
|
||||
=> ./imagemagick.gmi {imagemagick}
|
||||
=> ./indice.gmi {indice}
|
||||
=> ./linkroll.gmi {linkroll}
|
||||
=> ./logiteca.gmi {logiteca}
|
||||
=> ./non_e-computers.gmi {non e-computers}
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
# notación postfix (o rpn: reverse polish notation)
|
||||
|
||||
los operadores van después de los operandos, y todo funciona con una pila (stack)
|
||||
|
||||
por ejemplo, para sumar dos números:
|
||||
|
||||
```
|
||||
3 4 +
|
||||
```
|
||||
|
||||
leyendo de izquierda a derecha:
|
||||
|
||||
* primero se hace "push" al 3
|
||||
* luego se hace "push" al 4
|
||||
* el operador + hace "pop" dos veces, suma los valores, y hace "push" al resultado
|
||||
|
||||
tres números:
|
||||
|
||||
```
|
||||
3 4 2 + +
|
||||
```
|
||||
|
||||
nota: el primer operador + realiza la suma entre 4 y 2, y el segundo operador + realiza la suma entre ese resultado y 3.
|
||||
|
||||
otra posibilidad:
|
||||
|
||||
```
|
||||
3 4 + 2 +
|
||||
```
|
||||
|
||||
# operadores de stack
|
||||
|
||||
* pop: saca (y descarta) el elemento de arriba de la pila
|
||||
* swp: intercambia los dos elementos superiores en la pila
|
||||
* dup: duplica el elemento superior en la pila
|
||||
* ovr: copia el segundo elemento de la pila, y colócalo hasta arriba
|
||||
* rot: quita el tercer elemento de la pila, y colócalo hasta arriba
|
||||
|
||||
# rutinas con firth
|
||||
|
||||
firth es una calculadora rpn con fracciones:
|
||||
|
||||
=> https://git.sr.ht/~rabbits/firth firth
|
||||
|
||||
el operador . imprime el estado de la pila
|
||||
|
||||
## tiempos
|
||||
|
||||
convierte (minutos, segundos) a una cantidad de segundos. en el ejemplo, son 8 minutos, 49 segundos:
|
||||
|
||||
```
|
||||
8 49
|
||||
swp 60 * + .
|
||||
|
||||
resultado: 529
|
||||
```
|
||||
|
||||
convierte (minutos, segundos) correspondientes a un "paso" min/km, a una velocidad km/hr:
|
||||
|
||||
```
|
||||
4 30
|
||||
swp 60 * + 3600 swp / .
|
||||
|
||||
resultado en modo dec: 13.3333 (km/hr)
|
||||
```
|
||||
|
||||
convierte una velocidad km/hr, a un "paso" min/km
|
||||
|
||||
```
|
||||
14
|
||||
3600 swp / 60 / .
|
||||
|
||||
resultado en modo dec: 4.285714 min/km
|
||||
```
|
||||
|
||||
o para obtener minutos y segundos:
|
||||
|
||||
```
|
||||
14
|
||||
3600 swp / dup 60 / swp 60 % .
|
||||
|
||||
resultado en modo mix: 4&2/7 17&1/7 ( 4'17" min/km)
|
||||
```
|
||||
¿se nota que me gusta el {running}?
|
||||
|
||||
|
||||
# herramientas
|
||||
|
||||
firth, una calculadora rpn con fracciones:
|
||||
=> https://git.sr.ht/~rabbits/firth firth
|
||||
|
||||
uxn, una máquina virtual basada en pilas
|
||||
=> https://wiki.xxiivv.com/site/uxn.html uxn
|
||||
|
||||
|
||||
|
||||
## llega(n) aquí:
|
||||
=> ./apuntes.gmi {apuntes}
|
|
@ -65,3 +65,4 @@ volando con los pies
|
|||
|
||||
## llega(n) aquí
|
||||
=> ./acerca.gmi {acerca}
|
||||
=> ./postfix.gmi {postfix}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
# nick = sejo
|
||||
# url = https://quesomango.neocities.org/tw.txt
|
||||
#
|
||||
2021-05-27T16:00:00-05:00 added postfix notation notes, including some routines for pace to speed conversions
|
||||
2021-05-26T20:00:00-05:00 moving the gemini capsule to the soviet
|
||||
2021-05-26T18:00:00-05:00 i find it fun to describe a turing machine for people to perform
|
||||
2021-05-25T20:00:00-05:00 starting to use git for (almost) everything (?). still figuring out what (and how) to mirror online
|
||||
|
|
Loading…
Reference in New Issue