Posts

Showing posts from March, 2017

Rust is beautiful

I've invested some time to learn in detail about Rust, which means reading the excellent online book here . And it is beautiful. It makes me wish I could pause the world for a few years, to convert some 500,000 lines of C++ that exist under my purview into Rust, and continue from there. Rust seems to take all the little design lessons I've learned in 20 years of C++ programming, and consolidates them into one language: It's not best that everything is mutable by default, and const if the programmer points it out. It's healthier the other way around. The fundamental string type is a sensible, immutable string slice (in Rust, a &str ). This is great for zero-copy parsers, such as nom . Our code has had that for a decade – I named it Seq , or SeqPtr . C++ is adding std::string_view in C++17. Elegant built-in variant with pattern-matching (in Rust, this is an enum ). C++ is adding std::variant in C++17. Type traits solve the problems of abstraction and generics

Limitations of Central-American pronunciation

OK, pet peeve. We (probably) know how native English speakers have trouble pronouncing Spanish – and most other languages – in a way that doesn't sound silly. English uses Latin in legal contexts, and I personally cringe how it's pronounced. I was brought up on classical and ecclesiastical Latin pronunciation, and Latin pronounced by English speakers sounds like none of that. To me, it sounds most like pig Latin . But interestingly, the vocal range of Central American Spanish speakers – in my experience, Costa Rican and Nicaraguan – is even more restricted. "How could that be?" you ask. "They can pronounce rolled Rs !" Yes they can. But here are a few words that Central Americans I've met cannot properly pronounce: English Central American pizza Pronounced pixa . shorts Pronounced chor , as in "el chor" (masculine singular: short pants). sushi Pronounced suchi . Marshall (the name) Pronounced Marchal . Mitsubishi Pronounced Mitsubichi