HNHacker News
TopNewBestAskShowJobs

ByteJockey

707 karma · joined May 10, 2020

submissionscomments
ByteJockey··on Why did the web take over desktop and not mobile?
In their defense they did say required.

You've been able to turn off cookies since the beginning in any sort of competent browser.

ByteJockey··on Object-Oriented Programming in C (2019) [pdf]
I don't disagree at all. I tend to advocate for very shallow hierarchies in the 5-10% of code that I think benefits from an object oriented style.

But the point of the comment is the formal/common divide rather than the specific example.

ByteJockey··on Object-Oriented Programming in C (2019) [pdf]
There's usually a formal definition of something and a common definition of something, and most languages that get traction follow the common definition.

For example, the formal definition of the Liskov Substitution Principal:

> Let ϕ(x) be a property provable about objects x of type T. Then ϕ(y) should be true for objects y of type S where S is a subtype of T.

This doesn't allow any change in behavior when subclassing. Not even the addition of logging, which makes the overriding of methods generally useless. Yet languages still provide this feature (perhaps to their detriment, but they still do).

There's also a common definition of the Liskov Substitution Principal:

> Functions that use pointers or references to base classes must be able to use objects of derived classes without knowing it.

This is, generally speaking, what people are talking about when the mention the Liskov Substitution Principal, unless they're actively writing an academic paper on the topic.

Bringing up the academic definition when someone is using the common definition is 1. not relevant and 2. usually not helpful.

ByteJockey··on Object-Oriented Programming in C (2019) [pdf]
The rule of thumb I've noticed.

If they use "agile" as a noun, they generally have no idea what they're talking about and you should be careful.

ByteJockey··on Google Chrome to remove detailed cookie and site data controls
Except that tiny minority includes nearly all developers, the people that make things to put ads on.

To extend your analogy, it's not Anheuser-Busch pissing off the brewers. It's Anheuser-Bush pissing off all the hops farmers.

Google's in the same position Microsoft was in the 00s. They don't make most of the stuff people actually want to use. You piss off the people making the stuff, eventually they start making stuff elsewhere.

ByteJockey··on O.mg Cable
It's not so much a problem if you do drugs.

It's a problem if you do drugs and are hiding it from someone (say, family). Then you can be blackmailed.

ByteJockey··on Why Facebook Is Suddenly Afraid of the FTC
I think that might have been an allusion to Weinmar Germany where industry leaders did end up allying with fascists to protect themselves from communists.
ByteJockey··on Emacs Modernization: Simple Changes Emacs Should Adopt (2006)
csh's initial release was 2 years after emacs.
ByteJockey··on Why isn’t there an English Academy? Blame the plague
If the problem is that it's too standardized and inflexible, I don't see how adding a centralized bureaucracy around it will solve this problem.

We don't need any of that, we just have to stop making fun of people who spell things phonetically.

ByteJockey··on I believe California is the dumping ground for America's homeless problem
Back in the 70s California passed a proposition that limits how much property taxes can increase. [0] As a result of this, if you buy a home and the price goes up afterwards, you won't be paying property taxes on the market price of the house.

[0] https://en.wikipedia.org/wiki/1978_California_Proposition_13

ByteJockey··on Why isn’t there an English Academy? Blame the plague
English spelling being standardized so early is one of the problems with it. The language has changed since the spelling was standardized (minus a few debates on the letter u).
ByteJockey··on It became common in the 18th century to speak of ‘English credulity’
*several british colonies
ByteJockey··on Benefits of Not Using an IDE
By refactor do you mean rename across the project, or extracting a chunk of code out into a function/method?

Rename across the project is introduced by lsps.

As for renaming, I don't use it particularly often, but it's documented in microsoft's code action documentation[0] to include: Extract method, Extract function, Extract variable, Extract interface from class (some of those might be language/server dependent).

The neovim framework[1] at least does provide a wrapper for the code action.

VSCode gets most of its capabilities outside text editing from language servers. So the rule of thumb is that if VSCode has it, vim/neovim/emacs usually have it these days.

[0] https://microsoft.github.io/language-server-protocol/specifi...

[1]https://neovim.io/doc/user/lsp.html

ByteJockey··on Google says geofence warrants make up one-quarter of all US demands
It's also not super difficult to cross most borders without checking in the authorities.

Admittedly, it's not a risk you want to take if you don't have to, but if you have no other option, it's workable.

ByteJockey··on Benefits of Not Using an IDE
> What about refactoring tools?

The old unix editors have had rename across project, find references, go to definition/implementation for several years at this point via lsps (the same way vscode gets its functionality).

> What about integrated debugging

Those are usually (slightly ecosystem dependent) wrappers around a terminal debugger.

> What about hot reload?

Correct me if I'm wrong, but these are also wrappers around cli functionality (once again, might be ecosystem dependent). And you're probably just saving yourself the trouble of writing/running a script.

ByteJockey··on Benefits of Not Using an IDE
If those are the things you're using to define an ide, then vim/emacs/vscode have been ides for a while now.

Seriously, lsps have gotten really good.

ByteJockey··on What is ‘elite overproduction’?
> It's fine to let emotions control you, you just need to be aware that they are and make sure it's the right emotions controlling you.

Ok, I'll bite. If it's the wrong emotions controlling you, what do you do then?

Please don't suggest any course of action that requires you to be in control.

ByteJockey··on OnlyFans to block sexually explicit videos starting in October
> Such a product could not be a credit card, as it would run on rails of your traditional providers (Visa, MasterCard, etc).

You'd have to build your own infrastructure, but you could make an actual credit card. It would have to be super jank at first (you might even have to cut actual physical checks at first). Fundamentally, a credit card is just you paying for somebody's transactions, and billing them at the end of the month (and suing them if they don't pay up).

It would be slow, and the service would be horrible, but the people accepting your money don't have a ton of other options.

ByteJockey··on OnlyFans to block sexually explicit videos starting in October
So, is there a market for a credit card that caters to these things?
ByteJockey··on What is ‘elite overproduction’?
They aren't bad, they just shouldn't control you.
ByteJockey··on The time Pepsi got sued for a $33M fighter jet
I don't think it's illegal to own a Harrier jet. I think the weapons systems just need to be removed first (there's probably also a lot of paperwork involved).

Here's an NPR article about a guy who has one: https://www.npr.org/2014/07/27/335839280/sold-harrier-jump-j...

ByteJockey··on A bad grade that changed the U.S. constitution (2017)
1803 at least. They made up their own right to strike down laws (Marbury v. Madison).

Admittedly, I'm not sure what a supreme court does if they can't do that, but it's kinda funny that they bootstrapped it themselves.

ByteJockey··on A wiper attack paralyzed the Iranian train system
I feel like vandalism could count as a troll, at least in the original sense of some action taken to provoke an emotional reaction.

Say, for example, spray painting something that would make a particular politician mad along a parade route that they're going to be taking.

It might be a non-central example, but I think it belongs in the category.

ByteJockey··on The Assange case is collapsing but it remains a travesty of justice
> It doesn't matter if it is happening more or less. The goal is to always be improving.

These two statements seem to be at odds. In order to know if we're improving, we have to know if the behavior is becoming more frequent or less.

ByteJockey··on Linux: Using goto In Kernel Code (2003)
That's not that much different than C. C's goto is already limited compared to the actual jump instruction because you can't cross function boundaries because of the restrictions C puts on you.
ByteJockey··on Zig, Skia, Clojure, Geometry and the Japanese TV Show: ICFP Contest 2021
> the lack or presence of these things are never deal breakers

Sure, but it can definitely break a tie. Frankly, operator overloading can create some really nice apis. And code that's pleasing to read takes less mental overhead to pick up.

ByteJockey··on Functools – The Power of Higher-Order Functions in Python
Lambda expressions in python are limited to a single expression. The poster explicitly calls out wanting more than one line.
ByteJockey··on Fake Tesla, Apple stocks have started trading on blockchains
> Is it possible to exert pressure on the regime without also exerting pressure on the people?

Not really. Every government ultimately draws their legitimacy from the consent of the governed. If enough people riot and/or strike, you're done. Even Rome had a grain ration to keep the people content.

Your options for pressure usually come down to making the people of that country uncomfortable, or military action. Neither of which are very comfortable for those on the bottom.

You can also bribe the government to clean up their act, but that has a mixed record. I also wouldn't really call it putting pressure on the regime.

ByteJockey··on Go 1.17 is deprecating the traditional use of 'go get'
If it's not ascii, you would just do:

getattr(thing, u'attribute_with_unicode_characters')

This would work in both python 2.7 and 3.9 (probably works with other 3.X versions but it's the one I actually tried).

ByteJockey··on Go 1.17 is deprecating the traditional use of 'go get'
Ahh, the wording screwed me up.

If I'm understanding your comment correctly this time, it would look something like:

getattr(thing, b'attribute_name')

← PreviousPage 8 of 16Next →