サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
WWDC24
fasterthanli.me
I am greeted with a terminal interface that says: "Welcome to GNU Emacs, one component of the GNU/Linux operating system". I feel religious already. To open src/main.rs, I can press C-x C-f, where C- means Ctrl+ (and M- means Alt+, at least for me), which opens a "Find file" prompt at the bottom, pre-filled with the current working directory: for me that's ~/bearcove/bottom. There's tab-completion
Contents Mise en bouche Let's start with HTTP/1.1 The practicalities of proxying HTTP/1.1 Also, TLS Making HTTP/1.1 requests with reqwest Making HTTP/1.1 requests with hyper Making HTTP/1.1 requests ourselves Making HTTP/2 requests with hyper Making HTTP/2 requests with h2 Making HTTP/2 requests ourselves HTTP semantics over HTTP/2 Bugs, bugs, bugs! Afterword HTTP does a pretty good job staying ou
Proc macro support in rust-analyzer for nightly rustc versions Contents A tale of one and a half compilers Two kinds of macros Proc macros in rustc Proc macros in rust-analyzer The proc macro bridge interface The long-term support plan So, are we good? What's next? Thanks Bye for now I don't mean to complain. Doing software engineering for a living is a situation of extreme privilege. But there's
Disclosure: At the time of this writing, I benefit from the fly.io "Employee Free Tier". I don't pay for side projects hosted there "within reasonable limits". The project discussed here qualifies for that. Why you might want a remote dev environment Fearmongering aside — and Cthulhu knows there's been a bunch, since this unfortunate tweet — there's a bunch of reasons to want a remote dev environm
Contents Different kinds of numbers Conversions and type inference Generics and enums Implementing traits Return position Dynamically-sized types Storing stuff in structs Lifetimes and ownership Slices and arrays Boxed trait objects Reading type signatures Closures Async stuff Async trait methods The Connect trait from hyper Higher-ranked trait bounds Afterword It happened when I least expected it
Contents The author is a platypus Mom smokes, so it's probably okay The good parts Go is an island All or nothing (so let's do nothing) "Rust is perfect and you're all idiots" Go as a prototyping/starter language In the two years since I've posted I want off Mr Golang's Wild Ride, it's made the rounds time and time again, on Reddit, on Lobste.rs, on HackerNews, and elsewhere. And every time, it el
Contents A simple web server The case for async Enter tokio A bit of tracing And now, a proper http framework A useful http service A little caching can't hurt Making it generic Panic! at the in-flight request As the popular saying goes, there are only two hard problems in computer science: caching, off-by-one errors, and getting a Rust job that isn't cryptocurrency-related. Today, we'll discuss c
Contents The size of the forest Fuck around now, find out... when? Also, types Losing the thread Off to the race conditions You can't use an old map to explore a new world But not all is preventable I still get excited about programming languages. But these days, it's not so much because of what they let me do, but rather what they don't let me do. Ultimately, what you can with a programming langu
Contents What is cargo even doing How much time are we spending on these steps? Linker, is it you? Debug symbols, perhaps? Incremental builds Link-time optimization (LTO) Rustc self-profiling Warp, I trusted you Revisiting all the other changes Splitting into more crates! Conclusion I've recently come back to an older project of mine (that powers this website), and as I did some maintenance work:
Contents But enough about shells A little assembly, as a treat Moving on up Something doesn't add up Getting past denial and anger Oh good, channels. Don't Make Me Wait Updates and follow-ups Has this ever happened to you? You want to look at a JSON file in your terminal, so you pipe it into jq so you can look at it with colors and stuff. ...oh hey cool bear. No warm-up today huh. Sure, fine, okay
Contents Doing something useful Fetching two things It's waiting for the first one to finish It's not because of threads Interlude: let's not leak memory Let's get rid of DNS altogether tokio's try_join macro Pretty bad as it turns out We can do better Deeper? That's it So! Rust futures! Easy peasy lemon squeezy. Until it's not. So let's do the easy thing, and then instead of waiting for the hard
Contents A practical and very innocent example The great appearing act What were we doing again? What the heck is a Box? But let's get back to boxes Now for some more Rust One Sized fits all The many ways we can return a Result Error propagation and the ? sigil How does Box unify types? How do we unify types without forcing a heap allocation? Here's a sentence I find myself saying several times a
Contents What's a dylib? And now, some Rust A Rust dynamic library And now, some reloading What can prevent dlclose from unloading a library? How do we make a constant symbol? More like "breakaround" A little memory leak, as a treat Having fun Fun, in larger quantities Let's draw some stuff Afterword Good morning! It is still 2020, and the world is literally on fire, so I guess we could all use a
Contents Scaffolding Parsing a JSON data set Profiling memory allocations The report subcommand As few allocations as possible The smol_str crate The smartstring crate Let's summarize Hey everyone! This article is brought to you by a shameless nerd snipe, courtesy of Pascal. In case you've blocked Twitter for your own good, this reads: There should be a post explaining and comparing smolstr and sm
Contents Variable bindings The let keyword Type annotation Uninitialized variables Throwing values away Shadowing bindings Tuples Destructuring tuples Statements Functions Blocks Blocks are expressions Implicit return Everything is an expression Field access and method calling Modules, use syntax Types are namespaces too The libstd prelude Structs Struct update syntax Destructuring structs Pattern
Contents Garden-variety takes on Go Simple is a lie Lots of little things Parting words April 2022 Update My honeymoon with the Go language is extremely over. This article is going to have a different tone from what I've been posting the past year - it's a proper rant. And I always feel bad writing those, because, inevitably, it discusses things a lot of people have been working very hard on. In s
Contents But first, let me write assembly Executables have been fascinating to me ever since I discovered, as a kid, that they were just files. If you renamed a .exe to something else, you could open it in notepad! And if you renamed something else to a .exe, you'd get a neat error dialog. Clearly, something was different about these files. Seen from notepad, they were mostly gibberish, but there
Contents Clear, simple, and wrong A very quick UTF-8 primer Back to C Now for some Rust Error handling Iteration Passing strings around uppercase, but in Rust Closing words There's a question that always comes up when people pick up the Rust programming language: why are there two string types? Why is there String, and &str? My Declarative Memory Management article answers the question partially,
このページを最初にブックマークしてみませんか?
『fasterthanli.me』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く