Topics /

Programming Languages

The most popular blog posts about programming languages on Hacker News. 246 posts.

2024
126

Zngur: A C++/Rust interop tool

Zngur (/zængɑr/) is a C++/Rust interop tool. It tries to expose arbitrary Rust types, methods, and functions while preserving their semantics and ergonomics as much as possible. Using Zngur, you can use arbitrary Rust crates in your C++ code as easily as using them in normal Rust code, and you can write idiomatic…

128

Pratt Parsers: Expression Parsing Made Easy (2011)

Every now and then, I stumble onto some algorithm or idea that’s so clever and such a perfect solution to a problem that I feel like I got smarter or gained a new superpower just by learning it. Heaps were one, just about the only thing I got out of my truncated CS education. I recently stumbled onto another: Pratt or…

135

Lessons learned from a successful Rust rewrite

I have written about my on-going rewrite-it-to-Rust effort at work: 1 , 2 , 3 . And now it's finished, meaning it's 100% Rust and 0% C++ - the public C API has not changed, just the implementation, one function at time until the end. Let's have a look back at what worked, what didn't, and what can be done about it.

136

A lowering strategy for control effects in Rust

The Rust language has incrementally grown a set of patterns to support control-flow effects including error handling, iteration, and asynchronous I/O. In The registers of Rust , boats lays out four aspects of this pattern shared by Rust’s three effects. Today these effects are typically used in isolation, or at most…

137

C++ Safety, in Context

Scope. To talk about C++’s current safety problems and solutions well, I need to include the context of the broad landscape of security and safety threats facing all software. I chair the ISO C++ s…

139

From string to AST: parsing (2019)

Whether you have to do with data in the form of CSV, JSON or a full-blooded programming language like C, JavaScript, Scala, or maybe a query language like SQL, you always transform some sequence of characters (or binary values) into a structured representation. Whatever you’ll do with that representation depends on…

143

The Evolution of a Haskell Programmer (2001)

Some time later, I came across Iavor�s "jokes" page, including a funny bit called � The Evolution of a Programmer � in which the traditional imperative "Hello, world" program is developed through several variations, from simple beginnings to a ridiculously complex extreme. A moment�s thought turned up the factorial…