Topics /

Programming Languages

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

2021
151

The Problem with Macros

So we’re supposed to be writing a game, right? But in order to make progress, we have to fix a bug. And in order to fix the bug, we have to write a test. And in order to write a test, we have to write a test framework. And in order to write a test framework, we have to understand a thing or two about macros. Okay. So…

152

Python's Type Checking Renaissance

You may have heard that TypeScript has been taking the web development space by storm in the last few years , bringing to it static types. I believe the same thing is starting to happen in the world of Python, where type checkers like mypy , Pyre , and Pyright are increasingly used, at least where Python is used by…

153

strcpy: A niche function you don't need

The C strcpy function is a common sight in typical C programs. It’s also a source of buffer overflow defects, so linters and code reviewers commonly recommend alternatives such as strncpy (difficult to use correctly; mismatched semantics), strlcpy (non-standard, flawed ), or C11’s optional strcpy_s ( no correct or…

157

Go’ing Insane: Endless Error Handling

I’ve been using Go for a few years now, mostly in my open source project Lazygit. In my day job I use Ruby and Typescript, and I’ve also spent some time with Rust. Each of those languages have design quirks that can grind a developer’s gears, and although my own precious gears have been ground by every language I’ve…

161

I got the J language working on OpenBSD

Yes, I am aware that I am interrupting our self-hosting PL/0 compiler series but I think it will be worth it. Earlier today, I got the J language system running on OpenBSD . I find it important to write these up, because it helps me preserve my own knowledge of what I did and hopefully it will help others porting…

168

A brief introduction to esoteric programming languages

This is the companion reference for A Brief Introduction to Esoteric Languages, my lecture for a friend’s college class. The video should be legible to other viewers, and the material here should be (mostly) understandable without watching the video. The Esolangs Listed roughly in order of appearance in the talk, with…

170

Let's write a compiler, part 3: A parser

Tokenizing the source code input is a great start for our compiler. Now let's turn our attention to parsing the PL/0 grammar. Once we have finished with the parser, the front end of our compiler will be finished and we will have a PL/0 validator. This is a program that can read in PL/0 source code and inform the user…

173

Modern C++ for C Programmers (2018)

Welcome to part 1 of Modern C++ for C Programmers, please see the introduction for the goals and context of this series. In this part we start with C++ features that you can use to spice up your code ’line by line’, without immediately having to use all 1400 pages of ‘The C++ Programming Language’. Various code…

174

Rust is for Professionals

A professional programmer delivers value through the authoring and maintaining of software that solves problems. (There are other important ways for professional programmers to deliver value but this post is about programming.)

176

Python vs Common Lisp, workflow and ecosystem (2019)

I learned Java and C at school, I learned Python by myself and it was a relief. After 8 years working and doing side projects in Python and JavaScript (mostly web dev, Django/Flask/AngularJS/Vuejs), I am not satisfied anymore by the overall experience so I’m making Common Lisp my language of choice.I am not here…