Roger Ferrer Ibáñez

Compilers, Cooking, Trance, Photography

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-06-12

@gafanhoto as melhoras!

:woozy_hug:

Roger Ferrer Ibáñez boosted:
Sy BrandTartanLlama
2025-06-10

Building a Debugger is now officially released!

It guides you through writing a whole native x64 debugger from scratch, dispelling all the magic and teaching you a ton about operating systems as it goes.

Even if you don't care about writing a debugger, you can read it to your cat.

The book Building a Debugger, featuring a robot designing a complex debugging machine on a drafting boardThe book placed in front of a tortie cat
Roger Ferrer Ibáñez boosted:
Jordi Mallach 🇵🇸JordiMallach@mastodont.cat
2025-06-09

S'acaba la setmana eterna en La Corunya i, estant al tren, la meua amiga californiana em diu que ha esborrat uns quants xats de Signal i que no li escriga res sobre política en les pròximes 24h, perquè ha d'entrar als EUA i potser li miren el mòbil. Però no li digueu feixisme encara, eh?

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-06-09

@gafanhoto As duas Espanhas! 🟩 🟥

🤭

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-06-07

@gafanhoto Portugal está aún riéndose de esta marca española 😆

Foto de un paquete de flautas (wraps) de carne barbacoa y queso de la marca "La Broche de la Pila".
Roger Ferrer Ibáñez boosted:
2025-06-05

On my quasi-blog:

"In which I have Opinions about parsing and grammars"

chiark.greenend.org.uk/~sgtath

A collection of semi-connected rants about context-free grammars, parser generators, and the ways in which they aren’t quite as useful as I’d like them to be.

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-30
Pot de vidre de salsa per "francesinha". Al fons una llauna etiquetada com "amanida a la portuguesa"
Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-29

Turns out that the latest toolset for RH8 (with GCC 14 and clang 19) fixes this by manually expanding the soft link `lib` into `/usr/lib` in the `--gcc-install-dir` flag they pass through the clang configuration file.

This makes clang emit the expanded paths in the dependency file and ninja syntactic canonicalisation works again.

So, for me, updating the Rocky Linux 8 container I use solves my problems.

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-28

@asb I recall reading your post but I failed to realise the issue you described was the same I hit today!

Roger Ferrer Ibáñez boosted:
Alex Bradburyasb@fosstodon.org
2025-05-28

@rofirrim I've lost a bunch of time on this rabbit hole too - a good chunk of it due to "things can't really be this broken, it must be me". I discuss a bit here muxup.com/building-testing-and

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-28

Indeed, hacking ninja to use glibc's realpath does the right thing.

Looks like clang cannot really canonicalise the path[1] and ninja is reluctant to do so.

Welp.

[1] github.com/llvm/llvm-project/p

Log showing that ninja rebuilds innecessarily in this system.

A hacked ninja does the right thing.
Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-28

I investigated this a bit more because even if cmake is getting it wrong, it seems to be caused by the dependency file which is not being consumed by cmake but by ninja (or make).

It is ninja, actually.

github.com/ninja-build/ninja/i

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-28

In cmake's defence, the redhat tree layout is not making things any easier.

But still, it is 2025, maybe we should have decent "realpath" implementations in our build systems.

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-28

Why is ninja rebuilding my project every time???

Why it says that it has a dependency with a non-existing file called "/opt/rh/gcc-toolset-13/root/include/c++/13/cassert" ???

(I go down a rabbit hole)

Oh I see.

Thanks cmake⸮ 🙃

#professional #cmake

Screenshot of a terminal showing that cmake has wrongly collapsed a path. 

It happens because one of the components of the collapsed path is a soft-link adding additional components. In this case the path "/opt/rh/gcc-toolset-13/root/lib" is a soft link to "usr/lib". The path that cmake is collapsing includes the original path, so the last component "lib" is actually "usr/lib". cmake does a pure syntactical collapsing the ".." directories, without checking whether they are soft links and computes the wrong path.
Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-26

@camelcdr just to confirm I understand the redundant move, we could do the following (to preserve the "tu" semantics) instead, right?

```
bar:
vsetivli zero, 4, e8, m1, tu, ma
vmv1r.v v10, v8
vnsrl.wi v8, v10, 3
ret
```

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-25

For pasko I chose to implement sets in two ways (and the runtime picks the best representation at any given moment): a bitfield for values [0..255] (using 4 uint64_t) or a (dynamic) array of sorted integers.

This posed some challenges in how to represent this in the debugger. But I've been able to have gdb show something reasonable, using the power of DWARF expressions.

This is very cool 😃

#pasko #compilers #debugger #gdb

Roger Ferrer Ibáñez boosted:
Lentävä Kalakukkopahoittelemme@mastodontti.fi
2025-05-24

Turbo Pascal vs. Pedro Pascal.

#Pascal

Google Trends vertailu Turbo Pascal vs. Pedro Pascal. Kiinnostus Turbo Pascaliin hiipuu karkeasti 2004-2014 ja Pedro Pascaliin kasvaa 2015-2025.
Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-22

@gafanhoto As melhoras.

Roger Ferrer Ibáñezrofirrim@mastodon.world
2025-05-18

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst