HNHacker News
TopNewBestAskShowJobs

sigwinch28

867 karma · joined July 20, 2018

https://sigwinch.uk

Don't bother with the broken plaque-ridden keyservers. Use WKD instead:

    gpg --auto-key-locate wkd --locate-keys joe@sigwinch.uk
submissionscomments
sigwinch28··on Elixir – Why the dot when calling anonymous functions?
I am a bit rusty on the specifics of the BEAM's registers (the VM that Erlang and Elixir run on) but IIRC the short version is these are registers in a VM and the VM takes care not to let them clobber.

Also, in the BEAM, intra-module and inter-module calls operate differently.

The Erlang/OTP did a blog post on this a little while ago which I think is great: https://www.erlang.org/blog/a-brief-beam-primer/

Here is some useful info:

> BEAM is a register machine, where all instructions operate on named registers. Each register can contain any Erlang term such as an integer or a tuple, and it helps to think of them as simple variables. The two most important kinds of registers are:

> * X: these are used for temporary data and passing data between functions. They don’t require a stack frame and can be freely used in any function, but there are certain limitations which we’ll expand on later. > * Y: these are local to each stack frame and have no special limitations beyond needing a stack frame.

sigwinch28··on Navigating the timezone nightmare in product development
This is a topic I often see overlooked from the user perspective and I'm happy to see more discussion about this.

My anecdote: when I was working for a B2C startup we had to ensure we billed customers on the correct date, like OP. Timezones are hard; dates are easy (or so we thought). When we billed a customer on their billing date we had to attempt to take payment at a time, which meant that our naive date handling converted that date into midnight UTC on that date, causing many western European customers to be billed at 23:00 or earlier on the previous day from their perspective.

Furthermore, from the operations side we were often dealing things that happened "on a date". I was pushing for at least our internal customer service systems to present two timestamps to agents: the date and time at which the thing occurred in the place that event occurred and also the date and time at which the thing occurred in the customer's location. For example, something being changed about a customer's account at 23:55 in London on a Monday actually happened at 00:55 on Tuesday for the customer in France. However, the timezone information was either not stored or not presented, interfaces were not consistent, and the result was pot luck whether the customer or a member of the customer service team would see Monday or Tuesday.

Timezones are hard. Presenting that information in a contextually appropriate way to your own employees and customers can be just as hard.

I like that the authors of the article have reached similar conclusions, especially around "dates have timezones". I think datetime capture and presentation is a fantastic UX topic.

sigwinch28··on Elixir – Why the dot when calling anonymous functions?
Edit: this was meant to be a reply to https://news.ycombinator.com/item?id=37122798 but I messed it up.

I don't see a good reason Elixir wouldn't allow it, since Erlang (yes I know it's not Elixir) often compiles anonymous functions ("Funs") into top-level definitions...

Here's some IR showing how a top-level fun from this Erlang module...

    -module(foo).
    -export([f/1]).

    f(X) ->
      G = fun (Y) -> X + Y end,
      G(X * 4) * G(X * 2).

...gets converted into a top-level function called '-f/1-fun-0-':

    {module, foo}.  %% version = 0
    
    {exports, [{f,1},{module_info,0},{module_info,1}]}.
    
    {attributes, []}.

    {labels, 9}.
    
    
    {function, f, 1, 2}.
        [SNIPPED FOR HN]
        {allocate,1,2}.
        {move,{x,0},{y,0}}.
        {swap,{x,0},{x,1}}.
        {call,2,{f,8}}. % '-f/1-fun-0-'/2
        {'%',{var_info,{x,0},[{type,number}]}}.
        {gc_bif,'*',{f,0},1,[{tr,{y,0},number},{integer,2}],{x,1}}.
        {move,{y,0},{x,2}}.
        {move,{x,0},{y,0}}.
        {move,{x,1},{x,0}}.
        {move,{x,2},{x,1}}.
        {call,2,{f,8}}. % '-f/1-fun-0-'/2
        {'%',{var_info,{x,0},[{type,number}]}}.
        {gc_bif,'*',{f,0},1,[{tr,{y,0},number},{tr,{x,0},number}],{x,0}}.
        {deallocate,1}.
        return.
    
    
    {function, '-f/1-fun-0-', 2, 8}.
      {label,7}.
        {line,[{location,"foo.erl",5}]}.
        {func_info,{atom,foo},{atom,'-f/1-fun-0-'},2}.
      {label,8}.
        {gc_bif,'+',{f,0},2,[{x,1},{x,0}],{x,0}}.
        return.
sigwinch28··on Microsoft continues right to repair about face, makes its hardware easier to fix
The title feels a bit like a garden-path sentence.

https://en.wikipedia.org/wiki/Garden-path_sentence

sigwinch28··on The Sad Bastard Cookbook
Does ChatGPT tell me that I can caramelise onions in 15 minutes?
sigwinch28··on The Sad Bastard Cookbook
Buy an East Asian style rice cooker and you’ll have hands-off low effort carbs for the rest of your life.

Cook dried pasta in a pot of boiling water. Season it with oil, salt, pepper, and Parmesan or any vegitarian/vegan alternative. That’s two options for your calories in a low-effort hurry.

If you want to cook nice food for yourself, I recommend Marcella Hazan’s “The essentials of classic Italian cooking”. Her recipes can be scaled to 1 or 2 servings quite easily.

Many of her sauces freeze well in silicone ice cube trays for big cocktail ice cubes. This means you can take advantage of an economy of scale by cooking a batch and freezing a lot of it into portions which you can reheat on the hob in a few minutes.

Well… this applies to a lot of homemade sauces but I like hers a lot.

sigwinch28··on An airline said her bag was lost, her tracker said otherwise. She flew to get it
> but the check-in agent had attached the wrong tag. This one was for another passenger, who was traveling from Baltimore to Chicago only.

So what?

It’s not the customer’s fault that someone acting on behalf of the company made a mistake. That’s the company’s problem.

sigwinch28··on The underground world of credit card network exploitation
> Majority of restaurant is all about experience and event payment system should match that experience.

I'm in the UK. I go to many high-end restaurants, cocktail bars, etc. Portable card terminals are essentially universal in these places. The fact it's the same everywhere is a feature, not a bug.

It's quick. Your card never leaves your sight. No pen is required. Payments up to £100 can be done using contactless on a physical card. Even higher amounts with smartphones/smart watches. Tipping is often integrated into the terminal where tipping is common. It's rare to have to put the card into the terminal.

I don't think it detracts from the experience. On the contrary, I think it streamlines the bit between being finished and wanting to leave:

"Please can I have the bill and a card machine, please".

sigwinch28··on FiraCode: Free monospaced font with programming ligatures
Have you tried the ss05 variant of Iosevka? It's intented to be Iosevka in the style of Fira Mono.

https://github.com/be5invis/Iosevka/blob/main/doc/stylistic-...

sigwinch28··on Stack Overflow Is Down
The pinned tweet for @StackStatus starts "With our recent status page improvements".

https://twitter.com/StackStatus/status/1575844926884962305?s...

The old status page https://stackstatus.tumblr.com is up, but not updated.

sigwinch28··on Converting Full Terraform Programs to Pulumi
>Isn't pulumi aws just terraform under the hood still?

It depends.

The AWS "Classic" provider uses the terraform provider [1].

The AWS "Native" provider does not, and instead uses the AWS Cloud Control API [2].

[1]: https://github.com/pulumi/pulumi-aws

[2]: https://github.com/pulumi/pulumi-aws-native

sigwinch28··on Freedom Clock
If someone at work asks me the date or if I’m signing in somewhere as a visitor and I ask the date, the response is the same: “the 25th”. The month is expected to be somewhat obvious. The year even more so.

If I’m giving or getting a response with the month I expect “25th of March”.

If I ask for the time and it’s the evening I expect someone to say “3:30” without the PM. It’s expected that I know it’s PM. In continental Europe I would expect “15 hours 30”.

Going to your address analogy, don’t you typically give the building number first? “1220 Something Street”. Again, with numbered streets in North America they tend to write and say “122nd Street” or “5th Avenue”. It’s the number that comes first. Not “Street 122” or “Avenue 5” or “Something Street 1220”. I don’t think your analogy holds well.

sigwinch28··on How to own your own Docker Registry address
I want to see a native service discovery protocol for OCI registries.

HashiCorp uses a service discovery protocol for Terraform: https://developer.hashicorp.com/terraform/internals/remote-s...

It allows domain owners to use a "pretty" name for their Terraform services (e.g. terraform.ycombinator.com) while pointing to a different host and path (e.g. an S3 bucket).

Decoupling the "root" of a registry from where its API is implemented is a great layer of indirection I wish existed in the container image registry ecosystem without speciaised server software to perform API-aware redirects.

sigwinch28··on Lego violates GPL by keep Blender-based BrickLink Studio source closed (2021)
> That doesn't completely justify Lego

Unless Bricklink actively hid it during acquisition it doesn't justify Lego at all.

sigwinch28··on Docker is deleting Open Source organisations - what you need to know
If you are using containerd then you might find the "hosts" section of the configuration file useful: https://github.com/containerd/containerd/blob/main/docs/host...

You could mirror the images to another registry of your choosing and then use containerd configuration as a stopgap until you update all of your `FROM`/`image` fields.

sigwinch28··on Docker is deleting Open Source organisations - what you need to know
This is incredibly frustrating to deal with because of how deeply the registry name is baked into Dockerfiles and image names. We end up "mirroring" our base images but there's some disconnect internally between "oh, yeah, our harbor.company/library/debian:bullseye is some random pull of library/debian:bullseye from the docker hub".

Imagine if you needed to change mirrors for `apt` and as part of that process you had to change all of the names of installed packages because the hostname of the mirror formed part of the package's identifier.

sigwinch28··on Live-caption glasses let deaf people read conversations [video]
Which group is that? Disabled people, or their allies, or someone else?
sigwinch28··on Live-caption glasses let deaf people read conversations [video]
I hope (reatively immature) solutions like this will not be used as an excuse to remove accessible infrastructure from the world (e.g. captions at the cinema, live subtitles at the theatre, text displays on public transport).
sigwinch28··on MQTT vs. Kafka: An IoT Advocate's Perspective
Fair.
sigwinch28··on MQTT vs. Kafka: An IoT Advocate's Perspective
I wonder... how many issues was Kafka "soaking up" by dealing with concerns that applications and services didn't have to even consider?

As in, I wonder how much application developer burden would be present if using MQTT instead.

sigwinch28··on Writing a Kubernetes Operator
I find myself conflicted between two approaches at work:

1. Write a provider/extension/whatever for a tool like Terraform or Pulumi. I live in a world where the infrastructure doesn't move underneath my feet. I am the source of truth. I feel like I only need to reconcile changes when I make changes to my IaC repositories.

2. I could write something that exists in a control plane, like Kubernetes operators or Crossplane. I live in a world where I look at the world, find the delta between current state and desired state, then try to reconcile. This is an endless loop.

I feel like these are different approaches with the same goal. Why should I decide either way beyond tossing a coin?

Some use cases:

- an internal enterprise DNS system which is not standards-compliant with the world at large

- an internal certificate authority and certificate issuing system.

sigwinch28··on KWOK: Kubernetes WithOut Kubelet
> To what extent can I run kubernetes locally with this tool?

Why do you want to use this tool specifically? Have you considered minikube? What features/use case are you looking for?

Do you want to run stuff on Kubernetes? If so, Docker Desktop on macOS and rancher desktop have built-in Kubernetes functionality.

or do you want to experiment with Kubernetes itself?

sigwinch28··on A targeted crackdown on “junk fees” makes a lot of sense
law and enforcement
sigwinch28··on Now offering 2TB SSDs for Steam Deck in the Framework Marketplace
Finding and creating products to sell to your target demographic, rather than finding a demographic to target your products at?

When you’re in a gold rush, sell picks and shovels...

sigwinch28··on Is Twitter down / read-only for everyone else?
Yep. Everything is “tweet cannot be sent”
sigwinch28··on Acrobat PDF rendering engine added to Microsoft Edge
> Users who want more advanced digital document features — such as the ability to edit text and images, convert PDFs to other file formats, and combine files — can purchase an Acrobat subscription that enables access to these features anywhere, including directly inside Microsoft Edge via an extension.

Or, more plainly: "we're putting more shareware in your operating system via the preinstalled browser"

sigwinch28··on BBC Subtitle Guidelines
> But if you're watching the politician speak, you can already see all of the emotion in their facial expression and body movement.

Yes, but a deaf person has trouble hearing how the speaker is speaking. They're missing out on the emotion in the voice.

Consider all of the emotion that can be conveyed in an audiobook, or on a phone call, or through music. Humans convey a lot of emotion in sound that is not represented visually. Part of sign language is conveying the emotion usually present in speech.

sigwinch28··on BBC Subtitle Guidelines
There's more to speaking than just the words. Sign language can convey inflection and emotion in ways that closed captions cannot.

Watch someone signing: they use their face and body to convey emotions like anger, confusion, hesitation, love, joy, and the rest of the human range.

sigwinch28··on Making the Gov.uk front end typography scale more accessible
I am happy to see the author mention WCAG and British Dyslexia Association. They seem to have a refreshingly strong focus on accessibility.

I wonder how much of an uphill battle is fought inside the GDS and across the UK government to push for this kind of universal access.

Also, it's amazing how much of a "brand" GOV.UK is for me even in spite of (or perhaps due to?) its accessibility. To me the brand is: big strong blobs of the high-contrast colour palette, GDS Transport (the typeface), and a relatively (but pleasingly) narrow content.

sigwinch28··on CLI for OAuth 2.0
"Sign in with X" can and does get abused: https://news.ycombinator.com/item?id=33917962

Getting a user to log in on a malicious app which has legitimate OAuth client credentials is usually game over, yes.

← PreviousPage 3 of 8Next →