Ir al contenido principal

This is my blog, more about me at marianoguerra.github.io

🦋 @marianoguerra.org 🐘 @marianoguerra@hachyderm.io 🐦 @warianoguerra

nado sincronizado y riesgo pais

Mr. A: esta semana escuche / lei las palabras Inflacion y Riesgo Pais un par de veces
Yo: alla?
Mr. A: si
Yo: lololol
Mr. A: sisi
Mr. A: !!!1!!12oneEleven!!1!
Yo: (son tres personas levantando los brazos)
Mr. A: fourteeeen
Yo: esto es nado sincronizado
Yo: \o\
Yo: |o|
Yo: /o/
Yo: \o/
Yo: \o_
Yo: _o/
Yo: y asi...
Mr. A: sale gif
Mr. A: o script de bash
Yo: ahi va
Yo: http://marianoguerra.com.ar/random/nado.ogv

codigo:

import sys
import time
import random

ARM = ['\\', '_', '/', ' ']

def figure():
fig = random.choice(ARM) + "o" + random.choice(ARM)
sys.stdout.write(fig)
sys.stdout.flush()

def erase():
sys.stdout.write("\b\b\b")
sys.stdout.flush()

def dance():
while True:
figure()
time.sleep(0.5)
erase()

if __name__ == '__main__':
dance()

PD: "alla" es españa

recomendado gtk-recordmydesktop

Python en Google

Where is Python used?

  • The Google build system is written in python.  All of Google's corporate code is checked into a repository and the dependency and building of this code is managed by python.  Greg mentioned that to create code.google.com took about 100 lines of python code.  But since it has so many dependencies, the build system generated a 3 megabyte makefile for it!
  • Packaging.  Google has an internal packaging format like RPM.  These packages are created using python.
  • Binary Data Pusher.  This is the area where Alex Martelli is working, on optimizing pushing bits between thousands of servers
  • Production servers.  All monitoring, restarting and data collection functionality is done with python
  • Reporting.  Logs are analyzed and reports are generated using Python.
  • A few services including code.google.com and google groups.  Most other front ends are in C++ (google.com) and Java (gmail).  All web services are built on top of a highly optimizing http server wrapped with SWIG.
fuente

NO_TITLE

Some findings on how language can affect thinking.

* Russian speakers, who have more words for light and dark blues, are better able to visually discriminate shades of blue.

* Some indigenous tribes say north, south, east and west, rather than left and right, and as a consequence have great spatial orientation.

* The Piraha, whose language eschews number words in favor of terms like few and many, are not able to keep track of exact quantities.

* In one study, Spanish and Japanese speakers couldn't remember the agents of accidental events as adeptly as English speakers could. Why? In Spanish and Japanese, the agent of causality is dropped: "The vase broke itself," rather than "John broke the vase."

fuente

Rust, un lenguaje interesante

pocos lenguajes me llaman la atención rápido y en pocas palabras, de los que puedo enumerar que me llamaron la atención de una forma u otra son: erlang (por el manejo de inmutabilidad, concurrencia y tolerancia a fallos), limbo (por los channels), go (porque es limbo pero mas marketinero), haskell (porque es haskell, lazy evaluation, inferencia de tipos, funcional puro, currying y un largo etc.) y el mas nuevo en llamarme la atención es Rust, un lenguaje bastante alpha desarrollado por mozilla.

del manual rescato algunas cosas que me parecieron interesantes.


The initialization state of every slot is statically computed as part of the typestate
system (see below), and requires that all slots are initialized before use. There is nonull value; uninitialized slots are uninitialized, and can only be written to, not read.


si no esta inicializada te da error de compilacion, no podes leer de la variable si no la inicializaste. asi de simple :D

Lightweight tasks with no shared mutable state

Like many actor languages, Rust provides an isolation (and concurrency) model based on lightweight tasks scheduled by the language runtime. These tasks are very inexpensive and statically unable to mutate one another’s local memory. Breaking the rule of task isolation is only possible by calling external (C/C++) code.
Inter-task communication is typed, asynchronous and simplex, based on passing messages over channels to ports.


te suena de otro lenguaje? ;)

State values can refer to non-state values, but not vice-versa. Rust therefore encourages the programmer to write in a style that consists primarily of immutable types, but also permits limited, local (per-task) mutability.

Structural types may be pattern-matched in an alt statement.

Rust provides a mechanism of partially binding arguments to functions, producing new functions that accept the remaining un-bound arguments. This mechanism combines some of the features of lexical closures with some of the features of currying, in a smaller and simpler package.

Rust supports local type inference:

signatures of functions, objects and iterators always require type annotation, but within the body of a function or iterator many slots can be declared auto and Rust will infer the slot’s type from its uses.

Rust has a lightweight object system based on structural object types: there is no “class hierarchy” nor any concept of inheritance.


parecido a go...

Method overriding and object restriction are performed explicitly on object values, which are little more than order-insensitive records of methods sharing a common private value.

Rust includes support for values of a top type, any, that can hold any type of value whatsoever. An any value is a pair of a type code and a boxed value of that type.

Injection into an any and projection by type-case-selection is integrated into the language.

Rust supports a system for syntactic extensions that can be loaded into the compiler, to implement user-defined notations, macros, program-generators and the like.

Rust has a system for propagating task-failures and other spontaneous events between tasks. Some signals can be trapped and redirected to channels; other signals are fatal and result in task-failure. Tasks can designate other tasks to handle signals for them.
This permits organizing tasks into mutually-supervising or mutually-failing groups.

bastante erlangoso :P

Dentro de las influencias nombra a Joe Armstrong



veremos para donde dispara este lenguaje, espero que le vaya bien.

bash <3

necesito probar la implementación de declaracion de tipos en efene, para automatizarlo un poco decidi sacar todas las declaraciones de tipos del codigo de erlang con una linea de bash:

$ grep -R "^\-type" * | grep \.erl | cut -d ':' -f 2- > ~/all-erlang-types.txt

lo peor del mundial

si hay algo de este mundial que realmente me indigna es las actitudes que genera en cierto tipo de personas de todas partes de iberoamerica.

desde que comenzo el mundial sigo las noticias leyendo diarios de mexico, brasil, argentina y espa~na.

en la seccion de comentarios lo unico que se puede encontrar es soberbia, insultos entre nacionalidades, racismo y un nivel de violencia que da verguenza.

lo increible de esto es ver que los mexicanos, espanioles y brazileros nos tildan de soberbios y agrandados y renglon seguido tienen exactamente las mismas actitudes que los argentinos que comentan.

realmente da vergüenza, pero bueno por desgracia es lo que hay.

sobre traducciones

traducir IDE a EID y checkout (de svn) a revisar me ayuda menos de lo que piensan.

traducir un acronimo tecnológico no sirve porque los acronimos ya son bastante opacos (y encima de tres letras TLA (tree letter acronim) no LTA (la tenes adentro)), en lugar de traducirlo expandilo y traducilo, osea entorno integrado de desarrollo.

revisar no es la traducción mas feliz que conozco, ya que revisar no es lo que me trae a la mente cuando hago svn checkout, que es algo así como traer todo :P.

no soy buen traductor pero si vas a traducir algo, pensalo dos veces.

y no me hagan empezar con los que traducen los shortcuts :D