danirod

Marcadores

Una explicación simplificada del algoritmo Wavelength Collapse →

Hace un tiempo encontré destacado en GitHub un repositorio con una implementación muy trabajada del algoritmo Wavelength Collapse, enseñando mediante vistosas imágenes cómo el algoritmo en el que se basa el programa compartido en el repositorio es capaz de transformar una pequeña imagen en una imagen procedural más grande, lo cual es de utilidad para fabricar mapas y otro tipo de imágenes.

Imagen generada de manera procedural
Ejemplo de uso del algoritmo generando un tablero más grande a partir de una imagen de entrada. (Fuente)

El repositorio contiene un README bastante exhaustivo donde detalla el funcionamiento del algoritmo, pero si buscas una aproximación más sencilla que te ayude a entenderlo, hace poco Robert compartió en su blog una aproximación al algoritmo utilizando ejemplos de andar por casa.

Imagine that you are planning your wedding. […] You need to design the seating plan for dinner. Your family can be very argumentative and volatile, so this will be difficult. Your dad can’t sit within 2 tables of your mum. Your cousin will get grumpy and lonely if she doesn’t sit with your other cousin. And it’s probably for the best if Uncle Roy doesn’t sit with the environmentalist wing of your partner’s family. – §

El algoritmo realmente no es complicado. Se trata de asociar a cada una de las posiciones del espacio disponible (como los píxeles de una imagen) el candidato que mejor se ajuste teniendo en cuenta una serie de restricciones. Esta entrada de blog explica fácilmente en qué consisten esas restricciones y cómo se pueden computar para una imagen, y muestra un ejemplo práctico de uso.

NandGame →

As seen this morning in Hacker News, NandGame looks like a cool game where you have to implement a circuit on each level. You start the game on level 1 without nothing but a NAND gate, and you have to build different logic gates and arithmetical circuits to pass to the next level.

Requires a mouse, don’t know how will it work on touchscreens.

Always read your PKGBUILDs →

If you don’t read the PKGBUILD file whenever you download something from the AUR repositories, you are exposing yourself to terrible security issues, as the world has recently seen.

Malware was spotted in the AUR repositories of Arch Linux last week. Someone modified the PKGBUILD of a package to add a curl call in the script file, as can be seen here (as long as they don’t purge the blob object from the repository, because they stripped out the commit from the history).

I would file this tip in the same category as “don’t just curl bash pipe stuff you find at GitHub”, but it’s getting late and I don’t have time for entering in the rabbit hole argument of where do we put the limit on trusting the software and the installers we put in our machines.

Sandra →

Esta semana me he ventilado en mis trayectos en transporte público Sandra, una ficción sonora (en inglés) que habla de cómo podría ser la IA en un mundo paralelo parecido al nuestro. Son 7 capítulos y una de las voces la pone Kristen Wiig.

Sandra →

I’ve listened this week to Sandra. It’s a fictional podcast located in a world where IA and virtual assistants are… slightly different than what we are used to. Kinda distopical at a few moments, but I’m sure after listening to the first episode you’ll want to keep listening. The entire seasion is available online so you can listen to it at once in an afternoon or in a few commutes.

The Museum of Websites →

The Museum of Websites is a glorified Wayback Machine explorer for some important and well known websites. It has screenshots so you can see how did popular pages such as Google or Yahoo looked through the years and there are links pointing to the Wayback Archive in case you want to explore them by yourself.

linux.conf.au 2018 has started →

This week is linux.conf.au 2018. Due to how time zones work and because this event is held in Australia, it actually started hours ago. I’ll keep an eye on their YouTube channel later.

gtk-rs tutorials for Rust →

This unofficial series for gtk-rs provides some tutorials for the key aspects of the GTK Rust library – the most important GTK+ binding for the Rust programming language.

This unofficial GTK Rust tutorial series will focus on documenting important GTK features, demonstrating how they are used in practice, and displaying some Rusty software techniques along the way, as we explore what GTK GUI development in Rust is like.

Via This week in Rust (slowly catching up on my feeds)

Give `git merge` some love →

This article exposes some of my concerns about the different integration strategies available in Git. Summarizing the Git theory which you may already know, the three most common integration strategies are merge, rebase and squash. I’ve used each strategy on different occasions, and while I’m not keen on a particular one, I like rebase the least.

I’m not going to try to convince anyone because everyone will have their preferences, plus part of engineering is knowing when to use the best approach and knowing that there is not a hammer for all the nails. But the purpose of a VCS should still be to make easy to track and understand changes in the codebase, and to make simple to detect and fix bugs. A pretty history graph helps and is a good think, but it should be a secondary thing that never compromises the utility of having the right amount of information at your tips to do your work the best you can. Pragmatical use of Git is cool.

Rectball 0.4.10 is now available →

I’m releasing Rectball 0.4.10. It doesn’t have much new features, but it fixes a few bugs found in Rectball 0.4.9. It also brings back Kotlin to the codebase. This is the second time I try to add Kotlin code to the Rectball codebase. I expect to succeed this time. Download the game from the Google Play Store or look at the GitHub release for detailed changes.