I think Rust strikes a nice balance but there’s enough magic that some people still get frustrated. Following traits can get tedious at times.
413 karma · joined February 4, 2014
I think Rust strikes a nice balance but there’s enough magic that some people still get frustrated. Following traits can get tedious at times.
Speed is also not the only metric, Rust and C enable much better control over memory usage. In general, it is easier to write a memory-efficient program in Rust or C than it is in JS.
Interestingly, the speed is the main differentiator from existing package and project management tools. Even if you are using it as a drop-in replacement for pip, it is just so much faster.
It’s nitpicking for sure, but it causes real challenges for reproducibility, especially during model training.
The aliasing rules in Rust are also pretty strict. There are plenty of single-threaded programs where I want to be able to occasionally read a piece of information through an immutable reference, but that information can be modified by a different piece of code. This usually indicates a design issue in your program but sometimes you just want to throw together some code to solve an immediate problem. The extra friction from the borrow checker makes it less attractive to use Rust for these kinds of programs.
I disagree with this. YAML has too many footguns (boolean conversions being the first among them) not to mention it is a superset of JSON. Plain old JSON or TOML are much simpler.
Edit: it looks like this is the case in the first batched fsync example, as well.
Speaking in generalities: the initial failure rates of these units are much higher than those of traditional non-GPU machines.
In general, the failure rates decline significantly during the operating life of hardware. So you deal with a bunch of issues up front that you try to resolve to reach a much more stable state.
There was a recent Meta engineering blog post that echoed some of our own experiences wrangling GPUs and high performance networks: https://engineering.fb.com/2024/06/12/data-infrastructure/tr...
Not to mention that you can always introduce a new lexical scope with `{ ... }` in Rust code.
Typescript has almost identical semantics to Javascript but adds typing syntax to improve developer experience and make it easier to manage a large-scale JS codebase.
Zig is a fundamentally different language than C that has a lot of new features. Two great examples are comptime and allocators which have complements in C, but are really very different from what C provides.
If you're suggesting that zig is aiming to provide a C alternative with better ergonomics, then I agree; but zig and C have a lot more differences than Typescript and Javascript.
You may also get permission from an advisor if you performed very high on the CS Assessment on Canvas.
I took the course over the summer as a music major and subsequently took several other CS courses as a music major after having a discussion with an advisor in the CS department. I ended up finishing a CS degree a year after my music degree. CMU was really great about providing opportunities for students to explore courses outside of their majors, especially over the summer.The course is really about developing techniques for reasoning about low-level software. You build up abstractions in C by leveraging contracts and writing proofs of correctness based on those contracts.
Explore the "Learning Objectives" section to read about what the course really entails: https://www.cs.cmu.edu/~15122/about.shtml#LO
This was the first computer science course that I took at CMU and it was absolutely mind blowing for me. I had previously taken AP CS and had played around with making games in flash and writing little programs for my graphing calculator. But this course taught me how to reason about my programs (and why that might be valuable, to begin with).
Pretty weird way to start the post.
One of the performance bottlenecks that I ran into while reimplementing clox in C++ was using `new` and `delete` instead of `realloc` for arrays and hash tables. By the time that I figured out it was an issue, I was already using `operator new` to track heap allocations for the garbage collector.
I have a lot of experience writing microservices and batch jobs using C++. At first this seems outrageous, but with a reasonable set of high level utility libraries, C++ can be very expressive. And then you have the option to drop down to whichever level of abstraction is necessary to address performance or concurrency issues.
Beyond platform requirements (e.g. HTML, CSS and JS on the web or python for ML) I think language choice has more to do with business needs than high level problem domain. When you're building an MVP or have an urgent business need where you need to prioritize short term progress over long term flexibility, high level languages with GC are great. If you have an experienced team and you want to build something that will offer flexibility in the long term, Rust is a fine choice.
This one seems highly relevant: https://wizardzines.com/zines/containers/
This was also posted on HN a couple weeks ago: https://earthly.dev/blog/chroot/
[1]: https://google.github.io/styleguide/ [2]: https://abseil.io/tips/ [3]: https://google.aip.dev/
[1]: https://github.com/bazelbuild/bazel-watcher [2]: https://facebook.github.io/watchman/
Anecdotally, I've been having pretty bad anxiety this year from work that I feel should be easy but turns out to have many unexpected wrinkles. In retrospect, it seems like there may have been a lot of "justs" when discussing early solutions.
I've started to take a step back when approaching problems to better understand potential obstacles, but this was still a pretty big toll on my confidence.
If you use "take" for example, collect should do the right thing: https://doc.rust-lang.org/src/core/iter/adapters/take.rs.htm...
This limits the sharp edges and in particular makes it easier to identify where they might exist. Perhaps the most common rule is the prohibition of exceptional control flow. This can seem really limiting at first, but encoding the possibility of errors using the type system and forcing callers to handle errors explicitly is really powerful.