HNHacker News
TopNewBestAskShowJobs

rewmie

877 karma · joined June 12, 2023

submissionscomments
rewmie··on Atree: A simple and efficient pointer-free tree implementation
It might be of interest to anyone that there's an implicit binary tree data structure dubbed Eytzinger's tree/method that only requires a single vector.

https://opendatastructures.org/ods-cpp/10_1_Implicit_Binary_...

I dare say that no tree data structure beats Eytzinger's method in cache locality.

rewmie··on Should Windows have a default CLI editor?
> What is the difference between these on Windows?

A command line interface (CLI), as the name implies, is a user interface pattern consisting of an application that you pass arguments to it through the command line to form a request/command to be executed by the application.

This type of user interface also covers features such as exit code and text input/output through standard streams as to allow programs to be compostable through pipes.

For example, '$ cp origin rest', '$ grep -Ri foo /opt | sort', etc.

A terminal user interface (TUI) is a type of user interface which uses a terminal's limited features to provide a windowed user interface that supports interactivity.

For example, see apps like vim, fdisk, etc.

rewmie··on Donkey Kong: A Record of Struggle
At first glance it looks like they applied a linear multi step method to estimate the value of their equation of movement. There is a huge and ever-growing number of LMM formulas and I don't think Donkey Kong placed a premium on minimizing any kind of error.

https://en.wikipedia.org/wiki/Linear_multistep_method

rewmie··on Seeing how fast people will probe you after you get a new TLS certificate
> In fact it’s a good idea to simply black hole and ban the first couple hours of traffic on a new setup.

Thanks for the suggestion. I'll definitely consider that trick with my upcoming setups.

rewmie··on Scholars who study the Middle East are afraid to speak out
> 98% of assistant professors say they self-censor, and 81% of those say they're self-censoring views critical of Israel. That's 79% of assistant professors who would be voicing opinions against Israel if not for the pressure they perceive to silence themselves.

That's not how reality works.

First, you magically turn "could" into "would".

Also, you also ignore the fact that "self-censoring" does not mean "I want to speak out but I can't". It means something as innocuous as not speaking out regarding topics that aren't related to their field of expertise and thus, as smart people do, they don't just blabber on about things that they don't have a solid and well-formed opinion and don't concern them.

Moreover, your percentages don't really add up, nor do you spend any moment considering why 98% (virtually all) claim to self-censor but a far lower number feels they need to put a focus on Israel. I mean what other topics do they consider worthy of self censoring? That would be helpful to gain insight on the phenomena, but it seems the goal was to shoehorn a prejudiced point.

Don't you agree that your comment sounds like a conspiracy theory to justify why your pet scapegoat isn't being attacked enough?

rewmie··on Austin sees mass exodus of ex-Silicon Valley tech companies, here's why
> Headline states 'mass exodus', article names three known companies that never actually moved to Austin (...)

I'm not sure which article you read, but the one linked to in this discussion mentions:

* VMWare laying off 577 employees in Austin,

* startup founders, like Techstars Managing Director Amos Schwartzfarb, announcing their decisions to leave Austin,

* Meta dropping plans to move to Austin,

* Google freezing plans to move to Austin, in spite of already paying rent.

* TikTok not establishing plans to move to Austin in spite of already leasing office space,

* Don Ward, the CEO of Laundris, announced he would be relocating his company to Tulsa,

* Cart announced it was moving its headquarters out of Austin back to Houston, after spending little over 2 years.

The article is solid journalism. It's a summary of individual news pieces which is tied together by observations from leaders of established companies over their decisions and economic forecasts.

rewmie··on Goodbye, clean code (2020)
> If you're translating vectors 10 times (...)

You don't know what was being done. All you know is that the manager took a peek at the PR and told the developer to revert the commit.

rewmie··on Austin sees mass exodus of ex-Silicon Valley tech companies, here's why
Your personal beliefs only apply to your decisions. You have no right to tell others how they should make personal and health-related decisions, specially as history shows that those tend to suddenly do 180s regarding their values once they are faced with the same issues everyone else faces.
rewmie··on [dead]
> you stand with terrorist nazis

It's ok if you just call them Hamas.

rewmie··on Austin sees mass exodus of ex-Silicon Valley tech companies, here's why
> As long as there are options then we can all be happy. I guess.

Oppressing others is really not about options. It's one thing to live your life according to your own beliefs and principles, but it's an entirely different thing to feel entitled to selectively impose them onto everyone around you.

rewmie··on [dead]
Important tidbit that's being left out of most references: the US's rationale:

> U.S. deputy ambassador Robert Wood called the resolution “imbalanced” and criticized the council after the vote for its failure to condemn Hamas’ Oct. 7 attack on Israel in which the militants killed about 1,200 people, mostly civilians, or to acknowledge Israel’s right to defend itself. He declared that halting military action would allow Hamas to continue to rule Gaza and “only plant the seeds for the next war.”

It boggles the mind how these declarations pin the issue as Israel capriciously killing civilians for fun, making absolutely no reference to Hamas, it's role in killing civilians on both sides of the border, the role of Hamas oppressing Palestinians to force them to exist as human shields, and more importantly how this resolution was not a cease fire but a demand that Israel stopped neutralizing Hamas without adding any requirement for Hamas to meet.

rewmie··on Goodbye, clean code (2020)
> There's no definites in software development but if a formula is repeated 10 times you probably have a good name for it and at that point it probably should be in a function.

I don't think your take makes sense. The example in the blogpost states multiple methods have 10 lines of math, but even the author mentions they were similar, not the same. The use of the weasel word "similar" already tells you that it wasn't the math that was shaved off. In fact, the supposedly brilliant refactoring that the blogger did was change the whole interface without any good reason, and with bad object-oriented inheritance chains and mixins to boot. What a mess.

Still, the blogger tries to claim this is clean?

There's a good reason why the blogger was pulled into a meeting and gently forced to revert that mess back to its old state, and why the blogger decided to depict a hero journey in a blog post where any sort of counterpoint is left out.

rewmie··on Goodbye, clean code (2020)
> The lesson is "goodbye to over-applying a rule without considering context-specific trade-offs",

I think the problem is the rule itself. A rule of thumb is fundamentally broken if it does more harm than good. The heuristics to drive a decision need to lead the developer to a good outcome if they apply it without overthinking things or have meetings, because that's what rules of thumb are for.

Time and again developers tie codebases into contrived knots by mindlessly repeating the mantra "duplicate code is bad code" because they fail to realize that code that looks the same is not the same code at all, and sometimes should not be the same code at all for a number of reasons. Developers need to think hard about whether a refactorization helps simplify a project, and shoving code sections into multiple unrelated code paths is surely a way to do the exact opposite. Moreso when a mastermind developer opts to add conditionals to force similar code blocks to fit other code paths.

rewmie··on Goodbye, clean code (2020)
> Some newer languages don't even deal in classes at all (Rust for example) and with good reason. If one says we need classes for having objects—No we don't.

That's specious reasoning at best.

A class basically means a way to specify types that track specific states and behavior. Afterwards this materializes in other traits like interfaces and information-hiding.

Don't tell me Rust does not support those.

Also, C++ precedes Rust and it supports free functions and objects without member functions from day one. Rust is hardly relevant or unique in this regard. What Rust supports or not is not progress, nor is the definition of progress whatever Rust supports.

> And objects are a concept to manage state over the lifetime of what the object represents, so that might be a worthy concept, but a class?

You're showing some ignorance here. Classes and objects are entirely different concepts. An object is an instance of a class. A class is a blueprint of an object. This is programming 101.

rewmie··on Goodbye, clean code (2020)
> But I find it hard to believe that among those 10 lines of maths each, there aren't any functions one can extract that form some natural abstraction (e.g. "translate vector" or whatever), so that every handle function ends up being maybe 1 or 2 lines instead of 10.

That's besides the point, isn't it? Just because you can in theory extract functions that doesn't mean you should, or that your codebase will be in a better shape if you do. There's the issue of coupling, and there's the issue of introducing dependencies, and there's the issue of whether the apparent duplication holds the same semantics and behavior across the project. I'm talking about things like does it make sense to change the behavior on all 10 code paths if you need to change it in only two or three? Having a surface-level similarity between code blocks doesn't make them the same behavior, does it?

rewmie··on If buying isn't owning, piracy isn't stealing
> Piracy isn't exactly a zero-sum game, but there is a cost associated with it.

There is zero cost associated with piracy. Zero.

At best, there's an expectation of profit that's not met. To argue that, you need to show how copying a file translates to a potential sale being converted to a no-sale, and there are plenty of evidence that unauthorized distribution of copyrighted work drives demand up.

> Pretending piracy doesn't hurt revenue is a shaky ground to stand on

Go ahead and show exactly where copying a file hurts anyone. You're trying to pass off your personal assertions as axioms, but it's on you to prove that copying a file without the consent of someone hurts anyone.

Go ahead.

> now whatever it hurts the artists revenue is a different question

If anything, artists are the least impacted counterpart as they literally get paid a small fraction of the whole income.

>

rewmie··on Spain expels two US spies for infiltrating secret service
> Either this is a lie (...)

It don't think there is any doubt that it was a bald-faced lie. The comment reads like a puerile feign of ignorance.

rewmie··on Elon Musk's new enemy: Nordic workers
Taken from the article:

> However, Musk has recently addressed his distaste for unions, saying in New York last week: “I disagree with the idea of unions. I just don’t like anything which creates a lords and peasants sort of thing. I think the unions naturally try to create negativity in a company.”

Is this clown for real?

rewmie··on Goodbye, clean code (2020)
> Reusing a function C in functions A and B makes A and B dependent on C. If the definition of C changes, the definitions of A and B also change.

To pile onto this example, in some cases the mastermind behind these blind deduplication changes doesn't notice that the somewhat similar code blocks reside in entirely different modules. Refactoring these code blocks into a shared function ends up introducing a build time dependency where previously there was none, and as a result at best your project takes longer to build because independent modules are now directly dependent or at worsr you just introduced cyclic dependencies.

rewmie··on Goodbye, clean code (2020)
> Removing duplication is the introduction of a dependency. If this dependency is a good model of the problem then this deduplication is a good abstraction and may also be a simplification. Otherwise it's just compression in the guise of abstraction.

I think you're referring to coupling. Deduplicating code ends up coupling together code paths that are entirely unrelated, which ends up increasing the complexity of an implementation and increase the cognitive load required to interpret it.

This problem is further compounded when duplicate code is extracted to abstract and concrete classes instantiated by some factory, because some mastermind had to add a conditional to deduplicate code and they read somewhere that conditionals are for chumps and strategy patterns are cleaner.

Everyone parrots the "Don't Repeat Yourself" (DRY) rule of thumb and mindlessly claim duplicate code is bad, but those who endure the problems introduced by the DRY principle ended up coining the Write Everything Twice (WET) rule of thumb to mitigate those problems for good reasons. I lost count of all the shit-tier technical debt I had to endure because some mastermind saw two code blocks resembling the same shape and decided to extract a factory with a state patter turning two code blocks into 5 classes. Brilliant work don't repeating yourself. It just required 3 times the code and 5 times the unit tests. Brilliant tradeoff.

rewmie··on A genetically modified bacterium that outcompetes bacteria causing tooth decay
I'm going off on a tangent here, but whenever I read about progress in dentistry I always get the feeling they are just sugarcoating medieval practices. In an era where mankind routinely flies people into space, the primary tools leveraged by orthodontists is still drilling and pulling teeth, and teeth replacement is still implemented as lodging metal spikes onto the jawbone. It sounds like the only progress that we had since the 17th century is clever ways to numb pain and how finer materials ended up replacing wood for dental prosthetics.
rewmie··on A genetically modified bacterium that outcompetes bacteria causing tooth decay
> With good hygiene and dental checkups twice a year, you can reasonably expect to avoid cavities altogether.

Your comment is self-contradicting. The only thing that dental checkups do is allow cavities to be flagged before they progress very far.

Also, I feel that in this context "good hygiene" is a weasel word, in the sense that implies that any occurrence of a cavity can only be explained by the absence of good hygiene. There are many factors to cavities that aren't addressed by hygiene, such as vulnerable teeth and cavity types such as root cavities, whose primary risk factor is decreased salivary flow.

rewmie··on Is C# Underhyped?
> I don't have a single mono/dotnet application or service installed on Linux, and I can't think of a popular one.

I don't have market share data, but dotnet is used a lot to develop ASP.NET Core services, which also target Linux and whose developer experience is delightful and provides top performance out of the box. I'd pick ASP.NET Core on Linux over any Java-based framework any day of the week.

rewmie··on W3C Leaves Twitter
> Twitter is where the influential people (...)

Either you believe these influential people are only so because of Twitter, or that Twitter is just a communication medium which is used by some people you seem influential.

I see more influential people posting on LinkedIn than Twitter, for example.

rewmie··on Toxic comments are associated with reduced volunteer activity on Wikipedia
> This hasn’t really been true for years.

No, that's fundamentally wrong. Every single Wikipedia user is an editor. In Wikipedia ou don't even need to have registered an account or be logged in to be an editor.

> Most new editors have experienced like this: > > They see an article that needs correction or a small expansion so they create the account and do the work.

This is how I know you have no idea about what you're talking about. Most users don't bother registering an account because they do not need one to be able to edit articles. I am well aware of this fact because I've been active in Wikipedia's anti-vandalism groups, and one thing I did was spend time looking at the stream of most recent changes. New edits are mainly done by IP users, which means editors who either have no account or haven't bothered logging in, and red accounts (accounts whose owned didn't bothered to create a personal page). Red accounts were only behind a fraction of new edits.

Again, no one needs to have an account to edit wikipedia, with the rare exception of articles temporarily locked due to being subjected t attacks and edit wars.

> Their work is immediately reverted by an editor.

In my experience this is a somewhat rare event, and it is mainly due to sheer vandalism (shit posting, users creating articles about themselves, inserting unfounded and unsourced claims, etc). There are also astroturfers who abuse wikipedia to advertise their products or services. There are also constructive contributions but they are either edited to fit the style guide or are marked for stuff like sources or demonstrate notoriety.

I repeat, the main source of reverts is vandalism and posting stuff that has no place in Wikipedia, such as unsourced claims and allegations, post ads for stuff and businesses and things, push political agendas, and even abuse wikipedia as if it's your personal blog.

rewmie··on Toxic comments are associated with reduced volunteer activity on Wikipedia
> Giving the organization very clear rules and goals from the start and making wide range correcting changes towards them even when they hurt the whole organization.

I'm not sure you noticed it, but the people complaining about "editors" being toxic are actually those who are confronted with these "very clear rules and goals" already specified by the community , and they are calling foul once they see their edits being edited based on these established and time-tested processes.

And by the way, wikipedia supports conflict resolution processes which can culminate in articles being temporarily blocked to prevent endless revertions. You just need to flag the article and ask people their opinion.

It's strange how this whole debate centers around abuse, offers all kinds of solutions to perceived problems, but not only fails to acknowledge these processes are already in place in Wikipedia for over a decade but also they don't even wonder what content was added by the editors complaining their edits were reverted. I mean, think about it for a second. Do you think wikipedia achieved a notable level of quality because all edits, regardless of their content, remain untouched in place as-is?

rewmie··on Toxic comments are associated with reduced volunteer activity on Wikipedia
> I mean, that's true, but in a not-especially-deep way that doesn't really help or address the issue at hand.

I'm not sure you go the point. If someone's complain is that others can also edit wikipedia articles, they are complaining about the fundamental nature and purpose of a wiki. Don't you understand how fundamentally flawed is the concept of conplaining that others just like you can also edit wikipedia? Those damned editors.

> Why do we have this thing where different people can edit it?

Yes, others can edit it, including your own changes. That is the whole concept of a wiki. Whining that others also edited a wiki shows a fundamental failure to understand what a wiki is and how it's designed and expected to work.

> So, while yes, anyone can edit, some of that gets in the way of the actual purpose, in that "five whys" sense.

No. Anyone can edit it as they see fit. The whole concept of a wiki is a consensus-based process that concurrent changes converge to a stable point accepted by the community. Expecting that your edit should be set in stone while you reserve your right to edit other people's work is simply absurd.

That's why it's important to clarify what an editor really is (not a figure of authority, but a guy just like you) and why it's absurd to be offended and feel entitled to edit over everyone's work but not have your own contributions edited. That's not what a wiki is, nor is it why the concept is a huge success.

> It's a bit like saying, when someone brings up spam (...)

That's an amusing remark, because to me you're actually arguing in favor and in defense of spammers, as they are the ones complaining that their abusive misuse of a system should not be prevented, criticised or fought by the community.

rewmie··on Toxic comments are associated with reduced volunteer activity on Wikipedia
Reverting is editing. Just because you wrote something in Wikipedia that does not mean it is expected to be set in stone.

If your expectation is to write stuff that only you can change, write a blog.

rewmie··on Firefox on the brink?
That's a great point. Both Chrome and Edge are widely used as WebView drivers by some applications, and whether the user likes it or not they end up using one of the browsers that's dubbed market leader. Does Firefox even provide any webview-capable deployment option? If they managed to put together one that didn't weight around 100MB or phoned home, I'm sure it would be widely adopted once it's out.
rewmie··on Toxic comments are associated with reduced volunteer activity on Wikipedia
> The special rights include reverting edits (...)

No, it really doesn't. Anyone can revert any edit, even if you haven't registered an account and/or you aren't logged in.

The only thing that the reversion permission capability grants you is access to a button in the UI.

Also, all you need to do to be granted access to that permission is a) have an account, b) ask for the permission, b) not have an abuse-riddled contribution history.

Page 1 of 28Next →