Urgent.News

What's breaking now, across thousands of outlets.

Editions

Tech

Going freestanding

In the world of programming, Go is a language that can be compiled to C code, creating a subset known as Solod. This subset aims to provide a Go-like experience while allowing the resulting code to be freestanding, independent of a standard library or specific operating system runtime. The author of Solod, who preferred writing C code with Go, decided to port Go's standard library to make as many packages as possible freestanding. This post describes the techniques used to achieve this goal.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at antonz.org →

More in Tech

Money as a data type

Most guides open with 0.1 + 0.2 === 0.30000000000000004 and conclude "don't use floats for money." True, and not very useful.

  • Money is a combination of number, currency, scale, and rounding policy
  • Floats for money can lose precision and cause unexpected results
  • Storing minor units as integer values in BigInt ensures exactness

More from Thursday 20 August →