@FSMaxB@mastodon.cloud avatar

FSMaxB

@FSMaxB@mastodon.cloud

This profile is from a federated server and may be incomplete. Browse more on the original instance.

danielsreichenbach, to rust
@danielsreichenbach@mastodon.world avatar

I generally like but I think every project developer should be forced to use it on a Raspberry Pi with 4GB RAM... had to build Vaultwarden (https://github.com/dani-garcia/vaultwarden) on one, and man,,, after 15 minutes compilation is no longer running because the device went OOM and now is so hot the fan is louder that a datacenter server...

Just to be clear, I think this is a Rust problem, not a project problem.

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@danielsreichenbach @mo8it what you can try is telling cargo to only use one core, that should hopefully reduce the memory usage.

But yeah, the rust toolchain is quite resource intensive. In CPU, memory and disk space.

markuswerle, to mastodon German
@markuswerle@nrw.social avatar

In eine Diskussion von der Seite einsteigen, unsachlich argumentieren, C und C++ im selben Wort zusammenfassen, einen Informatikprofessor mit mehreren Ehrentiteln beleidigen und direkt nach der Antwort die Gesprächsteilnehmer blocken.

wird immer mehr zu #X

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@markuswerle Leute persönlich zu beleidigen ist nicht die beste Art, das ist richtig.

Ob man C und C++ zusammenfassen kann oder nicht hängt aber stark davon ab welchen Aspekt man davon betrachtet.

Wenn es um insgresamt Features, die Fähigkeit Abstraktionen zu bauen, die Produktivität etc. geht, dann sind das zwei komplett verschiedene Sprachen.

Wenn es darum geht ob es bei einem mittelgroßen Projekt in der Praxis möglich ist memory safe zu arbeiten, dann sind beide equivalent.

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@markuswerle Ja, mein letzter Stand ist C++20 und den Hauptteil meiner Arbeit habe ich mit C++17 gemacht. C++23 bin ich nicht mehr drin, das ist richtig.

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@markuswerle Es gibt einfach viel zu viele Details, die man beachten muss und fallstricke, die einem im Weg liegen. Wenn man nur einen davon übersieht, dann hat man auf einmal so ein Problem drin. Besonders Übel wird es, wenn man multithreading betreibt.

Und gerade von C wurde sehr viel UB geerbt. Z.B. das Thema mit signed integer overflow.

Man kann sich dann auch kaum noch auf das zu lösende Problem konzentrieren weil man ständig damit beschäftigt ist nicht ausversehen UB zu produzieren.

drewdevault, to random
@drewdevault@fosstodon.org avatar

"If I understand correctly, what you are arguing for is a passive freedom, which is the absence of obligations; I am arguing for a positive freedom, which is the guarantee of rights."

Most succinct rebuttal I've come up with yet to those who view permissive licenses as more free than copyleft

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@drewdevault I guess one of my bigger issues with most copyleft licenses in use is how incompatible they often are with each other and themselves. Especially the GPL... or any later version thing.

Note also that the "or later" is basically a CLA to the Free Software Foundation, which could make a GPLv4 whenever they want and put whatever they want in there.

janriemer, to rust

JSON Patch

https://jsonpatch.com/

"JSON Patch is a format for describing changes to a document. It can be used to avoid sending a whole document when only a part has changed. When used in combination with the PATCH method, it allows partial updates for HTTP in a standards compliant way."

JSON Patch crate:

https://lib.rs/crates/json-patch

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@janriemer yeah, that is the good one. There is also JSON Merge Patch which is unable to represent a whole lot of diffs, which can lead to broken data if you're not aware.

mjg59, to random
@mjg59@nondeterministic.computer avatar

Yo I've got a PhD in genetics from Cambridge and on the off-chance you need it I give you permission to say that Dawkins is a hack

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@mjg59 As in "he didn't really contribute to the field" or as in "his published books are filled with misinformation"?

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@mjg59 I was just asking because I enjoyed reading "The blind watchmaker" and "The selfish gene" and am not in a position to verify what he's saying. B
ut those are from quite a while ago I guess. Not sure what he's currently up to tbh.

bamboombibbitybop, to rust
@bamboombibbitybop@mastodon.social avatar

I know Rust has an extremely strict compiler and is designed from the ground up for memory safety, but what evidence is there for it being truly bulletproof in that regard? I feel like a lot of people read the phrase "written in Rust" and see "immune to exploits," but that certainly isn't the case, right? How safe is Rust, really? Obviously it's no contest if you're comparing to like, C++ or Java or whatever else, but is it really the end-all-be-all of secure low-level programming?

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@bamboombibbitybop It is certainly not bulletproof, there is no formal proof that rust is memory safe, in fact it has been proven that it isn't in 100% of cases.

That said, getting memory safety violations without using unsafe is considered a serious bug and whereas some of them have popped up over time, they are extremely unlikely to the point where you really won't hit them unless you're actively trying. It's much more likely to have memory unsafety from an unsafe block or C bindings.

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@kornel That is very cool!

But they obviously don't apply to the implementation of the language and probably also not to all of the language itself I guess?

Still very good to know that the fundamental underlying ideas are proven to be sound.

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@kornel Just to clarify: What I meant with "proven not to be in 100% of cases" was proof by counterexample.

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@kornel Yeah, I know about Polonius and the new trait solver. Although it's hard for me to gauge where they're at in terms of progress of switching over to them.

bagder, to random
@bagder@mastodon.social avatar

"Wget can be typed in using only the left hand on a qwerty keyboard!"

Still my favorite difference between and

https://daniel.haxx.se/docs/curl-vs-wget.html

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@bagder Literally the only reason I was preferring wget in the past was not having to write the -O parameter. Nowadays I usually try curl first, but switch to wget if it isn't installed on the system I'm on (which does happen, as unbelievable as it sounds).

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@bagder That said it wasn't about not writing -O, it was about me not remembering it and being too lazy to open the manpage 😅

autism101, to actuallyautistic
@autism101@mstdn.social avatar

Let’s talk tags on clothing. I hate them and they annoy me to no end. And even if I cut them off, the tiny bit remaining always manages to touch me and I hate it. 😩

Do tags bother you?

@actuallyautistic

image: unknown

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@autism101 @actuallyautistic it really depends, some of them are fine, others are like a razor in my neck.

Some can be cleanly ripped out, but some are even worse when ripping them out because the remaining bit is even scratchier.

janriemer, to rust

Hm...I'm getting the impression that is increasingly met with a refusal by some people (it's an almost hateful attitude sometimes).

I wonder why. Of course there are a lot of layers to it, but one is definitely that Rust has gotten a lot more exposure to people and so there are just a lot more potential matches that lead to Err(()) and that's Ok(()) (sorry, pun intended).

But I wonder, if there's more to it than what meets the eye (feeling excluded/alienated/left behind?).

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@janriemer One big criticism comes from the way code is distributed being different from the classical C/C++ software while targetting the same space. So basically Linux distros etc. are suddenly forced to adapt as some packaged software migrates to Rust. That together with there being no LTS version and many packages being on latest stable, which is incompatible with the traditional LTS distribution model.

Also the (often overstated) support for platforms that LLVM doesn't support.

khalidabuhakmeh, to rust
@khalidabuhakmeh@mastodon.social avatar

is known to solve certain problems, but nothing is free, right? What are common mistakes you might see in a Rust codebase?

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@khalidabuhakmeh Using .unwrap() or .expect() in production code. If something really can't happen, use unwrap_or_else with unreachable!(..) instead. Carrying around optional fields that shouldn't be able to be optional (usually happens with code generated from API definitions, but also in places where an enum would have been better than different combinations of Option). Lot's of ifs where one exhaustive match would have been better. Using an asynchronous mutex (It's almost never what you want)

drewdevault, to random
@drewdevault@fosstodon.org avatar

Hare 0.24.0 released, and Hare's new release policy

https://harelang.org/blog/2024-02-16-hare-0.24.0-released/

FSMaxB,
@FSMaxB@mastodon.cloud avatar

@drewdevault I guess this means that hare releases don't follow semantic versioning? (except for the 1.0 once it comes out)

kate, to rust
@kate@fosstodon.org avatar

deleted_by_author

  • Loading...
  • FSMaxB,
    @FSMaxB@mastodon.cloud avatar

    @kate I disagree. Enforcing null checks before accessing a method is great and all, but it's not worth a lot if you can't encode in the type system that this check was already done elsewhere!

    Because if you can't encode it in the type system, you need to do that same check over and over again.

    Note that e.g. Swift is ok here, because the optionals are encoded in the type system, just not as a library type but built into the language directly.

    FSMaxB,
    @FSMaxB@mastodon.cloud avatar

    @kate Also I can't come up with a useful scenario for Option<Option<T>>, you usually want to collapse this into a single option, because what is the semantic meaning of Some(None) supposed to be? Although it can happen in generic contexts, but you should flatten it as soon as possible.

    If you do have an actual use case, introduce your own type instead and give the use-case a name!

    FSMaxB,
    @FSMaxB@mastodon.cloud avatar

    @clementd @kate Yes. I was just mentioning Swift, because it has optionals that are builtin instead of being a library type like in Rust.

    Both encode the nullability in the type system and both allow for non-nullable types, which is important.

    My point is that the linter described above which just checks that you can't call methods without checking first is not an acceptable equivalent of what Swift and Rust provide.

    And AFAIK, you can't nest optionals in swift, not sure though.

    FSMaxB,
    @FSMaxB@mastodon.cloud avatar

    @clementd @kate My understanding is "They would be an acceptable equivalent if it weren't for the possibility of nesting".

    And my point is that even without nesting it wouldn't be.

    BrodieOnLinux, to linux
    @BrodieOnLinux@linuxrocks.online avatar

    Power Of Linux Gaming On Android Phones?!? https://youtu.be/0cqZmApjWw4

    FSMaxB,
    @FSMaxB@mastodon.cloud avatar

    @lutris @BrodieOnLinux is that PostmarketOS?

    fasterthanlime, to random
    @fasterthanlime@hachyderm.io avatar

    I've reached levels of Container Fuckery(TM) where moments like these barely register 🙃

    (what am I doing? I'm exfiltrating secrets from my fly app because I haven't written them down anywhere, that's what I'm doing)

    FSMaxB,
    @FSMaxB@mastodon.cloud avatar

    @fasterthanlime well at least there are tools like ls in there and you didn't have to input them by redirecting echo of an escaped binary to a file. Also what to do without chmod to make it executable 🤔

    autism101, to actuallyautistic
    @autism101@mstdn.social avatar

    Autism and Sensory Issues:

    Our microwave oven is a sensory nightmare for me. I always try to stop it before it reaches zero and begins beeping. I get extremely anxious over this.

    What do you avoid?


    @actuallyautistic

    FSMaxB,
    @FSMaxB@mastodon.cloud avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • tacticalgear
  • magazineikmin
  • thenastyranch
  • Youngstown
  • mdbf
  • rosin
  • slotface
  • InstantRegret
  • khanakhh
  • Durango
  • kavyap
  • osvaldo12
  • DreamBathrooms
  • megavids
  • GTA5RPClips
  • ngwrru68w68
  • everett
  • tester
  • ethstaker
  • cisconetworking
  • cubers
  • modclub
  • provamag3
  • anitta
  • normalnudes
  • Leos
  • lostlight
  • All magazines