Getting Past “Ampersand-Driven Development” in Rust
A little mental model for ownership and borrowing
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 390 posts.
A little mental model for ownership and borrowing
You're only given a little spark of madness. You mustn't lose it. Robin Williams
In Rust, if I want to print some 32-bit unsigned value in hex, with the leading 0x, padded out with zeros, I would write that as:
For more experienced functional programmers, most of this post will seem introductory, but I introduce some more advanced stuff near the end. Functional Programming over Canadian Programming Lately, I've been thinking about this Functional Programming journey I've been on. I thought it started when I was twenty, but
Code coverage for integration tests, available in Go 1.20.
I sometimes get asked why I use Perl so much. Am I not a fan of strongly typed functional programming? Yeah, I am. Ask me to write something that is known, for sure , to become a big system and I’ll pick strongly typed functional programming without hesitation. 1 1 And, of course, put me in a team that uses Blub, and…
We’re excited to announce that the AWS SDK for Rust is now generally available and supported for production use. The AWS SDK for Rust provides an idiomatic, type-safe API, along with the benefits of the Rust language such as performance, reliability, and productivity. The SDK supports modern Rust language features…
Today's main topic is the "freezing" of the JEP list in JDK 21. In addition to that, however, we will also talk about Nulls in Valhalla. And finally, the obligatory Release Radar.
One of the primary things that people don't understand about Objective-C is that it is a solution of the two language problem , or more prec...
C++ is late to the coroutine party, compared to other programming languages, but they are part of C++20. Prior to coroutines, a C++ programmer had two choices, roughly speaking:
Ruby's switch statement is very versatile and flexible, especially due to the dynamic nature of Ruby. This post shows how it works with examples.
I’ve been saying the upcoming 0.11.0 release of Zig would have async/await/suspend/resume for 9 months now. You can probably find 10 different places where I promised in writing or in front of a camera that this next release would have this feature.
Zig is a new, independently developed low-level programming language. It’s a modern reimagining of C that attempts to retain C’s performance while embracing improvements from the last 30 years of tooling and language design. Zig makes calling into C code easier than any other language I’ve used. Zig also treats unit…
Goroutines are the single feature that distinguishes Go from other languages. They look very much like threads, but they are cheap to create and manage. Go's runtime schedules goroutines onto real threads efficiently so you can easily create lots of goroutines.
“lex and yacc” are two terms that are used together so often that they can seem indivisible. lex takes a string as input and divides it up into lexemes (roughly speaking “words”) and yacc takes a sequence of lexemes and parses them. Since some parsing approaches such as recursive descent parsing unify these phases…
In this post, we will discuss recent results from Immunant and Galois in extending C2Rust to emit memory-safe Rust in certain cases. With this work we aim to shift a meaningful part of the translation burden from the human to the machine. Up until now, C2Rust has only been able to translate C to unsafe Rust that is no…
UPDATE: Wow, this post has gotten popular! I’ve written a new post that adds new papercuts combined with concrete suggestions for how C++ could improve, if you are interested. Also, if you want to read more about C++’s deeper-than-papercut issues, I recommend specifically my post on its move semantics. Thank you for…
I find myself thinking about a particular design principle of Rust today. I’m not sure I’ve ever seen it named specifically before, but it gets referred to from…
Open sourcing our learnings around Windows APIs, COM, C++ and their delightful integration into Swift - while building Arc.
Scott Mabin's blog
The question of which language suits best for compiler development is a frequent one amongst language enthusiasts (e.g., see discussions here , here , and here ). Sadly, most of the commenters either 1) just answer with their language of choice without any explanation, or 2) provide a vague explanation without any…
Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.
Thank you to Seth Brown, Eric Oestrich, and Kevin Rankin for reviewing this article.
Its declarative lunch was partly eaten
My Thursday CppCon talk is now online. Note: There’s already a Reddit thread for it, so if you want to comment on the video I suggest you use that thread instead of creating a new one. At Cpp…
Building UIs in HTML+CSS can be untenable. When making complex frontend experiences, I reach for Elm.