HNHacker News
TopNewBestAskShowJobs

cjensen

6,062 karma · joined September 29, 2011

submissionscomments
cjensen··on “Once” one-time concurrent initialization with an integer
The C++ equivalent is... it just works. Static variables in a function are initialized exactly once the first time a function is entered per the language definition.

This is one of the many great improvements of C++11

cjensen··on Kevin Mitnick has died
I appreciate your kindness towards me.

But he wasn't a first famous social engineer. That was extremely old hat by then.

People keep claiming he is a notable technologist, but I can't think of how. The Internet and other systems had intrinsic design flaws in the early day because it was birthed as an overly trusted network of well-known peers. Poking for flaws in those days didn't require any skill. The Morris worm, for example, was extremely skillful.

My biggest exposure to anything related to him is KnowBe4 and it is an utter piece of crap. It provides training modules that have no idea who their audience is so it veers wildly between terrible advice and overly technical advice with alongside the correct advice.

And lastly, and I mean this sincerely, my condolences to his family and friends. No one should have to go through this so young.

cjensen··on Kevin Mitnick has died
Are you asking if I lost money or was inconvenienced when someone stole my personal info? If I steal your medical records, are you only victimized if I share them?
cjensen··on Kevin Mitnick has died
What greedy executives? This was the early days of the Internet and there was tons of competition. And yes, OF COURSE IT WAS MITNIC'S FAULT. Why in 2023 would you even think of blaming the victim.
cjensen··on Kevin Mitnick has died
As one of the people whose credit card number was stolen from Netcom, I would strongly object to this. I'm not here to speak poorly of the dead, but I'm definitely here to judge those who think too highly of him.
cjensen··on How will ATSC 3.0 transform TV advertising?
A bit of a nitpick: 1080p24 was added in 2008 along with h.264. It was not part of the original spec, so the original HDTV sets could not decode it. Broadcasters sensibly don't send 1080p24 since 1080p60 is "good enough" and works on all TVs.
cjensen··on Apple VisionOS Simulator streaming wirelessly to Meta Quest headset
iOS is a supported target in Visual Studio Professional on Windows.
cjensen··on {n} times faster than C
It was still worth reading. Every critic needs something to read and nitpick ;-)

Keep at it! Just as every program is a chance to improve programming, every article written is a chance to improve writing. It was well written.

cjensen··on {n} times faster than C
It's not just that the C compiler lacks the information... but the reader of this article also lacks this information.

String length tells you the frequency with which nul terminators will be found. Without knowing frequency of occurrence of the nul terminator, 's', and 'p' then you cannot know which one occurs most often.

Consider two benchmark cases: (1) every string tested contains exactly one character (2) every string tested is 1MB long and is composed entirely of 's' and 'p'.

The author's first "optimization" assumes nul is rare. It would make benchmark (1) worse, and (2) better.

The article is a good example of "specification is hard, code is easy." He insufficiently specified the problem to be solved, and his test cases contained information not in the code and not in the text of the article.

cjensen··on {n} times faster than C
The problem is the author of the article is making some huge implicit assumptions that the compiler can't possibly know about.

Consider this statement: "However, we know some things about this loop. We know that the only time we break out of it is when we hit the null terminator (’\0’). The code clang generates checks for the null terminator first, but this makes no sense."

This statement contains huge assumptions about the lengths of the input strings and the frequency of the letters 's' and 'p' in the input. And then has the chutzpah to call the compiler's failure to read his mind about this as "making no sense."

Good first effort by the author, but has not sufficiently thought through the problem.

cjensen··on Testing a 1,000 player Minecraft server with Folia
Worth mentioning that this requires mods which break many in-game devices. The official in-game behavior was not able to be scaled.

That's an interesting and legitimate strategy to the scaling problem, but good to know the downsides with the upsides when trying to take lessons from this.

cjensen··on Why isn't Titan classed? (2019)
Yep. This is like saying "who needs building codes because it's more important the owner maintains the roof and paint?"

To have something properly function you need both a solid build and maintenance. Doing one well doesn't absolve you of doing the other.

cjensen··on California will begin backing intentional burns to control wildfire
Controlled burns are being done already by the government. The government owns most of the forested land.

This is about a major expansion of the concept, and includes (1) an insurance scheme so that private landowners can do a burn without fear of bankruptcy and (2) restoring cultural burns that Indians performed to manage land before they were banned by people who didn't understand them.

cjensen··on Top secret U.S. Navy system heard titan implosion days ago
You can't "know" with 100% certainty from a sound, and generally searchers don't give up until they must.
cjensen··on Ask HN: Is there a webapp to input/store your blood test results?
Sorry, let me clarify my fuzziness a bit...

You are right that you cannot enter the data yourself, as far as I know. But if your lab or physician uses a system that can let you download the records, they will be stored. So I have access to all my blood labs, but there is no easy way to graph them.

As far as I know, there is no App Store rule against making an app that lets you log the variables manually, nor is there a rule against making an app that graphs stuff. Keep in mind that there are a lot of Apple rules around HealthKit data to protect privacy, and writing such an app could be difficult.

cjensen··on [dead]
The comments from people living in the "Lake Tamarisk Desert Resort" are just mind-boggling. The resort, which is named after an invasive species, is an artificial lake in the middle of the desert.

A resident is quoted as saying "What was an oasis has become a little island in a dead solar sea" because a single solar facility was built whose edge is three miles away. The facility has a radius of about 1.5 miles.

The Guardian couldn't have interviewed anybody less sympathetic than these guys.

cjensen··on Ask HN: Is there a webapp to input/store your blood test results?
Apple Health tracks the data. It just doesn't provide graphs except for the most common variables. I'm not really sure why no one makes a graphing app that works off HealthKit data
cjensen··on The bill of materials for the Apple headset leaked
BOMs do not have "positioning" remarks attached to them.

Marketing positioning information does not have a BOM attached.

This is fake. Or at least altered from the real information.

cjensen··on Beautiful Documents with Groff (Part I)
I very much endorse that book. I only have two small shelves of technical books, but that one makes the cut to be on it.
cjensen··on GCC 13 Supports New C2x Features, Including Nullptr, Enhanced Enumerations
nullptr has been such a Godsend for C++. Good to see it coming to C.

If you ever see the macro NULL in code, be afraid. There are two valid ways of defining the macro and that cause weird issues when porting code. For example, in the statement printf ("%p %s\n", NULL, "Hello world!"), one of the definitions leads to NULL being interpreted as the null pointer, and the other leads to NULL being interpreted as an integer. The latter may crash if integer and pointer are different sizes.

It also causes problems with C++ overloading if one overload takes a pointer and another takes an integer.

cjensen··on A collection of lock-free data structures written in standard C++11
An issue in C++ is that it only supports atomic changes to the builtin types. For example, you can only CAS a 64-bit value if your largest integer/pointer type is 64-bits.

Good lock free algorithms use double-width instructions like cmpxchg16b which compare 64-bits but swap 128-bits. You can then use the compared 64-bits as a kind of version number to prevent the a-b-a problem.

Using only the built-in atomics is working with a hand tied behind your back. With the wider version, it's trivial to write multi-producer multi-consumer stacks with no limits to the number of objects stored. It's also pretty easy (if you copy the published algorithm) to do the same with queues.

cjensen··on The Untold Story of the Boldest Supply-Chain Hack Ever
https://en.wikipedia.org/wiki/Whataboutism
cjensen··on 5.3B Mobile Phones Will Become Waste in 2022
Fair.
cjensen··on 5.3B Mobile Phones Will Become Waste in 2022
One per person on the planet in a single year?

Never preface your talking point with an obviously wrong statistic.

cjensen··on Could we stop Yellowstone from erupting with a giant geothermal power plant?
The pressures involved have a bad habit of enlarging any hole when venting.
cjensen··on Farmers ‘crippled’ by satellite failure as GPS-guided tractors grind to a halt
Sea ports used to broadcast a local correction signal[1] back when GPS was intentionally less accurate. Seems like an oversight that farms don't have their own correctors.

[1] https://en.wikipedia.org/wiki/Differential_GPS

cjensen··on To comply with a new sesame allergy law, some businesses add – sesame
The article says that manufacturers are not allowed to list sesame as an ingredient unless it actually is an ingredient.

The law says they can't warn about potential sesame contamination. Instead it must either be an actual ingredient or manufacturers must clean the equipment.

Seems like this fiasco could have been avoided if someone had gone and talked to manufacturers about how big a deal it would be to clean stuff. I'm guessing this isn't a question of a small amount of profit loss; it's probably a big expensive deal to comply with this law.

cjensen··on A Map of Places in the US with the Same Name
Yep. Love the idea, but the score is pretty wrong.

E.g. Fremont. According to the map, there is a large area north of Sacramento for whom "Fremont" refers to an unpopulated place in Yolo County[1] rather than the city of a quarter million a in the Bay Area. That seems.... unlikely.

[1] Railroad sidings have names and end up in geographic place lists. Looks to me like Wikipedia has filtered out many siding names but not all of them. I suspect this particular "Fremont" is a siding name.

cjensen··on Elizabeth Holmes loses bid to stay out of prison
Self-delusion is not fraud. It's only a crime when you are not deluded and knowingly lie.
cjensen··on Electricity Prices by Country
$0.14/kWh in the US? My goodness. It's double that in the Bay Area. There's a reason I invested in solar for my home.

Also the map of low-carbon countries looks a lot like a map of where it rains a lot.

← PreviousPage 5 of 34Next →