HNHacker News
TopNewBestAskShowJobs

brewmarche

517 karma · joined August 5, 2018

submissionscomments
brewmarche··on Default styles for h1 elements are changing
XHTML2 had some good ideas.
brewmarche··on AI Is Making Developers Dumb
It’s all about how you use written content, even before AI you could just copy-paste code from StackOverflow without any understanding. But you could also use it as an opportunity to do your own research, make your own experiences and create your own memory (which sticks a lot better). And it’s not just about coding, you can’t really grasp a subject by just reading a text book and not doing exercises or further reading.

Plato’s (or rather the Egyptian king’s - IIRC) fears were not unfounded, since a lot of people do not operate this way (sadly I see this with some peers), however overall the effect could still be positive.

Writing distributes knowledge to a lot of people, without it you have to rely on a kind of personal relationship to learn from someone more knowledgeable (which can be better for the individual mentee though). So maybe it increases chances of learning (breadth of audience) at the cost of the depth of understanding?

brewmarche··on Ask HN: How much traffic do you serve and with which database engine?
Do you really need to jump to micro services when you need scaling? You can also start multiple instances of monoliths/bigger services.
brewmarche··on Why Tracebit is written in C#
You can opt into most of them by setting LangVersion manually to your preferred C# version.

It works since most new C# features are just syntactic sugar which is lowered by the compiler.

Some of them require new types in the BCL (e.g. Range/Index, marker types for required/init/records), but for that you can just reference PolySharp which will generate the missing types on the fly.

Features that will not work typically also need runtime support, so default interface methods, static interfaces and the like will not work.

brewmarche··on What Is Vim?
Incremental search in vim is great, you can also cycle through results with CTRL-G/T while typing.

This even works as a motion (e.g. d / foo, then ctrl G until you hit the right foo, then enter to delete until there).

brewmarche··on Lies we tell ourselves to keep using Golang (2022)
It’s about where the error value ends up versus where the success value ends up. With sum types they both end up in the return value and are handled in the same place. Typically you will now try to let the value flow further with the typical functions (bind/bimap/map/or_else and what else we can come up with).

With exceptions they are thrown and end up somewhere else in a catch block, so the path of the success value is now distinct from the path of the error value.

brewmarche··on This website is hosted on Bluesky
As far as I understand CSP, since it’s set to `none`, no URIs are allowed, not even `data`. Inline scripts and stylesheets are not allowed either, since `unsafe-inline` (or nonces/hashes) is missing.
brewmarche··on Good Software Development Habits
Will check it out, thanks
brewmarche··on Good Software Development Habits
Are you talking about this book: A Philosophy of Software Design? Can you recommend it?

I am looking for rebuttals of this naïve Uncle Bob style and while I like the content of Casey Muratori, he doesn’t resonate with more corporate people.

brewmarche··on I sent an Ethernet packet
The TCP unit is called segment
brewmarche··on M4 MacBook Pro
Given that the Mini and iMac have received support for one more additional external display (at 60Hz 6K), I hope we’ll see the same on the MBA M4.
brewmarche··on OOP is not that bad
Love this series. In OOP always ask what should be the object when modelling the domain: often it's not an object like dog or cat but something like a rule or relation, to use the same example it could be a PlayRule (is this dog allowed to play with this cat, do they get along?), or whatever your problem demands (it's also interesting to observe that the terms dogs and cats are pretty vague, we could be talking about software for a vet or a shelter or a taxonomist, once you talk about the relation it seems to become more specific)
brewmarche··on Net 9.0 LINQ Performance Improvements
A `Select` to a tuple or anonymous class which you have to carry around all the way.

If you look at how a LINQ query gets translated to a method chain (e.g. via SharpLab or let Rider/ReSharper rewrite them) you'll notice that multiple `from`s or `let`s can become quite ugly.

brewmarche··on Escaping from Anaconda's Stranglehold on macOS
I did not know that (only know it from Windows), thanks for the explanation.

It looks like

  conda config --set auto_activate_base false
would be another fix for that. Or adjusting .condarc manually if you insist on not using the CLI. However I think teaching students about (virtual) environments will require them to know at least some CLI basics anyway.
brewmarche··on Ask HN: How To: Internal Documentation?
I agree but aren’t there docs that might be needed by non-technical people as well. The general doc repo might contain “bureaucratic” information (what I mean is who owns the application, what is the security concept, what other apps does it communicate with and who are their owners, how does it get audited, etc.).

Of course we can set up an export to a static website from the repo, but how would a non-technical person edit it, say if the owner or audit process changes?

brewmarche··on Escaping from Anaconda's Stranglehold on macOS
Same here. It’s not that bad of a solution when you think about it.
brewmarche··on Escaping from Anaconda's Stranglehold on macOS
Yes, you can specify any Python version available in the official channel: https://anaconda.org/main/python/files

If you have license issues with the official Anaconda repos (talked about in other comments), switch to the conda-forge channel instead, it doesn’t have these restrictions: https://anaconda.org/conda-forge/python/files

brewmarche··on Escaping from Anaconda's Stranglehold on macOS
You can just keep Anaconda and just use it as a pyenv replacement, e.g.:

  conda create -n "myenv" python=3.8
  conda activate myenv
Then just use pip in your environment, if you don’t like conda packages. Not sure what the paragraph about being able to install multiple Python versions after getting rid of Anaconda is about.
brewmarche··on iPhone SE 4 due in early 2025 with OLED and Apple Intelligence
I also have a 1st gen SE still and I did not get the 13 mini because it didn’t come with Touch ID. But now it looks like Apple is never going to bring Touch ID back anyway.
brewmarche··on .INTERNAL is now reserved for private-use applications
Probably most people would deem the risk negligible, but it’s still worth to mention it, since you should evaluate for yourself. Regarding the central machine: the certificate must not only be generated or fetched (which as you said probably will happen “at the center”) but also deployed to the individual services. If you don’t use a central gateway terminating TLS early the certificate will live on many machines, not just “at the center.”
brewmarche··on .INTERNAL is now reserved for private-use applications
This is the DNS setup I’d have in mind as well.

Regarding the certificates, if you don’t want to set up stuff on clients manually, the only drawback is the use of a wildcard certificate (which when compromised can be used to hijack everything under something.example.com).

An intermediate CA with name constraints (can only sign certificates with names under something.example.com) sounds like a better solution if you deem the wildcard certificate too risky. Not sure which CA can issue it (letsencrypt is probably out) and how well supported it is

brewmarche··on Non-computability of solutions of certain equations on digital computers (2022)
IEEE 754 defines decimal floating point in single (32 bit), double (64) and quadruple (128) precision since the 754-2008 revision. (However .NET’s type I mentioned above even though it’s 128-bit is its own thing and does not adhere to it).
brewmarche··on Non-computability of solutions of certain equations on digital computers (2022)
.NET’s decimal datatype for example represents a decimal floating point number
brewmarche··on Python toolkit for quantitative finance
That’s not the correct curve to use for pricing in general. You’d infer discount factors from overnight indexed swaps (OIS) instead as the overnight rate (ESTR, SOFR, SONIA, etc.) is what is used for collateralisation typically. To create such a discount curve you need OIS swap rates.
brewmarche··on Fuggerei: the world’s first public housing (2022)
Never changed, it’s still 88 cents per year. However utilities are not included so they make up the majority of the cost.
brewmarche··on A brief introduction to interval arithmetic
That makes sense, at that point you need some concept of identity though, like a sequential ID, so you’d be working with something like (int, float, float) instead. Or allocate on the heap and use the address for identity.
brewmarche··on My computer has an underscore in its name, and I have trouble with the network
Yes, they forgot to (or chose not to) consider search suffixes here.
brewmarche··on My computer has an underscore in its name, and I have trouble with the network
Yes ccTLDs are not a problem. But the ICANN rules you linked are even more restrictive, they don’t allow digits at all on the top level (see bottom of page 2-13, unless it’s an IDN) and say it’s due to the referenced RFCs but I don’t see how it follows from them.

The seminal definition (must start with a letter) was from RFC 952. Then it was lifted in RFC 1123: “One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. […] If a dotted-decimal number can be entered without such identifying delimiters, then a full syntactic check must be made, because a segment of a host domain name is now allowed to begin with a digit and could legally be entirely numeric (see Section 6.1.2.4 [sic]). However, a valid host name can never have the dotted-decimal form #.#.#.#, since at least the highest-level component label will be alphabetic.”

Note that section 6.1.2.4 is completely irrelevant, it looks like a referencing mistake. The later RFC 3696 then calls the rule the LDH rule and says: “There is an additional rule that essentially requires that top-level domain names not be all-numeric.”

But it never says where such a rule comes from.

RFC 2181 references section 6.1.3.5 of RFC 1123 (maybe that’s an old 6.1.2.4) but it doesn’t state that rule either.

brewmarche··on My computer has an underscore in its name, and I have trouble with the network
I remember this from work, Windows networking accepts underscores apparently just fine for file shares and I think browsers can access it as well (not sure), but Java didn’t want to receive connections under that name because it was illegal.

I think there are multiple RFCs trying to define hostnames and one of them lifted restrictions on digits-only labels because TLDs contain at least one letter so there’d be no confusion with IP addresses. However I was not able to find out who guarantees that there is at least one letter on the TLD level.

brewmarche··on UTC, Tai, and Unix Time (2001)
One could also make ticks on such a day last 86400/86401 or 86400/86399 seconds, keeping the tick duration fixed but only for a given day (a relaxed version of B)
← PreviousPage 5 of 9Next →