Vorpal

joined 2 years ago
[–] Vorpal@programming.dev 1 points 2 years ago

LGPL specifically does as far as I understand have some issues when used in rust. In particular the border for the copyleft is dynamic linking. That doesn't work well with rust. I would instead consider MPL where the copyleft border is on a source file level.

That said, I'm not a lawyer!

[–] Vorpal@programming.dev 7 points 2 years ago

Here are some I found and used in my own code:

  • itertools
  • regex
  • anyhow and thiserror (error handling)
  • indoc (indented/formatted multi line string literals)
  • strum (various derive macros for enums)
  • petgraph (for working with general graphs)
  • winnow is a great (and fast) parser combinator library.
  • bpaf, clap and xflags are three different command line argument parser libraries. Which one to use depends on the needs of the project and if you need to match the behaviour of an existing non-rust program (as I needed to in one case)
[–] Vorpal@programming.dev 6 points 2 years ago

Saying “it’s a graph of commits” makes no sense to a layperson.

Sure, but git is aimed at programmers. Who should have learned graph theory in university. It was past of the very first course I had as an undergraduate many years ago.

Git is definitely hard though for almost all the reasons in the article, perhaps other reasons too. But not understanding what a DAG is shouldn't be one of them, for the intended target audience.

[–] Vorpal@programming.dev 3 points 2 years ago* (last edited 2 years ago)
  1. Not for me. It is clearly not trying to be a systems programming language. And that is why I'm interested in Rust. I work in hard realtime (day job) and do embedded as a hobby.
    That rust is also useful higher up the stack is just a nice bonus to me which means I can keep using it when writing automation things that are too complex for a simple shell script (it has largely replaced python for this purpose for me now).

  2. Rust gained momentum because it filled a niche that was unoccupied (systems capable but safe and high level). Oxide seems to be aiming for an area already occupied by Rust from one side and things like Go from the other side. That rarely works out.

[–] Vorpal@programming.dev 2 points 2 years ago (3 children)

Seems rather limited: only targeting some high level languages. Now, if this could also generate C++ bindings i would be very interested.

[–] Vorpal@programming.dev 19 points 2 years ago (3 children)

I really don't see what niche it is trying to fill that isn't already occupied.

Rust is as successful as it is because it found a previously unoccupied niche: safe systems programming without garbage collector and with high level abstractions that (mostly) optimise away.

I don't think "better C" is a big enough niche to be of interest to enough people for it to gain a critical mass. I certainly have very little interest in it myself.

[–] Vorpal@programming.dev 1 points 2 years ago

In my manual implementation I would assume you would use a newtype, so not really relevant.

[–] Vorpal@programming.dev 2 points 2 years ago

Doesn't really help: what if you typo the namespace instead? Same exact issue. Namespaces are useful for other things though, but not security.

[–] Vorpal@programming.dev 3 points 2 years ago (2 children)

Seems to be a wrapper around implementing the "index into data store"-pattern (not sure if there is a better name), but without support for removal from said data store.

From a quick glance I don't really see what this gives you that wouldn't also be quite easy with a manual implementation. And then you avoid the proc macro compile time overhead as well.

[–] Vorpal@programming.dev 2 points 2 years ago

There are existing approaches: GNU gettext and Mozilla fluent comes to mind. I would try to use one of those. I understand that Mozilla Fluent has good support for the Web (unsurprisingly).

[–] Vorpal@programming.dev 1 points 2 years ago

Your idea will work with minor changes (if comments are supported in your file format). At work our tooling create entries like 123="English text" // UNTRANSLATED. Obviously not quite the same format, but it should be adaptable to any format that supports comments.

[–] Vorpal@programming.dev 2 points 2 years ago

Oh, this seems to be specific to the SQL framework you use after looking into it. I thought it was a general rust question about function parameters, sorry. Unfortunately I'm not familiar with that sql framework (or any other, I'm an embedded developer, not a web dev).

Hope you find someone who knows diesel, and sorry again I couldn't help you.

view more: ‹ prev next ›