skysight-inc/HackerNews huggingface dataset:
This style gets the label 'poor-mans-pattern-matching' from me. If pattern matching would not be in my daily vocabulary, as it's also not available in JS, I'd consider it a misuse of switch/case and this post also makes an odd example for its usefulness.

The example I would pick is the following: Consider you need to switch depending on a version (of a specification in my case), but this version isn't represented as an enum in the codebase, but as a number instead. So our team had something like this in the codebase (early return):

function foobar(version: number): string {
if (version === 3.1 || version === 3) {
return 'result_3';
}

if (version < 2 && version >= 1) {
return 'result_1';
}

if (version >= 2) {
return 'result_2';
}

throw new Error(`Cannot interpret version '${version}'`);
}

I read it as "people don't care about branching order that much, so how can I make my wish for better readability more clear?".... my end goal then was to bring it into this state (a distinct enum as discrete value of the version):

enum Version {
_1_1 = 1.1,
_2 = 2,
_3 = 3,
_3_1 = 3.1,
};

function foobar(version: Version): string {
switch (version) {
case Version._3_1:
case Version._3:
return 'result_3';
case Version._2:
return 'result_2';
case Version._1_1:
return 'result_1';
default:
(function (val: never): never {
throw new Error(`Exhaustiveness reached: ${val}`);
})(version);
}
}

...and my interim solution that made it into the PR in time turned out to be something like this (switch true):

function foobar(version: number): string {
switch (true) {
case version >= 3:
return 'result_3';
case version >= 2:
return 'result_2';
case version >= 1:
return 'result_1';
default:
throw new Error(`Cannot interpret version '${version}'`);
}
}

My PR was flagged by the team for misuse of the switch statement, we had some discussion and I changed it back to the simple if/else branching from above.
Extremely well put statements by RMS and FSF. Clearly, RMS has many true leadership capacities and is absolutely devoid of any corruptability.

I'm wondering if this last talent does actually require being on the spectrum, as he admits to in his first paragraphs.
You picked the wrong definition of measured. In this context it means something like to be deliberate and constrained.
Hate against Unicode frustrates me too. It's like people are privileged and don't know what it's like to have at least 2 code pages for your language. I _still_ have to fix files from those encodings and back into Unicode. Unicode is a blessing even if many don't see it.
great launch Rita and team!

> Device-based resizing: To make users’ experiences even smoother, especially on less reliable mobile devices, we want to make sure we’re not sending large images that will only get previewed on a small screen. Our new optimization will appropriately resize the image based on whether the device is mobile or desktop.

wait, what? i feel like this needs more details... can we opt out of it if necessary? (say on a per image, or sitewide, or cookie based, basis) it sounds very nice but the loss of control seems concerning?
I think we might disagree on the extent to which the collectible sports card is valuable because of its unique physical materials, and the extent to which it’s valuable because of “human imagination.”

I think the latter is responsible for the overwhelming share of the value of a sports card, and the former is only a historical coincidence that creating rare and difficult to counterfeit items was only practical by fabricating physical items.
This is an entirely dishonest framing of the articles which do not claim RMS defended Epstein, but do claim (correctly) that he defended Minsky.
> He has sincere regrets, especially at how anger toward him personally has negatively impacted the reputation and mission of FSF

In my opinion, "I'm sorry you were offended enough to stop supporting me" is not a sincere apology.

In fact this whole announcement is one big "I'm sorry you were offended" statement. It doesn't apologise for the problem, it "apologises" for not managing to sneak the announcements past people without them realising.

Whether you support RMS or not, this is a poor statement from the FSF, and a poor statement from RMS, and speaks to why so many feel that the FSF no longer represent them.
So some people believed in her and gave her a chance... backed her with their money ..invested in her and she re-pays them by attacking them and their investment.

I used to be a fan of her and her persona but now comes off as spoiled and unappreciative!
Only when the actual piece of digital art imprinted itself on the blockchain and can be viewed with any non-closed source viewer for free, then yes. Until that happens, NFT is useless apart from supply chain/authorship identification
"User Engagement Networks" Sounds perfectly fine to me. At least there would be an idea of what these apps are trying to accomplish at the expense of the user.
Another tip I found very useful lately

You can use `$("selector")`, even without jQuery, in console. (not sure if with firefox, works with safari and chrome)

And also `$x("path")` for xpath.

But note, this works only in console, it’s not available from javascript.
Or you can console.log(JSON.stringify(x, null, 2));
I don't think it makes a differences that it is written in Rust in the same way it does not really matter that Neovim has a cleaner codebase than Vim's in your everyday use of Neovim.

But maybe it will attract Rust devs who are also Vim users in the same Neovim attracted people who are versed in Lua ?

I have been using Vim for a while and learned a lot but I hate to have to configure it and the out of the box experience is really missing much. I don't want to have to have to manage something as basic as my text editor.
I want a battery-included modal terminal editor that has (mostly) Vim commands and is easy to use.

Onivim2 is fast and beautiful but it's a gui and it is not finished.
Kakoune looks great but I don't want to learn another set of commands as I might to have to use Vim again and don't want to "lose" my habits.

So I am really looking forward Amp 1.0
> He has sincere regrets, especially at how anger toward him personally has negatively impacted the reputation and mission of FSF.

This line really misses the mark for me. When you defend a man who raped a 17 year-old girl, your biggest regret shouldn't be about how it harmed your reputation.
> I don't recall it ever having been proven that Minksy had sex with anyone. I'm obviously open to being corrected on this.

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

"
The Minskytron or "Three Position Display" running on the Computer History Museum's PDP-1, 2007

In 1952, Minsky married pediatrician Gloria Rudisch; together they had three children"

I am assuming it was through sex.
Skinner boxes is my favorite euphemism
Having a deep depression is, if not exactly traumatic, certainly something that I’ve blocked out of my psyche in the same way.
Japan's Thomas Edison Built the Nation's Most Complicated Clock
Every single announcement by my county at the first lockdown was about a short sacrifice to ‘flatten the curve’. Once we were past that, it became clear that the government officials would say whatever they thought would be most palatable to the public to get their policies enacted.

Dr Fauci even admitted to selectively lying about a number of things (masks, herd immunity) because he felt the public couldn’t handle the truth.
I remember when I first discovered the concept of pattern matching, I tried to find a way to "hack" the switch statement in js to make it work like pattern matching.

The switch(true) format was the closest I got to it, which I personally don't like compared to a clean if/else or early return.

There's probably some performance differences between if/else and switch (I haven't checked) but it probably end up being what's your preference / what standard code style you want to enforce on your team.
This is a real problem. We have an app on the app store, and our competitors have completely unusable/garbage apps with hundreds of 5 star reviews.
I could not disagree more. This whole statement is "sorry, not sorry".

If someone is known to be a toxic person (and currently still is), you do not let them on to your team. Ever.
...and almost always is, except in the trivial cases of tiny numbers right near the start. Which is why it doesn't actually work as an encryption algorithm.

The other idea I've always liked is a length that, to enough precision, encodes something in the decimal places. Then in theory you could just cut something, say a diamond, to this impossible precision, and then measure it later. I assume that, like the Pi example, this is impractical not only in practice but even in theory, even if we had impossibly-accurate cutters and measurers.
One of the big advantages of VIM is that it's ubiquitous. This has some potentially more intuitive features, but I when I'm setting up a new system, it's not there.

It's VIM-like... but just different enough where it seems like it would be infuriating in practice if you had to even occasionally cross between the two.

I like that they chose to use an existing format for language bindings. Sublime bindings are pretty decent. Less clear is how you would integrate something like prettier. I suspect that's not even possible right now.

I like built in fuzzy search a lot (not sure I like this specific implementation, but a lot better than nothing).

I would love to see something like this, but that sticks more closely to VIM in terms of default bindings and features.
Maybe DanBC was there too and knows the truth.
Apologize for what? This post doesn't make him less accountable for what he wrote in that email.
"This happened because the utility used a simple recursive descent parser without backtracking, which gave unary operators precedence over binary operators and ignored trailing arguments."

It is a bit sad that his problem has to be encountered and resolved over and over and over again. Granted, it was a SIMPLE PARSER because resources were extremely tight. Note, I don't mean shells, I mean working with projects that implement parsers. As soon as someone busts out lex/yacc I know I'm going to see at least one "ah, we didn't think of that" issue. Parsers are hard.
> California, Austin, etc are selecting for people who take more than they give.

How is this measured? Any should someone born in a community without access to high paying jobs or less desirable weather/amenities not be able to move elsewhere?
console.table O_O

Wow, since when it was in JS?
> Programmers seem to talk about visual programming languages as if they’ve failed, but outside of software engineering they appear to me to be more popular than text-based languages.

There's a large category of conventional wisdom on HN that's categorically false yet constantly repeated—the idea that "visual programming languages failed and are now dead" is one of those. It's... irritating :-)
You can create copies of digital art easily, of course. But you can’t create a copy of a particular NFT (assuming the blockchain software works as intended).

For most of these famous digital art NFTs, the digital work itself is widely distributed online. But of course there’s only one of each NFT.
rms has a long history of what today qualifies as sexual harassment, independent of his current controversy surrounding the Minsky/Epstein mailing list posts.

He's also a bad leader (a drama llama that causes misunderstandings and controversies at every turn) regardless of his extremely controversial views on things like pedophilia, the definition of "sexual assault", Epstein's victims, et c.
When you buy a computer, or get one from work, it is preloaded with Windows.

Windows is essentially "free", as in for most people there is no savings from not using Windows, like it is i.e. if you build your desktop your self.

Linux is compeeting with effectivly mandatory prepaid Windows installs.
Off topic but axios looks neat and tidy! I could read news every day. Is there anything similar that covers worldwide news?
Wow there are some cool tricks here!

In Firefox any objects you pass to console.log are expandable, so you can say console.log("my hash", h). It seems to behave the same when you say console.log("my hash %o", h).

But there is a tricky thing that has really confused me in some debugging efforts: when expanded, the object display is "live", so it always shows the current properties of the object, not the properties as they were when you printed them. But the unexpanded view shows them as they were. So for example:

h = {foo: "bar"}
console.log(h)
▶ Object { foo: "bar" }
h.foo = "BAR"

Then you click the triangle and you see:

▼ {..}
| foo: "BAR"
| ▶ <prototype>: Object { .. }

I don't know if that's a bug or desired behavior, but watch out for it! In the past I've used console.log(JSON.stringify(h)) to capture the full object as-is. I guess turning it back into an object would be even nicer, so you could have a deep copy to navigate.
One can't deny, sadly, that a software freedom geek with consistency and integrity as applied to that philosophy and insight therein of RMS's caliber doesn't yet exist.

I'm afraid, for this reason alone quite a few people get to think that if you consistently apply software freedom principles in all parts of your life where you use or produce software, it must come with the baggage of all other flaws of RMS's character, complete with questionable hygiene habits and abrasive personality.

As if you just can't have the same principles, but bring in flaws of your own.
Creating an Outside Focus and Click Handler React Component
This can't be true. Or, if it was, it would be something very, very odd.

Why? Because we already have 4 Corona-Viruses endemic causing normal colds. Where did they come from? Probably from animals. When? We don't know exactly, but there is a good chance that the 1889-90 pandemic was caused by a corona virus [1]. Pandemics turn into endemics. Why should it be different this time?

[1] https://en.wikipedia.org/wiki/1889–1890_pandemic
No, no that’s not how journalism works. They report the FACTS as they see them. /s

There’s no such thing as a retraction anymore, it’s just clarifications. I would have more faith in the media if they admitted when they were wrong, or at least presented, thoughtfully considered, opposing viewpoints. My faith in the media perhaps really took its first hit with Nick Sandman. I just felt weird that all these people were coming down on a kid. The level of vitriol was disturbing, and many it seems were wrong. I expect CNN to say so, but I don’t think they will, and thus the conflict remains unresolved.
> The Burlington, Massachusetts-based company, for example, powered the speech recognition engine behind Apple's voice assistant, Siri.

That is the last speech recognition engine I would ever want to buy.
I call this the MLM approach. The more people you can scam, the more you use the size of your scam to pretend you're legitimate, while being a scam.

"Look how many people paid money for this/look how much money was paid for this, it must be worth that money! The actual efficacy of any product sold is secondary to the amount of money I've been paid"

I understand the 'tom brady rookie card' argument but it falls apart in the digital world. A digital image of Tom Brady as a rookie is worth nothing. A print of that digital image is worth less than cost of printing it. The value of the card is that its official merchandise of limited run with no way to create 'new' old cards.

Stop pretending NFTs are physical items, stop pretending they can't be infinitely reproduced.
>These social skills are crucial in this role.

For better or worse, a huge number of very successful leaders have had problems with losing their temper. Not that we should idolize poor anger control, of course.
The Minsky defense was not the primary, most important reason RMS can't serve as an effective, inclusive leader for free software, it was just the one that got the most attention. This does nothing to address the numerous complaints of harassment towards MIT students, the _other_ times he spoke out in implicit support of pedophilia, the public gaffes that are unacceptable as a public representative (e.g. the foot skin eating thing), and the fact that the FSF under Stallman kinda lost to open source anyway and hasn't really done anything besides virtue signal to others about how pure and ethical they are.
Copyright laws exist exclusively for the benefit of lawyers.
This is not an apology.
I've had the same thing happen with live versions.
The Pixies play "Where is my mind" very differently live, the vocal lines especially. First time I heard it was jarring because of the expectation and I didn't think it was good as the recorded version.
Recorded version feels much worse now.
You Belong With Me... wow

There's such a difference in a young up and coming begging for a guy to acknowledge they love the outcast, to Taylor Swift singing the same song.

They always tell you in vocal lessons that so much of a song has to do with feeling. For people like most of us on HN, that makes absolutely 0 sense, and for many decades I've never been able to understand that... until now. Same person, different life experiences tugging on the same song, and it hits like a ton of bricks.
Certainly sums up most games that involve any form of XP or grinding mechanic.
Cancer. They are cancer. Pure and simple.
I think they mentioned that they're going to remove the top bar for vertical tabs
Dast Automation with OWASP Zap
Serious scientific answers to absurd hypothetical questions
What part of "Renowned MIT Scientist Defends Epstein" (the title of the Daily Beast article) do you have trouble understanding?
>Whereas Cloudflare really are allowing people to deploy code at 100's of edge locations

Does cloudflare "really" deploy the code to the edge in any sense (e.g pushed to edge nodes, not just cached there)? I was under the impression this product uses some origin (likely, several) they manage, and their cdn.

Also cloudflare has a good number of POPs but I thought it was in the 100-200 range, not 200+
> Minsky (71) had sex with a 17 year old who had been trafficked and coerced, in 2001. This was several years after (1999) rumours started spreading about "pedophile island".

Fabricated from whole cloth. Not even Virginia Giuffre alleges this.

Source: The depositions. Which clearly none of you have read.
Well San Francisco has the highest LGBT concentration of any metro in the US by a decent margin.
Hotwire: Reactive Rails with no JavaScript? [deep dive into the HOTW frontend]
I'm talking about the laser communication satellites that NASA et al have launched into orbit, which are supposedly around 3-4 bits per photon.

These are hitting upwards of 10Gbit speeds (not quite 44.2 Terabits) but still impressive nonetheless.

https://en.wikipedia.org/wiki/Laser_communication_in_space
https://en.wikipedia.org/wiki/Optical_PAyload_for_Lasercomm_...
The movie was better.
https://en.wikipedia.org/wiki/For_All_Mankind_(film)
Actually, I have been using rust-analyzer, I misspoke.
> We the socially inept can and do learn to adapt. He’s a clever man, he can do it too.

This is such a weird concept to me. I have no problems getting social cues, it comes natural to me. Doing it purely intellectually? I wouldn't have a fucking idea how to. I think it's similar to doing pretty lame things like walking. It's a complex task that you can only do because you do it automatically. If we had a pill that would simply remove your muscle memory, you couldn't walk.

"Just do it consciously, lol" doesn't work, I think.
Several grams of deuterated water is sometimes ingested as part of metabolic tracing experiments, so it's known to be safe at that level.
I've always found the idea of master recordings curious. Once a song becomes a hit, the band may perform it almost every day for the rest of their career, but what we listen to through our headphones or speakers is this one particular moment in time. Yes, there are live recordings and bootlegs, but by and large it's this one master recording, which may get dusted off every couple of decades for a remaster.

Some masters are guarded jealously by their owners. For example, I've heard that some of the Stevie Wonder releases aren't even from the masters, because he won't part with them. Some masters may truly capture something irreproducible; say, John Lennon's hoarse voice in "Twist and Shout."

In this particular case, at least, Taylor Swift has put the lie to the uniqueness of the masters. If she has the right to rerecord everything, the old masters aren't so special. But I think the article is also right. After this exercise, she may have made her point, and may force Shamrock Capital to make a deal.
DC-X's followups didn't get funded because the government and its subcontractors were comfortable with the expendable rockets, at least until Boeing (which bought McD) got frozen out of most government contracts for the EELV program. They were "punished" for corporate espionage by the government giving the contract to the company with the expensive, important parts of the rocket built in Russia.

(BTW, kids, if you ever want to see what a successful act of espionage looks like, look at this: it would look like Boeing shooting off its own foot and then the Pentagon shooting off its own foot in response, both in ways that "accidentally" benefit Russia and make us dependent on them for space access.)
OpenSearch: AWS fork of Elasticsearch and Kibana
While I agree with most of this...

Who has trouble with ":x"? It's no more keystrokes than any other editor uses. I guess if you are in insert mode it's `esc :x`. I suppose you could bind a single keystroke in normal mode, but it's not that big a deal.

Multicursor would be fantastic. Macro goes pretty far to supporting what you do with multi cursor but falls a little short.
> Most epidemics disappear once populations achieve herd immunity and the pathogen has too few vulnerable bodies available as hosts for its self-propagation.

This makes it sound like most pandemic diseases reach a point where they essentially go extinct, but my understanding is that's not really accurate. They typically just reach an equilibrium where the negative effects fade into the background noise of general illness. This is what happened with the four human-endemic Coronaviruses which likely caused major pandemics in their time, but now fade into the background of cold season.
People in the comments still demanding this isn't enough and calling for his expulsion... just why? At this point you've lost. Your social justice crusade has been defeated and cooler, wiser heads have prevailed. It's actually embarrassing seeing people rush in here screeching STILL.
It does not matter one bit if contemporary audiences react as you predict. His statements, and that of his accusers, are all on the record.

I suspect RMS is made of sterner stuff, given his track record, and while no doubt these events must have exacted a psychological toll (after all, he is a human being) he must also be aware that there remain today many of us who deeply appreciate his principled positions regarding matters that affect us all.

And one remains hopeful that future generations that are afforded the necessary distance from conflated matters that cloud contemporary judgment will reach a more balanced conclusion and give the man his due credit.
The whole problem seems to be bizarrely defined when it comes to data structures.

Basically the input is `data+config` merged into one object and the return value is `data+config+tranversal_properties` merged into one object with lots of solutions mutating the original input data.
>These social skills are crucial in this role.

Absolutely not. He is a theorist (if not the theorist) of Free Software. His role is paramount, he is literally the only human completely implacable regarding the degrees of freedom that should be guaranteed to algorithms and software.

The whole movement he started has as well spurred the Creative Commons movement, that is an application to the same principles more specifically to art.