HNHacker News
TopNewBestAskShowJobs

wildmusings

4,144 karma · joined February 18, 2013

submissionscomments
wildmusings··on Show HN: A pure reference counting GC in Go
Even in a reference counted or RAII environment, you still have to think about this. Your C++ function might do something with a file (or other resource) and then a bunch of other stuff, or vice-versa. If you care about holding that resource open for as little time as possible, you need to consciously introduce a new anonymous scope where the resource object and operations are contained (or, of course, you could break it out into another function).
wildmusings··on Hobby x86 kernel written with Zig
>I'm asking out of curiosity because I want to learn a "system" programming language

If you mean that you don't know any right now, just learn C. This isn't web programming, where everyone is always hopping to the latest fads. C is the lingua franca, the sine qua non of systems programming. It will be a long time before that changes. The C machine model is what everyone is working with anyway. C is small, despite some devious and fun corners of it, and mostly just exposes you to that model and way of interacting with the machine.

You can’t even appreciate the new systems languages unless you have a firm grasp of C and systems programming. They are all a response to C, addendum and proposed evolutions to it.

wildmusings··on Colleges are turning students’ phones into surveillance machines
>this irritates me even more that its been known since the 50's and we still put up with it.

Throwing a label on it doesn’t make it a bad thing. Authority can be a gift. It helps people thrive by giving them the motivation to live up to their potential. If everyone just let everyone else do whatever they wanted, humans wouldn’t have gotten very far. Of course, freedom to choose does a lot of good too. There is a balance to be had.

wildmusings··on Conscious Perception Of Vision Occurs Outside The Visual Cortex
The problem is that the term "consciousness" has too many meanings, and any debate about it seems to devolve into people talking past each other.
wildmusings··on The Cost of Avoiding Sensitive Questions
>But a core part of being polite, is not hurting others through your actions directly or indirectly. ( or at least trying)

The problem is wanting the notion of politeness to do too much work. Being polite, being nice, is just a moment to moment strategy for avoiding conflict. Unfortunately, niceness has become the most important virtue in American culture.

Being good is much more profound, and niceness is just one of the many tools you can use to achieve it. Sometimes being good entails being harsh. Sometimes it means doing things that will upset others.

wildmusings··on Google Gives Feds 1,500 Phone Locations in Unprecedented ‘Geofence’ Search
There is an intangible to living in a place where cars are regularly broken into vs. living in a place where they aren't. Think of the kinds of attitudes that people develop towards others in the two places. Trust vs. distrust, comfort vs. unease, open vs. closed. There's also the second-order effects of having a class of people going around committing those kinds of crimes with impunity. Many become emboldened and move on to other malfeasance. Order breeds order and chaos breeds chaos.
wildmusings··on Getting Drivers for Old Hardware Is Harder Than Ever
Is that a justification you'll be comfortable giving after the fact? "I know a took a risk with your private and sensitive [business/intimate] data that you trusted me with, and now it has been compromised, but you have to understand, the interface was so beautiful. It was worth it."
wildmusings··on Getting Drivers for Old Hardware Is Harder Than Ever
For one, a large number of native applications use the OS's webview widget, so you remain exposed to the outdated Safari engine even if you don't use Safari.

You're also going to have to use outdated versions of various software packages, as you describe in your post. That's another security hole.

As you note, bugs are often found in video and image decoders. The one in your OS isn't being updated anymore.

And consider that not every fix for a segfault or other bug gets labeled as a "security patch", but that doesn't mean that they don't present security issues. I imagine most engineers fix the buggy code and move on, and never really consider if there was a security hole there. In other words, it's common for vulnerabilities to be discovered long after they were fixed. And there are probably many more that remain undiscovered despite being present in old versions.

wildmusings··on Getting Drivers for Old Hardware Is Harder Than Ever
The burden of using the current version is so low (op is in fact expending significant effort to not make the safe choice), that imposing any additional risk on others is unjustified. That kind of analysis—the burden of caution vs. the risk of not taking it—is how the law measures negligence. I’m not giving legal advice of course. But the law tracks the morality of negligence pretty closely in my opinion.
wildmusings··on Getting Drivers for Old Hardware Is Harder Than Ever
10.9 hasn’t received security updates for three years and a half years. https://support.apple.com/en-us/HT201222

Running an old version of an operating system that’s not actively getting security updates, let alone gotten any at all for over three years, is crazy. It’s one thing to run it offline or heavily firewalled for a limited purpose, like running some important application that doesn’t work on current versions. But to actually use it day to day is absolute madness.

I hope you’re not handling any information that you have a duty to someone else to keep safe. Putting it on such an old OS release, through intentional and tedious effort on your part, would be outrageously negligent. Even logging into work email through that setup would be irresponsible. Or accessing any email account to which someone has sent private information (so just about any email account you actually use). It’s negligent with regards to your own data too of course, but at least that’s just your problem.

wildmusings··on Some things every C programmer should know about C (2002)
That is bad practice IMO because it makes it easy to accidentally introduce bugs and produces code that a reader will misinterpret, making it harder to find bugs.

The better approach is to always compare against FALSE, because that avoids the ambiguity of == TRUE only catching a single truthy value out of the millions of possible truthy values, contrary to the well-known semantics of C.

If you really need to distinguish between 1 and other truthy values, then just compare against 1 explicitly. Don't muddle the concept of truthiness.

wildmusings··on Some things every C programmer should know about C (2002)
The advice in the article is too broad because there are times when the comparison is not meant in the truthy/falsy sense. For example, strcmp and friends return 0 if the strings are equal, less than 0 if str1 is lexically less than str2, and more than 0 if str1 is lexically greater than str2.

So if(!strcmp(str1,str2)) is a valid way to check for equality, but I think the negation makes it confusing; it is tempting to intuitively read it as checking if the strings are not equal. if(strcmp(str1,str2) == 0) is the better choice.

wildmusings··on Joel Spolsky is (semi-)retired
Most people would work in a toxic company for the right price. For an extremely awful job it might be very high, but just about everyone has a number.
wildmusings··on Spain planning on going ahead with ‘Google tax’ despite US tariff threats
Who does corporate income benefit if not shareholders and employees?

The corporation can deduct the wages it pays employees, which is why they’re fully taxed at the individual earned-income level—this is the personal income tax. In theory, the corporate tax takes a cut of profits (i.e. what is due to the shareholders), so the capital gains tax is lower to make up for it. The problem is that the corporate tax is too easy to legally avoid for large sophisticated corporations, an almost impossible problem to solve within the international system. The solution is to just abolish it and tax capital gains at the same rate as earned-income.

wildmusings··on Merck’s NotPetya attack: Was it an act of war?
0days are precious and expensive. The odds of being targeted by one are incredibly low compared to those of being targeted by an exploit for which there is a patch.
wildmusings··on The latest version of Slack has a setting to disable the WYSIWYG editor
The iOS client regularly loses large swaths of messages, with no clue that they’re missing except a time gap. The only way to fix it is to log out and log back in. I imagine a large percent of users are just oblivious to the missing messages. Me and others have been hitting this bug for at least a year at this point, probably much longer. Is anyone at Slack aware of this? Missing messages should be a priority 1 bug for a tool advertised as a replacement for business email.
wildmusings··on TikTok: Cheerfulness and censorship
>I mean actual free speech would just be an endless collection of penis videos.

I agree with the main thrust of your post, but to nitpick, American free speech jurisprudence is not so daft. Where some restrictions are necessary, the principle of “viewpoint neutrality” still works to prohibit censorship. So, where the government allows pro-abortion expression, it must also allow anti-abortion expression. And this applies even where its more general obligation to allow all expression does not hold.

wildmusings··on Personal and social information of 1.2B people discovered in data leak
Tort law is going to catch up to software soon enough and people will be held accountable for negligently creating or deploying software that they should have known would cause harm.

The fact that someone else down the chain should have known better is not a perfect defense. If that misuse was foreseeable and you didn’t do enough to prevent or discourage it, then you can still be held liable.

wildmusings··on Pwn the ESP32 Forever: Flash Encryption and SEC. Boot Keys Extraction
This is kind of a myth. There is such thing as tamperproof hardware components and they can protect against plenty of threats.

Security isn’t all or nothing, it’s about understanding what the different threats are and adequately protecting against them. Not everyone is trying to protect against attackers with millions of dollars at their disposal. There is plenty of value to deterring 99% of attackers with physical access.

The idea of security as all or nothing, and that physical access thus defeats all security measures, are security tropes that need to die. You can see how obviously wrong they are when you consider that just about every security system depends on proper behavior by trusted human beings, who are never 100% reliable.

wildmusings··on Apple has locked me out of my developer account
That’s just not true. Apple actively works to prevent jailbreaks and there are often multi-year periods where no publicly released jailbreak exists for particular phones. When one does appear, Apple patches it as quickly as possible—for good reason I should add because jailbreaks work by exploiting security vulnerabilities.
wildmusings··on Slack’s new WYSIWYG input box is terrible
There is this long-standing bug on mobile versions of slack where large swaths of messages just disappear. The only way to get them back is to sign out and sign back in. This is supposed to replace business email?
wildmusings··on Congress is about to reauthorize the Patriot Act
In fairness, plenty of sunsetting legislation is simply allowed to expire. Also, repassage often only occurs in exchange for important modifications.
wildmusings··on Elephants Rarely Get Cancer, Now We Know Why (2015)
Someone else basically said it but to put it more plainly: broken gametes produce no-fertilization, no-implantation, miscarriages, and non-viable or infertile offspring. So only the good ones get through.
wildmusings··on Amazon Is Accused of Forcing Up Prices in Antitrust Complaint
It’s a good question and it’s a shame you’ve been downvoted for raising it. The other answers don’t really get it to the heart of it. The question is why any company would deal with other companies rather than perform those same functions in-house. It has to do with the transaction costs of doing business with other firms and the efficiencies and inefficiencies of making your company larger and more complicated.

Ronald Coase wrote the paper that first got to the heart of this, one of the most important economics papers ever published: https://en.m.wikipedia.org/wiki/The_Nature_of_the_Firm

wildmusings··on My name causes an issue with any booking
Out of curiosity, why not just omit the apostrophe for airline reservations then? I understand wanting your full, real name in many circumstances, but who cares about what the boarding pass says as long as you get to fly? I doubt the people checking ID would care about the missing apostrophe.
wildmusings··on L.A. temporarily suspends Uber’s permit to rent out electric scooters and bikes
Anyone with a cell phone in their pocket is giving their real time location data to private companies. And I’m very happy that the government can’t just access it without a warrant.
wildmusings··on L.A. temporarily suspends Uber’s permit to rent out electric scooters and bikes
I’m confused that HN is suddenly enthralled with giving real time location data to the government. There was actually a recent Supreme Court case that extended Fourth Amendment protections to such data.
wildmusings··on The Feds are building an America-wide face surveillance system and ACLU is suing
The Court already reconsidered the third-party doctrine in Carpenter v. United States last year and ruled that accessing extensive cell site location records without a warrant is a violation of the Fourth Amendment.
wildmusings··on Dark color: Things to know about color when adopting dark mode
For websites, I use the Dark Reader extension, which does an incredible job turning any website into a dark version. https://chrome.google.com/webstore/detail/dark-reader/eimadp...

My main annoyance these days is that Office doesn’t let you invert the colors of a document as a display option. You have to actually change the background and text colors of the document.

I wish operating systems had a feature to invert the colors in a single window/app, as a fallback for when an application doesn’t have a dark mode.

wildmusings··on Leaving Prison at 72
And we have a process for determining which ones we act upon or not: the legislative process.
← PreviousPage 4 of 34Next →