Better HN
topnewbestaskshowjobs
Log inSign up

PreInternet01

2,490 karma · joined Dec 13, 2022 (3y ago) · 418 submissions

Submissions

comment 2y ago · link · parent

Well, the general 'Rewrite All in Rust' consensus is that it solves all general programming problems, ever.

Yet, the linked repository shows a huge list of cases in which simple, documented use of Rust can cause Undefined Behavior (a.k.a. 'UB')

Pretty much every argument of Rust advocates against C/C++ boils down to either 'but memory safety' or 'but UB'.

Yet there are many convincing counter-arguments that boil down to 'but CompCert' or similar, and, as the linked repository shows, there might be at least some truth in there?

comment 2y ago · link · parent

The one link for those who think that 'Rewrite it All in Rust' will, well, settle any debates: https://github.com/rust-lang/miri/

comment 2y ago · link · parent

If you're the only author involved (or if all authors, including those of downstream dependencies, agree), you can dual-license the software: AGPLv3 by default, proprietary for paid-up customers.

So: whatever you put on GitHub (or wherever) is available for anyone to use for any purpose, as long as they re-contribute their changes to your code and/or the source code for directly-linked projects.

To anyone who doesn't want to meet those obligations, you can offer a proprietary license, allowing them to use the code in any way you see fit.

Turning this into a sustainable business, however, may be a challenge. So, some questions to consider: why do you want to open-source? Because you have existing dependencies? Existing contributors? Or just because it sounds good?

If the latter, just forget about it, and go full-proprietary: nobody will care. If you depend on contributors that might insist on open-sourcing their code, talk to them to figure out the best way forward. And if it's because of dependencies: you'll have to respect their license, and good luck with building a business on top of that...

comment 2y ago · link · parent

Interestingly enough, accessing the Azure Portal from Firefox was OK, while Edge failed. I'm not sure what Edge's default DNS settings are, but after switching to 1.1.1.1 DoH, the portal also loaded.

That means the outage was either short-lived (doubtful, as it's not 9AM in Seattle yet, and Microsoft outages typically only start to get resolved around that time, weekdays only, mind you), or that... shockingly... it was DNS.

comment 2y ago · link · parent

> And yet, since we moved to Denmark 3 years ago, every time we've returned to Denmark through Padborg, we've been met by border control

Sorry, but that's just business as usual. Document checks on trains have continued to be a thing despite Schengen since its inception, and are even common on commuter lines. I don't have any hard numbers on their effectiveness, but it's not unusual to see people being detained as a result (which is risky for the detaining agency, as mistakes are quite costly), so I guess there is a net positive there?

Note that, from a passenger PoV, these checks usually consist of "vaguely waving your ID card at the officers passing by" (i.e. less effort than having your ticket checked, which involves interaction with an RFID scanner...), which makes this ominous think-piece even less convincing.

comment 2y ago · link · parent

To put this in perspective: for CO2 emissions (which is what we're talking about here, I guess?), you have the Big Four, in descending order of pollution: transportation, electricity, industry and other (mostly commercial/residential), for a total of about 65 Billion Metric Tons of CO2 per year.

In transportation, the biggest polluter (by direct emissions) by far is shipping. This is about 8/65 (12%), compared to 1/65 (1.5%) for the much-maligned aviation sector, or the 4/65 (6%) for cars, that, for some reason, nobody likes to talk about.

Then, when it comes to electricity, data centers are really quite marginal: 0.4/65 (about 0.6%). And, like aviation, the sector is taking measures to Be Better: higher airco setpoints, mandatory purchase of "green" electricity, etc. etc. Unlike the shipping sector, which pretty much continues to burn raw dinosaurs just because they're based in a jurisdiction that allows, nay, encourages that.

So, if you want to get mad about emissions, start with things that actually matter, would be my take? I happen to be of the opinion that AI is bunk, and any energy invested in it is wasted, but that goes doubly or triply for the shipment of novelty hats...

comment 2y ago · link · parent

Well, I'm not a CrowdStrike customer, so I'm not entitled to any gift cards anyway, and I'll refrain from asking snarky questions like "is that per organization, per affected PC, or per minute of wasted support time?"

Instead, let me offer the following, alternative snark: "If I were to share with you the secret of renaming your C-*.sys files to C-*.tmp prior to trying to ingest them, so that if you crash while doing so, you will not repeat that mistake right after rebooting, how many US$10 gift cards is that worth? Keeping in mind, of course, that is, like, 2 hours of parking where I live?"

comment 2y ago · link · parent

Nah, this kind of agitprop is not what any OS needs to succeed.

If $whatever were the dominant platform today, the number of incompetently-coded-but-mandatory-in-many-sectors kernel extensions would be, best-case, exactly the same as it is for Windows today, with pretty much the same outcomes (i.e.: generally not much, with entertainingly spectacular outliers like, well, Crowdstrike).

For $whatever to be actually better in a meaningful sense of the word, it would need to:

-Have a market share that, if not equivalent to that of Windows today, at least makes ISVs pay attention. This is really, really hard: not because "M$ controls all the hardware vendors historically and forever", but because hardware is an extremely low-margin business, and the room for experimentation is minimal...

-Similarly: most OS sales are to enterprises, and they have certain control issues that need to be addressed. "All that Active Directory (or whatever Microsoft marketing chooses to call it this decade) does" is a good starting point. Yes, this "compromises user freedom", bot possibly not in the way you think...

-Finally: in order to lock down kernel-mode access, offering user-mode APIs that are both completely fail-safe as well well as fool-proof for 80%, if not better, of use cases is mandatory. The engineering effort required to achieve this would most likely look a lot like that involved with, say, AWS, Azure or Google Cloud, with, say, similarly impressive results?

comment 2y ago · link · parent

(2019), but still good-ish advice. The pattern works like a charm in modern C# as well, and has nice space-saving effects too by allowing you to omit the explicit variable declaration:

    if(!Whatever.TryParse<Thingy>(input, out var output)) output = some-sane-default;
or:

    if(!Whatever.TryParse<Thingy>(input, out var output)) throw new ApplicationException($"Not a valid Thingy: {input}");
Protip: don't do the latter in your kernel-mode driver.

comment 2y ago · link · parent

I've seen plenty of people getting tripped up by this, sometimes quite publicly (like the blogger who returned the Mikrotik switch they got for their 25Gb/s home internet connection because turning on NAT turned it into a noisy space heater...)

comment 2y ago · link · parent

Marketing or not, it's a useful metric when comparing expected performance across the Mikrotik product line...

comment 2y ago · link · parent

It's not a SwitchOS (which can and should be ignored) versus RouterOS issue, more that Mikrotik is limited by the capabilities of the off-the-shelf switching SoCs they have to use due to their size.

Once you run into limitations there (which can already be due to something like "needing to use VLANs"), it's all CPU-based, which isn't necessarily a problem (the amount of switching performance you get out of a Tile-based 'router' is pretty amazing).

The most interesting piece of documentation about any piece of Mikrotik kit is the block diagram, followed by close reading of the L2/L3 offload docs...

comment 2y ago · link · parent

Yes, it does have hardware offload, but that works better in theory than it does in practice. (For doing line-rate NAT with more than a handful of clients, it's not an option, mostly because of the state table limits already mentioned in a sibling comment).

"Will the hardware offload actually do anything useful?" is a time-honored Mikrotik game: see the sometimes surprising limits at https://help.mikrotik.com/docs/display/ROS/L3+Hardware+Offlo...

comment 2y ago · link · parent

Quick note on the CRS312: while absolutely lovely as a switch, you have to be careful about what exactly you want to do with it, as, as with the entire Mikrotik range, it can do absolutely everything (provided you can wrap your head around the configuration), but isn't necessarily good at it.

In the case of the CRS312, its potato-class CPU means that even NAT at 10Gb/s can be challenging. However, if you pair it with something like a CCR1036 (discontinued, but still available and sporting a 36-core CPU) or its successor, the CCR2004 (or even something like the RB5009UPr, which adds PoE, but is limited to 2.5Gb/s) you'll be all set.

comment 2y ago · link · parent

Full disclosure: after a week of various things happening to me, the CrowdStrike thing was not a thing that affected me.

I don't feel better, worse, or, basically anything because of that fact.

And no, none of the options switch to Linux, evict all security vendors and/or go and live on an island (tempting though the latter is) would have made anything any better, thank you for (not) asking...

comment 2y ago · link · parent

The "cyber sector" is... awful? Nah... irresponsible? Nah... immature? Yeah, probably!

Right now, pretty much everyone is looking to outsource their "security" to a single vendor, disregarding the fact that security is not a product, but a process.

That... won't change! And incumbents will get less-awful about their impact on "protected" systems.

And yet, there's an opportunity here! Do you truly understand Windows? And whatever happens on that platform? And how to monitor that activity for adverse actions? Without taking down your customers on a regular/observable basis?

Step right up! There are a lot of incumbents facing imminent replacement...

comment 2y ago · link · parent

Yeah, you're right, and I totally missed that on my first scan, probably due to being blinded by the huge hex conversion chart...

comment 2y ago · link · parent

Oh, well, having DTAG removed from the Firefox and Chrome/Windows root stores would be... oddly satisfying?

I know that in the US, ISP-wise, mostly Comcast has a bad reputation, but in the EU and from a business perspective, Deutsche Telekom is also not, eh, universally liked...

comment 2y ago · link · parent

Yeah, or, see https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4927102/ ("Is Butter Back? A Systematic Review and Meta-Analysis of Butter Consumption and Risk of Cardiovascular Disease, Diabetes, and Total Mortality")

TL;DR as well as hot-ish take: whether your diet is healthy or not doesn't actually depend that much on the quality of your baking fats. Oil, butter, margarine, whatever: it's more about quantity than quality.

And of course, truly bad products will damage your health (so, yeah, glycol-infused oil is way worse than any butter, and vice versa), but otherwise: just use what the recipe says, and enjoy in moderation...

comment 2y ago · link · parent

On the one hand, the Z80 was indeed a CPU you could easily wrap your mind around, on the other hand, similar sheets exist for Intel chips (from the same author: https://vtda.org/docs/computing/MicroLogic/MicroLogic8086&80...), so maybe the differences between architectures aren't as stark as we like to think?

Having said that, I'm not sure how actually-useful this particular reference card is: huge hex conversion table, but no instruction timing chart?

Anyway... pure nostalgia caused me to go through an old Z80 assembly book just now ("Advanced Spectrum Machine Language"), and I found some code I wrote a good 35 years or so ago: https://ibb.co/fvqtwkQ

This was printed on thermal paper (not sure about the printer model: I don't think it was the original ZX Printer, as that used differently-sized paper), so sort-of impressed it survived that long (most printouts I had from that time long faded). As to why I wrote the code or what it does: I think it was to create an animated tape loading screen, but...

comment 2y ago · link · parent

Alternatively, do use Excel for data analysis, but instead of opening CSV files directly in Excel, create a new blank workbook, then go to the Data tab, select From Text/CSV, and follow the prompts, which will allow you to preview your data and select proper data types for each column.

This will avoid all the issues alluded to here. And yes, I know that it's stupidly simple to go the wrong route, but I also think by now people would be wise to all of this, since the proper functionality has only been there for a decade or so. But, hey, apparently total helplessness keeps getting clicks.

comment 2y ago · link · parent

Well, CA wines are, on the whole, ridiculously overpriced.

A lot of people moved in on that, making it not entirely unlikely that supply now outstrips demand?

Same thing happened in various regions in France at various points in time. The viable plots will be reclaimed at some point, and make some fine wines in the future, except possibly not at the price point the original owners had in mind...

comment 2y ago · link · parent

Well, SO is now (possibly was?) owned[1] by the same group of companies[2] that failed to secure their own TLDs[3] for purely technical reasons, so, before nefarious intent, please also consider plain incompetence....

[1] https://techcrunch.com/2021/06/02/stack-overflow-acquired-by... [2] https://www.google.com/search?q=prosus+multichoice [3] e.g. https://www.icann.org/en/registry-agreements/terminated/mult...

comment 2y ago · link · parent

> Please don't post insinuations about astroturfing, shilling, brigading, foreign agents, and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email hn@ycombinator.com and we'll look at the data.

comment 2y ago · link · parent

Powershell, Get-AppxPackage *Microsoft.WindowsNotepad* | Remove-AppxPackage and get on with your life. It will restore the legacy notepad.exe (as will, like, right-clicking the new Notepad in the start menu and selecting Uninstall) -- but yeah, I know, you didn't opt in to this, <insert rest of generic Microsoft-related HN complaints here>

comment 2y ago · link · parent

Well, then maybe write a blog post explaining exactly what happened here and submit that?

Because, even having re-read the article you linked, it does not support the conclusion that "[an] exchange[...] was totally ruined because of [weak isolation]" at all?

comment 2y ago · link · parent

The submitted title deviates from that of the linked post ("Do we fear the serializable isolation level more than we fear subtle bugs?") and, having read the source, I'm not even sure if it's even close to accurate...

comment 2y ago · link · parent

Well, the C-130 has been pretty much everywhere pretty much forever -- not sure if anyone in the military in the last 5 decades or so has not been in and/or near them at some point?

My Mi-26 experience was as a staff tech (military, but as part of a humanitarian effort) airlifting medical trucks into a flood-struck area in India, like, 30 years ago or so, but as I understand it, they're still used pretty widely outside NATO, even today.

comment 2y ago · link · parent

I can't say anything about the Mi-6, but its successor, the Mi-26, definitely isn't that loud. Definitely "huge transport aircraft" loud, but not "C-130 loud" (where, if you sit just behind the forward bulk head, kidney stone removal is an automatic benefit included with take-off)

comment 2y ago · link · parent

Au contraire, plain text is just about the only format for logs that works. Having to use some obscure tool to query logs just isn't worth it, especially not in 20 years time, when you still need to analyze said logs but the tool doesn't even run on any contemporary systems anymore and the documentation about the binary format has been irretrievably lost.

And yeah, sure, you want to use structured logging. So, in addition to the greppable log message, include a Magic Separator Character (say, \t) that you treat as 'end-of-line' in human-oriented processing, and have your key-value-pair structured data following that for automated tooling to have its way with. Or, be really creative with [key=value] blocks that are both human- and machine-readable.

Some of my most painful logging experiences were having to extract application logs from binary blobs created by a proprietary Windows tool (no, not the main Windows event log: that's bad, but at least documented). Even the most recent versions of the official viewer just crashed, the vendor was not interested in fixing that (since we were not a customer, just a third party in need of log data, but even an offer of a modest payment was met with indifference...), and the actual format turned out to be byzantine beyond words.

So, yeah, give me plain text all day, every day...

12345
14