A blog about programming, languages, compilers, optimization, performance, CPUs, technology, and everything else. Why use 50 words when 500 will do. =D

Story-time: C++, bounds checking, performance, and compilers

Recently, several of my colleagues at Google shared the story of how we are retrofitting spatial safety onto our monolithic C++ codebase: https://security.googleblog.com/2024/11/retrofitting-spatial-safety-to-hundreds.html I wanted to have a bit of story-time about some of the strange ways that all this came to be, at least as I remember things. There are some really interesting developments that led us here, and some important lessons to learn from that history. Do note that this is just my retrospective memory. It’s entirely possible I’m misremembering some of it (let me know if so!). It’s also limited to my perspective, and others may have seen very different aspects of things (please share!). ...

November 16, 2024 · 2180 words
Carbon code syntax highlighting in Vim

Summer of Code: Editor Integration

Note: This is the second of two guest blog posts from Carbon’s Google-Summer-of-Code contributors this year. Introduction I’m Manmeet Singh, and I took part in Google Summer of Code 2023, contributing to the Editor Integration for the Carbon Language. In the realm of software development, a seamless editor experience is of paramount importance. My Google Summer of Code project was to improve the developer experience for Carbon programming language enthusiasts by integrating Carbon into various editors and IDEs. This post takes you on a journey through the Editor Integration project for Carbon, highlighting its accomplishments, current state, challenges, and future prospects. ...

November 28, 2023 · 656 words · Manmeet Singh

Improving the user-facing Carbon Explorer output

Note: This is the first of two guest blog posts from Carbon’s Google-Summer-of-Code contributors this year. Carbon Explorer is a prototype interpreter for Carbon whose primary purpose is to act as a clear executable specification of the language. It can also be used as a platform for prototyping and validating changes to the language. Its intended audience is people working on the design of Carbon, and it is not intended for real-world Carbon programming on any scale. ...

November 21, 2023 · 3800 words · Prabhat Sachdeva

The RSS feed is (hopefully) fixed!

Earlier this year, while at CppNow, I completely broke the RSS feed for this blog. Really sorry about that, and thanks to Jonathan for pointing it out. However, I have been distracted with work, life, and a bunch of complications over the intervening months and have only now managed to fix it. I hope? Let’s hope. As is all-too-common, the fix was easy once I understood how to fix it and understood the surprising constraints on how to add that fix to the blog infrastructure. ...

November 15, 2023 · 636 words

The little things #1: Access control

This post is part of a series looking at little details of programming language design, mostly in the context of Carbon. Check out the series intro post for context and other entries. Let’s talk about public vs. private! Folks who know C++ may be familiar with these concepts, but here is a quick example: class MyType { public: void MyPublicFunction(); private: void InternalDetail(); }; One of the things that has always been frustrating to me are exactly how public and private work here. They introduce regions of declarations, not a single declaration. And the default depends on how you declare the class? 😤 This is almost certainly just a personal thing, and I have no evidence this is a real source of confusion, but it grinds my gears. Anyways, the result is: ...

March 26, 2023 · 805 words

The little things in languages

Working on a programming language is one of the most challenging and open ended design spaces that I have ever tried to operate in, both for existing and brand new languages. There are very few bounds or constraints on the solution space to help guide and direct my thinking. Everything is ambiguous and open ended with endless possibilities. It sounds great to me… until I need to make progress. Then… not so much. ...

March 26, 2023 · 250 words

Welcome

Welcome everyone to my first “real” blog. =] To set some initial expectations, not all of these posts will be of super high quality published material. Often, I plan to use them for random musings and thoughts which I might have posted somewhere like Hachyderm, but required a bit more text or formatting than makes sense in toot or tweet. Plus, I’d like a forum outside of the bad bird site and more accessible than Mastodon. ...

February 3, 2023 · 214 words