1. 87
    TL;DR Rust go rust christine.website
  1.  

  2. 11

    I got about half way through this before noticing that the little dragon(?) person in the illustrations is using a split ergonomic keyboard. Neat detail. :)

    1. 10

      Mara is a shark for what it’s worth (should probably have said this outright in the post). The split keyboard is my favorite part personally.

      1. 3

        Shark? I did not get that. I thought some type of yak or ox.

        1. 2

          What are those things on the side of her head suppose to be? Understandably, he they thought those were maybe horns, since sharks don’t have ears that look anything like that.

          1. 1

            Ears, furry art is stylized and Mara is anthropomorphic (vaguely looks humanoid). Furry art is weird lol.

      2. 8

        I don’t have much experience with golang, but even then it was helpful to see some common patterns in rust (Result) explained concisely. Thanks for the post!

        1. 3

          No problem. Do you have any ideas for topics I can cover in this kind of style? Trying to build up a new backlog.

          1. 7

            I’d like to see an article describing the latest accepted/best third-party crates for Rust for some common tasks - e.g. error handling, JSON, HTTP requests. Some (eyre, reqwest, tokio for errors/HTTP requests/async) were already covered.

            E.g. back when I was writing Rust, there were different choices for “everybody should be using this!” error crates, and now eyre is apparently the good one.

            1. 5

              +1 to third-party crates overview!

              One of my frustrations of learning Rust over and over (coming from Go, but also I tried learning Rust before I started with Go) is that “just use the standard library” is practically not a thing like it is in Go where 80%+ of usecases are covered (http, json, templates, flags, etc – none are perfect, but all more than good enough to get started).

              Say I’m building a crawler, and I hit up https://crates.io/search?q=http, how do I choose? Having done a bunch of research since then, my instinct says hyper or reqwest (which don’t even show up on the first page!) but I remember running into some crates supporting async, some don’t.

              I’d love a collection of rust crates that are good for 80% of usecases, kinda equivalent to what’s in the Go standard library. When in doubt, use X.

              1. 6

                I’ll definitely work on a “Gopher in Exile” set of crates that about equal the majority usecase of the Go standard library. It’s something I’ve been struggling with too.

                1. 1

                  for your usecase: probably reqwest, that’s using hyper internally, supports async and blocking(opt-in via feature flag)

                2. 4

                  https://github.com/rust-unofficial/awesome-rust is not a terrible source. The ecosystem gets big enough for different purposes that it’s very difficult to cover exhaustively though, let alone keeping it up to date. Looking at its game engine resources for example, which is where my own work mostly lies, it hits the high points but misses basically all of the interesting secondary stuff.

                  Error crates are a great example. IMO it’s a problem space that was either solved long ago with failure, or is never going to be solved, depending on what you want. People keep inventing new things and for medium-sized projects at least I’ve yet to see any that are actually worth the mental overhead and compile times.

                  1. 1

                    huh, last time I checked everyone went from failure to thiserror/anyhow and I’m using snafu in crates to have optional backtraces on stable, anything new here ?

              2. 5

                Great writeup and I have to give mad props to rust community! I’m a python developer one of the reasons why I love python is that there are brilliant resources for everything and Rust while being a much younger language already developing very similarly (documentation wise). I already have dozens of really great rust resources from lobsters/hackers alone that I eventually plan to go through once I find a reason to write low-level code.

                1. 3

                  Great write-up. Out of curiosity, what kind of stuff are you doing in Rust nowadays?

                  1. 6

                    Mostly web, WebAssembly on the server, command line tools and the like so I can boule up to one of my bigger project ideas I’ve wanted to make for a very long time: something that can effectively function as a type checker for Lojban sentences. I originally tried to do this in Go but it was not expressive enough.

                    1. 4

                      I really love your blog posts and their aesthetic, thank you for sharing!

                      Maybe this is not your style (I find your posts to be very constructive which I appreciate), but I’d love to read about your journey with the Lojban type checker and the frustrations you ran into with Go and how you imagine an ideal type system/language would make those things easier. :)

                      1. 2

                        That’s very cool. People are all into machine learning for natural languages, but I’ve never heard of anyone approaching the problem from the other end.

                        1. 4

                          Yeah, turns out doing something in a way that violates nearly every known standard for doing it is hard lol. I’ll go into more detail in the blogpost (if it ever gets done lol), but basically I want to be able to understand sentences well enough to ingest a bunch of them (say: wikipedia) and then be able to ask questions and get answers back.

                          I have a basic prototype with Toki Pona, which is currently able to answer basic questions about sentences you feed it:

                          $ go run .
                          |toki: mi li sona e toki pona
                          2020/09/20 21:20:55 registering fact: bridi(verb(sona), subject(mi), object(toki_pona)).
                          |toki: seme li sona e toki pona?
                          2020/09/20 21:20:57 Query: bridi(verb(sona), subject(A), object(toki_pona)).
                          2020/09/20 21:20:57 found bridi(verb(sona), subject(mi), object(toki_pona)).
                          

                          It doesn’t support most of the language, however it does do a half decent job at what it can do. Look into how context.go works to see where the sins of my design live. TL;DR it recompiles a subset of Toki Pona into Prolog facts/questions. One of the things I want to do is then compile the prolog back into Toki Pona sentences, but that was just too annoying to accomplish in Go at the time.

                          Doing this in a language like Rust would make the parsing steps a lot easier because I can make the structures a lot more generic. Not to mention figure out who “I” and “you” are in dialogue and tag those appropriately.

                    2. 2

                      One point of fairly harmless confusion, when I hit the sentence:

                      The main place they are used in this project I’m not clear what project you’re talking about, since I’ve landed on a page on your blog rather than a document in some project specific documentation. Was this part extracted from docs you wrote for something specific? :)

                      1. 4

                        You pulled the text of your own comment into the quote. I expect you typed this:

                        > The main place they are used in this project
                        I’m not clear what project you’re talking about, since I’ve landed on a page on your blog rather than a document in some project specific documentation. Was this part extracted from docs you wrote for something specific? :)
                        

                        You need an extra newline:

                        > The main place they are used in this project
                        
                        I’m not clear what project you’re talking about, since I’ve landed on a page on your blog rather than a document in some project specific documentation. Was this part extracted from docs you wrote for something specific? :)
                        
                        1. 3

                          oof! the perils of writing markdown on a phone

                          alas it’s too late to edit it,but thanks

                        2. 2

                          I extracted it from a discovery project in Rust I used to help me learn Rust. I thought I got rid of that all. Oops! I’ll go fix that. Thanks!

                        3. -11

                          You know what I’m going to complain about and I think there’s a significant amount of users here who share my thoughts at this.

                          But I’m not going to put that directly this time, just because some too sensitive people might get “offended”.

                          Well, just stay on topic in the posts, okay? That’s not the first time and not the only blog with this particular “issue”.

                          1. 46

                            But I’m not going to put that directly this time, just because some too sensitive people might get “offended”.

                            When you see something that doesn’t affect you in the slightest and was made for free and given to the community to help, and you complain anyway, maybe you should ask yourself who is “too sensitive.”

                            1. 27

                              Could you please briefly point out what the issue is? Is the problem a lack of depth, some web-technology used, the drawings?

                              1. 16

                                +1 to this request. Speaking as a moderator, there’s nothing obviously wrong with this post to me. If it in fact has some problem, fine, we can address that, but only if we know what it is.

                                It’s almost enough to make me think there isn’t any real complaint, just a personal vendetta… but of course, that’s hard to prove, and really it’s beside the point. Either there is a complaint or there isn’t; if there isn’t, vague insinuations accomplish nothing.

                                1. 8

                                  The user already had a comment deleted, this is just a continuation/provocation.

                                  https://lobste.rs/s/3bbj56/edutech_spyware_is_still_spyware#c_9sqrho

                                2. 3

                                  He can’t point it out, because he will be downvoted into oblivion

                                3. 11

                                  Haha what? I reread the post after I saw this (I don’t even like Rust man) and couldn’t find anything off-topic, or even remotely problematic. Are you referring to the art, perhaps?

                                  1. 8

                                    Yes. This user had a complaint about the art used in https://lobste.rs/s/3bbj56/edutech_spyware_is_still_spyware#c_9sqrho as well. In both cases, it’s their personal vendetta against cartoonish drawings of animals with human traits. They might be right that others dislike the art style as well, but it’s certainly not worth complaining about.