Readit News logoReadit News
goku12 commented on Rubio stages font coup: Times New Roman ousts Calibri   reuters.com/world/us/rubi... · Posted by u/italophil
seydor · 3 days ago
A Glorious Font for the Times New Roman Caesar
goku12 · 3 days ago
So if this one is a dictator, does that mean the next one is an emperor?
goku12 commented on Rubio stages font coup: Times New Roman ousts Calibri   reuters.com/world/us/rubi... · Posted by u/italophil
1970-01-01 · 3 days ago
Forgive my ignorance but this seems to be one of the most neutral things Hitler did. He just didn't like the font so he ordered it to be changed. Equivalent to your boss ordering tabs be used instead of spaces. After the war was lost the arguments just continued. https://en.wikipedia.org/wiki/Antiqua%E2%80%93Fraktur_disput...
goku12 · 3 days ago
> He just didn't like the font so he ordered it to be changed.

There is your answer. He imposed his will - that's what dictators do. You have to be careful when the reason for any costly change is one individual's personal preferences. It's a bad omen.

> Equivalent to your boss ordering tabs be used instead of spaces.

That's not always equivalent, especially if it is to set a standard. Obviously, some people using spaces and the others using tabs is not ideal in situations you're referring to. It's also fine to change the standard, if they find a significant problem with the current convention. But if your boss wants it changed, and their only explanation is their dislike of the status-quo, then that's a red flag. The problem isn't very serious right now, but could grow into one in the future and you have to be on the watch.

goku12 commented on Rubio stages font coup: Times New Roman ousts Calibri   reuters.com/world/us/rubi... · Posted by u/italophil
thih9 · 3 days ago
> To restore decorum and professionalism to the Department’s written work products…

Who defines decorum and professionalism? Because I’d say this change is anything but.

Then again, this is very partisan and so subjective. Still, I’m not a fan of a government pushing certain esthetics with such a BS justification.

goku12 · 3 days ago
Not exactly related, but this is also the government that keeps insisting that the tariffs are paid by the foreign exporters (now that's a BS justification by any government that warrants widespread panic). It's all about narratives. I wouldn't bother much with fact checking them.
goku12 commented on Rubio stages font coup: Times New Roman ousts Calibri   reuters.com/world/us/rubi... · Posted by u/italophil
klez · 3 days ago
The point being that if the change to Calibri has been done to improve accessibility (hence: inclusion) that makes it woke.

Which is stupid, of course, especially considering that sans-serif fonts improve readability on screens for most people, not for a minority.

EDIT: extraneous "don't" in the middle of a sentence

goku12 · 3 days ago
So what next? Wheelchair ramps? Seats for the elderly and the pregnant? Accessibility features don't displace or even inconvenience the majority in any manner. They only make facilities accessible to an additional crowd, who should be getting them as a matter of right in the first place. What's the end game here?
goku12 commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
Surac · 4 days ago
So you try to say c is for good programmers only and rust let also the idiots Programm? I think that’s the wrong way to argue for rust. Rust catches one kind of common problem but but does not magically make logic errors away.
goku12 · 3 days ago
No
goku12 commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
torginus · 4 days ago
I'm curious why your perspective on Rust as a HW engineer. Hardware does a ton of things - DMA, interrupts, etc. that are not really compatible with Rust's memory model - after all Rust's immutable borrows should guarantee the values you are reading are not aliased by writers and should be staying constant as long as the borrow exists.

This is obviously not true when the CPU can either yank away the execution to a different part of the program, or some foreign entity can overwrite your memory.

Additionally, in low-level embedded systems, the existence of malloc is not a given, yet Rust seems to assume you can dynamically allocate memory with a stateless allocator.

goku12 · 3 days ago
Here is my take on your question.

> I'm curious why your perspective on Rust as a HW engineer.

C, C++ and Rust requires you to know at least the basics of the C memory model. Register variables, heap, stack, stack frame, frame invalidation, allocators and allocation, heap pointer invalidation, etc. There are obviously more complicated stuff (which I think you already know, seeing that you're an embedded developer), but this much is necessary to avoid common memory errors like memory leaks (not a safety error), use-after-free, double-free, data-race, etc. This is needed for even non-system programs and applications, due to lack of runtime memory management (GC or RC). You can get by, by following certain rules of thumb in C and C++. But to be able to write flawless code, you have to know those hardware concepts. This is where knowledge of process and memory architecture comes in handy. You start with the fundamental rule before programming, instead of the other way around that people normally take. Even in Rust, the complicated borrow checker rules start to make sense once you realize how they help you overcome the mistakes you can make with the hardware.

> Hardware does a ton of things - DMA, interrupts, etc. that are not really compatible with Rust's memory model - after all Rust's immutable borrows should guarantee the values you are reading are not aliased by writers and should be staying constant as long as the borrow exists.

> This is obviously not true when the CPU can either yank away the execution to a different part of the program, or some foreign entity can overwrite your memory.

I do have an answer, but I don't think it can be explained in a better way than how @QuiEgo did it: You can 'sandbox' those unsafe parts within Rust unsafe blocks. As I have explained elsewhere, these sandboxed parts are surprisingly small even in kernel or embedded code (please see the Rust standard library for examples). As long as you enforce the basic correctness conditions (the invariants) inside the unsafe blocks, the rest of the code is guaranteed to be safe. And even if you do make a mistake there (i.e memory safety), they are easier to find because there's very little code there to check. Rust does bring something new to the table for the hardware.

NOTE: I believe that those parts in the kernel are still in C. Rust is just a thin wrapper over it for writing drivers. That's a reasonable way forward.

> Additionally, in low-level embedded systems, the existence of malloc is not a given, yet Rust seems to assume you can dynamically allocate memory with a stateless allocator.

That isn't true. @QuiEgo already mentioned no_std. It's meant for this purpose. Here is the reference: https://docs.rust-embedded.org/book/intro/no-std.html#bare-m...

goku12 commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
QuiEgo · 4 days ago
Not trying to make a value judgement on Rust either, just brainstorming why Rust changeover might go slow per the question.

FWIW I work in firmware with the heap turned off. I’ve worked on projects in both C and Rust, and agree Rust still adds useful checks (at the cost of compile times and binary sizes). It seems worth the trade off for most projects.

goku12 · 3 days ago
Okay. That sounds like a reasonable explanation. Thanks!
goku12 commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
QuiEgo · 4 days ago
Apple handled this problem by adding memory safety to C (Firebloom). It seems unlikely they would throw away that investment and move to Rust. I’m sure lots of other companies don’t want to throw away their existing code, and when they write new code there will always be a desire to draw on prior art.
goku12 · 4 days ago
That's a rather pessimistic take compared to what's actually happening. What you say should apply to the big players like Amazon, Google, Microsoft, etc the most, because they arguably have massive C codebases. Yet, they're also some of the most enthusiastic adopters and promoters of Rust. A lot of other adopters also have legacy C codebases.

I'm not trying to hype up Rust or disparage C. I learned C first and then Rust, even before Rust 1.0 was released. And I have an idea why Rust finds acceptance, which is also what some of these companies have officially mentioned.

C is a nice little language that's easy to learn and understand. But the price you pay for it is in large applications where you have to handle resources like heap allocations. C doesn't offer any help there when you make such mistakes, though some linters might catch them. The reason for this, I think, is that C was developed in an era when they didn't have so much computing power to do such complicated analysis in the compiler.

People have been writing C for ages, but let me tell you - writing correct C is a whole different skill that's hard and takes ages to learn. If you think I'm saying this because I'm a bad programmer, then you would be wrong. I'm not a programmer at all (by qualification), but rather a hardware engineer who is more comfortable with assembly, registers, Bus, DRAM, DMA, etc. I still used to get widespread memory errors, because all it takes is a lapse in attention while coding. That strain is what Rust alleviates.

goku12 commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
Aurornis · 4 days ago
> No memory allocation means no Rust benefits.

Memory safety applies to all memory. Not just heap allocated memory.

This is a strange claim because it's so obviously false. Was this comment supposed to be satire and I just missed it?

Anyway, Rust has benefits beyond memory safety.

> Rust is also too complex for smaller systems to write compilers.

Rust uses LLVM as the compiler backend.

There are already a lot of embedded targets for Rust and a growing number of libraries. Some vendors have started adopting it with first-class support. Again, it's weird to make this claim.

> Nearly all of the relevant code is unsafe. There aren't many real benefits.

Unsafe sections do not make the entire usage of Rust unsafe. That's a common misconception from people who don't know much about Rust, but it's not like the unsafe keyword instantly obliterates any Rust advantages, or even all of its safety guarantees.

It's also strange to see this claim under an article about the kernel developers choosing to move forward with Rust.

> High Frequency Traders - They would care about the standard library except they are moving on from C++ to VHDL for their time-sensitive stuff. I would bet they move to a garbage-collected language for everything else, either Java or Go.

C++ and VHDL aren't interchangeable. They serve different purposes for different layers of the system. They aren't moving everything to FPGAs.

Betting on a garbage collected language is strange. Tail latencies matter a lot.

This entire comment is so weird and misinformed that I had to re-read it to make sure it wasn't satire or something.

goku12 · 4 days ago
> Memory safety applies to all memory. Not just heap allocated memory.

> Anyway, Rust has benefits beyond memory safety.

I want to elaborate on this a little bit. Rust uses some basic patterns to ensure memory safety. They are 1. RAII, 2. the move semantics, and 3. the borrow validation semantics.

This combination however, is useful for compile-time-verified management of any 'resource', not just heap memory. Think of 'resources' as something unique and useful, that you acquire when you need it and release/free it when you're done.

For regular applications, it can be heap memory allocations, file handles, sockets, resource locks, remote session objects, TCP connections, etc. For OS and embedded systems, that could be a device buffer, bus ownership, config objects, etc.

> > Nearly all of the relevant code is unsafe. There aren't many real benefits.

Yes. This part is a bit weird. The fundamental idea of 'unsafe' is to limit the scope of unsafe operations to as few lines as possible (The same concept can be expressed in different ways. So don't get offended if it doesn't match what you've heard earlier exactly.) Parts that go inside these unsafe blocks are surprisingly small in practice. An entire kernel isn't all unsafe by any measure.

goku12 commented on Rust in the kernel is no longer experimental   lwn.net/Articles/1049831/... · Posted by u/rascul
Archelaos · 4 days ago
I prefer improved titles. However, not in this case. It is rather irony, because LWN does not need click-bait.
goku12 · 4 days ago
This one is apparently a genuine mistake from the author. But I think we should leave it as it is. The confusion and the argument about it is interesting in itself.

u/goku12

KarmaCake day2609December 24, 2022
About
[This is my OpenPGP fingerprint: openpgp4fpr:3fa8c6143d305dced55338bea535bdc7d632fb0e]
View Original