skysight-inc/HackerNews huggingface dataset:
Ask HN: Good Antiviruses for Development Environment?
In our company we are required to run anti-virus software on all computers, including developers' laptops. We didn't decide yet which exactly anti-virus software we will use though.

We are quite cautious about the choice of the software because:

- we know that anti-virus software may be quite intrusive on a development machine (slow, blocks legitimate files, etc.),

- once we pay for it, we don't want to go back and chose another one until the next licence renewal, so we'd like to make the good choice at once.

Can you recommend an anti-virus software that you currently use in a development environment and have good experience with?

Some context:

- we are looking for something really simple, like a file scanner for starters; all other features are considered as a bonus

- we have Mac, Linux and Windows machines

- we mostly develop in JVM and Python ecosystems

- our workflows are heavy on the file system, but our data is simple (should not contain any malware normally)
Before switching to CLion eventually, I've used my well curated VIM config[1] together with YouCompleteMe and several clang-based tools such as clang-format, clang-rename etc. for several years, working on smaller and large C/C++ codebases with reasonable success.

At some point in time I switched to a full-fledged IDE (CLion) because there are certain refactoring tasks which are probably still possible using this setup but I found them to be mentally too complex to deal with, especially when I am focusing on the task at hand at the same time.

[1] https://github.com/NewProggie/Dev-Utils/blob/master/dotfiles...
still yet to find an ActiveRecord equivalent for javascript.
> I could write those checks in Python as well, but they are optional

You're probably going to need to check `value_I_want` though. So maybe the checks aren't quite as optional as they look.
I was confused - is "who mom hates" supposed to do something interesting?

On my Mac it seems any two arguments are allowed as an alias for "am i", so long as the first doesn't start with "-".

Looking it up, https://unix.stackexchange.com/questions/108145/is-who-mom-l... suggests it's a well-known in-joke.

FWIW, on my FreeBSD machine, only "who am i"/"who am I" are allowed.
One of the things that I don't like about React applies to maybe all frameworks. It's easy to get 90% of the way there, but the last 10% is the hardest. For example, I'm building a real-time websocket app with React. Everything seems pretty easy to build, I'm using hooks, React Router, etc. But coordinating socket connections / reconnections / etc and fitting it into a very functional paradigm is just very very difficult, much more than it would be in a more straightforward library.
And this is what I hate about these article, they leave people out in the cold who are suffering.

Start with getting your genetics, your full genome if you can afford it. This is something that saved my life.

Could be something as simple as nutrients, like B6 (P5P):
https://www.researchgate.net/profile/Marnina_Stimmel/publica...
I'm obviously not who you're asking, but I'm going to cheekily show up with my own thoughts on the subject, anyway:

I'm coming to the opinion that, if you need private member functions to retain encapsulation, that's a strong sign that your design was never properly encapsulated in the first place.

The motivation for making something private is to prevent people from breaking your object by messing with things they shouldn't. Generally speaking, only real way for it to be possible break an object is if its internal state is complicated enough to allow that to happen in the first place. Which is itself a failure of encapsulation.

Somewhat more concretely: If you've got to private fields A and B, where any change to A must be accompanied by some corresponding change to B, and the logic for enforcing that rule needs to be enforced at several places within your class, then, at the level of abstraction your object is operating at, A and B represent a single logical entity, and should never have been represented as individual fields in the first place. They should have been encapsulated into their own object.

Even more concretely:

Don't do this:

class Thing {
val counter = 0;

fun foo() {
val x = counter;
counter++;
...
}

fun bar() {
val x = counter;
counter++;
...
}
}

And don't do this:

class Thing {
val counter = 0;

fun foo() {
val x = counter_next();
...
}

fun bar() {
val x = counter_next();
...
}

private fun counter_next() {
val x = counter;
counter++;
return counter;
}

Do this:

class Counter {
int state = 0;

fun next() {
val x = state;
state++;
return x;
}
}

class Thing {
val counter = Counter();

fun foo() {
val x = counter.next();
}
}

Very abstractly: Composing objects is the core idea behind OOP. In general, the more object-oriented design is the one that favors object composition over other language constructs whenever possible.

Also, this is all arguably a separate issue from using privates simply to avoid cluttering your public interface when factoring code. If you're working in a language that doesn't really have good nested functions, private methods are your next best choice.
It is true. Full disclosure - I'm very inexperienced when it comes to javascript - it is on par with my German skills - I can do basic shopping, order a coffee or get a bus ticket, get from A to B but that's it. But I do feel like it's been a black box by design from the start. At the end of the day, we are talking about transpiling code. Which is fine(depending on the definition of transpiling to begin with). If we look at how C affected Assembly, there's no question that the appearance of C skyrocketed the entire CS field in general: Even the most basic of "hello world" programs is a testimony of that. At this point Assembly is in the Cobol universe - a handful of people know it to an extent at which they can work with it. But in the case of React... That really isn't the case - the fundamental problem I see with React(and the entire NPM universe for that matter) is that they try to make a simple solution more simple by making it more complicated and convoluted. On a more general note, the web is broken. It has gone against it's core principles and design. HTML was meant to serve readable documents and that's it. Javascript's purpose was to add some interactivity. But in this day and age, according to reacters anyway, HTML is pretty much Assembly or Cobol, while javascript is C. Which in theory sounds great as far as the analogy goes but in the real world, javascript's purpose was never to take over. It's purpose was to supplement. The flaws in React(and all other 5000000 frameworks) are a symptom of it, not the cause.
I know almost nothing of React but this looks eerily similar to the (in-)famous Drupal hooks. Back in 2005-2006 there were articles like this [1] which were mostly caused by people not understanding (or mis-understanding) how the hook system was supposed to work.

[1] https://www.drupal.org/forum/general/general-discussion/2006...
Indeed. I don't understand how my car works, but I am able to use it to get around.
Yup they've done such a good job of explaining exactly what's going on, live.

It's been interesting to see them improve too. It used to be that the video compression always used to ruin the final moment when the boosters landed at the sea platform. But now, they've even solved that.
I think there’s some research on Ketogenic diet’s effectiveness on epilepsy. But for general diet/health/weight loss, most of keto’s benefits sound like pseudoscience. That goes for many diet fads, not just keto.
Amazing how fast it became the new normal.
React was always a black box, more or less. To me, what happened was the React team decided boilerplate was worse than cognitive load and the appearance of simplicity, and changed the framework accordingly.

Class components are easy to understand and reason about (mostly) - but they result in a lot of boilerplate code for simple functionality and event handling. Hooks, to me, are the opposite. They have all kinds of limitations and footguns which you need to be aware of (yes linters help) but they give the code a much cleaner appearance.

I personally prefer obvious boilerplate over clean aesthetics but I know lots of people who prefer hooks. I've sinced moved to Preact and have not missed real React once.
Ok, quick test: can you explain in a paragraph why you cannot call a hook inside a for loop?
Hooks are both a blessing and a curse.

The most telling difference after starting to use hooks when working with both junior developers and more seasoned ones is that code that seemingly (and intuitively) behaves in one way actually does something slightly different, or worst case - something entirely different. Most often the culprit is a combination of the hooks themselves, the rules and the more general issue of the dependency array and lack of built-in immutability in the language.

This happened before hooks as well, but the class syntax and lifecycle methods felt like a thinner layer on top of JavaScript. Hooks is a much more proprietary concept that tries to solve a much wider problem - having stateful functions, except they make no sense outside the realm of react as they exist right now. Maybe some form of implementation using generators would bring it closer to the language, but that would most likely introduce it’s own set of challenges.

Don’t get me wrong - I enjoy working with hooks, but it just doesn’t feel quite right that they are so tied to some «magical» implementation that requires a large set of rules to behave as expected. It helps to look into the implementation, and especially to reimplement a simple version of react with hooks yourself - but that’s just not a realistic option for many.

Kudos to all the innovation coming from the React team and community though - I’m sure they think about this stuff all the time.
hn.js is the only framework I need: https://news.ycombinator.com/hn.js
Surprisingly I have been getting stuff done 30 years before Go got invented, with more expressive languages.
This is quite interesting. The explanation was quite simple and wonderful even. For what it’s worth, I never thought of a drought as causing the rainfall to be evenly spaced throughout the year but technically it’s true.

On a tangential note, I wonder how much the dust bowl played a part in making California the agricultural powerhouse it is today.
I highly recommend this talk (first half) for a great introduction of how React Hooks work internally, Ryan remakes the basics of hooks from scratch in 30 min:

https://www.youtube.com/watch?v=1jWS7cCuUXw

I agree on 2 of the points of Jared Palmer but disagree on one:

- [agreed] The new "Concurrent Mode" will take things to a new order of complexity. I am actually very afraid of this, it seems like one of the things that might actually kill React, and I love working with React. I like it so much that I've invested into creating few React libraries to make my life easier.

- [agreed] React Hooks are difficult to get started with and to really understand them. IMHO this is mainly due to "React lifecycle", which is just a difficult concept (even with classes!). Life is not easy, and there are some times that there's complexity and you need to learn new complex concepts. No issue here IMHO.

- [disagree] React Hooks is currently magic. While it's a complex piece of software with many small details, once you understand fairly well the lifecycle (and React docs are great at this, and Dan Abramov's https://overreacted.io/ digs a lot deeper for the curious) all bugs are very clear.

I am currently mentoring someone in React who already knew HTML+CSS+JS, my recommendations are: get used to the syntax by practicing, learn the 3-4 typical libraries, and learn very well the lifecycle including how useState's setState and useEffect's dependencies work. That's most of day-to-day React work.
Why can't NVidia achieve this without spending tens of billions buying ARM?
Not everyone may have a drivers license. Some upper middle class members also don’t have driver’s licenses.

What just about everyone over 18 has is a form of government ID. Without a gov ID you cannot get access gov resources: education, SNAP, medicare, Medicaid, purchase controlled groceries like alcohol, cigarettes, marijuana , power, phone plans, credit cards, etc.

It’s a myth that poor people cannot get IDs. You’ll be hard pressed to find someone who doesn’t and cannot get one. I was dirt poor as a youth. I got a non drivers ID card. It was necessary in life.
Cybersecurity: Best Practices for Improving the Adoption of Remote Learning
I was hoping to see why who was better than w or similar, instead I was pleasently surprised to find someone taking a really simple unix command, reverse engineering it, and reimplementing it
Undefined behavior is often a thing for C programmers (2011)
> Apple doesn’t want you as a customer.

Funny, that's not what Apple has been saying to me.

Also, the Mac has allowed "sideloading" by default since 1984, as did the Apple II before that.

Maybe Apple should screen your phone calls too. The iPhone can only answer calls from people that Apple approves, because scammers can call your grandma on the phone.

Maybe iPhone should only play music that Apple approves. None of that devil worship heavy metal, only good clean church hymns.

[tries to buy candy bar with Apple Pay] Nope, bad nutrition!
My guess it's will be very useful for helping weak writers write better texts. Like the user tells the computer what they want to convey through a letter/email/text, the computer gives them like 3 example sentences that could work and the user picks what is most applicable. There is probably going to be a booming business of AI assisted writing.
I think the keyword you might want to add to your README is "Canary".

This can refer to a deployment tactic or a system that actively tests systems in the manner that this system does. So that you can be notified of client-side facing issues that might not be visible server-side without relying on actual clients to beat down the door and shout at you.
SATs are multiple choice, this is apples and oranges to the situation in the article.
please can you specify what's the salary range for a strong candidate?
Does my name trigger a similar response in you?
It really is quite incredible how boring this has become. I was chatting with a friend who used to follow all of this stuff closely with me at the beginning of the landing attempts. He wasn’t tuning in this morning (US east coast) because he didn’t find it exciting without the almost 50/50 chance the Stage 1 booster would RUD on landing.

Starhopper 150M hop window opened today. Hoping to see some action there as that seems to be the new hotbed of SpaceX excitement. Not that I wish for a RUD but it’s far more likely to see something crazy on these early experiments making it more fun to watch.
True dat. It's common to conflate abstract data types and objects. Similarly, it's common to conflate types and classes.
Zuckerberg promises? Again? Are these still newsworthy?
> A DisplayPort cable has 20 pins, so why can't it just be a 20 pole switch?

I use magnetic 20-pin USB C adapters to connect laptop thunderbolt and usb c to a DisplayPort headset and misc. Less worry about yanks; easy dis/re-connect; simplified cable and headset handling. No issues so far. I like them. Though I've not been pushing the DP bandwidth hard. And because they disconnect much more easily than a plug, I can't for instance move the laptop around and expect the cabling to simply follow.

But to use them for frequent hot swap, compared with a real switch, I'd be worried about duty cycle lifetime. And the dis/connect isn't hidden from the environment, which might be inconvenient.
There’s only three supplements worth taking:

Creatine - to top off your bodies ATP stores and maximize power output.

Beta Alanine - to maximize your carnosine stores and decreasing the burning pain that comes from lactic acid, letting you push harder for longer.

Citrulline - to relax blood vessels and boost nitric oxide in your body, giving your muscles more oxygen for more work and powerful erections.

When their powers combine, you can reach your max potentials, with correct dosing.
Are Your Country’s Cellphone Plans a Rip-Off?
Hauser seems like a fanatical UK nationalist nutjob who has lost sight of the simple reality that ARMs growth chances are looking very bleak. Everyone who wants one already has a perpetual license, all their licensees are better at improving the processors and extracting value than ARM has been.
when these conditions persist after the adversity has passed, that's maladaptive.
Yeh, to be honest, it was surprising to me too.

But we're competing against a super dominant industry leader (SurveyMonkey) so doing weird stuff that they wouldn't ever do often increases engagement.

In this case, it worked.
Anxiety is a disorder of the nervous system that is a by-product of civilization. We are one of the only mammals that gets anxiety, if you get anxiety in the wild you won't be alive much longer.

Depression and PTSD are not responses to adversity. If you face adversity and suffer depression or PTSD you were raised psychologically weak in a way that is dangerous to you.

There are people who have survived civil wars, drought and mass starvation all over the world that don't have these problems get out of your bubble.
That would be my advice, if you are comfortable with vim it will be a great tool for small to mid projects. Maybe even larger ones that are clearly modularized and kept lean.

But you cannot escape the reality, refactoring kinda needs a good IDE to get it done quickly.
I've been following a Github issue about hook support in Flutter, and I understood React hooks much better after reading that than I ever did before. It is clear now what exactly the problems hooks solve are, composable life-cycle state reuse. I think that because most people don't really understand why hooks were even needed, they can't wrap their minds around them.

https://github.com/flutter/flutter/issues/51752
JSON.stringify(data, WTF, 2)
Show HN: NextPage – Chrome extension that recreates spontaneous meetings online
Isn't that similar to using https://github.com/prometheus/blackbox_exporter with prometheus, alertmanager and grafana?
> But to emulate the body, you must emulate the environment that shaped it, so now we're talking microverse creation.

Yes, this is called "virtual reality" and "physics engine". The brain does not need its environments to be 100% indistinguishable from its ancestral environment; if it did, we could never move away from where we were born.
I think I've heard "the code is self-documenting" a hundred times in my career and it hasn't been true once.
i owned root@pobox.com for many years before they realized they shouldn’t have allowed that to be registered. that was fun.
BinaryBuilder – Easily build native binaries for 13 platforms
What about this? https://github.com/typeorm/typeorm/blob/master/docs/active-r... (Forgive me if this isn't what you are looking for, not super familiar with ActiveRecord myself, just recalled seeing that yesterday!
I think that would be more true if they viewed it [as/with the same distance as] a publication. FB (and maybe Twitter, too) seems to hold this weird place where it's not quite a conversation and its not quite broadcasting, but its a bit of both and treated with an overlap of the traits applied to each.

So while people grew to view advertising, broadcast and print productions with skepticism, they seem to give more benefit-of-the-doubt to posts on FB as if it were a family member or friend reaching out, but with the same deference they might give to a respected authority writing or speaking on a subject of expertise in a publication or broadcast.

It's really strange to see people who I've known my entire life to be intelligent people take shared items on Facebook, YouTube (et al) at face value.
Are Sticky Menus Good or Bad for Your Site?
Nothing old broke with the introduction of hooks.
It really is. All I want is one button that just cycles to the next active port connected.
I think they is saying that if you put your hand on a hot thing, you get a signal. You can also call it pain. But the problem is not an internal problem with your body, but a consequence of your environment. So change your environment or what you are doing and the pain will disappear. Don't try to keep your environment the same and try to change within.

(I don't entirely agree with them, but that's my best summary of their argument).
Our team has seen a boost in productivity thanks to hooks. It has resulted in more straight forward and cleaner component code, making it easier to reason about how they work.

We've been able to get rid of a lot of annoying and confusing stuff when working with class-based components (though perhaps not all of that was related to hooks but also due to early React boilerplate/tutorials which may have proposed things which are now considered bad practice even with class-based components). No more componentDidThis componentWillThat but a simple effect api (the cleanup function can be a bit confusing at times though). No more unclear setState calls but clear and logically separated state updates. No more class method callback binding hacks but simple functions. No more `this` confusion. No more "Pure" and shouldComponentUpdate confusion but a simple memo api. No more weird Redux 'connect' biolerplate but a simple select and dispatch function.

As far as our team is concerned, React has always been a black box and it has helped us a lot being productive. Perhaps it has become harder to reason about how React itself works, but it has definitely become easier to reason about the components built with it.
> It also really confuses me on who this would even affect?

You can have very precise targeting with FB, so you can use different tactics for different subgroups to make them vote for you or don't participate at all if they won't vote for you.
Just setup a wildcard cert, apply that to wherever, and you limit how much you expose your internal infra.
Are you familiar with what it’s like to have depression? It’s not something you can really ever get rid of, even if you can mitigate it with medication and lifestyle changes. It’s there, though not dominant, even when things are going well and even when you’re in a positive mood.

I struggle with similar feelings, and the idea that depression becomes something that is there but can be put to positive use absolutely tracks with my own experience.
On a side note, can we please pass a law to make Election Day a national holiday? It is sad that companies don't help their employees and customers execute their right to vote.
DAVE: Deriving Automatically Verilog from English
Anxiety & depression might be useful if handled well but if not...

The problem is often on the line of you get depression & anxiety as a symtom of some other problems if you fix the problems fine. If you don't it can get out control and then you can become conditioned to do "bad" responses to all kind of things making the symptom a illness itself. And making it really hard to get out of it.

Or at least this is how it often did look like to me when I looked at people with depression & anxiety.

Just to be clear with "bad" responses I mainly mean thinks like avoiding problems instead of fixing (or sidestepping) them making it with every time you do so harder to "fix" that underlying problem in the future.
As far as I know Stripe is not a full competitor.

I am end user, and for me paypal usual works fine, and I don't have to worry too much about entering my CC and personal info all over net.

I like the fact, that only Paypal has to know my real name and address, and not every other website I migh want to purchase something from. I don't think there is an option for that with Stripe.

Unless you mean just credit card processing, then sure Stripe can probably do better. But at least for some like me not supporting paypal means site needs to clear higer bar for me to buy something from you.
Show HN: Referrd – Setup a Gamified Referral Program in Minutes