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

help-circle




  • id like to investigate about rewriting my “decentralized p2p encrypted messaging app” in Rust. if you are familiar with any of the details, id like to hear your opnions on the approach.

    For learning purposes? If you actually intend to create a service people are supposed to use, then use something that already exists like Matrix or Signal. No encryption is secure if it isn’t peer reviewed and extensively tested.

    If it’s just for personal learning, then that doesn’t matter.

    the core reason behind investigating rust is that it has better tooling for things like formal-verification.

    You can do formal verification in any language, but it’s mostly used for languages with certified compilers (and you’d have to use one of those compilers). For that, you’d want to look at something like Ferrocene, but that costs money.

    Instead, the core reason behind using Rust should be the ability to use constant-time algorithms. This can help defend against timing attacks.

    Rust also has a great crypto ecosystem, so a lot of the tools you’ll want are already built for you. Use them.

    things like audits and formal-proofs/verification are fundamentally invalid because i used AI to create it.

    Correct. An audit depends on someone’s reputation, and formal verification requires review.


    Anyway, learning Rust will take some time. For backend, the ecosystem goto is usually axum, and Rust has a built-in TCP client/server but you might want to see what tokio offers if you’re using async.






  • We are somewhat similar to contractors and directly help our customers write their code. Usually this means bringing in some kind of starting template, and it’s easier to do this with a permissively licensed template than make them sign another legal agreement.

    They own the code once we’re done, and they don’t need to make it open source (companies naturally don’t like to open source their products). Our templates are open source and well-documented, though.


  • We’ve managed to convince our workplace to allow us to use MIT on a few projects. We mainly share that code directly with customers, and it’s easier to do that with permissively licensed code, plus we can make it public for an extra win (both at work and for the community).

    There are definitely good uses for permissive licenses. In the same way that you should consider not using one, you should also consider whether one meets your specific needs.





  • There are a few tools out there that can recommend improvements to grammar. For example, a tool might suggest rewriting:

    Benchmarks are a tool to validate a list of things, contrast, page load, images using modern formats, dead links, time to first paint, and semantic HTML, a <button> isn’t a <div>.

    to:

    Benchmarks are a tool to validate a list of things: contrast, page load, images use modern formats, dead links, time to first paint, and semantic HTML (i.e. a <button> isn’t a <div>).

    Many of them are now LLM-based, so you could probably just ask a locally-running Qwen3.5 or something for advice as well. Just be careful if you do this to constrain it only to grammar suggestions and not allow it to rewrite your article (LLM-speak is easy to spot).


  • All feedback in the post is welcome.

    Would it be rude to recommend a grammar checker? The topic and supporting arguments for the post are fine (if a little disorganized, but that’s common for blog posts). I just found the run-ons a bit distracting.

    Otherwise, I agree that the internet is getting shittier. More ads, more walls to defend against scraping, less accessibility, etc. There’s no real metric for how well a page presents its contents, only metrics for specific things like load times, layout shift, and so on. I also suspect that, over time, page scoring will shift toward which sites present the data in ways that are more usable by LLMs.




  • While interesting, this entire article works with a static MyStruct. This means the type already is Any, and if you define MyTrait: 'static, then you can do the downcast by first casting to an Arc<dyn Any> and using one of the downcast methods.

    For non-'static types, downcasting soundly is incredibly difficult. You need to somehow get the correct lifetime back from the trait. You’re better off using unsafe at that point anyway. If the trait itself holds the lifetime (impl<'a> MyTrait<'a> for MyStruct<'a>), then that can help with it, though I’m not really sure how lifetime variance plays into the soundness of a downcast here.

    Finally, at the end, I’d rather just use an assert! over an unchecked assertion. I know the goal is to look at the assembly with that assertion in place, so it makes sense why they used it here. In practice, an actual assertion is a lot better because the compiler gets the same information from it and you get validation at runtime that the information is correct.

    Anyway, great article! The goal was to explore how Arc casting works, and I think it does a great job at showing and explaining that.


  • What’s yours? Pay Anthropic $2k/mo to generate fake C&D letters and send them out to random businesses?

    Unless you have a plan that doesn’t rely on the service-based models, then I don’t see where you’re going with this. Sure, you can use self-hosted models, assuming you’re fine paying for the GPUs (Jensen Huang? Lisa Su? Lip-Bu Tan if you’re feeling special?) and power to run them of course. But you’ll be “behind” the big cloud-based models, endlessly chasing after them.

    Or, hear me out, don’t use them and do it all yourself and you won’t have to pay these companies and make their execs richer.