Topics /

Programming Languages

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

Any year
3544

Why I find IEEE 754 frustrating

Programming languages new (Java) and old (Fortran), and their compilers, still lack competent support for features of IEEE 754 so painstakingly provided by practically all hardware nowadays. […] Programmers seem unaware that IEEE 754 is a standard for their programming environment, not just for hardware. William Kahan

3551

Writing a recursive ascent parser by hand

I’ve been exploring various ways to write parsers. For a long time, I’ve used hand-written recursive descent for its straightforwardness, flexibility, and performance. There is another way—parser generators like Menhir , LALRPOP , or the venerable Bison use the bottom-up LR algorithm .

3554

Memory layout in Zig with formulas

I was recently encouraged to watch A Practical Guide to Applying Data Oriented Design (DoD) by Andrew Kelley, the creator of Zig1. Just 10 minutes into the talk, I was confronted with a skill I had never formally learned… the arithmetic behind memory layout of types. Zig is a modern, C-like programming language which…

3556

(An ((Even Better) Lisp) Interpreter (in Python))

The tokens #t and #f are the True and False literals, respectively. The single quote mark serves to quote the following expression. The syntax ' exp is completely equivalent to (quote exp ) . The backquote character ` is called quasiquote in Scheme; it is similar to ' except that within a quasiquoted expression, the…

3559

Typesafe Neural Networks in Haskell with Dependent Types

It seems these days like programming with dependent types in Haskell (and its advantages) is moving slowly but steadily to the mainstream of Haskell programming. In the current state of Haskell education, dependent types are often considered topics for “advanced” Haskell users. However, I can foresee a day where the…

3560

The Story of a Rust Bug

A while ago, I built a system-tray application in Rust to notify me of new e-mail called buzz. It was working fine, but every now and again, it would fail to connect to the mail server on boot if it started before my network connection was up. Sounds easy enough to fix, so I just added a loop around my connect (even…

3569

What’s to love about C?

Antiquated, clunky, and unsafe. Though beloved to some, C is a language that many choose to hate. The mass opinion is indeed so negative it’s hard to believe that anybody would program anything in C. Yet they do. In fact a lot of things, even new things, are programmed in C. The standard was recently […]