HNHacker News
TopNewBestAskShowJobs

nickcw

4,884 karma · joined January 27, 2013

Maths, Science and Computing Geek. Currently having a lot of fun with Go.

For more info:

    Github:    https://github.com/ncw/
    Homepage:  https://www.craig-wood.com/nick/
    Rclone:    https://rclone.org
    Twitter/X: @njcw
    Email:     nick@craig-wood.com
submissionscomments
nickcw··on C's Flexible Integer Sizes Were Not a Design Mistake
The fixed size int types int32_t and friends weren't introduced until C99. Microsoft held out until 2013 before it put <inttypes.h> into Visual Studio!

So there has been a really long time in C's evolution where we haven't had fixed size types which has been a super annoying mess of #ifdefs in portable code.

The variable size ints have allowed some super weird architectures though. I remember looking at the datasheet for the Motorola 56000 DSP and noting that the C compiler set char = short = int = 24 bits! That was because the hardware could not address anything smaller than 24 bits. I think long could be 48 bits.

nickcw··on Engineering Memory: On learning to memorize first 100 digits of pi (2024)
I know pi to 50 places learned through lots of repetition. I've always been good at remembering numbers though.

I don't find the memory palace tricks helpful at all though. I think that is a consequence of my Aphantasia and something I only realised recently. I can't visualise a memory palace so placing things in it is impossible!

nickcw··on SDCC – Small Device C Compiler
I used sdcc for an 8051 based commercial project a while back. I seem to remember spending more time reading the assembly to figure out workarounds for the compiler than actually writing C code!

Whereas sdcc works brilliantly for z80 lineage processors. I wrote quite a lot of C for Gameboy recently and didn't find a single compiler bug in sdcc which revised my opinion of it upwards greatly.

nickcw··on A 386 PC for Your RP2350
Was the performance mentioned anywhere - I couldn't find it on the page?
nickcw··on 2026 Hugo Awards
Disappointed to see I already read the Hugo winner for best novel - The Everlasting by Alix E. Harrow.

It is a worthy winner in my opinion. Fantasy with a sci-fi element along with a story which takes some untangling. Five stars from me :-)

nickcw··on Just the rumour of a bug is enough to find an exploit these days
Yes I update the CVE-PENDING once the CVEs are in to keep the record straight.
nickcw··on Just the rumour of a bug is enough to find an exploit these days
I got a 6 month free subscription of Claude Code Max under Anthropic's open source program which has been very helpful.
nickcw··on Just the rumour of a bug is enough to find an exploit these days
This describes my life as an open source maintainer at the moment!

In the first 10 years of the rclone project we received about 20 security disclosures through GitHub. We had to deal with over 40 in the last month! That has taken a huge amount of my time, even using AI tools to triage and come up with fixes for review.

The hit rate for those security disclosures is pretty good - about 75% of them have a nugget of something which needs looking at. The configurations for rclone have got increasingly unlikely so I'm hoping they will dry up eventually.

I was considering just merging the fixes straight to master just to make my life easier rather than holding a dozen independent security fixes on branches and merging them at the point release and hoping not to have too many conflicts to fix up. I've decided to stick with the process for the moment.

GitHub assigns CVEs for the advisories. Before the AI apocalypse they took 2-3 days for an assignment but now it they are running at 3-4 weeks so I have to send the point releases out with CVE-PENDING in the changelog which isn't ideal.

Not sure what the solution is, but it is definitely a problem for us.

nickcw··on CSS: The bomb inside your inbox
Here is an idea...

Why don't we give up on HTML in emails and just use markdown instead? It is readable and writable by humans and doesn't have insane security problems.

It seems to be our AI overlords' preferred communication format too so it would future proof email for the aipocalypse.

This would, alas, make the the people sending you marketing emails very unhappy. Maybe they could attach a PDF instead, I'm sure that would be safe.

/s

nickcw··on Show HN: SIMD Viterbi Decoder in Rust
I was looking at the reed Solomon implementation. I've done a few of those in the past! I note that you are using logs for multiplication. I always used to use a 64kb table for direct lookup, though maybe that isn't faster on modern processors?

Next LDPC codes?

nickcw··on Twenty Years of RISC OS Open
I used and developed software for RISC OS for many years and it was there I cut my teeth as an open source developer.

I wrote the very popular !Director application which let you customize your Desktop and add lots of nifty shortcuts. It could be expanded with BASIC plugins to do just about anything! It was distributed by the Arcade BBS to start with then Acorn User magazine put it on the floppy disk that came with the magazine.

Amazingly Director was written entirely in ARM assembler (with the help of lots of macros). I used to really enjoy writing ARM assembler and used to grit my teeth whenever I had to read the assembly output of the C compiler! I remember writing quicksort in ARM assembler as part of this (to sort menu entries) which was a lot of fun.

I still have a RiscPC under my desk, but I don't think I've turned it on for nearly 15 years :-(

nickcw··on An Uncomplicated Man – A review of The Odyssey, directed by Christopher Nolan
[after a pretty scathing review which I mostly agree with]

> Despite all this, the release of The Odyssey is still an event to celebrate. In what we are told is the streaming era, this epic is bringing audiences back to cinemas. In what we are told is a time of declining literacy and the ‘death of the humanities’, translations of The Odyssey, including mine, are flying off the shelves. Some of those who buy the book or show up in cinemas to watch Tom Holland may go on to study ancient Greek. Perhaps the film will persuade a few college administrators not to cut their literature, language and history departments. Nolan, who studied English at University College London – where students still study The Odyssey as a first year ‘foundational text’ – is doing his best to get the general public reading again, and I am grateful.

nickcw··on How is the Bun rewrite in Rust going?
Maybe it would have made more sense for Anthropic to rewrite Claude Code in rust, and cut out the middle man (bun)?
nickcw··on I tricked Claude into leaking your deepest, darkest secrets
I set my name as Sir and I enjoy the obsequious responses this generates :-)

It worked well in my banking app too which greets me with " Good morning, Sir" which is the level of relationship I want with my bank!

nickcw··on Show HN: Shirei, cross-platform GUI framework in native Go
I had a look through the code to see how it manages not to use a pile of C libraries with cgo like other Go GUI libraries.

The answer is platform dependent:

Windows loads the relevant DLLs by hand and calls them. This is a well established technique in Go programs and due to the super stable DLL interface works well.

Linux has an x11 and Wayland backends and these implement (through a library) the wire protocols directly in Go which is nice and will make cross compilation and distribution easy.

macOS does appear to use cgo to access the cocoa libraries. macOS doesn't like statically linked Go programs anyway though as they don't use system name resolution so this isn't a bad compromise, but will mean macOS stuff needs to be built on macOS I think.

I didn't see Android or iOS support.

A nice innovative approach to GUI building. Since the lowest common denominator for the backends is an RGBA buffer, this will bypass all accessibility things the OS provides.

The above gleaned after a few minutes reading the source so may not be 100% accurate.

nickcw··on Einstein's relativity rules chemical bonds in heavy elements, new research shows
One of the disappointing realisations I got from my physics degree was that as you move into the real world with non-spherical cows you can no longer solve any of the equations.
nickcw··on Life with Hazard Ratios
From the article:

> This is essentially the observation Keyfitz made in his 1977 paper, “What Difference Would It Make if Cancer Were Eradicated?” Cancer is responsible for 18 percent of deaths, so does that mean eradicating it would increase lifespan by 18 percent, or around 13.6 years? Nope, Keyfitz says, it’s only 2.3 years.

A very interesting thought!

nickcw··on Show HN: 18 Words
I didn't realise at first that you could choose letters which weren't adjacent which made it very hard! Guess I've been playing too much https://zanagrams.com/ (which was also posted here recently).
nickcw··on Camera with transparent display launches for the equivalent of $29
Maybe it does measure the distance to your face to work out where to show the viewfinder rectangle...
nickcw··on 1.38 Millimeter Microcontroller
Ha! I'm going to rename my home office "The Room of Dreams"
nickcw··on Long Wave radio era set to end with switch-off
The Droitwich transmitter used to transmit on exactly 200 kHz which I always thought was very cool, but it moved to 198 kHz in 1988 to better harmonize with European stations.

The program was mostly the same as BBC Radio 4 but it used to diverge at certain times of day. I used to be woken up at 5am every day by my parents clock radio with the farming news which was very dull, but easy to sleep through.

nickcw··on Incident CVE-2026-LGTM
That is very very funny, and oh so plausible.

I enjoyed this bit a lot from the timeline

> Karen Oyelaran finds the payload by reading the source code with her eyes and files a second issue. The triage assistant closes it as “duplicate of #8814.” Issue #8814 is a feature request for dark mode. Karen reopens it. The assistant closes it. Karen reopens it. Karen’s GitHub account is rate-limited for “patterns consistent with automated behaviour.”

And this - the final sentence is a perfect indictment of the timeline we are in.

> Two AI review agents from competing vendors, both attached to a downstream pull request bumping foxhole-lz4, enter a disagreement loop over whether the package is malicious. After 340 comments and $41,255 in inference spend, Finance revokes both API keys; one vendor’s marketing team, cc’d on the cost anomaly alert, issues a press release citing “a 430% YoY increase in adversarial multi-agent security reasoning.” The stock opens up 6%.

I'm joining the goat farming waitlist ;-)

nickcw··on Show HN: A pure ARM64 Assembly web server, now on Linux with CGI for no reason
I love it :-)

Back in the distant past I wrote some really big ARM 32 assembly projects. 64 bit ARM is really very similar!

I had a look through the code. Some ENTRY/EXIT macros to help with the drudgery of save restore registers & stack frame would probably help. Also some register renaming would help readability (eg if a register points to incoming data throughout a subroutine rename it pdata).

I salute your effort and please enjoy the core dumps :-)

nickcw··on How many of the 170k English words do you know?
I have a copy of the shorter Oxford English Dictionary from 1970 which I inherited. It is two massive volumes and is only shorter in comparison to the full dictionary which is 12 volumes (more in more modern editions).

My shorter OED contains 163,000 words (compared to the 600,000 words of the longer).

According to this site I know 71,000 words... Let's test that against the OED. I should have about 43% chance if knowing a word picked at random.

In my totally scientific test (ha) I chose 50 words at random from the OED and discovered I knew 29 of them for a score of 58% which is more than two sigma from 43%, this disproving the hypothesis.

I forgot what that was now, but it was a fun experiment.

nickcw··on Show HN: Are You in the Weights?
Ha ha! Yes I am in the weights apparently. Nearly all the models know what I do.

I suspect being in the Open Source world is a bit of a bubble as far as the weights are concerned.

Anyway it stroked my ego nicely even though it was totally artificial, like Zaphod Beeblebrox surviving the Total Perspective Vortex.

nickcw··on A brief tour of the PDP-11, the most influential minicomputer of all time (2022)
I'm not old enough to have used a PDP-11 so I read through the assembly code description with interest.

Wow, it seems so modern. I've used a lot of assembly languages over the years but I'd feel immediately at home here. Nice sensible orthogonal instruction set with enough registers and a stack pointer. It reminded me immediately of ARM assembly - what a breath of fresh air that was when it came it.

I never realised quite how much influence the PDP-11 had on computer architecture. I knew about it's software legacy but I suspect that was enabled by it's ground breaking architecture.

nickcw··on I admire Fabrice Bellard. He is almost certainly a better overall programmer
Here is his paper on it which is a little 2 pager:

https://bellard.org/pi/pi_bin.pdf

Though I have to say the last line of the proof "...which gives (1) by reordering the terms" took me much head scratching to understand!

nickcw··on I Hate (Most) Keyboard 'Fn' Keys
> And so, because I don’t want to hold Fn every time I want to press an F-key for its intended purpose, I used the arcane shortcut Fn+Caps to “lock” the keyboard into “standard” mode, where multipurpose F-keys remain multipurpose F-keys unless I hold down the special magic button that transforms them into rarely-used single-purpose special function keys.

> But here’s where the problem occurs. If the batteries get changed, or if the keyboard gets turned-off for an extended period, or sometimes – seemingly – just randomly… that function-lock gets switched off.

I have this problem with my Microsoft Natural keyboard; my favourite ever Microsoft product which helps me keep my RSI at bay.

Every now and again the Fn lock key gets pressed by accident. I then look very confused for some time as to why none of the Fn keys are working before I remember the dratted Fn lock key.

The Fn lock key is next to F12 so well in the range of accidental presses.

Maybe not many people drive their setup with function keys any more, I don't know.

nickcw··on The 29th International Obfuscated C Code Contest (IOCCC) 2025 Winners
After I made the emulator I trawled GitHub to try to find games it could play within the 32K limit. I found yours - thank you :-) - and the ./try.sh script has an option to download it from GitHub for the user to test.
nickcw··on The 29th International Obfuscated C Code Contest (IOCCC) 2025 Winners
That is correct. It is cheating, but the judges let a small amount of it slide, especially if you come up with an amusing enough justification. I could not get it to fit otherwise!
Page 1 of 17Next →