Did you know YAML is the most widely-used “programming language” internally at Github?

  • Ephera
    link
    13 years ago

    Well, it’s far from stable or documented, but yeah, here you go: https://codeberg.org/prefab/prefab

    And it is actually written in Rust. Sort of the opposite use-case of what Rust was designed for, but I don’t know of a high-level programming language that’s modern, compiled, concise/non-clunky and popular enough to have an ecosystem, so it feels like the closest I can get.

    And Rust has some niceties for this use-case, in particular macros. I’ve for example already implemented a url-macro, so that when you write url!(“https://example,com”), it will shout at you during compile time that it can’t parse that (because of the comma). If it can parse it, then it will insert the code for constructing a Url-type.
    With an IDE or fancy enough text editor (e.g. with rls setup), it will show that error even in the editor, so it’s really a lot nicer than it has any right to be.

    On the other hand, the API is still rather clunky and doesn’t always make sense (e.g. I need an #[async_trait] annotation every time you implement the core Deploy-trait, because the SSH stuff is async and Rust doesn’t have async traits yet).

    • @southerntofuOP
      link
      13 years ago

      prefa

      Hello i just took a quick look and that’s really interesting. Personally i’m more interested in local system configuration than remote async stuff. Would you like to have a chat in a dedicated room about our respective usecases and whether they would fit well?

      • Ephera
        link
        13 years ago

        Yeah, I’d like to script my local system with it as well. I do already run the command without SSH, if the target is localhost.

        And I actually want to look into having the API non-async in general. Maybe have the deployment code run synchronously within one thread per host (similar to the Actor Pattern).

        As for taking the discussion elsewhere, well, you could open an issue on Codeberg, if you don’t mind the formal approach.
        But if you have a reasonably privacy-friendly platform for that in mind, we can also discuss it somewhere else.

        • @southerntofuOP
          link
          13 years ago

          you could open an issue on Codeberg

          I just did

          if you have a reasonably privacy-friendly platform for that in mind

          There’s plenty of those. For that kind of stuff i really like to hang out in the tildeverse. tilde.chat is a friendly IRC server. Maybe we could open a channel there? Alternative is a friendly Jabber/XMPP server like chat.disroot.org where we could also open a chan.

          In fact, i’m happy to run a bot to “bridge” both channels. How should we call the chan?

          • Ephera
            link
            13 years ago

            I mean, I’m hoping we don’t need to bridge two channels for the two of us. :D

            And to be honest, I don’t have a client/account for neither IRC nor XMPP set up. I don’t chat much with people.
            It’s been my impression that XMPP is more approachable (especially for asynchronous communication), so I would lean towards that, but I’ll have to look into it either way.
            And well, I’ve dubbed the project “prefab” (akin to “prefabrication buildings”, also reasonable short and wasn’t taken yet), so that would probably make sense to use as the channel name.

            • @southerntofuOP
              link
              13 years ago

              I don’t chat much with people.

              If that’s not a satisfying means of communication for you, we can stay on the bugtracker :)

              XMPP is more approachable

              Definitely! It’s more complex in a sense but has much less inconsistencies because everything is standardized. In contrast, login/moderation on IRC is different on every server so joining a server can require extra steps. In Jabber/XMPP world, you use your usual account to join chatrooms on other servers directly, without extra setup steps. If you’re looking for a free-price (donation-based) server, disroot can be an option. ~team also provides the same kind of services, but offers shell accounts (and gopher/WWW hosting) as well (which is really handy for us techies to test stuff).

              I’ve dubbed the project “prefab”

              Can’t say i’m a fan of prefabs in the construction worlds, but i appreciate the metaphor ;) I’ve created prefab@chat.disroot.org if you decide you’d like to give Jabber/XMPP a try. I strongly recommend Dino, gajim or poezio as clients, but there’s a few more that are actively maintained (just don’t try a random client and figure out it’s old and broken in many ways :P). Also Tor integration should be rather straightforward in most clients (but maybe not dino yet).