• 0 Posts
  • 1.56K Comments
Joined 3 years ago
cake
Cake day: June 21st, 2023

help-circle



  • to be specific, when you refer to “that all” happening, you mean Biden signing the bill that banned TikTok in April 2024, I think?

    Yes. Biden happened to be president, but any president would have signed that into law because of the support, and even if it hadn’t become law, we’d still be in this position. Trump wants to control the media. He’ll do it however he needs to.

    your timeline is jumping around a bit here, because now you’re referring to “that period” and linking to a source from January 2025, the time of Trump’s inauguration.

    The period in question went on for quite a while (a yearish if I remember correctly). Anyway, your comment doesn’t actually say anything to contradict my point of ByteDance spreading their cheeks for Trump.

    this ban only passed because Democrats were bamboozled into supporting a proposal that has its roots in Republican “omg China scary” bullshit. I don’t know how to explain it any more clearly.

    You don’t need to. The ban is irrelevant. Without the ban, we’d be in the same place, with Trump attacking all forms of media to gain control.

    ahh yes, “criticizing Democrats is the same thing as supporting Republicans”, the free square on the bingo board.

    You’re not criticizing lawmakers here. You’re criticizing the common person, the people actually affected by the purchase. What you’re doing is essentially victim blaming.

    Your entire analogy is irrelevant. The people you’re criticizing are the people who reviewed the exterminator, not the exterminator.


  • The ban had bipartisan support, and even if that all never happened, you’d still be in the same situation. They would have sold off their US business anyway whether they were forced to or just got a big offer.

    Keep in mind that TikTok also put out messages during that period practically deep throating Trump and sent it out to all their users. This was going to happen either way.

    Ironically, a ban could have prevented this from happening entirely by making TikTok no longer relevant to the US. Not that banning it wouldn’t come with other issues as well, of course.

    Maybe rather than blaming those in search of a solution, you could try blaming those who created the problem. Friendly fire doesn’t do a whole lot of good, but does support Trump, which I’m assuming isn’t your goal here.


  • Breaking down what async fn in trait does, it converts it to a fn method() -> impl Future<Output=T>, which breaks further down into fn method() -> Self::__MethodRet where the generated associated type implements Future.

    This doesn’t work for dyn Trait because of the associated type (and the fact method() needs a dyn-safe self parameter).

    Instead, your methods need to return dyn Future in some capacity since that return type doesn’t rely on associated types. That’s where async_trait comes in. Box<dyn Future<...>> is a dyn-safe boxed future, then it’s pinned because async usually generates a self-referential type, and you need to pin it anyway to .poll() the resulting future.

    Edit: also, being pedantic, associated types are fine in dyn traits, but you need to specify the type for it (like dyn Blah<Foo=i32>. Even if you could name the return type from an async fn, it’d be different for every impl block, so that’s not realistic here.






  • This depends on how the verification is done, in my opinion, as well as whether there is a presence of more anonymous alternatives.

    If the EU has a system which does not rely on third parties for verification and allows the platform to verify directly with a government-run service, then the only real issue there is lack of anonymity, which isn’t necessarily a bad thing on a platform if there are also popular anonymous alternatives people can use when they want to.

    The article doesn’t go into how ID verification will work though. If it’s through third parties like how the US does it, then that’s disgusting and waiting to be breached.






  • While I agree with your post, I do want to call out that Rust’s standard library does use a lot of unstable features and calls compiler intrinsics. Anyone can use the unstable features I believe with just #![feature(...)], but not the intrinsics (not that there’s much reason to call the intrinsics directly anyway).


  • TehPers@beehaw.orgtoRust@programming.devWhy is Rust so bare-bones?
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    4 days ago

    You can design a language where you don’t need to generate code to accomplish this.

    Depending on what you mean by “generate code”, the only language at the level of C or C++ that I can think of that does this is Zig. Zig is weird though because you’re still doing what is functionally compile-time reflection, so in a way you’re still generating code, just in a different way.

    If you’re comparing to Python, JS, or even C#, those all come with runtimes that can compile/interpret new code at runtime. None of those languages are comparable here. Rust, C, C++, Zig, etc compile into assembly, and type information, impl information, etc are all lost after compilation (ignoring symbol names or anything tracked as debug info).

    If you’re specifically referring to Debug, Display, PartialEq, etc then the compiler doesn’t do that for you because Rust doesn’t assume that those traits are valid for everything.

    Unlike Java where new Integer(1) != new Integer(1) or JS where "" == 0, Rust requires you to specify when equality comparisons can be made, and requires you to write out the implementation (or use the derive for a simple, common implementation).

    Unlike C# where record class Secret(String Value); will print out the secret into your logs when it inevitably gets logged, Rust requires you to specify when a type can be formatted into a string, and how it should be formatted.

    Just because a language does things one way doesn’t mean every language ever should do things that same way. If you want it to work like another language you like to use, use the language you like to use instead. Rust language designers made explicit decisions to not be the same as other languages because they wanted to solve problems they had with those languages. Those other languages are still usable though, and many solved the same problems in other ways (C#'s nullable reference types, Python’s type hints, TypeScript, C++'s concepts, etc).




  • Part of why Python can do this is that it runs completely differently from Rust. Python is interpreted and can run completely arbitrary code at runtime. It’s possible to exec arbitrary Python.

    Rust is compiled ahead of time. Once compiled, aside from inspecting how the output looks and what symbol names it uses, there’s nothing that ties the output to Rust. At runtime, there is nothing to compile new arbitrary code, and compiling at runtime would be slow anyway. There is no interpreter built into the application or required to run it either.

    This is also why C, C++, and many other compiled languages can’t execute new arbitrary code at runtime.