Topics /

Programming Languages

The most popular blog posts about programming languages on Hacker News. 5,634 posts.

Any year
4536

How Old School C Programmers Process Arguments

Here’s a bit of code from Kernighan’s and Ritchie’s seminal text, The C Programming Language . I’m not sure I’d actually recommend coding this way (as written in the book, the entire program has only one comment), but it’s so darn clever and concise, I can’t help but post it. This snippet is part of a larger program…

4539

Go Naming Conventions: A Practical Guide

My new book guides you through the start-to-finish build of a real world web application in Go — covering topics like how to structure your code, manage dependencies, create dynamic database-driven pages, and how to authenticate and authorize users securely .

4542

Swift 5 Exclusivity Enforcement

The Swift 5 release enables runtime checking of “Exclusive Access to Memory” by default in Release builds, further enhancing Swift’s capabilities as a safe language. In Swift 4, these runtime checks were only enabled in Debug builds. In this post, I’ll first explain what this change means for Swift developers before…

4545

Borrow checking without lifetimes

This blog post explores an alternative formulation of Rust’s type system that eschews lifetimes in favor of places . The TL;DR is that instead of having 'a represent a lifetime in the code, it can represent a set of loans , like shared(a.b.c) or mut(x) . If this sounds familiar, it should, it’s the basis for polonius…

4546

JIT and Ruby's MJIT

If you already know lots about JIT in general and Ruby’s MJIT in particular… you may not learn much new in this post. But in case you wonder “what is JIT?” or “what is MJIT?” or “what’s different about Ruby’s JIT?” or perhaps “why in the world did they decide to do THAT?”… Well then, perhaps I can

4550

Turbo Pascal on CP/M, MSX-DOS and MS-DOS

The Pascal language was named after Blaise Pascal (see picture), a French mathematician who was a pioneer in computer development history. In 1641, at the age of eighteen, Pascal constructed the first arithmetical machine, arguably the first computer. He would improve upon the instrument eight years later. In 1650…

4551

Racket v5.3

_posted by Eli Barzilay_ Racket version 5.3 is now available from http://racket-lang.org/ Release Highlights:: Submodules are nested module declarations that can be loaded and run independently from the enclosing module. See also the overview of su...

4555

Static Analysis

Nim is in an excellent position to “get married” with static analysis, and it doesn’t have to be based on some intermediate representation but can achieve a solution more similar to Spark.

4557

Multithreading in modern C++

With the new C++11 Standard, C++ faces the first time challenges of multicore architectures. The 2011 published standard defines how a C++ program has to behave in the presence of multiple threads. The C++11 multithreading capabilities are composed of two components. This is, on the one hand, the defined memory model…

4558

When the Compiler Bites

So far this year I’ve been bitten three times by compiler edge cases in GCC and Clang, each time catching me totally by surprise. Two were caused by historical artifacts, where an ambiguous specification lead to diverging implementations. The third was a compiler optimization being far more clever than I expected…

4560

Compiling to Lua

We use nginx throughout our network for front-line web serving, proxying and traffic filtering. In some cases, we've augmented the core C code of nginx with our own modules, but recently we've made a major move to using Lua in conjunction with nginx. One project that's now almost entirely written in Lua is the new…