HNHacker News
TopNewBestAskShowJobs

brewmarche

501 karma · joined August 5, 2018

submissionscomments
brewmarche··on Self-contained highly-portable Python distributions
I install these Python builds into distroless containers with uv python install and it just works. (If you try this with Google’s images, use gcr.io/distroless/cc, libgcc/libstdc++ is needed for some extensions, like numpy)
brewmarche··on Ruff v0.16.0 – Significant new updates – 413 default rules up from 59
FWIW, ruff sees your line comment and keeps each item on its line. It only adds a trailing comma and additional space.

It also does not collapse lines when there’s a trailing comma.

Your output seems to be from black. IMO it’s insane to collapse lines when there are line comments.

  $ uvx ruff format --diff formatting.py
  --- formatting.py
  +++ formatting.py
  @@ -1,8 +1,4 @@
  -no_comma  = {
  -    "x": 3,
  -    "y": 42,
  -    "z": 2
  -}
  +no_comma = {"x": 3, "y": 42, "z": 2}
  
  with_comma = {
       "x": 3,
  @@ -12,6 +8,6 @@
  
  comment = {
       "x": 3,
  -    "y": 42, # Answer to the Ultimate Question!
  -    "z": 2
  +    "y": 42,  # Answer to the Ultimate Question!
  +    "z": 2,
   }
  
  1 file would be reformatted
(I intentionally switched to double quotes since that really is a stylistic choice in Python, you can escape in both, and if you use double quotes inside of single quotes ruff leaves it as-is)
brewmarche··on Em dashes are amazing
That’s how we distinguish the Cox–Zucker Machine [1] from other Cox-Zucker Machines (scnr)

[1]: https://en.wikipedia.org/wiki/Cox–Zucker_machine

brewmarche··on Show HN: Firefox in WebAssembly
Yes, you don’t get that far without it.
brewmarche··on Show HN: Firefox in WebAssembly
Can’t get it running on Firefox 152.0.6 (aarch64), no extensions.

  [chrome-demo] chrome assets ready
  [gecko] warning: unsupported syscall: __syscall_madvise
  [gecko] embed-xul: main() on the app pthread (PROXY_TO_PTHREAD)
  [gecko] embed-xul: GECKO_GL_PASSTHROUGH=1
  [gecko] embed-xul: GECKO_COARSE_CLOCK=1
  [gecko] embed-xul: GECKO_GPU=1 (GPU/WebRender->canvas rendering)
  [gecko] xul_init: GRE dir = /gre
  [gecko] Pthread 0x11051000 sent an error! blob:https://developer.puter.com/edc1bd0a-b844-4a18-a69a-63dd49dc304a:8906: SecurityError: Security error when calling GetDirectory
brewmarche··on TLS certificates for internal services done right
If scoping were actually viable, public CAs could also sign your private intermediate CA with a name constraint and it would be trusted everywhere.
brewmarche··on TLS certificates for internal services done right
Python for example, although nowadays you can simply install pip_system_certs to change that behaviour.

A lot of non-language tools bring their own certificate bundle as well, like uv, git, curl and Firefox. (I think they might all be the same Mozilla bundle even).

However, it seems like the situation here has improved slightly: git can read Windows certificates now once a flag has been set, Firefox has a flag for Windows and macOS, and it supports p11-kit. curl can be built with Windows/macOS support and respects OpenSSL environment variables. uv can be configured to use system-certs.

And obviously any VM or container has to be set up separately. That often includes stuff like pipelines in forges. As mentioned in the sibling comment, at least here it's definitely by design.

brewmarche··on Asahi Linux 7.1 Progress Report
MacPorts is still around and is a perfectly viable package manager, I prefer it over homebrew
brewmarche··on Asahi Linux 7.1 Progress Report
IIRC Apple actually helped with MacPorts in the beginning
brewmarche··on Google Hits 50% IPv6
And with ULAs (fd00::/8) you can pick your own prefix. Officially you should pick a random one to prevent collisions when you connect private networks, but you can choose something memorable if you don’t care about that
brewmarche··on Linux eliminates the strncpy API after six years of work, 360 patches
Now with Unicode we actually have even more:

NL Next line (from EBCDIC?)

LS Line separator (invented by Unicode)

PS Paragraph separator (same)

The Unicode standard says that in addition to CR, LF, CRLF and the above, vertical tabs and form feeds should also be treated as line separators.

brewmarche··on Windows UI evolution: Clicking an unassociated file
I wonder why in Windows 10 and 11 there is no obvious way to cancel this dialog. You can press Esc, but there are no buttons to do it.
brewmarche··on WWDC 2026: Apple is Folding
I was hoping for a small phone as well since I’ve read rumours about the display being 5.3in when folded. However it also said 7.8in unfolded, which implies 4.1in × 3.3in folded… quite big and squarish.
brewmarche··on On The <dl> (2021)
Your comment put me on a side quest to research the differences between i.e., e.g., viz. and sc. and I have to admit that I’m still not 100% sure
brewmarche··on Uv is fantastic, but its package management UX is a mess
Looks like I forgot to answer the other half :) Yes you can pin a specific Python like `uv python pin cpython-3.14.0-macos-aarch64-none`, it will create a `.python-version` file which will be respected when you’re in the directory.
brewmarche··on Uv is fantastic, but its package management UX is a mess
Yes you can set it via an environment variable (UV_NATIVE_TLS=true) or in your uv.toml (native-tls = true). However, check the docs, I think they are renaming it to sytem-certs.
brewmarche··on What Is Date:Italy?
Without HTTPS someone could alter the content, spread false information, inject ads, malware, and other stuff, redirect to some other site, …

(This is a general remark, but it goes for a blog post like this as well.)

brewmarche··on Maybe you shouldn't install new software for a bit
I thought that podman uses jails under the hood on FreeBSD, but it is a guess. The podman code seems to reference jails: <https://github.com/search?q=repo%3Acontainers%2Fpodman%20fre...>

But jails of course are older and can be used on their own, I didn’t want to imply they’re the same thing

brewmarche··on Maybe you shouldn't install new software for a bit
My experiences from dabbling with it a few months ago:

In general everything needs to be compiled for FreeBSD, but the ports collection is quite extensive. For example you will find Firefox, wayland, GNOME, KDE, xfce, … even dotnet was on there.

Problems arise with properietary stuff like Spotify, Widevine DRM etc. However, FreeBSD has a Linux emulation layer (providing syscalls), dubbed ‘Linuxulator’. I managed to run the Spotify Linux desktop client but the Spotify website wouldn’t let me log in, didn’t research further. AFAIK the emulator is limited though, not implementing all syscalls.

There is also podman for FreeBSD and in addition to running FreeBSD containers (using Jails under the hood I guess?) it can run Linux containers as well (using the Linuxulator in addition then?).

It also comes with a hypervisor called bhyve if you want to run VMs

There is a handbook on their website describing how to set up a system (including desktop environment) if you want to give it a go.

brewmarche··on IBM didn't want Microsoft to use the Tab key to move between dialog fields
Also, some layouts use shift lock (so actually turning 1 into !) instead of caps lock
brewmarche··on 10 years ago, someone wrote a test for Servo that included an expiry in 2026
This sounds like the idea behind mutation testing
brewmarche··on Make tmux pretty and usable (2024)
Maybe give terminal windows in vim a try? vim is not a terminal multiplexer, but if all you need is multiple terminals windows:

:term to open a terminal in a new vim window (or :vert term)

Standard window movements apply (by default the window prefix is Ctrl-W), most important are: Ctrl-W,{hjkl} to switch between windows, Ctrl-W,{<>+-} to resize windows, Ctrl-W,{HJKL} to move windows to edges, Ctrl-W,{qc} to (force) close windows

Enter normal mode of a terminal buffer with Ctrl-W,N: now you can perform vim motions and scroll the output

Enter insert mode with i and you can type into the terminal again

In insert mode: Ctrl-W "x to paste register x, Ctrl-W . to send a literal Ctrl-W. If too annoying, you can change the window prefix of vim

This goes for vim, neovim also has a terminal mode but it works differently I think

brewmarche··on Migrating to the EU
I think on the sending side, being able to send from others’ addresses is fixed by now: https://userforum-en.mailbox.org/topic/anti-spoofing-for-cus...

But it definitely used to be possible, I tried once with success.

Anti spoofing for incoming mails was not perfect the last time I checked either, but is a different issue.

brewmarche··on A most elegant TCP hole punching algorithm
Yes, you are right, quite literally, as RFC 6296 is marked ‘experimental.’
brewmarche··on A most elegant TCP hole punching algorithm
IPv6 still allows proper NAT (prefix translation), but even then finding your global address wouldn’t need TURN, just STUN, actually not even that, just a service like “What’s My IP.”
brewmarche··on A most elegant TCP hole punching algorithm
I thought TURN is for symmetrical PAT, not for proper NAT (which just needs STUN for address determination) or full/restricted cone PAT (which need STUN for address and port determination, and then performs a hole punch).

Standard-conforming IPv6 at most allows prefix translation (i.e., proper NAT, not PAT), which wouldn’t need it.

brewmarche··on A most elegant TCP hole punching algorithm
That’s true we won’t get rid of hole-punching with IPv6. But at least it will get rid of TURN.
brewmarche··on San Francisco Graffiti
If value was the price no trade would be possible. The seller needs to value the cash more than the good and vice versa.
brewmarche··on iPhone 5s Gets New Software Update 13 Years After Launch
Still using it, it’s fine performance wise, maybe needs another new battery in a year or so. Apple Pay, authenticators and messaging apps are working.

Was hoping for the new iPhone Fold (with Touch ID even) to be small but looks like it’s going to be a really weird ratio when folded.

Of course there are caveats: - Spotify not getting app updates anymore (but still playing fine)

- some websites do not support the Safari version, e.g. GitHub

- most banking apps are not supported

brewmarche··on Television is 100 years old today
I only knew about SECAM, where it’s even part of the name (Système Électronique Couleur Avec Mémoire)
← PreviousPage 2 of 9Next →