Thiago Adams @[email protected]

4K posts

Thiago Adams @thradams@vivaldi.net banner
Thiago Adams @thradams@vivaldi.net

Thiago Adams @[email protected]

@thradams

Software engineer interested in C/C++, compilers, IOT, Raspberry Pi, SCADA, WEB Technologies, physics, UK and Europe.

Porto Alegre, Brazil Katılım Nisan 2009
113 Takip Edilen175 Takipçiler
Thiago Adams @thradams@vivaldi.net
@Adriksh Memory safety for me is just an automatic review guided by some rules that may need extra information inside the type system. It will make code easier to maintain and safe .
English
0
0
4
271
Adriksh
Adriksh@Adriksh·
Memory safety is a skill issue, not a language feature. If you rely on a borrow checker, you're admitting you don't understand the hardware. True engineering is about raw manual control, not compiler hand-holding.
English
24
6
75
8.4K
Thiago Adams @thradams@vivaldi.net
@joseph_h_garvin The "::~destructor" in C++ is a callback /*your code here*/ the real destructor/constructor is generated by the compiler. Yes, this feature is not present in defer.
English
1
0
0
78
Joseph Garvin
Joseph Garvin@joseph_h_garvin·
You can put an RAII struct inside another struct and the inner struct cleanup will run when the outer struct is destroyed. Cleanup and defer can't do this, they're strictly worse unless you count needing to repeat at every use site a "feature" to avoid implicit control flow.
English
3
0
51
2K
Joseph Garvin
Joseph Garvin@joseph_h_garvin·
PSA: Defer and cleanup are not equivalent to RAII. The entire point of RAII is defining the cleanup operation on the *type* which then causes it to automatically happen when necessary, instead of at every use site. Furthermore...
Adriksh@Adriksh

C is hard because you have to manually free every pointer. Actually, you don't. 🤫 The cleanup attribute allows you to define a function that runs automatically when a variable goes out of scope. It's basically RAII/Destructors in C.

English
5
3
174
21.1K
Thiago Adams @thradams@vivaldi.net
@EskilSteenberg @Adriksh I agree about the downsides of defer. One advantage is that the code becomes easier to maintain, because surrounding changes are less likely to affect the cleanup code when defer is used.
English
0
0
1
260
Eskil Steenberg
Eskil Steenberg@EskilSteenberg·
@Adriksh Cleanup or Defer as its often called is the worst addition to C (probably comming in C2Y). It creates an invisible jump, its way worse than GoTo. It breaks a fundamental feature of C you can follow it by reading it.
English
8
1
33
6.8K
Adriksh
Adriksh@Adriksh·
C is hard because you have to manually free every pointer. Actually, you don't. 🤫 The cleanup attribute allows you to define a function that runs automatically when a variable goes out of scope. It's basically RAII/Destructors in C.
Adriksh tweet media
English
108
91
1.6K
232.5K
pikuma.com
pikuma.com@pikuma·
@tuitacarlos Eu queria era não ter que olhar ou ouvir ninguém na real, mas como quase sempre pago em dinheiro e a maioria das máquinas só aceita cartão, então tem que ir lá pagar com as pessoinhas né. 😬
Português
2
0
30
16.4K
the amazing carlos
the amazing carlos@tuitacarlos·
🚨 CHOCANTE: pessoas estão preferindo enfrentar filas no caixa humano do que usar o caixa de autoatendimento livre de filas. estamos vivendo na nova selva
Português
1K
365
12.7K
1.3M
MetSul.com
MetSul.com@metsul·
🔴 REITERAMOS | Frente fria trará muito alto risco de vendavais neste começo de semana. Trata-se de uma situação perigosa em que alguns vendavais podem ser violentos e destrutivos. ‼️ Leia o alerta: ▶️ metsul.com/frente-fria-tr…
MetSul.com tweet media
Português
12
60
437
32.1K
Thiago Adams @[email protected] retweetledi
Dave W Plummer
Dave W Plummer@davepl1968·
I finally figured out a non-programmer way to explain "const volatile" in C++ It's like that crazy-but-hot girl you dated at 19: Totally unpredictable and you can't change them!
Dave W Plummer tweet media
English
35
15
395
15.2K
Fermat's Library
Fermat's Library@fermatslibrary·
The integral symbol ∫ introduced in 1675 was based on the ſ (long S) character, and was chosen because Leibniz thought of it as an ∞ sum
Fermat's Library tweet media
English
32
290
1.5K
72K
Thiago Adams @[email protected] retweetledi
John Carmack
John Carmack@ID_AA_Carmack·
It is nonsense to suggest you can’t write any app, of any complexity, in C. I do find a light level of C++ beneficial for many larger projects, but it can also go tragically wrong. Sometimes, specific language features can be transformative valuable, but not nearly as often as language advocates think, and there is value in writing to an “elder language”.
English
77
188
4.2K
226.3K
Thiago Adams @[email protected] retweetledi
Dave W Plummer
Dave W Plummer@davepl1968·
Believe it or not, even Windows 95 was largely just pure C... Not C++. It had COM objects and vtables and polymorphism, but it was all manually constructed in C. It was impressive in a masochistic kind of way. When I wrote Task Manager, I used C++ but didn't link to the CRTs. That gave me the language features with none of the bloat, which is why it was 80K.
Bingoo@Xin_an

@davepl1968 C++ if we are being intellectually honest. No love my man Bjourne?

English
92
236
4.4K
480.4K
Fermat's Library
Fermat's Library@fermatslibrary·
Michael Collins, the astronaut who took this photo in 1969, is the only human, alive or dead, not captured in the frame of this picture.
Fermat's Library tweet media
English
19
60
547
39.8K
Thiago Adams @thradams@vivaldi.net
@yacineMTB I think this is also the best way to develop a chat service - thinking about the UI as if someone is pressing the buttons for you. But the buttons must be there then we ensure consistency ;like having to fix previous inputs and no dead ends.
English
0
0
0
112
kache
kache@yacineMTB·
soon LLMs will turn every UI into an API
kache tweet media
English
138
216
4K
349.2K
Thiago Adams @thradams@vivaldi.net
@CarissaVeliz The solution I see for privacy is digital certificates signed by the users allowing companies to use specified data for a specified amount of time. Companies using user information without or expired certificates would be infringing the law.
English
0
0
0
42