1. 67

Sick as I am of having the front page covered in Rust–because apparently we can’t spell crustaceans without rust–I do have a genuine curiosity about how people use it and what they get out of it.

Rather than watching the inevitable blogspam call-and-response, let’s try to answer the original questions @steveklabnik’s put forth:

  • Do you use Rust as your daily driver for your work/hobby stuff?
  • What language features do you leverage from Rust, and how do they make those projects easier?
  • Why aren’t you using your non-Rust languages for that project?
  • What could Rust do to make your life easier?

I figured some concrete template of questions would get us more information than dueling blogposts.

  1.  

  2. 19

    So far, the only things I have done in rust are to make (attempt) it (and libs) work on OpenBSD!

    1. 6

      My wording is kinda crap here. Just to be clear, I attempted to make rust work on OpenBSD and never finished. Sebastien Marie did all of that!

    2. 18

      I use Rust as a daily driver for my hobby work. I also use TypeScript. This work is stuff that I hope to turn into some products in the future or use for building some products and it gets a lot more time from me than the label “hobby” would indicate.

      I like the type system. I definitely use the safety features. I like being able to make sure that I’m not doing useless copies of data as I parse it or otherwise work with it.

      Why am I not using something other than Rust? Well, I’m using Rust in the core of the libraries because I want:

      • Native, yet safe.
      • A C callable API so that it can be used from other languages.
      • Can be embedded into other software within the same process without pain, including on iOS and Android. (So JVM stuff is more difficult.)
      • Can be compiled to asm.js / webassembly so that I can also use these components in projects that must run within JS.
      • A better type system than C / C++.
      • Cargo and rustup.
      • Broad platform support.

      I’m also happy about the lack of libraries for some things. This means that there’s a chance to try to do a better job than some other ecosystems from the start. (For one thing that i’m working on there are several widely used and slightly different APIs in the Java world and an Apache Commons wrapper to try to unify them.)

      1. 17

        I’ve written two CAD programs that generate paths for industrial laser cutters in Rust. Also it’s a fun language to play around with interpreters, so I’ve written an AST-based interpreter and a VM-based interpreter just to play around with novel scripting language concepts.

        1. 3

          Like @tyoverby I also have an interest in CAD programs, and my current project is converting my .NET library for reading/writing DXF files into rust.

        2. 15

          I’m just starting to play with Rust, using it for Native Implemented Functions (NIFs) on the Elixir/Erlang platform via the Rustler library.

          Why not C/C++, which I know much better? Because I’m interested in writing NIFs that cannot crash the Erlang VM, not just will not.

          Use case? Completely trivial – I got hung up on an Advent Of Code problem which performs rather poorly using immutable linked lists, but gets pretty easy using mutable linked lists or an array. Anyway, I never get sick of having another arrow in my quiver.

          In terms of the original four questions:

          • I don’t use Rust anywhere near daily or in production
          • I’m using Rust solely because of safety, otherwise I’d use C++11 for similar workloads
          • Immutable data structures perform very poorly on certain tasks
          • I can’t blame Rust for any of my life’s not-easy parts, currently.
          1. 12

            I’ve written a TUI minesweeper game and a cellular automaton library, both basically scratch projects, around 200 lines. Nothing serious yet.

            However, after using it for these, I think I will prefer it in the future for anything where I would have otherwise used C or C++, and where it’s possible to use Rust. I really like lots of things about it, but the most important ones for me apart from safety are:

            • Traits and generics, which provide, for me, the biggest benefits of using statically typed languages. Whenever I use dynamically typed languages the thing I miss the most is the ability to specify interfaces.
            • Pattern matching and good error handling mechanisms, without exceptions. This gives you a really nice sense that you’ve fully understood all possible situations at each call site when you compile your code.
            • Expression-orientedness. This is mostly a personal aesthetic preference.
            • Modern ecosystem features; primarily dependency management. The benefits of this are pretty obvious at this point, I think, if you’ve ever used Ruby, Node, or Pip, and compared the experience to C and C++.
            • No GC - this at least gives me hope that I’ll be able to use it as a C replacement in almost every arena.

            Unfortunately, since Rust isn’t yet available on most embedded platforms, I don’t see any obvious near-term major projects, so I’ll keep building toys instead. My next one may be a Rust client library for ROS.

            Things that would make my life easier if they were in Rust:

            • More target platforms. I want to write my home automation stuff in Rust and right now that isn’t possible.
            • Better compilation times. They’re working on this but it’s still not great.
            • Type-level integers. This is one of the very few remaining C++ features that would make a big difference for me if ported to Rust.
            • A REPL. There used to be one, but it fell behind the current nightly build and has never caught up. This is necessary for things like Jupyter notebooks or good web playgrounds. If Rust had this I might be able to give up Python for almost everything.
            1. 2

              A cellular automation library? Could you elaborate on that?

              1. 3

                Sure - it’s basically just a trait describing what a cellular automaton’s API needs to look like, and some boilerplate for stepping through time. I also started on an easy way to visualize 1D and 2D CAs, but didn’t finish it. Next steps (apart from the visualization library) might be a function to back-drive reversible CAs, or generate rules from given state transitions.

                1. 2

                  Ah, cellular automaton. I read automation and I was hoping you were working with cellular radios. I need some help getting started with those. Still a cool project! :D

            2. 10

              At maidsafe we’ve switched from C/C++ for our entire code base (aside from some JS for the UI) two years back and we no regrets. We are building the SAFE Network, a privacy-first open source peer-to-peer storage and communication network. For that low level, complex networking and routing. For this area performance is matters (an earlier version was in Python), but doing a lot of highly sensitive crypto Rust offers a totally different degree of certainty of the programs compiled and portability and prevents us from doing an entire class of mistakes.

              Furhter more, as an underlying library the we are currently restructuring the system to compile native libraries for all major desktop and mobile platforms and through the FFI interface can easily integrate that library into a lot of language through minimal bindings (Python, Javascript, Java, etc..). Last, but not least, we even use Rust as the “mock” language within our RFCs because its type syntax is so expressive and nice to read that it is more precise to put in actual Structs and actual code than trying to describe what should happen. Neither of those would have been that easy to do wasn’t it for Rust and its amazing ecosystem and platform.

              We are also looking forward to the WebAssembly target, hopefully allowing us to provide a the full library to be run within the browser and use rust as the primary language to write entire web-apps. Did I mention we are looking for more contributors for the Rust code base and also hire Rust developers ;) ?

              1. 6

                Do you use Rust as your daily driver for your work/hobby stuff?

                It was my main language at my last job. My current hobby project is written in Julia but might get pushed into Rust when it settles down.

                What language features do you leverage from Rust, and how do they make those projects easier?

                Why aren’t you using your non-Rust languages for that project?

                Control over memory layout. Predictable performance.

                I do DB and PL research. It’s just not feasible to write a competitive query engine in a language where everything is boxed on the heap, and where capricious gods (JIT, GC etc) can reach in at any time and ruin your day. C++ is the standard, but I’m more productive in Rust because I don’t have to be on guard all the time, because the language core is much simpler and because the stdlib and cargo simplify a lot of day-to-day tasks.

                There are lots of other features that are nice-to-haves - static checking of error handling, easy to embed, awesome community - but it’s control without insanity that really matters for me.

                The other usecase where I can imagine reaching for Rust in the future is general thriftiness (ala COST). People like to say that programmers are expensive and hardware is cheap, but as soon as your program doesn’t fit on one machine you have a distributed system and that costs programmers. Similarly for having to deal with cache invalidation bugs because your server is too slow. Any time I’m reasonably sure that performance will make my life simpler, I’d be tempted to reach for the not-handicapping-myself-from-the-start option.

                What could Rust do to make your life easier?

                Things that are happening anyway:

                Things that probably noone else cares about:

                1. 6

                  I use Rust for watchexec, a file watcher. I noticed every new language re-invents file-watching via a janky mess of FFI + PL specific bindings.

                  The choice to use Rust was predicated on a few things:

                  • Existence of the notify crate, which abstracts away platform-specific filesystem modification watching
                  • Ability to work directly with platform APIs without compromise
                  • The type system: particularly the insistence on totality
                  • A collectively-agreed upon build system

                  The best thing about Rust is I can ship a single native executable for all major platforms that takes full advantage of each platform. There’s no runtime or other BS to ship, it just works.

                  For example, on Unix-ish OSes, we launch new processes in their own process group, and send all relevant signals to the group. However, on Windows, we make a job object that gives us similar semantics. Another example: I wanted Rust’s before_exec capability to run code before exec-ing another process, but it hasn’t landed yet, so I just did the fork/exec myself in the meantime!

                  You can do this sort of thing in C, of course. I haven’t seen much that tries to do what notify does. And not having to use libuv is pretty great. :)

                  watchexec solves a relatively small problem, but I believe there is great value in doing small things extremely well.

                  1. 4

                    Most of what I use Rust for is one-off tools or else coding assignments for school (which I unfortunately cannot share). I have a general rule of whenever I think C/C++ is the correct tool for what I’m about to do, I ask myself if I can do it in Rust. 90% of the time, the answer is yes, especially for command line tools that involve parsing input and then interfacing with a Unix kernel.

                    I do have a couple favorite examples of good uses of Rust as well:

                    OS Development - A few months ago, this OS tutorial was posted to Lobsters. It takes the basic tutorials from OSDev Wiki and replaces the C with Rust. Having done this tutorial in C first, I found it a great window on how much easier writing good code is in Rust. Plus, I’m biased in that I love OS development.

                    Servo - As anyone who keeps up on security can tell you, browser security is a gigantic pain, and memory errors in modern browsers are rampant. Servo gives the promise of reducing these vulnerabilities greatly using the borrow system in Rust. Servo is still a relatively new project, so there’s a lot of variables to account for, but I have high hopes that this will make browsing a more secure experience.

                    So ultimately Rust, like any other language, is a tool in your toolkit. My hopes are for it to one day evolve enough to where it can be used for large scale projects. Currently, if one wants to write a large scale native application, and they don’t trust themselves enough for pure C (something I think more developers should do), then they reach for Java or C++. I see Rust as having a bit higher of a learning curve, but many new groups seeing it’s benefits as not having the bloat of C++ or Java.

                    1. 3

                      something I think more developers should do

                      Curious, why do you think most developers should try writing large scale “native” applications? (I’m assuming by “native” here you mean “compiles to machine code”.) In my experience it’s almost always better to keep the native bits as small as possible and put most of the non-performance-critical logic in another language that can be hacked on by a larger potential pool of contributors, modified without a complete compiler suite installed, and improved upon or extended independently of the release cycle of the core program.

                      1. 5

                        Sorry if that phrasing was odd, the “something I think more developers should do” part was referring to avoiding using C if it’s not very necessary for a situation.

                    2. 4

                      I’m in the middle of first project with Rust. It’s a small compiler for a tiny functional language. I recently got the parser (handwritten recursive descent) working. Including tests, the project is currently ~650 LOC. I haven’t written anything significant in Rust outside of this.

                      Full algebraic data types + pattern matching add so much to compiler code. It provides a very natural way to build and work with ASTs and IRs. I’ve the experience Rust to be roughly on par with the ADT experience in OCaml. I will say that pattern-matching on Boxes is a little annoying. (Though this is probably a product of my inexperience writing Rust). I like having full ADTs much more than templated classes/structs in C++.

                      Also, the build system and general environment for Rust has been great. I have a single C++ project that’s nicely set up, and I usually just copy that directory over, rm a bunch of stuff, and start fresh if I need to start something in C++. Getting anything nontrivial working in OCaml is also a huge pain. I believe every time I’ve installed OCaml on a machine, I’ve needed to manually revert to an older version of ocamlfind. Cargo is an incredible tool.

                      I chose to use Rust because I felt like compilers are a good use-case for Rust + I wanted to learn it. It’s really nice to have pattern matching + for loops in the same language. (Yes, OCaml technically has for-loops as well, but it really doesn’t feel the same. It’s nice to be able to write simple imperative when you need to).

                      This all being said, I’ve had plenty of fights with borrow-checker. I still don’t have a good grasp on how lifetimes + ownership work. I was a bit stuck on how to approximate global variables for the parser, so had to make everything object-oriented, which was a bit annoying. I would also love love love to be able to destructure Boxes in pattern matching without having to enable an experiment feature (I understand that this can cause the pattern matching to be expensive, as it’s a dereference, but I almost always wind up dereferencing it later in the code).

                      1. 5

                        I’ve done a fair bit of parsing with Rust, mostly DWARF but also some other things.

                        I tend to write parsers with signatures like so:

                        pub enum Error {
                            // Different kinds of errors for this crate...
                            UnexpectedEof,
                        }
                        
                        pub type Result<T> = ::std::result::Result<T, Error>;
                        
                        pub struct Parseable<'a> {
                            // Just here to show how a zero-copy approach would
                            // work with lifetimes on the struct...
                            subslice: &'a [u8]
                        }
                        
                        impl<'a> Parseable<'a> {
                            fn parse(input: &'a [u8]) -> Result<(Parseable<'a>, &'a [u8])> {
                                // ...
                            }
                        }
                        

                        The &'a [u8] in the tuple is the rest of the input that was not consumed while parsing the Parseable<'a>.

                        Regarding variables that are “global” for the parser (they probably aren’t really “global”, b/c you probably don’t want two threads parsing independent things to stomp on each others' toes…), I would make something like a ParseContext and thread a &mut ParseContext as the first parameter to all the parser functions:

                        pub struct ParseContext {
                            // Whatever state needs to be shared when parsing goes here...
                        }
                        
                        // ...
                        
                        impl<'a> Parseable<'a> {
                            fn parse(ctx: &mut ParseContext, input: &'a [u8])
                                -> Result<(Parseable<'a>, &'a [u8])>
                            {
                                // ...
                            }
                        }
                        

                        If you’re working with UTF-8, you can use &'a str instead of &'a [u8].

                        1. 3

                          Thanks for the tips! I really like the enum of parse-specific errors; I’ll probably implement that in my own project. Interesting how rust makes explicit the zero-copy approach. That’s pretty slick.

                          Once I have a better understanding of lifetimes, I’ll give this another look.

                          Also, parsing DWARF info sounds really cool :D

                        2. 1

                          Do you have the code hosted somewhere? I would love to read it.

                          1. 1

                            Just realized this was in response to my comment and not fitzgen’s. I keep it in a private github repo, but don’t want to make it public until it’s “working.”

                            I’ll probably post it here once the first go is complete. :)

                        3. 4

                          I use Rust for personal and OSS work, but not at work.

                          My first Rust project was an HTTP 1.0 proxy, which was able to sustain about 6,000 requests per second (I suspect limited by the backend.) This took about half a week to build, and the safety was incredibly helpful in making it highly concurrent.

                          The main project of mine written in Rust is the tooling for NixOS security / vulnerability management: https://github.com/NixOS/security The type system here made developing the tokenizer and parser quite nice and straight forward. Forcing defined types made it obvious where code smells were. This isn’t a feature unique to Rust, but it is a good one.

                          I also find its quality error messages to be hugely useful. Cargo is an excellent tool.

                          1. 4
                            • I use Rust primarily for hobby stuff. But I am also an active volunteer in the project itself, and libraries I’ve built in Rust are being used in production by others. I have a PR for $work that uses Rust, but it still needs a bit more TLC. Since most of my work with Rust is during my free time, I have the luxury of prioritizing the improvement of the library ecosystem, so I spend a lot of time on that. As for applications that I use daily, that would be xsv (a CSV swiss army knife) and ripgrep (a faster grep than GNU grep and a faster/better ack than ag).
                            • Answered below.
                            • Once I put my mind to it, it only took me about a month to get an initial version of ripgrep released and out the door. I predict it would have taken me much longer to do it in C/C++ and achieve the same level of performance. I don’t think the same performance could be achieved by writing in a higher level language like Python. Other languages like Haskell are an option, but I’ve never been satisfied with the performance of programs I’ve written in Haskell. (I think there are a lot of people that share in that experience, but I also think there are a lot of people that don’t.)
                            • SIMD support on stable Rust. (Working on that.) I am quite happy with Rust the language itself as it is now.

                            It’s hard to identify one particular feature of Rust that I leverage. I love that the costs in the code are typically very predictable, just like in C. It makes it much easier to write and read code that is fast. Getting that kind of transparency is really hard. I think Go, for example, has some of it, but not at the same level as Rust. Identifying a particular language feature responsible for this is hard. It’s a combination of a few.

                            I love algebraic data types. I use them all the time to encode information about states in my program, which often makes it much easier to uphold runtime invariants, and it gives you a place to document them. Stated differently, Rust gives you lots of tools to provide structure to your data in a way that’s visible to the type system, but also in a way that has little or no runtime cost. Other languages provide similar power (thinking of Haskell), but in Rust, it’s idiomatic to avoid boxing-all-the-things. The happy path is the fast path.

                            I leverage Rust’s ownership and borrowing features all the time. They are so good at what they do that bugs filed against ripgrep are typically logical bugs, feature requests or really weird shit that happens on Windows. I don’t get bugs about panics, segfaults, data corruption, deadlocks or data races. They just don’t happen (or happen very rarely). Compare that to similar projects written in C and you’ll see how much of an improvement that is. (Of course, such a comparison can never be completely fair, but it has to count for something, right?)

                            While you didn’t ask about non-language features, I feel it’s important to mention that the ease of contributing to a central library ecosystem that just about every Rust programmer uses is critically important (as compared to C/C++, which is the language I probably would have used for ripgrep if not for Rust). In particular, since I released ripgrep, I’ve slowly chipped away the code in ripgrep proper into crates that can be reused by other projects. I rarely see that happening in C projects. But it was nearly trivial to do in Rust. Other projects are already benefiting from it too!

                            1. 5

                              I use Rust for… practicing using Rust! I really have no need for systems level programming for any of my side projects or (certainly) my day-to-day work, and when I do it tends to be so small and simple that I might as well use C (like await). I like the concepts behind the language, but ultimately it’s just a toy for me at this time.

                              1. 3

                                I also mostly use Rust for personal projects - for lack of much other stuff I do.

                                That is, I have a few projects written in it, and I am contributing (small) improvements to the tooling and library ecosystem. Now onto the reasons I chose it:

                                • As already pointed out: safety and security. Very nice for small-to-medium projects which need to be robust and expose sane behaviour all the time - like code running my window management and the basic user interface to my computing environment (I NIH’d to the point where my window manager and other basic components of my “desktop environment” are driven by my own projects written in Rust).
                                • Good performance characteristics in combination with a powerful type- and ownership system. Granted, it’s not Haskell, so the machinery available is significantly simpler, but algebraic data types, as well as the restrictive memory model, help building code that keeps a good balance in terms of speed, safety and readability.
                                • I find the mental model of my code gradually building up in my mind to be quite close to what the compiler forces me to do anyway, much in the same manner as Haskell’s typesystem does. It’s a language I greatly enjoy programming in.

                                As evident from the previous paragraphs, I also write Haskell, and I just pick whatever language of these two I think fits best with a given task, though the actual decisions are mostly based on quite subjective preference in most cases, as both would be suited. Other problems, again, get handled with different tools, for different reasons. Okay, the last few sentences weren’t all that helpful.

                                Regarding the last question: The compiler is seeing a lot of work (and I hope I’ll get around to do some of it, too) and constantly improving. Some rough edges, however, are still being worked on. I guess getting rid of those would make my life indeed easier in some cases. I also await a time when some features only available in nightly builds will hit stable as well, but that’s a mere symptom.

                                Hope this makes my position clear.

                                1. 3
                                  Do you use Rust as your daily driver for your work/hobby stuff?

                                  For hobby & side-project stuff, yep, definitely. Any of the little tools I throw together for myself are getting written in rust right now.

                                  Unfortunately I can’t use it for work right now because most of the code I’m writing is libraries for embedded devices, some of which don’t even have LLVM targets.

                                  What language features do you leverage from Rust, and how do they make those projects easier? Why aren’t you using your non-Rust languages for that project?

                                  (I’m answering these together.)

                                  I hate runtime errors and the more I can do before running the better, so the type system and borrow checker are the two biggies for me. For work I do a lot of lua, python, and (more recently) node, so I run into runtime errors so often from simple typos that are obviously impossible to run I’ve actually had nightmares about it.

                                  The next biggest thing for me is cargo. Having written C for a lot of my programming history, having something like cargo that automatically fetches and builds every possible dependency that is out there is a revelation. I don’t have to search around and try to figure out what the authoritative source of a library is, then download it, figure out how it wants to put put into my source code, and then mash whatever it’s using for it’s build system into my existing build system.

                                  And finally, built-in docs generator. It is so unbelievably helpful to have all the docs for all the different libraries I’m using all available in HTML so I can just look at it in a browser, all with exactly the same formatting so I can seamlessly switch back and forth without having to context switch, and having those docs always be searchable so I can quickly find what I’m looking for.

                                  What could Rust do to make your life easier?

                                  It could have been made years ago so it’s ecosystem would be more complete. :)

                                  Said with less snark, I’m mostly just trying to get myself as proficient with rust itself as I can because I want to be ready to use it when the ecosystem is more complete, which, as far as I can tell from what exists already, it will be to a point where you can be as sure what you might need will be there as any other language out there pretty soon.

                                  1. 3

                                    I don’t use it currently. A project on my backlog for the future involves trying to combine it with Ada & SPARK to cheat its safety benefits into them. This might get some of benefit of high-assurance systems without the formal verification work. Ada has all kinds of safety features but concurrency safety is limited & none for dynamic allocation. SPARK can prove static programs free of stuff that worries me the most. Professionals using them will code apps in SPARK where possible then drop to regular Ada for what it can’t express. Rust has safety against temporal errors from dynamic, memory management plus concurrency.

                                    The idea is to create the program in one then map it to the other where the analysis of one should still apply to the other. Reading three chapters on Rust in the early docs gave me a huge headache. That plus other writings indicate getting Rust code through borrow-checker is hard for beginners. Doing hard stuff first, I’ll code the stuff in a subset of Rust, borrow-check it, and shove passing code through SPARK. SPARK is Ada: gets checks of Ada and proofs of SPARK system. If it passes both, then I can compile it to [machine-readable] C for distribution to platforms without an Ada compiler. There’s also certifying compilers for C or C-like code that can be used to verify translation to machine code. Also tools for C that can automatically add safety or error detection into them.

                                    Altogether, the project proposal is to code same thing in each of the languages to get the benefits of all their checks. The checks are done at a level that proves entire categories of problems are impossible. The kind that often lead to code injection or hard to trace bugs. Just requires knowing two languages with a careful rewrite of syntax that might be later automated if the approach proves viable. Seems worth trying. Initial application will be NetBricks, a Varnish equivalent, a DNS like IronSides (SPARK), or other small but high-impact technology. I’ll need (a) more time than I have and (b) language lawyers for both to spot any [mis]matches between them.

                                    1. 1
                                      • Safety and security. I’m looking forward to Firefox with more and more Rust components.
                                      • C compatible. It’s possible to exchange more and more of your critical system components with Rust code. You can even write Kernel modules in Rust! This would eradicate so many attack vectors.
                                      • Plus: The community is incredibly friendly and helpful
                                      • And finally: It’s a Mozilla project. Mozilla is one of the few defenders and advocates of internet users left out there.
                                      1. 8

                                        Okay, that’s great and all.

                                        What have you, chr4, personally used Rust for?

                                        You didn’t answer any of the above questions. Concrete examples please.

                                        1. 6

                                          Well, I answered the question about the Rust features I apprechiate. But you’re right, I was missing out on the examples:

                                          I’m currently rewriting some of my C projects in Rust (with more or less success), as well as tinkering around with rewriting a Go JSON API. The latter is probably not very useful, as I think Go is the better fit for the job, but it helps me improving my Rust skills. Furthermore, I’m currently working on An Interpreter In Rust.

                                          All projects so far are not for commercial projects.

                                      2. 1

                                        Building a virtual reality video game with a custom physics and rendering engine. Also exploring using Rust as a cross platform (you heard that correctly) portable core for mobile applications (by using the rust code as a native shared library).

                                        1. 1

                                          I’m starting to fiddle with Rust because I want to do some constant-time programming, which will probably involve using LLVM bindings but I might have a vague hope of being able to do in the language itself. But either way, neither of those things is very practical in Scala, which is my language of choice for most projects. If there was a maintained-looking set of LLVM bindings for Scala (or an alternative cross-platform assembler) then I’d use that instead.

                                          I’ll probably find more things as I get deeper into Rust, but at the moment I treat it as basically Scala except it doesn’t have HKT so I have to write out all my free monads by hand as, well, regular monads, which is incredibly tedious. So that’s the main thing Rust could do to make my life easier. (You might say free monads aren’t a concrete thing I do, but the way I conceptualize programming yes they are - I guess the general problem is something like “managing contexts”, but I’ve internalized the free monad because it’s a very easy/nice way to think about it).

                                          1. 1

                                            Do you use Rust as your daily driver for your work/hobby stuff?

                                            For work, I now mostly write Pyret. I typically implement my side projects in either Rust or Racket, though! I have a strong preference towards data-oriented languages. The languages I use most (Pyret, Rust, Racket, Bash, MLs) all favor a data-oriented style of programming, so how I choose a language for a project tends to depend on the ‘shape’ of the data I’m working with.

                                            What language features do you leverage from Rust, and how do they make those projects easier?

                                            I reach for Rust when I need performance, sophisticated types (traits!), and well-defined structured data (ADTs!). It’s a thrill writing code at a high-level of abstraction and being confident that it will be performant. Cargo makes the entire ecosystem a joy to interact with and contribute to.

                                            Why aren’t you using your non-Rust languages for that project?

                                            There are a handful of projects for which I haven’t reached for Rust. Racket, though not tremendously performant, is tremendously expressive! When your data look like s-expressions, Racket is usually the best choice. I used Racket extensively for my encyclopedia remix project Liber Brunoniana, which involved processing lots of HTML.

                                            What could Rust do to make your life easier?

                                            I would love to use Rust for programming embedded devices, like Arduinos, and targeting browsers via WebAssembly.