* Posts by ST

850 posts • joined 14 Nov 2014

Page:

Details of Beijing's new Hong Kong security law signal end to more than two decades of autonomy

ST Silver badge

Re: Ah yes, the old "Endangering National Security" line

The difference between the USSR's Perestroika and what's happening now in HK is that Gorbachev - a rather brilliant Dude may I add - was unwilling to enforce the jackboot on Russians to the degree his predecessors were. Quite the opposite, he slowly opened up the pressure valves.

That's not what the Chinese are doing to HK now. They seem perfectly willing to give HK the DPRK treatment. Which is yes, horrifying and theoretically unacceptable, but, let's face it, no-one is going to go to war with China over HK.

So yeah, just in case someone had any doubts about the Chinese Communist Party's real intentions with respect to human and civil rights.

After huffing and puffing for years, US senators unveil law to blow the encryption house down with police backdoors

ST Silver badge
Mushroom

LAEDA is sponsored by US Senators ...

... Lindsey Graham (R-SC), Tom Cotton (R-AR), and Marsha Blackburn (R-TN).

Oh, boy.

If anyone expects any one of these three to understand anything about crypto, you'll be waiting for a very long time.

Senator Tom Cotton recently asked the US Military for a no quarter order when deploying the US Army's 82nd Airborne Division to US cities to deal with the protesters.

Tom Cotton is a veteran of the US Army. What Tom Cotton does not seem to know, or appreciate, is: a no quarter order is illegal under US Law, and under US DOD Rules of Engagement. In the US, it's been illegal since the Civil War. Currently, in times of war, it's a war crime. Outside of war, it's murder 1.

Maybe there is hope for 2020: AI that 'predicts criminality' from faces with '80% accuracy, no bias' gets in the sea

ST Silver badge

> This is basically the same as the 'craniometry' that 19th-century 'scientists' used to try to explain why women were inferior to men and blacks were inferior to whites.

I was just going to post about the same exact thing - Craniometry. Two consequences of that particular brand of massive stupidity were Eugenics and Scientific Racism.

It turns out that some really stupid ideas refuse to die.

Give me your tired, your poor, your huddled masses... but not your H-1B geeks, L-1 staffers nor J-1 students

ST Silver badge
Stop

Re: Silicon Valley to fill engineering departments with top international talent ...

> This is definitely as much Republican as Democrat.

If you had a clue, you would know that it is not equally Democrat and Republican: US H-1B Visa Quotas since 1990.

- 1990: H-1B Visa program starts under G.H.W. Bush 41 (R) with an annual quota of 65,000.

- 1998: Under Bill Clinton (D) annual quota is almost doubled to 115,000.

- 2000: Under Bill Clinton (D) again, annual quota is increased to 195,000.

- 2005: Under G.W. Bush 43 (R) annual quota is reduced to 65,000 + additional 20,000 for people holding graduate degrees.

- 2009 - 2017: Quotas stay constant throughout Obama's (D) two terms.

- 2017: At the last minute, Obama pushes through a giant loophole around the annual H-1B quotas.

So no, it is not true that this is equally Democrat and Republican. This rests squarely on neo-liberal Democrats.

ST Silver badge

> 10 years ago this would be a valid retort. This year, not so much.

And why is that? Because somehow this year, being a pompous dick on an H-1B visa, is suddenly cool?

ST Silver badge
Mushroom

> So, I'm going to move back to my home country [ ... ] get my hair cut and otherwise spend my American earned money somewhere else. [ ... ] and not have to worry about catching covid.

Sounds like a great plan to me. I see zero downside. Are you packing your bags?

Yeah, I didn't think so.

ST Silver badge

Re: H-1B visas [*] Silicon Valley to fill engineering departments with top intl talent

> Are you sure that you get two months grace?

According to this link, the 60-day grace period is still in effect. It became effective sometime in early 2017.

I got a bunch of hits searching in Google for h1b visa 60 day grace period, and the top three all seem to agree with each other about the 60-day grace period.

ST Silver badge
Meh

Re: H-1B visas [*] Silicon Valley to fill engineering departments with top intl talent

> people brought in under H-1B (or similar) visas might be willing to accept positions at a lower wage

It's not a matter of free choice and/or wage bargaining. They simply have no choice. They are offered a given salary - no negotiation - for the option of living - with 4 roommates in a 1-bedroom apartment - somewhere close to a US-101 merge ramp. That's the deal. They can't switch jobs easily - the new employer must be willing to sponsor the H-1B visa transfer. If they get laid off, they have 60 days to find another employer who is willing to sponsor a H-1B visa transfer. Or it's back to wherever they came from.

The ticket is the promise of a green card sponsorship at some point in the future.

Qualifications have nothing to do with it. It's all about money and salary paid. The myth that Americans are less qualified than their H-1B counterparts, or that importing H-1B's is a market-driven necessity, is just that: a manufactured myth.

> I'm not 100% convinced of the 35% [ ... ]

I regularly get job alerts for openings advertising pay rates that are 35% of the prevailing market rate for that particular set of qualifications and seniority. The only saving grace is that some of these delusional job ads stay unfilled for 9 - 10 months, often more. Not all, though. The target audience for these jobs is obvious. I don't want to give concrete examples because I want to remain relatively anonymous.

ST Silver badge
Mushroom

H-1B visas [ ... ] Silicon Valley to fill engineering departments with top international talent ...

I don't know about the top talent part, but I do know they are willing to work for 35% of market prevailing wages.

I don't like Trump a bit, but Silicon Valley has been abusing the H-1B visa program for far too long, with enthusiastic Democratic [ neo-liberal economics ] support.

This is long overdue.

And now get ready for a loud wailing sound -- but we can't find enough qua-wah-wah-wah-wah-wah-lified people! -- coming out of Redmond WA and certain specific ZIP codes around SF Bay.

To be followed by an a cappella chorus of economists explaining that the H-1B visa program has no effect on wage suppression or unemployment. Quite the opposite. The less you pay an H-1B, because they are de facto slaves with no wage arbitration power, the more the locals' wages will be rising. No-one ever explains how that's supposed to work, exactly.

Yeah, well, why don't you hire the locals for a change. Imagine that.

Machine-learning models trained on pre-COVID data are now completely out of whack, says Gartner

ST Silver badge
Boffin

> I'm currently living in a post-covid-19 country [ ... ]

There is no post-covid-19 country. There is no vaccine and there is no known cure for COVID-19.

Apple to keep Intel at Arm's length: macOS shifts from x86 to homegrown common CPU arch, will run iOS apps

ST Silver badge
Angel

more Apple marketing

If it works as well as they claim it does, it won't make a bit of a difference to the end-user. It's just a different compiler target. And different opcodes. Does the end-user care about opcodes?

If it doesn't work that well, what's the point?

The only thing worse than being talked about is not being talked about.

Belief in 5G conspiracy theories goes hand-in-hand with small explosions of rage, paranoia and violence, researchers claim

ST Silver badge
Devil

We have our own US-based All-American 5G Conspiracy Theory!

It's sorta-kinda like the UK one. Only ours also involves Hillary Clinton and Bill Gates.

Hillary is secretly controlling the dosage of harmful radiation being blasted out of 5G towers, and causing COVID-19. Bill Gates is waiting in the wings. He secretly developed a COVID-19 vaccine that's not really a vaccine. It's a chip implant. Once you get COVID-19, you will be implanted. There is no escape, and resistance is futile.

There you have it.

Huawei going to predict the future? Nope, say company leaders when asked about Joe Biden winning US election

ST Silver badge
Unhappy

Re: Biden hardly gets a mention here in the UK

> If I was Biden's campaign manager I'd tell him to just say and do as little as possible [ ... ]

That's exactly what Biden is doing.

This year, Biden's candidacy is just a textbook case of lesser of two evils. Under "normal" circumstances, he wouldn't stand a chance. He tried twice before, and failed miserably.

But this isn't a normal year, so all bets are off.

Biden hardly gets a mention in the UK because, well, there isn't that much to mention about him, and those parts of his track record that deserve mention aren't much to be proud of.

Biden is one of the authors of the 1994 mandatory sentencing law here in the US, and he always took credit for it. Unfortunately, it's not the only statute of that kind that he's supported in the past.

He's just an anachronistic leftover from the late '70's and '80's war on drugs delusion.

So, meh. Normally, I wouldn't consider voting for him. And the lack of interest in his candidacy here in the US is a worrisome sign for November.

G.H.W. Bush [Bush 41] lost his re-election bid in a 3-way race -- the 1992 election was between Bush, Perot and Clinton. That's a very unusual configuration for US elections. I am not at all convinced that Bush 41 would have lost in a traditional 2-way race.

Hey NYPD, when you're done tear-gassing and running over protesters, can you tell us about your spy gear?

ST Silver badge

> Easy to get the wrong impression if you follow the fake newsmongers.

Well, it is Faux News. They create their own alternate version of reality.

'Boringly reliable': Red Hat architect thinks Kubernetes is 'mostly done' – but there are still plenty of bugs

ST Silver badge
Mushroom

Does it even work?

I'm trying to understand what "mostly done" actually means in Googlespeak.

https://github.com/hjacobs/kubernetes-failure-stories

Meet the dog that's all byte and no bark: Boston Dynamics touts robo-pooch Spot with $75k-a-pop price tag

ST Silver badge
Devil

A less friendly-looking version of Spot was featured ...

... in the latest War Of The Worlds television series / show. The French / Canadian / US joint production.

They played the role of aliens who killed humans by means of an iron rod being shoved into people's skulls at very high speed. I was a bit disappointed at this low-tech way of mass-killing people. Surely aliens who have traveled to Earth from a distant galaxy would have invented more sophisticated ways and means of performing genocide.

I find the price tag of USD $74,500 for the dog + $29,750 for the ass camera a bit over budget. Although I'd love to watch people's reactions when I took it for a leisurely stroll in Central Park.

GitHub to replace master with main across its services

ST Silver badge
FAIL

Re: I look forward to you not replying to your own posts

Troll-For-Hire mistake?

ZFS co-creator boots 'slave' out of OpenZFS codebase, says 'casual use' of term is 'unnecessary reference to a painful experience'

ST Silver badge
Facepalm

Why is this important?

Does anyone here read OpenZFS code to rekindle their awareness of current social issues and events?

Yeah, I didn't think so.

As Uncle Sam flies spy drones over protest-packed cities, Homeland Security asks the public if that's a good idea

ST Silver badge
FAIL

Re: I submitted my comment

> The US ONLY entered WW2 after Japan attacked AND Germany declared war.

No. Covert - and not-so-covert - US support for the UK war effort started in September 1940. That was after Joe Kennedy - US Ambassador to the UK - alerted the FDR Administration about the danger presented by the German aggression in Europe, combined with the presumed effects of the Ribbentrop-Molotov pact, which was still in effect at the time.

It wasn't just the Lend-Lease program - which came about later, in 1941. It was military hardware support as well. The Destroyers For Bases Agreement was signed on September 2, 1940, whereby 50 US Navy Destroyers were transferred to the Royal Navy, together with a giant cache of munitions and other military hardware, in exchange for land and operations rights on British territories. The US was interested in these territories for conducting covert preparations for entering WWII.

There is no validity to the claim that Hitler ever considered attacking the continental US. Hitler, for one, was convinced that we, Americans, can't fight a war, because we have too many black people. In his mind, attacking the US and its genetically inferior population was not worth the effort.

His top brass - specifically Albert Speer - were fully aware of the impracticality and impossibility of such an attack. Germany simply did not have sufficient hardware, nor did it have the ability to produce sufficient hardware, to support a sea-based invasion of the US.

But you would have had to learn some history to know that. You probably got your WWII history information about Germany attacking Texas from Facebook.

You only have to glance for 5 minutes at the map of Texas and the Gulf of Mexico to realize that no Kriegsmarine admiral would ever conceive or plan such an attack. It is a death trap for the attacker.

I can't be bothered to correct, or refute, every other display of crass ignorance in your post.

ST Silver badge

Re: I submitted my comment

> Its such a shame you descended into abuse of Europeans [ ... ]

Par for the course.

Stop referring to the US as some kind of evil fascist dictatorship that Europeans are entitled to despise. As a quick recap of history, the US never practiced fascism as a political system, nor did we ever pursue it. That's not what I can say about some European countries, past, or present.

Stop creating this false equivalence between the US as a country, Americans in general, and Donald Trump. And in doing so, stop painting all of us with this broad, toxic brush that misrepresents all of us Americans as deranged and fanatical Trump supporters that are out to destroy the world and trample all over your civil rights and liberties.

You are fully entitled to criticize - 75 years later - the Pax Americana that we imposed on Western Europe after WWII. Just remember that your right to criticize us, and our presence in Europe, was and is safeguarded by our troops, our tanks, our jet fighters and our military personnel.

We, Americans, collectively, have spent untold amounts of our own money protecting Western Europe since 1945. That money did not grow on trees. We could have spent it on our own needs, but we didn't. We gave up having a decent social safety net for our own citizens and residents, complete with national health insurance, and a national pension plan that provides a livable wage. Most, if not all, of the EU member states enjoy these universal benefits, today. We don't.

Feel free to criticize our bloated military expenditures, which are the root cause why we do not have a decent social safety net. But before you do so, take a moment to think what these expenditures are for.

If you believe that EU's civil rights and liberties that are available to you are vastly superior to those available to us Americans in the US, that's great. I envy you. Do not forget that all these liberties that you currently enjoy were made possible by our permanent presence in Western Europe ever since 1945.

Stop manufacturing lies about every single thing that the US does. No-one is perfect. Neither is the EU, or any of its member states.

Case in point, this DHS survey. There is not an iota of evidence that DHS is trying to obtain personally identifiable information from this survey. Or that there is some malignant intention behind the survey. Yet, there are plenty of misinformed statements here, that assert exactly that. Many of the assertions are completely false.

This is not the first time this happens, and it is a recurring topic.

I have personally experienced this toxic Euro-entitled attitude vis-a-vis Americans when I was stationed in Europe as a young US sailor - squid for those in the know - and every single time I traveled to Europe since. I get to read it here every single time there's an article involving something in, or about, the US.

Please stop.

ST Silver badge
FAIL

Re: I submitted my comment

> Actually, it is considerably LATER in Europe than in the USA.

Yes, it is. Which means: when the Euro-Morons post their moronic stuff early in the morning - BST or CET - I get to read it when I wake up early in the morning.

That's because the Euro-Morons have already written. Because they woke up early. They wrote their posts early.

Other than providing a perfect example of the Euro-Moron concept, was there a cogent point you were trying to make?

ST Silver badge
Mushroom

Re: I submitted my comment

> These two sentences are mutually exclusive.

No, they are not. As soon as you can understand what they mean.

Note to self: the Euro-Morons are up early today.

ST Silver badge
Mushroom

Re: I submitted my comment

> You chose to allow them to associate a tracking identifier with your email address. But you gave them no personal information.

I chose to give them my email. They did not require me to give it to them.

Are you experiencing basic English comprehension problems? Or is the conceptual difference between free choice vs. coercion much too complex for you?

ST Silver badge
Meh

I submitted my comment

It did not ask me for any personal information.

I could have chosen to provide them with my personal information, if I wanted to. I chose to submit my comment anonymously.

After submitting my comment, I was provided with a tracking identifier for my comment. I chose to have the tracking identifier emailed to me.

At no time was my ability to submit my comment constrained on my providing personally identifiable information to DHS.

It is not true that there are questions to be answered. There are no questions.

There is a relatively large text input field where participants can type in their comments. The comments can be written in free format. My comment was written in free format.

You are also given the opportunity to upload a file, if you so choose.

Big Tech trade association warns Uncle Sam against knee-jerk national security measures that harm industry

ST Silver badge
Mushroom

Re: cooperation with "like-minded economies"

> You have given us all a perfect example of whataboutism.

Whenever one finds themselves in a hole, the first thing one does is: one stops digging.

Not you, apparently.

You are the one who created a false equivalency between the US and China in terms of political systems, but I'm the one guilty of whataboutism.

Do you at least get paid to post this kind of idiocy?

ST Silver badge
Mushroom

Re: cooperation with "like-minded economies"

> Are the U.S. one?

Why don't you go take a trip to China and, while there, refer to President Xi as Winnie The Pooh, the Dictator who put his boot on Hong Kong.

My bet is that we won't get to know what happened next.

Next time you decide to write something this idiotic, think twice. Or maybe ask your friends for help.

ST Silver badge
Mushroom

cooperation with "like-minded economies"

Like, for example, China.

Interesting choice of words. They don't say like-minded liberal democracies.

Maybe it's because China ain't one.

We have Huawei to make the internet more secure: Dump TCP/IP to make folks safer says Chinese mobe slinger

ST Silver badge
Devil

Does the Politburo of the Chinese Communist Party ...

... have a spec for this wonderful new protocol?

I'd love to read it. I am particularly interested in packet fragmentation, packet re-assembly and packet routing.

Staff in a huff, personal call with Trump, picking fights with Twitter, upsetting civil-rights groups – a week in the life of Facebook's Zuckerberg

ST Silver badge
Mushroom

Re: The Twatterverse is way worse

> So how does that stack up?

It doesn't. But this is the standard MAGA Trumpkin playbook: always play the victim role.

When Trump calls in the National Guard to dominate the battlespace of Lafayette Park in Washington DC, he does so because he's been - along with many other white Republicans born in privilege - oppressed and persecuted all his life.

ST Silver badge
Mushroom

Re: It's just business

> Your TDS is front and center

пиздец!

In Rust, we lust: Security-focused super-C++ language still most loved among Stack Overflow denizens

ST Silver badge
Meh

Re: Five ways to initialise a variable?

> http://knockknock.org.uk/igor.html#initialisation

I just looked at the first 20 lines of that and it's completely wrong already.

5G mast set aflame in leafy Liverpool district, half an hour's walk from Penny Lane

ST Silver badge
Devil

Re: @Cedric

> That which has allowed the human species to exist for around the last 250 000 years or so.

No. The world was created 6000 years ago by a really nice elderly man with a bushy white beard. And mustache.

There is some disagreement as to the color of his skin, although people who matter and are really really smart, agree that he was white. And when he was young, he had golden blonde, thick, wavy hair and a very geometric jaw. Obviously, he has blue eyes. Obviously.

He also created black holes, gravitational waves, galaxies, stars, neutrinos, shrimp, lobsters, and skirt steak. And Caesar salads. And he did this all by himself, in six days.

And then he took a day off, because he was really tired.

So I think this explains this whole gender thing.

Windows Terminal hits the big 1.0: Fit for production?

ST Silver badge
FAIL

Re: Oh Really. It's 2020 and Windows Terminal is at Release 1.0. Wow.

> xterm is not a terminal emulator. It is a "linux console" emulator for the X-windows hooey-gooey.

No, that is 100% incorrect, wrong, misinformed and ignorant.

But, you had to post it.

ST Silver badge
Devil

Re: late to the party

> [ ... ] applications getting confused with /lib and /lib64 was a right pain.

And the old Solaris link editor - /usr/ccs/bin/ld - didn't help at all. It would happily accept 32-bit library paths -- i.e. /lib or /usr/lib -- when linking 64-bit shared libraries or executables. It would also happily write those paths in RUNPATH | RPATH.

They finally deigned to fix it, but very late. For at least 12 years they insisted it was Not A Bug.

ST Silver badge
Happy

Re: Oh Really. It's 2020 and Windows Terminal is at Release 1.0. Wow.

> Could you fill us in as to what it is?

xterm is a UNIX terminal emulator, developed at MIT along with the X Window System in the early 1980's. It is also available on Linux, the BSD's, and other UNIX derivatives.

Mandatory quote of the times: Mr. Gorbachev, Tear Down This Wall!

It is kind of just like Windows Terminal, only it's been around for 36 years, has less bugs, and it's been mostly superseded by newer terminal emulator programs that got their inspiration from it.

ST Silver badge
Mushroom

Oh Really. It's 2020 and Windows Terminal is at Release 1.0. Wow.

How old is xterm? Let's see: Initial Release in 1984.

OK, I think I made my point.

IBM cuts deep into workforce – even its Watson and AI teams – as it 'pivots' to cloud

ST Silver badge
Mushroom

other than laying off people

and being an irrelevant accounting firm in charge of managing its stock price, does IBM do anything else these days?

AT&T slapped down for its '5GE' ads: You don’t have a proper 5G network, so stop saying so, says watchdog

ST Silver badge
Devil

they'll be back in a few months

AT&T will probably drop the '5G E' bullshit for now. In a few months, they'll be back at it with something like '5G X'. 'X' as in 'eXtensible'.

Which will, of course, still be 4G/LTE. And if you use your imagination, it could be eXtended to 5G. Some day. But hey, they just bought themselves a few more years of bullshit.

Hey, what kind of silicon may power next-gen space probes? We hope your answer includes 'AI acceleration'

ST Silver badge
Devil

Yes, but is it self-aware?

Also: can it recognize cat pictures?

Car crash: Uber axes another 3,000 jobs, closes 45 offices as punters snub app during coronavirus lockdown

ST Silver badge
Devil

AI for hailing a cab?

Seriously?

What does it do? It foresees that I am going to need a cab tomorrow morning at 1030?

Node.js creator delivers Deno 1.0, a new runtime that fixes 'design mistakes in Node'

ST Silver badge
WTF?

Why would anyone care ...

... that Deno 1.0 is Node.js re-written in Rust?

ST Silver badge
Devil

Re: Wonder how long it will take…

> Each language has its weak and strong points and is more or less suited to particular sets of problems.

The problem that Javascript is particularly well-suited for is "my runtime is much too secure. I'd like to swiss-cheese it, please."

US piles yet more charges on Theranos CEO, COO. We could do with good blood testing now... and this wasn't it

ST Silver badge
Devil

Re: I know they were a bit fraudulent but.....

> Piling on the charges like this is typical of the US justice system [ ... ]

Hi, Elizabeth!

OMG!!! Is that you?

I didn't know you posted here? Under a guy's name? Is that why you fake your voice to be so low?

Wanna be a developer? Your coworkers want to learn Go and like to watch, er, Friends and Big Bang Theory

ST Silver badge
Devil

Funny that is

I don't know personally any programmer / software engineer that wants to learn, or write, Go. I heard they exist, but I've never met one in real life.

I do know a few that were forced - through no fault of their own - to deal with someone else's Go code.

'VPs shouldn't go publicly rogue'... XML co-author Tim Bray quits AWS after Amazon fires COVID-19 whistleblowers

ST Silver badge
Mushroom

Re: Who are the downvoters, in this comment thread

> I am generally curious [ ... ]

They are Amazon fanbois - i.e. Amazon employees who have been brainwashed into the cult of the Amazon Leadership Principles. A.k.a. Incoherent Ramblings Of A Sociopathic Megalomaniac.

If you ever wanted to know anything about working at Amazon - in any capacity - and its culture, you don't need to read anything beyond Bezos' Leadership Principles.

There is, however, one upside to Amazon's toxic workplace culture: they make Oracle look like a really nice company to work for.

Keen to go _ExtInt? LLVM Clang compiler adds support for custom width integers

ST Silver badge
Linux

Re: Ugh!

> Extra code for bitshifting is a given, but do you really want to be the one to write it?

I never said that. I said it has no real benefits.

> If it's in a structure with alignment turned off via a compiler option, pragma, or what have you, and you string a bunch together, it will save memory.

That's nonsense.

For one, you can't turn off alignment in the compiler. In some compilers you can brute-enforce alignment for structs/classes/unions that is larger than the natural alignment would be, via compile-line flag. But turning alignment off nope, you can't do that.

For two, misaligned reads/writes of scalars or vectors (read: loads and stores) always incur a giant run-time performance penalty.

For example, let's say that loading a properly aligned 64-bit integer into a register might cost 2 cycles - this is fact on some ISA's, some others might require 3 cycles. The value is loaded into the register atomically. Loading a misaligned 64-bit integer into a register decays into sequential byte-by-byte loads, each one costing 2 cycles. And the load is not atomic.

A 64-bit integer has 8 bytes. 8 bytes * 2 cycles per byte load that's 16 cycles for loading a misaligned 64-bit integer instead of 2 cycles for the properly aligned case. So, here we are: we're loading a misaligned 64-bit integer into a register for 16 cycles, and to that we add another 8 cycles overhead for shift + mask for the bitfield.

Is that the performance improvement you were aiming for?

Here's how you can trigger a misaligned read of a 64-bit integer:

unsigned char B[8]; // char/unsigned char have no alignment

(void) memset(B, 0, sizeof(B));

uint64_t* U = (uint64_t*) B; // this is misaligned

uint64_t V = *U + 119UL; // Boom!

(void) fprintf(stderr, "U=%lu V=%lu\n", *U, V);

This property is independent of hardware and ISA. It's the same on x86_64, SPARC, SPARC64, ARM64, ARM, PPC64, etc.

SPARC and SPARC64 used to trap and send SIGBUS to the process whenever they encountered a misaligned read or write. They finally gave up on that restriction with the last two versions of SPARC M7 and M8. But the performance penalty is still there.

The only reason you don't see SIGBUS that often these days is because most processors disable trap-on-misaligned by default. You can re-enable it by tickling the right registers at program startup.

Bitfields don't save you memory, and they don't save you cycles either.

ST Silver badge

Re: Ugh!

> [ ... ] using bitfields in C structs and expecting to produce correct portable code is not going to work well.

Aside from the endianess problem, there's also the cost problem. Declaring

unsigned int i : 3;

does not create a bitfield of 3 bits. It creates an unsigned int, of which only 3 bits are usable. The remaining 29 bits are still there, they're just not accessible.

Depending on how good your compiler is, it might or might not warn if you then write something like this:

i = 19;

The accessible 3 bits in this example are accessed via shift + mask. This adds CPU cycles.

The cost of loading and storing the unsigned int is unavoidable. By using a bitfield, the compiler is forced to add shifts and and's to manipulate the bitfield, on top of the cost of loads and stores.

I've seen a lot of code that does something like this:

unsigned int isValid : 1;

instead of using a bool, under the incorrect assumption that this saves a lot of memory. It doesn't save any memory, and it's more expensive than just using a bool.

ST Silver badge
Angel

Re: Sounds like a good idea

The domain where _ExtInt would be applicable is very narrow, and that was clearly explained in the blog entry.

This applies, and is useful to, FPGA's. It is of no use to general-purpose computers that run on CPU's that lack integer registers smaller than 32 bits.

Coincidentally, X86 and X86_64 ISA's have registers smaller than 32 bits. Which is why Intel has been pushing this for a while. RISC CPU's don't have small registers, and don't care. On RISC machines you get 32-bit integer registers or 64-bit integer registers. On RISC-V - in theory - you also get 128-bit registers. Haven't seen it yet on a real RISC-V CPU.

So, the whole theory about saving massive amounts of memory won't apply to a RISC machine. A 16-bit short will still be loaded into a 32-bit register. The concept of a C short on a RISC machine is really just the lower 16 bits of a 32-bit register, with the upper ones zero'ed out. Simply because doing the entire sequence of shift + mask to store two 16-bit shorts into a 32-bit register is much more expensive computationally than using the whole 32-bit register.

Technically, it is a very nice to have feature in clang, but it has a very narrow focus and applicability domain. No-one is going to re-write their software running on Linux X86_64 to use 4-bit integers anytime soon.

What's vexing Linux-loving Gophers? A few things: Go devs want generics, easier debugging

ST Silver badge
FAIL

born out of frustration with existing languages and environments

See icon at right for a helpful visual describing Go's accomplishments in that respect.

Microsoft to find virtual ways of 'absorbing interns' energy' as students told to stay home – and events off until next year

ST Silver badge
Devil

Re: "absorbing interns' energy"

> That's the most appalling euphemism ever [ ... ]

Surely what they really meant is: vampire-sucking their life and blood until they're dry as a flint and flat as a pancake.

Page:

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER

Biting the hand that feeds IT © 1998–2020