HNHacker News
TopNewBestAskShowJobs

brewmarche

517 karma · joined August 5, 2018

submissionscomments
brewmarche··on Lionel Messi Is Impossible (2014)
All norms on finite-dimensional vector spaces are equivalent so the choice of norm shouldn’t matter for tails really.
brewmarche··on Earth now weighs six ronnagrams: New metric prefixes voted in
Units can be multiplied though. If N were a prefix you couldn’t distinguish Newtonmetres from N many metres

I think older prefixes are just grandfathered in

brewmarche··on .bestbuy
That’s not a gTLD, it’s a ccTLD.

See https://news.ycombinator.com/item?id=24442033 for why it’s allowed on ccTLDs

brewmarche··on Show HN: ShowMeYourHotKeys – A macOS app to show applications menu shortcuts
It’s quite an old feature. Check whether you have disabled or changed the shortcut under System Preferences > Keyboard > Shortcuts > App Shortcuts > All Applications > Show Help Menu.

The default shortcut might also differ between keyboard layouts.

As the sibling comment said you can also use the text box in the Help menu by clicking it.

brewmarche··on IPv6 should concede to using v4 addresses, for now
IPv4-compatible (all zeroes in front of IPv4 address) addresses are deprecated. They were intended for automatic tunneling (see RFC 1933/2893, it’s about tunneling IPv6 through IP4-only networks) which was deprecated in favour of 6to4 (RFC 3056, 2002::/16).

IPv4-mapped addresses are supported, depending on your network stack (I think for example OpenBSD doesn’t allow it for security reasons), but only to have a combined socket listening to both IPv4 and IPv6.

NAT64 is what you want I guess, but there is no requirement for a prefix (in a sense you can choose who handles the 6-to-4 translation by choosing the prefix). There is a “well-known” prefix though: 64:ff9b::/96

NAT64 is often combined with a DNS server translating A records into the corresponding AAAA records (DNS64). I don’t know whether they solved how that works together with DNSSEC though

brewmarche··on Ask HN: Ads triggered by WhatsApp “end to end encrypted” messages?
My thought exactly. As an experiment I would compare talking about new topics in person only vs. on WhatsApp. Actually there is a huge explosion of variations you can actually test: verbal communication with and without devices present (in case you also suspect audio recording), WhatsApp communication but no verbal, combinations, same network and different networks, etc.
brewmarche··on Ask HN: Why do we need central bank digital currency (CBDC)?
An idea: Smart contracts for derivatives. Nowadays a lot of OTC derivatives are collateralised between parties. Collateral payments depend on each party’s valuation which might differ and may come late. You could program the valuation and transfer of the collateral.

Whether a regular person can get an CBDC wallet is another (orthogonal) question. It’s equivalent to whether regular people can open an account at the central bank, even without CBDC.

brewmarche··on How and why Haskell is better (than your favorite $LANGUAGE)
Personally I get intrigued whenever people talk passionately in a jargon about a subject I don’t know: I want to find out what it is about and what exactly fascinates them. And I want to be fascinated by it as well (if possible), maybe they know something I don’t.

So, I get into it and in the end I maybe understand, but I also realise that just by reading it I would have never gotten the complete picture, I had to experience it myself to get there.

In the case of Haskell I like it a lot, even though I don’t use it on the job, the insights I’ve had I am able to utilise in other programming languages (C# at my current job) Anyway, even if that was not a possibility, the journey itself was nice. So maybe just try it out with some tutorials? Or don’t if you don’t feel like it

By the way it maybe appeals more to programmers who build their mental model around the code itself and not the machine running it. (This is an intuition I have which I cannot back up, but I got to know programmers who have to try everything out to understand it, see how the computer reacts and build their mental model around it, and I know programmers who reason about the code itself, the meaning it has. Maybe this intuition is BS.)

brewmarche··on Brian Kernighan adds Unicode support to Awk
Thanks, good to know. I’ve also realised that determining which form to use in mathematical formulas is maybe not that straightforward.

Edit: by which I mean that I’ve only seen the non terminal form so far in maths but it’s hard to write an algorithm that distinguishes between a word ending in sigma and some juxtaposition of Greek variables.

brewmarche··on Brian Kernighan adds Unicode support to Awk
Yes, here on macOS 11.6.8

  $ awk -version
  awk version 20200816
brewmarche··on Brian Kernighan adds Unicode support to Awk
In your quote encoding refers to assigning numbers (code points in Unicode parlance) to characters (I am simplifying here, I know the definition of character in Unicode is not that easy).

It’s like a catalogue of scripts. We have to extend it when we encounter new scripts that are not catalogued yet (or when we create new emojis)

Converting a byte sequence to a Unicode code point sequence and vice-versa is called transformation format (or more generally an encoding form, but then might not be deterministic) by Unicode (see <https://www.unicode.org/faq/utf_bom.html#gen2>). Unicode specifies UTF-8, -16 and -32. We do not have to change these formats unless the catalogue hit the limits of 32 bits (not a big problem for UTF-8 but for the other two formats). These formats are already able to encode code points that are not assigned yet.

And the confusion now is that a lot of people call what Unicode calls transformation format (i.e. the byte to code point mapping) encoding as well. The term charset is also used sometimes.

PS: Note that a goal of Unicode is to be able to accommodate legacy encoding/charsets by having a broad enough catalogue. This is so that these legacy encoding which may come with their own catalogue can be mapped to the Unicode catalogue. So we have control codes (even though not part of any “proper” human script), precomposed letters (there is a code point for à although it could be represented by a + combining `), things like the Greek terminal form of sigma separately encoded, although that could be done in font-rendering (like generally done for Arabic), and a lot more to aid with mapping and roundtrips.

brewmarche··on Ask HN: What are some cool but obscure data structures you know about?
Maybe comonads fit better
brewmarche··on Oh Shit, Git
Is this about rebasing vs merging or is it about whether to use `git rebase -i` to polish my own commits?

Sometimes I think maybe we should have two different names for these commands.

I think an interactive rebase requires a good mental model of the changes to split or merge them correctly in addition to knowing the CLI. I find it quite hard at times.

brewmarche··on Temporary pause of Bitcoin withdrawals on Binance
That is basically their point, that these alternatives are not successful because they chose not to use phone numbers.

Anyway here’s some alternatives:

Briar (no iOS client?)

Threema (not free as in free beer)

Wire

Matrix

XMPP

Telegram (can be used E2EE for 1:1 chats only and is off by default)

brewmarche··on Quick Tip: Enable Touch ID for Sudo (2020)
This would also work with 2 fingerprints
brewmarche··on System Preferences Reimagined on macOS
Good question! I’m on Mojave <https://help.apple.com/assets/5BFDD3F8094622802EEE504F/5BFDD...> and if I had to guess the categories would be:

User interface/desktop

peripherals/hardware

networking/connectivity

organisation (very specific, I know)

Security doesn’t really fit into the first one

While they can make kind of sense it doesn’t really help me as a user.

brewmarche··on System Preferences Reimagined on macOS
You can sort alphabetically via the View menu: https://support.apple.com/en-gb/guide/mac-help/mh15217/mac
brewmarche··on Temporary pause of Bitcoin withdrawals on Binance
> Moxie nailed it

His talk[0]/article[1] typically gets a lot of flack on HN whenever it is posted but it was really eye-opening to me.

[0] https://www.youtube.com/watch?v=Nj3YFprqAr8 [1] https://signal.org/blog/the-ecosystem-is-moving/

brewmarche··on Show HN: My small program from 2007 that gave Internet Explorer tabs
Cool find! I’ve only known <https://github.com/dotnet/pinvoke> which offers ready-to-use NuGets for various Win32 APIs.
brewmarche··on News from WWDC22: WebKit Features in Safari 16 Beta
On second thought maybe the notifications weren’t push per se and it was just using the regular notification API with some web socket or long polling in the background.
brewmarche··on News from WWDC22: WebKit Features in Safari 16 Beta
I remember receiving push notifications from Reddit on macOS Safari quite some time ago. Is this maybe another push mechanism?
brewmarche··on Using a catch-all domain is a mistake
That’s a good point. It’s better to use wrong but plausible answers or random sentences (some password managers can generate phrases from a word list)
brewmarche··on The use of ‘class’ for things that should be simple free functions (2020)
When you introduce a typo in a literal you will typically realise at runtime. Referencing a non-existing field won’t make it through compile time. I honestly don’t see the problem with this approach. I would choose better (semantic) names though.
brewmarche··on Noto emoji, a new black and white emoji font with less color
Wow, many thanks for digging all of this out. It’s pretty cool that the Unicode proceedings are public.
brewmarche··on What was wrong with SML?
Without extensions you can do it per-case via `seq`, see https://wiki.haskell.org/Seq (although it might get tricky because you might have to do it repeatedly because it only performs one “level" of evaluation)

There is also another GHC extension called bang patterns to request strictness on pattern matches.

The original bang (`!`) which is Standard Haskell can make fields of data structures strict, see: https://wiki.haskell.org/Performance/Data_types#Strict_field...

In general both lazy and strict languages can be strict or lazy. But the way it shows in the data types is different. A strict language can defer evaluation by adding a level of abstraction (instead of type `X` you have `() -> X`). A lazy language can force evaluation (it will have to evaluate at some point anyway) but you might not see it in the type. I’m not sure which one is better to be honest. Being able to infer laziness/strictness from the type is nice, but it also hinders interoperability.

brewmarche··on Noto emoji, a new black and white emoji font with less color
> Sequences also exist for ideographic variations like single- or double-storey 'a' and 'g', unified CJK, and miscellaneous ones such as serifs for certain mathematical characters.[1]

I couldn’t find the variations for a and g in the text file. Are you sure these are standardised variations?

brewmarche··on Those HTML attributes you never use
<abbr> sounds useful for screen readers
brewmarche··on I'm Too Risk-Averse for Index Investing
Shouldn’t we look at net return indices when talking about recovering?
brewmarche··on Storing UTC is not a silver bullet (2019)
I agree, storing with an offset is better here, e.g. prefer `2022-03-13T08:00-04:00` over `2022-03-13T12:00Z` when the regional time zone of the event location was UTC-4 when the event occurred.

Why? As instants they are both equivalent, but one carries additional information, namely the time that was on the wall where and when the event happened.

Fixed offsets will never change, so this really is a frozen snapshot

brewmarche··on Storing UTC is not a silver bullet (2019)
It seems to me that you are mostly arguing about what kind of time to use for a given business problem here. This is actually an interesting problem, but it is a business problem.

For example where I live trains will have a 1h delay (sometimes there are buffers that you can use to reduce the delay, or you cancel trains that anyway only run in the time window that is missing) when “springing forward” and will take a 1h break in the middle of the night when “falling back.” The schedule itself doesn’t change. Seems weird to me, but it is how the business rule is.

But what if the business rule is to use wall clock time? And that is actually a sensible choice for things like concerts or dinner appointments in a calendar.

When you use wall clock time (I assume that is what you mean when you call it local time) in example 4 you choose

> local time + take first occurrence on spring offset change

which is _one_ possible way to handle duplicate wall clock times; wall clock times are underspecified which you implicitly admit by choosing the first occurrence. So it _is_ a data type issue, unless you define the wall clock time data type to contain the occurrence number (e.g. something like `2022-10-30 02:32 II`).

To me that’s not a wall clock time but a wall clock time _with occurrence_ (or whatever name you want to give it) and it’s probably not a concept the user will know, so it needs some UX tweaks (e.g. hide the occurrence when there are no duplicate times and when there are notify the user about the ambiguity, offer a default and explicitly state it, maybe allow to change it to the 2nd occurrence, or maybe disallow duplicate times and ask for another time).

Another problem is that when switching forward there are holes in the time line, but that is easier to solve (it’s an invalid input).

← PreviousPage 7 of 9Next →