Topics /

Programming Languages

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

2020
123

Which Parsing Approach?

We all know that parsing is an important part of designing and implementing programming languages, but it’s the equivalent of Brussels sprouts: good for the diet, but a taste that only a select few enjoy. Unfortunately, I’ve come to realise that our general distaste for parsing is problematic. While many of us think…

126

F (2006)

F is a pure functional concatenative language originally designed as an extension of False . F contains the list-operations of K3 and the dip combinator of Joy . Floating-point and symbolic datatypes are supported. One-time assignment is enforced in syntax. A theory of function-valence and -charge is outlined. F also…

130

Lambda Calculus Diagrams (2015)

The following table shows diagrams of identity, the booleans, some standard combinators, some Church numerals, the predecessor function on Church numerals, and Omega. term definition diagram alternative I/1 λx.x K/true λx.λy.x false/0 λx.λy.y S λx.λy.λz.(x z)(y z) Y λf.(λx.x x)(λx.f(x x)) 2 λf.λx.f(f x) 3 λf.λx.f(f(f…

131

I rewrote a Clojure tool in Rust

About two years ago, I wrote a quite complicated diff tool in Clojure. It was complicated enough that I struggled to fit the algorithm in my head and the inputs were large enough that I had to make some efforts to improve performance.

134

Python's Innards: Introduction (2010)

A friend once said to me: You know, to some people, C is just a bunch of macros that expand to assembly . It’s been years ago (smartasses: it was also before llvm , ok?), but the sentence stuck with me. Do Kernighan and Ritchie really look at a C program and see assembly code? Does Tim Berners-Lee surf the Web any…

136

Micro C, Part 3: Generating LLVM

In part 2, we completed the user facing part of the compiler with semantic analysis. Now we're free to focus on the backend, generating LLVM. To do so, we'll use the llvm-hs-pure library, which embeds LLVM into a Haskell ADT, allowing us to manipulate it without having to set up any FFI.|A blog about various…

138

Assembly's Perspective of C

If you are living under a rock, quarantined against COVID-19, here’s quite a long, and somewhat technical, post for your consumption. This post will talk about how C and assembly dance together–the tango? waltz? who knows?

143

J Notation as a Tool of Thought

Kenneth Iverson’s 1964 language, APL, won him the Turing Award. His award lecture, Notation as a Tool of Thought, argued that better notations would lead people to deeper insights about mathematics. He provided a number of examples ranging across linear algebra, arithmetic, probability, and logic. Unfortunately, most…

144

The Go Compiler Needs to Be Smarter

One of my favorite languages is the Go language. I love its simplicity. It is popular and useful in a cloud setting. Many popular tools are written in Go, and for good reasons. I gave a talk on Go last year and I was asked for a criticism of Go. I do not mind that … Continue reading The Go compiler needs to be smarter

149

Guitar Chord Voicings with Prolog

Prolog is a language that excels at defining and exploring relationships. Let’s take advantage of that and use Prolog to explore a few of the myriad of relationships that exist between chords and the guitar’s fretboard.