HNHacker News
TopNewBestAskShowJobs

asb

4,327 karma · joined June 16, 2007

https://asbradbury.org https://muxup.com

https://twitter.com/asbradbury

https://www.linkedin.com/in/alex-bradbury

asb@igalia.com

Compiler engineer at Igalia (https://igalia.com). Previously co-founded lowRISC CIC (https://www.lowrisc.org) and served as its CTO for many years.

Writes LLVM Weekly (https://llvmweekly.org).

submissionscomments
asb··on Show HN: Drop – A rootless Linux sandbox with gVisor support
The fine-grained tokens have some surprising permissions for "read only" https://github.com/orgs/community/discussions/180063
asb··on Sort branches by last commit date
Even better (IMHO!) is `git config branch.sort -committerdate` (note the `-`). This will sort newest committer date first.
asb··on Chuwi Minibook X
Here's my notes on the device from last year with various setup tips https://muxup.com/2025q2/chuwi-minibook-x-n150

I can't say I agree with the author's assessment of the keyboard in this submission. I find it more pleasant to use than the other laptops I have access to.

asb··on Liquid AI reveals 8B-A1B MoE trained on 38T
Beware the license. They misleadingly state on the blog post "Open-weight — Download, fine-tune, and deploy without restrictions". But if you read their license <https://huggingface.co/LiquidAI/LFM2.5-8B-A1B/blob/main/LICE...> it has significant restrictions for any org with other $10M in revenue.
asb··on Ask HN: Share your personal website
https://muxup.com/
asb··on Cerebras launches Qwen3-235B, achieving 1.5k tokens per second
The situation is very confusing, but the tweet that went out with the announcement indicates it's not full 131k context yet and that is coming "soon"https://xcancel.com/CerebrasSystems/status/19437653011094202...
asb··on Mistral Small 3
Note the announcement at the end, that they're moving away from the non-commercial only license used in some of their models in favour of Apache:

We’re renewing our commitment to using Apache 2.0 license for our general purpose models, as we progressively move away from MRL-licensed models

asb··on Show HN: Artemis, a Calm Web Reader
I think this is a really interesting area. I wrote a command line took for web reading with some similar motivations. In my case, you queue up the articles to read the next day.

https://muxup.com/pwr

asb··on Show HN: Konga Beat – A custom track editor for Donkey Konga 2 and 3
If you're playing on the Steam Deck, mapping 'touch' on the left and right trackpads to the left and right bongo, and a touch on either joystick (they have capacitive touch) as a clap works rather well.
asb··on Emoji as a Favicon Using SVG (2022)
Oh that's interesting, I wonder what's different about your SVG favicon vs mine.
asb··on Emoji as a Favicon Using SVG (2022)
I used this trick for a quick favicon on my site https://muxup.com/ - though unfortunately Google/Bing/DuckDuckGo doesn't like svg favicons and so it's not displayed in search results. I should really add a proper favicon...
asb··on Qualcomm's Oryon LLVM Patches
I think they should probably set LoopMicroOpBufferSize to a non-zero value even if its not microarchitecturally accurate. This value is used in LLVM to control whether partial and runtime loop unrolling are enabled (actually only for that). Although some targets override this default behaviour, AArch64 only overrides it to enable partial and runtime unrolling for in-order models. I've left a review comment https://github.com/llvm/llvm-project/pull/91022/files#r16026... and as I note there, the setting seems to have become very divorced from microarchitectural reality if you look at how and why different scheduling models set it in-tree (e.g. all the Neoverse cores, set it to 16 with a comment they just copied it from the A57).
asb··on Ointers: A library for representing pointers where bits have been stolen (2021)
I somehow hadn't come across this library, but have a whole blog post on the various ways people store data in pointers (and when+why it's safe) https://muxup.com/2023q4/storing-data-in-pointers
asb··on Is Emacs dying?
Yes that's what I meant. Just an assumption I'd had, perhaps the joking about Emacs vs Vim preference in programmers made me assume the groups were of similar size.
asb··on Is Emacs dying?
One source of stats is the 2023 Annual Rust Survey. The question on text editors allowed multiple responses (so percentages naturally don't add up to 100%), but 5.5% of respondents reported using Emacs for Rust vs ~30% for Vim/Neovim, vs ~61% for VS Code. I was shocked that Emacs and Vim weren't closer. https://blog.rust-lang.org/2024/02/19/2023-Rust-Annual-Surve...

Obviously, it's possible this is a quirk of the Rust community. Though the Go survey shows similarly small Emacs usage numbers https://go.dev/blog/survey2023-h2-results (3% Emacs vs 16% Vim/Neovim).

asb··on Let the terminal bells ring out
(Article author here). I'm typically executing the same compile command from shell history (or via an alias) so missing off the `'; bell` isn't really a concern, but I agree that automatically triggering it after commands of a certain duration is a nicer way of avoiding that mental overhead if you're executing a wider variety of commands.
asb··on Rough.js: Create graphics with a hand-drawn, sketchy, appearance
On https://muxup.com/ you should see pastel-coloured randomly drawn 'roguh' highlights for the site title and for the titles of individual articles. If you mouse over, they'll be redrawn while your mouse is hovering. If you're on mobile, you won't see that, and that's fine. It worked just fine on Android (FF or Chrome) and iPhone last time I checked, but do let me know if you're not seeing that.

It's really very simple, just thought the distillation of the 'rough' drawing technique to a couple of dozen lines of code for this use case might be of interest to some.

asb··on Rough.js: Create graphics with a hand-drawn, sketchy, appearance
Yes, redrawing on hover was a desired effect - sorry if you find it offputting.
asb··on Rough.js: Create graphics with a hand-drawn, sketchy, appearance
Also see RoughNotation <https://roughnotation.com/>, which uses RoughJS to support underlines, highlights etc.

I took some inspiration for my website (mouse over any highlighted title) <https://muxup.com/>. The write-up here aims to summarise how it works https://muxup.com/2022q3/muxup-implementation-notes#randomly... - if you click through you'll see it's really very little code.

asb··on Designing a SIMD Algorithm from Scratch
Thanks for pointing that out - definitely a better choice for C++.
asb··on Designing a SIMD Algorithm from Scratch
LLVM has a LoopIdiomRecognize pass which will, amongst other patterns, try to detect a loop implementing popcount [1] and convert it to the llvm.ctpop.* intrinsic [2]. I've not looked at why it's not matching this loop, but the sibling comment suggesting to just use `.count_ones` seems like the right answer for Rust. In C or C++ I'd strongly recommend using `__builtin_popcount` (provided by both Clang and GCC).

[1]: https://github.com/llvm/llvm-project/blob/08a6968127f04a40d7... [2]: https://llvm.org/docs/LangRef.html#llvm-ctpop-intrinsic

asb··on Storing data in pointers
I've tweaked the wording - thanks again!
asb··on Storing data in pointers
Article author here. Thanks for calling that out - the intent wasn't to make readers who might not have been aware feel bad. It really came from my worry about being seen to write about something that is trivial and everyone knows already!

Perhaps I'd be better just dropping "I think it's quite well known that"?

asb··on Storing data in pointers
Do you have a reference on that? This summary of the Alpha AXP <https://danluu.com/dick-sites-alpha-axp-architecture.pdf> states "Normal load or store instructions that specify an unaligned address take a precise data alignment trap to PALcode (which may do the access using two aligned accesses or report a fatal error, depending on the operating system design)"
asb··on OpenAI's misalignment and Microsoft's gain
> Here’s the reality of the matter, though: whether or not you agree with the Sutskever/Shear tribe, the board’s charter and responsibility is not to make money. This is not a for-profit corporation with a fiduciary duty to its shareholders; [...] to the extent the board believes that Altman and his tribe were not “build[ing] general-purpose artificial intelligence that benefits humanity” it is empowered to fire him; they do, and so they did.

I would quibble with this slightly. They do have a right to fire, but they're doing a poor job of working in the not-for-profit's interests if they do so in a way that collapses the value of their biggest asset (the for-profit), especially when other options are potentially available. e.g. a negotiated exit, providing proper warning to their investors etc etc.

asb··on What's new for RISC-V in LLVM 17
99.9% of my clang invocations are from the build dir of the git tree I'm working on, so I could be missing something known to others on the distribution side - but let me try my best answer.

Firstly, as you probably know the Clang/LLVM model is quite different to gcc/binutils in terms of build-time configuration. Any clang can target any architecture (unless it was disabled at build time) using --target=$TRIPLE (see <https://clang.llvm.org/docs/CrossCompilation.html#target-tri...>). In practice it's not as useful as it sounds of course because you need appropriate sysroots. You can control the default with LLVM_DEFAULT_TARGET_TRIPLE, but without patching clang it's going to enabled compressed for the riscv64-unknown-linux-gnu triple. I think the standard way of controlling other default flags would be to deploy a configuration file <https://clang.llvm.org/docs/UsersManual.html#configuration-f...> - though I'd need to check which logic took precedent if you explicitly passed --target=riscv64-unknown-linux-gnu. Ultimately we'd need to change the meaning of the current linux triples, or decide upon new ones I think.

Thanks for sharing that doc - really helpful. I don't know if it's different with GNU as, but not that if a file contains `.option rvc` that _isn't_ sufficient to set the EF_RISCV_RVC ELF flag with LLVM. Additionally, I'd imagine in general that people using .option in inline asm may see different behaviour for Clang vs GCC. Clang doesn't generate assembly output that then gets passed to the assembly - ELF emission happens directly (of course, with the assembler being invoked as needed for inline asm blocks), and so it's rather difficult to replicate the effect you'd see with GCC generating a .s file that's then assembled.

asb··on What's new for RISC-V in LLVM 17
You could certainly change the default `-march` to rv64g (plus whatever extensions you want) rather than rv64gc. That provides mostly what you'd want, though there's some small chance that inline asm or hand-written assembly using `.option rvc` or `.option arch, +c` inappropriately causes issues. I just posted some thoughts on this here: https://lists.riscv.org/g/tech-profiles/message/348
asb··on Ask HN: Could you share your personal blog here?
https://muxup.com/

I keep meaning to post more, but it's hard to find time. RISC-V, LLVM, and a few other things.

asb··on Debug browser redirects without ruining your day
I can recommend writing a short script to test redirects and cache control are configured as expected for your site - here's mine (health warning: shell script) https://github.com/muxup/muxup-site/blob/main/utils/server_t...
asb··on Typescale: A tool for easy CSS typography
Ah, that's because my static site generator only includes "needed" CSS directives, so if the page doesn't have h3 then this isn't included (I know, classic premature optimisation):

    h3 {
      font-size:2.074rem
    }
Playing with font weights or color is a good suggestion, thanks.
Page 1 of 17Next →