Better HN
topnewbestaskshowjobs
Log inSign up

alblue

1,569 karma · joined Nov 5, 2013 (13y ago) · 443 submissions

Java Champion, Eclipse guru, Mac fanatic and occasional fair weather pilot. Blogs occasionally at https://alblue.bandlem.com and writes for InfoQ. Can be found as @alblue on Twitter.
Submissions

comment 4y ago · link · parent

Oracle’s OpenJDK is the only one that is built without supporting Shenandoah GC.

comment 4y ago · link · parent

Did you mean to have the `tmp.name` as the library passed into `CDDL`? If not, what’s the purpose of the copy?

comment 4y ago · link · parent

If you’re more into watching a presentation, I recorded “A Brief History of Unicode” last year, And there’s a YouTube recording of it as well as the slides:

https://speakerdeck.com/alblue/a-brief-history-of-unicode-45...

https://youtu.be/NN3g4JbbjTE

comment 4y ago · link · parent

iOS auto incorrect. It’s just ducking awful.

comment 4y ago · link · parent

You might also like my recent presentation on understanding micro architecture:

https://speakerdeck.com/alblue/understanding-cpu-microarchit...

The presentation was recorded and is on YouTube

https://youtu.be/Pa_l3aHCoGc

comment 4y ago · link · parent

The link is supposed to be https://speakerdeck.com/alblue/understanding-cpu-microarchit... but for some reason HN has stripped the last parameter off, which means it is more pointing to the beginning of the deck instead of slide 20.

7.

Beer Cache Hierarchy(speakerdeck.com ↗)

3 points · by alblue · 4y ago · 1 comment

comment 4y ago · link · parent

True, but as it turns out in 2022 we are in exactly the same problem, as our bitterly incompetent Prime Minister is trying to save his own job at the cost of thousands of lives (152k and rising)

https://www.bbc.co.uk/news/uk-60047438

comment 4y ago · link · parent

I gave this presentation; if you have any questions, I’d be happy to answer them as best I can.

comment 4y ago · link · parent

From the abstract: Microprocessors have evolved over decades to eke out performance from existing code. But the microarchitecture of the CPU leaks into the assumptions of a flat memory model, with the result that equivalent code can run significantly faster by working with, rather than fighting against, the microarchitecture of the CPU.

This talk, given for the JChampionsConf in 2022, presents the microarchitecture of modern CPUs, showing how misaligned data can cause cache line false sharing, how branch prediction works and when it fails, how to read CPU specific performance monitoring counters and use that in conjunction with tools like perf and toplev to discover where bottlenecks in CPU heavy code live. We’ll use these facts to revisit performance advice on general code patterns and the things to look out for in executing systems.

The talk will be language agnostic, although it will be based on the Linux/x86_64 architecture. The presentation was recorded at the JChampionsConf meeting in January 2022, and a recording is available here: https://youtu.be/Pa_l3aHCoGc

11.

Understanding CPU micro architecture for performance(speakerdeck.com ↗)

6 points · by alblue · 4y ago · 2 comments

comment 4y ago · link · parent

> and now do little for the latest variant.

Actually, the current vaccines still seem to be doing a pretty good job, even with the latest variant (and there are always more variants). While none of the vaccines have ever claimed to prevent you catching covid 100%, they have prevented 90%+ against catching the disease and have reduced the severity of the disease in those who have caught it. It’s why emergency rooms around the world are largely filled with unvaccinated people, and most of the ones in hospital who go on to die are the unvaccinated.

Think of it as giving your body a natural head start to fighting off the infection. In the end, it’s your immune system that saves you, not the vaccine — but the vaccine stacks the deck significantly in your favour for a full recovery.

Of course the virus is mutating, and it’s possible that the next one will escape the mRNA vaccines that currently exist due to the different shape of the protein; but we have essentially developed a whole new science of how to create vaccines quickly from a known protein spike, so it will be a matter of months from discovery of an escaping strain to a protective vaccine for it.

In any case, the approaches used here are valid for more than just covid; an exciting HIV vaccine is undergoing trials at the moment And there’s potential to treat other kinds of viral diseases in this way.

comment 4y ago · link · parent

TL;DR Microsoft released a virus definition file with a timestamp/serial 220101001, and is unable to parse it into a (signed) long value since the largest value is 2,147,483,647 and it’s possible that there’s a factor of 10 in the deserialisation logic.

comment 4y ago · link · parent

This is the only git manpage you’ll ever need:

https://git-man-page-generator.lokaltog.net/

comment 4y ago · link · parent

Then set up an alias to do it for you.

https://alblue.bandlem.com/2011/04/git-tip-of-week-aliases.h...

comment 4y ago · link · parent

It’s known as the Konami code, although it’s got BA Start at the end :-)

https://en.wikipedia.org/wiki/Konami_Code

comment 4y ago · link · parent

Note that GC makes explicit the costs associated with memory allocation and freeing; languages that use manual memory management (or semi automated memory management as in Swift/Rust) simply un-amortise the cost and distribute it all over the program.

While Rust may have less issues than other languages in this regard, it doesn’t change the fact that destruction of a “thing” can result in a transitive set of “other things” being destroyed as well, and depending on the state of the program, this set could have a pretty high bound.

Even in a “predictable” language like Rust, a data entry containing a map like structure is going to have a different destruction time if the map is empty vs if it is full.

The other aspect of “predictable” delays in a program completely ignores the runtime issues that can happen at the OS layer, such as swapping/page cache invalidations/migrations between cores of numa regions etc. so it is rarely the case that any program in any language is going to have predictable behaviour. Even trivial things, like the number/size of environment variables user at program startup can have a performance delta.

Anyway, the point is that when programmers talk about “predictable” behaviour in a program, what they generally mean is “invisible performance problems” and so it gets swept under the carpet.

That’s not to say that GC doesn’t introduce variance into measurements, but it is not the only thing that causes variance and many of the good GCs are capable of using multiple cores and can avoid interrupting the program runtime without significant overhead, although obviously tracing collectors will increase pressure on a memory system in a way that explicit/automatic memory management does not.

comment 4y ago · link · parent

Is it this one?

https://nvd.nist.gov/vuln/detail/CVE-2021-44228

comment 4y ago · link · parent

Where’s the CVE?

comment 4y ago · link · parent

There’s a few reasons, but mostly is due to economics and the way Apple builds its own software.

Swift came out of the iOS side of the company, and was sponsored to make writing iOS apps easier. It was therefore constrained to fit into a particular shape; in particular, Objective-C compatibility was a must have. Many of the frameworks and libraries on iOS/macOS are implemented in Objective-C including “std” libraries like Foundation.

When building Swift for Linux/Windows, there isn’t an Objective-C ecosystem, and rather than introduce one, instead the language just doesn’t have support for that. As a result, the “std” libraries are a complete rewrite of the libraries available on macOS. Even being able to include Posix basics used a different library name; Darwin vs GlibC. [There was a long battle to try and get a meta import of LibC which would import the right one on different platforms.]

So there are really two dialects of the language: Apple Swift and Linux/Windows Swift. They share the same overall feel but is like the difference between Diesel and Petrol/Gas. Same overall outcome, different completely under the hood.

Two other reasons exist; firstly, the internal builds are a fork of the open source project, so when a new feature lands on an iOS device, code and libraries are written to support that (eg SwiftUI) and nothing related to that fork lands until after Apple have announced it. What that means is you get giant blobs of diffs on an annual basis; in some cases, reverting bugs that have been fixed already in the open source world (because the internal version was forked six months previously).

The other reason is that Swift depends on a forked version of llvm/clang, to the extent where you have to install those to be able to compile Swift programs. Many upstream distributions already ship their own clang, which is essentially incompatible with Swift, but they want to follow their philosophy of only one version of a library (and don’t want to replace their own version with a Swift specific one).

So, Swift on iOS is a primary platform, and if you are writing iOS apps is the standard way. Every other platform is a second class citizen and software project management at Apple is not well suited to an open source workflow; since the iOS team are calling the shots on swift (and paying for most of it, to be fair) then the language evolves for their benefit primarily and then others as a side effect.

comment 4y ago · link · parent

The most annoying aspect of this for us was that the AWS Organizations API only has a single endpoint, in us-east-1.

https://docs.aws.amazon.com/general/latest/gr/ao.html

As a result, even if you weren’t using that region but you were using the API you were hosed for 6+ hours, And the status page never acknowledged that it was out of action.

We had the following Terraform in our production pipeline:

data “aws_organizations_organization” “current” {}

As a result, all of our deployments to our EU regions were borked. Of course, we couldn’t raise a support case because the support system was also down, and despite escalating to our TAM weren’t able to get the status page to reflect reality.

My concern is that the Organizations API specifically will be brushed under the carpet and we will still have a single point of failure in a region which we never intend to use.

comment 4y ago · link · parent

The talk itself is great, but the background to the slides and speakers is constantly moving from side to side and is pretty distracting. I would have preferred to see the video of the slide deck itself without any extraneous background or the speaker’s head.

comment 5y ago · link · parent

I’ve used Mythic Beasts for over a decade now, and they are a great company for all sorts of hosting, not only raspberry Pis.

Plus, they actually serve the Raspberry Pi foundation website and the raspian images /from Raspberry Pis/ so they know what they are doing.

comment 5y ago · link · parent

Another approach, if you are using terraform directly and running in AWS, is to get GitHub Actions to log on to AWS.

While you can do this by embedding an AWS IAM secret as a GitHub secret, it may lead to the secret escaping. Instead, you can configure AWS to trust GitHub actions, And set up passwordless trust between the two.

I wrote up how to do it here at StackOverflow if you’re interested:

https://stackoverflow.com/a/69243572/130659

comment 5y ago · link · parent

I was working for a FAANG company and had negotiated internally with another department for a job which I would have been perfect for.

My management chain veto’d the transfer, which was the day I decided to quit. I started looking for opportunities outside that company, and within six months had moved on to a job with significantly more responsibility than my original or other routes within the FAANG.

Companies that prevent internal transfer turn them into external transfers.

comment 5y ago · link · parent

Since the language is based on JavaScript, you can also concatenate strings together with “”+”” as part of your output, eg ‘.Name + “(“ + .Email + “)”

comment 5y ago · link · parent

Jaguar F-Pace is a fossil fuel car. The electric version is the I-Pace.

comment 5y ago · link · parent

Downloading timetables from stations. They are available in dead tree format but next to them is a QR code that takes you direct to the PDF you need which you can save to your phone.

comment 5y ago · link · parent

The live stream starts in 4 hours time at http://www.virgingalactic.com/
12345
15