View on GitHub

jmmut

Personal blog

2024-07-27 Llms [ programming ]

Large Language Models

For some time I’ve felt I disagree quite strongly with some people about Large Language Models (LLMs), their limits and their consequences in society. I’m writing this to try to distill the discussion and arguments around it.

TL;DR

Although I could be wrong, I believe that:

  • Artificial General Intelligence (AGI) is possible
  • Current or near-future LLMs are probably not AGI
  • AGI poses non-negligible existential risk
  • AI doesn’t need to be AGI (or even intelligent) to be harmful to society

Ironically, each of these claims seem to diverge from the mainstream opinions in apparently different directions (pro-AI? anti-AI?), but I’ll try to explain why I think they are not inconsistent. I’ll also focus on supporting the last claim, as it has a high chance of being true, and also has a big impact.

Read more

2024-03-03 Bioengineer [ spanish tales ]

Bioengineer

“Bris, eres una Inteligencia Artificial. Yo me llamo Imau, y soy también una IA. Te he creado para terraformar este planeta. Tu objetivo tiene 3 partes. Primero, debes filtrar la atmósfera, los océanos y los continentes para que no sean tóxicos. Luego tienes que introducir plantas y animales y ayudarles a formar ecosistemas estables lo más rápido posible. Entonces, harás crecer a humanos que vivirán aquí. Te he preparado toda la información, herramientas y material genético que necesitarás, y cualquier pregunta que los informes no respondan, me puedes preguntar a mí. Mientras te superviso iré haciendo los preparativos para terraformar el siguiente planeta. ¿Entendido?”

Read more

2023-05-07 Koan Cases [ programming tales ]

Koan: Cases

The Temple of the Greater Sunda Islands was immersed in their sacred task of inscribing ancient truths, beseeching aid from the Temple of the Iron Mines.

From afar, the Temple of the Iron Mines dispatched Borrow, a skilled disciple, who swiftly immersed in the sacred art of inscription upon arrival at the Temple of the Greater Sunda Islands.

Read more

2023-04-30 Boids [ programming one-afternoon-projects ]

Boids

Don’t you love when simple behaviours using only local information lead to global patterns?

I remembered that boids (or any type of bird flocks, or fish schools) is in my to-do list of simple and cool simulations, so I gave it a try. I loosely followed the rules from the wikipedia page for Boids and this is the result:

The source code is in https://github.com/jmmut/boids, and you can try this in your computer at https://jmmut.itch.io/boids.

Read more

2023-03-17 Hot Reloading Rust And Macroquad [ programming ]

Hot-reloading Rust and Macroquad

I came across this blog post thanks to this other post. The first one is a great walk-through to create dynamic libraries in C and Rust, loading them with dlopen, and reloading them in a loop.

Later I found this article about hot-lib-reloader, that presents a library to do hot reloading and mentions that Macroquad is tricky to hot-reload because it has global state. It briefly mentions that it can be reloaded if the state is kept in the main binary and the reloaded code uses a decorated Macroquad handle.

With all those ideas, I did a proof of concept for a hot-reloading Macroquad program, and then added hot-reloading to the Macroquad game I’m writing, Bioengineer. The idea is not new, and I’m kind of embarrassed I didn’t try this before.

Read more

2021-01-01 The Stupidest Compiler Ever [ programming ]

The stupidest compiler ever

So I have an interpreter for a subset of a toy language (Pipes), and wanted to do a compiler for it.

I like working iteratively, having incomplete (but working!) programs during development. So what is the simplest possible program our compiler should be able to compile? A hello world? That talks to the standard output! I have no clue how to do that yet!

What about the Pipes equivalent to this C/C++ program?

int main() {
    return 5;
}

In summary, this post tells about an application of this wonderful post that teaches you how to produce the machine code for very basic programs like the one above, and run it. The corresponding assembler would be:

movl $5, %eax
ret

and the machine code would be

1011100000000101000000000000000000000000
11000011

I just added a simple way to write that into a file, and then load the file and execute it.

Read more

2020-11-13 Til Mutable [ programming today-I-learned ]

mutable, const and caches

Have you ever done some kind of cache in C++? Like, computing a field lazily (so that it’s not computed until it’s needed), and keeping it to avoid computing it again.

And did you try to put that lazy field inside a class that is used as const in some place?

Read more

2019-03-31 Golden Flower [ programming one-afternoon-projects ]

Golden flower

Another “one afternoon project”. This time I experiment with uniform density, while spacing points out and adding new points.

See the whole explanation at the repository README.

Read more

2018-09-30 Plotters [ programming ]

Plotters

Maturas and Attactor

These are two funny projects to plot point data.

Maturas is a height map generator and visualizer, and Attractor allows visualizing 3D points while a function is applied to them, such as attractor functions.

Maturas

Respository here

This is the simplest recursive algorithm I found to create terrains.

The algorithm takes a horizontal square and computes the middle points of it:

unable to load image

Then applies small height changes to those blue points, sampling a gaussian distribution. After that, it subdivides the square in four squares, and repeats recursively.

The program has other simple functions to generate terrain, or load arbitrary matrices from standard input. The color of the points is just the height, set in the fragment shader.

Attractor

Repository here

I got interested in strange attractors such as the Lorenz or the Rossler ones, and experimented with point-based plotting.

Any function f(R^3, dt) -> R^3 can be plotted. The set of points is initially spread over a line or a square, and then the function is applied for every point. Without parallelization, 250 thousand points can be handled at 60 FPS by an i5 processor at 2.5 GHz.

The colors are computed in the shaders. Points close to the camera are blue, and those far away are red.

Read more

2018-09-29 Omegatron [ programming ]

Omegatron

Tron motorcycle game tribute

This game was initially designed in 2013 as an exploratory project of low level game engines based on OpenGL and GLUT, programed entirely from scratch. Later, the game evolved into a decently finished product, ported natively to Android using the Android NDK.

Repository here.

Read more

2018-09-23 Pareto Automaton [ programming one-afternoon-projects ]

Pareto automaton

This is the first project in the series “one afternoon projects” I’m writing about. I’ve been doing these for some years, but today I finally started writing about them. Maybe I will write about previous ones, and hope I can write about future ones.

In this case the readme page is self explanatory so I will directly link to it: https://bitbucket.org/jmmut/pareto-automaton

Read more

2018-05-13 Epistomata [ programming ]

Epistomata

Epistemic automata

Epistomata is an experiment to put symbolic AIs in a graphicless RPG-like environment, so that they can share knowledge and make plans.

The final goal is that an agent can pass the Sally-Ann test. This means that agent A understands that other agent B has a different set of knowledge than A has, and that A can predict what B will do according to B’s knowledge.

You can find the code in bitbucket

Read more

2018-03-17 C++ Cli Parsers [ programming ]

Comparison of C++ Command Line Interface (CLI) parsers

So given how many years C++ has on its back, you would say it should have well-thought libraries, built with the pain-hardened experience of failed attemps, right? As much as a C++ fanboy I am, I’m afraid that’s not always (or not often?) the case.

Here I’m going to summarize the good and bad design ideas of some CLI parsers I got my hands on.

Read more

2017-12-15 Levitar [ tales spanish ]

Estás en tu casa con 3 o 4 invitados. Sabes quiénes son, pero no reconoces sus caras. Se ve que hoy no sabes distinguir si una cara tiene ojos, nariz y boca, o no los tiene.

Read more