Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: typ Clear Filter

I write type-safe generic data structures in C

June 25, 2025・7 minute read I write type safe generic data structures in C using a technique that I haven’t seen elsewhere. It uses unions to associate type information with a generic data structure, but we’ll get to that. My approach works for any type of data structure: maps, arrays, binary trees… but for this article I illustrate the ideas by implementing a basic linked list. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this: typede

Topics: data foo list node type

I Write Type Safe Generic Data Structures in C

June 25, 2025・7 minute read I write type safe generic data structures in C using a technique that I haven’t seen elsewhere. It involves unions and typeof , but we’ll get to that. My approach works for any type of data structure: maps, arrays, binary trees… but for this article I illustrate the ideas by implementing a basic linked list. Since many people aren’t aware you can do C generics at all, I figured I’d start simple and build up to this: typedef struct { int value ; } Foo ; List ( int )

Topics: data foo list node type

Event – Fast, In-Process Event Dispatcher

Fast, In-Process Event Dispatcher This package offers a high-performance, in-process event dispatcher for Go, ideal for decoupling modules and enabling asynchronous event handling. It supports both synchronous and asynchronous processing, focusing on speed and simplicity. High Performance: Processes millions of events per second, about 4x to 10x faster than channels. Processes millions of events per second, about than channels. Generic: Works with any type implementing the Event interface

4-10x faster in-process pub/sub for Go

Fast, In-Process Event Dispatcher This package offers a high-performance, in-process event dispatcher for Go, ideal for decoupling modules and enabling asynchronous event handling. It supports both synchronous and asynchronous processing, focusing on speed and simplicity. High Performance: Processes millions of events per second, about 4x to 10x faster than channels. Processes millions of events per second, about than channels. Generic: Works with any type implementing the Event interface

Why Go Rocks for Building a Lua Interpreter

By Roxy Light I recently needed to build a custom Lua interpreter in Go. The exact reasons aren’t important for this blog post, but neither the reference implementation — which I will be referring to as “C Lua” throughout this article — nor the other open source Go Lua intepreters I could find were a good fit for my needs. Building a Lua interpreter ended up being a rather enjoyable months-long side quest. I’ve had a number of folks ask me to write about the experience since these sorts of proj

The Book Cover Trend of Text on Old Paintings

Like fashion trends, fads in book covers come and go. One year, the backs of women’s heads might be all the rage; the next, soft focus photography. And who can forget the exploding flower craze? Or the proliferation of flames on jackets, from thrillers to science fiction to self-help? But the look that’s commanding today’s runways — a.k.a. bookshelves — is not so incendiary. It tends to lay blaringly bright type in a sans-serif font atop a painting, usually a few centuries old but not always. F

Parsing JSON in Forty Lines of Awk

JSON is not a friendly format to the Unix shell — it’s hierarchical, and cannot be reasonably split on any character (other than the newline, which is not very useful) as that character might be included in a string. There are well-known tools such as jq that let you correctly parse JSON documents in the shell, but all require an additional dependency. Another option is to use Python, which is ubiquitous enough that it can be expected to be installed on virtually every machine, and for new proje

This HP Desktop Tower (i7/32GB/1TB) Is 72% Off, Amazon Smashes Prices Ahead of Prime Day

It’s easy to get caught up in the enthusiasm over tiny desktops like the Mac Mini, but Windows fans have some incredible options for desktop towers. Among the best values currently available is the HP Pavilion desktop tower computer (Intel 8-Core i7-11700F, 32GB DDR4 RAM, 1TB PCIe SSD, GeForce GT 610 2GB) that just dropped down to an all-time low price on Amazon as part of its Early Prime Day sale. This is not limited to Prime members and everyone deserves this fantastic $1,700 price drop, redu

Parameterized types in C using the new tag compatibility rule

June 26, 2025 nullprogram.com/blog/2025/06/26/ C23 has a new rule for struct, union, and enum compatibility finally appearing in compilers starting with GCC 15, released this past April, and Clang later this year. The same struct defined in different translation units (TU) has always been compatible — essential to how they work. Until this rule change, each such definition within a TU was a distinct, incompatible type. The new rule says that, ackshually, they are compatible! This unlocks some

Memory safety is table stakes

The past few years has seen a massive success story for systems programming. Entire categories of bugs that used to plague systems programmers—like use-after-free, data races, and segmentation faults—have begun to completely disappear. The secret to this new reality is a set of systems programming languages chief among them Rust—whose powerful type systems are able to constructively eliminate these kind of bugs; if it compiles, then it’s correct … or at least, will not contain use-after-free or

Memory Safety Is Merely Table Stakes

The past few years has seen a massive success story for systems programming. Entire categories of bugs that used to plague systems programmers—like use-after-free, data races, and segmentation faults—have begun to completely disappear. The secret to this new reality is a set of systems programming languages chief among them Rust—whose powerful type systems are able to constructively eliminate these kind of bugs; if it compiles, then it’s correct … or at least, will not contain use-after-free or

Typr – TUI typing test with a word selection algorithm inspired by keybr

typr TUI typing test with a word selection algorithm inspired by keybr Features Word selection algorithm to optimize your typing speed inspired by keybr weighted by: Accuracy with the letter Frequency of the letter in the English language Speed at which you type the letter A cool TUI with curses Stores your data in a JSON file Installation Windows git clone https://github.com/Sakura-sx/typr.git cd typr pip install -r requirements.txt python3 main.py Linux git clone https://github.com/S

Topics: git main py python3 typr

Forget the Mac Mini, This HP Mini PC with Windows 11 Pro Is 70% Off in Early Prime Day Deals

HP is competing directly with Apple’s Mac Mini in the world of compact desktops. The HP Pro Mini 400 G9 Mini PC is currently available at a record low price on Amazon and makes it a great chance to get a high-end machine at a much lower cost. The price is the big news: this model (32GB DDR4 RAM, 1TB PCIe SSD, Intel 6-Core i5-12500T) is now just $699 which is 70% off its usual price of $2,339. On HP’s own website, a similar setup would cost close to the original price. See at Amazon Build for

Topics: mini pc price type usb

Higher: Favourite Haskell type classes for Rust (2023)

higher The functor hierarchy and other terrible ideas for Rust. Yes, this gives you generalisable monads in Rust. No, they're not very nice compared to Haskell, because Rust's functions aren't quite as first class from the type system's perspective as you might like them to be, type constraints in trait implementations can be a serious headache when you want to implement, say, Functor for HashSet , and the type system can be particularly obtuse at times and need a lot of additional and extreme

Topics: f1 f2 fn target type

Excalidraw+ Is Now SoC 2 Certified

TL;DR: Our SOC 2 Journey We got tired of endless security questionnaires, so we got SOC 2 certified to make things smoother for everyone. The process: Used Vanta to connect our services and fix compliance gaps Wrote a ton of policies Implemented zero-trust production access Upgraded our tech stack (Nx, Infisical, monitoring, VPN, etc.) Did penetration testing Evaluated all vendors Result: Passed SOC 2 Type I 🎉 In progress: Type II Next: maybe GDPR, maybe ISO 27001 (depends on demand)

Canadian telecom hacked by suspected China state group

Hackers suspected of working on behalf of the Chinese government exploited a maximum-severity vulnerability, which had received a patch 16 months earlier, to compromise a telecommunications provider in Canada, officials from that country and the US said Monday. “The Cyber Centre is aware of malicious cyber activities currently targeting Canadian telecommunications companies,” officials for the center, the Canadian government’s primary cyber security agency, said in a statement. “The responsible

Canada says telcos were breached in China-linked espionage hacks

In Brief The Canadian government and the FBI say they are aware of malicious activity targeting telecommunication companies across Canada, attributing the intrusions to the China-backed hacking group Salt Typhoon. In a joint advisory out late Friday, the feds said at least one unnamed Canadian telco was hacked in mid-February this year, in which hackers manipulated three Cisco-made routers to allow stealthy traffic collection from its network. The feds say that separate investigations suggest

Canada says Salt Typhoon hacked telecom firm via Cisco flaw

The Canadian Centre for Cyber Security and the FBI confirm that the Chinese state-sponsored 'Salt Typhoon' hacking group is also targeting Canadian telecommunication firms, breaching a telecom provider in February. During the February 2025 incident, Salt Typhoon exploited the CVE-2023-20198 flaw, a critical Cisco IOS XE vulnerability allowing remote, unauthenticated attackers to create arbitrary accounts and gain admin-level privileges. The flaw was first disclosed in October 2023, when it was

Scientists Just Found a New, Incredibly Rare Blood Type

Step aside A, B, and O—there’s a new player in town. Scientists in France have just reported the discovery of a novel, rare blood type, only recorded in a single person to date. The French Blood Establishment (EFS), the country’s sole civilian blood transfusion organization, announced the discovery over the weekend. The blood type, nicknamed “Gwada negative,” was found in a French woman originally from Guadeloupe. It’s the 48th distinct blood group system to be established. “This discovery was

Meet Google Martha, the company’s Android XR smart glasses prototype

TL;DR Google demoed its Android XR smart glasses prototype at Google I/O 2025. We now learn that this Android XR prototype is called “Google Martha.” Its companion app handles connected features like notifications, settings access, video recording from the user’s perspective, and more. After over a year of teasing with Project Astra, Google showed off its Android XR glasses on stage at Google I/O 2025. My colleague C. Scott Brown even got to try them on, and he was impressed with the demo. Si

I wrote my PhD Thesis in Typst

I wrote my PhD Thesis in Typst I recently submitted my PhD thesis, and while waiting for the physical copies to get printed I thought I'd write about something you (hopefully) wouldn't notice when reading it. I wrote it in Typst, not LaTeX. In this post I will talk a bit about what went well and what didn't. Typst (https://typst.app/) is a modern take on a typesetting language that I think has a real shot at dethroning LaTeX. I would describe the language as a mix of markdown and dynamically t

Asus ROG Azoth X Review: A Space-Age Gaming Keyboard

A lot of mechanical keyboards struggle with aesthetics. It’s hard to get right! If the styling is overdone, you might inhibit functionality or just have too much going on visually. If you stick to the basics, you might end up with a bland keyboard. Whichever way you go, there’s still a chance you’ll get it wrong and have something that doesn’t look good. But there’s been an influx of really well-designed keyboards of late: Keychron’s K2 HE Special Edition is a great example, along with the Mcho

What happens when AI comes for our fonts?

Monotype is keen for you to know what AI might do in typography. As one of the largest type design companies in the world, Monotype owns Helvetica, Futura, and Gill Sans — among 250,000 other fonts. In the typography giant’s 2025 Re:Vision trends report, published in February, Monotype devotes an entire chapter to how AI will result in a reactive typography that will “leverage emotional and psychological data” to tailor itself to the reader. It might bring text into focus when you look at it and

Verified dynamic programming with Σ-types in Lean

1. Introduction If you’ve taken an algorithms class, you have likely seen dynamic programming, specifically a technique called memoization. Memoization works to optimize recursive algorithms by caching the solutions to subproblems in a table, and when a subproblem is encountered, it queries the table instead of recomputing the solution. This gives us an exponential performance boost. This blog post will show how to solve a dynamic programming problem using memoization in Lean, and verify its c

Verified Dynamic Programming with Σ-types in Lean

1. Introduction If you’ve taken an algorithms class, you have likely seen dynamic programming, specifically a technique called memoization. Memoization works to optimize recursive algorithms by caching the solutions to subproblems in a table, and when a subproblem is encountered, it queries the table instead of recomputing the solution. This gives us an exponential performance boost. This blog post will show how to solve a dynamic programming problem using memoization in Lean, and verify its c

A real fixed-point decimal crate in Rust

Primitive fixed-point decimal types. Rust built-in f32 and f64 types have two drawbacks: can not represent decimal numbers in base 10 accurately, because they are in base 2; can not guarantee the fraction precision, because they are floating-point. This crate provides fixed-point decimal types to address the issues by using integer types to represent numbers with a scaling factor (also called as "scale") in base 10 to achieve the accuracy. This is a common idea. Many other decimal crates do

Telecom giant Viasat breached by China's Salt Typhoon hackers

Satellite communications company Viasat is the latest victim of China's Salt Typhoon cyber-espionage group, which has previously hacked into the networks of multiple other telecom providers in the United States and worldwide. Viasat provides satellite broadband services to governments worldwide and aviation, military, energy, maritime, and enterprise customers. Last month, the telecom giant told shareholders that it had approximately 189,000 broadband subscribers in the United States. The comp

I found the 'Goldilocks' of travel chargers - now I don't leave home without it (plus it's on sale)

ZDNET's key takeaways The Tessan 65W GaN Universal Travel Adapter retails for $43. It's the perfect size, weight, and power output for traveling. It doesn't convert mains AC voltage, and the USB ports on the bottom can be tricky to use. $37.99 at Amazon Gone are the days of packing multiple chargers with different connectors when traveling. Now, universal travel adapters are the way to go: one adapter that works in over 220 countries and compatibility with both USB-A and USB-C devices. Also:

Police seizes Archetyp Market drug marketplace, arrests admin

Law enforcement authorities from six countries took down the Archetyp Market, an infamous darknet drug marketplace that has been operating since May 2020. Archetyp Market sellers provided the market's customers with access to high volumes of drugs, including cocaine, amphetamines, heroin, cannabis, MDMA, and synthetic opioids like fentanyl through more than 3,200 registered vendors and over 17,000 listings. Over its five years of activity, the marketplace amassed over 612,000 users with a tota

Writing a Truth Oracle in Lisp

This post assumes some familiarity with typed functional programming, Lisp, and formal logic. Today we will attempt to write a truth oracle in Lisp. By "truth oracle," I mean a program that can determine whether arbitrary mathematical statements are true or false. This might sound impossible, due to first-order logic being undecidable, but let's try anyway. Before that, though, we need to go over some required concepts. Extracting information from proofs First, sometimes, we can extract info