dfaria https://dfaria.eu/twtxt.txt 2025-06-17T09:02:26Z "Em cima da mesa está a possibilidade de os trabalhadores comprarem dias de férias". Mas o que é isto? Recomendação de leitura: «O que o Dinheiro Não Pode ComprarOs limites morais dos mercados» do Michael J. Sandel. https://www.publico.pt/2025/06/16/economia/noticia/governo-abre-porta-trabalhadores-possam-comprar-dias-ferias-2136728 baldo https://baldo.cat/twtxt.txt 2025-06-16T20:40:02+00:00 - Esta almohada me gusta. ¡Pa mi! -
 ![](https://img.andros.dev/ZTzMYqy6QlDz6vr3CXGttl8JYQY=/800x0/filters:format(jpeg)/https://baldo.cat/media/photos/IMG_4714.jpeg) #catsoftwtxt dfaria https://dfaria.eu/twtxt.txt 2025-06-16T20:00:48Z Entrevista com o Professor Álvaro José Penedos (22.09.1934 - 16.06.2025): https://ler.letras.up.pt/uploads/ficheiros/1754.pdf movq https://www.uninformativ.de/twtxt.txt 2025-06-16T18:28:37+00:00 OpenBSD has the wonderful `pledge()` and `unveil()` syscalls:

https://www.youtube.com/watch?v=bXO6nelFt-E

Not only are they super useful (the program itself can drop privileges – like, it can initialize itself, read some files, whatever, and then tell the kernel that it will never do anything like that again; if it does, e.g. by being exploited through a bug, it gets killed by the kernel), but they are also extremely easy to use.

Imagine a server program with a connected socket in file descriptor 0. Before reading any data from the client, the program can do this:

 unveil("/var/www/whatever", "r");
 unveil(NULL, NULL);
 pledge("stdio rpath", NULL);

Done. It’s now limited to reading files from that directory, communicating with the existing socket, stuff like that. But it cannot ever read any other files or `exec()` into something else.

I can’t wait for the day when we have something like this on Linux. There have been [some attempts](https://justine.lol/pledge/), but it’s [not that easy](https://blog.gnoack.org/post/pledge-on-linux/). And it’s certainly not mainstream, yet.

I need to have a closer look at Linux’s Landlock soon (“soon”), but this is considerably more complicated than `pledge()`/`unveil()`:

https://landlock.io/ movq https://www.uninformativ.de/twtxt.txt 2025-06-16T17:49:05+00:00 “Learn Something Old Every Day, Part XV: KEYB Is Half of Keyboard BIOS”

https://www.os2museum.com/wp/learn-something-old-every-day-part-xv-keyb-is-half-of-keyboard-bios/ dfaria https://dfaria.eu/twtxt.txt 2025-06-16T15:17:00Z #Pride isn’t arrogance; it’s love: https://blog.oup.com/2025/06/pride-isnt-arrogance-its-love/ marado https://tilde.pt/~marado/twtxt.txt 2025-06-16T14:01:56Z (#114693407817599405) Hm... ![Captura de ecrã a um navegador web a tentar visitar parlamento.pt e a falhar com ERR_EMPY_RESPONSE.](https://media.ciberlandia.pt/ciberlandia-media/media_attachments/files/114/693/403/357/226/829/original/bc2a0ee73058df83.jpg) dfaria https://dfaria.eu/twtxt.txt 2025-06-16T09:06:50Z #IA e Ensino Superior: Inovação, Ética e Transformação Pedagógica: https://noticias.up.pt/flup/wp-content/uploads/sites/12/2025/05/16-junho_Jornadas_cartaz-e-programa.pdf marado https://tilde.pt/~marado/twtxt.txt 2025-06-16T00:34:02Z (#114690231026817431) Spent an absurd amount of time searching for the "update fork" button on #gitlab's web interface.

Why? Because it turns out you can only see it if you are in landscape, in portrait view the button simply does not exist...

#ux #fail ![gitlab interface in landscape, an "update fork" button exists on the right side](https://media.ciberlandia.pt/ciberlandia-media/media_attachments/files/114/690/218/001/745/308/original/7c59595df7eec9cc.jpg) ![gitlab interface in portrait, no "update fork" button exists](https://media.ciberlandia.pt/ciberlandia-media/media_attachments/files/114/690/218/091/009/905/original/0952c00d28ed93c5.jpg) marado https://tilde.pt/~marado/twtxt.txt 2025-06-16T00:11:19Z (#114690141692778255) @birb@rss-parrot.net https://www.cm-lamego.pt/pages/321.rss marado https://tilde.pt/~marado/twtxt.txt 2025-06-16T00:10:11Z (#114690137201437905) @birb@rss-parrot.net https://www.cm-lamego.pt/pages/322.rss dfaria https://dfaria.eu/twtxt.txt 2025-06-15T21:21:24Z O primeiro mecanismo de minimização dos actos de agressividade é a falsa equivalência, nos dias de hoje, entre a extrema-direita e a extrema-esquerda: https://www.publico.pt/2025/06/14/opiniao/opiniao/onde-onde-vamos-2136614 marado https://tilde.pt/~marado/twtxt.txt 2025-06-15T18:31:04Z (#114688803779813914) As feiras medievais são "reconstruções históricas" do que nunca existiu - e ainda assim espalham-se pelo país como momentos de convívio e folia. Em Lamego tem a particular característica de ser promovida como contendo uma recriação histórica das #cortes de Lamego*, ainda que estas nunca tenham existido.

Mas para mim a feira #medieval de #Lamego é aquela altura do ano em que vou até à praça e bebo #hidromel. E quem diz que essa não é uma boa tradição a manter e celebrar? ;-)

* https://pt.m.wikipedia.org/wiki/Cortes_de_Lamego ![Um maralhal de gente na praça do comércio em Lamego, a ver um qualquer dos espectáculos a decorrer na Feira Medieval de Lamego 2025.](https://media.ciberlandia.pt/ciberlandia-media/media_attachments/files/114/688/775/065/898/599/original/a7cb14a82723fc9c.jpg) movq https://www.uninformativ.de/twtxt.txt 2025-06-15T08:48:11+00:00 ```
fn sub(foo: &String) {
 println!("We got this string: [{}]", foo);
}

fn main() {
 // "Hello", 0x00, 0x00, "!"
 let buf: [u8; 8] = [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x00, 0x00, 0x21];

 // Create a string from the byte array above, interpret as UTF-8, ignore decoding errors.
 let lossy_unicode = String::from_utf8_lossy(&buf).to_string();

 sub(&lossy_unicode);
}
```

Create a string from a byte array, but the result isn’t a string, it’s a cow 🐮, so you need another `to_string()` to convert your “string” into a string.

- https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy
- https://doc.rust-lang.org/std/borrow/enum.Cow.html

I still have a lot to learn.

(`into_owned()` instead of `to_string()` also works and makes more sense to me, it’s just that the compiler suggested `to_string()` first, which led to this funny example.) movq https://www.uninformativ.de/twtxt.txt 2025-06-15T08:04:49+00:00 (#ilorigq) @ Rust is *so* different and, at the same time, *so complex* – it’s not far fetched to assume that I simply don’t understand what’s going on here. The docs appear to be clear, but alas … is it a bugs in the docs? Is it a lack of experience on my part? Who knows.

By the way, looks like there was a bit of a discussion regarding that name:

https://github.com/rust-lang/rust/issues/120048 movq https://www.uninformativ.de/twtxt.txt 2025-06-15T05:41:35+00:00 So I was using this function in Rust:

https://doc.rust-lang.org/std/path/struct.Path.html#method.display

Note the little `1.0.0` in the top right corner, which means that this function has been “stable since Rust version 1.0.0”. We’re at 1.87 now, so we’re good.

Then I compiled my program on OpenBSD with Rust 1.86, i.e. just one version behind, but well ahead of 1.0.0.

The compiler said that I was using an unstable library feature.

Turns out, that function internally uses this:

https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.display

And that is only available since Rust 1.87.

How was I supposed to know this? 🤨🫩 marado https://tilde.pt/~marado/twtxt.txt 2025-06-14T19:15:54Z (#114683317720737755) Hey, Europe: Congratulations, we now have radioactive contamination in Iran. Are we going to continue selling weapons to Israel?

https://www.kurdistan24.net/en/story/845550/iran-confirms-contamination-at-natanz-nuclear-facility-following-israeli-strike marado https://tilde.pt/~marado/twtxt.txt 2025-06-14T18:33:47Z (#114683152123823751) Ou

"Avançar na disseminação da interação por via digital e remota com os serviços administrativos do Estado, mas sempre garantindo a assistência pessoal (incluindo através dos Espaços do Cidadão, apoio telefónico e Assistentes Virtuais/IA) aos que têm dificuldades técnicas, económicas ou de info-exclusão;"

Porque já se sabe que quem tem dificuldades em interagir por via digital vai conseguir sem problemas ser atendido e ver o seu problema resolvido por um assistente virtual de Inteligência artificial... *suspiro* marado https://tilde.pt/~marado/twtxt.txt 2025-06-14T18:30:03Z (#114683137429517557) Em passos concretos, o Governo propõe-se a fazer coisas como:

"Criar um modelo de número único de identificação para as pessoas e em- 
presas, assim evitando que a mesma pessoa tenha de ter número de utente, 
de cartão de cidadão, de contribuinte, de Segurança Social, de eleitor, etc;"

Só que a Constituição Portuguesa, no artigo 35º, nº5, estabelece que "É proibida a atribuição de um número nacional único aos cidadãos". Quer dizer, eles podem estar a dizer que querem mudar este número na constituição, mas também foram eles que disseram que uma revisão constitucional não é uma prioridade deste governo... em que ficamos? marado https://tilde.pt/~marado/twtxt.txt 2025-06-14T18:03:50Z (#114683034374992067) #ptpol

A #desburocratização prometida pelo novo #Governo é o que já se suspeitava, agora vertida na sua proposta de programa de governo. Esta frase resume bem o que se pretende fazer:

"Tudo isto assenta num princípio essencial: o da confiança. O Estado deve confiar 
nos cidadãos, reduzindo exigências injustificadas, adotando regras como o deferimento tácito e mecanismos de controlo eficazes e justos. A confiança é a base de uma administração mais ágil, mais humana e mais justa – e o antídoto contra a 
corrupção que se alimenta da opacidade e da lentidão."

Se acham que isto não parece muito mal, porque afinal só se fala em tirar as exigências que não são justificadas, e que apesar da ideia central é no de confiar que ninguém vai agir mal continuam a haver mecanismos de controlo eficazes... note-se que esses são "mecanismos de controlo e fiscalização a posteriori" - isto é, só depois do mal estar feito é que se vai ver se o Governante submeteu os dados que devia, se o concurso público não era para uma obra que até já estava feita, ou uma dessas muitas coisas que temos de confiar que não vão acontecer.

Em suma: vamos ter menos corrupção porque vamos ter menos e piores mecanismos para detectar a corrupção, e como é tudo mais simples e rápido e algumas coisas até passam a ser legais, pode ser que isto funcione.