HNHacker News
TopNewBestAskShowJobs

dgl

1,262 karma · joined May 24, 2007

https://dgl.cx
submissionscomments
dgl··on Parley: Federated, decentralised chat that speaks plain IRC
As someone who has worked on IRC protocols, I wanted to understand how this actually works, but the docs are so LLM generated this is not worth my time:

   Everything that carries what somebody said is written down as owed to each instance it is owed to, and delivered from there: a direct message, which has nowhere else to come from, and a channel message, which used to be offered once and forgotten.

   The forgetting was not obvious, because it usually did not show. An instance that had gone away noticed on the way back and walked the feed in section 7, and the message arrived late rather than never.
That's not how you document a protocol. From https://git.mills.io/prologic/parley/src/branch/main/docs/PR...
dgl··on We have a year to fix security everywhere
Even if they are good the vulnerabilities have to be there. There's lots of things turning up like Local Privilege Escalations (LPE) in Linux, but serious people didn't expect the kernel to be a boundary for a sophisticated attacker.

A lot of the vulnerabilities LLMs are finding now are the "long tail" and affect only particular configurations, I would be surprised if e.g. a widely applicable RCE is found in Linux (but I'm also not going to bet against it).

Where this gets interesting is the long tail can be used to target a particular system and this is where defense-in-depth becomes important for every organisation.

dgl··on Cheap Desktop 400GbE Switch MikroTik CRS804-4DDQ-HRM Review
They are QSFP56-DD which can be split using breakout cables. So it's 4 x 400GbE ports, which could in theory be split into as many as 32 x 50GbE ports. (Although whether that then ends up being an economical thing to do is a different matter.)
dgl··on Zohran and the Short Link
I put a short link on a family thing and someone complained it didn't work. Turns out iOS OCR recognised a "-" as a "=", so this isn't just people typing it wrong.

Now my short links implement case insensitivity and striping all non alphanumeric characters, i.e. a "-" is optional and any other symbol character is also stripped.

nyc.gov seems to do case insensitivity but doesn't strip "-", so you do need the "-".

dgl··on Queryable Executables
Simple -- you just add a custom SQLite VFS that ensures particular SQLite pages are mapped into underlying OS pages that are appropriately mprotect()ed. Try to modify the executable pages and you crash (W^X). Or you know, don't try to use a hack like this where security matters.

SQLite's unix VFS is actually using a mixture of mmap and write() by default[1] and you'd need to combine that with mseal() and some more pieces to actually pull it off. It would probably be possible.

(There's prior art here; although done differently: https://sqlite.org/src/file/ext/misc/appendvfs.c).

[1]: https://sqlite.org/mmap.html

dgl··on Zeroserve: A zero-config web server you can script with eBPF
Zip isn't useful for random access here; the problem with random access in HTTP serving is then you have to decompress the data and potentially recompress.

The more interesting trick you can do with zip files for HTTP serving is to serve the compressed deflate stream as gzip, or use Zstd inside zip. Then you have a valid zip file from which bytes can be served directly.

I have some code which does this at https://git.sr.ht/~dgl/deserve/

dgl··on BunnyCDN has been silently losing our production files for 15 months
I tried using their Magic Containers product and there were issues that showed a lack of attention to detail as well.

It's supposed to scale globally (magically!) but I found multiple cases where particular nodes were problematic and the health checks didn't detect them (in fact to start with the health checks didn't even work properly if you had multiple containers, they did fix that). The support was quite slow too, after finding multiple product issues they'd escalate to developers and then come back a month later and ask to retest, but some of this took multiple round trips. I was only using this on a side project, but definitely wouldn't consider them for anything critical, even if they are quite cheap.

dgl··on Back to FreeBSD – Part 2 – Jails
FreeBSD has supported Linux emulation for a long time (https://docs.freebsd.org/en/books/handbook/linuxemu/). The emulation is at the syscall level but enough to run most apps.
dgl··on Unsung heroes: Flickr's URLs scheme
GitHub manage to do it. Most URLs you'd think of are either redirects to other bits of the site, or accounts owned by GitHub themselves. It just takes a bit of planning.
dgl··on Sandboxing AI Agents in Linux
> Part #2 to me, I also want observability as to what the agent changed.

You could potentially combine https://github.com/binpash/try with bubblewrap (I'm not sure how well they compose and as the docs say it isn't a full sandbox).

The good (and bad because it's confusing and can lead to surprises if misconfigured) thing about Linux containers is all the pieces of containers can be used independently. The "try" tool lets you use the overlay part of containers on your host system, just like Bubblewrap lets you combine the namespacing parts of containers with your host system.

dgl··on Ask HN: Vxlan over WireGuard or WireGuard over Vxlan?
This.

Instead you can create multiple Wireguard interfaces and use policy routing / ECMP / BGP / all the layer 3 tricks, that way you can achieve similar things to what vxlan could give you but at layer 3.

There's a performance benefit to doing it this way too, in some testing I found the wireguard interface can be a bottleneck (there's various offload and multiple core support in Linux, but it still has some overhead).

dgl··on Rootless Pings in Rust
The BSD socket API has 3 parameters when creating a socket with socket(), the family (e.g. inet) the kind (datagram in this case) and the protocol (often 0, but IPPROTO_ICMP in this case).

Because when the protocol is 0 it means a UDP socket Rust has called its API for creating any(?) datagram sockets UdpSocket, partly resulting in this confusion.

The kernel patch introducing the API also explains it was partly based on the UDP code, due to obviously sharing a lot of properties with it. https://lwn.net/Articles/420800/

dgl··on NVMe driver for Windows 2000, targeting both x86 and Alpha AXP platforms
> My immediate question which isn't (I think) answered in the repo is how do you interface the NVMe? Can you put NVMe on PCI as opposed to PCIe? How?

PCI to PCIe adapter and then PCIe to M.2: https://www.vogons.org/viewtopic.php?t=78987 (PCIe has some level of backwards compatibility, although like that thread shows there are some limits as to what will work).

dgl··on An official atlas of North Korea
Also the UK seems to include the Grand Union canal and River Severn but not the River Thames. It seems quite random.
dgl··on Text case changes the size of QR codes
> On the QR topic, I don't understand how logos in the middle work. You are losing pixels and checks with the logo in the middle which is fine until you make the logo too big.

It is possible to add logos without (well, differently) abusing the error correction: https://research.swtch.com/qart

Of course most images in the middle aren’t doing that and rely on some level of error correction fixing it.

dgl··on State of Terminal Emulators in 2025: The Errant Champions
The VT3xx ones that were color did not support ANSI SGR to set them. I don't think VT5xx was a budget line, it has more escape sequences than the previous ones (including interesting ones like changing cursor shape, which modern terminals implement too). It's more that they never made a graphical version of the VT5xx (this was the early 90s, whether physical VTs made sense anymore is debatable, but terminal graphics likely didn't).

VT340 is definitely interesting and if someone were to emulate one that would also be great! (there's been some good research, e.g.: https://github.com/hackerb9/vt340test, which you might be surprised to learn has been used to make Windows Terminal one of the more conformant terminals...)

dgl··on State of Terminal Emulators in 2025: The Errant Champions
If MAME could support the VT525 (nearly the last terminal DEC made and unlike the previous DEC models it supports ANSI color) people might use it a bit more. It would be very useful for compatibility testing as there aren't many people with a real VT525! Last I looked someone had dumped the ROMs but there wasn't any support code.
dgl··on State of Terminal Emulators in 2025: The Errant Champions
xterm does and some others, I posted about this and emojis a while ago: https://dgl.cx/2025/06/can-your-terminal-do-emojis
dgl··on IRCd service (2024)
Given the source isn't released, how about an IRCd in bash: https://github.com/dgl/bash-ircd
dgl··on Linux VM without VM software – User Mode Linux
The second generation was "skas" for Separate Kernel Address Space, some more background here: https://user-mode-linux.sourceforge.net/old/skas.html

The host kernel patch for skas was never merged, probably for good reason, but that and Xen/VM hardware support meant UML stopped making sense.

dgl··on AWS multiple services outage in us-east-1
Not quite; you're probably thinking of: https://google.github.io/building-secure-and-reliable-system...
dgl··on Kurt Got Got
The post calls this out:

> the 1Password browser plugin would have noticed that “members-x.com” wasn’t an “x.com” host.

But shared accounts are tricky here, like the post says it's not part of their IdP / SSO and can't be, so it has to be something different. Yes, they can and should use Passkeys and/or 1password browser integration, but if you only have a few shared accounts, that difference makes for a different workflow regardless.

dgl··on Toybox: All-in-one Linux command line
The license page and linked blog posts mentions this: https://landley.net/toybox/license.html

I like the 0BSD license (see my https://xn--gba.st), AWS also uses the semantically equivalent MIT-0 license for code samples, etc.

dgl··on Cap'n Web: a new RPC system for browsers and web servers
This isn't really that different to GWT, which Google has been scaling for a long time. My knowledge is a little outdated, however more complex applications had a "UI" server component which talked to multiple "API" backend components, doing internal load balancing between them.

Architecturally I don't think it makes sense to support this in a load balancer, you instead want to pass back a "cost" or outright decisions to your load balancing layer.

Also note the "batch-pipelining" example is just a node.js client; this already supports not just browsers as clients, so you could always add another layer of abstraction (the "fundamental theorem of software engineering").

dgl··on Be careful with Go struct embedding
See how it's used in the standard library io types, it makes for quite nice composition: https://go.googlesource.com/go/+/refs/heads/master/src/io/io...
dgl··on Be careful with Go struct embedding
> I wonder why they don’t do this for all levels. How deep could this even be in practice for it to matter? You could just have a hashmap with them all.

While it may seem questionable for fields; it applies to methods too and is potentially more useful as a way to override them when doing struct embedding but wanting to preserve an interface.

dgl··on Images over DNS
To be fair I did lazily do:

         else if (c.slice(4, 4+4) == "ftyp") f="avif";
 
Because I didn't feel like parsing the HEIF to check it's actually AVIF. I'm pretty sure browsers aren't that bothered about the file extension or MIME type for images.
dgl··on Images over DNS
Cool!

For the bad apple one; I tried something like that, it works if you're directly querying the authoritative DNS server, but if a cache is involved the records will be re-ordered by randomisation (even in some cases with TTL=0). That's why I ended up doing this as a single very long record, because then it can be cached without worrying about reordering.

dgl··on Images over DNS
I put a link to[1] in the article, which was previously discussed here[2] with a correction to that article. Basically there's a 2 byte length header on TCP DNS responses, limiting the payload (i.e. the DNS message inside) to 64 KiB.

  [1]: https://www.netmeister.org/blog/dns-size.html#:~:text=65536%20bytes%20DNS%20payload%20%2B%202%20bytes%20size%20%3D%2065538%20bytes
  [2]: https://news.ycombinator.com/item?id=39257147
dgl··on iTerm2 Web Browser
> A former colleague suggested this idea in 2014 and I haven't been able to stop thinking about it. - I am maybe having a midlife crisis and this is cheaper than a sports car.

I love the honesty.

Page 1 of 7Next →