Agreed. I've recently translated a pangram generator project written in Rust [1] leveraging SIMD to do the same in Go [2] to see how it fairs in terms of speed - the results are pretty close. In my local machine I'm getting ~3GHz in Rust vs ~2.4GHz in Go, which I think is really impressive.
I still believe that SIMD support is one of the most underrated new features in Go.
It's relatively straightforward to read and to write code using Go's SIMD package (the caveat being that you have to convert your data to SoA manually), and it gives comparable performance to other languages, since there's little in the way of GC overhead, bounds checking, etc, in this case.
So SIMD not only increases performance on its own, but it also closes the performance gap between Go and C++ / Rust, which has been a major cause for rewrites in the past. The memory usage overhead due to GC doesn't go anywhere of course, so there are still performance reasons to "Rewrite in Rust", but it's now become much easier to just optimise the hell out of Go code instead.
Odin solves this by letting you declare all arrays as either normal (AoS) or SoA, which helps with this use case a lot. Otherwise very similar ideas, except all the memory goodies. Underrated language!
This was one of the times where it made some sense. A lot of their complaints were about GC, which Discord has had issues with in the past on other things. Notably, Discord switched from Cassandra to ScyllaDB for their messages, and cited the Java GC as a big reason.
The fun part is unless your app is pretty high traffic you might see the bug only once, or twice, and never have a reasonable way to even get close to a fix or know what your real exposure is.
That is the correct mentality, but sometimes, you’re wrong. I found (not entirely true; someone else [0] found it first, but my report from my company got traction [1] on it) a weird bug in ProxySQL several months ago involving mirroring and fast routing, where if you had a configuration that was illogical from the standpoint of documented behavior, it would duplicate queries, which led to super fun times for writes.
I spent hours empirically trying various scenarios before concluding that no, it was a ProxySQL bug.
I mean, ProxySQL and SQLite are at very different tiers of reliability. I encountered multiple unreported data-corrupting (and some resource exhausting/connection mis-pinning) bugs in ProxySQL within a few months of using it for the first time, and I wasn’t using it for anything particularly complex or advanced—just a basic connection pool, no failover or caching/rewriting/replica awareness, but a lot of frontends and QPS.
Sure but there's no real way to use that in a portable way, at least not a way that maximises performance on every CPU you run it on. That's pretty much impossible at the moment.
Which is why I've never quite understood the appeal of portable SIMD libraries for performance-critical code. If I'm explicitly writing SIMD rather than relying on the auto-vectorizer, it's usually because I want access to the particular capabilities of the target ISA.
For many problems, choosing the right instruction or instruction sequence makes a large difference. Portable SIMD abstractions necessarily expose some common semantic layer, but SIMD ISAs don't actually have equivalent capabilities. Instructions like pshufb, for example, enable algorithmic tricks that don't necessarily have an equally efficient analogue on another architecture.
If maximum performance matters, I generally want intrinsics and architecture-specific implementations; if portability matters more, I'd rather move further up the abstraction stack and use something designed to target multiple architectures, such as ISPC. There are certainly cases where portable SIMD gets close enough to optimal, but I don't think there's a compiler or abstraction that can express every useful SIMD idiom and lower it equally efficiently across fundamentally different ISAs.
Because usually they achieve a very good middle ground, they are useful for when autovectorization isn't good enough, and it is possible to give a little help to the compiler.
There are many ways that performance matters without trying to win a F1 race.
Go isn't alone, .NET, Java have similar portable libraries, and C++ is in the process of getting one.
You can absolutely parse HTML with regex, so long as the document is finite in length. Every finite language is regular, hence can be parsed with regex's.
> You can absolutely parse HTML with regex, so long as the document is finite in length
This isn't sufficient, unless I'm misinterpreting what you're saying. It's not enough to have documents of finite length (all documents are finite in length), you need documents with a max length, so you have a finite number of possible documents to parse.
Its five years with no limitations, so when you are due to be released; Whats your password? Another five years... Its such a poorly worded law you could literally spend your life in prison for forgetting your password. And Its mostly used against peaceful protesters.
Double jeopardy was abolished by Blair in the Criminal Justice Act 2003, Scotland abolished it as well a bit later in Double Jeopardy Act 2011. However i doubt it would apply even if we had it as the wording in Section 49 is so poor it could just be reissued as a new offense each time.
Has it happened? Section 49 of the Regulation of Investigatory Powers Act 2000 has a secrecy requirement built into it, where if you tell anyone that you have been issued a Section 49 you can get an additional 5 years (treated as a separate crime). This, as you can imagine, makes your question difficult to answer.
It does and of course it's different happened. My pet peeve has to be the "it's a poorly worded law" argument about things that have obviously been considered by legal experts. The scares like "the psychoactive substances act will technically make coffee illegal" I've seen on HN are particularly egregious.
I don’t believe this is the case, every now and then we see prosecutors using an obsolete unenforced law or an unexpected edge case of some law to come after people.
A great example is the CFAA. It has been judicially narrowed after court battles, because in its original form it was overbroad and criminalized basic, common things. Prosecutors abused it in order to get political wins until they were finally stopped.
This is unfortunately fairly common. Legislators either push for too much or don’t understand how the law might be applied, and innocent people suffer until someone wins a big expensive set of appeals.
Edit: I realize now you may be talking about the UK in particular, in which case you don’t even get this shoddy level of protection as “Parliament is sovereign” (lol).
I'm talking about the specific law that was being discussed, and the particular other law I used as an example. And the protection mentioned was the one of double jeopardy which had also been explicitly mentioned.
Double jeopardy was partially eliminated in the UK in 2003 for qualifying offenses. I don’t think this has been tested, but during a retrial, a refusal to provide a password would be a separate RIPA offense from any refusal during the first trial. So you could actually be jailed more than once for this. For qualifying offenses all that is required for a retrial is “new and compelling evidence” which is a low hurdle for politically unpopular defendants.
If that did happen you'd have a good case from the Human Rights Act because it becomes indefinite imprisonment. The UK is still following the ECHR as well.
But arguing these theoretical untested-because-they-never-happen edge cases isn't exactly pushing forward a good case for this law having been "badly written." There's seemingly no problem with it in practice.
Dismissing the concerns about poorly worded laws on the basis that they have been considered by legal experts is laughable when it's often legal experts, and in the case of the Psychoactive Substances Act, the government's own advisors that are the ones raising concerns with the broad applicability and unenforceable nature of these controversial laws. The Psychoactive Substances Act has an explicit exemption stating food is not covered by the law for crying out loud, and the exemption for healthcare providers to act within the course of their profession was only added as an amendment, it wasn't even considered in the original drafting of the bill.
> The Psychoactive Substances Act has an explicit exemption stating food is not covered by the law for crying out loud,
Why the "for crying out loud?" That's an example of the law being well written in a way that covers the knee jerk reactions to "it's too broad, it's badly written!"
> the government's own advisors that are the ones raising concerns with the broad applicability
What's your issue with this? They're advisors, it's their job to raise concerns that lead to the inclusion of exemptions like the one you're "crying out loud" about.
> it wasn't even considered in the original drafting of the bill.
That's why bills go through various stages of drafting and debate, and why parliament seeks out and considers the advice from industry. It's "laughable" to judge the quality of a law by the original draft, just as it would be too judge a piece of software by the initial commit.
I'm not even sure how much practical difference there is between 5 and indefinite in practice, 5 years is a long time. I imagine it is pretty life-destroying. Especially for the crime of having something on your phone that you want to keep private.
> If it’s not about nation security or CSAM, it’s two.
I am sure we all get what you mean, but there is a comic interpretation in vaguely-Soviet style here where if someone hasn't done anything wrong they only get 2 years. I'm going to spend some time this weekend making sure my encryption is plausibly deniable where possible.
It's not okay to imprison people for 5 years vs lifetime, but at the same time, facts matter, and we shouldn't get in the habit of allowing fibs to slip through just because they're directionally correct.
The police must obtain appropriate permission from a judge to obtain a s.49 RIPA notice.
Before a judge grants the notice, they must be satisfied that:
The key to the protected information is in the possession of the person given notice.
Disclosure is necessary in the interest of national security, in preventing or detecting crime or in the interests of the economic wellbeing of the UK.
Disclosure is proportionate.
If the protected information cannot be obtained by reasonable means.
> So you're saying it's still at the discretion of a single magistrate?
A judge isn't a magistrate, but also: No, of course not. There are different layers of legal protections in the UK. You would be able to appeal the notice itself, you would be able to argue at the court against the decision, and you could make an appeal to a higher court if your were convicted. Furthermore you could make an official complaint about the investigation afterwards.
An interesting observation of the West is that people have an innate trust in the authorities/institutions. It's largely because the institutions have been well run for so long. But as that fades we're left in this twilight zone where you can point to a law like it prevents something. As is often pointed out, the Soviet constitution was much more free than the US one. Even the Romans knew this distinction
> people have an innate trust in the authorities/institutions. It's largely because the institutions have been well run for so long.
There isn't trust of the institutions in the UK. That's why there's so many layers of checks and balances like various courts of appeal and the two houses in the parliament. It's designed with the idea that a rogue player can't go wild.
It's also not true that British institutions have been well run for a long time. Bloody Sunday would be a very visceral and obvious example. Interesting case as well because obviously it took almost half a century but at least there was official recognition and apology from the prime minister after the courts and parliamentary investigative bodies did their thing.
The standard of proof is reasonable grounds, don't forget your passwords because this is an incredibly low bar to pass.
>in preventing or detecting crime
If the police are requesting a s.49 notice it goes without saying that it will be for preventing or detecting crime, but notices can also be issued to ensure the exercise or performance of public bodies, statutory powers, or statutory duties without such a requirement.
>Disclosure is proportionate.
In regards to what is sought to be achieved by the disclosure. It is not disproportionate to request disclosure for the purpose of preventing or detecting crime regardless of how benign that crime is.
>If the protected information cannot be obtained by reasonable means.
The law has been used against people for failing to give up Facebook passwords. The police routinely ask companies for information without a warrant and they're usually legally denied such requests based on GDPR grounds. 'Reasonably practicable' means nothing if it can be bypassed by police trying their luck without a warrant.
> People have been jailed for hate speech in the uk
The parent poster claimed "for liking a post".
The cases I've seen of "jailed for hate speech" tend to wind up having a harassment or incitement component to them. https://www.bbc.com/news/articles/cy76dxkpjpjo as an example. Hence the request for a cite.
"Parlour, of Seacroft, Leeds, who called for an attack on a hotel housing refugees and asylum seekers on Facebook, became the first person to be jailed for stirring up racial hatred during the disorder."
How convenient that the government doesn't make the numbers public and then have to issue statements like this when journalists do some digging on the matter
I don't get what you're trying to say here? Yes, there are real issues with the government arresting people for speech, and the number is going up, but that's not proof for the specific claim of "you can be imprisoned for liking a post [...]". You can't just tack on spurious claims onto a more well supported claim on the basis that the former is directionally the same as the latter.
You're in a place called "Hacker" news, many of us hackers feel like we shouldn't be forced to unlock our private devices, not sure this is surprising.
Criticizing democracies with the policies of a police state is Nazi behavior? I’m lost. AFAIK Nazis are associated with those supporting authoritarian regimes not those criticizing the slide into authoritarianism. You even yourself put up a link about someone convicted who had to go through a long legal battle to get their freedom. The claim may have been overbroad in terms of the powers the state has, but they were off only in magnitude what RIPA2000 outlines as powers.
How is "against democracies" even on topic here? Parent commentator said HK is now like the UK, why it matter how much of a democracy either of the places are?
And no, it isn't a "nazi bar" just because someone disagrees with you, that's not how that label should be applied. Save it for actual nazis, otherwise you're doing the rest of us a huge disservice, as when there are actual nazis, people think we're talking opinions rather than facts. As a human who despise nazis and fascists, please don't contribute to making the world worse.
I strongly disagree with the parent poster, but they are deploying a specific term. Nazi Bar doesn't imply everyone within is a Nazi. It implies a bar that permits a Nazi to stay and drink. That Nazi will come back later with their friends who are also Nazis, and over time the bar will increasingly become funded by Nazis.
It's really really strange to use here, however, because this thread is about not giving in to authoritarianism. If you want to see intolerance, this person should go look at the recent transgender athletes thread. That post might actually be a "Nazi bar".
Because the original commenter is screaming about how the UK is authoritarian without any links, which smells to me like he's a typical right wing idjit, who wants to put in Nigel Farage in power and actually turn the place more Nazi.
That's why I asked if he was referring to that overturned conviction, which shows there's still some rule of law, or post a link to what the actual hell he's talking about.
Pfft, but well, fuck me, just learned that I'm the idiot who's wrestling with the pig yet again.
The destination of the packet where it is sent, just as a toy sent from the U.S. to a customer in the U.K. is sent to the U.K. rather than the local Fedex store.
> following a highly publicised mass-murder of children which was (entirely wrongly) being blamed on asylum seekers.
The mass-murder was a consequence of the asylum system. Given what is publicly known, parents of Axel Rudakubana were overwhelmingly likely to have been asylum seekers.