Better HN
topnewbestaskshowjobs
Log inSign up

dgl

1,262 karma · joined May 24, 2007 (19y ago) · 242 submissions

https://dgl.cx
Submissions

comment 1mo ago · link · parent

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...

comment 2mo ago · link · parent

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.

comment 2mo ago · link · parent

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.)

comment 2mo ago · link · parent

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 "-".

comment 3mo ago · link · parent

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

comment 5mo ago · link · parent

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/

comment 7mo ago · link · parent

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.

comment 7mo ago · link · parent

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.

comment 9mo ago · link · parent

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.

comment 9mo ago · link · parent

> 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.

comment 10mo ago · link · parent

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).

12.

Mtetris: Tetris-Like Game in X11/Motif(codefromabove.com ↗)

2 points · by dgl · 10mo ago · discuss

comment 11mo ago · link · parent

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/

comment 11mo ago · link · parent

> 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).

comment 1y ago · link · parent

Also the UK seems to include the Grand Union canal and River Severn but not the River Thames. It seems quite random.

comment 1y ago · link · parent

> 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.

comment 1y ago · link · parent

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...)

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

xterm does and some others, I posted about this and emojis a while ago: https://dgl.cx/2025/06/can-your-terminal-do-emojis

20.

Show HN: IRCd in Pure Bash(github.com ↗)

6 points · by dgl · 1y ago · 1 comment

comment 1y ago · link · parent

Given the source isn't released, how about an IRCd in bash: https://github.com/dgl/bash-ircd

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

Not quite; you're probably thinking of: https://google.github.io/building-secure-and-reliable-system...

comment 1y ago · link · parent

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.

25.

Bash a newline: Exploiting SSH via ProxyCommand, again (CVE-2025-61984)(dgl.cx ↗)

5 points · by dgl · 1y ago · discuss

26.

URL Design (2010)(warpspire.com ↗)

3 points · by dgl · 1y ago · discuss

comment 1y ago · link · parent

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.

12345
9