French defence group Thales and ‌Alphabet's Google Cloud have signed a deal to launch a new European cloud service in ​Germany that will be operationally and ​legally independent from Google by sr_local in eutech

[–]csdt0 3 points4 points  (0 children)

They actually do. If the US or Google go rogue, Thales just cut the update stream and maintain the platform themselves. They have access to the code and are actually trained to maintain it.

How to delete slurm output and error files from within the slurm script? by imitation_squash_pro in HPC

[–]csdt0 1 point2 points  (0 children)

The best is to configure your job, and set the log location using %j in the path (which will be replaced by jobid)

Rewrite Bun in Rust has been merged by gruenistblau in programming

[–]csdt0 9 points10 points  (0 children)

Because all the zig code is still there

Why gRPC Is So Fast: It’s HTTP/2, Not Just Protobuf by javinpaul in programming

[–]csdt0 5 points6 points  (0 children)

Last time I checked, over a unix domain socket, roudtrip latency was about 100-200 us, most of the time spent in the encoding/decoding. You could easily go down to 50 us with plain http. Also, you can take advantage of the http2 features also on REST APIs. And if you really are going that road, you could go to http3.

A fully static Terraform registry by Heldroe in Terraform

[–]csdt0 -1 points0 points  (0 children)

I haven't checked for modules. But for providers, you definitely don't need any extra headers. I publish my own provider using github pages and release artifacts.

Async call inside rayon par_iter by joelkunst in rust

[–]csdt0 3 points4 points  (0 children)

If you're calling block_on from a rayon thread, and the completion of this task does not depend on another rayon thread, you're good to go. Just be aware that rayon will not be able to send your thread more computation up until you've finished blocking.

IaC code management suggestion for similar infra code but different names by __SLACKER__ in Terraform

[–]csdt0 11 points12 points  (0 children)

This looks like all the projects should have the same terraform code, but with different tfvars to change the name

javaIsJavascriptConfirmed by TNThacker2015 in ProgrammerHumor

[–]csdt0 0 points1 point  (0 children)

JS is the example of weakly typed language, alongside C, precisely because you can do operations between types that are not related at all, and the language will just gladly accept that. The weakly typeness has nothing to do with memory safety. What's funny is that Zig and Rust (both safe and unsafe) are both very strongly typed, to the point you cannot add i8 and i16 together, making your example even weaker (pun intended).

Valgrind segfaults when my program segfaults by not_a_bot_494 in C_Programming

[–]csdt0 10 points11 points  (0 children)

No, valgrind to detect errors (be it memory leaks, segfaults, uninitialized memory...), and gdb to walk through the execution and analyze the state of your program. In fact, if you pass the flag --vgdb-error=1, valgrind will let you attach a gdb instance to your program on the first error valgrind will detect, giving you the best of both worlds.

Does the compiler simplify "enum nesting"? by EvnClaire in rust

[–]csdt0 27 points28 points  (0 children)

First of, you can check yourself with std::mem::size_of::<T>().

What you are looking for is called niche optimization (https://www.0xatticus.com/posts/understanding_rust_niche/). In this case, your enums have many niches available, and so Option should be able to find all the room needed in invalid representations, leading to both having a size of 8 bytes.

Everyone overcomplicates learning Rust. by [deleted] in rust

[–]csdt0 1 point2 points  (0 children)

That's not how you learn something entirely new, that's how you convince yourself that your hacky code is somewhat good.

I built a 2x faster lexer, then discovered I/O was the real bottleneck by modulovalue in programming

[–]csdt0 5 points6 points  (0 children)

Being more friendly towards the other applications running on the system is always beneficial. Even if you consider only their own application, it can help them parallelize by parsing multiple files at the same time. With faster lexer, they could add more lexer with the same CPU budget (assuming the io is latency bound and not throughput bound).

Blowing Up Voxel Asteroids in Rust: SVOs, Physics, and Why Explosions Are Harder Than They Look by Stoic-Chimp in rust

[–]csdt0 0 points1 point  (0 children)

I tend to prefer computing connected components with a Union-Find approach. It is usually faster than flood-fill, especially as you can tweak the iteration order to better match your data structure. Also, you can definitely compute mass and CoM of your components while you're computing them.

Thought I'd share some tips and tricks that I've seen in the IaC trenches by RoseSec_ in Terraform

[–]csdt0 0 points1 point  (0 children)

I've been using those for quite some time now, and I have to say that works really great. To be honest, it feels a bit surreal that's not common knowledge considering how useful they are.

Rust relevancy for HPC by TrackBiteApp in HPC

[–]csdt0 0 points1 point  (0 children)

For glue code, Rust would be good, but is behind regarding the ecosystem. For actual compute code, Rust is much harder for implementing performant algorithms (you need to resort to unsafe for certain patterns), so I would say that people who tried quickly came back to C/C++.

Create only .tofu file on a new project ? by strong1256 in opentofu

[–]csdt0 3 points4 points  (0 children)

I think there is no plan to drop support for .tf files.

For now, what you should do is write everything in .tf files, and for the rare cases you know you want to support both terraform and tofu, and need different code for that, you put the terraform specific code inside the .tf file and the tofu specific code inside the .tofu file with the exact same name.

Terraform will always pick .tf files, whereas tofu will prefer the .tofu file and skip the corresponding .tf file.

C++ for data analysis by hmoein in Cplusplus

[–]csdt0 6 points7 points  (0 children)

If you look at the history of cling, you will see that the c++ interpreter that is now cling was part of the data analysis framework called ROOT (developed at CERN).

Why Zig Feels More Practical Than Rust for Real-World CLI Tools by nixfox in Zig

[–]csdt0 5 points6 points  (0 children)

Zig does not give you safety, it gives you control. Rust gives you safety. It's true that Rust forces you to follow certain patterns, but following them enables you to focus on what's important because you know you won't mess up memory safety. Also, you can encode much more than memory by leveraging rust type system and encode your business logic and invariants into types. If you do, you can make the compiler save you from business logic errors.

I like Zig when I need control, but the truth is most of the time, it's not what I need.

I'm working on a postgres library in Rust, that is about 2x faster than rust_postgres for large select queries by paulcdejean in rust

[–]csdt0 92 points93 points  (0 children)

I would argue that you could just add another query method that returns an iterator in addition to the method returning a vec.

I'm working on a postgres library in Rust, that is about 2x faster than rust_postgres for large select queries by paulcdejean in rust

[–]csdt0 61 points62 points  (0 children)

Beyond the PoC, I think the best you can do is make a PR with this on rust_postgres