Latest Tech News

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

Filtered by: const Clear Filter

Just for fun: animating a mosaic of 90s GIFs

A couple of weeks ago, some former colleagues competed in Brisbane’s Battle of the Tech Bands - and won! I created visuals for six of their songs, which were mostly 90s/2000s covers. It felt only right to theme the visuals around that era too. Here’s how one of my favourites turned out (fittingly for a tech themed battle, it’s rendered entirely in-browser): (Fullscreen at gifs.alex.works) What you’re seeing is a Canvas animation of random old-school GIFs, pulled from the Internet Archive’s Ge

Topics: const gif gifs row width

Just Use HTML

September 10, 2025 Just use HTML I’ve worked on so many projects recently that were more complicated than they needed to be because they used JavaScript to generate HTML. JavaScript is… Slower to load Slower to run More prone to breaking Harder to read and reason about Doesn’t actually look like the final output It’s inferior to just using HTML in nearly every way. I’m not saying never use JavaScript, though. I think JS is great at augmenting and enhancing what’s already there, and addi

Which NPM package has the largest version number?

Which npm package has the largest version number? I spent way too much time on this I was recently working on a project that uses the AWS SDK for JavaScript. When updating the dependencies in said project, I noticed that the version of that dependency was v3.888.0 . Eight hundred eighty eight. That’s a big number as far as versions go. That got me thinking: I wonder what package in the npm registry has the largest number in its version. It could be a major, minor, or patch version, and it doe

Show HN: wcwidth-o1 – Find Unicode text cell width in no time for JavaScript/TS

A TypeScript/JavaScript port of Markus Kuhn’s wcwidth and wcswidth implementations, optimized to O(1). These functions are defined in IEEE Std 1003.1 (POSIX). Superior Performance ⚡️ Instant O(1) lookup time 🌏 Full Unicode 15.1 coverage Getting Started Install Wcwidth-O1 via npm: npm i wcwidth-o1 Usage JavaScript / TypeScript: import wcwidth from 'wcwidth-o1' ; const example1 = wcwidth ( 'a' ) ; // 1 const example2 = wcwidth ( '好' ) ; // 2 const example3 = wcwidth ( '😊' ) ; // 2 or i

This is your chance to save up to $400 on GRID Studio frames

If you’ve ever wanted one of GRID Studio’s famous deconstructed iPhones (or know someone who would really love it), now’s the time. To celebrate GRID Studio’s 5th anniversary, they’re taking hundreds off the regular price. But you have to act quick. We have featured GRID Studio’s frames multiple times on 9to5Mac, and for good reason. From the original iPhone to iPads, MacBooks, iPods, and beyond, their beautiful deconstructed wall art frames always prove popular gifts and collector’s items. No

Many hard LeetCode problems are easy constraint problems

September 10, 2025 Many Hard Leetcode Problems are Easy Constraint Problems Use the right tool for the job. In my first interview out of college I was asked the change counter problem: Given a set of coin denominations, find the minimum number of coins required to make change for a given number. IE for USA coinage and 37 cents, the minimum number is four (quarter, dime, 2 pennies). I implemented the simple greedy algorithm and immediately fell into the trap of the question: the greedy algor

Many Hard LeetCode Problems Are Easy Constraint Problems

September 10, 2025 Many Hard Leetcode Problems are Easy Constraint Problems Use the right tool for the job. In my first interview out of college I was asked the change counter problem: Given a set of coin denominations, find the minimum number of coins required to make change for a given number. IE for USA coinage and 37 cents, the minimum number is four (quarter, dime, 2 pennies). I implemented the simple greedy algorithm and immediately fell into the trap of the question: the greedy algor

A polyglot's guide to multiple-dispatch (2016)

This is the first article in a series dedicated to multiple dispatch - an advanced abstraction technique available to programmers out-of-the-box in some languages, and implementable in others. This first post in the series presents the technique and explains the problem it intends to solve. It uses C++ as the presentation language because C++ does not support multiple dispatch directly, but can be used to implement it in various ways. Showing how multiple dispatch is implemented in a language th

A polyglot's guide to multiple-dispatch

This is the first article in a series dedicated to multiple dispatch - an advanced abstraction technique available to programmers out-of-the-box in some languages, and implementable in others. This first post in the series presents the technique and explains the problem it intends to solve. It uses C++ as the presentation language because C++ does not support multiple dispatch directly, but can be used to implement it in various ways. Showing how multiple dispatch is implemented in a language th

NPM debug and chalk packages compromised

Starting at September 8th, 13:16 UTC, our Aikido intel feed alerted us to a series packages being pushed to npm, which appeared to contain malicious code. These were 18 very popular packages, backslash (0.26m downloads per week) chalk-template (3.9m downloads per week) supports-hyperlinks (19.2m downloads per week) has-ansi (12.1m downloads per week) simple-swizzle (26.26m downloads per week) color-string (27.48m downloads per week) error-ex (47.17m downloads per week) color-name (191.71

Braincraft challenge – 1000 neurons, 100 seconds, 10 runs, 2 choices, no reward

Table of Contents Introduction The computational neuroscience literature abounds with models of individual brain structures, such as the hippocampus, basal ganglia, thalamus, and various cortical areas — from visual to prefrontal. These models typically aim to explain specific functions attributed to each structure. For instance, the basal ganglia are often modeled in the context of decision-making, while the hippocampus is associated with episodic memory and spatial navigation through place c

Stop writing CLI validation. Parse it right the first time

I have this bad habit. When something annoys me enough times, I end up building a library for it. This time, it was CLI validation code. See, I spend a lot of time reading other people's code. Open source projects, work stuff, random GitHub repos I stumble upon at 2 AM. And I kept noticing this thing: every CLI tool has the same ugly validation code tucked away somewhere. You know the kind: if ( ! opts . server && opts . port ) { throw new Error ( " --port requires --server flag " ); } if ( op

SQL needed structure

Published 2025-09-04 Here are two pages from the internet movie database: There are two things to note about these pages. The data on the page is presented in a hierarchichal structure. The movie page contains a director, a list of genres, a list of actors, and each actor in the list contains a list of characters they played in the movie. You can't sensibly fit all of this into a single flat structure like a relation. The order of the hierarchy isn't the same on both pages. On one page we hav

South Korea: 'many' of its nationals detained in ICE raid on GA Hyundai facility

South Korea said Friday that it had expressed “concern and regret” to the U.S. Embassy over an immigration raid on a Hyundai facility in Georgia during which it said “many” South Korean nationals had been detained. “The economic activities of our companies investing in the U.S. and the rights and interests of our nationals must not be unfairly violated,” said Lee Jae-woong, a spokesperson for the foreign ministry of the key U.S. ally, according to the Yonhap news agency. Agents from Immigratio

SQL Needed Structure

Published 2025-09-04 Here are two pages from the internet movie database: There are two things to note about these pages. The data on the page is presented in a hierarchichal structure. The movie page contains a director, a list of genres, a list of actors, and each actor in the list contains a list of characters they played in the movie. You can't sensibly fit all of this into a single flat structure like a relation. The order of the hierarchy isn't the same on both pages. On one page we hav

Magnesium Supplements Crash Course: Benefits and Side Effects

Suddenly, everyone is obsessed with magnesium supplements. It’s the key ingredient in #sleepygirlmocktails, powders stirred into tart cherry juice and prebiotic soda, a wellness cocktail for anxious millennials. Your coworkers are popping magnesium glycinate before bed instead of melatonin, because it allegedly cures insomnia, constipation, and existential dread. Folks seem especially concerned with optimizing their poop and pillow time. In the past year, Google searches for “which magnesium is

Lunar soil machine developed to build bricks using sunlight

Lunar soil machine developed to build bricks using sunlight by Riko Seibo Tokyo, Japan (SPX) Jul 30, 2025 A Chinese research team has created a prototype machine that transforms moon soil into durable construction bricks using solar energy, marking a critical step toward building lunar structures from local materials. Developed by the Deep Space Exploration Laboratory (DSEL) in Hefei, Anhui province, the system functions as a 3D printing device powered by concentrated solar heat. It em

What Are Traces and Spans in OpenTelemetry?

Metrics tell you what changed. Logs tell you why something happened. Traces tell you where time was spent and how a request moved across your system. At the heart of distributed tracing in OpenTelemetry are two core concepts: Trace : The full journey of one request / transaction across services. : The full journey of one request / transaction across services. Span: A timed unit of work inside that journey (function call, DB query, external API call, queue processing, etc.). This guide walks

Make any site multiplayer in a few lines. Serverless WebRTC matchmaking

Below is some code describing whatʼs happening on this site right now. Anyone on this page will connect directly to others in real-time, syncing mouse movement and clicks. (Try it, I dare you). Trystero can connect peers via 🌊 BitTorrent, 🐦 Nostr, 📡 MQTT, 🪐 IPFS, ⚡️ Supabase, and 🔥 Firebase. Right now youʼre the only person with the page open, but you can cheat and just open this URL in another tab to see what itʼs like with others. Hereʼs how you use it. Join a room with an app ID and a ro

Anonymous structavaganza in Zig

Mon Aug 25 2025 When statements disappear, what remains of good semantics? Let’s see what side effects have been introduced! To start, observe this truly primordial ‘C code; struct A {}; struct B {}; void example ( struct A e ); int main (){ example (( struct B){}); } clang output: error: passing 'struct B' to parameter of incompatible type 'struct A' example((struct B ){}); ^~~~~~~~~~~~ THE TYPES ARE UNIQUE. THEY HAVE DIFFERENT NAMES! THE ARE NOMINALLY DIFFERENT. And such it is for all

What Is the Magnetic Constant, and Why Does It Matter?

This means these three values can’t be independent; if you know two of them, you can derive the third. How do physicists deal with this? We define the speed of light as exactly 299,792,458 meters per second. (How do we know it’s exact? Because we define a meter as the distance light travels in 1/299,792,458 of a second.) Then we measure the magnetic constant (μ 0 ) and use that value along with the speed of light to calculate the electric constant (ε 0 ). Maybe that seems like cheating, but to

What Is the Magnetic Constant and Why Does It Matter?

This means these three values can’t be independent; if you know two of them, you can derive the third. How do physicists deal with this? We define the speed of light as exactly 299,792,458 meters per second. (How do we know it’s exact? Because we define a meter as the distance light travels in 1/299,792,458 of a second.) Then we measure the magnetic constant (μ 0 ) and use that value along with the speed of light to calculate the electric constant (ε 0 ). Maybe that seems like cheating, but to

The joy of recursion, immutable data, & pure functions: Making mazes with JS

This post is based on a talk I presented at Web Directions Summit, 2024. Let’s start by addressing the elephant in the room. Why the heck am I talking about making mazes? Normally, I try to be practical when I’m writing or speaking. I want to give people tools they can use to make their coding lives better. So, I try to discuss things like creating DOM elements and processing JSON data. Because those things are practical. I would rather not waste people’s time on things they’re not going to us

The circular economy could make demolition a thing of the past

Most of us are already quite comfortable recycling our household waste. In Spain, for instance, millions of tonnes of packaging are processed every year, but did you know that buildings and their materials can also be recycled, or that an entire building could be completely dismantled and reassembled? Formula 1, often a laboratory for innovation, offers us a real-world example of this in the form of the Red Bull team’s “pit box”, known as the F1Holzhaus – literally, “the wooden house”. It made

What Is the Electric Constant and Why Should You Care?

It's fun to think about the fundamental physical constants. These are special values used in our models of the physical universe. They include things like the speed of light, the gravitational constant, and Planck’s constant, and they’re “fundamental” in the sense that we can't derive them theoretically, we can only measure them. We use these in solving physics problems all the time, so it’s easy to take them for granted. But why are there such numbers in nature, and why do they just happen to

An interactive guide to sensor fusion with quaternions

*01.00* About Welcome to quaternion.cafe! A portal into the world of sensor fusion with quaternions. This vim-inspired tutorial has interactive code editors and 3D visualizations scattered throughout. The content is centered around fusing and integrating a gyroscope with an accelerometer, and explains (with code) how to accomplish this task. All the visualization use real datasets from an actual IMU to illustrate some of the concepts. I spent the last 5 years making this IMU-based telescope ac

SIMD Binary Heap Operations

SIMD binary heap operations Author: Wojciech Muła Added on: 2025-01-18 Introduction Binary heap is a binary tree data structure having some interesting properties. One of them is an array-friendly memory layout, achieved by building (almost) complete binary tree. A binary heap keeps at index 0 the maximum value, or the minimum one depending on convention — let's stick to maximum heaps. There is exactly one invariant: a child node, if exist, keep a value less than the parent node. For compariso

Faster substring search with SIMD in Zig

Faster substring search with SIMD in Zig I’ve been learning a lot about low-level programming languages lately, and for a long time there has been one thing that has interested me: SIMD (or ‘single instruction, multiple data’) code. I’ve seen a lot of articles about having massive performance gains by utilizing SIMD and wanted to learn how to do it myself. This article is a journey into implementing ~60% faster substring searching compared to Zig’s std.mem.indexOf using a SIMD-friendly algorit

Topics: 32 const needle simd zig

Going faster than memcpy

Going faster than memcpy While profiling Shadesmar a couple of weeks ago, I noticed that for large binary unserialized messages (>512kB) most of the execution time is spent doing copying the message (using memcpy ) between process memory to shared memory and back. I had a few hours to kill last weekend, and I tried to implement a faster way to do memory copies. Autopsy of memcpy Here’s the dumb of perf when running pub-sub for messages of sizes between 512kB and 2MB. Children Self Shared Ob

Environmentalist Lawsuit Halts Construction of Florida’s ‘Alligator Alcatraz’

Progress on Florida’s “Alligator Alcatraz” ground to a halt on Thursday, August 7, when a federal judge ordered a two-week ban on construction. The ruling follows a hearing in a lawsuit by environmental groups and the Miccosukee Tribe of Indians. The plaintiffs—Earthjustice, the Center for Biological Diversity, Friends of the Everglades, and the Miccosukee—allege that hasty construction of the facility in the Everglades unlawfully moved forward without public input or an environmental impact st