Explore >> Select a destination


You are here

blog.m-ou.se
| | mbuffett.com
11.7 parsecs away

Travel
| | Recently I've been working on a project to surface census data via a GraphQL API, mostly as a way to learn GraphQL. I did end up learning GraphQL, but I also ended up learning a lot about proc macros. I was using Juniper, which creates a GraphQL schema using structs like this: #[derive(GraphQLObject, Copy, Clone, Debug)] struct Demographics { female: Option, male: Option, } The problem, is that the census data I was looking to surface had way too many variables, I would have had to write out 207 structs, with a total of 352 fields. Here's a nice tree-view of the census data, courtesy of the frangipanni tool. Obviously, I didn't want to write out all these structs and fields by hand, even with some fancy vim macros that would have been too much tedious work for a side project that's supposed to be fun.
| | cprimozic.net
8.7 parsecs away

Travel
| |
| | blog.jetbrains.com
7.2 parsecs away

Travel
| | Have you ever wondered how Rust's procedural macros work? In this blog post series, we will get into the details! A member of our team, Vladislav Beskrovny, recently gave a talk on the topic at RustCo
| | zackoverflow.dev
79.5 parsecs away

Travel
| Interfaces rely on slow dynamic-dispatch, but generics could open the door to performance boosts with the ability to leverage the cache-friendliness of static dispatch